/*! * Bootstrap modal.js v4.5.2 (https://getbootstrap.com/) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","./util.js"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Modal=t(e.jQuery,e.Util)}(this,(function(e,t){"use strict";function i(){return(i=Object.assign||function(e){for(var t=1;tdocument.documentElement.clientHeight;o||(this._element.style.overflowY="hidden"),this._element.classList.add("modal-static");var s=t.getTransitionDurationFromElement(this._dialog);e(this._element).off(t.TRANSITION_END),e(this._element).one(t.TRANSITION_END,(function(){i._element.classList.remove("modal-static"),o||e(i._element).one(t.TRANSITION_END,(function(){i._element.style.overflowY=""})).emulateTransitionEnd(i._element,s)})).emulateTransitionEnd(s),this._element.focus()}else this.hide()},m._showElement=function(i){var n=this,o=e(this._element).hasClass("fade"),s=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),e(this._dialog).hasClass("modal-dialog-scrollable")&&s?s.scrollTop=0:this._element.scrollTop=0,o&&t.reflow(this._element),e(this._element).addClass("show"),this._config.focus&&this._enforceFocus();var a=e.Event("shown.bs.modal",{relatedTarget:i}),r=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,e(n._element).trigger(a)};if(o){var l=t.getTransitionDurationFromElement(this._dialog);e(this._dialog).one(t.TRANSITION_END,r).emulateTransitionEnd(l)}else r()},m._enforceFocus=function(){var t=this;e(document).off("focusin.bs.modal").on("focusin.bs.modal",(function(i){document!==i.target&&t._element!==i.target&&0===e(t._element).has(i.target).length&&t._element.focus()}))},m._setEscapeEvent=function(){var t=this;this._isShown?e(this._element).on("keydown.dismiss.bs.modal",(function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()})):this._isShown||e(this._element).off("keydown.dismiss.bs.modal")},m._setResizeEvent=function(){var t=this;this._isShown?e(window).on("resize.bs.modal",(function(e){return t.handleUpdate(e)})):e(window).off("resize.bs.modal")},m._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){e(document.body).removeClass("modal-open"),t._resetAdjustments(),t._resetScrollbar(),e(t._element).trigger("hidden.bs.modal")}))},m._removeBackdrop=function(){this._backdrop&&(e(this._backdrop).remove(),this._backdrop=null)},m._showBackdrop=function(i){var n=this,o=e(this._element).hasClass("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",o&&this._backdrop.classList.add(o),e(this._backdrop).appendTo(document.body),e(this._element).on("click.dismiss.bs.modal",(function(e){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:e.target===e.currentTarget&&n._triggerBackdropTransition()})),o&&t.reflow(this._backdrop),e(this._backdrop).addClass("show"),!i)return;if(!o)return void i();var s=t.getTransitionDurationFromElement(this._backdrop);e(this._backdrop).one(t.TRANSITION_END,i).emulateTransitionEnd(s)}else if(!this._isShown&&this._backdrop){e(this._backdrop).removeClass("show");var a=function(){n._removeBackdrop(),i&&i()};if(e(this._element).hasClass("fade")){var r=t.getTransitionDurationFromElement(this._backdrop);e(this._backdrop).one(t.TRANSITION_END,a).emulateTransitionEnd(r)}else a()}else i&&i()},m._adjustDialog=function(){var e=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&e&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!e&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},m._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},m._checkScrollbar=function(){var e=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(e.left+e.right)