text: !function(t){var e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(o,n,function(e){return t[e]}.bind(null,n));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,i){i(1),t.exports=i(2)},function(t,e,i){"use strict";function o(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}i.r(e);var n=function(){function t(e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),t.instance?t.instance:(t.instance=this,this._dismissAllLock=!1,this._dom={},this._active={},this._queue={},this._default={},this._position="",this._thickBorder="",this._duration=0,this._transition=0,this._maxActive=0,this.version="1.1.0",this._init(e),this)}var e,i,n;return e=t,(i=[{key:"destroy",value:function(){var e=this;document.body.removeChild(this._dom),Object.keys(this).forEach((function(t){delete e[t]})),t.instance=null}},{key:"_init",value:function(t){void 0===t&&(t={}),this._dom=document.createElement("DIV"),this._dom.classList.add("notification-container"),this._default={handler:{position:"top-right",thickBorder:"top",duration:5e3,transition:200,maxActive:10},notification:{type:"info",message:"",title:"",iconless:!1,closable:!0,sticky:!1,renderTo:this._dom,CBtitle:"",callback:null,isDimmed:!1},color:{success:"rgb(76, 175, 80)",info:"rgb(3, 169, 244)",warning:"rgb(255, 152, 0)",error:"rgb(244, 67, 54)"},svgPath:{success:"M12.5 0C5.602 0 0 5.602 0 12.5S5.602 25 12.5 25 25 19.398 25 12.5 19.398 0 12.5 0zm-2.3 18.898l-5.5-5.5 1.8-1.796 3.7 3.699L18.5 7l1.8 1.8zm0 0",info:"M12.504.035a12.468 12.468 0 100 24.937 12.468 12.468 0 000-24.937zM15.1 19.359c-.643.25-1.153.445-1.537.576-.384.134-.825.199-1.333.199-.775 0-1.381-.192-1.813-.57a1.832 1.832 0 01-.642-1.442c0-.227.015-.459.047-.693.03-.24.083-.504.154-.806l.802-2.835c.069-.272.132-.527.182-.77.048-.244.069-.467.069-.668 0-.36-.075-.615-.223-.756-.153-.144-.437-.213-.857-.213-.207 0-.422.036-.639.095a9.914 9.914 0 00-.56.184l.213-.874a19.777 19.777 0 011.51-.549 4.48 4.48 0 011.361-.23c.77 0 1.368.19 1.784.56a1.857 1.857 0 01.626 1.452c0 .122-.012.341-.04.652a4.44 4.44 0 01-.162.856l-.798 2.831a8.133 8.133 0 00-.176.775c-.05.288-.075.51-.075.66 0 .374.082.633.251.771.165.134.458.202.875.202.192 0 .412-.037.66-.1.243-.073.42-.127.531-.18zm-.144-11.483a1.901 1.901 0 01-1.343.518 1.93 1.93 0 01-1.352-.518 1.65 1.65 0 01-.562-1.258 1.688 1.688 0 01.562-1.266 1.914 1.914 0 011.35-.522c.524 0 .975.173 1.345.523a1.673 1.673 0 01.56 1.266 1.65 1.65 0 01-.56 1.257z",warning:"M24.585 21.17L13.774 3.24a1.51 1.51 0 00-2.586 0L.376 21.17a1.51 1.51 0 001.293 2.29h21.623a1.51 1.51 0 001.292-2.29zM12.49 8.714c.621 0 1.146.35 1.146.97 0 1.895-.223 4.618-.223 6.513 0 .494-.541.7-.923.7-.51 0-.94-.208-.94-.701 0-1.894-.223-4.617-.223-6.511 0-.62.51-.971 1.163-.971zm.015 11.734a1.225 1.225 0 01-1.225-1.226c0-.669.525-1.227 1.225-1.227.652 0 1.21.558 1.21 1.227 0 .652-.557 1.225-1.21 1.225z",error:"M12.469.027c-3.332 0-6.465 1.301-8.824 3.653-4.86 4.86-4.86 12.777 0 17.636a12.392 12.392 0 008.824 3.653c3.336 0 6.465-1.301 8.824-3.653 4.863-4.859 4.863-12.777 0-17.636A12.417 12.417 0 0012.469.027zm5.61 18.086a1.137 1.137 0 01-.802.332c-.285 0-.582-.113-.8-.332l-4.008-4.008-4.008 4.008a1.137 1.137 0 01-.8.332c-.286 0-.583-.113-.802-.332a1.132 1.132 0 010-1.605l4.008-4.004L6.86 8.496a1.132 1.132 0 010-1.605 1.127 1.127 0 011.602 0l4.008 4.007 4.008-4.007a1.127 1.127 0 011.601 0c.45.449.45 1.164 0 1.605l-4.004 4.008 4.004 4.004c.45.449.45 1.164 0 1.605zm0 0"}},this._setOptionsDefault(t),this._position=t.position,this._thickBorder=t.thickBorder,this._duration=t.duration,this._transition=t.transition,this._maxActive=t.maxActive,this._setAttributesDefault(),this._dom.classList.add(this._position),this._attach()}},{key:"_setOptionsDefault",value:function(t){void 0===t.position&&(t.position=this._default.handler.position),void 0===t.thickBorder&&(t.thickBorder=this._default.handler.thickBorder),void 0===t.duration&&(t.duration=this._default.handler.duration),void 0===t.transition&&(t.transition=this._default.handler.transition),void 0===t.maxActive&&(t.maxActive=this._default.handler.maxActive)}},{key:"_setAttributesDefault",value:function(){"top-left"!==this._position&&"top-right"!==this._position&&"bottom-left"!==this._position&&"bottom-right"!==this._position&&(this._position=this._default.handler.position),"top"!==this._thickBorder&&"bottom"!==this._thickBorder&&"left"!==this._thickBorder&&"right"!==this._thickBorder&&"none"!==this._thickBorder&&(this._thickBorder=this._default.handler.thickBorder),("number"!=typeof this._duration||this._duration<=0)&&(this._duration=this._default.handler.duration),("number"!=typeof this._transition||this._duration<2*this._transition||this._transition<=0)&&(this._transition=this._default.handler.transition),("number"!=typeof this._maxActive||this._maxActive<=0)&&(this._maxActive=this._default.handler.maxActive)}},{key:"_attach",value:function(){var t=document.createDocumentFragment();t.appendChild(this._dom),document.body.appendChild(t)}},{key:"_events",value:function(t){var e=this,i=!1,o=function(){t.isDimmed&&e._unDim(t)},n=function o(){void 0!==e._active[t.id]&&(t.requestCount>1?e._decrementRequestCounter(t,!0):i||(i=!0,window.clearTimeout(t.timeoutID),t.dom.close.removeEventListener("click",o),e._close(t)))};t.sticky&&(t.dom.addEventListener("mouseenter",o.bind(this)),t.dom.addEventListener("mouseout",o.bind(this))),t.closable&&(t.dom.addEventListener("click",n.bind(this)),t.dom.close.addEventListener("click",n.bind(this))),t.dom.addEventListener("mouseover",function(){void 0!==e._active[t.id]&&(i||t.isDimmed||e._resetTimeout(t))}.bind(this))}},{key:"_buildUI",value:function(t){var e=this;if(t.requestCount=1,t.totalRequestCount=1,this._buildUIDom(t),this._buildNotificationType(t),t.iconless&&t.dom.message.classList.add("iconless-width"),t.dom.text.appendChild(t.dom.maintitle),t.dom.text.appendChild(t.dom.message),t.callback){var i=document.createElement("BUTTON");i.innerHTML=t.CBtitle,t.dom.text.appendChild(i),i.addEventListener("click",(function(){e._close(t),t.callback()}))}return t.iconless||t.dom.appendChild(t.dom.icon),t.dom.appendChild(t.dom.text),t.closable&&t.dom.appendChild(t.dom.close),t}},{key:"_buildUIDom",value:function(t){t.dom=document.createElement("DIV"),t.dom.icon=document.createElementNS("http://www.w3.org/2000/svg","svg"),t.dom.iconPath=document.createElementNS("http://www.w3.org/2000/svg","path"),t.dom.text=document.createElement("DIV"),t.dom.close=document.createElement("DIV"),t.dom.maintitle=document.createElement("H6"),t.dom.message=document.createElement("P"),t.dom.classList.add("notification"),t.dom.icon.classList.add("vector-container"),t.dom.text.classList.add("text-container"),t.dom.close.classList.add("close"),"top"===t.thickBorder?t.dom.classList.add("top-border"):"bottom"===t.thickBorder?t.dom.classList.add("bottom-border"):"left"===t.thickBorder?t.dom.classList.add("left-border"):"right"===t.thickBorder&&t.dom.classList.add("right-border"),t.dom.maintitle.innerHTML=t.title||"",t.dom.message.innerHTML=t.message||"",t.dom.close.innerHTML="&#x2716;",t.dom.icon.setAttribute("viewBox","0 0 25 25"),t.dom.icon.setAttribute("width","25"),t.dom.icon.setAttribute("height","25"),t.dom.icon.appendChild(t.dom.iconPath)}},{key:"_buildNotificationType",value:function(t){-1!==["success","warning","error","info"].indexOf(t.type)?(t.dom.classList.add(t.type),t.iconless||(t.dom.iconPath.setAttribute("fill",this._default.color[t.type]),t.dom.iconPath.setAttribute("d",this._default.svgPath[t.type]))):(t.dom.classList.add("info"),t.iconless||(t.dom.iconPath.setAttribute("fill",this._default.color.info),t.dom.iconPath.setAttribute("d",this._default.svgPath.info)))}},{key:"_start",value:function(t){var e=this;Object.keys(this._active).length>=this._maxActive?this._queue[t.id]=t:(this._active[t.id]=t,this._events(t),this._open(t),t.timeoutID=window.setTimeout((function(){e._checkCounter(t)}),t.duration))}},{key:"_open",value:function(t){"bottom-right"===this._position||"bottom-left"===this._position?t.renderTo.insertBefore(t.dom,t.renderTo.firstChild):t.renderTo.appendChild(t.dom),t.opened=Date.now(),window.setTimeout((function(){t.dom.style.opacity=1}),10)}},{key:"_close",value:function(t){var e=this;t.isClosing||(t.isClosing=!0,t.closed=Date.now(),t.effectiveDuration=t.closed-t.opened,t.dom.style.opacity=0,window.setTimeout((function(){t.renderTo.removeChild(t.dom),delete e._active[t.id],Object.keys(e._queue).length>0?(e._start(e._queue[Object.keys(e._queue)[0]]),delete e._queue[Object.keys(e._queue)[0]]):0===Object.keys(e._active).length&&(e._dismissAllLock=!1)}),1e3))}},{key:"_incrementRequestCounter",value:function(t){if(++t.requestCount,t.totalRequestCount<t.requestCount&&(t.totalRequestCount=t.requestCount),t.requestCount>1){var e="∞";t.requestCount<100&&(e=t.requestCount),t.dom.counter?t.dom.counter.innerHTML=e:(t.dom.counter=document.createElement("DIV"),t.dom.counter.classList.add("counter"),t.dom.counter.innerHTML=e,t.dom.appendChild(t.dom.counter))}t.sticky&&t.isDimmed&&this._unDim(t)}},{key:"_decrementRequestCounter",value:function(t,e){if(!t.sticky||e)if(this._resetTimeout(t),--t.requestCount,t.requestCount>1){var i="∞";t.requestCount<100&&(i=t.requestCount),t.dom.counter.innerHTML=i}else t.dom.removeChild(t.dom.counter),delete t.dom.counter;else t.isDimmed||this._dim(t)}},{key:"_checkCounter",value:function(t){t.requestCount>1?this._decrementRequestCounter(t):t.renderTo.contains(t.dom)&&(window.clearTimeout(t.timeoutID),t.sticky?this._dim(t):this._close(t))}},{key:"_clearRequestCount",value:function(t){t.requestCount=1,t.dom.removeChild(t.dom.counter),delete t.dom.counter}},{key:"_resetTimeout",value:function(t){var e=this;window.clearTimeout(t.timeoutID),t.timeoutID=window.setTimeout((function(){e._checkCounter(t)}),t.duration)}},{key:"_dim",value:function(t){var e=this,i=100;!function o(){if(i>=0&&(t.dom.style.opacity=i/100,50==--i&&t.sticky))return t.dom.style.opacity=.5,void(t.isDimmed=!0);window.setTimeout(o,e._transition/100)}()}},{key:"_unDim",value:function(t){var e=this,i=50;!function o(){if(i<100)t.dom.style.opacity=i/100,++i;else if(100===i)return t.dom.style.opacity=1,t.isDimmed=!1,void e._resetTimeout(t);window.setTimeout(o,e._transition/100)}()}},{key:"_checkNotificationOptionsValidity",value:function(t){return!(void 0===t||void 0===t.type||void 0===t.message||"string"!=typeof t.message||0===t.message.length||t.sticky&&!1===t.closable||("info"!==t.type&&"success"!==t.type&&"warning"!==t.type&&"error"!==t.type&&(t.type=this._default.notification.type),this._dismissAllLock&&(this._dismissAllLock=!1),0))}},{key:"_setOptionsFallback",value:function(t){void 0===t.title&&(t.title=this._default.notification.title),void 0===t.duration&&(t.duration=this._duration),void 0===t.iconless&&(t.iconless=this._default.notification.iconless),void 0===t.thickBorder&&(t.thickBorder=this._thickBorder),void 0===t.closable&&(t.closable=this._default.notification.closable),void 0===t.sticky&&(t.sticky=this._default.notification.sticky),void 0===t.renderTo&&(t.renderTo=this._default.notification.renderTo),void 0===t.CBtitle&&(t.CBtitle=this._default.notification.CBtitle),void 0===t.callback&&(t.callback=this._default.notification.callback),void 0===t.isDimmed&&(t.isDimmed=this._default.notification.isDimmed)}},{key:"_idGenerator",value:function(t,e){var i=0;if(!(0===t.length||e>12)){for(var o=0;o<t.length;++o)i=(i<<5)-i+t.charCodeAt(o),i|=0;return(Math.abs(i).toString(36)+""+Math.abs(i/2).toString(36).split("").reverse().join("")).substring(0,e).toUpperCase()}}},{key:"new",value:function(t){if(!1===this._checkNotificationOptionsValidity(t))return console.error("Notification.js : new() options argument object is invalid."),-1;this._setOptionsFallback(t);var e=this._buildUI({id:this._idGenerator("".concat(t.type).concat(t.message),5),type:t.type,message:t.message,title:t.title,duration:t.duration,iconless:t.iconless,thickBorder:t.thickBorder,closable:t.closable,sticky:t.sticky,renderTo:t.renderTo,CBtitle:t.CBtitle,callback:t.callback,isDimmed:t.isDimmed});return this._active[e.id]?(this._resetTimeout(this._active[e.id]),this._incrementRequestCounter(this._active[e.id]),e=this._active[e.id]):this._start(e),e.id}},{key:"info",value:function(t){if(t)return t.type="info",this.new(t);console.error("Notification.js : No arguments provided for info() method.")}},{key:"success",value:function(t){if(t)return t.type="success",this.new(t);console.error("Notification.js : No arguments provided for success() method.")}},{key:"warning",value:function(t){if(t)return t.type="warning",this.new(t);console.error("Notification.js : No arguments provided for warning() method.")}},{key:"error",value:function(t){if(t)return t.type="error",this.new(t);console.error("Notification.js : No arguments provided for error() method.")}},{key:"dismiss",value:function(t){window.clearTimeout(this._active[t].timeoutID),this._active[t].requestCount>1&&this._clearRequestCount(this._active[t]),this._close(this._active[t])}},{key:"dismissAll",value:function(){if(!this._dismissAllLock&&0!==Object.keys(this._active).length)for(var t in this._dismissAllLock=!0,this._queue={},this._active)this.dismiss(t)}},{key:"dismissType",value:function(t){if(0!==Object.keys(this._active).length)for(var e in this._active)this._active[e].type===t&&this.dismiss(e)}}])&&o(e.prototype,i),n&&o(e,n),t}();e.default=n},function(t,e,i){}]);