!function(a,b){"function"==typeof define&&define.amd?define("pnotify",["jquery"],function(c){return b(c,a)}):"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery"),global||a):a.PNotify=b(a.jQuery,a)}("undefined"!=typeof window?window:this,function(a,b){var c=function(b){var d,e,f={dir1:"down",dir2:"left",push:"bottom",spacing1:36,spacing2:36,context:a("body"),modal:!1},g=a(b),h=function(){e=a("body"),j.prototype.options.stack.context=e,g=a(b),g.bind("resize",function(){d&&clearTimeout(d),d=setTimeout(function(){j.positionAll(!0)},10)})},i=function(b){var c=a("
",{class:"ui-pnotify-modal-overlay"});return c.prependTo(b.context),b.overlay_close&&c.click(function(){j.removeStack(b)}),c},j=function(a){this.state="initializing",this.timer=null,this.animTimer=null,this.styles=null,this.elem=null,this.container=null,this.title_container=null,this.text_container=null,this.animating=!1,this.timerHide=!1,this.parseOptions(a),this.init()};return a.extend(j.prototype,{version:"3.2.0",options:{title:!1,title_escape:!1,text:!1,text_escape:!1,styling:"brighttheme",addclass:"",cornerclass:"",auto_display:!0,width:"300px",min_height:"16px",type:"notice",icon:!0,animation:"fade",animate_speed:"normal",shadow:!0,hide:!0,delay:8e3,mouse_reset:!0,remove:!0,insert_brs:!0,destroy:!0,stack:f},modules:{},runModules:function(a,b){var c;for(var d in this.modules)c="object"==typeof b&&d in b?b[d]:b,"function"==typeof this.modules[d][a]&&(this.modules[d].notice=this,this.modules[d].options="object"==typeof this.options[d]?this.options[d]:{},this.modules[d][a](this,"object"==typeof this.options[d]?this.options[d]:{},c))},init:function(){var b=this;return this.modules={},a.extend(!0,this.modules,j.prototype.modules),"object"==typeof this.options.styling?this.styles=this.options.styling:this.styles=j.styling[this.options.styling],this.elem=a("
",{class:"ui-pnotify "+this.options.addclass,css:{display:"none"},"aria-live":"assertive","aria-role":"alertdialog",mouseenter:function(a){if(b.options.mouse_reset&&"out"===b.animating){if(!b.timerHide)return;b.cancelRemove()}b.options.hide&&b.options.mouse_reset&&b.cancelRemove()},mouseleave:function(a){b.options.hide&&b.options.mouse_reset&&"out"!==b.animating&&b.queueRemove(),j.positionAll()}}),"fade"===this.options.animation&&this.elem.addClass("ui-pnotify-fade-"+this.options.animate_speed),this.container=a("
",{class:this.styles.container+" ui-pnotify-container "+("error"===this.options.type?this.styles.error:"info"===this.options.type?this.styles.info:"success"===this.options.type?this.styles.success:this.styles.notice),role:"alert"}).appendTo(this.elem),""!==this.options.cornerclass&&this.container.removeClass("ui-corner-all").addClass(this.options.cornerclass),this.options.shadow&&this.container.addClass("ui-pnotify-shadow"),!1!==this.options.icon&&a("
",{class:"ui-pnotify-icon"}).append(a("",{class:!0===this.options.icon?"error"===this.options.type?this.styles.error_icon:"info"===this.options.type?this.styles.info_icon:"success"===this.options.type?this.styles.success_icon:this.styles.notice_icon:this.options.icon})).prependTo(this.container),this.title_container=a("

",{class:"ui-pnotify-title"}).appendTo(this.container),!1===this.options.title?this.title_container.hide():this.options.title_escape?this.title_container.text(this.options.title):this.title_container.html(this.options.title),this.text_container=a("
",{class:"ui-pnotify-text","aria-role":"alert"}).appendTo(this.container),!1===this.options.text?this.text_container.hide():this.options.text_escape?this.text_container.text(this.options.text):this.text_container.html(this.options.insert_brs?String(this.options.text).replace(/\n/g,"
"):this.options.text),"string"==typeof this.options.width&&this.elem.css("width",this.options.width),"string"==typeof this.options.min_height&&this.container.css("min-height",this.options.min_height),"top"===this.options.stack.push?j.notices=a.merge([this],j.notices):j.notices=a.merge(j.notices,[this]),"top"===this.options.stack.push&&this.queuePosition(!1,1),this.options.stack.animation=!1,this.runModules("init"),this.state="closed",this.options.auto_display&&this.open(),this},update:function(b){var c=this.options;return this.parseOptions(c,b),this.elem.removeClass("ui-pnotify-fade-slow ui-pnotify-fade-normal ui-pnotify-fade-fast"),"fade"===this.options.animation&&this.elem.addClass("ui-pnotify-fade-"+this.options.animate_speed),this.options.cornerclass!==c.cornerclass&&this.container.removeClass("ui-corner-all "+c.cornerclass).addClass(this.options.cornerclass),this.options.shadow!==c.shadow&&(this.options.shadow?this.container.addClass("ui-pnotify-shadow"):this.container.removeClass("ui-pnotify-shadow")),!1===this.options.addclass?this.elem.removeClass(c.addclass):this.options.addclass!==c.addclass&&this.elem.removeClass(c.addclass).addClass(this.options.addclass),!1===this.options.title?this.title_container.slideUp("fast"):this.options.title!==c.title&&(this.options.title_escape?this.title_container.text(this.options.title):this.title_container.html(this.options.title),!1===c.title&&this.title_container.slideDown(200)),!1===this.options.text?this.text_container.slideUp("fast"):this.options.text!==c.text&&(this.options.text_escape?this.text_container.text(this.options.text):this.text_container.html(this.options.insert_brs?String(this.options.text).replace(/\n/g,"
"):this.options.text),!1===c.text&&this.text_container.slideDown(200)),this.options.type!==c.type&&this.container.removeClass(this.styles.error+" "+this.styles.notice+" "+this.styles.success+" "+this.styles.info).addClass("error"===this.options.type?this.styles.error:"info"===this.options.type?this.styles.info:"success"===this.options.type?this.styles.success:this.styles.notice),(this.options.icon!==c.icon||!0===this.options.icon&&this.options.type!==c.type)&&(this.container.find("div.ui-pnotify-icon").remove(),!1!==this.options.icon&&a("
",{class:"ui-pnotify-icon"}).append(a("",{class:!0===this.options.icon?"error"===this.options.type?this.styles.error_icon:"info"===this.options.type?this.styles.info_icon:"success"===this.options.type?this.styles.success_icon:this.styles.notice_icon:this.options.icon})).prependTo(this.container)),this.options.width!==c.width&&this.elem.animate({width:this.options.width}),this.options.min_height!==c.min_height&&this.container.animate({minHeight:this.options.min_height}),this.options.hide?c.hide||this.queueRemove():this.cancelRemove(),this.queuePosition(!0),this.runModules("update",c),this},open:function(){this.state="opening",this.runModules("beforeOpen");var a=this;return this.elem.parent().length||this.elem.appendTo(this.options.stack.context?this.options.stack.context:e),"top"!==this.options.stack.push&&this.position(!0),this.animateIn(function(){a.queuePosition(!0),a.options.hide&&a.queueRemove(),a.state="open",a.runModules("afterOpen")}),this},remove:function(c){this.state="closing",this.timerHide=!!c,this.runModules("beforeClose");var d=this;return this.timer&&(b.clearTimeout(this.timer),this.timer=null),this.animateOut(function(){if(d.state="closed",d.runModules("afterClose"),d.queuePosition(!0),d.options.remove&&d.elem.detach(),d.runModules("beforeDestroy"),d.options.destroy&&null!==j.notices){var b=a.inArray(d,j.notices);-1!==b&&j.notices.splice(b,1)}d.runModules("afterDestroy")}),this},get:function(){return this.elem},parseOptions:function(b,c){this.options=a.extend(!0,{},j.prototype.options),this.options.stack=j.prototype.options.stack;for(var d,e=[b,c],f=0;f(b.context.is(e)?g.height():b.context.prop("scrollHeight"))||"up"===b.dir1&&b.nextpos1+c.height()>(b.context.is(e)?g.height():b.context.prop("scrollHeight"))||"left"===b.dir1&&b.nextpos1+c.width()>(b.context.is(e)?g.width():b.context.prop("scrollWidth"))||"right"===b.dir1&&b.nextpos1+c.width()>(b.context.is(e)?g.width():b.context.prop("scrollWidth")))&&(b.nextpos1=b.firstpos1,b.nextpos2+=b.addpos2+(void 0===b.spacing2?25:b.spacing2),b.addpos2=0),"number"==typeof b.nextpos2&&(b.animation?c.css(k,b.nextpos2+"px"):(c.removeClass("ui-pnotify-move"),c.css(k,b.nextpos2+"px"),c.css(k),c.addClass("ui-pnotify-move"))),b.dir2){case"down":case"up":c.outerHeight(!0)>b.addpos2&&(b.addpos2=c.height());break;case"left":case"right":c.outerWidth(!0)>b.addpos2&&(b.addpos2=c.width())}switch("number"==typeof b.nextpos1&&(b.animation?c.css(j,b.nextpos1+"px"):(c.removeClass("ui-pnotify-move"),c.css(j,b.nextpos1+"px"),c.css(j),c.addClass("ui-pnotify-move"))),b.dir1){case"down":case"up":b.nextpos1+=c.height()+(void 0===b.spacing1?25:b.spacing1);break;case"left":case"right":b.nextpos1+=c.width()+(void 0===b.spacing1?25:b.spacing1)}}return this}},queuePosition:function(a,b){return d&&clearTimeout(d),b||(b=10),d=setTimeout(function(){j.positionAll(a)},b),this},cancelRemove:function(){return this.timer&&b.clearTimeout(this.timer),this.animTimer&&b.clearTimeout(this.animTimer),"closing"===this.state&&(this.state="open",this.animating=!1,this.elem.addClass("ui-pnotify-in"),"fade"===this.options.animation&&this.elem.addClass("ui-pnotify-fade-in")),this},queueRemove:function(){var a=this;return this.cancelRemove(),this.timer=b.setTimeout(function(){a.remove(!0)},isNaN(this.options.delay)?0:this.options.delay),this}}),a.extend(j,{notices:[],reload:c,removeAll:function(){a.each(j.notices,function(a,b){b.remove&&b.remove(!1)})},removeStack:function(b){a.each(j.notices,function(a,c){c.remove&&c.options.stack===b&&c.remove(!1)})},positionAll:function(b){if(d&&clearTimeout(d),d=null,j.notices&&j.notices.length)a.each(j.notices,function(a,c){var d=c.options.stack;d&&(d.overlay&&d.overlay.hide(),d.nextpos1=d.firstpos1,d.nextpos2=d.firstpos2,d.addpos2=0,d.animation=b)}),a.each(j.notices,function(a,b){b.position()});else{var c=j.prototype.options.stack;c&&(delete c.nextpos1,delete c.nextpos2)}},styling:{brighttheme:{container:"brighttheme",notice:"brighttheme-notice",notice_icon:"brighttheme-icon-notice",info:"brighttheme-info",info_icon:"brighttheme-icon-info",success:"brighttheme-success",success_icon:"brighttheme-icon-success",error:"brighttheme-error",error_icon:"brighttheme-icon-error"},bootstrap3:{container:"alert",notice:"alert-warning",notice_icon:"glyphicon glyphicon-exclamation-sign",info:"alert-info",info_icon:"glyphicon glyphicon-info-sign",success:"alert-success",success_icon:"glyphicon glyphicon-ok-sign",error:"alert-danger",error_icon:"glyphicon glyphicon-warning-sign"}}}),j.styling.fontawesome=a.extend({},j.styling.bootstrap3),a.extend(j.styling.fontawesome,{notice_icon:"fa fa-exclamation-circle",info_icon:"fa fa-info",success_icon:"fa fa-check",error_icon:"fa fa-warning"}),b.document.body?h():a(h),j};return c(b)}),!function(a,b){"function"==typeof define&&define.amd?define("pnotify.animate",["jquery","pnotify"],b):"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery"),require("./pnotify")):b(a.jQuery,a.PNotify)}("undefined"!=typeof window?window:this,function(a,b){return b.prototype.options.animate={animate:!1,in_class:"",out_class:""},b.prototype.modules.animate={init:function(a,b){this.setUpAnimations(a,b),a.attention=function(b,c){a.elem.one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){a.elem.removeClass(b),c&&c.call(a)}).addClass("animated "+b)}},update:function(a,b,c){b.animate!=c.animate&&this.setUpAnimations(a,b)},setUpAnimations:function(a,b){if(b.animate){a.options.animation="none",a.elem.removeClass("ui-pnotify-fade-slow ui-pnotify-fade-normal ui-pnotify-fade-fast"),a._animateIn||(a._animateIn=a.animateIn),a._animateOut||(a._animateOut=a.animateOut),a.animateIn=this.animateIn.bind(this),a.animateOut=this.animateOut.bind(this);var c=400;"slow"===a.options.animate_speed?c=600:"fast"===a.options.animate_speed?c=200:a.options.animate_speed>0&&(c=a.options.animate_speed),c/=1e3,a.elem.addClass("animated").css({"-webkit-animation-duration":c+"s","-moz-animation-duration":c+"s","animation-duration":c+"s"})}else a._animateIn&&a._animateOut&&(a.animateIn=a._animateIn,delete a._animateIn,a.animateOut=a._animateOut,delete a._animateOut,a.elem.addClass("animated"))},animateIn:function(a){this.notice.animating="in";var b=this;a=function(){b.notice.elem.removeClass(b.options.in_class),this&&this.call(),b.notice.animating=!1}.bind(a),this.notice.elem.show().one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",a).removeClass(this.options.out_class).addClass("ui-pnotify-in").addClass(this.options.in_class)},animateOut:function(a){this.notice.animating="out";var b=this;a=function(){b.notice.elem.removeClass("ui-pnotify-in "+b.options.out_class),this&&this.call(),b.notice.animating=!1}.bind(a),this.notice.elem.one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",a).removeClass(this.options.in_class).addClass(this.options.out_class)}},b}),!function(a,b){"function"==typeof define&&define.amd?define("pnotify.buttons",["jquery","pnotify"],b):"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery"),require("./pnotify")):b(a.jQuery,a.PNotify)}("undefined"!=typeof window?window:this,function(a,b){return b.prototype.options.buttons={closer:!0,closer_hover:!0,sticker:!0,sticker_hover:!0,show_on_nonblock:!1,labels:{close:"Close",stick:"Stick",unstick:"Unstick"},classes:{closer:null,pin_up:null,pin_down:null}},b.prototype.modules.buttons={init:function(b,c){var d=this;b.elem.on({mouseenter:function(a){!d.options.sticker||b.options.nonblock&&b.options.nonblock.nonblock&&!d.options.show_on_nonblock||d.sticker.trigger("pnotify:buttons:toggleStick").css("visibility","visible"),!d.options.closer||b.options.nonblock&&b.options.nonblock.nonblock&&!d.options.show_on_nonblock||d.closer.css("visibility","visible")},mouseleave:function(a){d.options.sticker_hover&&d.sticker.css("visibility","hidden"),d.options.closer_hover&&d.closer.css("visibility","hidden")}}),this.sticker=a("
",{class:"ui-pnotify-sticker","aria-role":"button","aria-pressed":b.options.hide?"false":"true",tabindex:"0",title:b.options.hide?c.labels.stick:c.labels.unstick,css:{cursor:"pointer",visibility:c.sticker_hover?"hidden":"visible"},click:function(){b.options.hide=!b.options.hide,b.options.hide?b.queueRemove():b.cancelRemove(),a(this).trigger("pnotify:buttons:toggleStick")}}).bind("pnotify:buttons:toggleStick",function(){var c=null===d.options.classes.pin_up?b.styles.pin_up:d.options.classes.pin_up,e=null===d.options.classes.pin_down?b.styles.pin_down:d.options.classes.pin_down;a(this).attr("title",b.options.hide?d.options.labels.stick:d.options.labels.unstick).children().attr("class","").addClass(b.options.hide?c:e).attr("aria-pressed",b.options.hide?"false":"true")}).append("").trigger("pnotify:buttons:toggleStick").prependTo(b.container),(!c.sticker||b.options.nonblock&&b.options.nonblock.nonblock&&!c.show_on_nonblock)&&this.sticker.css("display","none"),this.closer=a("
",{class:"ui-pnotify-closer","aria-role":"button",tabindex:"0",title:c.labels.close,css:{cursor:"pointer",visibility:c.closer_hover?"hidden":"visible"},click:function(){b.remove(!1),d.sticker.css("visibility","hidden"),d.closer.css("visibility","hidden")}}).append(a("",{class:null===c.classes.closer?b.styles.closer:c.classes.closer})).prependTo(b.container),(!c.closer||b.options.nonblock&&b.options.nonblock.nonblock&&!c.show_on_nonblock)&&this.closer.css("display","none")},update:function(a,b){!b.closer||a.options.nonblock&&a.options.nonblock.nonblock&&!b.show_on_nonblock?this.closer.css("display","none"):b.closer&&this.closer.css("display","block"),!b.sticker||a.options.nonblock&&a.options.nonblock.nonblock&&!b.show_on_nonblock?this.sticker.css("display","none"):b.sticker&&this.sticker.css("display","block"),this.sticker.trigger("pnotify:buttons:toggleStick"),this.closer.find("span").attr("class","").addClass(null===b.classes.closer?a.styles.closer:b.classes.closer),b.sticker_hover?this.sticker.css("visibility","hidden"):a.options.nonblock&&a.options.nonblock.nonblock&&!b.show_on_nonblock||this.sticker.css("visibility","visible"),b.closer_hover?this.closer.css("visibility","hidden"):a.options.nonblock&&a.options.nonblock.nonblock&&!b.show_on_nonblock||this.closer.css("visibility","visible")}},a.extend(b.styling.brighttheme,{closer:"brighttheme-icon-closer",pin_up:"brighttheme-icon-sticker",pin_down:"brighttheme-icon-sticker brighttheme-icon-stuck"}),a.extend(b.styling.bootstrap3,{closer:"glyphicon glyphicon-remove",pin_up:"glyphicon glyphicon-pause",pin_down:"glyphicon glyphicon-play"}),a.extend(b.styling.fontawesome,{closer:"fa fa-times",pin_up:"fa fa-pause",pin_down:"fa fa-play"}),b}),!function(a,b){"function"==typeof define&&define.amd?define("pnotify.callbacks",["jquery","pnotify"],b):"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery"),require("./pnotify")):b(a.jQuery,a.PNotify)}("undefined"!=typeof window?window:this,function(a,b){var c=b.prototype.init,d=b.prototype.open,e=b.prototype.remove;return b.prototype.init=function(){this.options.before_init&&this.options.before_init(this.options),c.apply(this,arguments),this.options.after_init&&this.options.after_init(this)},b.prototype.open=function(){var a;this.options.before_open&&(a=this.options.before_open(this)),!1!==a&&(d.apply(this,arguments),this.options.after_open&&this.options.after_open(this))},b.prototype.remove=function(a){var b;this.options.before_close&&(b=this.options.before_close(this,a)),!1!==b&&(e.apply(this,arguments),this.options.after_close&&this.options.after_close(this,a))},b}),!function(a,b){"function"==typeof define&&define.amd?define("pnotify.confirm",["jquery","pnotify"],b):"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery"),require("./pnotify")):b(a.jQuery,a.PNotify)}("undefined"!=typeof window?window:this,function(a,b){return b.prototype.options.confirm={confirm:!1,prompt:!1,prompt_class:"",prompt_default:"",prompt_multi_line:!1,align:"right",buttons:[{text:"Ok",addClass:"",promptTrigger:!0,click:function(a,b){a.remove(),a.get().trigger("pnotify.confirm",[a,b])}},{text:"Cancel",addClass:"",click:function(a){a.remove(),a.get().trigger("pnotify.cancel",a)}}]},b.prototype.modules.confirm={init:function(b,c){this.container=a('
').css("text-align",c.align).appendTo(b.container),c.confirm||c.prompt?this.makeDialog(b,c):this.container.hide()},update:function(a,b){b.confirm?(this.makeDialog(a,b),this.container.show()):this.container.hide().empty()},afterOpen:function(a,b){b.prompt&&this.prompt.focus()},makeDialog:function(c,d){var e,f,g=!1,h=this;this.container.empty(),d.prompt&&(this.prompt=a("<"+(d.prompt_multi_line?'textarea rows="5"':'input type="text"')+' style="margin-bottom:5px;clear:both;" />').addClass((void 0===c.styles.input?"":c.styles.input)+" "+(void 0===d.prompt_class?"":d.prompt_class)).val(d.prompt_default).appendTo(this.container));for(var i=d.buttons[0]&&d.buttons[0]!==b.prototype.options.confirm.buttons[0],j=0;j').addClass((void 0===c.styles.btn?"":c.styles.btn)+" "+(void 0===e.addClass?"":e.addClass)).text(e.text).appendTo(this.container).on("click",function(a){return function(){"function"==typeof a.click&&a.click(c,d.prompt?h.prompt.val():null)}}(e)),d.prompt&&!d.prompt_multi_line&&e.promptTrigger&&this.prompt.keypress(function(a){return function(b){13==b.keyCode&&a.click()}}(f)),c.styles.text&&f.wrapInner(''),c.styles.btnhover&&f.hover(function(a){return function(){a.addClass(c.styles.btnhover)}}(f),function(a){return function(){a.removeClass(c.styles.btnhover)}}(f)),c.styles.btnactive&&f.on("mousedown",function(a){return function(){a.addClass(c.styles.btnactive)}}(f)).on("mouseup",function(a){return function(){a.removeClass(c.styles.btnactive)}}(f)),c.styles.btnfocus&&f.on("focus",function(a){return function(){a.addClass(c.styles.btnfocus)}}(f)).on("blur",function(a){return function(){a.removeClass(c.styles.btnfocus)}}(f)))}},a.extend(b.styling.bootstrap3,{btn:"btn btn-default",input:"form-control"}),a.extend(b.styling.fontawesome,{btn:"btn btn-default",input:"form-control"}),b}),!function(a,b){"function"==typeof define&&define.amd?define("pnotify.desktop",["jquery","pnotify"],b):"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery"),require("./pnotify")):b(a.jQuery,a.PNotify)}("undefined"!=typeof window?window:this,function(a,b){var c,d=function(a,b){return(d="Notification"in window?function(a,b){return new Notification(a,b)}:"mozNotification"in navigator?function(a,b){return navigator.mozNotification.createNotification(a,b.body,b.icon).show()}:"webkitNotifications"in window?function(a,b){return window.webkitNotifications.createNotification(b.icon,a,b.body)}:function(a,b){return null})(a,b)};return b.prototype.options.desktop={desktop:!1,fallback:!0,icon:null,tag:null,title:null,text:null},b.prototype.modules.desktop={genNotice:function(a,b){null===b.icon?this.icon="http://sciactive.com/pnotify/includes/desktop/"+a.options.type+".png":!1===b.icon?this.icon=null:this.icon=b.icon,null!==this.tag&&null===b.tag||(this.tag=null===b.tag?"PNotify-"+Math.round(1e6*Math.random()):b.tag),a.desktop=d(b.title||a.options.title,{icon:this.icon,body:b.text||a.options.text,tag:this.tag}),!("close"in a.desktop)&&"cancel"in a.desktop&&(a.desktop.close=function(){a.desktop.cancel()}),a.desktop.onclick=function(){a.elem.trigger("click")},a.desktop.onclose=function(){"closing"!==a.state&&"closed"!==a.state&&a.remove()}},init:function(a,d){if(d.desktop){if(0!==(c=b.desktop.checkPermission()))return void(d.fallback||(a.options.auto_display=!1));this.genNotice(a,d)}},update:function(a,b,d){0!==c&&b.fallback||!b.desktop||this.genNotice(a,b)},beforeOpen:function(a,b){0!==c&&b.fallback||!b.desktop||a.elem.css({left:"-10000px"}).removeClass("ui-pnotify-in")},afterOpen:function(a,b){0!==c&&b.fallback||!b.desktop||(a.elem.css({left:"-10000px"}).removeClass("ui-pnotify-in"),"show"in a.desktop&&a.desktop.show())},beforeClose:function(a,b){0!==c&&b.fallback||!b.desktop||a.elem.css({left:"-10000px"}).removeClass("ui-pnotify-in")},afterClose:function(a,b){0!==c&&b.fallback||!b.desktop||(a.elem.css({left:"-10000px"}).removeClass("ui-pnotify-in"),"close"in a.desktop&&a.desktop.close())}},b.desktop={permission:function(){"undefined"!=typeof Notification&&"requestPermission"in Notification?Notification.requestPermission():"webkitNotifications"in window&&window.webkitNotifications.requestPermission()},checkPermission:function(){return"undefined"!=typeof Notification&&"permission"in Notification?"granted"===Notification.permission?0:1:"webkitNotifications"in window&&0==window.webkitNotifications.checkPermission()?0:1}},c=b.desktop.checkPermission(),b}),!function(a,b){"function"==typeof define&&define.amd?define("pnotify.history",["jquery","pnotify"],b):"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery"),require("./pnotify")):b(a.jQuery,a.PNotify)}("undefined"!=typeof window?window:this,function(a,b){var c,d;return a(function(){a("body").on("pnotify.history-all",function(){a.each(b.notices,function(){this.modules.history.inHistory&&(this.elem.is(":visible")?this.options.hide&&this.queueRemove():this.open&&this.open())})}).on("pnotify.history-last",function(){var a,c="top"===b.prototype.options.stack.push,d=c?0:-1;do{if(a=-1===d?b.notices.slice(d):b.notices.slice(d,d+1),!a[0])return!1;d=c?d+1:d-1}while(!a[0].modules.history.inHistory||a[0].elem.is(":visible"));a[0].open&&a[0].open()})}),b.prototype.options.history={history:!0,menu:!1,fixed:!0,maxonscreen:1/0,labels:{redisplay:"Redisplay",all:"All",last:"Last"}},b.prototype.modules.history={init:function(b,e){if(b.options.destroy=!1,this.inHistory=e.history,e.menu&&void 0===c){c=a("
",{class:"ui-pnotify-history-container "+b.styles.hi_menu,mouseleave:function(){c.css("top","-"+d+"px")}}).append(a("
",{class:"ui-pnotify-history-header",text:e.labels.redisplay})).append(a("