UNPKG

anq-modal-form

Version:

A powerful, customizable modal form component for Quasar Framework and Vue 3 applications. Features include responsive design, dynamic form generation, validation, animations, and seamless integration with Quasar's design system.

1,353 lines 64.1 kB
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.flex{display:flex}.hidden{display:none}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.border{border-width:1px}.border-solid{border-style:solid}.p-5{padding:1.25rem}.text-2xl{font-size:1.5rem;line-height:2rem}.font-bold{font-weight:700}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})(); import { computed as d, markRaw as rt, defineComponent as at, getCurrentInstance as F, h as y, ref as A, onBeforeUnmount as re, Transition as Pe, withDirectives as _e, provide as _t, onDeactivated as Me, onActivated as Tt, onMounted as st, nextTick as me, reactive as ut, watch as be, onUnmounted as Bt, Teleport as Mt, createBlock as Ot, openBlock as Rt, withCtx as X, createVNode as V, unref as jt, mergeProps as Ft, createElementVNode as zt, renderSlot as ue, toDisplayString as Dt } from "vue"; const Te = { xs: 18, sm: 24, md: 32, lg: 38, xl: 46 }, ct = { size: String }; function dt(e, t = Te) { return d(() => e.size !== void 0 ? { fontSize: e.size in t ? `${t[e.size]}px` : e.size } : null); } function ft(e, t, o, i) { return Object.defineProperty(e, t, { get: o, set: i, enumerable: !0 }), e; } function I(e) { return rt(at(e)); } function vt(e) { return rt(e); } function ae(e, t) { return e !== void 0 && e() || t; } function te(e, t) { return e !== void 0 ? t.concat(e()) : t; } const Fe = "0 0 24 24", ke = (e) => e, xe = (e) => `ionicons ${e}`, mt = { "mdi-": (e) => `mdi ${e}`, "icon-": ke, // fontawesome equiv "bt-": (e) => `bt ${e}`, "eva-": (e) => `eva ${e}`, "ion-md": xe, "ion-ios": xe, "ion-logo": xe, "iconfont ": ke, "ti-": (e) => `themify-icon ${e}`, "bi-": (e) => `bootstrap-icons ${e}`, "i-": ke // UnoCSS pure icons }, bt = { o_: "-outlined", r_: "-round", s_: "-sharp" }, gt = { sym_o_: "-outlined", sym_r_: "-rounded", sym_s_: "-sharp" }, Vt = new RegExp("^(" + Object.keys(mt).join("|") + ")"), Ht = new RegExp("^(" + Object.keys(bt).join("|") + ")"), ze = new RegExp("^(" + Object.keys(gt).join("|") + ")"), At = /^[Mm]\s?[-+]?\.?\d/, It = /^img:/, Kt = /^svguse:/, Nt = /^ion-/, Qt = /^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /, De = I({ name: "QIcon", props: { ...ct, tag: { type: String, default: "i" }, name: String, color: String, left: Boolean, right: Boolean }, setup(e, { slots: t }) { const { proxy: { $q: o } } = F(), i = dt(e), n = d( () => "q-icon" + (e.left === !0 ? " on-left" : "") + (e.right === !0 ? " on-right" : "") + (e.color !== void 0 ? ` text-${e.color}` : "") ), a = d(() => { let r, l = e.name; if (l === "none" || !l) return { none: !0 }; if (o.iconMapFn !== null) { const s = o.iconMapFn(l); if (s !== void 0) if (s.icon !== void 0) { if (l = s.icon, l === "none" || !l) return { none: !0 }; } else return { cls: s.cls, content: s.content !== void 0 ? s.content : " " }; } if (At.test(l) === !0) { const [s, k = Fe] = l.split("|"); return { svg: !0, viewBox: k, nodes: s.split("&&").map((c) => { const [f, w, S] = c.split("@@"); return y("path", { style: w, d: f, transform: S }); }) }; } if (It.test(l) === !0) return { img: !0, src: l.substring(4) }; if (Kt.test(l) === !0) { const [s, k = Fe] = l.split("|"); return { svguse: !0, src: s.substring(7), viewBox: k }; } let v = " "; const m = l.match(Vt); if (m !== null) r = mt[m[1]](l); else if (Qt.test(l) === !0) r = l; else if (Nt.test(l) === !0) r = `ionicons ion-${o.platform.is.ios === !0 ? "ios" : "md"}${l.substring(3)}`; else if (ze.test(l) === !0) { r = "notranslate material-symbols"; const s = l.match(ze); s !== null && (l = l.substring(6), r += gt[s[1]]), v = l; } else { r = "notranslate material-icons"; const s = l.match(Ht); s !== null && (l = l.substring(2), r += bt[s[1]]), v = l; } return { cls: r, content: v }; }); return () => { const r = { class: n.value, style: i.value, "aria-hidden": "true" }; return a.value.none === !0 ? y(e.tag, r, ae(t.default)) : a.value.img === !0 ? y(e.tag, r, te(t.default, [ y("img", { src: a.value.src }) ])) : a.value.svg === !0 ? y(e.tag, r, te(t.default, [ y("svg", { viewBox: a.value.viewBox || "0 0 24 24" }, a.value.nodes) ])) : a.value.svguse === !0 ? y(e.tag, r, te(t.default, [ y("svg", { viewBox: a.value.viewBox }, [ y("use", { "xlink:href": a.value.src }) ]) ])) : (a.value.cls !== void 0 && (r.class += " " + a.value.cls), y(e.tag, r, te(t.default, [ a.value.content ]))); }; } }), Wt = { size: { type: [String, Number], default: "1em" }, color: String }; function Ut(e) { return { cSize: d(() => e.size in Te ? `${Te[e.size]}px` : e.size), classes: d( () => "q-spinner" + (e.color ? ` text-${e.color}` : "") ) }; } const Xt = I({ name: "QSpinner", props: { ...Wt, thickness: { type: Number, default: 5 } }, setup(e) { const { cSize: t, classes: o } = Ut(e); return () => y("svg", { class: o.value + " q-spinner-mat", width: t.value, height: t.value, viewBox: "25 25 50 50" }, [ y("circle", { class: "path", cx: "50", cy: "50", r: "20", fill: "none", stroke: "currentColor", "stroke-width": e.thickness, "stroke-miterlimit": "10" }) ]); } }); function Yt(e, t) { const o = e.style; for (const i in t) o[i] = t[i]; } function Gt(e, t) { if (e == null || e.contains(t) === !0) return !0; for (let o = e.nextElementSibling; o !== null; o = o.nextElementSibling) if (o.contains(t)) return !0; return !1; } const O = { hasPassive: !1, passiveCapture: !0, notPassiveCapture: !0 }; try { const e = Object.defineProperty({}, "passive", { get() { Object.assign(O, { hasPassive: !0, passive: { passive: !0 }, notPassive: { passive: !1 }, passiveCapture: { passive: !0, capture: !0 }, notPassiveCapture: { passive: !1, capture: !0 } }); } }); window.addEventListener("qtest", null, e), window.removeEventListener("qtest", null, e); } catch { } function Jt(e) { return e.touches && e.touches[0] ? e = e.touches[0] : e.changedTouches && e.changedTouches[0] ? e = e.changedTouches[0] : e.targetTouches && e.targetTouches[0] && (e = e.targetTouches[0]), { top: e.clientY, left: e.clientX }; } function Zt(e) { if (e.path) return e.path; if (e.composedPath) return e.composedPath(); const t = []; let o = e.target; for (; o; ) { if (t.push(o), o.tagName === "HTML") return t.push(document), t.push(window), t; o = o.parentElement; } } function ht(e) { e.stopPropagation(); } function en(e) { e.cancelable !== !1 && e.preventDefault(); } function H(e) { e.cancelable !== !1 && e.preventDefault(), e.stopPropagation(); } function tn(e, t, o) { const i = `__q_${t}_evt`; e[i] = e[i] !== void 0 ? e[i].concat(o) : o, o.forEach((n) => { n[0].addEventListener(n[1], e[n[2]], O[n[3]]); }); } function nn(e, t) { const o = `__q_${t}_evt`; e[o] !== void 0 && (e[o].forEach((i) => { i[0].removeEventListener(i[1], e[i[2]], O[i[3]]); }), e[o] = void 0); } function on(e) { return e !== Object(e) || e.isComposing === !0 || e.qKeyEvent === !0; } function ie(e, t) { return on(e) === !0 ? !1 : [].concat(t).includes(e.keyCode); } function ln(e, t = 250) { let o = !1, i; return function() { return o === !1 && (o = !0, setTimeout(() => { o = !1; }, t), i = e.apply(this, arguments)), i; }; } function Ve(e, t, o, i) { o.modifiers.stop === !0 && ht(e); const n = o.modifiers.color; let a = o.modifiers.center; a = a === !0 || i === !0; const r = document.createElement("span"), l = document.createElement("span"), v = Jt(e), { left: m, top: s, width: k, height: c } = t.getBoundingClientRect(), f = Math.sqrt(k * k + c * c), w = f / 2, S = `${(k - f) / 2}px`, b = a ? S : `${v.left - m - w}px`, E = `${(c - f) / 2}px`, g = a ? E : `${v.top - s - w}px`; l.className = "q-ripple__inner", Yt(l, { height: `${f}px`, width: `${f}px`, transform: `translate3d(${b},${g},0) scale3d(.2,.2,1)`, opacity: 0 }), r.className = `q-ripple${n ? " text-" + n : ""}`, r.setAttribute("dir", "ltr"), r.appendChild(l), t.appendChild(r); const p = () => { r.remove(), clearTimeout(L); }; o.abort.push(p); let L = setTimeout(() => { l.classList.add("q-ripple__inner--enter"), l.style.transform = `translate3d(${S},${E},0) scale3d(1,1,1)`, l.style.opacity = 0.2, L = setTimeout(() => { l.classList.remove("q-ripple__inner--enter"), l.classList.add("q-ripple__inner--leave"), l.style.opacity = 0, L = setTimeout(() => { r.remove(), o.abort.splice(o.abort.indexOf(p), 1); }, 275); }, 250); }, 50); } function He(e, { modifiers: t, value: o, arg: i }) { const n = Object.assign({}, e.cfg.ripple, t, o); e.modifiers = { early: n.early === !0, stop: n.stop === !0, center: n.center === !0, color: n.color || i, keyCodes: [].concat(n.keyCodes || 13) }; } const rn = vt( { name: "ripple", beforeMount(e, t) { const o = t.instance.$.appContext.config.globalProperties.$q.config || {}; if (o.ripple === !1) return; const i = { cfg: o, enabled: t.value !== !1, modifiers: {}, abort: [], start(n) { i.enabled === !0 && n.qSkipRipple !== !0 && n.type === (i.modifiers.early === !0 ? "pointerdown" : "click") && Ve(n, e, i, n.qKeyEvent === !0); }, keystart: ln((n) => { i.enabled === !0 && n.qSkipRipple !== !0 && ie(n, i.modifiers.keyCodes) === !0 && n.type === `key${i.modifiers.early === !0 ? "down" : "up"}` && Ve(n, e, i, !0); }, 300) }; He(i, t), e.__qripple = i, tn(i, "main", [ [e, "pointerdown", "start", "passive"], [e, "click", "start", "passive"], [e, "keydown", "keystart", "passive"], [e, "keyup", "keystart", "passive"] ]); }, updated(e, t) { if (t.oldValue !== t.value) { const o = e.__qripple; o !== void 0 && (o.enabled = t.value !== !1, o.enabled === !0 && Object(t.value) === t.value && He(o, t)); } }, beforeUnmount(e) { const t = e.__qripple; t !== void 0 && (t.abort.forEach((o) => { o(); }), nn(t, "main"), delete e._qripple); } } ), pt = { left: "start", center: "center", right: "end", between: "between", around: "around", evenly: "evenly", stretch: "stretch" }, an = Object.keys(pt), sn = { align: { type: String, validator: (e) => an.includes(e) } }; function un(e) { return d(() => { const t = e.align === void 0 ? e.vertical === !0 ? "stretch" : "left" : e.align; return `${e.vertical === !0 ? "items" : "justify"}-${pt[t]}`; }); } function fe(e) { if (Object(e.$parent) === e.$parent) return e.$parent; let { parent: t } = e.$; for (; Object(t) === t; ) { if (Object(t.proxy) === t.proxy) return t.proxy; t = t.parent; } } function yt(e) { return e.appContext.config.globalProperties.$router !== void 0; } function Oe(e) { return e.isUnmounted === !0 || e.isDeactivated === !0; } function Ae(e) { return e ? e.aliasOf ? e.aliasOf.path : e.path : ""; } function Ie(e, t) { return (e.aliasOf || e) === (t.aliasOf || t); } function cn(e, t) { for (const o in t) { const i = t[o], n = e[o]; if (typeof i == "string") { if (i !== n) return !1; } else if (Array.isArray(n) === !1 || n.length !== i.length || i.some((a, r) => a !== n[r])) return !1; } return !0; } function Ke(e, t) { return Array.isArray(t) === !0 ? e.length === t.length && e.every((o, i) => o === t[i]) : e.length === 1 && e[0] === t; } function dn(e, t) { return Array.isArray(e) === !0 ? Ke(e, t) : Array.isArray(t) === !0 ? Ke(t, e) : e === t; } function fn(e, t) { if (Object.keys(e).length !== Object.keys(t).length) return !1; for (const o in e) if (dn(e[o], t[o]) === !1) return !1; return !0; } const vn = { // router-link to: [String, Object], replace: Boolean, // regular <a> link href: String, target: String, // state disable: Boolean }; function mn({ fallbackTag: e, useDisableForRouterLinkProps: t = !0 } = {}) { const o = F(), { props: i, proxy: n, emit: a } = o, r = yt(o), l = d(() => i.disable !== !0 && i.href !== void 0), v = t === !0 ? d( () => r === !0 && i.disable !== !0 && l.value !== !0 && i.to !== void 0 && i.to !== null && i.to !== "" ) : d( () => r === !0 && l.value !== !0 && i.to !== void 0 && i.to !== null && i.to !== "" ), m = d(() => v.value === !0 ? g(i.to) : null), s = d(() => m.value !== null), k = d(() => l.value === !0 || s.value === !0), c = d(() => i.type === "a" || k.value === !0 ? "a" : i.tag || e || "div"), f = d(() => l.value === !0 ? { href: i.href, target: i.target } : s.value === !0 ? { href: m.value.href, target: i.target } : {}), w = d(() => { if (s.value === !1) return -1; const { matched: h } = m.value, { length: C } = h, P = h[C - 1]; if (P === void 0) return -1; const _ = n.$route.matched; if (_.length === 0) return -1; const j = _.findIndex( Ie.bind(null, P) ); if (j !== -1) return j; const z = Ae(h[C - 2]); return ( // we are dealing with nested routes C > 1 && Ae(P) === z && _[_.length - 1].path !== z ? _.findIndex( Ie.bind(null, h[C - 2]) ) : j ); }), S = d( () => s.value === !0 && w.value !== -1 && cn(n.$route.params, m.value.params) ), b = d( () => S.value === !0 && w.value === n.$route.matched.length - 1 && fn(n.$route.params, m.value.params) ), E = d(() => s.value === !0 ? b.value === !0 ? ` ${i.exactActiveClass} ${i.activeClass}` : i.exact === !0 ? "" : S.value === !0 ? ` ${i.activeClass}` : "" : ""); function g(h) { try { return n.$router.resolve(h); } catch { } return null; } function p(h, { returnRouterError: C, to: P = i.to, replace: _ = i.replace } = {}) { if (i.disable === !0) return h.preventDefault(), Promise.resolve(!1); if ( // don't redirect with control keys; // should match RouterLink from Vue Router h.metaKey || h.altKey || h.ctrlKey || h.shiftKey || h.button !== void 0 && h.button !== 0 || i.target === "_blank" ) return Promise.resolve(!1); h.preventDefault(); const j = n.$router[_ === !0 ? "replace" : "push"](P); return C === !0 ? j : j.then(() => { }).catch(() => { }); } function L(h) { if (s.value === !0) { const C = (P) => p(h, P); a("click", h, C), h.defaultPrevented !== !0 && C(); } else a("click", h); } return { hasRouterLink: s, hasHrefLink: l, hasLink: k, linkTag: c, resolvedLink: m, linkIsActive: S, linkIsExactActive: b, linkClass: E, linkAttrs: f, getLink: g, navigateToRouterLink: p, navigateOnClick: L }; } const Ne = { none: 0, xs: 4, sm: 8, md: 16, lg: 24, xl: 32 }, bn = { xs: 8, sm: 10, md: 14, lg: 20, xl: 24 }, gn = ["button", "submit", "reset"], hn = /[^\s]\/[^\s]/, pn = ["flat", "outline", "push", "unelevated"]; function yn(e, t) { return e.flat === !0 ? "flat" : e.outline === !0 ? "outline" : e.push === !0 ? "push" : e.unelevated === !0 ? "unelevated" : t; } const wn = { ...ct, ...vn, type: { type: String, default: "button" }, label: [Number, String], icon: String, iconRight: String, ...pn.reduce( (e, t) => (e[t] = Boolean) && e, {} ), square: Boolean, rounded: Boolean, glossy: Boolean, size: String, fab: Boolean, fabMini: Boolean, padding: String, color: String, textColor: String, noCaps: Boolean, noWrap: Boolean, dense: Boolean, tabindex: [Number, String], ripple: { type: [Boolean, Object], default: !0 }, align: { ...sn.align, default: "center" }, stack: Boolean, stretch: Boolean, loading: { type: Boolean, default: null }, disable: Boolean }, kn = { ...wn, round: Boolean }; function xn(e) { const t = dt(e, bn), o = un(e), { hasRouterLink: i, hasLink: n, linkTag: a, linkAttrs: r, navigateOnClick: l } = mn({ fallbackTag: "button" }), v = d(() => { const b = e.fab === !1 && e.fabMini === !1 ? t.value : {}; return e.padding !== void 0 ? Object.assign({}, b, { padding: e.padding.split(/\s+/).map((E) => E in Ne ? Ne[E] + "px" : E).join(" "), minWidth: "0", minHeight: "0" }) : b; }), m = d( () => e.rounded === !0 || e.fab === !0 || e.fabMini === !0 ), s = d( () => e.disable !== !0 && e.loading !== !0 ), k = d(() => s.value === !0 ? e.tabindex || 0 : -1), c = d(() => yn(e, "standard")), f = d(() => { const b = { tabindex: k.value }; return n.value === !0 ? Object.assign(b, r.value) : gn.includes(e.type) === !0 && (b.type = e.type), a.value === "a" ? (e.disable === !0 ? b["aria-disabled"] = "true" : b.href === void 0 && (b.role = "button"), i.value !== !0 && hn.test(e.type) === !0 && (b.type = e.type)) : e.disable === !0 && (b.disabled = "", b["aria-disabled"] = "true"), e.loading === !0 && e.percentage !== void 0 && Object.assign(b, { role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": e.percentage }), b; }), w = d(() => { let b; e.color !== void 0 ? e.flat === !0 || e.outline === !0 ? b = `text-${e.textColor || e.color}` : b = `bg-${e.color} text-${e.textColor || "white"}` : e.textColor && (b = `text-${e.textColor}`); const E = e.round === !0 ? "round" : `rectangle${m.value === !0 ? " q-btn--rounded" : e.square === !0 ? " q-btn--square" : ""}`; return `q-btn--${c.value} q-btn--${E}` + (b !== void 0 ? " " + b : "") + (s.value === !0 ? " q-btn--actionable q-focusable q-hoverable" : e.disable === !0 ? " disabled" : "") + (e.fab === !0 ? " q-btn--fab" : e.fabMini === !0 ? " q-btn--fab-mini" : "") + (e.noCaps === !0 ? " q-btn--no-uppercase" : "") + (e.dense === !0 ? " q-btn--dense" : "") + (e.stretch === !0 ? " no-border-radius self-stretch" : "") + (e.glossy === !0 ? " glossy" : "") + (e.square ? " q-btn--square" : ""); }), S = d( () => o.value + (e.stack === !0 ? " column" : " row") + (e.noWrap === !0 ? " no-wrap text-no-wrap" : "") + (e.loading === !0 ? " q-btn__content--hidden" : "") ); return { classes: w, style: v, innerClasses: S, attributes: f, hasLink: n, linkTag: a, navigateOnClick: l, isActionable: s }; } const { passiveCapture: B } = O; let Y = null, G = null, J = null; const qe = I({ name: "QBtn", props: { ...kn, percentage: Number, darkPercentage: Boolean, onTouchstart: [Function, Array] }, emits: ["click", "keydown", "mousedown", "keyup"], setup(e, { slots: t, emit: o }) { const { proxy: i } = F(), { classes: n, style: a, innerClasses: r, attributes: l, hasLink: v, linkTag: m, navigateOnClick: s, isActionable: k } = xn(e), c = A(null), f = A(null); let w = null, S, b = null; const E = d( () => e.label !== void 0 && e.label !== null && e.label !== "" ), g = d(() => e.disable === !0 || e.ripple === !1 ? !1 : { keyCodes: v.value === !0 ? [13, 32] : [13], ...e.ripple === !0 ? {} : e.ripple }), p = d(() => ({ center: e.round })), L = d(() => { const u = Math.max(0, Math.min(100, e.percentage)); return u > 0 ? { transition: "transform 0.6s", transform: `translateX(${u - 100}%)` } : {}; }), h = d(() => { if (e.loading === !0) return { onMousedown: N, onTouchstart: N, onClick: N, onKeydown: N, onKeyup: N }; if (k.value === !0) { const u = { onClick: P, onKeydown: _, onMousedown: z }; if (i.$q.platform.has.touch === !0) { const q = e.onTouchstart !== void 0 ? "" : "Passive"; u[`onTouchstart${q}`] = j; } return u; } return { // needed; especially for disabled <a> tags onClick: H }; }), C = d(() => ({ ref: c, class: "q-btn q-btn-item non-selectable no-outline " + n.value, style: a.value, ...l.value, ...h.value })); function P(u) { if (c.value !== null) { if (u !== void 0) { if (u.defaultPrevented === !0) return; const q = document.activeElement; if (e.type === "submit" && q !== document.body && c.value.contains(q) === !1 && q.contains(c.value) === !1) { u.qAvoidFocus !== !0 && c.value.focus(); const M = () => { var D; document.removeEventListener("keydown", H, !0), document.removeEventListener("keyup", M, B), (D = c.value) == null || D.removeEventListener("blur", M, B); }; document.addEventListener("keydown", H, !0), document.addEventListener("keyup", M, B), c.value.addEventListener("blur", M, B); } } s(u); } } function _(u) { c.value !== null && (o("keydown", u), ie(u, [13, 32]) === !0 && G !== c.value && (G !== null && K(), u.defaultPrevented !== !0 && (u.qAvoidFocus !== !0 && c.value.focus(), G = c.value, c.value.classList.add("q-btn--active"), document.addEventListener("keyup", T, !0), c.value.addEventListener("blur", T, B)), H(u))); } function j(u) { c.value !== null && (o("touchstart", u), u.defaultPrevented !== !0 && (Y !== c.value && (Y !== null && K(), Y = c.value, w = u.target, w.addEventListener("touchcancel", T, B), w.addEventListener("touchend", T, B)), S = !0, b !== null && clearTimeout(b), b = setTimeout(() => { b = null, S = !1; }, 200))); } function z(u) { c.value !== null && (u.qSkipRipple = S === !0, o("mousedown", u), u.defaultPrevented !== !0 && J !== c.value && (J !== null && K(), J = c.value, c.value.classList.add("q-btn--active"), document.addEventListener("mouseup", T, B))); } function T(u) { if (c.value !== null && !((u == null ? void 0 : u.type) === "blur" && document.activeElement === c.value)) { if ((u == null ? void 0 : u.type) === "keyup") { if (G === c.value && ie(u, [13, 32]) === !0) { const q = new MouseEvent("click", u); q.qKeyEvent = !0, u.defaultPrevented === !0 && en(q), u.cancelBubble === !0 && ht(q), c.value.dispatchEvent(q), H(u), u.qKeyEvent = !0; } o("keyup", u); } K(); } } function K(u) { var M, D; const q = f.value; u !== !0 && (Y === c.value || J === c.value) && q !== null && q !== document.activeElement && (q.setAttribute("tabindex", -1), q.focus()), Y === c.value && (w !== null && (w.removeEventListener("touchcancel", T, B), w.removeEventListener("touchend", T, B)), Y = w = null), J === c.value && (document.removeEventListener("mouseup", T, B), J = null), G === c.value && (document.removeEventListener("keyup", T, !0), (M = c.value) == null || M.removeEventListener("blur", T, B), G = null), (D = c.value) == null || D.classList.remove("q-btn--active"); } function N(u) { H(u), u.qSkipRipple = !0; } return re(() => { K(!0); }), Object.assign(i, { click: (u) => { k.value === !0 && P(u); } }), () => { let u = []; e.icon !== void 0 && u.push( y(De, { name: e.icon, left: e.stack !== !0 && E.value === !0, role: "img" }) ), E.value === !0 && u.push( y("span", { class: "block" }, [e.label]) ), u = te(t.default, u), e.iconRight !== void 0 && e.round === !1 && u.push( y(De, { name: e.iconRight, right: e.stack !== !0 && E.value === !0, role: "img" }) ); const q = [ y("span", { class: "q-focus-helper", ref: f }) ]; return e.loading === !0 && e.percentage !== void 0 && q.push( y("span", { class: "q-btn__progress absolute-full overflow-hidden" + (e.darkPercentage === !0 ? " q-btn__progress--dark" : "") }, [ y("span", { class: "q-btn__progress-indicator fit block", style: L.value }) ]) ), q.push( y("span", { class: "q-btn__content text-center col items-center q-anchor--skip " + r.value }, u) ), e.loading !== null && q.push( y(Pe, { name: "q-transition--fade" }, () => e.loading === !0 ? [ y("span", { key: "loading", class: "absolute-full flex flex-center" }, t.loading !== void 0 ? t.loading() : [y(Xt)]) ] : null) ), _e( y( m.value, C.value, q ), [[ rn, g.value, void 0, p.value ]] ); }; } }), Se = I({ name: "QCardSection", props: { tag: { type: String, default: "div" }, horizontal: Boolean }, setup(e, { slots: t }) { const o = d( () => `q-card__section q-card__section--${e.horizontal === !0 ? "horiz row no-wrap" : "vert"}` ); return () => y(e.tag, { class: o.value }, ae(t.default)); } }), wt = { dark: { type: Boolean, default: null } }; function kt(e, t) { return d(() => e.dark === null ? t.dark.isActive : e.dark); } const qn = { true: "inset", item: "item-inset", "item-thumbnail": "item-thumbnail-inset" }, Ee = { xs: 2, sm: 4, md: 8, lg: 16, xl: 24 }, Sn = I({ name: "QSeparator", props: { ...wt, spaced: [Boolean, String], inset: [Boolean, String], vertical: Boolean, color: String, size: String }, setup(e) { const t = F(), o = kt(e, t.proxy.$q), i = d(() => e.vertical === !0 ? "vertical" : "horizontal"), n = d(() => ` q-separator--${i.value}`), a = d(() => e.inset !== !1 ? `${n.value}-${qn[e.inset]}` : ""), r = d( () => `q-separator${n.value}${a.value}` + (e.color !== void 0 ? ` bg-${e.color}` : "") + (o.value === !0 ? " q-separator--dark" : "") ), l = d(() => { const v = {}; if (e.size !== void 0 && (v[e.vertical === !0 ? "width" : "height"] = e.size), e.spaced !== !1) { const m = e.spaced === !0 ? `${Ee.md}px` : e.spaced in Ee ? `${Ee[e.spaced]}px` : e.spaced, s = e.vertical === !0 ? ["Left", "Right"] : ["Top", "Bottom"]; v[`margin${s[0]}`] = v[`margin${s[1]}`] = m; } return v; }); return () => y("hr", { class: r.value, style: l.value, "aria-orientation": i.value }); } }); let ne = [], le = []; function xt(e) { le = le.filter((t) => t !== e); } function En(e) { xt(e), le.push(e); } function Qe(e) { xt(e), le.length === 0 && ne.length !== 0 && (ne[ne.length - 1](), ne = []); } function qt(e) { le.length === 0 ? e() : ne.push(e); } const Ln = "_q_fo_", Cn = I({ name: "QForm", props: { autofocus: Boolean, noErrorFocus: Boolean, noResetFocus: Boolean, greedy: Boolean, onSubmit: Function }, emits: ["reset", "validationSuccess", "validationError"], setup(e, { slots: t, emit: o }) { const i = F(), n = A(null); let a = 0; const r = []; function l(f) { const w = typeof f == "boolean" ? f : e.noErrorFocus !== !0, S = ++a, b = (p, L) => { o(`validation${p === !0 ? "Success" : "Error"}`, L); }, E = (p) => { const L = p.validate(); return typeof L.then == "function" ? L.then( (h) => ({ valid: h, comp: p }), (h) => ({ valid: !1, comp: p, err: h }) ) : Promise.resolve({ valid: L, comp: p }); }; return (e.greedy === !0 ? Promise.all(r.map(E)).then((p) => p.filter((L) => L.valid !== !0)) : r.reduce( (p, L) => p.then(() => E(L).then((h) => { if (h.valid === !1) return Promise.reject(h); })), Promise.resolve() ).catch((p) => [p])).then((p) => { if (p === void 0 || p.length === 0) return S === a && b(!0), !0; if (S === a) { const { comp: L, err: h } = p[0]; if (h !== void 0 && console.error(h), b(!1, L), w === !0) { const C = p.find(({ comp: P }) => typeof P.focus == "function" && Oe(P.$) === !1); C !== void 0 && C.comp.focus(); } } return !1; }); } function v() { a++, r.forEach((f) => { typeof f.resetValidation == "function" && f.resetValidation(); }); } function m(f) { f !== void 0 && H(f); const w = a + 1; l().then((S) => { w === a && S === !0 && (e.onSubmit !== void 0 ? o("submit", f) : (f == null ? void 0 : f.target) !== void 0 && typeof f.target.submit == "function" && f.target.submit()); }); } function s(f) { f !== void 0 && H(f), o("reset"), me(() => { v(), e.autofocus === !0 && e.noResetFocus !== !0 && k(); }); } function k() { qt(() => { if (n.value === null) return; const f = n.value.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]") || n.value.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]") || n.value.querySelector("[autofocus], [data-autofocus]") || Array.prototype.find.call(n.value.querySelectorAll("[tabindex]"), (w) => w.tabIndex !== -1); f == null || f.focus({ preventScroll: !0 }); }); } _t(Ln, { bindComponent(f) { r.push(f); }, unbindComponent(f) { const w = r.indexOf(f); w !== -1 && r.splice(w, 1); } }); let c = !1; return Me(() => { c = !0; }), Tt(() => { c === !0 && e.autofocus === !0 && k(); }), st(() => { e.autofocus === !0 && k(); }), Object.assign(i.proxy, { validate: l, resetValidation: v, submit: m, reset: s, focus: k, getValidationComponents: () => r }), () => y("form", { class: "q-form", ref: n, onSubmit: m, onReset: s }, ae(t.default)); } }), ge = A( !1 ); let Be; function $n(e, t) { const o = /(edg|edge|edga|edgios)\/([\w.]+)/.exec(e) || /(opr)[\/]([\w.]+)/.exec(e) || /(vivaldi)[\/]([\w.]+)/.exec(e) || /(chrome|crios)[\/]([\w.]+)/.exec(e) || /(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e) || /(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e) || /(firefox|fxios)[\/]([\w.]+)/.exec(e) || /(webkit)[\/]([\w.]+)/.exec(e) || /(opera)(?:.*version|)[\/]([\w.]+)/.exec(e) || []; return { browser: o[5] || o[3] || o[1] || "", version: o[4] || o[2] || "0", platform: t[0] || "" }; } function Pn(e) { return /(ipad)/.exec(e) || /(ipod)/.exec(e) || /(windows phone)/.exec(e) || /(iphone)/.exec(e) || /(kindle)/.exec(e) || /(silk)/.exec(e) || /(android)/.exec(e) || /(win)/.exec(e) || /(mac)/.exec(e) || /(linux)/.exec(e) || /(cros)/.exec(e) || /(playbook)/.exec(e) || /(bb)/.exec(e) || /(blackberry)/.exec(e) || []; } const St = "ontouchstart" in window || window.navigator.maxTouchPoints > 0; function _n(e) { const t = e.toLowerCase(), o = Pn(t), i = $n(t, o), n = { mobile: !1, desktop: !1, cordova: !1, capacitor: !1, nativeMobile: !1, // nativeMobileWrapper: void 0, electron: !1, bex: !1, linux: !1, mac: !1, win: !1, cros: !1, chrome: !1, firefox: !1, opera: !1, safari: !1, vivaldi: !1, edge: !1, edgeChromium: !1, ie: !1, webkit: !1, android: !1, ios: !1, ipad: !1, iphone: !1, ipod: !1, kindle: !1, winphone: !1, blackberry: !1, playbook: !1, silk: !1 }; i.browser && (n[i.browser] = !0, n.version = i.version, n.versionNumber = parseInt(i.version, 10)), i.platform && (n[i.platform] = !0); const a = n.android || n.ios || n.bb || n.blackberry || n.ipad || n.iphone || n.ipod || n.kindle || n.playbook || n.silk || n["windows phone"]; if (a === !0 || t.indexOf("mobile") !== -1 ? n.mobile = !0 : n.desktop = !0, n["windows phone"] && (n.winphone = !0, delete n["windows phone"]), n.edga || n.edgios || n.edg ? (n.edge = !0, i.browser = "edge") : n.crios ? (n.chrome = !0, i.browser = "chrome") : n.fxios && (n.firefox = !0, i.browser = "firefox"), (n.ipod || n.ipad || n.iphone) && (n.ios = !0), n.vivaldi && (i.browser = "vivaldi", n.vivaldi = !0), // Chrome, Opera 15+, Vivaldi and Safari are webkit based browsers (n.chrome || n.opr || n.safari || n.vivaldi || n.mobile === !0 && n.ios !== !0 && a !== !0) && (n.webkit = !0), n.opr && (i.browser = "opera", n.opera = !0), n.safari && (n.blackberry || n.bb ? (i.browser = "blackberry", n.blackberry = !0) : n.playbook ? (i.browser = "playbook", n.playbook = !0) : n.android ? (i.browser = "android", n.android = !0) : n.kindle ? (i.browser = "kindle", n.kindle = !0) : n.silk && (i.browser = "silk", n.silk = !0)), n.name = i.browser, n.platform = i.platform, t.indexOf("electron") !== -1) n.electron = !0; else if (document.location.href.indexOf("-extension://") !== -1) n.bex = !0; else { if (window.Capacitor !== void 0 ? (n.capacitor = !0, n.nativeMobile = !0, n.nativeMobileWrapper = "capacitor") : (window._cordovaNative !== void 0 || window.cordova !== void 0) && (n.cordova = !0, n.nativeMobile = !0, n.nativeMobileWrapper = "cordova"), ge.value === !0 && (Be = { is: { ...n } }), St === !0 && n.mac === !0 && (n.desktop === !0 && n.safari === !0 || n.nativeMobile === !0 && n.android !== !0 && n.ios !== !0 && n.ipad !== !0)) { delete n.mac, delete n.desktop; const r = Math.min(window.innerHeight, window.innerWidth) > 414 ? "ipad" : "iphone"; Object.assign(n, { mobile: !0, ios: !0, platform: r, [r]: !0 }); } n.mobile !== !0 && window.navigator.userAgentData && window.navigator.userAgentData.mobile && (delete n.desktop, n.mobile = !0); } return n; } const We = navigator.userAgent || navigator.vendor || window.opera, Tn = { has: { touch: !1, webStorage: !1 }, within: { iframe: !1 } }, R = { userAgent: We, is: _n(We), has: { touch: St }, within: { iframe: window.self !== window.top } }, Ue = { install(e) { const { $q: t } = e; ge.value === !0 ? (e.onSSRHydrated.push(() => { Object.assign(t.platform, R), ge.value = !1; }), t.platform = ut(this)) : t.platform = this; } }; { let e; ft(R.has, "webStorage", () => { if (e !== void 0) return e; try { if (window.localStorage) return e = !0, !0; } catch { } return e = !1, !1; }), Object.assign(Ue, R), ge.value === !0 && (Object.assign(Ue, Be, Tn), Be = null); } function Bn(e, t, o) { function i() { } return re(() => { e.value === !0 && void 0; }), { removeFromHistory: i, addToHistory() { } }; } function Mn() { let e = null; const t = F(); function o() { e !== null && (clearTimeout(e), e = null); } return Me(o), re(o), { removeTimeout: o, registerTimeout(i, n) { o(), Oe(t) === !1 && (e = setTimeout(() => { e = null, i(); }, n)); } }; } function On() { let e; const t = F(); function o() { e = void 0; } return Me(o), re(o), { removeTick: o, registerTick(i) { e = i, me(() => { e === i && (Oe(t) === !1 && e(), e = void 0); }); } }; } const Rn = { modelValue: { type: Boolean, default: null }, "onUpdate:modelValue": [Function, Array] }, jn = [ "beforeShow", "show", "beforeHide", "hide" ]; function Fn({ showing: e, canShow: t, // optional hideOnRouteChange: o, // optional handleShow: i, // optional handleHide: n, // optional processOnMount: a // optional }) { const r = F(), { props: l, emit: v, proxy: m } = r; let s; function k(g) { e.value === !0 ? w(g) : c(g); } function c(g) { if (l.disable === !0 || (g == null ? void 0 : g.qAnchorHandled) === !0 || t !== void 0 && t(g) !== !0) return; const p = l["onUpdate:modelValue"] !== void 0; p === !0 && (v("update:modelValue", !0), s = g, me(() => { s === g && (s = void 0); })), (l.modelValue === null || p === !1) && f(g); } function f(g) { e.value !== !0 && (e.value = !0, v("beforeShow", g), i !== void 0 ? i(g) : v("show", g)); } function w(g) { if (l.disable === !0) return; const p = l["onUpdate:modelValue"] !== void 0; p === !0 && (v("update:modelValue", !1), s = g, me(() => { s === g && (s = void 0); })), (l.modelValue === null || p === !1) && S(g); } function S(g) { e.value !== !1 && (e.value = !1, v("beforeHide", g), n !== void 0 ? n(g) : v("hide", g)); } function b(g) { l.disable === !0 && g === !0 ? l["onUpdate:modelValue"] !== void 0 && v("update:modelValue", !1) : g === !0 !== e.value && (g === !0 ? f : S)(s); } be(() => l.modelValue, b), o !== void 0 && yt(r) === !0 && be(() => m.$route.fullPath, () => { o.value === !0 && e.value === !0 && w(); }), st(() => { b(l.modelValue); }); const E = { show: c, hide: w, toggle: k }; return Object.assign(m, E), E; } const zn = { transitionShow: { type: String, default: "fade" }, transitionHide: { type: String, default: "fade" }, transitionDuration: { type: [String, Number], default: 300 } }; function Dn(e, t = () => { }, o = () => { }) { return { transitionProps: d(() => { const i = `q-transition--${e.transitionShow || t()}`, n = `q-transition--${e.transitionHide || o()}`; return { appear: !0, enterFromClass: `${i}-enter-from`, enterActiveClass: `${i}-enter-active`, enterToClass: `${i}-enter-to`, leaveFromClass: `${n}-leave-from`, leaveActiveClass: `${n}-leave-active`, leaveToClass: `${n}-leave-to` }; }), transitionStyle: d(() => `--q-transition-duration: ${e.transitionDuration}ms`) }; } const Xe = {}; let Vn = 1, Hn = document.body; function An(e, t) { const o = document.createElement("div"); if (o.id = `q-portal--${t}--${Vn++}`, Xe.globalNodes !== void 0) { const i = Xe.globalNodes.class; i !== void 0 && (o.className = i); } return Hn.appendChild(o), o; } function In(e) { e.remove(); } const ve = []; function Kn(e) { return ve.find( (t) => t.contentEl !== null && t.contentEl.contains(e) ); } function Nn(e, t) { do { if (e.$options.name === "QMenu") { if (e.hide(t), e.$props.separateClosePopup === !0) return fe(e); } else if (e.__qPortal === !0) { const o = fe(e); return (o == null ? void 0 : o.$options.name) === "QPopupProxy" ? (e.hide(t), o) : e; } e = fe(e); } while (e != null); } function Qn(e, t, o) { for (; o !== 0 && e !== void 0 && e !== null; ) { if (e.__qPortal === !0) { if (o--, e.$options.name === "QMenu") { e = Nn(e, t); continue; } e.hide(t); } e = fe(e); } } const Wn = I({ name: "QPortal", setup(e, { slots: t }) { return () => t.default(); } }); function Un(e) { for (e = e.parent; e != null; ) { if (e.type.name === "QGlobalDialog") return !0; if (e.type.name === "QDialog" || e.type.name === "QMenu") return !1; e = e.parent; } return !1; } function Xn(e, t, o, i) { const n = A(!1), a = A(!1); let r = null; const l = {}, v = Un(e); function m(k) { if (k === !0) { Qe(l), a.value = !0; return; } a.value = !1, n.value === !1 && (v === !1 && r === null && (r = An(!1, i)), n.value = !0, ve.push(e.proxy), En(l)); } function s(k) { if (a.value = !1, k !== !0) return; Qe(l), n.value = !1; const c = ve.indexOf(e.proxy); c !== -1 && ve.splice(c, 1), r !== null && (In(r), r = null); } return Bt(() => { s(!0); }), e.proxy.__qPortal = !0, ft(e.proxy, "contentEl", () => t.value), { showPortal: m, hidePortal: s, portalIsActive: n, portalIsAccessible: a, renderPortal: () => v === !0 ? o() : n.value === !0 ? [y(Mt, { to: r }, y(Wn, o))] : void 0 }; } function Yn(e) { return e === window ? window.pageYOffset || window.scrollY || document.body.scrollTop || 0 : e.scrollTop; } function Gn(e) { return e === window ? window.pageXOffset || window.scrollX || document.body.scrollLeft || 0 : e.scrollLeft; } function Jn(e, t = !0) { return !e || e.nodeType !== Node.ELEMENT_NODE ? !1 : t ? e.scrollHeight > e.clientHeight && (e.classList.contains("scroll") || e.classList.contains("overflow-auto") || ["auto", "scroll"].includes(window.getComputedStyle(e)["overflow-y"])) : e.scrollWidth > e.clientWidth && (e.classList.contains("scroll") || e.classList.contains("overflow-auto") || ["auto", "scroll"].includes(window.getComputedStyle(e)["overflow-x"])); } let ee = 0, Le, Ce, oe, $e = !1, Ye, Ge, Je, Q = null; function Zn(e) { eo(e) && H(e); } function eo(e) { if (e.target === document.body || e.target.classList.contains("q-layout__backdrop")) return !0; const t = Zt(e), o = e.shiftKey && !e.deltaX, i = !o && Math.abs(e.deltaX) <= Math.abs(e.deltaY), n = o || i ? e.deltaY : e.deltaX; for (let a = 0; a < t.length; a++) { const r = t[a]; if (Jn(r, i)) return i ? n < 0 && r.scrollTop === 0 ? !0 : n > 0 && r.scrollTop + r.clientHeight === r.scrollHeight : n < 0 && r.scrollLeft === 0 ? !0 : n > 0 && r.scrollLeft + r.clientWidth === r.scrollWidth; } return !0; } function Ze(e) { e.target === document && (document.scrollingElement.scrollTop = document.scrollingElement.scrollTop); } function ce(e) { $e !== !0 && ($e = !0, requestAnimationFrame(() => { $e = !1; const { height: t } = e.target, { clientHeight: o, scrollTop: i } = document.scrollingElement; (oe === void 0 || t !== window.innerHeight) && (oe = o - t, document.scrollingElement.scrollTop = i), i > oe && (document.scrollingElement.scrollTop -= Math.ceil((i - oe) / 8)); })); } function et(e) { const t = document.body, o = window.visualViewport !== void 0; if (e === "add") { const { overflowY: i, overflowX: n } = window.getComputedStyle(t); Le = Gn(window), Ce = Yn(window), Ye = t.style.left, Ge = t.style.top, Je = window.location.href, t.style.left = `-${Le}px`, t.style.top = `-${Ce}px`, n !== "hidden" && (n === "scroll" || t.scrollWidth > window.innerWidth) && t.classList.add("q-body--force-scrollbar-x"), i !== "hidden" && (i === "scroll" || t.scrollHeight > window.innerHeight) && t.classList.add("q-body--force-scrollbar-y"), t.classList.add("q-body--prevent-scroll"), document.qScrollPrevented = !0, R.is.ios === !0 && (o === !0 ? (window.scrollTo(0, 0), window.visualViewport.addEventListener("resize", ce, O.passiveCapture), window.visualViewport.addEventListener("scroll", ce, O.passiveCapture), window.scrollTo(0, 0)) : window.addEventListener("scroll", Ze, O.passiveCapture)); } R.is.desktop === !0 && R.is.mac === !0 && window[`${e}EventListener`]("wheel", Zn, O.notPassive), e === "remove" && (R.is.ios === !0 && (o === !0 ? (window.visualViewport.removeEventListener("resize", ce, O.passiveCapture), window.visualViewport.removeEventListener("scroll", ce, O.passiveCapture)) : window.removeEventListener("scroll", Ze, O.passiveCapture)), t.classList.remove("q-body--prevent-scroll"), t.classList.remove("q-body--force-scrollbar-x"), t.classList.remove("q-body--force-scrollbar-y"), document.qScrollPrevented = !1, t.style.left = Ye, t.style.top = Ge, window.location.href === Je && window.scrollTo(Le, Ce), oe = void 0); } function to(e) { let t = "add"; if (e === !0) { if (ee++, Q !== null) { clearTimeout(Q), Q = null; return; } if (ee > 1) return; } else { if (ee === 0 || (ee--, ee > 0)) return; if (t = "remove", R.is.ios === !0 && R.is.nativeMobile === !0) {