!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sweetalert2=e()}(this,function(){"use strict";function r(t){return(r="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 o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n\n
\n \n
\n
\n
\n
\n
\n \n

\n \n
\n
\n
\n \n \n
\n \n \n
\n \n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n
\n \n').replace(/(^|\n)\s*/g,""),mt=function(t){var e,n=!!(e=W())&&(e.parentNode.removeChild(e),lt([document.documentElement,document.body],[F["no-backdrop"],F["toast-shown"],F["has-column"]]),!0);if(it())v("SweetAlert2 requires document to initialize");else{var o=document.createElement("div");o.className=F.container,n&&ut(o,F["no-transition"]),M(o,ft);var i,r,a,c,s,u,l,d,p,f,m,h,g="string"==typeof(i=t.target)?document.querySelector(i):i;g.appendChild(o),r=t,(a=K()).setAttribute("role",r.toast?"alert":"dialog"),a.setAttribute("aria-live",r.toast?"polite":"assertive"),r.toast||a.setAttribute("aria-modal","true"),c=g,"rtl"===window.getComputedStyle(c).direction&&ut(W(),F.rtl),s=k(),u=dt(s,F.input),l=dt(s,F.file),d=s.querySelector(".".concat(F.range," input")),p=s.querySelector(".".concat(F.range," output")),f=dt(s,F.select),m=s.querySelector(".".concat(F.checkbox," input")),h=dt(s,F.textarea),u.oninput=rt,l.onchange=rt,f.onchange=rt,m.onchange=rt,h.oninput=rt,d.oninput=function(t){rt(t),p.value=d.value},d.onchange=function(t){rt(t),d.nextSibling.value=d.value}}},ht=function(t,e){t.jquery?gt(e,t):M(e,t.toString())},gt=function(t,e){if(t.textContent="",0 in e)for(var n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},vt=function(){if(it())return!1;var t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&void 0!==t.style[n])return e[n];return!1}();function bt(t,e,n){var o;et(t,n["show".concat((o=e).charAt(0).toUpperCase()+o.slice(1),"Button")],"inline-block"),M(t,n["".concat(e,"ButtonText")]),t.setAttribute("aria-label",n["".concat(e,"ButtonAriaLabel")]),t.className=F[e],R(t,n,"".concat(e,"Button")),ut(t,n["".concat(e,"ButtonClass")])}function yt(t,e){var n=W();if(n){var o,i,r,a;o=n,"string"==typeof(i=e.backdrop)?o.style.background=i:i||ut([document.documentElement,document.body],F["no-backdrop"]),!e.backdrop&&e.allowOutsideClick&&D('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),r=n,(a=e.position)in F?ut(r,F[a]):(D('The "position" parameter is not valid, defaulting to "center"'),ut(r,F.center)),function(t,e){if(e&&"string"==typeof e){var n="grow-".concat(e);n in F&&ut(t,F[n])}}(n,e.grow),R(n,e,"container");var c=document.body.getAttribute("data-swal2-queue-step");c&&(n.setAttribute("data-queue-step",c),document.body.removeAttribute("data-swal2-queue-step"))}}function wt(t,e){t.placeholder&&!e.inputPlaceholder||(t.placeholder=e.inputPlaceholder)}var Ct={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},kt=["input","file","range","select","radio","checkbox","textarea"],xt=function(t){if(!St[t.input])return v('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input,'"'));var e=Bt(t.input),n=St[t.input](e,t);G(n),setTimeout(function(){$(n)})},Pt=function(t,e){var n=Q(k(),t);if(n)for(var o in!function(t){for(var e=0;e=s.progressSteps.length&&D("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),s.progressSteps.forEach(function(t,e){var n,o,i,r,a=(n=t,o=document.createElement("li"),ut(o,F["progress-step"]),M(o,n),o);if(u.appendChild(a),e===l&&ut(a,F["active-progress-step"]),e!==s.progressSteps.length-1){var c=(i=t,r=document.createElement("li"),ut(r,F["progress-step-line"]),i.progressStepsDistance&&(r.style.width=i.progressStepsDistance),r);u.appendChild(c)}})}function Lt(t,e){var n,o,i,r,a=O();R(a,e,"header"),Tt(0,e),function(t,e){var n=Ct.innerParams.get(t);if(n&&e.icon===n.icon&&w())R(w(),e,"icon");else if(jt(),e.icon)if(-1!==Object.keys(z).indexOf(e.icon)){var o=y(".".concat(F.icon,".").concat(z[e.icon]));G(o),Vt(o,e),Mt(),R(o,e,"icon"),ut(o,e.showClass.icon)}else v('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.icon,'"'))}(t,e),function(t){var e=x();if(!t.imageUrl)return tt(e);G(e),e.setAttribute("src",t.imageUrl),e.setAttribute("alt",t.imageAlt),X(e,"width",t.imageWidth),X(e,"height",t.imageHeight),e.className=F.image,R(e,t,"image")}(e),n=e,o=C(),et(o,n.title||n.titleText),n.title&&at(n.title,o),n.titleText&&(o.innerText=n.titleText),R(o,n,"title"),i=e,r=q(),M(r,i.closeButtonHtml),R(r,i,"closeButton"),et(r,i.showCloseButton),r.setAttribute("aria-label",i.closeButtonAriaLabel)}function qt(t,e){var n,o,i,r;n=e,o=K(),X(o,"width",n.width),X(o,"padding",n.padding),n.background&&(o.style.background=n.background),Dt(o,n),yt(0,e),Lt(t,e),Et(t,e),ct(0,e),i=e,r=T(),et(r,i.footer),i.footer&&at(i.footer,r),R(r,i,"footer"),"function"==typeof e.onRender&&e.onRender(K())}function It(){return B()&&B().click()}var jt=function(){for(var t=n(),e=0;e\n \n
\n
\n ');else if("error"===e.icon)M(t,'\n \n \n \n \n ');else{M(t,Rt({question:"?",warning:"!",info:"i"}[e.icon]))}},Rt=function(t){return'
').concat(t,"
")},Ht=[],Dt=function(t,e){t.className="".concat(F.popup," ").concat(pt(t)?e.showClass.popup:""),e.toast?(ut([document.documentElement,document.body],F["toast-shown"]),ut(t,F.toast)):ut(t,F.modal),R(t,e,"popup"),"string"==typeof e.customClass&&ut(t,e.customClass),e.icon&&ut(t,F["icon-".concat(e.icon)])};function Nt(){var t=K();t||Ge.fire(),t=K();var e=E(),n=B();G(e),G(n,"inline-block"),ut([t,e],F.loading),n.disabled=!0,t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()}function Ut(){return new Promise(function(t){var e=window.scrollX,n=window.scrollY;Kt.restoreFocusTimeout=setTimeout(function(){Kt.previousActiveElement&&Kt.previousActiveElement.focus?(Kt.previousActiveElement.focus(),Kt.previousActiveElement=null):document.body&&document.body.focus(),t()},100),void 0!==e&&void 0!==n&&window.scrollTo(e,n)})}function _t(){if(Kt.timeout)return function(){var t=L(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";var n=parseInt(window.getComputedStyle(t).width),o=parseInt(e/n*100);t.style.removeProperty("transition"),t.style.width="".concat(o,"%")}(),Kt.timeout.stop()}function Ft(){if(Kt.timeout){var t=Kt.timeout.start();return ot(t),t}}function zt(t){return Object.prototype.hasOwnProperty.call(Yt,t)}function Wt(t){return Qt[t]}var Kt={},Yt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconHtml:void 0,toast:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:void 0,target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showCancelButton:!1,preConfirm:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusCancel:!1,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",showLoaderOnConfirm:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,onBeforeOpen:void 0,onOpen:void 0,onRender:void 0,onClose:void 0,onAfterClose:void 0,onDestroy:void 0,scrollbarPadding:!0},Zt=["title","titleText","text","html","icon","hideClass","customClass","allowOutsideClick","allowEscapeKey","showConfirmButton","showCancelButton","confirmButtonText","confirmButtonAriaLabel","confirmButtonColor","cancelButtonText","cancelButtonAriaLabel","cancelButtonColor","buttonsStyling","reverseButtons","imageUrl","imageWidth","imageHeight","imageAlt","progressSteps","currentProgressStep"],Qt={animation:'showClass" and "hideClass'},$t=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusCancel","heightAuto","keydownListenerCapture"],Jt=Object.freeze({isValidParameter:zt,isUpdatableParameter:function(t){return-1!==Zt.indexOf(t)},isDeprecatedParameter:Wt,argsToParams:function(o){var i={};return"object"!==r(o[0])||b(o[0])?["title","html","icon"].forEach(function(t,e){var n=o[e];"string"==typeof n||b(n)?i[t]=n:void 0!==n&&v("Unexpected type of ".concat(t,'! Expected "string" or "Element", got ').concat(r(n)))}):c(i,o[0]),i},isVisible:function(){return pt(K())},clickConfirm:It,clickCancel:function(){return S()&&S().click()},getContainer:W,getPopup:K,getTitle:C,getContent:k,getHtmlContainer:function(){return e(F["html-container"])},getImage:x,getIcon:w,getIcons:n,getCloseButton:q,getActions:E,getConfirmButton:B,getCancelButton:S,getHeader:O,getFooter:T,getTimerProgressBar:L,getFocusableElements:I,getValidationMessage:A,isLoading:function(){return K().hasAttribute("data-loading")},fire:function(){for(var t=arguments.length,e=new Array(t),n=0;nwindow.innerHeight&&(Z.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(Z.previousBodyPadding+function(){var t=document.createElement("div");t.className=F["scrollbar-measure"],document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e}(),"px"))}function te(){return!!window.MSInputMethodContext&&!!document.documentMode}function ee(){var t=W(),e=K();t.style.removeProperty("align-items"),e.offsetTop<0&&(t.style.alignItems="flex-start")}var ne=function(){var n,o=W();o.ontouchstart=function(t){var e;n=t.target===o||!((e=o).scrollHeight>e.clientHeight)&&"INPUT"!==t.target.tagName},o.ontouchmove=function(t){n&&(t.preventDefault(),t.stopPropagation())}},oe={swalPromiseResolve:new WeakMap};function ie(t,e,n,o){n?ce(t,o):(Ut().then(function(){return ce(t,o)}),Kt.keydownTarget.removeEventListener("keydown",Kt.keydownHandler,{capture:Kt.keydownListenerCapture}),Kt.keydownHandlerAdded=!1),e.parentNode&&!document.body.getAttribute("data-swal2-queue-step")&&e.parentNode.removeChild(e),j()&&(null!==Z.previousBodyPadding&&(document.body.style.paddingRight="".concat(Z.previousBodyPadding,"px"),Z.previousBodyPadding=null),function(){if(V(document.body,F.iosfix)){var t=parseInt(document.body.style.top,10);lt(document.body,F.iosfix),document.body.style.top="",document.body.scrollTop=-1*t}}(),"undefined"!=typeof window&&te()&&window.removeEventListener("resize",ee),m(document.body.children).forEach(function(t){t.hasAttribute("data-previous-aria-hidden")?(t.setAttribute("aria-hidden",t.getAttribute("data-previous-aria-hidden")),t.removeAttribute("data-previous-aria-hidden")):t.removeAttribute("aria-hidden")})),lt([document.documentElement,document.body],[F.shown,F["height-auto"],F["no-backdrop"],F["toast-shown"],F["toast-column"]])}function re(t){var e=K();if(e){var n=Ct.innerParams.get(this);if(n&&!V(e,n.hideClass.popup)){var o=oe.swalPromiseResolve.get(this);lt(e,n.showClass.popup),ut(e,n.hideClass.popup);var i=W();lt(i,n.showClass.backdrop),ut(i,n.hideClass.backdrop),function(t,e,n){var o=W(),i=vt&&nt(e),r=n.onClose,a=n.onAfterClose;if(r!==null&&typeof r==="function"){r(e)}if(i){ae(t,e,o,a)}else{ie(t,o,Y(),a)}}(this,e,n),o(t||{})}}}var ae=function(t,e,n,o){Kt.swalCloseEventFinishedCallback=ie.bind(null,t,n,Y(),o),e.addEventListener(vt,function(t){t.target===e&&(Kt.swalCloseEventFinishedCallback(),delete Kt.swalCloseEventFinishedCallback)})},ce=function(t,e){setTimeout(function(){"function"==typeof e&&e(),t._destroy()})};function se(t,e,n){var o=Ct.domCache.get(t);e.forEach(function(t){o[t].disabled=n})}function ue(t,e){if(!t)return!1;if("radio"===t.type)for(var n=t.parentNode.parentNode.querySelectorAll("input"),o=0;o")),mt(t)}function fe(t){var e=W(),n=K();"function"==typeof t.onBeforeOpen&&t.onBeforeOpen(n),Pe(e,n,t),ke(e,n),j()&&xe(e,t.scrollbarPadding),Y()||Kt.previousActiveElement||(Kt.previousActiveElement=document.activeElement),"function"==typeof t.onOpen&&setTimeout(function(){return t.onOpen(n)}),lt(e,F["no-transition"])}function me(t){var e=K();if(t.target===e){var n=W();e.removeEventListener(vt,me),n.style.overflowY="auto"}}function he(t,e){"select"===e.input||"radio"===e.input?Ee(t,e):-1!==["text","email","number","tel","textarea"].indexOf(e.input)&&g(e.inputValue)&&Oe(t,e)}function ge(t,e){t.disableButtons(),e.input?qe(t,e):Ie(t,e,!0)}function ve(t,e){t.disableButtons(),e(_.cancel)}function be(t,e){t.closePopup({value:e})}function ye(e,t,n,o){t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1),n.toast||(t.keydownHandler=function(t){return Ve(e,t,o)},t.keydownTarget=n.keydownListenerCapture?window:K(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)}function we(t,e,n){var o=I(),i=0;if(i