@ianicdev/datatables2 0.11.6 → 0.12.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.
Files changed (55) hide show
  1. package/dist/{Comparison-zf9wgAkk.cjs → Comparison-Cjz-f6QE.cjs} +1 -1
  2. package/dist/{Comparison-DL9ojj3w.js → Comparison-c7-5FHzt.js} +1 -1
  3. package/dist/{Datepicker-Duwv3zQB.js → Datepicker-D8R5O3nA.js} +514 -509
  4. package/dist/Datepicker-tYZiV7pL.cjs +2 -0
  5. package/dist/Options-BqEPdV4P.cjs +1 -0
  6. package/dist/Options-t9XPNKFJ.js +222 -0
  7. package/dist/{RefreshTable-Cc0I1PA5.cjs → RefreshTable-BK-a6F4w.cjs} +1 -1
  8. package/dist/{RefreshTable-Cn3y6Lyg.js → RefreshTable-BMZFOov3.js} +2 -2
  9. package/dist/{Search-BUb6ZctR.js → Search-CcSzJ7EN.js} +19 -19
  10. package/dist/Search-ggJbFRUZ.cjs +1 -0
  11. package/dist/{Table-DRC6dqmS.cjs → Table-Cd3b9yno.cjs} +1 -1
  12. package/dist/{Table-D5xj84Hx.js → Table-DFgbsnAr.js} +3 -3
  13. package/dist/{TableServer-BrktC88-.cjs → TableServer-CkRGzG9m.cjs} +1 -1
  14. package/dist/{TableServer-DGx2_VC7.js → TableServer-RGxAza7r.js} +3 -3
  15. package/dist/cellRender-BrYyjDR0.js +2363 -0
  16. package/dist/cellRender-yRAYLhMZ.cjs +1 -0
  17. package/dist/{dataTables-BEIZ1GFJ.js → dataTables-BwYZVAqY.js} +2339 -2167
  18. package/dist/dataTables-CT4H3tPX.cjs +4 -0
  19. package/dist/datatables.cjs +1 -1
  20. package/dist/datatables.js +1 -1
  21. package/dist/datatables2.css +1 -1
  22. package/dist/index-Bascl9Tm.cjs +1 -0
  23. package/dist/{index-A7VzNfop.js → index-Bra3YXTV.js} +2 -2
  24. package/dist/{index-Db7uKS4O.cjs → index-CI5-YbRX.cjs} +1 -1
  25. package/dist/{index-C9IAfraU.cjs → index-CLiQ28nF.cjs} +1 -1
  26. package/dist/{index-kEBJD9Uz.cjs → index-CRNAJrYh.cjs} +1 -1
  27. package/dist/{index-BfwTwETw.js → index-CWXBoVzR.js} +9 -9
  28. package/dist/{index-DdbT75rv.js → index-hM02sYDS.js} +2 -2
  29. package/dist/index-vAe2qE0y.js +4610 -0
  30. package/dist/{index.es-DB0V-0tm.js → index.es-BMrS5t0X.js} +1 -1
  31. package/dist/{index.es-DZnpWbiI.cjs → index.es-bmkO-qSm.cjs} +1 -1
  32. package/dist/{jspdf-BDAGZhm6.cjs → jspdf-BCsjByej.cjs} +24 -24
  33. package/dist/{jspdf-DpfxfImq.js → jspdf-BEHFm2qd.js} +480 -464
  34. package/dist/useColumns-GzXxHCN7.cjs +1 -0
  35. package/dist/{useColumns-Dmca5HPg.js → useColumns-qXPhS6kv.js} +303 -286
  36. package/dist/{useDownload-DVYhgsLa.js → useDownload-B9YtKO_M.js} +1 -1
  37. package/dist/{useDownload-YBEDFv5z.cjs → useDownload-CELkYaWd.cjs} +1 -1
  38. package/dist/useRefreshTable-B3JWG3uB.cjs +1 -0
  39. package/dist/useRefreshTable-C01Fva1U.js +17 -0
  40. package/lib/locale/de.js +9 -0
  41. package/lib/locale/el.js +9 -0
  42. package/lib/locale/en.js +8 -0
  43. package/package.json +5 -5
  44. package/dist/Datepicker-Dg15YseP.cjs +0 -2
  45. package/dist/Options-BE82c0Zz.cjs +0 -1
  46. package/dist/Options-CurNvolo.js +0 -108
  47. package/dist/Search-CvOD_IHr.cjs +0 -1
  48. package/dist/cellRender-DN6k6hHB.js +0 -2252
  49. package/dist/cellRender-DcK06KSn.cjs +0 -1
  50. package/dist/dataTables-DocfWkcv.cjs +0 -4
  51. package/dist/index-CqeIrUKn.cjs +0 -1
  52. package/dist/index-DIJYRSnI.js +0 -4482
  53. package/dist/useColumns-FMszZoTi.cjs +0 -1
  54. package/dist/useRefreshTable-BjtSww_t.cjs +0 -1
  55. package/dist/useRefreshTable-BoTF0YZF.js +0 -18
@@ -1,4482 +0,0 @@
1
- import { ref as W, inject as Pe, computed as w, toRef as T, shallowRef as J, watch as re, createVNode as f, normalizeStyle as Ie, normalizeClass as ce, createElementVNode as b, mergeProps as R, withDirectives as He, vShow as Ct, Fragment as de, toDisplayString as bt, useModel as Vt, openBlock as le, createBlock as ke, withCtx as xe, createElementBlock as ze, renderList as Lt, unref as N, mergeModels as Ht, useId as je, provide as Ue, onScopeDispose as nt, nextTick as Ve, onBeforeMount as dn, onBeforeUnmount as vn, onMounted as Ye, cloneVNode as fn, watchEffect as Rt, toValue as mn, createTextVNode as vl, defineAsyncComponent as Te, resolveDynamicComponent as Oe, isRef as pt, createCommentVNode as Re, defineComponent as fl } from "vue";
2
- import { defineStore as ml } from "pinia";
3
- import { u as xt, m as Mt, P as gl, c as Me, a as gn, e as yn, r as hn, g as oe, b as yl, d as hl, f as kt, I as at, h as ve, V as tl, i as Se, j as bn, p as j, k as be, l as bl, n as Be, o as pn, q as pe, s as Qe, t as zt, v as We, w as Ut, x as Ne, R as Je, y as Ze, z as Kt, A as It, B as jt, C as rt, D as kn, E as we, F as ll, G as pl, H as kl, J as Sl, K as Cl, L as Fe, M as Xe, N as Sn, O as Vl, Q as ct, S as Cn, T as Gt, U as dt, W as Wt, X as $e, Y as wt, Z as vt, _ as qt, $ as xl, a0 as Il, a1 as Jt, a2 as ft, a3 as wl, a4 as De, a5 as mt, a6 as ot, a7 as Ge, a8 as _l, a9 as Xt, aa as _t, ab as Pl, ac as Al, ad as Fl, ae as $t, af as Vn, ag as Dl, ah as xn, ai as In, aj as Tl, ak as lt, al as Bl, am as wn, an as nl, ao as gt, ap as El, aq as _n, ar as Pn, as as Ol, at as Rl, au as Yt, av as it, aw as An, ax as Le, ay as Ml, az as $l, aA as St, aB as Nl, aC as Fn, aD as Dn, aE as Tn, aF as Bn, aG as En, aH as al, aI as On, aJ as Rn, aK as Mn, aL as qe, aM as $n, aN as Nn, aO as Ln, aP as Hn } from "./dataTables-BEIZ1GFJ.js";
4
- import { useI18n as zn } from "vue-i18n";
5
- import { createSharedComposable as Un, useResizeObserver as Kn } from "@vueuse/core";
6
- const Pt = ml("datatables", () => {
7
- const e = W([]), a = ({ table_id: u }) => {
8
- const d = e.value.findIndex(
9
- (r) => r.id === u
10
- ), o = {
11
- search: {
12
- query: ""
13
- },
14
- advancedFilters: {
15
- query: {}
16
- },
17
- hardFilters: {
18
- query: {}
19
- },
20
- options: {
21
- hash: null,
22
- columns: {},
23
- state: {}
24
- }
25
- };
26
- d !== -1 && e.value.splice(d, 1), e.value.push({ id: u, ...o });
27
- }, t = async (u) => {
28
- const o = new TextEncoder().encode(u), r = await crypto.subtle.digest("SHA-256", o);
29
- return Array.from(new Uint8Array(r)).map((y) => y.toString(16).padStart(2, "0")).join("");
30
- }, n = ({ table_id: u, headers: d }) => {
31
- t(JSON.stringify(d ?? [])).then((o) => {
32
- l({ table_id: u, name: "options", value: { hash: o } });
33
- });
34
- }, l = ({ table_id: u, name: d, value: o }) => {
35
- e.value = e.value.map((r) => {
36
- if (r.id === u && r.hasOwnProperty(d)) {
37
- const m = r[d];
38
- if (m && typeof o == "object")
39
- for (const g in o)
40
- g in m && (m[g] = o[g]);
41
- }
42
- return r;
43
- });
44
- };
45
- return {
46
- // Store Data
47
- tables: e,
48
- // Store Methods
49
- addTable: a,
50
- setData: l,
51
- restoreData: ({ table_id: u, data: d }) => {
52
- e.value = e.value.map((o) => (o.id === u && (o = d), o));
53
- },
54
- getCurrentTable: (u) => e.value.find((d) => d.id === u),
55
- // Hash
56
- hashString: t,
57
- setTableHash: n
58
- };
59
- });
60
- function At() {
61
- const { setData: e, getCurrentTable: a } = Pt(), t = Pe("table_props"), n = w(() => a(t.id)), l = w(() => n.value.search?.query), i = w(() => {
62
- if (!t?.headers.length) return null;
63
- const d = n.value.options?.columns.selected ?? [];
64
- return (n.value.options?.columns.sorted ?? []).filter((m) => d.includes(m)).map(
65
- (m) => t.headers.find((g) => g.key === m)
66
- );
67
- }), c = w(() => n.value.hardFilters?.query), s = w(() => n.value.advancedFilters?.query);
68
- return {
69
- tableState: n,
70
- searchState: l,
71
- advancedFiltersState: s,
72
- hardFiltersState: c,
73
- headersState: i,
74
- saveTableOptions: (d) => {
75
- e({
76
- table_id: t.id,
77
- name: "options",
78
- value: {
79
- state: d
80
- }
81
- });
82
- }
83
- };
84
- }
85
- const jn = /* @__PURE__ */ Symbol.for("vuetify:goto");
86
- function Gn() {
87
- return {
88
- container: void 0,
89
- duration: 300,
90
- layout: !1,
91
- offset: 0,
92
- easing: "easeInOutCubic",
93
- patterns: yn
94
- };
95
- }
96
- function Wn(e) {
97
- return Qt(e) ?? (document.scrollingElement || document.body);
98
- }
99
- function Qt(e) {
100
- return typeof e == "string" ? document.querySelector(e) : hn(e);
101
- }
102
- function Bt(e, a, t) {
103
- if (typeof e == "number") return a && t ? -e : e;
104
- let n = Qt(e), l = 0;
105
- for (; n; )
106
- l += a ? n.offsetLeft : n.offsetTop, n = n.offsetParent;
107
- return l;
108
- }
109
- async function ol(e, a, t, n) {
110
- const l = t ? "scrollLeft" : "scrollTop", i = Mt(n?.options ?? Gn(), a), c = n?.rtl.value, s = (typeof e == "number" ? e : Qt(e)) ?? 0, u = i.container === "parent" && s instanceof HTMLElement ? s.parentElement : Wn(i.container), d = gl() ? i.patterns.instant : typeof i.easing == "function" ? i.easing : i.patterns[i.easing];
111
- if (!d) throw new TypeError(`Easing function "${i.easing}" not found.`);
112
- let o;
113
- if (typeof s == "number")
114
- o = Bt(s, t, c);
115
- else if (o = Bt(s, t, c) - Bt(u, t, c), i.layout) {
116
- const y = window.getComputedStyle(s).getPropertyValue("--v-layout-top");
117
- y && (o -= parseInt(y, 10));
118
- }
119
- o += i.offset, o = Jn(u, o, !!c, !!t);
120
- const r = u[l] ?? 0;
121
- if (o === r) return Promise.resolve(o);
122
- const m = performance.now();
123
- return new Promise((g) => requestAnimationFrame(function y(h) {
124
- const _ = (h - m) / i.duration, x = Math.floor(r + (o - r) * d(Me(_, 0, 1)));
125
- if (u[l] = x, _ >= 1 && Math.abs(x - u[l]) < 10)
126
- return g(o);
127
- if (_ > 2)
128
- return gn("Scroll target is not reachable"), g(u[l]);
129
- requestAnimationFrame(y);
130
- }));
131
- }
132
- function qn() {
133
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
134
- const a = Pe(jn), {
135
- isRtl: t
136
- } = xt();
137
- if (!a) throw new Error("[Vuetify] Could not find injected goto instance");
138
- const n = {
139
- ...a,
140
- // can be set via VLocaleProvider
141
- rtl: T(() => a.rtl.value || t.value)
142
- };
143
- async function l(i, c) {
144
- return ol(i, Mt(e, c), !1, n);
145
- }
146
- return l.horizontal = async (i, c) => ol(i, Mt(e, c), !0, n), l;
147
- }
148
- function Jn(e, a, t, n) {
149
- const {
150
- scrollWidth: l,
151
- scrollHeight: i
152
- } = e, [c, s] = e === document.scrollingElement ? [window.innerWidth, window.innerHeight] : [e.offsetWidth, e.offsetHeight];
153
- let u, d;
154
- return n ? t ? (u = -(l - c), d = 0) : (u = 0, d = l - c) : (u = 0, d = i + -s), Me(a, u, d);
155
- }
156
- function Xn(e) {
157
- let {
158
- selectedElement: a,
159
- containerElement: t,
160
- isRtl: n,
161
- isHorizontal: l
162
- } = e;
163
- const i = ut(l, t), c = Ll(l, n, t), s = ut(l, a), u = Hl(l, a), d = s * 0.4;
164
- return c > u ? u - d : c + i < u + s ? u - i + s + d : c;
165
- }
166
- function Yn(e) {
167
- let {
168
- selectedElement: a,
169
- containerElement: t,
170
- isHorizontal: n
171
- } = e;
172
- const l = ut(n, t), i = Hl(n, a), c = ut(n, a);
173
- return i - l / 2 + c / 2;
174
- }
175
- function il(e, a) {
176
- return a?.[e ? "scrollWidth" : "scrollHeight"] || 0;
177
- }
178
- function Qn(e, a) {
179
- return a?.[e ? "clientWidth" : "clientHeight"] || 0;
180
- }
181
- function Ll(e, a, t) {
182
- if (!t)
183
- return 0;
184
- const {
185
- scrollLeft: n,
186
- offsetWidth: l,
187
- scrollWidth: i
188
- } = t;
189
- return e ? a ? i - l + n : n : t.scrollTop;
190
- }
191
- function ut(e, a) {
192
- return a?.[e ? "offsetWidth" : "offsetHeight"] || 0;
193
- }
194
- function Hl(e, a) {
195
- return a?.[e ? "offsetLeft" : "offsetTop"] || 0;
196
- }
197
- const zl = /* @__PURE__ */ Symbol.for("vuetify:v-slide-group"), Ul = j({
198
- centerActive: Boolean,
199
- scrollToActive: {
200
- type: Boolean,
201
- default: !0
202
- },
203
- contentClass: null,
204
- direction: {
205
- type: String,
206
- default: "horizontal"
207
- },
208
- symbol: {
209
- type: null,
210
- default: zl
211
- },
212
- nextIcon: {
213
- type: be,
214
- default: "$next"
215
- },
216
- prevIcon: {
217
- type: be,
218
- default: "$prev"
219
- },
220
- showArrows: {
221
- type: [Boolean, String],
222
- validator: (e) => typeof e == "boolean" || ["always", "desktop", "mobile", "never"].includes(e)
223
- },
224
- ...pe(),
225
- ...pn({
226
- mobile: null
227
- }),
228
- ...Be(),
229
- ...bl({
230
- selectedClass: "v-slide-group-item--active"
231
- })
232
- }, "VSlideGroup"), ul = oe()({
233
- name: "VSlideGroup",
234
- props: Ul(),
235
- emits: {
236
- "update:modelValue": (e) => !0
237
- },
238
- setup(e, a) {
239
- let {
240
- slots: t
241
- } = a;
242
- const {
243
- isRtl: n
244
- } = xt(), {
245
- displayClasses: l,
246
- mobile: i
247
- } = yl(e), c = hl(e, e.symbol), s = J(!1), u = J(0), d = J(0), o = J(0), r = w(() => e.direction === "horizontal"), {
248
- resizeRef: m,
249
- contentRect: g
250
- } = kt(), {
251
- resizeRef: y,
252
- contentRect: h
253
- } = kt(), I = qn(), _ = w(() => ({
254
- container: m.el,
255
- duration: 200,
256
- easing: "easeOutQuart"
257
- })), x = w(() => c.selected.value.length ? c.items.value.findIndex((S) => S.id === c.selected.value[0]) : -1), k = w(() => c.selected.value.length ? c.items.value.findIndex((S) => S.id === c.selected.value[c.selected.value.length - 1]) : -1);
258
- if (at) {
259
- let S = -1;
260
- re(() => [c.selected.value, g.value, h.value, r.value], () => {
261
- cancelAnimationFrame(S), S = requestAnimationFrame(() => {
262
- if (g.value && h.value) {
263
- const v = r.value ? "width" : "height";
264
- d.value = g.value[v], o.value = h.value[v], s.value = d.value + 1 < o.value;
265
- }
266
- if (e.scrollToActive && x.value >= 0 && y.el) {
267
- const v = y.el.children[k.value];
268
- F(v, e.centerActive);
269
- }
270
- });
271
- });
272
- }
273
- const B = J(!1);
274
- function F(S, v) {
275
- let P = 0;
276
- v ? P = Yn({
277
- containerElement: m.el,
278
- isHorizontal: r.value,
279
- selectedElement: S
280
- }) : P = Xn({
281
- containerElement: m.el,
282
- isHorizontal: r.value,
283
- isRtl: n.value,
284
- selectedElement: S
285
- }), L(P);
286
- }
287
- function L(S) {
288
- if (!at || !m.el) return;
289
- const v = ut(r.value, m.el), P = Ll(r.value, n.value, m.el);
290
- if (!(il(r.value, m.el) <= v || // Prevent scrolling by only a couple of pixels, which doesn't look smooth
291
- Math.abs(S - P) < 16)) {
292
- if (r.value && n.value && m.el) {
293
- const {
294
- scrollWidth: $,
295
- offsetWidth: K
296
- } = m.el;
297
- S = $ - K - S;
298
- }
299
- r.value ? I.horizontal(S, _.value) : I(S, _.value);
300
- }
301
- }
302
- function A(S) {
303
- const {
304
- scrollTop: v,
305
- scrollLeft: P
306
- } = S.target;
307
- u.value = r.value ? P : v;
308
- }
309
- function p(S) {
310
- if (B.value = !0, !(!s.value || !y.el)) {
311
- for (const v of S.composedPath())
312
- for (const P of y.el.children)
313
- if (P === v) {
314
- F(P);
315
- return;
316
- }
317
- }
318
- }
319
- function M(S) {
320
- B.value = !1;
321
- }
322
- let E = !1;
323
- function q(S) {
324
- !E && !B.value && !(S.relatedTarget && y.el?.contains(S.relatedTarget)) && z(), E = !1;
325
- }
326
- function te() {
327
- E = !0;
328
- }
329
- function ee(S) {
330
- if (!y.el) return;
331
- function v(P) {
332
- S.preventDefault(), z(P);
333
- }
334
- r.value ? S.key === "ArrowRight" ? v(n.value ? "prev" : "next") : S.key === "ArrowLeft" && v(n.value ? "next" : "prev") : S.key === "ArrowDown" ? v("next") : S.key === "ArrowUp" && v("prev"), S.key === "Home" ? v("first") : S.key === "End" && v("last");
335
- }
336
- function U(S, v) {
337
- if (!S) return;
338
- let P = S;
339
- do
340
- P = P?.[v === "next" ? "nextElementSibling" : "previousElementSibling"];
341
- while (P?.hasAttribute("disabled"));
342
- return P;
343
- }
344
- function z(S) {
345
- if (!y.el) return;
346
- let v;
347
- if (!S)
348
- v = bn(y.el)[0];
349
- else if (S === "next") {
350
- if (v = U(y.el.querySelector(":focus"), S), !v) return z("first");
351
- } else if (S === "prev") {
352
- if (v = U(y.el.querySelector(":focus"), S), !v) return z("last");
353
- } else S === "first" ? (v = y.el.firstElementChild, v?.hasAttribute("disabled") && (v = U(v, "next"))) : S === "last" && (v = y.el.lastElementChild, v?.hasAttribute("disabled") && (v = U(v, "prev")));
354
- v && v.focus({
355
- preventScroll: !0
356
- });
357
- }
358
- function ie(S) {
359
- const v = r.value && n.value ? -1 : 1, P = (S === "prev" ? -v : v) * d.value;
360
- let V = u.value + P;
361
- if (r.value && n.value && m.el) {
362
- const {
363
- scrollWidth: $,
364
- offsetWidth: K
365
- } = m.el;
366
- V += $ - K;
367
- }
368
- L(V);
369
- }
370
- const G = w(() => ({
371
- next: c.next,
372
- prev: c.prev,
373
- select: c.select,
374
- isSelected: c.isSelected
375
- })), X = w(() => s.value || Math.abs(u.value) > 0), ne = w(() => {
376
- switch (e.showArrows) {
377
- case "never":
378
- return !1;
379
- // Always show arrows on desktop & mobile
380
- case "always":
381
- return !0;
382
- // Always show arrows on desktop
383
- case "desktop":
384
- return !i.value;
385
- // Show arrows on mobile when overflowing.
386
- // This matches the default 2.2 behavior
387
- case !0:
388
- return X.value;
389
- // Always show on mobile
390
- case "mobile":
391
- return i.value || X.value;
392
- // https://material.io/components/tabs#scrollable-tabs
393
- // Always show arrows when
394
- // overflowed on desktop
395
- default:
396
- return !i.value && X.value;
397
- }
398
- }), D = w(() => Math.abs(u.value) > 1), O = w(() => {
399
- if (!m.value || !X.value) return !1;
400
- const S = il(r.value, m.el), v = Qn(r.value, m.el);
401
- return S - v - Math.abs(u.value) > 1;
402
- });
403
- return ve(() => f(e.tag, {
404
- class: ce(["v-slide-group", {
405
- "v-slide-group--vertical": !r.value,
406
- "v-slide-group--has-affixes": ne.value,
407
- "v-slide-group--is-overflowing": s.value
408
- }, l.value, e.class]),
409
- style: Ie(e.style),
410
- tabindex: B.value || c.selected.value.length ? -1 : 0,
411
- onFocus: q
412
- }, {
413
- default: () => [ne.value && b("div", {
414
- key: "prev",
415
- class: ce(["v-slide-group__prev", {
416
- "v-slide-group__prev--disabled": !D.value
417
- }]),
418
- onMousedown: te,
419
- onClick: () => D.value && ie("prev")
420
- }, [t.prev?.(G.value) ?? f(tl, null, {
421
- default: () => [f(Se, {
422
- icon: n.value ? e.nextIcon : e.prevIcon
423
- }, null)]
424
- })]), b("div", {
425
- key: "container",
426
- ref: m,
427
- class: ce(["v-slide-group__container", e.contentClass]),
428
- onScroll: A
429
- }, [b("div", {
430
- ref: y,
431
- class: "v-slide-group__content",
432
- onFocusin: p,
433
- onFocusout: M,
434
- onKeydown: ee
435
- }, [t.default?.(G.value)])]), ne.value && b("div", {
436
- key: "next",
437
- class: ce(["v-slide-group__next", {
438
- "v-slide-group__next--disabled": !O.value
439
- }]),
440
- onMousedown: te,
441
- onClick: () => O.value && ie("next")
442
- }, [t.next?.(G.value) ?? f(tl, null, {
443
- default: () => [f(Se, {
444
- icon: n.value ? e.prevIcon : e.nextIcon
445
- }, null)]
446
- })])]
447
- })), {
448
- selected: c.selected,
449
- scrollTo: ie,
450
- scrollOffset: u,
451
- focus: z,
452
- hasPrev: D,
453
- hasNext: O
454
- };
455
- }
456
- }), Kl = /* @__PURE__ */ Symbol.for("vuetify:v-chip-group"), Zn = j({
457
- baseColor: String,
458
- column: Boolean,
459
- filter: Boolean,
460
- valueComparator: {
461
- type: Function,
462
- default: We
463
- },
464
- ...Ul({
465
- scrollToActive: !1
466
- }),
467
- ...pe(),
468
- ...bl({
469
- selectedClass: "v-chip--selected"
470
- }),
471
- ...Be(),
472
- ...Ne(),
473
- ...Ut({
474
- variant: "tonal"
475
- })
476
- }, "VChipGroup"), ea = oe()({
477
- name: "VChipGroup",
478
- props: Zn(),
479
- emits: {
480
- "update:modelValue": (e) => !0
481
- },
482
- setup(e, a) {
483
- let {
484
- slots: t
485
- } = a;
486
- const {
487
- themeClasses: n
488
- } = Qe(e), {
489
- isSelected: l,
490
- select: i,
491
- next: c,
492
- prev: s,
493
- selected: u
494
- } = hl(e, Kl);
495
- return zt({
496
- VChip: {
497
- baseColor: T(() => e.baseColor),
498
- color: T(() => e.color),
499
- disabled: T(() => e.disabled),
500
- filter: T(() => e.filter),
501
- variant: T(() => e.variant)
502
- }
503
- }), ve(() => {
504
- const d = ul.filterProps(e);
505
- return f(ul, R(d, {
506
- class: ["v-chip-group", {
507
- "v-chip-group--column": e.column
508
- }, n.value, e.class],
509
- style: e.style
510
- }), {
511
- default: () => [t.default?.({
512
- isSelected: l,
513
- select: i,
514
- next: c,
515
- prev: s,
516
- selected: u.value
517
- })]
518
- });
519
- }), {};
520
- }
521
- }), ta = j({
522
- activeClass: String,
523
- appendAvatar: String,
524
- appendIcon: be,
525
- baseColor: String,
526
- closable: Boolean,
527
- closeIcon: {
528
- type: be,
529
- default: "$delete"
530
- },
531
- closeLabel: {
532
- type: String,
533
- default: "$vuetify.close"
534
- },
535
- draggable: Boolean,
536
- filter: Boolean,
537
- filterIcon: {
538
- type: be,
539
- default: "$complete"
540
- },
541
- label: Boolean,
542
- link: {
543
- type: Boolean,
544
- default: void 0
545
- },
546
- pill: Boolean,
547
- prependAvatar: String,
548
- prependIcon: be,
549
- ripple: {
550
- type: [Boolean, Object],
551
- default: !0
552
- },
553
- text: {
554
- type: [String, Number, Boolean],
555
- default: void 0
556
- },
557
- modelValue: {
558
- type: Boolean,
559
- default: !0
560
- },
561
- onClick: $e(),
562
- onClickOnce: $e(),
563
- ...Wt(),
564
- ...pe(),
565
- ...dt(),
566
- ...Gt(),
567
- ...Cn(),
568
- ...ct(),
569
- ...Vl(),
570
- ...Sn(),
571
- ...Be({
572
- tag: "span"
573
- }),
574
- ...Ne(),
575
- ...Ut({
576
- variant: "tonal"
577
- })
578
- }, "VChip"), st = oe()({
579
- name: "VChip",
580
- directives: {
581
- vRipple: Je
582
- },
583
- props: ta(),
584
- emits: {
585
- "click:close": (e) => !0,
586
- "update:modelValue": (e) => !0,
587
- "group:selected": (e) => !0,
588
- click: (e) => !0
589
- },
590
- setup(e, a) {
591
- let {
592
- attrs: t,
593
- emit: n,
594
- slots: l
595
- } = a;
596
- const {
597
- t: i
598
- } = Ze(), {
599
- borderClasses: c
600
- } = Kt(e), {
601
- densityClasses: s
602
- } = It(e), {
603
- elevationClasses: u
604
- } = jt(e), {
605
- roundedClasses: d
606
- } = rt(e), {
607
- sizeClasses: o
608
- } = kn(e), {
609
- themeClasses: r
610
- } = Qe(e), m = we(e, "modelValue"), g = ll(e, Kl, !1), y = ll(e, zl, !1), h = pl(e, t), I = T(() => e.link !== !1 && h.isLink.value), _ = w(() => !e.disabled && e.link !== !1 && (!!g || e.link || h.isClickable.value)), x = T(() => ({
611
- "aria-label": i(e.closeLabel),
612
- disabled: e.disabled,
613
- onClick(p) {
614
- p.preventDefault(), p.stopPropagation(), m.value = !1, n("click:close", p);
615
- }
616
- }));
617
- re(m, (p) => {
618
- p ? (g?.register(), y?.register()) : (g?.unregister(), y?.unregister());
619
- });
620
- const {
621
- colorClasses: k,
622
- colorStyles: B,
623
- variantClasses: F
624
- } = kl(() => ({
625
- color: !g || g.isSelected.value ? e.color ?? e.baseColor : e.baseColor,
626
- variant: e.variant
627
- }));
628
- function L(p) {
629
- n("click", p), _.value && (h.navigate?.(p), g?.toggle());
630
- }
631
- function A(p) {
632
- (p.key === "Enter" || p.key === " ") && (p.preventDefault(), L(p));
633
- }
634
- return () => {
635
- const p = h.isLink.value ? "a" : e.tag, M = !!(e.appendIcon || e.appendAvatar), E = !!(M || l.append), q = !!(l.close || e.closable), te = !!(l.filter || e.filter) && g, ee = !!(e.prependIcon || e.prependAvatar), U = !!(ee || l.prepend);
636
- return m.value && He(f(p, R(h.linkProps, {
637
- class: ["v-chip", {
638
- "v-chip--disabled": e.disabled,
639
- "v-chip--label": e.label,
640
- "v-chip--link": _.value,
641
- "v-chip--filter": te,
642
- "v-chip--pill": e.pill,
643
- [`${e.activeClass}`]: e.activeClass && h.isActive?.value
644
- }, r.value, c.value, k.value, s.value, u.value, d.value, o.value, F.value, g?.selectedClass.value, e.class],
645
- style: [B.value, e.style],
646
- disabled: e.disabled || void 0,
647
- draggable: e.draggable,
648
- tabindex: _.value ? 0 : void 0,
649
- onClick: L,
650
- onKeydown: _.value && !I.value && A
651
- }), {
652
- default: () => [Sl(_.value, "v-chip"), te && f(Cl, {
653
- key: "filter"
654
- }, {
655
- default: () => [He(b("div", {
656
- class: "v-chip__filter"
657
- }, [l.filter ? f(Fe, {
658
- key: "filter-defaults",
659
- disabled: !e.filterIcon,
660
- defaults: {
661
- VIcon: {
662
- icon: e.filterIcon
663
- }
664
- }
665
- }, l.filter) : f(Se, {
666
- key: "filter-icon",
667
- icon: e.filterIcon
668
- }, null)]), [[Ct, g.isSelected.value]])]
669
- }), U && b("div", {
670
- key: "prepend",
671
- class: "v-chip__prepend"
672
- }, [l.prepend ? f(Fe, {
673
- key: "prepend-defaults",
674
- disabled: !ee,
675
- defaults: {
676
- VAvatar: {
677
- image: e.prependAvatar,
678
- start: !0
679
- },
680
- VIcon: {
681
- icon: e.prependIcon,
682
- start: !0
683
- }
684
- }
685
- }, l.prepend) : b(de, null, [e.prependIcon && f(Se, {
686
- key: "prepend-icon",
687
- icon: e.prependIcon,
688
- start: !0
689
- }, null), e.prependAvatar && f(Xe, {
690
- key: "prepend-avatar",
691
- image: e.prependAvatar,
692
- start: !0
693
- }, null)])]), b("div", {
694
- class: "v-chip__content",
695
- "data-no-activator": ""
696
- }, [l.default?.({
697
- isSelected: g?.isSelected.value,
698
- selectedClass: g?.selectedClass.value,
699
- select: g?.select,
700
- toggle: g?.toggle,
701
- value: g?.value.value,
702
- disabled: e.disabled
703
- }) ?? bt(e.text)]), E && b("div", {
704
- key: "append",
705
- class: "v-chip__append"
706
- }, [l.append ? f(Fe, {
707
- key: "append-defaults",
708
- disabled: !M,
709
- defaults: {
710
- VAvatar: {
711
- end: !0,
712
- image: e.appendAvatar
713
- },
714
- VIcon: {
715
- end: !0,
716
- icon: e.appendIcon
717
- }
718
- }
719
- }, l.append) : b(de, null, [e.appendIcon && f(Se, {
720
- key: "append-icon",
721
- end: !0,
722
- icon: e.appendIcon
723
- }, null), e.appendAvatar && f(Xe, {
724
- key: "append-avatar",
725
- end: !0,
726
- image: e.appendAvatar
727
- }, null)])]), q && b("button", R({
728
- key: "close",
729
- class: "v-chip__close",
730
- type: "button",
731
- "data-testid": "close-chip"
732
- }, x.value), [l.close ? f(Fe, {
733
- key: "close-defaults",
734
- defaults: {
735
- VIcon: {
736
- icon: e.closeIcon,
737
- size: "x-small"
738
- }
739
- }
740
- }, l.close) : f(Se, {
741
- key: "close-icon",
742
- icon: e.closeIcon,
743
- size: "x-small"
744
- }, null)])]
745
- }), [[Je, _.value && e.ripple, null]]);
746
- };
747
- }
748
- }), la = j({
749
- color: String,
750
- ...Wt(),
751
- ...pe(),
752
- ...ft(),
753
- ...Gt(),
754
- ...Jt(),
755
- ...Il(),
756
- ...ct(),
757
- ...Be(),
758
- ...Ne()
759
- }, "VSheet"), na = oe()({
760
- name: "VSheet",
761
- props: la(),
762
- setup(e, a) {
763
- let {
764
- slots: t
765
- } = a;
766
- const {
767
- themeClasses: n
768
- } = Qe(e), {
769
- backgroundColorClasses: l,
770
- backgroundColorStyles: i
771
- } = wt(() => e.color), {
772
- borderClasses: c
773
- } = Kt(e), {
774
- dimensionStyles: s
775
- } = vt(e), {
776
- elevationClasses: u
777
- } = jt(e), {
778
- locationStyles: d
779
- } = qt(e), {
780
- positionClasses: o
781
- } = xl(e), {
782
- roundedClasses: r
783
- } = rt(e);
784
- return ve(() => f(e.tag, {
785
- class: ce(["v-sheet", n.value, l.value, c.value, u.value, o.value, r.value, e.class]),
786
- style: Ie([i.value, s.value, d.value, e.style])
787
- }, t)), {};
788
- }
789
- }), aa = {
790
- __name: "Selected",
791
- props: {
792
- modelValue: {},
793
- modelModifiers: {}
794
- },
795
- emits: /* @__PURE__ */ Ht("save", ["update:modelValue"]),
796
- setup(e, { emit: a }) {
797
- const { advancedFiltersState: t } = At(), n = Pe("table_props"), l = Vt(e, "modelValue"), i = (u, d) => {
798
- const o = n.headers.find((y) => (y.advancedFilter?.key ?? y.key) === d), r = u.comparison === "=" ? ":" : " " + u.comparison, m = Array.isArray(u.value) ? u.value : [u.value], g = m.filter((y, h) => !(o.advancedFilter?.component === "datepicker" && h !== 0 && h !== m.length - 1)).map((y) => {
799
- const h = o.advancedFilter?.options?.items ?? [];
800
- let I = y, _;
801
- return h.length && (_ = h.find((x) => x.value === y), _ && (I = _.title)), typeof o.advancedFilter?.valueFormatter == "function" && (I = o.advancedFilter.valueFormatter({
802
- item: _,
803
- value: y
804
- })), I;
805
- });
806
- return `${o.title}${r} ${g.join(", ")}`;
807
- }, c = (u) => {
808
- l.value[u] = { comparison: "=", value: null }, s("save");
809
- }, s = a;
810
- return (u, d) => (le(), ke(na, null, {
811
- default: xe(() => [
812
- f(ea, null, {
813
- default: xe(() => [
814
- (le(!0), ze(de, null, Lt(N(t), (o, r) => (le(), ke(st, {
815
- key: r,
816
- class: "my-0",
817
- text: i(o, r),
818
- closable: "",
819
- value: o,
820
- density: "comfortable",
821
- "onClick:close": (m) => c(r)
822
- }, null, 8, ["text", "value", "onClick:close"]))), 128))
823
- ]),
824
- _: 1
825
- })
826
- ]),
827
- _: 1
828
- }));
829
- }
830
- }, oa = j({
831
- text: String,
832
- onClick: $e(),
833
- ...pe(),
834
- ...Ne()
835
- }, "VLabel"), jl = oe()({
836
- name: "VLabel",
837
- props: oa(),
838
- setup(e, a) {
839
- let {
840
- slots: t
841
- } = a;
842
- return ve(() => b("label", {
843
- class: ce(["v-label", {
844
- "v-label--clickable": !!e.onClick
845
- }, e.class]),
846
- style: Ie(e.style),
847
- onClick: e.onClick
848
- }, [e.text, t.default?.()])), {};
849
- }
850
- }), Gl = /* @__PURE__ */ Symbol.for("vuetify:selection-control-group"), Wl = j({
851
- color: String,
852
- disabled: {
853
- type: Boolean,
854
- default: null
855
- },
856
- defaultsTarget: String,
857
- error: Boolean,
858
- id: String,
859
- inline: Boolean,
860
- falseIcon: be,
861
- trueIcon: be,
862
- ripple: {
863
- type: [Boolean, Object],
864
- default: !0
865
- },
866
- multiple: {
867
- type: Boolean,
868
- default: null
869
- },
870
- name: String,
871
- readonly: {
872
- type: Boolean,
873
- default: null
874
- },
875
- modelValue: null,
876
- type: String,
877
- valueComparator: {
878
- type: Function,
879
- default: We
880
- },
881
- ...pe(),
882
- ...dt(),
883
- ...Ne()
884
- }, "SelectionControlGroup"), ia = j({
885
- ...Wl({
886
- defaultsTarget: "VSelectionControl"
887
- })
888
- }, "VSelectionControlGroup");
889
- oe()({
890
- name: "VSelectionControlGroup",
891
- props: ia(),
892
- emits: {
893
- "update:modelValue": (e) => !0
894
- },
895
- setup(e, a) {
896
- let {
897
- slots: t
898
- } = a;
899
- const n = we(e, "modelValue"), l = je(), i = T(() => e.id || `v-selection-control-group-${l}`), c = T(() => e.name || i.value), s = /* @__PURE__ */ new Set();
900
- return Ue(Gl, {
901
- modelValue: n,
902
- forceUpdate: () => {
903
- s.forEach((u) => u());
904
- },
905
- onForceUpdate: (u) => {
906
- s.add(u), nt(() => {
907
- s.delete(u);
908
- });
909
- }
910
- }), zt({
911
- [e.defaultsTarget]: {
912
- color: T(() => e.color),
913
- disabled: T(() => e.disabled),
914
- density: T(() => e.density),
915
- error: T(() => e.error),
916
- inline: T(() => e.inline),
917
- modelValue: n,
918
- multiple: T(() => !!e.multiple || e.multiple == null && Array.isArray(n.value)),
919
- name: c,
920
- falseIcon: T(() => e.falseIcon),
921
- trueIcon: T(() => e.trueIcon),
922
- readonly: T(() => e.readonly),
923
- ripple: T(() => e.ripple),
924
- type: T(() => e.type),
925
- valueComparator: T(() => e.valueComparator)
926
- }
927
- }), ve(() => b("div", {
928
- class: ce(["v-selection-control-group", {
929
- "v-selection-control-group--inline": e.inline
930
- }, e.class]),
931
- style: Ie(e.style),
932
- role: e.type === "radio" ? "radiogroup" : void 0
933
- }, [t.default?.()])), {};
934
- }
935
- });
936
- const ql = j({
937
- label: String,
938
- baseColor: String,
939
- trueValue: null,
940
- falseValue: null,
941
- value: null,
942
- ...pe(),
943
- ...Wl()
944
- }, "VSelectionControl");
945
- function ua(e) {
946
- const a = Pe(Gl, void 0), {
947
- densityClasses: t
948
- } = It(e), n = we(e, "modelValue"), l = w(() => e.trueValue !== void 0 ? e.trueValue : e.value !== void 0 ? e.value : !0), i = w(() => e.falseValue !== void 0 ? e.falseValue : !1), c = w(() => !!e.multiple || e.multiple == null && Array.isArray(n.value)), s = w({
949
- get() {
950
- const g = a ? a.modelValue.value : n.value;
951
- return c.value ? De(g).some((y) => e.valueComparator(y, l.value)) : e.valueComparator(g, l.value);
952
- },
953
- set(g) {
954
- if (e.readonly) return;
955
- const y = g ? l.value : i.value;
956
- let h = y;
957
- c.value && (h = g ? [...De(n.value), y] : De(n.value).filter((I) => !e.valueComparator(I, l.value))), a ? a.modelValue.value = h : n.value = h;
958
- }
959
- }), {
960
- textColorClasses: u,
961
- textColorStyles: d
962
- } = mt(() => {
963
- if (!(e.error || e.disabled))
964
- return s.value ? e.color : e.baseColor;
965
- }), {
966
- backgroundColorClasses: o,
967
- backgroundColorStyles: r
968
- } = wt(() => s.value && !e.error && !e.disabled ? e.color : e.baseColor), m = w(() => s.value ? e.trueIcon : e.falseIcon);
969
- return {
970
- group: a,
971
- densityClasses: t,
972
- trueValue: l,
973
- falseValue: i,
974
- model: s,
975
- textColorClasses: u,
976
- textColorStyles: d,
977
- backgroundColorClasses: o,
978
- backgroundColorStyles: r,
979
- icon: m
980
- };
981
- }
982
- const sl = oe()({
983
- name: "VSelectionControl",
984
- directives: {
985
- vRipple: Je
986
- },
987
- inheritAttrs: !1,
988
- props: ql(),
989
- emits: {
990
- "update:modelValue": (e) => !0
991
- },
992
- setup(e, a) {
993
- let {
994
- attrs: t,
995
- slots: n
996
- } = a;
997
- const {
998
- group: l,
999
- densityClasses: i,
1000
- icon: c,
1001
- model: s,
1002
- textColorClasses: u,
1003
- textColorStyles: d,
1004
- backgroundColorClasses: o,
1005
- backgroundColorStyles: r,
1006
- trueValue: m
1007
- } = ua(e), g = je(), y = J(!1), h = J(!1), I = W(), _ = T(() => e.id || `input-${g}`), x = T(() => !e.disabled && !e.readonly);
1008
- l?.onForceUpdate(() => {
1009
- I.value && (I.value.checked = s.value);
1010
- });
1011
- function k(A) {
1012
- x.value && (y.value = !0, ot(A.target, ":focus-visible") !== !1 && (h.value = !0));
1013
- }
1014
- function B() {
1015
- y.value = !1, h.value = !1;
1016
- }
1017
- function F(A) {
1018
- A.stopPropagation();
1019
- }
1020
- function L(A) {
1021
- if (!x.value) {
1022
- I.value && (I.value.checked = s.value);
1023
- return;
1024
- }
1025
- e.readonly && l && Ve(() => l.forceUpdate()), s.value = A.target.checked;
1026
- }
1027
- return ve(() => {
1028
- const A = n.label ? n.label({
1029
- label: e.label,
1030
- props: {
1031
- for: _.value
1032
- }
1033
- }) : e.label, [p, M] = wl(t), E = b("input", R({
1034
- ref: I,
1035
- checked: s.value,
1036
- disabled: !!e.disabled,
1037
- id: _.value,
1038
- onBlur: B,
1039
- onFocus: k,
1040
- onInput: L,
1041
- "aria-disabled": !!e.disabled,
1042
- "aria-label": e.label,
1043
- type: e.type,
1044
- value: m.value,
1045
- name: e.name,
1046
- "aria-checked": e.type === "checkbox" ? s.value : void 0
1047
- }, M), null);
1048
- return b("div", R({
1049
- class: ["v-selection-control", {
1050
- "v-selection-control--dirty": s.value,
1051
- "v-selection-control--disabled": e.disabled,
1052
- "v-selection-control--error": e.error,
1053
- "v-selection-control--focused": y.value,
1054
- "v-selection-control--focus-visible": h.value,
1055
- "v-selection-control--inline": e.inline
1056
- }, i.value, e.class]
1057
- }, p, {
1058
- style: e.style
1059
- }), [b("div", {
1060
- class: ce(["v-selection-control__wrapper", u.value]),
1061
- style: Ie(d.value)
1062
- }, [n.default?.({
1063
- backgroundColorClasses: o,
1064
- backgroundColorStyles: r
1065
- }), He(b("div", {
1066
- class: ce(["v-selection-control__input"])
1067
- }, [n.input?.({
1068
- model: s,
1069
- textColorClasses: u,
1070
- textColorStyles: d,
1071
- backgroundColorClasses: o,
1072
- backgroundColorStyles: r,
1073
- inputNode: E,
1074
- icon: c.value,
1075
- props: {
1076
- onFocus: k,
1077
- onBlur: B,
1078
- id: _.value
1079
- }
1080
- }) ?? b(de, null, [c.value && f(Se, {
1081
- key: "icon",
1082
- icon: c.value
1083
- }, null), E])]), [[Je, !e.disabled && !e.readonly && e.ripple, null, {
1084
- center: !0,
1085
- circle: !0
1086
- }]])]), A && f(jl, {
1087
- for: _.value,
1088
- onClick: F
1089
- }, {
1090
- default: () => [A]
1091
- })]);
1092
- }), {
1093
- isFocused: y,
1094
- input: I
1095
- };
1096
- }
1097
- }), sa = j({
1098
- indeterminate: Boolean,
1099
- indeterminateIcon: {
1100
- type: be,
1101
- default: "$checkboxIndeterminate"
1102
- },
1103
- ...ql({
1104
- falseIcon: "$checkboxOff",
1105
- trueIcon: "$checkboxOn"
1106
- })
1107
- }, "VCheckboxBtn"), Jl = oe()({
1108
- name: "VCheckboxBtn",
1109
- props: sa(),
1110
- emits: {
1111
- "update:modelValue": (e) => !0,
1112
- "update:indeterminate": (e) => !0
1113
- },
1114
- setup(e, a) {
1115
- let {
1116
- slots: t
1117
- } = a;
1118
- const n = we(e, "indeterminate"), l = we(e, "modelValue");
1119
- function i(u) {
1120
- n.value && (n.value = !1);
1121
- }
1122
- const c = T(() => n.value ? e.indeterminateIcon : e.falseIcon), s = T(() => n.value ? e.indeterminateIcon : e.trueIcon);
1123
- return ve(() => {
1124
- const u = Ge(sl.filterProps(e), ["modelValue"]);
1125
- return f(sl, R(u, {
1126
- modelValue: l.value,
1127
- "onUpdate:modelValue": [(d) => l.value = d, i],
1128
- class: ["v-checkbox-btn", e.class],
1129
- style: e.style,
1130
- type: "checkbox",
1131
- falseIcon: c.value,
1132
- trueIcon: s.value,
1133
- "aria-checked": n.value ? "mixed" : void 0
1134
- }), t);
1135
- }), {};
1136
- }
1137
- });
1138
- function Ft(e) {
1139
- const {
1140
- t: a
1141
- } = Ze();
1142
- function t(n) {
1143
- let {
1144
- name: l,
1145
- color: i,
1146
- ...c
1147
- } = n;
1148
- const s = {
1149
- prepend: "prependAction",
1150
- prependInner: "prependAction",
1151
- append: "appendAction",
1152
- appendInner: "appendAction",
1153
- clear: "clear"
1154
- }[l], u = e[`onClick:${l}`];
1155
- function d(r) {
1156
- r.key !== "Enter" && r.key !== " " || (r.preventDefault(), r.stopPropagation(), _l(u, new PointerEvent("click", r)));
1157
- }
1158
- const o = u && s ? a(`$vuetify.input.${s}`, e.label ?? "") : void 0;
1159
- return f(Se, R({
1160
- icon: e[`${l}Icon`],
1161
- "aria-label": o,
1162
- onClick: u,
1163
- onKeydown: d,
1164
- color: i
1165
- }, c), null);
1166
- }
1167
- return {
1168
- InputIcon: t
1169
- };
1170
- }
1171
- const ra = j({
1172
- active: Boolean,
1173
- color: String,
1174
- messages: {
1175
- type: [Array, String],
1176
- default: () => []
1177
- },
1178
- ...pe(),
1179
- ..._t({
1180
- transition: {
1181
- component: Pl,
1182
- leaveAbsolute: !0,
1183
- group: !0
1184
- }
1185
- })
1186
- }, "VMessages"), ca = oe()({
1187
- name: "VMessages",
1188
- props: ra(),
1189
- setup(e, a) {
1190
- let {
1191
- slots: t
1192
- } = a;
1193
- const n = w(() => De(e.messages)), {
1194
- textColorClasses: l,
1195
- textColorStyles: i
1196
- } = mt(() => e.color);
1197
- return ve(() => f(Xt, {
1198
- transition: e.transition,
1199
- tag: "div",
1200
- class: ce(["v-messages", l.value, e.class]),
1201
- style: Ie([i.value, e.style])
1202
- }, {
1203
- default: () => [e.active && n.value.map((c, s) => b("div", {
1204
- class: "v-messages__message",
1205
- key: `${s}-${n.value}`
1206
- }, [t.message ? t.message({
1207
- message: c
1208
- }) : c]))]
1209
- })), {};
1210
- }
1211
- }), Xl = j({
1212
- focused: Boolean,
1213
- "onUpdate:focused": $e()
1214
- }, "focus");
1215
- function Yl(e) {
1216
- let a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Al();
1217
- const t = we(e, "focused"), n = T(() => ({
1218
- [`${a}--focused`]: t.value
1219
- }));
1220
- function l() {
1221
- t.value = !0;
1222
- }
1223
- function i() {
1224
- t.value = !1;
1225
- }
1226
- return {
1227
- focusClasses: n,
1228
- isFocused: t,
1229
- focus: l,
1230
- blur: i
1231
- };
1232
- }
1233
- const da = /* @__PURE__ */ Symbol.for("vuetify:form");
1234
- function Dt(e) {
1235
- const a = Pe(da, null);
1236
- return {
1237
- ...a,
1238
- isReadonly: w(() => !!(e?.readonly ?? a?.isReadonly.value)),
1239
- isDisabled: w(() => !!(e?.disabled ?? a?.isDisabled.value))
1240
- };
1241
- }
1242
- const va = /* @__PURE__ */ Symbol.for("vuetify:rules");
1243
- function fa(e) {
1244
- const a = Pe(va, null);
1245
- if (!e) {
1246
- if (!a)
1247
- throw new Error("Could not find Vuetify rules injection");
1248
- return a.aliases;
1249
- }
1250
- return a?.resolve(e) ?? T(e);
1251
- }
1252
- const ma = j({
1253
- disabled: {
1254
- type: Boolean,
1255
- default: null
1256
- },
1257
- error: Boolean,
1258
- errorMessages: {
1259
- type: [Array, String],
1260
- default: () => []
1261
- },
1262
- maxErrors: {
1263
- type: [Number, String],
1264
- default: 1
1265
- },
1266
- name: String,
1267
- label: String,
1268
- readonly: {
1269
- type: Boolean,
1270
- default: null
1271
- },
1272
- rules: {
1273
- type: Array,
1274
- default: () => []
1275
- },
1276
- modelValue: null,
1277
- validateOn: String,
1278
- validationValue: null,
1279
- ...Xl()
1280
- }, "validation");
1281
- function ga(e) {
1282
- let a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Al(), t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : je();
1283
- const n = we(e, "modelValue"), l = w(() => e.validationValue === void 0 ? n.value : e.validationValue), i = Dt(e), c = fa(() => e.rules), s = W([]), u = J(!0), d = w(() => !!(De(n.value === "" ? null : n.value).length || De(l.value === "" ? null : l.value).length)), o = w(() => e.errorMessages?.length ? De(e.errorMessages).concat(s.value).slice(0, Math.max(0, Number(e.maxErrors))) : s.value), r = w(() => {
1284
- let B = (e.validateOn ?? i.validateOn?.value) || "input";
1285
- B === "lazy" && (B = "input lazy"), B === "eager" && (B = "input eager");
1286
- const F = new Set(B?.split(" ") ?? []);
1287
- return {
1288
- input: F.has("input"),
1289
- blur: F.has("blur") || F.has("input") || F.has("invalid-input"),
1290
- invalidInput: F.has("invalid-input"),
1291
- lazy: F.has("lazy"),
1292
- eager: F.has("eager")
1293
- };
1294
- }), m = w(() => e.error || e.errorMessages?.length ? !1 : e.rules.length ? u.value ? s.value.length || r.value.lazy ? null : !0 : !s.value.length : !0), g = J(!1), y = w(() => ({
1295
- [`${a}--error`]: m.value === !1,
1296
- [`${a}--dirty`]: d.value,
1297
- [`${a}--disabled`]: i.isDisabled.value,
1298
- [`${a}--readonly`]: i.isReadonly.value
1299
- })), h = Fl("validation"), I = w(() => e.name ?? N(t));
1300
- dn(() => {
1301
- i.register?.({
1302
- id: I.value,
1303
- vm: h,
1304
- validate: k,
1305
- reset: _,
1306
- resetValidation: x
1307
- });
1308
- }), vn(() => {
1309
- i.unregister?.(I.value);
1310
- }), Ye(async () => {
1311
- r.value.lazy || await k(!r.value.eager), i.update?.(I.value, m.value, o.value);
1312
- }), $t(() => r.value.input || r.value.invalidInput && m.value === !1, () => {
1313
- re(l, () => {
1314
- if (l.value != null)
1315
- k();
1316
- else if (e.focused) {
1317
- const B = re(() => e.focused, (F) => {
1318
- F || k(), B();
1319
- });
1320
- }
1321
- });
1322
- }), $t(() => r.value.blur, () => {
1323
- re(() => e.focused, (B) => {
1324
- B || k();
1325
- });
1326
- }), re([m, o], () => {
1327
- i.update?.(I.value, m.value, o.value);
1328
- });
1329
- async function _() {
1330
- n.value = null, await Ve(), await x();
1331
- }
1332
- async function x() {
1333
- u.value = !0, r.value.lazy ? s.value = [] : await k(!r.value.eager);
1334
- }
1335
- async function k() {
1336
- let B = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
1337
- const F = [];
1338
- g.value = !0;
1339
- for (const L of c.value) {
1340
- if (F.length >= Number(e.maxErrors ?? 1))
1341
- break;
1342
- const p = await (typeof L == "function" ? L : () => L)(l.value);
1343
- if (p !== !0) {
1344
- if (p !== !1 && typeof p != "string") {
1345
- console.warn(`${p} is not a valid value. Rule functions must return boolean true or a string.`);
1346
- continue;
1347
- }
1348
- F.push(p || "");
1349
- }
1350
- }
1351
- return s.value = F, g.value = !1, u.value = B, s.value;
1352
- }
1353
- return {
1354
- errorMessages: o,
1355
- isDirty: d,
1356
- isDisabled: i.isDisabled,
1357
- isReadonly: i.isReadonly,
1358
- isPristine: u,
1359
- isValid: m,
1360
- isValidating: g,
1361
- reset: _,
1362
- resetValidation: x,
1363
- validate: k,
1364
- validationClasses: y
1365
- };
1366
- }
1367
- const Ql = j({
1368
- id: String,
1369
- appendIcon: be,
1370
- baseColor: String,
1371
- centerAffix: {
1372
- type: Boolean,
1373
- default: !0
1374
- },
1375
- color: String,
1376
- glow: Boolean,
1377
- iconColor: [Boolean, String],
1378
- prependIcon: be,
1379
- hideDetails: [Boolean, String],
1380
- hideSpinButtons: Boolean,
1381
- hint: String,
1382
- persistentHint: Boolean,
1383
- messages: {
1384
- type: [Array, String],
1385
- default: () => []
1386
- },
1387
- direction: {
1388
- type: String,
1389
- default: "horizontal",
1390
- validator: (e) => ["horizontal", "vertical"].includes(e)
1391
- },
1392
- "onClick:prepend": $e(),
1393
- "onClick:append": $e(),
1394
- ...pe(),
1395
- ...dt(),
1396
- ...Vn(ft(), ["maxWidth", "minWidth", "width"]),
1397
- ...Ne(),
1398
- ...ma()
1399
- }, "VInput"), rl = oe()({
1400
- name: "VInput",
1401
- props: {
1402
- ...Ql()
1403
- },
1404
- emits: {
1405
- "update:modelValue": (e) => !0
1406
- },
1407
- setup(e, a) {
1408
- let {
1409
- attrs: t,
1410
- slots: n,
1411
- emit: l
1412
- } = a;
1413
- const {
1414
- densityClasses: i
1415
- } = It(e), {
1416
- dimensionStyles: c
1417
- } = vt(e), {
1418
- themeClasses: s
1419
- } = Qe(e), {
1420
- rtlClasses: u
1421
- } = xt(), {
1422
- InputIcon: d
1423
- } = Ft(e), o = je(), r = w(() => e.id || `input-${o}`), {
1424
- errorMessages: m,
1425
- isDirty: g,
1426
- isDisabled: y,
1427
- isReadonly: h,
1428
- isPristine: I,
1429
- isValid: _,
1430
- isValidating: x,
1431
- reset: k,
1432
- resetValidation: B,
1433
- validate: F,
1434
- validationClasses: L
1435
- } = ga(e, "v-input", r), A = w(() => e.errorMessages?.length || !I.value && m.value.length ? m.value : e.hint && (e.persistentHint || e.focused) ? e.hint : e.messages), p = T(() => A.value.length > 0), M = T(() => !e.hideDetails || e.hideDetails === "auto" && (p.value || !!n.details)), E = w(() => M.value ? `${r.value}-messages` : void 0), q = w(() => ({
1436
- id: r,
1437
- messagesId: E,
1438
- isDirty: g,
1439
- isDisabled: y,
1440
- isReadonly: h,
1441
- isPristine: I,
1442
- isValid: _,
1443
- isValidating: x,
1444
- hasDetails: M,
1445
- reset: k,
1446
- resetValidation: B,
1447
- validate: F
1448
- })), te = T(() => e.error || e.disabled ? void 0 : e.focused ? e.color : e.baseColor), ee = T(() => {
1449
- if (e.iconColor)
1450
- return e.iconColor === !0 ? te.value : e.iconColor;
1451
- });
1452
- return ve(() => {
1453
- const U = !!(n.prepend || e.prependIcon), z = !!(n.append || e.appendIcon);
1454
- return b("div", {
1455
- class: ce(["v-input", `v-input--${e.direction}`, {
1456
- "v-input--center-affix": e.centerAffix,
1457
- "v-input--focused": e.focused,
1458
- "v-input--glow": e.glow,
1459
- "v-input--hide-spin-buttons": e.hideSpinButtons
1460
- }, i.value, s.value, u.value, L.value, e.class]),
1461
- style: Ie([c.value, e.style])
1462
- }, [U && b("div", {
1463
- key: "prepend",
1464
- class: "v-input__prepend"
1465
- }, [n.prepend ? n.prepend(q.value) : e.prependIcon && f(d, {
1466
- key: "prepend-icon",
1467
- name: "prepend",
1468
- color: ee.value
1469
- }, null)]), n.default && b("div", {
1470
- class: "v-input__control"
1471
- }, [n.default?.(q.value)]), z && b("div", {
1472
- key: "append",
1473
- class: "v-input__append"
1474
- }, [n.append ? n.append(q.value) : e.appendIcon && f(d, {
1475
- key: "append-icon",
1476
- name: "append",
1477
- color: ee.value
1478
- }, null)]), M.value && b("div", {
1479
- id: E.value,
1480
- class: "v-input__details",
1481
- role: "alert",
1482
- "aria-live": "polite"
1483
- }, [f(ca, {
1484
- active: p.value,
1485
- messages: A.value
1486
- }, {
1487
- message: n.message
1488
- }), n.details?.(q.value)])]);
1489
- }), {
1490
- reset: k,
1491
- resetValidation: B,
1492
- validate: F,
1493
- isValid: _,
1494
- errorMessages: m
1495
- };
1496
- }
1497
- }), ya = j({
1498
- active: Boolean,
1499
- disabled: Boolean,
1500
- max: [Number, String],
1501
- value: {
1502
- type: [Number, String],
1503
- default: 0
1504
- },
1505
- ...pe(),
1506
- ..._t({
1507
- transition: {
1508
- component: Pl
1509
- }
1510
- })
1511
- }, "VCounter"), ha = oe()({
1512
- name: "VCounter",
1513
- functional: !0,
1514
- props: ya(),
1515
- setup(e, a) {
1516
- let {
1517
- slots: t
1518
- } = a;
1519
- const n = T(() => e.max ? `${e.value} / ${e.max}` : String(e.value));
1520
- return ve(() => f(Xt, {
1521
- transition: e.transition
1522
- }, {
1523
- default: () => [He(b("div", {
1524
- class: ce(["v-counter", {
1525
- "text-error": e.max && !e.disabled && parseFloat(e.value) > parseFloat(e.max)
1526
- }, e.class]),
1527
- style: Ie(e.style)
1528
- }, [t.default ? t.default({
1529
- counter: n.value,
1530
- max: e.max,
1531
- value: e.value
1532
- }) : n.value]), [[Ct, e.active]])]
1533
- })), {};
1534
- }
1535
- }), ba = j({
1536
- floating: Boolean,
1537
- ...pe()
1538
- }, "VFieldLabel"), ht = oe()({
1539
- name: "VFieldLabel",
1540
- props: ba(),
1541
- setup(e, a) {
1542
- let {
1543
- slots: t
1544
- } = a;
1545
- return ve(() => f(jl, {
1546
- class: ce(["v-field-label", {
1547
- "v-field-label--floating": e.floating
1548
- }, e.class]),
1549
- style: Ie(e.style)
1550
- }, t)), {};
1551
- }
1552
- }), pa = ["underlined", "outlined", "filled", "solo", "solo-inverted", "solo-filled", "plain"], Zl = j({
1553
- appendInnerIcon: be,
1554
- bgColor: String,
1555
- clearable: Boolean,
1556
- clearIcon: {
1557
- type: be,
1558
- default: "$clear"
1559
- },
1560
- active: Boolean,
1561
- centerAffix: {
1562
- type: Boolean,
1563
- default: void 0
1564
- },
1565
- color: String,
1566
- baseColor: String,
1567
- dirty: Boolean,
1568
- disabled: {
1569
- type: Boolean,
1570
- default: null
1571
- },
1572
- glow: Boolean,
1573
- error: Boolean,
1574
- flat: Boolean,
1575
- iconColor: [Boolean, String],
1576
- label: String,
1577
- persistentClear: Boolean,
1578
- prependInnerIcon: be,
1579
- reverse: Boolean,
1580
- singleLine: Boolean,
1581
- variant: {
1582
- type: String,
1583
- default: "filled",
1584
- validator: (e) => pa.includes(e)
1585
- },
1586
- "onClick:clear": $e(),
1587
- "onClick:appendInner": $e(),
1588
- "onClick:prependInner": $e(),
1589
- ...pe(),
1590
- ...Bl(),
1591
- ...ct(),
1592
- ...Ne()
1593
- }, "VField"), cl = oe()({
1594
- name: "VField",
1595
- inheritAttrs: !1,
1596
- props: {
1597
- id: String,
1598
- details: Boolean,
1599
- labelId: String,
1600
- ...Xl(),
1601
- ...Zl()
1602
- },
1603
- emits: {
1604
- "update:focused": (e) => !0,
1605
- "update:modelValue": (e) => !0
1606
- },
1607
- setup(e, a) {
1608
- let {
1609
- attrs: t,
1610
- emit: n,
1611
- slots: l
1612
- } = a;
1613
- const {
1614
- themeClasses: i
1615
- } = Qe(e), {
1616
- loaderClasses: c
1617
- } = Dl(e), {
1618
- focusClasses: s,
1619
- isFocused: u,
1620
- focus: d,
1621
- blur: o
1622
- } = Yl(e), {
1623
- InputIcon: r
1624
- } = Ft(e), {
1625
- roundedClasses: m
1626
- } = rt(e), {
1627
- rtlClasses: g
1628
- } = xt(), y = T(() => e.dirty || e.active), h = T(() => !!(e.label || l.label)), I = T(() => !e.singleLine && h.value), _ = je(), x = w(() => e.id || `input-${_}`), k = T(() => e.details ? `${x.value}-messages` : void 0), B = W(), F = W(), L = W(), A = w(() => ["plain", "underlined"].includes(e.variant)), p = w(() => e.error || e.disabled ? void 0 : y.value && u.value ? e.color : e.baseColor), M = w(() => {
1629
- if (!(!e.iconColor || e.glow && !u.value))
1630
- return e.iconColor === !0 ? p.value : e.iconColor;
1631
- }), {
1632
- backgroundColorClasses: E,
1633
- backgroundColorStyles: q
1634
- } = wt(() => e.bgColor), {
1635
- textColorClasses: te,
1636
- textColorStyles: ee
1637
- } = mt(p);
1638
- re(y, (X) => {
1639
- if (I.value && !gl()) {
1640
- const ne = B.value.$el, D = F.value.$el;
1641
- requestAnimationFrame(() => {
1642
- const O = xn(ne), S = D.getBoundingClientRect(), v = S.x - O.x, P = S.y - O.y - (O.height / 2 - S.height / 2), V = S.width / 0.75, $ = Math.abs(V - O.width) > 1 ? {
1643
- maxWidth: lt(V)
1644
- } : void 0, K = getComputedStyle(ne), ue = getComputedStyle(D), ge = parseFloat(K.transitionDuration) * 1e3 || 150, fe = parseFloat(ue.getPropertyValue("--v-field-label-scale")), _e = ue.getPropertyValue("color");
1645
- ne.style.visibility = "visible", D.style.visibility = "hidden", In(ne, {
1646
- transform: `translate(${v}px, ${P}px) scale(${fe})`,
1647
- color: _e,
1648
- ...$
1649
- }, {
1650
- duration: ge,
1651
- easing: wn,
1652
- direction: X ? "normal" : "reverse"
1653
- }).finished.then(() => {
1654
- ne.style.removeProperty("visibility"), D.style.removeProperty("visibility");
1655
- });
1656
- });
1657
- }
1658
- }, {
1659
- flush: "post"
1660
- });
1661
- const U = w(() => ({
1662
- isActive: y,
1663
- isFocused: u,
1664
- controlRef: L,
1665
- iconColor: M,
1666
- blur: o,
1667
- focus: d
1668
- })), z = T(() => {
1669
- const X = !y.value;
1670
- return {
1671
- "aria-hidden": X,
1672
- for: X ? void 0 : x.value
1673
- };
1674
- }), ie = T(() => {
1675
- const X = I.value && y.value;
1676
- return {
1677
- "aria-hidden": X,
1678
- for: X ? void 0 : x.value
1679
- };
1680
- });
1681
- function G(X) {
1682
- X.target !== document.activeElement && X.preventDefault();
1683
- }
1684
- return ve(() => {
1685
- const X = e.variant === "outlined", ne = !!(l["prepend-inner"] || e.prependInnerIcon), D = !!(e.clearable || l.clear) && !e.disabled, O = !!(l["append-inner"] || e.appendInnerIcon || D), S = () => l.label ? l.label({
1686
- ...U.value,
1687
- label: e.label,
1688
- props: {
1689
- for: x.value
1690
- }
1691
- }) : e.label;
1692
- return b("div", R({
1693
- class: ["v-field", {
1694
- "v-field--active": y.value,
1695
- "v-field--appended": O,
1696
- "v-field--center-affix": e.centerAffix ?? !A.value,
1697
- "v-field--disabled": e.disabled,
1698
- "v-field--dirty": e.dirty,
1699
- "v-field--error": e.error,
1700
- "v-field--glow": e.glow,
1701
- "v-field--flat": e.flat,
1702
- "v-field--has-background": !!e.bgColor,
1703
- "v-field--persistent-clear": e.persistentClear,
1704
- "v-field--prepended": ne,
1705
- "v-field--reverse": e.reverse,
1706
- "v-field--single-line": e.singleLine,
1707
- "v-field--no-label": !S(),
1708
- [`v-field--variant-${e.variant}`]: !0
1709
- }, i.value, E.value, s.value, c.value, m.value, g.value, e.class],
1710
- style: [q.value, e.style],
1711
- onClick: G
1712
- }, t), [b("div", {
1713
- class: "v-field__overlay"
1714
- }, null), f(Tl, {
1715
- name: "v-field",
1716
- active: !!e.loading,
1717
- color: e.error ? "error" : typeof e.loading == "string" ? e.loading : e.color
1718
- }, {
1719
- default: l.loader
1720
- }), ne && b("div", {
1721
- key: "prepend",
1722
- class: "v-field__prepend-inner"
1723
- }, [l["prepend-inner"] ? l["prepend-inner"](U.value) : e.prependInnerIcon && f(r, {
1724
- key: "prepend-icon",
1725
- name: "prependInner",
1726
- color: M.value
1727
- }, null)]), b("div", {
1728
- class: "v-field__field",
1729
- "data-no-activator": ""
1730
- }, [["filled", "solo", "solo-inverted", "solo-filled"].includes(e.variant) && I.value && f(ht, R({
1731
- key: "floating-label",
1732
- ref: F,
1733
- class: [te.value],
1734
- floating: !0
1735
- }, z.value, {
1736
- style: ee.value
1737
- }), {
1738
- default: () => [S()]
1739
- }), h.value && f(ht, R({
1740
- key: "label",
1741
- ref: B,
1742
- id: e.labelId
1743
- }, ie.value), {
1744
- default: () => [S()]
1745
- }), l.default?.({
1746
- ...U.value,
1747
- props: {
1748
- id: x.value,
1749
- class: "v-field__input",
1750
- "aria-describedby": k.value
1751
- },
1752
- focus: d,
1753
- blur: o
1754
- }) ?? b("div", {
1755
- id: x.value,
1756
- class: "v-field__input",
1757
- "aria-describedby": k.value
1758
- }, null)]), D && f(Cl, {
1759
- key: "clear"
1760
- }, {
1761
- default: () => [He(b("div", {
1762
- class: "v-field__clearable",
1763
- onMousedown: (v) => {
1764
- v.preventDefault(), v.stopPropagation();
1765
- }
1766
- }, [f(Fe, {
1767
- defaults: {
1768
- VIcon: {
1769
- icon: e.clearIcon
1770
- }
1771
- }
1772
- }, {
1773
- default: () => [l.clear ? l.clear({
1774
- ...U.value,
1775
- props: {
1776
- onFocus: d,
1777
- onBlur: o,
1778
- onClick: e["onClick:clear"],
1779
- tabindex: -1
1780
- }
1781
- }) : f(r, {
1782
- name: "clear",
1783
- onFocus: d,
1784
- onBlur: o,
1785
- tabindex: -1
1786
- }, null)]
1787
- })]), [[Ct, e.dirty]])]
1788
- }), O && b("div", {
1789
- key: "append",
1790
- class: "v-field__append-inner"
1791
- }, [l["append-inner"] ? l["append-inner"](U.value) : e.appendInnerIcon && f(r, {
1792
- key: "append-icon",
1793
- name: "appendInner",
1794
- color: M.value
1795
- }, null)]), b("div", {
1796
- class: ce(["v-field__outline", te.value]),
1797
- style: Ie(ee.value)
1798
- }, [X && b(de, null, [b("div", {
1799
- class: "v-field__outline__start"
1800
- }, null), I.value && b("div", {
1801
- class: "v-field__outline__notch"
1802
- }, [f(ht, R({
1803
- ref: F,
1804
- floating: !0
1805
- }, z.value), {
1806
- default: () => [S()]
1807
- })]), b("div", {
1808
- class: "v-field__outline__end"
1809
- }, null)]), A.value && I.value && f(ht, R({
1810
- ref: F,
1811
- floating: !0
1812
- }, z.value), {
1813
- default: () => [S()]
1814
- })])]);
1815
- }), {
1816
- controlRef: L,
1817
- fieldIconColor: M
1818
- };
1819
- }
1820
- }), ka = j({
1821
- autocomplete: String
1822
- }, "autocomplete");
1823
- function en(e) {
1824
- const a = je(), t = J(0), n = T(() => e.autocomplete === "suppress"), l = T(() => {
1825
- if (e.name)
1826
- return n.value ? `${e.name}-${a}-${t.value}` : e.name;
1827
- }), i = T(() => n.value ? "off" : e.autocomplete);
1828
- return {
1829
- isSuppressing: n,
1830
- fieldAutocomplete: i,
1831
- fieldName: l,
1832
- update: () => t.value = (/* @__PURE__ */ new Date()).getTime()
1833
- };
1834
- }
1835
- function Sa(e) {
1836
- function a(t, n) {
1837
- if (!e.autofocus || !t) return;
1838
- const l = n[0].target;
1839
- (l.matches("input,textarea") ? l : l.querySelector("input,textarea"))?.focus();
1840
- }
1841
- return {
1842
- onIntersect: a
1843
- };
1844
- }
1845
- const Ca = ["color", "file", "time", "date", "datetime-local", "week", "month"], Tt = j({
1846
- autofocus: Boolean,
1847
- counter: [Boolean, Number, String],
1848
- counterValue: [Number, Function],
1849
- prefix: String,
1850
- placeholder: String,
1851
- persistentPlaceholder: Boolean,
1852
- persistentCounter: Boolean,
1853
- suffix: String,
1854
- role: String,
1855
- type: {
1856
- type: String,
1857
- default: "text"
1858
- },
1859
- modelModifiers: Object,
1860
- ...ka(),
1861
- ...Ge(Ql(), ["direction"]),
1862
- ...Zl()
1863
- }, "VTextField"), Ke = oe()({
1864
- name: "VTextField",
1865
- directives: {
1866
- vIntersect: nl
1867
- },
1868
- inheritAttrs: !1,
1869
- props: Tt(),
1870
- emits: {
1871
- "click:control": (e) => !0,
1872
- "mousedown:control": (e) => !0,
1873
- "update:focused": (e) => !0,
1874
- "update:modelValue": (e) => !0
1875
- },
1876
- setup(e, a) {
1877
- let {
1878
- attrs: t,
1879
- emit: n,
1880
- slots: l
1881
- } = a;
1882
- const i = we(e, "modelValue"), {
1883
- isFocused: c,
1884
- focus: s,
1885
- blur: u
1886
- } = Yl(e), {
1887
- onIntersect: d
1888
- } = Sa(e), o = w(() => typeof e.counterValue == "function" ? e.counterValue(i.value) : typeof e.counterValue == "number" ? e.counterValue : (i.value ?? "").toString().length), r = w(() => {
1889
- if (t.maxlength) return t.maxlength;
1890
- if (!(!e.counter || typeof e.counter != "number" && typeof e.counter != "string"))
1891
- return e.counter;
1892
- }), m = w(() => ["plain", "underlined"].includes(e.variant)), g = W(), y = W(), h = W(), I = en(e), _ = w(() => Ca.includes(e.type) || e.persistentPlaceholder || c.value || e.active);
1893
- function x() {
1894
- I.isSuppressing.value && I.update(), c.value || s(), Ve(() => {
1895
- h.value !== document.activeElement && h.value?.focus();
1896
- });
1897
- }
1898
- function k(A) {
1899
- n("mousedown:control", A), A.target !== h.value && (x(), A.preventDefault());
1900
- }
1901
- function B(A) {
1902
- n("click:control", A);
1903
- }
1904
- function F(A, p) {
1905
- A.stopPropagation(), x(), Ve(() => {
1906
- p(), _l(e["onClick:clear"], A);
1907
- });
1908
- }
1909
- function L(A) {
1910
- const p = A.target;
1911
- if (!(e.modelModifiers?.trim && ["text", "search", "password", "tel", "url"].includes(e.type))) {
1912
- i.value = p.value;
1913
- return;
1914
- }
1915
- const M = p.value, E = p.selectionStart, q = p.selectionEnd;
1916
- i.value = M, Ve(() => {
1917
- let te = 0;
1918
- M.trimStart().length === p.value.length && (te = M.length - p.value.length), E != null && (p.selectionStart = E - te), q != null && (p.selectionEnd = q - te);
1919
- });
1920
- }
1921
- return ve(() => {
1922
- const A = !!(l.counter || e.counter !== !1 && e.counter != null), p = !!(A || l.details), [M, E] = wl(t), {
1923
- modelValue: q,
1924
- ...te
1925
- } = rl.filterProps(e), ee = cl.filterProps(e);
1926
- return f(rl, R({
1927
- ref: g,
1928
- modelValue: i.value,
1929
- "onUpdate:modelValue": (U) => i.value = U,
1930
- class: ["v-text-field", {
1931
- "v-text-field--prefixed": e.prefix,
1932
- "v-text-field--suffixed": e.suffix,
1933
- "v-input--plain-underlined": m.value
1934
- }, e.class],
1935
- style: e.style
1936
- }, M, te, {
1937
- centerAffix: !m.value,
1938
- focused: c.value
1939
- }), {
1940
- ...l,
1941
- default: (U) => {
1942
- let {
1943
- id: z,
1944
- isDisabled: ie,
1945
- isDirty: G,
1946
- isReadonly: X,
1947
- isValid: ne,
1948
- hasDetails: D,
1949
- reset: O
1950
- } = U;
1951
- return f(cl, R({
1952
- ref: y,
1953
- onMousedown: k,
1954
- onClick: B,
1955
- "onClick:clear": (S) => F(S, O),
1956
- role: e.role
1957
- }, Ge(ee, ["onClick:clear"]), {
1958
- id: z.value,
1959
- labelId: `${z.value}-label`,
1960
- active: _.value || G.value,
1961
- dirty: G.value || e.dirty,
1962
- disabled: ie.value,
1963
- focused: c.value,
1964
- details: D.value,
1965
- error: ne.value === !1
1966
- }), {
1967
- ...l,
1968
- default: (S) => {
1969
- let {
1970
- props: {
1971
- class: v,
1972
- ...P
1973
- },
1974
- controlRef: V
1975
- } = S;
1976
- const $ = b("input", R({
1977
- ref: (K) => h.value = V.value = K,
1978
- value: i.value,
1979
- onInput: L,
1980
- autofocus: e.autofocus,
1981
- readonly: X.value,
1982
- disabled: ie.value,
1983
- name: I.fieldName.value,
1984
- autocomplete: I.fieldAutocomplete.value,
1985
- placeholder: e.placeholder,
1986
- size: 1,
1987
- role: e.role,
1988
- type: e.type,
1989
- onFocus: s,
1990
- onBlur: u,
1991
- "aria-labelledby": `${z.value}-label`
1992
- }, P, E), null);
1993
- return b(de, null, [e.prefix && b("span", {
1994
- class: "v-text-field__prefix"
1995
- }, [b("span", {
1996
- class: "v-text-field__prefix__text"
1997
- }, [e.prefix])]), He(l.default ? b("div", {
1998
- class: ce(v),
1999
- "data-no-activator": ""
2000
- }, [l.default({
2001
- id: z
2002
- }), $]) : fn($, {
2003
- class: v
2004
- }), [[nl, d, null, {
2005
- once: !0
2006
- }]]), e.suffix && b("span", {
2007
- class: "v-text-field__suffix"
2008
- }, [b("span", {
2009
- class: "v-text-field__suffix__text"
2010
- }, [e.suffix])])]);
2011
- }
2012
- });
2013
- },
2014
- details: p ? (U) => b(de, null, [l.details?.(U), A && b(de, null, [b("span", null, null), f(ha, {
2015
- active: e.persistentCounter || c.value,
2016
- value: o.value,
2017
- max: r.value,
2018
- disabled: e.disabled
2019
- }, l.counter)])]) : void 0
2020
- });
2021
- }), gt({}, g, y, h);
2022
- }
2023
- }), Va = j({
2024
- renderless: Boolean,
2025
- ...pe()
2026
- }, "VVirtualScrollItem"), xa = oe()({
2027
- name: "VVirtualScrollItem",
2028
- inheritAttrs: !1,
2029
- props: Va(),
2030
- emits: {
2031
- "update:height": (e) => !0
2032
- },
2033
- setup(e, a) {
2034
- let {
2035
- attrs: t,
2036
- emit: n,
2037
- slots: l
2038
- } = a;
2039
- const {
2040
- resizeRef: i,
2041
- contentRect: c
2042
- } = kt(void 0, "border");
2043
- re(() => c.value?.height, (s) => {
2044
- s != null && n("update:height", s);
2045
- }), ve(() => e.renderless ? b(de, null, [l.default?.({
2046
- itemRef: i
2047
- })]) : b("div", R({
2048
- ref: i,
2049
- class: ["v-virtual-scroll__item", e.class],
2050
- style: e.style
2051
- }, t), [l.default?.()]));
2052
- }
2053
- }), Ia = -1, wa = 1, Et = 100, _a = j({
2054
- itemHeight: {
2055
- type: [Number, String],
2056
- default: null
2057
- },
2058
- itemKey: {
2059
- type: [String, Array, Function],
2060
- default: null
2061
- },
2062
- height: [Number, String]
2063
- }, "virtual");
2064
- function Pa(e, a) {
2065
- const t = yl(), n = J(0);
2066
- Rt(() => {
2067
- n.value = parseFloat(e.itemHeight || 0);
2068
- });
2069
- const l = J(0), i = J(Math.ceil(
2070
- // Assume 16px items filling the entire screen height if
2071
- // not provided. This is probably incorrect but it minimises
2072
- // the chance of ending up with empty space at the bottom.
2073
- // The default value is set here to avoid poisoning getSize()
2074
- (parseInt(e.height) || t.height.value) / (n.value || 16)
2075
- ) || 1), c = J(0), s = J(0), u = W(), d = W();
2076
- let o = 0;
2077
- const {
2078
- resizeRef: r,
2079
- contentRect: m
2080
- } = kt();
2081
- Rt(() => {
2082
- r.value = u.value;
2083
- });
2084
- const g = w(() => u.value === document.documentElement ? t.height.value : m.value?.height || parseInt(e.height) || 0), y = w(() => !!(u.value && d.value && g.value && n.value));
2085
- let h = Array.from({
2086
- length: a.value.length
2087
- }), I = Array.from({
2088
- length: a.value.length
2089
- });
2090
- const _ = J(0);
2091
- let x = -1;
2092
- function k(D) {
2093
- return h[D] || n.value;
2094
- }
2095
- const B = _n(() => {
2096
- const D = performance.now();
2097
- I[0] = 0;
2098
- const O = a.value.length;
2099
- for (let S = 1; S <= O; S++)
2100
- I[S] = (I[S - 1] || 0) + k(S - 1);
2101
- _.value = Math.max(_.value, performance.now() - D);
2102
- }, _), F = re(y, (D) => {
2103
- D && (F(), o = d.value.offsetTop, B.immediate(), ie(), ~x && Ve(() => {
2104
- at && window.requestAnimationFrame(() => {
2105
- X(x), x = -1;
2106
- });
2107
- }));
2108
- });
2109
- nt(() => {
2110
- B.clear();
2111
- });
2112
- function L(D, O) {
2113
- const S = h[D], v = n.value;
2114
- n.value = v ? Math.min(n.value, O) : O, (S !== O || v !== n.value) && (h[D] = O, B());
2115
- }
2116
- function A(D) {
2117
- D = Me(D, 0, a.value.length);
2118
- const O = Math.floor(D), S = D % 1, v = O + 1, P = I[O] || 0, V = I[v] || P;
2119
- return P + (V - P) * S;
2120
- }
2121
- function p(D) {
2122
- return Aa(I, D);
2123
- }
2124
- let M = 0, E = 0, q = 0;
2125
- re(g, (D, O) => {
2126
- ie(), D < O && requestAnimationFrame(() => {
2127
- E = 0, ie();
2128
- });
2129
- });
2130
- let te = -1;
2131
- function ee() {
2132
- if (!u.value || !d.value) return;
2133
- const D = u.value.scrollTop, O = performance.now();
2134
- O - q > 500 ? (E = Math.sign(D - M), o = d.value.offsetTop) : E = D - M, M = D, q = O, window.clearTimeout(te), te = window.setTimeout(U, 500), ie();
2135
- }
2136
- function U() {
2137
- !u.value || !d.value || (E = 0, q = 0, window.clearTimeout(te), ie());
2138
- }
2139
- let z = -1;
2140
- function ie() {
2141
- cancelAnimationFrame(z), z = requestAnimationFrame(G);
2142
- }
2143
- function G() {
2144
- if (!u.value || !g.value || !n.value) return;
2145
- const D = M - o, O = Math.sign(E), S = Math.max(0, D - Et), v = Me(p(S), 0, a.value.length), P = D + g.value + Et, V = Me(p(P) + 1, v + 1, a.value.length);
2146
- if (
2147
- // Only update the side we're scrolling towards,
2148
- // the other side will be updated incidentally
2149
- (O !== Ia || v < l.value) && (O !== wa || V > i.value)
2150
- ) {
2151
- const $ = A(l.value) - A(v), K = A(V) - A(i.value);
2152
- Math.max($, K) > Et ? (l.value = v, i.value = V) : (v <= 0 && (l.value = v), V >= a.value.length && (i.value = V));
2153
- }
2154
- c.value = A(l.value), s.value = A(a.value.length) - A(i.value);
2155
- }
2156
- function X(D) {
2157
- const O = A(D);
2158
- !u.value || D && !O ? x = D : u.value.scrollTop = O;
2159
- }
2160
- const ne = w(() => a.value.slice(l.value, i.value).map((D, O) => {
2161
- const S = O + l.value;
2162
- return {
2163
- raw: D,
2164
- index: S,
2165
- key: El(D, e.itemKey, S)
2166
- };
2167
- }));
2168
- return re(a, () => {
2169
- h = Array.from({
2170
- length: a.value.length
2171
- }), I = Array.from({
2172
- length: a.value.length
2173
- }), B.immediate(), ie();
2174
- }, {
2175
- deep: 1
2176
- }), {
2177
- calculateVisibleItems: ie,
2178
- containerRef: u,
2179
- markerRef: d,
2180
- computedItems: ne,
2181
- paddingTop: c,
2182
- paddingBottom: s,
2183
- scrollToIndex: X,
2184
- handleScroll: ee,
2185
- handleScrollend: U,
2186
- handleItemResize: L
2187
- };
2188
- }
2189
- function Aa(e, a) {
2190
- let t = e.length - 1, n = 0, l = 0, i = null, c = -1;
2191
- if (e[t] < a)
2192
- return t;
2193
- for (; n <= t; )
2194
- if (l = n + t >> 1, i = e[l], i > a)
2195
- t = l - 1;
2196
- else if (i < a)
2197
- c = l, n = l + 1;
2198
- else return i === a ? l : n;
2199
- return c;
2200
- }
2201
- const Fa = j({
2202
- items: {
2203
- type: Array,
2204
- default: () => []
2205
- },
2206
- renderless: Boolean,
2207
- ..._a(),
2208
- ...pe(),
2209
- ...ft()
2210
- }, "VVirtualScroll"), tn = oe()({
2211
- name: "VVirtualScroll",
2212
- props: Fa(),
2213
- setup(e, a) {
2214
- let {
2215
- slots: t
2216
- } = a;
2217
- const n = Fl("VVirtualScroll"), {
2218
- dimensionStyles: l
2219
- } = vt(e), {
2220
- calculateVisibleItems: i,
2221
- containerRef: c,
2222
- markerRef: s,
2223
- handleScroll: u,
2224
- handleScrollend: d,
2225
- handleItemResize: o,
2226
- scrollToIndex: r,
2227
- paddingTop: m,
2228
- paddingBottom: g,
2229
- computedItems: y
2230
- } = Pa(e, T(() => e.items));
2231
- return $t(() => e.renderless, () => {
2232
- function h() {
2233
- const _ = (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1) ? "addEventListener" : "removeEventListener";
2234
- c.value === document.documentElement ? (document[_]("scroll", u, {
2235
- passive: !0
2236
- }), document[_]("scrollend", d)) : (c.value?.[_]("scroll", u, {
2237
- passive: !0
2238
- }), c.value?.[_]("scrollend", d));
2239
- }
2240
- Ye(() => {
2241
- c.value = Pn(n.vnode.el, !0), h(!0);
2242
- }), nt(h);
2243
- }), ve(() => {
2244
- const h = y.value.map((I) => f(xa, {
2245
- key: I.key,
2246
- renderless: e.renderless,
2247
- "onUpdate:height": (_) => o(I.index, _)
2248
- }, {
2249
- default: (_) => t.default?.({
2250
- item: I.raw,
2251
- index: I.index,
2252
- ..._
2253
- })
2254
- }));
2255
- return e.renderless ? b(de, null, [b("div", {
2256
- ref: s,
2257
- class: "v-virtual-scroll__spacer",
2258
- style: {
2259
- paddingTop: lt(m.value)
2260
- }
2261
- }, null), h, b("div", {
2262
- class: "v-virtual-scroll__spacer",
2263
- style: {
2264
- paddingBottom: lt(g.value)
2265
- }
2266
- }, null)]) : b("div", {
2267
- ref: c,
2268
- class: ce(["v-virtual-scroll", e.class]),
2269
- onScrollPassive: u,
2270
- onScrollend: d,
2271
- style: Ie([l.value, e.style])
2272
- }, [b("div", {
2273
- ref: s,
2274
- class: "v-virtual-scroll__container",
2275
- style: {
2276
- paddingTop: lt(m.value),
2277
- paddingBottom: lt(g.value)
2278
- }
2279
- }, [h])]);
2280
- }), {
2281
- calculateVisibleItems: i,
2282
- scrollToIndex: r
2283
- };
2284
- }
2285
- });
2286
- function ln(e, a) {
2287
- const t = J(!1);
2288
- let n;
2289
- function l(s) {
2290
- cancelAnimationFrame(n), t.value = !0, n = requestAnimationFrame(() => {
2291
- n = requestAnimationFrame(() => {
2292
- t.value = !1;
2293
- });
2294
- });
2295
- }
2296
- async function i() {
2297
- await new Promise((s) => requestAnimationFrame(s)), await new Promise((s) => requestAnimationFrame(s)), await new Promise((s) => requestAnimationFrame(s)), await new Promise((s) => {
2298
- if (t.value) {
2299
- const u = re(t, () => {
2300
- u(), s();
2301
- });
2302
- } else s();
2303
- });
2304
- }
2305
- async function c(s) {
2306
- if (s.key === "Tab" && a.value?.focus(), !["PageDown", "PageUp", "Home", "End"].includes(s.key)) return;
2307
- const u = e.value?.$el;
2308
- if (!u) return;
2309
- (s.key === "Home" || s.key === "End") && u.scrollTo({
2310
- top: s.key === "Home" ? 0 : u.scrollHeight,
2311
- behavior: "smooth"
2312
- }), await i();
2313
- const d = u.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");
2314
- if (s.key === "PageDown" || s.key === "Home") {
2315
- const o = u.getBoundingClientRect().top;
2316
- for (const r of d)
2317
- if (r.getBoundingClientRect().top >= o) {
2318
- r.focus();
2319
- break;
2320
- }
2321
- } else {
2322
- const o = u.getBoundingClientRect().bottom;
2323
- for (const r of [...d].reverse())
2324
- if (r.getBoundingClientRect().bottom <= o) {
2325
- r.focus();
2326
- break;
2327
- }
2328
- }
2329
- }
2330
- return {
2331
- onScrollPassive: l,
2332
- onKeydown: c
2333
- };
2334
- }
2335
- const Da = j({
2336
- closeText: {
2337
- type: String,
2338
- default: "$vuetify.close"
2339
- },
2340
- openText: {
2341
- type: String,
2342
- default: "$vuetify.open"
2343
- }
2344
- }, "autocomplete");
2345
- function nn(e, a) {
2346
- const t = je(), n = w(() => `menu-${t}`), l = T(() => mn(a)), i = T(() => n.value);
2347
- return {
2348
- menuId: n,
2349
- ariaExpanded: l,
2350
- ariaControls: i
2351
- };
2352
- }
2353
- const an = j({
2354
- chips: Boolean,
2355
- closableChips: Boolean,
2356
- eager: Boolean,
2357
- hideNoData: Boolean,
2358
- hideSelected: Boolean,
2359
- listProps: {
2360
- type: Object
2361
- },
2362
- menu: Boolean,
2363
- menuIcon: {
2364
- type: be,
2365
- default: "$dropdown"
2366
- },
2367
- menuProps: {
2368
- type: Object
2369
- },
2370
- multiple: Boolean,
2371
- noDataText: {
2372
- type: String,
2373
- default: "$vuetify.noDataText"
2374
- },
2375
- openOnClear: Boolean,
2376
- itemColor: String,
2377
- noAutoScroll: Boolean,
2378
- ...Da(),
2379
- ...Fn({
2380
- itemChildren: !1
2381
- })
2382
- }, "Select"), Ta = j({
2383
- ...an(),
2384
- ...Ge(Tt({
2385
- modelValue: null,
2386
- role: "combobox"
2387
- }), ["validationValue", "dirty"]),
2388
- ..._t({
2389
- transition: {
2390
- component: Nl
2391
- }
2392
- })
2393
- }, "VSelect"), Co = oe()({
2394
- name: "VSelect",
2395
- props: Ta(),
2396
- emits: {
2397
- "update:focused": (e) => !0,
2398
- "update:modelValue": (e) => !0,
2399
- "update:menu": (e) => !0
2400
- },
2401
- setup(e, a) {
2402
- let {
2403
- slots: t
2404
- } = a;
2405
- const {
2406
- t: n
2407
- } = Ze(), l = W(), i = W(), c = W(), {
2408
- items: s,
2409
- transformIn: u,
2410
- transformOut: d
2411
- } = Ol(e), o = we(e, "modelValue", [], (V) => u(V === null ? [null] : De(V)), (V) => {
2412
- const $ = d(V);
2413
- return e.multiple ? $ : $[0] ?? null;
2414
- }), r = w(() => typeof e.counterValue == "function" ? e.counterValue(o.value) : typeof e.counterValue == "number" ? e.counterValue : o.value.length), m = Dt(e), g = en(e), y = w(() => o.value.map((V) => V.value)), h = J(!1), I = T(() => e.closableChips && !m.isReadonly.value && !m.isDisabled.value), {
2415
- InputIcon: _
2416
- } = Ft(e);
2417
- let x = "", k = 0, B;
2418
- const F = w(() => e.hideSelected ? s.value.filter((V) => !o.value.some(($) => (e.valueComparator || We)($, V))) : s.value), L = w(() => e.hideNoData && !F.value.length || m.isReadonly.value || m.isDisabled.value), A = we(e, "menu"), p = w({
2419
- get: () => A.value,
2420
- set: (V) => {
2421
- A.value && !V && i.value?.ΨopenChildren.size || V && L.value || (A.value = V);
2422
- }
2423
- }), {
2424
- menuId: M,
2425
- ariaExpanded: E,
2426
- ariaControls: q
2427
- } = nn(e, p), te = w(() => ({
2428
- ...e.menuProps,
2429
- activatorProps: {
2430
- ...e.menuProps?.activatorProps || {},
2431
- "aria-haspopup": "listbox"
2432
- // Set aria-haspopup to 'listbox'
2433
- }
2434
- })), ee = W(), U = ln(ee, l);
2435
- function z(V) {
2436
- e.openOnClear && (p.value = !0);
2437
- }
2438
- function ie() {
2439
- L.value || (p.value = !p.value);
2440
- }
2441
- function G(V) {
2442
- St(V) && X(V);
2443
- }
2444
- function X(V) {
2445
- if (!V.key || m.isReadonly.value) return;
2446
- if (["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(V.key) && V.preventDefault(), ["Enter", "ArrowDown", " "].includes(V.key) && (p.value = !0), ["Escape", "Tab"].includes(V.key) && (p.value = !1), e.clearable && V.key === "Backspace") {
2447
- V.preventDefault(), o.value = [], z();
2448
- return;
2449
- }
2450
- V.key === "Home" ? ee.value?.focus("first") : V.key === "End" && ee.value?.focus("last");
2451
- const $ = 1e3;
2452
- if (!St(V)) return;
2453
- const K = performance.now();
2454
- K - B > $ && (x = "", k = 0), x += V.key.toLowerCase(), B = K;
2455
- const ue = F.value;
2456
- function ge() {
2457
- let H = fe();
2458
- return H || x.at(-1) === x.at(-2) && (x = x.slice(0, -1), k++, H = fe(), H) || (k = 0, H = fe(), H) ? H : (x = V.key.toLowerCase(), fe());
2459
- }
2460
- function fe() {
2461
- for (let H = k; H < ue.length; H++) {
2462
- const ye = ue[H];
2463
- if (ye.title.toLowerCase().startsWith(x))
2464
- return [ye, H];
2465
- }
2466
- }
2467
- const _e = ge();
2468
- if (!_e) return;
2469
- const [Y, me] = _e;
2470
- k = me, ee.value?.focus(me), e.multiple || (o.value = [Y]);
2471
- }
2472
- function ne(V) {
2473
- let $ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
2474
- if (!V.props.disabled)
2475
- if (e.multiple) {
2476
- const K = o.value.findIndex((ge) => (e.valueComparator || We)(ge.value, V.value)), ue = $ ?? !~K;
2477
- if (~K) {
2478
- const ge = ue ? [...o.value, V] : [...o.value];
2479
- ge.splice(K, 1), o.value = ge;
2480
- } else ue && (o.value = [...o.value, V]);
2481
- } else {
2482
- const K = $ !== !1;
2483
- o.value = K ? [V] : [], Ve(() => {
2484
- p.value = !1;
2485
- });
2486
- }
2487
- }
2488
- function D(V) {
2489
- ee.value?.$el.contains(V.relatedTarget) || (p.value = !1);
2490
- }
2491
- function O() {
2492
- e.eager && c.value?.calculateVisibleItems();
2493
- }
2494
- function S() {
2495
- h.value && l.value?.focus();
2496
- }
2497
- function v(V) {
2498
- h.value = !0;
2499
- }
2500
- function P(V) {
2501
- if (V == null) o.value = [];
2502
- else if (ot(l.value, ":autofill") || ot(l.value, ":-webkit-autofill")) {
2503
- const $ = s.value.find((K) => K.title === V);
2504
- $ && ne($);
2505
- } else l.value && (l.value.value = "");
2506
- }
2507
- return re(p, () => {
2508
- if (!e.hideSelected && p.value && o.value.length) {
2509
- const V = F.value.findIndex(($) => o.value.some((K) => (e.valueComparator || We)(K.value, $.value)));
2510
- at && !e.noAutoScroll && window.requestAnimationFrame(() => {
2511
- V >= 0 && c.value?.scrollToIndex(V);
2512
- });
2513
- }
2514
- }), re(s, (V, $) => {
2515
- p.value || h.value && e.hideNoData && !$.length && V.length && (p.value = !0);
2516
- }), ve(() => {
2517
- const V = !!(e.chips || t.chip), $ = !!(!e.hideNoData || F.value.length || t["prepend-item"] || t["append-item"] || t["no-data"]), K = o.value.length > 0, ue = Ke.filterProps(e), ge = K || !h.value && e.label && !e.persistentPlaceholder ? void 0 : e.placeholder;
2518
- return f(Ke, R({
2519
- ref: l
2520
- }, ue, {
2521
- modelValue: o.value.map((fe) => fe.props.title).join(", "),
2522
- name: void 0,
2523
- "onUpdate:modelValue": P,
2524
- focused: h.value,
2525
- "onUpdate:focused": (fe) => h.value = fe,
2526
- validationValue: o.externalValue,
2527
- counterValue: r.value,
2528
- dirty: K,
2529
- class: ["v-select", {
2530
- "v-select--active-menu": p.value,
2531
- "v-select--chips": !!e.chips,
2532
- [`v-select--${e.multiple ? "multiple" : "single"}`]: !0,
2533
- "v-select--selected": o.value.length,
2534
- "v-select--selection-slot": !!t.selection
2535
- }, e.class],
2536
- style: e.style,
2537
- inputmode: "none",
2538
- placeholder: ge,
2539
- "onClick:clear": z,
2540
- "onMousedown:control": ie,
2541
- onBlur: D,
2542
- onKeydown: X,
2543
- "aria-expanded": E.value,
2544
- "aria-controls": q.value
2545
- }), {
2546
- ...t,
2547
- default: (fe) => {
2548
- let {
2549
- id: _e
2550
- } = fe;
2551
- return b(de, null, [b("select", {
2552
- hidden: !0,
2553
- multiple: e.multiple,
2554
- name: g.fieldName.value
2555
- }, [s.value.map((Y) => b("option", {
2556
- key: Y.value,
2557
- value: Y.value,
2558
- selected: y.value.includes(Y.value)
2559
- }, null))]), f(Rl, R({
2560
- id: M.value,
2561
- ref: i,
2562
- modelValue: p.value,
2563
- "onUpdate:modelValue": (Y) => p.value = Y,
2564
- activator: "parent",
2565
- contentClass: "v-select__content",
2566
- disabled: L.value,
2567
- eager: e.eager,
2568
- maxHeight: 310,
2569
- openOnClick: !1,
2570
- closeOnContentClick: !1,
2571
- transition: e.transition,
2572
- onAfterEnter: O,
2573
- onAfterLeave: S
2574
- }, te.value), {
2575
- default: () => [$ && f(Yt, R({
2576
- ref: ee,
2577
- selected: y.value,
2578
- selectStrategy: e.multiple ? "independent" : "single-independent",
2579
- onMousedown: (Y) => Y.preventDefault(),
2580
- onKeydown: G,
2581
- onFocusin: v,
2582
- tabindex: "-1",
2583
- selectable: !!F.value.length,
2584
- "aria-live": "polite",
2585
- "aria-labelledby": `${_e.value}-label`,
2586
- "aria-multiselectable": e.multiple,
2587
- color: e.itemColor ?? e.color
2588
- }, U, e.listProps), {
2589
- default: () => [t["prepend-item"]?.(), !F.value.length && !e.hideNoData && (t["no-data"]?.() ?? f(it, {
2590
- key: "no-data",
2591
- title: n(e.noDataText)
2592
- }, null)), f(tn, {
2593
- ref: c,
2594
- renderless: !0,
2595
- items: F.value,
2596
- itemKey: "value"
2597
- }, {
2598
- default: (Y) => {
2599
- let {
2600
- item: me,
2601
- index: H,
2602
- itemRef: ye
2603
- } = Y;
2604
- const C = An(me.props), Q = R(me.props, {
2605
- ref: ye,
2606
- key: me.value,
2607
- onClick: () => ne(me, null),
2608
- "aria-posinset": H + 1,
2609
- "aria-setsize": F.value.length
2610
- });
2611
- return me.type === "divider" ? t.divider?.({
2612
- props: me.raw,
2613
- index: H
2614
- }) ?? f(Le, R(me.props, {
2615
- key: `divider-${H}`
2616
- }), null) : me.type === "subheader" ? t.subheader?.({
2617
- props: me.raw,
2618
- index: H
2619
- }) ?? f(Ml, R(me.props, {
2620
- key: `subheader-${H}`
2621
- }), null) : t.item?.({
2622
- item: me,
2623
- index: H,
2624
- props: Q
2625
- }) ?? f(it, R(Q, {
2626
- role: "option"
2627
- }), {
2628
- prepend: (Z) => {
2629
- let {
2630
- isSelected: ae
2631
- } = Z;
2632
- return b(de, null, [e.multiple && !e.hideSelected ? f(Jl, {
2633
- key: me.value,
2634
- modelValue: ae,
2635
- ripple: !1,
2636
- tabindex: "-1",
2637
- "aria-hidden": !0,
2638
- onClick: (Ce) => Ce.preventDefault()
2639
- }, null) : void 0, C.prependAvatar && f(Xe, {
2640
- image: C.prependAvatar
2641
- }, null), C.prependIcon && f(Se, {
2642
- icon: C.prependIcon
2643
- }, null)]);
2644
- }
2645
- });
2646
- }
2647
- }), t["append-item"]?.()]
2648
- })]
2649
- }), o.value.map((Y, me) => {
2650
- function H(Z) {
2651
- Z.stopPropagation(), Z.preventDefault(), ne(Y, !1);
2652
- }
2653
- const ye = R(st.filterProps(Y.props), {
2654
- "onClick:close": H,
2655
- onKeydown(Z) {
2656
- Z.key !== "Enter" && Z.key !== " " || (Z.preventDefault(), Z.stopPropagation(), H(Z));
2657
- },
2658
- onMousedown(Z) {
2659
- Z.preventDefault(), Z.stopPropagation();
2660
- },
2661
- modelValue: !0,
2662
- "onUpdate:modelValue": void 0
2663
- }), C = V ? !!t.chip : !!t.selection, Q = C ? $l(V ? t.chip({
2664
- item: Y,
2665
- index: me,
2666
- props: ye
2667
- }) : t.selection({
2668
- item: Y,
2669
- index: me
2670
- })) : void 0;
2671
- if (!(C && !Q))
2672
- return b("div", {
2673
- key: Y.value,
2674
- class: "v-select__selection"
2675
- }, [V ? t.chip ? f(Fe, {
2676
- key: "chip-defaults",
2677
- defaults: {
2678
- VChip: {
2679
- closable: I.value,
2680
- size: "small",
2681
- text: Y.title
2682
- }
2683
- }
2684
- }, {
2685
- default: () => [Q]
2686
- }) : f(st, R({
2687
- key: "chip",
2688
- closable: I.value,
2689
- size: "small",
2690
- text: Y.title,
2691
- disabled: Y.props.disabled
2692
- }, ye), null) : Q ?? b("span", {
2693
- class: "v-select__selection-text"
2694
- }, [Y.title, e.multiple && me < o.value.length - 1 && b("span", {
2695
- class: "v-select__selection-comma"
2696
- }, [vl(",")])])]);
2697
- })]);
2698
- },
2699
- "append-inner": function() {
2700
- for (var fe = arguments.length, _e = new Array(fe), Y = 0; Y < fe; Y++)
2701
- _e[Y] = arguments[Y];
2702
- return b(de, null, [t["append-inner"]?.(..._e), e.menuIcon ? f(Se, {
2703
- class: "v-select__menu-icon",
2704
- color: l.value?.fieldIconColor,
2705
- icon: e.menuIcon,
2706
- "aria-hidden": !0
2707
- }, null) : void 0, e.appendInnerIcon && f(_, {
2708
- key: "append-icon",
2709
- name: "appendInner",
2710
- color: _e[0].iconColor.value
2711
- }, null)]);
2712
- }
2713
- });
2714
- }), gt({
2715
- isFocused: h,
2716
- menu: p,
2717
- select: ne
2718
- }, l);
2719
- }
2720
- }), Ba = (e, a, t) => {
2721
- if (e == null || a == null) return -1;
2722
- if (!a.length) return 0;
2723
- e = e.toString().toLocaleLowerCase(), a = a.toString().toLocaleLowerCase();
2724
- const n = [];
2725
- let l = e.indexOf(a);
2726
- for (; ~l; )
2727
- n.push([l, l + a.length]), l = e.indexOf(a, l + a.length);
2728
- return n.length ? n : -1;
2729
- };
2730
- function Ot(e, a) {
2731
- if (!(e == null || typeof e == "boolean" || e === -1))
2732
- return typeof e == "number" ? [[e, e + a.length]] : Array.isArray(e[0]) ? e : [e];
2733
- }
2734
- const Ea = j({
2735
- customFilter: Function,
2736
- customKeyFilter: Object,
2737
- filterKeys: [Array, String],
2738
- filterMode: {
2739
- type: String,
2740
- default: "intersection"
2741
- },
2742
- noFilter: Boolean
2743
- }, "filter");
2744
- function Oa(e, a, t) {
2745
- const n = [], l = t?.default ?? Ba, i = t?.filterKeys ? De(t.filterKeys) : !1, c = Object.keys(t?.customKeyFilter ?? {}).length;
2746
- if (!e?.length) return n;
2747
- let s = null;
2748
- e: for (let u = 0; u < e.length; u++) {
2749
- const [d, o = d] = De(e[u]), r = {}, m = {};
2750
- let g = -1;
2751
- if ((a || c > 0) && !t?.noFilter) {
2752
- let y = !1;
2753
- if (typeof d == "object") {
2754
- if (d.type === "divider" || d.type === "subheader") {
2755
- s?.type === "divider" && d.type === "subheader" && n.push(s), s = {
2756
- index: u,
2757
- matches: {},
2758
- type: d.type
2759
- };
2760
- continue;
2761
- }
2762
- const _ = i || Object.keys(o);
2763
- y = _.length === c;
2764
- for (const x of _) {
2765
- const k = El(o, x), B = t?.customKeyFilter?.[x];
2766
- if (g = B ? B(k, a, d) : l(k, a, d), g !== -1 && g !== !1)
2767
- B ? r[x] = Ot(g, a) : m[x] = Ot(g, a);
2768
- else if (t?.filterMode === "every")
2769
- continue e;
2770
- }
2771
- } else
2772
- g = l(d, a, d), g !== -1 && g !== !1 && (m.title = Ot(g, a));
2773
- const h = Object.keys(m).length, I = Object.keys(r).length;
2774
- if (!h && !I || t?.filterMode === "union" && I !== c && !h || t?.filterMode === "intersection" && (I !== c || !h && c > 0 && !y)) continue;
2775
- }
2776
- s && (n.push(s), s = null), n.push({
2777
- index: u,
2778
- matches: {
2779
- ...m,
2780
- ...r
2781
- }
2782
- });
2783
- }
2784
- return n;
2785
- }
2786
- function Ra(e, a, t, n) {
2787
- const l = J([]), i = J(/* @__PURE__ */ new Map()), c = w(() => n?.transform ? N(a).map((u) => [u, n.transform(u)]) : N(a));
2788
- Rt(() => {
2789
- const u = typeof t == "function" ? t() : N(t), d = typeof u != "string" && typeof u != "number" ? "" : String(u), o = Oa(c.value, d, {
2790
- customKeyFilter: {
2791
- ...e.customKeyFilter,
2792
- ...N(n?.customKeyFilter)
2793
- },
2794
- default: e.customFilter,
2795
- filterKeys: e.filterKeys,
2796
- filterMode: e.filterMode,
2797
- noFilter: e.noFilter
2798
- }), r = N(a), m = [], g = /* @__PURE__ */ new Map();
2799
- o.forEach((y) => {
2800
- let {
2801
- index: h,
2802
- matches: I
2803
- } = y;
2804
- const _ = r[h];
2805
- m.push(_), g.set(_.value, I);
2806
- }), l.value = m, i.value = g;
2807
- });
2808
- function s(u) {
2809
- return i.value.get(u.value);
2810
- }
2811
- return {
2812
- filteredItems: l,
2813
- filteredMatches: i,
2814
- getMatches: s
2815
- };
2816
- }
2817
- function Ma(e, a, t) {
2818
- return t == null || !t.length ? a : t.map((n, l) => {
2819
- const i = l === 0 ? 0 : t[l - 1][1], c = [b("span", {
2820
- class: ce(`${e}__unmask`)
2821
- }, [a.slice(i, n[0])]), b("span", {
2822
- class: ce(`${e}__mask`)
2823
- }, [a.slice(n[0], n[1])])];
2824
- return l === t.length - 1 && c.push(b("span", {
2825
- class: ce(`${e}__unmask`)
2826
- }, [a.slice(n[1])])), b(de, null, [c]);
2827
- });
2828
- }
2829
- const $a = j({
2830
- autoSelectFirst: {
2831
- type: [Boolean, String]
2832
- },
2833
- clearOnSelect: Boolean,
2834
- search: String,
2835
- ...Ea({
2836
- filterKeys: ["title"]
2837
- }),
2838
- ...an(),
2839
- ...Ge(Tt({
2840
- modelValue: null,
2841
- role: "combobox"
2842
- }), ["validationValue", "dirty"])
2843
- }, "VAutocomplete"), Na = oe()({
2844
- name: "VAutocomplete",
2845
- props: $a(),
2846
- emits: {
2847
- "update:focused": (e) => !0,
2848
- "update:search": (e) => !0,
2849
- "update:modelValue": (e) => !0,
2850
- "update:menu": (e) => !0
2851
- },
2852
- setup(e, a) {
2853
- let {
2854
- slots: t
2855
- } = a;
2856
- const {
2857
- t: n
2858
- } = Ze(), l = W(), i = J(!1), c = J(!0), s = J(!1), u = W(), d = W(), o = J(-1), r = J(null), {
2859
- items: m,
2860
- transformIn: g,
2861
- transformOut: y
2862
- } = Ol(e), {
2863
- textColorClasses: h,
2864
- textColorStyles: I
2865
- } = mt(() => l.value?.color), {
2866
- InputIcon: _
2867
- } = Ft(e), x = we(e, "search", ""), k = we(e, "modelValue", [], (C) => g(C === null ? [null] : De(C)), (C) => {
2868
- const Q = y(C);
2869
- return e.multiple ? Q : Q[0] ?? null;
2870
- }), B = w(() => typeof e.counterValue == "function" ? e.counterValue(k.value) : typeof e.counterValue == "number" ? e.counterValue : k.value.length), F = Dt(e), {
2871
- filteredItems: L,
2872
- getMatches: A
2873
- } = Ra(e, m, () => r.value ?? (c.value ? "" : x.value)), p = w(() => e.hideSelected && r.value === null ? L.value.filter((C) => !k.value.some((Q) => Q.value === C.value)) : L.value), M = T(() => e.closableChips && !F.isReadonly.value && !F.isDisabled.value), E = w(() => !!(e.chips || t.chip)), q = w(() => E.value || !!t.selection), te = w(() => k.value.map((C) => C.props.value)), ee = w(() => p.value.find((C) => C.type === "item" && !C.props.disabled)), U = w(() => (e.autoSelectFirst === !0 || e.autoSelectFirst === "exact" && x.value === ee.value?.title) && p.value.length > 0 && !c.value && !s.value), z = w(() => e.hideNoData && !p.value.length || F.isReadonly.value || F.isDisabled.value), ie = we(e, "menu"), G = w({
2874
- get: () => ie.value,
2875
- set: (C) => {
2876
- ie.value && !C && u.value?.ΨopenChildren.size || C && z.value || (ie.value = C);
2877
- }
2878
- }), {
2879
- menuId: X,
2880
- ariaExpanded: ne,
2881
- ariaControls: D
2882
- } = nn(e, G), O = W(), S = ln(O, l);
2883
- function v(C) {
2884
- e.openOnClear && (G.value = !0), x.value = "";
2885
- }
2886
- function P() {
2887
- z.value || (G.value = !0);
2888
- }
2889
- function V(C) {
2890
- z.value || (i.value && (C.preventDefault(), C.stopPropagation()), G.value = !G.value);
2891
- }
2892
- function $(C) {
2893
- (St(C) || C.key === "Backspace") && l.value?.focus();
2894
- }
2895
- function K(C) {
2896
- if (F.isReadonly.value) return;
2897
- const Q = l.value?.selectionStart, Z = k.value.length;
2898
- if (["Enter", "ArrowDown", "ArrowUp"].includes(C.key) && C.preventDefault(), ["Enter", "ArrowDown"].includes(C.key) && (G.value = !0), ["Escape"].includes(C.key) && (G.value = !1), U.value && ["Enter", "Tab"].includes(C.key) && ee.value && !k.value.some((ae) => {
2899
- let {
2900
- value: Ce
2901
- } = ae;
2902
- return Ce === ee.value.value;
2903
- }) && ye(ee.value), C.key === "ArrowDown" && U.value && O.value?.focus("next"), ["Backspace", "Delete"].includes(C.key)) {
2904
- if (!e.multiple && q.value && k.value.length > 0 && !x.value) return ye(k.value[0], !1);
2905
- if (~o.value) {
2906
- C.preventDefault();
2907
- const ae = o.value;
2908
- ye(k.value[o.value], !1), o.value = ae >= Z - 1 ? Z - 2 : ae;
2909
- } else C.key === "Backspace" && !x.value && (o.value = Z - 1);
2910
- return;
2911
- }
2912
- if (e.multiple)
2913
- if (C.key === "ArrowLeft") {
2914
- if (o.value < 0 && Q && Q > 0) return;
2915
- const ae = o.value > -1 ? o.value - 1 : Z - 1;
2916
- if (k.value[ae])
2917
- o.value = ae;
2918
- else {
2919
- const Ce = x.value?.length ?? null;
2920
- o.value = -1, l.value?.setSelectionRange(Ce, Ce);
2921
- }
2922
- } else if (C.key === "ArrowRight") {
2923
- if (o.value < 0) return;
2924
- const ae = o.value + 1;
2925
- k.value[ae] ? o.value = ae : (o.value = -1, l.value?.setSelectionRange(0, 0));
2926
- } else ~o.value && St(C) && (o.value = -1);
2927
- }
2928
- function ue(C) {
2929
- if (ot(l.value, ":autofill") || ot(l.value, ":-webkit-autofill")) {
2930
- const Q = m.value.find((Z) => Z.title === C.target.value);
2931
- Q && ye(Q);
2932
- }
2933
- }
2934
- function ge() {
2935
- e.eager && d.value?.calculateVisibleItems();
2936
- }
2937
- function fe() {
2938
- i.value && (c.value = !0, l.value?.focus()), r.value = null;
2939
- }
2940
- function _e(C) {
2941
- i.value = !0, setTimeout(() => {
2942
- s.value = !0;
2943
- });
2944
- }
2945
- function Y(C) {
2946
- s.value = !1;
2947
- }
2948
- function me(C) {
2949
- (C == null || C === "" && !e.multiple && !q.value) && (k.value = []);
2950
- }
2951
- const H = J(!1);
2952
- function ye(C) {
2953
- let Q = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
2954
- if (!(!C || C.props.disabled))
2955
- if (e.multiple) {
2956
- const Z = k.value.findIndex((Ce) => (e.valueComparator || We)(Ce.value, C.value)), ae = Q ?? !~Z;
2957
- if (~Z) {
2958
- const Ce = ae ? [...k.value, C] : [...k.value];
2959
- Ce.splice(Z, 1), k.value = Ce;
2960
- } else ae && (k.value = [...k.value, C]);
2961
- e.clearOnSelect && (x.value = "");
2962
- } else {
2963
- const Z = Q !== !1;
2964
- k.value = Z ? [C] : [], r.value = c.value ? "" : x.value ?? "", x.value = Z && !q.value ? C.title : "", Ve(() => {
2965
- G.value = !1, c.value = !0;
2966
- });
2967
- }
2968
- }
2969
- return re(i, (C, Q) => {
2970
- C !== Q && (C ? (H.value = !0, x.value = e.multiple || q.value ? "" : String(k.value.at(-1)?.props.title ?? ""), c.value = !0, Ve(() => H.value = !1)) : (!e.multiple && x.value == null && (k.value = []), G.value = !1, !c.value && x.value && (r.value = x.value), x.value = "", o.value = -1));
2971
- }), re(x, (C) => {
2972
- !i.value || H.value || (C && (G.value = !0), c.value = !C);
2973
- }), re(G, (C) => {
2974
- if (!e.hideSelected && C && k.value.length && c.value) {
2975
- const Q = p.value.findIndex((Z) => k.value.some((ae) => Z.value === ae.value));
2976
- at && window.requestAnimationFrame(() => {
2977
- Q >= 0 && d.value?.scrollToIndex(Q);
2978
- });
2979
- }
2980
- C && (r.value = null);
2981
- }), re(m, (C, Q) => {
2982
- G.value || i.value && !Q.length && C.length && (G.value = !0);
2983
- }), ve(() => {
2984
- const C = !!(!e.hideNoData || p.value.length || t["prepend-item"] || t["append-item"] || t["no-data"]), Q = k.value.length > 0, Z = Ke.filterProps(e);
2985
- return f(Ke, R({
2986
- ref: l
2987
- }, Z, {
2988
- modelValue: x.value,
2989
- "onUpdate:modelValue": [(ae) => x.value = ae, me],
2990
- focused: i.value,
2991
- "onUpdate:focused": (ae) => i.value = ae,
2992
- validationValue: k.externalValue,
2993
- counterValue: B.value,
2994
- dirty: Q,
2995
- onChange: ue,
2996
- class: ["v-autocomplete", `v-autocomplete--${e.multiple ? "multiple" : "single"}`, {
2997
- "v-autocomplete--active-menu": G.value,
2998
- "v-autocomplete--chips": !!e.chips,
2999
- "v-autocomplete--selection-slot": !!q.value,
3000
- "v-autocomplete--selecting-index": o.value > -1
3001
- }, e.class],
3002
- style: e.style,
3003
- readonly: F.isReadonly.value,
3004
- placeholder: Q ? void 0 : e.placeholder,
3005
- "onClick:clear": v,
3006
- "onMousedown:control": P,
3007
- onKeydown: K,
3008
- "aria-expanded": ne.value,
3009
- "aria-controls": D.value
3010
- }), {
3011
- ...t,
3012
- default: (ae) => {
3013
- let {
3014
- id: Ce
3015
- } = ae;
3016
- return b(de, null, [f(Rl, R({
3017
- id: X.value,
3018
- ref: u,
3019
- modelValue: G.value,
3020
- "onUpdate:modelValue": (he) => G.value = he,
3021
- activator: "parent",
3022
- contentClass: "v-autocomplete__content",
3023
- disabled: z.value,
3024
- eager: e.eager,
3025
- maxHeight: 310,
3026
- openOnClick: !1,
3027
- closeOnContentClick: !1,
3028
- onAfterEnter: ge,
3029
- onAfterLeave: fe
3030
- }, e.menuProps), {
3031
- default: () => [C && f(Yt, R({
3032
- ref: O,
3033
- filterable: !0,
3034
- selected: te.value,
3035
- selectStrategy: e.multiple ? "independent" : "single-independent",
3036
- onMousedown: (he) => he.preventDefault(),
3037
- onKeydown: $,
3038
- onFocusin: _e,
3039
- onFocusout: Y,
3040
- tabindex: "-1",
3041
- selectable: !!p.value.length,
3042
- "aria-live": "polite",
3043
- "aria-labelledby": `${Ce.value}-label`,
3044
- "aria-multiselectable": e.multiple,
3045
- color: e.itemColor ?? e.color
3046
- }, S, e.listProps), {
3047
- default: () => [t["prepend-item"]?.(), !p.value.length && !e.hideNoData && (t["no-data"]?.() ?? f(it, {
3048
- key: "no-data",
3049
- title: n(e.noDataText)
3050
- }, null)), f(tn, {
3051
- ref: d,
3052
- renderless: !0,
3053
- items: p.value,
3054
- itemKey: "value"
3055
- }, {
3056
- default: (he) => {
3057
- let {
3058
- item: se,
3059
- index: Ee,
3060
- itemRef: yt
3061
- } = he;
3062
- const et = R(se.props, {
3063
- ref: yt,
3064
- key: se.value,
3065
- active: U.value && se === ee.value ? !0 : void 0,
3066
- onClick: () => ye(se, null),
3067
- "aria-posinset": Ee + 1,
3068
- "aria-setsize": p.value.length
3069
- });
3070
- return se.type === "divider" ? t.divider?.({
3071
- props: se.raw,
3072
- index: Ee
3073
- }) ?? f(Le, R(se.props, {
3074
- key: `divider-${Ee}`
3075
- }), null) : se.type === "subheader" ? t.subheader?.({
3076
- props: se.raw,
3077
- index: Ee
3078
- }) ?? f(Ml, R(se.props, {
3079
- key: `subheader-${Ee}`
3080
- }), null) : t.item?.({
3081
- item: se,
3082
- index: Ee,
3083
- props: et
3084
- }) ?? f(it, R(et, {
3085
- role: "option"
3086
- }), {
3087
- prepend: (tt) => {
3088
- let {
3089
- isSelected: Ae
3090
- } = tt;
3091
- return b(de, null, [e.multiple && !e.hideSelected ? f(Jl, {
3092
- key: se.value,
3093
- modelValue: Ae,
3094
- ripple: !1,
3095
- tabindex: "-1",
3096
- "aria-hidden": !0,
3097
- onClick: (cn) => cn.preventDefault()
3098
- }, null) : void 0, se.props.prependAvatar && f(Xe, {
3099
- image: se.props.prependAvatar
3100
- }, null), se.props.prependIcon && f(Se, {
3101
- icon: se.props.prependIcon
3102
- }, null)]);
3103
- },
3104
- title: () => c.value ? se.title : Ma("v-autocomplete", se.title, A(se)?.title)
3105
- });
3106
- }
3107
- }), t["append-item"]?.()]
3108
- })]
3109
- }), k.value.map((he, se) => {
3110
- function Ee(Ae) {
3111
- Ae.stopPropagation(), Ae.preventDefault(), ye(he, !1);
3112
- }
3113
- const yt = R(st.filterProps(he.props), {
3114
- "onClick:close": Ee,
3115
- onKeydown(Ae) {
3116
- Ae.key !== "Enter" && Ae.key !== " " || (Ae.preventDefault(), Ae.stopPropagation(), Ee(Ae));
3117
- },
3118
- onMousedown(Ae) {
3119
- Ae.preventDefault(), Ae.stopPropagation();
3120
- },
3121
- modelValue: !0,
3122
- "onUpdate:modelValue": void 0
3123
- }), et = E.value ? !!t.chip : !!t.selection, tt = et ? $l(E.value ? t.chip({
3124
- item: he,
3125
- index: se,
3126
- props: yt
3127
- }) : t.selection({
3128
- item: he,
3129
- index: se
3130
- })) : void 0;
3131
- if (!(et && !tt))
3132
- return b("div", {
3133
- key: he.value,
3134
- class: ce(["v-autocomplete__selection", se === o.value && ["v-autocomplete__selection--selected", h.value]]),
3135
- style: Ie(se === o.value ? I.value : {})
3136
- }, [E.value ? t.chip ? f(Fe, {
3137
- key: "chip-defaults",
3138
- defaults: {
3139
- VChip: {
3140
- closable: M.value,
3141
- size: "small",
3142
- text: he.title
3143
- }
3144
- }
3145
- }, {
3146
- default: () => [tt]
3147
- }) : f(st, R({
3148
- key: "chip",
3149
- closable: M.value,
3150
- size: "small",
3151
- text: he.title,
3152
- disabled: he.props.disabled
3153
- }, yt), null) : tt ?? b("span", {
3154
- class: "v-autocomplete__selection-text"
3155
- }, [he.title, e.multiple && se < k.value.length - 1 && b("span", {
3156
- class: "v-autocomplete__selection-comma"
3157
- }, [vl(",")])])]);
3158
- })]);
3159
- },
3160
- "append-inner": function() {
3161
- for (var ae = arguments.length, Ce = new Array(ae), he = 0; he < ae; he++)
3162
- Ce[he] = arguments[he];
3163
- return b(de, null, [t["append-inner"]?.(...Ce), e.menuIcon ? f(Se, {
3164
- class: "v-autocomplete__menu-icon",
3165
- color: l.value?.fieldIconColor,
3166
- icon: e.menuIcon,
3167
- onMousedown: V,
3168
- onClick: Dn,
3169
- "aria-hidden": !0,
3170
- tabindex: "-1"
3171
- }, null) : void 0, e.appendInnerIcon && f(_, {
3172
- key: "append-icon",
3173
- name: "appendInner",
3174
- color: Ce[0].iconColor.value
3175
- }, null)]);
3176
- }
3177
- });
3178
- }), gt({
3179
- isFocused: i,
3180
- isPristine: c,
3181
- menu: G,
3182
- search: x,
3183
- filteredItems: L,
3184
- select: ye
3185
- }, l);
3186
- }
3187
- }), La = j({
3188
- bordered: Boolean,
3189
- color: String,
3190
- content: [Number, String],
3191
- dot: Boolean,
3192
- floating: Boolean,
3193
- icon: be,
3194
- inline: Boolean,
3195
- label: {
3196
- type: String,
3197
- default: "$vuetify.badge"
3198
- },
3199
- max: [Number, String],
3200
- modelValue: {
3201
- type: Boolean,
3202
- default: !0
3203
- },
3204
- offsetX: [Number, String],
3205
- offsetY: [Number, String],
3206
- textColor: String,
3207
- ...pe(),
3208
- ...Jt({
3209
- location: "top end"
3210
- }),
3211
- ...ct(),
3212
- ...Be(),
3213
- ...Ne(),
3214
- ..._t({
3215
- transition: "scale-rotate-transition"
3216
- }),
3217
- ...ft()
3218
- }, "VBadge"), Ha = oe()({
3219
- name: "VBadge",
3220
- inheritAttrs: !1,
3221
- props: La(),
3222
- setup(e, a) {
3223
- const {
3224
- backgroundColorClasses: t,
3225
- backgroundColorStyles: n
3226
- } = wt(() => e.color), {
3227
- roundedClasses: l
3228
- } = rt(e), {
3229
- t: i
3230
- } = Ze(), {
3231
- textColorClasses: c,
3232
- textColorStyles: s
3233
- } = mt(() => e.textColor), {
3234
- themeClasses: u
3235
- } = Tn(), {
3236
- locationStyles: d
3237
- } = qt(e, !0, (r) => (e.floating ? e.dot ? 2 : 4 : e.dot ? 8 : 12) + (["top", "bottom"].includes(r) ? Number(e.offsetY ?? 0) : ["left", "right"].includes(r) ? Number(e.offsetX ?? 0) : 0)), {
3238
- dimensionStyles: o
3239
- } = vt(e);
3240
- return ve(() => {
3241
- const r = Number(e.content), m = !e.max || isNaN(r) ? e.content : r <= Number(e.max) ? r : `${e.max}+`, [g, y] = Bn(a.attrs, ["aria-atomic", "aria-label", "aria-live", "role", "title"]);
3242
- return f(e.tag, R({
3243
- class: ["v-badge", {
3244
- "v-badge--bordered": e.bordered,
3245
- "v-badge--dot": e.dot,
3246
- "v-badge--floating": e.floating,
3247
- "v-badge--inline": e.inline
3248
- }, e.class]
3249
- }, y, {
3250
- style: e.style
3251
- }), {
3252
- default: () => [b("div", {
3253
- class: "v-badge__wrapper"
3254
- }, [a.slots.default?.(), f(Xt, {
3255
- transition: e.transition
3256
- }, {
3257
- default: () => [He(b("span", R({
3258
- class: ["v-badge__badge", u.value, t.value, l.value, c.value],
3259
- style: [n.value, s.value, o.value, e.inline ? {} : d.value],
3260
- "aria-atomic": "true",
3261
- "aria-label": i(e.label, r),
3262
- "aria-live": "polite",
3263
- role: "status"
3264
- }, g), [e.dot ? void 0 : a.slots.badge ? a.slots.badge?.() : e.icon ? f(Se, {
3265
- icon: e.icon
3266
- }, null) : m]), [[Ct, e.modelValue]])]
3267
- })])]
3268
- });
3269
- }), {};
3270
- }
3271
- }), za = j({
3272
- fullscreen: Boolean,
3273
- scrollable: Boolean,
3274
- ...Ge(On({
3275
- captureFocus: !0,
3276
- origin: "center center",
3277
- scrollStrategy: "block",
3278
- transition: {
3279
- component: Nl
3280
- },
3281
- zIndex: 2400,
3282
- retainFocus: !0
3283
- }), ["disableInitialFocus"])
3284
- }, "VDialog"), on = oe()({
3285
- name: "VDialog",
3286
- props: za(),
3287
- emits: {
3288
- "update:modelValue": (e) => !0,
3289
- afterEnter: () => !0,
3290
- afterLeave: () => !0
3291
- },
3292
- setup(e, a) {
3293
- let {
3294
- emit: t,
3295
- slots: n
3296
- } = a;
3297
- const l = we(e, "modelValue"), {
3298
- scopeId: i
3299
- } = En(), c = W();
3300
- function s() {
3301
- t("afterEnter"), (e.scrim || e.retainFocus) && c.value?.contentEl && !c.value.contentEl.contains(document.activeElement) && c.value.contentEl.focus({
3302
- preventScroll: !0
3303
- });
3304
- }
3305
- function u() {
3306
- t("afterLeave");
3307
- }
3308
- return re(l, async (d) => {
3309
- d || (await Ve(), c.value.activatorEl?.focus({
3310
- preventScroll: !0
3311
- }));
3312
- }), ve(() => {
3313
- const d = al.filterProps(e), o = R({
3314
- "aria-haspopup": "dialog"
3315
- }, e.activatorProps), r = R({
3316
- tabindex: -1
3317
- }, e.contentProps);
3318
- return f(al, R({
3319
- ref: c,
3320
- class: ["v-dialog", {
3321
- "v-dialog--fullscreen": e.fullscreen,
3322
- "v-dialog--scrollable": e.scrollable
3323
- }, e.class],
3324
- style: e.style
3325
- }, d, {
3326
- modelValue: l.value,
3327
- "onUpdate:modelValue": (m) => l.value = m,
3328
- "aria-modal": "true",
3329
- activatorProps: o,
3330
- contentProps: r,
3331
- height: e.fullscreen ? void 0 : e.height,
3332
- width: e.fullscreen ? void 0 : e.width,
3333
- maxHeight: e.fullscreen ? void 0 : e.maxHeight,
3334
- maxWidth: e.fullscreen ? void 0 : e.maxWidth,
3335
- role: "dialog",
3336
- onAfterEnter: s,
3337
- onAfterLeave: u
3338
- }, i), {
3339
- activator: n.activator,
3340
- default: function() {
3341
- for (var m = arguments.length, g = new Array(m), y = 0; y < m; y++)
3342
- g[y] = arguments[y];
3343
- return f(Fe, {
3344
- root: "VDialog"
3345
- }, {
3346
- default: () => [n.default?.(...g)]
3347
- });
3348
- }
3349
- });
3350
- }), gt({}, c);
3351
- }
3352
- }), Ua = j({
3353
- ...pe(),
3354
- ...Be()
3355
- }, "VCardActions"), un = oe()({
3356
- name: "VCardActions",
3357
- props: Ua(),
3358
- setup(e, a) {
3359
- let {
3360
- slots: t
3361
- } = a;
3362
- return zt({
3363
- VBtn: {
3364
- slim: !0,
3365
- variant: "text"
3366
- }
3367
- }), ve(() => f(e.tag, {
3368
- class: ce(["v-card-actions", e.class]),
3369
- style: Ie(e.style)
3370
- }, t)), {};
3371
- }
3372
- }), Ka = j({
3373
- opacity: [Number, String],
3374
- ...pe(),
3375
- ...Be()
3376
- }, "VCardSubtitle"), ja = oe()({
3377
- name: "VCardSubtitle",
3378
- props: Ka(),
3379
- setup(e, a) {
3380
- let {
3381
- slots: t
3382
- } = a;
3383
- return ve(() => f(e.tag, {
3384
- class: ce(["v-card-subtitle", e.class]),
3385
- style: Ie([{
3386
- "--v-card-subtitle-opacity": e.opacity
3387
- }, e.style])
3388
- }, t)), {};
3389
- }
3390
- }), Zt = Rn("v-card-title"), Ga = j({
3391
- appendAvatar: String,
3392
- appendIcon: be,
3393
- prependAvatar: String,
3394
- prependIcon: be,
3395
- subtitle: {
3396
- type: [String, Number, Boolean],
3397
- default: void 0
3398
- },
3399
- title: {
3400
- type: [String, Number, Boolean],
3401
- default: void 0
3402
- },
3403
- ...pe(),
3404
- ...dt(),
3405
- ...Be()
3406
- }, "VCardItem"), Wa = oe()({
3407
- name: "VCardItem",
3408
- props: Ga(),
3409
- setup(e, a) {
3410
- let {
3411
- slots: t
3412
- } = a;
3413
- return ve(() => {
3414
- const n = !!(e.prependAvatar || e.prependIcon), l = !!(n || t.prepend), i = !!(e.appendAvatar || e.appendIcon), c = !!(i || t.append), s = !!(e.title != null || t.title), u = !!(e.subtitle != null || t.subtitle);
3415
- return f(e.tag, {
3416
- class: ce(["v-card-item", e.class]),
3417
- style: Ie(e.style)
3418
- }, {
3419
- default: () => [l && b("div", {
3420
- key: "prepend",
3421
- class: "v-card-item__prepend"
3422
- }, [t.prepend ? f(Fe, {
3423
- key: "prepend-defaults",
3424
- disabled: !n,
3425
- defaults: {
3426
- VAvatar: {
3427
- density: e.density,
3428
- image: e.prependAvatar
3429
- },
3430
- VIcon: {
3431
- density: e.density,
3432
- icon: e.prependIcon
3433
- }
3434
- }
3435
- }, t.prepend) : b(de, null, [e.prependAvatar && f(Xe, {
3436
- key: "prepend-avatar",
3437
- density: e.density,
3438
- image: e.prependAvatar
3439
- }, null), e.prependIcon && f(Se, {
3440
- key: "prepend-icon",
3441
- density: e.density,
3442
- icon: e.prependIcon
3443
- }, null)])]), b("div", {
3444
- class: "v-card-item__content"
3445
- }, [s && f(Zt, {
3446
- key: "title"
3447
- }, {
3448
- default: () => [t.title?.() ?? bt(e.title)]
3449
- }), u && f(ja, {
3450
- key: "subtitle"
3451
- }, {
3452
- default: () => [t.subtitle?.() ?? bt(e.subtitle)]
3453
- }), t.default?.()]), c && b("div", {
3454
- key: "append",
3455
- class: "v-card-item__append"
3456
- }, [t.append ? f(Fe, {
3457
- key: "append-defaults",
3458
- disabled: !i,
3459
- defaults: {
3460
- VAvatar: {
3461
- density: e.density,
3462
- image: e.appendAvatar
3463
- },
3464
- VIcon: {
3465
- density: e.density,
3466
- icon: e.appendIcon
3467
- }
3468
- }
3469
- }, t.append) : b(de, null, [e.appendIcon && f(Se, {
3470
- key: "append-icon",
3471
- density: e.density,
3472
- icon: e.appendIcon
3473
- }, null), e.appendAvatar && f(Xe, {
3474
- key: "append-avatar",
3475
- density: e.density,
3476
- image: e.appendAvatar
3477
- }, null)])])]
3478
- });
3479
- }), {};
3480
- }
3481
- }), qa = j({
3482
- opacity: [Number, String],
3483
- ...pe(),
3484
- ...Be()
3485
- }, "VCardText"), el = oe()({
3486
- name: "VCardText",
3487
- props: qa(),
3488
- setup(e, a) {
3489
- let {
3490
- slots: t
3491
- } = a;
3492
- return ve(() => f(e.tag, {
3493
- class: ce(["v-card-text", e.class]),
3494
- style: Ie([{
3495
- "--v-card-text-opacity": e.opacity
3496
- }, e.style])
3497
- }, t)), {};
3498
- }
3499
- }), Ja = j({
3500
- appendAvatar: String,
3501
- appendIcon: be,
3502
- disabled: Boolean,
3503
- flat: Boolean,
3504
- hover: Boolean,
3505
- image: String,
3506
- link: {
3507
- type: Boolean,
3508
- default: void 0
3509
- },
3510
- prependAvatar: String,
3511
- prependIcon: be,
3512
- ripple: {
3513
- type: [Boolean, Object],
3514
- default: !0
3515
- },
3516
- subtitle: {
3517
- type: [String, Number, Boolean],
3518
- default: void 0
3519
- },
3520
- text: {
3521
- type: [String, Number, Boolean],
3522
- default: void 0
3523
- },
3524
- title: {
3525
- type: [String, Number, Boolean],
3526
- default: void 0
3527
- },
3528
- ...Wt(),
3529
- ...pe(),
3530
- ...dt(),
3531
- ...ft(),
3532
- ...Gt(),
3533
- ...Bl(),
3534
- ...Jt(),
3535
- ...Il(),
3536
- ...ct(),
3537
- ...Vl(),
3538
- ...Be(),
3539
- ...Ne(),
3540
- ...Ut({
3541
- variant: "elevated"
3542
- })
3543
- }, "VCard"), sn = oe()({
3544
- name: "VCard",
3545
- directives: {
3546
- vRipple: Je
3547
- },
3548
- props: Ja(),
3549
- setup(e, a) {
3550
- let {
3551
- attrs: t,
3552
- slots: n
3553
- } = a;
3554
- const {
3555
- themeClasses: l
3556
- } = Qe(e), {
3557
- borderClasses: i
3558
- } = Kt(e), {
3559
- colorClasses: c,
3560
- colorStyles: s,
3561
- variantClasses: u
3562
- } = kl(e), {
3563
- densityClasses: d
3564
- } = It(e), {
3565
- dimensionStyles: o
3566
- } = vt(e), {
3567
- elevationClasses: r
3568
- } = jt(e), {
3569
- loaderClasses: m
3570
- } = Dl(e), {
3571
- locationStyles: g
3572
- } = qt(e), {
3573
- positionClasses: y
3574
- } = xl(e), {
3575
- roundedClasses: h
3576
- } = rt(e), I = pl(e, t), _ = J(void 0);
3577
- return re(() => e.loading, (x, k) => {
3578
- _.value = !x && typeof k == "string" ? k : typeof x == "boolean" ? void 0 : x;
3579
- }, {
3580
- immediate: !0
3581
- }), ve(() => {
3582
- const x = e.link !== !1 && I.isLink.value, k = !e.disabled && e.link !== !1 && (e.link || I.isClickable.value), B = x ? "a" : e.tag, F = !!(n.title || e.title != null), L = !!(n.subtitle || e.subtitle != null), A = F || L, p = !!(n.append || e.appendAvatar || e.appendIcon), M = !!(n.prepend || e.prependAvatar || e.prependIcon), E = !!(n.image || e.image), q = A || M || p, te = !!(n.text || e.text != null);
3583
- return He(f(B, R(I.linkProps, {
3584
- class: ["v-card", {
3585
- "v-card--disabled": e.disabled,
3586
- "v-card--flat": e.flat,
3587
- "v-card--hover": e.hover && !(e.disabled || e.flat),
3588
- "v-card--link": k
3589
- }, l.value, i.value, c.value, d.value, r.value, m.value, y.value, h.value, u.value, e.class],
3590
- style: [s.value, o.value, g.value, e.style],
3591
- onClick: k && I.navigate,
3592
- tabindex: e.disabled ? -1 : void 0
3593
- }), {
3594
- default: () => [E && b("div", {
3595
- key: "image",
3596
- class: "v-card__image"
3597
- }, [n.image ? f(Fe, {
3598
- key: "image-defaults",
3599
- disabled: !e.image,
3600
- defaults: {
3601
- VImg: {
3602
- cover: !0,
3603
- src: e.image
3604
- }
3605
- }
3606
- }, n.image) : f(Mn, {
3607
- key: "image-img",
3608
- cover: !0,
3609
- src: e.image
3610
- }, null)]), f(Tl, {
3611
- name: "v-card",
3612
- active: !!e.loading,
3613
- color: _.value
3614
- }, {
3615
- default: n.loader
3616
- }), q && f(Wa, {
3617
- key: "item",
3618
- prependAvatar: e.prependAvatar,
3619
- prependIcon: e.prependIcon,
3620
- title: e.title,
3621
- subtitle: e.subtitle,
3622
- appendAvatar: e.appendAvatar,
3623
- appendIcon: e.appendIcon
3624
- }, {
3625
- default: n.item,
3626
- prepend: n.prepend,
3627
- title: n.title,
3628
- subtitle: n.subtitle,
3629
- append: n.append
3630
- }), te && f(el, {
3631
- key: "text"
3632
- }, {
3633
- default: () => [n.text?.() ?? e.text]
3634
- }), n.default?.(), n.actions && f(un, null, {
3635
- default: n.actions
3636
- }), Sl(k, "v-card")]
3637
- }), [[Je, k && e.ripple]]);
3638
- }), {};
3639
- }
3640
- }), Xa = 50, Ya = 500;
3641
- function Qa(e) {
3642
- let {
3643
- toggleUpDown: a
3644
- } = e, t = -1, n = -1;
3645
- nt(i);
3646
- function l(s) {
3647
- i(), c(s), window.addEventListener("pointerup", i), document.addEventListener("blur", i), t = window.setTimeout(() => {
3648
- n = window.setInterval(() => c(s), Xa);
3649
- }, Ya);
3650
- }
3651
- function i() {
3652
- window.clearTimeout(t), window.clearInterval(n), window.removeEventListener("pointerup", i), document.removeEventListener("blur", i);
3653
- }
3654
- nt(i);
3655
- function c(s) {
3656
- a(s === "up");
3657
- }
3658
- return {
3659
- holdStart: l,
3660
- holdStop: i
3661
- };
3662
- }
3663
- const Za = j({
3664
- controlVariant: {
3665
- type: String,
3666
- default: "default"
3667
- },
3668
- inset: Boolean,
3669
- hideInput: Boolean,
3670
- modelValue: {
3671
- type: Number,
3672
- default: null
3673
- },
3674
- min: {
3675
- type: Number,
3676
- default: Number.MIN_SAFE_INTEGER
3677
- },
3678
- max: {
3679
- type: Number,
3680
- default: Number.MAX_SAFE_INTEGER
3681
- },
3682
- step: {
3683
- type: Number,
3684
- default: 1
3685
- },
3686
- precision: {
3687
- type: Number,
3688
- default: 0
3689
- },
3690
- minFractionDigits: {
3691
- type: Number,
3692
- default: null
3693
- },
3694
- decimalSeparator: {
3695
- type: String,
3696
- validator: (e) => !e || e.length === 1
3697
- },
3698
- ...Ge(Tt(), ["modelValue", "validationValue"])
3699
- }, "VNumberInput"), eo = oe()({
3700
- name: "VNumberInput",
3701
- props: {
3702
- ...Za()
3703
- },
3704
- emits: {
3705
- "update:focused": (e) => !0,
3706
- "update:modelValue": (e) => !0
3707
- },
3708
- setup(e, a) {
3709
- let {
3710
- slots: t
3711
- } = a;
3712
- const n = W(), {
3713
- holdStart: l,
3714
- holdStop: i
3715
- } = Qa({
3716
- toggleUpDown: q
3717
- }), c = Dt(e), s = w(() => c.isDisabled.value || c.isReadonly.value), u = J(e.focused), {
3718
- decimalSeparator: d
3719
- } = Ze(), o = w(() => e.decimalSeparator?.[0] || d.value);
3720
- function r(v) {
3721
- let P = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e.precision, V = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
3722
- const $ = P == null ? String(v) : v.toFixed(P);
3723
- if (u.value && V)
3724
- return Number($).toString().replace(".", o.value);
3725
- if (e.minFractionDigits === null || P !== null && P < e.minFractionDigits)
3726
- return $.replace(".", o.value);
3727
- let [K, ue] = $.split(".");
3728
- return ue = (ue ?? "").padEnd(e.minFractionDigits, "0").replace(new RegExp(`(?<=\\d{${e.minFractionDigits}})0+$`, "g"), ""), [K, ue].filter(Boolean).join(o.value);
3729
- }
3730
- const m = we(e, "modelValue", null, (v) => v ?? null, (v) => v == null ? v ?? null : Me(Number(v), e.min, e.max)), g = J(null), y = J(null);
3731
- re(m, (v) => {
3732
- u.value && !s.value && Number(g.value?.replace(o.value, ".")) === v || (v == null ? (g.value = null, y.value = null) : isNaN(v) || (g.value = r(v), y.value = Number(g.value.replace(o.value, "."))));
3733
- }, {
3734
- immediate: !0
3735
- });
3736
- const h = w({
3737
- get: () => g.value,
3738
- set(v) {
3739
- if (v === null || v === "") {
3740
- m.value = null, g.value = null, y.value = null;
3741
- return;
3742
- }
3743
- const P = Number(v.replace(o.value, "."));
3744
- isNaN(P) || (g.value = v, y.value = P, P <= e.max && P >= e.min && (m.value = P));
3745
- }
3746
- }), I = w(() => {
3747
- if (y.value === null) return !1;
3748
- const v = Number(g.value?.replace(o.value, "."));
3749
- return v !== Me(v, e.min, e.max);
3750
- }), _ = w(() => s.value ? !1 : (m.value ?? 0) + e.step <= e.max), x = w(() => s.value ? !1 : (m.value ?? 0) - e.step >= e.min), k = w(() => e.hideInput ? "stacked" : e.controlVariant), B = T(() => k.value === "split" ? "$plus" : "$collapse"), F = T(() => k.value === "split" ? "$minus" : "$expand"), L = T(() => k.value === "split" ? "default" : "small"), A = T(() => k.value === "stacked" ? "auto" : "100%"), p = {
3751
- props: {
3752
- onClick: U,
3753
- onPointerup: z,
3754
- onPointerdown: ie,
3755
- onPointercancel: z
3756
- }
3757
- }, M = {
3758
- props: {
3759
- onClick: U,
3760
- onPointerup: z,
3761
- onPointerdown: G,
3762
- onPointercancel: z
3763
- }
3764
- };
3765
- re(() => e.precision, () => ne()), re(() => e.minFractionDigits, () => ne()), Ye(() => {
3766
- X();
3767
- });
3768
- function E(v) {
3769
- if (v == null) return 0;
3770
- const P = v.toString(), V = P.indexOf(".");
3771
- return ~V ? P.length - V : 0;
3772
- }
3773
- function q() {
3774
- let v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
3775
- if (s.value) return;
3776
- if (m.value == null) {
3777
- h.value = r(Me(0, e.min, e.max));
3778
- return;
3779
- }
3780
- let P = Math.max(E(m.value), E(e.step));
3781
- e.precision != null && (P = Math.max(P, e.precision)), v ? _.value && (h.value = r(m.value + e.step, P)) : x.value && (h.value = r(m.value - e.step, P));
3782
- }
3783
- function te(v) {
3784
- if (!v.data) return;
3785
- const P = v.target, {
3786
- value: V,
3787
- selectionStart: $,
3788
- selectionEnd: K
3789
- } = P ?? {}, ue = V ? V.slice(0, $) + v.data + V.slice(K) : v.data, ge = $n(ue, e.precision, o.value);
3790
- if (new RegExp(`^-?\\d*${Nn(o.value)}?\\d*$`).test(ue) || (v.preventDefault(), P.value = ge, Ve(() => h.value = ge)), e.precision != null) {
3791
- if (ue.split(o.value)[1]?.length > e.precision) {
3792
- v.preventDefault(), P.value = ge, Ve(() => h.value = ge);
3793
- const fe = ($ ?? 0) + v.data.length;
3794
- P.setSelectionRange(fe, fe);
3795
- }
3796
- e.precision === 0 && ue.endsWith(o.value) && (v.preventDefault(), P.value = ge, Ve(() => h.value = ge));
3797
- }
3798
- }
3799
- async function ee(v) {
3800
- ["Enter", "ArrowLeft", "ArrowRight", "Backspace", "Delete", "Tab"].includes(v.key) || v.ctrlKey || ["ArrowDown", "ArrowUp"].includes(v.key) && (v.preventDefault(), v.stopPropagation(), X(), await Ve(), v.key === "ArrowDown" ? q(!1) : q());
3801
- }
3802
- function U(v) {
3803
- v.stopPropagation();
3804
- }
3805
- function z(v) {
3806
- v.currentTarget?.releasePointerCapture(v.pointerId), v.preventDefault(), i();
3807
- }
3808
- function ie(v) {
3809
- v.currentTarget?.setPointerCapture(v.pointerId), v.preventDefault(), v.stopPropagation(), l("up");
3810
- }
3811
- function G(v) {
3812
- v.currentTarget?.setPointerCapture(v.pointerId), v.preventDefault(), v.stopPropagation(), l("down");
3813
- }
3814
- function X() {
3815
- if (s.value || !n.value) return;
3816
- const v = n.value.value, P = Number(v.replace(o.value, "."));
3817
- v && !isNaN(P) ? h.value = r(Me(P, e.min, e.max)) : h.value = null;
3818
- }
3819
- function ne() {
3820
- s.value || (h.value = m.value !== null && !isNaN(m.value) ? r(m.value, e.precision, !1) : null);
3821
- }
3822
- function D() {
3823
- if (!s.value) {
3824
- if (m.value === null || isNaN(m.value)) {
3825
- h.value = null;
3826
- return;
3827
- }
3828
- h.value = m.value.toString().replace(".", o.value);
3829
- }
3830
- }
3831
- function O() {
3832
- D();
3833
- }
3834
- function S() {
3835
- X();
3836
- }
3837
- return ve(() => {
3838
- const {
3839
- modelValue: v,
3840
- type: P,
3841
- ...V
3842
- } = Ke.filterProps(e);
3843
- function $() {
3844
- return t.increment ? f(Fe, {
3845
- key: "increment-defaults",
3846
- defaults: {
3847
- VBtn: {
3848
- disabled: !_.value,
3849
- height: A.value,
3850
- size: L.value,
3851
- icon: B.value,
3852
- variant: "text"
3853
- }
3854
- }
3855
- }, {
3856
- default: () => [t.increment(p)]
3857
- }) : f(qe, {
3858
- "aria-hidden": "true",
3859
- "data-testid": "increment",
3860
- disabled: !_.value,
3861
- height: A.value,
3862
- icon: B.value,
3863
- key: "increment-btn",
3864
- onClick: U,
3865
- onPointerdown: ie,
3866
- onPointerup: z,
3867
- onPointercancel: z,
3868
- size: L.value,
3869
- variant: "text",
3870
- tabindex: "-1"
3871
- }, null);
3872
- }
3873
- function K() {
3874
- return t.decrement ? f(Fe, {
3875
- key: "decrement-defaults",
3876
- defaults: {
3877
- VBtn: {
3878
- disabled: !x.value,
3879
- height: A.value,
3880
- size: L.value,
3881
- icon: F.value,
3882
- variant: "text"
3883
- }
3884
- }
3885
- }, {
3886
- default: () => [t.decrement(M)]
3887
- }) : f(qe, {
3888
- "aria-hidden": "true",
3889
- "data-testid": "decrement",
3890
- disabled: !x.value,
3891
- height: A.value,
3892
- icon: F.value,
3893
- key: "decrement-btn",
3894
- onClick: U,
3895
- onPointerdown: G,
3896
- onPointerup: z,
3897
- onPointercancel: z,
3898
- size: L.value,
3899
- variant: "text",
3900
- tabindex: "-1"
3901
- }, null);
3902
- }
3903
- function ue() {
3904
- return b("div", {
3905
- class: "v-number-input__control"
3906
- }, [K(), f(Le, {
3907
- vertical: k.value !== "stacked"
3908
- }, null), $()]);
3909
- }
3910
- function ge() {
3911
- return !e.hideInput && !e.inset ? f(Le, {
3912
- vertical: !0
3913
- }, null) : void 0;
3914
- }
3915
- const fe = k.value === "split" ? b("div", {
3916
- class: "v-number-input__control"
3917
- }, [f(Le, {
3918
- vertical: !0
3919
- }, null), $()]) : e.reverse || k.value === "hidden" ? void 0 : b(de, null, [ge(), ue()]), _e = t["append-inner"] || fe, Y = k.value === "split" ? b("div", {
3920
- class: "v-number-input__control"
3921
- }, [K(), f(Le, {
3922
- vertical: !0
3923
- }, null)]) : e.reverse && k.value !== "hidden" ? b(de, null, [ue(), ge()]) : void 0, me = t["prepend-inner"] || Y;
3924
- return f(Ke, R({
3925
- ref: n
3926
- }, V, {
3927
- modelValue: h.value,
3928
- "onUpdate:modelValue": (H) => h.value = H,
3929
- focused: u.value,
3930
- "onUpdate:focused": (H) => u.value = H,
3931
- validationValue: m.value,
3932
- error: e.error || I.value || void 0,
3933
- onBeforeinput: te,
3934
- onFocus: O,
3935
- onBlur: S,
3936
- onKeydown: ee,
3937
- class: ["v-number-input", {
3938
- "v-number-input--default": k.value === "default",
3939
- "v-number-input--hide-input": e.hideInput,
3940
- "v-number-input--inset": e.inset,
3941
- "v-number-input--reverse": e.reverse,
3942
- "v-number-input--split": k.value === "split",
3943
- "v-number-input--stacked": k.value === "stacked"
3944
- }, e.class],
3945
- style: e.style,
3946
- inputmode: "decimal"
3947
- }), {
3948
- ...t,
3949
- "append-inner": _e ? function() {
3950
- for (var H = arguments.length, ye = new Array(H), C = 0; C < H; C++)
3951
- ye[C] = arguments[C];
3952
- return b(de, null, [t["append-inner"]?.(...ye), fe]);
3953
- } : void 0,
3954
- "prepend-inner": me ? function() {
3955
- for (var H = arguments.length, ye = new Array(H), C = 0; C < H; C++)
3956
- ye[C] = arguments[C];
3957
- return b(de, null, [Y, t["prepend-inner"]?.(...ye)]);
3958
- } : void 0
3959
- });
3960
- }), gt({}, n);
3961
- }
3962
- }), to = { class: "text-medium-emphasis ps-2" }, lo = ["id"], no = {
3963
- __name: "index",
3964
- props: {
3965
- modelValue: {},
3966
- modelModifiers: {}
3967
- },
3968
- emits: /* @__PURE__ */ Ht(["closeDialog", "save"], ["update:modelValue"]),
3969
- setup(e, { emit: a }) {
3970
- const t = Pe("table_props"), n = Pe("datatablesPluginOptions"), l = Vt(e, "modelValue"), i = a, c = {
3971
- textfield: Ke,
3972
- select: Na,
3973
- number: eo,
3974
- datepicker: Te(
3975
- () => import("./Datepicker-Duwv3zQB.js")
3976
- ),
3977
- comparison: Te(
3978
- () => import("./Comparison-DL9ojj3w.js")
3979
- )
3980
- }, s = w(() => t.headers.filter((d) => d.advancedFilter !== !1 && !d.hidden)), u = (d) => d ? typeof d == "string" ? c[d] : d : c.textfield;
3981
- return re(
3982
- s,
3983
- (d) => {
3984
- d.forEach((o) => {
3985
- const r = o.advancedFilter?.key ?? o.key;
3986
- Object.hasOwn(l.value, r) || (l.value[r] = {
3987
- comparison: "=",
3988
- value: null
3989
- });
3990
- });
3991
- },
3992
- { immediate: !0 }
3993
- ), Ye(async () => {
3994
- await t.options.advancedFilters?.onMounted();
3995
- }), (d, o) => (le(), ke(sn, { rounded: "lg" }, {
3996
- default: xe(() => [
3997
- f(Zt, { class: "d-flex justify-space-between align-center" }, {
3998
- default: xe(() => [
3999
- b("div", to, bt(d.$t("$datatables.advancedFilters")), 1),
4000
- f(qe, {
4001
- icon: N(n).header.icons.close,
4002
- variant: "text",
4003
- onClick: o[0] || (o[0] = (r) => i("closeDialog"))
4004
- }, null, 8, ["icon"])
4005
- ]),
4006
- _: 1
4007
- }),
4008
- f(Le),
4009
- f(el, { class: "overflow-auto pt-8" }, {
4010
- default: xe(() => [
4011
- (le(!0), ze(de, null, Lt(N(s), (r, m) => (le(), ze("div", {
4012
- id: `advanced-filter-${r.key}`,
4013
- key: `filter-${m}`,
4014
- class: ce(`advanced-filter advanced-filter--${r.key}`)
4015
- }, [
4016
- (le(), ke(Oe(u(r.advancedFilter?.component)), R({
4017
- modelValue: l.value[r.advancedFilter?.key ?? r.key].value,
4018
- "onUpdate:modelValue": (g) => l.value[r.advancedFilter?.key ?? r.key].value = g,
4019
- comparison: l.value[r.advancedFilter?.key ?? r.key].comparison,
4020
- "onUpdate:comparison": (g) => l.value[r.advancedFilter?.key ?? r.key].comparison = g
4021
- }, { ref_for: !0 }, r.advancedFilter?.options, {
4022
- label: r.title,
4023
- variant: "underlined",
4024
- clearable: ""
4025
- }), null, 16, ["modelValue", "onUpdate:modelValue", "comparison", "onUpdate:comparison", "label"]))
4026
- ], 10, lo))), 128))
4027
- ]),
4028
- _: 1
4029
- }),
4030
- f(Le, { class: "mt-2" }),
4031
- f(un, { class: "my-2 d-flex justify-end" }, {
4032
- default: xe(() => [
4033
- f(qe, {
4034
- class: "text-none",
4035
- text: d.$t("$datatables.cancel"),
4036
- onClick: o[1] || (o[1] = (r) => i("closeDialog"))
4037
- }, null, 8, ["text"]),
4038
- f(qe, {
4039
- class: "text-none",
4040
- color: "primary",
4041
- text: d.$t("$datatables.submit"),
4042
- variant: "flat",
4043
- onClick: o[2] || (o[2] = (r) => i("save"))
4044
- }, null, 8, ["text"])
4045
- ]),
4046
- _: 1
4047
- })
4048
- ]),
4049
- _: 1
4050
- }));
4051
- }
4052
- };
4053
- function dl(e) {
4054
- return JSON.parse(JSON.stringify(e));
4055
- }
4056
- function Nt(e, a) {
4057
- if (e === a) return !0;
4058
- if (e == null || a == null || typeof e != typeof a) return !1;
4059
- if (e instanceof Date && a instanceof Date)
4060
- return e.getTime() === a.getTime();
4061
- if (e instanceof RegExp && a instanceof RegExp)
4062
- return e.toString() === a.toString();
4063
- if (Array.isArray(e) && Array.isArray(a)) {
4064
- if (e.length !== a.length) return !1;
4065
- for (let t = 0; t < e.length; t++)
4066
- if (!Nt(e[t], a[t])) return !1;
4067
- return !0;
4068
- }
4069
- if (typeof e == "object" && typeof a == "object") {
4070
- const t = Object.keys(e), n = Object.keys(a);
4071
- if (t.length !== n.length) return !1;
4072
- for (const l of t) {
4073
- if (!n.includes(l)) return !1;
4074
- const i = e[l], c = a[l];
4075
- if (!Nt(i, c)) return !1;
4076
- }
4077
- return !0;
4078
- }
4079
- return !1;
4080
- }
4081
- const ao = {
4082
- __name: "Dialog",
4083
- props: {
4084
- modelValue: { required: !0 },
4085
- modelModifiers: {}
4086
- },
4087
- emits: ["update:modelValue"],
4088
- setup(e) {
4089
- const a = Pt(), { advancedFiltersState: t } = At(), { setData: n } = a, l = Vt(e, "modelValue"), i = W({}), c = Pe("table_props"), s = Pe("busEmits"), u = () => {
4090
- const d = Object.entries(i.value).filter(([, o]) => {
4091
- const r = o.value;
4092
- return Array.isArray(r) || typeof r == "string" ? r.length > 0 : r != null && r !== "";
4093
- }).reduce((o, [r, m]) => (o[r] = m, o), {});
4094
- Nt(d, t.value) || (n({
4095
- table_id: c.id,
4096
- name: "advancedFilters",
4097
- value: { query: dl(d) }
4098
- }), s("advancedFilters:update", d)), l.value = !1;
4099
- };
4100
- return Ye(() => {
4101
- i.value = dl(t.value);
4102
- }), (d, o) => {
4103
- const r = no, m = aa;
4104
- return le(), ze("div", null, [
4105
- f(on, {
4106
- modelValue: l.value,
4107
- "onUpdate:modelValue": o[1] || (o[1] = (g) => l.value = g),
4108
- "max-width": "550",
4109
- "retain-focus": !1
4110
- }, {
4111
- default: xe(({ isActive: g }) => [
4112
- f(r, {
4113
- modelValue: N(i),
4114
- "onUpdate:modelValue": o[0] || (o[0] = (y) => pt(i) ? i.value = y : null),
4115
- onSave: u,
4116
- onCloseDialog: (y) => g.value = !1
4117
- }, null, 8, ["modelValue", "onCloseDialog"])
4118
- ]),
4119
- _: 1
4120
- }, 8, ["modelValue"]),
4121
- Object.keys(N(t)).length ? (le(), ke(m, {
4122
- key: 0,
4123
- modelValue: N(i),
4124
- "onUpdate:modelValue": o[2] || (o[2] = (g) => pt(i) ? i.value = g : null),
4125
- onSave: u
4126
- }, null, 8, ["modelValue"])) : Re("", !0)
4127
- ]);
4128
- };
4129
- }
4130
- };
4131
- function oo() {
4132
- const e = Pe("datatablesPluginOptions"), { t: a } = zn(), { advancedFiltersState: t } = At(), n = W(!1), l = w(() => Object.keys(t.value).length);
4133
- return { advancedFiltersItems: w(() => [
4134
- {
4135
- title: `${a("$datatables.advancedFilters")}`,
4136
- onClick: () => n.value = !0,
4137
- prependIcon: e.header.icons.advancedFilters
4138
- }
4139
- ]), advancedFiltersDialog: n, activeAdvancedFilters: l };
4140
- }
4141
- const io = /* @__PURE__ */ fl({
4142
- __name: "index",
4143
- setup(e) {
4144
- const { advancedFiltersItems: a, advancedFiltersDialog: t, activeAdvancedFilters: n } = oo();
4145
- return (l, i) => {
4146
- const c = ao;
4147
- return le(), ze("div", null, [
4148
- (le(!0), ze(de, null, Lt(N(a), (s, u) => (le(), ke(qe, R({
4149
- key: u,
4150
- icon: "",
4151
- variant: "text",
4152
- color: N(n) ? "primary" : "dark",
4153
- density: "comfortable"
4154
- }, { ref_for: !0 }, s), {
4155
- default: xe(() => [
4156
- N(n) ? (le(), ke(Ha, {
4157
- key: 0,
4158
- color: "primary",
4159
- content: N(n)
4160
- }, {
4161
- default: xe(() => [
4162
- f(Se, {
4163
- icon: s.prependIcon
4164
- }, null, 8, ["icon"])
4165
- ]),
4166
- _: 2
4167
- }, 1032, ["content"])) : (le(), ke(Se, {
4168
- key: 1,
4169
- icon: s.prependIcon
4170
- }, null, 8, ["icon"]))
4171
- ]),
4172
- _: 2
4173
- }, 1040, ["color"]))), 128)),
4174
- f(c, {
4175
- modelValue: N(t),
4176
- "onUpdate:modelValue": i[0] || (i[0] = (s) => pt(t) ? t.value = s : null)
4177
- }, null, 8, ["modelValue"])
4178
- ]);
4179
- };
4180
- }
4181
- }), uo = {
4182
- class: "d-flex align-center",
4183
- style: { gap: "0.75rem" }
4184
- }, so = { class: "ms-auto" }, ro = /* @__PURE__ */ fl({
4185
- __name: "index",
4186
- props: {
4187
- responsiveHeader: { type: Boolean }
4188
- },
4189
- setup(e) {
4190
- const a = Te(() => import("./Search-BUb6ZctR.js")), t = Te(() => import("./RefreshTable-Cn3y6Lyg.js")), n = Te(() => import("./Options-CurNvolo.js")), l = Te(() => import("./index-BfwTwETw.js")), i = Te(() => import("./index-DdbT75rv.js")), c = Te(() => import("./index-A7VzNfop.js")), s = Pe("table_props"), u = W(null), d = s.options?.header?.components ?? {};
4191
- return (o, r) => {
4192
- const m = io;
4193
- return le(), ze("div", uo, [
4194
- e.responsiveHeader ? Re("", !0) : (le(), ke(m, { key: 0 })),
4195
- N(s).hardFilters.length ? (le(), ke(Oe(N(d).hardFilters ?? N(l)), {
4196
- key: 1,
4197
- id: "header-hardFilters"
4198
- })) : Re("", !0),
4199
- (le(), ke(Oe(N(d).toolbar), { id: "header-toolbar" })),
4200
- b("div", so, [
4201
- (le(), ke(Oe(N(d).search ?? N(a)), { id: "header-search" })),
4202
- e.responsiveHeader ? Re("", !0) : (le(), ke(Oe(N(d).columns ?? N(i)), {
4203
- key: 0,
4204
- "component-refs": { columns: N(u) }
4205
- }, null, 8, ["component-refs"])),
4206
- e.responsiveHeader ? Re("", !0) : (le(), ke(Oe(N(d).download ?? N(c)), { key: 1 })),
4207
- e.responsiveHeader ? Re("", !0) : (le(), ke(Oe(N(d).refreshTable ?? N(t)), { key: 2 })),
4208
- (le(), ke(Oe(N(d).options ?? N(n)), { "responsive-header": e.responsiveHeader }, null, 8, ["responsive-header"]))
4209
- ])
4210
- ]);
4211
- };
4212
- }
4213
- });
4214
- function co(e) {
4215
- const a = Pt(), { getCurrentTable: t, setTableHash: n, hashString: l } = a, i = W(!1), c = 5, s = w(() => t(e.id));
4216
- re(
4217
- s,
4218
- async (g) => {
4219
- g.options.hash && await u(g);
4220
- },
4221
- {
4222
- deep: !0
4223
- }
4224
- );
4225
- const u = async (g) => {
4226
- if (i.value) return;
4227
- i.value = !0, await Ve();
4228
- const y = d(), h = y.findIndex(
4229
- (I) => I.id === e.id
4230
- );
4231
- h > -1 ? y[h] = g : y.push(g), localStorage.setItem("datatables-state", JSON.stringify(y)), i.value = !1;
4232
- }, d = () => {
4233
- const g = localStorage.getItem("datatables-state");
4234
- return JSON.parse(g ?? "[]");
4235
- }, o = () => d().find((h) => h.id === e.id);
4236
- return {
4237
- saving: i,
4238
- dataStateGet: o,
4239
- tableDataState: s,
4240
- checkTableState: async () => {
4241
- const g = localStorage.getItem("datatables-state-v");
4242
- parseInt(g) !== parseInt(c) && (localStorage.removeItem("datatables-state"), localStorage.setItem("datatables-state-v", c));
4243
- const h = o()?.options.hash;
4244
- if (h) {
4245
- const I = await l(JSON.stringify(e.headers ?? []));
4246
- h !== I && localStorage.removeItem("datatables-state");
4247
- }
4248
- n({ table_id: e.id, headers: e.headers });
4249
- },
4250
- deleteDataStorage: () => {
4251
- localStorage.removeItem("datatables-state"), localStorage.removeItem("datatables-state-v");
4252
- }
4253
- };
4254
- }
4255
- const rn = Un(() => {
4256
- const e = J({}), a = J({});
4257
- return {
4258
- storeOptions: {
4259
- state: e,
4260
- columns: a
4261
- },
4262
- setUserOptions: ({
4263
- state: l = null,
4264
- columns: i = null
4265
- }) => {
4266
- l && (e.value = l), i && (a.value = i);
4267
- }
4268
- };
4269
- }), vo = {
4270
- key: 0,
4271
- class: "datatables-v2"
4272
- }, fo = { class: "pe-4" }, mo = {
4273
- __name: "Blueprint",
4274
- props: {
4275
- modelValue: {},
4276
- modelModifiers: {}
4277
- },
4278
- emits: /* @__PURE__ */ Ht(["refreshTable", "refetchData", "advancedFilters:update", "hardFilters:update"], ["update:modelValue"]),
4279
- setup(e, { expose: a, emit: t }) {
4280
- const n = Te(() => import("./Table-D5xj84Hx.js")), l = Te(() => import("./TableServer-DGx2_VC7.js")), { storeOptions: i } = rn(), { saveTableOptions: c } = At(), s = Vt(e, "modelValue"), u = Pe("table_props"), d = Pe("datatablesPluginOptions"), o = W(null), r = W(!1), m = W(!1), g = W(!1), y = t, h = Pt(), { dataStateGet: I, tableDataState: _, checkTableState: x } = co(u), { addTable: k, restoreData: B } = h, F = W(!1);
4281
- Kn(o, (A) => {
4282
- const p = A[0], { width: M } = p.contentRect;
4283
- F.value = M < 950;
4284
- });
4285
- const L = w(() => {
4286
- const A = u.options?.header;
4287
- return A === void 0 || typeof A == "object" && A !== null;
4288
- });
4289
- return Ye(async () => {
4290
- k({ table_id: u.id }), await x();
4291
- const A = I();
4292
- if (A)
4293
- B({ table_id: u.id, data: A });
4294
- else {
4295
- const M = _.value.options.columns;
4296
- M.selected = u.headers.filter((E) => !E.hidden).map((E) => E.key), M.sorted = u.headers.map((E) => E.key);
4297
- }
4298
- c(Ln(i.state.value, _.value.options.state)), m.value = !0, await Ve(), g.value = !0;
4299
- }), Ue("busEmits", y), Ue("tableRef", o), Ue("tableState", _), Ue("downloadModal", r), a({ tableRef: o }), (A, p) => {
4300
- const M = ro;
4301
- return N(m) ? (le(), ze("div", vo, [
4302
- f(sn, null, {
4303
- default: xe(() => [
4304
- N(L) ? (le(), ke(Zt, { key: 0 }, {
4305
- default: xe(() => [
4306
- f(M, { "responsive-header": N(F) }, null, 8, ["responsive-header"])
4307
- ]),
4308
- _: 1
4309
- })) : Re("", !0),
4310
- f(el, { class: "pa-0" }, {
4311
- default: xe(() => [
4312
- N(g) ? (le(), ke(Oe(N(u).api ? N(l) : N(n)), {
4313
- key: 0,
4314
- ref_key: "tableRef",
4315
- ref: o,
4316
- modelValue: s.value,
4317
- "onUpdate:modelValue": p[0] || (p[0] = (E) => s.value = E)
4318
- }, null, 8, ["modelValue"])) : Re("", !0)
4319
- ]),
4320
- _: 1
4321
- })
4322
- ]),
4323
- _: 1
4324
- }),
4325
- f(on, {
4326
- modelValue: N(r),
4327
- "onUpdate:modelValue": p[1] || (p[1] = (E) => pt(r) ? r.value = E : null),
4328
- "max-width": "350",
4329
- persistent: ""
4330
- }, {
4331
- default: xe(() => [
4332
- f(Yt, {
4333
- class: "py-2",
4334
- color: "primary",
4335
- elevation: "12",
4336
- rounded: "lg"
4337
- }, {
4338
- default: xe(() => [
4339
- f(it, {
4340
- "prepend-icon": N(d).header.icons.download,
4341
- title: A.$t("$datatables.preparing_download_file")
4342
- }, {
4343
- prepend: xe(() => [
4344
- b("div", fo, [
4345
- f(Se, {
4346
- color: "primary",
4347
- size: "x-large"
4348
- })
4349
- ])
4350
- ]),
4351
- append: xe(() => [
4352
- f(Hn, {
4353
- color: "primary",
4354
- indeterminate: "disable-shrink",
4355
- size: "16",
4356
- width: "2"
4357
- })
4358
- ]),
4359
- _: 1
4360
- }, 8, ["prepend-icon", "title"])
4361
- ]),
4362
- _: 1
4363
- })
4364
- ]),
4365
- _: 1
4366
- }, 8, ["modelValue"])
4367
- ])) : Re("", !0);
4368
- };
4369
- }
4370
- }, go = ml("datatablesHooks", () => {
4371
- const e = W({});
4372
- return {
4373
- hooks: e,
4374
- registerHook: (n, l) => {
4375
- Object.assign(e.value, { [n]: l });
4376
- },
4377
- triggerHook: (n, l) => {
4378
- e.value.hasOwnProperty(n) && e.value[n](l);
4379
- }
4380
- };
4381
- }), yo = {
4382
- __name: "index",
4383
- props: {
4384
- id: {
4385
- type: String,
4386
- required: !0
4387
- },
4388
- api: {
4389
- type: Object,
4390
- default: () => {
4391
- }
4392
- },
4393
- data: {
4394
- type: Array,
4395
- default: () => []
4396
- },
4397
- options: {
4398
- type: Object,
4399
- default: () => ({})
4400
- },
4401
- params: {
4402
- type: Object,
4403
- default: () => ({})
4404
- },
4405
- hardFilters: {
4406
- type: Array,
4407
- default: () => []
4408
- },
4409
- headers: {
4410
- type: Array,
4411
- default: () => []
4412
- },
4413
- loading: {
4414
- type: Boolean,
4415
- default: !1
4416
- },
4417
- locale: {
4418
- type: String,
4419
- default: "en"
4420
- },
4421
- title: {
4422
- type: String,
4423
- default: ""
4424
- }
4425
- },
4426
- emits: ["refreshTable", "refetchData"],
4427
- setup(e, { expose: a, emit: t }) {
4428
- const n = e, { triggerHook: l } = go(), { storeOptions: i, setUserOptions: c } = rn(), s = W(null), u = W(0), d = async (m = {}) => {
4429
- c(m), u.value < 99 && (r("refreshTable"), await Ve(), u.value++);
4430
- }, o = (m = {}) => {
4431
- c(m), s.value.tableRef.hasOwnProperty("reloadItems") && (s.value.tableRef.reloadItems(i.state.value), r("refetchData"));
4432
- }, r = t;
4433
- return a({ refreshTable: d, refetchData: o, triggerHook: l }), Ue("table_props", n), Ue("triggerHook", l), (m, g) => {
4434
- const y = mo;
4435
- return le(), ke(y, {
4436
- id: e.id,
4437
- ref_key: "table",
4438
- ref: s,
4439
- key: `${e.id}-${N(u)}`,
4440
- onRefreshTable: d,
4441
- onRefetchData: o
4442
- }, null, 8, ["id"]);
4443
- };
4444
- }
4445
- }, Vo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4446
- __proto__: null,
4447
- default: yo
4448
- }, Symbol.toStringTag, { value: "Module" }));
4449
- export {
4450
- Tt as A,
4451
- Xl as B,
4452
- eo as C,
4453
- Vo as D,
4454
- Co as V,
4455
- ao as _,
4456
- Nt as a,
4457
- st as b,
4458
- Jl as c,
4459
- dl as d,
4460
- Ra as e,
4461
- Pt as f,
4462
- sn as g,
4463
- el as h,
4464
- Ke as i,
4465
- oo as j,
4466
- co as k,
4467
- go as l,
4468
- Ea as m,
4469
- na as n,
4470
- ea as o,
4471
- Yl as p,
4472
- rl as q,
4473
- sa as r,
4474
- Ql as s,
4475
- on as t,
4476
- At as u,
4477
- Zt as v,
4478
- un as w,
4479
- la as x,
4480
- Ha as y,
4481
- Ft as z
4482
- };