diff options
Diffstat (limited to 'js')
52 files changed, 1318 insertions, 1055 deletions
diff --git a/js/dist/alert.js b/js/dist/alert.js index ae3cb3d3fe..6bcde2615f 100644 --- a/js/dist/alert.js +++ b/js/dist/alert.js @@ -1,22 +1,55 @@ /*! - * Bootstrap alert.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap alert.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js')) : - typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.Data, global.EventHandler)); -}(this, (function (Data, EventHandler) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.Data, global.EventHandler, global.Base)); +}(this, (function (Data, EventHandler, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -27,7 +60,20 @@ var selector = element.getAttribute('data-bs-target'); if (!selector || selector === '#') { - var hrefAttr = element.getAttribute('href'); + var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes, + // so everything starting with `#` or `.`. If a "real" URL is used as the selector, + // `document.querySelector` will rightfully complain it is invalid. + // See https://github.com/twbs/bootstrap/issues/32273 + + if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) { + return null; + } // Just in case some CMS puts out a full URL with the anchor appended + + + if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) { + hrefAttr = '#' + hrefAttr.split('#')[1]; + } + selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null; } @@ -103,57 +149,26 @@ } }; - var isRTL = document.documentElement.dir === 'rtl'; - - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; - } - - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } + document.documentElement.dir === 'rtl'; - var _proto = BaseComponent.prototype; + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; - - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; } - }]); - - return BaseComponent; - }(); - - function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - - function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } + }); + }; - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -168,9 +183,9 @@ var EVENT_CLOSE = "close" + EVENT_KEY; var EVENT_CLOSED = "closed" + EVENT_KEY; var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY; - var CLASSNAME_ALERT = 'alert'; - var CLASSNAME_FADE = 'fade'; - var CLASSNAME_SHOW = 'show'; + var CLASS_NAME_ALERT = 'alert'; + var CLASS_NAME_FADE = 'fade'; + var CLASS_NAME_SHOW = 'show'; /** * ------------------------------------------------------------------------ * Class Definition @@ -201,7 +216,7 @@ ; _proto._getRootElement = function _getRootElement(element) { - return getElementFromSelector(element) || element.closest("." + CLASSNAME_ALERT); + return getElementFromSelector(element) || element.closest("." + CLASS_NAME_ALERT); }; _proto._triggerCloseEvent = function _triggerCloseEvent(element) { @@ -211,16 +226,16 @@ _proto._removeElement = function _removeElement(element) { var _this = this; - element.classList.remove(CLASSNAME_SHOW); + element.classList.remove(CLASS_NAME_SHOW); - if (!element.classList.contains(CLASSNAME_FADE)) { + if (!element.classList.contains(CLASS_NAME_FADE)) { this._destroyElement(element); return; } var transitionDuration = getTransitionDurationFromElement(element); - EventHandler__default['default'].one(element, TRANSITION_END, function () { + EventHandler__default['default'].one(element, 'transitionend', function () { return _this._destroyElement(element); }); emulateTransitionEnd(element, transitionDuration); @@ -259,16 +274,16 @@ }; }; - _createClass$1(Alert, null, [{ + _createClass(Alert, null, [{ key: "DATA_KEY", - // Getters - get: function get() { + get: // Getters + function get() { return DATA_KEY; } }]); return Alert; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -284,21 +299,7 @@ * add .Alert to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Alert.jQueryInterface; - $.fn[NAME].Constructor = Alert; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Alert.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Alert); return Alert; diff --git a/js/dist/alert.js.map b/js/dist/alert.js.map index 087af772ca..6ef85dc0e8 100644 --- a/js/dist/alert.js.map +++ b/js/dist/alert.js.map @@ -1 +1 @@ -{"version":3,"file":"alert.js","sources":["../src/util/index.js","../src/base-component.js","../src/alert.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n const hrefAttr = element.getAttribute('href')\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ?\n 'element' :\n toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`)\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nexport {\n TRANSITION_END,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst VERSION = '5.0.0-beta1'\n\nclass BaseComponent {\n constructor(element) {\n if (!element) {\n return\n }\n\n this._element = element\n Data.setData(element, this.constructor.DATA_KEY, this)\n }\n\n dispose() {\n Data.removeData(this._element, this.constructor.DATA_KEY)\n this._element = null\n }\n\n /** Static */\n\n static getInstance(element) {\n return Data.getData(element, this.DATA_KEY)\n }\n\n static get VERSION() {\n return VERSION\n }\n}\n\nexport default BaseComponent\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n getjQuery,\n onDOMContentLoaded,\n TRANSITION_END,\n emulateTransitionEnd,\n getElementFromSelector,\n getTransitionDurationFromElement\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'alert'\nconst DATA_KEY = 'bs.alert'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst SELECTOR_DISMISS = '[data-bs-dismiss=\"alert\"]'\n\nconst EVENT_CLOSE = `close${EVENT_KEY}`\nconst EVENT_CLOSED = `closed${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASSNAME_ALERT = 'alert'\nconst CLASSNAME_FADE = 'fade'\nconst CLASSNAME_SHOW = 'show'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Alert extends BaseComponent {\n // Getters\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n // Public\n\n close(element) {\n const rootElement = element ? this._getRootElement(element) : this._element\n const customEvent = this._triggerCloseEvent(rootElement)\n\n if (customEvent === null || customEvent.defaultPrevented) {\n return\n }\n\n this._removeElement(rootElement)\n }\n\n // Private\n\n _getRootElement(element) {\n return getElementFromSelector(element) || element.closest(`.${CLASSNAME_ALERT}`)\n }\n\n _triggerCloseEvent(element) {\n return EventHandler.trigger(element, EVENT_CLOSE)\n }\n\n _removeElement(element) {\n element.classList.remove(CLASSNAME_SHOW)\n\n if (!element.classList.contains(CLASSNAME_FADE)) {\n this._destroyElement(element)\n return\n }\n\n const transitionDuration = getTransitionDurationFromElement(element)\n\n EventHandler.one(element, TRANSITION_END, () => this._destroyElement(element))\n emulateTransitionEnd(element, transitionDuration)\n }\n\n _destroyElement(element) {\n if (element.parentNode) {\n element.parentNode.removeChild(element)\n }\n\n EventHandler.trigger(element, EVENT_CLOSED)\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.getData(this, DATA_KEY)\n\n if (!data) {\n data = new Alert(this)\n }\n\n if (config === 'close') {\n data[config](this)\n }\n })\n }\n\n static handleDismiss(alertInstance) {\n return function (event) {\n if (event) {\n event.preventDefault()\n }\n\n alertInstance.close(this)\n }\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()))\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Alert to jQuery only if jQuery is present\n */\n\nonDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n $.fn[NAME] = Alert.jQueryInterface\n $.fn[NAME].Constructor = Alert\n $.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Alert.jQueryInterface\n }\n }\n})\n\nexport default Alert\n"],"names":["MILLISECONDS_MULTIPLIER","TRANSITION_END","getSelector","element","selector","getAttribute","hrefAttr","trim","getElementFromSelector","document","querySelector","getTransitionDurationFromElement","window","getComputedStyle","transitionDuration","transitionDelay","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","split","triggerTransitionEnd","dispatchEvent","Event","emulateTransitionEnd","duration","called","durationPadding","emulatedDuration","listener","removeEventListener","addEventListener","setTimeout","getjQuery","jQuery","body","hasAttribute","onDOMContentLoaded","callback","readyState","isRTL","documentElement","dir","VERSION","BaseComponent","_element","Data","setData","constructor","DATA_KEY","dispose","removeData","getInstance","getData","NAME","EVENT_KEY","DATA_API_KEY","SELECTOR_DISMISS","EVENT_CLOSE","EVENT_CLOSED","EVENT_CLICK_DATA_API","CLASSNAME_ALERT","CLASSNAME_FADE","CLASSNAME_SHOW","Alert","close","rootElement","_getRootElement","customEvent","_triggerCloseEvent","defaultPrevented","_removeElement","closest","EventHandler","trigger","classList","remove","contains","_destroyElement","one","parentNode","removeChild","jQueryInterface","config","each","data","handleDismiss","alertInstance","event","preventDefault","on","$","JQUERY_NO_CONFLICT","fn","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAGA,IAAMA,uBAAuB,GAAG,IAAhC;EACA,IAAMC,cAAc,GAAG,eAAvB;;EAyBA,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAAAC,OAAO,EAAI;EAC7B,MAAIC,QAAQ,GAAGD,OAAO,CAACE,YAAR,CAAqB,gBAArB,CAAf;;EAEA,MAAI,CAACD,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AAC,CAACE,EAAF,CAAKvC,IAAL,IAAasC,kBAAb;EACA,aAAO5B,KAAK,CAACkB,eAAb;EACD,KAHD;EAID;EACF,CAZiB,CAAlB;;;;;;;;"}
\ No newline at end of file +{"version":3,"file":"alert.js","sources":["../src/util/index.js","../src/alert.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = '#' + hrefAttr.split('#')[1]\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = (name, plugin) => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nexport {\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n emulateTransitionEnd,\n getElementFromSelector,\n getTransitionDurationFromElement\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'alert'\nconst DATA_KEY = 'bs.alert'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst SELECTOR_DISMISS = '[data-bs-dismiss=\"alert\"]'\n\nconst EVENT_CLOSE = `close${EVENT_KEY}`\nconst EVENT_CLOSED = `closed${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_ALERT = 'alert'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Alert extends BaseComponent {\n // Getters\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n // Public\n\n close(element) {\n const rootElement = element ? this._getRootElement(element) : this._element\n const customEvent = this._triggerCloseEvent(rootElement)\n\n if (customEvent === null || customEvent.defaultPrevented) {\n return\n }\n\n this._removeElement(rootElement)\n }\n\n // Private\n\n _getRootElement(element) {\n return getElementFromSelector(element) || element.closest(`.${CLASS_NAME_ALERT}`)\n }\n\n _triggerCloseEvent(element) {\n return EventHandler.trigger(element, EVENT_CLOSE)\n }\n\n _removeElement(element) {\n element.classList.remove(CLASS_NAME_SHOW)\n\n if (!element.classList.contains(CLASS_NAME_FADE)) {\n this._destroyElement(element)\n return\n }\n\n const transitionDuration = getTransitionDurationFromElement(element)\n\n EventHandler.one(element, 'transitionend', () => this._destroyElement(element))\n emulateTransitionEnd(element, transitionDuration)\n }\n\n _destroyElement(element) {\n if (element.parentNode) {\n element.parentNode.removeChild(element)\n }\n\n EventHandler.trigger(element, EVENT_CLOSED)\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.getData(this, DATA_KEY)\n\n if (!data) {\n data = new Alert(this)\n }\n\n if (config === 'close') {\n data[config](this)\n }\n })\n }\n\n static handleDismiss(alertInstance) {\n return function (event) {\n if (event) {\n event.preventDefault()\n }\n\n alertInstance.close(this)\n }\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()))\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Alert to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(NAME, Alert)\n\nexport default Alert\n"],"names":["MILLISECONDS_MULTIPLIER","TRANSITION_END","getSelector","element","selector","getAttribute","hrefAttr","includes","startsWith","split","trim","getElementFromSelector","document","querySelector","getTransitionDurationFromElement","window","getComputedStyle","transitionDuration","transitionDelay","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","triggerTransitionEnd","dispatchEvent","Event","emulateTransitionEnd","duration","called","durationPadding","emulatedDuration","listener","removeEventListener","addEventListener","setTimeout","getjQuery","jQuery","body","hasAttribute","onDOMContentLoaded","callback","readyState","documentElement","dir","defineJQueryPlugin","name","plugin","$","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","NAME","DATA_KEY","EVENT_KEY","DATA_API_KEY","SELECTOR_DISMISS","EVENT_CLOSE","EVENT_CLOSED","EVENT_CLICK_DATA_API","CLASS_NAME_ALERT","CLASS_NAME_FADE","CLASS_NAME_SHOW","Alert","close","rootElement","_getRootElement","_element","customEvent","_triggerCloseEvent","defaultPrevented","_removeElement","closest","EventHandler","trigger","classList","remove","contains","_destroyElement","one","parentNode","removeChild","config","each","data","Data","getData","handleDismiss","alertInstance","event","preventDefault","BaseComponent","on"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAGA,IAAMA,uBAAuB,GAAG,IAAhC;EACA,IAAMC,cAAc,GAAG,eAAvB;;EAyBA,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAAAC,OAAO,EAAI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ApB,CAAlE;EAEA;EACA;EACA;EACA;EACA;EACA;;EAEApB,kBAAkB,CAACS,IAAD,EAAOW,KAAP,CAAlB;;;;;;;;"}
\ No newline at end of file diff --git a/js/dist/base-component.js b/js/dist/base-component.js new file mode 100644 index 0000000000..80605b5a1a --- /dev/null +++ b/js/dist/base-component.js @@ -0,0 +1,76 @@ +/*! + * Bootstrap base-component.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js')) : + typeof define === 'function' && define.amd ? define(['./dom/data'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Base = factory(global.Data)); +}(this, (function (Data) { 'use strict'; + + function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + + var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var VERSION = '5.0.0-beta2'; + + var BaseComponent = /*#__PURE__*/function () { + function BaseComponent(element) { + if (!element) { + return; + } + + this._element = element; + Data__default['default'].setData(element, this.constructor.DATA_KEY, this); + } + + var _proto = BaseComponent.prototype; + + _proto.dispose = function dispose() { + Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); + this._element = null; + } + /** Static */ + ; + + BaseComponent.getInstance = function getInstance(element) { + return Data__default['default'].getData(element, this.DATA_KEY); + }; + + _createClass(BaseComponent, null, [{ + key: "VERSION", + get: function get() { + return VERSION; + } + }]); + + return BaseComponent; + }(); + + return BaseComponent; + +}))); +//# sourceMappingURL=base-component.js.map diff --git a/js/dist/base-component.js.map b/js/dist/base-component.js.map new file mode 100644 index 0000000000..7b46dfb39e --- /dev/null +++ b/js/dist/base-component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base-component.js","sources":["../src/base-component.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst VERSION = '5.0.0-beta2'\n\nclass BaseComponent {\n constructor(element) {\n if (!element) {\n return\n }\n\n this._element = element\n Data.setData(element, this.constructor.DATA_KEY, this)\n }\n\n dispose() {\n Data.removeData(this._element, this.constructor.DATA_KEY)\n this._element = null\n }\n\n /** Static */\n\n static getInstance(element) {\n return Data.getData(element, this.DATA_KEY)\n }\n\n static get VERSION() {\n return VERSION\n }\n}\n\nexport default BaseComponent\n"],"names":["VERSION","BaseComponent","element","_element","Data","setData","constructor","DATA_KEY","dispose","removeData","getInstance","getData"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASA;EACA;EACA;EACA;EACA;;EAEA,IAAMA,OAAO,GAAG,aAAhB;;MAEMC;EACJ,yBAAYC,OAAZ,EAAqB;EACnB,QAAI,CAACA,OAAL,EAAc;EACZ;EACD;;EAED,SAAKC,QAAL,GAAgBD,OAAhB;EACAE,IAAAA,wBAAI,CAACC,OAAL,CAAaH,OAAb,EAAsB,KAAKI,WAAL,CAAiBC,QAAvC,EAAiD,IAAjD;EACD;;;;WAEDC,UAAA,mBAAU;EACRJ,IAAAA,wBAAI,CAACK,UAAL,CAAgB,KAAKN,QAArB,EAA+B,KAAKG,WAAL,CAAiBC,QAAhD;EACA,SAAKJ,QAAL,GAAgB,IAAhB;EACD;EAED;;;kBAEOO,cAAP,qBAAmBR,OAAnB,EAA4B;EAC1B,WAAOE,wBAAI,CAACO,OAAL,CAAaT,OAAb,EAAsB,KAAKK,QAA3B,CAAP;EACD;;;;WAED,eAAqB;EACnB,aAAOP,OAAP;EACD;;;;;;;;;;;;"}
\ No newline at end of file diff --git a/js/dist/button.js b/js/dist/button.js index e4d442a02a..7e6b55a600 100644 --- a/js/dist/button.js +++ b/js/dist/button.js @@ -1,22 +1,55 @@ /*! - * Bootstrap button.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap button.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js')) : - typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.Data, global.EventHandler)); -}(this, (function (Data, EventHandler) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.Data, global.EventHandler, global.Base)); +}(this, (function (Data, EventHandler, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -40,57 +73,26 @@ } }; - var isRTL = document.documentElement.dir === 'rtl'; - - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; - } - - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } - - var _proto = BaseComponent.prototype; + document.documentElement.dir === 'rtl'; - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; } - }]); - - return BaseComponent; - }(); - - function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - - function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } + }); + }; - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -140,16 +142,16 @@ }); }; - _createClass$1(Button, null, [{ + _createClass(Button, null, [{ key: "DATA_KEY", - // Getters - get: function get() { + get: // Getters + function get() { return DATA_KEY; } }]); return Button; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -175,21 +177,7 @@ * add .Button to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Button.jQueryInterface; - $.fn[NAME].Constructor = Button; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Button.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Button); return Button; diff --git a/js/dist/button.js.map b/js/dist/button.js.map index 487317f8cf..97a9b27831 100644 --- a/js/dist/button.js.map +++ b/js/dist/button.js.map @@ -1 +1 @@ -{"version":3,"file":"button.js","sources":["../src/util/index.js","../src/base-component.js","../src/button.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n const hrefAttr = element.getAttribute('href')\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ?\n 'element' :\n toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`)\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nexport {\n TRANSITION_END,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst VERSION = '5.0.0-beta1'\n\nclass BaseComponent {\n constructor(element) {\n if (!element) {\n return\n }\n\n this._element = element\n Data.setData(element, this.constructor.DATA_KEY, this)\n }\n\n dispose() {\n Data.removeData(this._element, this.constructor.DATA_KEY)\n this._element = null\n }\n\n /** Static */\n\n static getInstance(element) {\n return Data.getData(element, this.DATA_KEY)\n }\n\n static get VERSION() {\n return VERSION\n }\n}\n\nexport default BaseComponent\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { getjQuery, onDOMContentLoaded } from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'button'\nconst DATA_KEY = 'bs.button'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst CLASS_NAME_ACTIVE = 'active'\n\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"button\"]'\n\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Button extends BaseComponent {\n // Getters\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n // Public\n\n toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE))\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.getData(this, DATA_KEY)\n\n if (!data) {\n data = new Button(this)\n }\n\n if (config === 'toggle') {\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {\n event.preventDefault()\n\n const button = event.target.closest(SELECTOR_DATA_TOGGLE)\n\n let data = Data.getData(button, DATA_KEY)\n if (!data) {\n data = new Button(button)\n }\n\n data.toggle()\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Button to jQuery only if jQuery is present\n */\n\nonDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n $.fn[NAME] = Button.jQueryInterface\n $.fn[NAME].Constructor = Button\n\n $.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Button.jQueryInterface\n }\n }\n})\n\nexport default Button\n"],"names":["getjQuery","window","jQuery","document","body","hasAttribute","onDOMContentLoaded","callback","readyState","addEventListener","isRTL","documentElement","dir","VERSION","BaseComponent","element","_element","Data","setData","constructor","DATA_KEY","dispose","removeData","getInstance","getData","NAME","EVENT_KEY","DATA_API_KEY","CLASS_NAME_ACTIVE","SELECTOR_DATA_TOGGLE","EVENT_CLICK_DATA_API","Button","toggle","setAttribute","classList","jQueryInterface","config","each","data","EventHandler","on","event","preventDefault","button","target","closest","$","JQUERY_NO_CONFLICT","fn","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAqKA,IAAMA,SAAS,GAAG,SAAZA,SAAY,GAAM;EAAA,gBACHC,MADG;EAAA,MACdC,MADc,WACdA,MADc;;EAGtB,MAAIA,MAAM,IAAI,CAACC,QAAQ,CAACC,IAAT,CAAcC,YAAd,CAA2B,mBAA3B,CAAf,EAAgE;EAC9D,WAAOH,MAAP;EACD;;EAED,SAAO,IAAP;EACD,CARD;;EAUA,IAAMI,kBAAkB,GAAG,SAArBA,kBAAqB,CAAAC,QAAQ,EAAI;EACrC,MAAIJ,QAAQ,CAACK,UAAT,KAAwB,SAA5B,EAAuC;EACrCL,IAAAA,QAAQ,CAACM,gBAAT,CAA0B,kBAA1B,EAA8CF,QAA9C;EACD,GAFD,MAEO;EACLA,IAAAA,QAAQ;EACT;EACF,CAND;;EAQA,IAAMG,KAAK,GAAGP,QAAQ,CAACQ,eAAT,CAAyBC,GAAzB,KAAiC,KAA/C;;;;;ECnLA;EACA;EACA;EACA;EACA;;EAEA,IAAMC,OAAO,GAAG,aAAhB;;MAEMC;EACJ,yBAAYC,OAAZ,EAAqB;EACnB,QAAI,CAACA,OAAL,EAAc;EACZ;EACD;;EAED,SAAKC,QAAL,GAAgBD,OAAhB;EACAE,IAAAA,wBAAI,CAACC,OAAL,CAAaH,OAAb,EAAsB,KAAKI,WAAL,CAAiBC,QAAvC,EAAiD,IAAjD;EACD;;;;WAEDC,UAAA,mBAAU;EACRJ,IAAAA,wBAAI,CAACK,UAAL,CAAgB,KAAKN,QAArB,EAA+B,KAAKG,WAAL,CAAiBC,QAAhD;EACA,SAAKJ,QAAL,GAAgB,IAAhB;EACD;EA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AAN;EAEA,MAAMC,MAAM,GAAGF,KAAK,CAACG,MAAN,CAAaC,OAAb,CAAqBhB,oBAArB,CAAf;EAEA,MAAIS,IAAI,GAAGrB,wBAAI,CAACO,OAAL,CAAamB,MAAb,EAAqBvB,QAArB,CAAX;;EACA,MAAI,CAACkB,IAAL,EAAW;EACTA,IAAAA,IAAI,GAAG,IAAIP,MAAJ,CAAWY,MAAX,CAAP;EACD;;EAEDL,EAAAA,IAAI,CAACN,MAAL;EACD,CAXD;EAaA;EACA;EACA;EACA;EACA;EACA;;EAEA1B,kBAAkB,CAAC,YAAM;EACvB,MAAMwC,CAAC,GAAG9C,SAAS,EAAnB;EACA;;EACA,MAAI8C,CAAJ,EAAO;EACL,QAAMC,kBAAkB,GAAGD,CAAC,CAACE,EAAF,CAAKvB,IAAL,CAA3B;EACAqB,IAAAA,CAAC,CAACE,EAAF,CAAKvB,IAAL,IAAaM,MAAM,CAACI,eAApB;EACAW,IAAAA,CAAC,CAACE,EAAF,CAAKvB,IAAL,EAAWwB,WAAX,GAAyBlB,MAAzB;;EAEAe,IAAAA,CAAC,CAACE,EAAF,CAAKvB,IAAL,EAAWyB,UAAX,GAAwB,YAAM;EAC5BJ,MAAAA,CAAC,CAACE,EAAF,CAAKvB,IAAL,IAAasB,kBAAb;EACA,aAAOhB,MAAM,CAACI,eAAd;EACD,KAHD;EAID;EACF,CAbiB,CAAlB;;;;;;;;"}
\ No newline at end of file +{"version":3,"file":"button.js","sources":["../src/util/index.js","../src/button.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = '#' + hrefAttr.split('#')[1]\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = (name, plugin) => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nexport {\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { defineJQueryPlugin } from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'button'\nconst DATA_KEY = 'bs.button'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst CLASS_NAME_ACTIVE = 'active'\n\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"button\"]'\n\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Button extends BaseComponent {\n // Getters\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n // Public\n\n toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE))\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.getData(this, DATA_KEY)\n\n if (!data) {\n data = new Button(this)\n }\n\n if (config === 'toggle') {\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {\n event.preventDefault()\n\n const button = event.target.closest(SELECTOR_DATA_TOGGLE)\n\n let data = Data.getData(button, DATA_KEY)\n if (!data) {\n data = new Button(button)\n }\n\n data.toggle()\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Button to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(NAME, Button)\n\nexport default Button\n"],"names":["getjQuery","window","jQuery","document","body","hasAttribute","onDOMContentLoaded","callback","readyState","addEventListener","documentElement","dir","defineJQueryPlugin","name","plugin","$","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","NAME","DATA_KEY","EVENT_KEY","DATA_API_KEY","CLASS_NAME_ACTIVE","SELECTOR_DATA_TOGGLE","EVENT_CLICK_DATA_API","Button","toggle","_element","setAttribute","classList","config","each","data","Data","getData","BaseComponent","EventHandler","on","event","preventDefault","button","target","closest"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAiLA,IAAMA,SAAS,GAAG,SAAZA,SAAY,GAAM;EAAA,gBACHC,MADG;EAAA,MACdC,MADc,WACdA,MADc;;EAGtB,MAAIA,MAAM,IAAI,CAACC,QAAQ,CAACC,IAAT,CAAcC,YAAd,CAA2B,mBAA3B,CAAf,EAAgE;EAC9D,WAAOH,MAAP;EACD;;EAED,SAAO,IAAP;EACD,CARD;;EAUA,IAAMI,kBAAkB,GAAG,SAArBA,kBAAqB,CAAAC,QAAQ,EAAI;EACrC,MAAIJ,QAAQ,CAACK,UAAT,KAAwB,SAA5B,EAAuC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A+BJ,iBAA/B,CAA3C;EACD;;;WAIMP,kBAAP,yBAAuBe,MAAvB,EAA+B;EAC7B,WAAO,KAAKC,IAAL,CAAU,YAAY;EAC3B,UAAIC,IAAI,GAAGC,wBAAI,CAACC,OAAL,CAAa,IAAb,EAAmBf,QAAnB,CAAX;;EAEA,UAAI,CAACa,IAAL,EAAW;EACTA,QAAAA,IAAI,GAAG,IAAIP,MAAJ,CAAW,IAAX,CAAP;EACD;;EAED,UAAIK,MAAM,KAAK,QAAf,EAAyB;EACvBE,QAAAA,IAAI,CAACF,MAAD,CAAJ;EACD;EACF,KAVM,CAAP;EAWD;;;;;EAzBD,mBAAsB;EACpB,aAAOX,QAAP;EACD;;;;IALkBgB;EA+BrB;EACA;EACA;EACA;EACA;;;AAEAC,kCAAY,CAACC,EAAb,CAAgBrC,QAAhB,EAA0BwB,oBAA1B,EAAgDD,oBAAhD,EAAsE,UAAAe,KAAK,EAAI;EAC7EA,EAAAA,KAAK,CAACC,cAAN;EAEA,MAAMC,MAAM,GAAGF,KAAK,CAACG,MAAN,CAAaC,OAAb,CAAqBnB,oBAArB,CAAf;EAEA,MAAIS,IAAI,GAAGC,wBAAI,CAACC,OAAL,CAAaM,MAAb,EAAqBrB,QAArB,CAAX;;EACA,MAAI,CAACa,IAAL,EAAW;EACTA,IAAAA,IAAI,GAAG,IAAIP,MAAJ,CAAWe,MAAX,CAAP;EACD;;EAEDR,EAAAA,IAAI,CAACN,MAAL;EACD,CAXD;EAaA;EACA;EACA;EACA;EACA;EACA;;EAEAjB,kBAAkB,CAACS,IAAD,EAAOO,MAAP,CAAlB;;;;;;;;"}
\ No newline at end of file diff --git a/js/dist/carousel.js b/js/dist/carousel.js index 8b1ce3e7d7..ac6e8455b5 100644 --- a/js/dist/carousel.js +++ b/js/dist/carousel.js @@ -1,13 +1,13 @@ /*! - * Bootstrap carousel.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap carousel.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) : - typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); -}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); +}(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } @@ -15,10 +15,61 @@ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -37,7 +88,20 @@ var selector = element.getAttribute('data-bs-target'); if (!selector || selector === '#') { - var hrefAttr = element.getAttribute('href'); + var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes, + // so everything starting with `#` or `.`. If a "real" URL is used as the selector, + // `document.querySelector` will rightfully complain it is invalid. + // See https://github.com/twbs/bootstrap/issues/32273 + + if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) { + return null; + } // Just in case some CMS puts out a full URL with the anchor appended + + + if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) { + hrefAttr = '#' + hrefAttr.split('#')[1]; + } + selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null; } @@ -105,7 +169,7 @@ var valueType = value && isElement(value) ? 'element' : toType(value); if (!new RegExp(expectedTypes).test(valueType)) { - throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); + throw new TypeError(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); } }); }; @@ -149,57 +213,24 @@ var isRTL = document.documentElement.dir === 'rtl'; - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; - } - - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - var _proto = BaseComponent.prototype; - - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; - - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; } - }]); - - return BaseComponent; - }(); - - function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - - function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - - function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } + }); + }; - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -262,12 +293,11 @@ var SELECTOR_ITEM_IMG = '.carousel-item img'; var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'; var SELECTOR_INDICATORS = '.carousel-indicators'; + var SELECTOR_INDICATOR = '[data-bs-target]'; var SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]'; var SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]'; - var PointerType = { - TOUCH: 'touch', - PEN: 'pen' - }; + var POINTER_TYPE_TOUCH = 'touch'; + var POINTER_TYPE_PEN = 'pen'; /** * ------------------------------------------------------------------------ * Class Definition @@ -414,12 +444,20 @@ this.touchDeltaX = 0; // swipe left if (direction > 0) { - this.prev(); + if (isRTL) { + this.next(); + } else { + this.prev(); + } } // swipe right if (direction < 0) { - this.next(); + if (isRTL) { + this.prev(); + } else { + this.next(); + } } }; @@ -450,7 +488,7 @@ var _this4 = this; var start = function start(event) { - if (_this4._pointerEvent && PointerType[event.pointerType.toUpperCase()]) { + if (_this4._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) { _this4.touchStartX = event.clientX; } else if (!_this4._pointerEvent) { _this4.touchStartX = event.touches[0].clientX; @@ -467,7 +505,7 @@ }; var end = function end(event) { - if (_this4._pointerEvent && PointerType[event.pointerType.toUpperCase()]) { + if (_this4._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) { _this4.touchDeltaX = event.clientX - _this4.touchStartX; } @@ -526,16 +564,22 @@ return; } - switch (event.key) { - case ARROW_LEFT_KEY: - event.preventDefault(); + if (event.key === ARROW_LEFT_KEY) { + event.preventDefault(); + + if (isRTL) { + this.next(); + } else { this.prev(); - break; + } + } else if (event.key === ARROW_RIGHT_KEY) { + event.preventDefault(); - case ARROW_RIGHT_KEY: - event.preventDefault(); + if (isRTL) { + this.prev(); + } else { this.next(); - break; + } } }; @@ -577,16 +621,17 @@ _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) { if (this._indicatorsElement) { - var indicators = SelectorEngine__default['default'].find(SELECTOR_ACTIVE, this._indicatorsElement); + var activeIndicator = SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE, this._indicatorsElement); + activeIndicator.classList.remove(CLASS_NAME_ACTIVE); + activeIndicator.removeAttribute('aria-current'); + var indicators = SelectorEngine__default['default'].find(SELECTOR_INDICATOR, this._indicatorsElement); for (var i = 0; i < indicators.length; i++) { - indicators[i].classList.remove(CLASS_NAME_ACTIVE); - } - - var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; - - if (nextIndicator) { - nextIndicator.classList.add(CLASS_NAME_ACTIVE); + if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) { + indicators[i].classList.add(CLASS_NAME_ACTIVE); + indicators[i].setAttribute('aria-current', 'true'); + break; + } } } }; @@ -620,19 +665,9 @@ var nextElementIndex = this._getItemIndex(nextElement); var isCycling = Boolean(this._interval); - var directionalClassName; - var orderClassName; - var eventDirectionName; - - if (direction === DIRECTION_NEXT) { - directionalClassName = CLASS_NAME_START; - orderClassName = CLASS_NAME_NEXT; - eventDirectionName = DIRECTION_LEFT; - } else { - directionalClassName = CLASS_NAME_END; - orderClassName = CLASS_NAME_PREV; - eventDirectionName = DIRECTION_RIGHT; - } + var directionalClassName = direction === DIRECTION_NEXT ? CLASS_NAME_START : CLASS_NAME_END; + var orderClassName = direction === DIRECTION_NEXT ? CLASS_NAME_NEXT : CLASS_NAME_PREV; + var eventDirectionName = direction === DIRECTION_NEXT ? DIRECTION_LEFT : DIRECTION_RIGHT; if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE)) { this._isSliding = false; @@ -666,7 +701,7 @@ activeElement.classList.add(directionalClassName); nextElement.classList.add(directionalClassName); var transitionDuration = getTransitionDurationFromElement(activeElement); - EventHandler__default['default'].one(activeElement, TRANSITION_END, function () { + EventHandler__default['default'].one(activeElement, 'transitionend', function () { nextElement.classList.remove(directionalClassName, orderClassName); nextElement.classList.add(CLASS_NAME_ACTIVE); activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName); @@ -758,7 +793,7 @@ event.preventDefault(); }; - _createClass$1(Carousel, null, [{ + _createClass(Carousel, null, [{ key: "Default", get: function get() { return Default; @@ -771,7 +806,7 @@ }]); return Carousel; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -794,21 +829,7 @@ * add .Carousel to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Carousel.jQueryInterface; - $.fn[NAME].Constructor = Carousel; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Carousel.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Carousel); return Carousel; diff --git a/js/dist/carousel.js.map b/js/dist/carousel.js.map index df8f029ab4..c681d93033 100644 --- a/js/dist/carousel.js.map +++ b/js/dist/carousel.js.map @@ -1 +1 @@ -{"version":3,"file":"carousel.js","sources":["../src/util/index.js","../src/base-component.js","../src/carousel.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n const hrefAttr = element.getAttribute('href')\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ?\n 'element' :\n toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`)\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nexport {\n TRANSITION_END,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst VERSION = '5.0.0-beta1'\n\nclass BaseComponent {\n constructor(element) {\n if (!element) {\n return\n }\n\n this._element = element\n Data.setData(element, this.constructor.DATA_KEY, this)\n }\n\n dispose() {\n Data.removeData(this._element, this.constructor.DATA_KEY)\n this._element = null\n }\n\n /** Static */\n\n static getInstance(element) {\n return Data.getData(element, this.DATA_KEY)\n }\n\n static get VERSION() {\n return VERSION\n }\n}\n\nexport default BaseComponent\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n getjQuery,\n onDOMContentLoaded,\n TRANSITION_END,\n emulateTransitionEnd,\n getElementFromSelector,\n getTransitionDurationFromElement,\n isVisible,\n reflow,\n triggerTransitionEnd,\n typeCheckConfig\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'carousel'\nconst DATA_KEY = 'bs.carousel'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst ARROW_LEFT_KEY = 'ArrowLeft'\nconst ARROW_RIGHT_KEY = 'ArrowRight'\nconst TOUCHEVENT_COMPAT_WAIT = 500 // Time for mouse compat events to fire after touch\nconst SWIPE_THRESHOLD = 40\n\nconst Default = {\n interval: 5000,\n keyboard: true,\n slide: false,\n pause: 'hover',\n wrap: true,\n touch: true\n}\n\nconst DefaultType = {\n interval: '(number|boolean)',\n keyboard: 'boolean',\n slide: '(boolean|string)',\n pause: '(string|boolean)',\n wrap: 'boolean',\n touch: 'boolean'\n}\n\nconst DIRECTION_NEXT = 'next'\nconst DIRECTION_PREV = 'prev'\nconst DIRECTION_LEFT = 'left'\nconst DIRECTION_RIGHT = 'right'\n\nconst EVENT_SLIDE = `slide${EVENT_KEY}`\nconst EVENT_SLID = `slid${EVENT_KEY}`\nconst EVENT_KEYDOWN = `keydown${EVENT_KEY}`\nconst EVENT_MOUSEENTER = `mouseenter${EVENT_KEY}`\nconst EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY}`\nconst EVENT_TOUCHSTART = `touchstart${EVENT_KEY}`\nconst EVENT_TOUCHMOVE = `touchmove${EVENT_KEY}`\nconst EVENT_TOUCHEND = `touchend${EVENT_KEY}`\nconst EVENT_POINTERDOWN = `pointerdown${EVENT_KEY}`\nconst EVENT_POINTERUP = `pointerup${EVENT_KEY}`\nconst EVENT_DRAG_START = `dragstart${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_CAROUSEL = 'carousel'\nconst CLASS_NAME_ACTIVE = 'active'\nconst CLASS_NAME_SLIDE = 'slide'\nconst CLASS_NAME_END = 'carousel-item-end'\nconst CLASS_NAME_START = 'carousel-item-start'\nconst CLASS_NAME_NEXT = 'carousel-item-next'\nconst CLASS_NAME_PREV = 'carousel-item-prev'\nconst CLASS_NAME_POINTER_EVENT = 'pointer-event'\n\nconst SELECTOR_ACTIVE = '.active'\nconst SELECTOR_ACTIVE_ITEM = '.active.carousel-item'\nconst SELECTOR_ITEM = '.carousel-item'\nconst SELECTOR_ITEM_IMG = '.carousel-item img'\nconst SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'\nconst SELECTOR_INDICATORS = '.carousel-indicators'\nconst SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]'\nconst SELECTOR_DATA_RIDE = '[data-bs-ride=\"carousel\"]'\n\nconst PointerType = {\n TOUCH: 'touch',\n PEN: 'pen'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\nclass Carousel extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._items = null\n this._interval = null\n this._activeElement = null\n this._isPaused = false\n this._isSliding = false\n this.touchTimeout = null\n this.touchStartX = 0\n this.touchDeltaX = 0\n\n this._config = this._getConfig(config)\n this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element)\n this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0\n this._pointerEvent = Boolean(window.PointerEvent)\n\n this._addEventListeners()\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n // Public\n\n next() {\n if (!this._isSliding) {\n this._slide(DIRECTION_NEXT)\n }\n }\n\n nextWhenVisible() {\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden && isVisible(this._element)) {\n this.next()\n }\n }\n\n prev() {\n if (!this._isSliding) {\n this._slide(DIRECTION_PREV)\n }\n }\n\n pause(event) {\n if (!event) {\n this._isPaused = true\n }\n\n if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {\n triggerTransitionEnd(this._element)\n this.cycle(true)\n }\n\n clearInterval(this._interval)\n this._interval = null\n }\n\n cycle(event) {\n if (!event) {\n this._isPaused = false\n }\n\n if (this._interval) {\n clearInterval(this._interval)\n this._interval = null\n }\n\n if (this._config && this._config.interval && !this._isPaused) {\n this._updateInterval()\n\n this._interval = setInterval(\n (document.visibilityState ? this.nextWhenVisible : this.next).bind(this),\n this._config.interval\n )\n }\n }\n\n to(index) {\n this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)\n const activeIndex = this._getItemIndex(this._activeElement)\n\n if (index > this._items.length - 1 || index < 0) {\n return\n }\n\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.to(index))\n return\n }\n\n if (activeIndex === index) {\n this.pause()\n this.cycle()\n return\n }\n\n const direction = index > activeIndex ?\n DIRECTION_NEXT :\n DIRECTION_PREV\n\n this._slide(direction, this._items[index])\n }\n\n dispose() {\n super.dispose()\n EventHandler.off(this._element, EVENT_KEY)\n\n this._items = null\n this._config = null\n this._interval = null\n this._isPaused = null\n this._isSliding = null\n this._activeElement = null\n this._indicatorsElement = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _handleSwipe() {\n const absDeltax = Math.abs(this.touchDeltaX)\n\n if (absDeltax <= SWIPE_THRESHOLD) {\n return\n }\n\n const direction = absDeltax / this.touchDeltaX\n\n this.touchDeltaX = 0\n\n // swipe left\n if (direction > 0) {\n this.prev()\n }\n\n // swipe right\n if (direction < 0) {\n this.next()\n }\n }\n\n _addEventListeners() {\n if (this._config.keyboard) {\n EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event))\n }\n\n if (this._config.pause === 'hover') {\n EventHandler.on(this._element, EVENT_MOUSEENTER, event => this.pause(event))\n EventHandler.on(this._element, EVENT_MOUSELEAVE, event => this.cycle(event))\n }\n\n if (this._config.touch && this._touchSupported) {\n this._addTouchEventListeners()\n }\n }\n\n _addTouchEventListeners() {\n const start = event => {\n if (this._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {\n this.touchStartX = event.clientX\n } else if (!this._pointerEvent) {\n this.touchStartX = event.touches[0].clientX\n }\n }\n\n const move = event => {\n // ensure swiping with one touch and not pinching\n if (event.touches && event.touches.length > 1) {\n this.touchDeltaX = 0\n } else {\n this.touchDeltaX = event.touches[0].clientX - this.touchStartX\n }\n }\n\n const end = event => {\n if (this._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {\n this.touchDeltaX = event.clientX - this.touchStartX\n }\n\n this._handleSwipe()\n if (this._config.pause === 'hover') {\n // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n\n this.pause()\n if (this.touchTimeout) {\n clearTimeout(this.touchTimeout)\n }\n\n this.touchTimeout = setTimeout(event => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval)\n }\n }\n\n SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => {\n EventHandler.on(itemImg, EVENT_DRAG_START, e => e.preventDefault())\n })\n\n if (this._pointerEvent) {\n EventHandler.on(this._element, EVENT_POINTERDOWN, event => start(event))\n EventHandler.on(this._element, EVENT_POINTERUP, event => end(event))\n\n this._element.classList.add(CLASS_NAME_POINTER_EVENT)\n } else {\n EventHandler.on(this._element, EVENT_TOUCHSTART, event => start(event))\n EventHandler.on(this._element, EVENT_TOUCHMOVE, event => move(event))\n EventHandler.on(this._element, EVENT_TOUCHEND, event => end(event))\n }\n }\n\n _keydown(event) {\n if (/input|textarea/i.test(event.target.tagName)) {\n return\n }\n\n switch (event.key) {\n case ARROW_LEFT_KEY:\n event.preventDefault()\n this.prev()\n break\n case ARROW_RIGHT_KEY:\n event.preventDefault()\n this.next()\n break\n default:\n }\n }\n\n _getItemIndex(element) {\n this._items = element && element.parentNode ?\n SelectorEngine.find(SELECTOR_ITEM, element.parentNode) :\n []\n\n return this._items.indexOf(element)\n }\n\n _getItemByDirection(direction, activeElement) {\n const isNextDirection = direction === DIRECTION_NEXT\n const isPrevDirection = direction === DIRECTION_PREV\n const activeIndex = this._getItemIndex(activeElement)\n const lastItemIndex = this._items.length - 1\n const isGoingToWrap = (isPrevDirection && activeIndex === 0) ||\n (isNextDirection && activeIndex === lastItemIndex)\n\n if (isGoingToWrap && !this._config.wrap) {\n return activeElement\n }\n\n const delta = direction === DIRECTION_PREV ? -1 : 1\n const itemIndex = (activeIndex + delta) % this._items.length\n\n return itemIndex === -1 ?\n this._items[this._items.length - 1] :\n this._items[itemIndex]\n }\n\n _triggerSlideEvent(relatedTarget, eventDirectionName) {\n const targetIndex = this._getItemIndex(relatedTarget)\n const fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element))\n\n return EventHandler.trigger(this._element, EVENT_SLIDE, {\n relatedTarget,\n direction: eventDirectionName,\n from: fromIndex,\n to: targetIndex\n })\n }\n\n _setActiveIndicatorElement(element) {\n if (this._indicatorsElement) {\n const indicators = SelectorEngine.find(SELECTOR_ACTIVE, this._indicatorsElement)\n\n for (let i = 0; i < indicators.length; i++) {\n indicators[i].classList.remove(CLASS_NAME_ACTIVE)\n }\n\n const nextIndicator = this._indicatorsElement.children[\n this._getItemIndex(element)\n ]\n\n if (nextIndicator) {\n nextIndicator.classList.add(CLASS_NAME_ACTIVE)\n }\n }\n }\n\n _updateInterval() {\n const element = this._activeElement || SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)\n\n if (!element) {\n return\n }\n\n const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10)\n\n if (elementInterval) {\n this._config.defaultInterval = this._config.defaultInterval || this._config.interval\n this._config.interval = elementInterval\n } else {\n this._config.interval = this._config.defaultInterval || this._config.interval\n }\n }\n\n _slide(direction, element) {\n const activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)\n const activeElementIndex = this._getItemIndex(activeElement)\n const nextElement = element || (activeElement && this._getItemByDirection(direction, activeElement))\n\n const nextElementIndex = this._getItemIndex(nextElement)\n const isCycling = Boolean(this._interval)\n\n let directionalClassName\n let orderClassName\n let eventDirectionName\n\n if (direction === DIRECTION_NEXT) {\n directionalClassName = CLASS_NAME_START\n orderClassName = CLASS_NAME_NEXT\n eventDirectionName = DIRECTION_LEFT\n } else {\n directionalClassName = CLASS_NAME_END\n orderClassName = CLASS_NAME_PREV\n eventDirectionName = DIRECTION_RIGHT\n }\n\n if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE)) {\n this._isSliding = false\n return\n }\n\n const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName)\n if (slideEvent.defaultPrevented) {\n return\n }\n\n if (!activeElement || !nextElement) {\n // Some weirdness is happening, so we bail\n return\n }\n\n this._isSliding = true\n\n if (isCycling) {\n this.pause()\n }\n\n this._setActiveIndicatorElement(nextElement)\n this._activeElement = nextElement\n\n if (this._element.classList.contains(CLASS_NAME_SLIDE)) {\n nextElement.classList.add(orderClassName)\n\n reflow(nextElement)\n\n activeElement.classList.add(directionalClassName)\n nextElement.classList.add(directionalClassName)\n\n const transitionDuration = getTransitionDurationFromElement(activeElement)\n\n EventHandler.one(activeElement, TRANSITION_END, () => {\n nextElement.classList.remove(directionalClassName, orderClassName)\n nextElement.classList.add(CLASS_NAME_ACTIVE)\n\n activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName)\n\n this._isSliding = false\n\n setTimeout(() => {\n EventHandler.trigger(this._element, EVENT_SLID, {\n relatedTarget: nextElement,\n direction: eventDirectionName,\n from: activeElementIndex,\n to: nextElementIndex\n })\n }, 0)\n })\n\n emulateTransitionEnd(activeElement, transitionDuration)\n } else {\n activeElement.classList.remove(CLASS_NAME_ACTIVE)\n nextElement.classList.add(CLASS_NAME_ACTIVE)\n\n this._isSliding = false\n EventHandler.trigger(this._element, EVENT_SLID, {\n relatedTarget: nextElement,\n direction: eventDirectionName,\n from: activeElementIndex,\n to: nextElementIndex\n })\n }\n\n if (isCycling) {\n this.cycle()\n }\n }\n\n // Static\n\n static carouselInterface(element, config) {\n let data = Data.getData(element, DATA_KEY)\n let _config = {\n ...Default,\n ...Manipulator.getDataAttributes(element)\n }\n\n if (typeof config === 'object') {\n _config = {\n ..._config,\n ...config\n }\n }\n\n const action = typeof config === 'string' ? config : _config.slide\n\n if (!data) {\n data = new Carousel(element, _config)\n }\n\n if (typeof config === 'number') {\n data.to(config)\n } else if (typeof action === 'string') {\n if (typeof data[action] === 'undefined') {\n throw new TypeError(`No method named \"${action}\"`)\n }\n\n data[action]()\n } else if (_config.interval && _config.ride) {\n data.pause()\n data.cycle()\n }\n }\n\n static jQueryInterface(config) {\n return this.each(function () {\n Carousel.carouselInterface(this, config)\n })\n }\n\n static dataApiClickHandler(event) {\n const target = getElementFromSelector(this)\n\n if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {\n return\n }\n\n const config = {\n ...Manipulator.getDataAttributes(target),\n ...Manipulator.getDataAttributes(this)\n }\n const slideIndex = this.getAttribute('data-bs-slide-to')\n\n if (slideIndex) {\n config.interval = false\n }\n\n Carousel.carouselInterface(target, config)\n\n if (slideIndex) {\n Data.getData(target, DATA_KEY).to(slideIndex)\n }\n\n event.preventDefault()\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler)\n\nEventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE)\n\n for (let i = 0, len = carousels.length; i < len; i++) {\n Carousel.carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY))\n }\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Carousel to jQuery only if jQuery is present\n */\n\nonDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n $.fn[NAME] = Carousel.jQueryInterface\n $.fn[NAME].Constructor = Carousel\n $.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Carousel.jQueryInterface\n }\n }\n})\n\nexport default Carousel\n"],"names":["MILLISECONDS_MULTIPLIER","TRANSITION_END","toType","obj","undefined","toString","call","match","toLowerCase","getSelector","element","selector","getAttribute","hrefAttr","trim","getElementFromSelector","document","querySelector","getTransitionDurationFromElement","window","getComputedStyle","transitionDuration","transitionDelay","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","split","triggerTransitionEnd","dispatchEvent","Event","isElement","nodeType","emulateTransitionEnd","duration","called","durationPadding","emulatedDuration","listener","removeEventListener","addEventListener","setTimeout","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","Error","toUpperCase","isVisible","style","parentNode","elementStyle","parentNodeStyle","display","visibility","reflow","offsetHeight","getjQuery","jQuery","body","hasAttribute","onDOMContentLoaded","callback","readyState","isRTL","documentElement","dir","VERSION","BaseComponent","_element","Data","setData","constructor","DATA_KEY","dispose","removeData","getInstance","getData","NAME","EVENT_KEY","DATA_API_KEY","ARROW_LEFT_KEY","ARROW_RIGHT_KEY","TOUCHEVENT_COMPAT_WAIT","SWIPE_THRESHOLD","Default","interval","keyboard","slide","pause","wrap","touch","DefaultType","DIRECTION_NEXT","DIRECTION_PREV","DIRECTION_LEFT","DIRECTION_RIGHT","EVENT_SLIDE","EVENT_SLID","EVENT_KEYDOWN","EVENT_MOUSEENTER","EVENT_MOUSELEAVE","EVENT_TOUCHSTART","EVENT_TOUCHMOVE","EVENT_TOUCHEND","EVENT_POINTERDOWN","EVENT_POINTERUP","EVENT_DRAG_START","EVENT_LOAD_DATA_API","EVENT_CLICK_DATA_API","CLASS_NAME_CAROUSEL","CLASS_NAME_ACTIVE","CLASS_NAME_SLIDE","CLASS_NAME_END","CLASS_NAME_START","CLASS_NAME_NEXT","CLASS_NAME_PREV","CLASS_NAME_POINTER_EVENT","SELECTOR_ACTIVE","SELECTOR_ACTIVE_ITEM","SELECTOR_ITEM","SELECTOR_ITEM_IMG","SELECTOR_NEXT_PREV","SELECTOR_INDICATORS","SELECTOR_DATA_SLIDE","SELECTOR_DATA_RIDE","PointerType","TOUCH","PEN","Carousel","_items","_interval","_activeElement","_isPaused","_isSliding","touchTimeout","touchStartX","touchDeltaX","_config","_getConfig","_indicatorsElement","SelectorEngine","findOne","_touchSupported","navigator","maxTouchPoints","_pointerEvent","Boolean","PointerEvent","_addEventListeners","next","_slide","nextWhenVisible","hidden","prev","event","cycle","clearInterval","_updateInterval","setInterval","visibilityState","bind","to","index","activeIndex","_getItemIndex","length","EventHandler","one","direction","off","_handleSwipe","absDeltax","Math","abs","on","_keydown","_addTouchEventListeners","start","pointerType","clientX","touches","move","end","clearTimeout","find","itemImg","e","preventDefault","classList","add","target","tagName","key","indexOf","_getItemByDirection","activeElement","isNextDirection","isPrevDirection","lastItemIndex","isGoingToWrap","delta","itemIndex","_triggerSlideEvent","relatedTarget","eventDirectionName","targetIndex","fromIndex","trigger","from","_setActiveIndicatorElement","indicators","i","remove","nextIndicator","children","elementInterval","parseInt","defaultInterval","activeElementIndex","nextElement","nextElementIndex","isCycling","directionalClassName","orderClassName","contains","slideEvent","defaultPrevented","carouselInterface","data","Manipulator","getDataAttributes","action","TypeError","ride","jQueryInterface","each","dataApiClickHandler","slideIndex","carousels","len","$","JQUERY_NO_CONFLICT","fn","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAGA,IAAMA,uBAAuB,GAAG,IAAhC;EACA,IAAMC,cAAc,GAAG,eAAvB;;EAGA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAAAC,GAAG,EAAI;EACpB,MAAIA,GAAG,KAAK,IAAR,IAAgBA,GAAG,KAAKC,SAA5B,EAAuC;EACrC,gBAAUD,GAAV;EACD;;EAED,SAAO,GAAGE,QAAH,CAAYC,IAAZ,CAAiBH,GAAjB,EAAsBI,KAAtB,CAA4B,aAA5B,EAA2C,CAA3C,EAA8CC,WAA9C,EAAP;EACD,CAND;;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6C,YAAM;EACjD,MAAMmI,SAAS,GAAGlG,kCAAc,CAAC4C,IAAf,CAAoB5D,kBAApB,CAAlB;;EAEA,OAAK,IAAIuF,CAAC,GAAG,CAAR,EAAW4B,GAAG,GAAGD,SAAS,CAACzE,MAAhC,EAAwC8C,CAAC,GAAG4B,GAA5C,EAAiD5B,CAAC,EAAlD,EAAsD;EACpDnF,IAAAA,QAAQ,CAACmG,iBAAT,CAA2BW,SAAS,CAAC3B,CAAD,CAApC,EAAyC9I,wBAAI,CAACO,OAAL,CAAakK,SAAS,CAAC3B,CAAD,CAAtB,EAA2B3I,QAA3B,CAAzC;EACD;EACF,CAND;EAQA;EACA;EACA;EACA;EACA;EACA;;EAEAZ,kBAAkB,CAAC,YAAM;EACvB,MAAMoL,CAAC,GAAGxL,SAAS,EAAnB;EACA;;EACA,MAAIwL,CAAJ,EAAO;EACL,QAAMC,kBAAkB,GAAGD,CAAC,CAACE,EAAF,CAAKrK,IAAL,CAA3B;EACAmK,IAAAA,CAAC,CAACE,EAAF,CAAKrK,IAAL,IAAamD,QAAQ,CAAC0G,eAAtB;EACAM,IAAAA,CAAC,CAACE,EAAF,CAAKrK,IAAL,EAAWsK,WAAX,GAAyBnH,QAAzB;;EACAgH,IAAAA,CAAC,CAACE,EAAF,CAAKrK,IAAL,EAAWuK,UAAX,GAAwB,YAAM;EAC5BJ,MAAAA,CAAC,CAACE,EAAF,CAAKrK,IAAL,IAAaoK,kBAAb;EACA,aAAOjH,QAAQ,CAAC0G,eAAhB;EACD,KAHD;EAID;EACF,CAZiB,CAAlB;;;;;;;;"}
\ No newline at end of file +{"version":3,"file":"carousel.js","sources":["../src/util/index.js","../src/carousel.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = '#' + hrefAttr.split('#')[1]\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = (name, plugin) => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nexport {\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n emulateTransitionEnd,\n getElementFromSelector,\n getTransitionDurationFromElement,\n isVisible,\n isRTL,\n reflow,\n triggerTransitionEnd,\n typeCheckConfig\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'carousel'\nconst DATA_KEY = 'bs.carousel'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst ARROW_LEFT_KEY = 'ArrowLeft'\nconst ARROW_RIGHT_KEY = 'ArrowRight'\nconst TOUCHEVENT_COMPAT_WAIT = 500 // Time for mouse compat events to fire after touch\nconst SWIPE_THRESHOLD = 40\n\nconst Default = {\n interval: 5000,\n keyboard: true,\n slide: false,\n pause: 'hover',\n wrap: true,\n touch: true\n}\n\nconst DefaultType = {\n interval: '(number|boolean)',\n keyboard: 'boolean',\n slide: '(boolean|string)',\n pause: '(string|boolean)',\n wrap: 'boolean',\n touch: 'boolean'\n}\n\nconst DIRECTION_NEXT = 'next'\nconst DIRECTION_PREV = 'prev'\nconst DIRECTION_LEFT = 'left'\nconst DIRECTION_RIGHT = 'right'\n\nconst EVENT_SLIDE = `slide${EVENT_KEY}`\nconst EVENT_SLID = `slid${EVENT_KEY}`\nconst EVENT_KEYDOWN = `keydown${EVENT_KEY}`\nconst EVENT_MOUSEENTER = `mouseenter${EVENT_KEY}`\nconst EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY}`\nconst EVENT_TOUCHSTART = `touchstart${EVENT_KEY}`\nconst EVENT_TOUCHMOVE = `touchmove${EVENT_KEY}`\nconst EVENT_TOUCHEND = `touchend${EVENT_KEY}`\nconst EVENT_POINTERDOWN = `pointerdown${EVENT_KEY}`\nconst EVENT_POINTERUP = `pointerup${EVENT_KEY}`\nconst EVENT_DRAG_START = `dragstart${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_CAROUSEL = 'carousel'\nconst CLASS_NAME_ACTIVE = 'active'\nconst CLASS_NAME_SLIDE = 'slide'\nconst CLASS_NAME_END = 'carousel-item-end'\nconst CLASS_NAME_START = 'carousel-item-start'\nconst CLASS_NAME_NEXT = 'carousel-item-next'\nconst CLASS_NAME_PREV = 'carousel-item-prev'\nconst CLASS_NAME_POINTER_EVENT = 'pointer-event'\n\nconst SELECTOR_ACTIVE = '.active'\nconst SELECTOR_ACTIVE_ITEM = '.active.carousel-item'\nconst SELECTOR_ITEM = '.carousel-item'\nconst SELECTOR_ITEM_IMG = '.carousel-item img'\nconst SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'\nconst SELECTOR_INDICATORS = '.carousel-indicators'\nconst SELECTOR_INDICATOR = '[data-bs-target]'\nconst SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]'\nconst SELECTOR_DATA_RIDE = '[data-bs-ride=\"carousel\"]'\n\nconst POINTER_TYPE_TOUCH = 'touch'\nconst POINTER_TYPE_PEN = 'pen'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\nclass Carousel extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._items = null\n this._interval = null\n this._activeElement = null\n this._isPaused = false\n this._isSliding = false\n this.touchTimeout = null\n this.touchStartX = 0\n this.touchDeltaX = 0\n\n this._config = this._getConfig(config)\n this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element)\n this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0\n this._pointerEvent = Boolean(window.PointerEvent)\n\n this._addEventListeners()\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n // Public\n\n next() {\n if (!this._isSliding) {\n this._slide(DIRECTION_NEXT)\n }\n }\n\n nextWhenVisible() {\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden && isVisible(this._element)) {\n this.next()\n }\n }\n\n prev() {\n if (!this._isSliding) {\n this._slide(DIRECTION_PREV)\n }\n }\n\n pause(event) {\n if (!event) {\n this._isPaused = true\n }\n\n if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {\n triggerTransitionEnd(this._element)\n this.cycle(true)\n }\n\n clearInterval(this._interval)\n this._interval = null\n }\n\n cycle(event) {\n if (!event) {\n this._isPaused = false\n }\n\n if (this._interval) {\n clearInterval(this._interval)\n this._interval = null\n }\n\n if (this._config && this._config.interval && !this._isPaused) {\n this._updateInterval()\n\n this._interval = setInterval(\n (document.visibilityState ? this.nextWhenVisible : this.next).bind(this),\n this._config.interval\n )\n }\n }\n\n to(index) {\n this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)\n const activeIndex = this._getItemIndex(this._activeElement)\n\n if (index > this._items.length - 1 || index < 0) {\n return\n }\n\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.to(index))\n return\n }\n\n if (activeIndex === index) {\n this.pause()\n this.cycle()\n return\n }\n\n const direction = index > activeIndex ?\n DIRECTION_NEXT :\n DIRECTION_PREV\n\n this._slide(direction, this._items[index])\n }\n\n dispose() {\n super.dispose()\n EventHandler.off(this._element, EVENT_KEY)\n\n this._items = null\n this._config = null\n this._interval = null\n this._isPaused = null\n this._isSliding = null\n this._activeElement = null\n this._indicatorsElement = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _handleSwipe() {\n const absDeltax = Math.abs(this.touchDeltaX)\n\n if (absDeltax <= SWIPE_THRESHOLD) {\n return\n }\n\n const direction = absDeltax / this.touchDeltaX\n\n this.touchDeltaX = 0\n\n // swipe left\n if (direction > 0) {\n if (isRTL) {\n this.next()\n } else {\n this.prev()\n }\n }\n\n // swipe right\n if (direction < 0) {\n if (isRTL) {\n this.prev()\n } else {\n this.next()\n }\n }\n }\n\n _addEventListeners() {\n if (this._config.keyboard) {\n EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event))\n }\n\n if (this._config.pause === 'hover') {\n EventHandler.on(this._element, EVENT_MOUSEENTER, event => this.pause(event))\n EventHandler.on(this._element, EVENT_MOUSELEAVE, event => this.cycle(event))\n }\n\n if (this._config.touch && this._touchSupported) {\n this._addTouchEventListeners()\n }\n }\n\n _addTouchEventListeners() {\n const start = event => {\n if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {\n this.touchStartX = event.clientX\n } else if (!this._pointerEvent) {\n this.touchStartX = event.touches[0].clientX\n }\n }\n\n const move = event => {\n // ensure swiping with one touch and not pinching\n if (event.touches && event.touches.length > 1) {\n this.touchDeltaX = 0\n } else {\n this.touchDeltaX = event.touches[0].clientX - this.touchStartX\n }\n }\n\n const end = event => {\n if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {\n this.touchDeltaX = event.clientX - this.touchStartX\n }\n\n this._handleSwipe()\n if (this._config.pause === 'hover') {\n // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n\n this.pause()\n if (this.touchTimeout) {\n clearTimeout(this.touchTimeout)\n }\n\n this.touchTimeout = setTimeout(event => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval)\n }\n }\n\n SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => {\n EventHandler.on(itemImg, EVENT_DRAG_START, e => e.preventDefault())\n })\n\n if (this._pointerEvent) {\n EventHandler.on(this._element, EVENT_POINTERDOWN, event => start(event))\n EventHandler.on(this._element, EVENT_POINTERUP, event => end(event))\n\n this._element.classList.add(CLASS_NAME_POINTER_EVENT)\n } else {\n EventHandler.on(this._element, EVENT_TOUCHSTART, event => start(event))\n EventHandler.on(this._element, EVENT_TOUCHMOVE, event => move(event))\n EventHandler.on(this._element, EVENT_TOUCHEND, event => end(event))\n }\n }\n\n _keydown(event) {\n if (/input|textarea/i.test(event.target.tagName)) {\n return\n }\n\n if (event.key === ARROW_LEFT_KEY) {\n event.preventDefault()\n if (isRTL) {\n this.next()\n } else {\n this.prev()\n }\n } else if (event.key === ARROW_RIGHT_KEY) {\n event.preventDefault()\n if (isRTL) {\n this.prev()\n } else {\n this.next()\n }\n }\n }\n\n _getItemIndex(element) {\n this._items = element && element.parentNode ?\n SelectorEngine.find(SELECTOR_ITEM, element.parentNode) :\n []\n\n return this._items.indexOf(element)\n }\n\n _getItemByDirection(direction, activeElement) {\n const isNextDirection = direction === DIRECTION_NEXT\n const isPrevDirection = direction === DIRECTION_PREV\n const activeIndex = this._getItemIndex(activeElement)\n const lastItemIndex = this._items.length - 1\n const isGoingToWrap = (isPrevDirection && activeIndex === 0) ||\n (isNextDirection && activeIndex === lastItemIndex)\n\n if (isGoingToWrap && !this._config.wrap) {\n return activeElement\n }\n\n const delta = direction === DIRECTION_PREV ? -1 : 1\n const itemIndex = (activeIndex + delta) % this._items.length\n\n return itemIndex === -1 ?\n this._items[this._items.length - 1] :\n this._items[itemIndex]\n }\n\n _triggerSlideEvent(relatedTarget, eventDirectionName) {\n const targetIndex = this._getItemIndex(relatedTarget)\n const fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element))\n\n return EventHandler.trigger(this._element, EVENT_SLIDE, {\n relatedTarget,\n direction: eventDirectionName,\n from: fromIndex,\n to: targetIndex\n })\n }\n\n _setActiveIndicatorElement(element) {\n if (this._indicatorsElement) {\n const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement)\n\n activeIndicator.classList.remove(CLASS_NAME_ACTIVE)\n activeIndicator.removeAttribute('aria-current')\n\n const indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement)\n\n for (let i = 0; i < indicators.length; i++) {\n if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) {\n indicators[i].classList.add(CLASS_NAME_ACTIVE)\n indicators[i].setAttribute('aria-current', 'true')\n break\n }\n }\n }\n }\n\n _updateInterval() {\n const element = this._activeElement || SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)\n\n if (!element) {\n return\n }\n\n const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10)\n\n if (elementInterval) {\n this._config.defaultInterval = this._config.defaultInterval || this._config.interval\n this._config.interval = elementInterval\n } else {\n this._config.interval = this._config.defaultInterval || this._config.interval\n }\n }\n\n _slide(direction, element) {\n const activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)\n const activeElementIndex = this._getItemIndex(activeElement)\n const nextElement = element || (activeElement && this._getItemByDirection(direction, activeElement))\n\n const nextElementIndex = this._getItemIndex(nextElement)\n const isCycling = Boolean(this._interval)\n\n const directionalClassName = direction === DIRECTION_NEXT ? CLASS_NAME_START : CLASS_NAME_END\n const orderClassName = direction === DIRECTION_NEXT ? CLASS_NAME_NEXT : CLASS_NAME_PREV\n const eventDirectionName = direction === DIRECTION_NEXT ? DIRECTION_LEFT : DIRECTION_RIGHT\n\n if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE)) {\n this._isSliding = false\n return\n }\n\n const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName)\n if (slideEvent.defaultPrevented) {\n return\n }\n\n if (!activeElement || !nextElement) {\n // Some weirdness is happening, so we bail\n return\n }\n\n this._isSliding = true\n\n if (isCycling) {\n this.pause()\n }\n\n this._setActiveIndicatorElement(nextElement)\n this._activeElement = nextElement\n\n if (this._element.classList.contains(CLASS_NAME_SLIDE)) {\n nextElement.classList.add(orderClassName)\n\n reflow(nextElement)\n\n activeElement.classList.add(directionalClassName)\n nextElement.classList.add(directionalClassName)\n\n const transitionDuration = getTransitionDurationFromElement(activeElement)\n\n EventHandler.one(activeElement, 'transitionend', () => {\n nextElement.classList.remove(directionalClassName, orderClassName)\n nextElement.classList.add(CLASS_NAME_ACTIVE)\n\n activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName)\n\n this._isSliding = false\n\n setTimeout(() => {\n EventHandler.trigger(this._element, EVENT_SLID, {\n relatedTarget: nextElement,\n direction: eventDirectionName,\n from: activeElementIndex,\n to: nextElementIndex\n })\n }, 0)\n })\n\n emulateTransitionEnd(activeElement, transitionDuration)\n } else {\n activeElement.classList.remove(CLASS_NAME_ACTIVE)\n nextElement.classList.add(CLASS_NAME_ACTIVE)\n\n this._isSliding = false\n EventHandler.trigger(this._element, EVENT_SLID, {\n relatedTarget: nextElement,\n direction: eventDirectionName,\n from: activeElementIndex,\n to: nextElementIndex\n })\n }\n\n if (isCycling) {\n this.cycle()\n }\n }\n\n // Static\n\n static carouselInterface(element, config) {\n let data = Data.getData(element, DATA_KEY)\n let _config = {\n ...Default,\n ...Manipulator.getDataAttributes(element)\n }\n\n if (typeof config === 'object') {\n _config = {\n ..._config,\n ...config\n }\n }\n\n const action = typeof config === 'string' ? config : _config.slide\n\n if (!data) {\n data = new Carousel(element, _config)\n }\n\n if (typeof config === 'number') {\n data.to(config)\n } else if (typeof action === 'string') {\n if (typeof data[action] === 'undefined') {\n throw new TypeError(`No method named \"${action}\"`)\n }\n\n data[action]()\n } else if (_config.interval && _config.ride) {\n data.pause()\n data.cycle()\n }\n }\n\n static jQueryInterface(config) {\n return this.each(function () {\n Carousel.carouselInterface(this, config)\n })\n }\n\n static dataApiClickHandler(event) {\n const target = getElementFromSelector(this)\n\n if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {\n return\n }\n\n const config = {\n ...Manipulator.getDataAttributes(target),\n ...Manipulator.getDataAttributes(this)\n }\n const slideIndex = this.getAttribute('data-bs-slide-to')\n\n if (slideIndex) {\n config.interval = false\n }\n\n Carousel.carouselInterface(target, config)\n\n if (slideIndex) {\n Data.getData(target, DATA_KEY).to(slideIndex)\n }\n\n event.preventDefault()\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler)\n\nEventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE)\n\n for (let i = 0, len = carousels.length; i < len; i++) {\n Carousel.carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY))\n }\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Carousel to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(NAME, Carousel)\n\nexport default Carousel\n"],"names":["MILLISECONDS_MULTIPLIER","TRANSITION_END","toType","obj","undefined","toString","call","match","toLowerCase","getSelector","element","selector","getAttribute","hrefAttr","includes","startsWith","split","trim","getElementFromSelector","document","querySelector","getTransitionDurationFromElement","window","getComputedStyle","transitionDuration","transitionDelay","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","triggerTransitionEnd","dispatchEvent","Event","isElement","nodeType","emulateTransitionEnd","duration","called","durationPadding","emulatedDuration","listener","removeEventListener","addEventListener","setTimeout","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","TypeError","toUpperCase","isVisible","style","parentNode","elementStyle","parentNodeStyle","display","visibility","reflow","offsetHeight","getjQuery","jQuery","body","hasAttribute","onDOMContentLoaded","callback","readyState","isRTL","documentElement","dir","defineJQueryPlugin","name","plugin","$","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","NAME","DATA_KEY","EVENT_KEY","DATA_API_KEY","ARROW_LEFT_KEY","ARROW_RIGHT_KEY","TOUCHEVENT_COMPAT_WAIT","SWIPE_THRESHOLD","Default","interval","keyboard","slide","pause","wrap","touch","DefaultType","DIRECTION_NEXT","DIRECTION_PREV","DIRECTION_LEFT","DIRECTION_RIGHT","EVENT_SLIDE","EVENT_SLID","EVENT_KEYDOWN","EVENT_MOUSEENTER","EVENT_MOUSELEAVE","EVENT_TOUCHSTART","EVENT_TOUCHMOVE","EVENT_TOUCHEND","EVENT_POINTERDOWN","EVENT_POINTERUP","EVENT_DRAG_START","EVENT_LOAD_DATA_API","EVENT_CLICK_DATA_API","CLASS_NAME_CAROUSEL","CLASS_NAME_ACTIVE","CLASS_NAME_SLIDE","CLASS_NAME_END","CLASS_NAME_START","CLASS_NAME_NEXT","CLASS_NAME_PREV","CLASS_NAME_POINTER_EVENT","SELECTOR_ACTIVE","SELECTOR_ACTIVE_ITEM","SELECTOR_ITEM","SELECTOR_ITEM_IMG","SELECTOR_NEXT_PREV","SELECTOR_INDICATORS","SELECTOR_INDICATOR","SELECTOR_DATA_SLIDE","SELECTOR_DATA_RIDE","POINTER_TYPE_TOUCH","POINTER_TYPE_PEN","Carousel","_items","_interval","_activeElement","_isPaused","_isSliding","touchTimeout","touchStartX","touchDeltaX","_config","_getConfig","_indicatorsElement","SelectorEngine","findOne","_element","_touchSupported","navigator","maxTouchPoints","_pointerEvent","Boolean","PointerEvent","_addEventListeners","next","_slide","nextWhenVisible","hidden","prev","event","cycle","clearInterval","_updateInterval","setInterval","visibilityState","bind","to","index","activeIndex","_getItemIndex","length","EventHandler","one","direction","dispose","off","_handleSwipe","absDeltax","Math","abs","on","_keydown","_addTouchEventListeners","start","pointerType","clientX","touches","move","end","clearTimeout","find","itemImg","e","preventDefault","classList","add","target","tagName","key","indexOf","_getItemByDirection","activeElement","isNextDirection","isPrevDirection","lastItemIndex","isGoingToWrap","delta","itemIndex","_triggerSlideEvent","relatedTarget","eventDirectionName","targetIndex","fromIndex","trigger","from","_setActiveIndicatorElement","activeIndicator","remove","removeAttribute","indicators","i","parseInt","setAttribute","elementInterval","defaultInterval","activeElementIndex","nextElement","nextElementIndex","isCycling","directionalClassName","orderClassName","contains","slideEvent","defaultPrevented","carouselInterface","data","Data","getData","Manipulator","getDataAttributes","action","ride","each","dataApiClickHandler","slideIndex","BaseComponent","carousels","len"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAGA,IAAMA,uBAAuB,GAAG,IAAhC;EACA,IAAMC,cAAc,GAAG,eAAvB;;EAGA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAAAC,GAAG,EAAI;EACpB,MAAIA,GAAG,KAAK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GAAGD,SAAS,CAAC5E,MAAhC,EAAwCkD,CAAC,GAAG2B,GAA5C,EAAiD3B,CAAC,EAAlD,EAAsD;EACpDxF,IAAAA,QAAQ,CAACsG,iBAAT,CAA2BY,SAAS,CAAC1B,CAAD,CAApC,EAAyCgB,wBAAI,CAACC,OAAL,CAAaS,SAAS,CAAC1B,CAAD,CAAtB,EAA2B3I,QAA3B,CAAzC;EACD;EACF,CAND;EAQA;EACA;EACA;EACA;EACA;EACA;;EAEAV,kBAAkB,CAACS,IAAD,EAAOoD,QAAP,CAAlB;;;;;;;;"}
\ No newline at end of file diff --git a/js/dist/collapse.js b/js/dist/collapse.js index fb56e4baec..29f47f9002 100644 --- a/js/dist/collapse.js +++ b/js/dist/collapse.js @@ -1,13 +1,13 @@ /*! - * Bootstrap collapse.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap collapse.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) : - typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); -}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); +}(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } @@ -15,10 +15,61 @@ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -37,7 +88,20 @@ var selector = element.getAttribute('data-bs-target'); if (!selector || selector === '#') { - var hrefAttr = element.getAttribute('href'); + var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes, + // so everything starting with `#` or `.`. If a "real" URL is used as the selector, + // `document.querySelector` will rightfully complain it is invalid. + // See https://github.com/twbs/bootstrap/issues/32273 + + if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) { + return null; + } // Just in case some CMS puts out a full URL with the anchor appended + + + if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) { + hrefAttr = '#' + hrefAttr.split('#')[1]; + } + selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null; } @@ -115,7 +179,7 @@ var valueType = value && isElement(value) ? 'element' : toType(value); if (!new RegExp(expectedTypes).test(valueType)) { - throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); + throw new TypeError(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); } }); }; @@ -143,59 +207,26 @@ } }; - var isRTL = document.documentElement.dir === 'rtl'; - - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; - } - - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } - - var _proto = BaseComponent.prototype; + document.documentElement.dir === 'rtl'; - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; } - }]); - - return BaseComponent; - }(); - - function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - - function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - - function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } + }); + }; - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -371,7 +402,7 @@ var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); var scrollSize = "scroll" + capitalizedDimension; var transitionDuration = getTransitionDurationFromElement(this._element); - EventHandler__default['default'].one(this._element, TRANSITION_END, complete); + EventHandler__default['default'].one(this._element, 'transitionend', complete); emulateTransitionEnd(this._element, transitionDuration); this._element.style[dimension] = this._element[scrollSize] + "px"; }; @@ -426,7 +457,7 @@ this._element.style[dimension] = ''; var transitionDuration = getTransitionDurationFromElement(this._element); - EventHandler__default['default'].one(this._element, TRANSITION_END, complete); + EventHandler__default['default'].one(this._element, 'transitionend', complete); emulateTransitionEnd(this._element, transitionDuration); }; @@ -525,7 +556,7 @@ }); }; - _createClass$1(Collapse, null, [{ + _createClass(Collapse, null, [{ key: "Default", get: function get() { return Default; @@ -538,7 +569,7 @@ }]); return Collapse; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -548,7 +579,7 @@ EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { // preventDefault only for <a> elements (which change the URL) not inside the collapsible element - if (event.target.tagName === 'A') { + if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') { event.preventDefault(); } @@ -581,21 +612,7 @@ * add .Collapse to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Collapse.jQueryInterface; - $.fn[NAME].Constructor = Collapse; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Collapse.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Collapse); return Collapse; diff --git a/js/dist/collapse.js.map b/js/dist/collapse.js.map index 45b271915e..4d51ead570 100644 --- a/js/dist/collapse.js.map +++ b/js/dist/collapse.js.map @@ -1 +1 @@ -{"version":3,"file":"collapse.js","sources":["../src/util/index.js","../src/base-component.js","../src/collapse.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n const hrefAttr = element.getAttribute('href')\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ?\n 'element' :\n toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`)\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nexport {\n TRANSITION_END,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst VERSION = '5.0.0-beta1'\n\nclass BaseComponent {\n constructor(element) {\n if (!element) {\n return\n }\n\n this._element = element\n Data.setData(element, this.constructor.DATA_KEY, this)\n }\n\n dispose() {\n Data.removeData(this._element, this.constructor.DATA_KEY)\n this._element = null\n }\n\n /** Static */\n\n static getInstance(element) {\n return Data.getData(element, this.DATA_KEY)\n }\n\n static get VERSION() {\n return VERSION\n }\n}\n\nexport default BaseComponent\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n getjQuery,\n onDOMContentLoaded,\n TRANSITION_END,\n emulateTransitionEnd,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n isElement,\n reflow,\n typeCheckConfig\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'collapse'\nconst DATA_KEY = 'bs.collapse'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst Default = {\n toggle: true,\n parent: ''\n}\n\nconst DefaultType = {\n toggle: 'boolean',\n parent: '(string|element)'\n}\n\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_COLLAPSE = 'collapse'\nconst CLASS_NAME_COLLAPSING = 'collapsing'\nconst CLASS_NAME_COLLAPSED = 'collapsed'\n\nconst WIDTH = 'width'\nconst HEIGHT = 'height'\n\nconst SELECTOR_ACTIVES = '.show, .collapsing'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"collapse\"]'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Collapse extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._isTransitioning = false\n this._config = this._getConfig(config)\n this._triggerArray = SelectorEngine.find(\n `${SELECTOR_DATA_TOGGLE}[href=\"#${element.id}\"],` +\n `${SELECTOR_DATA_TOGGLE}[data-bs-target=\"#${element.id}\"]`\n )\n\n const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE)\n\n for (let i = 0, len = toggleList.length; i < len; i++) {\n const elem = toggleList[i]\n const selector = getSelectorFromElement(elem)\n const filterElement = SelectorEngine.find(selector)\n .filter(foundElem => foundElem === element)\n\n if (selector !== null && filterElement.length) {\n this._selector = selector\n this._triggerArray.push(elem)\n }\n }\n\n this._parent = this._config.parent ? this._getParent() : null\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._element, this._triggerArray)\n }\n\n if (this._config.toggle) {\n this.toggle()\n }\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n // Public\n\n toggle() {\n if (this._element.classList.contains(CLASS_NAME_SHOW)) {\n this.hide()\n } else {\n this.show()\n }\n }\n\n show() {\n if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n let actives\n let activesData\n\n if (this._parent) {\n actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent)\n .filter(elem => {\n if (typeof this._config.parent === 'string') {\n return elem.getAttribute('data-bs-parent') === this._config.parent\n }\n\n return elem.classList.contains(CLASS_NAME_COLLAPSE)\n })\n\n if (actives.length === 0) {\n actives = null\n }\n }\n\n const container = SelectorEngine.findOne(this._selector)\n if (actives) {\n const tempActiveData = actives.find(elem => container !== elem)\n activesData = tempActiveData ? Data.getData(tempActiveData, DATA_KEY) : null\n\n if (activesData && activesData._isTransitioning) {\n return\n }\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_SHOW)\n if (startEvent.defaultPrevented) {\n return\n }\n\n if (actives) {\n actives.forEach(elemActive => {\n if (container !== elemActive) {\n Collapse.collapseInterface(elemActive, 'hide')\n }\n\n if (!activesData) {\n Data.setData(elemActive, DATA_KEY, null)\n }\n })\n }\n\n const dimension = this._getDimension()\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE)\n this._element.classList.add(CLASS_NAME_COLLAPSING)\n\n this._element.style[dimension] = 0\n\n if (this._triggerArray.length) {\n this._triggerArray.forEach(element => {\n element.classList.remove(CLASS_NAME_COLLAPSED)\n element.setAttribute('aria-expanded', true)\n })\n }\n\n this.setTransitioning(true)\n\n const complete = () => {\n this._element.classList.remove(CLASS_NAME_COLLAPSING)\n this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)\n\n this._element.style[dimension] = ''\n\n this.setTransitioning(false)\n\n EventHandler.trigger(this._element, EVENT_SHOWN)\n }\n\n const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)\n const scrollSize = `scroll${capitalizedDimension}`\n const transitionDuration = getTransitionDurationFromElement(this._element)\n\n EventHandler.one(this._element, TRANSITION_END, complete)\n\n emulateTransitionEnd(this._element, transitionDuration)\n this._element.style[dimension] = `${this._element[scrollSize]}px`\n }\n\n hide() {\n if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n if (startEvent.defaultPrevented) {\n return\n }\n\n const dimension = this._getDimension()\n\n this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`\n\n reflow(this._element)\n\n this._element.classList.add(CLASS_NAME_COLLAPSING)\n this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)\n\n const triggerArrayLength = this._triggerArray.length\n if (triggerArrayLength > 0) {\n for (let i = 0; i < triggerArrayLength; i++) {\n const trigger = this._triggerArray[i]\n const elem = getElementFromSelector(trigger)\n\n if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) {\n trigger.classList.add(CLASS_NAME_COLLAPSED)\n trigger.setAttribute('aria-expanded', false)\n }\n }\n }\n\n this.setTransitioning(true)\n\n const complete = () => {\n this.setTransitioning(false)\n this._element.classList.remove(CLASS_NAME_COLLAPSING)\n this._element.classList.add(CLASS_NAME_COLLAPSE)\n EventHandler.trigger(this._element, EVENT_HIDDEN)\n }\n\n this._element.style[dimension] = ''\n const transitionDuration = getTransitionDurationFromElement(this._element)\n\n EventHandler.one(this._element, TRANSITION_END, complete)\n emulateTransitionEnd(this._element, transitionDuration)\n }\n\n setTransitioning(isTransitioning) {\n this._isTransitioning = isTransitioning\n }\n\n dispose() {\n super.dispose()\n this._config = null\n this._parent = null\n this._triggerArray = null\n this._isTransitioning = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n config.toggle = Boolean(config.toggle) // Coerce string values\n typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _getDimension() {\n return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT\n }\n\n _getParent() {\n let { parent } = this._config\n\n if (isElement(parent)) {\n // it's a jQuery object\n if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {\n parent = parent[0]\n }\n } else {\n parent = SelectorEngine.findOne(parent)\n }\n\n const selector = `${SELECTOR_DATA_TOGGLE}[data-bs-parent=\"${parent}\"]`\n\n SelectorEngine.find(selector, parent)\n .forEach(element => {\n const selected = getElementFromSelector(element)\n\n this._addAriaAndCollapsedClass(\n selected,\n [element]\n )\n })\n\n return parent\n }\n\n _addAriaAndCollapsedClass(element, triggerArray) {\n if (!element || !triggerArray.length) {\n return\n }\n\n const isOpen = element.classList.contains(CLASS_NAME_SHOW)\n\n triggerArray.forEach(elem => {\n if (isOpen) {\n elem.classList.remove(CLASS_NAME_COLLAPSED)\n } else {\n elem.classList.add(CLASS_NAME_COLLAPSED)\n }\n\n elem.setAttribute('aria-expanded', isOpen)\n })\n }\n\n // Static\n\n static collapseInterface(element, config) {\n let data = Data.getData(element, DATA_KEY)\n const _config = {\n ...Default,\n ...Manipulator.getDataAttributes(element),\n ...(typeof config === 'object' && config ? config : {})\n }\n\n if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {\n _config.toggle = false\n }\n\n if (!data) {\n data = new Collapse(element, _config)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n }\n\n static jQueryInterface(config) {\n return this.each(function () {\n Collapse.collapseInterface(this, config)\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n // preventDefault only for <a> elements (which change the URL) not inside the collapsible element\n if (event.target.tagName === 'A') {\n event.preventDefault()\n }\n\n const triggerData = Manipulator.getDataAttributes(this)\n const selector = getSelectorFromElement(this)\n const selectorElements = SelectorEngine.find(selector)\n\n selectorElements.forEach(element => {\n const data = Data.getData(element, DATA_KEY)\n let config\n if (data) {\n // update parent attribute\n if (data._parent === null && typeof triggerData.parent === 'string') {\n data._config.parent = triggerData.parent\n data._parent = data._getParent()\n }\n\n config = 'toggle'\n } else {\n config = triggerData\n }\n\n Collapse.collapseInterface(element, config)\n })\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Collapse to jQuery only if jQuery is present\n */\n\nonDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n $.fn[NAME] = Collapse.jQueryInterface\n $.fn[NAME].Constructor = Collapse\n $.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Collapse.jQueryInterface\n }\n }\n})\n\nexport default Collapse\n"],"names":["MILLISECONDS_MULTIPLIER","TRANSITION_END","toType","obj","undefined","toString","call","match","toLowerCase","getSelector","element","selector","getAttribute","hrefAttr","trim","getSelectorFromElement","document","querySelector","getElementFromSelector","getTransitionDurationFromElement","window","getComputedStyle","transitionDuration","transitionDelay","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","split","triggerTransitionEnd","dispatchEvent","Event","isElement","nodeType","emulateTransitionEnd","duration","called","durationPadding","emulatedDuration","listener","removeEventListener","addEventListener","setTimeout","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","Error","toUpperCase","reflow","offsetHeight","getjQuery","jQuery","body","hasAttribute","onDOMContentLoaded","callback","readyState","isRTL","documentElement","dir","VERSION","BaseComponent","_element","Data","setData","constructor","DATA_KEY","dispose","removeData","getInstance","getData","NAME","EVENT_KEY","DATA_API_KEY","Default","toggle","parent","DefaultType","EVENT_SHOW","EVENT_SHOWN","EVENT_HIDE","EVENT_HIDDEN","EVENT_CLICK_DATA_API","CLASS_NAME_SHOW","CLASS_NAME_COLLAPSE","CLASS_NAME_COLLAPSING","CLASS_NAME_COLLAPSED","WIDTH","HEIGHT","SELECTOR_ACTIVES","SELECTOR_DATA_TOGGLE","Collapse","_isTransitioning","_config","_getConfig","_triggerArray","SelectorEngine","find","id","toggleList","i","len","length","elem","filterElement","filter","foundElem","_selector","push","_parent","_getParent","_addAriaAndCollapsedClass","classList","contains","hide","show","actives","activesData","container","findOne","tempActiveData","startEvent","EventHandler","trigger","defaultPrevented","elemActive","collapseInterface","dimension","_getDimension","remove","add","style","setAttribute","setTransitioning","complete","capitalizedDimension","slice","scrollSize","one","getBoundingClientRect","triggerArrayLength","isTransitioning","Boolean","jquery","selected","triggerArray","isOpen","data","Manipulator","getDataAttributes","TypeError","jQueryInterface","each","on","event","target","tagName","preventDefault","triggerData","selectorElements","$","JQUERY_NO_CONFLICT","fn","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAGA,IAAMA,uBAAuB,GAAG,IAAhC;EACA,IAAMC,cAAc,GAAG,eAAvB;;EAGA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAAAC,GAAG,EAAI;EACpB,MAAIA,GAAG,KAAK,IAAR,IAAgBA,GAAG,KAAKC,SAA5B,EAAuC;EACrC,gBAAUD,GAAV;EACD;;EAED,SAAO,GAAGE,QAAH,CAAYC,IAAZ,CAAiBH,GAAjB,EAAsBI,KAAtB,CAA4B,aAA5B,EAA2C,CAA3C,EAA8CC,WAA9C,EAAP;EACD,CAND;;EAsBA,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAAAC,OAAO,EAAI;EAC7B,MAAIC,QAAQ,GAAGD,OAAO,CAACE,YAAR,CAAqB,gBAArB,CAAf;;EAEA,MAAI,CAACD,QAAD,IAAaA,QAAQ,KAAK,GAA9B,EAAmC;EACjC,QAAME,QAAQ,GAAGH,OAAO,CAACE,YAAR,CAAqB,MAArB,CAAjB;EAEAD,IAAAA,QAAQ,GAAGE,QAAQ,IAAIA,QAAQ,KAAK,GAAzB,GAA+BA,QAAQ,CAACC,IAAT,EAA/B,GAAiD,IAA5D;EACD;;EAED,SAAOH,QAAP;EACD,CAVD;;EAYA,IAAMI,sBAAsB,GAAG,SAAzBA,sBAAyB,CAAAL,OAAO,EAAI;EACxC,MAAMC,QAAQ,GAAGF,WAAW,CAACC,OAAD,CAA5B;;EAEA,MAAIC,QAAJ,EAAc;EACZ,WAAOK,QAAQ,CAACC,aAAT,CAAuBN,QAAvB,IAAmCA,QAAnC,GAA8C,IAArD;EACD;;EAED,SAAO,IAAP;EACD,CARD;;EAUA,IAAM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,QAAAA,IAAI,CAACtD,OAAL,CAAajB,MAAb,GAAsBkF,WAAW,CAAClF,MAAlC;EACAuE,QAAAA,IAAI,CAACtC,OAAL,GAAesC,IAAI,CAACrC,UAAL,EAAf;EACD;;EAED3E,MAAAA,MAAM,GAAG,QAAT;EACD,KARD,MAQO;EACLA,MAAAA,MAAM,GAAG2H,WAAT;EACD;;EAEDnE,IAAAA,QAAQ,CAACmC,iBAAT,CAA2B9H,OAA3B,EAAoCmC,MAApC;EACD,GAhBD;EAiBD,CA3BD;EA6BA;EACA;EACA;EACA;EACA;EACA;;EAEAmB,kBAAkB,CAAC,YAAM;EACvB,MAAM0G,CAAC,GAAG9G,SAAS,EAAnB;EACA;;EACA,MAAI8G,CAAJ,EAAO;EACL,QAAMC,kBAAkB,GAAGD,CAAC,CAACE,EAAF,CAAK3F,IAAL,CAA3B;EACAyF,IAAAA,CAAC,CAACE,EAAF,CAAK3F,IAAL,IAAaoB,QAAQ,CAAC4D,eAAtB;EACAS,IAAAA,CAAC,CAACE,EAAF,CAAK3F,IAAL,EAAW4F,WAAX,GAAyBxE,QAAzB;;EACAqE,IAAAA,CAAC,CAACE,EAAF,CAAK3F,IAAL,EAAW6F,UAAX,GAAwB,YAAM;EAC5BJ,MAAAA,CAAC,CAACE,EAAF,CAAK3F,IAAL,IAAa0F,kBAAb;EACA,aAAOtE,QAAQ,CAAC4D,eAAhB;EACD,KAHD;EAID;EACF,CAZiB,CAAlB;;;;;;;;"}
\ No newline at end of file +{"version":3,"file":"collapse.js","sources":["../src/util/index.js","../src/collapse.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = '#' + hrefAttr.split('#')[1]\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = (name, plugin) => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nexport {\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n emulateTransitionEnd,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n isElement,\n reflow,\n typeCheckConfig\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'collapse'\nconst DATA_KEY = 'bs.collapse'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst Default = {\n toggle: true,\n parent: ''\n}\n\nconst DefaultType = {\n toggle: 'boolean',\n parent: '(string|element)'\n}\n\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_COLLAPSE = 'collapse'\nconst CLASS_NAME_COLLAPSING = 'collapsing'\nconst CLASS_NAME_COLLAPSED = 'collapsed'\n\nconst WIDTH = 'width'\nconst HEIGHT = 'height'\n\nconst SELECTOR_ACTIVES = '.show, .collapsing'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"collapse\"]'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Collapse extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._isTransitioning = false\n this._config = this._getConfig(config)\n this._triggerArray = SelectorEngine.find(\n `${SELECTOR_DATA_TOGGLE}[href=\"#${element.id}\"],` +\n `${SELECTOR_DATA_TOGGLE}[data-bs-target=\"#${element.id}\"]`\n )\n\n const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE)\n\n for (let i = 0, len = toggleList.length; i < len; i++) {\n const elem = toggleList[i]\n const selector = getSelectorFromElement(elem)\n const filterElement = SelectorEngine.find(selector)\n .filter(foundElem => foundElem === element)\n\n if (selector !== null && filterElement.length) {\n this._selector = selector\n this._triggerArray.push(elem)\n }\n }\n\n this._parent = this._config.parent ? this._getParent() : null\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._element, this._triggerArray)\n }\n\n if (this._config.toggle) {\n this.toggle()\n }\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n // Public\n\n toggle() {\n if (this._element.classList.contains(CLASS_NAME_SHOW)) {\n this.hide()\n } else {\n this.show()\n }\n }\n\n show() {\n if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n let actives\n let activesData\n\n if (this._parent) {\n actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent)\n .filter(elem => {\n if (typeof this._config.parent === 'string') {\n return elem.getAttribute('data-bs-parent') === this._config.parent\n }\n\n return elem.classList.contains(CLASS_NAME_COLLAPSE)\n })\n\n if (actives.length === 0) {\n actives = null\n }\n }\n\n const container = SelectorEngine.findOne(this._selector)\n if (actives) {\n const tempActiveData = actives.find(elem => container !== elem)\n activesData = tempActiveData ? Data.getData(tempActiveData, DATA_KEY) : null\n\n if (activesData && activesData._isTransitioning) {\n return\n }\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_SHOW)\n if (startEvent.defaultPrevented) {\n return\n }\n\n if (actives) {\n actives.forEach(elemActive => {\n if (container !== elemActive) {\n Collapse.collapseInterface(elemActive, 'hide')\n }\n\n if (!activesData) {\n Data.setData(elemActive, DATA_KEY, null)\n }\n })\n }\n\n const dimension = this._getDimension()\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE)\n this._element.classList.add(CLASS_NAME_COLLAPSING)\n\n this._element.style[dimension] = 0\n\n if (this._triggerArray.length) {\n this._triggerArray.forEach(element => {\n element.classList.remove(CLASS_NAME_COLLAPSED)\n element.setAttribute('aria-expanded', true)\n })\n }\n\n this.setTransitioning(true)\n\n const complete = () => {\n this._element.classList.remove(CLASS_NAME_COLLAPSING)\n this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)\n\n this._element.style[dimension] = ''\n\n this.setTransitioning(false)\n\n EventHandler.trigger(this._element, EVENT_SHOWN)\n }\n\n const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)\n const scrollSize = `scroll${capitalizedDimension}`\n const transitionDuration = getTransitionDurationFromElement(this._element)\n\n EventHandler.one(this._element, 'transitionend', complete)\n\n emulateTransitionEnd(this._element, transitionDuration)\n this._element.style[dimension] = `${this._element[scrollSize]}px`\n }\n\n hide() {\n if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n if (startEvent.defaultPrevented) {\n return\n }\n\n const dimension = this._getDimension()\n\n this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`\n\n reflow(this._element)\n\n this._element.classList.add(CLASS_NAME_COLLAPSING)\n this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)\n\n const triggerArrayLength = this._triggerArray.length\n if (triggerArrayLength > 0) {\n for (let i = 0; i < triggerArrayLength; i++) {\n const trigger = this._triggerArray[i]\n const elem = getElementFromSelector(trigger)\n\n if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) {\n trigger.classList.add(CLASS_NAME_COLLAPSED)\n trigger.setAttribute('aria-expanded', false)\n }\n }\n }\n\n this.setTransitioning(true)\n\n const complete = () => {\n this.setTransitioning(false)\n this._element.classList.remove(CLASS_NAME_COLLAPSING)\n this._element.classList.add(CLASS_NAME_COLLAPSE)\n EventHandler.trigger(this._element, EVENT_HIDDEN)\n }\n\n this._element.style[dimension] = ''\n const transitionDuration = getTransitionDurationFromElement(this._element)\n\n EventHandler.one(this._element, 'transitionend', complete)\n emulateTransitionEnd(this._element, transitionDuration)\n }\n\n setTransitioning(isTransitioning) {\n this._isTransitioning = isTransitioning\n }\n\n dispose() {\n super.dispose()\n this._config = null\n this._parent = null\n this._triggerArray = null\n this._isTransitioning = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n config.toggle = Boolean(config.toggle) // Coerce string values\n typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _getDimension() {\n return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT\n }\n\n _getParent() {\n let { parent } = this._config\n\n if (isElement(parent)) {\n // it's a jQuery object\n if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {\n parent = parent[0]\n }\n } else {\n parent = SelectorEngine.findOne(parent)\n }\n\n const selector = `${SELECTOR_DATA_TOGGLE}[data-bs-parent=\"${parent}\"]`\n\n SelectorEngine.find(selector, parent)\n .forEach(element => {\n const selected = getElementFromSelector(element)\n\n this._addAriaAndCollapsedClass(\n selected,\n [element]\n )\n })\n\n return parent\n }\n\n _addAriaAndCollapsedClass(element, triggerArray) {\n if (!element || !triggerArray.length) {\n return\n }\n\n const isOpen = element.classList.contains(CLASS_NAME_SHOW)\n\n triggerArray.forEach(elem => {\n if (isOpen) {\n elem.classList.remove(CLASS_NAME_COLLAPSED)\n } else {\n elem.classList.add(CLASS_NAME_COLLAPSED)\n }\n\n elem.setAttribute('aria-expanded', isOpen)\n })\n }\n\n // Static\n\n static collapseInterface(element, config) {\n let data = Data.getData(element, DATA_KEY)\n const _config = {\n ...Default,\n ...Manipulator.getDataAttributes(element),\n ...(typeof config === 'object' && config ? config : {})\n }\n\n if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {\n _config.toggle = false\n }\n\n if (!data) {\n data = new Collapse(element, _config)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n }\n\n static jQueryInterface(config) {\n return this.each(function () {\n Collapse.collapseInterface(this, config)\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n // preventDefault only for <a> elements (which change the URL) not inside the collapsible element\n if (event.target.tagName === 'A' || (event.delegateTarget && event.delegateTarget.tagName === 'A')) {\n event.preventDefault()\n }\n\n const triggerData = Manipulator.getDataAttributes(this)\n const selector = getSelectorFromElement(this)\n const selectorElements = SelectorEngine.find(selector)\n\n selectorElements.forEach(element => {\n const data = Data.getData(element, DATA_KEY)\n let config\n if (data) {\n // update parent attribute\n if (data._parent === null && typeof triggerData.parent === 'string') {\n data._config.parent = triggerData.parent\n data._parent = data._getParent()\n }\n\n config = 'toggle'\n } else {\n config = triggerData\n }\n\n Collapse.collapseInterface(element, config)\n })\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Collapse to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(NAME, Collapse)\n\nexport default Collapse\n"],"names":["MILLISECONDS_MULTIPLIER","TRANSITION_END","toType","obj","undefined","toString","call","match","toLowerCase","getSelector","element","selector","getAttribute","hrefAttr","includes","startsWith","split","trim","getSelectorFromElement","document","querySelector","getElementFromSelector","getTransitionDurationFromElement","window","getComputedStyle","transitionDuration","transitionDelay","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","triggerTransitionEnd","dispatchEvent","Event","isElement","nodeType","emulateTransitionEnd","duration","called","durationPadding","emulatedDuration","listener","removeEventListener","addEventListener","setTimeout","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","TypeError","toUpperCase","reflow","offsetHeight","getjQuery","jQuery","body","hasAttribute","onDOMContentLoaded","callback","readyState","documentElement","dir","defineJQueryPlugin","name","plugin","$","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","NAME","DATA_KEY","EVENT_KEY","DATA_API_KEY","Default","toggle","parent","DefaultType","EVENT_SHOW","EVENT_SHOWN","EVENT_HIDE","EVENT_HIDDEN","EVENT_CLICK_DATA_API","CLASS_NAME_SHOW","CLASS_NAME_COLLAPSE","CLASS_NAME_COLLAPSING","CLASS_NAME_COLLAPSED","WIDTH","HEIGHT","SELECTOR_ACTIVES","SELECTOR_DATA_TOGGLE","Collapse","_isTransitioning","_config","_getConfig","_triggerArray","SelectorEngine","find","id","toggleList","i","len","length","elem","filterElement","filter","foundElem","_selector","push","_parent","_getParent","_addAriaAndCollapsedClass","_element","classList","contains","hide","show","actives","activesData","container","findOne","tempActiveData","Data","getData","startEvent","EventHandler","trigger","defaultPrevented","elemActive","collapseInterface","setData","dimension","_getDimension","remove","add","style","setAttribute","setTransitioning","complete","capitalizedDimension","slice","scrollSize","one","getBoundingClientRect","triggerArrayLength","isTransitioning","dispose","Boolean","jquery","selected","triggerArray","isOpen","data","Manipulator","getDataAttributes","each","BaseComponent","on","event","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CAAvC;EACA,MAAM4J,gBAAgB,GAAGpE,kCAAc,CAACC,IAAf,CAAoBhG,QAApB,CAAzB;EAEAmK,EAAAA,gBAAgB,CAAC3H,OAAjB,CAAyB,UAAAzC,OAAO,EAAI;EAClC,QAAMwJ,IAAI,GAAG9B,wBAAI,CAACC,OAAL,CAAa3H,OAAb,EAAsBuE,QAAtB,CAAb;EACA,QAAIlC,MAAJ;;EACA,QAAImH,IAAJ,EAAU;EACR;EACA,UAAIA,IAAI,CAAC3C,OAAL,KAAiB,IAAjB,IAAyB,OAAOsD,WAAW,CAACvF,MAAnB,KAA8B,QAA3D,EAAqE;EACnE4E,QAAAA,IAAI,CAAC3D,OAAL,CAAajB,MAAb,GAAsBuF,WAAW,CAACvF,MAAlC;EACA4E,QAAAA,IAAI,CAAC3C,OAAL,GAAe2C,IAAI,CAAC1C,UAAL,EAAf;EACD;;EAEDzE,MAAAA,MAAM,GAAG,QAAT;EACD,KARD,MAQO;EACLA,MAAAA,MAAM,GAAG8H,WAAT;EACD;;EAEDxE,IAAAA,QAAQ,CAACsC,iBAAT,CAA2BjI,OAA3B,EAAoCqC,MAApC;EACD,GAhBD;EAiBD,CA3BD;EA6BA;EACA;EACA;EACA;EACA;EACA;;EAEAwB,kBAAkB,CAACS,IAAD,EAAOqB,QAAP,CAAlB;;;;;;;;"}
\ No newline at end of file diff --git a/js/dist/dom/data.js b/js/dist/dom/data.js index aa5d30e20a..03de237520 100644 --- a/js/dist/dom/data.js +++ b/js/dist/dom/data.js @@ -1,6 +1,6 @@ /*! - * Bootstrap data.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap data.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { @@ -11,7 +11,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): dom/data.js + * Bootstrap (v5.0.0-beta2): dom/data.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/dist/dom/data.js.map b/js/dist/dom/data.js.map index 3a83a32fc7..af98117a85 100644 --- a/js/dist/dom/data.js.map +++ b/js/dist/dom/data.js.map @@ -1 +1 @@ -{"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst mapData = (() => {\n const storeData = {}\n let id = 1\n return {\n set(element, key, data) {\n if (typeof element.bsKey === 'undefined') {\n element.bsKey = {\n key,\n id\n }\n id++\n }\n\n storeData[element.bsKey.id] = data\n },\n get(element, key) {\n if (!element || typeof element.bsKey === 'undefined') {\n return null\n }\n\n const keyProperties = element.bsKey\n if (keyProperties.key === key) {\n return storeData[keyProperties.id]\n }\n\n return null\n },\n delete(element, key) {\n if (typeof element.bsKey === 'undefined') {\n return\n }\n\n const keyProperties = element.bsKey\n if (keyProperties.key === key) {\n delete storeData[keyProperties.id]\n delete element.bsKey\n }\n }\n }\n})()\n\nconst Data = {\n setData(instance, key, data) {\n mapData.set(instance, key, data)\n },\n getData(instance, key) {\n return mapData.get(instance, key)\n },\n removeData(instance, key) {\n mapData.delete(instance, key)\n }\n}\n\nexport default Data\n"],"names":["mapData","storeData","id","set","element","key","data","bsKey","get","keyProperties","delete","Data","setData","instance","getData","removeData"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EAEA,IAAMA,OAAO,GAAI,YAAM;EACrB,MAAMC,SAAS,GAAG,EAAlB;EACA,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AA2BC,IAA3B;EACD,GAHU;EAIXQ,EAAAA,OAJW,mBAIHD,QAJG,EAIOR,GAJP,EAIY;EACrB,WAAOL,OAAO,CAACQ,GAAR,CAAYK,QAAZ,EAAsBR,GAAtB,CAAP;EACD,GANU;EAOXU,EAAAA,UAPW,sBAOAF,QAPA,EAOUR,GAPV,EAOe;EACxBL,IAAAA,OAAO,CAACU,MAAR,CAAeG,QAAf,EAAyBR,GAAzB;EACD;EATU;;;;;;;;"}
\ No newline at end of file +{"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst mapData = (() => {\n const storeData = {}\n let id = 1\n return {\n set(element, key, data) {\n if (typeof element.bsKey === 'undefined') {\n element.bsKey = {\n key,\n id\n }\n id++\n }\n\n storeData[element.bsKey.id] = data\n },\n get(element, key) {\n if (!element || typeof element.bsKey === 'undefined') {\n return null\n }\n\n const keyProperties = element.bsKey\n if (keyProperties.key === key) {\n return storeData[keyProperties.id]\n }\n\n return null\n },\n delete(element, key) {\n if (typeof element.bsKey === 'undefined') {\n return\n }\n\n const keyProperties = element.bsKey\n if (keyProperties.key === key) {\n delete storeData[keyProperties.id]\n delete element.bsKey\n }\n }\n }\n})()\n\nconst Data = {\n setData(instance, key, data) {\n mapData.set(instance, key, data)\n },\n getData(instance, key) {\n return mapData.get(instance, key)\n },\n removeData(instance, key) {\n mapData.delete(instance, key)\n }\n}\n\nexport default Data\n"],"names":["mapData","storeData","id","set","element","key","data","bsKey","get","keyProperties","delete","Data","setData","instance","getData","removeData"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EAEA,IAAMA,OAAO,GAAI,YAAM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,GAAR,CAAYU,QAAZ,EAAsBR,GAAtB,EAA2BC,IAA3B;EACD,GAHU;EAIXQ,EAAAA,OAJW,mBAIHD,QAJG,EAIOR,GAJP,EAIY;EACrB,WAAOL,OAAO,CAACQ,GAAR,CAAYK,QAAZ,EAAsBR,GAAtB,CAAP;EACD,GANU;EAOXU,EAAAA,UAPW,sBAOAF,QAPA,EAOUR,GAPV,EAOe;EACxBL,IAAAA,OAAO,CAACU,MAAR,CAAeG,QAAf,EAAyBR,GAAzB;EACD;EATU;;;;;;;;"}
\ No newline at end of file diff --git a/js/dist/dom/event-handler.js b/js/dist/dom/event-handler.js index 28e4c93cac..751acc0b17 100644 --- a/js/dist/dom/event-handler.js +++ b/js/dist/dom/event-handler.js @@ -1,6 +1,6 @@ /*! - * Bootstrap event-handler.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap event-handler.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { @@ -11,7 +11,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -27,11 +27,11 @@ return null; }; - var isRTL = document.documentElement.dir === 'rtl'; + document.documentElement.dir === 'rtl'; /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): dom/event-handler.js + * Bootstrap (v5.0.0-beta2): dom/event-handler.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -91,6 +91,7 @@ event.delegateTarget = target; if (handler.oneOff) { + // eslint-disable-next-line unicorn/consistent-destructuring EventHandler.off(element, event.type, fn); } diff --git a/js/dist/dom/event-handler.js.map b/js/dist/dom/event-handler.js.map index e5a2dd7f78..0c5d6b4b9f 100644 --- a/js/dist/dom/event-handler.js.map +++ b/js/dist/dom/event-handler.js.map @@ -1 +1 @@ -{"version":3,"file":"event-handler.js","sources":["../../src/util/index.js","../../src/dom/event-handler.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n const hrefAttr = element.getAttribute('href')\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ?\n 'element' :\n toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`)\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nexport {\n TRANSITION_END,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { getjQuery } from '../util/index'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst namespaceRegex = /[^.]*(?=\\..*)\\.|.*/\nconst stripNameRegex = /\\..*/\nconst stripUidRegex = /::\\d+$/\nconst eventRegistry = {} // Events storage\nlet uidEvent = 1\nconst customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout'\n}\nconst nativeEvents = new Set([\n 'click',\n 'dblclick',\n 'mouseup',\n 'mousedown',\n 'contextmenu',\n 'mousewheel',\n 'DOMMouseScroll',\n 'mouseover',\n 'mouseout',\n 'mousemove',\n 'selectstart',\n 'selectend',\n 'keydown',\n 'keypress',\n 'keyup',\n 'orientationchange',\n 'touchstart',\n 'touchmove',\n 'touchend',\n 'touchcancel',\n 'pointerdown',\n 'pointermove',\n 'pointerup',\n 'pointerleave',\n 'pointercancel',\n 'gesturestart',\n 'gesturechange',\n 'gestureend',\n 'focus',\n 'blur',\n 'change',\n 'reset',\n 'select',\n 'submit',\n 'focusin',\n 'focusout',\n 'load',\n 'unload',\n 'beforeunload',\n 'resize',\n 'move',\n 'DOMContentLoaded',\n 'readystatechange',\n 'error',\n 'abort',\n 'scroll'\n])\n\n/**\n * ------------------------------------------------------------------------\n * Private methods\n * ------------------------------------------------------------------------\n */\n\nfunction getUidEvent(element, uid) {\n return (uid && `${uid}::${uidEvent++}`) || element.uidEvent || uidEvent++\n}\n\nfunction getEvent(element) {\n const uid = getUidEvent(element)\n\n element.uidEvent = uid\n eventRegistry[uid] = eventRegistry[uid] || {}\n\n return eventRegistry[uid]\n}\n\nfunction bootstrapHandler(element, fn) {\n return function handler(event) {\n event.delegateTarget = element\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn)\n }\n\n return fn.apply(element, [event])\n }\n}\n\nfunction bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector)\n\n for (let { target } = event; target && target !== this; target = target.parentNode) {\n for (let i = domElements.length; i--;) {\n if (domElements[i] === target) {\n event.delegateTarget = target\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn)\n }\n\n return fn.apply(target, [event])\n }\n }\n }\n\n // To please ESLint\n return null\n }\n}\n\nfunction findHandler(events, handler, delegationSelector = null) {\n const uidEventList = Object.keys(events)\n\n for (let i = 0, len = uidEventList.length; i < len; i++) {\n const event = events[uidEventList[i]]\n\n if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {\n return event\n }\n }\n\n return null\n}\n\nfunction normalizeParams(originalTypeEvent, handler, delegationFn) {\n const delegation = typeof handler === 'string'\n const originalHandler = delegation ? delegationFn : handler\n\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n let typeEvent = originalTypeEvent.replace(stripNameRegex, '')\n const custom = customEvents[typeEvent]\n\n if (custom) {\n typeEvent = custom\n }\n\n const isNative = nativeEvents.has(typeEvent)\n\n if (!isNative) {\n typeEvent = originalTypeEvent\n }\n\n return [delegation, originalHandler, typeEvent]\n}\n\nfunction addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return\n }\n\n if (!handler) {\n handler = delegationFn\n delegationFn = null\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn)\n const events = getEvent(element)\n const handlers = events[typeEvent] || (events[typeEvent] = {})\n const previousFn = findHandler(handlers, originalHandler, delegation ? handler : null)\n\n if (previousFn) {\n previousFn.oneOff = previousFn.oneOff && oneOff\n\n return\n }\n\n const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''))\n const fn = delegation ?\n bootstrapDelegationHandler(element, handler, delegationFn) :\n bootstrapHandler(element, handler)\n\n fn.delegationSelector = delegation ? handler : null\n fn.originalHandler = originalHandler\n fn.oneOff = oneOff\n fn.uidEvent = uid\n handlers[uid] = fn\n\n element.addEventListener(typeEvent, fn, delegation)\n}\n\nfunction removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector)\n\n if (!fn) {\n return\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector))\n delete events[typeEvent][fn.uidEvent]\n}\n\nfunction removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {}\n\n Object.keys(storeElementEvent).forEach(handlerKey => {\n if (handlerKey.includes(namespace)) {\n const event = storeElementEvent[handlerKey]\n\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector)\n }\n })\n}\n\nconst EventHandler = {\n on(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, false)\n },\n\n one(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, true)\n },\n\n off(element, originalTypeEvent, handler, delegationFn) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn)\n const inNamespace = typeEvent !== originalTypeEvent\n const events = getEvent(element)\n const isNamespace = originalTypeEvent.startsWith('.')\n\n if (typeof originalHandler !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!events || !events[typeEvent]) {\n return\n }\n\n removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null)\n return\n }\n\n if (isNamespace) {\n Object.keys(events).forEach(elementEvent => {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1))\n })\n }\n\n const storeElementEvent = events[typeEvent] || {}\n Object.keys(storeElementEvent).forEach(keyHandlers => {\n const handlerKey = keyHandlers.replace(stripUidRegex, '')\n\n if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n const event = storeElementEvent[keyHandlers]\n\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector)\n }\n })\n },\n\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null\n }\n\n const $ = getjQuery()\n const typeEvent = event.replace(stripNameRegex, '')\n const inNamespace = event !== typeEvent\n const isNative = nativeEvents.has(typeEvent)\n\n let jQueryEvent\n let bubbles = true\n let nativeDispatch = true\n let defaultPrevented = false\n let evt = null\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args)\n\n $(element).trigger(jQueryEvent)\n bubbles = !jQueryEvent.isPropagationStopped()\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped()\n defaultPrevented = jQueryEvent.isDefaultPrevented()\n }\n\n if (isNative) {\n evt = document.createEvent('HTMLEvents')\n evt.initEvent(typeEvent, bubbles, true)\n } else {\n evt = new CustomEvent(event, {\n bubbles,\n cancelable: true\n })\n }\n\n // merge custom information in our event\n if (typeof args !== 'undefined') {\n Object.keys(args).forEach(key => {\n Object.defineProperty(evt, key, {\n get() {\n return args[key]\n }\n })\n })\n }\n\n if (defaultPrevented) {\n evt.preventDefault()\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt)\n }\n\n if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {\n jQueryEvent.preventDefault()\n }\n\n return evt\n }\n}\n\nexport default EventHandler\n"],"names":["getjQuery","window","jQuery","document","body","hasAttribute","isRTL","documentElement","dir","namespaceRegex","stripNameRegex","stripUidRegex","eventRegistry","uidEvent","customEvents","mouseenter","mouseleave","nativeEvents","Set","getUidEvent","element","uid","getEvent","bootstrapHandler","fn","handler","event","delegateTarget","oneOff","EventHandler","off","type","apply","bootstrapDelegationHandler","selector","domElements","querySelectorAll","target","parentNode","i","length","findHandler","events","delegationSelector","uidEventList","Object","keys","len","originalHandler","normalizeParams","originalTypeEvent","delegationFn","delegation","typeEvent","replace","custom","isNative","has","addHandler","handlers","previousFn","addEventListener","removeHandler","removeEventListener","Boolean","removeNamespacedHandlers","namespace","storeElementEvent","forEach","handlerKey","includes","on","one","inNamespace","isNamespace","startsWith","elementEvent","slice","keyHandlers","trigger","args","$","jQueryEvent","bubbles","nativeDispatch","defaultPrevented","evt","Event","isPropagationStopped","isImmediatePropagationStopped","isDefaultPrevented","createEvent","initEvent","CustomEvent","cancelable","key","defineProperty","get","preventDefault","dispatchEvent"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAqKA,IAAMA,SAAS,GAAG,SAAZA,SAAY,GAAM;EAAA,gBACHC,MADG;EAAA,MACdC,MADc,WACdA,MADc;;EAGtB,MAAIA,MAAM,IAAI,CAACC,QAAQ,CAACC,IAAT,CAAcC,YAAd,CAA2B,mBAA3B,CAAf,EAAgE;EAC9D,WAAOH,MAAP;EACD;;EAED,SAAO,IAAP;EACD,CARD;;EAkBA,IAAMI,KAAK,GAAGH,QAAQ,CAACI,eAAT,CAAyBC,GAAzB,KAAiC,KAA/C;;EC5LA;EACA;EACA;EACA;EACA;EACA;EAIA;EACA;EACA;EACA;EACA;;EAEA,IAAMC,cAAc,GAAG,oBAAvB;EACA,IAAMC,cAAc,GAAG,MAAvB;EACA,IAAMC,aAAa,GAAG,QAAtB;EACA,IAAMC,aAAa,GAAG,EAAtB;;EACA,IAAIC,QAAQ,GAAG,CAAf;EACA,IAAMC,YAAY,GAAG;EACnBC,EAAAA,UAAU,EAAE,WADO;EAEnBC,EAAAA,UA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J,IAAwB,OAAOH,WAAP,KAAuB,WAAnD,EAAgE;EAC9DA,MAAAA,WAAW,CAACgB,cAAZ;EACD;;EAED,WAAOZ,GAAP;EACD;EA1GkB;;;;;;;;"}
\ No newline at end of file +{"version":3,"file":"event-handler.js","sources":["../../src/util/index.js","../../src/dom/event-handler.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = '#' + hrefAttr.split('#')[1]\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = (name, plugin) => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nexport {\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { getjQuery } from '../util/index'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst namespaceRegex = /[^.]*(?=\\..*)\\.|.*/\nconst stripNameRegex = /\\..*/\nconst stripUidRegex = /::\\d+$/\nconst eventRegistry = {} // Events storage\nlet uidEvent = 1\nconst customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout'\n}\nconst nativeEvents = new Set([\n 'click',\n 'dblclick',\n 'mouseup',\n 'mousedown',\n 'contextmenu',\n 'mousewheel',\n 'DOMMouseScroll',\n 'mouseover',\n 'mouseout',\n 'mousemove',\n 'selectstart',\n 'selectend',\n 'keydown',\n 'keypress',\n 'keyup',\n 'orientationchange',\n 'touchstart',\n 'touchmove',\n 'touchend',\n 'touchcancel',\n 'pointerdown',\n 'pointermove',\n 'pointerup',\n 'pointerleave',\n 'pointercancel',\n 'gesturestart',\n 'gesturechange',\n 'gestureend',\n 'focus',\n 'blur',\n 'change',\n 'reset',\n 'select',\n 'submit',\n 'focusin',\n 'focusout',\n 'load',\n 'unload',\n 'beforeunload',\n 'resize',\n 'move',\n 'DOMContentLoaded',\n 'readystatechange',\n 'error',\n 'abort',\n 'scroll'\n])\n\n/**\n * ------------------------------------------------------------------------\n * Private methods\n * ------------------------------------------------------------------------\n */\n\nfunction getUidEvent(element, uid) {\n return (uid && `${uid}::${uidEvent++}`) || element.uidEvent || uidEvent++\n}\n\nfunction getEvent(element) {\n const uid = getUidEvent(element)\n\n element.uidEvent = uid\n eventRegistry[uid] = eventRegistry[uid] || {}\n\n return eventRegistry[uid]\n}\n\nfunction bootstrapHandler(element, fn) {\n return function handler(event) {\n event.delegateTarget = element\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn)\n }\n\n return fn.apply(element, [event])\n }\n}\n\nfunction bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector)\n\n for (let { target } = event; target && target !== this; target = target.parentNode) {\n for (let i = domElements.length; i--;) {\n if (domElements[i] === target) {\n event.delegateTarget = target\n\n if (handler.oneOff) {\n // eslint-disable-next-line unicorn/consistent-destructuring\n EventHandler.off(element, event.type, fn)\n }\n\n return fn.apply(target, [event])\n }\n }\n }\n\n // To please ESLint\n return null\n }\n}\n\nfunction findHandler(events, handler, delegationSelector = null) {\n const uidEventList = Object.keys(events)\n\n for (let i = 0, len = uidEventList.length; i < len; i++) {\n const event = events[uidEventList[i]]\n\n if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {\n return event\n }\n }\n\n return null\n}\n\nfunction normalizeParams(originalTypeEvent, handler, delegationFn) {\n const delegation = typeof handler === 'string'\n const originalHandler = delegation ? delegationFn : handler\n\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n let typeEvent = originalTypeEvent.replace(stripNameRegex, '')\n const custom = customEvents[typeEvent]\n\n if (custom) {\n typeEvent = custom\n }\n\n const isNative = nativeEvents.has(typeEvent)\n\n if (!isNative) {\n typeEvent = originalTypeEvent\n }\n\n return [delegation, originalHandler, typeEvent]\n}\n\nfunction addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return\n }\n\n if (!handler) {\n handler = delegationFn\n delegationFn = null\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn)\n const events = getEvent(element)\n const handlers = events[typeEvent] || (events[typeEvent] = {})\n const previousFn = findHandler(handlers, originalHandler, delegation ? handler : null)\n\n if (previousFn) {\n previousFn.oneOff = previousFn.oneOff && oneOff\n\n return\n }\n\n const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''))\n const fn = delegation ?\n bootstrapDelegationHandler(element, handler, delegationFn) :\n bootstrapHandler(element, handler)\n\n fn.delegationSelector = delegation ? handler : null\n fn.originalHandler = originalHandler\n fn.oneOff = oneOff\n fn.uidEvent = uid\n handlers[uid] = fn\n\n element.addEventListener(typeEvent, fn, delegation)\n}\n\nfunction removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector)\n\n if (!fn) {\n return\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector))\n delete events[typeEvent][fn.uidEvent]\n}\n\nfunction removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {}\n\n Object.keys(storeElementEvent).forEach(handlerKey => {\n if (handlerKey.includes(namespace)) {\n const event = storeElementEvent[handlerKey]\n\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector)\n }\n })\n}\n\nconst EventHandler = {\n on(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, false)\n },\n\n one(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, true)\n },\n\n off(element, originalTypeEvent, handler, delegationFn) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn)\n const inNamespace = typeEvent !== originalTypeEvent\n const events = getEvent(element)\n const isNamespace = originalTypeEvent.startsWith('.')\n\n if (typeof originalHandler !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!events || !events[typeEvent]) {\n return\n }\n\n removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null)\n return\n }\n\n if (isNamespace) {\n Object.keys(events).forEach(elementEvent => {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1))\n })\n }\n\n const storeElementEvent = events[typeEvent] || {}\n Object.keys(storeElementEvent).forEach(keyHandlers => {\n const handlerKey = keyHandlers.replace(stripUidRegex, '')\n\n if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n const event = storeElementEvent[keyHandlers]\n\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector)\n }\n })\n },\n\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null\n }\n\n const $ = getjQuery()\n const typeEvent = event.replace(stripNameRegex, '')\n const inNamespace = event !== typeEvent\n const isNative = nativeEvents.has(typeEvent)\n\n let jQueryEvent\n let bubbles = true\n let nativeDispatch = true\n let defaultPrevented = false\n let evt = null\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args)\n\n $(element).trigger(jQueryEvent)\n bubbles = !jQueryEvent.isPropagationStopped()\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped()\n defaultPrevented = jQueryEvent.isDefaultPrevented()\n }\n\n if (isNative) {\n evt = document.createEvent('HTMLEvents')\n evt.initEvent(typeEvent, bubbles, true)\n } else {\n evt = new CustomEvent(event, {\n bubbles,\n cancelable: true\n })\n }\n\n // merge custom information in our event\n if (typeof args !== 'undefined') {\n Object.keys(args).forEach(key => {\n Object.defineProperty(evt, key, {\n get() {\n return args[key]\n }\n })\n })\n }\n\n if (defaultPrevented) {\n evt.preventDefault()\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt)\n }\n\n if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {\n jQueryEvent.preventDefault()\n }\n\n return evt\n }\n}\n\nexport default EventHandler\n"],"names":["getjQuery","window","jQuery","document","body","hasAttribute","documentElement","dir","namespaceRegex","stripNameRegex","stripUidRegex","eventRegistry","uidEvent","customEvents","mouseenter","mouseleave","nativeEvents","Set","getUidEvent","element","uid","getEvent","bootstrapHandler","fn","handler","event","delegateTarget","oneOff","EventHandler","off","type","apply","bootstrapDelegationHandler","selector","domElements","querySelectorAll","target","parentNode","i","length","findHandler","events","delegationSelector","uidEventList","Object","keys","len","originalHandler","normalizeParams","originalTypeEvent","delegationFn","delegation","typeEvent","replace","custom","isNative","has","addHandler","handlers","previousFn","addEventListener","removeHandler","removeEventListener","Boolean","removeNamespacedHandlers","namespace","storeElementEvent","forEach","handlerKey","includes","on","one","inNamespace","isNamespace","startsWith","elementEvent","slice","keyHandlers","trigger","args","$","jQueryEvent","bubbles","nativeDispatch","defaultPrevented","evt","Event","isPropagationStopped","isImmediatePropagationStopped","isDefaultPrevented","createEvent","initEvent","CustomEvent","cancelable","key","defineProperty","get","preventDefault","dispatchEvent"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAiLA,IAAMA,SAAS,GAAG,SAAZA,SAAY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UAAU,EAAE;EAFe,OAAvB,CAAN;EAID,KAjC2B;;;EAoC5B,QAAI,OAAOd,IAAP,KAAgB,WAApB,EAAiC;EAC/BnC,MAAAA,MAAM,CAACC,IAAP,CAAYkC,IAAZ,EAAkBZ,OAAlB,CAA0B,UAAA2B,GAAG,EAAI;EAC/BlD,QAAAA,MAAM,CAACmD,cAAP,CAAsBV,GAAtB,EAA2BS,GAA3B,EAAgC;EAC9BE,UAAAA,GAD8B,iBACxB;EACJ,mBAAOjB,IAAI,CAACe,GAAD,CAAX;EACD;EAH6B,SAAhC;EAKD,OAND;EAOD;;EAED,QAAIV,gBAAJ,EAAsB;EACpBC,MAAAA,GAAG,CAACY,cAAJ;EACD;;EAED,QAAId,cAAJ,EAAoB;EAClBhE,MAAAA,OAAO,CAAC+E,aAAR,CAAsBb,GAAtB;EACD;;EAED,QAAIA,GAAG,CAACD,gBAAJ,IAAwB,OAAOH,WAAP,KAAuB,WAAnD,EAAgE;EAC9DA,MAAAA,WAAW,CAACgB,cAAZ;EACD;;EAED,WAAOZ,GAAP;EACD;EA1GkB;;;;;;;;"}
\ No newline at end of file diff --git a/js/dist/dom/manipulator.js b/js/dist/dom/manipulator.js index 8012d98a83..455504f1fe 100644 --- a/js/dist/dom/manipulator.js +++ b/js/dist/dom/manipulator.js @@ -1,6 +1,6 @@ /*! - * Bootstrap manipulator.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap manipulator.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { @@ -11,7 +11,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): dom/manipulator.js + * Bootstrap (v5.0.0-beta2): dom/manipulator.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/dist/dom/manipulator.js.map b/js/dist/dom/manipulator.js.map index 42e7f3b49d..e683061404 100644 --- a/js/dist/dom/manipulator.js.map +++ b/js/dist/dom/manipulator.js.map @@ -1 +1 @@ -{"version":3,"file":"manipulator.js","sources":["../../src/dom/manipulator.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(val) {\n if (val === 'true') {\n return true\n }\n\n if (val === 'false') {\n return false\n }\n\n if (val === Number(val).toString()) {\n return Number(val)\n }\n\n if (val === '' || val === 'null') {\n return null\n }\n\n return val\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {}\n\n Object.keys(element.dataset)\n .filter(key => key.startsWith('bs'))\n .forEach(key => {\n let pureKey = key.replace(/^bs/, '')\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length)\n attributes[pureKey] = normalizeData(element.dataset[key])\n })\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n },\n\n offset(element) {\n const rect = element.getBoundingClientRect()\n\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft\n }\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft\n }\n }\n}\n\nexport default Manipulator\n"],"names":["normalizeData","val","Number","toString","normalizeDataKey","key","replace","chr","toLowerCase","Manipulator","setDataAttribute","element","value","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","Object","keys","dataset","filter","startsWith","forEach","pureKey","charAt","slice","length","getDataAttribute","getAttribute","offset","rect","getBoundingClientRect","top","document","body","scrollTop","left","scrollLeft","position","offsetTop","offsetLeft"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAEA,SAASA,aAAT,CAAuBC,GAAvB,EAA4B;EAC1B,MAAIA,GAAG,KAAK,MAAZ,EAAoB;EAClB,WAAO,IAAP;EACD;;EAED,MAAIA,GAAG,KAAK,OAAZ,EAAqB;EACnB,WAAO,KAAP;EACD;;EAED,MAAIA,GAAG,KAAKC,MAAM,CAACD,GAAD,CAAN,CAAYE,QAAZ,EAAZ,EAAoC;EAClC,WAAOD,MAAM,CAACD,GAAD,CAAb;EACD;;EAED,MAAIA,GAAG,KAAK,EAAR,IAAcA,GAAG,KAAK,MAA1B,EAAkC;EAChC,WAAO,IAAP;EACD;;EAED,SAAOA,GAAP;EACD;;EAED,SAASG,gBAAT,CAA0BC,GAA1B,EAA+B;EAC7B,SAAOA,GAAG,CAACC,OAAJ,CAAY,QAAZ,EAAsB,UAAAC,GAAG;EAAA,iBAAQA,GAAG,CAACC,WAAJ,EAAR;EAAA,GAAzB,CAAP;EACD;;MAEKC,WAAW,GAAG;EAClBC,EAAAA,gBADkB,4BACDC,OADC,EACQN,GADR,EACaO,KADb,EACoB;EACpCD,IAAAA,OAAO,CAACE,YAAR,cAAgCT,gBAAgB,CAACC,GAAD,CAAhD,EAAyDO,KAAzD;EACD,GAHiB;EAKlBE,EAAAA,mBALkB,+BAKEH,OALF,EAKWN,GALX,EAKgB;EAChCM,IAAAA,OAAO,CAACI,eAAR,cAAmCX,gBAAgB,CAACC,GAAD,CAAnD;EACD,GAPiB;EASlBW,EAAAA,iBATkB,6BASAL,OATA,EASS;EACzB,QAAI,CAACA,OAAL,EAAc;EACZ,aAAO,EAAP;EACD;;EAED,QAAMM,UAAU,GAA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CiB;;;;;;;;"}
\ No newline at end of file +{"version":3,"file":"manipulator.js","sources":["../../src/dom/manipulator.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(val) {\n if (val === 'true') {\n return true\n }\n\n if (val === 'false') {\n return false\n }\n\n if (val === Number(val).toString()) {\n return Number(val)\n }\n\n if (val === '' || val === 'null') {\n return null\n }\n\n return val\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {}\n\n Object.keys(element.dataset)\n .filter(key => key.startsWith('bs'))\n .forEach(key => {\n let pureKey = key.replace(/^bs/, '')\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length)\n attributes[pureKey] = normalizeData(element.dataset[key])\n })\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n },\n\n offset(element) {\n const rect = element.getBoundingClientRect()\n\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft\n }\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft\n }\n }\n}\n\nexport default Manipulator\n"],"names":["normalizeData","val","Number","toString","normalizeDataKey","key","replace","chr","toLowerCase","Manipulator","setDataAttribute","element","value","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","Object","keys","dataset","filter","startsWith","forEach","pureKey","charAt","slice","length","getDataAttribute","getAttribute","offset","rect","getBoundingClientRect","top","document","body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,CAAJ;EAAA,KADb,EAEGC,OAFH,CAEW,UAAAlB,GAAG,EAAI;EACd,UAAImB,OAAO,GAAGnB,GAAG,CAACC,OAAJ,CAAY,KAAZ,EAAmB,EAAnB,CAAd;EACAkB,MAAAA,OAAO,GAAGA,OAAO,CAACC,MAAR,CAAe,CAAf,EAAkBjB,WAAlB,KAAkCgB,OAAO,CAACE,KAAR,CAAc,CAAd,EAAiBF,OAAO,CAACG,MAAzB,CAA5C;EACAV,MAAAA,UAAU,CAACO,OAAD,CAAV,GAAsBxB,aAAa,CAACW,OAAO,CAACS,OAAR,CAAgBf,GAAhB,CAAD,CAAnC;EACD,KANH;EAQA,WAAOY,UAAP;EACD,GAzBiB;EA2BlBW,EAAAA,gBA3BkB,4BA2BDjB,OA3BC,EA2BQN,GA3BR,EA2Ba;EAC7B,WAAOL,aAAa,CAACW,OAAO,CAACkB,YAAR,cAAgCzB,gBAAgB,CAACC,GAAD,CAAhD,CAAD,CAApB;EACD,GA7BiB;EA+BlByB,EAAAA,MA/BkB,kBA+BXnB,OA/BW,EA+BF;EACd,QAAMoB,IAAI,GAAGpB,OAAO,CAACqB,qBAAR,EAAb;EAEA,WAAO;EACLC,MAAAA,GAAG,EAAEF,IAAI,CAACE,GAAL,GAAWC,QAAQ,CAACC,IAAT,CAAcC,SADzB;EAELC,MAAAA,IAAI,EAAEN,IAAI,CAACM,IAAL,GAAYH,QAAQ,CAACC,IAAT,CAAcG;EAF3B,KAAP;EAID,GAtCiB;EAwClBC,EAAAA,QAxCkB,oBAwCT5B,OAxCS,EAwCA;EAChB,WAAO;EACLsB,MAAAA,GAAG,EAAEtB,OAAO,CAAC6B,SADR;EAELH,MAAAA,IAAI,EAAE1B,OAAO,CAAC8B;EAFT,KAAP;EAID;EA7CiB;;;;;;;;"}
\ No newline at end of file diff --git a/js/dist/dom/selector-engine.js b/js/dist/dom/selector-engine.js index 65b51b0a8a..6b2297e35e 100644 --- a/js/dist/dom/selector-engine.js +++ b/js/dist/dom/selector-engine.js @@ -1,6 +1,6 @@ /*! - * Bootstrap selector-engine.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap selector-engine.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { @@ -11,7 +11,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): dom/selector-engine.js + * Bootstrap (v5.0.0-beta2): dom/selector-engine.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -23,9 +23,6 @@ */ var NODE_TEXT = 3; var SelectorEngine = { - matches: function matches(element, selector) { - return element.matches(selector); - }, find: function find(selector, element) { var _ref; @@ -45,9 +42,7 @@ children: function children(element, selector) { var _ref2; - var children = (_ref2 = []).concat.apply(_ref2, element.children); - - return children.filter(function (child) { + return (_ref2 = []).concat.apply(_ref2, element.children).filter(function (child) { return child.matches(selector); }); }, @@ -56,7 +51,7 @@ var ancestor = element.parentNode; while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) { - if (this.matches(ancestor, selector)) { + if (ancestor.matches(selector)) { parents.push(ancestor); } @@ -82,7 +77,7 @@ var next = element.nextElementSibling; while (next) { - if (this.matches(next, selector)) { + if (next.matches(selector)) { return [next]; } diff --git a/js/dist/dom/selector-engine.js.map b/js/dist/dom/selector-engine.js.map index 8faf677645..2a9d1ae67b 100644 --- a/js/dist/dom/selector-engine.js.map +++ b/js/dist/dom/selector-engine.js.map @@ -1 +1 @@ -{"version":3,"file":"selector-engine.js","sources":["../../src/dom/selector-engine.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NODE_TEXT = 3\n\nconst SelectorEngine = {\n matches(element, selector) {\n return element.matches(selector)\n },\n\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector))\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector)\n },\n\n children(element, selector) {\n const children = [].concat(...element.children)\n\n return children.filter(child => child.matches(selector))\n },\n\n parents(element, selector) {\n const parents = []\n\n let ancestor = element.parentNode\n\n while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {\n if (this.matches(ancestor, selector)) {\n parents.push(ancestor)\n }\n\n ancestor = ancestor.parentNode\n }\n\n return parents\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous]\n }\n\n previous = previous.previousElementSibling\n }\n\n return []\n },\n\n next(element, selector) {\n let next = element.nextElementSibling\n\n while (next) {\n if (this.matches(next, selector)) {\n return [next]\n }\n\n next = next.nextElementSibling\n }\n\n return []\n }\n}\n\nexport default SelectorEngine\n"],"names":["NODE_TEXT","SelectorEngine","matches","element","selector","find","document","documentElement","concat","Element","prototype","querySelectorAll","call","findOne","querySelector","children","filter","child","parents","ancestor","parentNode","nodeType","Node","ELEMENT_NODE","push","prev","previous","previousElementSibling","next","nextElementSibling"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EAEA,IAAMA,SAAS,GAAG,CAAlB;MAEMC,cAAc,GAAG;EACrBC,EAAAA,OADqB,mBACbC,OADa,EACJC,QADI,EACM;EACzB,WAAOD,OAAO,CAACD,OAAR,CAAgBE,QAAhB,CAAP;EACD,GAHoB;EAKrBC,EAAAA,IALqB,gBAKhBD,QALgB,EAKND,OALM,E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O,EAAAA,IAnCqB,gBAmChBtB,OAnCgB,EAmCPC,QAnCO,EAmCG;EACtB,QAAIsB,QAAQ,GAAGvB,OAAO,CAACwB,sBAAvB;;EAEA,WAAOD,QAAP,EAAiB;EACf,UAAIA,QAAQ,CAACxB,OAAT,CAAiBE,QAAjB,CAAJ,EAAgC;EAC9B,eAAO,CAACsB,QAAD,CAAP;EACD;;EAEDA,MAAAA,QAAQ,GAAGA,QAAQ,CAACC,sBAApB;EACD;;EAED,WAAO,EAAP;EACD,GA/CoB;EAiDrBC,EAAAA,IAjDqB,gBAiDhBzB,OAjDgB,EAiDPC,QAjDO,EAiDG;EACtB,QAAIwB,IAAI,GAAGzB,OAAO,CAAC0B,kBAAnB;;EAEA,WAAOD,IAAP,EAAa;EACX,UAAI,KAAK1B,OAAL,CAAa0B,IAAb,EAAmBxB,QAAnB,CAAJ,EAAkC;EAChC,eAAO,CAACwB,IAAD,CAAP;EACD;;EAEDA,MAAAA,IAAI,GAAGA,IAAI,CAACC,kBAAZ;EACD;;EAED,WAAO,EAAP;EACD;EA7DoB;;;;;;;;"}
\ No newline at end of file +{"version":3,"file":"selector-engine.js","sources":["../../src/dom/selector-engine.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NODE_TEXT = 3\n\nconst SelectorEngine = {\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector))\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector)\n },\n\n children(element, selector) {\n return [].concat(...element.children)\n .filter(child => child.matches(selector))\n },\n\n parents(element, selector) {\n const parents = []\n\n let ancestor = element.parentNode\n\n while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {\n if (ancestor.matches(selector)) {\n parents.push(ancestor)\n }\n\n ancestor = ancestor.parentNode\n }\n\n return parents\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous]\n }\n\n previous = previous.previousElementSibling\n }\n\n return []\n },\n\n next(element, selector) {\n let next = element.nextElementSibling\n\n while (next) {\n if (next.matches(selector)) {\n return [next]\n }\n\n next = next.nextElementSibling\n }\n\n return []\n }\n}\n\nexport default SelectorEngine\n"],"names":["NODE_TEXT","SelectorEngine","find","selector","element","document","documentElement","concat","Element","prototype","querySelectorAll","call","findOne","querySelector","children","filter","child","matches","parents","ancestor","parentNode","nodeType","Node","ELEMENT_NODE","push","prev","previous","previousElementSibling","next","nextElementSibling"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EAEA,IAAMA,SAAS,GAAG,CAAlB;MAEMC,cAAc,GAAG;EACrBC,EAAAA,IADqB,gBAChBC,QADgB,EACNC,OADM,EAC8B;EAAA;;EAAA,QAApCA,OAAoC;EAApCA,MAAAA,OAAoC,GAA1BC,QAAQ,CAACC,eAAiB;EAAA;;EACjD,WAAO,YAAGC,MAAH,aAAaC,OAAO,CAACC,SAAR,CAAkBC,gBAAlB,CAAmCC,IAAnC,CAAwCP,OAAxC,EAAiDD,QAAjD,CAAb,CAAP;EACD,GAHoB;EAKrBS,EAAAA,OALqB,mBAKbT,QALa,EAKHC,OALG,EAKiC;EAAA,QAApCA,OAAoC;EAApCA,MAAAA,OAAoC,GAA1BC,QAAQ,CAACC,eAAiB;EAAA;;EACpD,WAAOE,OAAO,CAACC,SAAR,CAAkBI,aAAlB,CAAgCF,IAAhC,CAAqCP,OAArC,EAA8CD,QAA9C,CAAP;EACD,GAPoB;EASrBW,EAAAA,QATqB,oBASZV,OATY,EASHD,QATG,EASO;EAAA;;EAC1B,WAAO,aAAGI,MAAH,cAAaH,OAA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P;EACD;EAxDoB;;;;;;;;"}
\ No newline at end of file diff --git a/js/dist/dropdown.js b/js/dist/dropdown.js index 5c9dc106cf..07cb3fc3d2 100644 --- a/js/dist/dropdown.js +++ b/js/dist/dropdown.js @@ -1,13 +1,13 @@ /*! - * Bootstrap dropdown.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap dropdown.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) : - typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.Popper, global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); -}(this, (function (Popper, Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.Popper, global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); +}(this, (function (Popper, Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } @@ -36,10 +36,61 @@ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -56,7 +107,20 @@ var selector = element.getAttribute('data-bs-target'); if (!selector || selector === '#') { - var hrefAttr = element.getAttribute('href'); + var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes, + // so everything starting with `#` or `.`. If a "real" URL is used as the selector, + // `document.querySelector` will rightfully complain it is invalid. + // See https://github.com/twbs/bootstrap/issues/32273 + + if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) { + return null; + } // Just in case some CMS puts out a full URL with the anchor appended + + + if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) { + hrefAttr = '#' + hrefAttr.split('#')[1]; + } + selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null; } @@ -79,7 +143,7 @@ var valueType = value && isElement(value) ? 'element' : toType(value); if (!new RegExp(expectedTypes).test(valueType)) { - throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); + throw new TypeError(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); } }); }; @@ -123,57 +187,24 @@ var isRTL = document.documentElement.dir === 'rtl'; - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; - } - - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } - - var _proto = BaseComponent.prototype; - - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; } - }]); - - return BaseComponent; - }(); - - function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - - function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - - function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } + }); + }; - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -218,7 +249,7 @@ var PLACEMENT_RIGHT = isRTL ? 'left-start' : 'right-start'; var PLACEMENT_LEFT = isRTL ? 'right-start' : 'left-start'; var Default = { - offset: 0, + offset: [0, 2], flip: true, boundary: 'clippingParents', reference: 'toggle', @@ -226,12 +257,12 @@ popperConfig: null }; var DefaultType = { - offset: '(number|string|function)', + offset: '(array|string|function)', flip: 'boolean', boundary: '(string|element)', - reference: '(string|element)', + reference: '(string|element|object)', display: 'string', - popperConfig: '(null|object)' + popperConfig: '(null|object|function)' }; /** * ------------------------------------------------------------------------ @@ -292,7 +323,9 @@ } // Totally disable Popper for Dropdowns in Navbar - if (!this._inNavbar) { + if (this._inNavbar) { + Manipulator__default['default'].setDataAttribute(this._menu, 'popper', 'none'); + } else { if (typeof Popper__namespace === 'undefined') { throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)'); } @@ -307,9 +340,20 @@ if (typeof this._config.reference.jquery !== 'undefined') { referenceElement = this._config.reference[0]; } + } else if (typeof this._config.reference === 'object') { + referenceElement = this._config.reference; } - this._popper = Popper.createPopper(referenceElement, this._menu, this._getPopperConfig()); + var popperConfig = this._getPopperConfig(); + + var isDisplayStatic = popperConfig.modifiers.find(function (modifier) { + return modifier.name === 'applyStyles' && modifier.enabled === false; + }); + this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig); + + if (isDisplayStatic) { + Manipulator__default['default'].setDataAttribute(this._menu, 'popper', 'static'); + } } // If this is a touch-enabled device we add extra // empty mouseover listeners to the body's immediate children; // only needed because of broken event delegation on iOS @@ -332,7 +376,7 @@ this._element.classList.toggle(CLASS_NAME_SHOW); - EventHandler__default['default'].trigger(parent, EVENT_SHOWN, relatedTarget); + EventHandler__default['default'].trigger(this._element, EVENT_SHOWN, relatedTarget); }; _proto.hide = function hide() { @@ -340,11 +384,10 @@ return; } - var parent = Dropdown.getParentFromElement(this._element); var relatedTarget = { relatedTarget: this._element }; - var hideEvent = EventHandler__default['default'].trigger(parent, EVENT_HIDE, relatedTarget); + var hideEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE, relatedTarget); if (hideEvent.defaultPrevented) { return; @@ -358,7 +401,8 @@ this._element.classList.toggle(CLASS_NAME_SHOW); - EventHandler__default['default'].trigger(parent, EVENT_HIDDEN, relatedTarget); + Manipulator__default['default'].removeDataAttribute(this._menu, 'popper'); + EventHandler__default['default'].trigger(this._element, EVENT_HIDDEN, relatedTarget); }; _proto.dispose = function dispose() { @@ -397,6 +441,12 @@ _proto._getConfig = function _getConfig(config) { config = _extends({}, this.constructor.Default, Manipulator__default['default'].getDataAttributes(this._element), config); typeCheckConfig(NAME, config, this.constructor.DefaultType); + + if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') { + // Popper virtual elements require a getBoundingClientRect method + throw new TypeError(NAME.toUpperCase() + ": Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method."); + } + return config; }; @@ -429,26 +479,51 @@ return this._element.closest("." + CLASS_NAME_NAVBAR) !== null; }; + _proto._getOffset = function _getOffset() { + var _this3 = this; + + var offset = this._config.offset; + + if (typeof offset === 'string') { + return offset.split(',').map(function (val) { + return Number.parseInt(val, 10); + }); + } + + if (typeof offset === 'function') { + return function (popperData) { + return offset(popperData, _this3._element); + }; + } + + return offset; + }; + _proto._getPopperConfig = function _getPopperConfig() { - var popperConfig = { + var defaultBsPopperConfig = { placement: this._getPlacement(), modifiers: [{ name: 'preventOverflow', options: { altBoundary: this._config.flip, - rootBoundary: this._config.boundary + boundary: this._config.boundary + } + }, { + name: 'offset', + options: { + offset: this._getOffset() } }] }; // Disable Popper if we have a static display if (this._config.display === 'static') { - popperConfig.modifiers = [{ + defaultBsPopperConfig.modifiers = [{ name: 'applyStyles', enabled: false }]; } - return _extends({}, popperConfig, this._config.popperConfig); + return _extends({}, defaultBsPopperConfig, typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig); } // Static ; @@ -484,7 +559,6 @@ var toggles = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE); for (var i = 0, len = toggles.length; i < len; i++) { - var parent = Dropdown.getParentFromElement(toggles[i]); var context = Data__default['default'].getData(toggles[i], DATA_KEY); var relatedTarget = { relatedTarget: toggles[i] @@ -508,7 +582,7 @@ continue; } - var hideEvent = EventHandler__default['default'].trigger(parent, EVENT_HIDE, relatedTarget); + var hideEvent = EventHandler__default['default'].trigger(toggles[i], EVENT_HIDE, relatedTarget); if (hideEvent.defaultPrevented) { continue; @@ -532,7 +606,8 @@ dropdownMenu.classList.remove(CLASS_NAME_SHOW); toggles[i].classList.remove(CLASS_NAME_SHOW); - EventHandler__default['default'].trigger(parent, EVENT_HIDDEN, relatedTarget); + Manipulator__default['default'].removeDataAttribute(dropdownMenu, 'popper'); + EventHandler__default['default'].trigger(toggles[i], EVENT_HIDDEN, relatedTarget); } }; @@ -569,6 +644,14 @@ return; } + if (!isActive && (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY)) { + var _button = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine__default['default'].prev(this, SELECTOR_DATA_TOGGLE)[0]; + + _button.click(); + + return; + } + if (!isActive || event.key === SPACE_KEY) { Dropdown.clearMenus(); return; @@ -596,7 +679,7 @@ items[index].focus(); }; - _createClass$1(Dropdown, null, [{ + _createClass(Dropdown, null, [{ key: "Default", get: function get() { return Default; @@ -614,7 +697,7 @@ }]); return Dropdown; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -641,21 +724,7 @@ * add .Dropdown to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Dropdown.jQueryInterface; - $.fn[NAME].Constructor = Dropdown; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Dropdown.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Dropdown); return Dropdown; diff --git a/js/dist/dropdown.js.map b/js/dist/dropdown.js.map index ab8ad8a2a4..69c82d4ac7 100644 --- a/js/dist/dropdown.js.map +++ b/js/dist/dropdown.js.map @@ -1 +1 @@ -{"version":3,"file":"dropdown.js","sources":["../src/util/index.js","../src/base-component.js","../src/dropdown.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n const hrefAttr = element.getAttribute('href')\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ?\n 'element' :\n toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`)\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nexport {\n TRANSITION_END,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst VERSION = '5.0.0-beta1'\n\nclass BaseComponent {\n constructor(element) {\n if (!element) {\n return\n }\n\n this._element = element\n Data.setData(element, this.constructor.DATA_KEY, this)\n }\n\n dispose() {\n Data.removeData(this._element, this.constructor.DATA_KEY)\n this._element = null\n }\n\n /** Static */\n\n static getInstance(element) {\n return Data.getData(element, this.DATA_KEY)\n }\n\n static get VERSION() {\n return VERSION\n }\n}\n\nexport default BaseComponent\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport * as Popper from '@popperjs/core'\n\nimport {\n getjQuery,\n onDOMContentLoaded,\n getElementFromSelector,\n isElement,\n isVisible,\n isRTL,\n noop,\n typeCheckConfig\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'dropdown'\nconst DATA_KEY = 'bs.dropdown'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst ESCAPE_KEY = 'Escape'\nconst SPACE_KEY = 'Space'\nconst TAB_KEY = 'Tab'\nconst ARROW_UP_KEY = 'ArrowUp'\nconst ARROW_DOWN_KEY = 'ArrowDown'\nconst RIGHT_MOUSE_BUTTON = 2 // MouseEvent.button value for the secondary button, usually the right button\n\nconst REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY}`)\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_CLICK = `click${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_DISABLED = 'disabled'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_DROPUP = 'dropup'\nconst CLASS_NAME_DROPEND = 'dropend'\nconst CLASS_NAME_DROPSTART = 'dropstart'\nconst CLASS_NAME_NAVBAR = 'navbar'\n\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"dropdown\"]'\nconst SELECTOR_FORM_CHILD = '.dropdown form'\nconst SELECTOR_MENU = '.dropdown-menu'\nconst SELECTOR_NAVBAR_NAV = '.navbar-nav'\nconst SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'\n\nconst PLACEMENT_TOP = isRTL ? 'top-end' : 'top-start'\nconst PLACEMENT_TOPEND = isRTL ? 'top-start' : 'top-end'\nconst PLACEMENT_BOTTOM = isRTL ? 'bottom-end' : 'bottom-start'\nconst PLACEMENT_BOTTOMEND = isRTL ? 'bottom-start' : 'bottom-end'\nconst PLACEMENT_RIGHT = isRTL ? 'left-start' : 'right-start'\nconst PLACEMENT_LEFT = isRTL ? 'right-start' : 'left-start'\n\nconst Default = {\n offset: 0,\n flip: true,\n boundary: 'clippingParents',\n reference: 'toggle',\n display: 'dynamic',\n popperConfig: null\n}\n\nconst DefaultType = {\n offset: '(number|string|function)',\n flip: 'boolean',\n boundary: '(string|element)',\n reference: '(string|element)',\n display: 'string',\n popperConfig: '(null|object)'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Dropdown extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._popper = null\n this._config = this._getConfig(config)\n this._menu = this._getMenuElement()\n this._inNavbar = this._detectNavbar()\n\n this._addEventListeners()\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n // Public\n\n toggle() {\n if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED)) {\n return\n }\n\n const isActive = this._element.classList.contains(CLASS_NAME_SHOW)\n\n Dropdown.clearMenus()\n\n if (isActive) {\n return\n }\n\n this.show()\n }\n\n show() {\n if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || this._menu.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n const parent = Dropdown.getParentFromElement(this._element)\n const relatedTarget = {\n relatedTarget: this._element\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, relatedTarget)\n\n if (showEvent.defaultPrevented) {\n return\n }\n\n // Totally disable Popper for Dropdowns in Navbar\n if (!this._inNavbar) {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s dropdowns require Popper (https://popper.js.org)')\n }\n\n let referenceElement = this._element\n\n if (this._config.reference === 'parent') {\n referenceElement = parent\n } else if (isElement(this._config.reference)) {\n referenceElement = this._config.reference\n\n // Check if it's jQuery element\n if (typeof this._config.reference.jquery !== 'undefined') {\n referenceElement = this._config.reference[0]\n }\n }\n\n this._popper = Popper.createPopper(referenceElement, this._menu, this._getPopperConfig())\n }\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement &&\n !parent.closest(SELECTOR_NAVBAR_NAV)) {\n [].concat(...document.body.children)\n .forEach(elem => EventHandler.on(elem, 'mouseover', null, noop()))\n }\n\n this._element.focus()\n this._element.setAttribute('aria-expanded', true)\n\n this._menu.classList.toggle(CLASS_NAME_SHOW)\n this._element.classList.toggle(CLASS_NAME_SHOW)\n EventHandler.trigger(parent, EVENT_SHOWN, relatedTarget)\n }\n\n hide() {\n if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || !this._menu.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n const parent = Dropdown.getParentFromElement(this._element)\n const relatedTarget = {\n relatedTarget: this._element\n }\n\n const hideEvent = EventHandler.trigger(parent, EVENT_HIDE, relatedTarget)\n\n if (hideEvent.defaultPrevented) {\n return\n }\n\n if (this._popper) {\n this._popper.destroy()\n }\n\n this._menu.classList.toggle(CLASS_NAME_SHOW)\n this._element.classList.toggle(CLASS_NAME_SHOW)\n EventHandler.trigger(parent, EVENT_HIDDEN, relatedTarget)\n }\n\n dispose() {\n super.dispose()\n EventHandler.off(this._element, EVENT_KEY)\n this._menu = null\n\n if (this._popper) {\n this._popper.destroy()\n this._popper = null\n }\n }\n\n update() {\n this._inNavbar = this._detectNavbar()\n if (this._popper) {\n this._popper.update()\n }\n }\n\n // Private\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_CLICK, event => {\n event.preventDefault()\n event.stopPropagation()\n this.toggle()\n })\n }\n\n _getConfig(config) {\n config = {\n ...this.constructor.Default,\n ...Manipulator.getDataAttributes(this._element),\n ...config\n }\n\n typeCheckConfig(NAME, config, this.constructor.DefaultType)\n\n return config\n }\n\n _getMenuElement() {\n return SelectorEngine.next(this._element, SELECTOR_MENU)[0]\n }\n\n _getPlacement() {\n const parentDropdown = this._element.parentNode\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {\n return PLACEMENT_RIGHT\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {\n return PLACEMENT_LEFT\n }\n\n // We need to trim the value because custom properties can also include spaces\n const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end'\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {\n return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP\n }\n\n return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM\n }\n\n _detectNavbar() {\n return this._element.closest(`.${CLASS_NAME_NAVBAR}`) !== null\n }\n\n _getPopperConfig() {\n const popperConfig = {\n placement: this._getPlacement(),\n modifiers: [{\n name: 'preventOverflow',\n options: {\n altBoundary: this._config.flip,\n rootBoundary: this._config.boundary\n }\n }]\n }\n\n // Disable Popper if we have a static display\n if (this._config.display === 'static') {\n popperConfig.modifiers = [{\n name: 'applyStyles',\n enabled: false\n }]\n }\n\n return {\n ...popperConfig,\n ...this._config.popperConfig\n }\n }\n\n // Static\n\n static dropdownInterface(element, config) {\n let data = Data.getData(element, DATA_KEY)\n const _config = typeof config === 'object' ? config : null\n\n if (!data) {\n data = new Dropdown(element, _config)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n }\n\n static jQueryInterface(config) {\n return this.each(function () {\n Dropdown.dropdownInterface(this, config)\n })\n }\n\n static clearMenus(event) {\n if (event && (event.button === RIGHT_MOUSE_BUTTON || (event.type === 'keyup' && event.key !== TAB_KEY))) {\n return\n }\n\n const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE)\n\n for (let i = 0, len = toggles.length; i < len; i++) {\n const parent = Dropdown.getParentFromElement(toggles[i])\n const context = Data.getData(toggles[i], DATA_KEY)\n const relatedTarget = {\n relatedTarget: toggles[i]\n }\n\n if (event && event.type === 'click') {\n relatedTarget.clickEvent = event\n }\n\n if (!context) {\n continue\n }\n\n const dropdownMenu = context._menu\n if (!toggles[i].classList.contains(CLASS_NAME_SHOW)) {\n continue\n }\n\n if (event && ((event.type === 'click' &&\n /input|textarea/i.test(event.target.tagName)) ||\n (event.type === 'keyup' && event.key === TAB_KEY)) &&\n dropdownMenu.contains(event.target)) {\n continue\n }\n\n const hideEvent = EventHandler.trigger(parent, EVENT_HIDE, relatedTarget)\n if (hideEvent.defaultPrevented) {\n continue\n }\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children)\n .forEach(elem => EventHandler.off(elem, 'mouseover', null, noop()))\n }\n\n toggles[i].setAttribute('aria-expanded', 'false')\n\n if (context._popper) {\n context._popper.destroy()\n }\n\n dropdownMenu.classList.remove(CLASS_NAME_SHOW)\n toggles[i].classList.remove(CLASS_NAME_SHOW)\n EventHandler.trigger(parent, EVENT_HIDDEN, relatedTarget)\n }\n }\n\n static getParentFromElement(element) {\n return getElementFromSelector(element) || element.parentNode\n }\n\n static dataApiKeydownHandler(event) {\n // If not input/textarea:\n // - And not a key in REGEXP_KEYDOWN => not a dropdown command\n // If input/textarea:\n // - If space key => not a dropdown command\n // - If key is other than escape\n // - If key is not up or down => not a dropdown command\n // - If trigger inside the menu => not a dropdown command\n if (/input|textarea/i.test(event.target.tagName) ?\n event.key === SPACE_KEY || (event.key !== ESCAPE_KEY &&\n ((event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY) ||\n event.target.closest(SELECTOR_MENU))) :\n !REGEXP_KEYDOWN.test(event.key)) {\n return\n }\n\n event.preventDefault()\n event.stopPropagation()\n\n if (this.disabled || this.classList.contains(CLASS_NAME_DISABLED)) {\n return\n }\n\n const parent = Dropdown.getParentFromElement(this)\n const isActive = this.classList.contains(CLASS_NAME_SHOW)\n\n if (event.key === ESCAPE_KEY) {\n const button = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0]\n button.focus()\n Dropdown.clearMenus()\n return\n }\n\n if (!isActive || event.key === SPACE_KEY) {\n Dropdown.clearMenus()\n return\n }\n\n const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, parent).filter(isVisible)\n\n if (!items.length) {\n return\n }\n\n let index = items.indexOf(event.target)\n\n // Up\n if (event.key === ARROW_UP_KEY && index > 0) {\n index--\n }\n\n // Down\n if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {\n index++\n }\n\n // index is -1 if the first keydown is an ArrowUp\n index = index === -1 ? 0 : index\n\n items[index].focus()\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler)\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler)\nEventHandler.on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus)\nEventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus)\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n event.preventDefault()\n event.stopPropagation()\n Dropdown.dropdownInterface(this, 'toggle')\n})\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, e => e.stopPropagation())\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Dropdown to jQuery only if jQuery is present\n */\n\nonDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n $.fn[NAME] = Dropdown.jQueryInterface\n $.fn[NAME].Constructor = Dropdown\n $.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Dropdown.jQueryInterface\n }\n }\n})\n\nexport default Dropdown\n"],"names":["toType","obj","undefined","toString","call","match","toLowerCase","getSelector","element","selector","getAttribute","hrefAttr","trim","getElementFromSelector","document","querySelector","isElement","nodeType","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","Error","toUpperCase","isVisible","style","parentNode","elementStyle","getComputedStyle","parentNodeStyle","display","visibility","noop","getjQuery","window","jQuery","body","hasAttribute","onDOMContentLoaded","callback","readyState","addEventListener","isRTL","documentElement","dir","VERSION","BaseComponent","_element","Data","setData","constructor","DATA_KEY","dispose","removeData","getInstance","getData","NAME","EVENT_KEY","DATA_API_KEY","ESCAPE_KEY","SPACE_KEY","TAB_KEY","ARROW_UP_KEY","ARROW_DOWN_KEY","RIGHT_MOUSE_BUTTON","REGEXP_KEYDOWN","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","EVENT_CLICK","EVENT_CLICK_DATA_API","EVENT_KEYDOWN_DATA_API","EVENT_KEYUP_DATA_API","CLASS_NAME_DISABLED","CLASS_NAME_SHOW","CLASS_NAME_DROPUP","CLASS_NAME_DROPEND","CLASS_NAME_DROPSTART","CLASS_NAME_NAVBAR","SELECTOR_DATA_TOGGLE","SELECTOR_FORM_CHILD","SELECTOR_MENU","SELECTOR_NAVBAR_NAV","SELECTOR_VISIBLE_ITEMS","PLACEMENT_TOP","PLACEMENT_TOPEND","PLACEMENT_BOTTOM","PLACEMENT_BOTTOMEND","PLACEMENT_RIGHT","PLACEMENT_LEFT","Default","offset","flip","boundary","reference","popperConfig","DefaultType","Dropdown","_popper","_config","_getConfig","_menu","_getMenuElement","_inNavbar","_detectNavbar","_addEventListeners","toggle","disabled","classList","contains","isActive","clearMenus","show","parent","getParentFromElement","relatedTarget","showEvent","EventHandler","trigger","defaultPrevented","Popper","TypeError","referenceElement","jquery","_getPopperConfig","closest","concat","children","elem","on","focus","setAttribute","hide","hideEvent","destroy","off","update","event","preventDefault","stopPropagation","Manipulator","getDataAttributes","SelectorEngine","next","_getPlacement","parentDropdown","isEnd","getPropertyValue","placement","modifiers","name","options","altBoundary","rootBoundary","enabled","dropdownInterface","data","jQueryInterface","each","button","type","key","toggles","find","i","len","length","context","clickEvent","dropdownMenu","target","tagName","remove","dataApiKeydownHandler","matches","prev","items","filter","index","indexOf","e","$","JQUERY_NO_CONFLICT","fn","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA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EACvB,MAAMgJ,CAAC,GAAGrJ,SAAS,EAAnB;EACA;;EACA,MAAIqJ,CAAJ,EAAO;EACL,QAAMC,kBAAkB,GAAGD,CAAC,CAACE,EAAF,CAAKhI,IAAL,CAA3B;EACA8H,IAAAA,CAAC,CAACE,EAAF,CAAKhI,IAAL,IAAa0C,QAAQ,CAAC4D,eAAtB;EACAwB,IAAAA,CAAC,CAACE,EAAF,CAAKhI,IAAL,EAAWiI,WAAX,GAAyBvF,QAAzB;;EACAoF,IAAAA,CAAC,CAACE,EAAF,CAAKhI,IAAL,EAAWkI,UAAX,GAAwB,YAAM;EAC5BJ,MAAAA,CAAC,CAACE,EAAF,CAAKhI,IAAL,IAAa+H,kBAAb;EACA,aAAOrF,QAAQ,CAAC4D,eAAhB;EACD,KAHD;EAID;EACF,CAZiB,CAAlB;;;;;;;;"}
\ No newline at end of file +{"version":3,"file":"dropdown.js","sources":["../src/util/index.js","../src/dropdown.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = '#' + hrefAttr.split('#')[1]\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = (name, plugin) => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nexport {\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport * as Popper from '@popperjs/core'\n\nimport {\n defineJQueryPlugin,\n getElementFromSelector,\n isElement,\n isVisible,\n isRTL,\n noop,\n typeCheckConfig\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'dropdown'\nconst DATA_KEY = 'bs.dropdown'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst ESCAPE_KEY = 'Escape'\nconst SPACE_KEY = 'Space'\nconst TAB_KEY = 'Tab'\nconst ARROW_UP_KEY = 'ArrowUp'\nconst ARROW_DOWN_KEY = 'ArrowDown'\nconst RIGHT_MOUSE_BUTTON = 2 // MouseEvent.button value for the secondary button, usually the right button\n\nconst REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY}`)\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_CLICK = `click${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_DISABLED = 'disabled'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_DROPUP = 'dropup'\nconst CLASS_NAME_DROPEND = 'dropend'\nconst CLASS_NAME_DROPSTART = 'dropstart'\nconst CLASS_NAME_NAVBAR = 'navbar'\n\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"dropdown\"]'\nconst SELECTOR_FORM_CHILD = '.dropdown form'\nconst SELECTOR_MENU = '.dropdown-menu'\nconst SELECTOR_NAVBAR_NAV = '.navbar-nav'\nconst SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'\n\nconst PLACEMENT_TOP = isRTL ? 'top-end' : 'top-start'\nconst PLACEMENT_TOPEND = isRTL ? 'top-start' : 'top-end'\nconst PLACEMENT_BOTTOM = isRTL ? 'bottom-end' : 'bottom-start'\nconst PLACEMENT_BOTTOMEND = isRTL ? 'bottom-start' : 'bottom-end'\nconst PLACEMENT_RIGHT = isRTL ? 'left-start' : 'right-start'\nconst PLACEMENT_LEFT = isRTL ? 'right-start' : 'left-start'\n\nconst Default = {\n offset: [0, 2],\n flip: true,\n boundary: 'clippingParents',\n reference: 'toggle',\n display: 'dynamic',\n popperConfig: null\n}\n\nconst DefaultType = {\n offset: '(array|string|function)',\n flip: 'boolean',\n boundary: '(string|element)',\n reference: '(string|element|object)',\n display: 'string',\n popperConfig: '(null|object|function)'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Dropdown extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._popper = null\n this._config = this._getConfig(config)\n this._menu = this._getMenuElement()\n this._inNavbar = this._detectNavbar()\n\n this._addEventListeners()\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n // Public\n\n toggle() {\n if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED)) {\n return\n }\n\n const isActive = this._element.classList.contains(CLASS_NAME_SHOW)\n\n Dropdown.clearMenus()\n\n if (isActive) {\n return\n }\n\n this.show()\n }\n\n show() {\n if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || this._menu.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n const parent = Dropdown.getParentFromElement(this._element)\n const relatedTarget = {\n relatedTarget: this._element\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, relatedTarget)\n\n if (showEvent.defaultPrevented) {\n return\n }\n\n // Totally disable Popper for Dropdowns in Navbar\n if (this._inNavbar) {\n Manipulator.setDataAttribute(this._menu, 'popper', 'none')\n } else {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s dropdowns require Popper (https://popper.js.org)')\n }\n\n let referenceElement = this._element\n\n if (this._config.reference === 'parent') {\n referenceElement = parent\n } else if (isElement(this._config.reference)) {\n referenceElement = this._config.reference\n\n // Check if it's jQuery element\n if (typeof this._config.reference.jquery !== 'undefined') {\n referenceElement = this._config.reference[0]\n }\n } else if (typeof this._config.reference === 'object') {\n referenceElement = this._config.reference\n }\n\n const popperConfig = this._getPopperConfig()\n const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false)\n\n this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig)\n\n if (isDisplayStatic) {\n Manipulator.setDataAttribute(this._menu, 'popper', 'static')\n }\n }\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement &&\n !parent.closest(SELECTOR_NAVBAR_NAV)) {\n [].concat(...document.body.children)\n .forEach(elem => EventHandler.on(elem, 'mouseover', null, noop()))\n }\n\n this._element.focus()\n this._element.setAttribute('aria-expanded', true)\n\n this._menu.classList.toggle(CLASS_NAME_SHOW)\n this._element.classList.toggle(CLASS_NAME_SHOW)\n EventHandler.trigger(this._element, EVENT_SHOWN, relatedTarget)\n }\n\n hide() {\n if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || !this._menu.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE, relatedTarget)\n\n if (hideEvent.defaultPrevented) {\n return\n }\n\n if (this._popper) {\n this._popper.destroy()\n }\n\n this._menu.classList.toggle(CLASS_NAME_SHOW)\n this._element.classList.toggle(CLASS_NAME_SHOW)\n Manipulator.removeDataAttribute(this._menu, 'popper')\n EventHandler.trigger(this._element, EVENT_HIDDEN, relatedTarget)\n }\n\n dispose() {\n super.dispose()\n EventHandler.off(this._element, EVENT_KEY)\n this._menu = null\n\n if (this._popper) {\n this._popper.destroy()\n this._popper = null\n }\n }\n\n update() {\n this._inNavbar = this._detectNavbar()\n if (this._popper) {\n this._popper.update()\n }\n }\n\n // Private\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_CLICK, event => {\n event.preventDefault()\n event.stopPropagation()\n this.toggle()\n })\n }\n\n _getConfig(config) {\n config = {\n ...this.constructor.Default,\n ...Manipulator.getDataAttributes(this._element),\n ...config\n }\n\n typeCheckConfig(NAME, config, this.constructor.DefaultType)\n\n if (typeof config.reference === 'object' && !isElement(config.reference) &&\n typeof config.reference.getBoundingClientRect !== 'function'\n ) {\n // Popper virtual elements require a getBoundingClientRect method\n throw new TypeError(`${NAME.toUpperCase()}: Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method.`)\n }\n\n return config\n }\n\n _getMenuElement() {\n return SelectorEngine.next(this._element, SELECTOR_MENU)[0]\n }\n\n _getPlacement() {\n const parentDropdown = this._element.parentNode\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {\n return PLACEMENT_RIGHT\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {\n return PLACEMENT_LEFT\n }\n\n // We need to trim the value because custom properties can also include spaces\n const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end'\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {\n return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP\n }\n\n return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM\n }\n\n _detectNavbar() {\n return this._element.closest(`.${CLASS_NAME_NAVBAR}`) !== null\n }\n\n _getOffset() {\n const { offset } = this._config\n\n if (typeof offset === 'string') {\n return offset.split(',').map(val => Number.parseInt(val, 10))\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element)\n }\n\n return offset\n }\n\n _getPopperConfig() {\n const defaultBsPopperConfig = {\n placement: this._getPlacement(),\n modifiers: [{\n name: 'preventOverflow',\n options: {\n altBoundary: this._config.flip,\n boundary: this._config.boundary\n }\n },\n {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }]\n }\n\n // Disable Popper if we have a static display\n if (this._config.display === 'static') {\n defaultBsPopperConfig.modifiers = [{\n name: 'applyStyles',\n enabled: false\n }]\n }\n\n return {\n ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n }\n }\n\n // Static\n\n static dropdownInterface(element, config) {\n let data = Data.getData(element, DATA_KEY)\n const _config = typeof config === 'object' ? config : null\n\n if (!data) {\n data = new Dropdown(element, _config)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n }\n\n static jQueryInterface(config) {\n return this.each(function () {\n Dropdown.dropdownInterface(this, config)\n })\n }\n\n static clearMenus(event) {\n if (event && (event.button === RIGHT_MOUSE_BUTTON || (event.type === 'keyup' && event.key !== TAB_KEY))) {\n return\n }\n\n const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE)\n\n for (let i = 0, len = toggles.length; i < len; i++) {\n const context = Data.getData(toggles[i], DATA_KEY)\n const relatedTarget = {\n relatedTarget: toggles[i]\n }\n\n if (event && event.type === 'click') {\n relatedTarget.clickEvent = event\n }\n\n if (!context) {\n continue\n }\n\n const dropdownMenu = context._menu\n if (!toggles[i].classList.contains(CLASS_NAME_SHOW)) {\n continue\n }\n\n if (event && ((event.type === 'click' &&\n /input|textarea/i.test(event.target.tagName)) ||\n (event.type === 'keyup' && event.key === TAB_KEY)) &&\n dropdownMenu.contains(event.target)) {\n continue\n }\n\n const hideEvent = EventHandler.trigger(toggles[i], EVENT_HIDE, relatedTarget)\n if (hideEvent.defaultPrevented) {\n continue\n }\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children)\n .forEach(elem => EventHandler.off(elem, 'mouseover', null, noop()))\n }\n\n toggles[i].setAttribute('aria-expanded', 'false')\n\n if (context._popper) {\n context._popper.destroy()\n }\n\n dropdownMenu.classList.remove(CLASS_NAME_SHOW)\n toggles[i].classList.remove(CLASS_NAME_SHOW)\n Manipulator.removeDataAttribute(dropdownMenu, 'popper')\n EventHandler.trigger(toggles[i], EVENT_HIDDEN, relatedTarget)\n }\n }\n\n static getParentFromElement(element) {\n return getElementFromSelector(element) || element.parentNode\n }\n\n static dataApiKeydownHandler(event) {\n // If not input/textarea:\n // - And not a key in REGEXP_KEYDOWN => not a dropdown command\n // If input/textarea:\n // - If space key => not a dropdown command\n // - If key is other than escape\n // - If key is not up or down => not a dropdown command\n // - If trigger inside the menu => not a dropdown command\n if (/input|textarea/i.test(event.target.tagName) ?\n event.key === SPACE_KEY || (event.key !== ESCAPE_KEY &&\n ((event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY) ||\n event.target.closest(SELECTOR_MENU))) :\n !REGEXP_KEYDOWN.test(event.key)) {\n return\n }\n\n event.preventDefault()\n event.stopPropagation()\n\n if (this.disabled || this.classList.contains(CLASS_NAME_DISABLED)) {\n return\n }\n\n const parent = Dropdown.getParentFromElement(this)\n const isActive = this.classList.contains(CLASS_NAME_SHOW)\n\n if (event.key === ESCAPE_KEY) {\n const button = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0]\n button.focus()\n Dropdown.clearMenus()\n return\n }\n\n if (!isActive && (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY)) {\n const button = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0]\n button.click()\n return\n }\n\n if (!isActive || event.key === SPACE_KEY) {\n Dropdown.clearMenus()\n return\n }\n\n const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, parent).filter(isVisible)\n\n if (!items.length) {\n return\n }\n\n let index = items.indexOf(event.target)\n\n // Up\n if (event.key === ARROW_UP_KEY && index > 0) {\n index--\n }\n\n // Down\n if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {\n index++\n }\n\n // index is -1 if the first keydown is an ArrowUp\n index = index === -1 ? 0 : index\n\n items[index].focus()\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler)\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler)\nEventHandler.on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus)\nEventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus)\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n event.preventDefault()\n event.stopPropagation()\n Dropdown.dropdownInterface(this, 'toggle')\n})\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, e => e.stopPropagation())\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Dropdown to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(NAME, Dropdown)\n\nexport default Dropdown\n"],"names":["toType","obj","undefined","toString","call","match","toLowerCase","getSelector","element","selector","getAttribute","hrefAttr","includes","startsWith","split","trim","getElementFromSelector","document","querySelector","isElement","nodeType","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","TypeError","toUpperCase","isVisible","style","parentNode","elementStyle","getComputedStyle","parentNodeStyle","display","visibility","noop","getjQuery","window","jQuery","body","hasAttribute","onDOMContentLoaded","callback","readyState","addEventListener","isRTL","documentElement","dir","defineJQueryPlugin","name","plugin","$","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","NAME","DATA_KEY","EVENT_KEY","DATA_API_KEY","ESCAPE_KEY","SPACE_KEY","TAB_KEY","ARROW_UP_KEY","ARROW_DOWN_KEY","RIGHT_MOUSE_BUTTON","REGEXP_KEYDOWN","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","EVENT_CLICK","EVENT_CLICK_DATA_API","EVENT_KEYDOWN_DATA_API","EVENT_KEYUP_DATA_API","CLASS_NAME_DISABLED","CLASS_NAME_SHOW","CLASS_NAME_DROPUP","CLASS_NAME_DROPEND","CLASS_NAME_DROPSTART","CLASS_NAME_NAVBAR","SELECTOR_DATA_TOGGLE","SELECTOR_FORM_CHILD","SELECTOR_MENU","SELECTOR_NAVBAR_NAV","SELECTOR_VISIBLE_ITEMS","PLACEMENT_TOP","PLACEMENT_TOPEND","PLACEMENT_BOTTOM","PLACEMENT_BOTTOMEND","PLACEMENT_RIGHT","PLACEMENT_LEFT","Default","offset","flip","boundary","reference","popperConfig","DefaultType","Dropdown","_popper","_config","_getConfig","_menu","_getMenuElement","_inNavbar","_detectNavbar","_addEventListeners","toggle","_element","disabled","classList","contains","isActive","clearMenus","show","parent","getParentFromElement","relatedTarget","showEvent","EventHandler","trigger","defaultPrevented","Manipulator","setDataAttribute","Popper","referenceElement","jquery","_getPopperConfig","isDisplayStatic","modifiers","find","modifier","enabled","closest","concat","children","elem","on","focus","setAttribute","hide","hideEvent","destroy","removeDataAttribute","dispose","off","update","event","preventDefault","stopPropagation","constructor","getDataAttributes","getBoundingClientRect","SelectorEngine","next","_getPlacement","parentDropdown","isEnd","getPropertyValue","_getOffset","map","val","Number","parseInt","popperData","defaultBsPopperConfig","placement","options","altBoundary","dropdownInterface","data","Data","getData","each","button","type","key","toggles","i","len","length","context","clickEvent","dropdownMenu","target","tagName","remove","dataApiKeydownHandler","matches","prev","click","items","filter","index","indexOf","BaseComponent","e"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAOA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAAAC,GAAG,EAAI;EACpB,MAAIA,GAAG,KAAK,IAAR,IAAgBA,GAAG,KAAKC,SAA5B,EAAuC;EACrC,gBAAUD,GAAV;EACD;;EAED,SAAO,GAAGE,QAAH,CAAYC,IAAZ,CAAiBH,GAAjB,EAAsBI,KAAtB,CAA4B,aAA5B,EAA2C,CAA3C,EAA8CC,WAA9C,EAAP;EACD,CAND;;EAsBA,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAAAC,OAAO,EAAI;EAC7B,MAAIC,QAAQ,GAAGD,OAAO,CAACE,YAAR,CAAqB,gBAArB,CAAf;;EAEA,MAAI,CAACD,QAAD,IAAaA,QAAQ,KAAK,GAA9B,EAAmC;EACjC,QAAIE,QAAQ,GAAGH,OAAO,CAACE,YAAR,CAAqB,MAArB,CAAf,CADiC;EAIjC;EACA;EACA;;EACA,QAAI,CAACC,QAAD,IAAc,CAACA,QAAQ,CAACC,QAAT,CAAkB,GAAlB,CAAD,IAA2B,CAACD,QAAQ,CAACE,UAAT,CAAoB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ACkB,EAAb,CAAgBnI,QAAhB,EAA0BiE,oBAA1B,EAAgDS,oBAAhD,EAAsE,UAAUmE,KAAV,EAAiB;EACrFA,EAAAA,KAAK,CAACC,cAAN;EACAD,EAAAA,KAAK,CAACE,eAAN;EACAnD,EAAAA,QAAQ,CAACuE,iBAAT,CAA2B,IAA3B,EAAiC,QAAjC;EACD,CAJD;AAKAlD,kCAAY,CAACkB,EAAb,CAAgBnI,QAAhB,EAA0BiE,oBAA1B,EAAgDU,mBAAhD,EAAqE,UAAAmH,CAAC;EAAA,SAAIA,CAAC,CAAC/C,eAAF,EAAJ;EAAA,CAAtE;EAEA;EACA;EACA;EACA;EACA;EACA;;EAEAvG,kBAAkB,CAACS,IAAD,EAAO2C,QAAP,CAAlB;;;;;;;;"}
\ No newline at end of file diff --git a/js/dist/modal.js b/js/dist/modal.js index 1288722343..6f34c2b1c3 100644 --- a/js/dist/modal.js +++ b/js/dist/modal.js @@ -1,13 +1,13 @@ /*! - * Bootstrap modal.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap modal.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) : - typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); -}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); +}(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } @@ -15,10 +15,61 @@ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -37,7 +88,20 @@ var selector = element.getAttribute('data-bs-target'); if (!selector || selector === '#') { - var hrefAttr = element.getAttribute('href'); + var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes, + // so everything starting with `#` or `.`. If a "real" URL is used as the selector, + // `document.querySelector` will rightfully complain it is invalid. + // See https://github.com/twbs/bootstrap/issues/32273 + + if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) { + return null; + } // Just in case some CMS puts out a full URL with the anchor appended + + + if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) { + hrefAttr = '#' + hrefAttr.split('#')[1]; + } + selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null; } @@ -105,7 +169,7 @@ var valueType = value && isElement(value) ? 'element' : toType(value); if (!new RegExp(expectedTypes).test(valueType)) { - throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); + throw new TypeError(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); } }); }; @@ -149,57 +213,24 @@ var isRTL = document.documentElement.dir === 'rtl'; - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; - } - - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } - - var _proto = BaseComponent.prototype; - - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; } - }]); - - return BaseComponent; - }(); - - function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - - function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - - function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } + }); + }; - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -362,7 +393,7 @@ if (transition) { var transitionDuration = getTransitionDurationFromElement(this._element); - EventHandler__default['default'].one(this._element, TRANSITION_END, function (event) { + EventHandler__default['default'].one(this._element, 'transitionend', function (event) { return _this3._hideModal(event); }); emulateTransitionEnd(this._element, transitionDuration); @@ -455,7 +486,7 @@ if (transition) { var transitionDuration = getTransitionDurationFromElement(this._dialog); - EventHandler__default['default'].one(this._dialog, TRANSITION_END, transitionComplete); + EventHandler__default['default'].one(this._dialog, 'transitionend', transitionComplete); emulateTransitionEnd(this._dialog, transitionDuration); } else { transitionComplete(); @@ -577,7 +608,7 @@ } var backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop); - EventHandler__default['default'].one(this._backdrop, TRANSITION_END, callback); + EventHandler__default['default'].one(this._backdrop, 'transitionend', callback); emulateTransitionEnd(this._backdrop, backdropTransitionDuration); } else if (!this._isShown && this._backdrop) { this._backdrop.classList.remove(CLASS_NAME_SHOW); @@ -591,7 +622,7 @@ if (this._element.classList.contains(CLASS_NAME_FADE)) { var _backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop); - EventHandler__default['default'].one(this._backdrop, TRANSITION_END, callbackRemove); + EventHandler__default['default'].one(this._backdrop, 'transitionend', callbackRemove); emulateTransitionEnd(this._backdrop, _backdropTransitionDuration); } else { callbackRemove(); @@ -619,12 +650,12 @@ this._element.classList.add(CLASS_NAME_STATIC); var modalTransitionDuration = getTransitionDurationFromElement(this._dialog); - EventHandler__default['default'].off(this._element, TRANSITION_END); - EventHandler__default['default'].one(this._element, TRANSITION_END, function () { + EventHandler__default['default'].off(this._element, 'transitionend'); + EventHandler__default['default'].one(this._element, 'transitionend', function () { _this10._element.classList.remove(CLASS_NAME_STATIC); if (!isModalOverflowing) { - EventHandler__default['default'].one(_this10._element, TRANSITION_END, function () { + EventHandler__default['default'].one(_this10._element, 'transitionend', function () { _this10._element.style.overflowY = ''; }); emulateTransitionEnd(_this10._element, modalTransitionDuration); @@ -665,60 +696,50 @@ var _this11 = this; if (this._isBodyOverflowing) { - // Note: DOMNode.style.paddingRight returns the actual value or '' if not set - // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set - // Adjust fixed content padding - SelectorEngine__default['default'].find(SELECTOR_FIXED_CONTENT).forEach(function (element) { - var actualPadding = element.style.paddingRight; - var calculatedPadding = window.getComputedStyle(element)['padding-right']; - Manipulator__default['default'].setDataAttribute(element, 'padding-right', actualPadding); - element.style.paddingRight = Number.parseFloat(calculatedPadding) + _this11._scrollbarWidth + "px"; - }); // Adjust sticky content margin - - SelectorEngine__default['default'].find(SELECTOR_STICKY_CONTENT).forEach(function (element) { - var actualMargin = element.style.marginRight; - var calculatedMargin = window.getComputedStyle(element)['margin-right']; - Manipulator__default['default'].setDataAttribute(element, 'margin-right', actualMargin); - element.style.marginRight = Number.parseFloat(calculatedMargin) - _this11._scrollbarWidth + "px"; - }); // Adjust body padding - - var actualPadding = document.body.style.paddingRight; - var calculatedPadding = window.getComputedStyle(document.body)['padding-right']; - Manipulator__default['default'].setDataAttribute(document.body, 'padding-right', actualPadding); - document.body.style.paddingRight = Number.parseFloat(calculatedPadding) + this._scrollbarWidth + "px"; + this._setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', function (calculatedValue) { + return calculatedValue + _this11._scrollbarWidth; + }); + + this._setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', function (calculatedValue) { + return calculatedValue - _this11._scrollbarWidth; + }); + + this._setElementAttributes('body', 'paddingRight', function (calculatedValue) { + return calculatedValue + _this11._scrollbarWidth; + }); } document.body.classList.add(CLASS_NAME_OPEN); }; - _proto._resetScrollbar = function _resetScrollbar() { - // Restore fixed content padding - SelectorEngine__default['default'].find(SELECTOR_FIXED_CONTENT).forEach(function (element) { - var padding = Manipulator__default['default'].getDataAttribute(element, 'padding-right'); + _proto._setElementAttributes = function _setElementAttributes(selector, styleProp, callback) { + SelectorEngine__default['default'].find(selector).forEach(function (element) { + var actualValue = element.style[styleProp]; + var calculatedValue = window.getComputedStyle(element)[styleProp]; + Manipulator__default['default'].setDataAttribute(element, styleProp, actualValue); + element.style[styleProp] = callback(Number.parseFloat(calculatedValue)) + 'px'; + }); + }; - if (typeof padding !== 'undefined') { - Manipulator__default['default'].removeDataAttribute(element, 'padding-right'); - element.style.paddingRight = padding; - } - }); // Restore sticky content and navbar-toggler margin + _proto._resetScrollbar = function _resetScrollbar() { + this._resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight'); - SelectorEngine__default['default'].find("" + SELECTOR_STICKY_CONTENT).forEach(function (element) { - var margin = Manipulator__default['default'].getDataAttribute(element, 'margin-right'); + this._resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight'); - if (typeof margin !== 'undefined') { - Manipulator__default['default'].removeDataAttribute(element, 'margin-right'); - element.style.marginRight = margin; - } - }); // Restore body padding + this._resetElementAttributes('body', 'paddingRight'); + }; - var padding = Manipulator__default['default'].getDataAttribute(document.body, 'padding-right'); + _proto._resetElementAttributes = function _resetElementAttributes(selector, styleProp) { + SelectorEngine__default['default'].find(selector).forEach(function (element) { + var value = Manipulator__default['default'].getDataAttribute(element, styleProp); - if (typeof padding === 'undefined') { - document.body.style.paddingRight = ''; - } else { - Manipulator__default['default'].removeDataAttribute(document.body, 'padding-right'); - document.body.style.paddingRight = padding; - } + if (typeof value === 'undefined' && element === document.body) { + element.style[styleProp] = ''; + } else { + Manipulator__default['default'].removeDataAttribute(element, styleProp); + element.style[styleProp] = value; + } + }); }; _proto._getScrollbarWidth = function _getScrollbarWidth() { @@ -752,7 +773,7 @@ }); }; - _createClass$1(Modal, null, [{ + _createClass(Modal, null, [{ key: "Default", get: function get() { return Default; @@ -765,7 +786,7 @@ }]); return Modal; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -802,7 +823,7 @@ data = new Modal(target, config); } - data.show(this); + data.toggle(this); }); /** * ------------------------------------------------------------------------ @@ -811,21 +832,7 @@ * add .Modal to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Modal.jQueryInterface; - $.fn[NAME].Constructor = Modal; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Modal.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Modal); return Modal; diff --git a/js/dist/modal.js.map b/js/dist/modal.js.map index 3cf194ef3f..7401feb863 100644 --- a/js/dist/modal.js.map +++ b/js/dist/modal.js.map @@ -1 +1 @@ -{"version":3,"file":"modal.js","sources":["../src/util/index.js","../src/base-component.js","../src/modal.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n const hrefAttr = element.getAttribute('href')\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ?\n 'element' :\n toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`)\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nexport {\n TRANSITION_END,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst VERSION = '5.0.0-beta1'\n\nclass BaseComponent {\n constructor(element) {\n if (!element) {\n return\n }\n\n this._element = element\n Data.setData(element, this.constructor.DATA_KEY, this)\n }\n\n dispose() {\n Data.removeData(this._element, this.constructor.DATA_KEY)\n this._element = null\n }\n\n /** Static */\n\n static getInstance(element) {\n return Data.getData(element, this.DATA_KEY)\n }\n\n static get VERSION() {\n return VERSION\n }\n}\n\nexport default BaseComponent\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n getjQuery,\n onDOMContentLoaded,\n TRANSITION_END,\n emulateTransitionEnd,\n getElementFromSelector,\n getTransitionDurationFromElement,\n isVisible,\n isRTL,\n reflow,\n typeCheckConfig\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'modal'\nconst DATA_KEY = 'bs.modal'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst ESCAPE_KEY = 'Escape'\n\nconst Default = {\n backdrop: true,\n keyboard: true,\n focus: true\n}\n\nconst DefaultType = {\n backdrop: '(boolean|string)',\n keyboard: 'boolean',\n focus: 'boolean'\n}\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_FOCUSIN = `focusin${EVENT_KEY}`\nconst EVENT_RESIZE = `resize${EVENT_KEY}`\nconst EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`\nconst EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`\nconst EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY}`\nconst EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure'\nconst CLASS_NAME_BACKDROP = 'modal-backdrop'\nconst CLASS_NAME_OPEN = 'modal-open'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_STATIC = 'modal-static'\n\nconst SELECTOR_DIALOG = '.modal-dialog'\nconst SELECTOR_MODAL_BODY = '.modal-body'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"modal\"]'\nconst SELECTOR_DATA_DISMISS = '[data-bs-dismiss=\"modal\"]'\nconst SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'\nconst SELECTOR_STICKY_CONTENT = '.sticky-top'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Modal extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._config = this._getConfig(config)\n this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, element)\n this._backdrop = null\n this._isShown = false\n this._isBodyOverflowing = false\n this._ignoreBackdropClick = false\n this._isTransitioning = false\n this._scrollbarWidth = 0\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n // Public\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget)\n }\n\n show(relatedTarget) {\n if (this._isShown || this._isTransitioning) {\n return\n }\n\n if (this._element.classList.contains(CLASS_NAME_FADE)) {\n this._isTransitioning = true\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {\n relatedTarget\n })\n\n if (this._isShown || showEvent.defaultPrevented) {\n return\n }\n\n this._isShown = true\n\n this._checkScrollbar()\n this._setScrollbar()\n\n this._adjustDialog()\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, event => this.hide(event))\n\n EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {\n EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => {\n if (event.target === this._element) {\n this._ignoreBackdropClick = true\n }\n })\n })\n\n this._showBackdrop(() => this._showElement(relatedTarget))\n }\n\n hide(event) {\n if (event) {\n event.preventDefault()\n }\n\n if (!this._isShown || this._isTransitioning) {\n return\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n\n if (hideEvent.defaultPrevented) {\n return\n }\n\n this._isShown = false\n const transition = this._element.classList.contains(CLASS_NAME_FADE)\n\n if (transition) {\n this._isTransitioning = true\n }\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n EventHandler.off(document, EVENT_FOCUSIN)\n\n this._element.classList.remove(CLASS_NAME_SHOW)\n\n EventHandler.off(this._element, EVENT_CLICK_DISMISS)\n EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS)\n\n if (transition) {\n const transitionDuration = getTransitionDurationFromElement(this._element)\n\n EventHandler.one(this._element, TRANSITION_END, event => this._hideModal(event))\n emulateTransitionEnd(this._element, transitionDuration)\n } else {\n this._hideModal()\n }\n }\n\n dispose() {\n [window, this._element, this._dialog]\n .forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY))\n\n super.dispose()\n\n /**\n * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`\n * Do not move `document` in `htmlElements` array\n * It will remove `EVENT_CLICK_DATA_API` event that should remain\n */\n EventHandler.off(document, EVENT_FOCUSIN)\n\n this._config = null\n this._dialog = null\n this._backdrop = null\n this._isShown = null\n this._isBodyOverflowing = null\n this._ignoreBackdropClick = null\n this._isTransitioning = null\n this._scrollbarWidth = null\n }\n\n handleUpdate() {\n this._adjustDialog()\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _showElement(relatedTarget) {\n const transition = this._element.classList.contains(CLASS_NAME_FADE)\n const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog)\n\n if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {\n // Don't move modal's DOM position\n document.body.appendChild(this._element)\n }\n\n this._element.style.display = 'block'\n this._element.removeAttribute('aria-hidden')\n this._element.setAttribute('aria-modal', true)\n this._element.setAttribute('role', 'dialog')\n this._element.scrollTop = 0\n\n if (modalBody) {\n modalBody.scrollTop = 0\n }\n\n if (transition) {\n reflow(this._element)\n }\n\n this._element.classList.add(CLASS_NAME_SHOW)\n\n if (this._config.focus) {\n this._enforceFocus()\n }\n\n const transitionComplete = () => {\n if (this._config.focus) {\n this._element.focus()\n }\n\n this._isTransitioning = false\n EventHandler.trigger(this._element, EVENT_SHOWN, {\n relatedTarget\n })\n }\n\n if (transition) {\n const transitionDuration = getTransitionDurationFromElement(this._dialog)\n\n EventHandler.one(this._dialog, TRANSITION_END, transitionComplete)\n emulateTransitionEnd(this._dialog, transitionDuration)\n } else {\n transitionComplete()\n }\n }\n\n _enforceFocus() {\n EventHandler.off(document, EVENT_FOCUSIN) // guard against infinite focus loop\n EventHandler.on(document, EVENT_FOCUSIN, event => {\n if (document !== event.target &&\n this._element !== event.target &&\n !this._element.contains(event.target)) {\n this._element.focus()\n }\n })\n }\n\n _setEscapeEvent() {\n if (this._isShown) {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n if (this._config.keyboard && event.key === ESCAPE_KEY) {\n event.preventDefault()\n this.hide()\n } else if (!this._config.keyboard && event.key === ESCAPE_KEY) {\n this._triggerBackdropTransition()\n }\n })\n } else {\n EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS)\n }\n }\n\n _setResizeEvent() {\n if (this._isShown) {\n EventHandler.on(window, EVENT_RESIZE, () => this._adjustDialog())\n } else {\n EventHandler.off(window, EVENT_RESIZE)\n }\n }\n\n _hideModal() {\n this._element.style.display = 'none'\n this._element.setAttribute('aria-hidden', true)\n this._element.removeAttribute('aria-modal')\n this._element.removeAttribute('role')\n this._isTransitioning = false\n this._showBackdrop(() => {\n document.body.classList.remove(CLASS_NAME_OPEN)\n this._resetAdjustments()\n this._resetScrollbar()\n EventHandler.trigger(this._element, EVENT_HIDDEN)\n })\n }\n\n _removeBackdrop() {\n this._backdrop.parentNode.removeChild(this._backdrop)\n this._backdrop = null\n }\n\n _showBackdrop(callback) {\n const animate = this._element.classList.contains(CLASS_NAME_FADE) ?\n CLASS_NAME_FADE :\n ''\n\n if (this._isShown && this._config.backdrop) {\n this._backdrop = document.createElement('div')\n this._backdrop.className = CLASS_NAME_BACKDROP\n\n if (animate) {\n this._backdrop.classList.add(animate)\n }\n\n document.body.appendChild(this._backdrop)\n\n EventHandler.on(this._element, EVENT_CLICK_DISMISS, event => {\n if (this._ignoreBackdropClick) {\n this._ignoreBackdropClick = false\n return\n }\n\n if (event.target !== event.currentTarget) {\n return\n }\n\n if (this._config.backdrop === 'static') {\n this._triggerBackdropTransition()\n } else {\n this.hide()\n }\n })\n\n if (animate) {\n reflow(this._backdrop)\n }\n\n this._backdrop.classList.add(CLASS_NAME_SHOW)\n\n if (!animate) {\n callback()\n return\n }\n\n const backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop)\n\n EventHandler.one(this._backdrop, TRANSITION_END, callback)\n emulateTransitionEnd(this._backdrop, backdropTransitionDuration)\n } else if (!this._isShown && this._backdrop) {\n this._backdrop.classList.remove(CLASS_NAME_SHOW)\n\n const callbackRemove = () => {\n this._removeBackdrop()\n callback()\n }\n\n if (this._element.classList.contains(CLASS_NAME_FADE)) {\n const backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop)\n EventHandler.one(this._backdrop, TRANSITION_END, callbackRemove)\n emulateTransitionEnd(this._backdrop, backdropTransitionDuration)\n } else {\n callbackRemove()\n }\n } else {\n callback()\n }\n }\n\n _triggerBackdropTransition() {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)\n if (hideEvent.defaultPrevented) {\n return\n }\n\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight\n\n if (!isModalOverflowing) {\n this._element.style.overflowY = 'hidden'\n }\n\n this._element.classList.add(CLASS_NAME_STATIC)\n const modalTransitionDuration = getTransitionDurationFromElement(this._dialog)\n EventHandler.off(this._element, TRANSITION_END)\n EventHandler.one(this._element, TRANSITION_END, () => {\n this._element.classList.remove(CLASS_NAME_STATIC)\n if (!isModalOverflowing) {\n EventHandler.one(this._element, TRANSITION_END, () => {\n this._element.style.overflowY = ''\n })\n emulateTransitionEnd(this._element, modalTransitionDuration)\n }\n })\n emulateTransitionEnd(this._element, modalTransitionDuration)\n this._element.focus()\n }\n\n // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // ----------------------------------------------------------------------\n\n _adjustDialog() {\n const isModalOverflowing =\n this._element.scrollHeight > document.documentElement.clientHeight\n\n if ((!this._isBodyOverflowing && isModalOverflowing && !isRTL) || (this._isBodyOverflowing && !isModalOverflowing && isRTL)) {\n this._element.style.paddingLeft = `${this._scrollbarWidth}px`\n }\n\n if ((this._isBodyOverflowing && !isModalOverflowing && !isRTL) || (!this._isBodyOverflowing && isModalOverflowing && isRTL)) {\n this._element.style.paddingRight = `${this._scrollbarWidth}px`\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = ''\n this._element.style.paddingRight = ''\n }\n\n _checkScrollbar() {\n const rect = document.body.getBoundingClientRect()\n this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth\n this._scrollbarWidth = this._getScrollbarWidth()\n }\n\n _setScrollbar() {\n if (this._isBodyOverflowing) {\n // Note: DOMNode.style.paddingRight returns the actual value or '' if not set\n // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set\n\n // Adjust fixed content padding\n SelectorEngine.find(SELECTOR_FIXED_CONTENT)\n .forEach(element => {\n const actualPadding = element.style.paddingRight\n const calculatedPadding = window.getComputedStyle(element)['padding-right']\n Manipulator.setDataAttribute(element, 'padding-right', actualPadding)\n element.style.paddingRight = `${Number.parseFloat(calculatedPadding) + this._scrollbarWidth}px`\n })\n\n // Adjust sticky content margin\n SelectorEngine.find(SELECTOR_STICKY_CONTENT)\n .forEach(element => {\n const actualMargin = element.style.marginRight\n const calculatedMargin = window.getComputedStyle(element)['margin-right']\n Manipulator.setDataAttribute(element, 'margin-right', actualMargin)\n element.style.marginRight = `${Number.parseFloat(calculatedMargin) - this._scrollbarWidth}px`\n })\n\n // Adjust body padding\n const actualPadding = document.body.style.paddingRight\n const calculatedPadding = window.getComputedStyle(document.body)['padding-right']\n\n Manipulator.setDataAttribute(document.body, 'padding-right', actualPadding)\n document.body.style.paddingRight = `${Number.parseFloat(calculatedPadding) + this._scrollbarWidth}px`\n }\n\n document.body.classList.add(CLASS_NAME_OPEN)\n }\n\n _resetScrollbar() {\n // Restore fixed content padding\n SelectorEngine.find(SELECTOR_FIXED_CONTENT)\n .forEach(element => {\n const padding = Manipulator.getDataAttribute(element, 'padding-right')\n if (typeof padding !== 'undefined') {\n Manipulator.removeDataAttribute(element, 'padding-right')\n element.style.paddingRight = padding\n }\n })\n\n // Restore sticky content and navbar-toggler margin\n SelectorEngine.find(`${SELECTOR_STICKY_CONTENT}`)\n .forEach(element => {\n const margin = Manipulator.getDataAttribute(element, 'margin-right')\n if (typeof margin !== 'undefined') {\n Manipulator.removeDataAttribute(element, 'margin-right')\n element.style.marginRight = margin\n }\n })\n\n // Restore body padding\n const padding = Manipulator.getDataAttribute(document.body, 'padding-right')\n if (typeof padding === 'undefined') {\n document.body.style.paddingRight = ''\n } else {\n Manipulator.removeDataAttribute(document.body, 'padding-right')\n document.body.style.paddingRight = padding\n }\n }\n\n _getScrollbarWidth() { // thx d.walsh\n const scrollDiv = document.createElement('div')\n scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER\n document.body.appendChild(scrollDiv)\n const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth\n document.body.removeChild(scrollDiv)\n return scrollbarWidth\n }\n\n // Static\n\n static jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n let data = Data.getData(this, DATA_KEY)\n const _config = {\n ...Default,\n ...Manipulator.getDataAttributes(this),\n ...(typeof config === 'object' && config ? config : {})\n }\n\n if (!data) {\n data = new Modal(this, _config)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](relatedTarget)\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n const target = getElementFromSelector(this)\n\n if (this.tagName === 'A' || this.tagName === 'AREA') {\n event.preventDefault()\n }\n\n EventHandler.one(target, EVENT_SHOW, showEvent => {\n if (showEvent.defaultPrevented) {\n // only register focus restorer if modal will actually get shown\n return\n }\n\n EventHandler.one(target, EVENT_HIDDEN, () => {\n if (isVisible(this)) {\n this.focus()\n }\n })\n })\n\n let data = Data.getData(target, DATA_KEY)\n if (!data) {\n const config = {\n ...Manipulator.getDataAttributes(target),\n ...Manipulator.getDataAttributes(this)\n }\n\n data = new Modal(target, config)\n }\n\n data.show(this)\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Modal to jQuery only if jQuery is present\n */\n\nonDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n $.fn[NAME] = Modal.jQueryInterface\n $.fn[NAME].Constructor = Modal\n $.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Modal.jQueryInterface\n }\n }\n})\n\nexport default Modal\n"],"names":["MILLISECONDS_MULTIPLIER","TRANSITION_END","toType","obj","undefined","toString","call","match","toLowerCase","getSelector","element","selector","getAttribute","hrefAttr","trim","getElementFromSelector","document","querySelector","getTransitionDurationFromElement","window","getComputedStyle","transitionDuration","transitionDelay","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","split","triggerTransitionEnd","dispatchEvent","Event","isElement","nodeType","emulateTransitionEnd","duration","called","durationPadding","emulatedDuration","listener","removeEventListener","addEventListener","setTimeout","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","Error","toUpperCase","isVisible","style","parentNode","elementStyle","parentNodeStyle","display","visibility","reflow","offsetHeight","getjQuery","jQuery","body","hasAttribute","onDOMContentLoaded","callback","readyState","isRTL","documentElement","dir","VERSION","BaseComponent","_element","Data","setData","constructor","DATA_KEY","dispose","removeData","getInstance","getData","NAME","EVENT_KEY","DATA_API_KEY","ESCAPE_KEY","Default","backdrop","keyboard","focus","DefaultType","EVENT_HIDE","EVENT_HIDE_PREVENTED","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","EVENT_FOCUSIN","EVENT_RESIZE","EVENT_CLICK_DISMISS","EVENT_KEYDOWN_DISMISS","EVENT_MOUSEUP_DISMISS","EVENT_MOUSEDOWN_DISMISS","EVENT_CLICK_DATA_API","CLASS_NAME_SCROLLBAR_MEASURER","CLASS_NAME_BACKDROP","CLASS_NAME_OPEN","CLASS_NAME_FADE","CLASS_NAME_SHOW","CLASS_NAME_STATIC","SELECTOR_DIALOG","SELECTOR_MODAL_BODY","SELECTOR_DATA_TOGGLE","SELECTOR_DATA_DISMISS","SELECTOR_FIXED_CONTENT","SELECTOR_STICKY_CONTENT","Modal","_config","_getConfig","_dialog","SelectorEngine","findOne","_backdrop","_isShown","_isBodyOverflowing","_ignoreBackdropClick","_isTransitioning","_scrollbarWidth","toggle","relatedTarget","hide","show","classList","contains","showEvent","EventHandler","trigger","defaultPrevented","_checkScrollbar","_setScrollbar","_adjustDialog","_setEscapeEvent","_setResizeEvent","on","event","one","target","_showBackdrop","_showElement","preventDefault","hideEvent","transition","off","remove","_hideModal","htmlElement","handleUpdate","modalBody","Node","ELEMENT_NODE","appendChild","removeAttribute","setAttribute","scrollTop","add","_enforceFocus","transitionComplete","key","_triggerBackdropTransition","_resetAdjustments","_resetScrollbar","_removeBackdrop","removeChild","animate","createElement","className","currentTarget","backdropTransitionDuration","callbackRemove","isModalOverflowing","scrollHeight","clientHeight","overflowY","modalTransitionDuration","paddingLeft","paddingRight","rect","getBoundingClientRect","Math","round","left","right","innerWidth","_getScrollbarWidth","find","actualPadding","calculatedPadding","Manipulator","setDataAttribute","actualMargin","marginRight","calculatedMargin","padding","getDataAttribute","removeDataAttribute","margin","scrollDiv","scrollbarWidth","width","clientWidth","jQueryInterface","each","data","getDataAttributes","Typ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EAAO;EACL,QAAMC,kBAAkB,GAAGD,CAAC,CAACE,EAAF,CAAKvI,IAAL,CAA3B;EACAqI,IAAAA,CAAC,CAACE,EAAF,CAAKvI,IAAL,IAAaiC,KAAK,CAAC8F,eAAnB;EACAM,IAAAA,CAAC,CAACE,EAAF,CAAKvI,IAAL,EAAWwI,WAAX,GAAyBvG,KAAzB;;EACAoG,IAAAA,CAAC,CAACE,EAAF,CAAKvI,IAAL,EAAWyI,UAAX,GAAwB,YAAM;EAC5BJ,MAAAA,CAAC,CAACE,EAAF,CAAKvI,IAAL,IAAasI,kBAAb;EACA,aAAOrG,KAAK,CAAC8F,eAAb;EACD,KAHD;EAID;EACF,CAZiB,CAAlB;;;;;;;;"}
\ No newline at end of file +{"version":3,"file":"modal.js","sources":["../src/util/index.js","../src/modal.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = '#' + hrefAttr.split('#')[1]\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = (name, plugin) => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nexport {\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n emulateTransitionEnd,\n getElementFromSelector,\n getTransitionDurationFromElement,\n isVisible,\n isRTL,\n reflow,\n typeCheckConfig\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'modal'\nconst DATA_KEY = 'bs.modal'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst ESCAPE_KEY = 'Escape'\n\nconst Default = {\n backdrop: true,\n keyboard: true,\n focus: true\n}\n\nconst DefaultType = {\n backdrop: '(boolean|string)',\n keyboard: 'boolean',\n focus: 'boolean'\n}\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_FOCUSIN = `focusin${EVENT_KEY}`\nconst EVENT_RESIZE = `resize${EVENT_KEY}`\nconst EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`\nconst EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`\nconst EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY}`\nconst EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure'\nconst CLASS_NAME_BACKDROP = 'modal-backdrop'\nconst CLASS_NAME_OPEN = 'modal-open'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_STATIC = 'modal-static'\n\nconst SELECTOR_DIALOG = '.modal-dialog'\nconst SELECTOR_MODAL_BODY = '.modal-body'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"modal\"]'\nconst SELECTOR_DATA_DISMISS = '[data-bs-dismiss=\"modal\"]'\nconst SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'\nconst SELECTOR_STICKY_CONTENT = '.sticky-top'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Modal extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._config = this._getConfig(config)\n this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, element)\n this._backdrop = null\n this._isShown = false\n this._isBodyOverflowing = false\n this._ignoreBackdropClick = false\n this._isTransitioning = false\n this._scrollbarWidth = 0\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n // Public\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget)\n }\n\n show(relatedTarget) {\n if (this._isShown || this._isTransitioning) {\n return\n }\n\n if (this._element.classList.contains(CLASS_NAME_FADE)) {\n this._isTransitioning = true\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {\n relatedTarget\n })\n\n if (this._isShown || showEvent.defaultPrevented) {\n return\n }\n\n this._isShown = true\n\n this._checkScrollbar()\n this._setScrollbar()\n\n this._adjustDialog()\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, event => this.hide(event))\n\n EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {\n EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => {\n if (event.target === this._element) {\n this._ignoreBackdropClick = true\n }\n })\n })\n\n this._showBackdrop(() => this._showElement(relatedTarget))\n }\n\n hide(event) {\n if (event) {\n event.preventDefault()\n }\n\n if (!this._isShown || this._isTransitioning) {\n return\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n\n if (hideEvent.defaultPrevented) {\n return\n }\n\n this._isShown = false\n const transition = this._element.classList.contains(CLASS_NAME_FADE)\n\n if (transition) {\n this._isTransitioning = true\n }\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n EventHandler.off(document, EVENT_FOCUSIN)\n\n this._element.classList.remove(CLASS_NAME_SHOW)\n\n EventHandler.off(this._element, EVENT_CLICK_DISMISS)\n EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS)\n\n if (transition) {\n const transitionDuration = getTransitionDurationFromElement(this._element)\n\n EventHandler.one(this._element, 'transitionend', event => this._hideModal(event))\n emulateTransitionEnd(this._element, transitionDuration)\n } else {\n this._hideModal()\n }\n }\n\n dispose() {\n [window, this._element, this._dialog]\n .forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY))\n\n super.dispose()\n\n /**\n * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`\n * Do not move `document` in `htmlElements` array\n * It will remove `EVENT_CLICK_DATA_API` event that should remain\n */\n EventHandler.off(document, EVENT_FOCUSIN)\n\n this._config = null\n this._dialog = null\n this._backdrop = null\n this._isShown = null\n this._isBodyOverflowing = null\n this._ignoreBackdropClick = null\n this._isTransitioning = null\n this._scrollbarWidth = null\n }\n\n handleUpdate() {\n this._adjustDialog()\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _showElement(relatedTarget) {\n const transition = this._element.classList.contains(CLASS_NAME_FADE)\n const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog)\n\n if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {\n // Don't move modal's DOM position\n document.body.appendChild(this._element)\n }\n\n this._element.style.display = 'block'\n this._element.removeAttribute('aria-hidden')\n this._element.setAttribute('aria-modal', true)\n this._element.setAttribute('role', 'dialog')\n this._element.scrollTop = 0\n\n if (modalBody) {\n modalBody.scrollTop = 0\n }\n\n if (transition) {\n reflow(this._element)\n }\n\n this._element.classList.add(CLASS_NAME_SHOW)\n\n if (this._config.focus) {\n this._enforceFocus()\n }\n\n const transitionComplete = () => {\n if (this._config.focus) {\n this._element.focus()\n }\n\n this._isTransitioning = false\n EventHandler.trigger(this._element, EVENT_SHOWN, {\n relatedTarget\n })\n }\n\n if (transition) {\n const transitionDuration = getTransitionDurationFromElement(this._dialog)\n\n EventHandler.one(this._dialog, 'transitionend', transitionComplete)\n emulateTransitionEnd(this._dialog, transitionDuration)\n } else {\n transitionComplete()\n }\n }\n\n _enforceFocus() {\n EventHandler.off(document, EVENT_FOCUSIN) // guard against infinite focus loop\n EventHandler.on(document, EVENT_FOCUSIN, event => {\n if (document !== event.target &&\n this._element !== event.target &&\n !this._element.contains(event.target)) {\n this._element.focus()\n }\n })\n }\n\n _setEscapeEvent() {\n if (this._isShown) {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n if (this._config.keyboard && event.key === ESCAPE_KEY) {\n event.preventDefault()\n this.hide()\n } else if (!this._config.keyboard && event.key === ESCAPE_KEY) {\n this._triggerBackdropTransition()\n }\n })\n } else {\n EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS)\n }\n }\n\n _setResizeEvent() {\n if (this._isShown) {\n EventHandler.on(window, EVENT_RESIZE, () => this._adjustDialog())\n } else {\n EventHandler.off(window, EVENT_RESIZE)\n }\n }\n\n _hideModal() {\n this._element.style.display = 'none'\n this._element.setAttribute('aria-hidden', true)\n this._element.removeAttribute('aria-modal')\n this._element.removeAttribute('role')\n this._isTransitioning = false\n this._showBackdrop(() => {\n document.body.classList.remove(CLASS_NAME_OPEN)\n this._resetAdjustments()\n this._resetScrollbar()\n EventHandler.trigger(this._element, EVENT_HIDDEN)\n })\n }\n\n _removeBackdrop() {\n this._backdrop.parentNode.removeChild(this._backdrop)\n this._backdrop = null\n }\n\n _showBackdrop(callback) {\n const animate = this._element.classList.contains(CLASS_NAME_FADE) ?\n CLASS_NAME_FADE :\n ''\n\n if (this._isShown && this._config.backdrop) {\n this._backdrop = document.createElement('div')\n this._backdrop.className = CLASS_NAME_BACKDROP\n\n if (animate) {\n this._backdrop.classList.add(animate)\n }\n\n document.body.appendChild(this._backdrop)\n\n EventHandler.on(this._element, EVENT_CLICK_DISMISS, event => {\n if (this._ignoreBackdropClick) {\n this._ignoreBackdropClick = false\n return\n }\n\n if (event.target !== event.currentTarget) {\n return\n }\n\n if (this._config.backdrop === 'static') {\n this._triggerBackdropTransition()\n } else {\n this.hide()\n }\n })\n\n if (animate) {\n reflow(this._backdrop)\n }\n\n this._backdrop.classList.add(CLASS_NAME_SHOW)\n\n if (!animate) {\n callback()\n return\n }\n\n const backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop)\n\n EventHandler.one(this._backdrop, 'transitionend', callback)\n emulateTransitionEnd(this._backdrop, backdropTransitionDuration)\n } else if (!this._isShown && this._backdrop) {\n this._backdrop.classList.remove(CLASS_NAME_SHOW)\n\n const callbackRemove = () => {\n this._removeBackdrop()\n callback()\n }\n\n if (this._element.classList.contains(CLASS_NAME_FADE)) {\n const backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop)\n EventHandler.one(this._backdrop, 'transitionend', callbackRemove)\n emulateTransitionEnd(this._backdrop, backdropTransitionDuration)\n } else {\n callbackRemove()\n }\n } else {\n callback()\n }\n }\n\n _triggerBackdropTransition() {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)\n if (hideEvent.defaultPrevented) {\n return\n }\n\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight\n\n if (!isModalOverflowing) {\n this._element.style.overflowY = 'hidden'\n }\n\n this._element.classList.add(CLASS_NAME_STATIC)\n const modalTransitionDuration = getTransitionDurationFromElement(this._dialog)\n EventHandler.off(this._element, 'transitionend')\n EventHandler.one(this._element, 'transitionend', () => {\n this._element.classList.remove(CLASS_NAME_STATIC)\n if (!isModalOverflowing) {\n EventHandler.one(this._element, 'transitionend', () => {\n this._element.style.overflowY = ''\n })\n emulateTransitionEnd(this._element, modalTransitionDuration)\n }\n })\n emulateTransitionEnd(this._element, modalTransitionDuration)\n this._element.focus()\n }\n\n // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // ----------------------------------------------------------------------\n\n _adjustDialog() {\n const isModalOverflowing =\n this._element.scrollHeight > document.documentElement.clientHeight\n\n if ((!this._isBodyOverflowing && isModalOverflowing && !isRTL) || (this._isBodyOverflowing && !isModalOverflowing && isRTL)) {\n this._element.style.paddingLeft = `${this._scrollbarWidth}px`\n }\n\n if ((this._isBodyOverflowing && !isModalOverflowing && !isRTL) || (!this._isBodyOverflowing && isModalOverflowing && isRTL)) {\n this._element.style.paddingRight = `${this._scrollbarWidth}px`\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = ''\n this._element.style.paddingRight = ''\n }\n\n _checkScrollbar() {\n const rect = document.body.getBoundingClientRect()\n this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth\n this._scrollbarWidth = this._getScrollbarWidth()\n }\n\n _setScrollbar() {\n if (this._isBodyOverflowing) {\n this._setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + this._scrollbarWidth)\n this._setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - this._scrollbarWidth)\n this._setElementAttributes('body', 'paddingRight', calculatedValue => calculatedValue + this._scrollbarWidth)\n }\n\n document.body.classList.add(CLASS_NAME_OPEN)\n }\n\n _setElementAttributes(selector, styleProp, callback) {\n SelectorEngine.find(selector)\n .forEach(element => {\n const actualValue = element.style[styleProp]\n const calculatedValue = window.getComputedStyle(element)[styleProp]\n Manipulator.setDataAttribute(element, styleProp, actualValue)\n element.style[styleProp] = callback(Number.parseFloat(calculatedValue)) + 'px'\n })\n }\n\n _resetScrollbar() {\n this._resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight')\n this._resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight')\n this._resetElementAttributes('body', 'paddingRight')\n }\n\n _resetElementAttributes(selector, styleProp) {\n SelectorEngine.find(selector).forEach(element => {\n const value = Manipulator.getDataAttribute(element, styleProp)\n if (typeof value === 'undefined' && element === document.body) {\n element.style[styleProp] = ''\n } else {\n Manipulator.removeDataAttribute(element, styleProp)\n element.style[styleProp] = value\n }\n })\n }\n\n _getScrollbarWidth() { // thx d.walsh\n const scrollDiv = document.createElement('div')\n scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER\n document.body.appendChild(scrollDiv)\n const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth\n document.body.removeChild(scrollDiv)\n return scrollbarWidth\n }\n\n // Static\n\n static jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n let data = Data.getData(this, DATA_KEY)\n const _config = {\n ...Default,\n ...Manipulator.getDataAttributes(this),\n ...(typeof config === 'object' && config ? config : {})\n }\n\n if (!data) {\n data = new Modal(this, _config)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](relatedTarget)\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n const target = getElementFromSelector(this)\n\n if (this.tagName === 'A' || this.tagName === 'AREA') {\n event.preventDefault()\n }\n\n EventHandler.one(target, EVENT_SHOW, showEvent => {\n if (showEvent.defaultPrevented) {\n // only register focus restorer if modal will actually get shown\n return\n }\n\n EventHandler.one(target, EVENT_HIDDEN, () => {\n if (isVisible(this)) {\n this.focus()\n }\n })\n })\n\n let data = Data.getData(target, DATA_KEY)\n if (!data) {\n const config = {\n ...Manipulator.getDataAttributes(target),\n ...Manipulator.getDataAttributes(this)\n }\n\n data = new Modal(target, config)\n }\n\n data.toggle(this)\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Modal to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(NAME, Modal)\n\nexport default Modal\n"],"names":["MILLISECONDS_MULTIPLIER","TRANSITION_END","toType","obj","undefined","toString","call","match","toLowerCase","getSelector","element","selector","getAttribute","hrefAttr","includes","startsWith","split","trim","getElementFromSelector","document","querySelector","getTransitionDurationFromElement","window","getComputedStyle","transitionDuration","transitionDelay","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","triggerTransitionEnd","dispatchEvent","Event","isElement","nodeType","emulateTransitionEnd","duration","called","durationPadding","emulatedDuration","listener","removeEventListener","addEventListener","setTimeout","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","TypeError","toUpperCase","isVisible","style","parentNode","elementStyle","parentNodeStyle","display","visibility","reflow","offsetHeight","getjQuery","jQuery","body","hasAttribute","onDOMContentLoaded","callback","readyState","isRTL","documentElement","dir","defineJQueryPlugin","name","plugin","$","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","NAME","DATA_KEY","EVENT_KEY","DATA_API_KEY","ESCAPE_KEY","Default","backdrop","keyboard","focus","DefaultType","EVENT_HIDE","EVENT_HIDE_PREVENTED","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","EVENT_FOCUSIN","EVENT_RESIZE","EVENT_CLICK_DISMISS","EVENT_KEYDOWN_DISMISS","EVENT_MOUSEUP_DISMISS","EVENT_MOUSEDOWN_DISMISS","EVENT_CLICK_DATA_API","CLASS_NAME_SCROLLBAR_MEASURER","CLASS_NAME_BACKDROP","CLASS_NAME_OPEN","CLASS_NAME_FADE","CLASS_NAME_SHOW","CLASS_NAME_STATIC","SELECTOR_DIALOG","SELECTOR_MODAL_BODY","SELECTOR_DATA_TOGGLE","SELECTOR_DATA_DISMISS","SELECTOR_FIXED_CONTENT","SELECTOR_STICKY_CONTENT","Modal","_config","_getConfig","_dialog","SelectorEngine","findOne","_backdrop","_isShown","_isBodyOverflowing","_ignoreBackdropClick","_isTransitioning","_scrollbarWidth","toggle","relatedTarget","hide","show","_element","classList","contains","showEvent","EventHandler","trigger","defaultPrevented","_checkScrollbar","_setScrollbar","_adjustDialog","_setEscapeEvent","_setResizeEvent","on","event","one","target","_showBackdrop","_showElement","preventDefault","hideEvent","transition","off","remove","_hideModal","dispose","htmlElement","handleUpdate","modalBody","Node","ELEMENT_NODE","appendChild","removeAttribute","setAttribute","scrollTop","add","_enforceFocus","transitionComplete","key","_triggerBackdropTransition","_resetAdjustments","_resetScrollbar","_removeBackdrop","removeChild","animate","createElement","className","currentTarget","backdropTransitionDuration","callbackRemove","isModalOverflowing","scrollHeight","clientHeight","overflowY","modalTransitionDuration","paddingLeft","paddingRight","rect","getBoundingClientRect","Math","round","left","right","innerWidth","_getScrollbarWidth","_setElementAttributes","calculatedValue","styleProp","find","actualValue","Manipulator","setDataAttribute","_resetElementAttributes","getDataAttribute","removeDataAttribute","scrollDiv","scrollbarWidth","width","clientWidth","each","data","Data","getData","getDataAttributes","BaseComponent","tagName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAGA,IAAMA,uBAAuB,GAAG,IAAhC;EACA,IAAMC,cAAc,GAAG,eAAvB;;EAGA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAAAC,GAAG,EAAI;EACpB,MAAIA,GAAG,KAAK,IAAR,IAAgBA,GAAG,KAAKC,SAA5B,EAAuC;EACrC,gBAAU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AM1K,MAAM,gBACPgK,+BAAW,CAACa,iBAAZ,CAA8BnE,MAA9B,CADO,EAEPsD,+BAAW,CAACa,iBAAZ,CAA8B,IAA9B,CAFO,CAAZ;;EAKAH,IAAAA,IAAI,GAAG,IAAI/F,KAAJ,CAAU+B,MAAV,EAAkB1G,MAAlB,CAAP;EACD;;EAED0K,EAAAA,IAAI,CAACnF,MAAL,CAAY,IAAZ;EACD,CA/BD;EAiCA;EACA;EACA;EACA;EACA;EACA;;EAEAvD,kBAAkB,CAACS,IAAD,EAAOkC,KAAP,CAAlB;;;;;;;;"}
\ No newline at end of file diff --git a/js/dist/popover.js b/js/dist/popover.js index 82e4d27bfb..dda521d5e6 100644 --- a/js/dist/popover.js +++ b/js/dist/popover.js @@ -1,6 +1,6 @@ /*! - * Bootstrap popover.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap popover.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { @@ -15,9 +15,59 @@ var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip); + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } + /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -41,15 +91,26 @@ } }; - var isRTL = document.documentElement.dir === 'rtl'; + document.documentElement.dir === 'rtl'; - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; + } + }); + }; - function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /** * ------------------------------------------------------------------------ * Constants @@ -64,6 +125,7 @@ var Default = _extends({}, Tooltip__default['default'].Default, { placement: 'right', + offset: [0, 8], trigger: 'click', content: '', template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>' @@ -174,8 +236,8 @@ _createClass(Popover, null, [{ key: "Default", - // Getters - get: function get() { + get: // Getters + function get() { return Default; } }, { @@ -215,21 +277,7 @@ */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Popover.jQueryInterface; - $.fn[NAME].Constructor = Popover; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Popover.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Popover); return Popover; diff --git a/js/dist/popover.js.map b/js/dist/popover.js.map index d0600944ab..1894cb0438 100644 --- a/js/dist/popover.js.map +++ b/js/dist/popover.js.map @@ -1 +1 @@ -{"version":3,"file":"popover.js","sources":["../src/util/index.js","../src/popover.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n const hrefAttr = element.getAttribute('href')\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ?\n 'element' :\n toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`)\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nexport {\n TRANSITION_END,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { getjQuery, onDOMContentLoaded } from './util/index'\nimport Data from './dom/data'\nimport SelectorEngine from './dom/selector-engine'\nimport Tooltip from './tooltip'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'popover'\nconst DATA_KEY = 'bs.popover'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst CLASS_PREFIX = 'bs-popover'\nconst BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\n\nconst Default = {\n ...Tooltip.Default,\n placement: 'right',\n trigger: 'click',\n content: '',\n template: '<div class=\"popover\" role=\"tooltip\">' +\n '<div class=\"popover-arrow\"></div>' +\n '<h3 class=\"popover-header\"></h3>' +\n '<div class=\"popover-body\"></div>' +\n '</div>'\n}\n\nconst DefaultType = {\n ...Tooltip.DefaultType,\n content: '(string|element|function)'\n}\n\nconst Event = {\n HIDE: `hide${EVENT_KEY}`,\n HIDDEN: `hidden${EVENT_KEY}`,\n SHOW: `show${EVENT_KEY}`,\n SHOWN: `shown${EVENT_KEY}`,\n INSERTED: `inserted${EVENT_KEY}`,\n CLICK: `click${EVENT_KEY}`,\n FOCUSIN: `focusin${EVENT_KEY}`,\n FOCUSOUT: `focusout${EVENT_KEY}`,\n MOUSEENTER: `mouseenter${EVENT_KEY}`,\n MOUSELEAVE: `mouseleave${EVENT_KEY}`\n}\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\nconst SELECTOR_TITLE = '.popover-header'\nconst SELECTOR_CONTENT = '.popover-body'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Popover extends Tooltip {\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Overrides\n\n isWithContent() {\n return this.getTitle() || this._getContent()\n }\n\n setContent() {\n const tip = this.getTipElement()\n\n // we use append for html objects to maintain js events\n this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle())\n let content = this._getContent()\n if (typeof content === 'function') {\n content = content.call(this._element)\n }\n\n this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content)\n\n tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)\n }\n\n // Private\n\n _addAttachmentClass(attachment) {\n this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`)\n }\n\n _getContent() {\n return this._element.getAttribute('data-bs-content') || this.config.content\n }\n\n _cleanTipClass() {\n const tip = this.getTipElement()\n const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX)\n if (tabClass !== null && tabClass.length > 0) {\n tabClass.map(token => token.trim())\n .forEach(tClass => tip.classList.remove(tClass))\n }\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.getData(this, DATA_KEY)\n const _config = typeof config === 'object' ? config : null\n\n if (!data && /dispose|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Popover(this, _config)\n Data.setData(this, DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Popover to jQuery only if jQuery is present\n */\n\nonDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n $.fn[NAME] = Popover.jQueryInterface\n $.fn[NAME].Constructor = Popover\n $.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Popover.jQueryInterface\n }\n }\n})\n\nexport default Popover\n"],"names":["getjQuery","window","jQuery","document","body","hasAttribute","onDOMContentLoaded","callback","readyState","addEventListener","isRTL","documentElement","dir","NAME","DATA_KEY","EVENT_KEY","CLASS_PREFIX","BSCLS_PREFIX_REGEX","RegExp","Default","Tooltip","placement","trigger","content","template","DefaultType","Event","HIDE","HIDDEN","SHOW","SHOWN","INSERTED","CLICK","FOCUSIN","FOCUSOUT","MOUSEENTER","MOUSELEAVE","CLASS_NAME_FADE","CLASS_NAME_SHOW","SELECTOR_TITLE","SELECTOR_CONTENT","Popover","isWithContent","getTitle","_getContent","setContent","tip","getTipElement","setElementContent","SelectorEngine","findOne","call","_element","classList","remove","_addAttachmentClass","attachment","add","updateAttachment","getAttribute","config","_cleanTipClass","tabClass","match","length","map","token","trim","forEach","tClass","jQueryInterface","each","data","Data","getData","_config","test","setData","TypeError","$","JQUERY_NO_CONFLICT","fn","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAqKA,IAAMA,SAAS,GAAG,SAAZA,SAAY,GAAM;EAAA,gBACHC,MADG;EAAA,MACdC,MADc,WACdA,MADc;;EAGtB,MAAIA,MAAM,IAAI,CAACC,QAAQ,CAACC,IAAT,CAAcC,YAAd,CAA2B,mBAA3B,CAAf,EAAgE;EAC9D,WAAOH,MAAP;EACD;;EAED,SAAO,IAAP;EACD,CARD;;EAUA,IAAMI,kBAAkB,GAAG,SAArBA,kBAAqB,CAAAC,QAAQ,EAAI;EACrC,MAAIJ,QAAQ,CAACK,UAAT,KAAwB,SAA5B,EAAuC;EACrCL,IAAAA,QAAQ,CAACM,gBAAT,CAA0B,kBAA1B,EAA8CF,QAA9C;EACD,GAFD,MAEO;EACLA,IAAAA,QAAQ;EACT;EACF,CAND;;EAQA,IAAMG,KAAK,GAAGP,QAAQ,CAACQ,eAAT,CAAyBC,GAAzB,KAAiC,KAA/C;;;;;;;;;EChLA;EACA;EACA;EACA;EACA;;EAEA,IAAMC,IAAI,GAAG,SAAb;EACA,IAAMC,QAAQ,GAAG,YAAjB;EACA,IAAMC,SAAS,SAAOD,QAAtB;EACA,IAAME,YAAY,GAAG,YAArB;EACA,IAAMC,kBAAkB,GAAG,IAAIC,MAAJ,aAAqBF,YAArB,WAAyC,GAAzC,CAA3B;;EAEA,IAAMG,OAAO,gBACRC,2BAAO,CAACD,OADA;EAEXE,EA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aAAOvC,OAAO,CAAC6B,eAAf;EACD,KAHD;EAID;EACF,CAZiB,CAAlB;;;;;;;;"}
\ No newline at end of file +{"version":3,"file":"popover.js","sources":["../src/util/index.js","../src/popover.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = '#' + hrefAttr.split('#')[1]\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = (name, plugin) => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nexport {\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { defineJQueryPlugin } from './util/index'\nimport Data from './dom/data'\nimport SelectorEngine from './dom/selector-engine'\nimport Tooltip from './tooltip'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'popover'\nconst DATA_KEY = 'bs.popover'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst CLASS_PREFIX = 'bs-popover'\nconst BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\n\nconst Default = {\n ...Tooltip.Default,\n placement: 'right',\n offset: [0, 8],\n trigger: 'click',\n content: '',\n template: '<div class=\"popover\" role=\"tooltip\">' +\n '<div class=\"popover-arrow\"></div>' +\n '<h3 class=\"popover-header\"></h3>' +\n '<div class=\"popover-body\"></div>' +\n '</div>'\n}\n\nconst DefaultType = {\n ...Tooltip.DefaultType,\n content: '(string|element|function)'\n}\n\nconst Event = {\n HIDE: `hide${EVENT_KEY}`,\n HIDDEN: `hidden${EVENT_KEY}`,\n SHOW: `show${EVENT_KEY}`,\n SHOWN: `shown${EVENT_KEY}`,\n INSERTED: `inserted${EVENT_KEY}`,\n CLICK: `click${EVENT_KEY}`,\n FOCUSIN: `focusin${EVENT_KEY}`,\n FOCUSOUT: `focusout${EVENT_KEY}`,\n MOUSEENTER: `mouseenter${EVENT_KEY}`,\n MOUSELEAVE: `mouseleave${EVENT_KEY}`\n}\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\nconst SELECTOR_TITLE = '.popover-header'\nconst SELECTOR_CONTENT = '.popover-body'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Popover extends Tooltip {\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Overrides\n\n isWithContent() {\n return this.getTitle() || this._getContent()\n }\n\n setContent() {\n const tip = this.getTipElement()\n\n // we use append for html objects to maintain js events\n this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle())\n let content = this._getContent()\n if (typeof content === 'function') {\n content = content.call(this._element)\n }\n\n this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content)\n\n tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)\n }\n\n // Private\n\n _addAttachmentClass(attachment) {\n this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`)\n }\n\n _getContent() {\n return this._element.getAttribute('data-bs-content') || this.config.content\n }\n\n _cleanTipClass() {\n const tip = this.getTipElement()\n const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX)\n if (tabClass !== null && tabClass.length > 0) {\n tabClass.map(token => token.trim())\n .forEach(tClass => tip.classList.remove(tClass))\n }\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.getData(this, DATA_KEY)\n const _config = typeof config === 'object' ? config : null\n\n if (!data && /dispose|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Popover(this, _config)\n Data.setData(this, DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Popover to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(NAME, Popover)\n\nexport default Popover\n"],"names":["getjQuery","window","jQuery","document","body","hasAttribute","onDOMContentLoaded","callback","readyState","addEventListener","documentElement","dir","defineJQueryPlugin","name","plugin","$","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","NAME","DATA_KEY","EVENT_KEY","CLASS_PREFIX","BSCLS_PREFIX_REGEX","RegExp","Default","Tooltip","placement","offset","trigger","content","template","DefaultType","Event","HIDE","HIDDEN","SHOW","SHOWN","INSERTED","CLICK","FOCUSIN","FOCUSOUT","MOUSEENTER","MOUSELEAVE","CLASS_NAME_FADE","CLASS_NAME_SHOW","SELECTOR_TITLE","SELECTOR_CONTENT","Popover","isWithContent","getTitle","_getContent","setContent","tip","getTipElement","setElementContent","SelectorEngine","findOne","call","_element","classList","remove","_addAttachmentClass","attachment","add","updateAttachment","getAttribute","config","_cleanTipClass","tabClass","match","length","map","token","trim","forEach","tClass","each","data","Data","getData","_config","test","setData","TypeError"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAiLA,IAAMA,SAAS,GAAG,SAAZA,SAAY,GAAM;EAAA,gBACHC,MADG;EAAA,MACdC,MADc,WACdA,MADc;;EAGtB,MAAIA,MAAM,IAAI,CAACC,QAAQ,CAACC,IAAT,CAAcC,YAAd,CAA2B,mBAA3B,CAAf,EAAgE;EAC9D,WAAOH,MAAP;EACD;;EAED,SAAO,IAAP;EACD,CARD;;EAUA,IAAMI,kBAAkB,GAAG,SAArBA,kBAAqB,CAAAC,QAAQ,EAAI;EACrC,MAAIJ,QAAQ,CAACK,UAAT,KAAwB,SAA5B,EAAuC;EACrCL,IAAAA,QAAQ,CAACM,gBAAT,CAA0B,kBAA1B,EAA8CF,QAA9C;EACD,GAFD,MAEO;EACLA,IAAAA,QAAQ;EACT;EACF,CAND;;EAQcJ,QAAQ,CAACO,eAAT,CAAyBC,GAAzB,KAAiC;;EAE/C,IAAMC,kBAAkB,GAAG,SAArBA,kBAAqB,CAACC,IAAD,EAAOC,MAAP,EAAkB;EAC3CR,EAAAA,kBAAkB,CAAC,YAAM;EACvB,QAAMS,CAAC,GAAGf,SAAS,EAAnB;EACA;;EACA,QAAIe,CAAJ,EAAO;EACL,UAAMC,kBAAkB,GAAGD,CAAC,CAACE,EAAF,CAAKJ,IAAL,CAA3B;EACAE,MAAAA,CAAC,CAACE,EAAF,CAAKJ,IAAL,IAAaC,MAAM,CAACI,eAApB;EACAH,MAAAA,CAAC,CAACE,EAAF,CAAKJ,IAAL,EAAWM,WAAX,GAAyBL,MAAzB;;EACAC,MAAAA,CAAC,CAACE,EAAF,CAAKJ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ACvB,aAAOW,WAAP;EACD;;;;IAzBmBN;EA8FtB;EACA;EACA;EACA;EACA;EACA;;;EAEAhB,kBAAkB,CAACS,IAAD,EAAO6B,OAAP,CAAlB;;;;;;;;"}
\ No newline at end of file diff --git a/js/dist/scrollspy.js b/js/dist/scrollspy.js index f1d9926796..1ada6331e5 100644 --- a/js/dist/scrollspy.js +++ b/js/dist/scrollspy.js @@ -1,13 +1,13 @@ /*! - * Bootstrap scrollspy.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap scrollspy.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) : - typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); -}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); +}(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } @@ -15,10 +15,61 @@ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -50,7 +101,20 @@ var selector = element.getAttribute('data-bs-target'); if (!selector || selector === '#') { - var hrefAttr = element.getAttribute('href'); + var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes, + // so everything starting with `#` or `.`. If a "real" URL is used as the selector, + // `document.querySelector` will rightfully complain it is invalid. + // See https://github.com/twbs/bootstrap/issues/32273 + + if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) { + return null; + } // Just in case some CMS puts out a full URL with the anchor appended + + + if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) { + hrefAttr = '#' + hrefAttr.split('#')[1]; + } + selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null; } @@ -78,7 +142,7 @@ var valueType = value && isElement(value) ? 'element' : toType(value); if (!new RegExp(expectedTypes).test(valueType)) { - throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); + throw new TypeError(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); } }); }; @@ -102,59 +166,26 @@ } }; - var isRTL = document.documentElement.dir === 'rtl'; - - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; - } - - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } - - var _proto = BaseComponent.prototype; + document.documentElement.dir === 'rtl'; - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; } - }]); - - return BaseComponent; - }(); - - function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - - function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - - function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } + }); + }; - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -209,8 +240,8 @@ _this._targets = []; _this._activeTarget = null; _this._scrollHeight = 0; - EventHandler__default['default'].on(_this._scrollElement, EVENT_SCROLL, function (event) { - return _this._process(event); + EventHandler__default['default'].on(_this._scrollElement, EVENT_SCROLL, function () { + return _this._process(); }); _this.refresh(); @@ -406,7 +437,7 @@ }); }; - _createClass$1(ScrollSpy, null, [{ + _createClass(ScrollSpy, null, [{ key: "Default", get: function get() { return Default; @@ -419,7 +450,7 @@ }]); return ScrollSpy; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -439,21 +470,7 @@ * add .ScrollSpy to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = ScrollSpy.jQueryInterface; - $.fn[NAME].Constructor = ScrollSpy; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return ScrollSpy.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, ScrollSpy); return ScrollSpy; diff --git a/js/dist/scrollspy.js.map b/js/dist/scrollspy.js.map index 938ff46379..089972a5ec 100644 --- a/js/dist/scrollspy.js.map +++ b/js/dist/scrollspy.js.map @@ -1 +1 @@ -{"version":3,"file":"scrollspy.js","sources":["../src/util/index.js","../src/base-component.js","../src/scrollspy.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n const hrefAttr = element.getAttribute('href')\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ?\n 'element' :\n toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`)\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nexport {\n TRANSITION_END,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst VERSION = '5.0.0-beta1'\n\nclass BaseComponent {\n constructor(element) {\n if (!element) {\n return\n }\n\n this._element = element\n Data.setData(element, this.constructor.DATA_KEY, this)\n }\n\n dispose() {\n Data.removeData(this._element, this.constructor.DATA_KEY)\n this._element = null\n }\n\n /** Static */\n\n static getInstance(element) {\n return Data.getData(element, this.DATA_KEY)\n }\n\n static get VERSION() {\n return VERSION\n }\n}\n\nexport default BaseComponent\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n getjQuery,\n onDOMContentLoaded,\n getSelectorFromElement,\n getUID,\n isElement,\n typeCheckConfig\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'scrollspy'\nconst DATA_KEY = 'bs.scrollspy'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst Default = {\n offset: 10,\n method: 'auto',\n target: ''\n}\n\nconst DefaultType = {\n offset: 'number',\n method: 'string',\n target: '(string|element)'\n}\n\nconst EVENT_ACTIVATE = `activate${EVENT_KEY}`\nconst EVENT_SCROLL = `scroll${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'\nconst CLASS_NAME_ACTIVE = 'active'\n\nconst SELECTOR_DATA_SPY = '[data-bs-spy=\"scroll\"]'\nconst SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'\nconst SELECTOR_NAV_LINKS = '.nav-link'\nconst SELECTOR_NAV_ITEMS = '.nav-item'\nconst SELECTOR_LIST_ITEMS = '.list-group-item'\nconst SELECTOR_DROPDOWN = '.dropdown'\nconst SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'\n\nconst METHOD_OFFSET = 'offset'\nconst METHOD_POSITION = 'position'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass ScrollSpy extends BaseComponent {\n constructor(element, config) {\n super(element)\n this._scrollElement = element.tagName === 'BODY' ? window : element\n this._config = this._getConfig(config)\n this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS}, ${this._config.target} ${SELECTOR_LIST_ITEMS}, ${this._config.target} .${CLASS_NAME_DROPDOWN_ITEM}`\n this._offsets = []\n this._targets = []\n this._activeTarget = null\n this._scrollHeight = 0\n\n EventHandler.on(this._scrollElement, EVENT_SCROLL, event => this._process(event))\n\n this.refresh()\n this._process()\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n // Public\n\n refresh() {\n const autoMethod = this._scrollElement === this._scrollElement.window ?\n METHOD_OFFSET :\n METHOD_POSITION\n\n const offsetMethod = this._config.method === 'auto' ?\n autoMethod :\n this._config.method\n\n const offsetBase = offsetMethod === METHOD_POSITION ?\n this._getScrollTop() :\n 0\n\n this._offsets = []\n this._targets = []\n this._scrollHeight = this._getScrollHeight()\n\n const targets = SelectorEngine.find(this._selector)\n\n targets.map(element => {\n const targetSelector = getSelectorFromElement(element)\n const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null\n\n if (target) {\n const targetBCR = target.getBoundingClientRect()\n if (targetBCR.width || targetBCR.height) {\n return [\n Manipulator[offsetMethod](target).top + offsetBase,\n targetSelector\n ]\n }\n }\n\n return null\n })\n .filter(item => item)\n .sort((a, b) => a[0] - b[0])\n .forEach(item => {\n this._offsets.push(item[0])\n this._targets.push(item[1])\n })\n }\n\n dispose() {\n super.dispose()\n EventHandler.off(this._scrollElement, EVENT_KEY)\n\n this._scrollElement = null\n this._config = null\n this._selector = null\n this._offsets = null\n this._targets = null\n this._activeTarget = null\n this._scrollHeight = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...(typeof config === 'object' && config ? config : {})\n }\n\n if (typeof config.target !== 'string' && isElement(config.target)) {\n let { id } = config.target\n if (!id) {\n id = getUID(NAME)\n config.target.id = id\n }\n\n config.target = `#${id}`\n }\n\n typeCheckConfig(NAME, config, DefaultType)\n\n return config\n }\n\n _getScrollTop() {\n return this._scrollElement === window ?\n this._scrollElement.pageYOffset :\n this._scrollElement.scrollTop\n }\n\n _getScrollHeight() {\n return this._scrollElement.scrollHeight || Math.max(\n document.body.scrollHeight,\n document.documentElement.scrollHeight\n )\n }\n\n _getOffsetHeight() {\n return this._scrollElement === window ?\n window.innerHeight :\n this._scrollElement.getBoundingClientRect().height\n }\n\n _process() {\n const scrollTop = this._getScrollTop() + this._config.offset\n const scrollHeight = this._getScrollHeight()\n const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight()\n\n if (this._scrollHeight !== scrollHeight) {\n this.refresh()\n }\n\n if (scrollTop >= maxScroll) {\n const target = this._targets[this._targets.length - 1]\n\n if (this._activeTarget !== target) {\n this._activate(target)\n }\n\n return\n }\n\n if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {\n this._activeTarget = null\n this._clear()\n return\n }\n\n for (let i = this._offsets.length; i--;) {\n const isActiveTarget = this._activeTarget !== this._targets[i] &&\n scrollTop >= this._offsets[i] &&\n (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1])\n\n if (isActiveTarget) {\n this._activate(this._targets[i])\n }\n }\n }\n\n _activate(target) {\n this._activeTarget = target\n\n this._clear()\n\n const queries = this._selector.split(',')\n .map(selector => `${selector}[data-bs-target=\"${target}\"],${selector}[href=\"${target}\"]`)\n\n const link = SelectorEngine.findOne(queries.join(','))\n\n if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {\n SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE, link.closest(SELECTOR_DROPDOWN))\n .classList.add(CLASS_NAME_ACTIVE)\n\n link.classList.add(CLASS_NAME_ACTIVE)\n } else {\n // Set triggered link as active\n link.classList.add(CLASS_NAME_ACTIVE)\n\n SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP)\n .forEach(listGroup => {\n // Set triggered links parents as active\n // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor\n SelectorEngine.prev(listGroup, `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`)\n .forEach(item => item.classList.add(CLASS_NAME_ACTIVE))\n\n // Handle special case when .nav-link is inside .nav-item\n SelectorEngine.prev(listGroup, SELECTOR_NAV_ITEMS)\n .forEach(navItem => {\n SelectorEngine.children(navItem, SELECTOR_NAV_LINKS)\n .forEach(item => item.classList.add(CLASS_NAME_ACTIVE))\n })\n })\n }\n\n EventHandler.trigger(this._scrollElement, EVENT_ACTIVATE, {\n relatedTarget: target\n })\n }\n\n _clear() {\n SelectorEngine.find(this._selector)\n .filter(node => node.classList.contains(CLASS_NAME_ACTIVE))\n .forEach(node => node.classList.remove(CLASS_NAME_ACTIVE))\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.getData(this, DATA_KEY)\n const _config = typeof config === 'object' && config\n\n if (!data) {\n data = new ScrollSpy(this, _config)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n SelectorEngine.find(SELECTOR_DATA_SPY)\n .forEach(spy => new ScrollSpy(spy, Manipulator.getDataAttributes(spy)))\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .ScrollSpy to jQuery only if jQuery is present\n */\n\nonDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n $.fn[NAME] = ScrollSpy.jQueryInterface\n $.fn[NAME].Constructor = ScrollSpy\n $.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return ScrollSpy.jQueryInterface\n }\n }\n})\n\nexport default ScrollSpy\n"],"names":["MAX_UID","toType","obj","undefined","toString","call","match","toLowerCase","getUID","prefix","Math","floor","random","document","getElementById","getSelector","element","selector","getAttribute","hrefAttr","trim","getSelectorFromElement","querySelector","isElement","nodeType","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","Error","toUpperCase","getjQuery","window","jQuery","body","hasAttribute","onDOMContentLoaded","callback","readyState","addEventListener","isRTL","documentElement","dir","VERSION","BaseComponent","_element","Data","setData","constructor","DATA_KEY","dispose","removeData","getInstance","getData","NAME","EVENT_KEY","DATA_API_KEY","Default","offset","method","target","DefaultType","EVENT_ACTIVATE","EVENT_SCROLL","EVENT_LOAD_DATA_API","CLASS_NAME_DROPDOWN_ITEM","CLASS_NAME_ACTIVE","SELECTOR_DATA_SPY","SELECTOR_NAV_LIST_GROUP","SELECTOR_NAV_LINKS","SELECTOR_NAV_ITEMS","SELECTOR_LIST_ITEMS","SELECTOR_DROPDOWN","SELECTOR_DROPDOWN_TOGGLE","METHOD_OFFSET","METHOD_POSITION","ScrollSpy","_scrollElement","tagName","_config","_getConfig","_selector","_offsets","_targets","_activeTarget","_scrollHeight","EventHandler","on","event","_process","refresh","autoMethod","offsetMethod","offsetBase","_getScrollTop","_getScrollHeight","targets","SelectorEngine","find","map","targetSelector","findOne","targetBCR","getBoundingClientRect","width","height","Manipulator","top","filter","item","sort","a","b","push","off","id","pageYOffset","scrollTop","scrollHeight","max","_getOffsetHeight","innerHeight","maxScroll","length","_activate","_clear","i","isActiveTarget","queries","split","link","join","classList","contains","closest","add","parents","listGroup","prev","navItem","children","trigger","relatedTarget","node","remove","jQueryInterface","each","data","TypeError","spy","getDataAttributes","$","JQUERY_NO_CONFLICT","fn","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAEA,IAAMA,OAAO,GAAG,OAAhB;;EAKA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAAAC,GAAG,EAAI;EACpB,MAAIA,GAAG,KAAK,IAAR,IAAgBA,GAAG,KAAKC,SAA5B,EAAuC;EACrC,gBAAUD,GAAV;EACD;;EAED,SAAO,GAAGE,QAAH,CAAYC,IAAZ,CAAiBH,GAAjB,EAAsBI,KAAtB,CAA4B,aAA5B,EAA2C,CAA3C,EAA8CC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5B,EAAyC;EACvC,gBAAM,IAAIkI,SAAJ,wBAAkClI,MAAlC,QAAN;EACD;;EAEDiI,QAAAA,IAAI,CAACjI,MAAD,CAAJ;EACD;EACF,KAfM,CAAP;EAgBD;;;;0BAjNoB;EACnB,aAAOuC,OAAP;EACD;;;0BAEqB;EACpB,aAAOR,QAAP;EACD;;;;IAzBqBL;EAuOxB;EACA;EACA;EACA;EACA;;;AAEA0C,kCAAY,CAACC,EAAb,CAAgBvD,MAAhB,EAAwBgC,mBAAxB,EAA6C,YAAM;EACjDiC,EAAAA,kCAAc,CAACC,IAAf,CAAoB/B,iBAApB,EACG7C,OADH,CACW,UAAA+H,GAAG;EAAA,WAAI,IAAIzE,SAAJ,CAAcyE,GAAd,EAAmB3C,+BAAW,CAAC4C,iBAAZ,CAA8BD,GAA9B,CAAnB,CAAJ;EAAA,GADd;EAED,CAHD;EAKA;EACA;EACA;EACA;EACA;EACA;;EAEAjH,kBAAkB,CAAC,YAAM;EACvB,MAAMmH,CAAC,GAAGxH,SAAS,EAAnB;EACA;;EACA,MAAIwH,CAAJ,EAAO;EACL,QAAMC,kBAAkB,GAAGD,CAAC,CAACE,EAAF,CAAKnG,IAAL,CAA3B;EACAiG,IAAAA,CAAC,CAACE,EAAF,CAAKnG,IAAL,IAAasB,SAAS,CAACqE,eAAvB;EACAM,IAAAA,CAAC,CAACE,EAAF,CAAKnG,IAAL,EAAWoG,WAAX,GAAyB9E,SAAzB;;EACA2E,IAAAA,CAAC,CAACE,EAAF,CAAKnG,IAAL,EAAWqG,UAAX,GAAwB,YAAM;EAC5BJ,MAAAA,CAAC,CAACE,EAAF,CAAKnG,IAAL,IAAakG,kBAAb;EACA,aAAO5E,SAAS,CAACqE,eAAjB;EACD,KAHD;EAID;EACF,CAZiB,CAAlB;;;;;;;;"}
\ No newline at end of file +{"version":3,"file":"scrollspy.js","sources":["../src/util/index.js","../src/scrollspy.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = '#' + hrefAttr.split('#')[1]\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = (name, plugin) => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nexport {\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n getSelectorFromElement,\n getUID,\n isElement,\n typeCheckConfig\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'scrollspy'\nconst DATA_KEY = 'bs.scrollspy'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst Default = {\n offset: 10,\n method: 'auto',\n target: ''\n}\n\nconst DefaultType = {\n offset: 'number',\n method: 'string',\n target: '(string|element)'\n}\n\nconst EVENT_ACTIVATE = `activate${EVENT_KEY}`\nconst EVENT_SCROLL = `scroll${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'\nconst CLASS_NAME_ACTIVE = 'active'\n\nconst SELECTOR_DATA_SPY = '[data-bs-spy=\"scroll\"]'\nconst SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'\nconst SELECTOR_NAV_LINKS = '.nav-link'\nconst SELECTOR_NAV_ITEMS = '.nav-item'\nconst SELECTOR_LIST_ITEMS = '.list-group-item'\nconst SELECTOR_DROPDOWN = '.dropdown'\nconst SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'\n\nconst METHOD_OFFSET = 'offset'\nconst METHOD_POSITION = 'position'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass ScrollSpy extends BaseComponent {\n constructor(element, config) {\n super(element)\n this._scrollElement = element.tagName === 'BODY' ? window : element\n this._config = this._getConfig(config)\n this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS}, ${this._config.target} ${SELECTOR_LIST_ITEMS}, ${this._config.target} .${CLASS_NAME_DROPDOWN_ITEM}`\n this._offsets = []\n this._targets = []\n this._activeTarget = null\n this._scrollHeight = 0\n\n EventHandler.on(this._scrollElement, EVENT_SCROLL, () => this._process())\n\n this.refresh()\n this._process()\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n // Public\n\n refresh() {\n const autoMethod = this._scrollElement === this._scrollElement.window ?\n METHOD_OFFSET :\n METHOD_POSITION\n\n const offsetMethod = this._config.method === 'auto' ?\n autoMethod :\n this._config.method\n\n const offsetBase = offsetMethod === METHOD_POSITION ?\n this._getScrollTop() :\n 0\n\n this._offsets = []\n this._targets = []\n this._scrollHeight = this._getScrollHeight()\n\n const targets = SelectorEngine.find(this._selector)\n\n targets.map(element => {\n const targetSelector = getSelectorFromElement(element)\n const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null\n\n if (target) {\n const targetBCR = target.getBoundingClientRect()\n if (targetBCR.width || targetBCR.height) {\n return [\n Manipulator[offsetMethod](target).top + offsetBase,\n targetSelector\n ]\n }\n }\n\n return null\n })\n .filter(item => item)\n .sort((a, b) => a[0] - b[0])\n .forEach(item => {\n this._offsets.push(item[0])\n this._targets.push(item[1])\n })\n }\n\n dispose() {\n super.dispose()\n EventHandler.off(this._scrollElement, EVENT_KEY)\n\n this._scrollElement = null\n this._config = null\n this._selector = null\n this._offsets = null\n this._targets = null\n this._activeTarget = null\n this._scrollHeight = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...(typeof config === 'object' && config ? config : {})\n }\n\n if (typeof config.target !== 'string' && isElement(config.target)) {\n let { id } = config.target\n if (!id) {\n id = getUID(NAME)\n config.target.id = id\n }\n\n config.target = `#${id}`\n }\n\n typeCheckConfig(NAME, config, DefaultType)\n\n return config\n }\n\n _getScrollTop() {\n return this._scrollElement === window ?\n this._scrollElement.pageYOffset :\n this._scrollElement.scrollTop\n }\n\n _getScrollHeight() {\n return this._scrollElement.scrollHeight || Math.max(\n document.body.scrollHeight,\n document.documentElement.scrollHeight\n )\n }\n\n _getOffsetHeight() {\n return this._scrollElement === window ?\n window.innerHeight :\n this._scrollElement.getBoundingClientRect().height\n }\n\n _process() {\n const scrollTop = this._getScrollTop() + this._config.offset\n const scrollHeight = this._getScrollHeight()\n const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight()\n\n if (this._scrollHeight !== scrollHeight) {\n this.refresh()\n }\n\n if (scrollTop >= maxScroll) {\n const target = this._targets[this._targets.length - 1]\n\n if (this._activeTarget !== target) {\n this._activate(target)\n }\n\n return\n }\n\n if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {\n this._activeTarget = null\n this._clear()\n return\n }\n\n for (let i = this._offsets.length; i--;) {\n const isActiveTarget = this._activeTarget !== this._targets[i] &&\n scrollTop >= this._offsets[i] &&\n (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1])\n\n if (isActiveTarget) {\n this._activate(this._targets[i])\n }\n }\n }\n\n _activate(target) {\n this._activeTarget = target\n\n this._clear()\n\n const queries = this._selector.split(',')\n .map(selector => `${selector}[data-bs-target=\"${target}\"],${selector}[href=\"${target}\"]`)\n\n const link = SelectorEngine.findOne(queries.join(','))\n\n if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {\n SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE, link.closest(SELECTOR_DROPDOWN))\n .classList.add(CLASS_NAME_ACTIVE)\n\n link.classList.add(CLASS_NAME_ACTIVE)\n } else {\n // Set triggered link as active\n link.classList.add(CLASS_NAME_ACTIVE)\n\n SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP)\n .forEach(listGroup => {\n // Set triggered links parents as active\n // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor\n SelectorEngine.prev(listGroup, `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`)\n .forEach(item => item.classList.add(CLASS_NAME_ACTIVE))\n\n // Handle special case when .nav-link is inside .nav-item\n SelectorEngine.prev(listGroup, SELECTOR_NAV_ITEMS)\n .forEach(navItem => {\n SelectorEngine.children(navItem, SELECTOR_NAV_LINKS)\n .forEach(item => item.classList.add(CLASS_NAME_ACTIVE))\n })\n })\n }\n\n EventHandler.trigger(this._scrollElement, EVENT_ACTIVATE, {\n relatedTarget: target\n })\n }\n\n _clear() {\n SelectorEngine.find(this._selector)\n .filter(node => node.classList.contains(CLASS_NAME_ACTIVE))\n .forEach(node => node.classList.remove(CLASS_NAME_ACTIVE))\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.getData(this, DATA_KEY)\n const _config = typeof config === 'object' && config\n\n if (!data) {\n data = new ScrollSpy(this, _config)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n SelectorEngine.find(SELECTOR_DATA_SPY)\n .forEach(spy => new ScrollSpy(spy, Manipulator.getDataAttributes(spy)))\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .ScrollSpy to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(NAME, ScrollSpy)\n\nexport default ScrollSpy\n"],"names":["MAX_UID","toType","obj","undefined","toString","call","match","toLowerCase","getUID","prefix","Math","floor","random","document","getElementById","getSelector","element","selector","getAttribute","hrefAttr","includes","startsWith","split","trim","getSelectorFromElement","querySelector","isElement","nodeType","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","TypeError","toUpperCase","getjQuery","window","jQuery","body","hasAttribute","onDOMContentLoaded","callback","readyState","addEventListener","documentElement","dir","defineJQueryPlugin","name","plugin","$","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","NAME","DATA_KEY","EVENT_KEY","DATA_API_KEY","Default","offset","method","target","DefaultType","EVENT_ACTIVATE","EVENT_SCROLL","EVENT_LOAD_DATA_API","CLASS_NAME_DROPDOWN_ITEM","CLASS_NAME_ACTIVE","SELECTOR_DATA_SPY","SELECTOR_NAV_LIST_GROUP","SELECTOR_NAV_LINKS","SELECTOR_NAV_ITEMS","SELECTOR_LIST_ITEMS","SELECTOR_DROPDOWN","SELECTOR_DROPDOWN_TOGGLE","METHOD_OFFSET","METHOD_POSITION","ScrollSpy","_scrollElement","tagName","_config","_getConfig","_selector","_offsets","_targets","_activeTarget","_scrollHeight","EventHandler","on","_process","refresh","autoMethod","offsetMethod","offsetBase","_getScrollTop","_getScrollHeight","targets","SelectorEngine","find","map","targetSelector","findOne","targetBCR","getBoundingClientRect","width","height","Manipulator","top","filter","item","sort","a","b","push","dispose","off","id","pageYOffset","scrollTop","scrollHeight","max","_getOffsetHeight","innerHeight","maxScroll","length","_activate","_clear","i","isActiveTarget","queries","link","join","classList","contains","closest","add","parents","listGroup","prev","navItem","children","trigger","relatedTarget","node","remove","each","data","Data","getData","BaseComponent","spy","getDataAttributes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAEA,IAAMA,OAAO,GAAG,OAAhB;;EAKA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAAAC,GAAG,EAAI;EACpB,MAAIA,GAAG,KAAK,IAAR,IAAgBA,GAAG,KAAKC,SAA5B,EAAuC;EACrC,gBAAUD,GAAV;EACD;;EAED,SAAO,GAAGE,QAAH,CAAYC,IAAZ,CAAiBH,GAAjB,EAAsBI,KAAtB,CAA4B,aAA5B,EAA2C,CAA3C,EAA8CC,WAA9C,EAAP;EACD,CAND;EAQA;EACA;EACA;EACA;EACA;;;EAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAAAC,MAAM,EAAI;EACvB,KAAG;EACDA,IAAAA,MAAM,IAAIC,IAAI,CAACC,KAAL,CAAWD,IAAI,CAACE,MAAL,KAAgBZ,OAA3B,CAAV;EACD,GAFD,QAESa,QAAQ,CAACC,cAAT,CAAwBL,MAAxB,CAFT;;EAIA,SAAOA,MAAP;EACD,CAND;;EAQA,IAAMM,WAAW,GAAG,SAAdA,WAAc,CAAAC,OAAO,EAAI;EAC7B,MAAIC,QAAQ,GAAGD,OAAO,CAACE,YAAR,CAAqB,gBAArB,CAAf;;EAEA,MAAI,CAACD,QAAD,IAAaA,QAAQ,KAAK,GAA9B,EAAmC;EACjC,QAAIE,QAAQ,GAAGH,OAAO,CAACE,YAAR,CAAqB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AAP;EACD;;;;IAzBqB8F;EAuOxB;EACA;EACA;EACA;EACA;;;AAEA9D,kCAAY,CAACC,EAAb,CAAgBrD,MAAhB,EAAwB8B,mBAAxB,EAA6C,YAAM;EACjDgC,EAAAA,kCAAc,CAACC,IAAf,CAAoB9B,iBAApB,EACG3C,OADH,CACW,UAAA6H,GAAG;EAAA,WAAI,IAAIzE,SAAJ,CAAcyE,GAAd,EAAmB5C,+BAAW,CAAC6C,iBAAZ,CAA8BD,GAA9B,CAAnB,CAAJ;EAAA,GADd;EAED,CAHD;EAKA;EACA;EACA;EACA;EACA;EACA;;EAEAzG,kBAAkB,CAACS,IAAD,EAAOuB,SAAP,CAAlB;;;;;;;;"}
\ No newline at end of file diff --git a/js/dist/tab.js b/js/dist/tab.js index 5f5d3f1e13..b1188075c0 100644 --- a/js/dist/tab.js +++ b/js/dist/tab.js @@ -1,23 +1,56 @@ /*! - * Bootstrap tab.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap tab.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/selector-engine.js')) : - typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/selector-engine'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.Data, global.EventHandler, global.SelectorEngine)); -}(this, (function (Data, EventHandler, SelectorEngine) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/selector-engine', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.Data, global.EventHandler, global.SelectorEngine, global.Base)); +}(this, (function (Data, EventHandler, SelectorEngine, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -28,7 +61,20 @@ var selector = element.getAttribute('data-bs-target'); if (!selector || selector === '#') { - var hrefAttr = element.getAttribute('href'); + var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes, + // so everything starting with `#` or `.`. If a "real" URL is used as the selector, + // `document.querySelector` will rightfully complain it is invalid. + // See https://github.com/twbs/bootstrap/issues/32273 + + if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) { + return null; + } // Just in case some CMS puts out a full URL with the anchor appended + + + if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) { + hrefAttr = '#' + hrefAttr.split('#')[1]; + } + selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null; } @@ -108,57 +154,26 @@ } }; - var isRTL = document.documentElement.dir === 'rtl'; + document.documentElement.dir === 'rtl'; - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; } + }); + }; - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } - - var _proto = BaseComponent.prototype; - - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; - - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; - - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; - } - }]); - - return BaseComponent; - }(); - - function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - - function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } - - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -220,14 +235,9 @@ previous = previous[previous.length - 1]; } - var hideEvent = null; - - if (previous) { - hideEvent = EventHandler__default['default'].trigger(previous, EVENT_HIDE, { - relatedTarget: this._element - }); - } - + var hideEvent = previous ? EventHandler__default['default'].trigger(previous, EVENT_HIDE, { + relatedTarget: this._element + }) : null; var showEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW, { relatedTarget: previous }); @@ -269,7 +279,7 @@ if (active && isTransitioning) { var transitionDuration = getTransitionDurationFromElement(active); active.classList.remove(CLASS_NAME_SHOW); - EventHandler__default['default'].one(active, TRANSITION_END, complete); + EventHandler__default['default'].one(active, 'transitionend', complete); emulateTransitionEnd(active, transitionDuration); } else { complete(); @@ -334,16 +344,16 @@ }); }; - _createClass$1(Tab, null, [{ + _createClass(Tab, null, [{ key: "DATA_KEY", - // Getters - get: function get() { + get: // Getters + function get() { return DATA_KEY; } }]); return Tab; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -363,21 +373,7 @@ * add .Tab to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Tab.jQueryInterface; - $.fn[NAME].Constructor = Tab; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Tab.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Tab); return Tab; diff --git a/js/dist/tab.js.map b/js/dist/tab.js.map index 48c6fcd506..5334c0e4c5 100644 --- a/js/dist/tab.js.map +++ b/js/dist/tab.js.map @@ -1 +1 @@ -{"version":3,"file":"tab.js","sources":["../src/util/index.js","../src/base-component.js","../src/tab.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n const hrefAttr = element.getAttribute('href')\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ?\n 'element' :\n toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`)\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nexport {\n TRANSITION_END,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst VERSION = '5.0.0-beta1'\n\nclass BaseComponent {\n constructor(element) {\n if (!element) {\n return\n }\n\n this._element = element\n Data.setData(element, this.constructor.DATA_KEY, this)\n }\n\n dispose() {\n Data.removeData(this._element, this.constructor.DATA_KEY)\n this._element = null\n }\n\n /** Static */\n\n static getInstance(element) {\n return Data.getData(element, this.DATA_KEY)\n }\n\n static get VERSION() {\n return VERSION\n }\n}\n\nexport default BaseComponent\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n getjQuery,\n onDOMContentLoaded,\n TRANSITION_END,\n emulateTransitionEnd,\n getElementFromSelector,\n getTransitionDurationFromElement,\n reflow\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'tab'\nconst DATA_KEY = 'bs.tab'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu'\nconst CLASS_NAME_ACTIVE = 'active'\nconst CLASS_NAME_DISABLED = 'disabled'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\nconst SELECTOR_DROPDOWN = '.dropdown'\nconst SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'\nconst SELECTOR_ACTIVE = '.active'\nconst SELECTOR_ACTIVE_UL = ':scope > li > .active'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"tab\"], [data-bs-toggle=\"pill\"], [data-bs-toggle=\"list\"]'\nconst SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'\nconst SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Tab extends BaseComponent {\n // Getters\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n // Public\n\n show() {\n if ((this._element.parentNode &&\n this._element.parentNode.nodeType === Node.ELEMENT_NODE &&\n this._element.classList.contains(CLASS_NAME_ACTIVE)) ||\n this._element.classList.contains(CLASS_NAME_DISABLED)) {\n return\n }\n\n let previous\n const target = getElementFromSelector(this._element)\n const listElement = this._element.closest(SELECTOR_NAV_LIST_GROUP)\n\n if (listElement) {\n const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE\n previous = SelectorEngine.find(itemSelector, listElement)\n previous = previous[previous.length - 1]\n }\n\n let hideEvent = null\n\n if (previous) {\n hideEvent = EventHandler.trigger(previous, EVENT_HIDE, {\n relatedTarget: this._element\n })\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {\n relatedTarget: previous\n })\n\n if (showEvent.defaultPrevented || (hideEvent !== null && hideEvent.defaultPrevented)) {\n return\n }\n\n this._activate(this._element, listElement)\n\n const complete = () => {\n EventHandler.trigger(previous, EVENT_HIDDEN, {\n relatedTarget: this._element\n })\n EventHandler.trigger(this._element, EVENT_SHOWN, {\n relatedTarget: previous\n })\n }\n\n if (target) {\n this._activate(target, target.parentNode, complete)\n } else {\n complete()\n }\n }\n\n // Private\n\n _activate(element, container, callback) {\n const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ?\n SelectorEngine.find(SELECTOR_ACTIVE_UL, container) :\n SelectorEngine.children(container, SELECTOR_ACTIVE)\n\n const active = activeElements[0]\n const isTransitioning = callback && (active && active.classList.contains(CLASS_NAME_FADE))\n\n const complete = () => this._transitionComplete(element, active, callback)\n\n if (active && isTransitioning) {\n const transitionDuration = getTransitionDurationFromElement(active)\n active.classList.remove(CLASS_NAME_SHOW)\n\n EventHandler.one(active, TRANSITION_END, complete)\n emulateTransitionEnd(active, transitionDuration)\n } else {\n complete()\n }\n }\n\n _transitionComplete(element, active, callback) {\n if (active) {\n active.classList.remove(CLASS_NAME_ACTIVE)\n\n const dropdownChild = SelectorEngine.findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode)\n\n if (dropdownChild) {\n dropdownChild.classList.remove(CLASS_NAME_ACTIVE)\n }\n\n if (active.getAttribute('role') === 'tab') {\n active.setAttribute('aria-selected', false)\n }\n }\n\n element.classList.add(CLASS_NAME_ACTIVE)\n if (element.getAttribute('role') === 'tab') {\n element.setAttribute('aria-selected', true)\n }\n\n reflow(element)\n\n if (element.classList.contains(CLASS_NAME_FADE)) {\n element.classList.add(CLASS_NAME_SHOW)\n }\n\n if (element.parentNode && element.parentNode.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {\n const dropdownElement = element.closest(SELECTOR_DROPDOWN)\n\n if (dropdownElement) {\n SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE)\n .forEach(dropdown => dropdown.classList.add(CLASS_NAME_ACTIVE))\n }\n\n element.setAttribute('aria-expanded', true)\n }\n\n if (callback) {\n callback()\n }\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Data.getData(this, DATA_KEY) || new Tab(this)\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n event.preventDefault()\n\n const data = Data.getData(this, DATA_KEY) || new Tab(this)\n data.show()\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Tab to jQuery only if jQuery is present\n */\n\nonDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n $.fn[NAME] = Tab.jQueryInterface\n $.fn[NAME].Constructor = Tab\n $.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tab.jQueryInterface\n }\n }\n})\n\nexport default Tab\n"],"names":["MILLISECONDS_MULTIPLIER","TRANSITION_END","getSelector","element","selector","getAttribute","hrefAttr","trim","getElementFromSelector","document","querySelector","getTransitionDurationFromElement","window","getComputedStyle","transitionDuration","transitionDelay","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","split","triggerTransitionEnd","dispatchEvent","Event","emulateTransitionEnd","duration","called","durationPadding","emulatedDuration","listener","removeEventListener","addEventListener","setTimeout","reflow","offsetHeight","getjQuery","jQuery","body","hasAttribute","onDOMContentLoaded","callback","readyState","isRTL","documentElement","dir","VERSION","BaseComponent","_element","Data","setData","constructor","DATA_KEY","dispose","removeData","getInstance","getData","NAME","EVENT_KEY","DATA_API_KEY","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","EVENT_CLICK_DATA_API","CLASS_NAME_DROPDOWN_MENU","CLASS_NAME_ACTIVE","CLASS_NAME_DISABLED","CLASS_NAME_FADE","CLASS_NAME_SHOW","SELECTOR_DROPDOWN","SELECTOR_NAV_LIST_GROUP","SELECTOR_ACTIVE","SELECTOR_ACTIVE_UL","SELECTOR_DATA_TOGGLE","SELECTOR_DROPDOWN_TOGGLE","SELECTOR_DROPDOWN_ACTIVE_CHILD","Tab","show","parentNode","nodeType","Node","ELEMENT_NODE","classList","contains","previous","target","listElement","closest","itemSelector","nodeName","SelectorEngine","find","length","hideEvent","EventHandler","trigger","relatedTarget","showEvent","defaultPrevented","_activate","complete","container","activeElements","children","active","isTransitioning","_transitionComplete","remove","one","dropdownChild","findOne","setAttribute","add","dropdownElement","forEach","dropdown","jQueryInterface","config","each","data","TypeError","on","event","preventDefault","$","JQUERY_NO_CONFLICT","fn","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAGA,IAAMA,uBAAuB,GAAG,IAAhC;EACA,IAAMC,cAAc,GAAG,eAAvB;;EAyBA,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAAAC,OAAO,EAAI;EAC7B,MAAIC,QAAQ,GAAGD,OAAO,CAACE,YAAR,CAAqB,gBAArB,CAAf;;EAEA,MAAI,CAACD,QAAD,IAAaA,QAAQ,KAAK,GAA9B,EAAmC;EACjC,QAAME,QAAQ,GAAGH,OAAO,CAACE,YAAR,CAAqB,MAArB,CAAjB;EAEAD,IAAAA,QAAQ,GAAGE,QAAQ,IAAIA,QAAQ,KAAK,GAAzB,GAA+BA,QAAQ,CAACC,IAAT,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AAC2B,EAAb,CAAgBhH,QAAhB,EAA0BsD,oBAA1B,EAAgDU,oBAAhD,EAAsE,UAAUiD,KAAV,EAAiB;EACrFA,EAAAA,KAAK,CAACC,cAAN;EAEA,MAAMJ,IAAI,GAAGvE,wBAAI,CAACO,OAAL,CAAa,IAAb,EAAmBJ,QAAnB,KAAgC,IAAIyB,GAAJ,CAAQ,IAAR,CAA7C;EACA2C,EAAAA,IAAI,CAAC1C,IAAL;EACD,CALD;EAOA;EACA;EACA;EACA;EACA;EACA;;EAEAtC,kBAAkB,CAAC,YAAM;EACvB,MAAMqF,CAAC,GAAGzF,SAAS,EAAnB;EACA;;EACA,MAAIyF,CAAJ,EAAO;EACL,QAAMC,kBAAkB,GAAGD,CAAC,CAACE,EAAF,CAAKtE,IAAL,CAA3B;EACAoE,IAAAA,CAAC,CAACE,EAAF,CAAKtE,IAAL,IAAaoB,GAAG,CAACwC,eAAjB;EACAQ,IAAAA,CAAC,CAACE,EAAF,CAAKtE,IAAL,EAAWuE,WAAX,GAAyBnD,GAAzB;;EACAgD,IAAAA,CAAC,CAACE,EAAF,CAAKtE,IAAL,EAAWwE,UAAX,GAAwB,YAAM;EAC5BJ,MAAAA,CAAC,CAACE,EAAF,CAAKtE,IAAL,IAAaqE,kBAAb;EACA,aAAOjD,GAAG,CAACwC,eAAX;EACD,KAHD;EAID;EACF,CAZiB,CAAlB;;;;;;;;"}
\ No newline at end of file +{"version":3,"file":"tab.js","sources":["../src/util/index.js","../src/tab.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = '#' + hrefAttr.split('#')[1]\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = (name, plugin) => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nexport {\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n emulateTransitionEnd,\n getElementFromSelector,\n getTransitionDurationFromElement,\n reflow\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'tab'\nconst DATA_KEY = 'bs.tab'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu'\nconst CLASS_NAME_ACTIVE = 'active'\nconst CLASS_NAME_DISABLED = 'disabled'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\nconst SELECTOR_DROPDOWN = '.dropdown'\nconst SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'\nconst SELECTOR_ACTIVE = '.active'\nconst SELECTOR_ACTIVE_UL = ':scope > li > .active'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"tab\"], [data-bs-toggle=\"pill\"], [data-bs-toggle=\"list\"]'\nconst SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'\nconst SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Tab extends BaseComponent {\n // Getters\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n // Public\n\n show() {\n if ((this._element.parentNode &&\n this._element.parentNode.nodeType === Node.ELEMENT_NODE &&\n this._element.classList.contains(CLASS_NAME_ACTIVE)) ||\n this._element.classList.contains(CLASS_NAME_DISABLED)) {\n return\n }\n\n let previous\n const target = getElementFromSelector(this._element)\n const listElement = this._element.closest(SELECTOR_NAV_LIST_GROUP)\n\n if (listElement) {\n const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE\n previous = SelectorEngine.find(itemSelector, listElement)\n previous = previous[previous.length - 1]\n }\n\n const hideEvent = previous ?\n EventHandler.trigger(previous, EVENT_HIDE, {\n relatedTarget: this._element\n }) :\n null\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {\n relatedTarget: previous\n })\n\n if (showEvent.defaultPrevented || (hideEvent !== null && hideEvent.defaultPrevented)) {\n return\n }\n\n this._activate(this._element, listElement)\n\n const complete = () => {\n EventHandler.trigger(previous, EVENT_HIDDEN, {\n relatedTarget: this._element\n })\n EventHandler.trigger(this._element, EVENT_SHOWN, {\n relatedTarget: previous\n })\n }\n\n if (target) {\n this._activate(target, target.parentNode, complete)\n } else {\n complete()\n }\n }\n\n // Private\n\n _activate(element, container, callback) {\n const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ?\n SelectorEngine.find(SELECTOR_ACTIVE_UL, container) :\n SelectorEngine.children(container, SELECTOR_ACTIVE)\n\n const active = activeElements[0]\n const isTransitioning = callback && (active && active.classList.contains(CLASS_NAME_FADE))\n\n const complete = () => this._transitionComplete(element, active, callback)\n\n if (active && isTransitioning) {\n const transitionDuration = getTransitionDurationFromElement(active)\n active.classList.remove(CLASS_NAME_SHOW)\n\n EventHandler.one(active, 'transitionend', complete)\n emulateTransitionEnd(active, transitionDuration)\n } else {\n complete()\n }\n }\n\n _transitionComplete(element, active, callback) {\n if (active) {\n active.classList.remove(CLASS_NAME_ACTIVE)\n\n const dropdownChild = SelectorEngine.findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode)\n\n if (dropdownChild) {\n dropdownChild.classList.remove(CLASS_NAME_ACTIVE)\n }\n\n if (active.getAttribute('role') === 'tab') {\n active.setAttribute('aria-selected', false)\n }\n }\n\n element.classList.add(CLASS_NAME_ACTIVE)\n if (element.getAttribute('role') === 'tab') {\n element.setAttribute('aria-selected', true)\n }\n\n reflow(element)\n\n if (element.classList.contains(CLASS_NAME_FADE)) {\n element.classList.add(CLASS_NAME_SHOW)\n }\n\n if (element.parentNode && element.parentNode.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {\n const dropdownElement = element.closest(SELECTOR_DROPDOWN)\n\n if (dropdownElement) {\n SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE)\n .forEach(dropdown => dropdown.classList.add(CLASS_NAME_ACTIVE))\n }\n\n element.setAttribute('aria-expanded', true)\n }\n\n if (callback) {\n callback()\n }\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Data.getData(this, DATA_KEY) || new Tab(this)\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n event.preventDefault()\n\n const data = Data.getData(this, DATA_KEY) || new Tab(this)\n data.show()\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Tab to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(NAME, Tab)\n\nexport default Tab\n"],"names":["MILLISECONDS_MULTIPLIER","TRANSITION_END","getSelector","element","selector","getAttribute","hrefAttr","includes","startsWith","split","trim","getElementFromSelector","document","querySelector","getTransitionDurationFromElement","window","getComputedStyle","transitionDuration","transitionDelay","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","triggerTransitionEnd","dispatchEvent","Event","emulateTransitionEnd","duration","called","durationPadding","emulatedDuration","listener","removeEventListener","addEventListener","setTimeout","reflow","offsetHeight","getjQuery","jQuery","body","hasAttribute","onDOMContentLoaded","callback","readyState","documentElement","dir","defineJQueryPlugin","name","plugin","$","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","NAME","DATA_KEY","EVENT_KEY","DATA_API_KEY","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","EVENT_CLICK_DATA_API","CLASS_NAME_DROPDOWN_MENU","CLASS_NAME_ACTIVE","CLASS_NAME_DISABLED","CLASS_NAME_FADE","CLASS_NAME_SHOW","SELECTOR_DROPDOWN","SELECTOR_NAV_LIST_GROUP","SELECTOR_ACTIVE","SELECTOR_ACTIVE_UL","SELECTOR_DATA_TOGGLE","SELECTOR_DROPDOWN_TOGGLE","SELECTOR_DROPDOWN_ACTIVE_CHILD","Tab","show","_element","parentNode","nodeType","Node","ELEMENT_NODE","classList","contains","previous","target","listElement","closest","itemSelector","nodeName","SelectorEngine","find","length","hideEvent","EventHandler","trigger","relatedTarget","showEvent","defaultPrevented","_activate","complete","container","activeElements","children","active","isTransitioning","_transitionComplete","remove","one","dropdownChild","findOne","setAttribute","add","dropdownElement","forEach","dropdown","config","each","data","Data","getData","TypeError","BaseComponent","on","event","preventDefault"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAGA,IAAMA,uBAAuB,GAAG,IAAhC;EACA,IAAMC,cAAc,GAAG,eAAvB;;EAyBA,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAAAC,OAAO,EAAI;EAC7B,MAAIC,QAAQ,GAAGD,OAAO,CAACE,YAAR,CAAqB,gBAArB,CAAf;;EAEA,MAAI,CAACD,QAAD,IAAaA,QAAQ,KAAK,GAA9B,EAAmC;EACjC,QAAIE,QAAQ,GAAGH,OAAO,CAACE,YAAR,CAAqB,MAArB,CAAf,CADiC;EAIjC;EACA;EACA;;EACA,QAAI,CAACC,QAAD,IAAc,CAACA,QAAQ,CAACC,QAAT,CAAkB,GAAlB,CAAD,IAA2B,CAACD,QAAQ,CAACE,UAAT,CAAoB,GAApB,CAA9C,EAAyE;EACvE,aAAO,IAAP;EACD,KATgC;;;EAYjC,QAAIF,QAAQ,CAACC,QAAT,CAAkB,GAAlB,KAA0B,CAACD,QAAQ,CAACE,UAAT,CAAoB,GAApB,CAA/B,EAAyD;EACvDF,MAAAA,QAAQ,GAAG,MAAMA,QAAQ,CAACG,KAAT,CAAe,GAAf,EAAoB,CAApB,CAAjB;EACD;;EAEDL,IAAAA,QAAQ,GAAGE,QAAQ,IAAIA,QAAQ,KAAK,GAAzB,GAA+BA,QAAQ,CAACI,IAAT,EAA/B,GAAiD,IAA5D;EACD;;EAED,SAAON,QAAP;EACD,CAvBD;;EAmCA,IAAMO,sBAAsB,GAAG,SAAzBA,sBAAyB,CAAAR,OAAO,EAAI;EACxC,MAAMC,QAAQ,GAAGF,WAAW,CAACC,OAAD,CAA5B;EAEA,SAAOC,QAAQ,GAAGQ,QAAQ,CAACC,aAAT,CAAuB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ACA;;EAEA/B,kBAAkB,CAACS,IAAD,EAAOqB,GAAP,CAAlB;;;;;;;;"}
\ No newline at end of file diff --git a/js/dist/toast.js b/js/dist/toast.js index 067267dc86..6fb0ebd2ae 100644 --- a/js/dist/toast.js +++ b/js/dist/toast.js @@ -1,23 +1,74 @@ /*! - * Bootstrap toast.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap toast.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js')) : - typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Toast = factory(global.Data, global.EventHandler, global.Manipulator)); -}(this, (function (Data, EventHandler, Manipulator) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Toast = factory(global.Data, global.EventHandler, global.Manipulator, global.Base)); +}(this, (function (Data, EventHandler, Manipulator, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -88,7 +139,7 @@ var valueType = value && isElement(value) ? 'element' : toType(value); if (!new RegExp(expectedTypes).test(valueType)) { - throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); + throw new TypeError(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); } }); }; @@ -116,59 +167,26 @@ } }; - var isRTL = document.documentElement.dir === 'rtl'; - - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; - } + document.documentElement.dir === 'rtl'; - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - var _proto = BaseComponent.prototype; + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; - - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; - - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; } - }]); - - return BaseComponent; - }(); - - function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - - function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - - function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } + }); + }; - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -260,7 +278,7 @@ if (this._config.animation) { var transitionDuration = getTransitionDurationFromElement(this._element); - EventHandler__default['default'].one(this._element, TRANSITION_END, complete); + EventHandler__default['default'].one(this._element, 'transitionend', complete); emulateTransitionEnd(this._element, transitionDuration); } else { complete(); @@ -290,7 +308,7 @@ if (this._config.animation) { var transitionDuration = getTransitionDurationFromElement(this._element); - EventHandler__default['default'].one(this._element, TRANSITION_END, complete); + EventHandler__default['default'].one(this._element, 'transitionend', complete); emulateTransitionEnd(this._element, transitionDuration); } else { complete(); @@ -352,7 +370,7 @@ }); }; - _createClass$1(Toast, null, [{ + _createClass(Toast, null, [{ key: "DefaultType", get: function get() { return DefaultType; @@ -370,7 +388,7 @@ }]); return Toast; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * jQuery @@ -379,21 +397,7 @@ */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Toast.jQueryInterface; - $.fn[NAME].Constructor = Toast; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Toast.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Toast); return Toast; diff --git a/js/dist/toast.js.map b/js/dist/toast.js.map index 21e372ca5f..5eecedcd58 100644 --- a/js/dist/toast.js.map +++ b/js/dist/toast.js.map @@ -1 +1 @@ -{"version":3,"file":"toast.js","sources":["../src/util/index.js","../src/base-component.js","../src/toast.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n const hrefAttr = element.getAttribute('href')\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ?\n 'element' :\n toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`)\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nexport {\n TRANSITION_END,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst VERSION = '5.0.0-beta1'\n\nclass BaseComponent {\n constructor(element) {\n if (!element) {\n return\n }\n\n this._element = element\n Data.setData(element, this.constructor.DATA_KEY, this)\n }\n\n dispose() {\n Data.removeData(this._element, this.constructor.DATA_KEY)\n this._element = null\n }\n\n /** Static */\n\n static getInstance(element) {\n return Data.getData(element, this.DATA_KEY)\n }\n\n static get VERSION() {\n return VERSION\n }\n}\n\nexport default BaseComponent\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): toast.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n getjQuery,\n onDOMContentLoaded,\n TRANSITION_END,\n emulateTransitionEnd,\n getTransitionDurationFromElement,\n reflow,\n typeCheckConfig\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'toast'\nconst DATA_KEY = 'bs.toast'\nconst EVENT_KEY = `.${DATA_KEY}`\n\nconst EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_HIDE = 'hide'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_SHOWING = 'showing'\n\nconst DefaultType = {\n animation: 'boolean',\n autohide: 'boolean',\n delay: 'number'\n}\n\nconst Default = {\n animation: true,\n autohide: true,\n delay: 5000\n}\n\nconst SELECTOR_DATA_DISMISS = '[data-bs-dismiss=\"toast\"]'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Toast extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._config = this._getConfig(config)\n this._timeout = null\n this._setListeners()\n }\n\n // Getters\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get Default() {\n return Default\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n // Public\n\n show() {\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW)\n\n if (showEvent.defaultPrevented) {\n return\n }\n\n this._clearTimeout()\n\n if (this._config.animation) {\n this._element.classList.add(CLASS_NAME_FADE)\n }\n\n const complete = () => {\n this._element.classList.remove(CLASS_NAME_SHOWING)\n this._element.classList.add(CLASS_NAME_SHOW)\n\n EventHandler.trigger(this._element, EVENT_SHOWN)\n\n if (this._config.autohide) {\n this._timeout = setTimeout(() => {\n this.hide()\n }, this._config.delay)\n }\n }\n\n this._element.classList.remove(CLASS_NAME_HIDE)\n reflow(this._element)\n this._element.classList.add(CLASS_NAME_SHOWING)\n if (this._config.animation) {\n const transitionDuration = getTransitionDurationFromElement(this._element)\n\n EventHandler.one(this._element, TRANSITION_END, complete)\n emulateTransitionEnd(this._element, transitionDuration)\n } else {\n complete()\n }\n }\n\n hide() {\n if (!this._element.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n\n if (hideEvent.defaultPrevented) {\n return\n }\n\n const complete = () => {\n this._element.classList.add(CLASS_NAME_HIDE)\n EventHandler.trigger(this._element, EVENT_HIDDEN)\n }\n\n this._element.classList.remove(CLASS_NAME_SHOW)\n if (this._config.animation) {\n const transitionDuration = getTransitionDurationFromElement(this._element)\n\n EventHandler.one(this._element, TRANSITION_END, complete)\n emulateTransitionEnd(this._element, transitionDuration)\n } else {\n complete()\n }\n }\n\n dispose() {\n this._clearTimeout()\n\n if (this._element.classList.contains(CLASS_NAME_SHOW)) {\n this._element.classList.remove(CLASS_NAME_SHOW)\n }\n\n EventHandler.off(this._element, EVENT_CLICK_DISMISS)\n\n super.dispose()\n this._config = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...Manipulator.getDataAttributes(this._element),\n ...(typeof config === 'object' && config ? config : {})\n }\n\n typeCheckConfig(NAME, config, this.constructor.DefaultType)\n\n return config\n }\n\n _setListeners() {\n EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide())\n }\n\n _clearTimeout() {\n clearTimeout(this._timeout)\n this._timeout = null\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.getData(this, DATA_KEY)\n const _config = typeof config === 'object' && config\n\n if (!data) {\n data = new Toast(this, _config)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](this)\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Toast to jQuery only if jQuery is present\n */\n\nonDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n $.fn[NAME] = Toast.jQueryInterface\n $.fn[NAME].Constructor = Toast\n $.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Toast.jQueryInterface\n }\n }\n})\n\nexport default Toast\n"],"names":["MILLISECONDS_MULTIPLIER","TRANSITION_END","toType","obj","undefined","toString","call","match","toLowerCase","getTransitionDurationFromElement","element","window","getComputedStyle","transitionDuration","transitionDelay","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","split","triggerTransitionEnd","dispatchEvent","Event","isElement","nodeType","emulateTransitionEnd","duration","called","durationPadding","emulatedDuration","listener","removeEventListener","addEventListener","setTimeout","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","Error","toUpperCase","reflow","offsetHeight","getjQuery","jQuery","document","body","hasAttribute","onDOMContentLoaded","callback","readyState","isRTL","documentElement","dir","VERSION","BaseComponent","_element","Data","setData","constructor","DATA_KEY","dispose","removeData","getInstance","getData","NAME","EVENT_KEY","EVENT_CLICK_DISMISS","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","CLASS_NAME_FADE","CLASS_NAME_HIDE","CLASS_NAME_SHOW","CLASS_NAME_SHOWING","DefaultType","animation","autohide","delay","Default","SELECTOR_DATA_DISMISS","Toast","_config","_getConfig","_timeout","_setListeners","show","showEvent","EventHandler","trigger","defaultPrevented","_clearTimeout","classList","add","complete","remove","hide","one","contains","hideEvent","off","Manipulator","getDataAttributes","on","clearTimeout","jQueryInterface","each","data","TypeError","$","JQUERY_NO_CONFLICT","fn","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAGA,IAAMA,uBAAuB,GAAG,IAAhC;EACA,IAAMC,cAAc,GAAG,eAAvB;;EAGA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAAAC,GAAG,EAAI;EACpB,MAAIA,GAAG,KAAK,IAAR,IAAgBA,GAAG,KAAKC,SAA5B,EAAuC;EACrC,gBAAUD,GAAV;EACD;;EAED,SAAO,GAAGE,QAAH,CAAYC,IAAZ,CAAiBH,GAAjB,EAAsBI,KAAtB,CAA4B,aAA5B,EAA2C,CAA3C,EAA8CC,WAA9C,EAAP;EACD,CAND;;EAkDA,IAAMC,gCAAgC,GAAG,SAAnCA,gCAAmC,CAAAC,OAAO,EAAI;EAClD,MAAI,CAACA,OAAL,EAAc;EACZ,WAAO,CAAP;EACD,GAHiD;;;EAAA,8BAMJC,MAAM,CAACC,gBAAP,CAAwBF,OAA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L,EAAWiD,UAAX,GAAwB,YAAM;EAC5BJ,MAAAA,CAAC,CAACE,EAAF,CAAK/C,IAAL,IAAa8C,kBAAb;EACA,aAAO7B,KAAK,CAACwB,eAAb;EACD,KAHD;EAID;EACF,CAZiB,CAAlB;;;;;;;;"}
\ No newline at end of file +{"version":3,"file":"toast.js","sources":["../src/util/index.js","../src/toast.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = '#' + hrefAttr.split('#')[1]\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = (name, plugin) => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nexport {\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): toast.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n emulateTransitionEnd,\n getTransitionDurationFromElement,\n reflow,\n typeCheckConfig\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'toast'\nconst DATA_KEY = 'bs.toast'\nconst EVENT_KEY = `.${DATA_KEY}`\n\nconst EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_HIDE = 'hide'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_SHOWING = 'showing'\n\nconst DefaultType = {\n animation: 'boolean',\n autohide: 'boolean',\n delay: 'number'\n}\n\nconst Default = {\n animation: true,\n autohide: true,\n delay: 5000\n}\n\nconst SELECTOR_DATA_DISMISS = '[data-bs-dismiss=\"toast\"]'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Toast extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._config = this._getConfig(config)\n this._timeout = null\n this._setListeners()\n }\n\n // Getters\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get Default() {\n return Default\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n // Public\n\n show() {\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW)\n\n if (showEvent.defaultPrevented) {\n return\n }\n\n this._clearTimeout()\n\n if (this._config.animation) {\n this._element.classList.add(CLASS_NAME_FADE)\n }\n\n const complete = () => {\n this._element.classList.remove(CLASS_NAME_SHOWING)\n this._element.classList.add(CLASS_NAME_SHOW)\n\n EventHandler.trigger(this._element, EVENT_SHOWN)\n\n if (this._config.autohide) {\n this._timeout = setTimeout(() => {\n this.hide()\n }, this._config.delay)\n }\n }\n\n this._element.classList.remove(CLASS_NAME_HIDE)\n reflow(this._element)\n this._element.classList.add(CLASS_NAME_SHOWING)\n if (this._config.animation) {\n const transitionDuration = getTransitionDurationFromElement(this._element)\n\n EventHandler.one(this._element, 'transitionend', complete)\n emulateTransitionEnd(this._element, transitionDuration)\n } else {\n complete()\n }\n }\n\n hide() {\n if (!this._element.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n\n if (hideEvent.defaultPrevented) {\n return\n }\n\n const complete = () => {\n this._element.classList.add(CLASS_NAME_HIDE)\n EventHandler.trigger(this._element, EVENT_HIDDEN)\n }\n\n this._element.classList.remove(CLASS_NAME_SHOW)\n if (this._config.animation) {\n const transitionDuration = getTransitionDurationFromElement(this._element)\n\n EventHandler.one(this._element, 'transitionend', complete)\n emulateTransitionEnd(this._element, transitionDuration)\n } else {\n complete()\n }\n }\n\n dispose() {\n this._clearTimeout()\n\n if (this._element.classList.contains(CLASS_NAME_SHOW)) {\n this._element.classList.remove(CLASS_NAME_SHOW)\n }\n\n EventHandler.off(this._element, EVENT_CLICK_DISMISS)\n\n super.dispose()\n this._config = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...Manipulator.getDataAttributes(this._element),\n ...(typeof config === 'object' && config ? config : {})\n }\n\n typeCheckConfig(NAME, config, this.constructor.DefaultType)\n\n return config\n }\n\n _setListeners() {\n EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide())\n }\n\n _clearTimeout() {\n clearTimeout(this._timeout)\n this._timeout = null\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.getData(this, DATA_KEY)\n const _config = typeof config === 'object' && config\n\n if (!data) {\n data = new Toast(this, _config)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](this)\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Toast to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(NAME, Toast)\n\nexport default Toast\n"],"names":["MILLISECONDS_MULTIPLIER","TRANSITION_END","toType","obj","undefined","toString","call","match","toLowerCase","getTransitionDurationFromElement","element","window","getComputedStyle","transitionDuration","transitionDelay","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","split","triggerTransitionEnd","dispatchEvent","Event","isElement","nodeType","emulateTransitionEnd","duration","called","durationPadding","emulatedDuration","listener","removeEventListener","addEventListener","setTimeout","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","TypeError","toUpperCase","reflow","offsetHeight","getjQuery","jQuery","document","body","hasAttribute","onDOMContentLoaded","callback","readyState","documentElement","dir","defineJQueryPlugin","name","plugin","$","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","NAME","DATA_KEY","EVENT_KEY","EVENT_CLICK_DISMISS","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","CLASS_NAME_FADE","CLASS_NAME_HIDE","CLASS_NAME_SHOW","CLASS_NAME_SHOWING","DefaultType","animation","autohide","delay","Default","SELECTOR_DATA_DISMISS","Toast","_config","_getConfig","_timeout","_setListeners","show","showEvent","EventHandler","trigger","_element","defaultPrevented","_clearTimeout","classList","add","complete","remove","hide","one","contains","hideEvent","dispose","off","Manipulator","getDataAttributes","constructor","on","clearTimeout","each","data","Data","getData","BaseComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAGA,IAAMA,uBAAuB,GAAG,IAAhC;EACA,IAAMC,cAAc,GAAG,eAAvB;;EAGA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAAAC,GAAG,EAAI;EACpB,MAAIA,GAAG,KAAK,IAAR,IAAgBA,GAAG,KAAKC,SAA5B,EAAu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ff --git a/js/dist/tooltip.js b/js/dist/tooltip.js index 3fba9fd26e..19f7784fab 100644 --- a/js/dist/tooltip.js +++ b/js/dist/tooltip.js @@ -1,13 +1,13 @@ /*! - * Bootstrap tooltip.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap tooltip.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) : - typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global.Popper, global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); -}(this, (function (Popper, Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global.Popper, global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); +}(this, (function (Popper, Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } @@ -36,10 +36,61 @@ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -125,7 +176,7 @@ var valueType = value && isElement(value) ? 'element' : toType(value); if (!new RegExp(expectedTypes).test(valueType)) { - throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); + throw new TypeError(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); } }); }; @@ -178,9 +229,27 @@ var isRTL = document.documentElement.dir === 'rtl'; + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ + + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; + + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; + } + }); + }; + /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/sanitizer.js + * Bootstrap (v5.0.0-beta2): util/sanitizer.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -206,7 +275,7 @@ if (allowedAttributeList.includes(attrName)) { if (uriAttrs.has(attrName)) { - return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN)); + return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue)); } return true; @@ -217,7 +286,7 @@ }); // Check if a regular expression validates the attribute. for (var i = 0, len = regExp.length; i < len; i++) { - if (attrName.match(regExp[i])) { + if (regExp[i].test(attrName)) { return true; } } @@ -305,57 +374,6 @@ return createdDocument.body.innerHTML; } - function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; - } - - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } - - var _proto = BaseComponent.prototype; - - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; - - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; - - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; - } - }]); - - return BaseComponent; - }(); - - function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - - function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - - function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } - - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -377,14 +395,15 @@ html: 'boolean', selector: '(string|boolean)', placement: '(string|function)', + offset: '(array|string|function)', container: '(string|element|boolean)', - fallbackPlacements: '(null|array)', + fallbackPlacements: 'array', boundary: '(string|element)', customClass: '(string|function)', sanitize: 'boolean', sanitizeFn: '(null|function)', allowList: 'object', - popperConfig: '(null|object)' + popperConfig: '(null|object|function)' }; var AttachmentMap = { AUTO: 'auto', @@ -402,8 +421,9 @@ html: false, selector: false, placement: 'top', + offset: [0, 0], container: false, - fallbackPlacements: null, + fallbackPlacements: ['top', 'right', 'bottom', 'left'], boundary: 'clippingParents', customClass: '', sanitize: true, @@ -487,13 +507,7 @@ } if (event) { - var dataKey = this.constructor.DATA_KEY; - var context = Data__default['default'].getData(event.delegateTarget, dataKey); - - if (!context) { - context = new this.constructor(event.delegateTarget, this._getDelegateConfig()); - Data__default['default'].setData(event.delegateTarget, dataKey, context); - } + var context = this._initializeOnDelegatedTarget(event); context._activeTrigger.click = !context._activeTrigger.click; @@ -518,7 +532,7 @@ EventHandler__default['default'].off(this._element, this.constructor.EVENT_KEY); EventHandler__default['default'].off(this._element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler); - if (this.tip) { + if (this.tip && this.tip.parentNode) { this.tip.parentNode.removeChild(this.tip); } @@ -545,81 +559,83 @@ throw new Error('Please use show on visible elements'); } - if (this.isWithContent() && this._isEnabled) { - var showEvent = EventHandler__default['default'].trigger(this._element, this.constructor.Event.SHOW); - var shadowRoot = findShadowRoot(this._element); - var isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element); + if (!(this.isWithContent() && this._isEnabled)) { + return; + } - if (showEvent.defaultPrevented || !isInTheDom) { - return; - } + var showEvent = EventHandler__default['default'].trigger(this._element, this.constructor.Event.SHOW); + var shadowRoot = findShadowRoot(this._element); + var isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element); - var tip = this.getTipElement(); - var tipId = getUID(this.constructor.NAME); - tip.setAttribute('id', tipId); + if (showEvent.defaultPrevented || !isInTheDom) { + return; + } - this._element.setAttribute('aria-describedby', tipId); + var tip = this.getTipElement(); + var tipId = getUID(this.constructor.NAME); + tip.setAttribute('id', tipId); - this.setContent(); + this._element.setAttribute('aria-describedby', tipId); - if (this.config.animation) { - tip.classList.add(CLASS_NAME_FADE); - } + this.setContent(); - var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this._element) : this.config.placement; + if (this.config.animation) { + tip.classList.add(CLASS_NAME_FADE); + } - var attachment = this._getAttachment(placement); + var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this._element) : this.config.placement; - this._addAttachmentClass(attachment); + var attachment = this._getAttachment(placement); - var container = this._getContainer(); + this._addAttachmentClass(attachment); - Data__default['default'].setData(tip, this.constructor.DATA_KEY, this); + var container = this._getContainer(); - if (!this._element.ownerDocument.documentElement.contains(this.tip)) { - container.appendChild(tip); - } + Data__default['default'].setData(tip, this.constructor.DATA_KEY, this); - EventHandler__default['default'].trigger(this._element, this.constructor.Event.INSERTED); - this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment)); - tip.classList.add(CLASS_NAME_SHOW); - var customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass; + if (!this._element.ownerDocument.documentElement.contains(this.tip)) { + container.appendChild(tip); + } - if (customClass) { - var _tip$classList; + EventHandler__default['default'].trigger(this._element, this.constructor.Event.INSERTED); + this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment)); + tip.classList.add(CLASS_NAME_SHOW); + var customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass; - (_tip$classList = tip.classList).add.apply(_tip$classList, customClass.split(' ')); - } // If this is a touch-enabled device we add extra - // empty mouseover listeners to the body's immediate children; - // only needed because of broken event delegation on iOS - // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html + if (customClass) { + var _tip$classList; + (_tip$classList = tip.classList).add.apply(_tip$classList, customClass.split(' ')); + } // If this is a touch-enabled device we add extra + // empty mouseover listeners to the body's immediate children; + // only needed because of broken event delegation on iOS + // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html - if ('ontouchstart' in document.documentElement) { - var _ref; - (_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) { - EventHandler__default['default'].on(element, 'mouseover', noop()); - }); - } + if ('ontouchstart' in document.documentElement) { + var _ref; - var complete = function complete() { - var prevHoverState = _this2._hoverState; - _this2._hoverState = null; - EventHandler__default['default'].trigger(_this2._element, _this2.constructor.Event.SHOWN); + (_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) { + EventHandler__default['default'].on(element, 'mouseover', noop()); + }); + } - if (prevHoverState === HOVER_STATE_OUT) { - _this2._leave(null, _this2); - } - }; + var complete = function complete() { + var prevHoverState = _this2._hoverState; + _this2._hoverState = null; + EventHandler__default['default'].trigger(_this2._element, _this2.constructor.Event.SHOWN); - if (this.tip.classList.contains(CLASS_NAME_FADE)) { - var transitionDuration = getTransitionDurationFromElement(this.tip); - EventHandler__default['default'].one(this.tip, TRANSITION_END, complete); - emulateTransitionEnd(this.tip, transitionDuration); - } else { - complete(); + if (prevHoverState === HOVER_STATE_OUT) { + _this2._leave(null, _this2); } + }; + + if (this.tip.classList.contains(CLASS_NAME_FADE)) { + var transitionDuration = getTransitionDurationFromElement(this.tip); + EventHandler__default['default'].one(this.tip, 'transitionend', complete); + emulateTransitionEnd(this.tip, transitionDuration); + } else { + complete(); } }; @@ -673,7 +689,7 @@ if (this.tip.classList.contains(CLASS_NAME_FADE)) { var transitionDuration = getTransitionDurationFromElement(tip); - EventHandler__default['default'].one(tip, TRANSITION_END, complete); + EventHandler__default['default'].one(tip, 'transitionend', complete); emulateTransitionEnd(tip, transitionDuration); } else { complete(); @@ -767,26 +783,58 @@ } // Private ; - _proto._getPopperConfig = function _getPopperConfig(attachment) { + _proto._initializeOnDelegatedTarget = function _initializeOnDelegatedTarget(event, context) { + var dataKey = this.constructor.DATA_KEY; + context = context || Data__default['default'].getData(event.delegateTarget, dataKey); + + if (!context) { + context = new this.constructor(event.delegateTarget, this._getDelegateConfig()); + Data__default['default'].setData(event.delegateTarget, dataKey, context); + } + + return context; + }; + + _proto._getOffset = function _getOffset() { var _this4 = this; - var flipModifier = { - name: 'flip', - options: { - altBoundary: true - } - }; + var offset = this.config.offset; - if (this.config.fallbackPlacements) { - flipModifier.options.fallbackPlacements = this.config.fallbackPlacements; + if (typeof offset === 'string') { + return offset.split(',').map(function (val) { + return Number.parseInt(val, 10); + }); } - var defaultBsConfig = { + if (typeof offset === 'function') { + return function (popperData) { + return offset(popperData, _this4._element); + }; + } + + return offset; + }; + + _proto._getPopperConfig = function _getPopperConfig(attachment) { + var _this5 = this; + + var defaultBsPopperConfig = { placement: attachment, - modifiers: [flipModifier, { + modifiers: [{ + name: 'flip', + options: { + altBoundary: true, + fallbackPlacements: this.config.fallbackPlacements + } + }, { + name: 'offset', + options: { + offset: this._getOffset() + } + }, { name: 'preventOverflow', options: { - rootBoundary: this.config.boundary + boundary: this.config.boundary } }, { name: 'arrow', @@ -798,16 +846,16 @@ enabled: true, phase: 'afterWrite', fn: function fn(data) { - return _this4._handlePopperPlacementChange(data); + return _this5._handlePopperPlacementChange(data); } }], onFirstUpdate: function onFirstUpdate(data) { if (data.options.placement !== data.placement) { - _this4._handlePopperPlacementChange(data); + _this5._handlePopperPlacementChange(data); } } }; - return _extends({}, defaultBsConfig, this.config.popperConfig); + return _extends({}, defaultBsPopperConfig, typeof this.config.popperConfig === 'function' ? this.config.popperConfig(defaultBsPopperConfig) : this.config.popperConfig); }; _proto._addAttachmentClass = function _addAttachmentClass(attachment) { @@ -831,29 +879,29 @@ }; _proto._setListeners = function _setListeners() { - var _this5 = this; + var _this6 = this; var triggers = this.config.trigger.split(' '); triggers.forEach(function (trigger) { if (trigger === 'click') { - EventHandler__default['default'].on(_this5._element, _this5.constructor.Event.CLICK, _this5.config.selector, function (event) { - return _this5.toggle(event); + EventHandler__default['default'].on(_this6._element, _this6.constructor.Event.CLICK, _this6.config.selector, function (event) { + return _this6.toggle(event); }); } else if (trigger !== TRIGGER_MANUAL) { - var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN; - var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT; - EventHandler__default['default'].on(_this5._element, eventIn, _this5.config.selector, function (event) { - return _this5._enter(event); + var eventIn = trigger === TRIGGER_HOVER ? _this6.constructor.Event.MOUSEENTER : _this6.constructor.Event.FOCUSIN; + var eventOut = trigger === TRIGGER_HOVER ? _this6.constructor.Event.MOUSELEAVE : _this6.constructor.Event.FOCUSOUT; + EventHandler__default['default'].on(_this6._element, eventIn, _this6.config.selector, function (event) { + return _this6._enter(event); }); - EventHandler__default['default'].on(_this5._element, eventOut, _this5.config.selector, function (event) { - return _this5._leave(event); + EventHandler__default['default'].on(_this6._element, eventOut, _this6.config.selector, function (event) { + return _this6._leave(event); }); } }); this._hideModalHandler = function () { - if (_this5._element) { - _this5.hide(); + if (_this6._element) { + _this6.hide(); } }; @@ -886,13 +934,7 @@ }; _proto._enter = function _enter(event, context) { - var dataKey = this.constructor.DATA_KEY; - context = context || Data__default['default'].getData(event.delegateTarget, dataKey); - - if (!context) { - context = new this.constructor(event.delegateTarget, this._getDelegateConfig()); - Data__default['default'].setData(event.delegateTarget, dataKey, context); - } + context = this._initializeOnDelegatedTarget(event, context); if (event) { context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true; @@ -919,13 +961,7 @@ }; _proto._leave = function _leave(event, context) { - var dataKey = this.constructor.DATA_KEY; - context = context || Data__default['default'].getData(event.delegateTarget, dataKey); - - if (!context) { - context = new this.constructor(event.delegateTarget, this._getDelegateConfig()); - Data__default['default'].setData(event.delegateTarget, dataKey, context); - } + context = this._initializeOnDelegatedTarget(event, context); if (event) { context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false; @@ -1064,7 +1100,7 @@ }); }; - _createClass$1(Tooltip, null, [{ + _createClass(Tooltip, null, [{ key: "Default", get: function get() { return Default; @@ -1097,7 +1133,7 @@ }]); return Tooltip; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * jQuery @@ -1106,21 +1142,7 @@ */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Tooltip.jQueryInterface; - $.fn[NAME].Constructor = Tooltip; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Tooltip.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Tooltip); return Tooltip; diff --git a/js/dist/tooltip.js.map b/js/dist/tooltip.js.map index 3d7bb4bd74..f4cedb664b 100644 --- a/js/dist/tooltip.js.map +++ b/js/dist/tooltip.js.map @@ -1 +1 @@ -{"version":3,"file":"tooltip.js","sources":["../src/util/index.js","../src/util/sanitizer.js","../src/base-component.js","../src/tooltip.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n const hrefAttr = element.getAttribute('href')\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ?\n 'element' :\n toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`)\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nexport {\n TRANSITION_END,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): util/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst uriAttrs = new Set([\n 'background',\n 'cite',\n 'href',\n 'itemtype',\n 'longdesc',\n 'poster',\n 'src',\n 'xlink:href'\n])\n\nconst ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i\n\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi\n\n/**\n * A pattern that matches safe data URLs. Only matches image, video and audio types.\n *\n * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n */\nconst DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[\\d+/a-z]+=*$/i\n\nconst allowedAttribute = (attr, allowedAttributeList) => {\n const attrName = attr.nodeName.toLowerCase()\n\n if (allowedAttributeList.includes(attrName)) {\n if (uriAttrs.has(attrName)) {\n return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))\n }\n\n return true\n }\n\n const regExp = allowedAttributeList.filter(attrRegex => attrRegex instanceof RegExp)\n\n // Check if a regular expression validates the attribute.\n for (let i = 0, len = regExp.length; i < len; i++) {\n if (attrName.match(regExp[i])) {\n return true\n }\n }\n\n return false\n}\n\nexport const DefaultAllowlist = {\n // Global attributes allowed on any supplied element below.\n '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n a: ['target', 'href', 'title', 'rel'],\n area: [],\n b: [],\n br: [],\n col: [],\n code: [],\n div: [],\n em: [],\n hr: [],\n h1: [],\n h2: [],\n h3: [],\n h4: [],\n h5: [],\n h6: [],\n i: [],\n img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],\n li: [],\n ol: [],\n p: [],\n pre: [],\n s: [],\n small: [],\n span: [],\n sub: [],\n sup: [],\n strong: [],\n u: [],\n ul: []\n}\n\nexport function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {\n if (!unsafeHtml.length) {\n return unsafeHtml\n }\n\n if (sanitizeFn && typeof sanitizeFn === 'function') {\n return sanitizeFn(unsafeHtml)\n }\n\n const domParser = new window.DOMParser()\n const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html')\n const allowlistKeys = Object.keys(allowList)\n const elements = [].concat(...createdDocument.body.querySelectorAll('*'))\n\n for (let i = 0, len = elements.length; i < len; i++) {\n const el = elements[i]\n const elName = el.nodeName.toLowerCase()\n\n if (!allowlistKeys.includes(elName)) {\n el.parentNode.removeChild(el)\n\n continue\n }\n\n const attributeList = [].concat(...el.attributes)\n const allowedAttributes = [].concat(allowList['*'] || [], allowList[elName] || [])\n\n attributeList.forEach(attr => {\n if (!allowedAttribute(attr, allowedAttributes)) {\n el.removeAttribute(attr.nodeName)\n }\n })\n }\n\n return createdDocument.body.innerHTML\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst VERSION = '5.0.0-beta1'\n\nclass BaseComponent {\n constructor(element) {\n if (!element) {\n return\n }\n\n this._element = element\n Data.setData(element, this.constructor.DATA_KEY, this)\n }\n\n dispose() {\n Data.removeData(this._element, this.constructor.DATA_KEY)\n this._element = null\n }\n\n /** Static */\n\n static getInstance(element) {\n return Data.getData(element, this.DATA_KEY)\n }\n\n static get VERSION() {\n return VERSION\n }\n}\n\nexport default BaseComponent\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport * as Popper from '@popperjs/core'\n\nimport {\n getjQuery,\n onDOMContentLoaded,\n TRANSITION_END,\n emulateTransitionEnd,\n findShadowRoot,\n getTransitionDurationFromElement,\n getUID,\n isElement,\n isRTL,\n noop,\n typeCheckConfig\n} from './util/index'\nimport {\n DefaultAllowlist,\n sanitizeHtml\n} from './util/sanitizer'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'tooltip'\nconst DATA_KEY = 'bs.tooltip'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst CLASS_PREFIX = 'bs-tooltip'\nconst BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\nconst DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn'])\n\nconst DefaultType = {\n animation: 'boolean',\n template: 'string',\n title: '(string|element|function)',\n trigger: 'string',\n delay: '(number|object)',\n html: 'boolean',\n selector: '(string|boolean)',\n placement: '(string|function)',\n container: '(string|element|boolean)',\n fallbackPlacements: '(null|array)',\n boundary: '(string|element)',\n customClass: '(string|function)',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n allowList: 'object',\n popperConfig: '(null|object)'\n}\n\nconst AttachmentMap = {\n AUTO: 'auto',\n TOP: 'top',\n RIGHT: isRTL ? 'left' : 'right',\n BOTTOM: 'bottom',\n LEFT: isRTL ? 'right' : 'left'\n}\n\nconst Default = {\n animation: true,\n template: '<div class=\"tooltip\" role=\"tooltip\">' +\n '<div class=\"tooltip-arrow\"></div>' +\n '<div class=\"tooltip-inner\"></div>' +\n '</div>',\n trigger: 'hover focus',\n title: '',\n delay: 0,\n html: false,\n selector: false,\n placement: 'top',\n container: false,\n fallbackPlacements: null,\n boundary: 'clippingParents',\n customClass: '',\n sanitize: true,\n sanitizeFn: null,\n allowList: DefaultAllowlist,\n popperConfig: null\n}\n\nconst Event = {\n HIDE: `hide${EVENT_KEY}`,\n HIDDEN: `hidden${EVENT_KEY}`,\n SHOW: `show${EVENT_KEY}`,\n SHOWN: `shown${EVENT_KEY}`,\n INSERTED: `inserted${EVENT_KEY}`,\n CLICK: `click${EVENT_KEY}`,\n FOCUSIN: `focusin${EVENT_KEY}`,\n FOCUSOUT: `focusout${EVENT_KEY}`,\n MOUSEENTER: `mouseenter${EVENT_KEY}`,\n MOUSELEAVE: `mouseleave${EVENT_KEY}`\n}\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_MODAL = 'modal'\nconst CLASS_NAME_SHOW = 'show'\n\nconst HOVER_STATE_SHOW = 'show'\nconst HOVER_STATE_OUT = 'out'\n\nconst SELECTOR_TOOLTIP_INNER = '.tooltip-inner'\n\nconst TRIGGER_HOVER = 'hover'\nconst TRIGGER_FOCUS = 'focus'\nconst TRIGGER_CLICK = 'click'\nconst TRIGGER_MANUAL = 'manual'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Tooltip extends BaseComponent {\n constructor(element, config) {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s tooltips require Popper (https://popper.js.org)')\n }\n\n super(element)\n\n // private\n this._isEnabled = true\n this._timeout = 0\n this._hoverState = ''\n this._activeTrigger = {}\n this._popper = null\n\n // Protected\n this.config = this._getConfig(config)\n this.tip = null\n\n this._setListeners()\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Public\n\n enable() {\n this._isEnabled = true\n }\n\n disable() {\n this._isEnabled = false\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled\n }\n\n toggle(event) {\n if (!this._isEnabled) {\n return\n }\n\n if (event) {\n const dataKey = this.constructor.DATA_KEY\n let context = Data.getData(event.delegateTarget, dataKey)\n\n if (!context) {\n context = new this.constructor(event.delegateTarget, this._getDelegateConfig())\n Data.setData(event.delegateTarget, dataKey, context)\n }\n\n context._activeTrigger.click = !context._activeTrigger.click\n\n if (context._isWithActiveTrigger()) {\n context._enter(null, context)\n } else {\n context._leave(null, context)\n }\n } else {\n if (this.getTipElement().classList.contains(CLASS_NAME_SHOW)) {\n this._leave(null, this)\n return\n }\n\n this._enter(null, this)\n }\n }\n\n dispose() {\n clearTimeout(this._timeout)\n\n EventHandler.off(this._element, this.constructor.EVENT_KEY)\n EventHandler.off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler)\n\n if (this.tip) {\n this.tip.parentNode.removeChild(this.tip)\n }\n\n this._isEnabled = null\n this._timeout = null\n this._hoverState = null\n this._activeTrigger = null\n if (this._popper) {\n this._popper.destroy()\n }\n\n this._popper = null\n this.config = null\n this.tip = null\n super.dispose()\n }\n\n show() {\n if (this._element.style.display === 'none') {\n throw new Error('Please use show on visible elements')\n }\n\n if (this.isWithContent() && this._isEnabled) {\n const showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW)\n const shadowRoot = findShadowRoot(this._element)\n const isInTheDom = shadowRoot === null ?\n this._element.ownerDocument.documentElement.contains(this._element) :\n shadowRoot.contains(this._element)\n\n if (showEvent.defaultPrevented || !isInTheDom) {\n return\n }\n\n const tip = this.getTipElement()\n const tipId = getUID(this.constructor.NAME)\n\n tip.setAttribute('id', tipId)\n this._element.setAttribute('aria-describedby', tipId)\n\n this.setContent()\n\n if (this.config.animation) {\n tip.classList.add(CLASS_NAME_FADE)\n }\n\n const placement = typeof this.config.placement === 'function' ?\n this.config.placement.call(this, tip, this._element) :\n this.config.placement\n\n const attachment = this._getAttachment(placement)\n this._addAttachmentClass(attachment)\n\n const container = this._getContainer()\n Data.setData(tip, this.constructor.DATA_KEY, this)\n\n if (!this._element.ownerDocument.documentElement.contains(this.tip)) {\n container.appendChild(tip)\n }\n\n EventHandler.trigger(this._element, this.constructor.Event.INSERTED)\n\n this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment))\n\n tip.classList.add(CLASS_NAME_SHOW)\n\n const customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass\n if (customClass) {\n tip.classList.add(...customClass.split(' '))\n }\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children).forEach(element => {\n EventHandler.on(element, 'mouseover', noop())\n })\n }\n\n const complete = () => {\n const prevHoverState = this._hoverState\n\n this._hoverState = null\n EventHandler.trigger(this._element, this.constructor.Event.SHOWN)\n\n if (prevHoverState === HOVER_STATE_OUT) {\n this._leave(null, this)\n }\n }\n\n if (this.tip.classList.contains(CLASS_NAME_FADE)) {\n const transitionDuration = getTransitionDurationFromElement(this.tip)\n EventHandler.one(this.tip, TRANSITION_END, complete)\n emulateTransitionEnd(this.tip, transitionDuration)\n } else {\n complete()\n }\n }\n }\n\n hide() {\n if (!this._popper) {\n return\n }\n\n const tip = this.getTipElement()\n const complete = () => {\n if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {\n tip.parentNode.removeChild(tip)\n }\n\n this._cleanTipClass()\n this._element.removeAttribute('aria-describedby')\n EventHandler.trigger(this._element, this.constructor.Event.HIDDEN)\n\n if (this._popper) {\n this._popper.destroy()\n this._popper = null\n }\n }\n\n const hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE)\n if (hideEvent.defaultPrevented) {\n return\n }\n\n tip.classList.remove(CLASS_NAME_SHOW)\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children)\n .forEach(element => EventHandler.off(element, 'mouseover', noop))\n }\n\n this._activeTrigger[TRIGGER_CLICK] = false\n this._activeTrigger[TRIGGER_FOCUS] = false\n this._activeTrigger[TRIGGER_HOVER] = false\n\n if (this.tip.classList.contains(CLASS_NAME_FADE)) {\n const transitionDuration = getTransitionDurationFromElement(tip)\n\n EventHandler.one(tip, TRANSITION_END, complete)\n emulateTransitionEnd(tip, transitionDuration)\n } else {\n complete()\n }\n\n this._hoverState = ''\n }\n\n update() {\n if (this._popper !== null) {\n this._popper.update()\n }\n }\n\n // Protected\n\n isWithContent() {\n return Boolean(this.getTitle())\n }\n\n getTipElement() {\n if (this.tip) {\n return this.tip\n }\n\n const element = document.createElement('div')\n element.innerHTML = this.config.template\n\n this.tip = element.children[0]\n return this.tip\n }\n\n setContent() {\n const tip = this.getTipElement()\n this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle())\n tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)\n }\n\n setElementContent(element, content) {\n if (element === null) {\n return\n }\n\n if (typeof content === 'object' && isElement(content)) {\n if (content.jquery) {\n content = content[0]\n }\n\n // content is a DOM node or a jQuery\n if (this.config.html) {\n if (content.parentNode !== element) {\n element.innerHTML = ''\n element.appendChild(content)\n }\n } else {\n element.textContent = content.textContent\n }\n\n return\n }\n\n if (this.config.html) {\n if (this.config.sanitize) {\n content = sanitizeHtml(content, this.config.allowList, this.config.sanitizeFn)\n }\n\n element.innerHTML = content\n } else {\n element.textContent = content\n }\n }\n\n getTitle() {\n let title = this._element.getAttribute('data-bs-original-title')\n\n if (!title) {\n title = typeof this.config.title === 'function' ?\n this.config.title.call(this._element) :\n this.config.title\n }\n\n return title\n }\n\n updateAttachment(attachment) {\n if (attachment === 'right') {\n return 'end'\n }\n\n if (attachment === 'left') {\n return 'start'\n }\n\n return attachment\n }\n\n // Private\n\n _getPopperConfig(attachment) {\n const flipModifier = {\n name: 'flip',\n options: {\n altBoundary: true\n }\n }\n\n if (this.config.fallbackPlacements) {\n flipModifier.options.fallbackPlacements = this.config.fallbackPlacements\n }\n\n const defaultBsConfig = {\n placement: attachment,\n modifiers: [\n flipModifier,\n {\n name: 'preventOverflow',\n options: {\n rootBoundary: this.config.boundary\n }\n },\n {\n name: 'arrow',\n options: {\n element: `.${this.constructor.NAME}-arrow`\n }\n },\n {\n name: 'onChange',\n enabled: true,\n phase: 'afterWrite',\n fn: data => this._handlePopperPlacementChange(data)\n }\n ],\n onFirstUpdate: data => {\n if (data.options.placement !== data.placement) {\n this._handlePopperPlacementChange(data)\n }\n }\n }\n\n return {\n ...defaultBsConfig,\n ...this.config.popperConfig\n }\n }\n\n _addAttachmentClass(attachment) {\n this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`)\n }\n\n _getContainer() {\n if (this.config.container === false) {\n return document.body\n }\n\n if (isElement(this.config.container)) {\n return this.config.container\n }\n\n return SelectorEngine.findOne(this.config.container)\n }\n\n _getAttachment(placement) {\n return AttachmentMap[placement.toUpperCase()]\n }\n\n _setListeners() {\n const triggers = this.config.trigger.split(' ')\n\n triggers.forEach(trigger => {\n if (trigger === 'click') {\n EventHandler.on(this._element, this.constructor.Event.CLICK, this.config.selector, event => this.toggle(event)\n )\n } else if (trigger !== TRIGGER_MANUAL) {\n const eventIn = trigger === TRIGGER_HOVER ?\n this.constructor.Event.MOUSEENTER :\n this.constructor.Event.FOCUSIN\n const eventOut = trigger === TRIGGER_HOVER ?\n this.constructor.Event.MOUSELEAVE :\n this.constructor.Event.FOCUSOUT\n\n EventHandler.on(this._element, eventIn, this.config.selector, event => this._enter(event))\n EventHandler.on(this._element, eventOut, this.config.selector, event => this._leave(event))\n }\n })\n\n this._hideModalHandler = () => {\n if (this._element) {\n this.hide()\n }\n }\n\n EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler)\n\n if (this.config.selector) {\n this.config = {\n ...this.config,\n trigger: 'manual',\n selector: ''\n }\n } else {\n this._fixTitle()\n }\n }\n\n _fixTitle() {\n const title = this._element.getAttribute('title')\n const originalTitleType = typeof this._element.getAttribute('data-bs-original-title')\n\n if (title || originalTitleType !== 'string') {\n this._element.setAttribute('data-bs-original-title', title || '')\n if (title && !this._element.getAttribute('aria-label') && !this._element.textContent) {\n this._element.setAttribute('aria-label', title)\n }\n\n this._element.setAttribute('title', '')\n }\n }\n\n _enter(event, context) {\n const dataKey = this.constructor.DATA_KEY\n context = context || Data.getData(event.delegateTarget, dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.delegateTarget,\n this._getDelegateConfig()\n )\n Data.setData(event.delegateTarget, dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER\n ] = true\n }\n\n if (context.getTipElement().classList.contains(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {\n context._hoverState = HOVER_STATE_SHOW\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HOVER_STATE_SHOW\n\n if (!context.config.delay || !context.config.delay.show) {\n context.show()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HOVER_STATE_SHOW) {\n context.show()\n }\n }, context.config.delay.show)\n }\n\n _leave(event, context) {\n const dataKey = this.constructor.DATA_KEY\n context = context || Data.getData(event.delegateTarget, dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.delegateTarget,\n this._getDelegateConfig()\n )\n Data.setData(event.delegateTarget, dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER\n ] = false\n }\n\n if (context._isWithActiveTrigger()) {\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HOVER_STATE_OUT\n\n if (!context.config.delay || !context.config.delay.hide) {\n context.hide()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HOVER_STATE_OUT) {\n context.hide()\n }\n }, context.config.delay.hide)\n }\n\n _isWithActiveTrigger() {\n for (const trigger in this._activeTrigger) {\n if (this._activeTrigger[trigger]) {\n return true\n }\n }\n\n return false\n }\n\n _getConfig(config) {\n const dataAttributes = Manipulator.getDataAttributes(this._element)\n\n Object.keys(dataAttributes).forEach(dataAttr => {\n if (DISALLOWED_ATTRIBUTES.has(dataAttr)) {\n delete dataAttributes[dataAttr]\n }\n })\n\n if (config && typeof config.container === 'object' && config.container.jquery) {\n config.container = config.container[0]\n }\n\n config = {\n ...this.constructor.Default,\n ...dataAttributes,\n ...(typeof config === 'object' && config ? config : {})\n }\n\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n }\n }\n\n if (typeof config.title === 'number') {\n config.title = config.title.toString()\n }\n\n if (typeof config.content === 'number') {\n config.content = config.content.toString()\n }\n\n typeCheckConfig(NAME, config, this.constructor.DefaultType)\n\n if (config.sanitize) {\n config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn)\n }\n\n return config\n }\n\n _getDelegateConfig() {\n const config = {}\n\n if (this.config) {\n for (const key in this.config) {\n if (this.constructor.Default[key] !== this.config[key]) {\n config[key] = this.config[key]\n }\n }\n }\n\n return config\n }\n\n _cleanTipClass() {\n const tip = this.getTipElement()\n const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX)\n if (tabClass !== null && tabClass.length > 0) {\n tabClass.map(token => token.trim())\n .forEach(tClass => tip.classList.remove(tClass))\n }\n }\n\n _handlePopperPlacementChange(popperData) {\n const { state } = popperData\n\n if (!state) {\n return\n }\n\n this.tip = state.elements.popper\n this._cleanTipClass()\n this._addAttachmentClass(this._getAttachment(state.placement))\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.getData(this, DATA_KEY)\n const _config = typeof config === 'object' && config\n\n if (!data && /dispose|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Tooltip(this, _config)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Tooltip to jQuery only if jQuery is present\n */\n\nonDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n $.fn[NAME] = Tooltip.jQueryInterface\n $.fn[NAME].Constructor = Tooltip\n $.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tooltip.jQueryInterface\n }\n }\n})\n\nexport default Tooltip\n"],"names":["MAX_UID","MILLISECONDS_MULTIPLIER","TRANSITION_END","toType","obj","undefined","toString","call","match","toLowerCase","getUID","prefix","Math","floor","random","document","getElementById","getTransitionDurationFromElement","element","window","getComputedStyle","transitionDuration","transitionDelay","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","split","triggerTransitionEnd","dispatchEvent","Event","isElement","nodeType","emulateTransitionEnd","duration","called","durationPadding","emulatedDuration","listener","removeEventListener","addEventListener","setTimeout","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","Error","toUpperCase","findShadowRoot","documentElement","attachShadow","getRootNode","root","ShadowRoot","parentNode","noop","getjQuery","jQuery","body","hasAttribute","onDOMContentLoaded","callback","readyState","isRTL","dir","uriAttrs","Set","ARIA_ATTRIBUTE_PATTERN","SAFE_URL_PATTERN","DATA_URL_PATTERN","allowedAttribute","attr","allowedAttributeList","attrName","nodeName","includes","has","Boolean","nodeValue","regExp","filter","attrRegex","i","len","length","DefaultAllowlist","a","area","b","br","col","code","div","em","hr","h1","h2","h3","h4","h5","h6","img","li","ol","p","pre","s","small","span","sub","sup","strong","u","ul","sanitizeHtml","unsafeHtml","allowList","sanitizeFn","domParser","DOMParser","createdDocument","parseFromString","allowlistKeys","elements","concat","querySelectorAll","el","elName","removeChild","attributeList","attributes","allowedAttributes","removeAttribute","innerHTML","VERSION","BaseComponent","_element","Data","setData","constructor","DATA_KEY","dispose","removeData","getInstance","getData","NAME","EVENT_KEY","CLASS_PREFIX","BSCLS_PREFIX_REGEX","DISALLOWED_ATTRIBUTES","DefaultType","animation","template","title","trigger","delay","html","selector","placement","container","fallbackPlacements","boundary","customClass","sanitize","popperConfig","AttachmentMap","AUTO","TOP","RIGHT","BOTTOM","LEFT","Default","HIDE","HIDDEN","SHOW","SHOWN","INSERTED","CLICK","FOCUSIN","FOCUSOUT","MOUSEENTER","MOUSELEAVE","CLASS_NAME_FADE","CLASS_NAME_MODAL","CLASS_NAME_SHOW","HOVER_STATE_SHOW","HOVER_STATE_OUT","SELECTOR_TOOLTIP_INNER","TRIGGER_HOVER","TRIGGER_FOCUS","TRIGGER_CLICK","TRIGGER_MANUAL","Tooltip","Popper","TypeError","_isEnabled","_timeout","_hoverState","_activeTrigger","_popper","_getConfig","tip","_setListeners","enable","disable","toggleEnabled","toggle","event","dataKey","context","delegateTarget","_getDelegateConfig","click","_isWithActiveTrigger","_enter","_leave","getTipElement","classList","contains","clearTimeout","EventHandler","off","closest","_hideModalHandler","destroy","show","style","display","isWithContent","showEvent","shadowRoot","isInTheDom","ownerDocument","defaultPrevented","tipId","setAttribute","setContent","add","attachment","_getAttachment","_addAttachmentClass","_getContainer","appendChild","_getPopperConfig","children","on","complete","prevHoverState","one","hide","_cleanTipClass","hideEvent","remove","update","getTitle","createElement","setElementContent","SelectorEngine","findOne","content","jquery","textContent","getAttribute","updateAttachment","flipModifier","name","options","altBoundary","defaultBsConfig","modifiers","rootBoundary","enabled","phase","fn","data","_handlePopperPlacementChange","onFirstUpdate","triggers","eventIn","eventOut","_fixTitle","originalTitleType","type","dataAttributes","Manipulator","getDataAttributes","dataAttr","key","tabClass","map","token","trim","tClass","popperData","state","popper","jQueryInterface","each","_config","$","JQUERY_NO_CONFLICT","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAEA,IAAMA,OAAO,GAAG,OAAhB;EACA,IAAMC,uBAAuB,GAAG,IAAhC;EACA,IAAMC,cAAc,GAAG,eAAvB;;EAGA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAAAC,GAAG,EAAI;EACpB,MAAIA,GAAG,KAAK,IAAR,IAAgBA,GAAG,KAAKC,SAA5B,EAAuC;EACrC,gBAAUD,GAAV;EACD;;EAED,SAAO,GAAGE,QAAH,CAAYC,IAAZ,CAAiBH,GAAjB,EAAsBI,KAAtB,CAA4B,aAA5B,EAA2C,CAA3C,EAA8CC,WAA9C,EAAP;EACD,CAND;EAQA;EACA;EACA;EACA;EACA;;;EAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAAAC,MAAM,EAAI;EACvB,KAAG;EACDA,IAAAA,MAAM,IAAIC,IAAI,CAACC,KAAL,CAAWD,IAAI,CAACE,MAAL,KAAgBd,OAA3B,CAAV;EACD,GAFD,QAESe,QAA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/J,MAAlC,QAAN;EACD;;EAED+O,QAAAA,IAAI,CAAC/O,MAAD,CAAJ;EACD;EACF,KAnBM,CAAP;EAoBD;;;;0BAnnBoB;EACnB,aAAOwI,OAAP;EACD;;;0BAEiB;EAChB,aAAO1B,IAAP;EACD;;;0BAEqB;EACpB,aAAOL,QAAP;EACD;;;0BAEkB;EACjB,aAAOvH,OAAP;EACD;;;0BAEsB;EACrB,aAAO6H,SAAP;EACD;;;0BAEwB;EACvB,aAAOI,WAAP;EACD;;;;IA9CmBf;EA8oBtB;EACA;EACA;EACA;EACA;EACA;;;EAEA3E,kBAAkB,CAAC,YAAM;EACvB,MAAM+O,CAAC,GAAGnP,SAAS,EAAnB;EACA;;EACA,MAAImP,CAAJ,EAAO;EACL,QAAMC,kBAAkB,GAAGD,CAAC,CAAC1B,EAAF,CAAKhI,IAAL,CAA3B;EACA0J,IAAAA,CAAC,CAAC1B,EAAF,CAAKhI,IAAL,IAAa+C,OAAO,CAACwG,eAArB;EACAG,IAAAA,CAAC,CAAC1B,EAAF,CAAKhI,IAAL,EAAW4J,WAAX,GAAyB7G,OAAzB;;EACA2G,IAAAA,CAAC,CAAC1B,EAAF,CAAKhI,IAAL,EAAW6J,UAAX,GAAwB,YAAM;EAC5BH,MAAAA,CAAC,CAAC1B,EAAF,CAAKhI,IAAL,IAAa2J,kBAAb;EACA,aAAO5G,OAAO,CAACwG,eAAf;EACD,KAHD;EAID;EACF,CAZiB,CAAlB;;;;;;;;"}
\ No newline at end of file +{"version":3,"file":"tooltip.js","sources":["../src/util/index.js","../src/util/sanitizer.js","../src/tooltip.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = '#' + hrefAttr.split('#')[1]\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = (name, plugin) => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nexport {\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): util/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst uriAttrs = new Set([\n 'background',\n 'cite',\n 'href',\n 'itemtype',\n 'longdesc',\n 'poster',\n 'src',\n 'xlink:href'\n])\n\nconst ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i\n\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi\n\n/**\n * A pattern that matches safe data URLs. Only matches image, video and audio types.\n *\n * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n */\nconst DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[\\d+/a-z]+=*$/i\n\nconst allowedAttribute = (attr, allowedAttributeList) => {\n const attrName = attr.nodeName.toLowerCase()\n\n if (allowedAttributeList.includes(attrName)) {\n if (uriAttrs.has(attrName)) {\n return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue))\n }\n\n return true\n }\n\n const regExp = allowedAttributeList.filter(attrRegex => attrRegex instanceof RegExp)\n\n // Check if a regular expression validates the attribute.\n for (let i = 0, len = regExp.length; i < len; i++) {\n if (regExp[i].test(attrName)) {\n return true\n }\n }\n\n return false\n}\n\nexport const DefaultAllowlist = {\n // Global attributes allowed on any supplied element below.\n '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n a: ['target', 'href', 'title', 'rel'],\n area: [],\n b: [],\n br: [],\n col: [],\n code: [],\n div: [],\n em: [],\n hr: [],\n h1: [],\n h2: [],\n h3: [],\n h4: [],\n h5: [],\n h6: [],\n i: [],\n img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],\n li: [],\n ol: [],\n p: [],\n pre: [],\n s: [],\n small: [],\n span: [],\n sub: [],\n sup: [],\n strong: [],\n u: [],\n ul: []\n}\n\nexport function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {\n if (!unsafeHtml.length) {\n return unsafeHtml\n }\n\n if (sanitizeFn && typeof sanitizeFn === 'function') {\n return sanitizeFn(unsafeHtml)\n }\n\n const domParser = new window.DOMParser()\n const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html')\n const allowlistKeys = Object.keys(allowList)\n const elements = [].concat(...createdDocument.body.querySelectorAll('*'))\n\n for (let i = 0, len = elements.length; i < len; i++) {\n const el = elements[i]\n const elName = el.nodeName.toLowerCase()\n\n if (!allowlistKeys.includes(elName)) {\n el.parentNode.removeChild(el)\n\n continue\n }\n\n const attributeList = [].concat(...el.attributes)\n const allowedAttributes = [].concat(allowList['*'] || [], allowList[elName] || [])\n\n attributeList.forEach(attr => {\n if (!allowedAttribute(attr, allowedAttributes)) {\n el.removeAttribute(attr.nodeName)\n }\n })\n }\n\n return createdDocument.body.innerHTML\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport * as Popper from '@popperjs/core'\n\nimport {\n defineJQueryPlugin,\n emulateTransitionEnd,\n findShadowRoot,\n getTransitionDurationFromElement,\n getUID,\n isElement,\n isRTL,\n noop,\n typeCheckConfig\n} from './util/index'\nimport {\n DefaultAllowlist,\n sanitizeHtml\n} from './util/sanitizer'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'tooltip'\nconst DATA_KEY = 'bs.tooltip'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst CLASS_PREFIX = 'bs-tooltip'\nconst BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\nconst DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn'])\n\nconst DefaultType = {\n animation: 'boolean',\n template: 'string',\n title: '(string|element|function)',\n trigger: 'string',\n delay: '(number|object)',\n html: 'boolean',\n selector: '(string|boolean)',\n placement: '(string|function)',\n offset: '(array|string|function)',\n container: '(string|element|boolean)',\n fallbackPlacements: 'array',\n boundary: '(string|element)',\n customClass: '(string|function)',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n allowList: 'object',\n popperConfig: '(null|object|function)'\n}\n\nconst AttachmentMap = {\n AUTO: 'auto',\n TOP: 'top',\n RIGHT: isRTL ? 'left' : 'right',\n BOTTOM: 'bottom',\n LEFT: isRTL ? 'right' : 'left'\n}\n\nconst Default = {\n animation: true,\n template: '<div class=\"tooltip\" role=\"tooltip\">' +\n '<div class=\"tooltip-arrow\"></div>' +\n '<div class=\"tooltip-inner\"></div>' +\n '</div>',\n trigger: 'hover focus',\n title: '',\n delay: 0,\n html: false,\n selector: false,\n placement: 'top',\n offset: [0, 0],\n container: false,\n fallbackPlacements: ['top', 'right', 'bottom', 'left'],\n boundary: 'clippingParents',\n customClass: '',\n sanitize: true,\n sanitizeFn: null,\n allowList: DefaultAllowlist,\n popperConfig: null\n}\n\nconst Event = {\n HIDE: `hide${EVENT_KEY}`,\n HIDDEN: `hidden${EVENT_KEY}`,\n SHOW: `show${EVENT_KEY}`,\n SHOWN: `shown${EVENT_KEY}`,\n INSERTED: `inserted${EVENT_KEY}`,\n CLICK: `click${EVENT_KEY}`,\n FOCUSIN: `focusin${EVENT_KEY}`,\n FOCUSOUT: `focusout${EVENT_KEY}`,\n MOUSEENTER: `mouseenter${EVENT_KEY}`,\n MOUSELEAVE: `mouseleave${EVENT_KEY}`\n}\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_MODAL = 'modal'\nconst CLASS_NAME_SHOW = 'show'\n\nconst HOVER_STATE_SHOW = 'show'\nconst HOVER_STATE_OUT = 'out'\n\nconst SELECTOR_TOOLTIP_INNER = '.tooltip-inner'\n\nconst TRIGGER_HOVER = 'hover'\nconst TRIGGER_FOCUS = 'focus'\nconst TRIGGER_CLICK = 'click'\nconst TRIGGER_MANUAL = 'manual'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Tooltip extends BaseComponent {\n constructor(element, config) {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s tooltips require Popper (https://popper.js.org)')\n }\n\n super(element)\n\n // private\n this._isEnabled = true\n this._timeout = 0\n this._hoverState = ''\n this._activeTrigger = {}\n this._popper = null\n\n // Protected\n this.config = this._getConfig(config)\n this.tip = null\n\n this._setListeners()\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Public\n\n enable() {\n this._isEnabled = true\n }\n\n disable() {\n this._isEnabled = false\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled\n }\n\n toggle(event) {\n if (!this._isEnabled) {\n return\n }\n\n if (event) {\n const context = this._initializeOnDelegatedTarget(event)\n\n context._activeTrigger.click = !context._activeTrigger.click\n\n if (context._isWithActiveTrigger()) {\n context._enter(null, context)\n } else {\n context._leave(null, context)\n }\n } else {\n if (this.getTipElement().classList.contains(CLASS_NAME_SHOW)) {\n this._leave(null, this)\n return\n }\n\n this._enter(null, this)\n }\n }\n\n dispose() {\n clearTimeout(this._timeout)\n\n EventHandler.off(this._element, this.constructor.EVENT_KEY)\n EventHandler.off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler)\n\n if (this.tip && this.tip.parentNode) {\n this.tip.parentNode.removeChild(this.tip)\n }\n\n this._isEnabled = null\n this._timeout = null\n this._hoverState = null\n this._activeTrigger = null\n if (this._popper) {\n this._popper.destroy()\n }\n\n this._popper = null\n this.config = null\n this.tip = null\n super.dispose()\n }\n\n show() {\n if (this._element.style.display === 'none') {\n throw new Error('Please use show on visible elements')\n }\n\n if (!(this.isWithContent() && this._isEnabled)) {\n return\n }\n\n const showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW)\n const shadowRoot = findShadowRoot(this._element)\n const isInTheDom = shadowRoot === null ?\n this._element.ownerDocument.documentElement.contains(this._element) :\n shadowRoot.contains(this._element)\n\n if (showEvent.defaultPrevented || !isInTheDom) {\n return\n }\n\n const tip = this.getTipElement()\n const tipId = getUID(this.constructor.NAME)\n\n tip.setAttribute('id', tipId)\n this._element.setAttribute('aria-describedby', tipId)\n\n this.setContent()\n\n if (this.config.animation) {\n tip.classList.add(CLASS_NAME_FADE)\n }\n\n const placement = typeof this.config.placement === 'function' ?\n this.config.placement.call(this, tip, this._element) :\n this.config.placement\n\n const attachment = this._getAttachment(placement)\n this._addAttachmentClass(attachment)\n\n const container = this._getContainer()\n Data.setData(tip, this.constructor.DATA_KEY, this)\n\n if (!this._element.ownerDocument.documentElement.contains(this.tip)) {\n container.appendChild(tip)\n }\n\n EventHandler.trigger(this._element, this.constructor.Event.INSERTED)\n\n this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment))\n\n tip.classList.add(CLASS_NAME_SHOW)\n\n const customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass\n if (customClass) {\n tip.classList.add(...customClass.split(' '))\n }\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children).forEach(element => {\n EventHandler.on(element, 'mouseover', noop())\n })\n }\n\n const complete = () => {\n const prevHoverState = this._hoverState\n\n this._hoverState = null\n EventHandler.trigger(this._element, this.constructor.Event.SHOWN)\n\n if (prevHoverState === HOVER_STATE_OUT) {\n this._leave(null, this)\n }\n }\n\n if (this.tip.classList.contains(CLASS_NAME_FADE)) {\n const transitionDuration = getTransitionDurationFromElement(this.tip)\n EventHandler.one(this.tip, 'transitionend', complete)\n emulateTransitionEnd(this.tip, transitionDuration)\n } else {\n complete()\n }\n }\n\n hide() {\n if (!this._popper) {\n return\n }\n\n const tip = this.getTipElement()\n const complete = () => {\n if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {\n tip.parentNode.removeChild(tip)\n }\n\n this._cleanTipClass()\n this._element.removeAttribute('aria-describedby')\n EventHandler.trigger(this._element, this.constructor.Event.HIDDEN)\n\n if (this._popper) {\n this._popper.destroy()\n this._popper = null\n }\n }\n\n const hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE)\n if (hideEvent.defaultPrevented) {\n return\n }\n\n tip.classList.remove(CLASS_NAME_SHOW)\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children)\n .forEach(element => EventHandler.off(element, 'mouseover', noop))\n }\n\n this._activeTrigger[TRIGGER_CLICK] = false\n this._activeTrigger[TRIGGER_FOCUS] = false\n this._activeTrigger[TRIGGER_HOVER] = false\n\n if (this.tip.classList.contains(CLASS_NAME_FADE)) {\n const transitionDuration = getTransitionDurationFromElement(tip)\n\n EventHandler.one(tip, 'transitionend', complete)\n emulateTransitionEnd(tip, transitionDuration)\n } else {\n complete()\n }\n\n this._hoverState = ''\n }\n\n update() {\n if (this._popper !== null) {\n this._popper.update()\n }\n }\n\n // Protected\n\n isWithContent() {\n return Boolean(this.getTitle())\n }\n\n getTipElement() {\n if (this.tip) {\n return this.tip\n }\n\n const element = document.createElement('div')\n element.innerHTML = this.config.template\n\n this.tip = element.children[0]\n return this.tip\n }\n\n setContent() {\n const tip = this.getTipElement()\n this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle())\n tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)\n }\n\n setElementContent(element, content) {\n if (element === null) {\n return\n }\n\n if (typeof content === 'object' && isElement(content)) {\n if (content.jquery) {\n content = content[0]\n }\n\n // content is a DOM node or a jQuery\n if (this.config.html) {\n if (content.parentNode !== element) {\n element.innerHTML = ''\n element.appendChild(content)\n }\n } else {\n element.textContent = content.textContent\n }\n\n return\n }\n\n if (this.config.html) {\n if (this.config.sanitize) {\n content = sanitizeHtml(content, this.config.allowList, this.config.sanitizeFn)\n }\n\n element.innerHTML = content\n } else {\n element.textContent = content\n }\n }\n\n getTitle() {\n let title = this._element.getAttribute('data-bs-original-title')\n\n if (!title) {\n title = typeof this.config.title === 'function' ?\n this.config.title.call(this._element) :\n this.config.title\n }\n\n return title\n }\n\n updateAttachment(attachment) {\n if (attachment === 'right') {\n return 'end'\n }\n\n if (attachment === 'left') {\n return 'start'\n }\n\n return attachment\n }\n\n // Private\n\n _initializeOnDelegatedTarget(event, context) {\n const dataKey = this.constructor.DATA_KEY\n context = context || Data.getData(event.delegateTarget, dataKey)\n\n if (!context) {\n context = new this.constructor(event.delegateTarget, this._getDelegateConfig())\n Data.setData(event.delegateTarget, dataKey, context)\n }\n\n return context\n }\n\n _getOffset() {\n const { offset } = this.config\n\n if (typeof offset === 'string') {\n return offset.split(',').map(val => Number.parseInt(val, 10))\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element)\n }\n\n return offset\n }\n\n _getPopperConfig(attachment) {\n const defaultBsPopperConfig = {\n placement: attachment,\n modifiers: [\n {\n name: 'flip',\n options: {\n altBoundary: true,\n fallbackPlacements: this.config.fallbackPlacements\n }\n },\n {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n },\n {\n name: 'preventOverflow',\n options: {\n boundary: this.config.boundary\n }\n },\n {\n name: 'arrow',\n options: {\n element: `.${this.constructor.NAME}-arrow`\n }\n },\n {\n name: 'onChange',\n enabled: true,\n phase: 'afterWrite',\n fn: data => this._handlePopperPlacementChange(data)\n }\n ],\n onFirstUpdate: data => {\n if (data.options.placement !== data.placement) {\n this._handlePopperPlacementChange(data)\n }\n }\n }\n\n return {\n ...defaultBsPopperConfig,\n ...(typeof this.config.popperConfig === 'function' ? this.config.popperConfig(defaultBsPopperConfig) : this.config.popperConfig)\n }\n }\n\n _addAttachmentClass(attachment) {\n this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`)\n }\n\n _getContainer() {\n if (this.config.container === false) {\n return document.body\n }\n\n if (isElement(this.config.container)) {\n return this.config.container\n }\n\n return SelectorEngine.findOne(this.config.container)\n }\n\n _getAttachment(placement) {\n return AttachmentMap[placement.toUpperCase()]\n }\n\n _setListeners() {\n const triggers = this.config.trigger.split(' ')\n\n triggers.forEach(trigger => {\n if (trigger === 'click') {\n EventHandler.on(this._element, this.constructor.Event.CLICK, this.config.selector, event => this.toggle(event)\n )\n } else if (trigger !== TRIGGER_MANUAL) {\n const eventIn = trigger === TRIGGER_HOVER ?\n this.constructor.Event.MOUSEENTER :\n this.constructor.Event.FOCUSIN\n const eventOut = trigger === TRIGGER_HOVER ?\n this.constructor.Event.MOUSELEAVE :\n this.constructor.Event.FOCUSOUT\n\n EventHandler.on(this._element, eventIn, this.config.selector, event => this._enter(event))\n EventHandler.on(this._element, eventOut, this.config.selector, event => this._leave(event))\n }\n })\n\n this._hideModalHandler = () => {\n if (this._element) {\n this.hide()\n }\n }\n\n EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler)\n\n if (this.config.selector) {\n this.config = {\n ...this.config,\n trigger: 'manual',\n selector: ''\n }\n } else {\n this._fixTitle()\n }\n }\n\n _fixTitle() {\n const title = this._element.getAttribute('title')\n const originalTitleType = typeof this._element.getAttribute('data-bs-original-title')\n\n if (title || originalTitleType !== 'string') {\n this._element.setAttribute('data-bs-original-title', title || '')\n if (title && !this._element.getAttribute('aria-label') && !this._element.textContent) {\n this._element.setAttribute('aria-label', title)\n }\n\n this._element.setAttribute('title', '')\n }\n }\n\n _enter(event, context) {\n context = this._initializeOnDelegatedTarget(event, context)\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER\n ] = true\n }\n\n if (context.getTipElement().classList.contains(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {\n context._hoverState = HOVER_STATE_SHOW\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HOVER_STATE_SHOW\n\n if (!context.config.delay || !context.config.delay.show) {\n context.show()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HOVER_STATE_SHOW) {\n context.show()\n }\n }, context.config.delay.show)\n }\n\n _leave(event, context) {\n context = this._initializeOnDelegatedTarget(event, context)\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER\n ] = false\n }\n\n if (context._isWithActiveTrigger()) {\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HOVER_STATE_OUT\n\n if (!context.config.delay || !context.config.delay.hide) {\n context.hide()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HOVER_STATE_OUT) {\n context.hide()\n }\n }, context.config.delay.hide)\n }\n\n _isWithActiveTrigger() {\n for (const trigger in this._activeTrigger) {\n if (this._activeTrigger[trigger]) {\n return true\n }\n }\n\n return false\n }\n\n _getConfig(config) {\n const dataAttributes = Manipulator.getDataAttributes(this._element)\n\n Object.keys(dataAttributes).forEach(dataAttr => {\n if (DISALLOWED_ATTRIBUTES.has(dataAttr)) {\n delete dataAttributes[dataAttr]\n }\n })\n\n if (config && typeof config.container === 'object' && config.container.jquery) {\n config.container = config.container[0]\n }\n\n config = {\n ...this.constructor.Default,\n ...dataAttributes,\n ...(typeof config === 'object' && config ? config : {})\n }\n\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n }\n }\n\n if (typeof config.title === 'number') {\n config.title = config.title.toString()\n }\n\n if (typeof config.content === 'number') {\n config.content = config.content.toString()\n }\n\n typeCheckConfig(NAME, config, this.constructor.DefaultType)\n\n if (config.sanitize) {\n config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn)\n }\n\n return config\n }\n\n _getDelegateConfig() {\n const config = {}\n\n if (this.config) {\n for (const key in this.config) {\n if (this.constructor.Default[key] !== this.config[key]) {\n config[key] = this.config[key]\n }\n }\n }\n\n return config\n }\n\n _cleanTipClass() {\n const tip = this.getTipElement()\n const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX)\n if (tabClass !== null && tabClass.length > 0) {\n tabClass.map(token => token.trim())\n .forEach(tClass => tip.classList.remove(tClass))\n }\n }\n\n _handlePopperPlacementChange(popperData) {\n const { state } = popperData\n\n if (!state) {\n return\n }\n\n this.tip = state.elements.popper\n this._cleanTipClass()\n this._addAttachmentClass(this._getAttachment(state.placement))\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.getData(this, DATA_KEY)\n const _config = typeof config === 'object' && config\n\n if (!data && /dispose|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Tooltip(this, _config)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Tooltip to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(NAME, Tooltip)\n\nexport default Tooltip\n"],"names":["MAX_UID","MILLISECONDS_MULTIPLIER","TRANSITION_END","toType","obj","undefined","toString","call","match","toLowerCase","getUID","prefix","Math","floor","random","document","getElementById","getTransitionDurationFromElement","element","window","getComputedStyle","transitionDuration","transitionDelay","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","split","triggerTransitionEnd","dispatchEvent","Event","isElement","nodeType","emulateTransitionEnd","duration","called","durationPadding","emulatedDuration","listener","removeEventListener","addEventListener","setTimeout","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","TypeError","toUpperCase","findShadowRoot","documentElement","attachShadow","getRootNode","root","ShadowRoot","parentNode","noop","getjQuery","jQuery","body","hasAttribute","onDOMContentLoaded","callback","readyState","isRTL","dir","defineJQueryPlugin","name","plugin","$","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","uriAttrs","Set","ARIA_ATTRIBUTE_PATTERN","SAFE_URL_PATTERN","DATA_URL_PATTERN","allowedAttribute","attr","allowedAttributeList","attrName","nodeName","includes","has","Boolean","nodeValue","regExp","filter","attrRegex","i","len","length","DefaultAllowlist","a","area","b","br","col","code","div","em","hr","h1","h2","h3","h4","h5","h6","img","li","ol","p","pre","s","small","span","sub","sup","strong","u","ul","sanitizeHtml","unsafeHtml","allowList","sanitizeFn","domParser","DOMParser","createdDocument","parseFromString","allowlistKeys","elements","concat","querySelectorAll","el","elName","removeChild","attributeList","attributes","allowedAttributes","removeAttribute","innerHTML","NAME","DATA_KEY","EVENT_KEY","CLASS_PREFIX","BSCLS_PREFIX_REGEX","DISALLOWED_ATTRIBUTES","DefaultType","animation","template","title","trigger","delay","html","selector","placement","offset","container","fallbackPlacements","boundary","customClass","sanitize","popperConfig","AttachmentMap","AUTO","TOP","RIGHT","BOTTOM","LEFT","Default","HIDE","HIDDEN","SHOW","SHOWN","INSERTED","CLICK","FOCUSIN","FOCUSOUT","MOUSEENTER","MOUSELEAVE","CLASS_NAME_FADE","CLASS_NAME_MODAL","CLASS_NAME_SHOW","HOVER_STATE_SHOW","HOVER_STATE_OUT","SELECTOR_TOOLTIP_INNER","TRIGGER_HOVER","TRIGGER_FOCUS","TRIGGER_CLICK","TRIGGER_MANUAL","Tooltip","Popper","_isEnabled","_timeout","_hoverState","_activeTrigger","_popper","_getConfig","tip","_setListeners","enable","disable","toggleEnabled","toggle","event","context","_initializeOnDelegatedTarget","click","_isWithActiveTrigger","_enter","_leave","getTipElement","classList","contains","dispose","clearTimeout","EventHandler","off","_element","constructor","closest","_hideModalHandler","destroy","show","style","display","Error","isWithContent","showEvent","shadowRoot","isInTheDom","ownerDocument","defaultPrevented","tipId","setAttribute","setContent","add","attachment","_getAttachment","_addAttachmentClass","_getContainer","Data","setData","appendChild","_getPopperConfig","children","on","complete","prevHoverState","one","hide","_cleanTipClass","hideEvent","remove","update","getTitle","createElement","setElementContent","SelectorEngine","findOne","content","jquery","textContent","getAttribute","updateAttachment","dataKey","getData","delegateTarget","_getDelegateConfig","_getOffset","map","val","parseInt","popperData","defaultBsPopperConfig","modifiers","options","altBoundary","enabled","phase","data","_handlePopperPlacementChange","onFirstUpdate","triggers","eventIn","eventOut","_fixTitle","originalTitleType","type","dataAttributes","Manipulator","getDataAttributes","dataAttr","key","tabClass","token","trim","tClass","state","popper","each","_config","BaseComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAEA,IAAMA,OAAO,GAAG,OAAhB;EACA,IAAMC,uBAAuB,GAAG,IAAhC;EACA,IAAMC,cAAc,GAAG,eAAvB;;EAGA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAAAC,GAAG,EAAI;EACpB,MAAIA,GAAG,KAAK,IAAR,IAAgBA,GAAG,KAAKC,SAA5B,EAAuC;EACrC,gBAAUD,GAAV;EACD;;EAED,SAAO,GAAGE,QAAH,CAAYC,IAAZ,CAAiBH,GAAjB,EAAsBI,KAAtB,CAA4B,aAA5B,EAA2C,CAA3C,EAA8CC,WAA9C,EAAP;EACD,CAND;EAQA;EACA;EACA;EACA;EACA;;;EAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAAAC,MAAM,EAAI;EACvB,KAAG;EACDA,IAAAA,MAAM,IAAIC,IAAI,CAACC,KAAL,CAAWD,IAAI,CAACE,MAAL,KAAgBd,OAA3B,CAAV;EACD,GAFD,QAESe,QAAQ,CAACC,cAAT,CAAwBL,MAAxB,CAFT;;EAIA,SAAOA,MAAP;EACD,CAND;;EAiDA,IAAMM,gCAAgC,GAAG,SAAnCA,gCAAmC,CAAAC,OAAO,EAAI;EAClD,MAAI,CAACA,OAAL,EAAc;EACZ,WAAO,CAAP;EACD,GAHiD;;;EAAA,8BAMJC,MAAM,CAACC,gBAAP,CAAwBF,OAAxB,CANI;EAAA,MAM5CG,kBAN4C,yBAM5CA,kBAN4C;EAAA,MAMxBC,eANwB,yBAMxBA,eANwB;;EAQlD,MAAMC,uBAAuB,GAAGC,MAAM,CAACC,UAAP,CAAkBJ,kBAAlB,CAAhC;EACA,MAAMK,oBAAoB,GAAGF,MAAM,CAACC,UAAP,C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BD,eAAqB;EACnB,aAAOwI,OAAP;EACD;;;WAED,eAAkB;EAChB,aAAO5B,IAAP;EACD;;;WAED,eAAsB;EACpB,aAAOC,QAAP;EACD;;;WAED,eAAmB;EACjB,aAAO3H,OAAP;EACD;;;WAED,eAAuB;EACrB,aAAO4H,SAAP;EACD;;;WAED,eAAyB;EACvB,aAAOI,WAAP;EACD;;;;IA9CmB2J;EAmpBtB;EACA;EACA;EACA;EACA;EACA;;;EAEA/O,kBAAkB,CAAC8E,IAAD,EAAOiD,OAAP,CAAlB;;;;;;;;"}
\ No newline at end of file diff --git a/js/index.esm.js b/js/index.esm.js index 85fc506bee..b1bbf53a8f 100644 --- a/js/index.esm.js +++ b/js/index.esm.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): index.esm.js + * Bootstrap (v5.0.0-beta2): index.esm.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/index.umd.js b/js/index.umd.js index f40d9d756e..5c44ce8d2d 100644 --- a/js/index.umd.js +++ b/js/index.umd.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): index.umd.js + * Bootstrap (v5.0.0-beta2): index.umd.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/src/alert.js b/js/src/alert.js index 96eda4c5fa..3a018a6386 100644 --- a/js/src/alert.js +++ b/js/src/alert.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): alert.js + * Bootstrap (v5.0.0-beta2): alert.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/src/base-component.js b/js/src/base-component.js index cea6c92035..9de274bd09 100644 --- a/js/src/base-component.js +++ b/js/src/base-component.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): base-component.js + * Bootstrap (v5.0.0-beta2): base-component.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -13,7 +13,7 @@ import Data from './dom/data' * ------------------------------------------------------------------------ */ -const VERSION = '5.0.0-beta1' +const VERSION = '5.0.0-beta2' class BaseComponent { constructor(element) { diff --git a/js/src/button.js b/js/src/button.js index e0f74b0655..4ec48ca083 100644 --- a/js/src/button.js +++ b/js/src/button.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): button.js + * Bootstrap (v5.0.0-beta2): button.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/src/carousel.js b/js/src/carousel.js index 2874e6e95d..e4c13d5931 100644 --- a/js/src/carousel.js +++ b/js/src/carousel.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): carousel.js + * Bootstrap (v5.0.0-beta2): carousel.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/src/collapse.js b/js/src/collapse.js index 0d3eeed54b..0a1b475470 100644 --- a/js/src/collapse.js +++ b/js/src/collapse.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): collapse.js + * Bootstrap (v5.0.0-beta2): collapse.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/src/dom/data.js b/js/src/dom/data.js index 822fa9f877..c93a8dc7c5 100644 --- a/js/src/dom/data.js +++ b/js/src/dom/data.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): dom/data.js + * Bootstrap (v5.0.0-beta2): dom/data.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/src/dom/event-handler.js b/js/src/dom/event-handler.js index e3c685530a..5b11ae3d07 100644 --- a/js/src/dom/event-handler.js +++ b/js/src/dom/event-handler.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): dom/event-handler.js + * Bootstrap (v5.0.0-beta2): dom/event-handler.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/src/dom/manipulator.js b/js/src/dom/manipulator.js index b80d7aea37..509797bc06 100644 --- a/js/src/dom/manipulator.js +++ b/js/src/dom/manipulator.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): dom/manipulator.js + * Bootstrap (v5.0.0-beta2): dom/manipulator.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/src/dom/selector-engine.js b/js/src/dom/selector-engine.js index 28287388ef..b310098b54 100644 --- a/js/src/dom/selector-engine.js +++ b/js/src/dom/selector-engine.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): dom/selector-engine.js + * Bootstrap (v5.0.0-beta2): dom/selector-engine.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/src/dropdown.js b/js/src/dropdown.js index 7221debfc2..2516b945a3 100644 --- a/js/src/dropdown.js +++ b/js/src/dropdown.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): dropdown.js + * Bootstrap (v5.0.0-beta2): dropdown.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/src/modal.js b/js/src/modal.js index 551d9a8210..36972ce66c 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): modal.js + * Bootstrap (v5.0.0-beta2): modal.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/src/popover.js b/js/src/popover.js index 4c672b5189..0677dafa09 100644 --- a/js/src/popover.js +++ b/js/src/popover.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): popover.js + * Bootstrap (v5.0.0-beta2): popover.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js index baea494439..43a91e5e93 100644 --- a/js/src/scrollspy.js +++ b/js/src/scrollspy.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): scrollspy.js + * Bootstrap (v5.0.0-beta2): scrollspy.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/src/tab.js b/js/src/tab.js index f1b17ac797..e60ecddb56 100644 --- a/js/src/tab.js +++ b/js/src/tab.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): tab.js + * Bootstrap (v5.0.0-beta2): tab.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/src/toast.js b/js/src/toast.js index e277cdc068..2f451aab76 100644 --- a/js/src/toast.js +++ b/js/src/toast.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): toast.js + * Bootstrap (v5.0.0-beta2): toast.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 42da4c9385..c0f8b7c1e8 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): tooltip.js + * Bootstrap (v5.0.0-beta2): tooltip.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/src/util/index.js b/js/src/util/index.js index bd519cce07..c7856fa62a 100644 --- a/js/src/util/index.js +++ b/js/src/util/index.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/src/util/sanitizer.js b/js/src/util/sanitizer.js index ce3d455a62..18ac6f9438 100644 --- a/js/src/util/sanitizer.js +++ b/js/src/util/sanitizer.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/sanitizer.js + * Bootstrap (v5.0.0-beta2): util/sanitizer.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ |