UNPKG

@obatfr/sweetalert2

Version:

A beautiful, responsive, customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes, supported fork of sweetalert

1 lines 41.6 kB
!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 a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function c(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,o=arguments[e];for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t}).apply(this,arguments)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function i(t,e,n){return(i=d()?Reflect.construct:function(t,e,n){var o=[null];o.push.apply(o,e);o=new(Function.bind.apply(t,o));return n&&l(o,n.prototype),o}).apply(null,arguments)}function p(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t,e,n){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){t=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=u(t)););return t}(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(n):e.value}})(t,e,n||t)}function m(e){return Object.keys(e).map(function(t){return e[t]})}function e(t,e){e='"'.concat(t,'" is deprecated and will be removed in the next major release. Please use "').concat(e,'" instead.'),-1===S.indexOf(e)&&(S.push(e),B(e))}function h(t){return t instanceof Element||q(t)}function t(t){return H(".".concat(t))}function g(){var t=N().filter(function(t){return yt(t)});return t.length?t[0]:null}function v(){return t(V.title)}function y(){return t(V.image)}function b(){return t(V.header)}function w(){return t(V.footer)}function C(){var t=P(D().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(function(t,e){return t=parseInt(t.getAttribute("tabindex")),(e=parseInt(e.getAttribute("tabindex")))<t?1:t<e?-1:0}),e=P(D().querySelectorAll('\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n')).filter(function(t){return"-1"!==t.getAttribute("tabindex")});return function(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(t.concat(e)).filter(function(t){return yt(t)})}function k(){return!Q()&&!document.body.classList.contains(V["no-backdrop"])}function x(){return D().hasAttribute("data-loading")}var n="SweetAlert2:",P=function(t){return Array.prototype.slice.call(t)},B=function(t){console.warn("".concat(n," ").concat(t))},A=function(t){console.error("".concat(n," ").concat(t))},S=[],E=function(t){return"function"==typeof t?t():t},O=function(t){return t&&"function"==typeof t.toPromise},T=function(t){return O(t)?t.toPromise():Promise.resolve(t)},L=function(t){return t&&Promise.resolve(t)===t},j=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),q=function(t){return"object"===r(t)&&t.jquery},I=function(t){var e,n={};for(e in t)n[t[e]]="swal2-"+t[e];return n},V=I(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","toast-column","show","hide","close","title","header","content","html-container","actions","confirm","cancel","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","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","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),M=I(["success","warning","info","question","error"]),R=function(){return document.body.querySelector(".".concat(V.container))},H=function(t){var e=R();return e?e.querySelector(t):null},D=function(){return t(V.popup)},N=function(){var t=D();return P(t.querySelectorAll(".".concat(V.icon)))},U=function(){return t(V.content)},_=function(){return t(V["progress-steps"])},F=function(){return t(V["validation-message"])},z=function(){return H(".".concat(V.actions," .").concat(V.confirm))},W=function(){return H(".".concat(V.actions," .").concat(V.cancel))},K=function(){return t(V.actions)},Y=function(){return t(V["timer-progress-bar"])},Z=function(){return t(V.close)},Q=function(){return document.body.classList.contains(V["toast-shown"])},$={previousBodyPadding:null},J=function(e,t){e.textContent="",t&&(t=(new DOMParser).parseFromString(t,"text/html"),P(t.querySelector("head").childNodes).forEach(function(t){e.appendChild(t)}),P(t.querySelector("body").childNodes).forEach(function(t){e.appendChild(t)}))},X=function(t,e){if(!e)return!1;for(var n=e.split(/\s+/),o=0;o<n.length;o++)if(!t.classList.contains(n[o]))return!1;return!0},G=function(e,n){P(e.classList).forEach(function(t){-1===m(V).indexOf(t)&&-1===m(M).indexOf(t)&&-1===m(n.showClass).indexOf(t)&&e.classList.remove(t)})},tt=function(t,e,n){if(G(t,e),e.customClass&&e.customClass[n]){if("string"!=typeof e.customClass[n]&&!e.customClass[n].forEach)return B("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(r(e.customClass[n]),'"'));mt(t,e.customClass[n])}};function et(t,e){if(!e)return null;switch(e){case"select":case"textarea":case"file":return nt(t,V[e]);case"checkbox":return t.querySelector(".".concat(V.checkbox," input"));case"radio":return t.querySelector(".".concat(V.radio," input:checked"))||t.querySelector(".".concat(V.radio," input:first-child"));case"range":return t.querySelector(".".concat(V.range," input"));default:return nt(t,V.input)}}function nt(t,e){for(var n=0;n<t.childNodes.length;n++)if(X(t.childNodes[n],e))return t.childNodes[n]}function ot(t,e,n){n||0===parseInt(n)?t.style[e]="number"==typeof n?"".concat(n,"px"):n:t.style.removeProperty(e)}function it(t,e,n){e?gt(t,n):vt(t)}function rt(t){return!!(t.scrollHeight>t.clientHeight)}function at(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=Y();yt(n)&&(e&&(n.style.transition="none",n.style.width="100%"),setTimeout(function(){n.style.transition="width ".concat(t/1e3,"s linear"),n.style.width="0%"},10))}function ct(){return"undefined"==typeof window||"undefined"==typeof document}function st(t){Sn.isVisible()&&dt!==t.target.value&&Sn.resetValidationMessage(),dt=t.target.value}function ut(t,e){t instanceof HTMLElement?e.appendChild(t):"object"===r(t)?lt(t,e):t&&J(e,t)}function lt(t,e){t.jquery?kt(e,t):J(e,t.toString())}var dt,pt=function(t){var e;t.focus(),"file"!==t.type&&(e=t.value,t.value="",t.value=e)},ft=function(t,e,n){t&&e&&(e="string"==typeof e?e.split(/\s+/).filter(Boolean):e).forEach(function(e){t.forEach?t.forEach(function(t){n?t.classList.add(e):t.classList.remove(e)}):n?t.classList.add(e):t.classList.remove(e)})},mt=function(t,e){ft(t,e,!0)},ht=function(t,e){ft(t,e,!1)},gt=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"flex";t.style.opacity="",t.style.display=e},vt=function(t){t.style.opacity="",t.style.display="none"},yt=function(t){return!(!t||!(t.offsetWidth||t.offsetHeight||t.getClientRects().length))},bt=function(t){var e=window.getComputedStyle(t),t=parseFloat(e.getPropertyValue("animation-duration")||"0"),e=parseFloat(e.getPropertyValue("transition-duration")||"0");return 0<t||0<e},wt='\n <div aria-labelledby="'.concat(V.title,'" aria-describedby="').concat(V.content,'" class="').concat(V.popup,'" tabindex="-1">\n <div class="').concat(V.header,'">\n <ul class="').concat(V["progress-steps"],'"></ul>\n <div class="').concat(V.icon," ").concat(M.error,'"></div>\n <div class="').concat(V.icon," ").concat(M.question,'"></div>\n <div class="').concat(V.icon," ").concat(M.warning,'"></div>\n <div class="').concat(V.icon," ").concat(M.info,'"></div>\n <div class="').concat(V.icon," ").concat(M.success,'"></div>\n <img class="').concat(V.image,'" />\n <h2 class="').concat(V.title,'" id="').concat(V.title,'"></h2>\n <button type="button" class="').concat(V.close,'"></button>\n </div>\n <div class="').concat(V.content,'">\n <div id="').concat(V.content,'" class="').concat(V["html-container"],'"></div>\n <input class="').concat(V.input,'" />\n <input type="file" class="').concat(V.file,'" />\n <div class="').concat(V.range,'">\n <input type="range" />\n <output></output>\n </div>\n <select class="').concat(V.select,'"></select>\n <div class="').concat(V.radio,'"></div>\n <label for="').concat(V.checkbox,'" class="').concat(V.checkbox,'">\n <input type="checkbox" />\n <span class="').concat(V.label,'"></span>\n </label>\n <textarea class="').concat(V.textarea,'"></textarea>\n <div class="').concat(V["validation-message"],'" id="').concat(V["validation-message"],'"></div>\n </div>\n <div class="').concat(V.actions,'">\n <button type="button" class="').concat(V.confirm,'">OK</button>\n <button type="button" class="').concat(V.cancel,'">Cancel</button>\n </div>\n <div class="').concat(V.footer,'"></div>\n <div class="').concat(V["timer-progress-bar-container"],'">\n <div class="').concat(V["timer-progress-bar"],'"></div>\n </div>\n </div>\n').replace(/(^|\n)\s*/g,""),Ct=function(t){var e,n,o,i,r,a=!!(r=R())&&(r.parentNode.removeChild(r),ht([document.documentElement,document.body],[V["no-backdrop"],V["toast-shown"],V["has-column"]]),!0);ct()?A("SweetAlert2 requires document to initialize"):((e=document.createElement("div")).className=V.container,a&&mt(e,V["no-transition"]),J(e,wt),(r="string"==typeof(i=t.target)?document.querySelector(i):i).appendChild(e),a=t,(i=D()).setAttribute("role",a.toast?"alert":"dialog"),i.setAttribute("aria-live",a.toast?"polite":"assertive"),a.toast||i.setAttribute("aria-modal","true"),"rtl"===window.getComputedStyle(r).direction&&mt(R(),V.rtl),e=U(),t=nt(e,V.input),a=nt(e,V.file),n=e.querySelector(".".concat(V.range," input")),o=e.querySelector(".".concat(V.range," output")),i=nt(e,V.select),r=e.querySelector(".".concat(V.checkbox," input")),e=nt(e,V.textarea),t.oninput=st,a.onchange=st,i.onchange=st,r.onchange=st,e.oninput=st,n.oninput=function(t){st(t),o.value=n.value},n.onchange=function(t){st(t),n.nextSibling.value=n.value})},kt=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))},xt=function(){if(ct())return!1;var t,e=document.createElement("div"),n={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&void 0!==e.style[t])return n[t];return!1}(),Pt=function(t,e){var n=K(),o=z(),i=W();e.showConfirmButton||e.showCancelButton||vt(n),tt(n,e,"actions"),Bt(o,"confirm",e),Bt(i,"cancel",e),e.buttonsStyling?function(t,e,n){mt([t,e],V.styled),n.confirmButtonColor&&(t.style.backgroundColor=n.confirmButtonColor);n.cancelButtonColor&&(e.style.backgroundColor=n.cancelButtonColor);x()||(n=window.getComputedStyle(t).getPropertyValue("background-color"),t.style.borderLeftColor=n,t.style.borderRightColor=n)}(o,i,e):(ht([o,i],V.styled),o.style.backgroundColor=o.style.borderLeftColor=o.style.borderRightColor="",i.style.backgroundColor=i.style.borderLeftColor=i.style.borderRightColor=""),e.reverseButtons&&o.parentNode.insertBefore(i,o)};function Bt(t,e,n){var o;it(t,n["show".concat((o=e).charAt(0).toUpperCase()+o.slice(1),"Button")],"inline-block"),J(t,n["".concat(e,"ButtonText")]),t.setAttribute("aria-label",n["".concat(e,"ButtonAriaLabel")]),t.className=V[e],tt(t,n,"".concat(e,"Button")),mt(t,n["".concat(e,"ButtonClass")])}function At(t){if(!Vt[t.input])return A('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input,'"'));var e=It(t.input),n=Vt[t.input](e,t);gt(n),setTimeout(function(){pt(n)})}function St(t,e){var n=et(U(),t);if(n)for(var o in qt(n),e)"range"===t&&"placeholder"===o||n.setAttribute(o,e[o])}function Et(t){var e=It(t.input);t.customClass&&mt(e,t.customClass.input)}function Ot(t,e){t.placeholder&&!e.inputPlaceholder||(t.placeholder=e.inputPlaceholder)}var Tt=function(t,e){var n,o,i=R();i&&(o=i,"string"==typeof(n=e.backdrop)?o.style.background=n:n||mt([document.documentElement,document.body],V["no-backdrop"]),!e.backdrop&&e.allowOutsideClick&&B('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),o=i,(n=e.position)in V?mt(o,V[n]):(B('The "position" parameter is not valid, defaulting to "center"'),mt(o,V.center)),n=i,!(o=e.grow)||"string"!=typeof o||(o="grow-".concat(o))in V&&mt(n,V[o]),tt(i,e,"container"),(e=document.body.getAttribute("data-swal2-queue-step"))&&(i.setAttribute("data-queue-step",e),document.body.removeAttribute("data-swal2-queue-step")))},Lt={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},jt=["input","file","range","select","radio","checkbox","textarea"],qt=function(t){for(var e=0;e<t.attributes.length;e++){var n=t.attributes[e].name;-1===["type","value","style"].indexOf(n)&&t.removeAttribute(n)}},It=function(t){t=V[t]||V.input;return nt(U(),t)},Vt={};Vt.text=Vt.email=Vt.password=Vt.number=Vt.tel=Vt.url=function(t,e){return"string"==typeof e.inputValue||"number"==typeof e.inputValue?t.value=e.inputValue:L(e.inputValue)||B('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(r(e.inputValue),'"')),Ot(t,e),t.type=e.input,t},Vt.file=function(t,e){return Ot(t,e),t},Vt.range=function(t,e){var n=t.querySelector("input"),o=t.querySelector("output");return n.value=e.inputValue,n.type=e.input,o.value=e.inputValue,t},Vt.select=function(t,e){var n;return t.textContent="",e.inputPlaceholder&&(n=document.createElement("option"),J(n,e.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)),t},Vt.radio=function(t){return t.textContent="",t},Vt.checkbox=function(t,e){var n=et(U(),"checkbox");n.value=1,n.id=V.checkbox,n.checked=Boolean(e.inputValue);n=t.querySelector("span");return J(n,e.inputPlaceholder),t},Vt.textarea=function(e,t){var n,o;return e.value=t.inputValue,Ot(e,t),"MutationObserver"in window&&(n=parseInt(window.getComputedStyle(D()).width),o=parseInt(window.getComputedStyle(D()).paddingLeft)+parseInt(window.getComputedStyle(D()).paddingRight),new MutationObserver(function(){var t=e.offsetWidth+o;D().style.width=n<t?"".concat(t,"px"):null}).observe(e,{attributes:!0,attributeFilter:["style"]})),e};function Mt(){for(var t=N(),e=0;e<t.length;e++)vt(t[e])}function Rt(){for(var t=D(),e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),o=0;o<n.length;o++)n[o].style.backgroundColor=e}function Ht(t,e){t.textContent="",e.iconHtml?J(t,Kt(e.iconHtml)):"success"===e.icon?J(t,'\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 '):"error"===e.icon?J(t,'\n <span class="swal2-x-mark">\n <span class="swal2-x-mark-line-left"></span>\n <span class="swal2-x-mark-line-right"></span>\n </span>\n '):J(t,Kt({question:"?",warning:"!",info:"i"}[e.icon]))}function Dt(){return R()&&R().getAttribute("data-queue-step")}function Nt(t,o){var i=_();if(!o.progressSteps||0===o.progressSteps.length)return vt(i);gt(i),i.textContent="";var r=parseInt(void 0===o.currentProgressStep?Dt():o.currentProgressStep);r>=o.progressSteps.length&&B("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.progressSteps.forEach(function(t,e){var n,t=(n=t,t=document.createElement("li"),mt(t,V["progress-step"]),J(t,n),t);i.appendChild(t),e===r&&mt(t,V["active-progress-step"]),e!==o.progressSteps.length-1&&(t=o,e=document.createElement("li"),mt(e,V["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),i.appendChild(e))})}function Ut(t,e){t.className="".concat(V.popup," ").concat(yt(t)?e.showClass.popup:""),e.toast?(mt([document.documentElement,document.body],V["toast-shown"]),mt(t,V.toast)):mt(t,V.modal),tt(t,e,"popup"),"string"==typeof e.customClass&&mt(t,e.customClass),e.icon&&mt(t,V["icon-".concat(e.icon)])}function _t(t,e){Qt(t,e),Tt(t,e),Zt(t,e),zt(t,e),Pt(t,e),Wt(t,e),"function"==typeof e.onRender&&e.onRender(D())}function Ft(){return z()&&z().click()}var zt=function(t,e){var o,i,r,n=U().querySelector("#".concat(V.content));e.html?(ut(e.html,n),gt(n,"block")):e.text?(n.textContent=e.text,gt(n,"block")):vt(n),t=t,o=e,i=U(),t=Lt.innerParams.get(t),r=!t||o.input!==t.input,jt.forEach(function(t){var e=V[t],n=nt(i,e);St(t,o.inputAttributes),n.className=e,r&&vt(n)}),o.input&&(r&&At(o),Et(o)),tt(U(),e,"content")},Wt=function(t,e){var n=w();it(n,e.footer),e.footer&&ut(e.footer,n),tt(n,e,"footer")},Kt=function(t){return'<div class="'.concat(V["icon-content"],'">').concat(t,"</div>")},Yt=[],Zt=function(t,e){var n=b();tt(n,e,"header"),Nt(0,e),function(t,e){t=Lt.innerParams.get(t);t&&e.icon===t.icon&&g()?tt(g(),e,"icon"):(Mt(),e.icon&&(-1!==Object.keys(M).indexOf(e.icon)?(t=H(".".concat(V.icon,".").concat(M[e.icon])),gt(t),Ht(t,e),Rt(),tt(t,e,"icon"),mt(t,e.showClass.icon)):A('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.icon,'"'))))}(t,e),function(t){var e=y();if(!t.imageUrl)return vt(e);gt(e,""),e.setAttribute("src",t.imageUrl),e.setAttribute("alt",t.imageAlt),ot(e,"width",t.imageWidth),ot(e,"height",t.imageHeight),e.className=V.image,tt(e,t,"image")}(e),n=e,t=v(),it(t,n.title||n.titleText),n.title&&ut(n.title,t),n.titleText&&(t.innerText=n.titleText),tt(t,n,"title"),n=e,e=Z(),J(e,n.closeButtonHtml),tt(e,n,"closeButton"),it(e,n.showCloseButton),e.setAttribute("aria-label",n.closeButtonAriaLabel)},Qt=function(t,e){var n=D();ot(n,"width",e.width),ot(n,"padding",e.padding),e.background&&(n.style.background=e.background),Ut(n,e)};function $t(){return new Promise(function(t){var e=window.scrollX,n=window.scrollY;oe.restoreFocusTimeout=setTimeout(function(){ie(),t()},ne),void 0!==e&&void 0!==n&&window.scrollTo(e,n)})}function Jt(){if(oe.timeout)return function(){var t=Y(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";var n=parseInt(window.getComputedStyle(t).width),n=parseInt(e/n*100);t.style.removeProperty("transition"),t.style.width="".concat(n,"%")}(),oe.timeout.stop()}function Xt(){if(oe.timeout){var t=oe.timeout.start();return at(t),t}}function Gt(t){return Object.prototype.hasOwnProperty.call(re,t)}function te(t){return ce[t]}var ee=function(){(t=D())||Sn.fire();var t=D(),e=K(),n=z();gt(e),gt(n,"inline-block"),mt([t,e],V.loading),n.disabled=!0,t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},ne=100,oe={},ie=function(){oe.previousActiveElement&&oe.previousActiveElement.focus?(oe.previousActiveElement.focus(),oe.previousActiveElement=null):document.body&&document.body.focus()},re={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:"&times;",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},ae=["title","titleText","text","html","footer","icon","hideClass","customClass","allowOutsideClick","allowEscapeKey","showConfirmButton","showCancelButton","confirmButtonText","confirmButtonAriaLabel","confirmButtonColor","cancelButtonText","cancelButtonAriaLabel","cancelButtonColor","buttonsStyling","reverseButtons","imageUrl","imageWidth","imageHeight","imageAlt","progressSteps","currentProgressStep","onClose","onAfterClose","onDestroy"],ce={animation:'showClass" and "hideClass'},se=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusCancel","heightAuto","keydownListenerCapture"],ue=function(t){Gt(t)||B('Unknown parameter "'.concat(t,'"'))},le=function(t){-1!==se.indexOf(t)&&B('The parameter "'.concat(t,'" is incompatible with toasts'))},de=function(t){te(t)&&e(t,te(t))},pe=Object.freeze({isValidParameter:Gt,isUpdatableParameter:function(t){return-1!==ae.indexOf(t)},isDeprecatedParameter:te,argsToParams:function(n){var o={};return"object"!==r(n[0])||h(n[0])?["title","html","icon"].forEach(function(t,e){e=n[e];"string"==typeof e||h(e)?o[t]=e:void 0!==e&&A("Unexpected type of ".concat(t,'! Expected "string" or "Element", got ').concat(r(e)))}):s(o,n[0]),o},isVisible:function(){return yt(D())},clickConfirm:Ft,clickCancel:function(){return W()&&W().click()},getContainer:R,getPopup:D,getTitle:v,getContent:U,getHtmlContainer:function(){return t(V["html-container"])},getImage:y,getIcon:g,getIcons:N,getCloseButton:Z,getActions:K,getConfirmButton:z,getCancelButton:W,getHeader:b,getFooter:w,getTimerProgressBar:Y,getFocusableElements:C,getValidationMessage:F,isLoading:x,fire:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i(this,e)},mixin:function(r){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(i,t);var n,o,e=(n=i,o=d(),function(){var t,e=u(n);return p(this,o?(t=u(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))});function i(){return a(this,i),e.apply(this,arguments)}return c(i,[{key:"_main",value:function(t){return f(u(i.prototype),"_main",this).call(this,s({},r,t))}}]),i}(this)},queue:function(t){var r=this;Yt=t;function a(t,e){Yt=[],t(e)}var c=[];return new Promise(function(i){!function e(n,o){n<Yt.length?(document.body.setAttribute("data-swal2-queue-step",n),r.fire(Yt[n]).then(function(t){void 0!==t.value?(c.push(t.value),e(n+1,o)):a(i,{dismiss:t.dismiss})})):a(i,{value:c})}(0)})},getQueueStep:Dt,insertQueueStep:function(t,e){return e&&e<Yt.length?Yt.splice(e,0,t):Yt.push(t)},deleteQueueStep:function(t){void 0!==Yt[t]&&Yt.splice(t,1)},showLoading:ee,enableLoading:ee,getTimerLeft:function(){return oe.timeout&&oe.timeout.getTimerLeft()},stopTimer:Jt,resumeTimer:Xt,toggleTimer:function(){var t=oe.timeout;return t&&(t.running?Jt:Xt)()},increaseTimer:function(t){if(oe.timeout){t=oe.timeout.increase(t);return at(t,!0),t}},isTimerRunning:function(){return oe.timeout&&oe.timeout.isRunning()}});function fe(){var t,e=Lt.innerParams.get(this);e&&(t=Lt.domCache.get(this),e.showConfirmButton||(vt(t.confirmButton),e.showCancelButton||vt(t.actions)),ht([t.popup,t.actions],V.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.cancelButton.disabled=!1)}function me(){null!==$.previousBodyPadding&&(document.body.style.paddingRight="".concat($.previousBodyPadding,"px"),$.previousBodyPadding=null)}function he(){navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||D().scrollHeight>window.innerHeight-44&&(R().style.paddingBottom="".concat(44,"px"))}function ge(){var e,t=R();t.ontouchstart=function(t){e=Ce(t.target)},t.ontouchmove=function(t){e&&(t.preventDefault(),t.stopPropagation())}}function ve(){var t;X(document.body,V.iosfix)&&(t=parseInt(document.body.style.top,10),ht(document.body,V.iosfix),document.body.style.top="",document.body.scrollTop=-1*t)}function ye(){"undefined"!=typeof window&&ke()&&window.removeEventListener("resize",xe)}var be=function(){null===$.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&($.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat($.previousBodyPadding+function(){var t=document.createElement("div");t.className=V["scrollbar-measure"],document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e}(),"px"))},we=function(){var t;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints)&&!X(document.body,V.iosfix)&&(t=document.body.scrollTop,document.body.style.top="".concat(-1*t,"px"),mt(document.body,V.iosfix),ge(),he())},Ce=function(t){var e=R();return t===e||!(rt(e)||"INPUT"===t.tagName||rt(U())&&U().contains(t))},ke=function(){return!!window.MSInputMethodContext&&!!document.documentMode},xe=function(){var t=R(),e=D();t.style.removeProperty("align-items"),e.offsetTop<0&&(t.style.alignItems="flex-start")},Pe=function(){"undefined"!=typeof window&&ke()&&(xe(),window.addEventListener("resize",xe))},Be={swalPromiseResolve:new WeakMap};function Ae(t,e,n,o){n?Oe(t,o):($t().then(function(){return Oe(t,o)}),oe.keydownTarget.removeEventListener("keydown",oe.keydownHandler,{capture:oe.keydownListenerCapture}),oe.keydownHandlerAdded=!1),e.parentNode&&!document.body.getAttribute("data-swal2-queue-step")&&e.parentNode.removeChild(e),k()&&(me(),ve(),ye()),ht([document.documentElement,document.body],[V.shown,V["height-auto"],V["no-backdrop"],V["toast-shown"],V["toast-column"]])}function Se(t){var e,n,o,i=D();!i||(e=Lt.innerParams.get(this))&&!X(i,e.hideClass.popup)&&(n=Be.swalPromiseResolve.get(this),ht(i,e.showClass.popup),mt(i,e.hideClass.popup),o=R(),ht(o,e.showClass.backdrop),mt(o,e.hideClass.backdrop),Ee(this,i,e),void 0!==t?(t.isDismissed=void 0!==t.dismiss,t.isConfirmed=void 0===t.dismiss):t={isDismissed:!0,isConfirmed:!1},n(t||{}))}function Ee(t,e,n){var o=R(),i=xt&&bt(e),r=n.onClose,n=n.onAfterClose;null!==r&&"function"==typeof r&&r(e),i?Te(t,e,o,n):Ae(t,o,Q(),n)}function Oe(t,e){setTimeout(function(){"function"==typeof e&&e(),t._destroy()})}var Te=function(t,e,n,o){oe.swalCloseEventFinishedCallback=Ae.bind(null,t,n,Q(),o),e.addEventListener(xt,function(t){t.target===e&&(oe.swalCloseEventFinishedCallback(),delete oe.swalCloseEventFinishedCallback)})};function Le(t,e,n){var o=Lt.domCache.get(t);e.forEach(function(t){o[t].disabled=n})}function je(t,e){if(!t)return!1;if("radio"===t.type)for(var n=t.parentNode.parentNode.querySelectorAll("input"),o=0;o<n.length;o++)n[o].disabled=e;else t.disabled=e}var qe=function(){function n(t,e){a(this,n),this.callback=t,this.remaining=e,this.running=!1,this.start()}return c(n,[{key:"start",value:function(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}},{key:"stop",value:function(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date-this.started),this.remaining}},{key:"increase",value:function(t){var e=this.running;return e&&this.stop(),this.remaining+=t,e&&this.start(),this.remaining}},{key:"getTimerLeft",value:function(){return this.running&&(this.stop(),this.start()),this.remaining}},{key:"isRunning",value:function(){return this.running}}]),n}(),Ie={email:function(t,e){return/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address")},url:function(t,e){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")}};function Ve(t){var e,n;(e=t).inputValidator||Object.keys(Ie).forEach(function(t){e.input===t&&(e.inputValidator=Ie[t])}),t.showLoaderOnConfirm&&!t.preConfirm&&B("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),t.animation=E(t.animation),(n=t).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(B('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof t.title&&(t.title=t.title.split("\n").join("<br />")),Ct(t)}var Me=function(t){var e=R(),n=D();"function"==typeof t.onBeforeOpen&&t.onBeforeOpen(n);var o=window.getComputedStyle(document.body).overflowY;Ne(e,n,t),He(e,n),k()&&De(e,t.scrollbarPadding,o),Q()||oe.previousActiveElement||(oe.previousActiveElement=document.activeElement),"function"==typeof t.onOpen&&setTimeout(function(){return t.onOpen(n)}),ht(e,V["no-transition"])};function Re(t){var e=D();t.target===e&&(t=R(),e.removeEventListener(xt,Re),t.style.overflowY="auto")}function He(t,e){xt&&bt(e)?(t.style.overflowY="hidden",e.addEventListener(xt,Re)):t.style.overflowY="auto"}function De(t,e,n){we(),Pe(),e&&"hidden"!==n&&be(),setTimeout(function(){t.scrollTop=0})}function Ne(t,e,n){mt(t,n.showClass.backdrop),gt(e),mt(e,n.showClass.popup),mt([document.documentElement,document.body],V.shown),n.heightAuto&&n.backdrop&&!n.toast&&mt([document.documentElement,document.body],V["height-auto"])}function Ue(t){return t.checked?1:0}function _e(t){return t.checked?t.value:null}function Fe(t){return t.files.length?null!==t.getAttribute("multiple")?t.files:t.files[0]:null}function ze(e,n){function o(t){return en[n.input](i,nn(t),n)}var i=U();O(n.inputOptions)||L(n.inputOptions)?(ee(),T(n.inputOptions).then(function(t){e.hideLoading(),o(t)})):"object"===r(n.inputOptions)?o(n.inputOptions):A("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(r(n.inputOptions)))}function We(e,n){var o=e.getInput();vt(o),T(n.inputValue).then(function(t){o.value="number"===n.input?parseFloat(t)||0:"".concat(t),gt(o),o.focus(),e.hideLoading()}).catch(function(t){A("Error in inputValue promise: ".concat(t)),o.value="",gt(o),o.focus(),e.hideLoading()})}function Ke(e,n){var o=tn(e,n);n.inputValidator?(e.disableInput(),Promise.resolve().then(function(){return T(n.inputValidator(o,n.validationMessage))}).then(function(t){e.enableButtons(),e.enableInput(),t?e.showValidationMessage(t):cn(e,n,o)})):e.getInput().checkValidity()?cn(e,n,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))}function Ye(t,e,n){var o=C(),i=0;if(i<o.length)return(e+=n)===o.length?e=0:-1===e&&(e=o.length-1),o[e].focus();D().focus()}function Ze(t,e,n){var o=Lt.innerParams.get(t);o.stopKeydownPropagation&&e.stopPropagation(),"Enter"===e.key?dn(t,e,o):"Tab"===e.key?pn(e,o):-1!==un.indexOf(e.key)?fn():-1!==ln.indexOf(e.key)&&mn(e,o,n)}function Qe(e,t,n){t.popup.onclick=function(){var t=Lt.innerParams.get(e);t.showConfirmButton||t.showCancelButton||t.showCloseButton||t.input||n(j.close)}}function $e(e){e.popup.onmousedown=function(){e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(gn=!0)}}}function Je(e){e.container.onmousedown=function(){e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,t.target!==e.popup&&!e.popup.contains(t.target)||(gn=!0)}}}function Xe(n,o,i){o.container.onclick=function(t){var e=Lt.innerParams.get(n);gn?gn=!1:t.target===o.container&&E(e.allowOutsideClick)&&i(j.backdrop)}}var Ge=function(t,e){"select"===e.input||"radio"===e.input?ze(t,e):-1!==["text","email","number","tel","textarea"].indexOf(e.input)&&(O(e.inputValue)||L(e.inputValue))&&We(t,e)},tn=function(t,e){var n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return Ue(n);case"radio":return _e(n);case"file":return Fe(n);default:return e.inputAutoTrim?n.value.trim():n.value}},en={select:function(t,e,i){function o(t,e,n){var o=document.createElement("option");o.value=n,J(o,e),i.inputValue.toString()===n.toString()&&(o.selected=!0),t.appendChild(o)}var r=nt(t,V.select);e.forEach(function(t){var e,n=t[0],t=t[1];Array.isArray(t)?((e=document.createElement("optgroup")).label=n,e.disabled=!1,r.appendChild(e),t.forEach(function(t){return o(e,t[1],t[0])})):o(r,t,n)}),r.focus()},radio:function(t,e,i){var r=nt(t,V.radio);e.forEach(function(t){var e=t[0],n=t[1],o=document.createElement("input"),t=document.createElement("label");o.type="radio",o.name=V.radio,o.value=e,i.inputValue.toString()===e.toString()&&(o.checked=!0);e=document.createElement("span");J(e,n),e.className=V.label,t.appendChild(o),t.appendChild(e),r.appendChild(t)});e=r.querySelectorAll("input");e.length&&e[0].focus()}},nn=function n(o){var i=[];return"undefined"!=typeof Map&&o instanceof Map?o.forEach(function(t,e){"object"===r(t)&&(t=n(t)),i.push([e,t])}):Object.keys(o).forEach(function(t){var e=o[t];"object"===r(e)&&(e=n(e)),i.push([t,e])}),i},on=function(t,e){t.disableButtons(),e.input?Ke(t,e):cn(t,e,!0)},rn=function(t,e){t.disableButtons(),e(j.cancel)},an=function(t,e){t.closePopup({value:e})},cn=function(e,t,n){t.showLoaderOnConfirm&&ee(),t.preConfirm?(e.resetValidationMessage(),Promise.resolve().then(function(){return T(t.preConfirm(n,t.validationMessage))}).then(function(t){yt(F())||!1===t?e.hideLoading():an(e,void 0===t?n:t)})):an(e,n)},sn=function(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 Ze(e,t,o)},t.keydownTarget=n.keydownListenerCapture?window:D(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)},un=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Left","Right","Up","Down"],ln=["Escape","Esc"],dn=function(t,e,n){e.isComposing||e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML&&-1===["textarea","file"].indexOf(n.input)&&(Ft(),e.preventDefault())},pn=function(t,e){for(var n=t.target,o=C(),i=-1,r=0;r<o.length;r++)if(n===o[r]){i=r;break}t.shiftKey?Ye(0,i,-1):Ye(0,i,1),t.stopPropagation(),t.preventDefault()},fn=function(){var t=z(),e=W();document.activeElement===t&&yt(e)?e.focus():document.activeElement===e&&yt(t)&&t.focus()},mn=function(t,e,n){E(e.allowEscapeKey)&&(t.preventDefault(),n(j.esc))},hn=function(t,e,n){Lt.innerParams.get(t).toast?Qe(t,e,n):($e(e),Je(e),Xe(t,e,n))},gn=!1;function vn(t){var e=s({},re.showClass,t.showClass),n=s({},re.hideClass,t.hideClass),o=s({},re,t);return o.showClass=e,o.hideClass=n,!1===t.animation&&(o.showClass={popup:"swal2-noanimation",backdrop:"swal2-noanimation"},o.hideClass={}),o}function yn(n,o,i){return new Promise(function(t){function e(t){n.closePopup({dismiss:t})}Be.swalPromiseResolve.set(n,t),o.confirmButton.onclick=function(){return on(n,i)},o.cancelButton.onclick=function(){return rn(n,e)},o.closeButton.onclick=function(){return e(j.close)},hn(n,o,e),sn(n,oe,i,e),(i.toast&&(i.input||i.footer||i.showCloseButton)?mt:ht)(document.body,V["toast-column"]),Ge(n,i),Me(i),Cn(oe,i,e),kn(o,i),setTimeout(function(){o.container.scrollTop=0})})}function bn(t){var e={popup:D(),container:R(),content:U(),actions:K(),confirmButton:z(),cancelButton:W(),closeButton:Z(),validationMessage:F(),progressSteps:_()};return Lt.domCache.set(t,e),e}function wn(){document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()}var Cn=function(t,e,n){var o=Y();vt(o),e.timer&&(t.timeout=new qe(function(){n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(gt(o),setTimeout(function(){t.timeout.running&&at(e.timer)})))},kn=function(t,e){if(!e.toast)return E(e.allowEnterKey)?e.focusCancel&&yt(t.cancelButton)?t.cancelButton.focus():e.focusConfirm&&yt(t.confirmButton)?t.confirmButton.focus():void Ye(0,-1,1):wn()};function xn(t){delete t.params,delete oe.keydownHandler,delete oe.keydownTarget,Bn(Lt),Bn(Be)}var Pn,Bn=function(t){for(var e in t)t[e]=new WeakMap},I=Object.freeze({hideLoading:fe,disableLoading:fe,getInput:function(t){var e=Lt.innerParams.get(t||this);return(t=Lt.domCache.get(t||this))?et(t.content,e.input):null},close:Se,closePopup:Se,closeModal:Se,closeToast:Se,enableButtons:function(){Le(this,["confirmButton","cancelButton"],!1)},disableButtons:function(){Le(this,["confirmButton","cancelButton"],!0)},enableInput:function(){return je(this.getInput(),!1)},disableInput:function(){return je(this.getInput(),!0)},showValidationMessage:function(t){var e=Lt.domCache.get(this);J(e.validationMessage,t),t=window.getComputedStyle(e.popup),e.validationMessage.style.marginLeft="-".concat(t.getPropertyValue("padding-left")),e.validationMessage.style.marginRight="-".concat(t.getPropertyValue("padding-right")),gt(e.validationMessage),(e=this.getInput())&&(e.setAttribute("aria-invalid",!0),e.setAttribute("aria-describedBy",V["validation-message"]),pt(e),mt(e,V.inputerror))},resetValidationMessage:function(){var t=Lt.domCache.get(this);t.validationMessage&&vt(t.validationMessage),(t=this.getInput())&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedBy"),ht(t,V.inputerror))},getProgressSteps:function(){return Lt.domCache.get(this).progressSteps},_main:function(t){!function(t){for(var e in t)ue(e),t.toast&&le(e),de(e)}(t),oe.currentInstance&&oe.currentInstance._destroy(),oe.currentInstance=this;var e=vn(t);return Ve(e),Object.freeze(e),oe.timeout&&(oe.timeout.stop(),delete oe.timeout),clearTimeout(oe.restoreFocusTimeout),t=bn(this),_t(this,e),Lt.innerParams.set(this,e),yn(this,t,e)},update:function(e){var t=D(),n=Lt.innerParams.get(this);if(!t||X(t,n.hideClass.popup))return B("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");var o={};Object.keys(e).forEach(function(t){Sn.isUpdatableParameter(t)?o[t]=e[t]:B('Invalid parameter to update: "'.concat(t,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js'))}),n=s({},n,o),_t(this,n),Lt.innerParams.set(this,n),Object.defineProperties(this,{params:{value:s({},this.params,e),writable:!1,enumerable:!0}})},_destroy:function(){var t=Lt.domCache.get(this),e=Lt.innerParams.get(this);e&&(t.popup&&oe.swalCloseEventFinishedCallback&&(oe.swalCloseEventFinishedCallback(),delete oe.swalCloseEventFinishedCallback),oe.deferDisposalTimer&&(clearTimeout(oe.deferDisposalTimer),delete oe.deferDisposalTimer),"function"==typeof e.onDestroy&&e.onDestroy(),xn(this))}}),An=function(){function i(){if(a(this,i),"undefined"!=typeof window){"undefined"==typeof Promise&&A("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)"),Pn=this;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var o=Object.freeze(this.constructor.argsToParams(e));Object.defineProperties(this,{params:{value:o,writable:!1,enumerable:!0,configurable:!0}});o=this._main(this.params);Lt.promise.set(this,o)}}return c(i,[{key:"then",value:function(t){return Lt.promise.get(this).then(t)}},{key:"finally",value:function(t){return Lt.promise.get(this).finally(t)}}]),i}();s(An.prototype,I),s(An,pe),Object.keys(I).forEach(function(t){An[t]=function(){if(Pn)return Pn[t].apply(Pn,arguments)}}),An.DismissReason=j,An.version="9.15.2";var Sn=An;return Sn.default=Sn}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2);