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
4.5 KiB

define ("theme_ilb/bootstrap/toast",["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){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){e=function(a){return typeof a}}else{e=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return e(a)}function f(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);if(b)d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable});c.push.apply(c,d)}return c}function g(a){for(var b=1,c;b<arguments.length;b++){c=null!=arguments[b]?arguments[b]:{};if(b%2){f(Object(c),!0).forEach(function(b){h(a,b,c[b])})}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(a,Object.getOwnPropertyDescriptors(c))}else{f(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}}return a}function h(a,b,c){if(b in a){Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0})}else{a[b]=c}return a}function i(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function j(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 k(a,b,c){if(b)j(a.prototype,b);if(c)j(a,c);return a}var l="bs.toast",m=".".concat(l),n=b.default.fn.toast,o="click.dismiss".concat(m),p="hide".concat(m),q="hidden".concat(m),r="show".concat(m),s="shown".concat(m),t="hide",u="show",v="showing",w={animation:"boolean",autohide:"boolean",delay:"number"},x={animation:!0,autohide:!0,delay:500},y=function(){function a(b,c){i(this,a);this._element=b;this._config=this._getConfig(c);this._timeout=null;this._setListeners()}k(a,[{key:"show",value:function show(){var a=this,d=b.default.Event(r);(0,b.default)(this._element).trigger(d);if(d.isDefaultPrevented()){return}this._clearTimeout();if(this._config.animation){this._element.classList.add("fade")}var e=function(){a._element.classList.remove(v);a._element.classList.add(u);(0,b.default)(a._element).trigger(s);if(a._config.autohide){a._timeout=setTimeout(function(){a.hide()},a._config.delay)}};this._element.classList.remove(t);c.default.reflow(this._element);this._element.classList.add(v);if(this._config.animation){var f=c.default.getTransitionDurationFromElement(this._element);(0,b.default)(this._element).one(c.default.TRANSITION_END,e).emulateTransitionEnd(f)}else{e()}}},{key:"hide",value:function hide(){if(!this._element.classList.contains(u)){return}var a=b.default.Event(p);(0,b.default)(this._element).trigger(a);if(a.isDefaultPrevented()){return}this._close()}},{key:"dispose",value:function dispose(){this._clearTimeout();if(this._element.classList.contains(u)){this._element.classList.remove(u)}(0,b.default)(this._element).off(o);b.default.removeData(this._element,l);this._element=null;this._config=null}},{key:"_getConfig",value:function _getConfig(a){a=g({},x,{},(0,b.default)(this._element).data(),{},"object"===e(a)&&a?a:{});c.default.typeCheckConfig("toast",a,this.constructor.DefaultType);return a}},{key:"_setListeners",value:function _setListeners(){var a=this;(0,b.default)(this._element).on(o,"[data-dismiss=\"toast\"]",function(){return a.hide()})}},{key:"_close",value:function _close(){var a=this,d=function(){a._element.classList.add(t);(0,b.default)(a._element).trigger(q)};this._element.classList.remove(u);if(this._config.animation){var e=c.default.getTransitionDurationFromElement(this._element);(0,b.default)(this._element).one(c.default.TRANSITION_END,d).emulateTransitionEnd(e)}else{d()}}},{key:"_clearTimeout",value:function _clearTimeout(){clearTimeout(this._timeout);this._timeout=null}}],[{key:"_jQueryInterface",value:function _jQueryInterface(c){return this.each(function(){var d=(0,b.default)(this),f=d.data(l),g="object"===e(c)&&c;if(!f){f=new a(this,g);d.data(l,f)}if("string"==typeof c){if("undefined"==typeof f[c]){throw new TypeError("No method named \"".concat(c,"\""))}f[c](this)}})}},{key:"VERSION",get:function get(){return"4.6.0"}},{key:"DefaultType",get:function get(){return w}},{key:"Default",get:function get(){return x}}]);return a}();b.default.fn.toast=y._jQueryInterface;b.default.fn.toast.Constructor=y;b.default.fn.toast.noConflict=function(){b.default.fn.toast=n;return y._jQueryInterface};a.default=y;return a.default});
//# sourceMappingURL=toast.min.js.map