/*! * sweetalert2 v11.6.16 * Released under the MIT License. */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Sweetalert2=t()}(this,(function(){"use strict";var e={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const t=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t},n=t(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","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"]),o=t(["success","warning","info","question","error"]),i="SweetAlert2:",s=e=>e.charAt(0).toUpperCase()+e.slice(1),r=e=>{console.warn(`${i} ${"object"==typeof e?e.join(" "):e}`)},a=e=>{console.error(`${i} ${e}`)},l=[],c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=()=>document.body.querySelector(`.${n.container}`),g=e=>{const t=m();return t?t.querySelector(e):null},h=e=>g(`.${e}`),f=()=>h(n.popup),b=()=>h(n.icon),y=()=>h(n.title),w=()=>h(n["html-container"]),v=()=>h(n.image),C=()=>h(n["progress-steps"]),A=()=>h(n["validation-message"]),k=()=>g(`.${n.actions} .${n.confirm}`),B=()=>g(`.${n.actions} .${n.deny}`),P=()=>g(`.${n.loader}`),x=()=>g(`.${n.actions} .${n.cancel}`),E=()=>h(n.actions),$=()=>h(n.footer),T=()=>h(n["timer-progress-bar"]),L=()=>h(n.close),S=()=>{const e=Array.from(f().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(((e,t)=>{const n=parseInt(e.getAttribute("tabindex")),o=parseInt(t.getAttribute("tabindex"));return n>o?1:n"-1"!==e.getAttribute("tabindex")));return(e=>{const t=[];for(let n=0;nZ(e)))},O=()=>I(document.body,n.shown)&&!I(document.body,n["toast-shown"])&&!I(document.body,n["no-backdrop"]),j=()=>f()&&I(f(),n.toast),M={previousBodyPadding:null},H=(e,t)=>{if(e.textContent="",t){const n=(new DOMParser).parseFromString(t,"text/html");Array.from(n.querySelector("head").childNodes).forEach((t=>{e.appendChild(t)})),Array.from(n.querySelector("body").childNodes).forEach((t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},I=(e,t)=>{if(!t)return!1;const n=t.split(/\s+/);for(let t=0;t{if(((e,t)=>{Array.from(e.classList).forEach((i=>{Object.values(n).includes(i)||Object.values(o).includes(i)||Object.values(t.showClass).includes(i)||e.classList.remove(i)}))})(e,t),t.customClass&&t.customClass[i]){if("string"!=typeof t.customClass[i]&&!t.customClass[i].forEach)return void r(`Invalid type of customClass.${i}! Expected string or iterable object, got "${typeof t.customClass[i]}"`);F(e,t.customClass[i])}},D=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${n.popup} > .${n[t]}`);case"checkbox":return e.querySelector(`.${n.popup} > .${n.checkbox} input`);case"radio":return e.querySelector(`.${n.popup} > .${n.radio} input:checked`)||e.querySelector(`.${n.popup} > .${n.radio} input:first-child`);case"range":return e.querySelector(`.${n.popup} > .${n.range} input`);default:return e.querySelector(`.${n.popup} > .${n.input}`)}},V=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},N=(e,t,n)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach((t=>{Array.isArray(e)?e.forEach((e=>{n?e.classList.add(t):e.classList.remove(t)})):n?e.classList.add(t):e.classList.remove(t)})))},F=(e,t)=>{N(e,t,!0)},R=(e,t)=>{N(e,t,!1)},U=(e,t)=>{const n=Array.from(e.children);for(let e=0;e{n===`${parseInt(n)}`&&(n=parseInt(n)),n||0===parseInt(n)?e.style[t]="number"==typeof n?`${n}px`:n:e.style.removeProperty(t)},W=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e.style.display=t},z=e=>{e.style.display="none"},K=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},Y=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex";t?W(e,n):z(e)},Z=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),J=e=>!!(e.scrollHeight>e.clientHeight),X=e=>{const t=window.getComputedStyle(e),n=parseFloat(t.getPropertyValue("animation-duration")||"0"),o=parseFloat(t.getPropertyValue("transition-duration")||"0");return n>0||o>0},G=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=T();Z(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout((()=>{n.style.transition=`width ${e/1e3}s linear`,n.style.width="0%"}),10))},Q={},ee=()=>"undefined"==typeof window||"undefined"==typeof document,te=`\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,""),ne=()=>{Q.currentInstance.resetValidationMessage()},oe=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ie(e,t):e&&H(t,e)},ie=(e,t)=>{e.jquery?se(t,e):H(t,e.toString())},se=(e,t)=>{if(e.textContent="",0 in t)for(let n=0;n in t;n++)e.appendChild(t[n].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},re=(()=>{if(ee())return!1;const e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})();function ae(e,t,o){Y(e,o[`show${s(t)}Button`],"inline-block"),H(e,o[`${t}ButtonText`]),e.setAttribute("aria-label",o[`${t}ButtonAriaLabel`]),e.className=n[t],q(e,o,`${t}Button`),F(e,o[`${t}ButtonClass`])}const le=["input","file","range","select","radio","checkbox","textarea"],ce=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},ue=(e,t,o)=>{if(o.inputLabel){e.id=n.input;const i=document.createElement("label"),s=n["input-label"];i.setAttribute("for",e.id),i.className=s,"object"==typeof o.customClass&&F(i,o.customClass.inputLabel),i.innerText=o.inputLabel,t.insertAdjacentElement("beforebegin",i)}},de=e=>U(f(),n[e]||n.input),pe=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:p(t)||r(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},me={};me.text=me.email=me.password=me.number=me.tel=me.url=(e,t)=>(pe(e,t.inputValue),ue(e,e,t),ce(e,t),e.type=t.input,e),me.file=(e,t)=>(ue(e,e,t),ce(e,t),e),me.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return pe(n,t.inputValue),n.type=t.input,pe(o,t.inputValue),ue(n,e,t),e},me.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");H(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return ue(e,e,t),e},me.radio=e=>(e.textContent="",e),me.checkbox=(e,t)=>{const o=D(f(),"checkbox");o.value="1",o.id=n.checkbox,o.checked=Boolean(t.inputValue);const i=e.querySelector("span");return H(i,t.inputPlaceholder),o},me.textarea=(e,t)=>(pe(e,t.inputValue),ce(e,t),ue(e,e,t),setTimeout((()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(f()).width);new MutationObserver((()=>{const n=e.offsetWidth+(o=e,parseInt(window.getComputedStyle(o).marginLeft)+parseInt(window.getComputedStyle(o).marginRight));var o;f().style.width=n>t?`${n}px`:null})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e);const ge=(t,o)=>{const i=w();q(i,o,"htmlContainer"),o.html?(oe(o.html,i),W(i,"block")):o.text?(i.textContent=o.text,W(i,"block")):z(i),((t,o)=>{const i=f(),s=e.innerParams.get(t),r=!s||o.input!==s.input;le.forEach((e=>{const t=U(i,n[e]);((e,t)=>{const n=D(f(),e);if(n){(e=>{for(let t=0;t{if(!me[e.input])return void a(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${e.input}"`);const t=de(e.input),n=me[e.input](t,e);W(t),setTimeout((()=>{V(n)}))})(o),(e=>{const t=de(e.input);"object"==typeof e.customClass&&F(t,e.customClass.input)})(o))})(t,o)},he=(e,t)=>{for(const n in o)t.icon!==n&&R(e,o[n]);F(e,o[t.icon]),ye(e,t),fe(),q(e,t,"icon")},fe=()=>{const e=f(),t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e{let n,o=e.innerHTML;t.iconHtml?n=we(t.iconHtml):"success"===t.icon?(n='\n
    \n \n
    \n
    \n',o=o.replace(/ style=".*?"/g,"")):n="error"===t.icon?'\n \n \n \n \n':we({question:"?",warning:"!",info:"i"}[t.icon]),o.trim()!==n.trim()&&H(e,n)},ye=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])K(e,n,"backgroundColor",t.iconColor);K(e,".swal2-success-ring","borderColor",t.iconColor)}},we=e=>`
    ${e}
    `,ve=(e,t)=>{e.className=`${n.popup} ${Z(e)?t.showClass.popup:""}`,t.toast?(F([document.documentElement,document.body],n["toast-shown"]),F(e,n.toast)):F(e,n.modal),q(e,t,"popup"),"string"==typeof t.customClass&&F(e,t.customClass),t.icon&&F(e,n[`icon-${t.icon}`])},Ce=(t,i)=>{((e,t)=>{const n=m(),o=f();t.toast?(_(n,"width",t.width),o.style.width="100%",o.insertBefore(P(),b())):_(o,"width",t.width),_(o,"padding",t.padding),t.color&&(o.style.color=t.color),t.background&&(o.style.background=t.background),z(A()),ve(o,t)})(0,i),((e,t)=>{const o=m();o&&(function(e,t){"string"==typeof t?e.style.background=t:t||F([document.documentElement,document.body],n["no-backdrop"])}(o,t.backdrop),function(e,t){t in n?F(e,n[t]):(r('The "position" parameter is not valid, defaulting to "center"'),F(e,n.center))}(o,t.position),function(e,t){if(t&&"string"==typeof t){const o=`grow-${t}`;o in n&&F(e,n[o])}}(o,t.grow),q(o,t,"container"))})(0,i),((e,t)=>{const o=C();t.progressSteps&&0!==t.progressSteps.length?(W(o),o.textContent="",t.currentProgressStep>=t.progressSteps.length&&r("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach(((e,i)=>{const s=(e=>{const t=document.createElement("li");return F(t,n["progress-step"]),H(t,e),t})(e);if(o.appendChild(s),i===t.currentProgressStep&&F(s,n["active-progress-step"]),i!==t.progressSteps.length-1){const e=(e=>{const t=document.createElement("li");return F(t,n["progress-step-line"]),e.progressStepsDistance&&_(t,"width",e.progressStepsDistance),t})(t);o.appendChild(e)}}))):z(o)})(0,i),((t,n)=>{const i=e.innerParams.get(t),s=b();if(i&&n.icon===i.icon)return be(s,n),void he(s,n);if(n.icon||n.iconHtml){if(n.icon&&-1===Object.keys(o).indexOf(n.icon))return a(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${n.icon}"`),void z(s);W(s),be(s,n),he(s,n),F(s,n.showClass.icon)}else z(s)})(t,i),((e,t)=>{const o=v();t.imageUrl?(W(o,""),o.setAttribute("src",t.imageUrl),o.setAttribute("alt",t.imageAlt),_(o,"width",t.imageWidth),_(o,"height",t.imageHeight),o.className=n.image,q(o,t,"image")):z(o)})(0,i),((e,t)=>{const n=y();Y(n,t.title||t.titleText,"block"),t.title&&oe(t.title,n),t.titleText&&(n.innerText=t.titleText),q(n,t,"title")})(0,i),((e,t)=>{const n=L();H(n,t.closeButtonHtml),q(n,t,"closeButton"),Y(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel)})(0,i),ge(t,i),((e,t)=>{const o=E(),i=P();t.showConfirmButton||t.showDenyButton||t.showCancelButton?W(o):z(o),q(o,t,"actions"),function(e,t,o){const i=k(),s=B(),r=x();ae(i,"confirm",o),ae(s,"deny",o),ae(r,"cancel",o),function(e,t,o,i){i.buttonsStyling?(F([e,t,o],n.styled),i.confirmButtonColor&&(e.style.backgroundColor=i.confirmButtonColor,F(e,n["default-outline"])),i.denyButtonColor&&(t.style.backgroundColor=i.denyButtonColor,F(t,n["default-outline"])),i.cancelButtonColor&&(o.style.backgroundColor=i.cancelButtonColor,F(o,n["default-outline"]))):R([e,t,o],n.styled)}(i,s,r,o),o.reverseButtons&&(o.toast?(e.insertBefore(r,i),e.insertBefore(s,i)):(e.insertBefore(r,t),e.insertBefore(s,t),e.insertBefore(i,t)))}(o,i,t),H(i,t.loaderHtml),q(i,t,"loader")})(0,i),((e,t)=>{const n=$();Y(n,t.footer),t.footer&&oe(t.footer,n),q(n,t,"footer")})(0,i),"function"==typeof i.didRender&&i.didRender(f())};function Ae(){const t=e.innerParams.get(this);if(!t)return;const o=e.domCache.get(this);z(o.loader),j()?t.icon&&W(b()):ke(o),R([o.popup,o.actions],n.loading),o.popup.removeAttribute("aria-busy"),o.popup.removeAttribute("data-loading"),o.confirmButton.disabled=!1,o.denyButton.disabled=!1,o.cancelButton.disabled=!1}const ke=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?W(t[0],"inline-block"):Z(k())||Z(B())||Z(x())||z(e.actions)},Be=()=>k()&&k().click(),Pe=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),xe=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},Ee=(e,t)=>{const n=S();if(n.length)return(e+=t)===n.length?e=0:-1===e&&(e=n.length-1),void n[e].focus();f().focus()},$e=["ArrowRight","ArrowDown"],Te=["ArrowLeft","ArrowUp"],Le=(t,n,o)=>{const i=e.innerParams.get(t);i&&(n.isComposing||229===n.keyCode||(i.stopKeydownPropagation&&n.stopPropagation(),"Enter"===n.key?Se(t,n,i):"Tab"===n.key?Oe(n):[...$e,...Te].includes(n.key)?je(n.key):"Escape"===n.key&&Me(n,i,o)))},Se=(e,t,n)=>{if(c(n.allowEnterKey)&&t.target&&e.getInput()&&t.target instanceof HTMLElement&&t.target.outerHTML===e.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;Be(),t.preventDefault()}},Oe=e=>{const t=e.target,n=S();let o=-1;for(let e=0;e{const t=k(),n=B(),o=x();if(document.activeElement instanceof HTMLElement&&![t,n,o].includes(document.activeElement))return;const i=$e.includes(e)?"nextElementSibling":"previousElementSibling";let s=document.activeElement;for(let e=0;e{c(t.allowEscapeKey)&&(e.preventDefault(),n(Pe.esc))};var He={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const Ie=()=>{Array.from(document.body.children).forEach((e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))},qe=e=>{const t=e.target,n=m();return!(De(e)||Ve(e)||t!==n&&(J(n)||!(t instanceof HTMLElement)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||J(w())&&w().contains(t)))},De=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,Ve=e=>e.touches&&e.touches.length>1;function Ne(e,t,o,i){j()?Ke(e,i):((e=>new Promise((t=>{if(!e)return t();const n=window.scrollX,o=window.scrollY;Q.restoreFocusTimeout=setTimeout((()=>{Q.previousActiveElement instanceof HTMLElement?(Q.previousActiveElement.focus(),Q.previousActiveElement=null):document.body&&document.body.focus(),t()}),100),window.scrollTo(n,o)})))(o).then((()=>Ke(e,i))),xe(Q)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),O()&&(null!==M.previousBodyPadding&&(document.body.style.paddingRight=`${M.previousBodyPadding}px`,M.previousBodyPadding=null),(()=>{if(I(document.body,n.iosfix)){const e=parseInt(document.body.style.top,10);R(document.body,n.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),Ie()),R([document.documentElement,document.body],[n.shown,n["height-auto"],n["no-backdrop"],n["toast-shown"]])}function Fe(e){e=_e(e);const t=He.swalPromiseResolve.get(this),n=Re(this);this.isAwaitingPromise()?e.isDismissed||(Ue(this),t(e)):n&&t(e)}const Re=t=>{const n=f();if(!n)return!1;const o=e.innerParams.get(t);if(!o||I(n,o.hideClass.popup))return!1;R(n,o.showClass.popup),F(n,o.hideClass.popup);const i=m();return R(i,o.showClass.backdrop),F(i,o.hideClass.backdrop),We(t,n,o),!0},Ue=t=>{t.isAwaitingPromise()&&(e.awaitingPromise.delete(t),e.innerParams.get(t)||t._destroy())},_e=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),We=(e,t,n)=>{const o=m(),i=re&&X(t);"function"==typeof n.willClose&&n.willClose(t),i?ze(e,t,o,n.returnFocus,n.didClose):Ne(e,o,n.returnFocus,n.didClose)},ze=(e,t,n,o,i)=>{Q.swalCloseEventFinishedCallback=Ne.bind(null,e,n,o,i),t.addEventListener(re,(function(e){e.target===t&&(Q.swalCloseEventFinishedCallback(),delete Q.swalCloseEventFinishedCallback)}))},Ke=(e,t)=>{setTimeout((()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()}))};function Ye(t,n,o){const i=e.domCache.get(t);n.forEach((e=>{i[e].disabled=o}))}function Ze(e,t){if(e)if("radio"===e.type){const n=e.parentNode.parentNode.querySelectorAll("input");for(let e=0;eObject.prototype.hasOwnProperty.call(Je,e),tt=e=>-1!==Xe.indexOf(e),nt=e=>Ge[e],ot=e=>{et(e)||r(`Unknown parameter "${e}"`)},it=e=>{Qe.includes(e)&&r(`The parameter "${e}" is incompatible with toasts`)},st=e=>{nt(e)&&((e,t)=>{var n;n=`"${e}" is deprecated and will be removed in the next major release. Please use "${t}" instead.`,l.includes(n)||(l.push(n),r(n))})(e,nt(e))},rt=t=>{t.isAwaitingPromise()?(at(e,t),e.awaitingPromise.set(t,!0)):(at(He,t),at(e,t))},at=(e,t)=>{for(const n in e)e[n].delete(t)};var lt=Object.freeze({__proto__:null,_destroy:function(){const t=e.domCache.get(this),n=e.innerParams.get(this);n?(t.popup&&Q.swalCloseEventFinishedCallback&&(Q.swalCloseEventFinishedCallback(),delete Q.swalCloseEventFinishedCallback),"function"==typeof n.didDestroy&&n.didDestroy(),(e=>{rt(e),delete e.params,delete Q.keydownHandler,delete Q.keydownTarget,delete Q.currentInstance})(this)):rt(this)},close:Fe,closeModal:Fe,closePopup:Fe,closeToast:Fe,disableButtons:function(){Ye(this,["confirmButton","denyButton","cancelButton"],!0)},disableInput:function(){Ze(this.getInput(),!0)},disableLoading:Ae,enableButtons:function(){Ye(this,["confirmButton","denyButton","cancelButton"],!1)},enableInput:function(){Ze(this.getInput(),!1)},getInput:function(t){const n=e.innerParams.get(t||this),o=e.domCache.get(t||this);return o?D(o.popup,n.input):null},handleAwaitingPromise:Ue,hideLoading:Ae,isAwaitingPromise:function(){return!!e.awaitingPromise.get(this)},rejectPromise:function(e){const t=He.swalPromiseReject.get(this);Ue(this),t&&t(e)},resetValidationMessage:function(){const t=e.domCache.get(this);t.validationMessage&&z(t.validationMessage);const o=this.getInput();o&&(o.removeAttribute("aria-invalid"),o.removeAttribute("aria-describedby"),R(o,n.inputerror))},showValidationMessage:function(t){const o=e.domCache.get(this),i=e.innerParams.get(this);H(o.validationMessage,t),o.validationMessage.className=n["validation-message"],i.customClass&&i.customClass.validationMessage&&F(o.validationMessage,i.customClass.validationMessage),W(o.validationMessage);const s=this.getInput();s&&(s.setAttribute("aria-invalid",!0),s.setAttribute("aria-describedby",n["validation-message"]),V(s),F(s,n.inputerror))},update:function(t){const n=f(),o=e.innerParams.get(this);if(!n||I(n,o.hideClass.popup))return void r("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.");const i=(e=>{const t={};return Object.keys(e).forEach((n=>{tt(n)?t[n]=e[n]:r(`Invalid parameter to update: ${n}`)})),t})(t),s=Object.assign({},o,i);Ce(this,s),e.innerParams.set(this,s),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})}});const ct=e=>{let t=f();t||new Yt,t=f();const n=P();j()?z(b()):ut(t,e),W(n),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},ut=(e,t)=>{const o=E(),i=P();!t&&Z(k())&&(t=k()),W(o),t&&(z(t),i.setAttribute("data-button-to-replace",t.className)),i.parentNode.insertBefore(i,t),F([e,o],n.loading)},dt={select:(e,t,o)=>{const i=U(e,n.select),s=(e,t,n)=>{const i=document.createElement("option");i.value=n,H(i,t),i.selected=mt(n,o.inputValue),e.appendChild(i)};t.forEach((e=>{const t=e[0],n=e[1];if(Array.isArray(n)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,i.appendChild(e),n.forEach((t=>s(e,t[1],t[0])))}else s(i,n,t)})),i.focus()},radio:(e,t,o)=>{const i=U(e,n.radio);t.forEach((e=>{const t=e[0],s=e[1],r=document.createElement("input"),a=document.createElement("label");r.type="radio",r.name=n.radio,r.value=t,mt(t,o.inputValue)&&(r.checked=!0);const l=document.createElement("span");H(l,s),l.className=n.label,a.appendChild(r),a.appendChild(l),i.appendChild(a)}));const s=i.querySelectorAll("input");s.length&&s[0].focus()}},pt=e=>{const t=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach(((e,n)=>{let o=e;"object"==typeof o&&(o=pt(o)),t.push([n,o])})):Object.keys(e).forEach((n=>{let o=e[n];"object"==typeof o&&(o=pt(o)),t.push([n,o])})),t},mt=(e,t)=>t&&t.toString()===e.toString(),gt=(t,n)=>{const o=e.innerParams.get(t);if(!o.input)return void a(`The "input" parameter is needed to be set when using returnInputValueOn${s(n)}`);const i=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return(e=>e.checked?1:0)(n);case"radio":return(e=>e.checked?e.value:null)(n);case"file":return(e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null)(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(t,o);o.inputValidator?ht(t,i,n):t.getInput().checkValidity()?"deny"===n?ft(t,i):wt(t,i):(t.enableButtons(),t.showValidationMessage(o.validationMessage))},ht=(t,n,o)=>{const i=e.innerParams.get(t);t.disableInput(),Promise.resolve().then((()=>d(i.inputValidator(n,i.validationMessage)))).then((e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):"deny"===o?ft(t,n):wt(t,n)}))},ft=(t,n)=>{const o=e.innerParams.get(t||void 0);o.showLoaderOnDeny&&ct(B()),o.preDeny?(e.awaitingPromise.set(t||void 0,!0),Promise.resolve().then((()=>d(o.preDeny(n,o.validationMessage)))).then((e=>{!1===e?(t.hideLoading(),Ue(t)):t.close({isDenied:!0,value:void 0===e?n:e})})).catch((e=>yt(t||void 0,e)))):t.close({isDenied:!0,value:n})},bt=(e,t)=>{e.close({isConfirmed:!0,value:t})},yt=(e,t)=>{e.rejectPromise(t)},wt=(t,n)=>{const o=e.innerParams.get(t||void 0);o.showLoaderOnConfirm&&ct(),o.preConfirm?(t.resetValidationMessage(),e.awaitingPromise.set(t||void 0,!0),Promise.resolve().then((()=>d(o.preConfirm(n,o.validationMessage)))).then((e=>{Z(A())||!1===e?(t.hideLoading(),Ue(t)):bt(t,void 0===e?n:e)})).catch((e=>yt(t||void 0,e)))):bt(t,n)},vt=e=>e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton;let Ct=!1;const At=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e),kt=()=>{if(Q.timeout)return(()=>{const e=T(),t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const n=t/parseInt(window.getComputedStyle(e).width)*100;e.style.removeProperty("transition"),e.style.width=`${n}%`})(),Q.timeout.stop()},Bt=()=>{if(Q.timeout){const e=Q.timeout.start();return G(e),e}};let Pt=!1;const xt={},Et=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in xt){const n=t.getAttribute(e);if(n)return void xt[e].fire({template:n})}};var $t=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||At(e[0])?["title","html","icon"].forEach(((n,o)=>{const i=e[o];"string"==typeof i||At(i)?t[n]=i:void 0!==i&&a(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof i}`)})):Object.assign(t,e[0]),t},bindClickHandler:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template";xt[e]=this,Pt||(document.body.addEventListener("click",Et),Pt=!0)},clickCancel:()=>x()&&x().click(),clickConfirm:Be,clickDeny:()=>B()&&B().click(),enableLoading:ct,fire:function(){const e=this;for(var t=arguments.length,n=new Array(t),o=0;oh(n["icon-content"]),getImage:v,getInputLabel:()=>h(n["input-label"]),getLoader:P,getPopup:f,getProgressSteps:C,getTimerLeft:()=>Q.timeout&&Q.timeout.getTimerLeft(),getTimerProgressBar:T,getTitle:y,getValidationMessage:A,increaseTimer:e=>{if(Q.timeout){const t=Q.timeout.increase(e);return G(t,!0),t}},isDeprecatedParameter:nt,isLoading:()=>f().hasAttribute("data-loading"),isTimerRunning:()=>Q.timeout&&Q.timeout.isRunning(),isUpdatableParameter:tt,isValidParameter:et,isVisible:()=>Z(f()),mixin:function(e){return class extends(this){_main(t,n){return super._main(t,Object.assign({},e,n))}}},resumeTimer:Bt,showLoading:ct,stopTimer:kt,toggleTimer:()=>{const e=Q.timeout;return e&&(e.running?kt():Bt())}});class Tt{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){const t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const Lt=["swal-title","swal-html","swal-footer"],St=(e,t)=>{Array.from(e.attributes).forEach((n=>{-1===t.indexOf(n.name)&&r([`Unrecognized attribute "${n.name}" on <${e.tagName.toLowerCase()}>.`,t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element."])}))},Ot=e=>{const t=m(),o=f();"function"==typeof e.willOpen&&e.willOpen(o);const i=window.getComputedStyle(document.body).overflowY;It(t,o,e),setTimeout((()=>{Mt(t,o)}),10),O()&&(Ht(t,e.scrollbarPadding,i),Array.from(document.body.children).forEach((e=>{e===m()||e.contains(m())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}))),j()||Q.previousActiveElement||(Q.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout((()=>e.didOpen(o))),R(t,n["no-transition"])},jt=e=>{const t=f();if(e.target!==t)return;const n=m();t.removeEventListener(re,jt),n.style.overflowY="auto"},Mt=(e,t)=>{re&&X(t)?(e.style.overflowY="hidden",t.addEventListener(re,jt)):e.style.overflowY="auto"},Ht=(e,t,o)=>{(()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!I(document.body,n.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",F(document.body,n.iosfix),(()=>{const e=m();let t;e.ontouchstart=e=>{t=qe(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}})(),(()=>{const e=navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),n=!!e.match(/WebKit/i);if(t&&n&&!e.match(/CriOS/i)){const e=44;f().scrollHeight>window.innerHeight-e&&(m().style.paddingBottom=`${e}px`)}})()}})(),t&&"hidden"!==o&&(null===M.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(M.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${M.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=n["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)),setTimeout((()=>{e.scrollTop=0}))},It=(e,t,o)=>{F(e,o.showClass.backdrop),t.style.setProperty("opacity","0","important"),W(t,"grid"),setTimeout((()=>{F(t,o.showClass.popup),t.style.removeProperty("opacity")}),10),F([document.documentElement,document.body],n.shown),o.heightAuto&&o.backdrop&&!o.toast&&F([document.documentElement,document.body],n["height-auto"])};var qt={email:(e,t)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function Dt(e){!function(e){e.inputValidator||Object.keys(qt).forEach((t=>{e.input===t&&(e.inputValidator=qt[t])}))}(e),e.showLoaderOnConfirm&&!e.preConfirm&&r("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"),function(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(r('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
    ")),(e=>{const t=(()=>{const e=m();return!!e&&(e.remove(),R([document.documentElement,document.body],[n["no-backdrop"],n["toast-shown"],n["has-column"]]),!0)})();if(ee())return void a("SweetAlert2 requires document to initialize");const o=document.createElement("div");o.className=n.container,t&&F(o,n["no-transition"]),H(o,te);const i="string"==typeof(s=e.target)?document.querySelector(s):s;var s;i.appendChild(o),(e=>{const t=f();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),(e=>{"rtl"===window.getComputedStyle(e).direction&&F(m(),n.rtl)})(i),(()=>{const e=f(),t=U(e,n.input),o=U(e,n.file),i=e.querySelector(`.${n.range} input`),s=e.querySelector(`.${n.range} output`),r=U(e,n.select),a=e.querySelector(`.${n.checkbox} input`),l=U(e,n.textarea);t.oninput=ne,o.onchange=ne,r.onchange=ne,a.onchange=ne,l.oninput=ne,i.oninput=()=>{ne(),s.value=i.value},i.onchange=()=>{ne(),s.value=i.value}})()})(e)}let Vt;class Nt{constructor(){if("undefined"==typeof window)return;Vt=this;for(var t=arguments.length,n=new Array(t),o=0;o1&&void 0!==arguments[1]?arguments[1]:{};(e=>{!1===e.backdrop&&e.allowOutsideClick&&r('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const t in e)ot(t),e.toast&&it(t),st(t)})(Object.assign({},n,t)),Q.currentInstance&&(Q.currentInstance._destroy(),O()&&Ie()),Q.currentInstance=Vt;const o=Rt(t,n);Dt(o),Object.freeze(o),Q.timeout&&(Q.timeout.stop(),delete Q.timeout),clearTimeout(Q.restoreFocusTimeout);const i=Ut(Vt);return Ce(Vt,o),e.innerParams.set(Vt,o),Ft(Vt,i,o)}then(t){return e.promise.get(this).then(t)}finally(t){return e.promise.get(this).finally(t)}}const Ft=(t,n,o)=>new Promise(((i,s)=>{const r=e=>{t.close({isDismissed:!0,dismiss:e})};He.swalPromiseResolve.set(t,i),He.swalPromiseReject.set(t,s),n.confirmButton.onclick=()=>{(t=>{const n=e.innerParams.get(t);t.disableButtons(),n.input?gt(t,"confirm"):wt(t,!0)})(t)},n.denyButton.onclick=()=>{(t=>{const n=e.innerParams.get(t);t.disableButtons(),n.returnInputValueOnDeny?gt(t,"deny"):ft(t,!1)})(t)},n.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(Pe.cancel)})(t,r)},n.closeButton.onclick=()=>{r(Pe.close)},((t,n,o)=>{e.innerParams.get(t).toast?((t,n,o)=>{n.popup.onclick=()=>{const n=e.innerParams.get(t);n&&(vt(n)||n.timer||n.input)||o(Pe.close)}})(t,n,o):((e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(Ct=!0)}}})(n),(e=>{e.container.onmousedown=()=>{e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,(t.target===e.popup||e.popup.contains(t.target))&&(Ct=!0)}}})(n),((t,n,o)=>{n.container.onclick=i=>{const s=e.innerParams.get(t);Ct?Ct=!1:i.target===n.container&&c(s.allowOutsideClick)&&o(Pe.backdrop)}})(t,n,o))})(t,n,r),((e,t,n,o)=>{xe(t),n.toast||(t.keydownHandler=t=>Le(e,t,o),t.keydownTarget=n.keydownListenerCapture?window:f(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)})(t,Q,o,r),((e,t)=>{"select"===t.input||"radio"===t.input?((e,t)=>{const n=f(),o=e=>{dt[t.input](n,pt(e),t)};u(t.inputOptions)||p(t.inputOptions)?(ct(k()),d(t.inputOptions).then((t=>{e.hideLoading(),o(t)}))):"object"==typeof t.inputOptions?o(t.inputOptions):a("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)})(e,t):["text","email","number","tel","textarea"].includes(t.input)&&(u(t.inputValue)||p(t.inputValue))&&(ct(k()),((e,t)=>{const n=e.getInput();z(n),d(t.inputValue).then((o=>{n.value="number"===t.input?`${parseFloat(o)||0}`:`${o}`,W(n),n.focus(),e.hideLoading()})).catch((t=>{a(`Error in inputValue promise: ${t}`),n.value="",W(n),n.focus(),e.hideLoading()}))})(e,t))})(t,o),Ot(o),_t(Q,o,r),Wt(n,o),setTimeout((()=>{n.container.scrollTop=0}))})),Rt=(e,t)=>{const n=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const n=t.content;return(e=>{const t=Lt.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((e=>{const n=e.tagName.toLowerCase();t.includes(n)||r(`Unrecognized element <${n}>`)}))})(n),Object.assign((e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach((e=>{St(e,["name","value"]);const n=e.getAttribute("name"),o=e.getAttribute("value");t[n]="boolean"==typeof Je[n]?"false"!==o:"object"==typeof Je[n]?JSON.parse(o):o})),t})(n),(e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((e=>{const n=e.getAttribute("name"),o=e.getAttribute("value");t[n]=new Function(`return ${o}`)()})),t})(n),(e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach((e=>{St(e,["type","color","aria-label"]);const n=e.getAttribute("type");t[`${n}ButtonText`]=e.innerHTML,t[`show${s(n)}Button`]=!0,e.hasAttribute("color")&&(t[`${n}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${n}ButtonAriaLabel`]=e.getAttribute("aria-label"))})),t})(n),(e=>{const t={},n=e.querySelector("swal-image");return n&&(St(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t})(n),(e=>{const t={},n=e.querySelector("swal-icon");return n&&(St(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t})(n),(e=>{const t={},n=e.querySelector("swal-input");n&&(St(n,["type","label","placeholder","value"]),t.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(t.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(t.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(t.inputValue=n.getAttribute("value")));const o=Array.from(e.querySelectorAll("swal-input-option"));return o.length&&(t.inputOptions={},o.forEach((e=>{St(e,["value"]);const n=e.getAttribute("value"),o=e.innerHTML;t.inputOptions[n]=o}))),t})(n),((e,t)=>{const n={};for(const o in t){const i=t[o],s=e.querySelector(i);s&&(St(s,[]),n[i.replace(/^swal-/,"")]=s.innerHTML.trim())}return n})(n,Lt))})(e),o=Object.assign({},Je,t,n,e);return o.showClass=Object.assign({},Je.showClass,o.showClass),o.hideClass=Object.assign({},Je.hideClass,o.hideClass),o},Ut=t=>{const n={popup:f(),container:m(),actions:E(),confirmButton:k(),denyButton:B(),cancelButton:x(),loader:P(),closeButton:L(),validationMessage:A(),progressSteps:C()};return e.domCache.set(t,n),n},_t=(e,t,n)=>{const o=T();z(o),t.timer&&(e.timeout=new Tt((()=>{n("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(W(o),q(o,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&G(t.timer)}))))},Wt=(e,t)=>{t.toast||(c(t.allowEnterKey)?zt(e,t)||Ee(-1,1):Kt())},zt=(e,t)=>t.focusDeny&&Z(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&Z(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!Z(e.confirmButton)||(e.confirmButton.focus(),0)),Kt=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};Object.assign(Nt.prototype,lt),Object.assign(Nt,$t),Object.keys(lt).forEach((e=>{Nt[e]=function(){if(Vt)return Vt[e](...arguments)}})),Nt.DismissReason=Pe,Nt.version="11.6.16";const Yt=Nt;return Yt.default=Yt,Yt})),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2);