(function(n,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t():typeof define=="function"&&define.amd?define(t):n.Sweetalert2=t()})(this,function(){"use strict";var tt={title:"",titleText:"",text:"",html:"",type:null,customClass:"",target:"body",animation:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,showConfirmButton:!0,showCancelButton:!1,preConfirm:null,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:"#3085d6",confirmButtonClass:null,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:"#f27474",cancelButtonClass:null,buttonsStyling:!0,reverseButtons:!1,focusCancel:!1,showCloseButton:!1,showLoaderOnConfirm:!1,imageUrl:null,imageWidth:null,imageHeight:null,imageClass:null,timer:null,width:500,padding:20,background:"#fff",input:null,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputClass:null,inputAttributes:{},inputValidator:null,progressSteps:[],currentProgressStep:null,progressStepsDistance:"40px",onOpen:null,onClose:null,useRejections:!0},wt="swal2-",ft=function(n){var i={},t;for(t in n)i[n[t]]=wt+n[t];return i},n=ft(["container","shown","iosfix","modal","overlay","fade","show","hide","noanimation","close","title","content","buttonswrapper","confirm","cancel","icon","image","input","file","range","select","radio","checkbox","textarea","inputerror","validationerror","progresssteps","activeprogressstep","progresscircle","progressline","loading","styled"]),a=ft(["success","warning","info","question","error"]),g=function(n,t){var u,r,i;for(n=String(n).replace(/[^0-9a-f]/gi,""),n.length<6&&(n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]),t=t||0,u="#",r=0;r<3;r++)i=parseInt(n.substr(r*2,2),16),i=Math.round(Math.min(Math.max(0,i+i*t),255)).toString(16),u+=("00"+i).substr(i.length);return u},bt=function(n){var t=[],i;for(i in n)t.indexOf(n[i])===-1&&t.push(n[i]);return t},o={previousWindowKeyDown:null,previousActiveElement:null,previousBodyPadding:null},et=function(i){var o=h(),e,c;if(o&&o.parentNode.removeChild(o),typeof document=="undefined"){console.error("SweetAlert2 requires document to initialize");return}e=document.createElement("div");e.className=n.container;e.innerHTML=kt;c=typeof i.target=="string"?document.querySelector(i.target):i.target;c.appendChild(e);var r=s(),l=u(r,n.input),a=u(r,n.file),f=r.querySelector("."+n.range+" input"),v=r.querySelector("."+n.range+" output"),y=u(r,n.select),p=r.querySelector("."+n.checkbox+" input"),w=u(r,n.textarea);return l.oninput=function(){t.resetValidationError()},l.onkeydown=function(n){setTimeout(function(){n.keyCode===13&&i.allowEnterKey&&(n.stopPropagation(),t.clickConfirm())},0)},a.onchange=function(){t.resetValidationError()},f.oninput=function(){t.resetValidationError();v.value=f.value},f.onchange=function(){t.resetValidationError();f.previousSibling.value=f.value},y.onchange=function(){t.resetValidationError()},p.onchange=function(){t.resetValidationError()},w.oninput=function(){t.resetValidationError()},r},kt=('\n <div role="dialog" aria-labelledby="'+n.title+'" aria-describedby="'+n.content+'" class="'+n.modal+'" tabindex="-1">\n   <ul class="'+n.progresssteps+'"><\/ul>\n   <div class="'+n.icon+" "+a.error+'">\n     <span class="swal2-x-mark"><span class="swal2-x-mark-line-left"><\/span><span class="swal2-x-mark-line-right"><\/span><\/span>\n   <\/div>\n   <div class="'+n.icon+" "+a.question+'">?<\/div>\n   <div class="'+n.icon+" "+a.warning+'">!<\/div>\n   <div class="'+n.icon+" "+a.info+'">i<\/div>\n   <div class="'+n.icon+" "+a.success+'">\n     <div class="swal2-success-circular-line-left"><\/div>\n     <span class="swal2-success-line-tip"><\/span> <span class="swal2-success-line-long"><\/span>\n     <div class="swal2-success-ring"><\/div> <div class="swal2-success-fix"><\/div>\n     <div class="swal2-success-circular-line-right"><\/div>\n   <\/div>\n   <img class="'+n.image+'" />\n   <h2 class="'+n.title+'" id="'+n.title+'"><\/h2>\n   <div id="'+n.content+'" class="'+n.content+'"><\/div>\n   <input class="'+n.input+'" />\n   <input type="file" class="'+n.file+'" />\n   <div class="'+n.range+'">\n     <output><\/output>\n     <input type="range" />\n   <\/div>\n   <select class="'+n.select+'"><\/select>\n   <div class="'+n.radio+'"><\/div>\n   <label for="'+n.checkbox+'" class="'+n.checkbox+'">\n     <input type="checkbox" />\n   <\/label>\n   <textarea class="'+n.textarea+'"><\/textarea>\n   <div class="'+n.validationerror+'"><\/div>\n   <div class="'+n.buttonswrapper+'">\n     <button type="button" class="'+n.confirm+'">OK<\/button>\n     <button type="button" class="'+n.cancel+'">Cancel<\/button>\n   <\/div>\n   <button type="button" class="'+n.close+'" aria-label="Close this dialog">×<\/button>\n <\/div>\n').replace(/(^|\n)\s*/g,""),h=function(){return document.body.querySelector("."+n.container)},s=function(){return h()?h().querySelector("."+n.modal):null},dt=function(){var t=s();return t.querySelectorAll("."+n.icon)},c=function(n){return h()?h().querySelector("."+n):null},ot=function(){return c(n.title)},st=function(){return c(n.content)},ht=function(){return c(n.image)},k=function(){return c(n.buttonswrapper)},it=function(){return c(n.progresssteps)},ct=function(){return c(n.validationerror)},v=function(){return c(n.confirm)},y=function(){return c(n.cancel)},lt=function(){return c(n.close)},at=function(n){var t=[v(),y()],i,r;return n&&t.reverse(),i=Array.from(s().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(function(n,t){return(n=parseInt(n.getAttribute("tabindex")),t=parseInt(t.getAttribute("tabindex")),n>t)?1:n<t?-1:0}),r=Array.prototype.slice.call(s().querySelectorAll('button, input:not([type=hidden]), textarea, select, a, [tabindex="0"]')),bt(t.concat(i,r))},p=function(n,t){return n.classList?n.classList.contains(t):!1},vt=function(n){if(n.focus(),n.type!=="file"){var t=n.value;n.value="";n.value=t}},i=function(n,t){if(n&&t){var i=t.split(/\s+/).filter(Boolean);i.forEach(function(t){n.classList.add(t)})}},e=function(n,t){if(n&&t){var i=t.split(/\s+/).filter(Boolean);i.forEach(function(t){n.classList.remove(t)})}},u=function(n,t){for(var i=0;i<n.childNodes.length;i++)if(p(n.childNodes[i],t))return n.childNodes[i]},r=function(n,t){t||(t="block");n.style.opacity="";n.style.display=t},f=function(n){n.style.opacity="";n.style.display="none"},gt=function(n){while(n.firstChild)n.removeChild(n.firstChild)},nt=function(n){return n.offsetWidth||n.offsetHeight||n.getClientRects().length},ni=function(n,t){n.style.removeProperty?n.style.removeProperty(t):n.style.removeAttribute(t)},yt=function(n){var i,t;if(!nt(n))return!1;typeof MouseEvent=="function"?(i=new MouseEvent("click",{view:window,bubbles:!1,cancelable:!0}),n.dispatchEvent(i)):document.createEvent?(t=document.createEvent("MouseEvents"),t.initEvent("click",!1,!1),n.dispatchEvent(t)):document.createEventObject?n.fireEvent("onclick"):typeof n.onclick=="function"&&n.onclick()},w=function(){var i=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",msAnimation:"MSAnimationEnd",animation:"animationend"},n;for(n in t)if(t.hasOwnProperty(n)&&i.style[n]!==undefined)return t[n];return!1}(),ti=function(){if(window.onkeydown=o.previousWindowKeyDown,o.previousActiveElement&&o.previousActiveElement.focus){var n=window.scrollX,t=window.scrollY;o.previousActiveElement.focus();n&&t&&window.scrollTo(n,t)}},ii=function(){var i="ontouchstart"in window||navigator.msMaxTouchPoints,n,t;return i?0:(n=document.createElement("div"),n.style.width="50px",n.style.height="50px",n.style.overflow="scroll",document.body.appendChild(n),t=n.offsetWidth-n.clientWidth,document.body.removeChild(n),t)},ri=function(n,t){var i=void 0;return function(){var r=function(){i=null;n()};clearTimeout(i);i=setTimeout(r,t)}},b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},hi=function(){function t(n){this.value=n}function n(n){function e(n,t){return new Promise(function(f,e){var o={key:n,arg:t,resolve:f,reject:e,next:null};r?r=r.next=o:(i=r=o,u(n,t))})}function u(i,r){try{var e=n[i](r),o=e.value;o instanceof t?Promise.resolve(o.value).then(function(n){u("next",n)},function(n){u("throw",n)}):f(e.done?"return":"normal",e.value)}catch(s){f("throw",s)}}function f(n,t){switch(n){case"return":i.resolve({value:t,done:!0});break;case"throw":i.reject(t);break;default:i.resolve({value:t,done:!1})}i=i.next;i?u(i.key,i.arg):r=null}var i,r;this._invoke=e;typeof n.return!="function"&&(this.return=undefined)}return typeof Symbol=="function"&&Symbol.asyncIterator&&(n.prototype[Symbol.asyncIterator]=function(){return this}),n.prototype.next=function(n){return this._invoke("next",n)},n.prototype.throw=function(n){return this._invoke("throw",n)},n.prototype.return=function(n){return this._invoke("return",n)},{wrap:function(t){return function(){return new n(t.apply(this,arguments))}},await:function(n){return new t(n)}}}(),d=Object.assign||function(n){for(var i,r,t=1;t<arguments.length;t++){i=arguments[t];for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},rt=d({},tt),l=[],ut=void 0,pt=function(u){var ut,ft,g,nt,d,ct,at,tt,vt,kt,w,l;(typeof u.target!="string"||document.querySelector(u.target))&&(typeof u.target=="string"||u.target.appendChild)||(console.warn('SweetAlert2: Target parameter is not valid, defaulting to "body"'),u.target="body");var c=void 0,rt=s(),yt=typeof u.target=="string"?document.querySelector(u.target):u.target;c=rt&&yt&&rt.parentNode!==yt.parentNode?et(u):rt||et(u);for(ut in u)t.isValidParameter(ut)||console.warn('SweetAlert2: Unknown parameter "'+ut+'"');for(c.style.width=typeof u.width=="number"?u.width+"px":u.width,c.style.padding=u.padding+"px",c.style.background=u.background,ft=c.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),g=0;g<ft.length;g++)ft[g].style.background=u.background;var pt=ot(),p=st(),wt=k(),o=v(),h=y(),bt=lt();if(u.titleText?pt.innerText=u.titleText:pt.innerHTML=u.title.split("\n").join("<br />"),u.text||u.html){if(b(u.html)==="object")if(p.innerHTML="",0 in u.html)for(nt=0;nt in u.html;nt++)p.appendChild(u.html[nt].cloneNode(!0));else p.appendChild(u.html.cloneNode(!0));else u.html?p.innerHTML=u.html:u.text&&(p.textContent=u.text);r(p)}else f(p);for(u.showCloseButton?r(bt):f(bt),c.className=n.modal,u.customClass&&i(c,u.customClass),d=it(),ct=parseInt(u.currentProgressStep===null?t.getQueueStep():u.currentProgressStep,10),u.progressSteps.length?(r(d),gt(d),ct>=u.progressSteps.length&&console.warn("SweetAlert2: Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),u.progressSteps.forEach(function(t,r){var f=document.createElement("li"),e;i(f,n.progresscircle);f.innerHTML=t;r===ct&&i(f,n.activeprogressstep);d.appendChild(f);r!==u.progressSteps.length-1&&(e=document.createElement("li"),i(e,n.progressline),e.style.width=u.progressStepsDistance,d.appendChild(e))})):f(d),at=dt(),tt=0;tt<at.length;tt++)f(at[tt]);if(u.type){vt=!1;for(kt in a)if(u.type===kt){vt=!0;break}if(!vt)return console.error("SweetAlert2: Unknown alert type: "+u.type),!1;if(w=c.querySelector("."+n.icon+"."+a[u.type]),r(w),u.animation)switch(u.type){case"success":i(w,"swal2-animate-success-icon");i(w.querySelector(".swal2-success-line-tip"),"swal2-animate-success-line-tip");i(w.querySelector(".swal2-success-line-long"),"swal2-animate-success-line-long");break;case"error":i(w,"swal2-animate-error-icon");i(w.querySelector(".swal2-x-mark"),"swal2-animate-x-mark")}}l=ht();u.imageUrl?(l.setAttribute("src",u.imageUrl),r(l),u.imageWidth?l.setAttribute("width",u.imageWidth):l.removeAttribute("width"),u.imageHeight?l.setAttribute("height",u.imageHeight):l.removeAttribute("height"),l.className=n.image,u.imageClass&&i(l,u.imageClass)):f(l);u.showCancelButton?h.style.display="inline-block":f(h);u.showConfirmButton?ni(o,"display"):f(o);u.showConfirmButton||u.showCancelButton?r(wt):f(wt);o.innerHTML=u.confirmButtonText;h.innerHTML=u.cancelButtonText;o.setAttribute("aria-label",u.confirmButtonAriaLabel);h.setAttribute("aria-label",u.cancelButtonAriaLabel);u.buttonsStyling&&(o.style.backgroundColor=u.confirmButtonColor,h.style.backgroundColor=u.cancelButtonColor);o.className=n.confirm;i(o,u.confirmButtonClass);h.className=n.cancel;i(h,u.cancelButtonClass);u.buttonsStyling?(i(o,n.styled),i(h,n.styled)):(e(o,n.styled),e(h,n.styled),o.style.backgroundColor=o.style.borderLeftColor=o.style.borderRightColor="",h.style.backgroundColor=h.style.borderLeftColor=h.style.borderRightColor="");u.animation===!0?e(c,n.noanimation):i(c,n.noanimation);u.showLoaderOnConfirm&&!u.preConfirm&&console.warn("SweetAlert2: showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://limonte.github.io/sweetalert2/#ajax-request")},ui=function(t,u){var c=h(),f=s();t?(i(f,n.show),i(c,n.fade),e(f,n.hide)):e(f,n.fade);r(f);c.style.overflowY="hidden";w&&!p(f,n.noanimation)?f.addEventListener(w,function l(){f.removeEventListener(w,l);c.style.overflowY="auto"}):c.style.overflowY="auto";i(document.documentElement,n.shown);i(document.body,n.shown);i(c,n.shown);fi();oi();o.previousActiveElement=document.activeElement;u!==null&&typeof u=="function"&&setTimeout(function(){u(f)})},fi=function(){o.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(o.previousBodyPadding=document.body.style.paddingRight,document.body.style.paddingRight=ii()+"px")},ei=function(){o.previousBodyPadding!==null&&(document.body.style.paddingRight=o.previousBodyPadding,o.previousBodyPadding=null)},oi=function(){var r=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,t;r&&!p(document.body,n.iosfix)&&(t=document.body.scrollTop,document.body.style.top=t*-1+"px",i(document.body,n.iosfix))},si=function(){if(p(document.body,n.iosfix)){var t=parseInt(document.body.style.top,10);e(document.body,n.iosfix);document.body.style.top="";document.body.scrollTop=t*-1}},t=function t(){for(var c,w,l,tt=arguments.length,a=Array(tt),p=0;p<tt;p++)a[p]=arguments[p];if(a[0]===undefined)return console.error("SweetAlert2 expects at least 1 attribute!"),!1;c=d({},rt);switch(b(a[0])){case"string":c.title=a[0];c.html=a[1];c.type=a[2];break;case"object":d(c,a[0]);c.extraParams=a[0].extraParams;c.input==="email"&&c.inputValidator===null&&(c.inputValidator=function(n){return new Promise(function(t,i){/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/.test(n)?t():i("Invalid email address")})});c.input==="url"&&c.inputValidator===null&&(c.inputValidator=function(n){return new Promise(function(t,i){/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)$/.test(n)?t():i("Invalid URL")})});break;default:return console.error('SweetAlert2: Unexpected type of argument! Expected "string" or "object", got '+b(a[0])),!1}return pt(c),w=h(),l=s(),new Promise(function(a,p){var rt,ki,et,oi,vi,si,d,gt,yi,hi,pi,ci,wi,ni,wt,bt,ti,ii,fi,kt,li;c.timer&&(l.timeout=setTimeout(function(){t.closeModal(c.onClose);c.useRejections?p("timer"):a({dismiss:"timer"})},c.timer));rt=function(t){if(t=t||c.input,!t)return null;switch(t){case"select":case"textarea":case"file":return u(l,n[t]);case"checkbox":return l.querySelector("."+n.checkbox+" input");case"radio":return l.querySelector("."+n.radio+" input:checked")||l.querySelector("."+n.radio+" input:first-child");case"range":return l.querySelector("."+n.range+" input");default:return u(l,n.input)}};ki=function(){var n=rt();if(!n)return null;switch(c.input){case"checkbox":return n.checked?1:0;case"radio":return n.checked?n.value:null;case"file":return n.files.length?n.files[0]:null;default:return c.inputAutoTrim?n.value.trim():n.value}};c.input&&setTimeout(function(){var n=rt();n&&vt(n)},0);var ai=function(n){c.showLoaderOnConfirm&&t.showLoading();c.preConfirm?c.preConfirm(n,c.extraParams).then(function(i){t.closeModal(c.onClose);a(i||n)},function(n){t.hideLoading();n&&t.showValidationError(n)}):(t.closeModal(c.onClose),c.useRejections?a(n):a({value:n}))},ei=function(n){var s=n||window.event,u=s.target||s.srcElement,i=v(),r=y(),f=i&&(i===u||i.contains(u)),e=r&&(r===u||r.contains(u)),o;switch(s.type){case"mouseover":case"mouseup":c.buttonsStyling&&(f?i.style.backgroundColor=g(c.confirmButtonColor,-.1):e&&(r.style.backgroundColor=g(c.cancelButtonColor,-.1)));break;case"mouseout":c.buttonsStyling&&(f?i.style.backgroundColor=c.confirmButtonColor:e&&(r.style.backgroundColor=c.cancelButtonColor));break;case"mousedown":c.buttonsStyling&&(f?i.style.backgroundColor=g(c.confirmButtonColor,-.2):e&&(r.style.backgroundColor=g(c.cancelButtonColor,-.2)));break;case"click":f&&t.isVisible()?(t.disableButtons(),c.input?(o=ki(),c.inputValidator?(t.disableInput(),c.inputValidator(o,c.extraParams).then(function(){t.enableButtons();t.enableInput();ai(o)},function(n){t.enableButtons();t.enableInput();n&&t.showValidationError(n)})):ai(o)):ai(!0)):e&&t.isVisible()&&(t.disableButtons(),t.closeModal(c.onClose),c.useRejections?p("cancel"):a({dismiss:"cancel"}))}},dt=l.querySelectorAll("button");for(et=0;et<dt.length;et++)dt[et].onclick=ei,dt[et].onmouseover=ei,dt[et].onmouseout=ei,dt[et].onmousedown=ei;lt().onclick=function(){t.closeModal(c.onClose);c.useRejections?p("close"):a({dismiss:"close"})};w.onclick=function(n){n.target===w&&c.allowOutsideClick&&(t.closeModal(c.onClose),c.useRejections?p("overlay"):a({dismiss:"overlay"}))};var gi=k(),tt=v(),ft=y();for(c.reverseButtons?tt.parentNode.insertBefore(ft,tt):tt.parentNode.insertBefore(tt,ft),oi=function(n,t){for(var i=at(c.focusCancel),u,r=0;r<i.length;r++)if(n=n+t,n===i.length?n=0:n===-1&&(n=i.length-1),u=i[n],nt(u))return u.focus()},vi=function(n){var i=n||window.event,r=i.keyCode||i.which,u;if([9,13,32,27,37,38,39,40].indexOf(r)!==-1){var o=i.target||i.srcElement,e=at(c.focusCancel),f=-1;for(u=0;u<e.length;u++)if(o===e[u]){f=u;break}r===9?(i.shiftKey?oi(f,-1):oi(f,1),i.stopPropagation(),i.preventDefault()):r===37||r===38||r===39||r===40?document.activeElement===tt&&nt(ft)?ft.focus():document.activeElement===ft&&nt(tt)&&tt.focus():r===13||r===32?f===-1&&c.allowEnterKey&&(c.focusCancel?yt(ft,i):yt(tt,i),i.stopPropagation(),i.preventDefault()):r===27&&c.allowEscapeKey===!0&&(t.closeModal(c.onClose),c.useRejections?p("esc"):a({dismiss:"esc"}))}},window.onkeydown&&window.onkeydown.toString()===vi.toString()||(o.previousWindowKeyDown=window.onkeydown,window.onkeydown=vi),c.buttonsStyling&&(tt.style.borderLeftColor=c.confirmButtonColor,tt.style.borderRightColor=c.confirmButtonColor),t.hideLoading=t.disableLoading=function(){c.showConfirmButton||(f(tt),c.showCancelButton||f(k()));e(gi,n.loading);e(l,n.loading);tt.disabled=!1;ft.disabled=!1},t.getTitle=function(){return ot()},t.getContent=function(){return st()},t.getInput=function(){return rt()},t.getImage=function(){return ht()},t.getButtonsWrapper=function(){return k()},t.getConfirmButton=function(){return v()},t.getCancelButton=function(){return y()},t.enableButtons=function(){tt.disabled=!1;ft.disabled=!1},t.disableButtons=function(){tt.disabled=!0;ft.disabled=!0},t.enableConfirmButton=function(){tt.disabled=!1},t.disableConfirmButton=function(){tt.disabled=!0},t.enableInput=function(){var n=rt(),r,i,t;if(!n)return!1;if(n.type==="radio")for(r=n.parentNode.parentNode,i=r.querySelectorAll("input"),t=0;t<i.length;t++)i[t].disabled=!1;else n.disabled=!1},t.disableInput=function(){var n=rt(),r,i,t;if(!n)return!1;if(n&&n.type==="radio")for(r=n.parentNode.parentNode,i=r.querySelectorAll("input"),t=0;t<i.length;t++)i[t].disabled=!0;else n.disabled=!0},t.recalculateHeight=ri(function(){var n=s(),t;n&&(t=n.style.display,n.style.minHeight="",r(n),n.style.minHeight=n.scrollHeight+1+"px",n.style.display=t)},50),t.showValidationError=function(t){var f=ct(),u;f.innerHTML=t;r(f);u=rt();u&&(vt(u),i(u,n.inputerror))},t.resetValidationError=function(){var r=ct(),i;f(r);t.recalculateHeight();i=rt();i&&e(i,n.inputerror)},t.getProgressSteps=function(){return c.progressSteps},t.setProgressSteps=function(n){c.progressSteps=n;pt(c)},t.showProgressSteps=function(){r(it())},t.hideProgressSteps=function(){f(it())},t.enableButtons(),t.hideLoading(),t.resetValidationError(),si=["input","file","range","select","radio","checkbox","textarea"],d=void 0,gt=0;gt<si.length;gt++){if(yi=n[si[gt]],hi=u(l,yi),d=rt(si[gt]),d){for(pi in d.attributes)d.attributes.hasOwnProperty(pi)&&(ci=d.attributes[pi].name,ci!=="type"&&ci!=="value"&&d.removeAttribute(ci));for(wi in c.inputAttributes)d.setAttribute(wi,c.inputAttributes[wi])}hi.className=yi;c.inputClass&&i(hi,c.inputClass);f(hi)}ni=void 0;switch(c.input){case"text":case"email":case"password":case"number":case"tel":case"url":d=u(l,n.input);d.value=c.inputValue;d.placeholder=c.inputPlaceholder;d.type=c.input;r(d);break;case"file":d=u(l,n.file);d.placeholder=c.inputPlaceholder;d.type=c.input;r(d);break;case"range":var bi=u(l,n.range),di=bi.querySelector("input"),nr=bi.querySelector("output");di.value=c.inputValue;di.type=c.input;nr.value=c.inputValue;r(bi);break;case"select":wt=u(l,n.select);wt.innerHTML="";c.inputPlaceholder&&(bt=document.createElement("option"),bt.innerHTML=c.inputPlaceholder,bt.value="",bt.disabled=!0,bt.selected=!0,wt.appendChild(bt));ni=function(n){var i,t;for(i in n)t=document.createElement("option"),t.value=i,t.innerHTML=n[i],c.inputValue===i&&(t.selected=!0),wt.appendChild(t);r(wt);wt.focus()};break;case"radio":ti=u(l,n.radio);ti.innerHTML="";ni=function(t){var u,e;for(u in t){var i=document.createElement("input"),f=document.createElement("label"),o=document.createElement("span");i.type="radio";i.name=n.radio;i.value=u;c.inputValue===u&&(i.checked=!0);o.innerHTML=t[u];f.appendChild(i);f.appendChild(o);f.for=i.id;ti.appendChild(f)}r(ti);e=ti.querySelectorAll("input");e.length&&e[0].focus()};break;case"checkbox":ii=u(l,n.checkbox);fi=rt("checkbox");fi.type="checkbox";fi.value=1;fi.id=n.checkbox;fi.checked=Boolean(c.inputValue);kt=ii.getElementsByTagName("span");kt.length&&ii.removeChild(kt[0]);kt=document.createElement("span");kt.innerHTML=c.inputPlaceholder;ii.appendChild(kt);r(ii);break;case"textarea":li=u(l,n.textarea);li.value=c.inputValue;li.placeholder=c.inputPlaceholder;r(li);break;case null:break;default:console.error('SweetAlert2: Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'+c.input+'"')}(c.input==="select"||c.input==="radio")&&(c.inputOptions instanceof Promise?(t.showLoading(),c.inputOptions.then(function(n){t.hideLoading();ni(n)})):b(c.inputOptions)==="object"?ni(c.inputOptions):console.error("SweetAlert2: Unexpected type of inputOptions! Expected object or Promise, got "+b(c.inputOptions)));ui(c.animation,c.onOpen);c.allowEnterKey?oi(-1,1):document.activeElement&&document.activeElement.blur();h().scrollTop=0;typeof MutationObserver=="undefined"||ut||(ut=new MutationObserver(t.recalculateHeight),ut.observe(l,{childList:!0,characterData:!0,subtree:!0}))})};return t.isVisible=function(){return!!s()},t.queue=function(n){l=n;var i=function(){l=[];document.body.removeAttribute("data-swal2-queue-step")},r=[];return new Promise(function(n,u){(function f(e,o){e<l.length?(document.body.setAttribute("data-swal2-queue-step",e),t(l[e]).then(function(n){r.push(n);f(e+1,o)},function(n){i();u(n)})):(i(),n(r))})(0)})},t.getQueueStep=function(){return document.body.getAttribute("data-swal2-queue-step")},t.insertQueueStep=function(n,t){return t&&t<l.length?l.splice(t,0,n):l.push(n)},t.deleteQueueStep=function(n){typeof l[n]!="undefined"&&l.splice(n,1)},t.close=t.closeModal=function(t){var u=h(),r=s(),f;r&&(e(r,n.show),i(r,n.hide),clearTimeout(r.timeout),ti(),f=function(){u.parentNode&&u.parentNode.removeChild(u);e(document.documentElement,n.shown);e(document.body,n.shown);ei();si()},w&&!p(r,n.noanimation)?r.addEventListener(w,function o(){r.removeEventListener(w,o);p(r,n.hide)&&f()}):f(),t!==null&&typeof t=="function"&&setTimeout(function(){t(r)}))},t.clickConfirm=function(){return v().click()},t.clickCancel=function(){return y().click()},t.showLoading=t.enableLoading=function(){var u=s();u||t("");var f=k(),e=v(),o=y();r(f);r(e,"inline-block");i(f,n.loading);i(u,n.loading);e.disabled=!0;o.disabled=!0},t.isValidParameter=function(n){return tt.hasOwnProperty(n)||n==="extraParams"},t.setDefaults=function(n){if(!n||(typeof n=="undefined"?"undefined":b(n))!=="object")return console.error("SweetAlert2: the argument for setDefaults() is required and has to be a object");for(var i in n)t.isValidParameter(i)||(console.warn('SweetAlert2: Unknown parameter "'+i+'"'),delete n[i]);d(rt,n)},t.resetDefaults=function(){rt=d({},tt)},t.noop=function(){},t.version="6.7.0",t.default=t,t});window.Sweetalert2&&(window.sweetAlert=window.swal=window.Sweetalert2)