!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.Sweetalert2=t()}(this,function(){"use strict";var n={title:"",titleText:"",text:"",html:"",type:null,toast:!1,customClass:"",target:"body",backdrop:!0,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:"#aaa",cancelButtonClass:null,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusCancel:!1,showCloseButton:!1,closeButtonAriaLabel:"Close this dialog",showLoaderOnConfirm:!1,imageUrl:null,imageWidth:null,imageHeight:null,imageAlt:"",imageClass:null,timer:null,width:500,padding:20,background:"#fff",input:null,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputClass:null,inputAttributes:{},inputValidator:null,grow:!1,position:"center",progressSteps:[],currentProgressStep:null,progressStepsDistance:"40px",onBeforeOpen:null,onOpen:null,onClose:null,useRejections:!1,expectRejections:!1},t=["useRejections","expectRejections"],e=function(n){var t={};for(var e in n)t[n[e]]="swal2-"+n[e];return t},o=e(["container","shown","iosfix","popup","modal","no-backdrop","toast","toast-shown","overlay","fade","show","hide","noanimation","close","title","content","contentwrapper","buttonswrapper","confirm","cancel","icon","image","input","has-input","file","range","select","radio","checkbox","textarea","inputerror","validationerror","progresssteps","activeprogressstep","progresscircle","progressline","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen"]),a=e(["success","warning","info","question","error"]),s=function(n,t){(n=String(n).replace(/[^0-9a-f]/gi,"")).length<6&&(n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]),t=t||0;for(var e="#",o=0;o<3;o++){var a=parseInt(n.substr(2*o,2),16);e+=("00"+(a=Math.round(Math.min(Math.max(0,a+a*t),255)).toString(16))).substr(a.length)}return e},r=function(n){console.warn("SweetAlert2: "+n)},i=function(n){console.error("SweetAlert2: "+n)},l=[],c=function(n){-1===l.indexOf(n)&&(l.push(n),r(n))},p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},w=Object.assign||function(n){for(var t=1;t"),t.backdrop||D([document.documentElement,document.body],o["no-backdrop"]),t.text||t.html){if("object"===p(t.html))if(b.innerHTML="",0 in t.html)for(var v=0;v in t.html;v++)b.appendChild(t.html[v].cloneNode(!0));else b.appendChild(t.html.cloneNode(!0));else t.html?b.innerHTML=t.html:t.text&&(b.textContent=t.text);W(b)}else K(b);if(t.position in o&&D(f,o[t.position]),t.grow&&"string"==typeof t.grow){var S="grow-"+t.grow;S in o&&D(f,o[S])}t.showCloseButton?(y.setAttribute("aria-label",t.closeButtonAriaLabel),W(y)):K(y),e.className=o.popup,t.toast?(D([document.documentElement,document.body],o["toast-shown"]),D(e,o.toast)):D(e,o.modal),t.customClass&&D(e,t.customClass);var E=q(),j=parseInt(null===t.currentProgressStep?k.getQueueStep():t.currentProgressStep,10);t.progressSteps.length?(W(E),_(E),j>=t.progressSteps.length&&r("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach(function(n,e){var a=document.createElement("li");if(D(a,o.progresscircle),a.innerHTML=n,e===j&&D(a,o.activeprogressstep),E.appendChild(a),e!==t.progressSteps.length-1){var s=document.createElement("li");D(s,o.progressline),s.style.width=t.progressStepsDistance,E.appendChild(s)}})):K(E);for(var H=P(),Z=0;Zwindow.innerHeight&&(y.previousBodyPadding=document.body.style.paddingRight,document.body.style.paddingRight=nn()+"px")},h=function(){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&!R(document.body,o.iosfix)){var n=document.body.scrollTop;document.body.style.top=-1*n+"px",D(document.body,o.iosfix)}},k=function n(){for(var t=arguments.length,e=Array(t),a=0;a