UNPKG

@flasher/flasher-pnotify

Version:

javascript integration for php flasher

1 lines 55.8 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@flasher/flasher")):"function"==typeof define&&define.amd?define(["@flasher/flasher"],e):((t="undefined"!=typeof globalThis?globalThis:t||self).flasher=t.flasher||{},t.flasher.pnotify=e(t.flasher))}(this,(function(t){"use strict";var e=function(){return e=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},e.apply(this,arguments)},n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i={exports:{}};!function(t,e){!function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function r(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function d(t,e,n){return(d=f()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var o=new(Function.bind.apply(t,i));return n&&u(o,n.prototype),o}).apply(null,arguments)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?h(t):e}function m(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],i=!0,o=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){o=!0,r=t}finally{try{i||null==a.return||a.return()}finally{if(o)throw r}}return n}}(t,e)||y(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t){return function(t){if(Array.isArray(t))return g(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||y(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){if(t){if("string"==typeof t)return g(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(t,e):void 0}}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function $(){}function _(t,e){for(var n in e)t[n]=e[n];return t}function k(t){return t()}function x(){return Object.create(null)}function b(t){t.forEach(k)}function w(t){return"function"==typeof t}function O(t,n){return t!=t?n==n:t!==n||t&&"object"===e(t)||"function"==typeof t}function C(t,e){t.appendChild(e)}function M(t,e,n){t.insertBefore(e,n||null)}function T(t){t.parentNode.removeChild(t)}function E(t){return document.createElement(t)}function H(t){return document.createTextNode(t)}function S(){return H(" ")}function N(){return H("")}function j(t,e,n,i){return t.addEventListener(e,n,i),function(){return t.removeEventListener(e,n,i)}}function P(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function L(t){return Array.from(t.childNodes)}function A(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}var R,W=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;i(this,t),this.a=e,this.e=this.n=null}return r(t,[{key:"m",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.e||(this.e=E(e.nodeName),this.t=e,this.h(t)),this.i(n)}},{key:"h",value:function(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}},{key:"i",value:function(t){for(var e=0;e<this.n.length;e+=1)M(this.t,this.n[e],t)}},{key:"p",value:function(t){this.d(),this.h(t),this.i(this.a)}},{key:"d",value:function(){this.n.forEach(T)}}]),t}();function D(t){R=t}function I(){if(!R)throw new Error("Function called outside component initialization");return R}function q(){var t=I();return function(e,n){var i=t.$$.callbacks[e];if(i){var o=function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);i.slice().forEach((function(e){e.call(t,o)}))}}}function F(t,e){var n=t.$$.callbacks[e.type];n&&n.slice().forEach((function(t){return t(e)}))}var B=[],z=[],U=[],G=[],J=Promise.resolve(),K=!1;function Q(){K||(K=!0,J.then(tt))}function V(){return Q(),J}function X(t){U.push(t)}var Y=!1,Z=new Set;function tt(){if(!Y){Y=!0;do{for(var t=0;t<B.length;t+=1){var e=B[t];D(e),et(e.$$)}for(D(null),B.length=0;z.length;)z.pop()();for(var n=0;n<U.length;n+=1){var i=U[n];Z.has(i)||(Z.add(i),i())}U.length=0}while(B.length);for(;G.length;)G.pop()();K=!1,Y=!1,Z.clear()}}function et(t){if(null!==t.fragment){t.update(),b(t.before_update);var e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(X)}}var nt,it=new Set;function ot(){nt={r:0,c:[],p:nt}}function rt(){nt.r||b(nt.c),nt=nt.p}function st(t,e){t&&t.i&&(it.delete(t),t.i(e))}function at(t,e,n,i){if(t&&t.o){if(it.has(t))return;it.add(t),nt.c.push((function(){it.delete(t),i&&(n&&t.d(1),i())})),t.o(e)}}var ct="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:n;function lt(t,e){at(t,1,1,(function(){e.delete(t.key)}))}function ut(t,e,n,i,o,r,s,a,c,l,u,f){for(var d=t.length,h=r.length,p=d,m={};p--;)m[t[p].key]=p;var v=[],y=new Map,g=new Map;for(p=h;p--;){var $=f(o,r,p),_=n($),k=s.get(_);k?i&&k.p($,e):(k=l(_,$)).c(),y.set(_,v[p]=k),_ in m&&g.set(_,Math.abs(p-m[_]))}var x=new Set,b=new Set;function w(t){st(t,1),t.m(a,u),s.set(t.key,t),u=t.first,h--}for(;d&&h;){var O=v[h-1],C=t[d-1],M=O.key,T=C.key;O===C?(u=O.first,d--,h--):y.has(T)?!s.has(M)||x.has(M)?w(O):b.has(T)?d--:g.get(M)>g.get(T)?(b.add(M),w(O)):(x.add(T),d--):(c(C,s),d--)}for(;d--;){var E=t[d];y.has(E.key)||c(E,s)}for(;h;)w(v[h-1]);return v}function ft(t,e){for(var n={},i={},o={$$scope:1},r=t.length;r--;){var s=t[r],a=e[r];if(a){for(var c in s)c in a||(i[c]=1);for(var l in a)o[l]||(n[l]=a[l],o[l]=1);t[r]=a}else for(var u in s)o[u]=1}for(var f in i)f in n||(n[f]=void 0);return n}function dt(t){return"object"===e(t)&&null!==t?t:{}}function ht(t){t&&t.c()}function pt(t,e,n){var i=t.$$,o=i.fragment,r=i.on_mount,s=i.on_destroy,a=i.after_update;o&&o.m(e,n),X((function(){var e=r.map(k).filter(w);s?s.push.apply(s,v(e)):b(e),t.$$.on_mount=[]})),a.forEach(X)}function mt(t,e){var n=t.$$;null!==n.fragment&&(b(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function vt(t,e){-1===t.$$.dirty[0]&&(B.push(t),Q(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}var yt=function(){function t(){i(this,t)}return r(t,[{key:"$destroy",value:function(){mt(this,1),this.$destroy=$}},{key:"$on",value:function(t,e){var n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}}},{key:"$set",value:function(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}]),t}(),gt=function(){function t(e){if(i(this,t),Object.assign(this,{dir1:null,dir2:null,firstpos1:null,firstpos2:null,spacing1:25,spacing2:25,push:"bottom",maxOpen:1,maxStrategy:"wait",maxClosureCausesWait:!0,modal:"ish",modalishFlash:!0,overlayClose:!0,overlayClosesPinned:!1,positioned:!0,context:window&&document.body||null},e),"ish"===this.modal&&1!==this.maxOpen)throw new Error("A modalish stack must have a maxOpen value of 1.");if("ish"===this.modal&&!this.dir1)throw new Error("A modalish stack must have a direction.");if("top"===this.push&&"ish"===this.modal&&"close"!==this.maxStrategy)throw new Error("A modalish stack that pushes to the top must use the close maxStrategy.");this._noticeHead={notice:null,prev:null,next:null},this._noticeTail={notice:null,prev:this._noticeHead,next:null},this._noticeHead.next=this._noticeTail,this._noticeMap=new WeakMap,this._length=0,this._addpos2=0,this._animation=!0,this._posTimer=null,this._openNotices=0,this._listener=null,this._overlayOpen=!1,this._overlayInserted=!1,this._collapsingModalState=!1,this._leader=null,this._leaderOff=null,this._masking=null,this._maskingOff=null,this._swapping=!1,this._callbacks={}}return r(t,[{key:"forEach",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.start,o=void 0===i?"oldest":i,r=n.dir,s=void 0===r?"newer":r,a=n.skipModuleHandled,c=void 0!==a&&a;if("head"===o||"newest"===o&&"top"===this.push||"oldest"===o&&"bottom"===this.push)e=this._noticeHead.next;else if("tail"===o||"newest"===o&&"bottom"===this.push||"oldest"===o&&"top"===this.push)e=this._noticeTail.prev;else{if(!this._noticeMap.has(o))throw new Error("Invalid start param.");e=this._noticeMap.get(o)}for(;e.notice;){var l=e.notice;if("prev"===s||"top"===this.push&&"newer"===s||"bottom"===this.push&&"older"===s)e=e.prev;else{if(!("next"===s||"top"===this.push&&"older"===s||"bottom"===this.push&&"newer"===s))throw new Error("Invalid dir param.");e=e.next}if(!(c&&l.getModuleHandled()||!1!==t(l)))break}}},{key:"close",value:function(t){this.forEach((function(e){return e.close(t,!1,!1)}))}},{key:"open",value:function(t){this.forEach((function(e){return e.open(t)}))}},{key:"openLast",value:function(){this.forEach((function(t){if(-1===["opening","open","waiting"].indexOf(t.getState()))return t.open(),!1}),{start:"newest",dir:"older"})}},{key:"swap",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return-1===["open","opening","closing"].indexOf(t.getState())?Promise.reject():(this._swapping=e,t.close(i,!1,o).then((function(){return e.open(i)})).finally((function(){n._swapping=!1})))}},{key:"on",value:function(t,e){var n=this;return t in this._callbacks||(this._callbacks[t]=[]),this._callbacks[t].push(e),function(){n._callbacks[t].splice(n._callbacks[t].indexOf(e),1)}}},{key:"fire",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.stack=this,t in this._callbacks&&this._callbacks[t].forEach((function(t){return t(e)}))}},{key:"position",value:function(){var t=this;this.positioned&&this._length>0?(this.fire("beforePosition"),this._resetPositionData(),this.forEach((function(e){t._positionNotice(e)}),{start:"head",dir:"next",skipModuleHandled:!0}),this.fire("afterPosition")):(delete this._nextpos1,delete this._nextpos2)}},{key:"queuePosition",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;this._posTimer&&clearTimeout(this._posTimer),this._posTimer=setTimeout((function(){return t.position()}),e)}},{key:"_resetPositionData",value:function(){this._nextpos1=this.firstpos1,this._nextpos2=this.firstpos2,this._addpos2=0}},{key:"_positionNotice",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t===this._masking;if(this.positioned){var n=t.refs.elem;if(n&&(n.classList.contains("pnotify-in")||n.classList.contains("pnotify-initial")||e)){var i=[this.firstpos1,this.firstpos2,this._nextpos1,this._nextpos2,this._addpos2],o=i[0],r=i[1],s=i[2],a=i[3],c=i[4];n.getBoundingClientRect(),!this._animation||e||this._collapsingModalState?t._setMoveClass(""):t._setMoveClass("pnotify-move");var l,u=this.context===document.body?window.innerHeight:this.context.scrollHeight,f=this.context===document.body?window.innerWidth:this.context.scrollWidth;if(this.dir1){var d;switch(l={down:"top",up:"bottom",left:"right",right:"left"}[this.dir1],this.dir1){case"down":d=n.offsetTop;break;case"up":d=u-n.scrollHeight-n.offsetTop;break;case"left":d=f-n.scrollWidth-n.offsetLeft;break;case"right":d=n.offsetLeft}null==o&&(s=o=d)}if(this.dir1&&this.dir2){var h,p={down:"top",up:"bottom",left:"right",right:"left"}[this.dir2];switch(this.dir2){case"down":h=n.offsetTop;break;case"up":h=u-n.scrollHeight-n.offsetTop;break;case"left":h=f-n.scrollWidth-n.offsetLeft;break;case"right":h=n.offsetLeft}if(null==r&&(a=r=h),!e){var m=s+n.offsetHeight+this.spacing1,v=s+n.offsetWidth+this.spacing1;(("down"===this.dir1||"up"===this.dir1)&&m>u||("left"===this.dir1||"right"===this.dir1)&&v>f)&&(s=o,a+=c+this.spacing2,c=0)}switch(null!=a&&(n.style[p]="".concat(a,"px"),this._animation||n.style[p]),this.dir2){case"down":case"up":n.offsetHeight+(parseFloat(n.style.marginTop,10)||0)+(parseFloat(n.style.marginBottom,10)||0)>c&&(c=n.offsetHeight);break;case"left":case"right":n.offsetWidth+(parseFloat(n.style.marginLeft,10)||0)+(parseFloat(n.style.marginRight,10)||0)>c&&(c=n.offsetWidth)}}else if(this.dir1){var y,g;switch(this.dir1){case"down":case"up":g=["left","right"],y=this.context.scrollWidth/2-n.offsetWidth/2;break;case"left":case"right":g=["top","bottom"],y=u/2-n.offsetHeight/2}n.style[g[0]]="".concat(y,"px"),n.style[g[1]]="auto",this._animation||n.style[g[0]]}if(this.dir1)switch(null!=s&&(n.style[l]="".concat(s,"px"),this._animation||n.style[l]),this.dir1){case"down":case"up":s+=n.offsetHeight+this.spacing1;break;case"left":case"right":s+=n.offsetWidth+this.spacing1}else{var $=f/2-n.offsetWidth/2,_=u/2-n.offsetHeight/2;n.style.left="".concat($,"px"),n.style.top="".concat(_,"px"),this._animation||n.style.left}e||(this.firstpos1=o,this.firstpos2=r,this._nextpos1=s,this._nextpos2=a,this._addpos2=c)}}}},{key:"_addNotice",value:function(t){var e=this;this.fire("beforeAddNotice",{notice:t});var n=function(){if(e.fire("beforeOpenNotice",{notice:t}),t.getModuleHandled())e.fire("afterOpenNotice",{notice:t});else{if(e._openNotices++,("ish"!==e.modal||!e._overlayOpen)&&e.maxOpen!==1/0&&e._openNotices>e.maxOpen&&"close"===e.maxStrategy){var n=e._openNotices-e.maxOpen;e.forEach((function(t){if(-1!==["opening","open"].indexOf(t.getState()))return t.close(!1,!1,e.maxClosureCausesWait),t===e._leader&&e._setLeader(null),!!--n}))}!0===e.modal&&e._insertOverlay(),"ish"!==e.modal||e._leader&&-1!==["opening","open","closing"].indexOf(e._leader.getState())||e._setLeader(t),"ish"===e.modal&&e._overlayOpen&&t._preventTimerClose(!0),e.fire("afterOpenNotice",{notice:t})}},i={notice:t,prev:null,next:null,beforeOpenOff:t.on("pnotify:beforeOpen",n),afterCloseOff:t.on("pnotify:afterClose",(function(){if(e.fire("beforeCloseNotice",{notice:t}),t.getModuleHandled())e.fire("afterCloseNotice",{notice:t});else{if(e._openNotices--,"ish"===e.modal&&t===e._leader&&(e._setLeader(null),e._masking&&e._setMasking(null)),!e._swapping&&e.maxOpen!==1/0&&e._openNotices<e.maxOpen){var n=!1,i=function(i){if(i!==t&&"waiting"===i.getState()&&(i.open().catch((function(){})),e._openNotices>=e.maxOpen))return n=!0,!1};"wait"===e.maxStrategy?(e.forEach(i,{start:t,dir:"next"}),n||e.forEach(i,{start:t,dir:"prev"})):"close"===e.maxStrategy&&e.maxClosureCausesWait&&(e.forEach(i,{start:t,dir:"older"}),n||e.forEach(i,{start:t,dir:"newer"}))}e._openNotices<=0?(e._openNotices=0,e._resetPositionData(),e._overlayOpen&&!e._swapping&&e._removeOverlay()):e._collapsingModalState||e.queuePosition(0),e.fire("afterCloseNotice",{notice:t})}}))};if("top"===this.push?(i.next=this._noticeHead.next,i.prev=this._noticeHead,i.next.prev=i,i.prev.next=i):(i.prev=this._noticeTail.prev,i.next=this._noticeTail,i.prev.next=i,i.next.prev=i),this._noticeMap.set(t,i),this._length++,this._listener||(this._listener=function(){return e.position()},this.context.addEventListener("pnotify:position",this._listener)),-1!==["open","opening","closing"].indexOf(t.getState()))n();else if("ish"===this.modal&&this.modalishFlash&&this._shouldNoticeWait(t))var o=t.on("pnotify:mount",(function(){o(),t._setMasking(!0,!1,(function(){t._setMasking(!1)})),e._resetPositionData(),e._positionNotice(e._leader),window.requestAnimationFrame((function(){e._positionNotice(t,!0)}))}));this.fire("afterAddNotice",{notice:t})}},{key:"_removeNotice",value:function(t){if(this._noticeMap.has(t)){this.fire("beforeRemoveNotice",{notice:t});var e=this._noticeMap.get(t);this._leader===t&&this._setLeader(null),this._masking===t&&this._setMasking(null),e.prev.next=e.next,e.next.prev=e.prev,e.prev=null,e.next=null,e.beforeOpenOff(),e.beforeOpenOff=null,e.afterCloseOff(),e.afterCloseOff=null,this._noticeMap.delete(t),this._length--,!this._length&&this._listener&&(this.context.removeEventListener("pnotify:position",this._listener),this._listener=null),!this._length&&this._overlayOpen&&this._removeOverlay(),-1!==["open","opening","closing"].indexOf(t.getState())&&this._handleNoticeClosed(t),this.fire("afterRemoveNotice",{notice:t})}}},{key:"_setLeader",value:function(t){var e=this;if(this.fire("beforeSetLeader",{leader:t}),this._leaderOff&&(this._leaderOff(),this._leaderOff=null),this._leader=t,this._leader){var n,i=function(){var t=null;e._overlayOpen&&(e._collapsingModalState=!0,e.forEach((function(n){n._preventTimerClose(!1),n!==e._leader&&-1!==["opening","open"].indexOf(n.getState())&&(t||(t=n),n.close(n===t,!1,!0))}),{start:e._leader,dir:"next",skipModuleHandled:!0}),e._removeOverlay()),o&&(clearTimeout(o),o=null),e.forEach((function(n){if(n!==e._leader)return"waiting"===n.getState()||n===t?(e._setMasking(n,!!t),!1):void 0}),{start:e._leader,dir:"next",skipModuleHandled:!0})},o=null,r=function(){o&&(clearTimeout(o),o=null),o=setTimeout((function(){o=null,e._setMasking(null)}),750)};this._leaderOff=(n=[this._leader.on("mouseenter",i),this._leader.on("focusin",i),this._leader.on("mouseleave",r),this._leader.on("focusout",r)],function(){return n.map((function(t){return t()}))}),this.fire("afterSetLeader",{leader:t})}else this.fire("afterSetLeader",{leader:t})}},{key:"_setMasking",value:function(t,e){var n=this;if(this._masking){if(this._masking===t)return;this._masking._setMasking(!1,e)}if(this._maskingOff&&(this._maskingOff(),this._maskingOff=null),this._masking=t,this._masking){this._resetPositionData(),this._leader&&this._positionNotice(this._leader),this._masking._setMasking(!0,e),window.requestAnimationFrame((function(){n._masking&&n._positionNotice(n._masking)}));var i,o=function(){"ish"===n.modal&&(n._insertOverlay(),n._setMasking(null,!0),n.forEach((function(t){t._preventTimerClose(!0),"waiting"===t.getState()&&t.open()}),{start:n._leader,dir:"next",skipModuleHandled:!0}))};this._maskingOff=(i=[this._masking.on("mouseenter",o),this._masking.on("focusin",o)],function(){return i.map((function(t){return t()}))})}}},{key:"_shouldNoticeWait",value:function(t){return this._swapping!==t&&!("ish"===this.modal&&this._overlayOpen)&&this.maxOpen!==1/0&&this._openNotices>=this.maxOpen&&"wait"===this.maxStrategy}},{key:"_insertOverlay",value:function(){var t=this;this._overlay||(this._overlay=document.createElement("div"),this._overlay.classList.add("pnotify-modal-overlay"),this.dir1&&this._overlay.classList.add("pnotify-modal-overlay-".concat(this.dir1)),this.overlayClose&&this._overlay.classList.add("pnotify-modal-overlay-closes"),this.context!==document.body&&(this._overlay.style.height="".concat(this.context.scrollHeight,"px"),this._overlay.style.width="".concat(this.context.scrollWidth,"px")),this._overlay.addEventListener("click",(function(e){if(t.overlayClose){if(t.fire("overlayClose",{clickEvent:e}),e.defaultPrevented)return;t._leader&&t._setLeader(null),t.forEach((function(e){-1===["closed","closing","waiting"].indexOf(e.getState())&&(e.hide||t.overlayClosesPinned?e.close():e.hide||"ish"!==t.modal||(t._leader?e.close(!1,!1,!0):t._setLeader(e)))}),{skipModuleHandled:!0}),t._overlayOpen&&t._removeOverlay()}}))),this._overlay.parentNode!==this.context&&(this.fire("beforeAddOverlay"),this._overlay.classList.remove("pnotify-modal-overlay-in"),this._overlay=this.context.insertBefore(this._overlay,this.context.firstChild),this._overlayOpen=!0,this._overlayInserted=!0,window.requestAnimationFrame((function(){t._overlay.classList.add("pnotify-modal-overlay-in"),t.fire("afterAddOverlay")}))),this._collapsingModalState=!1}},{key:"_removeOverlay",value:function(){var t=this;this._overlay.parentNode&&(this.fire("beforeRemoveOverlay"),this._overlay.classList.remove("pnotify-modal-overlay-in"),this._overlayOpen=!1,setTimeout((function(){t._overlayInserted=!1,t._overlay.parentNode&&(t._overlay.parentNode.removeChild(t._overlay),t.fire("afterRemoveOverlay"))}),250),setTimeout((function(){t._collapsingModalState=!1}),400))}},{key:"notices",get:function(){var t=[];return this.forEach((function(e){return t.push(e)})),t}},{key:"length",get:function(){return this._length}},{key:"leader",get:function(){return this._leader}}]),t}(),$t=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return d(Kt,e)},_t=ct.Map;function kt(t,e,n){var i=t.slice();return i[109]=e[n][0],i[110]=e[n][1],i}function xt(t,e,n){var i=t.slice();return i[109]=e[n][0],i[110]=e[n][1],i}function bt(t,e,n){var i=t.slice();return i[109]=e[n][0],i[110]=e[n][1],i}function wt(t,e,n){var i=t.slice();return i[109]=e[n][0],i[110]=e[n][1],i}function Ot(t,e){var n,i,o,r,s=[{self:e[42]},e[110]],a=e[109].default;function c(t){for(var e={},n=0;n<s.length;n+=1)e=_(e,s[n]);return{props:e}}return a&&(i=new a(c())),{key:t,first:null,c:function(){n=N(),i&&ht(i.$$.fragment),o=N(),this.first=n},m:function(t,e){M(t,n,e),i&&pt(i,t,e),M(t,o,e),r=!0},p:function(t,e){var n=2176&e[1]?ft(s,[2048&e[1]&&{self:t[42]},128&e[1]&&dt(t[110])]):{};if(a!==(a=t[109].default)){if(i){ot();var r=i;at(r.$$.fragment,1,0,(function(){mt(r,1)})),rt()}a?(ht((i=new a(c())).$$.fragment),st(i.$$.fragment,1),pt(i,o.parentNode,o)):i=null}else a&&i.$set(n)},i:function(t){r||(i&&st(i.$$.fragment,t),r=!0)},o:function(t){i&&at(i.$$.fragment,t),r=!1},d:function(t){t&&T(n),t&&T(o),i&&mt(i,t)}}}function Ct(t){var e,n,i,o,r,s;return{c:function(){e=E("div"),P(n=E("span"),"class",t[22]("closer")),P(e,"class",i="pnotify-closer ".concat(t[21]("closer")," ").concat(t[17]&&!t[26]||t[28]?"pnotify-hidden":"")),P(e,"role","button"),P(e,"tabindex","0"),P(e,"title",o=t[20].close)},m:function(i,o){M(i,e,o),C(e,n),r||(s=j(e,"click",t[81]),r=!0)},p:function(t,n){335675392&n[0]&&i!==(i="pnotify-closer ".concat(t[21]("closer")," ").concat(t[17]&&!t[26]||t[28]?"pnotify-hidden":""))&&P(e,"class",i),1048576&n[0]&&o!==(o=t[20].close)&&P(e,"title",o)},d:function(t){t&&T(e),r=!1,s()}}}function Mt(t){var e,n,i,o,r,s,a,c;return{c:function(){e=E("div"),P(n=E("span"),"class",i="".concat(t[22]("sticker")," ").concat(t[3]?t[22]("unstuck"):t[22]("stuck"))),P(e,"class",o="pnotify-sticker ".concat(t[21]("sticker")," ").concat(t[19]&&!t[26]||t[28]?"pnotify-hidden":"")),P(e,"role","button"),P(e,"aria-pressed",r=!t[3]),P(e,"tabindex","0"),P(e,"title",s=t[3]?t[20].stick:t[20].unstick)},m:function(i,o){M(i,e,o),C(e,n),a||(c=j(e,"click",t[82]),a=!0)},p:function(t,a){8&a[0]&&i!==(i="".concat(t[22]("sticker")," ").concat(t[3]?t[22]("unstuck"):t[22]("stuck")))&&P(n,"class",i),336068608&a[0]&&o!==(o="pnotify-sticker ".concat(t[21]("sticker")," ").concat(t[19]&&!t[26]||t[28]?"pnotify-hidden":""))&&P(e,"class",o),8&a[0]&&r!==(r=!t[3])&&P(e,"aria-pressed",r),1048584&a[0]&&s!==(s=t[3]?t[20].stick:t[20].unstick)&&P(e,"title",s)},d:function(t){t&&T(e),a=!1,c()}}}function Tt(t){var e,n,i;return{c:function(){e=E("div"),P(n=E("span"),"class",i=!0===t[13]?t[22](t[4]):t[13]),P(e,"class","pnotify-icon ".concat(t[21]("icon")))},m:function(i,o){M(i,e,o),C(e,n),t[83](e)},p:function(t,e){8208&e[0]&&i!==(i=!0===t[13]?t[22](t[4]):t[13])&&P(n,"class",i)},d:function(n){n&&T(e),t[83](null)}}}function Et(t,e){var n,i,o,r,s=[{self:e[42]},e[110]],a=e[109].default;function c(t){for(var e={},n=0;n<s.length;n+=1)e=_(e,s[n]);return{props:e}}return a&&(i=new a(c())),{key:t,first:null,c:function(){n=N(),i&&ht(i.$$.fragment),o=N(),this.first=n},m:function(t,e){M(t,n,e),i&&pt(i,t,e),M(t,o,e),r=!0},p:function(t,e){var n=2304&e[1]?ft(s,[2048&e[1]&&{self:t[42]},256&e[1]&&dt(t[110])]):{};if(a!==(a=t[109].default)){if(i){ot();var r=i;at(r.$$.fragment,1,0,(function(){mt(r,1)})),rt()}a?(ht((i=new a(c())).$$.fragment),st(i.$$.fragment,1),pt(i,o.parentNode,o)):i=null}else a&&i.$set(n)},i:function(t){r||(i&&st(i.$$.fragment,t),r=!0)},o:function(t){i&&at(i.$$.fragment,t),r=!1},d:function(t){t&&T(n),t&&T(o),i&&mt(i,t)}}}function Ht(t){var e,n=!t[34]&&St(t);return{c:function(){e=E("div"),n&&n.c(),P(e,"class","pnotify-title ".concat(t[21]("title")))},m:function(i,o){M(i,e,o),n&&n.m(e,null),t[84](e)},p:function(t,i){t[34]?n&&(n.d(1),n=null):n?n.p(t,i):((n=St(t)).c(),n.m(e,null))},d:function(i){i&&T(e),n&&n.d(),t[84](null)}}}function St(t){var e;function n(t,e){return t[6]?jt:Nt}var i=n(t),o=i(t);return{c:function(){o.c(),e=N()},m:function(t,n){o.m(t,n),M(t,e,n)},p:function(t,r){i===(i=n(t))&&o?o.p(t,r):(o.d(1),(o=i(t))&&(o.c(),o.m(e.parentNode,e)))},d:function(t){o.d(t),t&&T(e)}}}function Nt(t){var e,n;return{c:function(){e=E("span"),n=H(t[5]),P(e,"class","pnotify-pre-line")},m:function(t,i){M(t,e,i),C(e,n)},p:function(t,e){32&e[0]&&A(n,t[5])},d:function(t){t&&T(e)}}}function jt(t){var e,n;return{c:function(){n=N(),e=new W(n)},m:function(i,o){e.m(t[5],i,o),M(i,n,o)},p:function(t,n){32&n[0]&&e.p(t[5])},d:function(t){t&&T(n),t&&e.d()}}}function Pt(t){var e,n,i=!t[35]&&Lt(t);return{c:function(){e=E("div"),i&&i.c(),P(e,"class",n="pnotify-text ".concat(t[21]("text")," ").concat(""===t[33]?"":"pnotify-text-with-max-height")),P(e,"style",t[33]),P(e,"role","alert")},m:function(n,o){M(n,e,o),i&&i.m(e,null),t[85](e)},p:function(t,o){t[35]?i&&(i.d(1),i=null):i?i.p(t,o):((i=Lt(t)).c(),i.m(e,null)),4&o[1]&&n!==(n="pnotify-text ".concat(t[21]("text")," ").concat(""===t[33]?"":"pnotify-text-with-max-height"))&&P(e,"class",n),4&o[1]&&P(e,"style",t[33])},d:function(n){n&&T(e),i&&i.d(),t[85](null)}}}function Lt(t){var e;function n(t,e){return t[8]?Rt:At}var i=n(t),o=i(t);return{c:function(){o.c(),e=N()},m:function(t,n){o.m(t,n),M(t,e,n)},p:function(t,r){i===(i=n(t))&&o?o.p(t,r):(o.d(1),(o=i(t))&&(o.c(),o.m(e.parentNode,e)))},d:function(t){o.d(t),t&&T(e)}}}function At(t){var e,n;return{c:function(){e=E("span"),n=H(t[7]),P(e,"class","pnotify-pre-line")},m:function(t,i){M(t,e,i),C(e,n)},p:function(t,e){128&e[0]&&A(n,t[7])},d:function(t){t&&T(e)}}}function Rt(t){var e,n;return{c:function(){n=N(),e=new W(n)},m:function(i,o){e.m(t[7],i,o),M(i,n,o)},p:function(t,n){128&n[0]&&e.p(t[7])},d:function(t){t&&T(n),t&&e.d()}}}function Wt(t,e){var n,i,o,r,s=[{self:e[42]},e[110]],a=e[109].default;function c(t){for(var e={},n=0;n<s.length;n+=1)e=_(e,s[n]);return{props:e}}return a&&(i=new a(c())),{key:t,first:null,c:function(){n=N(),i&&ht(i.$$.fragment),o=N(),this.first=n},m:function(t,e){M(t,n,e),i&&pt(i,t,e),M(t,o,e),r=!0},p:function(t,e){var n=2560&e[1]?ft(s,[2048&e[1]&&{self:t[42]},512&e[1]&&dt(t[110])]):{};if(a!==(a=t[109].default)){if(i){ot();var r=i;at(r.$$.fragment,1,0,(function(){mt(r,1)})),rt()}a?(ht((i=new a(c())).$$.fragment),st(i.$$.fragment,1),pt(i,o.parentNode,o)):i=null}else a&&i.$set(n)},i:function(t){r||(i&&st(i.$$.fragment,t),r=!0)},o:function(t){i&&at(i.$$.fragment,t),r=!1},d:function(t){t&&T(n),t&&T(o),i&&mt(i,t)}}}function Dt(t,e){var n,i,o,r,s=[{self:e[42]},e[110]],a=e[109].default;function c(t){for(var e={},n=0;n<s.length;n+=1)e=_(e,s[n]);return{props:e}}return a&&(i=new a(c())),{key:t,first:null,c:function(){n=N(),i&&ht(i.$$.fragment),o=N(),this.first=n},m:function(t,e){M(t,n,e),i&&pt(i,t,e),M(t,o,e),r=!0},p:function(t,e){var n=3072&e[1]?ft(s,[2048&e[1]&&{self:t[42]},1024&e[1]&&dt(t[110])]):{};if(a!==(a=t[109].default)){if(i){ot();var r=i;at(r.$$.fragment,1,0,(function(){mt(r,1)})),rt()}a?(ht((i=new a(c())).$$.fragment),st(i.$$.fragment,1),pt(i,o.parentNode,o)):i=null}else a&&i.$set(n)},i:function(t){r||(i&&st(i.$$.fragment,t),r=!0)},o:function(t){i&&at(i.$$.fragment,t),r=!1},d:function(t){t&&T(n),t&&T(o),i&&mt(i,t)}}}function It(t){for(var e,n,i,o,r,s,a,c,l,u,f,d,h,p,m,v,y,g=[],_=new _t,k=[],x=new _t,O=[],H=new _t,N=[],L=new _t,A=t[38],R=function(t){return t[109]},W=0;W<A.length;W+=1){var D=wt(t,A,W),I=R(D);_.set(I,g[W]=Ot(I,D))}for(var q=t[16]&&!t[36]&&Ct(t),F=t[18]&&!t[36]&&Mt(t),B=!1!==t[13]&&Tt(t),z=t[39],U=function(t){return t[109]},G=0;G<z.length;G+=1){var J=bt(t,z,G),K=U(J);x.set(K,k[G]=Et(K,J))}for(var Q=!1!==t[5]&&Ht(t),V=!1!==t[7]&&Pt(t),X=t[40],Y=function(t){return t[109]},Z=0;Z<X.length;Z+=1){var tt=xt(t,X,Z),et=Y(tt);H.set(et,O[Z]=Wt(et,tt))}for(var nt=t[41],it=function(t){return t[109]},ct=0;ct<nt.length;ct+=1){var ft=kt(t,nt,ct),dt=it(ft);L.set(dt,N[ct]=Dt(dt,ft))}return{c:function(){e=E("div"),n=E("div");for(var m=0;m<g.length;m+=1)g[m].c();i=S(),q&&q.c(),o=S(),F&&F.c(),r=S(),B&&B.c(),s=S(),a=E("div");for(var v=0;v<k.length;v+=1)k[v].c();c=S(),Q&&Q.c(),l=S(),V&&V.c(),u=S();for(var y=0;y<O.length;y+=1)O[y].c();f=S();for(var $=0;$<N.length;$+=1)N[$].c();P(a,"class","pnotify-content ".concat(t[21]("content"))),P(n,"class",d="pnotify-container ".concat(t[21]("container")," ").concat(t[21](t[4])," ").concat(t[15]?"pnotify-shadow":""," ").concat(t[27].container.join(" "))),P(n,"style",h="".concat(t[31]," ").concat(t[32])),P(n,"role","alert"),P(e,"data-pnotify",""),P(e,"class",p="pnotify ".concat(!t[0]||t[0].positioned?"pnotify-positioned":""," ").concat(!1!==t[13]?"pnotify-with-icon":""," ").concat(t[21]("elem")," pnotify-mode-").concat(t[9]," ").concat(t[10]," ").concat(t[24]," ").concat(t[25]," ").concat(t[37]," ").concat("fade"===t[2]?"pnotify-fade-".concat(t[14]):""," ").concat(t[30]?"pnotify-modal ".concat(t[11]):t[12]," ").concat(t[28]?"pnotify-masking":""," ").concat(t[29]?"pnotify-masking-in":""," ").concat(t[27].elem.join(" "))),P(e,"aria-live","assertive"),P(e,"role","alertdialog")},m:function(d,h){M(d,e,h),C(e,n);for(var p=0;p<g.length;p+=1)g[p].m(n,null);C(n,i),q&&q.m(n,null),C(n,o),F&&F.m(n,null),C(n,r),B&&B.m(n,null),C(n,s),C(n,a);for(var _=0;_<k.length;_+=1)k[_].m(a,null);C(a,c),Q&&Q.m(a,null),C(a,l),V&&V.m(a,null),C(a,u);for(var x=0;x<O.length;x+=1)O[x].m(a,null);t[86](a),C(n,f);for(var b=0;b<N.length;b+=1)N[b].m(n,null);var T;t[87](n),t[88](e),m=!0,v||(y=[(T=t[43].call(null,e),T&&w(T.destroy)?T.destroy:$),j(e,"mouseenter",t[44]),j(e,"mouseleave",t[45]),j(e,"focusin",t[44]),j(e,"focusout",t[45])],v=!0)},p:function(t,f){if(2176&f[1]){var v=t[38];ot(),g=ut(g,f,R,1,t,v,_,n,lt,Ot,i,wt),rt()}if(t[16]&&!t[36]?q?q.p(t,f):((q=Ct(t)).c(),q.m(n,o)):q&&(q.d(1),q=null),t[18]&&!t[36]?F?F.p(t,f):((F=Mt(t)).c(),F.m(n,r)):F&&(F.d(1),F=null),!1!==t[13]?B?B.p(t,f):((B=Tt(t)).c(),B.m(n,s)):B&&(B.d(1),B=null),2304&f[1]){var y=t[39];ot(),k=ut(k,f,U,1,t,y,x,a,lt,Et,c,bt),rt()}if(!1!==t[5]?Q?Q.p(t,f):((Q=Ht(t)).c(),Q.m(a,l)):Q&&(Q.d(1),Q=null),!1!==t[7]?V?V.p(t,f):((V=Pt(t)).c(),V.m(a,u)):V&&(V.d(1),V=null),2560&f[1]){var $=t[40];ot(),O=ut(O,f,Y,1,t,$,H,a,lt,Wt,null,xt),rt()}if(3072&f[1]){var b=t[41];ot(),N=ut(N,f,it,1,t,b,L,n,lt,Dt,null,kt),rt()}(!m||134250512&f[0]&&d!==(d="pnotify-container ".concat(t[21]("container")," ").concat(t[21](t[4])," ").concat(t[15]?"pnotify-shadow":""," ").concat(t[27].container.join(" "))))&&P(n,"class",d),(!m||3&f[1]&&h!==(h="".concat(t[31]," ").concat(t[32])))&&P(n,"style",h),(!m||2063629829&f[0]|64&f[1]&&p!==(p="pnotify ".concat(!t[0]||t[0].positioned?"pnotify-positioned":""," ").concat(!1!==t[13]?"pnotify-with-icon":""," ").concat(t[21]("elem")," pnotify-mode-").concat(t[9]," ").concat(t[10]," ").concat(t[24]," ").concat(t[25]," ").concat(t[37]," ").concat("fade"===t[2]?"pnotify-fade-".concat(t[14]):""," ").concat(t[30]?"pnotify-modal ".concat(t[11]):t[12]," ").concat(t[28]?"pnotify-masking":""," ").concat(t[29]?"pnotify-masking-in":""," ").concat(t[27].elem.join(" "))))&&P(e,"class",p)},i:function(t){if(!m){for(var e=0;e<A.length;e+=1)st(g[e]);for(var n=0;n<z.length;n+=1)st(k[n]);for(var i=0;i<X.length;i+=1)st(O[i]);for(var o=0;o<nt.length;o+=1)st(N[o]);m=!0}},o:function(t){for(var e=0;e<g.length;e+=1)at(g[e]);for(var n=0;n<k.length;n+=1)at(k[n]);for(var i=0;i<O.length;i+=1)at(O[i]);for(var o=0;o<N.length;o+=1)at(N[o]);m=!1},d:function(n){n&&T(e);for(var i=0;i<g.length;i+=1)g[i].d();q&&q.d(),F&&F.d(),B&&B.d();for(var o=0;o<k.length;o+=1)k[o].d();Q&&Q.d(),V&&V.d();for(var r=0;r<O.length;r+=1)O[r].d();t[86](null);for(var s=0;s<N.length;s+=1)N[s].d();t[87](null),t[88](null),v=!1,b(y)}}}function qt(t,n){"object"!==e(t)&&(t={text:t}),n&&(t.type=n);var i=document.body;return"stack"in t&&t.stack&&t.stack.context&&(i=t.stack.context),{target:i,props:t}}var Ft,Bt=new gt({dir1:"down",dir2:"left",firstpos1:25,firstpos2:25,spacing1:36,spacing2:36,push:"bottom"}),zt=new Map,Ut={type:"notice",title:!1,titleTrusted:!1,text:!1,textTrusted:!1,styling:"brighttheme",icons:"brighttheme",mode:"no-preference",addClass:"",addModalClass:"",addModelessClass:"",autoOpen:!0,width:"360px",minHeight:"16px",maxTextHeight:"200px",icon:!0,animation:"fade",animateSpeed:"normal",shadow:!0,hide:!0,delay:8e3,mouseReset:!0,closer:!0,closerHover:!0,sticker:!0,stickerHover:!0,labels:{close:"Close",stick:"Pin",unstick:"Unpin"},remove:!0,destroy:!0,stack:Bt,modules:zt};function Gt(){Bt.context||(Bt.context=document.body),window.addEventListener("resize",(function(){Ft&&clearTimeout(Ft),Ft=setTimeout((function(){var t=new Event("pnotify:position");document.body.dispatchEvent(t),Ft=null}),10)}))}function Jt(t,e,n){var i=I(),o=q(),r=function(t){var e=["focus","blur","fullscreenchange","fullscreenerror","scroll","cut","copy","paste","keydown","keypress","keyup","auxclick","click","contextmenu","dblclick","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseout","mouseup","pointerlockchange","pointerlockerror","select","wheel","drag","dragend","dragenter","dragstart","dragleave","dragover","drop","touchcancel","touchend","touchmove","touchstart","pointerover","pointerenter","pointerdown","pointermove","pointerup","pointercancel","pointerout","pointerleave","gotpointercapture","lostpointercapture"].concat(v(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]));function n(e){F(t,e)}return function(t){for(var i=[],o=0;o<e.length;o++)i.push(j(t,e[o],n));return{destroy:function(){for(var t=0;t<i.length;t++)i[t]()}}}}(i,["pnotify:init","pnotify:mount","pnotify:update","pnotify:beforeOpen","pnotify:afterOpen","pnotify:enterModal","pnotify:leaveModal","pnotify:beforeClose","pnotify:afterClose","pnotify:beforeDestroy","pnotify:afterDestroy","focusin","focusout","animationend","transitionend"]),s=e.modules,a=void 0===s?new Map(Ut.modules):s,l=e.stack,u=void 0===l?Ut.stack:l,f={elem:null,container:null,content:null,iconContainer:null,titleContainer:null,textContainer:null},d=c({},Ut);Qt("init",{notice:i,defaults:d});var h,p=e.type,y=void 0===p?d.type:p,g=e.title,$=void 0===g?d.title:g,_=e.titleTrusted,k=void 0===_?d.titleTrusted:_,x=e.text,b=void 0===x?d.text:x,w=e.textTrusted,O=void 0===w?d.textTrusted:w,C=e.styling,M=void 0===C?d.styling:C,T=e.icons,E=void 0===T?d.icons:T,H=e.mode,S=void 0===H?d.mode:H,N=e.addClass,P=void 0===N?d.addClass:N,L=e.addModalClass,A=void 0===L?d.addModalClass:L,R=e.addModelessClass,W=void 0===R?d.addModelessClass:R,D=e.autoOpen,B=void 0===D?d.autoOpen:D,U=e.width,G=void 0===U?d.width:U,J=e.minHeight,K=void 0===J?d.minHeight:J,Q=e.maxTextHeight,X=void 0===Q?d.maxTextHeight:Q,Y=e.icon,Z=void 0===Y?d.icon:Y,tt=e.animation,et=void 0===tt?d.animation:tt,nt=e.animateSpeed,it=void 0===nt?d.animateSpeed:nt,ot=e.shadow,rt=void 0===ot?d.shadow:ot,st=e.hide,at=void 0===st?d.hide:st,ct=e.delay,lt=void 0===ct?d.delay:ct,ut=e.mouseReset,ft=void 0===ut?d.mouseReset:ut,dt=e.closer,ht=void 0===dt?d.closer:dt,pt=e.closerHover,mt=void 0===pt?d.closerHover:pt,vt=e.sticker,yt=void 0===vt?d.sticker:vt,gt=e.stickerHover,$t=void 0===gt?d.stickerHover:gt,_t=e.labels,kt=void 0===_t?d.labels:_t,xt=e.remove,bt=void 0===xt?d.remove:xt,wt=e.destroy,Ot=void 0===wt?d.destroy:wt,Ct="closed",Mt=null,Tt=null,Et=null,Ht=!1,St="",Nt="",jt=!1,Pt=!1,Lt={elem:[],container:[]},At=!1,Rt=!1,Wt=!1,Dt=!1,It=null,qt=at,Ft=null,Bt=null,zt=u&&(!0===u.modal||"ish"===u.modal&&"prevented"===Mt),Gt=NaN,Jt=null,Kt=null;function Qt(t){var e=c({notice:i},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});"init"===t&&Array.from(a).forEach((function(t){var n=m(t,2),i=n[0];return n[1],"init"in i&&i.init(e)}));var n=f.elem||u&&u.context||document.body;if(!n)return o("pnotify:".concat(t),e),!0;var r=new Event("pnotify:".concat(t),{bubbles:"init"===t||"mount"===t,cancelable:t.startsWith("before")});return r.detail=e,n.dispatchEvent(r),!r.defaultPrevented}function Vt(){var t=u&&u.context||document.body;if(!t)throw new Error("No context to insert this notice into.");if(!f.elem)throw new Error("Trying to insert notice before element is available.");f.elem.parentNode!==t&&t.appendChild(f.elem)}function Xt(){f.elem&&f.elem.parentNode.removeChild(f.elem)}h=function(){Qt("mount"),B&&ue().catch((function(){}))},I().$$.on_mount.push(h),function(t){I().$$.before_update.push(t)}((function(){Qt("update"),"closed"!==Ct&&"waiting"!==Ct&&at!==qt&&(at?qt||ge():ye()),"closed"!==Ct&&"closing"!==Ct&&u&&!u._collapsingModalState&&u.queuePosition(),qt=at}));var Yt,Zt,te,ee,ne,ie,oe,re,se,ae,ce,le=e.open,ue=void 0===le?function(t){if("opening"===Ct)return Ft;if("open"===Ct)return at&&ge(),Promise.resolve();if(!At&&u&&u._shouldNoticeWait(i))return Ct="waiting",Promise.reject();if(!Qt("beforeOpen",{immediate:t}))return Promise.reject();var e,o;Ct="opening",n(28,Wt=!1),n(24,St="pnotify-initial pnotify-hidden");var r=new Promise((function(t,n){e=t,o=n}));Ft=r;var s=function(){at&&ge(),Ct="open",Qt("afterOpen",{immediate:t}),Ft=null,e()};return Rt?(s(),Promise.resolve()):(Vt(),window.requestAnimationFrame((function(){if("opening"!==Ct)return o(),void(Ft=null);u&&(n(0,u._animation=!1,u),"top"===u.push&&u._resetPositionData(),u._positionNotice(i),u.queuePosition(0),n(0,u._animation=!0,u)),pe(s,t)})),r)}:le,fe=e.close,de=void 0===fe?function(t,e,o){if("closing"===Ct)return Bt;if("closed"===Ct)return Promise.resolve();var r,s=function(){Qt("beforeDestroy")&&(u&&u._removeNotice(i),i.$destroy(),Qt("afterDestroy"))};if("waiting"===Ct)return o||(Ct="closed",Ot&&!o&&s()),Promise.resolve();if(!Qt("beforeClose",{immediate:t,timerHide:e,waitAfterward:o}))return Promise.reject();Ct="closing",jt=!!e,Mt&&"prevented"!==Mt&&clearTimeout&&clearTimeout(Mt),Mt=null;var a=new Promise((function(t,e){r=t}));return Bt=a,ve((function(){n(26,Pt=!1),jt=!1,Ct=o?"waiting":"closed",Qt("afterClose",{immediate:t,timerHide:e,waitAfterward:o}),Bt=null,r(),o||(Ot?s():bt&&Xt())}),t),a}:fe,he=e.animateIn,pe=void 0===he?function(t,e){Ht="in";var i=function e(n){if(!(n&&f.elem&&n.target!==f.elem||(f.elem&&f.elem.removeEventListener("transitionend",e),Tt&&clearTimeout(Tt),"in"!==Ht))){var i=Rt;if(!i&&f.elem){var o=f.elem.getBoundingClientRect();for(var r in o)if(o[r]>0){i=!0;break}}i?(t&&t.call(),Ht=!1):Tt=setTimeout(e,40)}};if("fade"!==et||e){var o=et;n(2,et="none"),n(24,St="pnotify-in ".concat("fade"===o?"pnotify-fade-in":"")),V().then((function(){n(2,et=o),i()}))}else f.elem&&f.elem.addEventListener("transitionend",i),n(24,St="pnotify-in"),V().then((function(){n(24,St="pnotify-in pnotify-fade-in"),Tt=setTimeout(i,650)}))}:he,me=e.animateOut,ve=void 0===me?function(t,e){Ht="out";var i=function e(i){if(!(i&&f.elem&&i.target!==f.elem||(f.elem&&f.elem.removeEventListener("transitionend",e),Et&&clearTimeout(Et),"out"!==Ht))){var o=Rt;if(!o&&f.elem){var r=f.elem.getBoundingClientRect();for(var s in r)if(r[s]>0){o=!0;break}}f.elem&&f.elem.style.opacity&&"0"!==f.elem.style.opacity&&o?Et=setTimeout(e,40):(n(24,St=""),t&&t.call(),Ht=!1)}};"fade"!==et||e?(n(24,St=""),V().then((function(){i()}))):(f.elem&&f.elem.addEventListener("transitionend",i),n(24,St="pnotify-in"),Et=setTimeout(i,650))}:me;function ye(){Mt&&"prevented"!==Mt&&(clearTimeout(Mt),Mt=null),Et&&clearTimeout(Et),"closing"===Ct&&(Ct="open",Ht=!1,n(24,St="fade"===et?"pnotify-in pnotify-fade-in":"pnotify-in"))}function ge(){"prevented"!==Mt&&(ye(),lt!==1/0&&(Mt=setTimeout((function(){return de(!1,!0)}),isNaN(lt)?0:lt)))}return t.$$set=function(t){"modules"in t&&n(46,a=t.modules),"stack"in t&&n(0,u=t.stack),"type"in t&&n(4,y=t.type),"title"in t&&n(5,$=t.title),"titleTrusted"in t&&n(6,k=t.titleTrusted),"text"in t&&n(7,b=t.text),"textTrusted"in t&&n(8,O=t.textTrusted),"styling"in t&&n(47,M=t.styling),"icons"in t&&n(48,E=t.icons),"mode"in t&&n(9,S=t.mode),"addClass"in t&&n(10,P=t.addClass),"addModalClass"in t&&n(11,A=t.addModalClass),"addModelessClass"in t&&n(12,W=t.addModelessClass),"autoOpen"in t&&n(49,B=t.autoOpen),"width"in t&&n(50,G=t.width),"minHeight"in t&&n(51,K=t.minHeight),"maxTextHeight"in t&&n(52,X=t.maxTextHeight),"icon"in t&&n(13,Z=t.icon),"animation"in t&&n(2,et=t.animation),"animateSpeed"in t&&n(14,it=t.animateSpeed),"shadow"in t&&n(15,rt=t.shadow),"hide"in t&&n(3,at=t.hide),"delay"in t&&n(53,lt=t.delay),"mouseReset"in t&&n(54,ft=t.mouseReset),"closer"in t&&n(16,ht=t.closer),"closerHover"in t&&n(17,mt=t.closerHover),"sticker"in t&&n(18,yt=t.sticker),"stickerHover"in t&&n(19,$t=t.stickerHover),"labels"in t&&n(20,kt=t.labels),"remove"in t&&n(55,bt=t.remove),"destroy"in t&&n(56,Ot=t.destroy),"open"in t&&n(59,ue=t.open),"close"in t&&n(23,de=t.close),"animateIn"in t&&n(60,pe=t.animateIn),"animateOut"in t&&n(61,ve=t.animateOut)},t.$$.update=function(){524288&t.$$.dirty[1]&&n(31,Yt="string"==typeof G?"width: ".concat(G,";"):""),1048576&t.$$.dirty[1]&&n(32,Zt="string"==typeof K?"min-height: ".concat(K,";"):""),2097152&t.$$.dirty[1]&&n(33,te="string"==typeof X?"max-height: ".concat(X,";"):""),32&t.$$.dirty[0]&&n(34,ee=$ instanceof HTMLElement),128&t.$$.dirty[0]&&n(35,ne=b instanceof HTMLElement),1&t.$$.dirty[0]|1792&t.$$.dirty[3]&&Gt!==u&&(Gt&&(Gt._removeNotice(i),n(30,zt=!1),Jt(),Kt()),u&&(u._addNotice(i),n(102,Jt=u.on("beforeAddOverlay",(function(){n(30,zt=!0),Qt("enterModal")}))),n(103,Kt=u.on("afterRemoveOverlay",(function(){n(30,zt=!1),Qt("leaveModal")})))),n(101,Gt=u)),1073748992&t.$$.dirty[0]&&n(36,ie=P.match(/\bnonblock\b/)||A.match(/\bnonblock\b/)&&zt||W.match(/\bnonblock\b/)&&!zt),1&t.$$.dirty[0]&&n(37,oe=u&&u.dir1?"pnotify-stack-".concat(u.dir1):""),32768&t.$$.dirty[1]&&n(38,re=Array.from(a).filter((function(t){var e=m(t,2),n=e[0];return e[1],"PrependContainer"===n.position}))),32768&t.$$.dirty[1]&&n(39,se=Array.from(a).filter((function(t){var e=m(t,2),n=e[0];return e[1],"PrependContent"===n.position}))),32768&t.$$.dirty[1]&&n(40,ae=Array.from(a).filter((function(t){var e=m(t,2),n=e[0];return e[1],"AppendContent"===n.position}))),32768&t.$$.dirty[1]&&n(41,ce=Array.from(a).filter((function(t){var e=m(t,2),n=e[0];return e[1],"AppendContainer"===n.position}))),34&t.$$.dirty[0]|8&t.$$.dirty[1]&&ee&&f.titleContainer&&f.titleContainer.appendChild($),130&t.$$.dirty[0]|16&t.$$.dirty[1]&&ne&&f.textContainer&&f.textContainer.appendChild(b)},[u,f,et,at,y,$,k,b,O,S,P,A,W,Z,it,rt,ht,mt,yt,$t,kt,function(t){return"string"==typeof M?"".concat(M,"-").concat(t):t in M?M[t]:"".concat(M.prefix,"-").concat(t)},function(t){return"string"==typeof E?"".concat(E,"-icon-").concat(t):t in E?E[t]:"".concat(E.prefix,"-icon-").concat(t)},de,St,Nt,Pt,Lt,Wt,Dt,zt,Yt,Zt,te,ee,ne,ie,oe,re,se,ae,ce,i,r,function(t){if(n(26,Pt=!0),ft&&"closing"===Ct){if(!jt)return;ye()}at&&ft&&ye()},function(t){n(26,Pt=!1),at&&ft&&"out"!==Ht&&-1!==["open","opening"].indexOf(Ct)&&ge()},a,M,E,B,G,K,X,lt,ft,bt,Ot,function(){return Ct},function(){return Mt},ue,pe,ve,ye,ge,function(t){t?(ye(),Mt="prevented"):"prevented"===Mt&&(Mt=null,"open"===Ct&&at&&ge())},function(){return i.$on.apply(i,arguments)},function(){return i.$set.apply(i,arguments)},function(t,e){o(t,e)},function(t){for(var e=0;e<(arguments.length<=1?0:arguments.length-1);e++){var i=e+1<1||arguments.length<=e+1?void 0:arguments[e+1];-1===Lt[t].indexOf(i)&&Lt[t].push(i)}n(27,Lt)},function(t){for(var e=0;e<(arguments.length<=1?0:arguments.length-1);e++){var i=e+1<1||arguments.length<=e+1?void 0:arguments[e+1],o=Lt[t].indexOf(i);-1!==o&&Lt[t].splice(o,1)}n(27,Lt)},function(t){for(var e=0;e<(arguments.length<=1?0:arguments.length-1);e++){var n=e+1<1||arguments.length<=e+1?void 0:arguments[e+1];if(-1===Lt[t].indexOf(n))return!1}return!0},function(){return At},function(t){return At=t},function(){return Rt},function(t){return Rt=t},function(t){return Ht=t},function(){return St},function(t){return n(24,St=t)},function(){return Nt},function(t){return n(25,Nt=t)},function(t,e,i){if(It&&clearTimeout(It),Wt!==t)if(t)n(28,Wt=!0),n(29,Dt=!!e),Vt(),V().then((function(){window.requestAnimationFrame((function(){if(Wt)if(e&&i)i();else{n(29,Dt=!0);var t=function t(){f.elem&&f.elem.removeEventListener("transitionend",t),It&&clearTimeout(It),Dt&&i&&i()};f.elem&&f.elem.addEventListener("transitionend",t),It=setTimeout(t,650)}}))}));else if(e)n(28,Wt=!1),n(29,Dt=!1),bt&&-1===["open","opening","closing"].indexOf(Ct)&&Xt(),i&&i();else{var o=function t(){f.elem&&f.elem.removeEventListener("transitionend",t),It&&clearTimeout(It),Dt||(n(28,Wt=!1),bt&&-1===["open","opening","closing"].indexOf(Ct)&&Xt(),i&&i())};n(29,Dt=!1),f.elem&&f.elem.addEventListener("transitionend",o),f.elem&&f.elem.style.opacity,It=setTimeout(o,650)}},function(){return de(!1)},function(){return n(3,at=!at)},function(t){z[t?"unshift":"push"]((function(){f.iconContainer=t,n(1,f)}))},function(t){z[t?"unshift":"push"]((function(){f.titleContainer=t,n(1,f)}))},function(t){z[t?"unshift":"push"]((function(){f.textContainer=t,n(1,f)}))},function(t){z[t?"unshift":"push"]((function(){f.content=t,n(1,f)}))},function(t){z[t?"unshift":"push"]((function(){f.container=t,n(1,f)}))},function(t){z[t?"unshift":"push"]((function(){f.elem=t,n(1,f)}))}]}window&&document.body?Gt():document.addEventListener("DOMContentLoaded",Gt);var Kt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(s,t);var e,n,o=(e=s,n=f(),function(){var t,i=l(e);if(n){var o=l(this).constructor;t=Reflect.construct(i,arguments,o)}else t=i.apply(this,arguments);return p(this,t)});function s(t){var e;return i(this,s),function(t,e,n,i,o,r){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[-1],a=R;D(t);var c=e.props||{},l=t.$$={fragment:null,ctx:null,props:r,update:$,not_equal:o,bound:x(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:[]),callbacks:x(),dirty:s,skip_bound:!1},u=!1;if(l.ctx=n?n(t,c,(function(e,n){var i=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:n;return l.ctx&&o(l.ctx[e],l.ctx[e]=i)&&(!l.skip_bound&&l.bound[e]&&l.bound[e](i),u&&vt(t,e)),n})):[],l.update(),u=!0,b(l.before_update),l.fragment=!!i&&i(l.ctx),e.target){if(e.hydrate){var f=L(e.target);l.fragment&&l.fragment.l(f),f.forEach(T)}else l.fragment&&l.fragment.c();e.intro&&st(t.$$.fragment),pt(t,e.target,e.anchor),tt()}D(a)}(h(e=o.call(this)),t,Jt,It,O,{modules:46,stack:0,refs:1,type:4,title:5,titleTrusted:6,text:7,textTrusted:8,styling:47,icons:48,mode:9,addClass:10,addModalClass:11,addModelessClass:12,autoOpen:49,width:50,minHeight:51,maxTextHeight:52,icon:13,animation:2,animateSpeed:14,shadow:15,hide:3,delay:53,mouseReset:54,closer:16,closerHover:17,sticker:18,stickerHover:19,labels:20,remove:55,destroy:56,getState:57,getTimer:58,getStyle:21,getIcon:22,open:59,close:23,animateIn:60,animateOut:61,cancelClose:62,queueClose:63,_preventTimerClose:64,on:65,update:66,fire:67,addModuleClass:68,removeModuleClass:69,hasModuleClass:70,getModuleHandled:71,setModuleHandled:72,getModuleOpen:73,setModuleOpen:74,setAnimating:75,getAnimatingClass:76,setAnimatingClass:77,_getMoveClass:78,_setMoveClass:79,_setMasking:80},[-1,-1,-1,-1]),e}return r(s,[{key:"modules",get:function(){return this.$$.ctx[46]},set:function(t){this.$set({modules:t}),tt()}},{key:"stack",get:function(){return this.$$.ctx[0]},set:function(t){this.$set({stack:t}),tt()}},{key:"refs",get:function(){return this.$$.ctx[1]}},{key:"type",get:function(){return this.$$.ctx[4]},set:function(t){this.$set({type:t}),tt()}},{key:"title",get:function(){return this.$$.ctx[5]},set:function(t){this.$set({title:t}),tt()}},{key:"titleTrusted",get:function(){return this.$$.ctx[6]},set:function(t){this.$set({titleTrusted:t}),tt()}},{key:"text",get:function(){return this.$$.ctx[7]},set:function(t){this.$set({text:t}),tt()}},{key:"textTrusted",get:function(){return this.$$.ctx[8]},set:function(t){this.$set({textTrusted:t}),tt()}},{key:"styling",get:function(){return this.$$.ctx[47]},set:function(t){this.$set({styling:t}),tt()}},{key:"icons",get:function(){return this.$$.ctx[48]},set:function(t){this.$set({icons:t}),tt()}},{key:"mode",get:function(){return