0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00
Bootstrap/js/dist/modal.js.map
2020-12-07 18:18:16 +02:00

1 line
48 KiB
Plaintext

{"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","TypeError","tagName","$","JQUERY_NO_CONFLICT","fn","Constructor","noConflict"],"mappings":";;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