@verdnatura/vn-front-lib 0.0.7 → 0.0.9

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.
@@ -1,1932 +1,10 @@
1
- import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as g, Q as _, R as v, S as y, T as b, U as x, V as S, W as C, X as w, Y as T, Z as E, _ as ee, a as te, at as D, b as O, c as ne, ct as k, d as A, et as re, f as j, g as ie, h as ae, i as oe, it as M, j as se, k as ce, l as le, lt as N, m as P, n as F, nt as I, o as ue, ot as de, p as fe, q as L, r as pe, rt as R, s as me, st as z, t as B, tt as he, u as ge, v as _e, w as ve, x as ye, y as be, z as xe } from "./components-DrW3NFA9.js";
2
- import { n as Se, t as Ce } from "./useRequired-CTxBp3qy.js";
1
+ import { n as e, t } from "./components-Dl-Ieazh.js";
2
+ import { n, t as r } from "./useRequired-CTxBp3qy.js";
3
3
  import "./composables.js";
4
- import { t as V } from "./utils-DEjhADAQ.js";
5
- import { Transition as we, computed as H, getCurrentInstance as Te, h as U, nextTick as W, onActivated as Ee, onBeforeMount as G, onBeforeUnmount as De, onBeforeUpdate as Oe, onDeactivated as K, onUpdated as ke, ref as q, watch as J } from "vue";
6
- //#region lib/utils/defaults/qInput.js
7
- V(pe, "dense", !0);
8
- //#endregion
9
- //#region node_modules/.pnpm/quasar@2.23.3/node_modules/quasar/src/components/field/QField.js
10
- var Ae = C({
11
- name: "QField",
12
- inheritAttrs: !1,
13
- props: {
14
- ...ge,
15
- tag: {
16
- type: String,
17
- default: "label"
18
- }
19
- },
20
- emits: le,
21
- setup() {
22
- return ne(A({ tagProp: !0 }));
23
- }
24
- });
25
- //#endregion
26
- //#region node_modules/.pnpm/quasar@2.23.3/node_modules/quasar/src/utils/throttle/throttle.js
27
- function je(e, t = 250) {
28
- let n = !1, r;
29
- return function(...i) {
30
- return n || (n = !0, setTimeout(() => {
31
- n = !1;
32
- }, t), r = e.apply(this, i)), r;
33
- };
34
- }
35
- //#endregion
36
- //#region node_modules/.pnpm/quasar@2.23.3/node_modules/quasar/src/directives/ripple/Ripple.js
37
- function Me(e, t, n, r) {
38
- n.modifiers.stop && z(e);
39
- let i = n.modifiers.color, a = n.modifiers.center || r === !0, o = document.createElement("span"), s = document.createElement("span"), c = D(e), { left: u, top: d, width: f, height: p } = t.getBoundingClientRect(), m = Math.hypot(f, p), h = m / 2, g = `${(f - m) / 2}px`, _ = a ? g : `${c.left - u - h}px`, v = `${(p - m) / 2}px`, y = a ? v : `${c.top - d - h}px`;
40
- s.className = "q-ripple__inner", l(s, {
41
- height: `${m}px`,
42
- width: `${m}px`,
43
- transform: `translate3d(${_},${y},0) scale3d(.2,.2,1)`,
44
- opacity: 0
45
- }), o.className = `q-ripple${i ? " text-" + i : ""}`, o.setAttribute("dir", "ltr"), o.append(s), t.append(o);
46
- let b = () => {
47
- o.remove(), clearTimeout(x);
48
- };
49
- n.abort.push(b);
50
- let x = setTimeout(() => {
51
- s.classList.add("q-ripple__inner--enter"), s.style.transform = `translate3d(${g},${v},0) scale3d(1,1,1)`, s.style.opacity = .2, x = setTimeout(() => {
52
- s.classList.remove("q-ripple__inner--enter"), s.classList.add("q-ripple__inner--leave"), s.style.opacity = 0, x = setTimeout(() => {
53
- o.remove(), n.abort.splice(n.abort.indexOf(b), 1);
54
- }, 275);
55
- }, 250);
56
- }, 50);
57
- }
58
- function Ne(e, { modifiers: t, value: n, arg: r }) {
59
- let i = {
60
- ...e.cfg.ripple,
61
- ...t,
62
- ...n
63
- };
64
- e.modifiers = {
65
- early: i.early === !0,
66
- stop: i.stop === !0,
67
- center: i.center === !0,
68
- color: i.color || r,
69
- keyCodes: [i.keyCodes || 13].flat()
70
- };
71
- }
72
- var Pe = s({
73
- name: "ripple",
74
- beforeMount(t, n) {
75
- let r = n.instance.$.appContext.config.globalProperties.$q.config || {};
76
- if (r.ripple === !1) return;
77
- let i = {
78
- cfg: r,
79
- enabled: n.value !== !1,
80
- modifiers: {},
81
- abort: [],
82
- start(e) {
83
- i.enabled && !e.qSkipRipple && e.type === (i.modifiers.early ? "pointerdown" : "click") && Me(e, t, i, e.qKeyEvent === !0);
84
- },
85
- keystart: je((n) => {
86
- i.enabled && !n.qSkipRipple && e(n, i.modifiers.keyCodes) && n.type === `key${i.modifiers.early ? "down" : "up"}` && Me(n, t, i, !0);
87
- }, 300)
88
- };
89
- Ne(i, n), t.__qripple = i, he(i, "main", [
90
- [
91
- t,
92
- "pointerdown",
93
- "start",
94
- "passive"
95
- ],
96
- [
97
- t,
98
- "click",
99
- "start",
100
- "passive"
101
- ],
102
- [
103
- t,
104
- "keydown",
105
- "keystart",
106
- "passive"
107
- ],
108
- [
109
- t,
110
- "keyup",
111
- "keystart",
112
- "passive"
113
- ]
114
- ]);
115
- },
116
- updated(e, t) {
117
- if (t.oldValue !== t.value) {
118
- let n = e.__qripple;
119
- n !== void 0 && (n.enabled = t.value !== !1, n.enabled && Object(t.value) === t.value && Ne(n, t));
120
- }
121
- },
122
- beforeUnmount(e) {
123
- let t = e.__qripple;
124
- t !== void 0 && (t.abort.forEach((e) => {
125
- e();
126
- }), I(t, "main"), delete e.__qripple);
127
- }
128
- });
129
- //#endregion
130
- //#region node_modules/.pnpm/quasar@2.23.3/node_modules/quasar/src/components/chip/QChip.js
131
- function Fe(e) {
132
- e.keyCode === 32 && k(e);
133
- }
134
- var Ie = {
135
- xs: 8,
136
- sm: 10,
137
- md: 14,
138
- lg: 20,
139
- xl: 24
140
- }, Le = C({
141
- name: "QChip",
142
- props: {
143
- ...P,
144
- ...ee,
145
- dense: Boolean,
146
- icon: String,
147
- iconRight: String,
148
- iconRemove: String,
149
- iconSelected: String,
150
- label: [String, Number],
151
- color: String,
152
- textColor: String,
153
- modelValue: {
154
- type: Boolean,
155
- default: !0
156
- },
157
- selected: {
158
- type: Boolean,
159
- default: null
160
- },
161
- square: Boolean,
162
- outline: Boolean,
163
- clickable: Boolean,
164
- removable: Boolean,
165
- removeAriaLabel: String,
166
- tabindex: [String, Number],
167
- disable: Boolean,
168
- ripple: {
169
- type: [Boolean, Object],
170
- default: !0
171
- }
172
- },
173
- emits: [
174
- "update:modelValue",
175
- "update:selected",
176
- "remove",
177
- "click"
178
- ],
179
- setup(e, { slots: t, emit: n }) {
180
- let { proxy: { $q: r } } = Te(), i = fe(e, r), o = ie(e, Ie), s = H(() => e.selected || e.icon !== void 0), c = H(() => e.selected ? e.iconSelected || r.iconSet.chip.selected : e.icon), l = H(() => e.iconRemove || r.iconSet.chip.remove), u = H(() => !e.disable && (e.clickable || e.selected !== null)), d = H(() => {
181
- let t = e.outline && e.color || e.textColor;
182
- return "q-chip row inline no-wrap items-center" + (!e.outline && e.color !== void 0 ? ` bg-${e.color}` : "") + (t ? ` text-${t} q-chip--colored` : "") + (e.disable ? " disabled" : "") + (e.dense ? " q-chip--dense" : "") + (e.outline ? " q-chip--outline" : "") + (e.selected ? " q-chip--selected" : "") + (u.value ? " q-chip--clickable cursor-pointer non-selectable q-hoverable" : "") + (e.square ? " q-chip--square" : "") + (i.value ? " q-chip--dark q-dark" : "");
183
- }), f = H(() => {
184
- let t = e.disable ? {
185
- tabindex: -1,
186
- "aria-disabled": "true"
187
- } : {
188
- tabindex: e.tabindex || 0,
189
- role: "button",
190
- "aria-pressed": e.selected ? "true" : "false"
191
- };
192
- return {
193
- chip: t,
194
- remove: {
195
- ...t,
196
- role: "button",
197
- "aria-hidden": "false",
198
- "aria-label": e.removeAriaLabel || r.lang.label.remove
199
- }
200
- };
201
- });
202
- function p(e) {
203
- [13, 32].includes(e.keyCode) && (m(e), k(e));
204
- }
205
- function m(t) {
206
- e.disable || (n("update:selected", !e.selected), n("click", t));
207
- }
208
- function h(t) {
209
- (t.keyCode === void 0 || [13, 32].includes(t.keyCode)) && (k(t), e.disable || (n("update:modelValue", !1), n("remove")));
210
- }
211
- function g() {
212
- let n = [];
213
- u.value && n.push(U("div", { class: "q-focus-helper" })), s.value && n.push(U(ae, {
214
- class: "q-chip__icon q-chip__icon--left",
215
- name: c.value
216
- }));
217
- let r = e.label === void 0 ? void 0 : [U("div", { class: "ellipsis" }, [e.label])];
218
- return n.push(U("div", { class: "q-chip__content col row no-wrap items-center q-anchor--skip" }, a(t.default, r))), e.iconRight && n.push(U(ae, {
219
- class: "q-chip__icon q-chip__icon--right",
220
- name: e.iconRight
221
- })), e.removable && n.push(U(ae, {
222
- class: "q-chip__icon q-chip__icon--remove cursor-pointer",
223
- name: l.value,
224
- ...f.value.remove,
225
- onClick: h,
226
- onKeydown: Fe,
227
- onKeyup: h
228
- })), n;
229
- }
230
- return () => {
231
- if (!e.modelValue) return;
232
- let t = {
233
- class: d.value,
234
- style: o.value
235
- };
236
- return u.value && Object.assign(t, f.value.chip, {
237
- onClick: m,
238
- onKeydown: Fe,
239
- onKeyup: p
240
- }), ve("div", t, g(), "ripple", e.ripple !== !1 && !e.disable, () => [[Pe, e.ripple]]);
241
- };
242
- }
243
- });
244
- //#endregion
245
- //#region node_modules/.pnpm/quasar@2.23.3/node_modules/quasar/src/composables/private.use-router-link/use-router-link.js
246
- function Re(e) {
247
- return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
248
- }
249
- function Y(e, t) {
250
- return (e.aliasOf || e) === (t.aliasOf || t);
251
- }
252
- function ze(e, t) {
253
- for (let n in t) {
254
- let r = t[n], i = e[n];
255
- if (typeof r == "string") {
256
- if (r !== i) return !1;
257
- } else if (!Array.isArray(i) || i.length !== r.length || r.some((e, t) => e !== i[t])) return !1;
258
- }
259
- return !0;
260
- }
261
- function Be(e, t) {
262
- return Array.isArray(t) ? e.length === t.length && e.every((e, n) => e === t[n]) : e.length === 1 && e[0] === t;
263
- }
264
- function Ve(e, t) {
265
- return Array.isArray(e) ? Be(e, t) : Array.isArray(t) ? Be(t, e) : e === t;
266
- }
267
- function He(e, t) {
268
- if (Object.keys(e).length !== Object.keys(t).length) return !1;
269
- for (let n in e) if (!Ve(e[n], t[n])) return !1;
270
- return !0;
271
- }
272
- var Ue = {
273
- to: [String, Object],
274
- replace: Boolean,
275
- href: String,
276
- target: String,
277
- disable: Boolean,
278
- exact: Boolean,
279
- activeClass: {
280
- type: String,
281
- default: "q-router-link--active"
282
- },
283
- exactActiveClass: {
284
- type: String,
285
- default: "q-router-link--exact-active"
286
- }
287
- };
288
- function We({ fallbackTag: e, useDisableForRouterLinkProps: t = !0 } = {}) {
289
- let n = Te(), { props: r, proxy: i, emit: a } = n, o = T(n), s = H(() => !r.disable && r.href !== void 0), c = H(t ? () => o && !r.disable && !s.value && r.to !== void 0 && r.to !== null && r.to !== "" : () => o && !s.value && r.to !== void 0 && r.to !== null && r.to !== ""), l = H(() => c.value ? v(r.to) : null), u = H(() => l.value !== null), d = H(() => s.value || u.value), f = H(() => r.type === "a" || d.value ? "a" : r.tag || e || "div"), p = H(() => s.value ? {
290
- href: r.href,
291
- target: r.target
292
- } : u.value ? {
293
- href: l.value.href,
294
- target: r.target
295
- } : {}), m = H(() => {
296
- if (!u.value) return -1;
297
- let { matched: e } = l.value, { length: t } = e, n = e[t - 1];
298
- if (n === void 0) return -1;
299
- let r = i.$route.matched;
300
- if (r.length === 0) return -1;
301
- let a = r.findIndex(Y.bind(null, n));
302
- if (a !== -1) return a;
303
- let o = Re(e[t - 2]);
304
- return t > 1 && Re(n) === o && r.at(-1).path !== o ? r.findIndex(Y.bind(null, e[t - 2])) : a;
305
- }), h = H(() => u.value && m.value !== -1 && ze(i.$route.params, l.value.params)), g = H(() => h.value && m.value === i.$route.matched.length - 1 && He(i.$route.params, l.value.params)), _ = H(() => u.value ? g.value ? ` ${r.exactActiveClass} ${r.activeClass}` : r.exact ? "" : h.value ? ` ${r.activeClass}` : "" : "");
306
- function v(e) {
307
- try {
308
- return i.$router.resolve(e);
309
- } catch {}
310
- return null;
311
- }
312
- function y(e, { returnRouterError: t, to: n = r.to, replace: a = r.replace } = {}) {
313
- if (r.disable) return e.preventDefault(), Promise.resolve(!1);
314
- if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey || e.button !== void 0 && e.button !== 0 || r.target === "_blank") return Promise.resolve(!1);
315
- e.preventDefault();
316
- let o = i.$router[a ? "replace" : "push"](n);
317
- return t ? o : o.then(() => {}).catch(() => {});
318
- }
319
- function b(e) {
320
- if (u.value) {
321
- let t = (t) => y(e, t);
322
- a("click", e, t), e.defaultPrevented || t();
323
- } else a("click", e);
324
- }
325
- return {
326
- hasRouterLink: u,
327
- hasHrefLink: s,
328
- hasLink: d,
329
- linkTag: f,
330
- resolvedLink: l,
331
- linkIsActive: h,
332
- linkIsExactActive: g,
333
- linkClass: _,
334
- linkAttrs: p,
335
- getLink: v,
336
- navigateToRouterLink: y,
337
- navigateOnClick: b
338
- };
339
- }
340
- //#endregion
341
- //#region node_modules/.pnpm/quasar@2.23.3/node_modules/quasar/src/components/item/QItem.js
342
- var Ge = C({
343
- name: "QItem",
344
- props: {
345
- ...P,
346
- ...Ue,
347
- tag: {
348
- type: String,
349
- default: "div"
350
- },
351
- active: {
352
- type: Boolean,
353
- default: null
354
- },
355
- clickable: Boolean,
356
- dense: Boolean,
357
- insetLevel: Number,
358
- tabindex: [String, Number],
359
- focused: Boolean,
360
- manualFocus: Boolean
361
- },
362
- emits: ["click", "keyup"],
363
- setup(t, { slots: n, emit: r }) {
364
- let { proxy: { $q: i } } = Te(), a = fe(t, i), { hasLink: o, linkAttrs: s, linkClass: c, linkTag: l, navigateOnClick: u } = We(), d = q(null), f = q(null), p = H(() => t.clickable || o.value || t.tag === "label"), m = H(() => !t.disable && p.value), g = H(() => "q-item q-item-type row no-wrap" + (t.dense ? " q-item--dense" : "") + (a.value ? " q-item--dark" : "") + (o.value && t.active === null ? c.value : t.active ? ` q-item--active${t.activeClass === void 0 ? "" : ` ${t.activeClass}`}` : "") + (t.disable ? " disabled" : "") + (m.value ? " q-item--clickable q-link cursor-pointer " + (t.manualFocus ? "q-manual-focusable" : "q-focusable q-hoverable") + (t.focused ? " q-manual-focusable--focused" : "") : "")), _ = H(() => t.insetLevel === void 0 ? null : { ["padding" + (i.lang.rtl ? "Right" : "Left")]: 16 + t.insetLevel * 56 + "px" });
365
- function v(e) {
366
- m.value && (f.value !== null && !e.qAvoidFocus && (!e.qKeyEvent && document.activeElement === d.value ? f.value.focus() : document.activeElement === f.value && d.value.focus()), u(e));
367
- }
368
- function y(t) {
369
- if (m.value && e(t, [13, 32])) {
370
- k(t), t.qKeyEvent = !0;
371
- let e = new MouseEvent("click", t);
372
- e.qKeyEvent = !0, d.value.dispatchEvent(e);
373
- }
374
- r("keyup", t);
375
- }
376
- function b(e) {
377
- m.value && e.keyCode === 32 && k(e);
378
- }
379
- function x() {
380
- let e = h(n.default, []);
381
- return m.value && e.unshift(U("div", {
382
- class: "q-focus-helper",
383
- tabindex: -1,
384
- ref: f
385
- })), e;
386
- }
387
- return () => {
388
- let e = {
389
- ref: d,
390
- class: g.value,
391
- style: _.value,
392
- role: o.value ? void 0 : m.value ? "button" : "listitem",
393
- onClick: v,
394
- onKeydown: b,
395
- onKeyup: y
396
- };
397
- return m.value ? (e.tabindex = t.tabindex || "0", Object.assign(e, s.value)) : p.value && (e["aria-disabled"] = "true"), U(l.value, e, x());
398
- };
399
- }
400
- }), Ke = C({
401
- name: "QItemSection",
402
- props: {
403
- avatar: Boolean,
404
- thumbnail: Boolean,
405
- side: Boolean,
406
- top: Boolean,
407
- noWrap: Boolean
408
- },
409
- setup(e, { slots: t }) {
410
- let n = H(() => `q-item__section column q-item__section--${e.avatar || e.side || e.thumbnail ? "side" : "main"}` + (e.top ? " q-item__section--top justify-start" : " justify-center") + (e.avatar ? " q-item__section--avatar" : "") + (e.thumbnail ? " q-item__section--thumbnail" : "") + (e.noWrap ? " q-item__section--nowrap" : ""));
411
- return () => U("div", { class: n.value }, i(t.default));
412
- }
413
- }), qe = C({
414
- name: "QItemLabel",
415
- props: {
416
- overline: Boolean,
417
- caption: Boolean,
418
- header: Boolean,
419
- lines: [Number, String]
420
- },
421
- setup(e, { slots: t }) {
422
- let n = H(() => Number.parseInt(e.lines, 10)), r = H(() => "q-item__label" + (e.overline ? " q-item__label--overline text-overline" : "") + (e.caption ? " q-item__label--caption text-caption" : "") + (e.header ? " q-item__label--header" : "") + (n.value === 1 ? " ellipsis" : "")), a = H(() => e.lines !== void 0 && n.value > 1 ? {
423
- overflow: "hidden",
424
- display: "-webkit-box",
425
- "-webkit-box-orient": "vertical",
426
- "-webkit-line-clamp": n.value
427
- } : null);
428
- return () => U("div", {
429
- style: a.value,
430
- class: r.value
431
- }, i(t.default));
432
- }
433
- }), Je = [];
434
- function Ye(e) {
435
- Je.at(-1)(e);
436
- }
437
- function Xe(e) {
438
- N.is.desktop && (Je.push(e), Je.length === 1 && document.body.addEventListener("focusin", Ye));
439
- }
440
- function Ze(e) {
441
- let t = Je.indexOf(e);
442
- t !== -1 && (Je.splice(t, 1), Je.length === 0 && document.body.removeEventListener("focusin", Ye));
443
- }
444
- //#endregion
445
- //#region node_modules/.pnpm/quasar@2.23.3/node_modules/quasar/src/components/menu/QMenu.js
446
- var Qe = C({
447
- name: "QMenu",
448
- inheritAttrs: !1,
449
- props: {
450
- ..._,
451
- ...u,
452
- ...P,
453
- ...n,
454
- persistent: Boolean,
455
- autoClose: Boolean,
456
- separateClosePopup: Boolean,
457
- noEscDismiss: Boolean,
458
- noRouteDismiss: Boolean,
459
- noRefocus: Boolean,
460
- noFocus: Boolean,
461
- fit: Boolean,
462
- cover: Boolean,
463
- square: Boolean,
464
- anchor: {
465
- type: String,
466
- validator: ye
467
- },
468
- self: {
469
- type: String,
470
- validator: ye
471
- },
472
- offset: {
473
- type: Array,
474
- validator: O
475
- },
476
- scrollTarget: g,
477
- touchPosition: Boolean,
478
- maxHeight: {
479
- type: String,
480
- default: null
481
- },
482
- maxWidth: {
483
- type: String,
484
- default: null
485
- }
486
- },
487
- emits: [
488
- ...L,
489
- "click",
490
- "escapeKey"
491
- ],
492
- setup(e, { slots: n, emit: a, attrs: s }) {
493
- let l = null, u, m, h, g = Te(), { proxy: _ } = g, { $q: b } = _, C = q(null), T = q(!1), ee = H(() => !e.persistent && !e.noRouteDismiss), te = fe(e, b), { registerTick: O, removeTick: ne } = v(), { registerTimeout: A } = f(), { transitionProps: re, transitionStyle: j } = xe(e), { localScrollTarget: ie, changeScrollEvent: ae, unconfigureScrollTarget: oe } = w(e, ve), { anchorEl: M, canShow: se } = E({ showing: T }), { hide: le } = d({
494
- showing: T,
495
- canShow: se,
496
- handleShow: z,
497
- handleHide: B,
498
- handleRouteChange: he,
499
- hideOnRouteChange: ee,
500
- processOnMount: !0
501
- }), { showPortal: N, hidePortal: P, renderPortal: F } = S(g, C, W, "menu"), I = {
502
- anchorEl: M,
503
- innerRef: C,
504
- onClickOutside(t) {
505
- if (!e.persistent && T.value) return le(t), (t.type === "touchstart" || t.target.classList.contains("q-dialog__backdrop")) && k(t), !0;
506
- }
507
- }, ue = H(() => _e(e.anchor || (e.cover ? "center middle" : "bottom start"), b.lang.rtl)), de = H(() => e.cover ? ue.value : _e(e.self || "top start", b.lang.rtl)), L = H(() => (e.square ? " q-menu--square" : "") + (te.value ? " q-menu--dark q-dark" : "")), pe = H(() => e.autoClose ? { onClick: ye } : {}), R = H(() => T.value && !e.persistent);
508
- J(R, (e) => {
509
- e ? (ce(Ce), y(I)) : (t(Ce), r(I));
510
- });
511
- function me() {
512
- c(() => {
513
- let e = C.value;
514
- e && !e.contains(document.activeElement) && (e = e.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]") || e.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]") || e.querySelector("[autofocus], [data-autofocus]") || e, e.focus({ preventScroll: !0 }));
515
- });
516
- }
517
- function z(t) {
518
- if (l = e.noRefocus ? null : document.activeElement, Xe(Se), N(), ve(), u = void 0, t !== void 0 && (e.touchPosition || e.contextMenu)) {
519
- let e = D(t);
520
- if (e.left !== void 0) {
521
- let { top: t, left: n } = M.value.getBoundingClientRect();
522
- u = {
523
- left: e.left - n,
524
- top: e.top - t
525
- };
526
- }
527
- }
528
- m === void 0 && (m = J(() => b.screen.width + "|" + b.screen.height + "|" + e.self + "|" + e.anchor + "|" + b.lang.rtl, V)), e.noFocus || document.activeElement.blur(), O(() => {
529
- V(), e.noFocus || me();
530
- }), A(() => {
531
- b.platform.is.ios && (h = e.autoClose, C.value.click()), V(), N(!0), a("show", t);
532
- }, e.transitionDuration);
533
- }
534
- function B(t) {
535
- if (ne(), P(), ge(!0), l !== null && (t === void 0 || !t.qClickOutside)) {
536
- let e = (t?.type.indexOf("key") === 0 ? l.closest("[tabindex]:not([tabindex^=\"-\"])") : void 0) || l;
537
- l = null, c(() => {
538
- e.isConnected && e.focus();
539
- });
540
- }
541
- A(() => {
542
- P(!0), a("hide", t);
543
- }, e.transitionDuration);
544
- }
545
- function he() {
546
- l = null;
547
- }
548
- function ge(e) {
549
- u = void 0, m !== void 0 && (m(), m = void 0), (e || T.value) && (Ze(Se), oe(), r(I), t(Ce)), e || (l = null);
550
- }
551
- function ve() {
552
- (M.value !== null || e.scrollTarget !== void 0) && (ie.value = p(M.value, e.scrollTarget), ae(ie.value, V));
553
- }
554
- function ye(e) {
555
- h ? h = !1 : (x(_, e), a("click", e));
556
- }
557
- function Se(t) {
558
- R.value && !e.noFocus && !o(C.value, t.target) && me();
559
- }
560
- function Ce(t) {
561
- e.noEscDismiss || (a("escapeKey"), le(t));
562
- }
563
- function V() {
564
- be({
565
- targetEl: C.value,
566
- offset: e.offset,
567
- anchorEl: M.value,
568
- anchorOrigin: ue.value,
569
- selfOrigin: de.value,
570
- absoluteOffset: u,
571
- fit: e.fit,
572
- cover: e.cover,
573
- maxHeight: e.maxHeight,
574
- maxWidth: e.maxWidth
575
- });
576
- }
577
- function W() {
578
- return U(we, re.value, () => T.value ? U("div", {
579
- role: "menu",
580
- ...s,
581
- ref: C,
582
- tabindex: -1,
583
- class: ["q-menu q-position-engine scroll" + L.value, s.class],
584
- style: [s.style, j.value],
585
- ...pe.value
586
- }, i(n.default)) : null);
587
- }
588
- return De(() => {
589
- ge();
590
- }), Object.assign(_, {
591
- focus: me,
592
- updatePosition: V
593
- }), F;
594
- }
595
- }), $e = () => !0;
596
- function et(e) {
597
- return typeof e == "string" && e !== "" && e !== "/" && e !== "#/";
598
- }
599
- function tt(e) {
600
- return e.startsWith("#") && (e = e.slice(1)), e.startsWith("/") || (e = "/" + e), e.endsWith("/") && (e = e.slice(0, -1)), "#" + e;
601
- }
602
- function nt(e) {
603
- if (e.backButtonExit === !1) return () => !1;
604
- if (e.backButtonExit === "*") return $e;
605
- let t = ["#/"];
606
- return Array.isArray(e.backButtonExit) && t.push(...e.backButtonExit.filter(et).map(tt)), () => t.includes(window.location.hash);
607
- }
608
- var rt = {
609
- __history: [],
610
- add: M,
611
- remove: M,
612
- install({ $q: e }) {
613
- if (this.__installed) return;
614
- let { cordova: t, capacitor: n } = N.is;
615
- if (!t && !n) return;
616
- let r = e.config[t ? "cordova" : "capacitor"];
617
- if (r?.backButton === !1 || n && (window.Capacitor === void 0 || window.Capacitor.Plugins.App === void 0)) return;
618
- this.add = (e) => {
619
- e.condition === void 0 && (e.condition = $e), this.__history.push(e);
620
- }, this.remove = (e) => {
621
- let t = this.__history.indexOf(e);
622
- t !== -1 && this.__history.splice(t, 1);
623
- };
624
- let i = nt({
625
- backButtonExit: !0,
626
- ...r
627
- }), a = () => {
628
- if (this.__history.length !== 0) {
629
- let e = this.__history.at(-1);
630
- e.condition() && (this.__history.pop(), e.handler());
631
- } else i() ? navigator.app.exitApp() : window.history.back();
632
- };
633
- t ? document.addEventListener("deviceready", () => {
634
- document.addEventListener("backbutton", a, !1);
635
- }) : window.Capacitor.Plugins.App.addListener("backButton", a);
636
- }
637
- };
638
- //#endregion
639
- //#region node_modules/.pnpm/quasar@2.23.3/node_modules/quasar/src/composables/private.use-history/use-history.js
640
- function it(e, t, n) {
641
- let r;
642
- function i() {
643
- r !== void 0 && (rt.remove(r), r = void 0);
644
- }
645
- return De(() => {
646
- e.value && i();
647
- }), {
648
- removeFromHistory: i,
649
- addToHistory() {
650
- r = {
651
- condition: () => n.value,
652
- handler: t
653
- }, rt.add(r);
654
- }
655
- };
656
- }
657
- //#endregion
658
- //#region node_modules/.pnpm/quasar@2.23.3/node_modules/quasar/src/utils/scroll/prevent-scroll.js
659
- var X = 0, Z, at, ot, st = !1, ct, lt, ut, dt = null;
660
- function ft(e) {
661
- e.target === document && (document.scrollingElement.scrollTop = document.scrollingElement.scrollTop);
662
- }
663
- function pt(e) {
664
- st || (st = !0, requestAnimationFrame(() => {
665
- st = !1;
666
- let { height: t } = e.target, { clientHeight: n, scrollTop: r } = document.scrollingElement;
667
- (ot === void 0 || t !== window.innerHeight) && (ot = n - t, document.scrollingElement.scrollTop = r), r > ot && (document.scrollingElement.scrollTop -= Math.ceil((r - ot) / 8));
668
- }));
669
- }
670
- function mt(e) {
671
- let t = document.body, n = window.visualViewport !== void 0;
672
- if (e === "add") {
673
- let { overflowY: e, overflowX: r } = window.getComputedStyle(t);
674
- Z = se(window), at = m(window), ct = t.style.left, lt = t.style.top, ut = window.location.pathname, t.style.left = `-${Z}px`, t.style.top = `-${at}px`, r !== "hidden" && (r === "scroll" || t.scrollWidth > window.innerWidth) && t.classList.add("q-body--force-scrollbar-x"), e !== "hidden" && (e === "scroll" || t.scrollHeight > window.innerHeight) && t.classList.add("q-body--force-scrollbar-y"), document.documentElement.classList.add("q-document--prevent-scroll"), document.qScrollPrevented = !0, N.is.ios && (n ? (window.scrollTo(0, 0), window.visualViewport.addEventListener("resize", pt, R.passiveCapture), window.visualViewport.addEventListener("scroll", pt, R.passiveCapture), window.scrollTo(0, 0)) : window.addEventListener("scroll", ft, R.passiveCapture));
675
- } else N.is.ios && (n ? (window.visualViewport.removeEventListener("resize", pt, R.passiveCapture), window.visualViewport.removeEventListener("scroll", pt, R.passiveCapture)) : window.removeEventListener("scroll", ft, R.passiveCapture)), document.documentElement.classList.remove("q-document--prevent-scroll"), t.classList.remove("q-body--force-scrollbar-x", "q-body--force-scrollbar-y"), document.qScrollPrevented = !1, t.style.left = ct, t.style.top = lt, window.location.pathname === ut && window.scrollTo(Z, at), ot = void 0;
676
- }
677
- function ht(e) {
678
- let t = "add";
679
- if (e === !0) {
680
- if (X++, dt !== null) {
681
- clearTimeout(dt), dt = null;
682
- return;
683
- }
684
- if (X > 1) return;
685
- } else {
686
- if (X === 0 || (X--, X > 0)) return;
687
- if (t = "remove", N.is.ios && N.is.nativeMobile) {
688
- dt !== null && clearTimeout(dt), dt = setTimeout(() => {
689
- mt(t), dt = null;
690
- }, 100);
691
- return;
692
- }
693
- }
694
- mt(t);
695
- }
696
- //#endregion
697
- //#region node_modules/.pnpm/quasar@2.23.3/node_modules/quasar/src/composables/private.use-prevent-scroll/use-prevent-scroll.js
698
- function gt() {
699
- let e;
700
- return { preventBodyScroll(t) {
701
- t !== e && (e !== void 0 || t) && (e = t, ht(t));
702
- } };
703
- }
704
- //#endregion
705
- //#region node_modules/.pnpm/quasar@2.23.3/node_modules/quasar/src/components/dialog/QDialog.js
706
- var Q = 0, _t = {
707
- standard: "fixed-full flex-center",
708
- top: "fixed-top justify-center",
709
- bottom: "fixed-bottom justify-center",
710
- right: "fixed-right items-center",
711
- left: "fixed-left items-center"
712
- }, vt = {
713
- standard: ["scale", "scale"],
714
- top: ["slide-down", "slide-up"],
715
- bottom: ["slide-up", "slide-down"],
716
- right: ["slide-left", "slide-right"],
717
- left: ["slide-right", "slide-left"]
718
- }, yt = C({
719
- name: "QDialog",
720
- inheritAttrs: !1,
721
- props: {
722
- ...u,
723
- ...n,
724
- transitionShow: String,
725
- transitionHide: String,
726
- persistent: Boolean,
727
- autoClose: Boolean,
728
- allowFocusOutside: Boolean,
729
- noEscDismiss: Boolean,
730
- noBackdropDismiss: Boolean,
731
- noRouteDismiss: Boolean,
732
- noRefocus: Boolean,
733
- noFocus: Boolean,
734
- noShake: Boolean,
735
- seamless: Boolean,
736
- maximized: Boolean,
737
- fullWidth: Boolean,
738
- fullHeight: Boolean,
739
- square: Boolean,
740
- backdropFilter: String,
741
- position: {
742
- type: String,
743
- default: "standard",
744
- validator: (e) => [
745
- "standard",
746
- "top",
747
- "bottom",
748
- "left",
749
- "right"
750
- ].includes(e)
751
- }
752
- },
753
- emits: [
754
- ...L,
755
- "shake",
756
- "click",
757
- "escapeKey"
758
- ],
759
- setup(e, { slots: n, emit: r, attrs: a }) {
760
- let s = Te(), l = q(null), u = q(!1), p = q(!1), m = null, h = null, g = !1, _ = !1, y = H(() => !e.persistent && !e.noRouteDismiss && !e.seamless), { preventBodyScroll: b } = gt(), { registerTimeout: x } = f(), { registerTick: C, removeTick: w } = v(), { transitionProps: T, transitionStyle: E } = xe(e, () => vt[e.position][0], () => vt[e.position][1]), ee = H(() => E.value + (e.backdropFilter === void 0 ? "" : `;backdrop-filter:${e.backdropFilter};-webkit-backdrop-filter:${e.backdropFilter}`)), { showPortal: te, hidePortal: D, portalIsAccessible: O, renderPortal: ne } = S(s, l, pe, "dialog"), { hide: k } = d({
761
- showing: u,
762
- hideOnRouteChange: y,
763
- handleShow: M,
764
- handleHide: se,
765
- handleRouteChange: le,
766
- processOnMount: !0
767
- }), { addToHistory: A, removeFromHistory: re } = it(u, k, y), j = H(() => `q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized ? "maximized" : "minimized"} q-dialog__inner--${e.position} ${_t[e.position]}` + (p.value ? " q-dialog__inner--animating" : "") + (e.fullWidth ? " q-dialog__inner--fullwidth" : "") + (e.fullHeight ? " q-dialog__inner--fullheight" : "") + (e.square ? " q-dialog__inner--square" : "")), ie = H(() => u.value && !e.seamless), ae = H(() => e.autoClose ? { onClick: de } : {}), oe = H(() => [`q-dialog fullscreen no-pointer-events q-dialog--${ie.value ? "modal" : "seamless"}`, a.class]);
768
- J(() => e.maximized, (e) => {
769
- u.value && ue(e);
770
- }), J(ie, (e) => {
771
- b(e), e ? (Xe(L), ce(F)) : (Ze(L), t(F));
772
- });
773
- function M(t) {
774
- A(), h = !e.noRefocus && document.activeElement !== null ? document.activeElement : null, ue(e.maximized), te(), p.value = !0, e.noFocus ? w() : (document.activeElement?.blur(), C(N)), x(() => {
775
- if (s.proxy.$q.platform.is.ios) {
776
- if (!e.seamless && document.activeElement) {
777
- let { top: e, bottom: t } = document.activeElement.getBoundingClientRect(), { innerHeight: n } = window, r = window.visualViewport === void 0 ? n : window.visualViewport.height;
778
- e > 0 && t > r / 2 && (document.scrollingElement.scrollTop = Math.min(document.scrollingElement.scrollHeight - r, t >= n ? Infinity : Math.ceil(document.scrollingElement.scrollTop + t - r / 2))), document.activeElement.scrollIntoView();
779
- }
780
- _ = !0, l.value.click(), _ = !1;
781
- }
782
- te(!0), p.value = !1, r("show", t);
783
- }, e.transitionDuration);
784
- }
785
- function se(t) {
786
- if (w(), re(), I(!0), p.value = !0, D(), h !== null) {
787
- let e = (t?.type.indexOf("key") === 0 ? h.closest("[tabindex]:not([tabindex^=\"-\"])") : void 0) || h;
788
- h = null, c(() => {
789
- e.isConnected && e.focus();
790
- });
791
- }
792
- x(() => {
793
- D(!0), p.value = !1, r("hide", t);
794
- }, e.transitionDuration);
795
- }
796
- function le() {
797
- h = null;
798
- }
799
- function N(e) {
800
- c(() => {
801
- let t = l.value;
802
- if (t !== null) {
803
- if (e !== void 0) {
804
- let n = t.querySelector(e);
805
- if (n !== null) {
806
- n.focus({ preventScroll: !0 });
807
- return;
808
- }
809
- }
810
- t.contains(document.activeElement) || (t = t.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]") || t.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]") || t.querySelector("[autofocus], [data-autofocus]") || t, t.focus({ preventScroll: !0 }));
811
- }
812
- });
813
- }
814
- function P(e) {
815
- e && typeof e.focus == "function" ? e.focus({ preventScroll: !0 }) : N(), r("shake");
816
- let t = l.value;
817
- t !== null && (t.classList.remove("q-animate--scale"), t.classList.add("q-animate--scale"), m !== null && clearTimeout(m), m = setTimeout(() => {
818
- m = null, l.value !== null && (t.classList.remove("q-animate--scale"), N());
819
- }, 170));
820
- }
821
- function F() {
822
- e.seamless || (e.persistent || e.noEscDismiss ? !e.maximized && !e.noShake && P() : (r("escapeKey"), k()));
823
- }
824
- function I(n) {
825
- m !== null && (clearTimeout(m), m = null), (n || u.value) && (ue(!1), e.seamless || (b(!1), Ze(L), t(F))), n || (h = null);
826
- }
827
- function ue(e) {
828
- e ? g ||= (Q < 1 && document.body.classList.add("q-body--dialog"), Q++, !0) : g &&= (Q < 2 && document.body.classList.remove("q-body--dialog"), Q--, !1);
829
- }
830
- function de(e) {
831
- _ || (k(e), r("click", e));
832
- }
833
- function fe(t) {
834
- !e.persistent && !e.noBackdropDismiss ? k(t) : e.noShake || P();
835
- }
836
- function L(t) {
837
- !e.allowFocusOutside && O.value && !o(l.value, t.target) && N("[tabindex]:not([tabindex=\"-1\"])");
838
- }
839
- Object.assign(s.proxy, {
840
- focus: N,
841
- shake: P,
842
- __updateRefocusTarget(e) {
843
- h = e || null;
844
- }
845
- }), De(I);
846
- function pe() {
847
- return U("div", {
848
- role: "dialog",
849
- "aria-modal": ie.value ? "true" : "false",
850
- ...a,
851
- class: oe.value
852
- }, [U(we, {
853
- name: "q-transition--fade",
854
- appear: !0
855
- }, () => ie.value ? U("div", {
856
- class: "q-dialog__backdrop fixed-full",
857
- style: ee.value,
858
- "aria-hidden": "true",
859
- onClick: fe
860
- }) : null), U(we, T.value, () => u.value ? U("div", {
861
- ref: l,
862
- class: j.value,
863
- style: E.value,
864
- tabindex: -1,
865
- ...ae.value
866
- }, i(n.default)) : null)]);
867
- }
868
- return ne;
869
- }
870
- }), bt = !1;
871
- {
872
- let e = document.createElement("div");
873
- e.setAttribute("dir", "rtl"), Object.assign(e.style, {
874
- width: "1px",
875
- height: "1px",
876
- overflow: "auto"
877
- });
878
- let t = document.createElement("div");
879
- Object.assign(t.style, {
880
- width: "1000px",
881
- height: "1px"
882
- }), document.body.append(e), e.append(t), e.scrollLeft = -1e3, bt = e.scrollLeft >= 0, e.remove();
883
- }
884
- //#endregion
885
- //#region node_modules/.pnpm/quasar@2.23.3/node_modules/quasar/src/components/virtual-scroll/use-virtual-scroll.js
886
- var $ = 1e3, xt = [
887
- "start",
888
- "center",
889
- "end",
890
- "start-force",
891
- "center-force",
892
- "end-force"
893
- ], St = Array.prototype.filter, Ct = window.getComputedStyle(document.body).overflowAnchor === void 0 ? M : function(e, t) {
894
- e !== null && (e._qOverflowAnimationFrame !== void 0 && cancelAnimationFrame(e._qOverflowAnimationFrame), e._qOverflowAnimationFrame = requestAnimationFrame(() => {
895
- if (e === null) return;
896
- e._qOverflowAnimationFrame = void 0;
897
- let n = e.children || [];
898
- St.call(n, (e) => e.dataset && e.dataset.qVsAnchor !== void 0).forEach((e) => {
899
- delete e.dataset.qVsAnchor;
900
- });
901
- let r = n[t];
902
- r?.dataset && (r.dataset.qVsAnchor = "");
903
- }));
904
- };
905
- function wt(e, t) {
906
- return e + t;
907
- }
908
- function Tt(e, t, n, r, i, a, o, s) {
909
- let c = e === window ? document.scrollingElement || document.documentElement : e, l = i ? "offsetWidth" : "offsetHeight", u = {
910
- scrollStart: 0,
911
- scrollViewSize: -o - s,
912
- scrollMaxSize: 0,
913
- offsetStart: -o,
914
- offsetEnd: -s
915
- };
916
- if (i ? (e === window ? (u.scrollStart = window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, u.scrollViewSize += document.documentElement.clientWidth) : (u.scrollStart = c.scrollLeft, u.scrollViewSize += c.clientWidth), u.scrollMaxSize = c.scrollWidth, a && (u.scrollStart = (bt ? u.scrollMaxSize - u.scrollViewSize : 0) - u.scrollStart)) : (e === window ? (u.scrollStart = window.pageYOffset || window.scrollY || document.body.scrollTop || 0, u.scrollViewSize += document.documentElement.clientHeight) : (u.scrollStart = c.scrollTop, u.scrollViewSize += c.clientHeight), u.scrollMaxSize = c.scrollHeight), n !== null) for (let e = n.previousElementSibling; e !== null; e = e.previousElementSibling) e.classList.contains("q-virtual-scroll--skip") || (u.offsetStart += e[l]);
917
- if (r !== null) for (let e = r.nextElementSibling; e !== null; e = e.nextElementSibling) e.classList.contains("q-virtual-scroll--skip") || (u.offsetEnd += e[l]);
918
- if (t !== e) {
919
- let n = c.getBoundingClientRect(), r = t.getBoundingClientRect();
920
- i ? (u.offsetStart += r.left - n.left, u.offsetEnd -= r.width) : (u.offsetStart += r.top - n.top, u.offsetEnd -= r.height), e !== window && (u.offsetStart += u.scrollStart), u.offsetEnd += u.scrollMaxSize - u.offsetStart;
921
- }
922
- return u;
923
- }
924
- function Et(e, t, n, r) {
925
- t === "end" && (t = (e === window ? document.body : e)[n ? "scrollWidth" : "scrollHeight"]), e === window ? n ? (r && (t = (bt ? document.body.scrollWidth - document.documentElement.clientWidth : 0) - t), window.scrollTo(t, window.pageYOffset || window.scrollY || document.body.scrollTop || 0)) : window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, t) : n ? (r && (t = (bt ? e.scrollWidth - e.offsetWidth : 0) - t), e.scrollLeft = t) : e.scrollTop = t;
926
- }
927
- function Dt(e, t, n, r) {
928
- if (n >= r) return 0;
929
- let i = t.length, a = Math.floor(n / $), o = Math.floor((r - 1) / $) + 1, s = e.slice(a, o).reduce(wt, 0);
930
- return n % $ !== 0 && (s -= t.slice(a * $, n).reduce(wt, 0)), r % $ !== 0 && r !== i && (s -= t.slice(r, o * $).reduce(wt, 0)), s;
931
- }
932
- var Ot = {
933
- virtualScrollSliceSize: {
934
- type: [Number, String],
935
- default: 10
936
- },
937
- virtualScrollSliceRatioBefore: {
938
- type: [Number, String],
939
- default: 1
940
- },
941
- virtualScrollSliceRatioAfter: {
942
- type: [Number, String],
943
- default: 1
944
- },
945
- virtualScrollItemSize: {
946
- type: [Number, String],
947
- default: 24
948
- },
949
- virtualScrollStickySizeStart: {
950
- type: [Number, String],
951
- default: 0
952
- },
953
- virtualScrollStickySizeEnd: {
954
- type: [Number, String],
955
- default: 0
956
- },
957
- tableColspan: [Number, String]
958
- };
959
- Object.keys(Ot);
960
- var kt = {
961
- virtualScrollHorizontal: Boolean,
962
- onVirtualScroll: Function,
963
- ...Ot
964
- };
965
- function At({ virtualScrollLength: e, getVirtualScrollTarget: t, getVirtualScrollEl: n, virtualScrollItemSizeComputed: r }) {
966
- let { props: i, emit: a, proxy: o } = Te(), { $q: s } = o, c, l, u, d = [], f, p = q(0), m = q(0), h = q({}), g = q(null), _ = q(null), v = q(null), y = q({
967
- from: 0,
968
- to: 0
969
- }), b = H(() => i.tableColspan === void 0 ? 100 : i.tableColspan);
970
- r === void 0 && (r = H(() => i.virtualScrollItemSize));
971
- let x = H(() => r.value + ";" + i.virtualScrollHorizontal);
972
- J(H(() => x.value + ";" + i.virtualScrollSliceRatioBefore + ";" + i.virtualScrollSliceRatioAfter), () => {
973
- O();
974
- }), J(x, S);
975
- function S() {
976
- D(l, !0);
977
- }
978
- function C(e) {
979
- D(e === void 0 ? l : e);
980
- }
981
- function w(r, a) {
982
- let o = t();
983
- if (o == null || o.nodeType === 8) return;
984
- let c = Tt(o, n(), g.value, _.value, i.virtualScrollHorizontal, s.lang.rtl, i.virtualScrollStickySizeStart, i.virtualScrollStickySizeEnd);
985
- u !== c.scrollViewSize && O(c.scrollViewSize), E(o, c, Math.min(e.value - 1, Math.max(0, Number.parseInt(r, 10) || 0)), 0, xt.includes(a) ? a : l !== -1 && r > l ? "end" : "start");
986
- }
987
- function T() {
988
- let r = t();
989
- if (r == null || r.nodeType === 8) return;
990
- let a = Tt(r, n(), g.value, _.value, i.virtualScrollHorizontal, s.lang.rtl, i.virtualScrollStickySizeStart, i.virtualScrollStickySizeEnd), o = e.value - 1, l = a.scrollMaxSize - a.offsetStart - a.offsetEnd - m.value;
991
- if (c === a.scrollStart) return;
992
- if (a.scrollMaxSize <= 0) {
993
- E(r, a, 0, 0);
994
- return;
995
- }
996
- u !== a.scrollViewSize && O(a.scrollViewSize), ee(y.value.from);
997
- let h = Math.floor(a.scrollMaxSize - Math.max(a.scrollViewSize, a.offsetEnd) - Math.min(f[o], a.scrollViewSize / 2));
998
- if (h > 0 && Math.ceil(a.scrollStart) >= h) {
999
- E(r, a, o, a.scrollMaxSize - a.offsetEnd - d.reduce(wt, 0));
1000
- return;
1001
- }
1002
- let v = 0, b = a.scrollStart - a.offsetStart, x = b;
1003
- if (b <= l && b + a.scrollViewSize >= p.value) b -= p.value, v = y.value.from, x = b;
1004
- else for (let e = 0; b >= d[e] && v < o; e++) b -= d[e], v += $;
1005
- for (; b > 0 && v < o;) b -= f[v], b > -a.scrollViewSize ? (v++, x = b) : x = f[v] + b;
1006
- E(r, a, v, x);
1007
- }
1008
- function E(t, n, r, a, o) {
1009
- let l = typeof o == "string" && o.includes("-force"), u = l ? o.replace("-force", "") : o, g = u === void 0 ? "start" : u, _ = Math.max(0, r - h.value[g]), b = _ + h.value.total;
1010
- b > e.value && (b = e.value, _ = Math.max(0, b - h.value.total)), c = n.scrollStart;
1011
- let x = _ !== y.value.from || b !== y.value.to;
1012
- if (!x && u === void 0) {
1013
- k(r);
1014
- return;
1015
- }
1016
- let { activeElement: S } = document, C = v.value;
1017
- x && C !== null && C !== S && C.contains(S) && (C.addEventListener("focusout", te), setTimeout(() => {
1018
- C?.removeEventListener("focusout", te);
1019
- }, 0)), Ct(C, r - _);
1020
- let w = u === void 0 ? 0 : f.slice(_, r).reduce(wt, 0);
1021
- if (x) {
1022
- let t = b >= y.value.from && _ <= y.value.to ? y.value.to : b;
1023
- y.value = {
1024
- from: _,
1025
- to: t
1026
- }, p.value = Dt(d, f, 0, _), m.value = Dt(d, f, b, e.value), requestAnimationFrame(() => {
1027
- y.value.to !== b && c === n.scrollStart && (y.value = {
1028
- from: y.value.from,
1029
- to: b
1030
- }, m.value = Dt(d, f, b, e.value));
1031
- });
1032
- }
1033
- requestAnimationFrame(() => {
1034
- if (c !== n.scrollStart) return;
1035
- x && ee(_);
1036
- let e = f.slice(_, r).reduce(wt, 0), o = e + n.offsetStart + p.value, d = o + f[r], m = o + a;
1037
- if (u !== void 0) {
1038
- let t = e - w, i = n.scrollStart + t;
1039
- m = !l && i < o && d < i + n.scrollViewSize ? i : u === "end" ? d - n.scrollViewSize : o - (u === "start" ? 0 : Math.round((n.scrollViewSize - f[r]) / 2));
1040
- }
1041
- c = m, Et(t, m, i.virtualScrollHorizontal, s.lang.rtl), k(r);
1042
- });
1043
- }
1044
- function ee(e) {
1045
- let t = v.value;
1046
- if (t) {
1047
- let n = St.call(t.children, (e) => e.classList && !e.classList.contains("q-virtual-scroll--skip")), r = n.length, a = i.virtualScrollHorizontal ? (e) => e.getBoundingClientRect().width : (e) => e.offsetHeight, o = e, s, c;
1048
- for (let e = 0; e < r;) {
1049
- for (s = a(n[e]), e++; e < r && n[e].classList.contains("q-virtual-scroll--with-prev");) s += a(n[e]), e++;
1050
- c = s - f[o], c !== 0 && (f[o] += c, d[Math.floor(o / $)] += c), o++;
1051
- }
1052
- }
1053
- }
1054
- function te() {
1055
- v.value?.focus();
1056
- }
1057
- function D(t, n) {
1058
- let i = Number(r.value);
1059
- (n || !Array.isArray(f)) && (f = []);
1060
- let a = f.length;
1061
- f.length = e.value;
1062
- for (let t = e.value - 1; t >= a; t--) f[t] = i;
1063
- let o = Math.floor((e.value - 1) / $);
1064
- d = [];
1065
- for (let t = 0; t <= o; t++) {
1066
- let n = 0, r = Math.min((t + 1) * $, e.value);
1067
- for (let e = t * $; e < r; e++) n += f[e];
1068
- d.push(n);
1069
- }
1070
- l = -1, c = void 0, p.value = Dt(d, f, 0, y.value.from), m.value = Dt(d, f, y.value.to, e.value), t >= 0 ? (ee(y.value.from), W(() => {
1071
- w(t);
1072
- })) : A();
1073
- }
1074
- function O(e) {
1075
- if (e === void 0 && typeof window < "u") {
1076
- let r = t();
1077
- r != null && r.nodeType !== 8 && (e = Tt(r, n(), g.value, _.value, i.virtualScrollHorizontal, s.lang.rtl, i.virtualScrollStickySizeStart, i.virtualScrollStickySizeEnd).scrollViewSize);
1078
- }
1079
- u = e;
1080
- let a = Number.parseFloat(i.virtualScrollSliceRatioBefore) || 0, o = Number.parseFloat(i.virtualScrollSliceRatioAfter) || 0, c = 1 + a + o, l = e === void 0 || e <= 0 ? 1 : Math.ceil(e / r.value), d = Math.max(1, l, Math.ceil((i.virtualScrollSliceSize > 0 ? i.virtualScrollSliceSize : 10) / c));
1081
- h.value = {
1082
- total: Math.ceil(d * c),
1083
- start: Math.ceil(d * a),
1084
- center: Math.ceil(d * (.5 + a)),
1085
- end: Math.ceil(d * (1 + a)),
1086
- view: l
1087
- };
1088
- }
1089
- function ne(e, t) {
1090
- let n = i.virtualScrollHorizontal ? "width" : "height", a = { ["--q-virtual-scroll-item-" + n]: r.value + "px" };
1091
- return [
1092
- e === "tbody" ? U(e, {
1093
- class: "q-virtual-scroll__padding",
1094
- key: "before",
1095
- ref: g
1096
- }, [U("tr", [U("td", {
1097
- style: {
1098
- [n]: `${p.value}px`,
1099
- ...a
1100
- },
1101
- colspan: b.value
1102
- })])]) : U(e, {
1103
- class: "q-virtual-scroll__padding",
1104
- key: "before",
1105
- ref: g,
1106
- style: {
1107
- [n]: `${p.value}px`,
1108
- ...a
1109
- }
1110
- }),
1111
- U(e, {
1112
- class: "q-virtual-scroll__content",
1113
- key: "content",
1114
- ref: v,
1115
- tabindex: -1
1116
- }, t.flat()),
1117
- e === "tbody" ? U(e, {
1118
- class: "q-virtual-scroll__padding",
1119
- key: "after",
1120
- ref: _
1121
- }, [U("tr", [U("td", {
1122
- style: {
1123
- [n]: `${m.value}px`,
1124
- ...a
1125
- },
1126
- colspan: b.value
1127
- })])]) : U(e, {
1128
- class: "q-virtual-scroll__padding",
1129
- key: "after",
1130
- ref: _,
1131
- style: {
1132
- [n]: `${m.value}px`,
1133
- ...a
1134
- }
1135
- })
1136
- ];
1137
- }
1138
- function k(e) {
1139
- l !== e && (i.onVirtualScroll !== void 0 && a("virtualScroll", {
1140
- index: e,
1141
- from: y.value.from,
1142
- to: y.value.to - 1,
1143
- direction: e < l ? "decrease" : "increase",
1144
- ref: o
1145
- }), l = e);
1146
- }
1147
- O();
1148
- let A = j(T, s.platform.is.ios ? 120 : 35);
1149
- G(() => {
1150
- O();
1151
- });
1152
- let re = !1;
1153
- return K(() => {
1154
- re = !0;
1155
- }), Ee(() => {
1156
- if (!re) return;
1157
- let e = t();
1158
- c !== void 0 && e != null && e.nodeType !== 8 ? Et(e, c, i.virtualScrollHorizontal, s.lang.rtl) : w(l);
1159
- }), De(() => {
1160
- A.cancel();
1161
- }), Object.assign(o, {
1162
- scrollTo: w,
1163
- reset: S,
1164
- refresh: C
1165
- }), {
1166
- virtualScrollSliceRange: y,
1167
- virtualScrollSliceSizeComputed: h,
1168
- setVirtualScrollSize: O,
1169
- onVirtualScrollEvt: A,
1170
- localResetVirtualScroll: D,
1171
- padVirtualScroll: ne,
1172
- scrollTo: w,
1173
- reset: S,
1174
- refresh: C
1175
- };
1176
- }
1177
- //#endregion
1178
- //#region node_modules/.pnpm/quasar@2.23.3/node_modules/quasar/src/utils/is/is.js
1179
- function jt(e, t) {
1180
- if (e === t) return !0;
1181
- if (e !== null && t !== null && typeof e == "object" && typeof t == "object") {
1182
- if (e.constructor !== t.constructor) return !1;
1183
- let n, r;
1184
- if (e.constructor === Array) {
1185
- if (n = e.length, n !== t.length) return !1;
1186
- for (r = n; r-- !== 0;) if (!jt(e[r], t[r])) return !1;
1187
- return !0;
1188
- }
1189
- if (e.constructor === Map) {
1190
- if (e.size !== t.size) return !1;
1191
- let n = e.entries();
1192
- for (r = n.next(); !r.done;) {
1193
- if (!t.has(r.value[0])) return !1;
1194
- r = n.next();
1195
- }
1196
- for (n = e.entries(), r = n.next(); !r.done;) {
1197
- if (!jt(r.value[1], t.get(r.value[0]))) return !1;
1198
- r = n.next();
1199
- }
1200
- return !0;
1201
- }
1202
- if (e.constructor === Set) {
1203
- if (e.size !== t.size) return !1;
1204
- let n = e.entries();
1205
- for (r = n.next(); !r.done;) {
1206
- if (!t.has(r.value[0])) return !1;
1207
- r = n.next();
1208
- }
1209
- return !0;
1210
- }
1211
- if (e.buffer != null && e.buffer.constructor === ArrayBuffer) {
1212
- if (n = e.length, n !== t.length) return !1;
1213
- for (r = n; r-- !== 0;) if (e[r] !== t[r]) return !1;
1214
- return !0;
1215
- }
1216
- if (e.constructor === RegExp) return e.source === t.source && e.flags === t.flags;
1217
- if (e.valueOf !== Object.prototype.valueOf) return e.valueOf() === t.valueOf();
1218
- if (e.toString !== Object.prototype.toString) return e.toString() === t.toString();
1219
- let i = Object.keys(e).filter((t) => e[t] !== void 0);
1220
- if (n = i.length, n !== Object.keys(t).filter((e) => t[e] !== void 0).length) return !1;
1221
- for (r = n; r-- !== 0;) {
1222
- let n = i[r];
1223
- if (!jt(e[n], t[n])) return !1;
1224
- }
1225
- return !0;
1226
- }
1227
- return e !== e && t !== t;
1228
- }
1229
- //#endregion
1230
- //#region node_modules/.pnpm/quasar@2.23.3/node_modules/quasar/src/utils/format/format.js
1231
- function Mt(e, t, n) {
1232
- if (n <= t) return t;
1233
- let r = n - t + 1, i = t + (e - t) % r;
1234
- return i < t && (i = r + i), i === 0 ? 0 : i;
1235
- }
1236
- //#endregion
1237
- //#region node_modules/.pnpm/quasar@2.23.3/node_modules/quasar/src/components/select/QSelect.js
1238
- var Nt = (e) => [
1239
- "add",
1240
- "add-unique",
1241
- "toggle"
1242
- ].includes(e), Pt = ".*+?^${}()|[]\\", Ft = Object.keys(ge);
1243
- function It(e, t) {
1244
- if (typeof e == "function") return e;
1245
- let n = e === void 0 ? t : e;
1246
- return (e) => typeof e == "object" && e && n in e ? e[n] : e;
1247
- }
1248
- //#endregion
1249
- //#region lib/utils/defaults/qSelect.js
1250
- V(C({
1251
- name: "QSelect",
1252
- inheritAttrs: !1,
1253
- props: {
1254
- ...kt,
1255
- ...ue,
1256
- ...ge,
1257
- modelValue: { required: !0 },
1258
- multiple: Boolean,
1259
- displayValue: [String, Number],
1260
- displayValueHtml: Boolean,
1261
- dropdownIcon: String,
1262
- options: {
1263
- type: Array,
1264
- default: () => []
1265
- },
1266
- optionValue: [Function, String],
1267
- optionLabel: [Function, String],
1268
- optionDisable: [Function, String],
1269
- hideSelected: Boolean,
1270
- hideDropdownIcon: Boolean,
1271
- fillInput: Boolean,
1272
- maxValues: [Number, String],
1273
- optionsDense: Boolean,
1274
- optionsDark: {
1275
- type: Boolean,
1276
- default: null
1277
- },
1278
- optionsSelectedClass: String,
1279
- optionsHtml: Boolean,
1280
- optionsCover: Boolean,
1281
- menuShrink: Boolean,
1282
- menuAnchor: String,
1283
- menuSelf: String,
1284
- menuOffset: Array,
1285
- popupContentClass: String,
1286
- popupContentStyle: [
1287
- String,
1288
- Array,
1289
- Object
1290
- ],
1291
- popupNoRouteDismiss: Boolean,
1292
- useInput: Boolean,
1293
- useChips: Boolean,
1294
- newValueMode: {
1295
- type: String,
1296
- validator: Nt
1297
- },
1298
- mapOptions: Boolean,
1299
- emitValue: Boolean,
1300
- disableTabSelection: Boolean,
1301
- inputDebounce: {
1302
- type: [Number, String],
1303
- default: 500
1304
- },
1305
- inputClass: [
1306
- Array,
1307
- String,
1308
- Object
1309
- ],
1310
- inputStyle: [
1311
- Array,
1312
- String,
1313
- Object
1314
- ],
1315
- tabindex: {
1316
- type: [String, Number],
1317
- default: 0
1318
- },
1319
- autocomplete: String,
1320
- transitionShow: {},
1321
- transitionHide: {},
1322
- transitionDuration: {},
1323
- behavior: {
1324
- type: String,
1325
- validator: (e) => [
1326
- "default",
1327
- "menu",
1328
- "dialog"
1329
- ].includes(e),
1330
- default: "default"
1331
- },
1332
- virtualScrollItemSize: kt.virtualScrollItemSize.type,
1333
- onNewValue: Function,
1334
- onFilter: Function
1335
- },
1336
- emits: [
1337
- ...le,
1338
- "add",
1339
- "remove",
1340
- "inputValue",
1341
- "keyup",
1342
- "keypress",
1343
- "keydown",
1344
- "popupShow",
1345
- "popupHide",
1346
- "filterAbort"
1347
- ],
1348
- setup(t, { slots: n, emit: r }) {
1349
- let { proxy: i } = Te(), { $q: a } = i, o = q(!1), s = q(!1), c = q(-1), l = q(""), u = q(!1), d = q(!1), f = null, p = null, m, h, g, _ = null, v, y, x, S, C = q(null), w = q(null), T = q(null), E = q(null), ee = q(null), D = te(t), O = oe(rt), j = H(() => Array.isArray(t.options) ? t.options.length : 0), { virtualScrollSliceRange: ie, virtualScrollSliceSizeComputed: M, localResetVirtualScroll: se, padVirtualScroll: ce, onVirtualScrollEvt: le, scrollTo: N, setVirtualScrollSize: P } = At({
1350
- virtualScrollLength: j,
1351
- getVirtualScrollTarget: $e,
1352
- getVirtualScrollEl: Ze,
1353
- virtualScrollItemSizeComputed: H(() => t.virtualScrollItemSize === void 0 ? t.optionsDense ? 24 : 48 : t.virtualScrollItemSize)
1354
- }), F = A(), I = H(() => {
1355
- let e = t.mapOptions && !t.multiple, n = t.modelValue !== void 0 && (t.modelValue !== null || e) ? t.multiple && Array.isArray(t.modelValue) ? t.modelValue : [t.modelValue] : [];
1356
- if (t.mapOptions && Array.isArray(t.options)) {
1357
- let r = t.mapOptions && m !== void 0 ? m : [], i = n.map((e) => Ve(e, r));
1358
- return t.modelValue === null && e ? i.filter((e) => e !== null) : i;
1359
- }
1360
- return n;
1361
- }), ue = H(() => {
1362
- let e = {};
1363
- return Ft.forEach((n) => {
1364
- let r = t[n];
1365
- r !== void 0 && (e[n] = r);
1366
- }), e;
1367
- }), fe = H(() => t.optionsDark === null ? F.isDark.value : t.optionsDark), L = H(() => me(I.value)), pe = H(() => {
1368
- let e = "q-field__input q-placeholder col";
1369
- return t.hideSelected || I.value.length === 0 ? [e, t.inputClass] : (e += " q-field__input--padding", t.inputClass === void 0 ? e : [e, t.inputClass]);
1370
- }), R = H(() => (t.virtualScrollHorizontal ? "q-virtual-scroll--horizontal" : "") + (t.popupContentClass ? " " + t.popupContentClass : "")), B = H(() => j.value === 0), he = H(() => I.value.map((e) => K.value(e)).join(", ")), ge = H(() => t.displayValue === void 0 ? he.value : t.displayValue), _e = H(() => t.optionsHtml ? () => !0 : (e) => e?.html === !0), ve = H(() => t.displayValueHtml || t.displayValue === void 0 && (t.optionsHtml || I.value.some(_e.value))), ye = H(() => F.focused.value ? t.tabindex : -1), be = H(() => {
1371
- let e = {
1372
- tabindex: t.tabindex,
1373
- role: "combobox",
1374
- "aria-label": t.label,
1375
- "aria-readonly": t.readonly ? "true" : "false",
1376
- "aria-autocomplete": t.useInput ? "list" : "none",
1377
- "aria-expanded": o.value ? "true" : "false",
1378
- "aria-controls": `${F.targetUid.value}_lb`
1379
- };
1380
- return c.value >= 0 && (e["aria-activedescendant"] = `${F.targetUid.value}_${c.value}`), e;
1381
- }), xe = H(() => ({
1382
- id: `${F.targetUid.value}_lb`,
1383
- role: "listbox",
1384
- "aria-multiselectable": t.multiple ? "true" : "false"
1385
- })), Se = H(() => I.value.map((e, t) => ({
1386
- index: t,
1387
- opt: e,
1388
- html: _e.value(e),
1389
- selected: !0,
1390
- removeAtIndex: Ie,
1391
- toggleOption: Y,
1392
- tabindex: ye.value
1393
- }))), Ce = H(() => {
1394
- if (j.value === 0) return [];
1395
- let { from: e, to: n } = ie.value;
1396
- return t.options.slice(e, n).map((n, r) => {
1397
- let i = je.value(n) === !0, s = He(n), l = e + r, u = {
1398
- clickable: !0,
1399
- active: s,
1400
- activeClass: Ee.value,
1401
- manualFocus: !0,
1402
- focused: !1,
1403
- disable: i,
1404
- tabindex: -1,
1405
- dense: t.optionsDense,
1406
- dark: fe.value,
1407
- role: "option",
1408
- "aria-selected": s ? "true" : "false",
1409
- id: `${F.targetUid.value}_${l}`,
1410
- onClick: () => {
1411
- Y(n);
1412
- }
1413
- };
1414
- return i || (c.value === l && (u.focused = !0), a.platform.is.desktop && (u.onMousemove = () => {
1415
- o.value && ze(l);
1416
- })), {
1417
- index: l,
1418
- opt: n,
1419
- html: _e.value(n),
1420
- label: K.value(n),
1421
- selected: u.active,
1422
- focused: u.focused,
1423
- toggleOption: Y,
1424
- setOptionIndex: ze,
1425
- itemProps: u
1426
- };
1427
- });
1428
- }), V = H(() => t.dropdownIcon === void 0 ? a.iconSet.arrow.dropdown : t.dropdownIcon), we = H(() => !t.optionsCover && !t.outlined && !t.standout && !t.borderless && !t.rounded), Ee = H(() => t.optionsSelectedClass === void 0 ? t.color === void 0 ? "" : `text-${t.color}` : t.optionsSelectedClass), G = H(() => It(t.optionValue, "value")), K = H(() => It(t.optionLabel, "label")), je = H(() => It(t.optionDisable, "disable")), Me = H(() => I.value.map(G.value)), Ne = H(() => {
1429
- let e = {
1430
- onInput: rt,
1431
- onChange: O,
1432
- onKeydown: Xe,
1433
- onKeyup: Je,
1434
- onKeypress: Ye,
1435
- onFocus: Ue,
1436
- onClick(e) {
1437
- h && z(e);
1438
- }
1439
- };
1440
- return e.onCompositionstart = e.onCompositionupdate = e.onCompositionend = O, e;
1441
- });
1442
- J(I, (e) => {
1443
- m = e, t.useInput && t.fillInput && !t.multiple && !F.innerLoading.value && (!s.value && !o.value || !L.value) && (g || Q(), (s.value || o.value) && Z(""));
1444
- }, { immediate: !0 }), J(() => t.fillInput, Q), J(o, _t), J(j, vt);
1445
- function Pe(e) {
1446
- return t.emitValue ? G.value(e) : e;
1447
- }
1448
- function Fe(e) {
1449
- if (e !== -1 && e < I.value.length) if (t.multiple) {
1450
- let n = [...t.modelValue];
1451
- r("remove", {
1452
- index: e,
1453
- value: n.splice(e, 1)[0]
1454
- }), r("update:modelValue", n);
1455
- } else r("update:modelValue", null);
1456
- }
1457
- function Ie(e) {
1458
- Fe(e), F.focus();
1459
- }
1460
- function Re(e, n) {
1461
- let i = Pe(e);
1462
- if (!t.multiple) {
1463
- t.fillInput && X(K.value(e), !0, !0), r("update:modelValue", i);
1464
- return;
1465
- }
1466
- if (I.value.length === 0) {
1467
- r("add", {
1468
- index: 0,
1469
- value: i
1470
- }), r("update:modelValue", t.multiple ? [i] : i);
1471
- return;
1472
- }
1473
- if (n && He(e) || t.maxValues !== void 0 && t.modelValue.length >= t.maxValues) return;
1474
- let a = [...t.modelValue];
1475
- r("add", {
1476
- index: a.length,
1477
- value: i
1478
- }), a.push(i), r("update:modelValue", a);
1479
- }
1480
- function Y(e, n) {
1481
- if (!F.editable.value || e === void 0 || je.value(e) === !0) return;
1482
- let i = G.value(e);
1483
- if (!t.multiple) {
1484
- n || (X(t.fillInput ? K.value(e) : "", !0, !0), gt()), w.value?.focus(), (I.value.length === 0 || !jt(G.value(I.value[0]), i)) && r("update:modelValue", t.emitValue ? i : e);
1485
- return;
1486
- }
1487
- if ((!h || u.value) && F.focus(), Ue(), I.value.length === 0) {
1488
- let n = t.emitValue ? i : e;
1489
- r("add", {
1490
- index: 0,
1491
- value: n
1492
- }), r("update:modelValue", t.multiple ? [n] : n);
1493
- return;
1494
- }
1495
- let a = [...t.modelValue], o = Me.value.findIndex((e) => jt(e, i));
1496
- if (o !== -1) r("remove", {
1497
- index: o,
1498
- value: a.splice(o, 1)[0]
1499
- });
1500
- else {
1501
- if (t.maxValues !== void 0 && a.length >= t.maxValues) return;
1502
- let n = t.emitValue ? i : e;
1503
- r("add", {
1504
- index: a.length,
1505
- value: n
1506
- }), a.push(n);
1507
- }
1508
- r("update:modelValue", a);
1509
- }
1510
- function ze(e) {
1511
- if (!a.platform.is.desktop) return;
1512
- let t = e !== -1 && e < j.value ? e : -1;
1513
- c.value !== t && (c.value = t);
1514
- }
1515
- function Be(e = 1, n) {
1516
- if (o.value) {
1517
- let r = c.value;
1518
- do
1519
- r = Mt(r + e, -1, j.value - 1);
1520
- while (r !== -1 && r !== c.value && je.value(t.options[r]) === !0);
1521
- c.value !== r && (ze(r), N(r), !n && t.useInput && t.fillInput && it(r >= 0 ? K.value(t.options[r]) : v, !0));
1522
- }
1523
- }
1524
- function Ve(e, n) {
1525
- let r = (t) => jt(G.value(t), e);
1526
- return t.options.find(r) || n.find(r) || e;
1527
- }
1528
- function He(e) {
1529
- let t = G.value(e);
1530
- return Me.value.find((e) => jt(e, t)) !== void 0;
1531
- }
1532
- function Ue(e) {
1533
- t.useInput && w.value !== null && (e === void 0 || w.value === e.target && e.target.value === he.value) && w.value.select();
1534
- }
1535
- function We(t) {
1536
- e(t, 27) && o.value && (z(t), gt(), Q()), r("keyup", t);
1537
- }
1538
- function Je(e) {
1539
- let { value: n } = e.target;
1540
- if (e.keyCode !== void 0) {
1541
- We(e);
1542
- return;
1543
- }
1544
- if (e.target.value = "", f !== null && (clearTimeout(f), f = null), p !== null && (clearTimeout(p), p = null), Q(), typeof n == "string" && n.length !== 0) {
1545
- let e = n.toLocaleLowerCase(), r = (n) => {
1546
- let r = t.options.find((t) => String(n.value(t)).toLocaleLowerCase() === e);
1547
- return r === void 0 ? !1 : (I.value.includes(r) ? gt() : Y(r), !0);
1548
- }, i = (e) => {
1549
- !r(G) && !e && !r(K) && Z(n, !0, () => i(!0));
1550
- };
1551
- i();
1552
- } else F.clearValue(e);
1553
- }
1554
- function Ye(e) {
1555
- r("keypress", e);
1556
- }
1557
- function Xe(e) {
1558
- if (r("keydown", e), re(e)) return;
1559
- let n = l.value.length !== 0 && (t.newValueMode !== void 0 || t.onNewValue !== void 0), i = !e.shiftKey && !t.disableTabSelection && !t.multiple && (c.value !== -1 || n);
1560
- if (e.keyCode === 27) {
1561
- de(e);
1562
- return;
1563
- }
1564
- if (e.keyCode === 9 && !i) {
1565
- mt();
1566
- return;
1567
- }
1568
- if (e.target === void 0 || e.target.id !== F.targetUid.value || !F.editable.value) return;
1569
- if (e.keyCode === 40 && !F.innerLoading.value && !o.value) {
1570
- k(e), ht();
1571
- return;
1572
- }
1573
- if (e.keyCode === 8 && (t.useChips || t.clearable) && !t.hideSelected && l.value.length === 0) {
1574
- t.multiple && Array.isArray(t.modelValue) ? Fe(t.modelValue.length - 1) : !t.multiple && t.modelValue !== null && r("update:modelValue", null);
1575
- return;
1576
- }
1577
- (e.keyCode === 35 || e.keyCode === 36) && (typeof l.value != "string" || l.value.length === 0) && (k(e), c.value = -1, Be(e.keyCode === 36 ? 1 : -1, t.multiple)), (e.keyCode === 33 || e.keyCode === 34) && M.value !== void 0 && (k(e), c.value = Math.max(-1, Math.min(j.value, c.value + (e.keyCode === 33 ? -1 : 1) * M.value.view)), Be(e.keyCode === 33 ? 1 : -1, t.multiple)), (e.keyCode === 38 || e.keyCode === 40) && (k(e), Be(e.keyCode === 38 ? -1 : 1, t.multiple));
1578
- let a = j.value;
1579
- if ((x === void 0 || S < Date.now()) && (x = ""), a > 0 && !t.useInput && e.key !== void 0 && e.key.length === 1 && !e.altKey && !e.ctrlKey && !e.metaKey && (e.keyCode !== 32 || x.length !== 0)) {
1580
- o.value || ht(e);
1581
- let n = e.key.toLocaleLowerCase(), r = x.length === 1 && x[0] === n;
1582
- S = Date.now() + 1500, r || (k(e), x += n);
1583
- let i = RegExp("^" + [...x].map((e) => Pt.includes(e) ? "\\" + e : e).join(".*"), "i"), s = c.value;
1584
- if (r || s < 0 || !i.test(K.value(t.options[s]))) do
1585
- s = Mt(s + 1, -1, a - 1);
1586
- while (s !== c.value && (je.value(t.options[s]) === !0 || !i.test(K.value(t.options[s]))));
1587
- c.value !== s && W(() => {
1588
- ze(s), N(s), s >= 0 && t.useInput && t.fillInput && it(K.value(t.options[s]), !0);
1589
- });
1590
- return;
1591
- }
1592
- if (!(e.keyCode !== 13 && (e.keyCode !== 32 || t.useInput || x !== "") && (e.keyCode !== 9 || !i))) {
1593
- if (e.keyCode !== 9 && k(e), c.value !== -1 && c.value < a) {
1594
- Y(t.options[c.value]);
1595
- return;
1596
- }
1597
- if (n) {
1598
- let e = (e, n) => {
1599
- if (n) {
1600
- if (!Nt(n)) return;
1601
- } else n = t.newValueMode;
1602
- X("", !t.multiple, !0), e != null && ((n === "toggle" ? Y : Re)(e, n === "add-unique"), t.multiple || (w.value?.focus(), gt()));
1603
- };
1604
- if (t.onNewValue === void 0 ? e(l.value) : r("newValue", l.value, e), !t.multiple) return;
1605
- }
1606
- o.value ? mt() : F.innerLoading.value || ht();
1607
- }
1608
- }
1609
- function Ze() {
1610
- return h ? ee.value : T.value !== null && T.value.contentEl !== null ? T.value.contentEl : void 0;
1611
- }
1612
- function $e() {
1613
- return Ze();
1614
- }
1615
- function et() {
1616
- return t.hideSelected ? [] : n["selected-item"] === void 0 ? n.selected === void 0 ? t.useChips ? Se.value.map((e, n) => U(Le, {
1617
- key: "option-" + n,
1618
- removable: F.editable.value && je.value(e.opt) !== !0,
1619
- dense: !0,
1620
- textColor: t.color,
1621
- tabindex: ye.value,
1622
- onRemove() {
1623
- e.removeAtIndex(n);
1624
- }
1625
- }, () => U("span", {
1626
- class: "ellipsis",
1627
- [e.html ? "innerHTML" : "textContent"]: K.value(e.opt)
1628
- }))) : [U("span", {
1629
- class: "ellipsis",
1630
- [ve.value ? "innerHTML" : "textContent"]: ge.value
1631
- })] : [n.selected()].flat() : Se.value.map((e) => n["selected-item"](e));
1632
- }
1633
- function tt() {
1634
- if (B.value) return n["no-option"] === void 0 ? void 0 : n["no-option"]({ inputValue: l.value });
1635
- let e = n.option === void 0 ? (e) => U(Ge, {
1636
- key: e.index,
1637
- ...e.itemProps
1638
- }, () => U(Ke, () => U(qe, () => U("span", { [e.html ? "innerHTML" : "textContent"]: e.label })))) : n.option, t = ce("div", Ce.value.map(e));
1639
- return n["before-options"] !== void 0 && (t = [n["before-options"](), ...t].flat()), b(n["after-options"], t);
1640
- }
1641
- function nt(e, n) {
1642
- let r = n ? {
1643
- ...be.value,
1644
- ...F.splitAttrs.attributes.value
1645
- } : void 0, i = {
1646
- ref: n ? w : void 0,
1647
- key: "i_t",
1648
- class: pe.value,
1649
- style: t.inputStyle,
1650
- value: l.value === void 0 ? "" : l.value,
1651
- type: "search",
1652
- ...r,
1653
- id: n ? F.targetUid.value : void 0,
1654
- maxlength: t.maxlength,
1655
- autocomplete: t.autocomplete,
1656
- "data-autofocus": e === !0 || t.autofocus || void 0,
1657
- disabled: t.disable,
1658
- readonly: t.readonly,
1659
- ...Ne.value
1660
- };
1661
- return !e && h && (Array.isArray(i.class) ? i.class = [...i.class, "no-pointer-events"] : i.class += " no-pointer-events"), U("input", i);
1662
- }
1663
- function rt(e) {
1664
- f !== null && (clearTimeout(f), f = null), p !== null && (clearTimeout(p), p = null), !e?.target?.qComposing && (it(e.target.value || ""), g = !0, v = l.value, !F.focused.value && (!h || u.value) && F.focus(), t.onFilter !== void 0 && (f = setTimeout(() => {
1665
- f = null, Z(l.value);
1666
- }, t.inputDebounce)));
1667
- }
1668
- function it(e, n) {
1669
- l.value !== e && (p !== null && (clearTimeout(p), p = null), l.value = e, n || t.inputDebounce === 0 || t.inputDebounce === "0" ? r("inputValue", e) : p = setTimeout(() => {
1670
- p = null, r("inputValue", e);
1671
- }, t.inputDebounce));
1672
- }
1673
- function X(e, n, r) {
1674
- g = r !== !0, t.useInput && (it(e, !0), (n || g) && (v = e), n || Z(e));
1675
- }
1676
- function Z(e, n, a) {
1677
- if (t.onFilter === void 0 || !n && !F.focused.value) return;
1678
- F.innerLoading.value ? r("filterAbort") : (F.innerLoading.value = !0, d.value = !0), e !== "" && !t.multiple && I.value.length !== 0 && !g && e === K.value(I.value[0]) && (e = "");
1679
- let s = setTimeout(() => {
1680
- o.value &&= !1;
1681
- }, 10);
1682
- _ !== null && clearTimeout(_), _ = s, r("filter", e, (e, t) => {
1683
- (n || F.focused.value) && _ === s && (clearTimeout(_), typeof e == "function" && e(), d.value = !1, W(() => {
1684
- F.innerLoading.value = !1, F.editable.value && (n ? o.value && gt() : o.value ? _t(!0) : o.value = !0), typeof t == "function" && W(() => {
1685
- t(i);
1686
- }), typeof a == "function" && W(() => {
1687
- a(i);
1688
- });
1689
- }));
1690
- }, () => {
1691
- F.focused.value && _ === s && (clearTimeout(_), F.innerLoading.value = !1, d.value = !1), o.value &&= !1;
1692
- });
1693
- }
1694
- function at() {
1695
- return U(Qe, {
1696
- ref: T,
1697
- class: R.value,
1698
- style: t.popupContentStyle,
1699
- modelValue: o.value,
1700
- fit: !t.menuShrink,
1701
- cover: t.optionsCover && !B.value && !t.useInput,
1702
- anchor: t.menuAnchor,
1703
- self: t.menuSelf,
1704
- offset: t.menuOffset,
1705
- dark: fe.value,
1706
- noParentEvent: !0,
1707
- noRefocus: !0,
1708
- noFocus: !0,
1709
- noRouteDismiss: t.popupNoRouteDismiss,
1710
- square: we.value,
1711
- transitionShow: t.transitionShow,
1712
- transitionHide: t.transitionHide,
1713
- transitionDuration: t.transitionDuration,
1714
- separateClosePopup: !0,
1715
- ...xe.value,
1716
- onScrollPassive: le,
1717
- onBeforeShow: $,
1718
- onBeforeHide: ot,
1719
- onShow: st
1720
- }, tt);
1721
- }
1722
- function ot(e) {
1723
- xt(e), mt();
1724
- }
1725
- function st() {
1726
- P();
1727
- }
1728
- function ct(e) {
1729
- z(e), w.value?.focus(), u.value = !0, window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, 0);
1730
- }
1731
- function lt(e) {
1732
- z(e), W(() => {
1733
- u.value = !1;
1734
- });
1735
- }
1736
- function ut() {
1737
- let e = [U(Ae, {
1738
- class: `col-auto ${F.fieldClass.value}`,
1739
- ...ue.value,
1740
- for: F.targetUid.value,
1741
- dark: fe.value,
1742
- square: !0,
1743
- loading: d.value,
1744
- itemAligned: !1,
1745
- filled: !0,
1746
- stackLabel: l.value.length !== 0,
1747
- ...F.splitAttrs.listeners.value,
1748
- onFocus: ct,
1749
- onBlur: lt
1750
- }, {
1751
- ...n,
1752
- rawControl: () => F.getControl(!0),
1753
- before: void 0,
1754
- after: void 0
1755
- })];
1756
- return o.value && e.push(U("div", {
1757
- ref: ee,
1758
- class: R.value + " scroll",
1759
- style: t.popupContentStyle,
1760
- ...xe.value,
1761
- onClick: de,
1762
- onScrollPassive: le
1763
- }, tt())), U(yt, {
1764
- ref: E,
1765
- modelValue: s.value,
1766
- position: t.useInput ? "top" : void 0,
1767
- transitionShow: y,
1768
- transitionHide: t.transitionHide,
1769
- transitionDuration: t.transitionDuration,
1770
- noRouteDismiss: t.popupNoRouteDismiss,
1771
- onBeforeShow: $,
1772
- onBeforeHide: dt,
1773
- onHide: ft,
1774
- onShow: pt
1775
- }, () => U("div", { class: "q-select__dialog" + (fe.value ? " q-select__dialog--dark q-dark" : "") + (u.value ? " q-select__dialog--focused" : "") }, e));
1776
- }
1777
- function dt(e) {
1778
- xt(e), E.value !== null && E.value.__updateRefocusTarget(F.rootRef.value.querySelector(".q-field__native > [tabindex]:last-child")), F.focused.value = !1;
1779
- }
1780
- function ft(e) {
1781
- gt(), F.focused.value || r("blur", e), Q();
1782
- }
1783
- function pt() {
1784
- let e = document.activeElement;
1785
- (e === null || e.id !== F.targetUid.value) && w.value !== null && w.value !== e && w.value.focus(), P();
1786
- }
1787
- function mt() {
1788
- s.value || (c.value = -1, o.value &&= !1, F.focused.value || (_ !== null && (clearTimeout(_), _ = null), F.innerLoading.value && (r("filterAbort"), F.innerLoading.value = !1, d.value = !1)));
1789
- }
1790
- function ht(e) {
1791
- F.editable.value && (h ? (F.onControlFocusin(e), s.value = !0, W(() => {
1792
- F.focus();
1793
- })) : F.focus(), t.onFilter === void 0 ? (!B.value || n["no-option"] !== void 0) && (o.value = !0) : Z(l.value));
1794
- }
1795
- function gt() {
1796
- s.value = !1, mt();
1797
- }
1798
- function Q() {
1799
- t.useInput && X(!t.multiple && t.fillInput && I.value.length !== 0 && K.value(I.value[0]) || "", !0, !0);
1800
- }
1801
- function _t(e) {
1802
- let n = -1;
1803
- if (e) {
1804
- if (I.value.length !== 0) {
1805
- let e = G.value(I.value[0]);
1806
- n = t.options.findIndex((t) => jt(G.value(t), e));
1807
- }
1808
- se(n);
1809
- }
1810
- ze(n);
1811
- }
1812
- function vt(e, t) {
1813
- o.value && !F.innerLoading.value && (se(-1, !0), W(() => {
1814
- o.value && !F.innerLoading.value && (e > t ? se() : _t(!0));
1815
- }));
1816
- }
1817
- function bt() {
1818
- s.value || T.value?.updatePosition();
1819
- }
1820
- function $(e) {
1821
- e !== void 0 && z(e), r("popupShow", e), F.hasPopupOpen = !0, F.onControlFocusin(e);
1822
- }
1823
- function xt(e) {
1824
- e !== void 0 && z(e), r("popupHide", e), F.hasPopupOpen = !1, F.onControlFocusout(e);
1825
- }
1826
- function St() {
1827
- h = !a.platform.is.mobile && t.behavior !== "dialog" ? !1 : t.behavior !== "menu" && (!t.useInput || n["no-option"] !== void 0 || t.onFilter !== void 0 || !B.value), y = a.platform.is.ios && h && t.useInput ? "fade" : t.transitionShow;
1828
- }
1829
- return Oe(St), ke(bt), St(), De(() => {
1830
- f !== null && clearTimeout(f), p !== null && clearTimeout(p);
1831
- }), Object.assign(i, {
1832
- showPopup: ht,
1833
- hidePopup: gt,
1834
- removeAtIndex: Fe,
1835
- add: Re,
1836
- toggleOption: Y,
1837
- getOptionIndex: () => c.value,
1838
- setOptionIndex: ze,
1839
- moveOptionSelection: Be,
1840
- filter: Z,
1841
- updateMenuPosition: bt,
1842
- updateInputValue: X,
1843
- isOptionSelected: He,
1844
- getEmittingOptionValue: Pe,
1845
- isOptionDisabled: (...e) => je.value(...e) === !0,
1846
- getOptionValue: (...e) => G.value(...e),
1847
- getOptionLabel: (...e) => K.value(...e)
1848
- }), Object.assign(F, {
1849
- innerValue: I,
1850
- fieldClass: H(() => `q-select q-field--auto-height q-select--with${t.useInput ? "" : "out"}-input q-select--with${t.useChips ? "" : "out"}-chips q-select--${t.multiple ? "multiple" : "single"}`),
1851
- inputRef: C,
1852
- targetRef: w,
1853
- hasValue: L,
1854
- showPopup: ht,
1855
- floatingLabel: H(() => !t.hideSelected && L.value || typeof l.value == "number" || l.value.length !== 0 || me(t.displayValue)),
1856
- getControlChild: () => {
1857
- if (F.editable.value && (s.value || !B.value || n["no-option"] !== void 0)) return h ? ut() : at();
1858
- F.hasPopupOpen &&= !1;
1859
- },
1860
- controlEvents: {
1861
- onFocusin(e) {
1862
- F.onControlFocusin(e);
1863
- },
1864
- onFocusout(e) {
1865
- F.onControlFocusout(e, () => {
1866
- Q(), mt();
1867
- });
1868
- },
1869
- onClick(e) {
1870
- if (de(e), !h && o.value) {
1871
- mt(), w.value?.focus();
1872
- return;
1873
- }
1874
- ht(e);
1875
- }
1876
- },
1877
- getControl: (e) => {
1878
- let n = et(), r = e === !0 || !s.value || !h;
1879
- if (t.useInput) n.push(nt(e, r));
1880
- else if (F.editable.value) {
1881
- let i = r ? be.value : void 0;
1882
- n.push(U("input", {
1883
- ref: r ? w : void 0,
1884
- key: "d_t",
1885
- class: "q-select__focus-target",
1886
- id: r ? F.targetUid.value : void 0,
1887
- value: ge.value,
1888
- readonly: !0,
1889
- "data-autofocus": e === !0 || t.autofocus || void 0,
1890
- ...i,
1891
- onKeydown: Xe,
1892
- onKeyup: We,
1893
- onKeypress: Ye
1894
- })), r && typeof t.autocomplete == "string" && t.autocomplete.length !== 0 && n.push(U("input", {
1895
- class: "q-select__autocomplete-input",
1896
- autocomplete: t.autocomplete,
1897
- tabindex: -1,
1898
- onKeyup: Je
1899
- }));
1900
- }
1901
- if (D.value !== void 0 && !t.disable && Me.value.length !== 0) {
1902
- let e = Me.value.map((e) => U("option", {
1903
- value: e,
1904
- selected: !0
1905
- }));
1906
- n.push(U("select", {
1907
- class: "hidden",
1908
- name: D.value,
1909
- multiple: t.multiple
1910
- }, e));
1911
- }
1912
- return U("div", {
1913
- class: "q-field__native row items-center",
1914
- ...t.useInput || !r ? void 0 : F.splitAttrs.attributes.value,
1915
- ...F.splitAttrs.listeners.value
1916
- }, n);
1917
- },
1918
- getInnerAppend: () => !t.loading && !d.value && !t.hideDropdownIcon ? [U(ae, {
1919
- class: "q-select__dropdown-icon" + (o.value ? " rotate-180" : ""),
1920
- name: V.value
1921
- })] : null
1922
- }), ne(F);
1923
- }
1924
- }), "dense", !0);
1925
- //#endregion
1926
4
  //#region lib/main.js
1927
- function Lt(e) {
1928
- for (let t in B) e.component(t, B[t]);
5
+ function i(e) {
6
+ for (let n in t) e.component(n, t[n]);
1929
7
  }
1930
- var Rt = { install: Lt };
8
+ var a = { install: i };
1931
9
  //#endregion
1932
- export { F as VnInput, Rt as default, V as setDefault, Ce as useRequired, Se as useValidator };
10
+ export { e as VnInput, a as default, r as useRequired, n as useValidator };