| 
									
										
										
										
											2017-08-30 03:16:00 +08:00
										 |  |  | import $ from 'jquery' | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | import Util from './util' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * -------------------------------------------------------------------------- | 
					
						
							| 
									
										
										
										
											2018-01-19 00:21:22 +08:00
										 |  |  |  * Bootstrap (v4.0.0): modal.js | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 | 
					
						
							|  |  |  |  * -------------------------------------------------------------------------- | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-24 16:12:45 +08:00
										 |  |  | const Modal = (($) => { | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |   /** | 
					
						
							|  |  |  |    * ------------------------------------------------------------------------ | 
					
						
							|  |  |  |    * Constants | 
					
						
							|  |  |  |    * ------------------------------------------------------------------------ | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   const NAME                         = 'modal' | 
					
						
							| 
									
										
										
										
											2018-01-19 00:21:22 +08:00
										 |  |  |   const VERSION                      = '4.0.0' | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |   const DATA_KEY                     = 'bs.modal' | 
					
						
							| 
									
										
										
										
											2015-05-14 03:48:34 +08:00
										 |  |  |   const EVENT_KEY                    = `.${DATA_KEY}` | 
					
						
							|  |  |  |   const DATA_API_KEY                 = '.data-api' | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |   const JQUERY_NO_CONFLICT           = $.fn[NAME] | 
					
						
							|  |  |  |   const TRANSITION_DURATION          = 300 | 
					
						
							|  |  |  |   const BACKDROP_TRANSITION_DURATION = 150 | 
					
						
							| 
									
										
										
										
											2016-05-31 17:19:56 +08:00
										 |  |  |   const ESCAPE_KEYCODE               = 27 // KeyboardEvent.which value for Escape (Esc) key
 | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |   const Default = { | 
					
						
							|  |  |  |     backdrop : true, | 
					
						
							|  |  |  |     keyboard : true, | 
					
						
							| 
									
										
										
										
											2015-05-14 04:22:26 +08:00
										 |  |  |     focus    : true, | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |     show     : true | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-14 05:46:50 +08:00
										 |  |  |   const DefaultType = { | 
					
						
							|  |  |  |     backdrop : '(boolean|string)', | 
					
						
							|  |  |  |     keyboard : 'boolean', | 
					
						
							|  |  |  |     focus    : 'boolean', | 
					
						
							|  |  |  |     show     : 'boolean' | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |   const Event = { | 
					
						
							| 
									
										
										
										
											2015-11-13 03:21:32 +08:00
										 |  |  |     HIDE              : `hide${EVENT_KEY}`, | 
					
						
							|  |  |  |     HIDDEN            : `hidden${EVENT_KEY}`, | 
					
						
							|  |  |  |     SHOW              : `show${EVENT_KEY}`, | 
					
						
							|  |  |  |     SHOWN             : `shown${EVENT_KEY}`, | 
					
						
							| 
									
										
										
										
											2015-05-14 03:48:34 +08:00
										 |  |  |     FOCUSIN           : `focusin${EVENT_KEY}`, | 
					
						
							|  |  |  |     RESIZE            : `resize${EVENT_KEY}`, | 
					
						
							|  |  |  |     CLICK_DISMISS     : `click.dismiss${EVENT_KEY}`, | 
					
						
							|  |  |  |     KEYDOWN_DISMISS   : `keydown.dismiss${EVENT_KEY}`, | 
					
						
							|  |  |  |     MOUSEUP_DISMISS   : `mouseup.dismiss${EVENT_KEY}`, | 
					
						
							|  |  |  |     MOUSEDOWN_DISMISS : `mousedown.dismiss${EVENT_KEY}`, | 
					
						
							|  |  |  |     CLICK_DATA_API    : `click${EVENT_KEY}${DATA_API_KEY}` | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   const ClassName = { | 
					
						
							| 
									
										
										
										
											2015-08-16 03:10:24 +08:00
										 |  |  |     SCROLLBAR_MEASURER : 'modal-scrollbar-measure', | 
					
						
							|  |  |  |     BACKDROP           : 'modal-backdrop', | 
					
						
							|  |  |  |     OPEN               : 'modal-open', | 
					
						
							|  |  |  |     FADE               : 'fade', | 
					
						
							| 
									
										
										
										
											2016-10-28 06:13:17 +08:00
										 |  |  |     SHOW               : 'show' | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   const Selector = { | 
					
						
							|  |  |  |     DIALOG             : '.modal-dialog', | 
					
						
							|  |  |  |     DATA_TOGGLE        : '[data-toggle="modal"]', | 
					
						
							|  |  |  |     DATA_DISMISS       : '[data-dismiss="modal"]', | 
					
						
							| 
									
										
										
										
											2017-04-02 19:26:25 +08:00
										 |  |  |     FIXED_CONTENT      : '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', | 
					
						
							| 
									
										
										
										
											2017-08-26 05:01:41 +08:00
										 |  |  |     STICKY_CONTENT     : '.sticky-top', | 
					
						
							| 
									
										
										
										
											2017-04-02 19:26:25 +08:00
										 |  |  |     NAVBAR_TOGGLER     : '.navbar-toggler' | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /** | 
					
						
							|  |  |  |    * ------------------------------------------------------------------------ | 
					
						
							|  |  |  |    * Class Definition | 
					
						
							|  |  |  |    * ------------------------------------------------------------------------ | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   class Modal { | 
					
						
							|  |  |  |     constructor(element, config) { | 
					
						
							| 
									
										
										
										
											2015-05-14 05:46:50 +08:00
										 |  |  |       this._config              = this._getConfig(config) | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |       this._element             = element | 
					
						
							|  |  |  |       this._dialog              = $(element).find(Selector.DIALOG)[0] | 
					
						
							|  |  |  |       this._backdrop            = null | 
					
						
							|  |  |  |       this._isShown             = false | 
					
						
							|  |  |  |       this._isBodyOverflowing   = false | 
					
						
							|  |  |  |       this._ignoreBackdropClick = false | 
					
						
							|  |  |  |       this._originalBodyPadding = 0 | 
					
						
							|  |  |  |       this._scrollbarWidth      = 0 | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-16 20:00:38 +08:00
										 |  |  |     // Getters
 | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     static get VERSION() { | 
					
						
							|  |  |  |       return VERSION | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     static get Default() { | 
					
						
							|  |  |  |       return Default | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-16 20:00:38 +08:00
										 |  |  |     // Public
 | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     toggle(relatedTarget) { | 
					
						
							|  |  |  |       return this._isShown ? this.hide() : this.show(relatedTarget) | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     show(relatedTarget) { | 
					
						
							| 
									
										
										
										
											2017-10-04 17:08:34 +08:00
										 |  |  |       if (this._isTransitioning || this._isShown) { | 
					
						
							| 
									
										
										
										
											2017-03-29 05:43:16 +08:00
										 |  |  |         return | 
					
						
							| 
									
										
										
										
											2016-12-03 01:52:19 +08:00
										 |  |  |       } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-29 05:43:16 +08:00
										 |  |  |       if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { | 
					
						
							| 
									
										
										
										
											2016-12-03 01:52:19 +08:00
										 |  |  |         this._isTransitioning = true | 
					
						
							|  |  |  |       } | 
					
						
							| 
									
										
										
										
											2017-03-29 05:43:16 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-21 22:36:00 +08:00
										 |  |  |       const showEvent = $.Event(Event.SHOW, { | 
					
						
							| 
									
										
										
										
											2015-08-19 10:22:46 +08:00
										 |  |  |         relatedTarget | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |       }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       $(this._element).trigger(showEvent) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       if (this._isShown || showEvent.isDefaultPrevented()) { | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       this._isShown = true | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       this._checkScrollbar() | 
					
						
							|  |  |  |       this._setScrollbar() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-29 22:42:58 +08:00
										 |  |  |       this._adjustDialog() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |       $(document.body).addClass(ClassName.OPEN) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       this._setEscapeEvent() | 
					
						
							|  |  |  |       this._setResizeEvent() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       $(this._element).on( | 
					
						
							| 
									
										
										
										
											2015-05-14 03:48:34 +08:00
										 |  |  |         Event.CLICK_DISMISS, | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |         Selector.DATA_DISMISS, | 
					
						
							| 
									
										
										
										
											2016-11-01 11:32:36 +08:00
										 |  |  |         (event) => this.hide(event) | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |       ) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-14 03:48:34 +08:00
										 |  |  |       $(this._dialog).on(Event.MOUSEDOWN_DISMISS, () => { | 
					
						
							|  |  |  |         $(this._element).one(Event.MOUSEUP_DISMISS, (event) => { | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |           if ($(event.target).is(this._element)) { | 
					
						
							| 
									
										
										
										
											2015-11-04 07:04:26 +08:00
										 |  |  |             this._ignoreBackdropClick = true | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |           } | 
					
						
							|  |  |  |         }) | 
					
						
							|  |  |  |       }) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-01 11:32:36 +08:00
										 |  |  |       this._showBackdrop(() => this._showElement(relatedTarget)) | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     hide(event) { | 
					
						
							|  |  |  |       if (event) { | 
					
						
							|  |  |  |         event.preventDefault() | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-29 05:43:16 +08:00
										 |  |  |       if (this._isTransitioning || !this._isShown) { | 
					
						
							|  |  |  |         return | 
					
						
							| 
									
										
										
										
											2016-12-03 01:52:19 +08:00
										 |  |  |       } | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-03 01:52:19 +08:00
										 |  |  |       const hideEvent = $.Event(Event.HIDE) | 
					
						
							| 
									
										
										
										
											2017-03-29 05:43:16 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |       $(this._element).trigger(hideEvent) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       if (!this._isShown || hideEvent.isDefaultPrevented()) { | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       this._isShown = false | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-10 19:19:39 +08:00
										 |  |  |       const transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       if (transition) { | 
					
						
							|  |  |  |         this._isTransitioning = true | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |       this._setEscapeEvent() | 
					
						
							|  |  |  |       this._setResizeEvent() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       $(document).off(Event.FOCUSIN) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-28 06:13:17 +08:00
										 |  |  |       $(this._element).removeClass(ClassName.SHOW) | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-14 03:48:34 +08:00
										 |  |  |       $(this._element).off(Event.CLICK_DISMISS) | 
					
						
							|  |  |  |       $(this._dialog).off(Event.MOUSEDOWN_DISMISS) | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-03 01:52:19 +08:00
										 |  |  |       if (transition) { | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |         $(this._element) | 
					
						
							| 
									
										
										
										
											2016-11-01 11:32:36 +08:00
										 |  |  |           .one(Util.TRANSITION_END, (event) => this._hideModal(event)) | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |           .emulateTransitionEnd(TRANSITION_DURATION) | 
					
						
							|  |  |  |       } else { | 
					
						
							|  |  |  |         this._hideModal() | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-14 03:48:34 +08:00
										 |  |  |     dispose() { | 
					
						
							|  |  |  |       $.removeData(this._element, DATA_KEY) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-29 05:42:32 +08:00
										 |  |  |       $(window, document, this._element, this._backdrop).off(EVENT_KEY) | 
					
						
							| 
									
										
										
										
											2015-05-14 03:48:34 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |       this._config              = null | 
					
						
							|  |  |  |       this._element             = null | 
					
						
							|  |  |  |       this._dialog              = null | 
					
						
							|  |  |  |       this._backdrop            = null | 
					
						
							|  |  |  |       this._isShown             = null | 
					
						
							|  |  |  |       this._isBodyOverflowing   = null | 
					
						
							|  |  |  |       this._ignoreBackdropClick = null | 
					
						
							|  |  |  |       this._scrollbarWidth      = null | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-24 05:22:09 +08:00
										 |  |  |     handleUpdate() { | 
					
						
							|  |  |  |       this._adjustDialog() | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-16 20:00:38 +08:00
										 |  |  |     // Private
 | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-14 05:46:50 +08:00
										 |  |  |     _getConfig(config) { | 
					
						
							| 
									
										
										
										
											2017-11-13 18:25:36 +08:00
										 |  |  |       config = { | 
					
						
							|  |  |  |         ...Default, | 
					
						
							|  |  |  |         ...config | 
					
						
							|  |  |  |       } | 
					
						
							| 
									
										
										
										
											2015-05-14 05:46:50 +08:00
										 |  |  |       Util.typeCheckConfig(NAME, config, DefaultType) | 
					
						
							|  |  |  |       return config | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |     _showElement(relatedTarget) { | 
					
						
							| 
									
										
										
										
											2016-11-21 22:36:00 +08:00
										 |  |  |       const transition = Util.supportsTransitionEnd() && | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |         $(this._element).hasClass(ClassName.FADE) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       if (!this._element.parentNode || | 
					
						
							| 
									
										
										
										
											2016-11-21 22:36:00 +08:00
										 |  |  |          this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { | 
					
						
							| 
									
										
										
										
											2017-12-16 20:00:38 +08:00
										 |  |  |         // Don't move modal's DOM position
 | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |         document.body.appendChild(this._element) | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       this._element.style.display = 'block' | 
					
						
							| 
									
										
										
										
											2016-05-11 06:53:49 +08:00
										 |  |  |       this._element.removeAttribute('aria-hidden') | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |       this._element.scrollTop = 0 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       if (transition) { | 
					
						
							|  |  |  |         Util.reflow(this._element) | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-28 06:13:17 +08:00
										 |  |  |       $(this._element).addClass(ClassName.SHOW) | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-08-19 10:22:46 +08:00
										 |  |  |       if (this._config.focus) { | 
					
						
							|  |  |  |         this._enforceFocus() | 
					
						
							|  |  |  |       } | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-21 22:36:00 +08:00
										 |  |  |       const shownEvent = $.Event(Event.SHOWN, { | 
					
						
							| 
									
										
										
										
											2015-08-19 10:22:46 +08:00
										 |  |  |         relatedTarget | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |       }) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-21 22:36:00 +08:00
										 |  |  |       const transitionComplete = () => { | 
					
						
							| 
									
										
										
										
											2015-08-19 10:22:46 +08:00
										 |  |  |         if (this._config.focus) { | 
					
						
							|  |  |  |           this._element.focus() | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2016-12-03 01:52:19 +08:00
										 |  |  |         this._isTransitioning = false | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |         $(this._element).trigger(shownEvent) | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       if (transition) { | 
					
						
							|  |  |  |         $(this._dialog) | 
					
						
							|  |  |  |           .one(Util.TRANSITION_END, transitionComplete) | 
					
						
							|  |  |  |           .emulateTransitionEnd(TRANSITION_DURATION) | 
					
						
							|  |  |  |       } else { | 
					
						
							|  |  |  |         transitionComplete() | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     _enforceFocus() { | 
					
						
							|  |  |  |       $(document) | 
					
						
							| 
									
										
										
										
											2017-12-16 20:00:38 +08:00
										 |  |  |         .off(Event.FOCUSIN) // Guard against infinite focus loop
 | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |         .on(Event.FOCUSIN, (event) => { | 
					
						
							| 
									
										
										
										
											2015-12-23 14:02:57 +08:00
										 |  |  |           if (document !== event.target && | 
					
						
							|  |  |  |               this._element !== event.target && | 
					
						
							| 
									
										
										
										
											2017-12-16 20:00:38 +08:00
										 |  |  |               $(this._element).has(event.target).length === 0) { | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |             this._element.focus() | 
					
						
							|  |  |  |           } | 
					
						
							|  |  |  |         }) | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     _setEscapeEvent() { | 
					
						
							|  |  |  |       if (this._isShown && this._config.keyboard) { | 
					
						
							| 
									
										
										
										
											2015-05-14 03:48:34 +08:00
										 |  |  |         $(this._element).on(Event.KEYDOWN_DISMISS, (event) => { | 
					
						
							| 
									
										
										
										
											2016-05-31 14:42:00 +08:00
										 |  |  |           if (event.which === ESCAPE_KEYCODE) { | 
					
						
							| 
									
										
										
										
											2017-04-09 23:19:20 +08:00
										 |  |  |             event.preventDefault() | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |             this.hide() | 
					
						
							|  |  |  |           } | 
					
						
							|  |  |  |         }) | 
					
						
							|  |  |  |       } else if (!this._isShown) { | 
					
						
							| 
									
										
										
										
											2015-05-14 03:48:34 +08:00
										 |  |  |         $(this._element).off(Event.KEYDOWN_DISMISS) | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |       } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     _setResizeEvent() { | 
					
						
							|  |  |  |       if (this._isShown) { | 
					
						
							| 
									
										
										
										
											2017-03-24 05:22:09 +08:00
										 |  |  |         $(window).on(Event.RESIZE, (event) => this.handleUpdate(event)) | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |       } else { | 
					
						
							|  |  |  |         $(window).off(Event.RESIZE) | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     _hideModal() { | 
					
						
							|  |  |  |       this._element.style.display = 'none' | 
					
						
							| 
									
										
										
										
											2017-03-29 05:43:16 +08:00
										 |  |  |       this._element.setAttribute('aria-hidden', true) | 
					
						
							| 
									
										
										
										
											2016-12-03 01:52:19 +08:00
										 |  |  |       this._isTransitioning = false | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |       this._showBackdrop(() => { | 
					
						
							|  |  |  |         $(document.body).removeClass(ClassName.OPEN) | 
					
						
							|  |  |  |         this._resetAdjustments() | 
					
						
							|  |  |  |         this._resetScrollbar() | 
					
						
							|  |  |  |         $(this._element).trigger(Event.HIDDEN) | 
					
						
							|  |  |  |       }) | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     _removeBackdrop() { | 
					
						
							|  |  |  |       if (this._backdrop) { | 
					
						
							|  |  |  |         $(this._backdrop).remove() | 
					
						
							|  |  |  |         this._backdrop = null | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     _showBackdrop(callback) { | 
					
						
							| 
									
										
										
										
											2017-12-16 20:00:38 +08:00
										 |  |  |       const animate = $(this._element).hasClass(ClassName.FADE) | 
					
						
							|  |  |  |         ? ClassName.FADE : '' | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |       if (this._isShown && this._config.backdrop) { | 
					
						
							| 
									
										
										
										
											2016-11-21 22:36:00 +08:00
										 |  |  |         const doAnimate = Util.supportsTransitionEnd() && animate | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |         this._backdrop = document.createElement('div') | 
					
						
							|  |  |  |         this._backdrop.className = ClassName.BACKDROP | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         if (animate) { | 
					
						
							|  |  |  |           $(this._backdrop).addClass(animate) | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-08-13 12:12:03 +08:00
										 |  |  |         $(this._backdrop).appendTo(document.body) | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-14 03:48:34 +08:00
										 |  |  |         $(this._element).on(Event.CLICK_DISMISS, (event) => { | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |           if (this._ignoreBackdropClick) { | 
					
						
							|  |  |  |             this._ignoreBackdropClick = false | 
					
						
							|  |  |  |             return | 
					
						
							|  |  |  |           } | 
					
						
							|  |  |  |           if (event.target !== event.currentTarget) { | 
					
						
							|  |  |  |             return | 
					
						
							|  |  |  |           } | 
					
						
							|  |  |  |           if (this._config.backdrop === 'static') { | 
					
						
							|  |  |  |             this._element.focus() | 
					
						
							|  |  |  |           } else { | 
					
						
							|  |  |  |             this.hide() | 
					
						
							|  |  |  |           } | 
					
						
							|  |  |  |         }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         if (doAnimate) { | 
					
						
							|  |  |  |           Util.reflow(this._backdrop) | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-28 06:13:17 +08:00
										 |  |  |         $(this._backdrop).addClass(ClassName.SHOW) | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if (!callback) { | 
					
						
							|  |  |  |           return | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         if (!doAnimate) { | 
					
						
							|  |  |  |           callback() | 
					
						
							|  |  |  |           return | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $(this._backdrop) | 
					
						
							|  |  |  |           .one(Util.TRANSITION_END, callback) | 
					
						
							|  |  |  |           .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION) | 
					
						
							|  |  |  |       } else if (!this._isShown && this._backdrop) { | 
					
						
							| 
									
										
										
										
											2016-10-28 06:13:17 +08:00
										 |  |  |         $(this._backdrop).removeClass(ClassName.SHOW) | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-21 22:36:00 +08:00
										 |  |  |         const callbackRemove = () => { | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |           this._removeBackdrop() | 
					
						
							|  |  |  |           if (callback) { | 
					
						
							|  |  |  |             callback() | 
					
						
							|  |  |  |           } | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         if (Util.supportsTransitionEnd() && | 
					
						
							| 
									
										
										
										
											2016-11-21 22:36:00 +08:00
										 |  |  |            $(this._element).hasClass(ClassName.FADE)) { | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |           $(this._backdrop) | 
					
						
							|  |  |  |             .one(Util.TRANSITION_END, callbackRemove) | 
					
						
							|  |  |  |             .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION) | 
					
						
							|  |  |  |         } else { | 
					
						
							|  |  |  |           callbackRemove() | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |       } else if (callback) { | 
					
						
							|  |  |  |         callback() | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // ----------------------------------------------------------------------
 | 
					
						
							|  |  |  |     // the following methods are used to handle overflowing modals
 | 
					
						
							|  |  |  |     // todo (fat): these should probably be refactored out of modal.js
 | 
					
						
							|  |  |  |     // ----------------------------------------------------------------------
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     _adjustDialog() { | 
					
						
							| 
									
										
										
										
											2016-11-21 22:36:00 +08:00
										 |  |  |       const isModalOverflowing = | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |         this._element.scrollHeight > document.documentElement.clientHeight | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       if (!this._isBodyOverflowing && isModalOverflowing) { | 
					
						
							| 
									
										
										
										
											2015-08-19 10:22:46 +08:00
										 |  |  |         this._element.style.paddingLeft = `${this._scrollbarWidth}px` | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |       } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       if (this._isBodyOverflowing && !isModalOverflowing) { | 
					
						
							| 
									
										
										
										
											2016-05-19 04:53:01 +08:00
										 |  |  |         this._element.style.paddingRight = `${this._scrollbarWidth}px` | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |       } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     _resetAdjustments() { | 
					
						
							|  |  |  |       this._element.style.paddingLeft = '' | 
					
						
							|  |  |  |       this._element.style.paddingRight = '' | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     _checkScrollbar() { | 
					
						
							| 
									
										
										
										
											2017-08-29 01:55:45 +08:00
										 |  |  |       const rect = document.body.getBoundingClientRect() | 
					
						
							|  |  |  |       this._isBodyOverflowing = rect.left + rect.right < window.innerWidth | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |       this._scrollbarWidth = this._getScrollbarWidth() | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     _setScrollbar() { | 
					
						
							| 
									
										
										
										
											2017-04-02 19:26:25 +08:00
										 |  |  |       if (this._isBodyOverflowing) { | 
					
						
							|  |  |  |         // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
 | 
					
						
							|  |  |  |         //   while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         // Adjust fixed content padding
 | 
					
						
							|  |  |  |         $(Selector.FIXED_CONTENT).each((index, element) => { | 
					
						
							|  |  |  |           const actualPadding = $(element)[0].style.paddingRight | 
					
						
							|  |  |  |           const calculatedPadding = $(element).css('padding-right') | 
					
						
							|  |  |  |           $(element).data('padding-right', actualPadding).css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`) | 
					
						
							|  |  |  |         }) | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-26 05:01:41 +08:00
										 |  |  |         // Adjust sticky content margin
 | 
					
						
							|  |  |  |         $(Selector.STICKY_CONTENT).each((index, element) => { | 
					
						
							|  |  |  |           const actualMargin = $(element)[0].style.marginRight | 
					
						
							|  |  |  |           const calculatedMargin = $(element).css('margin-right') | 
					
						
							|  |  |  |           $(element).data('margin-right', actualMargin).css('margin-right', `${parseFloat(calculatedMargin) - this._scrollbarWidth}px`) | 
					
						
							|  |  |  |         }) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-02 19:26:25 +08:00
										 |  |  |         // Adjust navbar-toggler margin
 | 
					
						
							|  |  |  |         $(Selector.NAVBAR_TOGGLER).each((index, element) => { | 
					
						
							|  |  |  |           const actualMargin = $(element)[0].style.marginRight | 
					
						
							|  |  |  |           const calculatedMargin = $(element).css('margin-right') | 
					
						
							|  |  |  |           $(element).data('margin-right', actualMargin).css('margin-right', `${parseFloat(calculatedMargin) + this._scrollbarWidth}px`) | 
					
						
							|  |  |  |         }) | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-02 19:26:25 +08:00
										 |  |  |         // Adjust body padding
 | 
					
						
							|  |  |  |         const actualPadding = document.body.style.paddingRight | 
					
						
							|  |  |  |         const calculatedPadding = $('body').css('padding-right') | 
					
						
							|  |  |  |         $('body').data('padding-right', actualPadding).css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`) | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |       } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     _resetScrollbar() { | 
					
						
							| 
									
										
										
										
											2017-04-02 19:26:25 +08:00
										 |  |  |       // Restore fixed content padding
 | 
					
						
							|  |  |  |       $(Selector.FIXED_CONTENT).each((index, element) => { | 
					
						
							|  |  |  |         const padding = $(element).data('padding-right') | 
					
						
							|  |  |  |         if (typeof padding !== 'undefined') { | 
					
						
							|  |  |  |           $(element).css('padding-right', padding).removeData('padding-right') | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |       }) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-26 05:01:41 +08:00
										 |  |  |       // Restore sticky content and navbar-toggler margin
 | 
					
						
							|  |  |  |       $(`${Selector.STICKY_CONTENT}, ${Selector.NAVBAR_TOGGLER}`).each((index, element) => { | 
					
						
							| 
									
										
										
										
											2017-04-02 19:26:25 +08:00
										 |  |  |         const margin = $(element).data('margin-right') | 
					
						
							|  |  |  |         if (typeof margin !== 'undefined') { | 
					
						
							|  |  |  |           $(element).css('margin-right', margin).removeData('margin-right') | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |       }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       // Restore body padding
 | 
					
						
							|  |  |  |       const padding = $('body').data('padding-right') | 
					
						
							|  |  |  |       if (typeof padding !== 'undefined') { | 
					
						
							|  |  |  |         $('body').css('padding-right', padding).removeData('padding-right') | 
					
						
							|  |  |  |       } | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     _getScrollbarWidth() { // thx d.walsh
 | 
					
						
							| 
									
										
										
										
											2016-11-21 22:36:00 +08:00
										 |  |  |       const scrollDiv = document.createElement('div') | 
					
						
							| 
									
										
										
										
											2015-08-16 03:10:24 +08:00
										 |  |  |       scrollDiv.className = ClassName.SCROLLBAR_MEASURER | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |       document.body.appendChild(scrollDiv) | 
					
						
							| 
									
										
										
										
											2017-03-19 09:24:54 +08:00
										 |  |  |       const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |       document.body.removeChild(scrollDiv) | 
					
						
							|  |  |  |       return scrollbarWidth | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-16 20:00:38 +08:00
										 |  |  |     // Static
 | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     static _jQueryInterface(config, relatedTarget) { | 
					
						
							|  |  |  |       return this.each(function () { | 
					
						
							| 
									
										
										
										
											2017-12-16 20:00:38 +08:00
										 |  |  |         let data = $(this).data(DATA_KEY) | 
					
						
							| 
									
										
										
										
											2017-11-13 18:25:36 +08:00
										 |  |  |         const _config = { | 
					
						
							|  |  |  |           ...Modal.Default, | 
					
						
							|  |  |  |           ...$(this).data(), | 
					
						
							|  |  |  |           ...typeof config === 'object' && config | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if (!data) { | 
					
						
							|  |  |  |           data = new Modal(this, _config) | 
					
						
							|  |  |  |           $(this).data(DATA_KEY, data) | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         if (typeof config === 'string') { | 
					
						
							| 
									
										
										
										
											2017-07-27 18:39:55 +08:00
										 |  |  |           if (typeof data[config] === 'undefined') { | 
					
						
							| 
									
										
										
										
											2017-12-16 20:00:38 +08:00
										 |  |  |             throw new TypeError(`No method named "${config}"`) | 
					
						
							| 
									
										
										
										
											2015-09-16 16:35:29 +08:00
										 |  |  |           } | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |           data[config](relatedTarget) | 
					
						
							|  |  |  |         } else if (_config.show) { | 
					
						
							|  |  |  |           data.show(relatedTarget) | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |       }) | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /** | 
					
						
							|  |  |  |    * ------------------------------------------------------------------------ | 
					
						
							|  |  |  |    * Data Api implementation | 
					
						
							|  |  |  |    * ------------------------------------------------------------------------ | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-14 03:48:34 +08:00
										 |  |  |   $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |     let target | 
					
						
							| 
									
										
										
										
											2016-11-21 22:36:00 +08:00
										 |  |  |     const selector = Util.getSelectorFromElement(this) | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     if (selector) { | 
					
						
							|  |  |  |       target = $(selector)[0] | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-16 20:00:38 +08:00
										 |  |  |     const config = $(target).data(DATA_KEY) | 
					
						
							|  |  |  |       ? 'toggle' : { | 
					
						
							| 
									
										
										
										
											2017-11-13 18:25:36 +08:00
										 |  |  |         ...$(target).data(), | 
					
						
							|  |  |  |         ...$(this).data() | 
					
						
							|  |  |  |       } | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-08-05 04:47:30 +08:00
										 |  |  |     if (this.tagName === 'A' || this.tagName === 'AREA') { | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |       event.preventDefault() | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-21 22:36:00 +08:00
										 |  |  |     const $target = $(target).one(Event.SHOW, (showEvent) => { | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |       if (showEvent.isDefaultPrevented()) { | 
					
						
							| 
									
										
										
										
											2017-12-16 20:00:38 +08:00
										 |  |  |         // Only register focus restorer if modal will actually get shown
 | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |         return | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       $target.one(Event.HIDDEN, () => { | 
					
						
							|  |  |  |         if ($(this).is(':visible')) { | 
					
						
							|  |  |  |           this.focus() | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |       }) | 
					
						
							|  |  |  |     }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Modal._jQueryInterface.call($(target), config, this) | 
					
						
							|  |  |  |   }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /** | 
					
						
							|  |  |  |    * ------------------------------------------------------------------------ | 
					
						
							|  |  |  |    * jQuery | 
					
						
							|  |  |  |    * ------------------------------------------------------------------------ | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-16 20:00:38 +08:00
										 |  |  |   $.fn[NAME] = Modal._jQueryInterface | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |   $.fn[NAME].Constructor = Modal | 
					
						
							| 
									
										
										
										
											2017-12-16 20:00:38 +08:00
										 |  |  |   $.fn[NAME].noConflict = function () { | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  |     $.fn[NAME] = JQUERY_NO_CONFLICT | 
					
						
							|  |  |  |     return Modal._jQueryInterface | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return Modal | 
					
						
							| 
									
										
										
										
											2017-10-24 16:12:45 +08:00
										 |  |  | })($) | 
					
						
							| 
									
										
										
										
											2015-05-11 10:45:38 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | export default Modal |