UNPKG

anq-server-data-table

Version:

A powerful server-side data table component for Vue 3 applications, built with Quasar Framework. This component provides a seamless way to handle server-side pagination, filtering, sorting, and data management in your Vue applications.

1,271 lines (1,267 loc) 438 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}.flex{display:flex}.table{display:table}.w-full{width:100%}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.\\!items-start{align-items:flex-start!important}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.\\!justify-between{justify-content:space-between!important}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.p-2{padding:.5rem}.font-bold{font-weight:700}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\[\\&\\>div\\>div\\:before\\]\\:\\!border-solid>div>div:before{border-style:solid!important}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})(); import { computed as d, markRaw as Fl, defineComponent as Hl, reactive as ol, h as v, withDirectives as Wt, getCurrentInstance as ge, ref as W, onMounted as $t, watch as se, onBeforeUpdate as Xr, inject as Xu, onBeforeUnmount as Ye, nextTick as Me, onDeactivated as nn, onActivated as jl, Transition as mt, unref as Qo, onUnmounted as Jr, Teleport as Zr, onBeforeMount as zl, onUpdated as Ju, toRaw as Zt, createBlock as At, openBlock as Je, withCtx as $e, createVNode as Ce, mergeProps as Un, createElementVNode as Ze, renderSlot as Et, toDisplayString as kl, provide as Zu, useSlots as Gu, createElementBlock as It, Fragment as Fn, createSlots as ma, normalizeClass as es, createCommentVNode as Xe, createTextVNode as ts, renderList as Zl, normalizeProps as ha } from "vue"; const Ro = { xs: 18, sm: 24, md: 32, lg: 38, xl: 46 }, Ln = { size: String }; function An(e, t = Ro) { return d(() => e.size !== void 0 ? { fontSize: e.size in t ? `${t[e.size]}px` : e.size } : null); } function _t(e, t, n, o) { return Object.defineProperty(e, t, { get: n, set: o, enumerable: !0 }), e; } function ns(e, t) { for (const n in t) _t(e, n, t[n]); return e; } function Te(e) { return Fl(Hl(e)); } function Xo(e) { return Fl(e); } const ls = (e, t) => { const n = ol(e); for (const o in e) _t( t, o, () => n[o], (l) => { n[o] = l; } ); return t; }; function ot(e, t) { return e !== void 0 && e() || t; } function Gr(e, t) { if (e !== void 0) { const n = e(); if (n != null) return n.slice(); } return t; } function Vt(e, t) { return e !== void 0 ? t.concat(e()) : t; } function os(e, t) { return e === void 0 ? t : t !== void 0 ? t.concat(e()) : e(); } function as(e, t, n, o, l, a) { t.key = o + l; const r = v(e, t, n); return l === !0 ? Wt(r, a()) : r; } const ga = "0 0 24 24", Gl = (e) => e, eo = (e) => `ionicons ${e}`, ei = { "mdi-": (e) => `mdi ${e}`, "icon-": Gl, // fontawesome equiv "bt-": (e) => `bt ${e}`, "eva-": (e) => `eva ${e}`, "ion-md": eo, "ion-ios": eo, "ion-logo": eo, "iconfont ": Gl, "ti-": (e) => `themify-icon ${e}`, "bi-": (e) => `bootstrap-icons ${e}`, "i-": Gl // UnoCSS pure icons }, ti = { o_: "-outlined", r_: "-round", s_: "-sharp" }, ni = { sym_o_: "-outlined", sym_r_: "-rounded", sym_s_: "-sharp" }, rs = new RegExp("^(" + Object.keys(ei).join("|") + ")"), is = new RegExp("^(" + Object.keys(ti).join("|") + ")"), ba = new RegExp("^(" + Object.keys(ni).join("|") + ")"), us = /^[Mm]\s?[-+]?\.?\d/, ss = /^img:/, cs = /^svguse:/, ds = /^ion-/, fs = /^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /, wt = Te({ name: "QIcon", props: { ...Ln, tag: { type: String, default: "i" }, name: String, color: String, left: Boolean, right: Boolean }, setup(e, { slots: t }) { const { proxy: { $q: n } } = ge(), o = An(e), l = d( () => "q-icon" + (e.left === !0 ? " on-left" : "") + (e.right === !0 ? " on-right" : "") + (e.color !== void 0 ? ` text-${e.color}` : "") ), a = d(() => { let r, i = e.name; if (i === "none" || !i) return { none: !0 }; if (n.iconMapFn !== null) { const u = n.iconMapFn(i); if (u !== void 0) if (u.icon !== void 0) { if (i = u.icon, i === "none" || !i) return { none: !0 }; } else return { cls: u.cls, content: u.content !== void 0 ? u.content : " " }; } if (us.test(i) === !0) { const [u, m = ga] = i.split("|"); return { svg: !0, viewBox: m, nodes: u.split("&&").map((b) => { const [p, f, k] = b.split("@@"); return v("path", { style: f, d: p, transform: k }); }) }; } if (ss.test(i) === !0) return { img: !0, src: i.substring(4) }; if (cs.test(i) === !0) { const [u, m = ga] = i.split("|"); return { svguse: !0, src: u.substring(7), viewBox: m }; } let c = " "; const s = i.match(rs); if (s !== null) r = ei[s[1]](i); else if (fs.test(i) === !0) r = i; else if (ds.test(i) === !0) r = `ionicons ion-${n.platform.is.ios === !0 ? "ios" : "md"}${i.substring(3)}`; else if (ba.test(i) === !0) { r = "notranslate material-symbols"; const u = i.match(ba); u !== null && (i = i.substring(6), r += ni[u[1]]), c = i; } else { r = "notranslate material-icons"; const u = i.match(is); u !== null && (i = i.substring(2), r += ti[u[1]]), c = i; } return { cls: r, content: c }; }); return () => { const r = { class: l.value, style: o.value, "aria-hidden": "true" }; return a.value.none === !0 ? v(e.tag, r, ot(t.default)) : a.value.img === !0 ? v(e.tag, r, Vt(t.default, [ v("img", { src: a.value.src }) ])) : a.value.svg === !0 ? v(e.tag, r, Vt(t.default, [ v("svg", { viewBox: a.value.viewBox || "0 0 24 24" }, a.value.nodes) ])) : a.value.svguse === !0 ? v(e.tag, r, Vt(t.default, [ v("svg", { viewBox: a.value.viewBox }, [ v("use", { "xlink:href": a.value.src }) ]) ])) : (a.value.cls !== void 0 && (r.class += " " + a.value.cls), v(e.tag, r, Vt(t.default, [ a.value.content ]))); }; } }), vs = { size: { type: [String, Number], default: "1em" }, color: String }; function ms(e) { return { cSize: d(() => e.size in Ro ? `${Ro[e.size]}px` : e.size), classes: d( () => "q-spinner" + (e.color ? ` text-${e.color}` : "") ) }; } const li = Te({ name: "QSpinner", props: { ...vs, thickness: { type: Number, default: 5 } }, setup(e) { const { cSize: t, classes: n } = ms(e); return () => v("svg", { class: n.value + " q-spinner-mat", width: t.value, height: t.value, viewBox: "25 25 50 50" }, [ v("circle", { class: "path", cx: "50", cy: "50", r: "20", fill: "none", stroke: "currentColor", "stroke-width": e.thickness, "stroke-miterlimit": "10" }) ]); } }); let to, cl = 0; const lt = new Array(256); for (let e = 0; e < 256; e++) lt[e] = (e + 256).toString(16).substring(1); const hs = (() => { const e = typeof crypto < "u" ? crypto : typeof window < "u" ? window.crypto || window.msCrypto : void 0; if (e !== void 0) { if (e.randomBytes !== void 0) return e.randomBytes; if (e.getRandomValues !== void 0) return (t) => { const n = new Uint8Array(t); return e.getRandomValues(n), n; }; } return (t) => { const n = []; for (let o = t; o > 0; o--) n.push(Math.floor(Math.random() * 256)); return n; }; })(), pa = 4096; function Oo() { (to === void 0 || cl + 16 > pa) && (cl = 0, to = hs(pa)); const e = Array.prototype.slice.call(to, cl, cl += 16); return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, lt[e[0]] + lt[e[1]] + lt[e[2]] + lt[e[3]] + "-" + lt[e[4]] + lt[e[5]] + "-" + lt[e[6]] + lt[e[7]] + "-" + lt[e[8]] + lt[e[9]] + "-" + lt[e[10]] + lt[e[11]] + lt[e[12]] + lt[e[13]] + lt[e[14]] + lt[e[15]]; } const Gn = W( !1 ); let Bo; function gs(e, t) { const n = /(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: n[5] || n[3] || n[1] || "", version: n[4] || n[2] || "0", platform: t[0] || "" }; } function bs(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 oi = "ontouchstart" in window || window.navigator.maxTouchPoints > 0; function ps(e) { const t = e.toLowerCase(), n = bs(t), o = gs(t, n), l = { 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 }; o.browser && (l[o.browser] = !0, l.version = o.version, l.versionNumber = parseInt(o.version, 10)), o.platform && (l[o.platform] = !0); const a = l.android || l.ios || l.bb || l.blackberry || l.ipad || l.iphone || l.ipod || l.kindle || l.playbook || l.silk || l["windows phone"]; if (a === !0 || t.indexOf("mobile") !== -1 ? l.mobile = !0 : l.desktop = !0, l["windows phone"] && (l.winphone = !0, delete l["windows phone"]), l.edga || l.edgios || l.edg ? (l.edge = !0, o.browser = "edge") : l.crios ? (l.chrome = !0, o.browser = "chrome") : l.fxios && (l.firefox = !0, o.browser = "firefox"), (l.ipod || l.ipad || l.iphone) && (l.ios = !0), l.vivaldi && (o.browser = "vivaldi", l.vivaldi = !0), // Chrome, Opera 15+, Vivaldi and Safari are webkit based browsers (l.chrome || l.opr || l.safari || l.vivaldi || l.mobile === !0 && l.ios !== !0 && a !== !0) && (l.webkit = !0), l.opr && (o.browser = "opera", l.opera = !0), l.safari && (l.blackberry || l.bb ? (o.browser = "blackberry", l.blackberry = !0) : l.playbook ? (o.browser = "playbook", l.playbook = !0) : l.android ? (o.browser = "android", l.android = !0) : l.kindle ? (o.browser = "kindle", l.kindle = !0) : l.silk && (o.browser = "silk", l.silk = !0)), l.name = o.browser, l.platform = o.platform, t.indexOf("electron") !== -1) l.electron = !0; else if (document.location.href.indexOf("-extension://") !== -1) l.bex = !0; else { if (window.Capacitor !== void 0 ? (l.capacitor = !0, l.nativeMobile = !0, l.nativeMobileWrapper = "capacitor") : (window._cordovaNative !== void 0 || window.cordova !== void 0) && (l.cordova = !0, l.nativeMobile = !0, l.nativeMobileWrapper = "cordova"), Gn.value === !0 && (Bo = { is: { ...l } }), oi === !0 && l.mac === !0 && (l.desktop === !0 && l.safari === !0 || l.nativeMobile === !0 && l.android !== !0 && l.ios !== !0 && l.ipad !== !0)) { delete l.mac, delete l.desktop; const r = Math.min(window.innerHeight, window.innerWidth) > 414 ? "ipad" : "iphone"; Object.assign(l, { mobile: !0, ios: !0, platform: r, [r]: !0 }); } l.mobile !== !0 && window.navigator.userAgentData && window.navigator.userAgentData.mobile && (delete l.desktop, l.mobile = !0); } return l; } const ya = navigator.userAgent || navigator.vendor || window.opera, ys = { has: { touch: !1, webStorage: !1 }, within: { iframe: !1 } }, tt = { userAgent: ya, is: ps(ya), has: { touch: oi }, within: { iframe: window.self !== window.top } }, Lo = { install(e) { const { $q: t } = e; Gn.value === !0 ? (e.onSSRHydrated.push(() => { Object.assign(t.platform, tt), Gn.value = !1; }), t.platform = ol(this)) : t.platform = this; } }; { let e; _t(tt.has, "webStorage", () => { if (e !== void 0) return e; try { if (window.localStorage) return e = !0, !0; } catch { } return e = !1, !1; }), Object.assign(Lo, tt), Gn.value === !0 && (Object.assign(Lo, Bo, ys), Bo = null); } function ws(e) { return e ?? null; } function wa(e, t) { return e ?? (t === !0 ? `f_${Oo()}` : null); } function Ss({ getValue: e, required: t = !0 } = {}) { if (Gn.value === !0) { const n = e !== void 0 ? W(ws(e())) : W(null); return t === !0 && n.value === null && $t(() => { n.value = `f_${Oo()}`; }), e !== void 0 && se(e, (o) => { n.value = wa(o, t); }), n; } return e !== void 0 ? d(() => wa(e(), t)) : W(`f_${Oo()}`); } const Sa = /^on[A-Z]/; function ks() { const { attrs: e, vnode: t } = ge(), n = { listeners: W({}), attributes: W({}) }; function o() { const l = {}, a = {}; for (const r in e) r !== "class" && r !== "style" && Sa.test(r) === !1 && (l[r] = e[r]); for (const r in t.props) Sa.test(r) === !0 && (a[r] = t.props[r]); n.attributes.value = l, n.listeners.value = a; } return Xr(o), o(), n; } const ct = { dark: { type: Boolean, default: null } }; function dt(e, t) { return d(() => e.dark === null ? t.dark.isActive : e.dark); } const xs = "_q_fo_"; function _s({ validate: e, resetValidation: t, requiresQForm: n }) { const o = Xu(xs, !1); if (o !== !1) { const { props: l, proxy: a } = ge(); Object.assign(a, { validate: e, resetValidation: t }), se(() => l.disable, (r) => { r === !0 ? (typeof t == "function" && t(), o.unbindComponent(a)) : o.bindComponent(a); }), $t(() => { l.disable !== !0 && o.bindComponent(a); }), Ye(() => { l.disable !== !0 && o.unbindComponent(a); }); } else n === !0 && console.error("Parent QForm not found on useFormChild()!"); } const ka = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/, xa = /^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/, _a = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, dl = /^rgb\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5])\)$/, fl = /^rgba\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/, no = { date: (e) => /^-?[\d]+\/[0-1]\d\/[0-3]\d$/.test(e), time: (e) => /^([0-1]?\d|2[0-3]):[0-5]\d$/.test(e), fulltime: (e) => /^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(e), timeOrFulltime: (e) => /^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/.test(e), // -- RFC 5322 -- // -- Added in v2.6.6 -- // This is a basic helper validation. // For something more complex (like RFC 822) you should write and use your own rule. // We won't be accepting PRs to enhance the one below because of the reason above. // eslint-disable-next-line email: (e) => /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e), hexColor: (e) => ka.test(e), hexaColor: (e) => xa.test(e), hexOrHexaColor: (e) => _a.test(e), rgbColor: (e) => dl.test(e), rgbaColor: (e) => fl.test(e), rgbOrRgbaColor: (e) => dl.test(e) || fl.test(e), hexOrRgbColor: (e) => ka.test(e) || dl.test(e), hexaOrRgbaColor: (e) => xa.test(e) || fl.test(e), anyColor: (e) => _a.test(e) || dl.test(e) || fl.test(e) }; function ai(e, t = 250, n) { let o = null; function l() { const a = arguments, r = () => { o = null, e.apply(this, a); }; o !== null && clearTimeout(o), o = setTimeout(r, t); } return l.cancel = () => { o !== null && clearTimeout(o); }, l; } const Cs = [!0, !1, "ondemand"], qs = { modelValue: {}, error: { type: Boolean, default: null }, errorMessage: String, noErrorIcon: Boolean, rules: Array, reactiveRules: Boolean, lazyRules: { type: [Boolean, String], default: !1, // statement unneeded but avoids future vue implementation changes validator: (e) => Cs.includes(e) } }; function Es(e, t) { const { props: n, proxy: o } = ge(), l = W(!1), a = W(null), r = W(!1); _s({ validate: k, resetValidation: f }); let i = 0, c; const s = d( () => n.rules !== void 0 && n.rules !== null && n.rules.length !== 0 ), u = d(() => n.disable !== !0 && s.value === !0 && t.value === !1), m = d( () => n.error === !0 || l.value === !0 ), b = d(() => typeof n.errorMessage == "string" && n.errorMessage.length !== 0 ? n.errorMessage : a.value); se(() => n.modelValue, () => { r.value = !0, u.value === !0 && n.lazyRules === !1 && h(); }); function p() { n.lazyRules !== "ondemand" && u.value === !0 && r.value === !0 && h(); } se(() => n.reactiveRules, (T) => { T === !0 ? c === void 0 && (c = se(() => n.rules, p, { immediate: !0, deep: !0 })) : c !== void 0 && (c(), c = void 0); }, { immediate: !0 }), se(() => n.lazyRules, p), se(e, (T) => { T === !0 ? r.value = !0 : u.value === !0 && n.lazyRules !== "ondemand" && h(); }); function f() { i++, t.value = !1, r.value = !1, l.value = !1, a.value = null, h.cancel(); } function k(T = n.modelValue) { if (n.disable === !0 || s.value === !1) return !0; const M = ++i, _ = t.value !== !0 ? () => { r.value = !0; } : () => { }, y = (j, L) => { j === !0 && _(), l.value = j, a.value = L || null, t.value = !1; }, w = []; for (let j = 0; j < n.rules.length; j++) { const L = n.rules[j]; let U; if (typeof L == "function" ? U = L(T, no) : typeof L == "string" && no[L] !== void 0 && (U = no[L](T)), U === !1 || typeof U == "string") return y(!0, U), !1; U !== !0 && U !== void 0 && w.push(U); } return w.length === 0 ? (y(!1), !0) : (t.value = !0, Promise.all(w).then( (j) => { if (j === void 0 || Array.isArray(j) === !1 || j.length === 0) return M === i && y(!1), !0; const L = j.find((U) => U === !1 || typeof U == "string"); return M === i && y(L !== void 0, L), L === void 0; }, (j) => (M === i && (console.error(j), y(!0)), !1) )); } const h = ai(k, 0); return Ye(() => { c == null || c(), h.cancel(); }), Object.assign(o, { resetValidation: f, validate: k }), _t(o, "hasError", () => m.value), { isDirtyModel: r, hasRules: s, hasError: m, errorMessage: b, validate: k, resetValidation: f }; } const et = { hasPassive: !1, passiveCapture: !0, notPassiveCapture: !0 }; try { const e = Object.defineProperty({}, "passive", { get() { Object.assign(et, { 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 ri() { } function Ms(e) { return e.button === 0; } function Pn(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 Ts(e) { if (e.path) return e.path; if (e.composedPath) return e.composedPath(); const t = []; let n = e.target; for (; n; ) { if (t.push(n), n.tagName === "HTML") return t.push(document), t.push(window), t; n = n.parentElement; } } function pt(e) { e.stopPropagation(); } function st(e) { e.cancelable !== !1 && e.preventDefault(); } function ze(e) { e.cancelable !== !1 && e.preventDefault(), e.stopPropagation(); } function lo(e, t) { if (e === void 0 || t === !0 && e.__dragPrevented === !0) return; const n = t === !0 ? (o) => { o.__dragPrevented = !0, o.addEventListener("dragstart", st, et.notPassiveCapture); } : (o) => { delete o.__dragPrevented, o.removeEventListener("dragstart", st, et.notPassiveCapture); }; e.querySelectorAll("a, img").forEach(n); } function un(e, t, n) { const o = `__q_${t}_evt`; e[o] = e[o] !== void 0 ? e[o].concat(n) : n, n.forEach((l) => { l[0].addEventListener(l[1], e[l[2]], et[l[3]]); }); } function Jn(e, t) { const n = `__q_${t}_evt`; e[n] !== void 0 && (e[n].forEach((o) => { o[0].removeEventListener(o[1], e[o[2]], et[o[3]]); }), e[n] = void 0); } let sn = [], el = []; function ii(e) { el = el.filter((t) => t !== e); } function Ps(e) { ii(e), el.push(e); } function Ca(e) { ii(e), el.length === 0 && sn.length !== 0 && (sn[sn.length - 1](), sn = []); } function Il(e) { el.length === 0 ? e() : sn.push(e); } function Rs(e) { sn = sn.filter((t) => t !== e); } function tl(e) { return e != null && ("" + e).length !== 0; } const Os = { ...ct, ...qs, label: String, stackLabel: Boolean, hint: String, hideHint: Boolean, prefix: String, suffix: String, labelColor: String, color: String, bgColor: String, filled: Boolean, outlined: Boolean, borderless: Boolean, standout: [Boolean, String], square: Boolean, loading: Boolean, labelSlot: Boolean, bottomSlots: Boolean, hideBottomSpace: Boolean, rounded: Boolean, dense: Boolean, itemAligned: Boolean, counter: Boolean, clearable: Boolean, clearIcon: String, disable: Boolean, readonly: Boolean, autofocus: Boolean, for: String }, Nl = { ...Os, maxlength: [Number, String] }, Jo = ["update:modelValue", "clear", "focus", "blur"]; function Zo({ requiredForAttr: e = !0, tagProp: t, changeEvent: n = !1 } = {}) { const { props: o, proxy: l } = ge(), a = dt(o, l.$q), r = Ss({ required: e, getValue: () => o.for }); return { requiredForAttr: e, changeEvent: n, tag: t === !0 ? d(() => o.tag) : { value: "label" }, isDark: a, editable: d( () => o.disable !== !0 && o.readonly !== !0 ), innerLoading: W(!1), focused: W(!1), hasPopupOpen: !1, splitAttrs: ks(), targetUid: r, rootRef: W(null), targetRef: W(null), controlRef: W(null) /** * user supplied additionals: * innerValue - computed * floatingLabel - computed * inputRef - computed * fieldClass - computed * hasShadow - computed * controlEvents - Object with fn(e) * getControl - fn * getInnerAppend - fn * getControlChild - fn * getShadowControl - fn * showPopup - fn */ }; } function Go(e) { const { props: t, emit: n, slots: o, attrs: l, proxy: a } = ge(), { $q: r } = a; let i = null; e.hasValue === void 0 && (e.hasValue = d(() => tl(t.modelValue))), e.emitValue === void 0 && (e.emitValue = ($) => { n("update:modelValue", $); }), e.controlEvents === void 0 && (e.controlEvents = { onFocusin: re, onFocusout: V }), Object.assign(e, { clearValue: R, onControlFocusin: re, onControlFocusout: V, focus: L }), e.computedCounter === void 0 && (e.computedCounter = d(() => { if (t.counter !== !1) { const $ = typeof t.modelValue == "string" || typeof t.modelValue == "number" ? ("" + t.modelValue).length : Array.isArray(t.modelValue) === !0 ? t.modelValue.length : 0, G = t.maxlength !== void 0 ? t.maxlength : t.maxValues; return $ + (G !== void 0 ? " / " + G : ""); } })); const { isDirtyModel: c, hasRules: s, hasError: u, errorMessage: m, resetValidation: b } = Es(e.focused, e.innerLoading), p = e.floatingLabel !== void 0 ? d(() => t.stackLabel === !0 || e.focused.value === !0 || e.floatingLabel.value === !0) : d(() => t.stackLabel === !0 || e.focused.value === !0 || e.hasValue.value === !0), f = d( () => t.bottomSlots === !0 || t.hint !== void 0 || s.value === !0 || t.counter === !0 || t.error !== null ), k = d(() => t.filled === !0 ? "filled" : t.outlined === !0 ? "outlined" : t.borderless === !0 ? "borderless" : t.standout ? "standout" : "standard"), h = d( () => `q-field row no-wrap items-start q-field--${k.value}` + (e.fieldClass !== void 0 ? ` ${e.fieldClass.value}` : "") + (t.rounded === !0 ? " q-field--rounded" : "") + (t.square === !0 ? " q-field--square" : "") + (p.value === !0 ? " q-field--float" : "") + (M.value === !0 ? " q-field--labeled" : "") + (t.dense === !0 ? " q-field--dense" : "") + (t.itemAligned === !0 ? " q-field--item-aligned q-item-type" : "") + (e.isDark.value === !0 ? " q-field--dark" : "") + (e.getControl === void 0 ? " q-field--auto-height" : "") + (e.focused.value === !0 ? " q-field--focused" : "") + (u.value === !0 ? " q-field--error" : "") + (u.value === !0 || e.focused.value === !0 ? " q-field--highlighted" : "") + (t.hideBottomSpace !== !0 && f.value === !0 ? " q-field--with-bottom" : "") + (t.disable === !0 ? " q-field--disabled" : t.readonly === !0 ? " q-field--readonly" : "") ), T = d( () => "q-field__control relative-position row no-wrap" + (t.bgColor !== void 0 ? ` bg-${t.bgColor}` : "") + (u.value === !0 ? " text-negative" : typeof t.standout == "string" && t.standout.length !== 0 && e.focused.value === !0 ? ` ${t.standout}` : t.color !== void 0 ? ` text-${t.color}` : "") ), M = d( () => t.labelSlot === !0 || t.label !== void 0 ), _ = d( () => "q-field__label no-pointer-events absolute ellipsis" + (t.labelColor !== void 0 && u.value !== !0 ? ` text-${t.labelColor}` : "") ), y = d(() => ({ id: e.targetUid.value, editable: e.editable.value, focused: e.focused.value, floatingLabel: p.value, modelValue: t.modelValue, emitValue: e.emitValue })), w = d(() => { const $ = {}; return e.targetUid.value && ($.for = e.targetUid.value), t.disable === !0 && ($["aria-disabled"] = "true"), $; }); function j() { var fe; const $ = document.activeElement; let G = (fe = e.targetRef) == null ? void 0 : fe.value; G && ($ === null || $.id !== e.targetUid.value) && (G.hasAttribute("tabindex") === !0 || (G = G.querySelector("[tabindex]")), G !== $ && (G == null || G.focus({ preventScroll: !0 }))); } function L() { Il(j); } function U() { Rs(j); const $ = document.activeElement; $ !== null && e.rootRef.value.contains($) && $.blur(); } function re($) { i !== null && (clearTimeout(i), i = null), e.editable.value === !0 && e.focused.value === !1 && (e.focused.value = !0, n("focus", $)); } function V($, G) { i !== null && clearTimeout(i), i = setTimeout(() => { i = null, !(document.hasFocus() === !0 && (e.hasPopupOpen === !0 || e.controlRef === void 0 || e.controlRef.value === null || e.controlRef.value.contains(document.activeElement) !== !1)) && (e.focused.value === !0 && (e.focused.value = !1, n("blur", $)), G == null || G()); }); } function R($) { var G; ze($), r.platform.is.mobile !== !0 ? (((G = e.targetRef) == null ? void 0 : G.value) || e.rootRef.value).focus() : e.rootRef.value.contains(document.activeElement) === !0 && document.activeElement.blur(), t.type === "file" && (e.inputRef.value.value = null), n("update:modelValue", null), e.changeEvent === !0 && n("change", null), n("clear", t.modelValue), Me(() => { const fe = c.value; b(), c.value = fe; }); } function D($) { [13, 32].includes($.keyCode) && R($); } function F() { const $ = []; return o.prepend !== void 0 && $.push( v("div", { class: "q-field__prepend q-field__marginal row no-wrap items-center", key: "prepend", onClick: st }, o.prepend()) ), $.push( v("div", { class: "q-field__control-container col relative-position row no-wrap q-anchor--skip" }, C()) ), u.value === !0 && t.noErrorIcon === !1 && $.push( I("error", [ v(wt, { name: r.iconSet.field.error, color: "negative" }) ]) ), t.loading === !0 || e.innerLoading.value === !0 ? $.push( I( "inner-loading-append", o.loading !== void 0 ? o.loading() : [v(li, { color: t.color })] ) ) : t.clearable === !0 && e.hasValue.value === !0 && e.editable.value === !0 && $.push( I("inner-clearable-append", [ v(wt, { class: "q-field__focusable-action", name: t.clearIcon || r.iconSet.field.clear, tabindex: 0, role: "button", "aria-hidden": "false", "aria-label": r.lang.label.clear, onKeyup: D, onClick: R }) ]) ), o.append !== void 0 && $.push( v("div", { class: "q-field__append q-field__marginal row no-wrap items-center", key: "append", onClick: st }, o.append()) ), e.getInnerAppend !== void 0 && $.push( I("inner-append", e.getInnerAppend()) ), e.getControlChild !== void 0 && $.push( e.getControlChild() ), $; } function C() { const $ = []; return t.prefix !== void 0 && t.prefix !== null && $.push( v("div", { class: "q-field__prefix no-pointer-events row items-center" }, t.prefix) ), e.getShadowControl !== void 0 && e.hasShadow.value === !0 && $.push( e.getShadowControl() ), M.value === !0 && $.push( v("div", { class: _.value }, ot(o.label, t.label)) ), e.getControl !== void 0 ? $.push(e.getControl()) : o.rawControl !== void 0 ? $.push(o.rawControl()) : o.control !== void 0 && $.push( v("div", { ref: e.targetRef, class: "q-field__native row", tabindex: -1, ...e.splitAttrs.attributes.value, "data-autofocus": t.autofocus === !0 || void 0 }, o.control(y.value)) ), t.suffix !== void 0 && t.suffix !== null && $.push( v("div", { class: "q-field__suffix no-pointer-events row items-center" }, t.suffix) ), $.concat(ot(o.default)); } function P() { let $, G; u.value === !0 ? m.value !== null ? ($ = [v("div", { role: "alert" }, m.value)], G = `q--slot-error-${m.value}`) : ($ = ot(o.error), G = "q--slot-error") : (t.hideHint !== !0 || e.focused.value === !0) && (t.hint !== void 0 ? ($ = [v("div", t.hint)], G = `q--slot-hint-${t.hint}`) : ($ = ot(o.hint), G = "q--slot-hint")); const fe = t.counter === !0 || o.counter !== void 0; if (t.hideBottomSpace === !0 && fe === !1 && $ === void 0) return; const E = v("div", { key: G, class: "q-field__messages col" }, $); return v("div", { class: "q-field__bottom row items-start q-field__bottom--" + (t.hideBottomSpace !== !0 ? "animated" : "stale"), onClick: st }, [ t.hideBottomSpace === !0 ? E : v(mt, { name: "q-transition--field-message" }, () => E), fe === !0 ? v("div", { class: "q-field__counter" }, o.counter !== void 0 ? o.counter() : e.computedCounter.value) : null ]); } function I($, G) { return G === null ? null : v("div", { key: $, class: "q-field__append q-field__marginal row no-wrap items-center q-anchor--skip" }, G); } let N = !1; return nn(() => { N = !0; }), jl(() => { N === !0 && t.autofocus === !0 && a.focus(); }), t.autofocus === !0 && $t(() => { a.focus(); }), Ye(() => { i !== null && clearTimeout(i); }), Object.assign(a, { focus: L, blur: U }), function() { const G = e.getControl === void 0 && o.control === void 0 ? { ...e.splitAttrs.attributes.value, "data-autofocus": t.autofocus === !0 || void 0, ...w.value } : w.value; return v(e.tag.value, { ref: e.rootRef, class: [ h.value, l.class ], style: l.style, ...G }, [ o.before !== void 0 ? v("div", { class: "q-field__before q-field__marginal row no-wrap items-center", onClick: st }, o.before()) : null, v("div", { class: "q-field__inner relative-position col self-stretch" }, [ v("div", { ref: e.controlRef, class: T.value, tabindex: -1, ...e.controlEvents }, F()), f.value === !0 ? P() : null ]), o.after !== void 0 ? v("div", { class: "q-field__after q-field__marginal row no-wrap items-center", onClick: st }, o.after()) : null ]); }; } function ea(e) { return e !== Object(e) || e.isComposing === !0 || e.qKeyEvent === !0; } function Qt(e, t) { return ea(e) === !0 ? !1 : [].concat(t).includes(e.keyCode); } const qa = { date: "####/##/##", datetime: "####/##/## ##:##", time: "##:##", fulltime: "##:##:##", phone: "(###) ### - ####", card: "#### #### #### ####" }, { tokenMap: Ea, tokenKeys: Bs } = ui({ "#": { pattern: "[\\d]", negate: "[^\\d]" }, S: { pattern: "[a-zA-Z]", negate: "[^a-zA-Z]" }, N: { pattern: "[0-9a-zA-Z]", negate: "[^0-9a-zA-Z]" }, A: { pattern: "[a-zA-Z]", negate: "[^a-zA-Z]", transform: (e) => e.toLocaleUpperCase() }, a: { pattern: "[a-zA-Z]", negate: "[^a-zA-Z]", transform: (e) => e.toLocaleLowerCase() }, X: { pattern: "[0-9a-zA-Z]", negate: "[^0-9a-zA-Z]", transform: (e) => e.toLocaleUpperCase() }, x: { pattern: "[0-9a-zA-Z]", negate: "[^0-9a-zA-Z]", transform: (e) => e.toLocaleLowerCase() } }); function ui(e) { const t = Object.keys(e), n = {}; return t.forEach((o) => { const l = e[o]; n[o] = { ...l, regex: new RegExp(l.pattern) }; }), { tokenMap: n, tokenKeys: t }; } function si(e) { return new RegExp("\\\\([^.*+?^${}()|([\\]])|([.*+?^${}()|[\\]])|([" + e.join("") + "])|(.)", "g"); } const Ma = /[.*+?^${}()|[\]\\]/g, Ls = si(Bs), We = "", As = { mask: String, reverseFillMask: Boolean, fillMask: [Boolean, String], unmaskedValue: Boolean, maskTokens: Object }; function Vs(e, t, n, o) { let l, a, r, i, c, s; const u = d(() => { if (e.maskTokens === void 0 || e.maskTokens === null) return { tokenMap: Ea, tokenRegexMask: Ls }; const { tokenMap: V } = ui(e.maskTokens), R = { ...Ea, ...V }; return { tokenMap: R, tokenRegexMask: si(Object.keys(R)) }; }), m = W(null), b = W(f()); function p() { return e.autogrow === !0 || ["textarea", "text", "search", "url", "tel", "password"].includes(e.type); } se(() => e.type + e.autogrow, h), se(() => e.mask, (V) => { if (V !== void 0) T(b.value, !0); else { const R = U(b.value); h(), e.modelValue !== R && t("update:modelValue", R); } }), se(() => e.fillMask + e.reverseFillMask, () => { m.value === !0 && T(b.value, !0); }), se(() => e.unmaskedValue, () => { m.value === !0 && T(b.value); }); function f() { if (h(), m.value === !0) { const V = j(U(e.modelValue)); return e.fillMask !== !1 ? re(V) : V; } return e.modelValue; } function k(V) { if (V < l.length) return l.slice(-V); let R = "", D = l; const F = D.indexOf(We); if (F !== -1) { for (let C = V - D.length; C > 0; C--) R += We; D = D.slice(0, F) + R + D.slice(F); } return D; } function h() { if (m.value = e.mask !== void 0 && e.mask.length !== 0 && p(), m.value === !1) { i = void 0, l = "", a = ""; return; } const V = qa[e.mask] === void 0 ? e.mask : qa[e.mask], R = typeof e.fillMask == "string" && e.fillMask.length !== 0 ? e.fillMask.slice(0, 1) : "_", D = R.replace(Ma, "\\$&"), F = [], C = [], P = []; let I = e.reverseFillMask === !0, N = "", $ = ""; V.replace(u.value.tokenRegexMask, (q, Q, z, J, ae) => { if (J !== void 0) { const Z = u.value.tokenMap[J]; P.push(Z), $ = Z.negate, I === !0 && (C.push("(?:" + $ + "+)?(" + Z.pattern + "+)?(?:" + $ + "+)?(" + Z.pattern + "+)?"), I = !1), C.push("(?:" + $ + "+)?(" + Z.pattern + ")?"); } else if (z !== void 0) N = "\\" + (z === "\\" ? "" : z), P.push(z), F.push("([^" + N + "]+)?" + N + "?"); else { const Z = Q !== void 0 ? Q : ae; N = Z === "\\" ? "\\\\\\\\" : Z.replace(Ma, "\\\\$&"), P.push(Z), F.push("([^" + N + "]+)?" + N + "?"); } }); const G = new RegExp( "^" + F.join("") + "(" + (N === "" ? "." : "[^" + N + "]") + "+)?" + (N === "" ? "" : "[" + N + "]*") + "$" ), fe = C.length - 1, E = C.map((q, Q) => Q === 0 && e.reverseFillMask === !0 ? new RegExp("^" + D + "*" + q) : Q === fe ? new RegExp( "^" + q + "(" + ($ === "" ? "." : $) + "+)?" + (e.reverseFillMask === !0 ? "$" : D + "*") ) : new RegExp("^" + q)); r = P, i = (q) => { const Q = G.exec(e.reverseFillMask === !0 ? q : q.slice(0, P.length + 1)); Q !== null && (q = Q.slice(1).join("")); const z = [], J = E.length; for (let ae = 0, Z = q; ae < J; ae++) { const be = E[ae].exec(Z); if (be === null) break; Z = Z.slice(be.shift().length), z.push(...be); } return z.length !== 0 ? z.join("") : q; }, l = P.map((q) => typeof q == "string" ? q : We).join(""), a = l.split(We).join(R); } function T(V, R, D) { const F = o.value, C = F.selectionEnd, P = F.value.length - C, I = U(V); R === !0 && h(); const N = j(I, R), $ = e.fillMask !== !1 ? re(N) : N, G = b.value !== $; F.value !== $ && (F.value = $), G === !0 && (b.value = $), document.activeElement === F && Me(() => { if ($ === a) { const E = e.reverseFillMask === !0 ? a.length : 0; F.setSelectionRange(E, E, "forward"); return; } if (D === "insertFromPaste" && e.reverseFillMask !== !0) { const E = F.selectionEnd; let q = C - 1; for (let Q = c; Q <= q && Q < E; Q++) l[Q] !== We && q++; _.right(F, q); return; } if (["deleteContentBackward", "deleteContentForward"].indexOf(D) !== -1) { const E = e.reverseFillMask === !0 ? C === 0 ? $.length > N.length ? 1 : 0 : Math.max(0, $.length - ($ === a ? 0 : Math.min(N.length, P) + 1)) + 1 : C; F.setSelectionRange(E, E, "forward"); return; } if (e.reverseFillMask === !0) if (G === !0) { const E = Math.max(0, $.length - ($ === a ? 0 : Math.min(N.length, P + 1))); E === 1 && C === 1 ? F.setSelectionRange(E, E, "forward") : _.rightReverse(F, E); } else { const E = $.length - P; F.setSelectionRange(E, E, "backward"); } else if (G === !0) { const E = Math.max(0, l.indexOf(We), Math.min(N.length, C) - 1); _.right(F, E); } else { const E = C - 1; _.right(F, E); } }); const fe = e.unmaskedValue === !0 ? U($) : $; String(e.modelValue) !== fe && (e.modelValue !== null || fe !== "") && n(fe, !0); } function M(V, R, D) { const F = j(U(V.value)); R = Math.max(0, l.indexOf(We), Math.min(F.length, R)), c = R, V.setSelectionRange(R, D, "forward"); } const _ = { left(V, R) { const D = l.slice(R - 1).indexOf(We) === -1; let F = Math.max(0, R - 1); for (; F >= 0; F--) if (l[F] === We) { R = F, D === !0 && R++; break; } if (F < 0 && l[R] !== void 0 && l[R] !== We) return _.right(V, 0); R >= 0 && V.setSelectionRange(R, R, "backward"); }, right(V, R) { const D = V.value.length; let F = Math.min(D, R + 1); for (; F <= D; F++) if (l[F] === We) { R = F; break; } else l[F - 1] === We && (R = F); if (F > D && l[R - 1] !== void 0 && l[R - 1] !== We) return _.left(V, D); V.setSelectionRange(R, R, "forward"); }, leftReverse(V, R) { const D = k(V.value.length); let F = Math.max(0, R - 1); for (; F >= 0; F--) if (D[F - 1] === We) { R = F; break; } else if (D[F] === We && (R = F, F === 0)) break; if (F < 0 && D[R] !== void 0 && D[R] !== We) return _.rightReverse(V, 0); R >= 0 && V.setSelectionRange(R, R, "backward"); }, rightReverse(V, R) { const D = V.value.length, F = k(D), C = F.slice(0, R + 1).indexOf(We) === -1; let P = Math.min(D, R + 1); for (; P <= D; P++) if (F[P - 1] === We) { R = P, R > 0 && C === !0 && R--; break; } if (P > D && F[R - 1] !== void 0 && F[R - 1] !== We) return _.leftReverse(V, D); V.setSelectionRange(R, R, "forward"); } }; function y(V) { t("click", V), s = void 0; } function w(V) { if (t("keydown", V), ea(V) === !0 || V.altKey === !0) return; const R = o.value, D = R.selectionStart, F = R.selectionEnd; if (V.shiftKey || (s = void 0), V.keyCode === 37 || V.keyCode === 39) { V.shiftKey && s === void 0 && (s = R.selectionDirection === "forward" ? D : F); const C = _[(V.keyCode === 39 ? "right" : "left") + (e.reverseFillMask === !0 ? "Reverse" : "")]; if (V.preventDefault(), C(R, s === D ? F : D), V.shiftKey) { const P = R.selectionStart; R.setSelectionRange(Math.min(s, P), Math.max(s, P), "forward"); } } else V.keyCode === 8 && e.reverseFillMask !== !0 && D === F ? (_.left(R, D), R.setSelectionRange(R.selectionStart, F, "backward")) : V.keyCode === 46 && e.reverseFillMask === !0 && D === F && (_.rightReverse(R, F), R.setSelectionRange(D, R.selectionEnd, "forward")); } function j(V, R) { if (V == null || V === "") return ""; if (e.reverseFillMask === !0) return L(V, R); const D = r; let F = 0, C = ""; for (let P = 0; P < D.length; P++) { const I = V[F], N = D[P]; if (typeof N == "string") C += N, R === !0 && I === N && F++; else if (I !== void 0 && N.regex.test(I)) C += N.transform !== void 0 ? N.transform(I) : I, F++; else return C; } return C; } function L(V, R) { const D = r, F = l.indexOf(We); let C = V.length - 1, P = ""; for (let I = D.length - 1; I >= 0 && C !== -1; I--) { const N = D[I]; let $ = V[C]; if (typeof N == "string") P = N + P, R === !0 && $ === N && C--; else if ($ !== void 0 && N.regex.test($)) do P = (N.transform !== void 0 ? N.transform($) : $) + P, C--, $ = V[C]; while (F === I && $ !== void 0 && N.regex.test($)); else return P; } return P; } function U(V) { return typeof V != "string" || i === void 0 ? typeof V == "number" ? i("" + V) : V : i(V); } function re(V) { return a.length - V.length <= 0 ? V : e.reverseFillMask === !0 && V.length !== 0 ? a.slice(0, -V.length) + V : V + a.slice(V.length); } return { innerValue: b, hasMask: m, moveCursorForPaste: M, updateMaskValue: T, onMaskedKeydown: w, onMaskedClick: y }; } const Vn = { name: String }; function ci(e) { return d(() => ({ type: "hidden", name: e.name, value: e.modelValue })); } function Ul(e = {}) { return (t, n, o) => { t[n]( v("input", { class: "hidden" + (o || ""), ...e.value }) ); }; } function di(e) { return d(() => e.name || e.for); } function $s(e, t) { function n() { const o = e.modelValue; try { const l = "DataTransfer" in window ? new DataTransfer() : "ClipboardEvent" in window ? new ClipboardEvent("").clipboardData : void 0; return Object(o) === o && ("length" in o ? Array.from(o) : [o]).forEach((a) => { l.items.add(a); }), { files: l.files }; } catch { return { files: void 0 }; } } return d(() => { if (e.type === "file") return n(); }); } const Ds = /[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/, Fs = /[\u4e00-\u9fff\u3400-\u4dbf\u{20000}-\u{2a6df}\u{2a700}-\u{2b73f}\u{2b740}-\u{2b81f}\u{2b820}-\u{2ceaf}\uf900-\ufaff\u3300-\u33ff\ufe30-\ufe4f\uf900-\ufaff\u{2f800}-\u{2fa1f}]/u, Hs = /[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/, js = /[a-z0-9_ -]$/i; function fi(e) { return function(n) { if (n.type === "compositionend" || n.type === "change") { if (n.target.qComposing !== !0) return; n.target.qComposing = !1, e(n); } else n.type === "compositionupdate" && n.target.qComposing !== !0 && typeof n.data == "string" && (tt.is.firefox === !