sweetalert2 11.7.7 → 11.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sweetalert2.all.js +98 -15
- package/dist/sweetalert2.all.min.js +2 -2
- package/dist/sweetalert2.js +98 -15
- package/dist/sweetalert2.min.js +2 -2
- package/package.json +1 -1
- package/src/SweetAlert.js +1 -1
- package/src/utils/classes.js +92 -12
- package/src/utils/dom/renderers/renderImage.js +4 -1
- package/dist/main.js +0 -1
package/dist/sweetalert2.all.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* sweetalert2 v11.7.
|
|
2
|
+
* sweetalert2 v11.7.8
|
|
3
3
|
* Released under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -62,18 +62,98 @@
|
|
|
62
62
|
const swalPrefix = 'swal2-';
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
|
-
* @
|
|
66
|
-
*
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
65
|
+
* @typedef
|
|
66
|
+
* { | 'container'
|
|
67
|
+
* | 'shown'
|
|
68
|
+
* | 'height-auto'
|
|
69
|
+
* | 'iosfix'
|
|
70
|
+
* | 'popup'
|
|
71
|
+
* | 'modal'
|
|
72
|
+
* | 'no-backdrop'
|
|
73
|
+
* | 'no-transition'
|
|
74
|
+
* | 'toast'
|
|
75
|
+
* | 'toast-shown'
|
|
76
|
+
* | 'show'
|
|
77
|
+
* | 'hide'
|
|
78
|
+
* | 'close'
|
|
79
|
+
* | 'title'
|
|
80
|
+
* | 'html-container'
|
|
81
|
+
* | 'actions'
|
|
82
|
+
* | 'confirm'
|
|
83
|
+
* | 'deny'
|
|
84
|
+
* | 'cancel'
|
|
85
|
+
* | 'default-outline'
|
|
86
|
+
* | 'footer'
|
|
87
|
+
* | 'icon'
|
|
88
|
+
* | 'icon-content'
|
|
89
|
+
* | 'image'
|
|
90
|
+
* | 'input'
|
|
91
|
+
* | 'file'
|
|
92
|
+
* | 'range'
|
|
93
|
+
* | 'select'
|
|
94
|
+
* | 'radio'
|
|
95
|
+
* | 'checkbox'
|
|
96
|
+
* | 'label'
|
|
97
|
+
* | 'textarea'
|
|
98
|
+
* | 'inputerror'
|
|
99
|
+
* | 'input-label'
|
|
100
|
+
* | 'validation-message'
|
|
101
|
+
* | 'progress-steps'
|
|
102
|
+
* | 'active-progress-step'
|
|
103
|
+
* | 'progress-step'
|
|
104
|
+
* | 'progress-step-line'
|
|
105
|
+
* | 'loader'
|
|
106
|
+
* | 'loading'
|
|
107
|
+
* | 'styled'
|
|
108
|
+
* | 'top'
|
|
109
|
+
* | 'top-start'
|
|
110
|
+
* | 'top-end'
|
|
111
|
+
* | 'top-left'
|
|
112
|
+
* | 'top-right'
|
|
113
|
+
* | 'center'
|
|
114
|
+
* | 'center-start'
|
|
115
|
+
* | 'center-end'
|
|
116
|
+
* | 'center-left'
|
|
117
|
+
* | 'center-right'
|
|
118
|
+
* | 'bottom'
|
|
119
|
+
* | 'bottom-start'
|
|
120
|
+
* | 'bottom-end'
|
|
121
|
+
* | 'bottom-left'
|
|
122
|
+
* | 'bottom-right'
|
|
123
|
+
* | 'grow-row'
|
|
124
|
+
* | 'grow-column'
|
|
125
|
+
* | 'grow-fullscreen'
|
|
126
|
+
* | 'rtl'
|
|
127
|
+
* | 'timer-progress-bar'
|
|
128
|
+
* | 'timer-progress-bar-container'
|
|
129
|
+
* | 'scrollbar-measure'
|
|
130
|
+
* | 'icon-success'
|
|
131
|
+
* | 'icon-warning'
|
|
132
|
+
* | 'icon-info'
|
|
133
|
+
* | 'icon-question'
|
|
134
|
+
* | 'icon-error'
|
|
135
|
+
* } SwalClass
|
|
136
|
+
* @typedef {Record<SwalClass, string>} SwalClasses
|
|
137
|
+
*/
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @typedef {'success' | 'warning' | 'info' | 'question' | 'error'} SwalIcon
|
|
141
|
+
* @typedef {Record<SwalIcon, string>} SwalIcons
|
|
142
|
+
*/
|
|
143
|
+
|
|
144
|
+
/** @type {SwalClass[]} */
|
|
145
|
+
const classNames = ['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'];
|
|
146
|
+
const swalClasses = classNames.reduce((acc, className) => {
|
|
147
|
+
acc[className] = swalPrefix + className;
|
|
148
|
+
return acc;
|
|
149
|
+
}, /** @type {SwalClasses} */{});
|
|
150
|
+
|
|
151
|
+
/** @type {SwalIcon[]} */
|
|
152
|
+
const icons = ['success', 'warning', 'info', 'question', 'error'];
|
|
153
|
+
const iconTypes = icons.reduce((acc, icon) => {
|
|
154
|
+
acc[icon] = swalPrefix + icon;
|
|
155
|
+
return acc;
|
|
156
|
+
}, /** @type {SwalIcons} */{});
|
|
77
157
|
|
|
78
158
|
const consolePrefix = 'SweetAlert2:';
|
|
79
159
|
|
|
@@ -1467,6 +1547,9 @@
|
|
|
1467
1547
|
*/
|
|
1468
1548
|
const renderImage = (instance, params) => {
|
|
1469
1549
|
const image = getImage();
|
|
1550
|
+
if (!image) {
|
|
1551
|
+
return;
|
|
1552
|
+
}
|
|
1470
1553
|
if (!params.imageUrl) {
|
|
1471
1554
|
hide(image);
|
|
1472
1555
|
return;
|
|
@@ -1475,7 +1558,7 @@
|
|
|
1475
1558
|
|
|
1476
1559
|
// Src, alt
|
|
1477
1560
|
image.setAttribute('src', params.imageUrl);
|
|
1478
|
-
image.setAttribute('alt', params.imageAlt);
|
|
1561
|
+
image.setAttribute('alt', params.imageAlt || '');
|
|
1479
1562
|
|
|
1480
1563
|
// Width, height
|
|
1481
1564
|
applyNumericalStyle(image, 'width', params.imageWidth);
|
|
@@ -4059,7 +4142,7 @@
|
|
|
4059
4142
|
};
|
|
4060
4143
|
});
|
|
4061
4144
|
SweetAlert.DismissReason = DismissReason;
|
|
4062
|
-
SweetAlert.version = '11.7.
|
|
4145
|
+
SweetAlert.version = '11.7.8';
|
|
4063
4146
|
|
|
4064
4147
|
const Swal = SweetAlert;
|
|
4065
4148
|
// @ts-ignore
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* sweetalert2 v11.7.
|
|
2
|
+
* sweetalert2 v11.7.8
|
|
3
3
|
* Released under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
!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";const e={},t=t=>new Promise((o=>{if(!t)return o();const n=window.scrollX,i=window.scrollY;e.restoreFocusTimeout=setTimeout((()=>{e.previousActiveElement instanceof HTMLElement?(e.previousActiveElement.focus(),e.previousActiveElement=null):document.body&&document.body.focus(),o()}),100),window.scrollTo(n,i)}));var o={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const n=e=>{const t={};for(const o in e)t[e[o]]="swal2-"+e[o];return t},i=n(["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"]),s=n(["success","warning","info","question","error"]),r="SweetAlert2:",a=e=>e.charAt(0).toUpperCase()+e.slice(1),l=e=>{console.warn(`${r} ${"object"==typeof e?e.join(" "):e}`)},c=e=>{console.error(`${r} ${e}`)},u=[],d=(e,t)=>{var o;o=`"${e}" is deprecated and will be removed in the next major release. Please use "${t}" instead.`,u.includes(o)||(u.push(o),l(o))},p=e=>"function"==typeof e?e():e,m=e=>e&&"function"==typeof e.toPromise,g=e=>m(e)?e.toPromise():Promise.resolve(e),h=e=>e&&Promise.resolve(e)===e,f=()=>document.body.querySelector(`.${i.container}`),b=e=>{const t=f();return t?t.querySelector(e):null},y=e=>b(`.${e}`),w=()=>y(i.popup),v=()=>y(i.icon),C=()=>y(i.title),A=()=>y(i["html-container"]),k=()=>y(i.image),B=()=>y(i["progress-steps"]),P=()=>y(i["validation-message"]),x=()=>b(`.${i.actions} .${i.confirm}`),E=()=>b(`.${i.actions} .${i.cancel}`),$=()=>b(`.${i.actions} .${i.deny}`),T=()=>b(`.${i.loader}`),L=()=>y(i.actions),S=()=>y(i.footer),O=()=>y(i["timer-progress-bar"]),M=()=>y(i.close),j=()=>{const e=Array.from(w().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(((e,t)=>{const o=parseInt(e.getAttribute("tabindex")),n=parseInt(t.getAttribute("tabindex"));return o>n?1:o<n?-1:0})),t=Array.from(w().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((e=>"-1"!==e.getAttribute("tabindex")));return(e=>{const t=[];for(let o=0;o<e.length;o++)-1===t.indexOf(e[o])&&t.push(e[o]);return t})(e.concat(t)).filter((e=>G(e)))},I=()=>V(document.body,i.shown)&&!V(document.body,i["toast-shown"])&&!V(document.body,i["no-backdrop"]),H=()=>w()&&V(w(),i.toast),D={previousBodyPadding:null},q=(e,t)=>{if(e.textContent="",t){const o=(new DOMParser).parseFromString(t,"text/html");Array.from(o.querySelector("head").childNodes).forEach((t=>{e.appendChild(t)})),Array.from(o.querySelector("body").childNodes).forEach((t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},V=(e,t)=>{if(!t)return!1;const o=t.split(/\s+/);for(let t=0;t<o.length;t++)if(!e.classList.contains(o[t]))return!1;return!0},N=(e,t,o)=>{if(((e,t)=>{Array.from(e.classList).forEach((o=>{Object.values(i).includes(o)||Object.values(s).includes(o)||Object.values(t.showClass).includes(o)||e.classList.remove(o)}))})(e,t),t.customClass&&t.customClass[o]){if("string"!=typeof t.customClass[o]&&!t.customClass[o].forEach)return void l(`Invalid type of customClass.${o}! Expected string or iterable object, got "${typeof t.customClass[o]}"`);U(e,t.customClass[o])}},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${i.popup} > .${i[t]}`);case"checkbox":return e.querySelector(`.${i.popup} > .${i.checkbox} input`);case"radio":return e.querySelector(`.${i.popup} > .${i.radio} input:checked`)||e.querySelector(`.${i.popup} > .${i.radio} input:first-child`);case"range":return e.querySelector(`.${i.popup} > .${i.range} input`);default:return e.querySelector(`.${i.popup} > .${i.input}`)}},_=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},R=(e,t,o)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach((t=>{Array.isArray(e)?e.forEach((e=>{o?e.classList.add(t):e.classList.remove(t)})):o?e.classList.add(t):e.classList.remove(t)})))},U=(e,t)=>{R(e,t,!0)},z=(e,t)=>{R(e,t,!1)},W=(e,t)=>{const o=Array.from(e.children);for(let e=0;e<o.length;e++){const n=o[e];if(n instanceof HTMLElement&&V(n,t))return n}},K=(e,t,o)=>{o===`${parseInt(o)}`&&(o=parseInt(o)),o||0===parseInt(o)?e.style[t]="number"==typeof o?`${o}px`:o:e.style.removeProperty(t)},Y=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e.style.display=t},Z=e=>{e.style.display="none"},J=(e,t,o,n)=>{const i=e.querySelector(t);i&&(i.style[o]=n)},X=function(e,t){t?Y(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex"):Z(e)},G=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Q=e=>!!(e.scrollHeight>e.clientHeight),ee=e=>{const t=window.getComputedStyle(e),o=parseFloat(t.getPropertyValue("animation-duration")||"0"),n=parseFloat(t.getPropertyValue("transition-duration")||"0");return o>0||n>0},te=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=O();G(o)&&(t&&(o.style.transition="none",o.style.width="100%"),setTimeout((()=>{o.style.transition=`width ${e/1e3}s linear`,o.style.width="0%"}),10))},oe=()=>"undefined"==typeof window||"undefined"==typeof document,ne=`\n <div aria-labelledby="${i.title}" aria-describedby="${i["html-container"]}" class="${i.popup}" tabindex="-1">\n <button type="button" class="${i.close}"></button>\n <ul class="${i["progress-steps"]}"></ul>\n <div class="${i.icon}"></div>\n <img class="${i.image}" />\n <h2 class="${i.title}" id="${i.title}"></h2>\n <div class="${i["html-container"]}" id="${i["html-container"]}"></div>\n <input class="${i.input}" />\n <input type="file" class="${i.file}" />\n <div class="${i.range}">\n <input type="range" />\n <output></output>\n </div>\n <select class="${i.select}"></select>\n <div class="${i.radio}"></div>\n <label for="${i.checkbox}" class="${i.checkbox}">\n <input type="checkbox" />\n <span class="${i.label}"></span>\n </label>\n <textarea class="${i.textarea}"></textarea>\n <div class="${i["validation-message"]}" id="${i["validation-message"]}"></div>\n <div class="${i.actions}">\n <div class="${i.loader}"></div>\n <button type="button" class="${i.confirm}"></button>\n <button type="button" class="${i.deny}"></button>\n <button type="button" class="${i.cancel}"></button>\n </div>\n <div class="${i.footer}"></div>\n <div class="${i["timer-progress-bar-container"]}">\n <div class="${i["timer-progress-bar"]}"></div>\n </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),ie=()=>{e.currentInstance.resetValidationMessage()},se=e=>{const t=(()=>{const e=f();return!!e&&(e.remove(),z([document.documentElement,document.body],[i["no-backdrop"],i["toast-shown"],i["has-column"]]),!0)})();if(oe())return void c("SweetAlert2 requires document to initialize");const o=document.createElement("div");o.className=i.container,t&&U(o,i["no-transition"]),q(o,ne);const n="string"==typeof(s=e.target)?document.querySelector(s):s;var s;n.appendChild(o),(e=>{const t=w();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&&U(f(),i.rtl)})(n),(()=>{const e=w(),t=W(e,i.input),o=W(e,i.file),n=e.querySelector(`.${i.range} input`),s=e.querySelector(`.${i.range} output`),r=W(e,i.select),a=e.querySelector(`.${i.checkbox} input`),l=W(e,i.textarea);t.oninput=ie,o.onchange=ie,r.onchange=ie,a.onchange=ie,l.oninput=ie,n.oninput=()=>{ie(),s.value=n.value},n.onchange=()=>{ie(),s.value=n.value}})()},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ae(e,t):e&&q(t,e)},ae=(e,t)=>{e.jquery?le(t,e):q(t,e.toString())},le=(e,t)=>{if(e.textContent="",0 in t)for(let o=0;o in t;o++)e.appendChild(t[o].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},ce=(()=>{if(oe())return!1;const e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&void 0!==e.style[o])return t[o];return!1})(),ue=(e,t)=>{const o=L(),n=T();t.showConfirmButton||t.showDenyButton||t.showCancelButton?Y(o):Z(o),N(o,t,"actions"),function(e,t,o){const n=x(),s=$(),r=E();de(n,"confirm",o),de(s,"deny",o),de(r,"cancel",o),function(e,t,o,n){if(!n.buttonsStyling)return void z([e,t,o],i.styled);U([e,t,o],i.styled),n.confirmButtonColor&&(e.style.backgroundColor=n.confirmButtonColor,U(e,i["default-outline"]));n.denyButtonColor&&(t.style.backgroundColor=n.denyButtonColor,U(t,i["default-outline"]));n.cancelButtonColor&&(o.style.backgroundColor=n.cancelButtonColor,U(o,i["default-outline"]))}(n,s,r,o),o.reverseButtons&&(o.toast?(e.insertBefore(r,n),e.insertBefore(s,n)):(e.insertBefore(r,t),e.insertBefore(s,t),e.insertBefore(n,t)))}(o,n,t),q(n,t.loaderHtml),N(n,t,"loader")};function de(e,t,o){X(e,o[`show${a(t)}Button`],"inline-block"),q(e,o[`${t}ButtonText`]),e.setAttribute("aria-label",o[`${t}ButtonAriaLabel`]),e.className=i[t],N(e,o,`${t}Button`),U(e,o[`${t}ButtonClass`])}const pe=(e,t)=>{const o=f();o&&(!function(e,t){"string"==typeof t?e.style.background=t:t||U([document.documentElement,document.body],i["no-backdrop"])}(o,t.backdrop),function(e,t){t in i?U(e,i[t]):(l('The "position" parameter is not valid, defaulting to "center"'),U(e,i.center))}(o,t.position),function(e,t){if(t&&"string"==typeof t){const o=`grow-${t}`;o in i&&U(e,i[o])}}(o,t.grow),N(o,t,"container"))};const me=["input","file","range","select","radio","checkbox","textarea"],ge=e=>{if(!Ce[e.input])return void c(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${e.input}"`);const t=we(e.input),o=Ce[e.input](t,e);Y(t),e.inputAutoFocus&&setTimeout((()=>{_(o)}))},he=(e,t)=>{const o=F(w(),e);if(o){(e=>{for(let t=0;t<e.attributes.length;t++){const o=e.attributes[t].name;["type","value","style"].includes(o)||e.removeAttribute(o)}})(o);for(const e in t)o.setAttribute(e,t[e])}},fe=e=>{const t=we(e.input);"object"==typeof e.customClass&&U(t,e.customClass.input)},be=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},ye=(e,t,o)=>{if(o.inputLabel){e.id=i.input;const n=document.createElement("label"),s=i["input-label"];n.setAttribute("for",e.id),n.className=s,"object"==typeof o.customClass&&U(n,o.customClass.inputLabel),n.innerText=o.inputLabel,t.insertAdjacentElement("beforebegin",n)}},we=e=>W(w(),i[e]||i.input),ve=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:h(t)||l(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},Ce={};Ce.text=Ce.email=Ce.password=Ce.number=Ce.tel=Ce.url=(e,t)=>(ve(e,t.inputValue),ye(e,e,t),be(e,t),e.type=t.input,e),Ce.file=(e,t)=>(ye(e,e,t),be(e,t),e),Ce.range=(e,t)=>{const o=e.querySelector("input"),n=e.querySelector("output");return ve(o,t.inputValue),o.type=t.input,ve(n,t.inputValue),ye(o,e,t),e},Ce.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const o=document.createElement("option");q(o,t.inputPlaceholder),o.value="",o.disabled=!0,o.selected=!0,e.appendChild(o)}return ye(e,e,t),e},Ce.radio=e=>(e.textContent="",e),Ce.checkbox=(e,t)=>{const o=F(w(),"checkbox");o.value="1",o.id=i.checkbox,o.checked=Boolean(t.inputValue);const n=e.querySelector("span");return q(n,t.inputPlaceholder),o},Ce.textarea=(e,t)=>{ve(e,t.inputValue),be(e,t),ye(e,e,t);return setTimeout((()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(w()).width);new MutationObserver((()=>{const o=e.offsetWidth+(n=e,parseInt(window.getComputedStyle(n).marginLeft)+parseInt(window.getComputedStyle(n).marginRight));var n;w().style.width=o>t?`${o}px`:null})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e};const Ae=(e,t)=>{const n=A();N(n,t,"htmlContainer"),t.html?(re(t.html,n),Y(n,"block")):t.text?(n.textContent=t.text,Y(n,"block")):Z(n),((e,t)=>{const n=w(),s=o.innerParams.get(e),r=!s||t.input!==s.input;me.forEach((e=>{const o=W(n,i[e]);he(e,t.inputAttributes),o.className=i[e],r&&Z(o)})),t.input&&(r&&ge(t),fe(t))})(e,t)},ke=(e,t)=>{for(const o in s)t.icon!==o&&z(e,s[o]);U(e,s[t.icon]),xe(e,t),Be(),N(e,t,"icon")},Be=()=>{const e=w(),t=window.getComputedStyle(e).getPropertyValue("background-color"),o=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<o.length;e++)o[e].style.backgroundColor=t},Pe=(e,t)=>{let o,n=e.innerHTML;if(t.iconHtml)o=Ee(t.iconHtml);else if("success"===t.icon)o='\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',n=n.replace(/ style=".*?"/g,"");else if("error"===t.icon)o='\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';else{o=Ee({question:"?",warning:"!",info:"i"}[t.icon])}n.trim()!==o.trim()&&q(e,o)},xe=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const o of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])J(e,o,"backgroundColor",t.iconColor);J(e,".swal2-success-ring","borderColor",t.iconColor)}},Ee=e=>`<div class="${i["icon-content"]}">${e}</div>`,$e=(e,t)=>{e.className=`${i.popup} ${G(e)?t.showClass.popup:""}`,t.toast?(U([document.documentElement,document.body],i["toast-shown"]),U(e,i.toast)):U(e,i.modal),N(e,t,"popup"),"string"==typeof t.customClass&&U(e,t.customClass),t.icon&&U(e,i[`icon-${t.icon}`])},Te=e=>{const t=document.createElement("li");return U(t,i["progress-step"]),q(t,e),t},Le=e=>{const t=document.createElement("li");return U(t,i["progress-step-line"]),e.progressStepsDistance&&K(t,"width",e.progressStepsDistance),t},Se=(e,t)=>{((e,t)=>{const o=f(),n=w();t.toast?(K(o,"width",t.width),n.style.width="100%",n.insertBefore(T(),v())):K(n,"width",t.width),K(n,"padding",t.padding),t.color&&(n.style.color=t.color),t.background&&(n.style.background=t.background),Z(P()),$e(n,t)})(0,t),pe(0,t),((e,t)=>{const o=B();t.progressSteps&&0!==t.progressSteps.length?(Y(o),o.textContent="",t.currentProgressStep>=t.progressSteps.length&&l("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach(((e,n)=>{const s=Te(e);if(o.appendChild(s),n===t.currentProgressStep&&U(s,i["active-progress-step"]),n!==t.progressSteps.length-1){const e=Le(t);o.appendChild(e)}}))):Z(o)})(0,t),((e,t)=>{const n=o.innerParams.get(e),i=v();if(n&&t.icon===n.icon)return Pe(i,t),void ke(i,t);if(t.icon||t.iconHtml){if(t.icon&&-1===Object.keys(s).indexOf(t.icon))return c(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),void Z(i);Y(i),Pe(i,t),ke(i,t),U(i,t.showClass.icon)}else Z(i)})(e,t),((e,t)=>{const o=k();t.imageUrl?(Y(o,""),o.setAttribute("src",t.imageUrl),o.setAttribute("alt",t.imageAlt),K(o,"width",t.imageWidth),K(o,"height",t.imageHeight),o.className=i.image,N(o,t,"image")):Z(o)})(0,t),((e,t)=>{const o=C();X(o,t.title||t.titleText,"block"),t.title&&re(t.title,o),t.titleText&&(o.innerText=t.titleText),N(o,t,"title")})(0,t),((e,t)=>{const o=M();q(o,t.closeButtonHtml),N(o,t,"closeButton"),X(o,t.showCloseButton),o.setAttribute("aria-label",t.closeButtonAriaLabel)})(0,t),Ae(e,t),ue(0,t),((e,t)=>{const o=S();X(o,t.footer),t.footer&&re(t.footer,o),N(o,t,"footer")})(0,t),"function"==typeof t.didRender&&t.didRender(w())},Oe=()=>x()&&x().click(),Me=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),je=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},Ie=(e,t)=>{const o=j();if(o.length)return(e+=t)===o.length?e=0:-1===e&&(e=o.length-1),void o[e].focus();w().focus()},He=["ArrowRight","ArrowDown"],De=["ArrowLeft","ArrowUp"],qe=(e,t,n)=>{const i=o.innerParams.get(e);i&&(t.isComposing||229===t.keyCode||(i.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Ve(e,t,i):"Tab"===t.key?Ne(t):[...He,...De].includes(t.key)?Fe(t.key):"Escape"===t.key&&_e(t,i,n)))},Ve=(e,t,o)=>{if(p(o.allowEnterKey)&&t.target&&e.getInput()&&t.target instanceof HTMLElement&&t.target.outerHTML===e.getInput().outerHTML){if(["textarea","file"].includes(o.input))return;Oe(),t.preventDefault()}},Ne=e=>{const t=e.target,o=j();let n=-1;for(let e=0;e<o.length;e++)if(t===o[e]){n=e;break}e.shiftKey?Ie(n,-1):Ie(n,1),e.stopPropagation(),e.preventDefault()},Fe=e=>{const t=[x(),$(),E()];if(document.activeElement instanceof HTMLElement&&!t.includes(document.activeElement))return;const o=He.includes(e)?"nextElementSibling":"previousElementSibling";let n=document.activeElement;for(let e=0;e<L().children.length;e++){if(n=n[o],!n)return;if(n instanceof HTMLButtonElement&&G(n))break}n instanceof HTMLButtonElement&&n.focus()},_e=(e,t,o)=>{p(t.allowEscapeKey)&&(e.preventDefault(),o(Me.esc))};var Re={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const Ue=()=>{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")}))},ze=()=>{const e=navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),o=!!e.match(/WebKit/i);if(t&&o&&!e.match(/CriOS/i)){const e=44;w().scrollHeight>window.innerHeight-e&&(f().style.paddingBottom=`${e}px`)}},We=()=>{const e=f();let t;e.ontouchstart=e=>{t=Ke(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},Ke=e=>{const t=e.target,o=f();return!Ye(e)&&!Ze(e)&&(t===o||!Q(o)&&t instanceof HTMLElement&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&(!Q(A())||!A().contains(t)))},Ye=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,Ze=e=>e.touches&&e.touches.length>1,Je=()=>{null===D.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(D.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${D.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=i["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function Xe(o,n,s,r){H()?st(o,r):(t(s).then((()=>st(o,r))),je(e));/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(n.setAttribute("style","display:none !important"),n.removeAttribute("class"),n.innerHTML=""):n.remove(),I()&&(null!==D.previousBodyPadding&&(document.body.style.paddingRight=`${D.previousBodyPadding}px`,D.previousBodyPadding=null),(()=>{if(V(document.body,i.iosfix)){const e=parseInt(document.body.style.top,10);z(document.body,i.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),Ue()),z([document.documentElement,document.body],[i.shown,i["height-auto"],i["no-backdrop"],i["toast-shown"]])}function Ge(e){e=ot(e);const t=Re.swalPromiseResolve.get(this),o=Qe(this);this.isAwaitingPromise?e.isDismissed||(tt(this),t(e)):o&&t(e)}const Qe=e=>{const t=w();if(!t)return!1;const n=o.innerParams.get(e);if(!n||V(t,n.hideClass.popup))return!1;z(t,n.showClass.popup),U(t,n.hideClass.popup);const i=f();return z(i,n.showClass.backdrop),U(i,n.hideClass.backdrop),nt(e,t,n),!0};function et(e){const t=Re.swalPromiseReject.get(this);tt(this),t&&t(e)}const tt=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,o.innerParams.get(e)||e._destroy())},ot=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),nt=(e,t,o)=>{const n=f(),i=ce&&ee(t);"function"==typeof o.willClose&&o.willClose(t),i?it(e,t,n,o.returnFocus,o.didClose):Xe(e,n,o.returnFocus,o.didClose)},it=(t,o,n,i,s)=>{e.swalCloseEventFinishedCallback=Xe.bind(null,t,n,i,s),o.addEventListener(ce,(function(t){t.target===o&&(e.swalCloseEventFinishedCallback(),delete e.swalCloseEventFinishedCallback)}))},st=(e,t)=>{setTimeout((()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy&&e._destroy()}))},rt=e=>{let t=w();t||new Do,t=w();const o=T();H()?Z(v()):at(t,e),Y(o),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},at=(e,t)=>{const o=L(),n=T();!t&&G(x())&&(t=x()),Y(o),t&&(Z(t),n.setAttribute("data-button-to-replace",t.className)),n.parentNode.insertBefore(n,t),U([e,o],i.loading)},lt=e=>e.checked?1:0,ct=e=>e.checked?e.value:null,ut=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,dt=(e,t)=>{const o=w(),n=e=>{mt[t.input](o,gt(e),t)};m(t.inputOptions)||h(t.inputOptions)?(rt(x()),g(t.inputOptions).then((t=>{e.hideLoading(),n(t)}))):"object"==typeof t.inputOptions?n(t.inputOptions):c("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},pt=(e,t)=>{const o=e.getInput();Z(o),g(t.inputValue).then((n=>{o.value="number"===t.input?`${parseFloat(n)||0}`:`${n}`,Y(o),o.focus(),e.hideLoading()})).catch((t=>{c(`Error in inputValue promise: ${t}`),o.value="",Y(o),o.focus(),e.hideLoading()}))},mt={select:(e,t,o)=>{const n=W(e,i.select),s=(e,t,n)=>{const i=document.createElement("option");i.value=n,q(i,t),i.selected=ht(n,o.inputValue),e.appendChild(i)};t.forEach((e=>{const t=e[0],o=e[1];if(Array.isArray(o)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,n.appendChild(e),o.forEach((t=>s(e,t[1],t[0])))}else s(n,o,t)})),n.focus()},radio:(e,t,o)=>{const n=W(e,i.radio);t.forEach((e=>{const t=e[0],s=e[1],r=document.createElement("input"),a=document.createElement("label");r.type="radio",r.name=i.radio,r.value=t,ht(t,o.inputValue)&&(r.checked=!0);const l=document.createElement("span");q(l,s),l.className=i.label,a.appendChild(r),a.appendChild(l),n.appendChild(a)}));const s=n.querySelectorAll("input");s.length&&s[0].focus()}},gt=e=>{const t=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach(((e,o)=>{let n=e;"object"==typeof n&&(n=gt(n)),t.push([o,n])})):Object.keys(e).forEach((o=>{let n=e[o];"object"==typeof n&&(n=gt(n)),t.push([o,n])})),t},ht=(e,t)=>t&&t.toString()===e.toString(),ft=(e,t)=>{const n=o.innerParams.get(e);if(!n.input)return void c(`The "input" parameter is needed to be set when using returnInputValueOn${a(t)}`);const i=((e,t)=>{const o=e.getInput();if(!o)return null;switch(t.input){case"checkbox":return lt(o);case"radio":return ct(o);case"file":return ut(o);default:return t.inputAutoTrim?o.value.trim():o.value}})(e,n);n.inputValidator?bt(e,i,t):e.getInput().checkValidity()?"deny"===t?yt(e,i):Ct(e,i):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},bt=(e,t,n)=>{const i=o.innerParams.get(e);e.disableInput();Promise.resolve().then((()=>g(i.inputValidator(t,i.validationMessage)))).then((o=>{e.enableButtons(),e.enableInput(),o?e.showValidationMessage(o):"deny"===n?yt(e,t):Ct(e,t)}))},yt=(e,t)=>{const n=o.innerParams.get(e||void 0);if(n.showLoaderOnDeny&&rt($()),n.preDeny){e.isAwaitingPromise=!0;Promise.resolve().then((()=>g(n.preDeny(t,n.validationMessage)))).then((o=>{!1===o?(e.hideLoading(),tt(e)):e.close({isDenied:!0,value:void 0===o?t:o})})).catch((t=>vt(e||void 0,t)))}else e.close({isDenied:!0,value:t})},wt=(e,t)=>{e.close({isConfirmed:!0,value:t})},vt=(e,t)=>{e.rejectPromise(t)},Ct=(e,t)=>{const n=o.innerParams.get(e||void 0);if(n.showLoaderOnConfirm&&rt(),n.preConfirm){e.resetValidationMessage(),e.isAwaitingPromise=!0;Promise.resolve().then((()=>g(n.preConfirm(t,n.validationMessage)))).then((o=>{G(P())||!1===o?(e.hideLoading(),tt(e)):wt(e,void 0===o?t:o)})).catch((t=>vt(e||void 0,t)))}else wt(e,t)};function At(){const e=o.innerParams.get(this);if(!e)return;const t=o.domCache.get(this);Z(t.loader),H()?e.icon&&Y(v()):kt(t),z([t.popup,t.actions],i.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const kt=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?Y(t[0],"inline-block"):G(x())||G($())||G(E())||Z(e.actions)};function Bt(){const e=o.innerParams.get(this),t=o.domCache.get(this);return t?F(t.popup,e.input):null}function Pt(e,t,n){const i=o.domCache.get(e);t.forEach((e=>{i[e].disabled=n}))}function xt(e,t){if(e)if("radio"===e.type){const o=e.parentNode.parentNode.querySelectorAll("input");for(let e=0;e<o.length;e++)o[e].disabled=t}else e.disabled=t}function Et(){Pt(this,["confirmButton","denyButton","cancelButton"],!1)}function $t(){Pt(this,["confirmButton","denyButton","cancelButton"],!0)}function Tt(){xt(this.getInput(),!1)}function Lt(){xt(this.getInput(),!0)}function St(e){const t=o.domCache.get(this),n=o.innerParams.get(this);q(t.validationMessage,e),t.validationMessage.className=i["validation-message"],n.customClass&&n.customClass.validationMessage&&U(t.validationMessage,n.customClass.validationMessage),Y(t.validationMessage);const s=this.getInput();s&&(s.setAttribute("aria-invalid",!0),s.setAttribute("aria-describedby",i["validation-message"]),_(s),U(s,i.inputerror))}function Ot(){const e=o.domCache.get(this);e.validationMessage&&Z(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),z(t,i.inputerror))}const Mt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,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:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!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:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},jt=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],It={},Ht=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Dt=e=>Object.prototype.hasOwnProperty.call(Mt,e),qt=e=>-1!==jt.indexOf(e),Vt=e=>It[e],Nt=e=>{Dt(e)||l(`Unknown parameter "${e}"`)},Ft=e=>{Ht.includes(e)&&l(`The parameter "${e}" is incompatible with toasts`)},_t=e=>{Vt(e)&&d(e,Vt(e))};function Rt(e){const t=w(),n=o.innerParams.get(this);if(!t||V(t,n.hideClass.popup))return void l("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=Ut(e),s=Object.assign({},n,i);Se(this,s),o.innerParams.set(this,s),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}const Ut=e=>{const t={};return Object.keys(e).forEach((o=>{qt(o)?t[o]=e[o]:l(`Invalid parameter to update: ${o}`)})),t};function zt(){const t=o.domCache.get(this),n=o.innerParams.get(this);n?(t.popup&&e.swalCloseEventFinishedCallback&&(e.swalCloseEventFinishedCallback(),delete e.swalCloseEventFinishedCallback),"function"==typeof n.didDestroy&&n.didDestroy(),Wt(this)):Kt(this)}const Wt=t=>{Kt(t),delete t.params,delete e.keydownHandler,delete e.keydownTarget,delete e.currentInstance},Kt=e=>{e.isAwaitingPromise?(Yt(o,e),e.isAwaitingPromise=!0):(Yt(Re,e),Yt(o,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},Yt=(e,t)=>{for(const o in e)e[o].delete(t)};var Zt=Object.freeze({__proto__:null,_destroy:zt,close:Ge,closeModal:Ge,closePopup:Ge,closeToast:Ge,disableButtons:$t,disableInput:Lt,disableLoading:At,enableButtons:Et,enableInput:Tt,getInput:Bt,handleAwaitingPromise:tt,hideLoading:At,rejectPromise:et,resetValidationMessage:Ot,showValidationMessage:St,update:Rt});const Jt=(e,t,n)=>{t.popup.onclick=()=>{const t=o.innerParams.get(e);t&&(Xt(t)||t.timer||t.input)||n(Me.close)}},Xt=e=>e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton;let Gt=!1;const Qt=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(Gt=!0)}}},eo=e=>{e.container.onmousedown=()=>{e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,(t.target===e.popup||e.popup.contains(t.target))&&(Gt=!0)}}},to=(e,t,n)=>{t.container.onclick=i=>{const s=o.innerParams.get(e);Gt?Gt=!1:i.target===t.container&&p(s.allowOutsideClick)&&n(Me.backdrop)}},oo=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);const no=()=>{if(e.timeout)return(()=>{const e=O(),t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const o=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${o}%`})(),e.timeout.stop()},io=()=>{if(e.timeout){const t=e.timeout.start();return te(t),t}};let so=!1;const ro={};const ao=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in ro){const o=t.getAttribute(e);if(o)return void ro[e].fire({template:o})}};var lo=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||oo(e[0])?["title","html","icon"].forEach(((o,n)=>{const i=e[n];"string"==typeof i||oo(i)?t[o]=i:void 0!==i&&c(`Unexpected type of ${o}! Expected "string" or "Element", got ${typeof i}`)})):Object.assign(t,e[0]),t},bindClickHandler:function(){ro[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,so||(document.body.addEventListener("click",ao),so=!0)},clickCancel:()=>E()&&E().click(),clickConfirm:Oe,clickDeny:()=>$()&&$().click(),enableLoading:rt,fire:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new this(...t)},getActions:L,getCancelButton:E,getCloseButton:M,getConfirmButton:x,getContainer:f,getDenyButton:$,getFocusableElements:j,getFooter:S,getHtmlContainer:A,getIcon:v,getIconContent:()=>y(i["icon-content"]),getImage:k,getInputLabel:()=>y(i["input-label"]),getLoader:T,getPopup:w,getProgressSteps:B,getTimerLeft:()=>e.timeout&&e.timeout.getTimerLeft(),getTimerProgressBar:O,getTitle:C,getValidationMessage:P,increaseTimer:t=>{if(e.timeout){const o=e.timeout.increase(t);return te(o,!0),o}},isDeprecatedParameter:Vt,isLoading:()=>w().hasAttribute("data-loading"),isTimerRunning:()=>e.timeout&&e.timeout.isRunning(),isUpdatableParameter:qt,isValidParameter:Dt,isVisible:()=>G(w()),mixin:function(e){return class extends(this){_main(t,o){return super._main(t,Object.assign({},e,o))}}},resumeTimer:io,showLoading:rt,stopTimer:no,toggleTimer:()=>{const t=e.timeout;return t&&(t.running?no():io())}});class co{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 uo=["swal-title","swal-html","swal-footer"],po=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach((e=>{vo(e,["name","value"]);const o=e.getAttribute("name"),n=e.getAttribute("value");t[o]="boolean"==typeof Mt[o]?"false"!==n:"object"==typeof Mt[o]?JSON.parse(n):n})),t},mo=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((e=>{const o=e.getAttribute("name"),n=e.getAttribute("value");t[o]=new Function(`return ${n}`)()})),t},go=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach((e=>{vo(e,["type","color","aria-label"]);const o=e.getAttribute("type");t[`${o}ButtonText`]=e.innerHTML,t[`show${a(o)}Button`]=!0,e.hasAttribute("color")&&(t[`${o}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${o}ButtonAriaLabel`]=e.getAttribute("aria-label"))})),t},ho=e=>{const t={},o=e.querySelector("swal-image");return o&&(vo(o,["src","width","height","alt"]),o.hasAttribute("src")&&(t.imageUrl=o.getAttribute("src")),o.hasAttribute("width")&&(t.imageWidth=o.getAttribute("width")),o.hasAttribute("height")&&(t.imageHeight=o.getAttribute("height")),o.hasAttribute("alt")&&(t.imageAlt=o.getAttribute("alt"))),t},fo=e=>{const t={},o=e.querySelector("swal-icon");return o&&(vo(o,["type","color"]),o.hasAttribute("type")&&(t.icon=o.getAttribute("type")),o.hasAttribute("color")&&(t.iconColor=o.getAttribute("color")),t.iconHtml=o.innerHTML),t},bo=e=>{const t={},o=e.querySelector("swal-input");o&&(vo(o,["type","label","placeholder","value"]),t.input=o.getAttribute("type")||"text",o.hasAttribute("label")&&(t.inputLabel=o.getAttribute("label")),o.hasAttribute("placeholder")&&(t.inputPlaceholder=o.getAttribute("placeholder")),o.hasAttribute("value")&&(t.inputValue=o.getAttribute("value")));const n=Array.from(e.querySelectorAll("swal-input-option"));return n.length&&(t.inputOptions={},n.forEach((e=>{vo(e,["value"]);const o=e.getAttribute("value"),n=e.innerHTML;t.inputOptions[o]=n}))),t},yo=(e,t)=>{const o={};for(const n in t){const i=t[n],s=e.querySelector(i);s&&(vo(s,[]),o[i.replace(/^swal-/,"")]=s.innerHTML.trim())}return o},wo=e=>{const t=uo.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((e=>{const o=e.tagName.toLowerCase();t.includes(o)||l(`Unrecognized element <${o}>`)}))},vo=(e,t)=>{Array.from(e.attributes).forEach((o=>{-1===t.indexOf(o.name)&&l([`Unrecognized attribute "${o.name}" on <${e.tagName.toLowerCase()}>.`,""+(t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element.")])}))},Co=t=>{const o=f(),n=w();"function"==typeof t.willOpen&&t.willOpen(n);const s=window.getComputedStyle(document.body).overflowY;Po(o,n,t),setTimeout((()=>{ko(o,n)}),10),I()&&(Bo(o,t.scrollbarPadding,s),Array.from(document.body.children).forEach((e=>{e===f()||e.contains(f())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}))),H()||e.previousActiveElement||(e.previousActiveElement=document.activeElement),"function"==typeof t.didOpen&&setTimeout((()=>t.didOpen(n))),z(o,i["no-transition"])},Ao=e=>{const t=w();if(e.target!==t)return;const o=f();t.removeEventListener(ce,Ao),o.style.overflowY="auto"},ko=(e,t)=>{ce&&ee(t)?(e.style.overflowY="hidden",t.addEventListener(ce,Ao)):e.style.overflowY="auto"},Bo=(e,t,o)=>{(()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!V(document.body,i.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",U(document.body,i.iosfix),We(),ze()}})(),t&&"hidden"!==o&&Je(),setTimeout((()=>{e.scrollTop=0}))},Po=(e,t,o)=>{U(e,o.showClass.backdrop),t.style.setProperty("opacity","0","important"),Y(t,"grid"),setTimeout((()=>{U(t,o.showClass.popup),t.style.removeProperty("opacity")}),10),U([document.documentElement,document.body],i.shown),o.heightAuto&&o.backdrop&&!o.toast&&U([document.documentElement,document.body],i["height-auto"])};var xo={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 Eo(e){!function(e){e.inputValidator||Object.keys(xo).forEach((t=>{e.input===t&&(e.inputValidator=xo[t])}))}(e),e.showLoaderOnConfirm&&!e.preConfirm&&l("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)&&(l('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),se(e)}let $o;class To{constructor(){if("undefined"==typeof window)return;$o=this;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const i=Object.freeze(this.constructor.argsToParams(t));Object.defineProperties(this,{params:{value:i,writable:!1,enumerable:!0,configurable:!0}}),this.isAwaitingPromise=!1;const s=$o._main($o.params);o.promise.set(this,s)}_main(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(e=>{!1===e.backdrop&&e.allowOutsideClick&&l('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const t in e)Nt(t),e.toast&&Ft(t),_t(t)})(Object.assign({},n,t)),e.currentInstance&&(e.currentInstance._destroy(),I()&&Ue()),e.currentInstance=$o;const i=So(t,n);Eo(i),Object.freeze(i),e.timeout&&(e.timeout.stop(),delete e.timeout),clearTimeout(e.restoreFocusTimeout);const s=Oo($o);return Se($o,i),o.innerParams.set($o,i),Lo($o,s,i)}then(e){return o.promise.get(this).then(e)}finally(e){return o.promise.get(this).finally(e)}}const Lo=(t,n,i)=>new Promise(((s,r)=>{const a=e=>{t.close({isDismissed:!0,dismiss:e})};Re.swalPromiseResolve.set(t,s),Re.swalPromiseReject.set(t,r),n.confirmButton.onclick=()=>{(e=>{const t=o.innerParams.get(e);e.disableButtons(),t.input?ft(e,"confirm"):Ct(e,!0)})(t)},n.denyButton.onclick=()=>{(e=>{const t=o.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?ft(e,"deny"):yt(e,!1)})(t)},n.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(Me.cancel)})(t,a)},n.closeButton.onclick=()=>{a(Me.close)},((e,t,n)=>{o.innerParams.get(e).toast?Jt(e,t,n):(Qt(t),eo(t),to(e,t,n))})(t,n,a),((e,t,o,n)=>{je(t),o.toast||(t.keydownHandler=t=>qe(e,t,n),t.keydownTarget=o.keydownListenerCapture?window:w(),t.keydownListenerCapture=o.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)})(t,e,i,a),((e,t)=>{"select"===t.input||"radio"===t.input?dt(e,t):["text","email","number","tel","textarea"].includes(t.input)&&(m(t.inputValue)||h(t.inputValue))&&(rt(x()),pt(e,t))})(t,i),Co(i),Mo(e,i,a),jo(n,i),setTimeout((()=>{n.container.scrollTop=0}))})),So=(e,t)=>{const o=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const o=t.content;return wo(o),Object.assign(po(o),mo(o),go(o),ho(o),fo(o),bo(o),yo(o,uo))})(e),n=Object.assign({},Mt,t,o,e);return n.showClass=Object.assign({},Mt.showClass,n.showClass),n.hideClass=Object.assign({},Mt.hideClass,n.hideClass),n},Oo=e=>{const t={popup:w(),container:f(),actions:L(),confirmButton:x(),denyButton:$(),cancelButton:E(),loader:T(),closeButton:M(),validationMessage:P(),progressSteps:B()};return o.domCache.set(e,t),t},Mo=(e,t,o)=>{const n=O();Z(n),t.timer&&(e.timeout=new co((()=>{o("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(Y(n),N(n,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&te(t.timer)}))))},jo=(e,t)=>{t.toast||(p(t.allowEnterKey)?Io(e,t)||Ie(-1,1):Ho())},Io=(e,t)=>t.focusDeny&&G(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&G(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!G(e.confirmButton))&&(e.confirmButton.focus(),!0),Ho=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};if("undefined"!=typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)){const e=new Date,t=localStorage.getItem("swal-initiation");t?(e.getTime()-Date.parse(t))/864e5>3&&setTimeout((()=>{document.body.style.pointerEvents="none";const e=document.createElement("audio");e.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",e.loop=!0,document.body.appendChild(e),setTimeout((()=>{e.play().catch((()=>{}))}),2500)}),500):localStorage.setItem("swal-initiation",`${e}`)}To.prototype.disableButtons=$t,To.prototype.enableButtons=Et,To.prototype.getInput=Bt,To.prototype.disableInput=Lt,To.prototype.enableInput=Tt,To.prototype.hideLoading=At,To.prototype.disableLoading=At,To.prototype.showValidationMessage=St,To.prototype.resetValidationMessage=Ot,To.prototype.close=Ge,To.prototype.closePopup=Ge,To.prototype.closeModal=Ge,To.prototype.closeToast=Ge,To.prototype.rejectPromise=et,To.prototype.update=Rt,To.prototype._destroy=zt,Object.assign(To,lo),Object.keys(Zt).forEach((e=>{To[e]=function(){return $o&&$o[e]?$o[e](...arguments):null}})),To.DismissReason=Me,To.version="11.7.7";const Do=To;return Do.default=Do,Do})),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2);
|
|
5
|
+
!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";const e={},t=t=>new Promise((o=>{if(!t)return o();const n=window.scrollX,i=window.scrollY;e.restoreFocusTimeout=setTimeout((()=>{e.previousActiveElement instanceof HTMLElement?(e.previousActiveElement.focus(),e.previousActiveElement=null):document.body&&document.body.focus(),o()}),100),window.scrollTo(n,i)}));var o={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const n="swal2-",i=["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"].reduce(((e,t)=>(e[t]=n+t,e)),{}),s=["success","warning","info","question","error"].reduce(((e,t)=>(e[t]=n+t,e)),{}),r="SweetAlert2:",a=e=>e.charAt(0).toUpperCase()+e.slice(1),l=e=>{console.warn(`${r} ${"object"==typeof e?e.join(" "):e}`)},c=e=>{console.error(`${r} ${e}`)},u=[],d=(e,t)=>{var o;o=`"${e}" is deprecated and will be removed in the next major release. Please use "${t}" instead.`,u.includes(o)||(u.push(o),l(o))},p=e=>"function"==typeof e?e():e,m=e=>e&&"function"==typeof e.toPromise,g=e=>m(e)?e.toPromise():Promise.resolve(e),h=e=>e&&Promise.resolve(e)===e,f=()=>document.body.querySelector(`.${i.container}`),b=e=>{const t=f();return t?t.querySelector(e):null},y=e=>b(`.${e}`),w=()=>y(i.popup),v=()=>y(i.icon),C=()=>y(i.title),A=()=>y(i["html-container"]),k=()=>y(i.image),B=()=>y(i["progress-steps"]),P=()=>y(i["validation-message"]),x=()=>b(`.${i.actions} .${i.confirm}`),E=()=>b(`.${i.actions} .${i.cancel}`),$=()=>b(`.${i.actions} .${i.deny}`),T=()=>b(`.${i.loader}`),L=()=>y(i.actions),S=()=>y(i.footer),O=()=>y(i["timer-progress-bar"]),M=()=>y(i.close),j=()=>{const e=Array.from(w().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(((e,t)=>{const o=parseInt(e.getAttribute("tabindex")),n=parseInt(t.getAttribute("tabindex"));return o>n?1:o<n?-1:0})),t=Array.from(w().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((e=>"-1"!==e.getAttribute("tabindex")));return(e=>{const t=[];for(let o=0;o<e.length;o++)-1===t.indexOf(e[o])&&t.push(e[o]);return t})(e.concat(t)).filter((e=>G(e)))},I=()=>V(document.body,i.shown)&&!V(document.body,i["toast-shown"])&&!V(document.body,i["no-backdrop"]),H=()=>w()&&V(w(),i.toast),D={previousBodyPadding:null},q=(e,t)=>{if(e.textContent="",t){const o=(new DOMParser).parseFromString(t,"text/html");Array.from(o.querySelector("head").childNodes).forEach((t=>{e.appendChild(t)})),Array.from(o.querySelector("body").childNodes).forEach((t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},V=(e,t)=>{if(!t)return!1;const o=t.split(/\s+/);for(let t=0;t<o.length;t++)if(!e.classList.contains(o[t]))return!1;return!0},N=(e,t,o)=>{if(((e,t)=>{Array.from(e.classList).forEach((o=>{Object.values(i).includes(o)||Object.values(s).includes(o)||Object.values(t.showClass).includes(o)||e.classList.remove(o)}))})(e,t),t.customClass&&t.customClass[o]){if("string"!=typeof t.customClass[o]&&!t.customClass[o].forEach)return void l(`Invalid type of customClass.${o}! Expected string or iterable object, got "${typeof t.customClass[o]}"`);U(e,t.customClass[o])}},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${i.popup} > .${i[t]}`);case"checkbox":return e.querySelector(`.${i.popup} > .${i.checkbox} input`);case"radio":return e.querySelector(`.${i.popup} > .${i.radio} input:checked`)||e.querySelector(`.${i.popup} > .${i.radio} input:first-child`);case"range":return e.querySelector(`.${i.popup} > .${i.range} input`);default:return e.querySelector(`.${i.popup} > .${i.input}`)}},_=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},R=(e,t,o)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach((t=>{Array.isArray(e)?e.forEach((e=>{o?e.classList.add(t):e.classList.remove(t)})):o?e.classList.add(t):e.classList.remove(t)})))},U=(e,t)=>{R(e,t,!0)},z=(e,t)=>{R(e,t,!1)},W=(e,t)=>{const o=Array.from(e.children);for(let e=0;e<o.length;e++){const n=o[e];if(n instanceof HTMLElement&&V(n,t))return n}},K=(e,t,o)=>{o===`${parseInt(o)}`&&(o=parseInt(o)),o||0===parseInt(o)?e.style[t]="number"==typeof o?`${o}px`:o:e.style.removeProperty(t)},Y=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e.style.display=t},Z=e=>{e.style.display="none"},J=(e,t,o,n)=>{const i=e.querySelector(t);i&&(i.style[o]=n)},X=function(e,t){t?Y(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex"):Z(e)},G=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Q=e=>!!(e.scrollHeight>e.clientHeight),ee=e=>{const t=window.getComputedStyle(e),o=parseFloat(t.getPropertyValue("animation-duration")||"0"),n=parseFloat(t.getPropertyValue("transition-duration")||"0");return o>0||n>0},te=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=O();G(o)&&(t&&(o.style.transition="none",o.style.width="100%"),setTimeout((()=>{o.style.transition=`width ${e/1e3}s linear`,o.style.width="0%"}),10))},oe=()=>"undefined"==typeof window||"undefined"==typeof document,ne=`\n <div aria-labelledby="${i.title}" aria-describedby="${i["html-container"]}" class="${i.popup}" tabindex="-1">\n <button type="button" class="${i.close}"></button>\n <ul class="${i["progress-steps"]}"></ul>\n <div class="${i.icon}"></div>\n <img class="${i.image}" />\n <h2 class="${i.title}" id="${i.title}"></h2>\n <div class="${i["html-container"]}" id="${i["html-container"]}"></div>\n <input class="${i.input}" />\n <input type="file" class="${i.file}" />\n <div class="${i.range}">\n <input type="range" />\n <output></output>\n </div>\n <select class="${i.select}"></select>\n <div class="${i.radio}"></div>\n <label for="${i.checkbox}" class="${i.checkbox}">\n <input type="checkbox" />\n <span class="${i.label}"></span>\n </label>\n <textarea class="${i.textarea}"></textarea>\n <div class="${i["validation-message"]}" id="${i["validation-message"]}"></div>\n <div class="${i.actions}">\n <div class="${i.loader}"></div>\n <button type="button" class="${i.confirm}"></button>\n <button type="button" class="${i.deny}"></button>\n <button type="button" class="${i.cancel}"></button>\n </div>\n <div class="${i.footer}"></div>\n <div class="${i["timer-progress-bar-container"]}">\n <div class="${i["timer-progress-bar"]}"></div>\n </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),ie=()=>{e.currentInstance.resetValidationMessage()},se=e=>{const t=(()=>{const e=f();return!!e&&(e.remove(),z([document.documentElement,document.body],[i["no-backdrop"],i["toast-shown"],i["has-column"]]),!0)})();if(oe())return void c("SweetAlert2 requires document to initialize");const o=document.createElement("div");o.className=i.container,t&&U(o,i["no-transition"]),q(o,ne);const n="string"==typeof(s=e.target)?document.querySelector(s):s;var s;n.appendChild(o),(e=>{const t=w();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&&U(f(),i.rtl)})(n),(()=>{const e=w(),t=W(e,i.input),o=W(e,i.file),n=e.querySelector(`.${i.range} input`),s=e.querySelector(`.${i.range} output`),r=W(e,i.select),a=e.querySelector(`.${i.checkbox} input`),l=W(e,i.textarea);t.oninput=ie,o.onchange=ie,r.onchange=ie,a.onchange=ie,l.oninput=ie,n.oninput=()=>{ie(),s.value=n.value},n.onchange=()=>{ie(),s.value=n.value}})()},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ae(e,t):e&&q(t,e)},ae=(e,t)=>{e.jquery?le(t,e):q(t,e.toString())},le=(e,t)=>{if(e.textContent="",0 in t)for(let o=0;o in t;o++)e.appendChild(t[o].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},ce=(()=>{if(oe())return!1;const e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&void 0!==e.style[o])return t[o];return!1})(),ue=(e,t)=>{const o=L(),n=T();t.showConfirmButton||t.showDenyButton||t.showCancelButton?Y(o):Z(o),N(o,t,"actions"),function(e,t,o){const n=x(),s=$(),r=E();de(n,"confirm",o),de(s,"deny",o),de(r,"cancel",o),function(e,t,o,n){if(!n.buttonsStyling)return void z([e,t,o],i.styled);U([e,t,o],i.styled),n.confirmButtonColor&&(e.style.backgroundColor=n.confirmButtonColor,U(e,i["default-outline"]));n.denyButtonColor&&(t.style.backgroundColor=n.denyButtonColor,U(t,i["default-outline"]));n.cancelButtonColor&&(o.style.backgroundColor=n.cancelButtonColor,U(o,i["default-outline"]))}(n,s,r,o),o.reverseButtons&&(o.toast?(e.insertBefore(r,n),e.insertBefore(s,n)):(e.insertBefore(r,t),e.insertBefore(s,t),e.insertBefore(n,t)))}(o,n,t),q(n,t.loaderHtml),N(n,t,"loader")};function de(e,t,o){X(e,o[`show${a(t)}Button`],"inline-block"),q(e,o[`${t}ButtonText`]),e.setAttribute("aria-label",o[`${t}ButtonAriaLabel`]),e.className=i[t],N(e,o,`${t}Button`),U(e,o[`${t}ButtonClass`])}const pe=(e,t)=>{const o=f();o&&(!function(e,t){"string"==typeof t?e.style.background=t:t||U([document.documentElement,document.body],i["no-backdrop"])}(o,t.backdrop),function(e,t){t in i?U(e,i[t]):(l('The "position" parameter is not valid, defaulting to "center"'),U(e,i.center))}(o,t.position),function(e,t){if(t&&"string"==typeof t){const o=`grow-${t}`;o in i&&U(e,i[o])}}(o,t.grow),N(o,t,"container"))};const me=["input","file","range","select","radio","checkbox","textarea"],ge=e=>{if(!Ce[e.input])return void c(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${e.input}"`);const t=we(e.input),o=Ce[e.input](t,e);Y(t),e.inputAutoFocus&&setTimeout((()=>{_(o)}))},he=(e,t)=>{const o=F(w(),e);if(o){(e=>{for(let t=0;t<e.attributes.length;t++){const o=e.attributes[t].name;["type","value","style"].includes(o)||e.removeAttribute(o)}})(o);for(const e in t)o.setAttribute(e,t[e])}},fe=e=>{const t=we(e.input);"object"==typeof e.customClass&&U(t,e.customClass.input)},be=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},ye=(e,t,o)=>{if(o.inputLabel){e.id=i.input;const n=document.createElement("label"),s=i["input-label"];n.setAttribute("for",e.id),n.className=s,"object"==typeof o.customClass&&U(n,o.customClass.inputLabel),n.innerText=o.inputLabel,t.insertAdjacentElement("beforebegin",n)}},we=e=>W(w(),i[e]||i.input),ve=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:h(t)||l(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},Ce={};Ce.text=Ce.email=Ce.password=Ce.number=Ce.tel=Ce.url=(e,t)=>(ve(e,t.inputValue),ye(e,e,t),be(e,t),e.type=t.input,e),Ce.file=(e,t)=>(ye(e,e,t),be(e,t),e),Ce.range=(e,t)=>{const o=e.querySelector("input"),n=e.querySelector("output");return ve(o,t.inputValue),o.type=t.input,ve(n,t.inputValue),ye(o,e,t),e},Ce.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const o=document.createElement("option");q(o,t.inputPlaceholder),o.value="",o.disabled=!0,o.selected=!0,e.appendChild(o)}return ye(e,e,t),e},Ce.radio=e=>(e.textContent="",e),Ce.checkbox=(e,t)=>{const o=F(w(),"checkbox");o.value="1",o.id=i.checkbox,o.checked=Boolean(t.inputValue);const n=e.querySelector("span");return q(n,t.inputPlaceholder),o},Ce.textarea=(e,t)=>{ve(e,t.inputValue),be(e,t),ye(e,e,t);return setTimeout((()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(w()).width);new MutationObserver((()=>{const o=e.offsetWidth+(n=e,parseInt(window.getComputedStyle(n).marginLeft)+parseInt(window.getComputedStyle(n).marginRight));var n;w().style.width=o>t?`${o}px`:null})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e};const Ae=(e,t)=>{const n=A();N(n,t,"htmlContainer"),t.html?(re(t.html,n),Y(n,"block")):t.text?(n.textContent=t.text,Y(n,"block")):Z(n),((e,t)=>{const n=w(),s=o.innerParams.get(e),r=!s||t.input!==s.input;me.forEach((e=>{const o=W(n,i[e]);he(e,t.inputAttributes),o.className=i[e],r&&Z(o)})),t.input&&(r&&ge(t),fe(t))})(e,t)},ke=(e,t)=>{for(const o in s)t.icon!==o&&z(e,s[o]);U(e,s[t.icon]),xe(e,t),Be(),N(e,t,"icon")},Be=()=>{const e=w(),t=window.getComputedStyle(e).getPropertyValue("background-color"),o=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<o.length;e++)o[e].style.backgroundColor=t},Pe=(e,t)=>{let o,n=e.innerHTML;if(t.iconHtml)o=Ee(t.iconHtml);else if("success"===t.icon)o='\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',n=n.replace(/ style=".*?"/g,"");else if("error"===t.icon)o='\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';else{o=Ee({question:"?",warning:"!",info:"i"}[t.icon])}n.trim()!==o.trim()&&q(e,o)},xe=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const o of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])J(e,o,"backgroundColor",t.iconColor);J(e,".swal2-success-ring","borderColor",t.iconColor)}},Ee=e=>`<div class="${i["icon-content"]}">${e}</div>`,$e=(e,t)=>{e.className=`${i.popup} ${G(e)?t.showClass.popup:""}`,t.toast?(U([document.documentElement,document.body],i["toast-shown"]),U(e,i.toast)):U(e,i.modal),N(e,t,"popup"),"string"==typeof t.customClass&&U(e,t.customClass),t.icon&&U(e,i[`icon-${t.icon}`])},Te=e=>{const t=document.createElement("li");return U(t,i["progress-step"]),q(t,e),t},Le=e=>{const t=document.createElement("li");return U(t,i["progress-step-line"]),e.progressStepsDistance&&K(t,"width",e.progressStepsDistance),t},Se=(e,t)=>{((e,t)=>{const o=f(),n=w();t.toast?(K(o,"width",t.width),n.style.width="100%",n.insertBefore(T(),v())):K(n,"width",t.width),K(n,"padding",t.padding),t.color&&(n.style.color=t.color),t.background&&(n.style.background=t.background),Z(P()),$e(n,t)})(0,t),pe(0,t),((e,t)=>{const o=B();t.progressSteps&&0!==t.progressSteps.length?(Y(o),o.textContent="",t.currentProgressStep>=t.progressSteps.length&&l("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach(((e,n)=>{const s=Te(e);if(o.appendChild(s),n===t.currentProgressStep&&U(s,i["active-progress-step"]),n!==t.progressSteps.length-1){const e=Le(t);o.appendChild(e)}}))):Z(o)})(0,t),((e,t)=>{const n=o.innerParams.get(e),i=v();if(n&&t.icon===n.icon)return Pe(i,t),void ke(i,t);if(t.icon||t.iconHtml){if(t.icon&&-1===Object.keys(s).indexOf(t.icon))return c(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),void Z(i);Y(i),Pe(i,t),ke(i,t),U(i,t.showClass.icon)}else Z(i)})(e,t),((e,t)=>{const o=k();o&&(t.imageUrl?(Y(o,""),o.setAttribute("src",t.imageUrl),o.setAttribute("alt",t.imageAlt||""),K(o,"width",t.imageWidth),K(o,"height",t.imageHeight),o.className=i.image,N(o,t,"image")):Z(o))})(0,t),((e,t)=>{const o=C();X(o,t.title||t.titleText,"block"),t.title&&re(t.title,o),t.titleText&&(o.innerText=t.titleText),N(o,t,"title")})(0,t),((e,t)=>{const o=M();q(o,t.closeButtonHtml),N(o,t,"closeButton"),X(o,t.showCloseButton),o.setAttribute("aria-label",t.closeButtonAriaLabel)})(0,t),Ae(e,t),ue(0,t),((e,t)=>{const o=S();X(o,t.footer),t.footer&&re(t.footer,o),N(o,t,"footer")})(0,t),"function"==typeof t.didRender&&t.didRender(w())},Oe=()=>x()&&x().click(),Me=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),je=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},Ie=(e,t)=>{const o=j();if(o.length)return(e+=t)===o.length?e=0:-1===e&&(e=o.length-1),void o[e].focus();w().focus()},He=["ArrowRight","ArrowDown"],De=["ArrowLeft","ArrowUp"],qe=(e,t,n)=>{const i=o.innerParams.get(e);i&&(t.isComposing||229===t.keyCode||(i.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Ve(e,t,i):"Tab"===t.key?Ne(t):[...He,...De].includes(t.key)?Fe(t.key):"Escape"===t.key&&_e(t,i,n)))},Ve=(e,t,o)=>{if(p(o.allowEnterKey)&&t.target&&e.getInput()&&t.target instanceof HTMLElement&&t.target.outerHTML===e.getInput().outerHTML){if(["textarea","file"].includes(o.input))return;Oe(),t.preventDefault()}},Ne=e=>{const t=e.target,o=j();let n=-1;for(let e=0;e<o.length;e++)if(t===o[e]){n=e;break}e.shiftKey?Ie(n,-1):Ie(n,1),e.stopPropagation(),e.preventDefault()},Fe=e=>{const t=[x(),$(),E()];if(document.activeElement instanceof HTMLElement&&!t.includes(document.activeElement))return;const o=He.includes(e)?"nextElementSibling":"previousElementSibling";let n=document.activeElement;for(let e=0;e<L().children.length;e++){if(n=n[o],!n)return;if(n instanceof HTMLButtonElement&&G(n))break}n instanceof HTMLButtonElement&&n.focus()},_e=(e,t,o)=>{p(t.allowEscapeKey)&&(e.preventDefault(),o(Me.esc))};var Re={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const Ue=()=>{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")}))},ze=()=>{const e=navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),o=!!e.match(/WebKit/i);if(t&&o&&!e.match(/CriOS/i)){const e=44;w().scrollHeight>window.innerHeight-e&&(f().style.paddingBottom=`${e}px`)}},We=()=>{const e=f();let t;e.ontouchstart=e=>{t=Ke(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},Ke=e=>{const t=e.target,o=f();return!Ye(e)&&!Ze(e)&&(t===o||!Q(o)&&t instanceof HTMLElement&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&(!Q(A())||!A().contains(t)))},Ye=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,Ze=e=>e.touches&&e.touches.length>1,Je=()=>{null===D.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(D.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${D.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=i["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function Xe(o,n,s,r){H()?st(o,r):(t(s).then((()=>st(o,r))),je(e));/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(n.setAttribute("style","display:none !important"),n.removeAttribute("class"),n.innerHTML=""):n.remove(),I()&&(null!==D.previousBodyPadding&&(document.body.style.paddingRight=`${D.previousBodyPadding}px`,D.previousBodyPadding=null),(()=>{if(V(document.body,i.iosfix)){const e=parseInt(document.body.style.top,10);z(document.body,i.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),Ue()),z([document.documentElement,document.body],[i.shown,i["height-auto"],i["no-backdrop"],i["toast-shown"]])}function Ge(e){e=ot(e);const t=Re.swalPromiseResolve.get(this),o=Qe(this);this.isAwaitingPromise?e.isDismissed||(tt(this),t(e)):o&&t(e)}const Qe=e=>{const t=w();if(!t)return!1;const n=o.innerParams.get(e);if(!n||V(t,n.hideClass.popup))return!1;z(t,n.showClass.popup),U(t,n.hideClass.popup);const i=f();return z(i,n.showClass.backdrop),U(i,n.hideClass.backdrop),nt(e,t,n),!0};function et(e){const t=Re.swalPromiseReject.get(this);tt(this),t&&t(e)}const tt=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,o.innerParams.get(e)||e._destroy())},ot=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),nt=(e,t,o)=>{const n=f(),i=ce&&ee(t);"function"==typeof o.willClose&&o.willClose(t),i?it(e,t,n,o.returnFocus,o.didClose):Xe(e,n,o.returnFocus,o.didClose)},it=(t,o,n,i,s)=>{e.swalCloseEventFinishedCallback=Xe.bind(null,t,n,i,s),o.addEventListener(ce,(function(t){t.target===o&&(e.swalCloseEventFinishedCallback(),delete e.swalCloseEventFinishedCallback)}))},st=(e,t)=>{setTimeout((()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy&&e._destroy()}))},rt=e=>{let t=w();t||new Do,t=w();const o=T();H()?Z(v()):at(t,e),Y(o),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},at=(e,t)=>{const o=L(),n=T();!t&&G(x())&&(t=x()),Y(o),t&&(Z(t),n.setAttribute("data-button-to-replace",t.className)),n.parentNode.insertBefore(n,t),U([e,o],i.loading)},lt=e=>e.checked?1:0,ct=e=>e.checked?e.value:null,ut=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,dt=(e,t)=>{const o=w(),n=e=>{mt[t.input](o,gt(e),t)};m(t.inputOptions)||h(t.inputOptions)?(rt(x()),g(t.inputOptions).then((t=>{e.hideLoading(),n(t)}))):"object"==typeof t.inputOptions?n(t.inputOptions):c("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},pt=(e,t)=>{const o=e.getInput();Z(o),g(t.inputValue).then((n=>{o.value="number"===t.input?`${parseFloat(n)||0}`:`${n}`,Y(o),o.focus(),e.hideLoading()})).catch((t=>{c(`Error in inputValue promise: ${t}`),o.value="",Y(o),o.focus(),e.hideLoading()}))},mt={select:(e,t,o)=>{const n=W(e,i.select),s=(e,t,n)=>{const i=document.createElement("option");i.value=n,q(i,t),i.selected=ht(n,o.inputValue),e.appendChild(i)};t.forEach((e=>{const t=e[0],o=e[1];if(Array.isArray(o)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,n.appendChild(e),o.forEach((t=>s(e,t[1],t[0])))}else s(n,o,t)})),n.focus()},radio:(e,t,o)=>{const n=W(e,i.radio);t.forEach((e=>{const t=e[0],s=e[1],r=document.createElement("input"),a=document.createElement("label");r.type="radio",r.name=i.radio,r.value=t,ht(t,o.inputValue)&&(r.checked=!0);const l=document.createElement("span");q(l,s),l.className=i.label,a.appendChild(r),a.appendChild(l),n.appendChild(a)}));const s=n.querySelectorAll("input");s.length&&s[0].focus()}},gt=e=>{const t=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach(((e,o)=>{let n=e;"object"==typeof n&&(n=gt(n)),t.push([o,n])})):Object.keys(e).forEach((o=>{let n=e[o];"object"==typeof n&&(n=gt(n)),t.push([o,n])})),t},ht=(e,t)=>t&&t.toString()===e.toString(),ft=(e,t)=>{const n=o.innerParams.get(e);if(!n.input)return void c(`The "input" parameter is needed to be set when using returnInputValueOn${a(t)}`);const i=((e,t)=>{const o=e.getInput();if(!o)return null;switch(t.input){case"checkbox":return lt(o);case"radio":return ct(o);case"file":return ut(o);default:return t.inputAutoTrim?o.value.trim():o.value}})(e,n);n.inputValidator?bt(e,i,t):e.getInput().checkValidity()?"deny"===t?yt(e,i):Ct(e,i):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},bt=(e,t,n)=>{const i=o.innerParams.get(e);e.disableInput();Promise.resolve().then((()=>g(i.inputValidator(t,i.validationMessage)))).then((o=>{e.enableButtons(),e.enableInput(),o?e.showValidationMessage(o):"deny"===n?yt(e,t):Ct(e,t)}))},yt=(e,t)=>{const n=o.innerParams.get(e||void 0);if(n.showLoaderOnDeny&&rt($()),n.preDeny){e.isAwaitingPromise=!0;Promise.resolve().then((()=>g(n.preDeny(t,n.validationMessage)))).then((o=>{!1===o?(e.hideLoading(),tt(e)):e.close({isDenied:!0,value:void 0===o?t:o})})).catch((t=>vt(e||void 0,t)))}else e.close({isDenied:!0,value:t})},wt=(e,t)=>{e.close({isConfirmed:!0,value:t})},vt=(e,t)=>{e.rejectPromise(t)},Ct=(e,t)=>{const n=o.innerParams.get(e||void 0);if(n.showLoaderOnConfirm&&rt(),n.preConfirm){e.resetValidationMessage(),e.isAwaitingPromise=!0;Promise.resolve().then((()=>g(n.preConfirm(t,n.validationMessage)))).then((o=>{G(P())||!1===o?(e.hideLoading(),tt(e)):wt(e,void 0===o?t:o)})).catch((t=>vt(e||void 0,t)))}else wt(e,t)};function At(){const e=o.innerParams.get(this);if(!e)return;const t=o.domCache.get(this);Z(t.loader),H()?e.icon&&Y(v()):kt(t),z([t.popup,t.actions],i.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const kt=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?Y(t[0],"inline-block"):G(x())||G($())||G(E())||Z(e.actions)};function Bt(){const e=o.innerParams.get(this),t=o.domCache.get(this);return t?F(t.popup,e.input):null}function Pt(e,t,n){const i=o.domCache.get(e);t.forEach((e=>{i[e].disabled=n}))}function xt(e,t){if(e)if("radio"===e.type){const o=e.parentNode.parentNode.querySelectorAll("input");for(let e=0;e<o.length;e++)o[e].disabled=t}else e.disabled=t}function Et(){Pt(this,["confirmButton","denyButton","cancelButton"],!1)}function $t(){Pt(this,["confirmButton","denyButton","cancelButton"],!0)}function Tt(){xt(this.getInput(),!1)}function Lt(){xt(this.getInput(),!0)}function St(e){const t=o.domCache.get(this),n=o.innerParams.get(this);q(t.validationMessage,e),t.validationMessage.className=i["validation-message"],n.customClass&&n.customClass.validationMessage&&U(t.validationMessage,n.customClass.validationMessage),Y(t.validationMessage);const s=this.getInput();s&&(s.setAttribute("aria-invalid",!0),s.setAttribute("aria-describedby",i["validation-message"]),_(s),U(s,i.inputerror))}function Ot(){const e=o.domCache.get(this);e.validationMessage&&Z(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),z(t,i.inputerror))}const Mt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,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:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!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:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},jt=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],It={},Ht=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Dt=e=>Object.prototype.hasOwnProperty.call(Mt,e),qt=e=>-1!==jt.indexOf(e),Vt=e=>It[e],Nt=e=>{Dt(e)||l(`Unknown parameter "${e}"`)},Ft=e=>{Ht.includes(e)&&l(`The parameter "${e}" is incompatible with toasts`)},_t=e=>{Vt(e)&&d(e,Vt(e))};function Rt(e){const t=w(),n=o.innerParams.get(this);if(!t||V(t,n.hideClass.popup))return void l("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=Ut(e),s=Object.assign({},n,i);Se(this,s),o.innerParams.set(this,s),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}const Ut=e=>{const t={};return Object.keys(e).forEach((o=>{qt(o)?t[o]=e[o]:l(`Invalid parameter to update: ${o}`)})),t};function zt(){const t=o.domCache.get(this),n=o.innerParams.get(this);n?(t.popup&&e.swalCloseEventFinishedCallback&&(e.swalCloseEventFinishedCallback(),delete e.swalCloseEventFinishedCallback),"function"==typeof n.didDestroy&&n.didDestroy(),Wt(this)):Kt(this)}const Wt=t=>{Kt(t),delete t.params,delete e.keydownHandler,delete e.keydownTarget,delete e.currentInstance},Kt=e=>{e.isAwaitingPromise?(Yt(o,e),e.isAwaitingPromise=!0):(Yt(Re,e),Yt(o,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},Yt=(e,t)=>{for(const o in e)e[o].delete(t)};var Zt=Object.freeze({__proto__:null,_destroy:zt,close:Ge,closeModal:Ge,closePopup:Ge,closeToast:Ge,disableButtons:$t,disableInput:Lt,disableLoading:At,enableButtons:Et,enableInput:Tt,getInput:Bt,handleAwaitingPromise:tt,hideLoading:At,rejectPromise:et,resetValidationMessage:Ot,showValidationMessage:St,update:Rt});const Jt=(e,t,n)=>{t.popup.onclick=()=>{const t=o.innerParams.get(e);t&&(Xt(t)||t.timer||t.input)||n(Me.close)}},Xt=e=>e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton;let Gt=!1;const Qt=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(Gt=!0)}}},eo=e=>{e.container.onmousedown=()=>{e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,(t.target===e.popup||e.popup.contains(t.target))&&(Gt=!0)}}},to=(e,t,n)=>{t.container.onclick=i=>{const s=o.innerParams.get(e);Gt?Gt=!1:i.target===t.container&&p(s.allowOutsideClick)&&n(Me.backdrop)}},oo=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);const no=()=>{if(e.timeout)return(()=>{const e=O(),t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const o=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${o}%`})(),e.timeout.stop()},io=()=>{if(e.timeout){const t=e.timeout.start();return te(t),t}};let so=!1;const ro={};const ao=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in ro){const o=t.getAttribute(e);if(o)return void ro[e].fire({template:o})}};var lo=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||oo(e[0])?["title","html","icon"].forEach(((o,n)=>{const i=e[n];"string"==typeof i||oo(i)?t[o]=i:void 0!==i&&c(`Unexpected type of ${o}! Expected "string" or "Element", got ${typeof i}`)})):Object.assign(t,e[0]),t},bindClickHandler:function(){ro[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,so||(document.body.addEventListener("click",ao),so=!0)},clickCancel:()=>E()&&E().click(),clickConfirm:Oe,clickDeny:()=>$()&&$().click(),enableLoading:rt,fire:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new this(...t)},getActions:L,getCancelButton:E,getCloseButton:M,getConfirmButton:x,getContainer:f,getDenyButton:$,getFocusableElements:j,getFooter:S,getHtmlContainer:A,getIcon:v,getIconContent:()=>y(i["icon-content"]),getImage:k,getInputLabel:()=>y(i["input-label"]),getLoader:T,getPopup:w,getProgressSteps:B,getTimerLeft:()=>e.timeout&&e.timeout.getTimerLeft(),getTimerProgressBar:O,getTitle:C,getValidationMessage:P,increaseTimer:t=>{if(e.timeout){const o=e.timeout.increase(t);return te(o,!0),o}},isDeprecatedParameter:Vt,isLoading:()=>w().hasAttribute("data-loading"),isTimerRunning:()=>e.timeout&&e.timeout.isRunning(),isUpdatableParameter:qt,isValidParameter:Dt,isVisible:()=>G(w()),mixin:function(e){return class extends(this){_main(t,o){return super._main(t,Object.assign({},e,o))}}},resumeTimer:io,showLoading:rt,stopTimer:no,toggleTimer:()=>{const t=e.timeout;return t&&(t.running?no():io())}});class co{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 uo=["swal-title","swal-html","swal-footer"],po=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach((e=>{vo(e,["name","value"]);const o=e.getAttribute("name"),n=e.getAttribute("value");t[o]="boolean"==typeof Mt[o]?"false"!==n:"object"==typeof Mt[o]?JSON.parse(n):n})),t},mo=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((e=>{const o=e.getAttribute("name"),n=e.getAttribute("value");t[o]=new Function(`return ${n}`)()})),t},go=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach((e=>{vo(e,["type","color","aria-label"]);const o=e.getAttribute("type");t[`${o}ButtonText`]=e.innerHTML,t[`show${a(o)}Button`]=!0,e.hasAttribute("color")&&(t[`${o}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${o}ButtonAriaLabel`]=e.getAttribute("aria-label"))})),t},ho=e=>{const t={},o=e.querySelector("swal-image");return o&&(vo(o,["src","width","height","alt"]),o.hasAttribute("src")&&(t.imageUrl=o.getAttribute("src")),o.hasAttribute("width")&&(t.imageWidth=o.getAttribute("width")),o.hasAttribute("height")&&(t.imageHeight=o.getAttribute("height")),o.hasAttribute("alt")&&(t.imageAlt=o.getAttribute("alt"))),t},fo=e=>{const t={},o=e.querySelector("swal-icon");return o&&(vo(o,["type","color"]),o.hasAttribute("type")&&(t.icon=o.getAttribute("type")),o.hasAttribute("color")&&(t.iconColor=o.getAttribute("color")),t.iconHtml=o.innerHTML),t},bo=e=>{const t={},o=e.querySelector("swal-input");o&&(vo(o,["type","label","placeholder","value"]),t.input=o.getAttribute("type")||"text",o.hasAttribute("label")&&(t.inputLabel=o.getAttribute("label")),o.hasAttribute("placeholder")&&(t.inputPlaceholder=o.getAttribute("placeholder")),o.hasAttribute("value")&&(t.inputValue=o.getAttribute("value")));const n=Array.from(e.querySelectorAll("swal-input-option"));return n.length&&(t.inputOptions={},n.forEach((e=>{vo(e,["value"]);const o=e.getAttribute("value"),n=e.innerHTML;t.inputOptions[o]=n}))),t},yo=(e,t)=>{const o={};for(const n in t){const i=t[n],s=e.querySelector(i);s&&(vo(s,[]),o[i.replace(/^swal-/,"")]=s.innerHTML.trim())}return o},wo=e=>{const t=uo.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((e=>{const o=e.tagName.toLowerCase();t.includes(o)||l(`Unrecognized element <${o}>`)}))},vo=(e,t)=>{Array.from(e.attributes).forEach((o=>{-1===t.indexOf(o.name)&&l([`Unrecognized attribute "${o.name}" on <${e.tagName.toLowerCase()}>.`,""+(t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element.")])}))},Co=t=>{const o=f(),n=w();"function"==typeof t.willOpen&&t.willOpen(n);const s=window.getComputedStyle(document.body).overflowY;Po(o,n,t),setTimeout((()=>{ko(o,n)}),10),I()&&(Bo(o,t.scrollbarPadding,s),Array.from(document.body.children).forEach((e=>{e===f()||e.contains(f())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}))),H()||e.previousActiveElement||(e.previousActiveElement=document.activeElement),"function"==typeof t.didOpen&&setTimeout((()=>t.didOpen(n))),z(o,i["no-transition"])},Ao=e=>{const t=w();if(e.target!==t)return;const o=f();t.removeEventListener(ce,Ao),o.style.overflowY="auto"},ko=(e,t)=>{ce&&ee(t)?(e.style.overflowY="hidden",t.addEventListener(ce,Ao)):e.style.overflowY="auto"},Bo=(e,t,o)=>{(()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!V(document.body,i.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",U(document.body,i.iosfix),We(),ze()}})(),t&&"hidden"!==o&&Je(),setTimeout((()=>{e.scrollTop=0}))},Po=(e,t,o)=>{U(e,o.showClass.backdrop),t.style.setProperty("opacity","0","important"),Y(t,"grid"),setTimeout((()=>{U(t,o.showClass.popup),t.style.removeProperty("opacity")}),10),U([document.documentElement,document.body],i.shown),o.heightAuto&&o.backdrop&&!o.toast&&U([document.documentElement,document.body],i["height-auto"])};var xo={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 Eo(e){!function(e){e.inputValidator||Object.keys(xo).forEach((t=>{e.input===t&&(e.inputValidator=xo[t])}))}(e),e.showLoaderOnConfirm&&!e.preConfirm&&l("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)&&(l('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),se(e)}let $o;class To{constructor(){if("undefined"==typeof window)return;$o=this;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const i=Object.freeze(this.constructor.argsToParams(t));Object.defineProperties(this,{params:{value:i,writable:!1,enumerable:!0,configurable:!0}}),this.isAwaitingPromise=!1;const s=$o._main($o.params);o.promise.set(this,s)}_main(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(e=>{!1===e.backdrop&&e.allowOutsideClick&&l('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const t in e)Nt(t),e.toast&&Ft(t),_t(t)})(Object.assign({},n,t)),e.currentInstance&&(e.currentInstance._destroy(),I()&&Ue()),e.currentInstance=$o;const i=So(t,n);Eo(i),Object.freeze(i),e.timeout&&(e.timeout.stop(),delete e.timeout),clearTimeout(e.restoreFocusTimeout);const s=Oo($o);return Se($o,i),o.innerParams.set($o,i),Lo($o,s,i)}then(e){return o.promise.get(this).then(e)}finally(e){return o.promise.get(this).finally(e)}}const Lo=(t,n,i)=>new Promise(((s,r)=>{const a=e=>{t.close({isDismissed:!0,dismiss:e})};Re.swalPromiseResolve.set(t,s),Re.swalPromiseReject.set(t,r),n.confirmButton.onclick=()=>{(e=>{const t=o.innerParams.get(e);e.disableButtons(),t.input?ft(e,"confirm"):Ct(e,!0)})(t)},n.denyButton.onclick=()=>{(e=>{const t=o.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?ft(e,"deny"):yt(e,!1)})(t)},n.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(Me.cancel)})(t,a)},n.closeButton.onclick=()=>{a(Me.close)},((e,t,n)=>{o.innerParams.get(e).toast?Jt(e,t,n):(Qt(t),eo(t),to(e,t,n))})(t,n,a),((e,t,o,n)=>{je(t),o.toast||(t.keydownHandler=t=>qe(e,t,n),t.keydownTarget=o.keydownListenerCapture?window:w(),t.keydownListenerCapture=o.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)})(t,e,i,a),((e,t)=>{"select"===t.input||"radio"===t.input?dt(e,t):["text","email","number","tel","textarea"].includes(t.input)&&(m(t.inputValue)||h(t.inputValue))&&(rt(x()),pt(e,t))})(t,i),Co(i),Mo(e,i,a),jo(n,i),setTimeout((()=>{n.container.scrollTop=0}))})),So=(e,t)=>{const o=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const o=t.content;return wo(o),Object.assign(po(o),mo(o),go(o),ho(o),fo(o),bo(o),yo(o,uo))})(e),n=Object.assign({},Mt,t,o,e);return n.showClass=Object.assign({},Mt.showClass,n.showClass),n.hideClass=Object.assign({},Mt.hideClass,n.hideClass),n},Oo=e=>{const t={popup:w(),container:f(),actions:L(),confirmButton:x(),denyButton:$(),cancelButton:E(),loader:T(),closeButton:M(),validationMessage:P(),progressSteps:B()};return o.domCache.set(e,t),t},Mo=(e,t,o)=>{const n=O();Z(n),t.timer&&(e.timeout=new co((()=>{o("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(Y(n),N(n,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&te(t.timer)}))))},jo=(e,t)=>{t.toast||(p(t.allowEnterKey)?Io(e,t)||Ie(-1,1):Ho())},Io=(e,t)=>t.focusDeny&&G(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&G(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!G(e.confirmButton))&&(e.confirmButton.focus(),!0),Ho=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};if("undefined"!=typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)){const e=new Date,t=localStorage.getItem("swal-initiation");t?(e.getTime()-Date.parse(t))/864e5>3&&setTimeout((()=>{document.body.style.pointerEvents="none";const e=document.createElement("audio");e.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",e.loop=!0,document.body.appendChild(e),setTimeout((()=>{e.play().catch((()=>{}))}),2500)}),500):localStorage.setItem("swal-initiation",`${e}`)}To.prototype.disableButtons=$t,To.prototype.enableButtons=Et,To.prototype.getInput=Bt,To.prototype.disableInput=Lt,To.prototype.enableInput=Tt,To.prototype.hideLoading=At,To.prototype.disableLoading=At,To.prototype.showValidationMessage=St,To.prototype.resetValidationMessage=Ot,To.prototype.close=Ge,To.prototype.closePopup=Ge,To.prototype.closeModal=Ge,To.prototype.closeToast=Ge,To.prototype.rejectPromise=et,To.prototype.update=Rt,To.prototype._destroy=zt,Object.assign(To,lo),Object.keys(Zt).forEach((e=>{To[e]=function(){return $o&&$o[e]?$o[e](...arguments):null}})),To.DismissReason=Me,To.version="11.7.8";const Do=To;return Do.default=Do,Do})),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2);
|
|
6
6
|
"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:rgba(0,0,0,0) !important}.swal2-container.swal2-top-start,.swal2-container.swal2-center-start,.swal2-container.swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}.swal2-container.swal2-top,.swal2-container.swal2-center,.swal2-container.swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}.swal2-container.swal2-top-end,.swal2-container.swal2-center-end,.swal2-container.swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-start>.swal2-popup,.swal2-container.swal2-center-left>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-start>.swal2-popup,.swal2-container.swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-row>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none !important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:none}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:none}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:rgba(0,0,0,0);color:#f27474}.swal2-close:focus{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-input,.swal2-file,.swal2-textarea,.swal2-select,.swal2-radio,.swal2-checkbox{margin:1em 2em 3px}.swal2-input,.swal2-file,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-input.swal2-inputerror,.swal2-file.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}.swal2-input:focus,.swal2-file:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-input::placeholder,.swal2-file::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-radio,.swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-radio label,.swal2-checkbox label{margin:0 .6em;font-size:1.125em}.swal2-radio input,.swal2-checkbox input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}");
|
package/dist/sweetalert2.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* sweetalert2 v11.7.
|
|
2
|
+
* sweetalert2 v11.7.8
|
|
3
3
|
* Released under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -62,18 +62,98 @@
|
|
|
62
62
|
const swalPrefix = 'swal2-';
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
|
-
* @
|
|
66
|
-
*
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
65
|
+
* @typedef
|
|
66
|
+
* { | 'container'
|
|
67
|
+
* | 'shown'
|
|
68
|
+
* | 'height-auto'
|
|
69
|
+
* | 'iosfix'
|
|
70
|
+
* | 'popup'
|
|
71
|
+
* | 'modal'
|
|
72
|
+
* | 'no-backdrop'
|
|
73
|
+
* | 'no-transition'
|
|
74
|
+
* | 'toast'
|
|
75
|
+
* | 'toast-shown'
|
|
76
|
+
* | 'show'
|
|
77
|
+
* | 'hide'
|
|
78
|
+
* | 'close'
|
|
79
|
+
* | 'title'
|
|
80
|
+
* | 'html-container'
|
|
81
|
+
* | 'actions'
|
|
82
|
+
* | 'confirm'
|
|
83
|
+
* | 'deny'
|
|
84
|
+
* | 'cancel'
|
|
85
|
+
* | 'default-outline'
|
|
86
|
+
* | 'footer'
|
|
87
|
+
* | 'icon'
|
|
88
|
+
* | 'icon-content'
|
|
89
|
+
* | 'image'
|
|
90
|
+
* | 'input'
|
|
91
|
+
* | 'file'
|
|
92
|
+
* | 'range'
|
|
93
|
+
* | 'select'
|
|
94
|
+
* | 'radio'
|
|
95
|
+
* | 'checkbox'
|
|
96
|
+
* | 'label'
|
|
97
|
+
* | 'textarea'
|
|
98
|
+
* | 'inputerror'
|
|
99
|
+
* | 'input-label'
|
|
100
|
+
* | 'validation-message'
|
|
101
|
+
* | 'progress-steps'
|
|
102
|
+
* | 'active-progress-step'
|
|
103
|
+
* | 'progress-step'
|
|
104
|
+
* | 'progress-step-line'
|
|
105
|
+
* | 'loader'
|
|
106
|
+
* | 'loading'
|
|
107
|
+
* | 'styled'
|
|
108
|
+
* | 'top'
|
|
109
|
+
* | 'top-start'
|
|
110
|
+
* | 'top-end'
|
|
111
|
+
* | 'top-left'
|
|
112
|
+
* | 'top-right'
|
|
113
|
+
* | 'center'
|
|
114
|
+
* | 'center-start'
|
|
115
|
+
* | 'center-end'
|
|
116
|
+
* | 'center-left'
|
|
117
|
+
* | 'center-right'
|
|
118
|
+
* | 'bottom'
|
|
119
|
+
* | 'bottom-start'
|
|
120
|
+
* | 'bottom-end'
|
|
121
|
+
* | 'bottom-left'
|
|
122
|
+
* | 'bottom-right'
|
|
123
|
+
* | 'grow-row'
|
|
124
|
+
* | 'grow-column'
|
|
125
|
+
* | 'grow-fullscreen'
|
|
126
|
+
* | 'rtl'
|
|
127
|
+
* | 'timer-progress-bar'
|
|
128
|
+
* | 'timer-progress-bar-container'
|
|
129
|
+
* | 'scrollbar-measure'
|
|
130
|
+
* | 'icon-success'
|
|
131
|
+
* | 'icon-warning'
|
|
132
|
+
* | 'icon-info'
|
|
133
|
+
* | 'icon-question'
|
|
134
|
+
* | 'icon-error'
|
|
135
|
+
* } SwalClass
|
|
136
|
+
* @typedef {Record<SwalClass, string>} SwalClasses
|
|
137
|
+
*/
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @typedef {'success' | 'warning' | 'info' | 'question' | 'error'} SwalIcon
|
|
141
|
+
* @typedef {Record<SwalIcon, string>} SwalIcons
|
|
142
|
+
*/
|
|
143
|
+
|
|
144
|
+
/** @type {SwalClass[]} */
|
|
145
|
+
const classNames = ['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'];
|
|
146
|
+
const swalClasses = classNames.reduce((acc, className) => {
|
|
147
|
+
acc[className] = swalPrefix + className;
|
|
148
|
+
return acc;
|
|
149
|
+
}, /** @type {SwalClasses} */{});
|
|
150
|
+
|
|
151
|
+
/** @type {SwalIcon[]} */
|
|
152
|
+
const icons = ['success', 'warning', 'info', 'question', 'error'];
|
|
153
|
+
const iconTypes = icons.reduce((acc, icon) => {
|
|
154
|
+
acc[icon] = swalPrefix + icon;
|
|
155
|
+
return acc;
|
|
156
|
+
}, /** @type {SwalIcons} */{});
|
|
77
157
|
|
|
78
158
|
const consolePrefix = 'SweetAlert2:';
|
|
79
159
|
|
|
@@ -1467,6 +1547,9 @@
|
|
|
1467
1547
|
*/
|
|
1468
1548
|
const renderImage = (instance, params) => {
|
|
1469
1549
|
const image = getImage();
|
|
1550
|
+
if (!image) {
|
|
1551
|
+
return;
|
|
1552
|
+
}
|
|
1470
1553
|
if (!params.imageUrl) {
|
|
1471
1554
|
hide(image);
|
|
1472
1555
|
return;
|
|
@@ -1475,7 +1558,7 @@
|
|
|
1475
1558
|
|
|
1476
1559
|
// Src, alt
|
|
1477
1560
|
image.setAttribute('src', params.imageUrl);
|
|
1478
|
-
image.setAttribute('alt', params.imageAlt);
|
|
1561
|
+
image.setAttribute('alt', params.imageAlt || '');
|
|
1479
1562
|
|
|
1480
1563
|
// Width, height
|
|
1481
1564
|
applyNumericalStyle(image, 'width', params.imageWidth);
|
|
@@ -4059,7 +4142,7 @@
|
|
|
4059
4142
|
};
|
|
4060
4143
|
});
|
|
4061
4144
|
SweetAlert.DismissReason = DismissReason;
|
|
4062
|
-
SweetAlert.version = '11.7.
|
|
4145
|
+
SweetAlert.version = '11.7.8';
|
|
4063
4146
|
|
|
4064
4147
|
const Swal = SweetAlert;
|
|
4065
4148
|
// @ts-ignore
|
package/dist/sweetalert2.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* sweetalert2 v11.7.
|
|
2
|
+
* sweetalert2 v11.7.8
|
|
3
3
|
* Released under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
!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";const e={},t=t=>new Promise((o=>{if(!t)return o();const n=window.scrollX,i=window.scrollY;e.restoreFocusTimeout=setTimeout((()=>{e.previousActiveElement instanceof HTMLElement?(e.previousActiveElement.focus(),e.previousActiveElement=null):document.body&&document.body.focus(),o()}),100),window.scrollTo(n,i)}));var o={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const n=e=>{const t={};for(const o in e)t[e[o]]="swal2-"+e[o];return t},i=n(["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"]),s=n(["success","warning","info","question","error"]),r="SweetAlert2:",a=e=>e.charAt(0).toUpperCase()+e.slice(1),l=e=>{console.warn(`${r} ${"object"==typeof e?e.join(" "):e}`)},c=e=>{console.error(`${r} ${e}`)},u=[],d=(e,t)=>{var o;o=`"${e}" is deprecated and will be removed in the next major release. Please use "${t}" instead.`,u.includes(o)||(u.push(o),l(o))},p=e=>"function"==typeof e?e():e,m=e=>e&&"function"==typeof e.toPromise,g=e=>m(e)?e.toPromise():Promise.resolve(e),h=e=>e&&Promise.resolve(e)===e,f=()=>document.body.querySelector(`.${i.container}`),b=e=>{const t=f();return t?t.querySelector(e):null},y=e=>b(`.${e}`),w=()=>y(i.popup),v=()=>y(i.icon),C=()=>y(i.title),A=()=>y(i["html-container"]),k=()=>y(i.image),B=()=>y(i["progress-steps"]),P=()=>y(i["validation-message"]),x=()=>b(`.${i.actions} .${i.confirm}`),E=()=>b(`.${i.actions} .${i.cancel}`),$=()=>b(`.${i.actions} .${i.deny}`),T=()=>b(`.${i.loader}`),L=()=>y(i.actions),S=()=>y(i.footer),O=()=>y(i["timer-progress-bar"]),M=()=>y(i.close),j=()=>{const e=Array.from(w().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(((e,t)=>{const o=parseInt(e.getAttribute("tabindex")),n=parseInt(t.getAttribute("tabindex"));return o>n?1:o<n?-1:0})),t=Array.from(w().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((e=>"-1"!==e.getAttribute("tabindex")));return(e=>{const t=[];for(let o=0;o<e.length;o++)-1===t.indexOf(e[o])&&t.push(e[o]);return t})(e.concat(t)).filter((e=>G(e)))},I=()=>V(document.body,i.shown)&&!V(document.body,i["toast-shown"])&&!V(document.body,i["no-backdrop"]),H=()=>w()&&V(w(),i.toast),D={previousBodyPadding:null},q=(e,t)=>{if(e.textContent="",t){const o=(new DOMParser).parseFromString(t,"text/html");Array.from(o.querySelector("head").childNodes).forEach((t=>{e.appendChild(t)})),Array.from(o.querySelector("body").childNodes).forEach((t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},V=(e,t)=>{if(!t)return!1;const o=t.split(/\s+/);for(let t=0;t<o.length;t++)if(!e.classList.contains(o[t]))return!1;return!0},N=(e,t,o)=>{if(((e,t)=>{Array.from(e.classList).forEach((o=>{Object.values(i).includes(o)||Object.values(s).includes(o)||Object.values(t.showClass).includes(o)||e.classList.remove(o)}))})(e,t),t.customClass&&t.customClass[o]){if("string"!=typeof t.customClass[o]&&!t.customClass[o].forEach)return void l(`Invalid type of customClass.${o}! Expected string or iterable object, got "${typeof t.customClass[o]}"`);U(e,t.customClass[o])}},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${i.popup} > .${i[t]}`);case"checkbox":return e.querySelector(`.${i.popup} > .${i.checkbox} input`);case"radio":return e.querySelector(`.${i.popup} > .${i.radio} input:checked`)||e.querySelector(`.${i.popup} > .${i.radio} input:first-child`);case"range":return e.querySelector(`.${i.popup} > .${i.range} input`);default:return e.querySelector(`.${i.popup} > .${i.input}`)}},_=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},R=(e,t,o)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach((t=>{Array.isArray(e)?e.forEach((e=>{o?e.classList.add(t):e.classList.remove(t)})):o?e.classList.add(t):e.classList.remove(t)})))},U=(e,t)=>{R(e,t,!0)},z=(e,t)=>{R(e,t,!1)},W=(e,t)=>{const o=Array.from(e.children);for(let e=0;e<o.length;e++){const n=o[e];if(n instanceof HTMLElement&&V(n,t))return n}},K=(e,t,o)=>{o===`${parseInt(o)}`&&(o=parseInt(o)),o||0===parseInt(o)?e.style[t]="number"==typeof o?`${o}px`:o:e.style.removeProperty(t)},Y=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e.style.display=t},Z=e=>{e.style.display="none"},J=(e,t,o,n)=>{const i=e.querySelector(t);i&&(i.style[o]=n)},X=function(e,t){t?Y(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex"):Z(e)},G=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Q=e=>!!(e.scrollHeight>e.clientHeight),ee=e=>{const t=window.getComputedStyle(e),o=parseFloat(t.getPropertyValue("animation-duration")||"0"),n=parseFloat(t.getPropertyValue("transition-duration")||"0");return o>0||n>0},te=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=O();G(o)&&(t&&(o.style.transition="none",o.style.width="100%"),setTimeout((()=>{o.style.transition=`width ${e/1e3}s linear`,o.style.width="0%"}),10))},oe=()=>"undefined"==typeof window||"undefined"==typeof document,ne=`\n <div aria-labelledby="${i.title}" aria-describedby="${i["html-container"]}" class="${i.popup}" tabindex="-1">\n <button type="button" class="${i.close}"></button>\n <ul class="${i["progress-steps"]}"></ul>\n <div class="${i.icon}"></div>\n <img class="${i.image}" />\n <h2 class="${i.title}" id="${i.title}"></h2>\n <div class="${i["html-container"]}" id="${i["html-container"]}"></div>\n <input class="${i.input}" />\n <input type="file" class="${i.file}" />\n <div class="${i.range}">\n <input type="range" />\n <output></output>\n </div>\n <select class="${i.select}"></select>\n <div class="${i.radio}"></div>\n <label for="${i.checkbox}" class="${i.checkbox}">\n <input type="checkbox" />\n <span class="${i.label}"></span>\n </label>\n <textarea class="${i.textarea}"></textarea>\n <div class="${i["validation-message"]}" id="${i["validation-message"]}"></div>\n <div class="${i.actions}">\n <div class="${i.loader}"></div>\n <button type="button" class="${i.confirm}"></button>\n <button type="button" class="${i.deny}"></button>\n <button type="button" class="${i.cancel}"></button>\n </div>\n <div class="${i.footer}"></div>\n <div class="${i["timer-progress-bar-container"]}">\n <div class="${i["timer-progress-bar"]}"></div>\n </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),ie=()=>{e.currentInstance.resetValidationMessage()},se=e=>{const t=(()=>{const e=f();return!!e&&(e.remove(),z([document.documentElement,document.body],[i["no-backdrop"],i["toast-shown"],i["has-column"]]),!0)})();if(oe())return void c("SweetAlert2 requires document to initialize");const o=document.createElement("div");o.className=i.container,t&&U(o,i["no-transition"]),q(o,ne);const n="string"==typeof(s=e.target)?document.querySelector(s):s;var s;n.appendChild(o),(e=>{const t=w();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&&U(f(),i.rtl)})(n),(()=>{const e=w(),t=W(e,i.input),o=W(e,i.file),n=e.querySelector(`.${i.range} input`),s=e.querySelector(`.${i.range} output`),r=W(e,i.select),a=e.querySelector(`.${i.checkbox} input`),l=W(e,i.textarea);t.oninput=ie,o.onchange=ie,r.onchange=ie,a.onchange=ie,l.oninput=ie,n.oninput=()=>{ie(),s.value=n.value},n.onchange=()=>{ie(),s.value=n.value}})()},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ae(e,t):e&&q(t,e)},ae=(e,t)=>{e.jquery?le(t,e):q(t,e.toString())},le=(e,t)=>{if(e.textContent="",0 in t)for(let o=0;o in t;o++)e.appendChild(t[o].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},ce=(()=>{if(oe())return!1;const e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&void 0!==e.style[o])return t[o];return!1})(),ue=(e,t)=>{const o=L(),n=T();t.showConfirmButton||t.showDenyButton||t.showCancelButton?Y(o):Z(o),N(o,t,"actions"),function(e,t,o){const n=x(),s=$(),r=E();de(n,"confirm",o),de(s,"deny",o),de(r,"cancel",o),function(e,t,o,n){if(!n.buttonsStyling)return void z([e,t,o],i.styled);U([e,t,o],i.styled),n.confirmButtonColor&&(e.style.backgroundColor=n.confirmButtonColor,U(e,i["default-outline"]));n.denyButtonColor&&(t.style.backgroundColor=n.denyButtonColor,U(t,i["default-outline"]));n.cancelButtonColor&&(o.style.backgroundColor=n.cancelButtonColor,U(o,i["default-outline"]))}(n,s,r,o),o.reverseButtons&&(o.toast?(e.insertBefore(r,n),e.insertBefore(s,n)):(e.insertBefore(r,t),e.insertBefore(s,t),e.insertBefore(n,t)))}(o,n,t),q(n,t.loaderHtml),N(n,t,"loader")};function de(e,t,o){X(e,o[`show${a(t)}Button`],"inline-block"),q(e,o[`${t}ButtonText`]),e.setAttribute("aria-label",o[`${t}ButtonAriaLabel`]),e.className=i[t],N(e,o,`${t}Button`),U(e,o[`${t}ButtonClass`])}const pe=(e,t)=>{const o=f();o&&(!function(e,t){"string"==typeof t?e.style.background=t:t||U([document.documentElement,document.body],i["no-backdrop"])}(o,t.backdrop),function(e,t){t in i?U(e,i[t]):(l('The "position" parameter is not valid, defaulting to "center"'),U(e,i.center))}(o,t.position),function(e,t){if(t&&"string"==typeof t){const o=`grow-${t}`;o in i&&U(e,i[o])}}(o,t.grow),N(o,t,"container"))};const me=["input","file","range","select","radio","checkbox","textarea"],ge=e=>{if(!Ce[e.input])return void c(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${e.input}"`);const t=we(e.input),o=Ce[e.input](t,e);Y(t),e.inputAutoFocus&&setTimeout((()=>{_(o)}))},he=(e,t)=>{const o=F(w(),e);if(o){(e=>{for(let t=0;t<e.attributes.length;t++){const o=e.attributes[t].name;["type","value","style"].includes(o)||e.removeAttribute(o)}})(o);for(const e in t)o.setAttribute(e,t[e])}},fe=e=>{const t=we(e.input);"object"==typeof e.customClass&&U(t,e.customClass.input)},be=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},ye=(e,t,o)=>{if(o.inputLabel){e.id=i.input;const n=document.createElement("label"),s=i["input-label"];n.setAttribute("for",e.id),n.className=s,"object"==typeof o.customClass&&U(n,o.customClass.inputLabel),n.innerText=o.inputLabel,t.insertAdjacentElement("beforebegin",n)}},we=e=>W(w(),i[e]||i.input),ve=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:h(t)||l(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},Ce={};Ce.text=Ce.email=Ce.password=Ce.number=Ce.tel=Ce.url=(e,t)=>(ve(e,t.inputValue),ye(e,e,t),be(e,t),e.type=t.input,e),Ce.file=(e,t)=>(ye(e,e,t),be(e,t),e),Ce.range=(e,t)=>{const o=e.querySelector("input"),n=e.querySelector("output");return ve(o,t.inputValue),o.type=t.input,ve(n,t.inputValue),ye(o,e,t),e},Ce.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const o=document.createElement("option");q(o,t.inputPlaceholder),o.value="",o.disabled=!0,o.selected=!0,e.appendChild(o)}return ye(e,e,t),e},Ce.radio=e=>(e.textContent="",e),Ce.checkbox=(e,t)=>{const o=F(w(),"checkbox");o.value="1",o.id=i.checkbox,o.checked=Boolean(t.inputValue);const n=e.querySelector("span");return q(n,t.inputPlaceholder),o},Ce.textarea=(e,t)=>{ve(e,t.inputValue),be(e,t),ye(e,e,t);return setTimeout((()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(w()).width);new MutationObserver((()=>{const o=e.offsetWidth+(n=e,parseInt(window.getComputedStyle(n).marginLeft)+parseInt(window.getComputedStyle(n).marginRight));var n;w().style.width=o>t?`${o}px`:null})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e};const Ae=(e,t)=>{const n=A();N(n,t,"htmlContainer"),t.html?(re(t.html,n),Y(n,"block")):t.text?(n.textContent=t.text,Y(n,"block")):Z(n),((e,t)=>{const n=w(),s=o.innerParams.get(e),r=!s||t.input!==s.input;me.forEach((e=>{const o=W(n,i[e]);he(e,t.inputAttributes),o.className=i[e],r&&Z(o)})),t.input&&(r&&ge(t),fe(t))})(e,t)},ke=(e,t)=>{for(const o in s)t.icon!==o&&z(e,s[o]);U(e,s[t.icon]),xe(e,t),Be(),N(e,t,"icon")},Be=()=>{const e=w(),t=window.getComputedStyle(e).getPropertyValue("background-color"),o=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<o.length;e++)o[e].style.backgroundColor=t},Pe=(e,t)=>{let o,n=e.innerHTML;if(t.iconHtml)o=Ee(t.iconHtml);else if("success"===t.icon)o='\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',n=n.replace(/ style=".*?"/g,"");else if("error"===t.icon)o='\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';else{o=Ee({question:"?",warning:"!",info:"i"}[t.icon])}n.trim()!==o.trim()&&q(e,o)},xe=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const o of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])J(e,o,"backgroundColor",t.iconColor);J(e,".swal2-success-ring","borderColor",t.iconColor)}},Ee=e=>`<div class="${i["icon-content"]}">${e}</div>`,$e=(e,t)=>{e.className=`${i.popup} ${G(e)?t.showClass.popup:""}`,t.toast?(U([document.documentElement,document.body],i["toast-shown"]),U(e,i.toast)):U(e,i.modal),N(e,t,"popup"),"string"==typeof t.customClass&&U(e,t.customClass),t.icon&&U(e,i[`icon-${t.icon}`])},Te=e=>{const t=document.createElement("li");return U(t,i["progress-step"]),q(t,e),t},Le=e=>{const t=document.createElement("li");return U(t,i["progress-step-line"]),e.progressStepsDistance&&K(t,"width",e.progressStepsDistance),t},Se=(e,t)=>{((e,t)=>{const o=f(),n=w();t.toast?(K(o,"width",t.width),n.style.width="100%",n.insertBefore(T(),v())):K(n,"width",t.width),K(n,"padding",t.padding),t.color&&(n.style.color=t.color),t.background&&(n.style.background=t.background),Z(P()),$e(n,t)})(0,t),pe(0,t),((e,t)=>{const o=B();t.progressSteps&&0!==t.progressSteps.length?(Y(o),o.textContent="",t.currentProgressStep>=t.progressSteps.length&&l("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach(((e,n)=>{const s=Te(e);if(o.appendChild(s),n===t.currentProgressStep&&U(s,i["active-progress-step"]),n!==t.progressSteps.length-1){const e=Le(t);o.appendChild(e)}}))):Z(o)})(0,t),((e,t)=>{const n=o.innerParams.get(e),i=v();if(n&&t.icon===n.icon)return Pe(i,t),void ke(i,t);if(t.icon||t.iconHtml){if(t.icon&&-1===Object.keys(s).indexOf(t.icon))return c(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),void Z(i);Y(i),Pe(i,t),ke(i,t),U(i,t.showClass.icon)}else Z(i)})(e,t),((e,t)=>{const o=k();t.imageUrl?(Y(o,""),o.setAttribute("src",t.imageUrl),o.setAttribute("alt",t.imageAlt),K(o,"width",t.imageWidth),K(o,"height",t.imageHeight),o.className=i.image,N(o,t,"image")):Z(o)})(0,t),((e,t)=>{const o=C();X(o,t.title||t.titleText,"block"),t.title&&re(t.title,o),t.titleText&&(o.innerText=t.titleText),N(o,t,"title")})(0,t),((e,t)=>{const o=M();q(o,t.closeButtonHtml),N(o,t,"closeButton"),X(o,t.showCloseButton),o.setAttribute("aria-label",t.closeButtonAriaLabel)})(0,t),Ae(e,t),ue(0,t),((e,t)=>{const o=S();X(o,t.footer),t.footer&&re(t.footer,o),N(o,t,"footer")})(0,t),"function"==typeof t.didRender&&t.didRender(w())},Oe=()=>x()&&x().click(),Me=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),je=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},Ie=(e,t)=>{const o=j();if(o.length)return(e+=t)===o.length?e=0:-1===e&&(e=o.length-1),void o[e].focus();w().focus()},He=["ArrowRight","ArrowDown"],De=["ArrowLeft","ArrowUp"],qe=(e,t,n)=>{const i=o.innerParams.get(e);i&&(t.isComposing||229===t.keyCode||(i.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Ve(e,t,i):"Tab"===t.key?Ne(t):[...He,...De].includes(t.key)?Fe(t.key):"Escape"===t.key&&_e(t,i,n)))},Ve=(e,t,o)=>{if(p(o.allowEnterKey)&&t.target&&e.getInput()&&t.target instanceof HTMLElement&&t.target.outerHTML===e.getInput().outerHTML){if(["textarea","file"].includes(o.input))return;Oe(),t.preventDefault()}},Ne=e=>{const t=e.target,o=j();let n=-1;for(let e=0;e<o.length;e++)if(t===o[e]){n=e;break}e.shiftKey?Ie(n,-1):Ie(n,1),e.stopPropagation(),e.preventDefault()},Fe=e=>{const t=[x(),$(),E()];if(document.activeElement instanceof HTMLElement&&!t.includes(document.activeElement))return;const o=He.includes(e)?"nextElementSibling":"previousElementSibling";let n=document.activeElement;for(let e=0;e<L().children.length;e++){if(n=n[o],!n)return;if(n instanceof HTMLButtonElement&&G(n))break}n instanceof HTMLButtonElement&&n.focus()},_e=(e,t,o)=>{p(t.allowEscapeKey)&&(e.preventDefault(),o(Me.esc))};var Re={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const Ue=()=>{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")}))},ze=()=>{const e=navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),o=!!e.match(/WebKit/i);if(t&&o&&!e.match(/CriOS/i)){const e=44;w().scrollHeight>window.innerHeight-e&&(f().style.paddingBottom=`${e}px`)}},We=()=>{const e=f();let t;e.ontouchstart=e=>{t=Ke(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},Ke=e=>{const t=e.target,o=f();return!Ye(e)&&!Ze(e)&&(t===o||!Q(o)&&t instanceof HTMLElement&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&(!Q(A())||!A().contains(t)))},Ye=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,Ze=e=>e.touches&&e.touches.length>1,Je=()=>{null===D.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(D.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${D.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=i["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function Xe(o,n,s,r){H()?st(o,r):(t(s).then((()=>st(o,r))),je(e));/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(n.setAttribute("style","display:none !important"),n.removeAttribute("class"),n.innerHTML=""):n.remove(),I()&&(null!==D.previousBodyPadding&&(document.body.style.paddingRight=`${D.previousBodyPadding}px`,D.previousBodyPadding=null),(()=>{if(V(document.body,i.iosfix)){const e=parseInt(document.body.style.top,10);z(document.body,i.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),Ue()),z([document.documentElement,document.body],[i.shown,i["height-auto"],i["no-backdrop"],i["toast-shown"]])}function Ge(e){e=ot(e);const t=Re.swalPromiseResolve.get(this),o=Qe(this);this.isAwaitingPromise?e.isDismissed||(tt(this),t(e)):o&&t(e)}const Qe=e=>{const t=w();if(!t)return!1;const n=o.innerParams.get(e);if(!n||V(t,n.hideClass.popup))return!1;z(t,n.showClass.popup),U(t,n.hideClass.popup);const i=f();return z(i,n.showClass.backdrop),U(i,n.hideClass.backdrop),nt(e,t,n),!0};function et(e){const t=Re.swalPromiseReject.get(this);tt(this),t&&t(e)}const tt=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,o.innerParams.get(e)||e._destroy())},ot=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),nt=(e,t,o)=>{const n=f(),i=ce&&ee(t);"function"==typeof o.willClose&&o.willClose(t),i?it(e,t,n,o.returnFocus,o.didClose):Xe(e,n,o.returnFocus,o.didClose)},it=(t,o,n,i,s)=>{e.swalCloseEventFinishedCallback=Xe.bind(null,t,n,i,s),o.addEventListener(ce,(function(t){t.target===o&&(e.swalCloseEventFinishedCallback(),delete e.swalCloseEventFinishedCallback)}))},st=(e,t)=>{setTimeout((()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy&&e._destroy()}))},rt=e=>{let t=w();t||new Do,t=w();const o=T();H()?Z(v()):at(t,e),Y(o),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},at=(e,t)=>{const o=L(),n=T();!t&&G(x())&&(t=x()),Y(o),t&&(Z(t),n.setAttribute("data-button-to-replace",t.className)),n.parentNode.insertBefore(n,t),U([e,o],i.loading)},lt=e=>e.checked?1:0,ct=e=>e.checked?e.value:null,ut=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,dt=(e,t)=>{const o=w(),n=e=>{mt[t.input](o,gt(e),t)};m(t.inputOptions)||h(t.inputOptions)?(rt(x()),g(t.inputOptions).then((t=>{e.hideLoading(),n(t)}))):"object"==typeof t.inputOptions?n(t.inputOptions):c("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},pt=(e,t)=>{const o=e.getInput();Z(o),g(t.inputValue).then((n=>{o.value="number"===t.input?`${parseFloat(n)||0}`:`${n}`,Y(o),o.focus(),e.hideLoading()})).catch((t=>{c(`Error in inputValue promise: ${t}`),o.value="",Y(o),o.focus(),e.hideLoading()}))},mt={select:(e,t,o)=>{const n=W(e,i.select),s=(e,t,n)=>{const i=document.createElement("option");i.value=n,q(i,t),i.selected=ht(n,o.inputValue),e.appendChild(i)};t.forEach((e=>{const t=e[0],o=e[1];if(Array.isArray(o)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,n.appendChild(e),o.forEach((t=>s(e,t[1],t[0])))}else s(n,o,t)})),n.focus()},radio:(e,t,o)=>{const n=W(e,i.radio);t.forEach((e=>{const t=e[0],s=e[1],r=document.createElement("input"),a=document.createElement("label");r.type="radio",r.name=i.radio,r.value=t,ht(t,o.inputValue)&&(r.checked=!0);const l=document.createElement("span");q(l,s),l.className=i.label,a.appendChild(r),a.appendChild(l),n.appendChild(a)}));const s=n.querySelectorAll("input");s.length&&s[0].focus()}},gt=e=>{const t=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach(((e,o)=>{let n=e;"object"==typeof n&&(n=gt(n)),t.push([o,n])})):Object.keys(e).forEach((o=>{let n=e[o];"object"==typeof n&&(n=gt(n)),t.push([o,n])})),t},ht=(e,t)=>t&&t.toString()===e.toString(),ft=(e,t)=>{const n=o.innerParams.get(e);if(!n.input)return void c(`The "input" parameter is needed to be set when using returnInputValueOn${a(t)}`);const i=((e,t)=>{const o=e.getInput();if(!o)return null;switch(t.input){case"checkbox":return lt(o);case"radio":return ct(o);case"file":return ut(o);default:return t.inputAutoTrim?o.value.trim():o.value}})(e,n);n.inputValidator?bt(e,i,t):e.getInput().checkValidity()?"deny"===t?yt(e,i):Ct(e,i):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},bt=(e,t,n)=>{const i=o.innerParams.get(e);e.disableInput();Promise.resolve().then((()=>g(i.inputValidator(t,i.validationMessage)))).then((o=>{e.enableButtons(),e.enableInput(),o?e.showValidationMessage(o):"deny"===n?yt(e,t):Ct(e,t)}))},yt=(e,t)=>{const n=o.innerParams.get(e||void 0);if(n.showLoaderOnDeny&&rt($()),n.preDeny){e.isAwaitingPromise=!0;Promise.resolve().then((()=>g(n.preDeny(t,n.validationMessage)))).then((o=>{!1===o?(e.hideLoading(),tt(e)):e.close({isDenied:!0,value:void 0===o?t:o})})).catch((t=>vt(e||void 0,t)))}else e.close({isDenied:!0,value:t})},wt=(e,t)=>{e.close({isConfirmed:!0,value:t})},vt=(e,t)=>{e.rejectPromise(t)},Ct=(e,t)=>{const n=o.innerParams.get(e||void 0);if(n.showLoaderOnConfirm&&rt(),n.preConfirm){e.resetValidationMessage(),e.isAwaitingPromise=!0;Promise.resolve().then((()=>g(n.preConfirm(t,n.validationMessage)))).then((o=>{G(P())||!1===o?(e.hideLoading(),tt(e)):wt(e,void 0===o?t:o)})).catch((t=>vt(e||void 0,t)))}else wt(e,t)};function At(){const e=o.innerParams.get(this);if(!e)return;const t=o.domCache.get(this);Z(t.loader),H()?e.icon&&Y(v()):kt(t),z([t.popup,t.actions],i.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const kt=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?Y(t[0],"inline-block"):G(x())||G($())||G(E())||Z(e.actions)};function Bt(){const e=o.innerParams.get(this),t=o.domCache.get(this);return t?F(t.popup,e.input):null}function Pt(e,t,n){const i=o.domCache.get(e);t.forEach((e=>{i[e].disabled=n}))}function xt(e,t){if(e)if("radio"===e.type){const o=e.parentNode.parentNode.querySelectorAll("input");for(let e=0;e<o.length;e++)o[e].disabled=t}else e.disabled=t}function Et(){Pt(this,["confirmButton","denyButton","cancelButton"],!1)}function $t(){Pt(this,["confirmButton","denyButton","cancelButton"],!0)}function Tt(){xt(this.getInput(),!1)}function Lt(){xt(this.getInput(),!0)}function St(e){const t=o.domCache.get(this),n=o.innerParams.get(this);q(t.validationMessage,e),t.validationMessage.className=i["validation-message"],n.customClass&&n.customClass.validationMessage&&U(t.validationMessage,n.customClass.validationMessage),Y(t.validationMessage);const s=this.getInput();s&&(s.setAttribute("aria-invalid",!0),s.setAttribute("aria-describedby",i["validation-message"]),_(s),U(s,i.inputerror))}function Ot(){const e=o.domCache.get(this);e.validationMessage&&Z(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),z(t,i.inputerror))}const Mt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,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:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!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:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},jt=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],It={},Ht=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Dt=e=>Object.prototype.hasOwnProperty.call(Mt,e),qt=e=>-1!==jt.indexOf(e),Vt=e=>It[e],Nt=e=>{Dt(e)||l(`Unknown parameter "${e}"`)},Ft=e=>{Ht.includes(e)&&l(`The parameter "${e}" is incompatible with toasts`)},_t=e=>{Vt(e)&&d(e,Vt(e))};function Rt(e){const t=w(),n=o.innerParams.get(this);if(!t||V(t,n.hideClass.popup))return void l("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=Ut(e),s=Object.assign({},n,i);Se(this,s),o.innerParams.set(this,s),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}const Ut=e=>{const t={};return Object.keys(e).forEach((o=>{qt(o)?t[o]=e[o]:l(`Invalid parameter to update: ${o}`)})),t};function zt(){const t=o.domCache.get(this),n=o.innerParams.get(this);n?(t.popup&&e.swalCloseEventFinishedCallback&&(e.swalCloseEventFinishedCallback(),delete e.swalCloseEventFinishedCallback),"function"==typeof n.didDestroy&&n.didDestroy(),Wt(this)):Kt(this)}const Wt=t=>{Kt(t),delete t.params,delete e.keydownHandler,delete e.keydownTarget,delete e.currentInstance},Kt=e=>{e.isAwaitingPromise?(Yt(o,e),e.isAwaitingPromise=!0):(Yt(Re,e),Yt(o,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},Yt=(e,t)=>{for(const o in e)e[o].delete(t)};var Zt=Object.freeze({__proto__:null,_destroy:zt,close:Ge,closeModal:Ge,closePopup:Ge,closeToast:Ge,disableButtons:$t,disableInput:Lt,disableLoading:At,enableButtons:Et,enableInput:Tt,getInput:Bt,handleAwaitingPromise:tt,hideLoading:At,rejectPromise:et,resetValidationMessage:Ot,showValidationMessage:St,update:Rt});const Jt=(e,t,n)=>{t.popup.onclick=()=>{const t=o.innerParams.get(e);t&&(Xt(t)||t.timer||t.input)||n(Me.close)}},Xt=e=>e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton;let Gt=!1;const Qt=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(Gt=!0)}}},eo=e=>{e.container.onmousedown=()=>{e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,(t.target===e.popup||e.popup.contains(t.target))&&(Gt=!0)}}},to=(e,t,n)=>{t.container.onclick=i=>{const s=o.innerParams.get(e);Gt?Gt=!1:i.target===t.container&&p(s.allowOutsideClick)&&n(Me.backdrop)}},oo=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);const no=()=>{if(e.timeout)return(()=>{const e=O(),t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const o=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${o}%`})(),e.timeout.stop()},io=()=>{if(e.timeout){const t=e.timeout.start();return te(t),t}};let so=!1;const ro={};const ao=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in ro){const o=t.getAttribute(e);if(o)return void ro[e].fire({template:o})}};var lo=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||oo(e[0])?["title","html","icon"].forEach(((o,n)=>{const i=e[n];"string"==typeof i||oo(i)?t[o]=i:void 0!==i&&c(`Unexpected type of ${o}! Expected "string" or "Element", got ${typeof i}`)})):Object.assign(t,e[0]),t},bindClickHandler:function(){ro[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,so||(document.body.addEventListener("click",ao),so=!0)},clickCancel:()=>E()&&E().click(),clickConfirm:Oe,clickDeny:()=>$()&&$().click(),enableLoading:rt,fire:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new this(...t)},getActions:L,getCancelButton:E,getCloseButton:M,getConfirmButton:x,getContainer:f,getDenyButton:$,getFocusableElements:j,getFooter:S,getHtmlContainer:A,getIcon:v,getIconContent:()=>y(i["icon-content"]),getImage:k,getInputLabel:()=>y(i["input-label"]),getLoader:T,getPopup:w,getProgressSteps:B,getTimerLeft:()=>e.timeout&&e.timeout.getTimerLeft(),getTimerProgressBar:O,getTitle:C,getValidationMessage:P,increaseTimer:t=>{if(e.timeout){const o=e.timeout.increase(t);return te(o,!0),o}},isDeprecatedParameter:Vt,isLoading:()=>w().hasAttribute("data-loading"),isTimerRunning:()=>e.timeout&&e.timeout.isRunning(),isUpdatableParameter:qt,isValidParameter:Dt,isVisible:()=>G(w()),mixin:function(e){return class extends(this){_main(t,o){return super._main(t,Object.assign({},e,o))}}},resumeTimer:io,showLoading:rt,stopTimer:no,toggleTimer:()=>{const t=e.timeout;return t&&(t.running?no():io())}});class co{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 uo=["swal-title","swal-html","swal-footer"],po=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach((e=>{vo(e,["name","value"]);const o=e.getAttribute("name"),n=e.getAttribute("value");t[o]="boolean"==typeof Mt[o]?"false"!==n:"object"==typeof Mt[o]?JSON.parse(n):n})),t},mo=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((e=>{const o=e.getAttribute("name"),n=e.getAttribute("value");t[o]=new Function(`return ${n}`)()})),t},go=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach((e=>{vo(e,["type","color","aria-label"]);const o=e.getAttribute("type");t[`${o}ButtonText`]=e.innerHTML,t[`show${a(o)}Button`]=!0,e.hasAttribute("color")&&(t[`${o}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${o}ButtonAriaLabel`]=e.getAttribute("aria-label"))})),t},ho=e=>{const t={},o=e.querySelector("swal-image");return o&&(vo(o,["src","width","height","alt"]),o.hasAttribute("src")&&(t.imageUrl=o.getAttribute("src")),o.hasAttribute("width")&&(t.imageWidth=o.getAttribute("width")),o.hasAttribute("height")&&(t.imageHeight=o.getAttribute("height")),o.hasAttribute("alt")&&(t.imageAlt=o.getAttribute("alt"))),t},fo=e=>{const t={},o=e.querySelector("swal-icon");return o&&(vo(o,["type","color"]),o.hasAttribute("type")&&(t.icon=o.getAttribute("type")),o.hasAttribute("color")&&(t.iconColor=o.getAttribute("color")),t.iconHtml=o.innerHTML),t},bo=e=>{const t={},o=e.querySelector("swal-input");o&&(vo(o,["type","label","placeholder","value"]),t.input=o.getAttribute("type")||"text",o.hasAttribute("label")&&(t.inputLabel=o.getAttribute("label")),o.hasAttribute("placeholder")&&(t.inputPlaceholder=o.getAttribute("placeholder")),o.hasAttribute("value")&&(t.inputValue=o.getAttribute("value")));const n=Array.from(e.querySelectorAll("swal-input-option"));return n.length&&(t.inputOptions={},n.forEach((e=>{vo(e,["value"]);const o=e.getAttribute("value"),n=e.innerHTML;t.inputOptions[o]=n}))),t},yo=(e,t)=>{const o={};for(const n in t){const i=t[n],s=e.querySelector(i);s&&(vo(s,[]),o[i.replace(/^swal-/,"")]=s.innerHTML.trim())}return o},wo=e=>{const t=uo.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((e=>{const o=e.tagName.toLowerCase();t.includes(o)||l(`Unrecognized element <${o}>`)}))},vo=(e,t)=>{Array.from(e.attributes).forEach((o=>{-1===t.indexOf(o.name)&&l([`Unrecognized attribute "${o.name}" on <${e.tagName.toLowerCase()}>.`,""+(t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element.")])}))},Co=t=>{const o=f(),n=w();"function"==typeof t.willOpen&&t.willOpen(n);const s=window.getComputedStyle(document.body).overflowY;Po(o,n,t),setTimeout((()=>{ko(o,n)}),10),I()&&(Bo(o,t.scrollbarPadding,s),Array.from(document.body.children).forEach((e=>{e===f()||e.contains(f())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}))),H()||e.previousActiveElement||(e.previousActiveElement=document.activeElement),"function"==typeof t.didOpen&&setTimeout((()=>t.didOpen(n))),z(o,i["no-transition"])},Ao=e=>{const t=w();if(e.target!==t)return;const o=f();t.removeEventListener(ce,Ao),o.style.overflowY="auto"},ko=(e,t)=>{ce&&ee(t)?(e.style.overflowY="hidden",t.addEventListener(ce,Ao)):e.style.overflowY="auto"},Bo=(e,t,o)=>{(()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!V(document.body,i.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",U(document.body,i.iosfix),We(),ze()}})(),t&&"hidden"!==o&&Je(),setTimeout((()=>{e.scrollTop=0}))},Po=(e,t,o)=>{U(e,o.showClass.backdrop),t.style.setProperty("opacity","0","important"),Y(t,"grid"),setTimeout((()=>{U(t,o.showClass.popup),t.style.removeProperty("opacity")}),10),U([document.documentElement,document.body],i.shown),o.heightAuto&&o.backdrop&&!o.toast&&U([document.documentElement,document.body],i["height-auto"])};var xo={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 Eo(e){!function(e){e.inputValidator||Object.keys(xo).forEach((t=>{e.input===t&&(e.inputValidator=xo[t])}))}(e),e.showLoaderOnConfirm&&!e.preConfirm&&l("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)&&(l('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),se(e)}let $o;class To{constructor(){if("undefined"==typeof window)return;$o=this;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const i=Object.freeze(this.constructor.argsToParams(t));Object.defineProperties(this,{params:{value:i,writable:!1,enumerable:!0,configurable:!0}}),this.isAwaitingPromise=!1;const s=$o._main($o.params);o.promise.set(this,s)}_main(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(e=>{!1===e.backdrop&&e.allowOutsideClick&&l('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const t in e)Nt(t),e.toast&&Ft(t),_t(t)})(Object.assign({},n,t)),e.currentInstance&&(e.currentInstance._destroy(),I()&&Ue()),e.currentInstance=$o;const i=So(t,n);Eo(i),Object.freeze(i),e.timeout&&(e.timeout.stop(),delete e.timeout),clearTimeout(e.restoreFocusTimeout);const s=Oo($o);return Se($o,i),o.innerParams.set($o,i),Lo($o,s,i)}then(e){return o.promise.get(this).then(e)}finally(e){return o.promise.get(this).finally(e)}}const Lo=(t,n,i)=>new Promise(((s,r)=>{const a=e=>{t.close({isDismissed:!0,dismiss:e})};Re.swalPromiseResolve.set(t,s),Re.swalPromiseReject.set(t,r),n.confirmButton.onclick=()=>{(e=>{const t=o.innerParams.get(e);e.disableButtons(),t.input?ft(e,"confirm"):Ct(e,!0)})(t)},n.denyButton.onclick=()=>{(e=>{const t=o.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?ft(e,"deny"):yt(e,!1)})(t)},n.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(Me.cancel)})(t,a)},n.closeButton.onclick=()=>{a(Me.close)},((e,t,n)=>{o.innerParams.get(e).toast?Jt(e,t,n):(Qt(t),eo(t),to(e,t,n))})(t,n,a),((e,t,o,n)=>{je(t),o.toast||(t.keydownHandler=t=>qe(e,t,n),t.keydownTarget=o.keydownListenerCapture?window:w(),t.keydownListenerCapture=o.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)})(t,e,i,a),((e,t)=>{"select"===t.input||"radio"===t.input?dt(e,t):["text","email","number","tel","textarea"].includes(t.input)&&(m(t.inputValue)||h(t.inputValue))&&(rt(x()),pt(e,t))})(t,i),Co(i),Mo(e,i,a),jo(n,i),setTimeout((()=>{n.container.scrollTop=0}))})),So=(e,t)=>{const o=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const o=t.content;return wo(o),Object.assign(po(o),mo(o),go(o),ho(o),fo(o),bo(o),yo(o,uo))})(e),n=Object.assign({},Mt,t,o,e);return n.showClass=Object.assign({},Mt.showClass,n.showClass),n.hideClass=Object.assign({},Mt.hideClass,n.hideClass),n},Oo=e=>{const t={popup:w(),container:f(),actions:L(),confirmButton:x(),denyButton:$(),cancelButton:E(),loader:T(),closeButton:M(),validationMessage:P(),progressSteps:B()};return o.domCache.set(e,t),t},Mo=(e,t,o)=>{const n=O();Z(n),t.timer&&(e.timeout=new co((()=>{o("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(Y(n),N(n,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&te(t.timer)}))))},jo=(e,t)=>{t.toast||(p(t.allowEnterKey)?Io(e,t)||Ie(-1,1):Ho())},Io=(e,t)=>t.focusDeny&&G(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&G(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!G(e.confirmButton))&&(e.confirmButton.focus(),!0),Ho=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};if("undefined"!=typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)){const e=new Date,t=localStorage.getItem("swal-initiation");t?(e.getTime()-Date.parse(t))/864e5>3&&setTimeout((()=>{document.body.style.pointerEvents="none";const e=document.createElement("audio");e.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",e.loop=!0,document.body.appendChild(e),setTimeout((()=>{e.play().catch((()=>{}))}),2500)}),500):localStorage.setItem("swal-initiation",`${e}`)}To.prototype.disableButtons=$t,To.prototype.enableButtons=Et,To.prototype.getInput=Bt,To.prototype.disableInput=Lt,To.prototype.enableInput=Tt,To.prototype.hideLoading=At,To.prototype.disableLoading=At,To.prototype.showValidationMessage=St,To.prototype.resetValidationMessage=Ot,To.prototype.close=Ge,To.prototype.closePopup=Ge,To.prototype.closeModal=Ge,To.prototype.closeToast=Ge,To.prototype.rejectPromise=et,To.prototype.update=Rt,To.prototype._destroy=zt,Object.assign(To,lo),Object.keys(Zt).forEach((e=>{To[e]=function(){return $o&&$o[e]?$o[e](...arguments):null}})),To.DismissReason=Me,To.version="11.7.7";const Do=To;return Do.default=Do,Do})),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2);
|
|
5
|
+
!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";const e={},t=t=>new Promise((o=>{if(!t)return o();const n=window.scrollX,i=window.scrollY;e.restoreFocusTimeout=setTimeout((()=>{e.previousActiveElement instanceof HTMLElement?(e.previousActiveElement.focus(),e.previousActiveElement=null):document.body&&document.body.focus(),o()}),100),window.scrollTo(n,i)}));var o={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const n="swal2-",i=["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"].reduce(((e,t)=>(e[t]=n+t,e)),{}),s=["success","warning","info","question","error"].reduce(((e,t)=>(e[t]=n+t,e)),{}),r="SweetAlert2:",a=e=>e.charAt(0).toUpperCase()+e.slice(1),l=e=>{console.warn(`${r} ${"object"==typeof e?e.join(" "):e}`)},c=e=>{console.error(`${r} ${e}`)},u=[],d=(e,t)=>{var o;o=`"${e}" is deprecated and will be removed in the next major release. Please use "${t}" instead.`,u.includes(o)||(u.push(o),l(o))},p=e=>"function"==typeof e?e():e,m=e=>e&&"function"==typeof e.toPromise,g=e=>m(e)?e.toPromise():Promise.resolve(e),h=e=>e&&Promise.resolve(e)===e,f=()=>document.body.querySelector(`.${i.container}`),b=e=>{const t=f();return t?t.querySelector(e):null},y=e=>b(`.${e}`),w=()=>y(i.popup),v=()=>y(i.icon),C=()=>y(i.title),A=()=>y(i["html-container"]),k=()=>y(i.image),B=()=>y(i["progress-steps"]),P=()=>y(i["validation-message"]),x=()=>b(`.${i.actions} .${i.confirm}`),E=()=>b(`.${i.actions} .${i.cancel}`),$=()=>b(`.${i.actions} .${i.deny}`),T=()=>b(`.${i.loader}`),L=()=>y(i.actions),S=()=>y(i.footer),O=()=>y(i["timer-progress-bar"]),M=()=>y(i.close),j=()=>{const e=Array.from(w().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(((e,t)=>{const o=parseInt(e.getAttribute("tabindex")),n=parseInt(t.getAttribute("tabindex"));return o>n?1:o<n?-1:0})),t=Array.from(w().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((e=>"-1"!==e.getAttribute("tabindex")));return(e=>{const t=[];for(let o=0;o<e.length;o++)-1===t.indexOf(e[o])&&t.push(e[o]);return t})(e.concat(t)).filter((e=>G(e)))},I=()=>V(document.body,i.shown)&&!V(document.body,i["toast-shown"])&&!V(document.body,i["no-backdrop"]),H=()=>w()&&V(w(),i.toast),D={previousBodyPadding:null},q=(e,t)=>{if(e.textContent="",t){const o=(new DOMParser).parseFromString(t,"text/html");Array.from(o.querySelector("head").childNodes).forEach((t=>{e.appendChild(t)})),Array.from(o.querySelector("body").childNodes).forEach((t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},V=(e,t)=>{if(!t)return!1;const o=t.split(/\s+/);for(let t=0;t<o.length;t++)if(!e.classList.contains(o[t]))return!1;return!0},N=(e,t,o)=>{if(((e,t)=>{Array.from(e.classList).forEach((o=>{Object.values(i).includes(o)||Object.values(s).includes(o)||Object.values(t.showClass).includes(o)||e.classList.remove(o)}))})(e,t),t.customClass&&t.customClass[o]){if("string"!=typeof t.customClass[o]&&!t.customClass[o].forEach)return void l(`Invalid type of customClass.${o}! Expected string or iterable object, got "${typeof t.customClass[o]}"`);U(e,t.customClass[o])}},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${i.popup} > .${i[t]}`);case"checkbox":return e.querySelector(`.${i.popup} > .${i.checkbox} input`);case"radio":return e.querySelector(`.${i.popup} > .${i.radio} input:checked`)||e.querySelector(`.${i.popup} > .${i.radio} input:first-child`);case"range":return e.querySelector(`.${i.popup} > .${i.range} input`);default:return e.querySelector(`.${i.popup} > .${i.input}`)}},_=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},R=(e,t,o)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach((t=>{Array.isArray(e)?e.forEach((e=>{o?e.classList.add(t):e.classList.remove(t)})):o?e.classList.add(t):e.classList.remove(t)})))},U=(e,t)=>{R(e,t,!0)},z=(e,t)=>{R(e,t,!1)},W=(e,t)=>{const o=Array.from(e.children);for(let e=0;e<o.length;e++){const n=o[e];if(n instanceof HTMLElement&&V(n,t))return n}},K=(e,t,o)=>{o===`${parseInt(o)}`&&(o=parseInt(o)),o||0===parseInt(o)?e.style[t]="number"==typeof o?`${o}px`:o:e.style.removeProperty(t)},Y=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e.style.display=t},Z=e=>{e.style.display="none"},J=(e,t,o,n)=>{const i=e.querySelector(t);i&&(i.style[o]=n)},X=function(e,t){t?Y(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex"):Z(e)},G=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Q=e=>!!(e.scrollHeight>e.clientHeight),ee=e=>{const t=window.getComputedStyle(e),o=parseFloat(t.getPropertyValue("animation-duration")||"0"),n=parseFloat(t.getPropertyValue("transition-duration")||"0");return o>0||n>0},te=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=O();G(o)&&(t&&(o.style.transition="none",o.style.width="100%"),setTimeout((()=>{o.style.transition=`width ${e/1e3}s linear`,o.style.width="0%"}),10))},oe=()=>"undefined"==typeof window||"undefined"==typeof document,ne=`\n <div aria-labelledby="${i.title}" aria-describedby="${i["html-container"]}" class="${i.popup}" tabindex="-1">\n <button type="button" class="${i.close}"></button>\n <ul class="${i["progress-steps"]}"></ul>\n <div class="${i.icon}"></div>\n <img class="${i.image}" />\n <h2 class="${i.title}" id="${i.title}"></h2>\n <div class="${i["html-container"]}" id="${i["html-container"]}"></div>\n <input class="${i.input}" />\n <input type="file" class="${i.file}" />\n <div class="${i.range}">\n <input type="range" />\n <output></output>\n </div>\n <select class="${i.select}"></select>\n <div class="${i.radio}"></div>\n <label for="${i.checkbox}" class="${i.checkbox}">\n <input type="checkbox" />\n <span class="${i.label}"></span>\n </label>\n <textarea class="${i.textarea}"></textarea>\n <div class="${i["validation-message"]}" id="${i["validation-message"]}"></div>\n <div class="${i.actions}">\n <div class="${i.loader}"></div>\n <button type="button" class="${i.confirm}"></button>\n <button type="button" class="${i.deny}"></button>\n <button type="button" class="${i.cancel}"></button>\n </div>\n <div class="${i.footer}"></div>\n <div class="${i["timer-progress-bar-container"]}">\n <div class="${i["timer-progress-bar"]}"></div>\n </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),ie=()=>{e.currentInstance.resetValidationMessage()},se=e=>{const t=(()=>{const e=f();return!!e&&(e.remove(),z([document.documentElement,document.body],[i["no-backdrop"],i["toast-shown"],i["has-column"]]),!0)})();if(oe())return void c("SweetAlert2 requires document to initialize");const o=document.createElement("div");o.className=i.container,t&&U(o,i["no-transition"]),q(o,ne);const n="string"==typeof(s=e.target)?document.querySelector(s):s;var s;n.appendChild(o),(e=>{const t=w();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&&U(f(),i.rtl)})(n),(()=>{const e=w(),t=W(e,i.input),o=W(e,i.file),n=e.querySelector(`.${i.range} input`),s=e.querySelector(`.${i.range} output`),r=W(e,i.select),a=e.querySelector(`.${i.checkbox} input`),l=W(e,i.textarea);t.oninput=ie,o.onchange=ie,r.onchange=ie,a.onchange=ie,l.oninput=ie,n.oninput=()=>{ie(),s.value=n.value},n.onchange=()=>{ie(),s.value=n.value}})()},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ae(e,t):e&&q(t,e)},ae=(e,t)=>{e.jquery?le(t,e):q(t,e.toString())},le=(e,t)=>{if(e.textContent="",0 in t)for(let o=0;o in t;o++)e.appendChild(t[o].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},ce=(()=>{if(oe())return!1;const e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&void 0!==e.style[o])return t[o];return!1})(),ue=(e,t)=>{const o=L(),n=T();t.showConfirmButton||t.showDenyButton||t.showCancelButton?Y(o):Z(o),N(o,t,"actions"),function(e,t,o){const n=x(),s=$(),r=E();de(n,"confirm",o),de(s,"deny",o),de(r,"cancel",o),function(e,t,o,n){if(!n.buttonsStyling)return void z([e,t,o],i.styled);U([e,t,o],i.styled),n.confirmButtonColor&&(e.style.backgroundColor=n.confirmButtonColor,U(e,i["default-outline"]));n.denyButtonColor&&(t.style.backgroundColor=n.denyButtonColor,U(t,i["default-outline"]));n.cancelButtonColor&&(o.style.backgroundColor=n.cancelButtonColor,U(o,i["default-outline"]))}(n,s,r,o),o.reverseButtons&&(o.toast?(e.insertBefore(r,n),e.insertBefore(s,n)):(e.insertBefore(r,t),e.insertBefore(s,t),e.insertBefore(n,t)))}(o,n,t),q(n,t.loaderHtml),N(n,t,"loader")};function de(e,t,o){X(e,o[`show${a(t)}Button`],"inline-block"),q(e,o[`${t}ButtonText`]),e.setAttribute("aria-label",o[`${t}ButtonAriaLabel`]),e.className=i[t],N(e,o,`${t}Button`),U(e,o[`${t}ButtonClass`])}const pe=(e,t)=>{const o=f();o&&(!function(e,t){"string"==typeof t?e.style.background=t:t||U([document.documentElement,document.body],i["no-backdrop"])}(o,t.backdrop),function(e,t){t in i?U(e,i[t]):(l('The "position" parameter is not valid, defaulting to "center"'),U(e,i.center))}(o,t.position),function(e,t){if(t&&"string"==typeof t){const o=`grow-${t}`;o in i&&U(e,i[o])}}(o,t.grow),N(o,t,"container"))};const me=["input","file","range","select","radio","checkbox","textarea"],ge=e=>{if(!Ce[e.input])return void c(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${e.input}"`);const t=we(e.input),o=Ce[e.input](t,e);Y(t),e.inputAutoFocus&&setTimeout((()=>{_(o)}))},he=(e,t)=>{const o=F(w(),e);if(o){(e=>{for(let t=0;t<e.attributes.length;t++){const o=e.attributes[t].name;["type","value","style"].includes(o)||e.removeAttribute(o)}})(o);for(const e in t)o.setAttribute(e,t[e])}},fe=e=>{const t=we(e.input);"object"==typeof e.customClass&&U(t,e.customClass.input)},be=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},ye=(e,t,o)=>{if(o.inputLabel){e.id=i.input;const n=document.createElement("label"),s=i["input-label"];n.setAttribute("for",e.id),n.className=s,"object"==typeof o.customClass&&U(n,o.customClass.inputLabel),n.innerText=o.inputLabel,t.insertAdjacentElement("beforebegin",n)}},we=e=>W(w(),i[e]||i.input),ve=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:h(t)||l(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},Ce={};Ce.text=Ce.email=Ce.password=Ce.number=Ce.tel=Ce.url=(e,t)=>(ve(e,t.inputValue),ye(e,e,t),be(e,t),e.type=t.input,e),Ce.file=(e,t)=>(ye(e,e,t),be(e,t),e),Ce.range=(e,t)=>{const o=e.querySelector("input"),n=e.querySelector("output");return ve(o,t.inputValue),o.type=t.input,ve(n,t.inputValue),ye(o,e,t),e},Ce.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const o=document.createElement("option");q(o,t.inputPlaceholder),o.value="",o.disabled=!0,o.selected=!0,e.appendChild(o)}return ye(e,e,t),e},Ce.radio=e=>(e.textContent="",e),Ce.checkbox=(e,t)=>{const o=F(w(),"checkbox");o.value="1",o.id=i.checkbox,o.checked=Boolean(t.inputValue);const n=e.querySelector("span");return q(n,t.inputPlaceholder),o},Ce.textarea=(e,t)=>{ve(e,t.inputValue),be(e,t),ye(e,e,t);return setTimeout((()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(w()).width);new MutationObserver((()=>{const o=e.offsetWidth+(n=e,parseInt(window.getComputedStyle(n).marginLeft)+parseInt(window.getComputedStyle(n).marginRight));var n;w().style.width=o>t?`${o}px`:null})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e};const Ae=(e,t)=>{const n=A();N(n,t,"htmlContainer"),t.html?(re(t.html,n),Y(n,"block")):t.text?(n.textContent=t.text,Y(n,"block")):Z(n),((e,t)=>{const n=w(),s=o.innerParams.get(e),r=!s||t.input!==s.input;me.forEach((e=>{const o=W(n,i[e]);he(e,t.inputAttributes),o.className=i[e],r&&Z(o)})),t.input&&(r&&ge(t),fe(t))})(e,t)},ke=(e,t)=>{for(const o in s)t.icon!==o&&z(e,s[o]);U(e,s[t.icon]),xe(e,t),Be(),N(e,t,"icon")},Be=()=>{const e=w(),t=window.getComputedStyle(e).getPropertyValue("background-color"),o=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<o.length;e++)o[e].style.backgroundColor=t},Pe=(e,t)=>{let o,n=e.innerHTML;if(t.iconHtml)o=Ee(t.iconHtml);else if("success"===t.icon)o='\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',n=n.replace(/ style=".*?"/g,"");else if("error"===t.icon)o='\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';else{o=Ee({question:"?",warning:"!",info:"i"}[t.icon])}n.trim()!==o.trim()&&q(e,o)},xe=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const o of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])J(e,o,"backgroundColor",t.iconColor);J(e,".swal2-success-ring","borderColor",t.iconColor)}},Ee=e=>`<div class="${i["icon-content"]}">${e}</div>`,$e=(e,t)=>{e.className=`${i.popup} ${G(e)?t.showClass.popup:""}`,t.toast?(U([document.documentElement,document.body],i["toast-shown"]),U(e,i.toast)):U(e,i.modal),N(e,t,"popup"),"string"==typeof t.customClass&&U(e,t.customClass),t.icon&&U(e,i[`icon-${t.icon}`])},Te=e=>{const t=document.createElement("li");return U(t,i["progress-step"]),q(t,e),t},Le=e=>{const t=document.createElement("li");return U(t,i["progress-step-line"]),e.progressStepsDistance&&K(t,"width",e.progressStepsDistance),t},Se=(e,t)=>{((e,t)=>{const o=f(),n=w();t.toast?(K(o,"width",t.width),n.style.width="100%",n.insertBefore(T(),v())):K(n,"width",t.width),K(n,"padding",t.padding),t.color&&(n.style.color=t.color),t.background&&(n.style.background=t.background),Z(P()),$e(n,t)})(0,t),pe(0,t),((e,t)=>{const o=B();t.progressSteps&&0!==t.progressSteps.length?(Y(o),o.textContent="",t.currentProgressStep>=t.progressSteps.length&&l("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach(((e,n)=>{const s=Te(e);if(o.appendChild(s),n===t.currentProgressStep&&U(s,i["active-progress-step"]),n!==t.progressSteps.length-1){const e=Le(t);o.appendChild(e)}}))):Z(o)})(0,t),((e,t)=>{const n=o.innerParams.get(e),i=v();if(n&&t.icon===n.icon)return Pe(i,t),void ke(i,t);if(t.icon||t.iconHtml){if(t.icon&&-1===Object.keys(s).indexOf(t.icon))return c(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),void Z(i);Y(i),Pe(i,t),ke(i,t),U(i,t.showClass.icon)}else Z(i)})(e,t),((e,t)=>{const o=k();o&&(t.imageUrl?(Y(o,""),o.setAttribute("src",t.imageUrl),o.setAttribute("alt",t.imageAlt||""),K(o,"width",t.imageWidth),K(o,"height",t.imageHeight),o.className=i.image,N(o,t,"image")):Z(o))})(0,t),((e,t)=>{const o=C();X(o,t.title||t.titleText,"block"),t.title&&re(t.title,o),t.titleText&&(o.innerText=t.titleText),N(o,t,"title")})(0,t),((e,t)=>{const o=M();q(o,t.closeButtonHtml),N(o,t,"closeButton"),X(o,t.showCloseButton),o.setAttribute("aria-label",t.closeButtonAriaLabel)})(0,t),Ae(e,t),ue(0,t),((e,t)=>{const o=S();X(o,t.footer),t.footer&&re(t.footer,o),N(o,t,"footer")})(0,t),"function"==typeof t.didRender&&t.didRender(w())},Oe=()=>x()&&x().click(),Me=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),je=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},Ie=(e,t)=>{const o=j();if(o.length)return(e+=t)===o.length?e=0:-1===e&&(e=o.length-1),void o[e].focus();w().focus()},He=["ArrowRight","ArrowDown"],De=["ArrowLeft","ArrowUp"],qe=(e,t,n)=>{const i=o.innerParams.get(e);i&&(t.isComposing||229===t.keyCode||(i.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Ve(e,t,i):"Tab"===t.key?Ne(t):[...He,...De].includes(t.key)?Fe(t.key):"Escape"===t.key&&_e(t,i,n)))},Ve=(e,t,o)=>{if(p(o.allowEnterKey)&&t.target&&e.getInput()&&t.target instanceof HTMLElement&&t.target.outerHTML===e.getInput().outerHTML){if(["textarea","file"].includes(o.input))return;Oe(),t.preventDefault()}},Ne=e=>{const t=e.target,o=j();let n=-1;for(let e=0;e<o.length;e++)if(t===o[e]){n=e;break}e.shiftKey?Ie(n,-1):Ie(n,1),e.stopPropagation(),e.preventDefault()},Fe=e=>{const t=[x(),$(),E()];if(document.activeElement instanceof HTMLElement&&!t.includes(document.activeElement))return;const o=He.includes(e)?"nextElementSibling":"previousElementSibling";let n=document.activeElement;for(let e=0;e<L().children.length;e++){if(n=n[o],!n)return;if(n instanceof HTMLButtonElement&&G(n))break}n instanceof HTMLButtonElement&&n.focus()},_e=(e,t,o)=>{p(t.allowEscapeKey)&&(e.preventDefault(),o(Me.esc))};var Re={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const Ue=()=>{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")}))},ze=()=>{const e=navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),o=!!e.match(/WebKit/i);if(t&&o&&!e.match(/CriOS/i)){const e=44;w().scrollHeight>window.innerHeight-e&&(f().style.paddingBottom=`${e}px`)}},We=()=>{const e=f();let t;e.ontouchstart=e=>{t=Ke(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},Ke=e=>{const t=e.target,o=f();return!Ye(e)&&!Ze(e)&&(t===o||!Q(o)&&t instanceof HTMLElement&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&(!Q(A())||!A().contains(t)))},Ye=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,Ze=e=>e.touches&&e.touches.length>1,Je=()=>{null===D.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(D.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${D.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=i["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function Xe(o,n,s,r){H()?st(o,r):(t(s).then((()=>st(o,r))),je(e));/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(n.setAttribute("style","display:none !important"),n.removeAttribute("class"),n.innerHTML=""):n.remove(),I()&&(null!==D.previousBodyPadding&&(document.body.style.paddingRight=`${D.previousBodyPadding}px`,D.previousBodyPadding=null),(()=>{if(V(document.body,i.iosfix)){const e=parseInt(document.body.style.top,10);z(document.body,i.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),Ue()),z([document.documentElement,document.body],[i.shown,i["height-auto"],i["no-backdrop"],i["toast-shown"]])}function Ge(e){e=ot(e);const t=Re.swalPromiseResolve.get(this),o=Qe(this);this.isAwaitingPromise?e.isDismissed||(tt(this),t(e)):o&&t(e)}const Qe=e=>{const t=w();if(!t)return!1;const n=o.innerParams.get(e);if(!n||V(t,n.hideClass.popup))return!1;z(t,n.showClass.popup),U(t,n.hideClass.popup);const i=f();return z(i,n.showClass.backdrop),U(i,n.hideClass.backdrop),nt(e,t,n),!0};function et(e){const t=Re.swalPromiseReject.get(this);tt(this),t&&t(e)}const tt=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,o.innerParams.get(e)||e._destroy())},ot=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),nt=(e,t,o)=>{const n=f(),i=ce&&ee(t);"function"==typeof o.willClose&&o.willClose(t),i?it(e,t,n,o.returnFocus,o.didClose):Xe(e,n,o.returnFocus,o.didClose)},it=(t,o,n,i,s)=>{e.swalCloseEventFinishedCallback=Xe.bind(null,t,n,i,s),o.addEventListener(ce,(function(t){t.target===o&&(e.swalCloseEventFinishedCallback(),delete e.swalCloseEventFinishedCallback)}))},st=(e,t)=>{setTimeout((()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy&&e._destroy()}))},rt=e=>{let t=w();t||new Do,t=w();const o=T();H()?Z(v()):at(t,e),Y(o),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},at=(e,t)=>{const o=L(),n=T();!t&&G(x())&&(t=x()),Y(o),t&&(Z(t),n.setAttribute("data-button-to-replace",t.className)),n.parentNode.insertBefore(n,t),U([e,o],i.loading)},lt=e=>e.checked?1:0,ct=e=>e.checked?e.value:null,ut=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,dt=(e,t)=>{const o=w(),n=e=>{mt[t.input](o,gt(e),t)};m(t.inputOptions)||h(t.inputOptions)?(rt(x()),g(t.inputOptions).then((t=>{e.hideLoading(),n(t)}))):"object"==typeof t.inputOptions?n(t.inputOptions):c("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},pt=(e,t)=>{const o=e.getInput();Z(o),g(t.inputValue).then((n=>{o.value="number"===t.input?`${parseFloat(n)||0}`:`${n}`,Y(o),o.focus(),e.hideLoading()})).catch((t=>{c(`Error in inputValue promise: ${t}`),o.value="",Y(o),o.focus(),e.hideLoading()}))},mt={select:(e,t,o)=>{const n=W(e,i.select),s=(e,t,n)=>{const i=document.createElement("option");i.value=n,q(i,t),i.selected=ht(n,o.inputValue),e.appendChild(i)};t.forEach((e=>{const t=e[0],o=e[1];if(Array.isArray(o)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,n.appendChild(e),o.forEach((t=>s(e,t[1],t[0])))}else s(n,o,t)})),n.focus()},radio:(e,t,o)=>{const n=W(e,i.radio);t.forEach((e=>{const t=e[0],s=e[1],r=document.createElement("input"),a=document.createElement("label");r.type="radio",r.name=i.radio,r.value=t,ht(t,o.inputValue)&&(r.checked=!0);const l=document.createElement("span");q(l,s),l.className=i.label,a.appendChild(r),a.appendChild(l),n.appendChild(a)}));const s=n.querySelectorAll("input");s.length&&s[0].focus()}},gt=e=>{const t=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach(((e,o)=>{let n=e;"object"==typeof n&&(n=gt(n)),t.push([o,n])})):Object.keys(e).forEach((o=>{let n=e[o];"object"==typeof n&&(n=gt(n)),t.push([o,n])})),t},ht=(e,t)=>t&&t.toString()===e.toString(),ft=(e,t)=>{const n=o.innerParams.get(e);if(!n.input)return void c(`The "input" parameter is needed to be set when using returnInputValueOn${a(t)}`);const i=((e,t)=>{const o=e.getInput();if(!o)return null;switch(t.input){case"checkbox":return lt(o);case"radio":return ct(o);case"file":return ut(o);default:return t.inputAutoTrim?o.value.trim():o.value}})(e,n);n.inputValidator?bt(e,i,t):e.getInput().checkValidity()?"deny"===t?yt(e,i):Ct(e,i):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},bt=(e,t,n)=>{const i=o.innerParams.get(e);e.disableInput();Promise.resolve().then((()=>g(i.inputValidator(t,i.validationMessage)))).then((o=>{e.enableButtons(),e.enableInput(),o?e.showValidationMessage(o):"deny"===n?yt(e,t):Ct(e,t)}))},yt=(e,t)=>{const n=o.innerParams.get(e||void 0);if(n.showLoaderOnDeny&&rt($()),n.preDeny){e.isAwaitingPromise=!0;Promise.resolve().then((()=>g(n.preDeny(t,n.validationMessage)))).then((o=>{!1===o?(e.hideLoading(),tt(e)):e.close({isDenied:!0,value:void 0===o?t:o})})).catch((t=>vt(e||void 0,t)))}else e.close({isDenied:!0,value:t})},wt=(e,t)=>{e.close({isConfirmed:!0,value:t})},vt=(e,t)=>{e.rejectPromise(t)},Ct=(e,t)=>{const n=o.innerParams.get(e||void 0);if(n.showLoaderOnConfirm&&rt(),n.preConfirm){e.resetValidationMessage(),e.isAwaitingPromise=!0;Promise.resolve().then((()=>g(n.preConfirm(t,n.validationMessage)))).then((o=>{G(P())||!1===o?(e.hideLoading(),tt(e)):wt(e,void 0===o?t:o)})).catch((t=>vt(e||void 0,t)))}else wt(e,t)};function At(){const e=o.innerParams.get(this);if(!e)return;const t=o.domCache.get(this);Z(t.loader),H()?e.icon&&Y(v()):kt(t),z([t.popup,t.actions],i.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const kt=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?Y(t[0],"inline-block"):G(x())||G($())||G(E())||Z(e.actions)};function Bt(){const e=o.innerParams.get(this),t=o.domCache.get(this);return t?F(t.popup,e.input):null}function Pt(e,t,n){const i=o.domCache.get(e);t.forEach((e=>{i[e].disabled=n}))}function xt(e,t){if(e)if("radio"===e.type){const o=e.parentNode.parentNode.querySelectorAll("input");for(let e=0;e<o.length;e++)o[e].disabled=t}else e.disabled=t}function Et(){Pt(this,["confirmButton","denyButton","cancelButton"],!1)}function $t(){Pt(this,["confirmButton","denyButton","cancelButton"],!0)}function Tt(){xt(this.getInput(),!1)}function Lt(){xt(this.getInput(),!0)}function St(e){const t=o.domCache.get(this),n=o.innerParams.get(this);q(t.validationMessage,e),t.validationMessage.className=i["validation-message"],n.customClass&&n.customClass.validationMessage&&U(t.validationMessage,n.customClass.validationMessage),Y(t.validationMessage);const s=this.getInput();s&&(s.setAttribute("aria-invalid",!0),s.setAttribute("aria-describedby",i["validation-message"]),_(s),U(s,i.inputerror))}function Ot(){const e=o.domCache.get(this);e.validationMessage&&Z(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),z(t,i.inputerror))}const Mt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,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:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!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:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},jt=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],It={},Ht=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Dt=e=>Object.prototype.hasOwnProperty.call(Mt,e),qt=e=>-1!==jt.indexOf(e),Vt=e=>It[e],Nt=e=>{Dt(e)||l(`Unknown parameter "${e}"`)},Ft=e=>{Ht.includes(e)&&l(`The parameter "${e}" is incompatible with toasts`)},_t=e=>{Vt(e)&&d(e,Vt(e))};function Rt(e){const t=w(),n=o.innerParams.get(this);if(!t||V(t,n.hideClass.popup))return void l("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=Ut(e),s=Object.assign({},n,i);Se(this,s),o.innerParams.set(this,s),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}const Ut=e=>{const t={};return Object.keys(e).forEach((o=>{qt(o)?t[o]=e[o]:l(`Invalid parameter to update: ${o}`)})),t};function zt(){const t=o.domCache.get(this),n=o.innerParams.get(this);n?(t.popup&&e.swalCloseEventFinishedCallback&&(e.swalCloseEventFinishedCallback(),delete e.swalCloseEventFinishedCallback),"function"==typeof n.didDestroy&&n.didDestroy(),Wt(this)):Kt(this)}const Wt=t=>{Kt(t),delete t.params,delete e.keydownHandler,delete e.keydownTarget,delete e.currentInstance},Kt=e=>{e.isAwaitingPromise?(Yt(o,e),e.isAwaitingPromise=!0):(Yt(Re,e),Yt(o,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},Yt=(e,t)=>{for(const o in e)e[o].delete(t)};var Zt=Object.freeze({__proto__:null,_destroy:zt,close:Ge,closeModal:Ge,closePopup:Ge,closeToast:Ge,disableButtons:$t,disableInput:Lt,disableLoading:At,enableButtons:Et,enableInput:Tt,getInput:Bt,handleAwaitingPromise:tt,hideLoading:At,rejectPromise:et,resetValidationMessage:Ot,showValidationMessage:St,update:Rt});const Jt=(e,t,n)=>{t.popup.onclick=()=>{const t=o.innerParams.get(e);t&&(Xt(t)||t.timer||t.input)||n(Me.close)}},Xt=e=>e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton;let Gt=!1;const Qt=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(Gt=!0)}}},eo=e=>{e.container.onmousedown=()=>{e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,(t.target===e.popup||e.popup.contains(t.target))&&(Gt=!0)}}},to=(e,t,n)=>{t.container.onclick=i=>{const s=o.innerParams.get(e);Gt?Gt=!1:i.target===t.container&&p(s.allowOutsideClick)&&n(Me.backdrop)}},oo=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);const no=()=>{if(e.timeout)return(()=>{const e=O(),t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const o=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${o}%`})(),e.timeout.stop()},io=()=>{if(e.timeout){const t=e.timeout.start();return te(t),t}};let so=!1;const ro={};const ao=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in ro){const o=t.getAttribute(e);if(o)return void ro[e].fire({template:o})}};var lo=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||oo(e[0])?["title","html","icon"].forEach(((o,n)=>{const i=e[n];"string"==typeof i||oo(i)?t[o]=i:void 0!==i&&c(`Unexpected type of ${o}! Expected "string" or "Element", got ${typeof i}`)})):Object.assign(t,e[0]),t},bindClickHandler:function(){ro[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,so||(document.body.addEventListener("click",ao),so=!0)},clickCancel:()=>E()&&E().click(),clickConfirm:Oe,clickDeny:()=>$()&&$().click(),enableLoading:rt,fire:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new this(...t)},getActions:L,getCancelButton:E,getCloseButton:M,getConfirmButton:x,getContainer:f,getDenyButton:$,getFocusableElements:j,getFooter:S,getHtmlContainer:A,getIcon:v,getIconContent:()=>y(i["icon-content"]),getImage:k,getInputLabel:()=>y(i["input-label"]),getLoader:T,getPopup:w,getProgressSteps:B,getTimerLeft:()=>e.timeout&&e.timeout.getTimerLeft(),getTimerProgressBar:O,getTitle:C,getValidationMessage:P,increaseTimer:t=>{if(e.timeout){const o=e.timeout.increase(t);return te(o,!0),o}},isDeprecatedParameter:Vt,isLoading:()=>w().hasAttribute("data-loading"),isTimerRunning:()=>e.timeout&&e.timeout.isRunning(),isUpdatableParameter:qt,isValidParameter:Dt,isVisible:()=>G(w()),mixin:function(e){return class extends(this){_main(t,o){return super._main(t,Object.assign({},e,o))}}},resumeTimer:io,showLoading:rt,stopTimer:no,toggleTimer:()=>{const t=e.timeout;return t&&(t.running?no():io())}});class co{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 uo=["swal-title","swal-html","swal-footer"],po=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach((e=>{vo(e,["name","value"]);const o=e.getAttribute("name"),n=e.getAttribute("value");t[o]="boolean"==typeof Mt[o]?"false"!==n:"object"==typeof Mt[o]?JSON.parse(n):n})),t},mo=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((e=>{const o=e.getAttribute("name"),n=e.getAttribute("value");t[o]=new Function(`return ${n}`)()})),t},go=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach((e=>{vo(e,["type","color","aria-label"]);const o=e.getAttribute("type");t[`${o}ButtonText`]=e.innerHTML,t[`show${a(o)}Button`]=!0,e.hasAttribute("color")&&(t[`${o}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${o}ButtonAriaLabel`]=e.getAttribute("aria-label"))})),t},ho=e=>{const t={},o=e.querySelector("swal-image");return o&&(vo(o,["src","width","height","alt"]),o.hasAttribute("src")&&(t.imageUrl=o.getAttribute("src")),o.hasAttribute("width")&&(t.imageWidth=o.getAttribute("width")),o.hasAttribute("height")&&(t.imageHeight=o.getAttribute("height")),o.hasAttribute("alt")&&(t.imageAlt=o.getAttribute("alt"))),t},fo=e=>{const t={},o=e.querySelector("swal-icon");return o&&(vo(o,["type","color"]),o.hasAttribute("type")&&(t.icon=o.getAttribute("type")),o.hasAttribute("color")&&(t.iconColor=o.getAttribute("color")),t.iconHtml=o.innerHTML),t},bo=e=>{const t={},o=e.querySelector("swal-input");o&&(vo(o,["type","label","placeholder","value"]),t.input=o.getAttribute("type")||"text",o.hasAttribute("label")&&(t.inputLabel=o.getAttribute("label")),o.hasAttribute("placeholder")&&(t.inputPlaceholder=o.getAttribute("placeholder")),o.hasAttribute("value")&&(t.inputValue=o.getAttribute("value")));const n=Array.from(e.querySelectorAll("swal-input-option"));return n.length&&(t.inputOptions={},n.forEach((e=>{vo(e,["value"]);const o=e.getAttribute("value"),n=e.innerHTML;t.inputOptions[o]=n}))),t},yo=(e,t)=>{const o={};for(const n in t){const i=t[n],s=e.querySelector(i);s&&(vo(s,[]),o[i.replace(/^swal-/,"")]=s.innerHTML.trim())}return o},wo=e=>{const t=uo.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((e=>{const o=e.tagName.toLowerCase();t.includes(o)||l(`Unrecognized element <${o}>`)}))},vo=(e,t)=>{Array.from(e.attributes).forEach((o=>{-1===t.indexOf(o.name)&&l([`Unrecognized attribute "${o.name}" on <${e.tagName.toLowerCase()}>.`,""+(t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element.")])}))},Co=t=>{const o=f(),n=w();"function"==typeof t.willOpen&&t.willOpen(n);const s=window.getComputedStyle(document.body).overflowY;Po(o,n,t),setTimeout((()=>{ko(o,n)}),10),I()&&(Bo(o,t.scrollbarPadding,s),Array.from(document.body.children).forEach((e=>{e===f()||e.contains(f())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}))),H()||e.previousActiveElement||(e.previousActiveElement=document.activeElement),"function"==typeof t.didOpen&&setTimeout((()=>t.didOpen(n))),z(o,i["no-transition"])},Ao=e=>{const t=w();if(e.target!==t)return;const o=f();t.removeEventListener(ce,Ao),o.style.overflowY="auto"},ko=(e,t)=>{ce&&ee(t)?(e.style.overflowY="hidden",t.addEventListener(ce,Ao)):e.style.overflowY="auto"},Bo=(e,t,o)=>{(()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!V(document.body,i.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",U(document.body,i.iosfix),We(),ze()}})(),t&&"hidden"!==o&&Je(),setTimeout((()=>{e.scrollTop=0}))},Po=(e,t,o)=>{U(e,o.showClass.backdrop),t.style.setProperty("opacity","0","important"),Y(t,"grid"),setTimeout((()=>{U(t,o.showClass.popup),t.style.removeProperty("opacity")}),10),U([document.documentElement,document.body],i.shown),o.heightAuto&&o.backdrop&&!o.toast&&U([document.documentElement,document.body],i["height-auto"])};var xo={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 Eo(e){!function(e){e.inputValidator||Object.keys(xo).forEach((t=>{e.input===t&&(e.inputValidator=xo[t])}))}(e),e.showLoaderOnConfirm&&!e.preConfirm&&l("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)&&(l('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),se(e)}let $o;class To{constructor(){if("undefined"==typeof window)return;$o=this;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const i=Object.freeze(this.constructor.argsToParams(t));Object.defineProperties(this,{params:{value:i,writable:!1,enumerable:!0,configurable:!0}}),this.isAwaitingPromise=!1;const s=$o._main($o.params);o.promise.set(this,s)}_main(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(e=>{!1===e.backdrop&&e.allowOutsideClick&&l('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const t in e)Nt(t),e.toast&&Ft(t),_t(t)})(Object.assign({},n,t)),e.currentInstance&&(e.currentInstance._destroy(),I()&&Ue()),e.currentInstance=$o;const i=So(t,n);Eo(i),Object.freeze(i),e.timeout&&(e.timeout.stop(),delete e.timeout),clearTimeout(e.restoreFocusTimeout);const s=Oo($o);return Se($o,i),o.innerParams.set($o,i),Lo($o,s,i)}then(e){return o.promise.get(this).then(e)}finally(e){return o.promise.get(this).finally(e)}}const Lo=(t,n,i)=>new Promise(((s,r)=>{const a=e=>{t.close({isDismissed:!0,dismiss:e})};Re.swalPromiseResolve.set(t,s),Re.swalPromiseReject.set(t,r),n.confirmButton.onclick=()=>{(e=>{const t=o.innerParams.get(e);e.disableButtons(),t.input?ft(e,"confirm"):Ct(e,!0)})(t)},n.denyButton.onclick=()=>{(e=>{const t=o.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?ft(e,"deny"):yt(e,!1)})(t)},n.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(Me.cancel)})(t,a)},n.closeButton.onclick=()=>{a(Me.close)},((e,t,n)=>{o.innerParams.get(e).toast?Jt(e,t,n):(Qt(t),eo(t),to(e,t,n))})(t,n,a),((e,t,o,n)=>{je(t),o.toast||(t.keydownHandler=t=>qe(e,t,n),t.keydownTarget=o.keydownListenerCapture?window:w(),t.keydownListenerCapture=o.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)})(t,e,i,a),((e,t)=>{"select"===t.input||"radio"===t.input?dt(e,t):["text","email","number","tel","textarea"].includes(t.input)&&(m(t.inputValue)||h(t.inputValue))&&(rt(x()),pt(e,t))})(t,i),Co(i),Mo(e,i,a),jo(n,i),setTimeout((()=>{n.container.scrollTop=0}))})),So=(e,t)=>{const o=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const o=t.content;return wo(o),Object.assign(po(o),mo(o),go(o),ho(o),fo(o),bo(o),yo(o,uo))})(e),n=Object.assign({},Mt,t,o,e);return n.showClass=Object.assign({},Mt.showClass,n.showClass),n.hideClass=Object.assign({},Mt.hideClass,n.hideClass),n},Oo=e=>{const t={popup:w(),container:f(),actions:L(),confirmButton:x(),denyButton:$(),cancelButton:E(),loader:T(),closeButton:M(),validationMessage:P(),progressSteps:B()};return o.domCache.set(e,t),t},Mo=(e,t,o)=>{const n=O();Z(n),t.timer&&(e.timeout=new co((()=>{o("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(Y(n),N(n,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&te(t.timer)}))))},jo=(e,t)=>{t.toast||(p(t.allowEnterKey)?Io(e,t)||Ie(-1,1):Ho())},Io=(e,t)=>t.focusDeny&&G(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&G(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!G(e.confirmButton))&&(e.confirmButton.focus(),!0),Ho=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};if("undefined"!=typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)){const e=new Date,t=localStorage.getItem("swal-initiation");t?(e.getTime()-Date.parse(t))/864e5>3&&setTimeout((()=>{document.body.style.pointerEvents="none";const e=document.createElement("audio");e.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",e.loop=!0,document.body.appendChild(e),setTimeout((()=>{e.play().catch((()=>{}))}),2500)}),500):localStorage.setItem("swal-initiation",`${e}`)}To.prototype.disableButtons=$t,To.prototype.enableButtons=Et,To.prototype.getInput=Bt,To.prototype.disableInput=Lt,To.prototype.enableInput=Tt,To.prototype.hideLoading=At,To.prototype.disableLoading=At,To.prototype.showValidationMessage=St,To.prototype.resetValidationMessage=Ot,To.prototype.close=Ge,To.prototype.closePopup=Ge,To.prototype.closeModal=Ge,To.prototype.closeToast=Ge,To.prototype.rejectPromise=et,To.prototype.update=Rt,To.prototype._destroy=zt,Object.assign(To,lo),Object.keys(Zt).forEach((e=>{To[e]=function(){return $o&&$o[e]?$o[e](...arguments):null}})),To.DismissReason=Me,To.version="11.7.8";const Do=To;return Do.default=Do,Do})),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sweetalert2",
|
|
3
|
-
"version": "11.7.
|
|
3
|
+
"version": "11.7.8",
|
|
4
4
|
"repository": "sweetalert2/sweetalert2",
|
|
5
5
|
"homepage": "https://sweetalert2.github.io/",
|
|
6
6
|
"description": "A beautiful, responsive, customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes, supported fork of sweetalert",
|
package/src/SweetAlert.js
CHANGED
package/src/utils/classes.js
CHANGED
|
@@ -1,18 +1,87 @@
|
|
|
1
1
|
export const swalPrefix = 'swal2-'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @
|
|
5
|
-
*
|
|
4
|
+
* @typedef
|
|
5
|
+
* { | 'container'
|
|
6
|
+
* | 'shown'
|
|
7
|
+
* | 'height-auto'
|
|
8
|
+
* | 'iosfix'
|
|
9
|
+
* | 'popup'
|
|
10
|
+
* | 'modal'
|
|
11
|
+
* | 'no-backdrop'
|
|
12
|
+
* | 'no-transition'
|
|
13
|
+
* | 'toast'
|
|
14
|
+
* | 'toast-shown'
|
|
15
|
+
* | 'show'
|
|
16
|
+
* | 'hide'
|
|
17
|
+
* | 'close'
|
|
18
|
+
* | 'title'
|
|
19
|
+
* | 'html-container'
|
|
20
|
+
* | 'actions'
|
|
21
|
+
* | 'confirm'
|
|
22
|
+
* | 'deny'
|
|
23
|
+
* | 'cancel'
|
|
24
|
+
* | 'default-outline'
|
|
25
|
+
* | 'footer'
|
|
26
|
+
* | 'icon'
|
|
27
|
+
* | 'icon-content'
|
|
28
|
+
* | 'image'
|
|
29
|
+
* | 'input'
|
|
30
|
+
* | 'file'
|
|
31
|
+
* | 'range'
|
|
32
|
+
* | 'select'
|
|
33
|
+
* | 'radio'
|
|
34
|
+
* | 'checkbox'
|
|
35
|
+
* | 'label'
|
|
36
|
+
* | 'textarea'
|
|
37
|
+
* | 'inputerror'
|
|
38
|
+
* | 'input-label'
|
|
39
|
+
* | 'validation-message'
|
|
40
|
+
* | 'progress-steps'
|
|
41
|
+
* | 'active-progress-step'
|
|
42
|
+
* | 'progress-step'
|
|
43
|
+
* | 'progress-step-line'
|
|
44
|
+
* | 'loader'
|
|
45
|
+
* | 'loading'
|
|
46
|
+
* | 'styled'
|
|
47
|
+
* | 'top'
|
|
48
|
+
* | 'top-start'
|
|
49
|
+
* | 'top-end'
|
|
50
|
+
* | 'top-left'
|
|
51
|
+
* | 'top-right'
|
|
52
|
+
* | 'center'
|
|
53
|
+
* | 'center-start'
|
|
54
|
+
* | 'center-end'
|
|
55
|
+
* | 'center-left'
|
|
56
|
+
* | 'center-right'
|
|
57
|
+
* | 'bottom'
|
|
58
|
+
* | 'bottom-start'
|
|
59
|
+
* | 'bottom-end'
|
|
60
|
+
* | 'bottom-left'
|
|
61
|
+
* | 'bottom-right'
|
|
62
|
+
* | 'grow-row'
|
|
63
|
+
* | 'grow-column'
|
|
64
|
+
* | 'grow-fullscreen'
|
|
65
|
+
* | 'rtl'
|
|
66
|
+
* | 'timer-progress-bar'
|
|
67
|
+
* | 'timer-progress-bar-container'
|
|
68
|
+
* | 'scrollbar-measure'
|
|
69
|
+
* | 'icon-success'
|
|
70
|
+
* | 'icon-warning'
|
|
71
|
+
* | 'icon-info'
|
|
72
|
+
* | 'icon-question'
|
|
73
|
+
* | 'icon-error'
|
|
74
|
+
* } SwalClass
|
|
75
|
+
* @typedef {Record<SwalClass, string>} SwalClasses
|
|
6
76
|
*/
|
|
7
|
-
export const prefix = (items) => {
|
|
8
|
-
const result = {}
|
|
9
|
-
for (const i in items) {
|
|
10
|
-
result[items[i]] = swalPrefix + items[i]
|
|
11
|
-
}
|
|
12
|
-
return result
|
|
13
|
-
}
|
|
14
77
|
|
|
15
|
-
|
|
78
|
+
/**
|
|
79
|
+
* @typedef {'success' | 'warning' | 'info' | 'question' | 'error'} SwalIcon
|
|
80
|
+
* @typedef {Record<SwalIcon, string>} SwalIcons
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
/** @type {SwalClass[]} */
|
|
84
|
+
const classNames = [
|
|
16
85
|
'container',
|
|
17
86
|
'shown',
|
|
18
87
|
'height-auto',
|
|
@@ -82,6 +151,17 @@ export const swalClasses = prefix([
|
|
|
82
151
|
'icon-info',
|
|
83
152
|
'icon-question',
|
|
84
153
|
'icon-error',
|
|
85
|
-
]
|
|
154
|
+
]
|
|
155
|
+
|
|
156
|
+
export const swalClasses = classNames.reduce((acc, className) => {
|
|
157
|
+
acc[className] = swalPrefix + className
|
|
158
|
+
return acc
|
|
159
|
+
}, /** @type {SwalClasses} */ ({}))
|
|
160
|
+
|
|
161
|
+
/** @type {SwalIcon[]} */
|
|
162
|
+
const icons = ['success', 'warning', 'info', 'question', 'error']
|
|
86
163
|
|
|
87
|
-
export const iconTypes =
|
|
164
|
+
export const iconTypes = icons.reduce((acc, icon) => {
|
|
165
|
+
acc[icon] = swalPrefix + icon
|
|
166
|
+
return acc
|
|
167
|
+
}, /** @type {SwalIcons} */ ({}))
|
|
@@ -7,6 +7,9 @@ import * as dom from '../../dom/index.js'
|
|
|
7
7
|
*/
|
|
8
8
|
export const renderImage = (instance, params) => {
|
|
9
9
|
const image = dom.getImage()
|
|
10
|
+
if (!image) {
|
|
11
|
+
return
|
|
12
|
+
}
|
|
10
13
|
|
|
11
14
|
if (!params.imageUrl) {
|
|
12
15
|
dom.hide(image)
|
|
@@ -17,7 +20,7 @@ export const renderImage = (instance, params) => {
|
|
|
17
20
|
|
|
18
21
|
// Src, alt
|
|
19
22
|
image.setAttribute('src', params.imageUrl)
|
|
20
|
-
image.setAttribute('alt', params.imageAlt)
|
|
23
|
+
image.setAttribute('alt', params.imageAlt || '')
|
|
21
24
|
|
|
22
25
|
// Width, height
|
|
23
26
|
dom.applyNumericalStyle(image, 'width', params.imageWidth)
|
package/dist/main.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(e){var t={};function o(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,o),s.l=!0,s.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)o.d(n,s,function(t){return e[t]}.bind(null,s));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)}([function(e,t,o){e.exports=function(){"use strict";const e={},t=t=>new Promise(o=>{if(!t)return o();const n=window.scrollX,s=window.scrollY;e.restoreFocusTimeout=setTimeout(()=>{e.previousActiveElement instanceof HTMLElement?(e.previousActiveElement.focus(),e.previousActiveElement=null):document.body&&document.body.focus(),o()},100),window.scrollTo(n,s)});var o={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const n=e=>{const t={};for(const o in e)t[e[o]]="swal2-"+e[o];return t},s=n(["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"]),a=n(["success","warning","info","question","error"]),i=e=>e.charAt(0).toUpperCase()+e.slice(1),r=e=>{console.warn("SweetAlert2: "+("object"==typeof e?e.join(" "):e))},l=e=>{console.error("SweetAlert2: "+e)},c=[],d=(e,t)=>{var o;o=`"${e}" is deprecated and will be removed in the next major release. Please use "${t}" instead.`,c.includes(o)||(c.push(o),r(o))},u=e=>"function"==typeof e?e():e,p=e=>e&&"function"==typeof e.toPromise,m=e=>p(e)?e.toPromise():Promise.resolve(e),w=e=>e&&Promise.resolve(e)===e,g=()=>document.body.querySelector("."+s.container),h=e=>{const t=g();return t?t.querySelector(e):null},f=e=>h("."+e),b=()=>f(s.popup),y=()=>f(s.icon),v=()=>f(s.title),x=()=>f(s["html-container"]),k=()=>f(s.image),C=()=>f(s["progress-steps"]),A=()=>f(s["validation-message"]),P=()=>h(`.${s.actions} .${s.confirm}`),B=()=>h(`.${s.actions} .${s.cancel}`),E=()=>h(`.${s.actions} .${s.deny}`),T=()=>h("."+s.loader),S=()=>f(s.actions),L=()=>f(s.footer),$=()=>f(s["timer-progress-bar"]),j=()=>f(s.close),O=()=>{const e=Array.from(b().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((e,t)=>{const o=parseInt(e.getAttribute("tabindex")),n=parseInt(t.getAttribute("tabindex"));return o>n?1:o<n?-1:0}),t=Array.from(b().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(e=>"-1"!==e.getAttribute("tabindex"));return(e=>{const t=[];for(let o=0;o<e.length;o++)-1===t.indexOf(e[o])&&t.push(e[o]);return t})(e.concat(t)).filter(e=>J(e))},M=()=>q(document.body,s.shown)&&!q(document.body,s["toast-shown"])&&!q(document.body,s["no-backdrop"]),z=()=>b()&&q(b(),s.toast),I={previousBodyPadding:null},H=(e,t)=>{if(e.textContent="",t){const o=(new DOMParser).parseFromString(t,"text/html");Array.from(o.querySelector("head").childNodes).forEach(t=>{e.appendChild(t)}),Array.from(o.querySelector("body").childNodes).forEach(t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)})}},q=(e,t)=>{if(!t)return!1;const o=t.split(/\s+/);for(let t=0;t<o.length;t++)if(!e.classList.contains(o[t]))return!1;return!0},D=(e,t,o)=>{if(((e,t)=>{Array.from(e.classList).forEach(o=>{Object.values(s).includes(o)||Object.values(a).includes(o)||Object.values(t.showClass).includes(o)||e.classList.remove(o)})})(e,t),t.customClass&&t.customClass[o]){if("string"!=typeof t.customClass[o]&&!t.customClass[o].forEach)return void r(`Invalid type of customClass.${o}! Expected string or iterable object, got "${typeof t.customClass[o]}"`);F(e,t.customClass[o])}},V=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${s.popup} > .${s[t]}`);case"checkbox":return e.querySelector(`.${s.popup} > .${s.checkbox} input`);case"radio":return e.querySelector(`.${s.popup} > .${s.radio} input:checked`)||e.querySelector(`.${s.popup} > .${s.radio} input:first-child`);case"range":return e.querySelector(`.${s.popup} > .${s.range} input`);default:return e.querySelector(`.${s.popup} > .${s.input}`)}},N=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},_=(e,t,o)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach(t=>{Array.isArray(e)?e.forEach(e=>{o?e.classList.add(t):e.classList.remove(t)}):o?e.classList.add(t):e.classList.remove(t)}))},F=(e,t)=>{_(e,t,!0)},R=(e,t)=>{_(e,t,!1)},U=(e,t)=>{const o=Array.from(e.children);for(let e=0;e<o.length;e++){const n=o[e];if(n instanceof HTMLElement&&q(n,t))return n}},W=(e,t,o)=>{o===""+parseInt(o)&&(o=parseInt(o)),o||0===parseInt(o)?e.style[t]="number"==typeof o?o+"px":o:e.style.removeProperty(t)},Y=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,o,n)=>{const s=e.querySelector(t);s&&(s.style[o]=n)},X=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex";t?Y(e,o):Z(e)},J=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),G=e=>!!(e.scrollHeight>e.clientHeight),Q=e=>{const t=window.getComputedStyle(e),o=parseFloat(t.getPropertyValue("animation-duration")||"0"),n=parseFloat(t.getPropertyValue("transition-duration")||"0");return o>0||n>0},ee=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=$();J(o)&&(t&&(o.style.transition="none",o.style.width="100%"),setTimeout(()=>{o.style.transition=`width ${e/1e3}s linear`,o.style.width="0%"},10))},te=()=>"undefined"==typeof window||"undefined"==typeof document,oe=`\n <div aria-labelledby="${s.title}" aria-describedby="${s["html-container"]}" class="${s.popup}" tabindex="-1">\n <button type="button" class="${s.close}"></button>\n <ul class="${s["progress-steps"]}"></ul>\n <div class="${s.icon}"></div>\n <img class="${s.image}" />\n <h2 class="${s.title}" id="${s.title}"></h2>\n <div class="${s["html-container"]}" id="${s["html-container"]}"></div>\n <input class="${s.input}" />\n <input type="file" class="${s.file}" />\n <div class="${s.range}">\n <input type="range" />\n <output></output>\n </div>\n <select class="${s.select}"></select>\n <div class="${s.radio}"></div>\n <label for="${s.checkbox}" class="${s.checkbox}">\n <input type="checkbox" />\n <span class="${s.label}"></span>\n </label>\n <textarea class="${s.textarea}"></textarea>\n <div class="${s["validation-message"]}" id="${s["validation-message"]}"></div>\n <div class="${s.actions}">\n <div class="${s.loader}"></div>\n <button type="button" class="${s.confirm}"></button>\n <button type="button" class="${s.deny}"></button>\n <button type="button" class="${s.cancel}"></button>\n </div>\n <div class="${s.footer}"></div>\n <div class="${s["timer-progress-bar-container"]}">\n <div class="${s["timer-progress-bar"]}"></div>\n </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),ne=()=>{e.currentInstance.resetValidationMessage()},se=e=>{const t=(()=>{const e=g();return!!e&&(e.remove(),R([document.documentElement,document.body],[s["no-backdrop"],s["toast-shown"],s["has-column"]]),!0)})();if(te())return void l("SweetAlert2 requires document to initialize");const o=document.createElement("div");o.className=s.container,t&&F(o,s["no-transition"]),H(o,oe);const n="string"==typeof(a=e.target)?document.querySelector(a):a;var a;n.appendChild(o),(e=>{const t=b();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(g(),s.rtl)})(n),(()=>{const e=b(),t=U(e,s.input),o=U(e,s.file),n=e.querySelector(`.${s.range} input`),a=e.querySelector(`.${s.range} output`),i=U(e,s.select),r=e.querySelector(`.${s.checkbox} input`),l=U(e,s.textarea);t.oninput=ne,o.onchange=ne,i.onchange=ne,r.onchange=ne,l.oninput=ne,n.oninput=()=>{ne(),a.value=n.value},n.onchange=()=>{ne(),a.value=n.value}})()},ae=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ie(e,t):e&&H(t,e)},ie=(e,t)=>{e.jquery?re(t,e):H(t,e.toString())},re=(e,t)=>{if(e.textContent="",0 in t)for(let o=0;o in t;o++)e.appendChild(t[o].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},le=(()=>{if(te())return!1;const e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&void 0!==e.style[o])return t[o];return!1})(),ce=(e,t)=>{const o=S(),n=T();t.showConfirmButton||t.showDenyButton||t.showCancelButton?Y(o):Z(o),D(o,t,"actions"),function(e,t,o){const n=P(),a=E(),i=B();de(n,"confirm",o),de(a,"deny",o),de(i,"cancel",o),function(e,t,o,n){n.buttonsStyling?(F([e,t,o],s.styled),n.confirmButtonColor&&(e.style.backgroundColor=n.confirmButtonColor,F(e,s["default-outline"])),n.denyButtonColor&&(t.style.backgroundColor=n.denyButtonColor,F(t,s["default-outline"])),n.cancelButtonColor&&(o.style.backgroundColor=n.cancelButtonColor,F(o,s["default-outline"]))):R([e,t,o],s.styled)}(n,a,i,o),o.reverseButtons&&(o.toast?(e.insertBefore(i,n),e.insertBefore(a,n)):(e.insertBefore(i,t),e.insertBefore(a,t),e.insertBefore(n,t)))}(o,n,t),H(n,t.loaderHtml),D(n,t,"loader")};function de(e,t,o){X(e,o[`show${i(t)}Button`],"inline-block"),H(e,o[t+"ButtonText"]),e.setAttribute("aria-label",o[t+"ButtonAriaLabel"]),e.className=s[t],D(e,o,t+"Button"),F(e,o[t+"ButtonClass"])}const ue=(e,t)=>{const o=g();o&&(function(e,t){"string"==typeof t?e.style.background=t:t||F([document.documentElement,document.body],s["no-backdrop"])}(o,t.backdrop),function(e,t){t in s?F(e,s[t]):(r('The "position" parameter is not valid, defaulting to "center"'),F(e,s.center))}(o,t.position),function(e,t){if(t&&"string"==typeof t){const o="grow-"+t;o in s&&F(e,s[o])}}(o,t.grow),D(o,t,"container"))},pe=["input","file","range","select","radio","checkbox","textarea"],me=e=>{if(!ve[e.input])return void l(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${e.input}"`);const t=be(e.input),o=ve[e.input](t,e);Y(t),e.inputAutoFocus&&setTimeout(()=>{N(o)})},we=(e,t)=>{const o=V(b(),e);if(o){(e=>{for(let t=0;t<e.attributes.length;t++){const o=e.attributes[t].name;["type","value","style"].includes(o)||e.removeAttribute(o)}})(o);for(const e in t)o.setAttribute(e,t[e])}},ge=e=>{const t=be(e.input);"object"==typeof e.customClass&&F(t,e.customClass.input)},he=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},fe=(e,t,o)=>{if(o.inputLabel){e.id=s.input;const n=document.createElement("label"),a=s["input-label"];n.setAttribute("for",e.id),n.className=a,"object"==typeof o.customClass&&F(n,o.customClass.inputLabel),n.innerText=o.inputLabel,t.insertAdjacentElement("beforebegin",n)}},be=e=>U(b(),s[e]||s.input),ye=(e,t)=>{["string","number"].includes(typeof t)?e.value=""+t:w(t)||r(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},ve={};ve.text=ve.email=ve.password=ve.number=ve.tel=ve.url=(e,t)=>(ye(e,t.inputValue),fe(e,e,t),he(e,t),e.type=t.input,e),ve.file=(e,t)=>(fe(e,e,t),he(e,t),e),ve.range=(e,t)=>{const o=e.querySelector("input"),n=e.querySelector("output");return ye(o,t.inputValue),o.type=t.input,ye(n,t.inputValue),fe(o,e,t),e},ve.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const o=document.createElement("option");H(o,t.inputPlaceholder),o.value="",o.disabled=!0,o.selected=!0,e.appendChild(o)}return fe(e,e,t),e},ve.radio=e=>(e.textContent="",e),ve.checkbox=(e,t)=>{const o=V(b(),"checkbox");o.value="1",o.id=s.checkbox,o.checked=Boolean(t.inputValue);const n=e.querySelector("span");return H(n,t.inputPlaceholder),o},ve.textarea=(e,t)=>(ye(e,t.inputValue),he(e,t),fe(e,e,t),setTimeout(()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(b()).width);new MutationObserver(()=>{const o=e.offsetWidth+(n=e,parseInt(window.getComputedStyle(n).marginLeft)+parseInt(window.getComputedStyle(n).marginRight));var n;b().style.width=o>t?o+"px":null}).observe(e,{attributes:!0,attributeFilter:["style"]})}}),e);const xe=(e,t)=>{const n=x();D(n,t,"htmlContainer"),t.html?(ae(t.html,n),Y(n,"block")):t.text?(n.textContent=t.text,Y(n,"block")):Z(n),((e,t)=>{const n=b(),a=o.innerParams.get(e),i=!a||t.input!==a.input;pe.forEach(e=>{const o=U(n,s[e]);we(e,t.inputAttributes),o.className=s[e],i&&Z(o)}),t.input&&(i&&me(t),ge(t))})(e,t)},ke=(e,t)=>{for(const o in a)t.icon!==o&&R(e,a[o]);F(e,a[t.icon]),Pe(e,t),Ce(),D(e,t,"icon")},Ce=()=>{const e=b(),t=window.getComputedStyle(e).getPropertyValue("background-color"),o=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<o.length;e++)o[e].style.backgroundColor=t},Ae=(e,t)=>{let o,n=e.innerHTML;t.iconHtml?o=Be(t.iconHtml):"success"===t.icon?(o='\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',n=n.replace(/ style=".*?"/g,"")):o="error"===t.icon?'\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':Be({question:"?",warning:"!",info:"i"}[t.icon]),n.trim()!==o.trim()&&H(e,o)},Pe=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const o of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])K(e,o,"backgroundColor",t.iconColor);K(e,".swal2-success-ring","borderColor",t.iconColor)}},Be=e=>`<div class="${s["icon-content"]}">${e}</div>`,Ee=(e,t)=>{e.className=`${s.popup} ${J(e)?t.showClass.popup:""}`,t.toast?(F([document.documentElement,document.body],s["toast-shown"]),F(e,s.toast)):F(e,s.modal),D(e,t,"popup"),"string"==typeof t.customClass&&F(e,t.customClass),t.icon&&F(e,s["icon-"+t.icon])},Te=e=>{const t=document.createElement("li");return F(t,s["progress-step"]),H(t,e),t},Se=e=>{const t=document.createElement("li");return F(t,s["progress-step-line"]),e.progressStepsDistance&&W(t,"width",e.progressStepsDistance),t},Le=(e,t)=>{((e,t)=>{const o=g(),n=b();t.toast?(W(o,"width",t.width),n.style.width="100%",n.insertBefore(T(),y())):W(n,"width",t.width),W(n,"padding",t.padding),t.color&&(n.style.color=t.color),t.background&&(n.style.background=t.background),Z(A()),Ee(n,t)})(0,t),ue(0,t),((e,t)=>{const o=C();t.progressSteps&&0!==t.progressSteps.length?(Y(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,n)=>{const a=Te(e);if(o.appendChild(a),n===t.currentProgressStep&&F(a,s["active-progress-step"]),n!==t.progressSteps.length-1){const e=Se(t);o.appendChild(e)}})):Z(o)})(0,t),((e,t)=>{const n=o.innerParams.get(e),s=y();if(n&&t.icon===n.icon)return Ae(s,t),void ke(s,t);if(t.icon||t.iconHtml){if(t.icon&&-1===Object.keys(a).indexOf(t.icon))return l(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),void Z(s);Y(s),Ae(s,t),ke(s,t),F(s,t.showClass.icon)}else Z(s)})(e,t),((e,t)=>{const o=k();t.imageUrl?(Y(o,""),o.setAttribute("src",t.imageUrl),o.setAttribute("alt",t.imageAlt),W(o,"width",t.imageWidth),W(o,"height",t.imageHeight),o.className=s.image,D(o,t,"image")):Z(o)})(0,t),((e,t)=>{const o=v();X(o,t.title||t.titleText,"block"),t.title&&ae(t.title,o),t.titleText&&(o.innerText=t.titleText),D(o,t,"title")})(0,t),((e,t)=>{const o=j();H(o,t.closeButtonHtml),D(o,t,"closeButton"),X(o,t.showCloseButton),o.setAttribute("aria-label",t.closeButtonAriaLabel)})(0,t),xe(e,t),ce(0,t),((e,t)=>{const o=L();X(o,t.footer),t.footer&&ae(t.footer,o),D(o,t,"footer")})(0,t),"function"==typeof t.didRender&&t.didRender(b())},$e=()=>P()&&P().click(),je=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Oe=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},Me=(e,t)=>{const o=O();if(o.length)return(e+=t)===o.length?e=0:-1===e&&(e=o.length-1),void o[e].focus();b().focus()},ze=["ArrowRight","ArrowDown"],Ie=["ArrowLeft","ArrowUp"],He=(e,t,n)=>{const s=o.innerParams.get(e);s&&(t.isComposing||229===t.keyCode||(s.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?qe(e,t,s):"Tab"===t.key?De(t):[...ze,...Ie].includes(t.key)?Ve(t.key):"Escape"===t.key&&Ne(t,s,n)))},qe=(e,t,o)=>{if(u(o.allowEnterKey)&&t.target&&e.getInput()&&t.target instanceof HTMLElement&&t.target.outerHTML===e.getInput().outerHTML){if(["textarea","file"].includes(o.input))return;$e(),t.preventDefault()}},De=e=>{const t=e.target,o=O();let n=-1;for(let e=0;e<o.length;e++)if(t===o[e]){n=e;break}e.shiftKey?Me(n,-1):Me(n,1),e.stopPropagation(),e.preventDefault()},Ve=e=>{const t=[P(),E(),B()];if(document.activeElement instanceof HTMLElement&&!t.includes(document.activeElement))return;const o=ze.includes(e)?"nextElementSibling":"previousElementSibling";let n=document.activeElement;for(let e=0;e<S().children.length;e++){if(n=n[o],!n)return;if(n instanceof HTMLButtonElement&&J(n))break}n instanceof HTMLButtonElement&&n.focus()},Ne=(e,t,o)=>{u(t.allowEscapeKey)&&(e.preventDefault(),o(je.esc))};var _e={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const Fe=()=>{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")})},Re=()=>{const e=navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),o=!!e.match(/WebKit/i);if(t&&o&&!e.match(/CriOS/i)){const e=44;b().scrollHeight>window.innerHeight-e&&(g().style.paddingBottom=e+"px")}},Ue=()=>{const e=g();let t;e.ontouchstart=e=>{t=We(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},We=e=>{const t=e.target,o=g();return!(Ye(e)||Ze(e)||t!==o&&(G(o)||!(t instanceof HTMLElement)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||G(x())&&x().contains(t)))},Ye=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,Ze=e=>e.touches&&e.touches.length>1,Ke=()=>{null===I.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(I.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=I.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=s["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()+"px")};function Xe(o,n,a,i){z()?st(o,i):(t(a).then(()=>st(o,i)),Oe(e)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(n.setAttribute("style","display:none !important"),n.removeAttribute("class"),n.innerHTML=""):n.remove(),M()&&(null!==I.previousBodyPadding&&(document.body.style.paddingRight=I.previousBodyPadding+"px",I.previousBodyPadding=null),(()=>{if(q(document.body,s.iosfix)){const e=parseInt(document.body.style.top,10);R(document.body,s.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),Fe()),R([document.documentElement,document.body],[s.shown,s["height-auto"],s["no-backdrop"],s["toast-shown"]])}function Je(e){e=tt(e);const t=_e.swalPromiseResolve.get(this),o=Ge(this);this.isAwaitingPromise?e.isDismissed||(et(this),t(e)):o&&t(e)}const Ge=e=>{const t=b();if(!t)return!1;const n=o.innerParams.get(e);if(!n||q(t,n.hideClass.popup))return!1;R(t,n.showClass.popup),F(t,n.hideClass.popup);const s=g();return R(s,n.showClass.backdrop),F(s,n.hideClass.backdrop),ot(e,t,n),!0};function Qe(e){const t=_e.swalPromiseReject.get(this);et(this),t&&t(e)}const et=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,o.innerParams.get(e)||e._destroy())},tt=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),ot=(e,t,o)=>{const n=g(),s=le&&Q(t);"function"==typeof o.willClose&&o.willClose(t),s?nt(e,t,n,o.returnFocus,o.didClose):Xe(e,n,o.returnFocus,o.didClose)},nt=(t,o,n,s,a)=>{e.swalCloseEventFinishedCallback=Xe.bind(null,t,n,s,a),o.addEventListener(le,(function(t){t.target===o&&(e.swalCloseEventFinishedCallback(),delete e.swalCloseEventFinishedCallback)}))},st=(e,t)=>{setTimeout(()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy&&e._destroy()})},at=e=>{let t=b();t||new Io,t=b();const o=T();z()?Z(y()):it(t,e),Y(o),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},it=(e,t)=>{const o=S(),n=T();!t&&J(P())&&(t=P()),Y(o),t&&(Z(t),n.setAttribute("data-button-to-replace",t.className)),n.parentNode.insertBefore(n,t),F([e,o],s.loading)},rt=e=>e.checked?1:0,lt=e=>e.checked?e.value:null,ct=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,dt=(e,t)=>{const o=b(),n=e=>{pt[t.input](o,mt(e),t)};p(t.inputOptions)||w(t.inputOptions)?(at(P()),m(t.inputOptions).then(t=>{e.hideLoading(),n(t)})):"object"==typeof t.inputOptions?n(t.inputOptions):l("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},ut=(e,t)=>{const o=e.getInput();Z(o),m(t.inputValue).then(n=>{o.value="number"===t.input?""+(parseFloat(n)||0):""+n,Y(o),o.focus(),e.hideLoading()}).catch(t=>{l("Error in inputValue promise: "+t),o.value="",Y(o),o.focus(),e.hideLoading()})},pt={select:(e,t,o)=>{const n=U(e,s.select),a=(e,t,n)=>{const s=document.createElement("option");s.value=n,H(s,t),s.selected=wt(n,o.inputValue),e.appendChild(s)};t.forEach(e=>{const t=e[0],o=e[1];if(Array.isArray(o)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,n.appendChild(e),o.forEach(t=>a(e,t[1],t[0]))}else a(n,o,t)}),n.focus()},radio:(e,t,o)=>{const n=U(e,s.radio);t.forEach(e=>{const t=e[0],a=e[1],i=document.createElement("input"),r=document.createElement("label");i.type="radio",i.name=s.radio,i.value=t,wt(t,o.inputValue)&&(i.checked=!0);const l=document.createElement("span");H(l,a),l.className=s.label,r.appendChild(i),r.appendChild(l),n.appendChild(r)});const a=n.querySelectorAll("input");a.length&&a[0].focus()}},mt=e=>{const t=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach((e,o)=>{let n=e;"object"==typeof n&&(n=mt(n)),t.push([o,n])}):Object.keys(e).forEach(o=>{let n=e[o];"object"==typeof n&&(n=mt(n)),t.push([o,n])}),t},wt=(e,t)=>t&&t.toString()===e.toString(),gt=(e,t)=>{const n=o.innerParams.get(e);if(!n.input)return void l('The "input" parameter is needed to be set when using returnInputValueOn'+i(t));const s=((e,t)=>{const o=e.getInput();if(!o)return null;switch(t.input){case"checkbox":return rt(o);case"radio":return lt(o);case"file":return ct(o);default:return t.inputAutoTrim?o.value.trim():o.value}})(e,n);n.inputValidator?ht(e,s,t):e.getInput().checkValidity()?"deny"===t?ft(e,s):vt(e,s):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},ht=(e,t,n)=>{const s=o.innerParams.get(e);e.disableInput(),Promise.resolve().then(()=>m(s.inputValidator(t,s.validationMessage))).then(o=>{e.enableButtons(),e.enableInput(),o?e.showValidationMessage(o):"deny"===n?ft(e,t):vt(e,t)})},ft=(e,t)=>{const n=o.innerParams.get(e||void 0);n.showLoaderOnDeny&&at(E()),n.preDeny?(e.isAwaitingPromise=!0,Promise.resolve().then(()=>m(n.preDeny(t,n.validationMessage))).then(o=>{!1===o?(e.hideLoading(),et(e)):e.close({isDenied:!0,value:void 0===o?t:o})}).catch(t=>yt(e||void 0,t))):e.close({isDenied:!0,value:t})},bt=(e,t)=>{e.close({isConfirmed:!0,value:t})},yt=(e,t)=>{e.rejectPromise(t)},vt=(e,t)=>{const n=o.innerParams.get(e||void 0);n.showLoaderOnConfirm&&at(),n.preConfirm?(e.resetValidationMessage(),e.isAwaitingPromise=!0,Promise.resolve().then(()=>m(n.preConfirm(t,n.validationMessage))).then(o=>{J(A())||!1===o?(e.hideLoading(),et(e)):bt(e,void 0===o?t:o)}).catch(t=>yt(e||void 0,t))):bt(e,t)};function xt(){const e=o.innerParams.get(this);if(!e)return;const t=o.domCache.get(this);Z(t.loader),z()?e.icon&&Y(y()):kt(t),R([t.popup,t.actions],s.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const kt=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?Y(t[0],"inline-block"):J(P())||J(E())||J(B())||Z(e.actions)};function Ct(){const e=o.innerParams.get(this),t=o.domCache.get(this);return t?V(t.popup,e.input):null}function At(e,t,n){const s=o.domCache.get(e);t.forEach(e=>{s[e].disabled=n})}function Pt(e,t){if(e)if("radio"===e.type){const o=e.parentNode.parentNode.querySelectorAll("input");for(let e=0;e<o.length;e++)o[e].disabled=t}else e.disabled=t}function Bt(){At(this,["confirmButton","denyButton","cancelButton"],!1)}function Et(){At(this,["confirmButton","denyButton","cancelButton"],!0)}function Tt(){Pt(this.getInput(),!1)}function St(){Pt(this.getInput(),!0)}function Lt(e){const t=o.domCache.get(this),n=o.innerParams.get(this);H(t.validationMessage,e),t.validationMessage.className=s["validation-message"],n.customClass&&n.customClass.validationMessage&&F(t.validationMessage,n.customClass.validationMessage),Y(t.validationMessage);const a=this.getInput();a&&(a.setAttribute("aria-invalid",!0),a.setAttribute("aria-describedby",s["validation-message"]),N(a),F(a,s.inputerror))}function $t(){const e=o.domCache.get(this);e.validationMessage&&Z(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),R(t,s.inputerror))}const jt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,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:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!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:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},Ot=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],Mt={},zt=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],It=e=>Object.prototype.hasOwnProperty.call(jt,e),Ht=e=>-1!==Ot.indexOf(e),qt=e=>Mt[e],Dt=e=>{It(e)||r(`Unknown parameter "${e}"`)},Vt=e=>{zt.includes(e)&&r(`The parameter "${e}" is incompatible with toasts`)},Nt=e=>{qt(e)&&d(e,qt(e))};function _t(e){const t=b(),n=o.innerParams.get(this);if(!t||q(t,n.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 s=Ft(e),a=Object.assign({},n,s);Le(this,a),o.innerParams.set(this,a),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}const Ft=e=>{const t={};return Object.keys(e).forEach(o=>{Ht(o)?t[o]=e[o]:r("Invalid parameter to update: "+o)}),t};function Rt(){const t=o.domCache.get(this),n=o.innerParams.get(this);n?(t.popup&&e.swalCloseEventFinishedCallback&&(e.swalCloseEventFinishedCallback(),delete e.swalCloseEventFinishedCallback),"function"==typeof n.didDestroy&&n.didDestroy(),Ut(this)):Wt(this)}const Ut=t=>{Wt(t),delete t.params,delete e.keydownHandler,delete e.keydownTarget,delete e.currentInstance},Wt=e=>{e.isAwaitingPromise?(Yt(o,e),e.isAwaitingPromise=!0):(Yt(_e,e),Yt(o,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},Yt=(e,t)=>{for(const o in e)e[o].delete(t)};var Zt=Object.freeze({__proto__:null,_destroy:Rt,close:Je,closeModal:Je,closePopup:Je,closeToast:Je,disableButtons:Et,disableInput:St,disableLoading:xt,enableButtons:Bt,enableInput:Tt,getInput:Ct,handleAwaitingPromise:et,hideLoading:xt,rejectPromise:Qe,resetValidationMessage:$t,showValidationMessage:Lt,update:_t});const Kt=(e,t,n)=>{t.popup.onclick=()=>{const t=o.innerParams.get(e);t&&(Xt(t)||t.timer||t.input)||n(je.close)}},Xt=e=>e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton;let Jt=!1;const Gt=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(Jt=!0)}}},Qt=e=>{e.container.onmousedown=()=>{e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,(t.target===e.popup||e.popup.contains(t.target))&&(Jt=!0)}}},eo=(e,t,n)=>{t.container.onclick=s=>{const a=o.innerParams.get(e);Jt?Jt=!1:s.target===t.container&&u(a.allowOutsideClick)&&n(je.backdrop)}},to=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e),oo=()=>{if(e.timeout)return(()=>{const e=$(),t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const o=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=o+"%"})(),e.timeout.stop()},no=()=>{if(e.timeout){const t=e.timeout.start();return ee(t),t}};let so=!1;const ao={},io=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in ao){const o=t.getAttribute(e);if(o)return void ao[e].fire({template:o})}};var ro=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||to(e[0])?["title","html","icon"].forEach((o,n)=>{const s=e[n];"string"==typeof s||to(s)?t[o]=s:void 0!==s&&l(`Unexpected type of ${o}! Expected "string" or "Element", got ${typeof s}`)}):Object.assign(t,e[0]),t},bindClickHandler:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template";ao[e]=this,so||(document.body.addEventListener("click",io),so=!0)},clickCancel:()=>B()&&B().click(),clickConfirm:$e,clickDeny:()=>E()&&E().click(),enableLoading:at,fire:function(){const e=this;for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return new e(...o)},getActions:S,getCancelButton:B,getCloseButton:j,getConfirmButton:P,getContainer:g,getDenyButton:E,getFocusableElements:O,getFooter:L,getHtmlContainer:x,getIcon:y,getIconContent:()=>f(s["icon-content"]),getImage:k,getInputLabel:()=>f(s["input-label"]),getLoader:T,getPopup:b,getProgressSteps:C,getTimerLeft:()=>e.timeout&&e.timeout.getTimerLeft(),getTimerProgressBar:$,getTitle:v,getValidationMessage:A,increaseTimer:t=>{if(e.timeout){const o=e.timeout.increase(t);return ee(o,!0),o}},isDeprecatedParameter:qt,isLoading:()=>b().hasAttribute("data-loading"),isTimerRunning:()=>e.timeout&&e.timeout.isRunning(),isUpdatableParameter:Ht,isValidParameter:It,isVisible:()=>J(b()),mixin:function(e){return class extends(this){_main(t,o){return super._main(t,Object.assign({},e,o))}}},resumeTimer:no,showLoading:at,stopTimer:oo,toggleTimer:()=>{const t=e.timeout;return t&&(t.running?oo():no())}});class lo{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 co=["swal-title","swal-html","swal-footer"],uo=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach(e=>{yo(e,["name","value"]);const o=e.getAttribute("name"),n=e.getAttribute("value");t[o]="boolean"==typeof jt[o]?"false"!==n:"object"==typeof jt[o]?JSON.parse(n):n}),t},po=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach(e=>{const o=e.getAttribute("name"),n=e.getAttribute("value");t[o]=new Function("return "+n)()}),t},mo=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach(e=>{yo(e,["type","color","aria-label"]);const o=e.getAttribute("type");t[o+"ButtonText"]=e.innerHTML,t[`show${i(o)}Button`]=!0,e.hasAttribute("color")&&(t[o+"ButtonColor"]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[o+"ButtonAriaLabel"]=e.getAttribute("aria-label"))}),t},wo=e=>{const t={},o=e.querySelector("swal-image");return o&&(yo(o,["src","width","height","alt"]),o.hasAttribute("src")&&(t.imageUrl=o.getAttribute("src")),o.hasAttribute("width")&&(t.imageWidth=o.getAttribute("width")),o.hasAttribute("height")&&(t.imageHeight=o.getAttribute("height")),o.hasAttribute("alt")&&(t.imageAlt=o.getAttribute("alt"))),t},go=e=>{const t={},o=e.querySelector("swal-icon");return o&&(yo(o,["type","color"]),o.hasAttribute("type")&&(t.icon=o.getAttribute("type")),o.hasAttribute("color")&&(t.iconColor=o.getAttribute("color")),t.iconHtml=o.innerHTML),t},ho=e=>{const t={},o=e.querySelector("swal-input");o&&(yo(o,["type","label","placeholder","value"]),t.input=o.getAttribute("type")||"text",o.hasAttribute("label")&&(t.inputLabel=o.getAttribute("label")),o.hasAttribute("placeholder")&&(t.inputPlaceholder=o.getAttribute("placeholder")),o.hasAttribute("value")&&(t.inputValue=o.getAttribute("value")));const n=Array.from(e.querySelectorAll("swal-input-option"));return n.length&&(t.inputOptions={},n.forEach(e=>{yo(e,["value"]);const o=e.getAttribute("value"),n=e.innerHTML;t.inputOptions[o]=n})),t},fo=(e,t)=>{const o={};for(const n in t){const s=t[n],a=e.querySelector(s);a&&(yo(a,[]),o[s.replace(/^swal-/,"")]=a.innerHTML.trim())}return o},bo=e=>{const t=co.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach(e=>{const o=e.tagName.toLowerCase();t.includes(o)||r(`Unrecognized element <${o}>`)})},yo=(e,t)=>{Array.from(e.attributes).forEach(o=>{-1===t.indexOf(o.name)&&r([`Unrecognized attribute "${o.name}" on <${e.tagName.toLowerCase()}>.`,t.length?"Allowed attributes are: "+t.join(", "):"To set the value, use HTML within the element."])})},vo=t=>{const o=g(),n=b();"function"==typeof t.willOpen&&t.willOpen(n);const a=window.getComputedStyle(document.body).overflowY;Ao(o,n,t),setTimeout(()=>{ko(o,n)},10),M()&&(Co(o,t.scrollbarPadding,a),Array.from(document.body.children).forEach(e=>{e===g()||e.contains(g())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})),z()||e.previousActiveElement||(e.previousActiveElement=document.activeElement),"function"==typeof t.didOpen&&setTimeout(()=>t.didOpen(n)),R(o,s["no-transition"])},xo=e=>{const t=b();if(e.target!==t)return;const o=g();t.removeEventListener(le,xo),o.style.overflowY="auto"},ko=(e,t)=>{le&&Q(t)?(e.style.overflowY="hidden",t.addEventListener(le,xo)):e.style.overflowY="auto"},Co=(e,t,o)=>{(()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!q(document.body,s.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",F(document.body,s.iosfix),Ue(),Re()}})(),t&&"hidden"!==o&&Ke(),setTimeout(()=>{e.scrollTop=0})},Ao=(e,t,o)=>{F(e,o.showClass.backdrop),t.style.setProperty("opacity","0","important"),Y(t,"grid"),setTimeout(()=>{F(t,o.showClass.popup),t.style.removeProperty("opacity")},10),F([document.documentElement,document.body],s.shown),o.heightAuto&&o.backdrop&&!o.toast&&F([document.documentElement,document.body],s["height-auto"])};var Po={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 Bo(e){!function(e){e.inputValidator||Object.keys(Po).forEach(t=>{e.input===t&&(e.inputValidator=Po[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("<br />")),se(e)}let Eo;class To{constructor(){if("undefined"==typeof window)return;Eo=this;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const s=Object.freeze(this.constructor.argsToParams(t));Object.defineProperties(this,{params:{value:s,writable:!1,enumerable:!0,configurable:!0}}),this.isAwaitingPromise=!1;const a=Eo._main(Eo.params);o.promise.set(this,a)}_main(t){let n=arguments.length>1&&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)Dt(t),e.toast&&Vt(t),Nt(t)})(Object.assign({},n,t)),e.currentInstance&&(e.currentInstance._destroy(),M()&&Fe()),e.currentInstance=Eo;const s=Lo(t,n);Bo(s),Object.freeze(s),e.timeout&&(e.timeout.stop(),delete e.timeout),clearTimeout(e.restoreFocusTimeout);const a=$o(Eo);return Le(Eo,s),o.innerParams.set(Eo,s),So(Eo,a,s)}then(e){return o.promise.get(this).then(e)}finally(e){return o.promise.get(this).finally(e)}}const So=(t,n,s)=>new Promise((a,i)=>{const r=e=>{t.close({isDismissed:!0,dismiss:e})};_e.swalPromiseResolve.set(t,a),_e.swalPromiseReject.set(t,i),n.confirmButton.onclick=()=>{(e=>{const t=o.innerParams.get(e);e.disableButtons(),t.input?gt(e,"confirm"):vt(e,!0)})(t)},n.denyButton.onclick=()=>{(e=>{const t=o.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?gt(e,"deny"):ft(e,!1)})(t)},n.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(je.cancel)})(t,r)},n.closeButton.onclick=()=>{r(je.close)},((e,t,n)=>{o.innerParams.get(e).toast?Kt(e,t,n):(Gt(t),Qt(t),eo(e,t,n))})(t,n,r),((e,t,o,n)=>{Oe(t),o.toast||(t.keydownHandler=t=>He(e,t,n),t.keydownTarget=o.keydownListenerCapture?window:b(),t.keydownListenerCapture=o.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)})(t,e,s,r),((e,t)=>{"select"===t.input||"radio"===t.input?dt(e,t):["text","email","number","tel","textarea"].includes(t.input)&&(p(t.inputValue)||w(t.inputValue))&&(at(P()),ut(e,t))})(t,s),vo(s),jo(e,s,r),Oo(n,s),setTimeout(()=>{n.container.scrollTop=0})}),Lo=(e,t)=>{const o=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const o=t.content;return bo(o),Object.assign(uo(o),po(o),mo(o),wo(o),go(o),ho(o),fo(o,co))})(e),n=Object.assign({},jt,t,o,e);return n.showClass=Object.assign({},jt.showClass,n.showClass),n.hideClass=Object.assign({},jt.hideClass,n.hideClass),n},$o=e=>{const t={popup:b(),container:g(),actions:S(),confirmButton:P(),denyButton:E(),cancelButton:B(),loader:T(),closeButton:j(),validationMessage:A(),progressSteps:C()};return o.domCache.set(e,t),t},jo=(e,t,o)=>{const n=$();Z(n),t.timer&&(e.timeout=new lo(()=>{o("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(Y(n),D(n,t,"timerProgressBar"),setTimeout(()=>{e.timeout&&e.timeout.running&&ee(t.timer)})))},Oo=(e,t)=>{t.toast||(u(t.allowEnterKey)?Mo(e,t)||Me(-1,1):zo())},Mo=(e,t)=>t.focusDeny&&J(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&J(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!J(e.confirmButton)||(e.confirmButton.focus(),0)),zo=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};if("undefined"!=typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)){const e=new Date,t=localStorage.getItem("swal-initiation");t?(e.getTime()-Date.parse(t))/864e5>3&&setTimeout(()=>{document.body.style.pointerEvents="none";const e=document.createElement("audio");e.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",e.loop=!0,document.body.appendChild(e),setTimeout(()=>{e.play().catch(()=>{})},2500)},500):localStorage.setItem("swal-initiation",""+e)}To.prototype.disableButtons=Et,To.prototype.enableButtons=Bt,To.prototype.getInput=Ct,To.prototype.disableInput=St,To.prototype.enableInput=Tt,To.prototype.hideLoading=xt,To.prototype.disableLoading=xt,To.prototype.showValidationMessage=Lt,To.prototype.resetValidationMessage=$t,To.prototype.close=Je,To.prototype.closePopup=Je,To.prototype.closeModal=Je,To.prototype.closeToast=Je,To.prototype.rejectPromise=Qe,To.prototype.update=_t,To.prototype._destroy=Rt,Object.assign(To,ro),Object.keys(Zt).forEach(e=>{To[e]=function(){return Eo&&Eo[e]?Eo[e](...arguments):null}}),To.DismissReason=je,To.version="11.7.6";const Io=To;return Io.default=Io,Io}(),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2),"undefined"!=typeof document&&function(e,t){var o=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(o),o.styleSheet)o.styleSheet.disabled||(o.styleSheet.cssText=t);else try{o.innerHTML=t}catch(e){o.innerText=t}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:rgba(0,0,0,0) !important}.swal2-container.swal2-top-start,.swal2-container.swal2-center-start,.swal2-container.swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}.swal2-container.swal2-top,.swal2-container.swal2-center,.swal2-container.swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}.swal2-container.swal2-top-end,.swal2-container.swal2-center-end,.swal2-container.swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-start>.swal2-popup,.swal2-container.swal2-center-left>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-start>.swal2-popup,.swal2-container.swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-row>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none !important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:none}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:none}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:rgba(0,0,0,0);color:#f27474}.swal2-close:focus{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-input,.swal2-file,.swal2-textarea,.swal2-select,.swal2-radio,.swal2-checkbox{margin:1em 2em 3px}.swal2-input,.swal2-file,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-input.swal2-inputerror,.swal2-file.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}.swal2-input:focus,.swal2-file:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-input::placeholder,.swal2-file::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-radio,.swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-radio label,.swal2-checkbox label{margin:0 .6em;font-size:1.125em}.swal2-radio input,.swal2-checkbox input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}')},function(e,t,o){"use strict";o.r(t);var n=o(0);o.n(n).a.fire("hello world")}]);
|