You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

2 lines
2.4 KiB

define ("theme_ilb/bootstrap/alert",["exports","jquery","./util"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=void 0;b=d(b);c=d(c);function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function f(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function g(a,b,c){if(b)f(a.prototype,b);if(c)f(a,c);return a}var h="bs.alert",i=".".concat(h),j=b.default.fn.alert,k="close".concat(i),l="closed".concat(i),m="click".concat(i).concat(".data-api"),n=function(){function a(b){e(this,a);this._element=b}g(a,[{key:"close",value:function close(a){var b=this._element;if(a){b=this._getRootElement(a)}var c=this._triggerCloseEvent(b);if(c.isDefaultPrevented()){return}this._removeElement(b)}},{key:"dispose",value:function dispose(){b.default.removeData(this._element,h);this._element=null}},{key:"_getRootElement",value:function _getRootElement(a){var d=c.default.getSelectorFromElement(a),e=!1;if(d){e=document.querySelector(d)}if(!e){e=(0,b.default)(a).closest(".".concat("alert"))[0]}return e}},{key:"_triggerCloseEvent",value:function _triggerCloseEvent(a){var c=b.default.Event(k);(0,b.default)(a).trigger(c);return c}},{key:"_removeElement",value:function _removeElement(a){var d=this;(0,b.default)(a).removeClass("show");if(!(0,b.default)(a).hasClass("fade")){this._destroyElement(a);return}var e=c.default.getTransitionDurationFromElement(a);(0,b.default)(a).one(c.default.TRANSITION_END,function(b){return d._destroyElement(a,b)}).emulateTransitionEnd(e)}},{key:"_destroyElement",value:function _destroyElement(a){(0,b.default)(a).detach().trigger(l).remove()}}],[{key:"_jQueryInterface",value:function _jQueryInterface(c){return this.each(function(){var d=(0,b.default)(this),e=d.data(h);if(!e){e=new a(this);d.data(h,e)}if("close"===c){e[c](this)}})}},{key:"_handleDismiss",value:function _handleDismiss(a){return function(b){if(b){b.preventDefault()}a.close(this)}}},{key:"VERSION",get:function get(){return"4.6.0"}}]);return a}();(0,b.default)(document).on(m,"[data-dismiss=\"alert\"]",n._handleDismiss(new n));b.default.fn.alert=n._jQueryInterface;b.default.fn.alert.Constructor=n;b.default.fn.alert.noConflict=function(){b.default.fn.alert=j;return n._jQueryInterface};a.default=n;return a.default});
//# sourceMappingURL=alert.min.js.map