text: (function(define){define(["jquery"],function($){return function(){function error(message,title,optionsOverride){return notify({type:toastType.error,iconClass:getOptions().iconClasses.error,message:message,optionsOverride:optionsOverride,title:title})}function getContainer(options,create){return(options||(options=getOptions()),$container=$("#"+options.containerId),$container.length)?$container:(create&&($container=createContainer(options)),$container)}function info(message,title,optionsOverride){return notify({type:toastType.info,iconClass:getOptions().iconClasses.info,message:message,optionsOverride:optionsOverride,title:title})}function subscribe(callback){listener=callback}function success(message,title,optionsOverride){return notify({type:toastType.success,iconClass:getOptions().iconClasses.success,message:message,optionsOverride:optionsOverride,title:title})}function warning(message,title,optionsOverride){return notify({type:toastType.warning,iconClass:getOptions().iconClasses.warning,message:message,optionsOverride:optionsOverride,title:title})}function clear($toastElement,clearOptions){var options=getOptions();$container||getContainer(options);clearToast($toastElement,options,clearOptions)||clearContainer(options)}function remove($toastElement){var options=getOptions();if($container||getContainer(options),$toastElement&&$(":focus",$toastElement).length===0){removeToast($toastElement);return}$container.children().length&&$container.remove()}function clearContainer(options){for(var toastsToClear=$container.children(),i=toastsToClear.length-1;i>=0;i--)clearToast($(toastsToClear[i]),options)}function clearToast($toastElement,options,clearOptions){var force=clearOptions&&clearOptions.force?clearOptions.force:!1;return $toastElement&&(force||$(":focus",$toastElement).length===0)?($toastElement[options.hideMethod]({duration:options.hideDuration,easing:options.hideEasing,complete:function(){removeToast($toastElement)}}),!0):!1}function createContainer(options){return $container=$("<div/>").attr("id",options.containerId).addClass(options.positionClass),$container.appendTo($(options.target)),$container}function getDefaults(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:undefined,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:undefined,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'<button type="button">&times;<\/button>',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1}}function publish(args){listener&&listener(args)}function notify(map){function escapeHtml(source){return source==null&&(source=""),source.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function personalizeToast(){setIcon();setTitle();setMessage();setCloseButton();setProgressBar();setRTL();setSequence();setAria()}function setAria(){var ariaValue="";switch(map.iconClass){case"toast-success":case"toast-info":ariaValue="polite";break;default:ariaValue="assertive"}$toastElement.attr("aria-live",ariaValue)}function handleEvents(){options.closeOnHover&&$toastElement.hover(stickAround,delayedHideToast);!options.onclick&&options.tapToDismiss&&$toastElement.click(hideToast);options.closeButton&&$closeElement&&$closeElement.click(function(event){if(event.stopPropagation?event.stopPropagation():event.cancelBubble!==undefined&&event.cancelBubble!==!0&&(event.cancelBubble=!0),options.onCloseClick)options.onCloseClick(event);hideToast(!0)});options.onclick&&$toastElement.click(function(event){options.onclick(event);hideToast()})}function displayToast(){$toastElement.hide();$toastElement[options.showMethod]({duration:options.showDuration,easing:options.showEasing,complete:options.onShown});options.timeOut>0&&(intervalId=setTimeout(hideToast,options.timeOut),progressBar.maxHideTime=parseFloat(options.timeOut),progressBar.hideEta=(new Date).getTime()+progressBar.maxHideTime,options.progressBar&&(progressBar.intervalId=setInterval(updateProgress,10)))}function setIcon(){map.iconClass&&$toastElement.addClass(options.toastClass).addClass(iconClass)}function setSequence(){options.newestOnTop?$container.prepend($toastElement):$container.append($toastElement)}function setTitle(){if(map.title){var suffix=map.title;options.escapeHtml&&(suffix=escapeHtml(map.title));$titleElement.append(suffix).addClass(options.titleClass);$toastElement.append($titleElement)}}function setMessage(){if(map.message){var suffix=map.message;options.escapeHtml&&(suffix=escapeHtml(map.message));$messageElement.append(suffix).addClass(options.messageClass);$toastElement.append($messageElement)}}function setCloseButton(){options.closeButton&&($closeElement.addClass(options.closeClass).attr("role","button"),$toastElement.prepend($closeElement))}function setProgressBar(){options.progressBar&&($progressElement.addClass(options.progressClass),$toastElement.prepend($progressElement))}function setRTL(){options.rtl&&$toastElement.addClass("rtl")}function shouldExit(options,map){if(options.preventDuplicates){if(map.message===previousToast)return!0;previousToast=map.message}return!1}function hideToast(override){var method=override&&options.closeMethod!==!1?options.closeMethod:options.hideMethod,duration=override&&options.closeDuration!==!1?options.closeDuration:options.hideDuration,easing=override&&options.closeEasing!==!1?options.closeEasing:options.hideEasing;if(!$(":focus",$toastElement).length||override)return clearTimeout(progressBar.intervalId),$toastElement[method]({duration:duration,easing:easing,complete:function(){removeToast($toastElement);clearTimeout(intervalId);options.onHidden&&response.state!=="hidden"&&options.onHidden();response.state="hidden";response.endTime=new Date;publish(response)}})}function delayedHideToast(){(options.timeOut>0||options.extendedTimeOut>0)&&(intervalId=setTimeout(hideToast,options.extendedTimeOut),progressBar.maxHideTime=parseFloat(options.extendedTimeOut),progressBar.hideEta=(new Date).getTime()+progressBar.maxHideTime)}function stickAround(){clearTimeout(intervalId);progressBar.hideEta=0;$toastElement.stop(!0,!0)[options.showMethod]({duration:options.showDuration,easing:options.showEasing})}function updateProgress(){var percentage=(progressBar.hideEta-(new Date).getTime())/progressBar.maxHideTime*100;$progressElement.width(percentage+"%")}var options=getOptions(),iconClass=map.iconClass||options.iconClass;if(typeof map.optionsOverride!="undefined"&&(options=$.extend(options,map.optionsOverride),iconClass=map.optionsOverride.iconClass||iconClass),!shouldExit(options,map)){toastId++;$container=getContainer(options,!0);var intervalId=null,$toastElement=$("<div/>"),$titleElement=$("<div/>"),$messageElement=$("<div/>"),$progressElement=$("<div/>"),$closeElement=$(options.closeHtml),progressBar={intervalId:null,hideEta:null,maxHideTime:null},response={toastId:toastId,state:"visible",startTime:new Date,options:options,map:map};return personalizeToast(),displayToast(),handleEvents(),publish(response),options.debug&&console&&console.log(response),$toastElement}}function getOptions(){return $.extend({},getDefaults(),toastr.options)}function removeToast($toastElement){($container||($container=getContainer()),$toastElement.is(":visible"))||($toastElement.remove(),$toastElement=null,$container.children().length===0&&($container.remove(),previousToast=undefined))}var $container,listener,toastId=0,toastType={error:"error",info:"info",success:"success",warning:"warning"},toastr={clear:clear,remove:remove,error:error,getContainer:getContainer,info:info,options:{},subscribe:subscribe,success:success,version:"2.1.4",warning:warning},previousToast;return toastr}()})})(typeof define=="function"&&define.amd?define:function(deps,factory){typeof module!="undefined"&&module.exports?module.exports=factory(require("jquery")):window.toastr=factory(window.jQuery)});