@open-xamu-co/ui-components-vue 1.0.0
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/CHANGELOG.md +8 -0
- package/LICENSE +7 -0
- package/README.md +3 -0
- package/dist/_virtual/chunk_h.cjs.js +1 -0
- package/dist/_virtual/chunk_h.es.js +4372 -0
- package/dist/_virtual/index.cjs.js +1 -0
- package/dist/_virtual/index.es.js +39 -0
- package/dist/_virtual/lodash.cjs.js +27 -0
- package/dist/_virtual/lodash.es.js +3686 -0
- package/dist/_virtual/nanoid.cjs.js +1 -0
- package/dist/_virtual/nanoid.es.js +4 -0
- package/dist/_virtual/sweetalert2.cjs.js +65 -0
- package/dist/_virtual/sweetalert2.es.js +1415 -0
- package/dist/_virtual/validator.cjs.js +7 -0
- package/dist/_virtual/validator.es.js +4508 -0
- package/dist/components/Dropdown.vue.cjs +1 -0
- package/dist/components/Dropdown.vue.d.ts +64 -0
- package/dist/components/Dropdown.vue.mjs +9 -0
- package/dist/components/Modal.vue.cjs +1 -0
- package/dist/components/Modal.vue.d.ts +112 -0
- package/dist/components/Modal.vue.mjs +9 -0
- package/dist/components/Slider.vue.cjs +1 -0
- package/dist/components/Slider.vue.d.ts +110 -0
- package/dist/components/Slider.vue.mjs +9 -0
- package/dist/components/Table.vue.cjs +1 -0
- package/dist/components/Table.vue.d.ts +98 -0
- package/dist/components/Table.vue.mjs +9 -0
- package/dist/components/action/Button.vue.cjs +1 -0
- package/dist/components/action/Button.vue.d.ts +149 -0
- package/dist/components/action/Button.vue.mjs +9 -0
- package/dist/components/action/ButtonLink.vue.cjs +1 -0
- package/dist/components/action/ButtonLink.vue.d.ts +155 -0
- package/dist/components/action/ButtonLink.vue.mjs +9 -0
- package/dist/components/action/ButtonToggle.vue.cjs +1 -0
- package/dist/components/action/ButtonToggle.vue.d.ts +155 -0
- package/dist/components/action/ButtonToggle.vue.mjs +9 -0
- package/dist/components/action/Link.vue.cjs +1 -0
- package/dist/components/action/Link.vue.d.ts +155 -0
- package/dist/components/action/Link.vue.mjs +9 -0
- package/dist/components/base/Action.vue.cjs +1 -0
- package/dist/components/base/Action.vue.d.ts +95 -0
- package/dist/components/base/Action.vue.mjs +9 -0
- package/dist/components/base/Img.vue.cjs +1 -0
- package/dist/components/base/Img.vue.d.ts +48 -0
- package/dist/components/base/Img.vue.mjs +9 -0
- package/dist/components/base/Input.vue.cjs +1 -0
- package/dist/components/base/Input.vue.d.ts +71 -0
- package/dist/components/base/Input.vue.mjs +9 -0
- package/dist/components/base/Select.vue.cjs +1 -0
- package/dist/components/base/Select.vue.d.ts +61 -0
- package/dist/components/base/Select.vue.mjs +9 -0
- package/dist/components/base/Wrapper.vue.cjs +1 -0
- package/dist/components/base/Wrapper.vue.d.ts +42 -0
- package/dist/components/base/Wrapper.vue.mjs +9 -0
- package/dist/components/box/Action.vue.cjs +1 -0
- package/dist/components/box/Action.vue.d.ts +170 -0
- package/dist/components/box/Action.vue.mjs +9 -0
- package/dist/components/box/Message.vue.cjs +1 -0
- package/dist/components/box/Message.vue.d.ts +143 -0
- package/dist/components/box/Message.vue.mjs +9 -0
- package/dist/components/form/Input.vue.cjs +1 -0
- package/dist/components/form/Input.vue.d.ts +49 -0
- package/dist/components/form/Input.vue.mjs +9 -0
- package/dist/components/form/InputCountriesAPI.vue.d.ts +45 -0
- package/dist/components/form/InputLoop.vue.d.ts +44 -0
- package/dist/components/form/InputNValues.vue.d.ts +34 -0
- package/dist/components/form/InputOptions.vue.d.ts +22 -0
- package/dist/components/form/Simple.vue.cjs +1 -0
- package/dist/components/form/Simple.vue.d.ts +45 -0
- package/dist/components/form/Simple.vue.mjs +9 -0
- package/dist/components/form/Stages.vue.cjs +1 -0
- package/dist/components/form/Stages.vue.d.ts +77 -0
- package/dist/components/form/Stages.vue.mjs +9 -0
- package/dist/components/icon/Fa.vue.cjs +1 -0
- package/dist/components/icon/Fa.vue.d.ts +47 -0
- package/dist/components/icon/Fa.vue.mjs +9 -0
- package/dist/components/icon/Simple.vue.cjs +1 -0
- package/dist/components/icon/Simple.vue.d.ts +29 -0
- package/dist/components/icon/Simple.vue.mjs +9 -0
- package/dist/components/index.cjs +1 -0
- package/dist/components/index.d.ts +32 -0
- package/dist/components/index.mjs +40 -0
- package/dist/components/input/Color.vue.d.ts +88 -0
- package/dist/components/input/File.vue.cjs +1 -0
- package/dist/components/input/File.vue.d.ts +135 -0
- package/dist/components/input/File.vue.mjs +9 -0
- package/dist/components/input/Text.vue.cjs +1 -0
- package/dist/components/input/Text.vue.d.ts +128 -0
- package/dist/components/input/Text.vue.mjs +9 -0
- package/dist/components/input/Toggle.vue.cjs +1 -0
- package/dist/components/input/Toggle.vue.d.ts +113 -0
- package/dist/components/input/Toggle.vue.mjs +9 -0
- package/dist/components/loader/Content.vue.cjs +1 -0
- package/dist/components/loader/Content.vue.d.ts +73 -0
- package/dist/components/loader/Content.vue.mjs +9 -0
- package/dist/components/loader/ContentFetch.vue.cjs +1 -0
- package/dist/components/loader/ContentFetch.vue.d.ts +60 -0
- package/dist/components/loader/ContentFetch.vue.mjs +9 -0
- package/dist/components/loader/Simple.vue.cjs +1 -0
- package/dist/components/loader/Simple.vue.d.ts +47 -0
- package/dist/components/loader/Simple.vue.mjs +9 -0
- package/dist/components/pagination/Content.vue.cjs +1 -0
- package/dist/components/pagination/Content.vue.d.ts +66 -0
- package/dist/components/pagination/Content.vue.mjs +9 -0
- package/dist/components/pagination/Simple.vue.cjs +1 -0
- package/dist/components/pagination/Simple.vue.d.ts +41 -0
- package/dist/components/pagination/Simple.vue.mjs +9 -0
- package/dist/components/select/Filter.vue.cjs +1 -0
- package/dist/components/select/Filter.vue.d.ts +110 -0
- package/dist/components/select/Filter.vue.mjs +9 -0
- package/dist/components/select/Simple.vue.cjs +1 -0
- package/dist/components/select/Simple.vue.d.ts +88 -0
- package/dist/components/select/Simple.vue.mjs +9 -0
- package/dist/components/value/Complex.vue.cjs +1 -0
- package/dist/components/value/Complex.vue.d.ts +80 -0
- package/dist/components/value/Complex.vue.mjs +9 -0
- package/dist/components/value/Simple.vue.cjs +1 -0
- package/dist/components/value/Simple.vue.d.ts +50 -0
- package/dist/components/value/Simple.vue.mjs +9 -0
- package/dist/composables/browser.d.ts +11 -0
- package/dist/composables/countries.d.ts +21 -0
- package/dist/composables/fetch.d.ts +10 -0
- package/dist/composables/helpers.d.ts +2 -0
- package/dist/composables/input.d.ts +9 -0
- package/dist/composables/modifiers.d.ts +9 -0
- package/dist/composables/state.d.ts +9 -0
- package/dist/composables/theme.d.ts +28 -0
- package/dist/composables/uuid.d.ts +9 -0
- package/dist/plugin.cjs +1 -0
- package/dist/plugin.d.ts +8 -0
- package/dist/plugin.mjs +36 -0
- package/dist/types/countries.d.ts +12 -0
- package/dist/types/props.d.ts +77 -0
- package/dist/vite.svg +22 -0
- package/package.json +162 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";let o=(r=21)=>crypto.getRandomValues(new Uint8Array(r)).reduce((n,e)=>(e&=63,e<36?n+=e.toString(36):e<62?n+=(e-26).toString(36).toUpperCase():e>62?n+="-":n+="_",n),"");exports.nanoid=o;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";const S=require("./lodash.cjs.js");var xe={exports:{}};/*!
|
|
2
|
+
* sweetalert2 v11.7.28
|
|
3
|
+
* Released under the MIT License.
|
|
4
|
+
*/(function(Ie,bi){(function(ut,dt){Ie.exports=dt()})(S.commonjsGlobal,function(){function ut(t,e){var n=It(t,e,"get");return Le(t,n)}function dt(t,e,n){var o=It(t,e,"set");return Oe(t,o,n),n}function It(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Le(t,e){return e.get?e.get.call(t):e.value}function Oe(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}function Me(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function De(t,e,n){Me(t,e),e.set(t,n)}const He=100,c={},je=()=>{c.previousActiveElement instanceof HTMLElement?(c.previousActiveElement.focus(),c.previousActiveElement=null):document.body&&document.body.focus()},Fe=t=>new Promise(e=>{if(!t)return e();const n=window.scrollX,o=window.scrollY;c.restoreFocusTimeout=setTimeout(()=>{je(),e()},He),window.scrollTo(n,o)}),Lt="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((t,e)=>(t[e]=Lt+e,t),{}),J=["success","warning","info","question","error"].reduce((t,e)=>(t[e]=Lt+e,t),{}),Ot="SweetAlert2:",ft=t=>t.charAt(0).toUpperCase()+t.slice(1),y=t=>{console.warn("".concat(Ot," ").concat(typeof t=="object"?t.join(" "):t))},L=t=>{console.error("".concat(Ot," ").concat(t))},Mt=[],Ve=t=>{Mt.includes(t)||(Mt.push(t),y(t))},qe=(t,e)=>{Ve('"'.concat(t,'" is deprecated and will be removed in the next major release. Please use "').concat(e,'" instead.'))},X=t=>typeof t=="function"?t():t,pt=t=>t&&typeof t.toPromise=="function",N=t=>pt(t)?t.toPromise():Promise.resolve(t),gt=t=>t&&Promise.resolve(t)===t,b=()=>document.body.querySelector(".".concat(i.container)),z=t=>{const e=b();return e?e.querySelector(t):null},C=t=>z(".".concat(t)),u=()=>C(i.popup),K=()=>C(i.icon),Re=()=>C(i["icon-content"]),Dt=()=>C(i.title),ht=()=>C(i["html-container"]),Ht=()=>C(i.image),mt=()=>C(i["progress-steps"]),Q=()=>C(i["validation-message"]),B=()=>z(".".concat(i.actions," .").concat(i.confirm)),F=()=>z(".".concat(i.actions," .").concat(i.cancel)),O=()=>z(".".concat(i.actions," .").concat(i.deny)),We=()=>C(i["input-label"]),V=()=>z(".".concat(i.loader)),G=()=>C(i.actions),jt=()=>C(i.footer),tt=()=>C(i["timer-progress-bar"]),bt=()=>C(i.close),_e=`
|
|
5
|
+
a[href],
|
|
6
|
+
area[href],
|
|
7
|
+
input:not([disabled]),
|
|
8
|
+
select:not([disabled]),
|
|
9
|
+
textarea:not([disabled]),
|
|
10
|
+
button:not([disabled]),
|
|
11
|
+
iframe,
|
|
12
|
+
object,
|
|
13
|
+
embed,
|
|
14
|
+
[tabindex="0"],
|
|
15
|
+
[contenteditable],
|
|
16
|
+
audio[controls],
|
|
17
|
+
video[controls],
|
|
18
|
+
summary
|
|
19
|
+
`,yt=()=>{const t=u();if(!t)return[];const e=t.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),n=Array.from(e).sort((r,a)=>{const f=parseInt(r.getAttribute("tabindex")||"0"),p=parseInt(a.getAttribute("tabindex")||"0");return f>p?1:f<p?-1:0}),o=t.querySelectorAll(_e),s=Array.from(o).filter(r=>r.getAttribute("tabindex")!=="-1");return[...new Set(n.concat(s))].filter(r=>A(r))},wt=()=>T(document.body,i.shown)&&!T(document.body,i["toast-shown"])&&!T(document.body,i["no-backdrop"]),et=()=>{const t=u();return t?T(t,i.toast):!1},Ue=()=>{const t=u();return t?t.hasAttribute("data-loading"):!1},v=(t,e)=>{if(t.textContent="",e){const o=new DOMParser().parseFromString(e,"text/html"),s=o.querySelector("head");s&&Array.from(s.childNodes).forEach(a=>{t.appendChild(a)});const r=o.querySelector("body");r&&Array.from(r.childNodes).forEach(a=>{a instanceof HTMLVideoElement||a instanceof HTMLAudioElement?t.appendChild(a.cloneNode(!0)):t.appendChild(a)})}},T=(t,e)=>{if(!e)return!1;const n=e.split(/\s+/);for(let o=0;o<n.length;o++)if(!t.classList.contains(n[o]))return!1;return!0},Ne=(t,e)=>{Array.from(t.classList).forEach(n=>{!Object.values(i).includes(n)&&!Object.values(J).includes(n)&&!Object.values(e.showClass||{}).includes(n)&&t.classList.remove(n)})},P=(t,e,n)=>{if(Ne(t,e),e.customClass&&e.customClass[n]){if(typeof e.customClass[n]!="string"&&!e.customClass[n].forEach){y("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof e.customClass[n],'"'));return}l(t,e.customClass[n])}},nt=(t,e)=>{if(!e)return null;switch(e){case"select":case"textarea":case"file":return t.querySelector(".".concat(i.popup," > .").concat(i[e]));case"checkbox":return t.querySelector(".".concat(i.popup," > .").concat(i.checkbox," input"));case"radio":return t.querySelector(".".concat(i.popup," > .").concat(i.radio," input:checked"))||t.querySelector(".".concat(i.popup," > .").concat(i.radio," input:first-child"));case"range":return t.querySelector(".".concat(i.popup," > .").concat(i.range," input"));default:return t.querySelector(".".concat(i.popup," > .").concat(i.input))}},Ft=t=>{if(t.focus(),t.type!=="file"){const e=t.value;t.value="",t.value=e}},Vt=(t,e,n)=>{!t||!e||(typeof e=="string"&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(o=>{Array.isArray(t)?t.forEach(s=>{n?s.classList.add(o):s.classList.remove(o)}):n?t.classList.add(o):t.classList.remove(o)}))},l=(t,e)=>{Vt(t,e,!0)},k=(t,e)=>{Vt(t,e,!1)},x=(t,e)=>{const n=Array.from(t.children);for(let o=0;o<n.length;o++){const s=n[o];if(s instanceof HTMLElement&&T(s,e))return s}},M=(t,e,n)=>{n==="".concat(parseInt(n))&&(n=parseInt(n)),n||parseInt(n)===0?t.style[e]=typeof n=="number"?"".concat(n,"px"):n:t.style.removeProperty(e)},h=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"flex";t&&(t.style.display=e)},m=t=>{t&&(t.style.display="none")},qt=(t,e,n,o)=>{const s=t.querySelector(e);s&&(s.style[n]=o)},ot=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"flex";e?h(t,n):m(t)},A=t=>!!(t&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)),ze=()=>!A(B())&&!A(O())&&!A(F()),Rt=t=>t.scrollHeight>t.clientHeight,Wt=t=>{const e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return n>0||o>0},Ct=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=tt();n&&A(n)&&(e&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition="width ".concat(t/1e3,"s linear"),n.style.width="0%"},10))},Ke=()=>{const t=tt();if(!t)return;const e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";const n=parseInt(window.getComputedStyle(t).width),o=e/n*100;t.style.width="".concat(o,"%")},_t=()=>typeof window>"u"||typeof document>"u",Ge=`
|
|
20
|
+
<div aria-labelledby="`.concat(i.title,'" aria-describedby="').concat(i["html-container"],'" class="').concat(i.popup,`" tabindex="-1">
|
|
21
|
+
<button type="button" class="`).concat(i.close,`"></button>
|
|
22
|
+
<ul class="`).concat(i["progress-steps"],`"></ul>
|
|
23
|
+
<div class="`).concat(i.icon,`"></div>
|
|
24
|
+
<img class="`).concat(i.image,`" />
|
|
25
|
+
<h2 class="`).concat(i.title,'" id="').concat(i.title,`"></h2>
|
|
26
|
+
<div class="`).concat(i["html-container"],'" id="').concat(i["html-container"],`"></div>
|
|
27
|
+
<input class="`).concat(i.input,'" id="').concat(i.input,`" />
|
|
28
|
+
<input type="file" class="`).concat(i.file,`" />
|
|
29
|
+
<div class="`).concat(i.range,`">
|
|
30
|
+
<input type="range" />
|
|
31
|
+
<output></output>
|
|
32
|
+
</div>
|
|
33
|
+
<select class="`).concat(i.select,'" id="').concat(i.select,`"></select>
|
|
34
|
+
<div class="`).concat(i.radio,`"></div>
|
|
35
|
+
<label class="`).concat(i.checkbox,`">
|
|
36
|
+
<input type="checkbox" id="`).concat(i.checkbox,`" />
|
|
37
|
+
<span class="`).concat(i.label,`"></span>
|
|
38
|
+
</label>
|
|
39
|
+
<textarea class="`).concat(i.textarea,'" id="').concat(i.textarea,`"></textarea>
|
|
40
|
+
<div class="`).concat(i["validation-message"],'" id="').concat(i["validation-message"],`"></div>
|
|
41
|
+
<div class="`).concat(i.actions,`">
|
|
42
|
+
<div class="`).concat(i.loader,`"></div>
|
|
43
|
+
<button type="button" class="`).concat(i.confirm,`"></button>
|
|
44
|
+
<button type="button" class="`).concat(i.deny,`"></button>
|
|
45
|
+
<button type="button" class="`).concat(i.cancel,`"></button>
|
|
46
|
+
</div>
|
|
47
|
+
<div class="`).concat(i.footer,`"></div>
|
|
48
|
+
<div class="`).concat(i["timer-progress-bar-container"],`">
|
|
49
|
+
<div class="`).concat(i["timer-progress-bar"],`"></div>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
`).replace(/(^|\n)\s*/g,""),$e=()=>{const t=b();return t?(t.remove(),k([document.documentElement,document.body],[i["no-backdrop"],i["toast-shown"],i["has-column"]]),!0):!1},D=()=>{c.currentInstance.resetValidationMessage()},Ye=()=>{const t=u(),e=x(t,i.input),n=x(t,i.file),o=t.querySelector(".".concat(i.range," input")),s=t.querySelector(".".concat(i.range," output")),r=x(t,i.select),a=t.querySelector(".".concat(i.checkbox," input")),f=x(t,i.textarea);e.oninput=D,n.onchange=D,r.onchange=D,a.onchange=D,f.oninput=D,o.oninput=()=>{D(),s.value=o.value},o.onchange=()=>{D(),s.value=o.value}},Ze=t=>typeof t=="string"?document.querySelector(t):t,Je=t=>{const e=u();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")},Xe=t=>{window.getComputedStyle(t).direction==="rtl"&&l(b(),i.rtl)},Qe=t=>{const e=$e();if(_t()){L("SweetAlert2 requires document to initialize");return}const n=document.createElement("div");n.className=i.container,e&&l(n,i["no-transition"]),v(n,Ge);const o=Ze(t.target);o.appendChild(n),Je(t),Xe(o),Ye()},vt=(t,e)=>{t instanceof HTMLElement?e.appendChild(t):typeof t=="object"?tn(t,e):t&&v(e,t)},tn=(t,e)=>{t.jquery?en(e,t):v(e,t.toString())},en=(t,e)=>{if(t.textContent="",0 in e)for(let n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},H=(()=>{if(_t())return!1;const t=document.createElement("div");return typeof t.style.webkitAnimation<"u"?"webkitAnimationEnd":typeof t.style.animation<"u"?"animationend":!1})(),nn=(t,e)=>{const n=G(),o=V();!n||!o||(!e.showConfirmButton&&!e.showDenyButton&&!e.showCancelButton?m(n):h(n),P(n,e,"actions"),on(n,o,e),v(o,e.loaderHtml||""),P(o,e,"loader"))};function on(t,e,n){const o=B(),s=O(),r=F();!o||!s||!r||(At(o,"confirm",n),At(s,"deny",n),At(r,"cancel",n),sn(o,s,r,n),n.reverseButtons&&(n.toast?(t.insertBefore(r,o),t.insertBefore(s,o)):(t.insertBefore(r,e),t.insertBefore(s,e),t.insertBefore(o,e))))}function sn(t,e,n,o){if(!o.buttonsStyling){k([t,e,n],i.styled);return}l([t,e,n],i.styled),o.confirmButtonColor&&(t.style.backgroundColor=o.confirmButtonColor,l(t,i["default-outline"])),o.denyButtonColor&&(e.style.backgroundColor=o.denyButtonColor,l(e,i["default-outline"])),o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,l(n,i["default-outline"]))}function At(t,e,n){const o=ft(e);ot(t,n["show".concat(o,"Button")],"inline-block"),v(t,n["".concat(e,"ButtonText")]||""),t.setAttribute("aria-label",n["".concat(e,"ButtonAriaLabel")]||""),t.className=i[e],P(t,n,"".concat(e,"Button"))}const rn=(t,e)=>{const n=bt();n&&(v(n,e.closeButtonHtml||""),P(n,e,"closeButton"),ot(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel||""))},cn=(t,e)=>{const n=b();n&&(ln(n,e.backdrop),an(n,e.position),un(n,e.grow),P(n,e,"container"))};function ln(t,e){typeof e=="string"?t.style.background=e:e||l([document.documentElement,document.body],i["no-backdrop"])}function an(t,e){e&&(e in i?l(t,i[e]):(y('The "position" parameter is not valid, defaulting to "center"'),l(t,i.center)))}function un(t,e){e&&l(t,i["grow-".concat(e)])}var d={innerParams:new WeakMap,domCache:new WeakMap};const dn=["input","file","range","select","radio","checkbox","textarea"],fn=(t,e)=>{const n=u();if(!n)return;const o=d.innerParams.get(t),s=!o||e.input!==o.input;dn.forEach(r=>{const a=x(n,i[r]);a&&(hn(r,e.inputAttributes),a.className=i[r],s&&m(a))}),e.input&&(s&&pn(e),mn(e))},pn=t=>{if(!t.input)return;if(!w[t.input]){L('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input,'"'));return}const e=Ut(t.input),n=w[t.input](e,t);h(e),t.inputAutoFocus&&setTimeout(()=>{Ft(n)})},gn=t=>{for(let e=0;e<t.attributes.length;e++){const n=t.attributes[e].name;["id","type","value","style"].includes(n)||t.removeAttribute(n)}},hn=(t,e)=>{const n=nt(u(),t);if(n){gn(n);for(const o in e)n.setAttribute(o,e[o])}},mn=t=>{const e=Ut(t.input);typeof t.customClass=="object"&&l(e,t.customClass.input)},Pt=(t,e)=>{(!t.placeholder||e.inputPlaceholder)&&(t.placeholder=e.inputPlaceholder)},$=(t,e,n)=>{if(n.inputLabel){const o=document.createElement("label"),s=i["input-label"];o.setAttribute("for",t.id),o.className=s,typeof n.customClass=="object"&&l(o,n.customClass.inputLabel),o.innerText=n.inputLabel,e.insertAdjacentElement("beforebegin",o)}},Ut=t=>x(u(),i[t]||i.input),it=(t,e)=>{["string","number"].includes(typeof e)?t.value="".concat(e):gt(e)||y('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof e,'"'))},w={};w.text=w.email=w.password=w.number=w.tel=w.url=(t,e)=>(it(t,e.inputValue),$(t,t,e),Pt(t,e),t.type=e.input,t),w.file=(t,e)=>($(t,t,e),Pt(t,e),t),w.range=(t,e)=>{const n=t.querySelector("input"),o=t.querySelector("output");return it(n,e.inputValue),n.type=e.input,it(o,e.inputValue),$(n,t,e),t},w.select=(t,e)=>{if(t.textContent="",e.inputPlaceholder){const n=document.createElement("option");v(n,e.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)}return $(t,t,e),t},w.radio=t=>(t.textContent="",t),w.checkbox=(t,e)=>{const n=nt(u(),"checkbox");n.value="1",n.checked=!!e.inputValue;const o=t.querySelector("span");return v(o,e.inputPlaceholder),n},w.textarea=(t,e)=>{it(t,e.inputValue),Pt(t,e),$(t,t,e);const n=o=>parseInt(window.getComputedStyle(o).marginLeft)+parseInt(window.getComputedStyle(o).marginRight);return setTimeout(()=>{if("MutationObserver"in window){const o=parseInt(window.getComputedStyle(u()).width),s=()=>{if(!document.body.contains(t))return;const r=t.offsetWidth+n(t);r>o?u().style.width="".concat(r,"px"):M(u(),"width",e.width)};new MutationObserver(s).observe(t,{attributes:!0,attributeFilter:["style"]})}}),t};const bn=(t,e)=>{const n=ht();n&&(P(n,e,"htmlContainer"),e.html?(vt(e.html,n),h(n,"block")):e.text?(n.textContent=e.text,h(n,"block")):m(n),fn(t,e))},yn=(t,e)=>{const n=jt();n&&(ot(n,e.footer,"block"),e.footer&&vt(e.footer,n),P(n,e,"footer"))},wn=(t,e)=>{const n=d.innerParams.get(t),o=K();if(o){if(n&&e.icon===n.icon){zt(o,e),Nt(o,e);return}if(!e.icon&&!e.iconHtml){m(o);return}if(e.icon&&Object.keys(J).indexOf(e.icon)===-1){L('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.icon,'"')),m(o);return}h(o),zt(o,e),Nt(o,e),l(o,e.showClass&&e.showClass.icon)}},Nt=(t,e)=>{for(const[n,o]of Object.entries(J))e.icon!==n&&k(t,o);l(t,e.icon&&J[e.icon]),Pn(t,e),Cn(),P(t,e,"icon")},Cn=()=>{const t=u();if(!t)return;const e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let o=0;o<n.length;o++)n[o].style.backgroundColor=e},vn=`
|
|
53
|
+
<div class="swal2-success-circular-line-left"></div>
|
|
54
|
+
<span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
|
|
55
|
+
<div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>
|
|
56
|
+
<div class="swal2-success-circular-line-right"></div>
|
|
57
|
+
`,An=`
|
|
58
|
+
<span class="swal2-x-mark">
|
|
59
|
+
<span class="swal2-x-mark-line-left"></span>
|
|
60
|
+
<span class="swal2-x-mark-line-right"></span>
|
|
61
|
+
</span>
|
|
62
|
+
`,zt=(t,e)=>{if(!e.icon&&!e.iconHtml)return;let n=t.innerHTML,o="";e.iconHtml?o=Kt(e.iconHtml):e.icon==="success"?(o=vn,n=n.replace(/ style=".*?"/g,"")):e.icon==="error"?o=An:e.icon&&(o=Kt({question:"?",warning:"!",info:"i"}[e.icon])),n.trim()!==o.trim()&&v(t,o)},Pn=(t,e)=>{if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])qt(t,n,"backgroundColor",e.iconColor);qt(t,".swal2-success-ring","borderColor",e.iconColor)}},Kt=t=>'<div class="'.concat(i["icon-content"],'">').concat(t,"</div>"),Bn=(t,e)=>{const n=Ht();if(n){if(!e.imageUrl){m(n);return}h(n,""),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt||""),M(n,"width",e.imageWidth),M(n,"height",e.imageHeight),n.className=i.image,P(n,e,"image")}},kn=(t,e)=>{const n=b(),o=u();if(!(!n||!o)){if(e.toast){M(n,"width",e.width),o.style.width="100%";const s=V();s&&o.insertBefore(s,K())}else M(o,"width",e.width);M(o,"padding",e.padding),e.color&&(o.style.color=e.color),e.background&&(o.style.background=e.background),m(Q()),En(o,e)}},En=(t,e)=>{const n=e.showClass||{};t.className="".concat(i.popup," ").concat(A(t)?n.popup:""),e.toast?(l([document.documentElement,document.body],i["toast-shown"]),l(t,i.toast)):l(t,i.modal),P(t,e,"popup"),typeof e.customClass=="string"&&l(t,e.customClass),e.icon&&l(t,i["icon-".concat(e.icon)])},Tn=(t,e)=>{const n=mt();if(!n)return;const{progressSteps:o,currentProgressStep:s}=e;if(!o||o.length===0||s===void 0){m(n);return}h(n),n.textContent="",s>=o.length&&y("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.forEach((r,a)=>{const f=Sn(r);if(n.appendChild(f),a===s&&l(f,i["active-progress-step"]),a!==o.length-1){const p=xn(e);n.appendChild(p)}})},Sn=t=>{const e=document.createElement("li");return l(e,i["progress-step"]),v(e,t),e},xn=t=>{const e=document.createElement("li");return l(e,i["progress-step-line"]),t.progressStepsDistance&&M(e,"width",t.progressStepsDistance),e},In=(t,e)=>{const n=Dt();n&&(ot(n,e.title||e.titleText,"block"),e.title&&vt(e.title,n),e.titleText&&(n.innerText=e.titleText),P(n,e,"title"))},Gt=(t,e)=>{kn(t,e),cn(t,e),Tn(t,e),wn(t,e),Bn(t,e),In(t,e),rn(t,e),bn(t,e),nn(t,e),yn(t,e);const n=u();typeof e.didRender=="function"&&n&&e.didRender(n)},Ln=()=>A(u()),$t=()=>{var t;return(t=B())===null||t===void 0?void 0:t.click()},On=()=>{var t;return(t=O())===null||t===void 0?void 0:t.click()},Mn=()=>{var t;return(t=F())===null||t===void 0?void 0:t.click()},q=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Yt=t=>{t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1)},Dn=(t,e,n)=>{Yt(t),e.toast||(t.keydownHandler=o=>jn(e,o,n),t.keydownTarget=e.keydownListenerCapture?window:u(),t.keydownListenerCapture=e.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)},Bt=(t,e)=>{var n;const o=yt();if(o.length){t=t+e,t===o.length?t=0:t===-1&&(t=o.length-1),o[t].focus();return}(n=u())===null||n===void 0||n.focus()},Zt=["ArrowRight","ArrowDown"],Hn=["ArrowLeft","ArrowUp"],jn=(t,e,n)=>{t&&(e.isComposing||e.keyCode===229||(t.stopKeydownPropagation&&e.stopPropagation(),e.key==="Enter"?Fn(e,t):e.key==="Tab"?Vn(e):[...Zt,...Hn].includes(e.key)?qn(e.key):e.key==="Escape"&&Rn(e,t,n)))},Fn=(t,e)=>{if(!X(e.allowEnterKey))return;const n=nt(u(),e.input);if(t.target&&n&&t.target instanceof HTMLElement&&t.target.outerHTML===n.outerHTML){if(["textarea","file"].includes(e.input))return;$t(),t.preventDefault()}},Vn=t=>{const e=t.target,n=yt();let o=-1;for(let s=0;s<n.length;s++)if(e===n[s]){o=s;break}t.shiftKey?Bt(o,-1):Bt(o,1),t.stopPropagation(),t.preventDefault()},qn=t=>{const e=G(),n=B(),o=O(),s=F();if(!e||!n||!o||!s)return;const r=[n,o,s];if(document.activeElement instanceof HTMLElement&&!r.includes(document.activeElement))return;const a=Zt.includes(t)?"nextElementSibling":"previousElementSibling";let f=document.activeElement;if(f){for(let p=0;p<e.children.length;p++){if(f=f[a],!f)return;if(f instanceof HTMLButtonElement&&A(f))break}f instanceof HTMLButtonElement&&f.focus()}},Rn=(t,e,n)=>{X(e.allowEscapeKey)&&(t.preventDefault(),n(q.esc))};var Y={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const Wn=()=>{Array.from(document.body.children).forEach(e=>{e===b()||e.contains(b())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")||""),e.setAttribute("aria-hidden","true"))})},Jt=()=>{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")})},Xt=typeof window<"u"&&!!window.GestureEvent,_n=()=>{if(Xt&&!T(document.body,i.iosfix)){const t=document.body.scrollTop;document.body.style.top="".concat(t*-1,"px"),l(document.body,i.iosfix),Un()}},Un=()=>{const t=b();if(!t)return;let e;t.ontouchstart=n=>{e=Nn(n)},t.ontouchmove=n=>{e&&(n.preventDefault(),n.stopPropagation())}},Nn=t=>{const e=t.target,n=b(),o=ht();return!n||!o||zn(t)||Kn(t)?!1:e===n||!Rt(n)&&e instanceof HTMLElement&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"&&!(Rt(o)&&o.contains(e))},zn=t=>t.touches&&t.touches.length&&t.touches[0].touchType==="stylus",Kn=t=>t.touches&&t.touches.length>1,Gn=()=>{if(T(document.body,i.iosfix)){const t=parseInt(document.body.style.top,10);k(document.body,i.iosfix),document.body.style.top="",document.body.scrollTop=t*-1}},$n=()=>{const t=document.createElement("div");t.className=i["scrollbar-measure"],document.body.appendChild(t);const e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e};let R=null;const Yn=t=>{R===null&&(document.body.scrollHeight>window.innerHeight||t==="scroll")&&(R=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(R+$n(),"px"))},Zn=()=>{R!==null&&(document.body.style.paddingRight="".concat(R,"px"),R=null)};function Qt(t,e,n,o){et()?ee(t,o):(Fe(n).then(()=>ee(t,o)),Yt(c)),Xt?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),wt()&&(Zn(),Gn(),Jt()),Jn()}function Jn(){k([document.documentElement,document.body],[i.shown,i["height-auto"],i["no-backdrop"],i["toast-shown"]])}function I(t){t=Qn(t);const e=Y.swalPromiseResolve.get(this),n=Xn(this);this.isAwaitingPromise?t.isDismissed||(Z(this),e(t)):n&&e(t)}const Xn=t=>{const e=u();if(!e)return!1;const n=d.innerParams.get(t);if(!n||T(e,n.hideClass.popup))return!1;k(e,n.showClass.popup),l(e,n.hideClass.popup);const o=b();return k(o,n.showClass.backdrop),l(o,n.hideClass.backdrop),to(t,e,n),!0};function te(t){const e=Y.swalPromiseReject.get(this);Z(this),e&&e(t)}const Z=t=>{t.isAwaitingPromise&&(delete t.isAwaitingPromise,d.innerParams.get(t)||t._destroy())},Qn=t=>typeof t>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),to=(t,e,n)=>{const o=b(),s=H&&Wt(e);typeof n.willClose=="function"&&n.willClose(e),s?eo(t,e,o,n.returnFocus,n.didClose):Qt(t,o,n.returnFocus,n.didClose)},eo=(t,e,n,o,s)=>{H&&(c.swalCloseEventFinishedCallback=Qt.bind(null,t,n,o,s),e.addEventListener(H,function(r){r.target===e&&(c.swalCloseEventFinishedCallback(),delete c.swalCloseEventFinishedCallback)}))},ee=(t,e)=>{setTimeout(()=>{typeof e=="function"&&e.bind(t.params)(),t._destroy&&t._destroy()})},W=t=>{let e=u();if(e||new at,e=u(),!e)return;const n=V();et()?m(K()):no(e,t),h(n),e.setAttribute("data-loading","true"),e.setAttribute("aria-busy","true"),e.focus()},no=(t,e)=>{const n=G(),o=V();!n||!o||(!e&&A(B())&&(e=B()),h(n),e&&(m(e),o.setAttribute("data-button-to-replace",e.className),n.insertBefore(o,e)),l([t,n],i.loading))},oo=(t,e)=>{e.input==="select"||e.input==="radio"?lo(t,e):["text","email","number","tel","textarea"].some(n=>n===e.input)&&(pt(e.inputValue)||gt(e.inputValue))&&(W(B()),ao(t,e))},io=(t,e)=>{const n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return so(n);case"radio":return ro(n);case"file":return co(n);default:return e.inputAutoTrim?n.value.trim():n.value}},so=t=>t.checked?1:0,ro=t=>t.checked?t.value:null,co=t=>t.files&&t.files.length?t.getAttribute("multiple")!==null?t.files:t.files[0]:null,lo=(t,e)=>{const n=u();if(!n)return;const o=s=>{e.input==="select"?uo(n,st(s),e):e.input==="radio"&&fo(n,st(s),e)};pt(e.inputOptions)||gt(e.inputOptions)?(W(B()),N(e.inputOptions).then(s=>{t.hideLoading(),o(s)})):typeof e.inputOptions=="object"?o(e.inputOptions):L("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof e.inputOptions))},ao=(t,e)=>{const n=t.getInput();n&&(m(n),N(e.inputValue).then(o=>{n.value=e.input==="number"?"".concat(parseFloat(o)||0):"".concat(o),h(n),n.focus(),t.hideLoading()}).catch(o=>{L("Error in inputValue promise: ".concat(o)),n.value="",h(n),n.focus(),t.hideLoading()}))};function uo(t,e,n){const o=x(t,i.select);if(!o)return;const s=(r,a,f)=>{const p=document.createElement("option");p.value=f,v(p,a),p.selected=ne(f,n.inputValue),r.appendChild(p)};e.forEach(r=>{const a=r[0],f=r[1];if(Array.isArray(f)){const p=document.createElement("optgroup");p.label=a,p.disabled=!1,o.appendChild(p),f.forEach(U=>s(p,U[1],U[0]))}else s(o,f,a)}),o.focus()}function fo(t,e,n){const o=x(t,i.radio);if(!o)return;e.forEach(r=>{const a=r[0],f=r[1],p=document.createElement("input"),U=document.createElement("label");p.type="radio",p.name=i.radio,p.value=a,ne(a,n.inputValue)&&(p.checked=!0);const xt=document.createElement("span");v(xt,f),xt.className=i.label,U.appendChild(p),U.appendChild(xt),o.appendChild(U)});const s=o.querySelectorAll("input");s.length&&s[0].focus()}const st=t=>{const e=[];return t instanceof Map?t.forEach((n,o)=>{let s=n;typeof s=="object"&&(s=st(s)),e.push([o,s])}):Object.keys(t).forEach(n=>{let o=t[n];typeof o=="object"&&(o=st(o)),e.push([n,o])}),e},ne=(t,e)=>!!e&&e.toString()===t.toString(),po=t=>{const e=d.innerParams.get(t);t.disableButtons(),e.input?oe(t,"confirm"):Et(t,!0)},go=t=>{const e=d.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?oe(t,"deny"):kt(t,!1)},ho=(t,e)=>{t.disableButtons(),e(q.cancel)},oe=(t,e)=>{const n=d.innerParams.get(t);if(!n.input){L('The "input" parameter is needed to be set when using returnInputValueOn'.concat(ft(e)));return}const o=t.getInput(),s=io(t,n);n.inputValidator?mo(t,s,e):o&&!o.checkValidity()?(t.enableButtons(),t.showValidationMessage(n.validationMessage)):e==="deny"?kt(t,s):Et(t,s)},mo=(t,e,n)=>{const o=d.innerParams.get(t);t.disableInput(),Promise.resolve().then(()=>N(o.inputValidator(e,o.validationMessage))).then(r=>{t.enableButtons(),t.enableInput(),r?t.showValidationMessage(r):n==="deny"?kt(t,e):Et(t,e)})},kt=(t,e)=>{const n=d.innerParams.get(t||void 0);n.showLoaderOnDeny&&W(O()),n.preDeny?(t.isAwaitingPromise=!0,Promise.resolve().then(()=>N(n.preDeny(e,n.validationMessage))).then(s=>{s===!1?(t.hideLoading(),Z(t)):t.close({isDenied:!0,value:typeof s>"u"?e:s})}).catch(s=>se(t||void 0,s))):t.close({isDenied:!0,value:e})},ie=(t,e)=>{t.close({isConfirmed:!0,value:e})},se=(t,e)=>{t.rejectPromise(e)},Et=(t,e)=>{const n=d.innerParams.get(t||void 0);n.showLoaderOnConfirm&&W(),n.preConfirm?(t.resetValidationMessage(),t.isAwaitingPromise=!0,Promise.resolve().then(()=>N(n.preConfirm(e,n.validationMessage))).then(s=>{A(Q())||s===!1?(t.hideLoading(),Z(t)):ie(t,typeof s>"u"?e:s)}).catch(s=>se(t||void 0,s))):ie(t,e)};function rt(){const t=d.innerParams.get(this);if(!t)return;const e=d.domCache.get(this);m(e.loader),et()?t.icon&&h(K()):bo(e),k([e.popup,e.actions],i.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}const bo=t=>{const e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?h(e[0],"inline-block"):ze()&&m(t.actions)};function re(){const t=d.innerParams.get(this),e=d.domCache.get(this);return e?nt(e.popup,t.input):null}function ce(t,e,n){const o=d.domCache.get(t);e.forEach(s=>{o[s].disabled=n})}function le(t,e){const n=u();if(!(!n||!t))if(t.type==="radio"){const o=n.querySelectorAll('[name="'.concat(i.radio,'"]'));for(let s=0;s<o.length;s++)o[s].disabled=e}else t.disabled=e}function ae(){ce(this,["confirmButton","denyButton","cancelButton"],!1)}function ue(){ce(this,["confirmButton","denyButton","cancelButton"],!0)}function de(){le(this.getInput(),!1)}function fe(){le(this.getInput(),!0)}function pe(t){const e=d.domCache.get(this),n=d.innerParams.get(this);v(e.validationMessage,t),e.validationMessage.className=i["validation-message"],n.customClass&&n.customClass.validationMessage&&l(e.validationMessage,n.customClass.validationMessage),h(e.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid","true"),o.setAttribute("aria-describedby",i["validation-message"]),Ft(o),l(o,i.inputerror))}function ge(){const t=d.domCache.get(this);t.validationMessage&&m(t.validationMessage);const e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedby"),k(e,i.inputerror))}const _={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},yo=["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"],wo={},Co=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],he=t=>Object.prototype.hasOwnProperty.call(_,t),me=t=>yo.indexOf(t)!==-1,be=t=>wo[t],vo=t=>{he(t)||y('Unknown parameter "'.concat(t,'"'))},Ao=t=>{Co.includes(t)&&y('The parameter "'.concat(t,'" is incompatible with toasts'))},Po=t=>{const e=be(t);e&&qe(t,e)},Bo=t=>{t.backdrop===!1&&t.allowOutsideClick&&y('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const e in t)vo(e),t.toast&&Ao(e),Po(e)};function ye(t){const e=u(),n=d.innerParams.get(this);if(!e||T(e,n.hideClass.popup)){y("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.");return}const o=ko(t),s=Object.assign({},n,o);Gt(this,s),d.innerParams.set(this,s),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})}const ko=t=>{const e={};return Object.keys(t).forEach(n=>{me(n)?e[n]=t[n]:y("Invalid parameter to update: ".concat(n))}),e};function we(){const t=d.domCache.get(this),e=d.innerParams.get(this);if(!e){Ce(this);return}t.popup&&c.swalCloseEventFinishedCallback&&(c.swalCloseEventFinishedCallback(),delete c.swalCloseEventFinishedCallback),typeof e.didDestroy=="function"&&e.didDestroy(),Eo(this)}const Eo=t=>{Ce(t),delete t.params,delete c.keydownHandler,delete c.keydownTarget,delete c.currentInstance},Ce=t=>{t.isAwaitingPromise?(Tt(d,t),t.isAwaitingPromise=!0):(Tt(Y,t),Tt(d,t),delete t.isAwaitingPromise,delete t.disableButtons,delete t.enableButtons,delete t.getInput,delete t.disableInput,delete t.enableInput,delete t.hideLoading,delete t.disableLoading,delete t.showValidationMessage,delete t.resetValidationMessage,delete t.close,delete t.closePopup,delete t.closeModal,delete t.closeToast,delete t.rejectPromise,delete t.update,delete t._destroy)},Tt=(t,e)=>{for(const n in t)t[n].delete(e)};var To=Object.freeze({__proto__:null,_destroy:we,close:I,closeModal:I,closePopup:I,closeToast:I,disableButtons:ue,disableInput:fe,disableLoading:rt,enableButtons:ae,enableInput:de,getInput:re,handleAwaitingPromise:Z,hideLoading:rt,rejectPromise:te,resetValidationMessage:ge,showValidationMessage:pe,update:ye});const So=(t,e,n)=>{t.toast?xo(t,e,n):(Lo(e),Oo(e),Mo(t,e,n))},xo=(t,e,n)=>{e.popup.onclick=()=>{t&&(Io(t)||t.timer||t.input)||n(q.close)}},Io=t=>t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton;let ct=!1;const Lo=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&(ct=!0)}}},Oo=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,(e.target===t.popup||e.target instanceof HTMLElement&&t.popup.contains(e.target))&&(ct=!0)}}},Mo=(t,e,n)=>{e.container.onclick=o=>{if(ct){ct=!1;return}o.target===e.container&&X(t.allowOutsideClick)&&n(q.backdrop)}},Do=t=>typeof t=="object"&&t.jquery,ve=t=>t instanceof Element||Do(t),Ho=t=>{const e={};return typeof t[0]=="object"&&!ve(t[0])?Object.assign(e,t[0]):["title","html","icon"].forEach((n,o)=>{const s=t[o];typeof s=="string"||ve(s)?e[n]=s:s!==void 0&&L("Unexpected type of ".concat(n,'! Expected "string" or "Element", got ').concat(typeof s))}),e};function jo(){const t=this;for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return new t(...n)}function Fo(t){class e extends this{_main(o,s){return super._main(o,Object.assign({},t,s))}}return e}const Vo=()=>c.timeout&&c.timeout.getTimerLeft(),Ae=()=>{if(c.timeout)return Ke(),c.timeout.stop()},Pe=()=>{if(c.timeout){const t=c.timeout.start();return Ct(t),t}},qo=()=>{const t=c.timeout;return t&&(t.running?Ae():Pe())},Ro=t=>{if(c.timeout){const e=c.timeout.increase(t);return Ct(e,!0),e}},Wo=()=>!!(c.timeout&&c.timeout.isRunning());let Be=!1;const St={};function _o(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";St[t]=this,Be||(document.body.addEventListener("click",Uo),Be=!0)}const Uo=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const n in St){const o=e.getAttribute(n);if(o){St[n].fire({template:o});return}}};var No=Object.freeze({__proto__:null,argsToParams:Ho,bindClickHandler:_o,clickCancel:Mn,clickConfirm:$t,clickDeny:On,enableLoading:W,fire:jo,getActions:G,getCancelButton:F,getCloseButton:bt,getConfirmButton:B,getContainer:b,getDenyButton:O,getFocusableElements:yt,getFooter:jt,getHtmlContainer:ht,getIcon:K,getIconContent:Re,getImage:Ht,getInputLabel:We,getLoader:V,getPopup:u,getProgressSteps:mt,getTimerLeft:Vo,getTimerProgressBar:tt,getTitle:Dt,getValidationMessage:Q,increaseTimer:Ro,isDeprecatedParameter:be,isLoading:Ue,isTimerRunning:Wo,isUpdatableParameter:me,isValidParameter:he,isVisible:Ln,mixin:Fo,resumeTimer:Pe,showLoading:W,stopTimer:Ae,toggleTimer:qo});class zo{constructor(e,n){this.callback=e,this.remaining=n,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.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}increase(e){const n=this.running;return n&&this.stop(),this.remaining+=e,n&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const ke=["swal-title","swal-html","swal-footer"],Ko=t=>{const e=typeof t.template=="string"?document.querySelector(t.template):t.template;if(!e)return{};const n=e.content;return ti(n),Object.assign(Go(n),$o(n),Yo(n),Zo(n),Jo(n),Xo(n),Qo(n,ke))},Go=t=>{const e={};return Array.from(t.querySelectorAll("swal-param")).forEach(o=>{j(o,["name","value"]);const s=o.getAttribute("name"),r=o.getAttribute("value");typeof _[s]=="boolean"?e[s]=r!=="false":typeof _[s]=="object"?e[s]=JSON.parse(r):e[s]=r}),e},$o=t=>{const e={};return Array.from(t.querySelectorAll("swal-function-param")).forEach(o=>{const s=o.getAttribute("name"),r=o.getAttribute("value");e[s]=new Function("return ".concat(r))()}),e},Yo=t=>{const e={};return Array.from(t.querySelectorAll("swal-button")).forEach(o=>{j(o,["type","color","aria-label"]);const s=o.getAttribute("type");e["".concat(s,"ButtonText")]=o.innerHTML,e["show".concat(ft(s),"Button")]=!0,o.hasAttribute("color")&&(e["".concat(s,"ButtonColor")]=o.getAttribute("color")),o.hasAttribute("aria-label")&&(e["".concat(s,"ButtonAriaLabel")]=o.getAttribute("aria-label"))}),e},Zo=t=>{const e={},n=t.querySelector("swal-image");return n&&(j(n,["src","width","height","alt"]),n.hasAttribute("src")&&(e.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(e.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(e.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(e.imageAlt=n.getAttribute("alt"))),e},Jo=t=>{const e={},n=t.querySelector("swal-icon");return n&&(j(n,["type","color"]),n.hasAttribute("type")&&(e.icon=n.getAttribute("type")),n.hasAttribute("color")&&(e.iconColor=n.getAttribute("color")),e.iconHtml=n.innerHTML),e},Xo=t=>{const e={},n=t.querySelector("swal-input");n&&(j(n,["type","label","placeholder","value"]),e.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(e.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(e.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(e.inputValue=n.getAttribute("value")));const o=Array.from(t.querySelectorAll("swal-input-option"));return o.length&&(e.inputOptions={},o.forEach(s=>{j(s,["value"]);const r=s.getAttribute("value"),a=s.innerHTML;e.inputOptions[r]=a})),e},Qo=(t,e)=>{const n={};for(const o in e){const s=e[o],r=t.querySelector(s);r&&(j(r,[]),n[s.replace(/^swal-/,"")]=r.innerHTML.trim())}return n},ti=t=>{const e=ke.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(t.children).forEach(n=>{const o=n.tagName.toLowerCase();e.includes(o)||y("Unrecognized element <".concat(o,">"))})},j=(t,e)=>{Array.from(t.attributes).forEach(n=>{e.indexOf(n.name)===-1&&y(['Unrecognized attribute "'.concat(n.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(e.length?"Allowed attributes are: ".concat(e.join(", ")):"To set the value, use HTML within the element.")])})},Ee=10,ei=t=>{const e=b(),n=u();typeof t.willOpen=="function"&&t.willOpen(n);const s=window.getComputedStyle(document.body).overflowY;ii(e,n,t),setTimeout(()=>{ni(e,n)},Ee),wt()&&(oi(e,t.scrollbarPadding,s),Wn()),!et()&&!c.previousActiveElement&&(c.previousActiveElement=document.activeElement),typeof t.didOpen=="function"&&setTimeout(()=>t.didOpen(n)),k(e,i["no-transition"])},Te=t=>{const e=u();if(t.target!==e||!H)return;const n=b();e.removeEventListener(H,Te),n.style.overflowY="auto"},ni=(t,e)=>{H&&Wt(e)?(t.style.overflowY="hidden",e.addEventListener(H,Te)):t.style.overflowY="auto"},oi=(t,e,n)=>{_n(),e&&n!=="hidden"&&Yn(n),setTimeout(()=>{t.scrollTop=0})},ii=(t,e,n)=>{l(t,n.showClass.backdrop),e.style.setProperty("opacity","0","important"),h(e,"grid"),setTimeout(()=>{l(e,n.showClass.popup),e.style.removeProperty("opacity")},Ee),l([document.documentElement,document.body],i.shown),n.heightAuto&&n.backdrop&&!n.toast&&l([document.documentElement,document.body],i["height-auto"])};var Se={email:(t,e)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address"),url:(t,e)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")};function si(t){t.inputValidator||(t.input==="email"&&(t.inputValidator=Se.email),t.input==="url"&&(t.inputValidator=Se.url))}function ri(t){(!t.target||typeof t.target=="string"&&!document.querySelector(t.target)||typeof t.target!="string"&&!t.target.appendChild)&&(y('Target parameter is not valid, defaulting to "body"'),t.target="body")}function ci(t){si(t),t.showLoaderOnConfirm&&!t.preConfirm&&y(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
|
|
63
|
+
showLoaderOnConfirm should be used together with preConfirm, see usage example:
|
|
64
|
+
https://sweetalert2.github.io/#ajax-request`),ri(t),typeof t.title=="string"&&(t.title=t.title.split(`
|
|
65
|
+
`).join("<br />")),Qe(t)}let E;var lt=new WeakMap;class g{constructor(){if(De(this,lt,{writable:!0,value:void 0}),typeof window>"u")return;E=this;for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];const s=Object.freeze(this.constructor.argsToParams(n));this.params=s,this.isAwaitingPromise=!1,dt(this,lt,this._main(E.params))}_main(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Bo(Object.assign({},n,e)),c.currentInstance&&(c.currentInstance._destroy(),wt()&&Jt()),c.currentInstance=E;const o=ai(e,n);ci(o),Object.freeze(o),c.timeout&&(c.timeout.stop(),delete c.timeout),clearTimeout(c.restoreFocusTimeout);const s=ui(E);return Gt(E,o),d.innerParams.set(E,o),li(E,s,o)}then(e){return ut(this,lt).then(e)}finally(e){return ut(this,lt).finally(e)}}const li=(t,e,n)=>new Promise((o,s)=>{const r=a=>{t.close({isDismissed:!0,dismiss:a})};Y.swalPromiseResolve.set(t,o),Y.swalPromiseReject.set(t,s),e.confirmButton.onclick=()=>{po(t)},e.denyButton.onclick=()=>{go(t)},e.cancelButton.onclick=()=>{ho(t,r)},e.closeButton.onclick=()=>{r(q.close)},So(n,e,r),Dn(c,n,r),oo(t,n),ei(n),di(c,n,r),fi(e,n),setTimeout(()=>{e.container.scrollTop=0})}),ai=(t,e)=>{const n=Ko(t),o=Object.assign({},_,e,n,t);return o.showClass=Object.assign({},_.showClass,o.showClass),o.hideClass=Object.assign({},_.hideClass,o.hideClass),o},ui=t=>{const e={popup:u(),container:b(),actions:G(),confirmButton:B(),denyButton:O(),cancelButton:F(),loader:V(),closeButton:bt(),validationMessage:Q(),progressSteps:mt()};return d.domCache.set(t,e),e},di=(t,e,n)=>{const o=tt();m(o),e.timer&&(t.timeout=new zo(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(h(o),P(o,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&Ct(e.timer)})))},fi=(t,e)=>{if(!e.toast){if(!X(e.allowEnterKey)){gi();return}pi(t,e)||Bt(-1,1)}},pi=(t,e)=>e.focusDeny&&A(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&A(t.cancelButton)?(t.cancelButton.focus(),!0):e.focusConfirm&&A(t.confirmButton)?(t.confirmButton.focus(),!0):!1,gi=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};if(typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){const t=new Date,e=localStorage.getItem("swal-initiation");e?(t.getTime()-Date.parse(e))/(1e3*60*60*24)>3&&setTimeout(()=>{document.body.style.pointerEvents="none";const n=document.createElement("audio");n.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",n.loop=!0,document.body.appendChild(n),setTimeout(()=>{n.play().catch(()=>{})},2500)},500):localStorage.setItem("swal-initiation","".concat(t))}g.prototype.disableButtons=ue,g.prototype.enableButtons=ae,g.prototype.getInput=re,g.prototype.disableInput=fe,g.prototype.enableInput=de,g.prototype.hideLoading=rt,g.prototype.disableLoading=rt,g.prototype.showValidationMessage=pe,g.prototype.resetValidationMessage=ge,g.prototype.close=I,g.prototype.closePopup=I,g.prototype.closeModal=I,g.prototype.closeToast=I,g.prototype.rejectPromise=te,g.prototype.update=ye,g.prototype._destroy=we,Object.assign(g,No),Object.keys(To).forEach(t=>{g[t]=function(){return E&&E[t]?E[t](...arguments):null}}),g.DismissReason=q,g.version="11.7.28";const at=g;return at.default=at,at}),typeof S.commonjsGlobal<"u"&&S.commonjsGlobal.Sweetalert2&&(S.commonjsGlobal.swal=S.commonjsGlobal.sweetAlert=S.commonjsGlobal.Swal=S.commonjsGlobal.SweetAlert=S.commonjsGlobal.Sweetalert2)})(xe);var hi=xe.exports;const mi=S.getDefaultExportFromCjs(hi);exports.DefaultSwal=mi;
|