EdelElements.loadBundle("nxglyjb3",["exports"],function(t){var e,n=window.EdelElements.h;!function(t){t.default="info",t.info="info",t.good="good",t.bad="bad",t.warning="warning"}(e||(e={}));var o=[e.info,e.good,e.bad,e.warning];function i(t){return-1!==o.indexOf(t)}var r=function(){function t(){this.kind=e.default,this.noClose=!1}return t.prototype.render=function(){return[n("div",{class:"toast-icon"},this.renderToastIcon()),n("div",{class:"toast-label"},n("slot",null)),this.noClose?null:this.renderCloseButton()]},t.prototype.hostData=function(){return{class:"toast"}},t.prototype.componentDidLoad=function(){this.handleKindChange(this.kind,e.default)},t.prototype.handleKindChange=function(t,n){!1===i(t)&&(this.kind=e.default),i(n)&&this.host.classList.remove("toast--"+n),this.host.classList.add("toast--"+this.kind)},t.prototype.renderToastIcon=function(){var t=function(t,e){return n("i",{class:"fa fa-"+t+" fa-w-"+e})};switch(this.kind){case e.info:return t("exclamation-triangle",18);case e.good:return t("check-circle",16);case e.bad:return t("times",12);case e.warning:return t("exclamation-triangle",18);default:return null}},t.prototype.renderCloseButton=function(){var t=this;return n("div",{class:"toast-action"},n("edel-button",{icon:"times",slim:!0,plain:!0,onEmit:function(){return t.close.emit()}}))},Object.defineProperty(t,"is",{get:function(){return"edel-toast"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{host:{elementRef:!0},kind:{type:String,attr:"kind",mutable:!0,watchCallbacks:["handleKindChange"]},noClose:{type:Boolean,attr:"no-close"}}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"events",{get:function(){return[{name:"close",method:"close",bubbles:!0,cancelable:!0,composed:!0}]},enumerable:!0,configurable:!0}),t}(),s=function(){function t(){this.toasts=[],this.duration=1e4,this.canClose=!0,this.now=function(){return Date.now()}}return t.prototype.hostData=function(){return{class:"toastgroup"}},t.prototype.render=function(){return[this.toasts.map(function(t){return n("edel-toast",{kind:t.kind,"no-close":!t.options.canClose,onClose:t.close},t.message)}),n("slot",null)]},t.prototype.cleanExpiredToasts=function(){var t=this.currentTimestamp();this.removeToastsWhere(function(e){return 0!==e.options.expire&&e.options.expire<=t},!0)},t.prototype.good=function(t,n){return void 0===n&&(n={}),this.presentToast(e.good,t,n)},t.prototype.bad=function(t,n){return void 0===n&&(n={}),this.presentToast(e.bad,t,n)},t.prototype.info=function(t,n){return void 0===n&&(n={}),this.presentToast(e.info,t,n)},t.prototype.warning=function(t,n){return void 0===n&&(n={}),this.presentToast(e.warning,t,n)},t.prototype.componentDidLoad=function(){this.didLoad.emit(this)},t.prototype.presentToast=function(t,e,n){var o=this,i={message:e,kind:t,options:this.canonicalToastOptions(n),close:function(){return o.removeToast(i)}};return this.toasts=[i].concat(this.toasts),this.scheduleCleanFor(i),i},t.prototype.currentTimestamp=function(){return this.now instanceof Function?this.now():this.now},t.prototype.expiration=function(t){var e="number"==typeof t.duration?t.duration:this.duration;return 0===e?0:"number"==typeof t.expire?t.expire:this.currentTimestamp()+e},t.prototype.scheduleCleanFor=function(t){var e=this;this.now instanceof Function&&setTimeout(function(){return e.cleanExpiredToasts()},t.options.expire-this.currentTimestamp())},t.prototype.removeToast=function(t){this.removeToastsWhere(function(e){return e===t},!1)},t.prototype.removeToastsWhere=function(t,e){this.toasts=this.toasts.filter(function(n){return!t(n)||(n.options.didClose(e),!1)})},t.prototype.canonicalToastOptions=function(t){return{canClose:"boolean"==typeof t.canClose?t.canClose:this.canClose,expire:this.expiration(t),didClose:t.didClose||function(){}}},Object.defineProperty(t,"is",{get:function(){return"edel-toastgroup"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{bad:{method:!0},canClose:{type:Boolean,attr:"can-close"},duration:{type:Number,attr:"duration"},good:{method:!0},info:{method:!0},now:{type:Number,attr:"now",watchCallbacks:["cleanExpiredToasts"]},toasts:{state:!0},warning:{method:!0}}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"events",{get:function(){return[{name:"didLoad",method:"didLoad",bubbles:!0,cancelable:!0,composed:!0}]},enumerable:!0,configurable:!0}),t}();t.EdelToast=r,t.EdelToastgroup=s,Object.defineProperty(t,"__esModule",{value:!0})});