(function(){const s=document.querySelector(".toast-ex"),a=document.querySelector(".toast-placement-ex"),l=document.querySelector("#showToastAnimation"),u=document.querySelector("#showToastPlacement");let n,c,t,i,e;l&&(l.onclick=function(){i&&p(i),n=document.querySelector("#selectType").value,c=document.querySelector("#selectAnimation").value,s.classList.add(n,c),i=new bootstrap.Toast(s),i.show()});function p(r){r&&r._element!==null&&(a&&(a.classList.remove(n),DOMTokenList.prototype.remove.apply(a.classList,t)),s&&s.classList.remove(n,c),r.dispose())}u&&(u.onclick=function(){e&&p(e),n=document.querySelector("#selectTypeOpt").value,t=document.querySelector("#selectPlacement").value.split(" "),a.classList.add(n),DOMTokenList.prototype.add.apply(a.classList,t),e=new bootstrap.Toast(a),e.show()})})();$(function(){var s=-1,a=0,l,u=function(){var t=["Don't be pushed around by the fears in your mind. Be led by the dreams in your heart.",'<div class="mb-3"><input class="input-small form-control" value="Textbox"/>&nbsp;<a href="http://johnpapa.net" target="_blank">This is a hyperlink</a></div><div class="d-flex"><button type="button" id="okBtn" class="btn btn-primary btn-sm me-2">Close me</button><button type="button" id="surpriseBtn" class="btn btn-sm btn-secondary">Surprise me</button></div>',"Live the Life of Your Dreams","Believe in Your Self!","Be mindful. Be grateful. Be positive.","Accept yourself, love yourself!"];return s++,s===t.length&&(s=0),t[s]},n=function(t){return t=t||"Clear itself?",t+='<br /><br /><button type="button" class="btn btn-secondary clear">Yes</button>',t};$("#closeButton").on("click",function(){$(this).is(":checked")?$("#addBehaviorOnToastCloseClick").prop("disabled",!1):($("#addBehaviorOnToastCloseClick").prop("disabled",!0),$("#addBehaviorOnToastCloseClick").prop("checked",!1))}),$("#showtoast").on("click",function(){var t=$("#toastTypeGroup input:radio:checked").val(),i=$("html").attr("dir")==="rtl",e=$("#message").val(),p=$("#title").val()||"",r=$("#showDuration"),h=$("#hideDuration"),f=$("#timeOut"),m=$("#extendedTimeOut"),v=$("#showEasing"),k=$("#hideEasing"),g=$("#showMethod"),y=$("#hideMethod"),b=a++,d=$("#addClear").prop("checked"),B="toast-top-right";B=typeof toastr.options.positionClass>"u"?"toast-top-right":toastr.options.positionClass,toastr.options={maxOpened:1,autoDismiss:!0,closeButton:$("#closeButton").prop("checked"),debug:$("#debugInfo").prop("checked"),newestOnTop:$("#newestOnTop").prop("checked"),progressBar:$("#progressBar").prop("checked"),positionClass:$("#positionGroup input:radio:checked").val()||"toast-top-right",preventDuplicates:$("#preventDuplicates").prop("checked"),onclick:null,rtl:i},B!=toastr.options.positionClass&&(toastr.options.hideDuration=0,toastr.clear()),$("#addBehaviorOnToastClick").prop("checked")&&(toastr.options.onclick=function(){alert("You can perform some custom action after a toast goes away")}),$("#addBehaviorOnToastCloseClick").prop("checked")&&(toastr.options.onCloseClick=function(){alert("You can perform some custom action when the close button is clicked")}),r.val().length&&(toastr.options.showDuration=parseInt(r.val())),h.val().length&&(toastr.options.hideDuration=parseInt(h.val())),f.val().length&&(toastr.options.timeOut=d?0:parseInt(f.val())),m.val().length&&(toastr.options.extendedTimeOut=d?0:parseInt(m.val())),v.val().length&&(toastr.options.showEasing=v.val()),k.val().length&&(toastr.options.hideEasing=k.val()),g.val().length&&(toastr.options.showMethod=g.val()),y.val().length&&(toastr.options.hideMethod=y.val()),d&&(e=n(e),toastr.options.tapToDismiss=!1),e||(e=u());var o=toastr[t](e,p);l=o,!(typeof o>"u")&&(o.find("#okBtn").length&&o.delegate("#okBtn","click",function(){alert("you clicked me. i was toast #"+b+". goodbye!"),o.remove()}),o.find("#surpriseBtn").length&&o.delegate("#surpriseBtn","click",function(){alert("Surprise! you clicked me. i was toast #"+b+". You could perform an action here.")}),o.find(".clear").length&&o.delegate(".clear","click",function(){toastr.clear(o,{force:!0})}))});function c(){return l}$("#clearlasttoast").on("click",function(){toastr.clear(c())}),$("#cleartoasts").on("click",function(){toastr.clear()})});
