@validol4ik/uikit 0.3.42 → 0.4.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.
@@ -0,0 +1,2531 @@
1
+ import { ref as I, computed as r, h as c, getCurrentInstance as ae, toRaw as Te, onBeforeUpdate as ol, inject as Ol, watch as J, onMounted as nl, onBeforeUnmount as Be, nextTick as ve, onDeactivated as ul, onActivated as il, Transition as Ct, onBeforeMount as Ml, onUpdated as Ll, defineComponent as $l, openBlock as ue, createElementBlock as fe, normalizeClass as Ge, toDisplayString as De, createCommentVNode as Oe, createVNode as je, unref as Hl, withCtx as ge, mergeProps as Pl, createBlock as $t, createElementVNode as mt, createTextVNode as gt, Fragment as et, withModifiers as Dl } from "vue";
2
+ import { u as al, s as oe, a as rl, h as be, b as sl, c as ye, Q as _e, d as jl, i as cl, e as Kl, f as Nl, p as he, g as Ql, j as Ul, R as Wl, k as Xl, l as qe, m as Yl, n as Zl, o as Jl, q as Me, r as Gl, S as eo, _ as to } from "./index-Ddt1_zHz.js";
3
+ import { u as at, a as rt, b as lo, c as dl, r as oo, g as no, d as uo, h as io, e as ao, f as ro, i as so, j as co, k as fo, l as Ht, m as vo, n as mo, o as go, p as ho, Q as po } from "./QMenu-DinYr5s_.js";
4
+ import { b as bo, c as xe, r as Pt, a as yo } from "./focusout-DjvPXP_b.js";
5
+ function So(e, l) {
6
+ const t = I(null), n = r(() => e.disable === !0 ? null : c("span", {
7
+ ref: t,
8
+ class: "no-outline",
9
+ tabindex: -1
10
+ }));
11
+ function d(u) {
12
+ const a = l.value;
13
+ u !== void 0 && u.type.indexOf("key") === 0 ? a !== null && document.activeElement !== a && a.contains(document.activeElement) === !0 && a.focus() : t.value !== null && (u === void 0 || a !== null && a.contains(u.target) === !0) && t.value.focus();
14
+ }
15
+ return {
16
+ refocusTargetEl: n,
17
+ refocusTarget: d
18
+ };
19
+ }
20
+ const fl = {
21
+ name: String
22
+ };
23
+ function wo(e = {}) {
24
+ return (l, t, n) => {
25
+ l[t](
26
+ c("input", {
27
+ class: "hidden" + (n || ""),
28
+ ...e.value
29
+ })
30
+ );
31
+ };
32
+ }
33
+ function Co(e) {
34
+ return r(() => e.name || e.for);
35
+ }
36
+ const ko = {
37
+ xs: 30,
38
+ sm: 35,
39
+ md: 40,
40
+ lg: 50,
41
+ xl: 60
42
+ }, qo = {
43
+ ...rt,
44
+ ...sl,
45
+ ...fl,
46
+ modelValue: {
47
+ required: !0,
48
+ default: null
49
+ },
50
+ val: {},
51
+ trueValue: { default: !0 },
52
+ falseValue: { default: !1 },
53
+ indeterminateValue: { default: null },
54
+ checkedIcon: String,
55
+ uncheckedIcon: String,
56
+ indeterminateIcon: String,
57
+ toggleOrder: {
58
+ type: String,
59
+ validator: (e) => e === "tf" || e === "ft"
60
+ },
61
+ toggleIndeterminate: Boolean,
62
+ label: String,
63
+ leftLabel: Boolean,
64
+ color: String,
65
+ keepColor: Boolean,
66
+ dense: Boolean,
67
+ disable: Boolean,
68
+ tabindex: [String, Number]
69
+ }, Vo = ["update:modelValue"];
70
+ function xo(e, l) {
71
+ const { props: t, slots: n, emit: d, proxy: u } = ae(), { $q: a } = u, p = at(t, a), b = I(null), { refocusTargetEl: x, refocusTarget: f } = So(t, b), C = al(t, ko), k = r(
72
+ () => t.val !== void 0 && Array.isArray(t.modelValue)
73
+ ), s = r(() => {
74
+ const V = Te(t.val);
75
+ return k.value === !0 ? t.modelValue.findIndex((W) => Te(W) === V) : -1;
76
+ }), y = r(() => k.value === !0 ? s.value !== -1 : Te(t.modelValue) === Te(t.trueValue)), q = r(() => k.value === !0 ? s.value === -1 : Te(t.modelValue) === Te(t.falseValue)), S = r(
77
+ () => y.value === !1 && q.value === !1
78
+ ), $ = r(() => t.disable === !0 ? -1 : t.tabindex || 0), K = r(
79
+ () => `q-${e} cursor-pointer no-outline row inline no-wrap items-center` + (t.disable === !0 ? " disabled" : "") + (p.value === !0 ? ` q-${e}--dark` : "") + (t.dense === !0 ? ` q-${e}--dense` : "") + (t.leftLabel === !0 ? " reverse" : "")
80
+ ), _ = r(() => {
81
+ const V = y.value === !0 ? "truthy" : q.value === !0 ? "falsy" : "indet", W = t.color !== void 0 && (t.keepColor === !0 || q.value !== !0) ? ` text-${t.color}` : "";
82
+ return `q-${e}__inner relative-position non-selectable q-${e}__inner--${V}${W}`;
83
+ }), T = r(() => {
84
+ const V = { type: "checkbox" };
85
+ return t.name !== void 0 && Object.assign(V, {
86
+ // see https://vuejs.org/guide/extras/render-function.html#creating-vnodes (.prop)
87
+ ".checked": y.value,
88
+ "^checked": y.value === !0 ? "checked" : void 0,
89
+ name: t.name,
90
+ value: k.value === !0 ? t.val : t.trueValue
91
+ }), V;
92
+ }), Y = wo(T), B = r(() => {
93
+ const V = {
94
+ tabindex: $.value,
95
+ role: "checkbox",
96
+ "aria-label": t.label,
97
+ "aria-checked": S.value === !0 ? "mixed" : y.value === !0 ? "true" : "false"
98
+ };
99
+ return t.disable === !0 && (V["aria-disabled"] = "true"), V;
100
+ });
101
+ function L(V) {
102
+ V !== void 0 && (oe(V), f(V)), t.disable !== !0 && d("update:modelValue", H(), V);
103
+ }
104
+ function H() {
105
+ if (k.value === !0) {
106
+ if (y.value === !0) {
107
+ const V = t.modelValue.slice();
108
+ return V.splice(s.value, 1), V;
109
+ }
110
+ return t.modelValue.concat([t.val]);
111
+ }
112
+ if (y.value === !0) {
113
+ if (t.toggleOrder !== "ft" || t.toggleIndeterminate === !1)
114
+ return t.falseValue;
115
+ } else if (q.value === !0) {
116
+ if (t.toggleOrder === "ft" || t.toggleIndeterminate === !1)
117
+ return t.trueValue;
118
+ } else
119
+ return t.toggleOrder !== "ft" ? t.trueValue : t.falseValue;
120
+ return t.indeterminateValue;
121
+ }
122
+ function te(V) {
123
+ (V.keyCode === 13 || V.keyCode === 32) && oe(V);
124
+ }
125
+ function U(V) {
126
+ (V.keyCode === 13 || V.keyCode === 32) && L(V);
127
+ }
128
+ const le = l(y, S);
129
+ return Object.assign(u, { toggle: L }), () => {
130
+ const V = le();
131
+ t.disable !== !0 && Y(
132
+ V,
133
+ "unshift",
134
+ ` q-${e}__native absolute q-ma-none q-pa-none`
135
+ );
136
+ const W = [
137
+ c("div", {
138
+ class: _.value,
139
+ style: C.value,
140
+ "aria-hidden": "true"
141
+ }, V)
142
+ ];
143
+ x.value !== null && W.push(x.value);
144
+ const ne = t.label !== void 0 ? rl(n.default, [t.label]) : be(n.default);
145
+ return ne !== void 0 && W.push(
146
+ c("div", {
147
+ class: `q-${e}__label q-anchor--skip`
148
+ }, ne)
149
+ ), c("div", {
150
+ ref: b,
151
+ class: K.value,
152
+ ...B.value,
153
+ onClick: L,
154
+ onKeydown: te,
155
+ onKeyup: U
156
+ }, W);
157
+ };
158
+ }
159
+ const _o = () => c("div", {
160
+ key: "svg",
161
+ class: "q-checkbox__bg absolute"
162
+ }, [
163
+ c("svg", {
164
+ class: "q-checkbox__svg fit absolute-full",
165
+ viewBox: "0 0 24 24"
166
+ }, [
167
+ c("path", {
168
+ class: "q-checkbox__truthy",
169
+ fill: "none",
170
+ d: "M1.73,12.91 8.1,19.28 22.79,4.59"
171
+ }),
172
+ c("path", {
173
+ class: "q-checkbox__indet",
174
+ d: "M4,14H20V10H4"
175
+ })
176
+ ])
177
+ ]), Bo = ye({
178
+ name: "QCheckbox",
179
+ props: qo,
180
+ emits: Vo,
181
+ setup(e) {
182
+ const l = _o();
183
+ function t(n, d) {
184
+ const u = r(
185
+ () => (n.value === !0 ? e.checkedIcon : d.value === !0 ? e.indeterminateIcon : e.uncheckedIcon) || null
186
+ );
187
+ return () => u.value !== null ? [
188
+ c("div", {
189
+ key: "icon",
190
+ class: "q-checkbox__icon-container absolute-full flex flex-center no-wrap"
191
+ }, [
192
+ c(_e, {
193
+ class: "q-checkbox__icon",
194
+ name: u.value
195
+ })
196
+ ])
197
+ ] : [l];
198
+ }
199
+ return xo("checkbox", t);
200
+ }
201
+ }), ut = ye({
202
+ name: "QItemSection",
203
+ props: {
204
+ avatar: Boolean,
205
+ thumbnail: Boolean,
206
+ side: Boolean,
207
+ top: Boolean,
208
+ noWrap: Boolean
209
+ },
210
+ setup(e, { slots: l }) {
211
+ const t = r(
212
+ () => `q-item__section column q-item__section--${e.avatar === !0 || e.side === !0 || e.thumbnail === !0 ? "side" : "main"}` + (e.top === !0 ? " q-item__section--top justify-start" : " justify-center") + (e.avatar === !0 ? " q-item__section--avatar" : "") + (e.thumbnail === !0 ? " q-item__section--thumbnail" : "") + (e.noWrap === !0 ? " q-item__section--nowrap" : "")
213
+ );
214
+ return () => c("div", { class: t.value }, be(l.default));
215
+ }
216
+ }), vl = ye({
217
+ name: "QItemLabel",
218
+ props: {
219
+ overline: Boolean,
220
+ caption: Boolean,
221
+ header: Boolean,
222
+ lines: [Number, String]
223
+ },
224
+ setup(e, { slots: l }) {
225
+ const t = r(() => parseInt(e.lines, 10)), n = r(
226
+ () => "q-item__label" + (e.overline === !0 ? " q-item__label--overline text-overline" : "") + (e.caption === !0 ? " q-item__label--caption text-caption" : "") + (e.header === !0 ? " q-item__label--header" : "") + (t.value === 1 ? " ellipsis" : "")
227
+ ), d = r(() => e.lines !== void 0 && t.value > 1 ? {
228
+ overflow: "hidden",
229
+ display: "-webkit-box",
230
+ "-webkit-box-orient": "vertical",
231
+ "-webkit-line-clamp": t.value
232
+ } : null);
233
+ return () => c("div", {
234
+ style: d.value,
235
+ class: n.value
236
+ }, be(l.default));
237
+ }
238
+ }), ml = ye({
239
+ name: "QItem",
240
+ props: {
241
+ ...rt,
242
+ ...Nl,
243
+ tag: {
244
+ type: String,
245
+ default: "div"
246
+ },
247
+ active: {
248
+ type: Boolean,
249
+ default: null
250
+ },
251
+ clickable: Boolean,
252
+ dense: Boolean,
253
+ insetLevel: Number,
254
+ tabindex: [String, Number],
255
+ focused: Boolean,
256
+ manualFocus: Boolean
257
+ },
258
+ emits: ["click", "keyup"],
259
+ setup(e, { slots: l, emit: t }) {
260
+ const { proxy: { $q: n } } = ae(), d = at(e, n), { hasLink: u, linkAttrs: a, linkClass: p, linkTag: b, navigateOnClick: x } = jl(), f = I(null), C = I(null), k = r(
261
+ () => e.clickable === !0 || u.value === !0 || e.tag === "label"
262
+ ), s = r(
263
+ () => e.disable !== !0 && k.value === !0
264
+ ), y = r(
265
+ () => "q-item q-item-type row no-wrap" + (e.dense === !0 ? " q-item--dense" : "") + (d.value === !0 ? " q-item--dark" : "") + (u.value === !0 && e.active === null ? p.value : e.active === !0 ? ` q-item--active${e.activeClass !== void 0 ? ` ${e.activeClass}` : ""}` : "") + (e.disable === !0 ? " disabled" : "") + (s.value === !0 ? " q-item--clickable q-link cursor-pointer " + (e.manualFocus === !0 ? "q-manual-focusable" : "q-focusable q-hoverable") + (e.focused === !0 ? " q-manual-focusable--focused" : "") : "")
266
+ ), q = r(() => e.insetLevel === void 0 ? null : {
267
+ ["padding" + (n.lang.rtl === !0 ? "Right" : "Left")]: 16 + e.insetLevel * 56 + "px"
268
+ });
269
+ function S(_) {
270
+ s.value === !0 && (C.value !== null && (_.qKeyEvent !== !0 && document.activeElement === f.value ? C.value.focus() : document.activeElement === C.value && f.value.focus()), x(_));
271
+ }
272
+ function $(_) {
273
+ if (s.value === !0 && cl(_, [13, 32]) === !0) {
274
+ oe(_), _.qKeyEvent = !0;
275
+ const T = new MouseEvent("click", _);
276
+ T.qKeyEvent = !0, f.value.dispatchEvent(T);
277
+ }
278
+ t("keyup", _);
279
+ }
280
+ function K() {
281
+ const _ = Kl(l.default, []);
282
+ return s.value === !0 && _.unshift(
283
+ c("div", { class: "q-focus-helper", tabindex: -1, ref: C })
284
+ ), _;
285
+ }
286
+ return () => {
287
+ const _ = {
288
+ ref: f,
289
+ class: y.value,
290
+ style: q.value,
291
+ role: "listitem",
292
+ onClick: S,
293
+ onKeyup: $
294
+ };
295
+ return s.value === !0 ? (_.tabindex = e.tabindex || "0", Object.assign(_, a.value)) : k.value === !0 && (_["aria-disabled"] = "true"), c(
296
+ b.value,
297
+ _,
298
+ K()
299
+ );
300
+ };
301
+ }
302
+ }), Dt = (e) => e ? !0 : "Обовʼязкове поле", jt = /^on[A-Z]/;
303
+ function Ao() {
304
+ const { attrs: e, vnode: l } = ae(), t = {
305
+ listeners: I({}),
306
+ attributes: I({})
307
+ };
308
+ function n() {
309
+ const d = {}, u = {};
310
+ for (const a in e)
311
+ a !== "class" && a !== "style" && jt.test(a) === !1 && (d[a] = e[a]);
312
+ for (const a in l.props)
313
+ jt.test(a) === !0 && (u[a] = l.props[a]);
314
+ t.attributes.value = d, t.listeners.value = u;
315
+ }
316
+ return ol(n), n(), t;
317
+ }
318
+ const Eo = "_q_fo_";
319
+ function Ro({ validate: e, resetValidation: l, requiresQForm: t }) {
320
+ const n = Ol(Eo, !1);
321
+ if (n !== !1) {
322
+ const { props: d, proxy: u } = ae();
323
+ Object.assign(u, { validate: e, resetValidation: l }), J(() => d.disable, (a) => {
324
+ a === !0 ? (typeof l == "function" && l(), n.unbindComponent(u)) : n.bindComponent(u);
325
+ }), nl(() => {
326
+ d.disable !== !0 && n.bindComponent(u);
327
+ }), Be(() => {
328
+ d.disable !== !0 && n.unbindComponent(u);
329
+ });
330
+ } else t === !0 && console.error("Parent QForm not found on useFormChild()!");
331
+ }
332
+ const Kt = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/, Nt = /^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/, Qt = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, tt = /^rgb\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5])\)$/, lt = /^rgba\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/, ht = {
333
+ date: (e) => /^-?[\d]+\/[0-1]\d\/[0-3]\d$/.test(e),
334
+ time: (e) => /^([0-1]?\d|2[0-3]):[0-5]\d$/.test(e),
335
+ fulltime: (e) => /^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(e),
336
+ timeOrFulltime: (e) => /^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/.test(e),
337
+ // -- RFC 5322 --
338
+ // -- Added in v2.6.6 --
339
+ // This is a basic helper validation.
340
+ // For something more complex (like RFC 822) you should write and use your own rule.
341
+ // We won't be accepting PRs to enhance the one below because of the reason above.
342
+ // eslint-disable-next-line
343
+ email: (e) => /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),
344
+ hexColor: (e) => Kt.test(e),
345
+ hexaColor: (e) => Nt.test(e),
346
+ hexOrHexaColor: (e) => Qt.test(e),
347
+ rgbColor: (e) => tt.test(e),
348
+ rgbaColor: (e) => lt.test(e),
349
+ rgbOrRgbaColor: (e) => tt.test(e) || lt.test(e),
350
+ hexOrRgbColor: (e) => Kt.test(e) || tt.test(e),
351
+ hexaOrRgbaColor: (e) => Nt.test(e) || lt.test(e),
352
+ anyColor: (e) => Qt.test(e) || tt.test(e) || lt.test(e)
353
+ };
354
+ function gl(e, l = 250, t) {
355
+ let n = null;
356
+ function d() {
357
+ const u = arguments, a = () => {
358
+ n = null, t !== !0 && e.apply(this, u);
359
+ };
360
+ n !== null ? clearTimeout(n) : t === !0 && e.apply(this, u), n = setTimeout(a, l);
361
+ }
362
+ return d.cancel = () => {
363
+ n !== null && clearTimeout(n);
364
+ }, d;
365
+ }
366
+ const zo = [!0, !1, "ondemand"], Fo = {
367
+ modelValue: {},
368
+ error: {
369
+ type: Boolean,
370
+ default: null
371
+ },
372
+ errorMessage: String,
373
+ noErrorIcon: Boolean,
374
+ rules: Array,
375
+ reactiveRules: Boolean,
376
+ lazyRules: {
377
+ type: [Boolean, String],
378
+ default: !1,
379
+ // statement unneeded but avoids future vue implementation changes
380
+ validator: (e) => zo.includes(e)
381
+ }
382
+ };
383
+ function Io(e, l) {
384
+ const { props: t, proxy: n } = ae(), d = I(!1), u = I(null), a = I(!1);
385
+ Ro({ validate: q, resetValidation: y });
386
+ let p = 0, b;
387
+ const x = r(
388
+ () => t.rules !== void 0 && t.rules !== null && t.rules.length !== 0
389
+ ), f = r(() => t.disable !== !0 && x.value === !0 && l.value === !1), C = r(
390
+ () => t.error === !0 || d.value === !0
391
+ ), k = r(() => typeof t.errorMessage == "string" && t.errorMessage.length !== 0 ? t.errorMessage : u.value);
392
+ J(() => t.modelValue, () => {
393
+ a.value = !0, f.value === !0 && t.lazyRules === !1 && S();
394
+ });
395
+ function s() {
396
+ t.lazyRules !== "ondemand" && f.value === !0 && a.value === !0 && S();
397
+ }
398
+ J(() => t.reactiveRules, ($) => {
399
+ $ === !0 ? b === void 0 && (b = J(() => t.rules, s, { immediate: !0, deep: !0 })) : b !== void 0 && (b(), b = void 0);
400
+ }, { immediate: !0 }), J(() => t.lazyRules, s), J(e, ($) => {
401
+ $ === !0 ? a.value = !0 : f.value === !0 && t.lazyRules !== "ondemand" && S();
402
+ });
403
+ function y() {
404
+ p++, l.value = !1, a.value = !1, d.value = !1, u.value = null, S.cancel();
405
+ }
406
+ function q($ = t.modelValue) {
407
+ if (t.disable === !0 || x.value === !1)
408
+ return !0;
409
+ const K = ++p, _ = l.value !== !0 ? () => {
410
+ a.value = !0;
411
+ } : () => {
412
+ }, T = (B, L) => {
413
+ B === !0 && _(), d.value = B, u.value = L || null, l.value = !1;
414
+ }, Y = [];
415
+ for (let B = 0; B < t.rules.length; B++) {
416
+ const L = t.rules[B];
417
+ let H;
418
+ if (typeof L == "function" ? H = L($, ht) : typeof L == "string" && ht[L] !== void 0 && (H = ht[L]($)), H === !1 || typeof H == "string")
419
+ return T(!0, H), !1;
420
+ H !== !0 && H !== void 0 && Y.push(H);
421
+ }
422
+ return Y.length === 0 ? (T(!1), !0) : (l.value = !0, Promise.all(Y).then(
423
+ (B) => {
424
+ if (B === void 0 || Array.isArray(B) === !1 || B.length === 0)
425
+ return K === p && T(!1), !0;
426
+ const L = B.find((H) => H === !1 || typeof H == "string");
427
+ return K === p && T(L !== void 0, L), L === void 0;
428
+ },
429
+ (B) => (K === p && (console.error(B), T(!0)), !1)
430
+ ));
431
+ }
432
+ const S = gl(q, 0);
433
+ return Be(() => {
434
+ b !== void 0 && b(), S.cancel();
435
+ }), Object.assign(n, { resetValidation: y, validate: q }), bo(n, "hasError", () => C.value), {
436
+ isDirtyModel: a,
437
+ hasRules: x,
438
+ hasError: C,
439
+ errorMessage: k,
440
+ validate: q,
441
+ resetValidation: y
442
+ };
443
+ }
444
+ function kt(e) {
445
+ return e != null && ("" + e).length !== 0;
446
+ }
447
+ const To = {
448
+ ...rt,
449
+ ...Fo,
450
+ label: String,
451
+ stackLabel: Boolean,
452
+ hint: String,
453
+ hideHint: Boolean,
454
+ prefix: String,
455
+ suffix: String,
456
+ labelColor: String,
457
+ color: String,
458
+ bgColor: String,
459
+ filled: Boolean,
460
+ outlined: Boolean,
461
+ borderless: Boolean,
462
+ standout: [Boolean, String],
463
+ square: Boolean,
464
+ loading: Boolean,
465
+ labelSlot: Boolean,
466
+ bottomSlots: Boolean,
467
+ hideBottomSpace: Boolean,
468
+ rounded: Boolean,
469
+ dense: Boolean,
470
+ itemAligned: Boolean,
471
+ counter: Boolean,
472
+ clearable: Boolean,
473
+ clearIcon: String,
474
+ disable: Boolean,
475
+ readonly: Boolean,
476
+ autofocus: Boolean,
477
+ for: String
478
+ }, qt = {
479
+ ...To,
480
+ maxlength: [Number, String]
481
+ }, hl = ["update:modelValue", "clear", "focus", "blur"];
482
+ function pl({ requiredForAttr: e = !0, tagProp: l, changeEvent: t = !1 } = {}) {
483
+ const { props: n, proxy: d } = ae(), u = at(n, d.$q), a = lo({
484
+ required: e,
485
+ getValue: () => n.for
486
+ });
487
+ return {
488
+ requiredForAttr: e,
489
+ changeEvent: t,
490
+ tag: l === !0 ? r(() => n.tag) : { value: "label" },
491
+ isDark: u,
492
+ editable: r(
493
+ () => n.disable !== !0 && n.readonly !== !0
494
+ ),
495
+ innerLoading: I(!1),
496
+ focused: I(!1),
497
+ hasPopupOpen: !1,
498
+ splitAttrs: Ao(),
499
+ targetUid: a,
500
+ rootRef: I(null),
501
+ targetRef: I(null),
502
+ controlRef: I(null)
503
+ /**
504
+ * user supplied additionals:
505
+
506
+ * innerValue - computed
507
+ * floatingLabel - computed
508
+ * inputRef - computed
509
+
510
+ * fieldClass - computed
511
+ * hasShadow - computed
512
+
513
+ * controlEvents - Object with fn(e)
514
+
515
+ * getControl - fn
516
+ * getInnerAppend - fn
517
+ * getControlChild - fn
518
+ * getShadowControl - fn
519
+ * showPopup - fn
520
+ */
521
+ };
522
+ }
523
+ function bl(e) {
524
+ const { props: l, emit: t, slots: n, attrs: d, proxy: u } = ae(), { $q: a } = u;
525
+ let p = null;
526
+ e.hasValue === void 0 && (e.hasValue = r(() => kt(l.modelValue))), e.emitValue === void 0 && (e.emitValue = (h) => {
527
+ t("update:modelValue", h);
528
+ }), e.controlEvents === void 0 && (e.controlEvents = {
529
+ onFocusin: te,
530
+ onFocusout: U
531
+ }), Object.assign(e, {
532
+ clearValue: le,
533
+ onControlFocusin: te,
534
+ onControlFocusout: U,
535
+ focus: L
536
+ }), e.computedCounter === void 0 && (e.computedCounter = r(() => {
537
+ if (l.counter !== !1) {
538
+ const h = typeof l.modelValue == "string" || typeof l.modelValue == "number" ? ("" + l.modelValue).length : Array.isArray(l.modelValue) === !0 ? l.modelValue.length : 0, E = l.maxlength !== void 0 ? l.maxlength : l.maxValues;
539
+ return h + (E !== void 0 ? " / " + E : "");
540
+ }
541
+ }));
542
+ const {
543
+ isDirtyModel: b,
544
+ hasRules: x,
545
+ hasError: f,
546
+ errorMessage: C,
547
+ resetValidation: k
548
+ } = Io(e.focused, e.innerLoading), s = e.floatingLabel !== void 0 ? r(() => l.stackLabel === !0 || e.focused.value === !0 || e.floatingLabel.value === !0) : r(() => l.stackLabel === !0 || e.focused.value === !0 || e.hasValue.value === !0), y = r(
549
+ () => l.bottomSlots === !0 || l.hint !== void 0 || x.value === !0 || l.counter === !0 || l.error !== null
550
+ ), q = r(() => l.filled === !0 ? "filled" : l.outlined === !0 ? "outlined" : l.borderless === !0 ? "borderless" : l.standout ? "standout" : "standard"), S = r(
551
+ () => `q-field row no-wrap items-start q-field--${q.value}` + (e.fieldClass !== void 0 ? ` ${e.fieldClass.value}` : "") + (l.rounded === !0 ? " q-field--rounded" : "") + (l.square === !0 ? " q-field--square" : "") + (s.value === !0 ? " q-field--float" : "") + (K.value === !0 ? " q-field--labeled" : "") + (l.dense === !0 ? " q-field--dense" : "") + (l.itemAligned === !0 ? " q-field--item-aligned q-item-type" : "") + (e.isDark.value === !0 ? " q-field--dark" : "") + (e.getControl === void 0 ? " q-field--auto-height" : "") + (e.focused.value === !0 ? " q-field--focused" : "") + (f.value === !0 ? " q-field--error" : "") + (f.value === !0 || e.focused.value === !0 ? " q-field--highlighted" : "") + (l.hideBottomSpace !== !0 && y.value === !0 ? " q-field--with-bottom" : "") + (l.disable === !0 ? " q-field--disabled" : l.readonly === !0 ? " q-field--readonly" : "")
552
+ ), $ = r(
553
+ () => "q-field__control relative-position row no-wrap" + (l.bgColor !== void 0 ? ` bg-${l.bgColor}` : "") + (f.value === !0 ? " text-negative" : typeof l.standout == "string" && l.standout.length !== 0 && e.focused.value === !0 ? ` ${l.standout}` : l.color !== void 0 ? ` text-${l.color}` : "")
554
+ ), K = r(
555
+ () => l.labelSlot === !0 || l.label !== void 0
556
+ ), _ = r(
557
+ () => "q-field__label no-pointer-events absolute ellipsis" + (l.labelColor !== void 0 && f.value !== !0 ? ` text-${l.labelColor}` : "")
558
+ ), T = r(() => ({
559
+ id: e.targetUid.value,
560
+ editable: e.editable.value,
561
+ focused: e.focused.value,
562
+ floatingLabel: s.value,
563
+ modelValue: l.modelValue,
564
+ emitValue: e.emitValue
565
+ })), Y = r(() => {
566
+ const h = {};
567
+ return e.targetUid.value && (h.for = e.targetUid.value), l.disable === !0 && (h["aria-disabled"] = "true"), h;
568
+ });
569
+ function B() {
570
+ const h = document.activeElement;
571
+ let E = e.targetRef !== void 0 && e.targetRef.value;
572
+ E && (h === null || h.id !== e.targetUid.value) && (E.hasAttribute("tabindex") === !0 || (E = E.querySelector("[tabindex]")), E && E !== h && E.focus({ preventScroll: !0 }));
573
+ }
574
+ function L() {
575
+ dl(B);
576
+ }
577
+ function H() {
578
+ oo(B);
579
+ const h = document.activeElement;
580
+ h !== null && e.rootRef.value.contains(h) && h.blur();
581
+ }
582
+ function te(h) {
583
+ p !== null && (clearTimeout(p), p = null), e.editable.value === !0 && e.focused.value === !1 && (e.focused.value = !0, t("focus", h));
584
+ }
585
+ function U(h, E) {
586
+ p !== null && clearTimeout(p), p = setTimeout(() => {
587
+ p = null, !(document.hasFocus() === !0 && (e.hasPopupOpen === !0 || e.controlRef === void 0 || e.controlRef.value === null || e.controlRef.value.contains(document.activeElement) !== !1)) && (e.focused.value === !0 && (e.focused.value = !1, t("blur", h)), E !== void 0 && E());
588
+ });
589
+ }
590
+ function le(h) {
591
+ oe(h), a.platform.is.mobile !== !0 ? (e.targetRef !== void 0 && e.targetRef.value || e.rootRef.value).focus() : e.rootRef.value.contains(document.activeElement) === !0 && document.activeElement.blur(), l.type === "file" && (e.inputRef.value.value = null), t("update:modelValue", null), e.changeEvent === !0 && t("change", null), t("clear", l.modelValue), ve(() => {
592
+ const E = b.value;
593
+ k(), b.value = E;
594
+ });
595
+ }
596
+ function V(h) {
597
+ [13, 32].includes(h.keyCode) && le(h);
598
+ }
599
+ function W() {
600
+ const h = [];
601
+ return n.prepend !== void 0 && h.push(
602
+ c("div", {
603
+ class: "q-field__prepend q-field__marginal row no-wrap items-center",
604
+ key: "prepend",
605
+ onClick: he
606
+ }, n.prepend())
607
+ ), h.push(
608
+ c("div", {
609
+ class: "q-field__control-container col relative-position row no-wrap q-anchor--skip"
610
+ }, ne())
611
+ ), f.value === !0 && l.noErrorIcon === !1 && h.push(
612
+ Q("error", [
613
+ c(_e, { name: a.iconSet.field.error, color: "negative" })
614
+ ])
615
+ ), l.loading === !0 || e.innerLoading.value === !0 ? h.push(
616
+ Q(
617
+ "inner-loading-append",
618
+ n.loading !== void 0 ? n.loading() : [c(Ql, { color: l.color })]
619
+ )
620
+ ) : l.clearable === !0 && e.hasValue.value === !0 && e.editable.value === !0 && h.push(
621
+ Q("inner-clearable-append", [
622
+ c(_e, {
623
+ class: "q-field__focusable-action",
624
+ name: l.clearIcon || a.iconSet.field.clear,
625
+ tabindex: 0,
626
+ role: "button",
627
+ "aria-hidden": "false",
628
+ "aria-label": a.lang.label.clear,
629
+ onKeyup: V,
630
+ onClick: le
631
+ })
632
+ ])
633
+ ), n.append !== void 0 && h.push(
634
+ c("div", {
635
+ class: "q-field__append q-field__marginal row no-wrap items-center",
636
+ key: "append",
637
+ onClick: he
638
+ }, n.append())
639
+ ), e.getInnerAppend !== void 0 && h.push(
640
+ Q("inner-append", e.getInnerAppend())
641
+ ), e.getControlChild !== void 0 && h.push(
642
+ e.getControlChild()
643
+ ), h;
644
+ }
645
+ function ne() {
646
+ const h = [];
647
+ return l.prefix !== void 0 && l.prefix !== null && h.push(
648
+ c("div", {
649
+ class: "q-field__prefix no-pointer-events row items-center"
650
+ }, l.prefix)
651
+ ), e.getShadowControl !== void 0 && e.hasShadow.value === !0 && h.push(
652
+ e.getShadowControl()
653
+ ), e.getControl !== void 0 ? h.push(e.getControl()) : n.rawControl !== void 0 ? h.push(n.rawControl()) : n.control !== void 0 && h.push(
654
+ c("div", {
655
+ ref: e.targetRef,
656
+ class: "q-field__native row",
657
+ tabindex: -1,
658
+ ...e.splitAttrs.attributes.value,
659
+ "data-autofocus": l.autofocus === !0 || void 0
660
+ }, n.control(T.value))
661
+ ), K.value === !0 && h.push(
662
+ c("div", {
663
+ class: _.value
664
+ }, be(n.label, l.label))
665
+ ), l.suffix !== void 0 && l.suffix !== null && h.push(
666
+ c("div", {
667
+ class: "q-field__suffix no-pointer-events row items-center"
668
+ }, l.suffix)
669
+ ), h.concat(be(n.default));
670
+ }
671
+ function Z() {
672
+ let h, E;
673
+ f.value === !0 ? C.value !== null ? (h = [c("div", { role: "alert" }, C.value)], E = `q--slot-error-${C.value}`) : (h = be(n.error), E = "q--slot-error") : (l.hideHint !== !0 || e.focused.value === !0) && (l.hint !== void 0 ? (h = [c("div", l.hint)], E = `q--slot-hint-${l.hint}`) : (h = be(n.hint), E = "q--slot-hint"));
674
+ const se = l.counter === !0 || n.counter !== void 0;
675
+ if (l.hideBottomSpace === !0 && se === !1 && h === void 0)
676
+ return;
677
+ const i = c("div", {
678
+ key: E,
679
+ class: "q-field__messages col"
680
+ }, h);
681
+ return c("div", {
682
+ class: "q-field__bottom row items-start q-field__bottom--" + (l.hideBottomSpace !== !0 ? "animated" : "stale"),
683
+ onClick: he
684
+ }, [
685
+ l.hideBottomSpace === !0 ? i : c(Ct, { name: "q-transition--field-message" }, () => i),
686
+ se === !0 ? c("div", {
687
+ class: "q-field__counter"
688
+ }, n.counter !== void 0 ? n.counter() : e.computedCounter.value) : null
689
+ ]);
690
+ }
691
+ function Q(h, E) {
692
+ return E === null ? null : c("div", {
693
+ key: h,
694
+ class: "q-field__append q-field__marginal row no-wrap items-center q-anchor--skip"
695
+ }, E);
696
+ }
697
+ let re = !1;
698
+ return ul(() => {
699
+ re = !0;
700
+ }), il(() => {
701
+ re === !0 && l.autofocus === !0 && u.focus();
702
+ }), l.autofocus === !0 && nl(() => {
703
+ u.focus();
704
+ }), Be(() => {
705
+ p !== null && clearTimeout(p);
706
+ }), Object.assign(u, { focus: L, blur: H }), function() {
707
+ const E = e.getControl === void 0 && n.control === void 0 ? {
708
+ ...e.splitAttrs.attributes.value,
709
+ "data-autofocus": l.autofocus === !0 || void 0,
710
+ ...Y.value
711
+ } : Y.value;
712
+ return c(e.tag.value, {
713
+ ref: e.rootRef,
714
+ class: [
715
+ S.value,
716
+ d.class
717
+ ],
718
+ style: d.style,
719
+ ...E
720
+ }, [
721
+ n.before !== void 0 ? c("div", {
722
+ class: "q-field__before q-field__marginal row no-wrap items-center",
723
+ onClick: he
724
+ }, n.before()) : null,
725
+ c("div", {
726
+ class: "q-field__inner relative-position col self-stretch"
727
+ }, [
728
+ c("div", {
729
+ ref: e.controlRef,
730
+ class: $.value,
731
+ tabindex: -1,
732
+ ...e.controlEvents
733
+ }, W()),
734
+ y.value === !0 ? Z() : null
735
+ ]),
736
+ n.after !== void 0 ? c("div", {
737
+ class: "q-field__after q-field__marginal row no-wrap items-center",
738
+ onClick: he
739
+ }, n.after()) : null
740
+ ]);
741
+ };
742
+ }
743
+ const Oo = ye({
744
+ name: "QField",
745
+ inheritAttrs: !1,
746
+ props: {
747
+ ...qt,
748
+ tag: {
749
+ type: String,
750
+ default: "label"
751
+ }
752
+ },
753
+ emits: hl,
754
+ setup() {
755
+ return bl(
756
+ pl({ tagProp: !0 })
757
+ );
758
+ }
759
+ }), Mo = {
760
+ xs: 8,
761
+ sm: 10,
762
+ md: 14,
763
+ lg: 20,
764
+ xl: 24
765
+ }, Lo = ye({
766
+ name: "QChip",
767
+ props: {
768
+ ...rt,
769
+ ...sl,
770
+ dense: Boolean,
771
+ icon: String,
772
+ iconRight: String,
773
+ iconRemove: String,
774
+ iconSelected: String,
775
+ label: [String, Number],
776
+ color: String,
777
+ textColor: String,
778
+ modelValue: {
779
+ type: Boolean,
780
+ default: !0
781
+ },
782
+ selected: {
783
+ type: Boolean,
784
+ default: null
785
+ },
786
+ square: Boolean,
787
+ outline: Boolean,
788
+ clickable: Boolean,
789
+ removable: Boolean,
790
+ removeAriaLabel: String,
791
+ tabindex: [String, Number],
792
+ disable: Boolean,
793
+ ripple: {
794
+ type: [Boolean, Object],
795
+ default: !0
796
+ }
797
+ },
798
+ emits: ["update:modelValue", "update:selected", "remove", "click"],
799
+ setup(e, { slots: l, emit: t }) {
800
+ const { proxy: { $q: n } } = ae(), d = at(e, n), u = al(e, Mo), a = r(() => e.selected === !0 || e.icon !== void 0), p = r(() => e.selected === !0 ? e.iconSelected || n.iconSet.chip.selected : e.icon), b = r(() => e.iconRemove || n.iconSet.chip.remove), x = r(
801
+ () => e.disable === !1 && (e.clickable === !0 || e.selected !== null)
802
+ ), f = r(() => {
803
+ const S = e.outline === !0 && e.color || e.textColor;
804
+ return "q-chip row inline no-wrap items-center" + (e.outline === !1 && e.color !== void 0 ? ` bg-${e.color}` : "") + (S ? ` text-${S} q-chip--colored` : "") + (e.disable === !0 ? " disabled" : "") + (e.dense === !0 ? " q-chip--dense" : "") + (e.outline === !0 ? " q-chip--outline" : "") + (e.selected === !0 ? " q-chip--selected" : "") + (x.value === !0 ? " q-chip--clickable cursor-pointer non-selectable q-hoverable" : "") + (e.square === !0 ? " q-chip--square" : "") + (d.value === !0 ? " q-chip--dark q-dark" : "");
805
+ }), C = r(() => {
806
+ const S = e.disable === !0 ? { tabindex: -1, "aria-disabled": "true" } : { tabindex: e.tabindex || 0 }, $ = {
807
+ ...S,
808
+ role: "button",
809
+ "aria-hidden": "false",
810
+ "aria-label": e.removeAriaLabel || n.lang.label.remove
811
+ };
812
+ return { chip: S, remove: $ };
813
+ });
814
+ function k(S) {
815
+ S.keyCode === 13 && s(S);
816
+ }
817
+ function s(S) {
818
+ e.disable || (t("update:selected", !e.selected), t("click", S));
819
+ }
820
+ function y(S) {
821
+ (S.keyCode === void 0 || S.keyCode === 13) && (oe(S), e.disable === !1 && (t("update:modelValue", !1), t("remove")));
822
+ }
823
+ function q() {
824
+ const S = [];
825
+ x.value === !0 && S.push(
826
+ c("div", { class: "q-focus-helper" })
827
+ ), a.value === !0 && S.push(
828
+ c(_e, {
829
+ class: "q-chip__icon q-chip__icon--left",
830
+ name: p.value
831
+ })
832
+ );
833
+ const $ = e.label !== void 0 ? [c("div", { class: "ellipsis" }, [e.label])] : void 0;
834
+ return S.push(
835
+ c("div", {
836
+ class: "q-chip__content col row no-wrap items-center q-anchor--skip"
837
+ }, Xl(l.default, $))
838
+ ), e.iconRight && S.push(
839
+ c(_e, {
840
+ class: "q-chip__icon q-chip__icon--right",
841
+ name: e.iconRight
842
+ })
843
+ ), e.removable === !0 && S.push(
844
+ c(_e, {
845
+ class: "q-chip__icon q-chip__icon--remove cursor-pointer",
846
+ name: b.value,
847
+ ...C.value.remove,
848
+ onClick: y,
849
+ onKeyup: y
850
+ })
851
+ ), S;
852
+ }
853
+ return () => {
854
+ if (e.modelValue === !1) return;
855
+ const S = {
856
+ class: f.value,
857
+ style: u.value
858
+ };
859
+ return x.value === !0 && Object.assign(
860
+ S,
861
+ C.value.chip,
862
+ { onClick: s, onKeyup: k }
863
+ ), Ul(
864
+ "div",
865
+ S,
866
+ q(),
867
+ "ripple",
868
+ e.ripple !== !1 && e.disable !== !0,
869
+ () => [[Wl, e.ripple]]
870
+ );
871
+ };
872
+ }
873
+ });
874
+ function $o(e, l, t) {
875
+ function n() {
876
+ }
877
+ return Be(() => {
878
+ e.value === !0 && void 0;
879
+ }), {
880
+ removeFromHistory: n,
881
+ addToHistory() {
882
+ }
883
+ };
884
+ }
885
+ let Ke = 0, pt, bt, Qe, yt = !1, Ut, Wt, Xt, Ve = null;
886
+ function Ho(e) {
887
+ Po(e) && oe(e);
888
+ }
889
+ function Po(e) {
890
+ if (e.target === document.body || e.target.classList.contains("q-layout__backdrop"))
891
+ return !0;
892
+ const l = Yl(e), t = e.shiftKey && !e.deltaX, n = !t && Math.abs(e.deltaX) <= Math.abs(e.deltaY), d = t || n ? e.deltaY : e.deltaX;
893
+ for (let u = 0; u < l.length; u++) {
894
+ const a = l[u];
895
+ if (io(a, n))
896
+ return n ? d < 0 && a.scrollTop === 0 ? !0 : d > 0 && a.scrollTop + a.clientHeight === a.scrollHeight : d < 0 && a.scrollLeft === 0 ? !0 : d > 0 && a.scrollLeft + a.clientWidth === a.scrollWidth;
897
+ }
898
+ return !0;
899
+ }
900
+ function Yt(e) {
901
+ e.target === document && (document.scrollingElement.scrollTop = document.scrollingElement.scrollTop);
902
+ }
903
+ function ot(e) {
904
+ yt !== !0 && (yt = !0, requestAnimationFrame(() => {
905
+ yt = !1;
906
+ const { height: l } = e.target, { clientHeight: t, scrollTop: n } = document.scrollingElement;
907
+ (Qe === void 0 || l !== window.innerHeight) && (Qe = t - l, document.scrollingElement.scrollTop = n), n > Qe && (document.scrollingElement.scrollTop -= Math.ceil((n - Qe) / 8));
908
+ }));
909
+ }
910
+ function Zt(e) {
911
+ const l = document.body, t = window.visualViewport !== void 0;
912
+ if (e === "add") {
913
+ const { overflowY: n, overflowX: d } = window.getComputedStyle(l);
914
+ pt = no(window), bt = uo(window), Ut = l.style.left, Wt = l.style.top, Xt = window.location.href, l.style.left = `-${pt}px`, l.style.top = `-${bt}px`, d !== "hidden" && (d === "scroll" || l.scrollWidth > window.innerWidth) && l.classList.add("q-body--force-scrollbar-x"), n !== "hidden" && (n === "scroll" || l.scrollHeight > window.innerHeight) && l.classList.add("q-body--force-scrollbar-y"), l.classList.add("q-body--prevent-scroll"), document.qScrollPrevented = !0, xe.is.ios === !0 && (t === !0 ? (window.scrollTo(0, 0), window.visualViewport.addEventListener("resize", ot, qe.passiveCapture), window.visualViewport.addEventListener("scroll", ot, qe.passiveCapture), window.scrollTo(0, 0)) : window.addEventListener("scroll", Yt, qe.passiveCapture));
915
+ }
916
+ xe.is.desktop === !0 && xe.is.mac === !0 && window[`${e}EventListener`]("wheel", Ho, qe.notPassive), e === "remove" && (xe.is.ios === !0 && (t === !0 ? (window.visualViewport.removeEventListener("resize", ot, qe.passiveCapture), window.visualViewport.removeEventListener("scroll", ot, qe.passiveCapture)) : window.removeEventListener("scroll", Yt, qe.passiveCapture)), l.classList.remove("q-body--prevent-scroll"), l.classList.remove("q-body--force-scrollbar-x"), l.classList.remove("q-body--force-scrollbar-y"), document.qScrollPrevented = !1, l.style.left = Ut, l.style.top = Wt, window.location.href === Xt && window.scrollTo(pt, bt), Qe = void 0);
917
+ }
918
+ function Do(e) {
919
+ let l = "add";
920
+ if (e === !0) {
921
+ if (Ke++, Ve !== null) {
922
+ clearTimeout(Ve), Ve = null;
923
+ return;
924
+ }
925
+ if (Ke > 1)
926
+ return;
927
+ } else {
928
+ if (Ke === 0 || (Ke--, Ke > 0))
929
+ return;
930
+ if (l = "remove", xe.is.ios === !0 && xe.is.nativeMobile === !0) {
931
+ Ve !== null && clearTimeout(Ve), Ve = setTimeout(() => {
932
+ Zt(l), Ve = null;
933
+ }, 100);
934
+ return;
935
+ }
936
+ }
937
+ Zt(l);
938
+ }
939
+ function jo() {
940
+ let e;
941
+ return {
942
+ preventBodyScroll(l) {
943
+ l !== e && (e !== void 0 || l === !0) && (e = l, Do(l));
944
+ }
945
+ };
946
+ }
947
+ let nt = 0;
948
+ const Ko = {
949
+ standard: "fixed-full flex-center",
950
+ top: "fixed-top justify-center",
951
+ bottom: "fixed-bottom justify-center",
952
+ right: "fixed-right items-center",
953
+ left: "fixed-left items-center"
954
+ }, Jt = {
955
+ standard: ["scale", "scale"],
956
+ top: ["slide-down", "slide-up"],
957
+ bottom: ["slide-up", "slide-down"],
958
+ right: ["slide-left", "slide-right"],
959
+ left: ["slide-right", "slide-left"]
960
+ }, No = ye({
961
+ name: "QDialog",
962
+ inheritAttrs: !1,
963
+ props: {
964
+ ...go,
965
+ ...mo,
966
+ transitionShow: String,
967
+ // override useTransitionProps
968
+ transitionHide: String,
969
+ // override useTransitionProps
970
+ persistent: Boolean,
971
+ autoClose: Boolean,
972
+ allowFocusOutside: Boolean,
973
+ noEscDismiss: Boolean,
974
+ noBackdropDismiss: Boolean,
975
+ noRouteDismiss: Boolean,
976
+ noRefocus: Boolean,
977
+ noFocus: Boolean,
978
+ noShake: Boolean,
979
+ seamless: Boolean,
980
+ maximized: Boolean,
981
+ fullWidth: Boolean,
982
+ fullHeight: Boolean,
983
+ square: Boolean,
984
+ backdropFilter: String,
985
+ position: {
986
+ type: String,
987
+ default: "standard",
988
+ validator: (e) => ["standard", "top", "bottom", "left", "right"].includes(e)
989
+ }
990
+ },
991
+ emits: [
992
+ ...vo,
993
+ "shake",
994
+ "click",
995
+ "escapeKey"
996
+ ],
997
+ setup(e, { slots: l, emit: t, attrs: n }) {
998
+ const d = ae(), u = I(null), a = I(!1), p = I(!1);
999
+ let b = null, x = null, f, C;
1000
+ const k = r(
1001
+ () => e.persistent !== !0 && e.noRouteDismiss !== !0 && e.seamless !== !0
1002
+ ), { preventBodyScroll: s } = jo(), { registerTimeout: y } = ao(), { registerTick: q, removeTick: S } = ro(), { transitionProps: $, transitionStyle: K } = so(
1003
+ e,
1004
+ () => Jt[e.position][0],
1005
+ () => Jt[e.position][1]
1006
+ ), _ = r(() => K.value + (e.backdropFilter !== void 0 ? `;backdrop-filter:${e.backdropFilter};-webkit-backdrop-filter:${e.backdropFilter}` : "")), { showPortal: T, hidePortal: Y, portalIsAccessible: B, renderPortal: L } = co(
1007
+ d,
1008
+ u,
1009
+ R,
1010
+ "dialog"
1011
+ ), { hide: H } = fo({
1012
+ showing: a,
1013
+ hideOnRouteChange: k,
1014
+ handleShow: W,
1015
+ handleHide: ne,
1016
+ processOnMount: !0
1017
+ });
1018
+ $o(a);
1019
+ const te = r(
1020
+ () => `q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized === !0 ? "maximized" : "minimized"} q-dialog__inner--${e.position} ${Ko[e.position]}` + (p.value === !0 ? " q-dialog__inner--animating" : "") + (e.fullWidth === !0 ? " q-dialog__inner--fullwidth" : "") + (e.fullHeight === !0 ? " q-dialog__inner--fullheight" : "") + (e.square === !0 ? " q-dialog__inner--square" : "")
1021
+ ), U = r(() => a.value === !0 && e.seamless !== !0), le = r(() => e.autoClose === !0 ? { onClick: se } : {}), V = r(() => [
1022
+ `q-dialog fullscreen no-pointer-events q-dialog--${U.value === !0 ? "modal" : "seamless"}`,
1023
+ n.class
1024
+ ]);
1025
+ J(() => e.maximized, (w) => {
1026
+ a.value === !0 && E(w);
1027
+ }), J(U, (w) => {
1028
+ s(w), w === !0 ? (yo(v), ho(re)) : (Pt(v), Ht(re));
1029
+ });
1030
+ function W(w) {
1031
+ x = e.noRefocus === !1 && document.activeElement !== null ? document.activeElement : null, E(e.maximized), T(), p.value = !0, e.noFocus !== !0 ? (document.activeElement !== null && document.activeElement.blur(), q(Z)) : S(), y(() => {
1032
+ if (d.proxy.$q.platform.is.ios === !0) {
1033
+ if (e.seamless !== !0 && document.activeElement) {
1034
+ const { top: O, bottom: A } = document.activeElement.getBoundingClientRect(), { innerHeight: z } = window, j = window.visualViewport !== void 0 ? window.visualViewport.height : z;
1035
+ O > 0 && A > j / 2 && (document.scrollingElement.scrollTop = Math.min(
1036
+ document.scrollingElement.scrollHeight - j,
1037
+ A >= z ? 1 / 0 : Math.ceil(document.scrollingElement.scrollTop + A - j / 2)
1038
+ )), document.activeElement.scrollIntoView();
1039
+ }
1040
+ C = !0, u.value.click(), C = !1;
1041
+ }
1042
+ T(!0), p.value = !1, t("show", w);
1043
+ }, e.transitionDuration);
1044
+ }
1045
+ function ne(w) {
1046
+ S(), h(!0), p.value = !0, Y(), x !== null && (((w && w.type.indexOf("key") === 0 ? x.closest('[tabindex]:not([tabindex^="-"])') : void 0) || x).focus(), x = null), y(() => {
1047
+ Y(!0), p.value = !1, t("hide", w);
1048
+ }, e.transitionDuration);
1049
+ }
1050
+ function Z(w) {
1051
+ dl(() => {
1052
+ let O = u.value;
1053
+ if (O !== null) {
1054
+ if (w !== void 0) {
1055
+ const A = O.querySelector(w);
1056
+ if (A !== null) {
1057
+ A.focus({ preventScroll: !0 });
1058
+ return;
1059
+ }
1060
+ }
1061
+ O.contains(document.activeElement) !== !0 && (O = O.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]") || O.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]") || O.querySelector("[autofocus], [data-autofocus]") || O, O.focus({ preventScroll: !0 }));
1062
+ }
1063
+ });
1064
+ }
1065
+ function Q(w) {
1066
+ w && typeof w.focus == "function" ? w.focus({ preventScroll: !0 }) : Z(), t("shake");
1067
+ const O = u.value;
1068
+ O !== null && (O.classList.remove("q-animate--scale"), O.classList.add("q-animate--scale"), b !== null && clearTimeout(b), b = setTimeout(() => {
1069
+ b = null, u.value !== null && (O.classList.remove("q-animate--scale"), Z());
1070
+ }, 170));
1071
+ }
1072
+ function re() {
1073
+ e.seamless !== !0 && (e.persistent === !0 || e.noEscDismiss === !0 ? e.maximized !== !0 && e.noShake !== !0 && Q() : (t("escapeKey"), H()));
1074
+ }
1075
+ function h(w) {
1076
+ b !== null && (clearTimeout(b), b = null), (w === !0 || a.value === !0) && (E(!1), e.seamless !== !0 && (s(!1), Pt(v), Ht(re))), w !== !0 && (x = null);
1077
+ }
1078
+ function E(w) {
1079
+ w === !0 ? f !== !0 && (nt < 1 && document.body.classList.add("q-body--dialog"), nt++, f = !0) : f === !0 && (nt < 2 && document.body.classList.remove("q-body--dialog"), nt--, f = !1);
1080
+ }
1081
+ function se(w) {
1082
+ C !== !0 && (H(w), t("click", w));
1083
+ }
1084
+ function i(w) {
1085
+ e.persistent !== !0 && e.noBackdropDismiss !== !0 ? H(w) : e.noShake !== !0 && Q();
1086
+ }
1087
+ function v(w) {
1088
+ e.allowFocusOutside !== !0 && B.value === !0 && Zl(u.value, w.target) !== !0 && Z('[tabindex]:not([tabindex="-1"])');
1089
+ }
1090
+ Object.assign(d.proxy, {
1091
+ // expose public methods
1092
+ focus: Z,
1093
+ shake: Q,
1094
+ // private but needed by QSelect
1095
+ __updateRefocusTarget(w) {
1096
+ x = w || null;
1097
+ }
1098
+ }), Be(h);
1099
+ function R() {
1100
+ return c("div", {
1101
+ role: "dialog",
1102
+ "aria-modal": U.value === !0 ? "true" : "false",
1103
+ ...n,
1104
+ class: V.value
1105
+ }, [
1106
+ c(Ct, {
1107
+ name: "q-transition--fade",
1108
+ appear: !0
1109
+ }, () => U.value === !0 ? c("div", {
1110
+ class: "q-dialog__backdrop fixed-full",
1111
+ style: _.value,
1112
+ "aria-hidden": "true",
1113
+ tabindex: -1,
1114
+ onClick: i
1115
+ }) : null),
1116
+ c(
1117
+ Ct,
1118
+ $.value,
1119
+ () => a.value === !0 ? c("div", {
1120
+ ref: u,
1121
+ class: te.value,
1122
+ style: K.value,
1123
+ tabindex: -1,
1124
+ ...le.value
1125
+ }, be(l.default)) : null
1126
+ )
1127
+ ]);
1128
+ }
1129
+ return L;
1130
+ }
1131
+ });
1132
+ let it = !1;
1133
+ {
1134
+ const e = document.createElement("div");
1135
+ e.setAttribute("dir", "rtl"), Object.assign(e.style, {
1136
+ width: "1px",
1137
+ height: "1px",
1138
+ overflow: "auto"
1139
+ });
1140
+ const l = document.createElement("div");
1141
+ Object.assign(l.style, {
1142
+ width: "1000px",
1143
+ height: "1px"
1144
+ }), document.body.appendChild(e), e.appendChild(l), e.scrollLeft = -1e3, it = e.scrollLeft >= 0, e.remove();
1145
+ }
1146
+ const ie = 1e3, Qo = [
1147
+ "start",
1148
+ "center",
1149
+ "end",
1150
+ "start-force",
1151
+ "center-force",
1152
+ "end-force"
1153
+ ], yl = Array.prototype.filter, Uo = window.getComputedStyle(document.body).overflowAnchor === void 0 ? Jl : function(e, l) {
1154
+ e !== null && (e._qOverflowAnimationFrame !== void 0 && cancelAnimationFrame(e._qOverflowAnimationFrame), e._qOverflowAnimationFrame = requestAnimationFrame(() => {
1155
+ if (e === null)
1156
+ return;
1157
+ e._qOverflowAnimationFrame = void 0;
1158
+ const t = e.children || [];
1159
+ yl.call(t, (d) => d.dataset && d.dataset.qVsAnchor !== void 0).forEach((d) => {
1160
+ delete d.dataset.qVsAnchor;
1161
+ });
1162
+ const n = t[l];
1163
+ n && n.dataset && (n.dataset.qVsAnchor = "");
1164
+ }));
1165
+ };
1166
+ function Le(e, l) {
1167
+ return e + l;
1168
+ }
1169
+ function St(e, l, t, n, d, u, a, p) {
1170
+ const b = e === window ? document.scrollingElement || document.documentElement : e, x = d === !0 ? "offsetWidth" : "offsetHeight", f = {
1171
+ scrollStart: 0,
1172
+ scrollViewSize: -a - p,
1173
+ scrollMaxSize: 0,
1174
+ offsetStart: -a,
1175
+ offsetEnd: -p
1176
+ };
1177
+ if (d === !0 ? (e === window ? (f.scrollStart = window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, f.scrollViewSize += document.documentElement.clientWidth) : (f.scrollStart = b.scrollLeft, f.scrollViewSize += b.clientWidth), f.scrollMaxSize = b.scrollWidth, u === !0 && (f.scrollStart = (it === !0 ? f.scrollMaxSize - f.scrollViewSize : 0) - f.scrollStart)) : (e === window ? (f.scrollStart = window.pageYOffset || window.scrollY || document.body.scrollTop || 0, f.scrollViewSize += document.documentElement.clientHeight) : (f.scrollStart = b.scrollTop, f.scrollViewSize += b.clientHeight), f.scrollMaxSize = b.scrollHeight), t !== null)
1178
+ for (let C = t.previousElementSibling; C !== null; C = C.previousElementSibling)
1179
+ C.classList.contains("q-virtual-scroll--skip") === !1 && (f.offsetStart += C[x]);
1180
+ if (n !== null)
1181
+ for (let C = n.nextElementSibling; C !== null; C = C.nextElementSibling)
1182
+ C.classList.contains("q-virtual-scroll--skip") === !1 && (f.offsetEnd += C[x]);
1183
+ if (l !== e) {
1184
+ const C = b.getBoundingClientRect(), k = l.getBoundingClientRect();
1185
+ d === !0 ? (f.offsetStart += k.left - C.left, f.offsetEnd -= k.width) : (f.offsetStart += k.top - C.top, f.offsetEnd -= k.height), e !== window && (f.offsetStart += f.scrollStart), f.offsetEnd += f.scrollMaxSize - f.offsetStart;
1186
+ }
1187
+ return f;
1188
+ }
1189
+ function Gt(e, l, t, n) {
1190
+ l === "end" && (l = (e === window ? document.body : e)[t === !0 ? "scrollWidth" : "scrollHeight"]), e === window ? t === !0 ? (n === !0 && (l = (it === !0 ? document.body.scrollWidth - document.documentElement.clientWidth : 0) - l), window.scrollTo(l, window.pageYOffset || window.scrollY || document.body.scrollTop || 0)) : window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, l) : t === !0 ? (n === !0 && (l = (it === !0 ? e.scrollWidth - e.offsetWidth : 0) - l), e.scrollLeft = l) : e.scrollTop = l;
1191
+ }
1192
+ function Ne(e, l, t, n) {
1193
+ if (t >= n)
1194
+ return 0;
1195
+ const d = l.length, u = Math.floor(t / ie), a = Math.floor((n - 1) / ie) + 1;
1196
+ let p = e.slice(u, a).reduce(Le, 0);
1197
+ return t % ie !== 0 && (p -= l.slice(u * ie, t).reduce(Le, 0)), n % ie !== 0 && n !== d && (p -= l.slice(n, a * ie).reduce(Le, 0)), p;
1198
+ }
1199
+ const Wo = {
1200
+ virtualScrollSliceSize: {
1201
+ type: [Number, String],
1202
+ default: 10
1203
+ },
1204
+ virtualScrollSliceRatioBefore: {
1205
+ type: [Number, String],
1206
+ default: 1
1207
+ },
1208
+ virtualScrollSliceRatioAfter: {
1209
+ type: [Number, String],
1210
+ default: 1
1211
+ },
1212
+ virtualScrollItemSize: {
1213
+ type: [Number, String],
1214
+ default: 24
1215
+ },
1216
+ virtualScrollStickySizeStart: {
1217
+ type: [Number, String],
1218
+ default: 0
1219
+ },
1220
+ virtualScrollStickySizeEnd: {
1221
+ type: [Number, String],
1222
+ default: 0
1223
+ },
1224
+ tableColspan: [Number, String]
1225
+ }, el = {
1226
+ virtualScrollHorizontal: Boolean,
1227
+ onVirtualScroll: Function,
1228
+ ...Wo
1229
+ };
1230
+ function Xo({
1231
+ virtualScrollLength: e,
1232
+ getVirtualScrollTarget: l,
1233
+ getVirtualScrollEl: t,
1234
+ virtualScrollItemSizeComputed: n
1235
+ // optional
1236
+ }) {
1237
+ const d = ae(), { props: u, emit: a, proxy: p } = d, { $q: b } = p;
1238
+ let x, f, C, k = [], s;
1239
+ const y = I(0), q = I(0), S = I({}), $ = I(null), K = I(null), _ = I(null), T = I({ from: 0, to: 0 }), Y = r(() => u.tableColspan !== void 0 ? u.tableColspan : 100);
1240
+ n === void 0 && (n = r(() => u.virtualScrollItemSize));
1241
+ const B = r(() => n.value + ";" + u.virtualScrollHorizontal), L = r(
1242
+ () => B.value + ";" + u.virtualScrollSliceRatioBefore + ";" + u.virtualScrollSliceRatioAfter
1243
+ );
1244
+ J(L, () => {
1245
+ Q();
1246
+ }), J(B, H);
1247
+ function H() {
1248
+ Z(f, !0);
1249
+ }
1250
+ function te(i) {
1251
+ Z(i === void 0 ? f : i);
1252
+ }
1253
+ function U(i, v) {
1254
+ const R = l();
1255
+ if (R == null || R.nodeType === 8)
1256
+ return;
1257
+ const w = St(
1258
+ R,
1259
+ t(),
1260
+ $.value,
1261
+ K.value,
1262
+ u.virtualScrollHorizontal,
1263
+ b.lang.rtl,
1264
+ u.virtualScrollStickySizeStart,
1265
+ u.virtualScrollStickySizeEnd
1266
+ );
1267
+ C !== w.scrollViewSize && Q(w.scrollViewSize), V(
1268
+ R,
1269
+ w,
1270
+ Math.min(e.value - 1, Math.max(0, parseInt(i, 10) || 0)),
1271
+ 0,
1272
+ Qo.indexOf(v) !== -1 ? v : f !== -1 && i > f ? "end" : "start"
1273
+ );
1274
+ }
1275
+ function le() {
1276
+ const i = l();
1277
+ if (i == null || i.nodeType === 8)
1278
+ return;
1279
+ const v = St(
1280
+ i,
1281
+ t(),
1282
+ $.value,
1283
+ K.value,
1284
+ u.virtualScrollHorizontal,
1285
+ b.lang.rtl,
1286
+ u.virtualScrollStickySizeStart,
1287
+ u.virtualScrollStickySizeEnd
1288
+ ), R = e.value - 1, w = v.scrollMaxSize - v.offsetStart - v.offsetEnd - q.value;
1289
+ if (x === v.scrollStart)
1290
+ return;
1291
+ if (v.scrollMaxSize <= 0) {
1292
+ V(i, v, 0, 0);
1293
+ return;
1294
+ }
1295
+ C !== v.scrollViewSize && Q(v.scrollViewSize), W(T.value.from);
1296
+ const O = Math.floor(v.scrollMaxSize - Math.max(v.scrollViewSize, v.offsetEnd) - Math.min(s[R], v.scrollViewSize / 2));
1297
+ if (O > 0 && Math.ceil(v.scrollStart) >= O) {
1298
+ V(
1299
+ i,
1300
+ v,
1301
+ R,
1302
+ v.scrollMaxSize - v.offsetEnd - k.reduce(Le, 0)
1303
+ );
1304
+ return;
1305
+ }
1306
+ let A = 0, z = v.scrollStart - v.offsetStart, j = z;
1307
+ if (z <= w && z + v.scrollViewSize >= y.value)
1308
+ z -= y.value, A = T.value.from, j = z;
1309
+ else
1310
+ for (let M = 0; z >= k[M] && A < R; M++)
1311
+ z -= k[M], A += ie;
1312
+ for (; z > 0 && A < R; )
1313
+ z -= s[A], z > -v.scrollViewSize ? (A++, j = z) : j = s[A] + z;
1314
+ V(
1315
+ i,
1316
+ v,
1317
+ A,
1318
+ j
1319
+ );
1320
+ }
1321
+ function V(i, v, R, w, O) {
1322
+ const A = typeof O == "string" && O.indexOf("-force") !== -1, z = A === !0 ? O.replace("-force", "") : O, j = z !== void 0 ? z : "start";
1323
+ let M = Math.max(0, R - S.value[j]), G = M + S.value.total;
1324
+ G > e.value && (G = e.value, M = Math.max(0, G - S.value.total)), x = v.scrollStart;
1325
+ const me = M !== T.value.from || G !== T.value.to;
1326
+ if (me === !1 && z === void 0) {
1327
+ h(R);
1328
+ return;
1329
+ }
1330
+ const { activeElement: Ue } = document, ce = _.value;
1331
+ me === !0 && ce !== null && ce !== Ue && ce.contains(Ue) === !0 && (ce.addEventListener("focusout", ne), setTimeout(() => {
1332
+ ce !== null && ce.removeEventListener("focusout", ne);
1333
+ })), Uo(ce, R - M);
1334
+ const We = z !== void 0 ? s.slice(M, R).reduce(Le, 0) : 0;
1335
+ if (me === !0) {
1336
+ const Se = G >= T.value.from && M <= T.value.to ? T.value.to : G;
1337
+ T.value = { from: M, to: Se }, y.value = Ne(k, s, 0, M), q.value = Ne(k, s, G, e.value), requestAnimationFrame(() => {
1338
+ T.value.to !== G && x === v.scrollStart && (T.value = { from: T.value.from, to: G }, q.value = Ne(k, s, G, e.value));
1339
+ });
1340
+ }
1341
+ requestAnimationFrame(() => {
1342
+ if (x !== v.scrollStart)
1343
+ return;
1344
+ me === !0 && W(M);
1345
+ const Se = s.slice(M, R).reduce(Le, 0), we = Se + v.offsetStart + y.value, Xe = we + s[R];
1346
+ let $e = we + w;
1347
+ if (z !== void 0) {
1348
+ const st = Se - We, He = v.scrollStart + st;
1349
+ $e = A !== !0 && He < we && Xe < He + v.scrollViewSize ? He : z === "end" ? Xe - v.scrollViewSize : we - (z === "start" ? 0 : Math.round((v.scrollViewSize - s[R]) / 2));
1350
+ }
1351
+ x = $e, Gt(
1352
+ i,
1353
+ $e,
1354
+ u.virtualScrollHorizontal,
1355
+ b.lang.rtl
1356
+ ), h(R);
1357
+ });
1358
+ }
1359
+ function W(i) {
1360
+ const v = _.value;
1361
+ if (v) {
1362
+ const R = yl.call(
1363
+ v.children,
1364
+ (M) => M.classList && M.classList.contains("q-virtual-scroll--skip") === !1
1365
+ ), w = R.length, O = u.virtualScrollHorizontal === !0 ? (M) => M.getBoundingClientRect().width : (M) => M.offsetHeight;
1366
+ let A = i, z, j;
1367
+ for (let M = 0; M < w; ) {
1368
+ for (z = O(R[M]), M++; M < w && R[M].classList.contains("q-virtual-scroll--with-prev") === !0; )
1369
+ z += O(R[M]), M++;
1370
+ j = z - s[A], j !== 0 && (s[A] += j, k[Math.floor(A / ie)] += j), A++;
1371
+ }
1372
+ }
1373
+ }
1374
+ function ne() {
1375
+ _.value !== null && _.value !== void 0 && _.value.focus();
1376
+ }
1377
+ function Z(i, v) {
1378
+ const R = 1 * n.value;
1379
+ (v === !0 || Array.isArray(s) === !1) && (s = []);
1380
+ const w = s.length;
1381
+ s.length = e.value;
1382
+ for (let A = e.value - 1; A >= w; A--)
1383
+ s[A] = R;
1384
+ const O = Math.floor((e.value - 1) / ie);
1385
+ k = [];
1386
+ for (let A = 0; A <= O; A++) {
1387
+ let z = 0;
1388
+ const j = Math.min((A + 1) * ie, e.value);
1389
+ for (let M = A * ie; M < j; M++)
1390
+ z += s[M];
1391
+ k.push(z);
1392
+ }
1393
+ f = -1, x = void 0, y.value = Ne(k, s, 0, T.value.from), q.value = Ne(k, s, T.value.to, e.value), i >= 0 ? (W(T.value.from), ve(() => {
1394
+ U(i);
1395
+ })) : E();
1396
+ }
1397
+ function Q(i) {
1398
+ if (i === void 0 && typeof window < "u") {
1399
+ const z = l();
1400
+ z != null && z.nodeType !== 8 && (i = St(
1401
+ z,
1402
+ t(),
1403
+ $.value,
1404
+ K.value,
1405
+ u.virtualScrollHorizontal,
1406
+ b.lang.rtl,
1407
+ u.virtualScrollStickySizeStart,
1408
+ u.virtualScrollStickySizeEnd
1409
+ ).scrollViewSize);
1410
+ }
1411
+ C = i;
1412
+ const v = parseFloat(u.virtualScrollSliceRatioBefore) || 0, R = parseFloat(u.virtualScrollSliceRatioAfter) || 0, w = 1 + v + R, O = i === void 0 || i <= 0 ? 1 : Math.ceil(i / n.value), A = Math.max(
1413
+ 1,
1414
+ O,
1415
+ Math.ceil((u.virtualScrollSliceSize > 0 ? u.virtualScrollSliceSize : 10) / w)
1416
+ );
1417
+ S.value = {
1418
+ total: Math.ceil(A * w),
1419
+ start: Math.ceil(A * v),
1420
+ center: Math.ceil(A * (0.5 + v)),
1421
+ end: Math.ceil(A * (1 + v)),
1422
+ view: O
1423
+ };
1424
+ }
1425
+ function re(i, v) {
1426
+ const R = u.virtualScrollHorizontal === !0 ? "width" : "height", w = {
1427
+ ["--q-virtual-scroll-item-" + R]: n.value + "px"
1428
+ };
1429
+ return [
1430
+ i === "tbody" ? c(i, {
1431
+ class: "q-virtual-scroll__padding",
1432
+ key: "before",
1433
+ ref: $
1434
+ }, [
1435
+ c("tr", [
1436
+ c("td", {
1437
+ style: { [R]: `${y.value}px`, ...w },
1438
+ colspan: Y.value
1439
+ })
1440
+ ])
1441
+ ]) : c(i, {
1442
+ class: "q-virtual-scroll__padding",
1443
+ key: "before",
1444
+ ref: $,
1445
+ style: { [R]: `${y.value}px`, ...w }
1446
+ }),
1447
+ c(i, {
1448
+ class: "q-virtual-scroll__content",
1449
+ key: "content",
1450
+ ref: _,
1451
+ tabindex: -1
1452
+ }, v.flat()),
1453
+ i === "tbody" ? c(i, {
1454
+ class: "q-virtual-scroll__padding",
1455
+ key: "after",
1456
+ ref: K
1457
+ }, [
1458
+ c("tr", [
1459
+ c("td", {
1460
+ style: { [R]: `${q.value}px`, ...w },
1461
+ colspan: Y.value
1462
+ })
1463
+ ])
1464
+ ]) : c(i, {
1465
+ class: "q-virtual-scroll__padding",
1466
+ key: "after",
1467
+ ref: K,
1468
+ style: { [R]: `${q.value}px`, ...w }
1469
+ })
1470
+ ];
1471
+ }
1472
+ function h(i) {
1473
+ f !== i && (u.onVirtualScroll !== void 0 && a("virtualScroll", {
1474
+ index: i,
1475
+ from: T.value.from,
1476
+ to: T.value.to - 1,
1477
+ direction: i < f ? "decrease" : "increase",
1478
+ ref: p
1479
+ }), f = i);
1480
+ }
1481
+ Q();
1482
+ const E = gl(
1483
+ le,
1484
+ b.platform.is.ios === !0 ? 120 : 35
1485
+ );
1486
+ Ml(() => {
1487
+ Q();
1488
+ });
1489
+ let se = !1;
1490
+ return ul(() => {
1491
+ se = !0;
1492
+ }), il(() => {
1493
+ if (se !== !0) return;
1494
+ const i = l();
1495
+ x !== void 0 && i !== void 0 && i !== null && i.nodeType !== 8 ? Gt(
1496
+ i,
1497
+ x,
1498
+ u.virtualScrollHorizontal,
1499
+ b.lang.rtl
1500
+ ) : U(f);
1501
+ }), Be(() => {
1502
+ E.cancel();
1503
+ }), Object.assign(p, { scrollTo: U, reset: H, refresh: te }), {
1504
+ virtualScrollSliceRange: T,
1505
+ virtualScrollSliceSizeComputed: S,
1506
+ setVirtualScrollSize: Q,
1507
+ onVirtualScrollEvt: E,
1508
+ localResetVirtualScroll: Z,
1509
+ padVirtualScroll: re,
1510
+ scrollTo: U,
1511
+ reset: H,
1512
+ refresh: te
1513
+ };
1514
+ }
1515
+ const Yo = /[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/, Zo = /[\u4e00-\u9fff\u3400-\u4dbf\u{20000}-\u{2a6df}\u{2a700}-\u{2b73f}\u{2b740}-\u{2b81f}\u{2b820}-\u{2ceaf}\uf900-\ufaff\u3300-\u33ff\ufe30-\ufe4f\uf900-\ufaff\u{2f800}-\u{2fa1f}]/u, Jo = /[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/, Go = /[a-z0-9_ -]$/i;
1516
+ function en(e) {
1517
+ return function(t) {
1518
+ if (t.type === "compositionend" || t.type === "change") {
1519
+ if (t.target.qComposing !== !0) return;
1520
+ t.target.qComposing = !1, e(t);
1521
+ } else t.type === "compositionupdate" && t.target.qComposing !== !0 && typeof t.data == "string" && (xe.is.firefox === !0 ? Go.test(t.data) === !1 : Yo.test(t.data) === !0 || Zo.test(t.data) === !0 || Jo.test(t.data) === !0) === !0 && (t.target.qComposing = !0);
1522
+ };
1523
+ }
1524
+ function pe(e, l) {
1525
+ if (e === l)
1526
+ return !0;
1527
+ if (e !== null && l !== null && typeof e == "object" && typeof l == "object") {
1528
+ if (e.constructor !== l.constructor)
1529
+ return !1;
1530
+ let t, n;
1531
+ if (e.constructor === Array) {
1532
+ if (t = e.length, t !== l.length)
1533
+ return !1;
1534
+ for (n = t; n-- !== 0; )
1535
+ if (pe(e[n], l[n]) !== !0)
1536
+ return !1;
1537
+ return !0;
1538
+ }
1539
+ if (e.constructor === Map) {
1540
+ if (e.size !== l.size)
1541
+ return !1;
1542
+ let u = e.entries();
1543
+ for (n = u.next(); n.done !== !0; ) {
1544
+ if (l.has(n.value[0]) !== !0)
1545
+ return !1;
1546
+ n = u.next();
1547
+ }
1548
+ for (u = e.entries(), n = u.next(); n.done !== !0; ) {
1549
+ if (pe(n.value[1], l.get(n.value[0])) !== !0)
1550
+ return !1;
1551
+ n = u.next();
1552
+ }
1553
+ return !0;
1554
+ }
1555
+ if (e.constructor === Set) {
1556
+ if (e.size !== l.size)
1557
+ return !1;
1558
+ const u = e.entries();
1559
+ for (n = u.next(); n.done !== !0; ) {
1560
+ if (l.has(n.value[0]) !== !0)
1561
+ return !1;
1562
+ n = u.next();
1563
+ }
1564
+ return !0;
1565
+ }
1566
+ if (e.buffer != null && e.buffer.constructor === ArrayBuffer) {
1567
+ if (t = e.length, t !== l.length)
1568
+ return !1;
1569
+ for (n = t; n-- !== 0; )
1570
+ if (e[n] !== l[n])
1571
+ return !1;
1572
+ return !0;
1573
+ }
1574
+ if (e.constructor === RegExp)
1575
+ return e.source === l.source && e.flags === l.flags;
1576
+ if (e.valueOf !== Object.prototype.valueOf)
1577
+ return e.valueOf() === l.valueOf();
1578
+ if (e.toString !== Object.prototype.toString)
1579
+ return e.toString() === l.toString();
1580
+ const d = Object.keys(e).filter((u) => e[u] !== void 0);
1581
+ if (t = d.length, t !== Object.keys(l).filter((u) => l[u] !== void 0).length)
1582
+ return !1;
1583
+ for (n = t; n-- !== 0; ) {
1584
+ const u = d[n];
1585
+ if (pe(e[u], l[u]) !== !0)
1586
+ return !1;
1587
+ }
1588
+ return !0;
1589
+ }
1590
+ return e !== e && l !== l;
1591
+ }
1592
+ function tl(e, l, t) {
1593
+ if (t <= l)
1594
+ return l;
1595
+ const n = t - l + 1;
1596
+ let d = l + (e - l) % n;
1597
+ return d < l && (d = n + d), d === 0 ? 0 : d;
1598
+ }
1599
+ const ll = (e) => ["add", "add-unique", "toggle"].includes(e), tn = ".*+?^${}()|[]\\", ln = Object.keys(qt);
1600
+ function wt(e, l) {
1601
+ if (typeof e == "function") return e;
1602
+ const t = e !== void 0 ? e : l;
1603
+ return (n) => n !== null && typeof n == "object" && t in n ? n[t] : n;
1604
+ }
1605
+ const on = ye({
1606
+ name: "QSelect",
1607
+ inheritAttrs: !1,
1608
+ props: {
1609
+ ...el,
1610
+ ...fl,
1611
+ ...qt,
1612
+ // override of useFieldProps > modelValue
1613
+ modelValue: {
1614
+ required: !0
1615
+ },
1616
+ multiple: Boolean,
1617
+ displayValue: [String, Number],
1618
+ displayValueHtml: Boolean,
1619
+ dropdownIcon: String,
1620
+ options: {
1621
+ type: Array,
1622
+ default: () => []
1623
+ },
1624
+ optionValue: [Function, String],
1625
+ optionLabel: [Function, String],
1626
+ optionDisable: [Function, String],
1627
+ hideSelected: Boolean,
1628
+ hideDropdownIcon: Boolean,
1629
+ fillInput: Boolean,
1630
+ maxValues: [Number, String],
1631
+ optionsDense: Boolean,
1632
+ optionsDark: {
1633
+ type: Boolean,
1634
+ default: null
1635
+ },
1636
+ optionsSelectedClass: String,
1637
+ optionsHtml: Boolean,
1638
+ optionsCover: Boolean,
1639
+ menuShrink: Boolean,
1640
+ menuAnchor: String,
1641
+ menuSelf: String,
1642
+ menuOffset: Array,
1643
+ popupContentClass: String,
1644
+ popupContentStyle: [String, Array, Object],
1645
+ popupNoRouteDismiss: Boolean,
1646
+ useInput: Boolean,
1647
+ useChips: Boolean,
1648
+ newValueMode: {
1649
+ type: String,
1650
+ validator: ll
1651
+ },
1652
+ mapOptions: Boolean,
1653
+ emitValue: Boolean,
1654
+ disableTabSelection: Boolean,
1655
+ inputDebounce: {
1656
+ type: [Number, String],
1657
+ default: 500
1658
+ },
1659
+ inputClass: [Array, String, Object],
1660
+ inputStyle: [Array, String, Object],
1661
+ tabindex: {
1662
+ type: [String, Number],
1663
+ default: 0
1664
+ },
1665
+ autocomplete: String,
1666
+ transitionShow: {},
1667
+ transitionHide: {},
1668
+ transitionDuration: {},
1669
+ behavior: {
1670
+ type: String,
1671
+ validator: (e) => ["default", "menu", "dialog"].includes(e),
1672
+ default: "default"
1673
+ },
1674
+ // override of useVirtualScrollProps > virtualScrollItemSize (no default)
1675
+ virtualScrollItemSize: el.virtualScrollItemSize.type,
1676
+ onNewValue: Function,
1677
+ onFilter: Function
1678
+ },
1679
+ emits: [
1680
+ ...hl,
1681
+ "add",
1682
+ "remove",
1683
+ "inputValue",
1684
+ "keyup",
1685
+ "keypress",
1686
+ "keydown",
1687
+ "popupShow",
1688
+ "popupHide",
1689
+ "filterAbort"
1690
+ ],
1691
+ setup(e, { slots: l, emit: t }) {
1692
+ const { proxy: n } = ae(), { $q: d } = n, u = I(!1), a = I(!1), p = I(-1), b = I(""), x = I(!1), f = I(!1);
1693
+ let C = null, k = null, s, y, q, S = null, $, K, _, T;
1694
+ const Y = I(null), B = I(null), L = I(null), H = I(null), te = I(null), U = Co(e), le = en(It), V = r(() => Array.isArray(e.options) ? e.options.length : 0), W = r(() => e.virtualScrollItemSize === void 0 ? e.optionsDense === !0 ? 24 : 48 : e.virtualScrollItemSize), {
1695
+ virtualScrollSliceRange: ne,
1696
+ virtualScrollSliceSizeComputed: Z,
1697
+ localResetVirtualScroll: Q,
1698
+ padVirtualScroll: re,
1699
+ onVirtualScrollEvt: h,
1700
+ scrollTo: E,
1701
+ setVirtualScrollSize: se
1702
+ } = Xo({
1703
+ virtualScrollLength: V,
1704
+ getVirtualScrollTarget: kl,
1705
+ getVirtualScrollEl: zt,
1706
+ virtualScrollItemSizeComputed: W
1707
+ }), i = pl(), v = r(() => {
1708
+ const o = e.mapOptions === !0 && e.multiple !== !0, m = e.modelValue !== void 0 && (e.modelValue !== null || o === !0) ? e.multiple === !0 && Array.isArray(e.modelValue) ? e.modelValue : [e.modelValue] : [];
1709
+ if (e.mapOptions === !0 && Array.isArray(e.options) === !0) {
1710
+ const g = e.mapOptions === !0 && s !== void 0 ? s : [], F = m.map((D) => Cl(D, g));
1711
+ return e.modelValue === null && o === !0 ? F.filter((D) => D !== null) : F;
1712
+ }
1713
+ return m;
1714
+ }), R = r(() => {
1715
+ const o = {};
1716
+ return ln.forEach((m) => {
1717
+ const g = e[m];
1718
+ g !== void 0 && (o[m] = g);
1719
+ }), o;
1720
+ }), w = r(() => e.optionsDark === null ? i.isDark.value : e.optionsDark), O = r(() => kt(v.value)), A = r(() => {
1721
+ let o = "q-field__input q-placeholder col";
1722
+ return e.hideSelected === !0 || v.value.length === 0 ? [o, e.inputClass] : (o += " q-field__input--padding", e.inputClass === void 0 ? o : [o, e.inputClass]);
1723
+ }), z = r(
1724
+ () => (e.virtualScrollHorizontal === !0 ? "q-virtual-scroll--horizontal" : "") + (e.popupContentClass ? " " + e.popupContentClass : "")
1725
+ ), j = r(() => V.value === 0), M = r(
1726
+ () => v.value.map((o) => ee.value(o)).join(", ")
1727
+ ), G = r(() => e.displayValue !== void 0 ? e.displayValue : M.value), me = r(() => e.optionsHtml === !0 ? () => !0 : (o) => o != null && o.html === !0), Ue = r(() => e.displayValueHtml === !0 || e.displayValue === void 0 && (e.optionsHtml === !0 || v.value.some(me.value))), ce = r(() => i.focused.value === !0 ? e.tabindex : -1), We = r(() => {
1728
+ const o = {
1729
+ tabindex: e.tabindex,
1730
+ role: "combobox",
1731
+ "aria-label": e.label,
1732
+ "aria-readonly": e.readonly === !0 ? "true" : "false",
1733
+ "aria-autocomplete": e.useInput === !0 ? "list" : "none",
1734
+ "aria-expanded": u.value === !0 ? "true" : "false",
1735
+ "aria-controls": `${i.targetUid.value}_lb`
1736
+ };
1737
+ return p.value >= 0 && (o["aria-activedescendant"] = `${i.targetUid.value}_${p.value}`), o;
1738
+ }), Se = r(() => ({
1739
+ id: `${i.targetUid.value}_lb`,
1740
+ role: "listbox",
1741
+ "aria-multiselectable": e.multiple === !0 ? "true" : "false"
1742
+ })), we = r(() => v.value.map((o, m) => ({
1743
+ index: m,
1744
+ opt: o,
1745
+ html: me.value(o),
1746
+ selected: !0,
1747
+ removeAtIndex: wl,
1748
+ toggleOption: Ce,
1749
+ tabindex: ce.value
1750
+ }))), Xe = r(() => {
1751
+ if (V.value === 0)
1752
+ return [];
1753
+ const { from: o, to: m } = ne.value;
1754
+ return e.options.slice(o, m).map((g, F) => {
1755
+ const D = Ae.value(g) === !0, P = dt(g) === !0, X = o + F, N = {
1756
+ clickable: !0,
1757
+ active: P,
1758
+ activeClass: He.value,
1759
+ manualFocus: !0,
1760
+ focused: !1,
1761
+ disable: D,
1762
+ tabindex: -1,
1763
+ dense: e.optionsDense,
1764
+ dark: w.value,
1765
+ role: "option",
1766
+ "aria-selected": P === !0 ? "true" : "false",
1767
+ id: `${i.targetUid.value}_${X}`,
1768
+ onClick: () => {
1769
+ Ce(g);
1770
+ }
1771
+ };
1772
+ return D !== !0 && (p.value === X && (N.focused = !0), d.platform.is.desktop === !0 && (N.onMousemove = () => {
1773
+ u.value === !0 && Ee(X);
1774
+ })), {
1775
+ index: X,
1776
+ opt: g,
1777
+ html: me.value(g),
1778
+ label: ee.value(g),
1779
+ selected: N.active,
1780
+ focused: N.focused,
1781
+ toggleOption: Ce,
1782
+ setOptionIndex: Ee,
1783
+ itemProps: N
1784
+ };
1785
+ });
1786
+ }), $e = r(() => e.dropdownIcon !== void 0 ? e.dropdownIcon : d.iconSet.arrow.dropdown), st = r(
1787
+ () => e.optionsCover === !1 && e.outlined !== !0 && e.standout !== !0 && e.borderless !== !0 && e.rounded !== !0
1788
+ ), He = r(() => e.optionsSelectedClass !== void 0 ? e.optionsSelectedClass : e.color !== void 0 ? `text-${e.color}` : ""), de = r(() => wt(e.optionValue, "value")), ee = r(() => wt(e.optionLabel, "label")), Ae = r(() => wt(e.optionDisable, "disable")), Ye = r(() => v.value.map(de.value)), Sl = r(() => {
1789
+ const o = {
1790
+ onInput: It,
1791
+ // Safari < 10.2 & UIWebView doesn't fire compositionend when
1792
+ // switching focus before confirming composition choice
1793
+ // this also fixes the issue where some browsers e.g. iOS Chrome
1794
+ // fires "change" instead of "input" on autocomplete.
1795
+ onChange: le,
1796
+ onKeydown: Rt,
1797
+ onKeyup: At,
1798
+ onKeypress: Et,
1799
+ onFocus: _t,
1800
+ onClick(m) {
1801
+ y === !0 && Me(m);
1802
+ }
1803
+ };
1804
+ return o.onCompositionstart = o.onCompositionupdate = o.onCompositionend = le, o;
1805
+ });
1806
+ J(v, (o) => {
1807
+ s = o, e.useInput === !0 && e.fillInput === !0 && e.multiple !== !0 && i.innerLoading.value !== !0 && (a.value !== !0 && u.value !== !0 || O.value !== !0) && (q !== !0 && Ie(), (a.value === !0 || u.value === !0) && Re(""));
1808
+ }, { immediate: !0 }), J(() => e.fillInput, Ie), J(u, ft), J(V, Tl);
1809
+ function Vt(o) {
1810
+ return e.emitValue === !0 ? de.value(o) : o;
1811
+ }
1812
+ function ct(o) {
1813
+ if (o !== -1 && o < v.value.length)
1814
+ if (e.multiple === !0) {
1815
+ const m = e.modelValue.slice();
1816
+ t("remove", { index: o, value: m.splice(o, 1)[0] }), t("update:modelValue", m);
1817
+ } else
1818
+ t("update:modelValue", null);
1819
+ }
1820
+ function wl(o) {
1821
+ ct(o), i.focus();
1822
+ }
1823
+ function xt(o, m) {
1824
+ const g = Vt(o);
1825
+ if (e.multiple !== !0) {
1826
+ e.fillInput === !0 && Pe(
1827
+ ee.value(o),
1828
+ !0,
1829
+ !0
1830
+ ), t("update:modelValue", g);
1831
+ return;
1832
+ }
1833
+ if (v.value.length === 0) {
1834
+ t("add", { index: 0, value: g }), t("update:modelValue", e.multiple === !0 ? [g] : g);
1835
+ return;
1836
+ }
1837
+ if (m === !0 && dt(o) === !0 || e.maxValues !== void 0 && e.modelValue.length >= e.maxValues)
1838
+ return;
1839
+ const F = e.modelValue.slice();
1840
+ t("add", { index: F.length, value: g }), F.push(g), t("update:modelValue", F);
1841
+ }
1842
+ function Ce(o, m) {
1843
+ if (i.editable.value !== !0 || o === void 0 || Ae.value(o) === !0)
1844
+ return;
1845
+ const g = de.value(o);
1846
+ if (e.multiple !== !0) {
1847
+ m !== !0 && (Pe(
1848
+ e.fillInput === !0 ? ee.value(o) : "",
1849
+ !0,
1850
+ !0
1851
+ ), ke()), B.value !== null && B.value.focus(), (v.value.length === 0 || pe(de.value(v.value[0]), g) !== !0) && t("update:modelValue", e.emitValue === !0 ? g : o);
1852
+ return;
1853
+ }
1854
+ if ((y !== !0 || x.value === !0) && i.focus(), _t(), v.value.length === 0) {
1855
+ const P = e.emitValue === !0 ? g : o;
1856
+ t("add", { index: 0, value: P }), t("update:modelValue", e.multiple === !0 ? [P] : P);
1857
+ return;
1858
+ }
1859
+ const F = e.modelValue.slice(), D = Ye.value.findIndex((P) => pe(P, g));
1860
+ if (D !== -1)
1861
+ t("remove", { index: D, value: F.splice(D, 1)[0] });
1862
+ else {
1863
+ if (e.maxValues !== void 0 && F.length >= e.maxValues)
1864
+ return;
1865
+ const P = e.emitValue === !0 ? g : o;
1866
+ t("add", { index: F.length, value: P }), F.push(P);
1867
+ }
1868
+ t("update:modelValue", F);
1869
+ }
1870
+ function Ee(o) {
1871
+ if (d.platform.is.desktop !== !0) return;
1872
+ const m = o !== -1 && o < V.value ? o : -1;
1873
+ p.value !== m && (p.value = m);
1874
+ }
1875
+ function Ze(o = 1, m) {
1876
+ if (u.value === !0) {
1877
+ let g = p.value;
1878
+ do
1879
+ g = tl(
1880
+ g + o,
1881
+ -1,
1882
+ V.value - 1
1883
+ );
1884
+ while (g !== -1 && g !== p.value && Ae.value(e.options[g]) === !0);
1885
+ p.value !== g && (Ee(g), E(g), m !== !0 && e.useInput === !0 && e.fillInput === !0 && Je(
1886
+ g >= 0 ? ee.value(e.options[g]) : $,
1887
+ !0
1888
+ ));
1889
+ }
1890
+ }
1891
+ function Cl(o, m) {
1892
+ const g = (F) => pe(de.value(F), o);
1893
+ return e.options.find(g) || m.find(g) || o;
1894
+ }
1895
+ function dt(o) {
1896
+ const m = de.value(o);
1897
+ return Ye.value.find((g) => pe(g, m)) !== void 0;
1898
+ }
1899
+ function _t(o) {
1900
+ e.useInput === !0 && B.value !== null && (o === void 0 || B.value === o.target && o.target.value === M.value) && B.value.select();
1901
+ }
1902
+ function Bt(o) {
1903
+ cl(o, 27) === !0 && u.value === !0 && (Me(o), ke(), Ie()), t("keyup", o);
1904
+ }
1905
+ function At(o) {
1906
+ const { value: m } = o.target;
1907
+ if (o.keyCode !== void 0) {
1908
+ Bt(o);
1909
+ return;
1910
+ }
1911
+ if (o.target.value = "", C !== null && (clearTimeout(C), C = null), k !== null && (clearTimeout(k), k = null), Ie(), typeof m == "string" && m.length !== 0) {
1912
+ const g = m.toLocaleLowerCase(), F = (P) => {
1913
+ const X = e.options.find((N) => String(P.value(N)).toLocaleLowerCase() === g);
1914
+ return X === void 0 ? !1 : (v.value.indexOf(X) === -1 ? Ce(X) : ke(), !0);
1915
+ }, D = (P) => {
1916
+ F(de) !== !0 && P !== !0 && F(ee) !== !0 && Re(m, !0, () => D(!0));
1917
+ };
1918
+ D();
1919
+ } else
1920
+ i.clearValue(o);
1921
+ }
1922
+ function Et(o) {
1923
+ t("keypress", o);
1924
+ }
1925
+ function Rt(o) {
1926
+ if (t("keydown", o), Gl(o) === !0)
1927
+ return;
1928
+ const m = b.value.length !== 0 && (e.newValueMode !== void 0 || e.onNewValue !== void 0), g = o.shiftKey !== !0 && e.disableTabSelection !== !0 && e.multiple !== !0 && (p.value !== -1 || m === !0);
1929
+ if (o.keyCode === 27) {
1930
+ he(o);
1931
+ return;
1932
+ }
1933
+ if (o.keyCode === 9 && g === !1) {
1934
+ ze();
1935
+ return;
1936
+ }
1937
+ if (o.target === void 0 || o.target.id !== i.targetUid.value || i.editable.value !== !0) return;
1938
+ if (o.keyCode === 40 && i.innerLoading.value !== !0 && u.value === !1) {
1939
+ oe(o), Fe();
1940
+ return;
1941
+ }
1942
+ if (o.keyCode === 8 && (e.useChips === !0 || e.clearable === !0) && e.hideSelected !== !0 && b.value.length === 0) {
1943
+ e.multiple === !0 && Array.isArray(e.modelValue) === !0 ? ct(e.modelValue.length - 1) : e.multiple !== !0 && e.modelValue !== null && t("update:modelValue", null);
1944
+ return;
1945
+ }
1946
+ (o.keyCode === 35 || o.keyCode === 36) && (typeof b.value != "string" || b.value.length === 0) && (oe(o), p.value = -1, Ze(o.keyCode === 36 ? 1 : -1, e.multiple)), (o.keyCode === 33 || o.keyCode === 34) && Z.value !== void 0 && (oe(o), p.value = Math.max(
1947
+ -1,
1948
+ Math.min(
1949
+ V.value,
1950
+ p.value + (o.keyCode === 33 ? -1 : 1) * Z.value.view
1951
+ )
1952
+ ), Ze(o.keyCode === 33 ? 1 : -1, e.multiple)), (o.keyCode === 38 || o.keyCode === 40) && (oe(o), Ze(o.keyCode === 38 ? -1 : 1, e.multiple));
1953
+ const F = V.value;
1954
+ if ((_ === void 0 || T < Date.now()) && (_ = ""), F > 0 && e.useInput !== !0 && o.key !== void 0 && o.key.length === 1 && o.altKey === !1 && o.ctrlKey === !1 && o.metaKey === !1 && (o.keyCode !== 32 || _.length !== 0)) {
1955
+ u.value !== !0 && Fe(o);
1956
+ const D = o.key.toLocaleLowerCase(), P = _.length === 1 && _[0] === D;
1957
+ T = Date.now() + 1500, P === !1 && (oe(o), _ += D);
1958
+ const X = new RegExp("^" + _.split("").map((vt) => tn.indexOf(vt) !== -1 ? "\\" + vt : vt).join(".*"), "i");
1959
+ let N = p.value;
1960
+ if (P === !0 || N < 0 || X.test(ee.value(e.options[N])) !== !0)
1961
+ do
1962
+ N = tl(N + 1, -1, F - 1);
1963
+ while (N !== p.value && (Ae.value(e.options[N]) === !0 || X.test(ee.value(e.options[N])) !== !0));
1964
+ p.value !== N && ve(() => {
1965
+ Ee(N), E(N), N >= 0 && e.useInput === !0 && e.fillInput === !0 && Je(ee.value(e.options[N]), !0);
1966
+ });
1967
+ return;
1968
+ }
1969
+ if (!(o.keyCode !== 13 && (o.keyCode !== 32 || e.useInput === !0 || _ !== "") && (o.keyCode !== 9 || g === !1))) {
1970
+ if (o.keyCode !== 9 && oe(o), p.value !== -1 && p.value < F) {
1971
+ Ce(e.options[p.value]);
1972
+ return;
1973
+ }
1974
+ if (m === !0) {
1975
+ const D = (P, X) => {
1976
+ if (X) {
1977
+ if (ll(X) !== !0)
1978
+ return;
1979
+ } else
1980
+ X = e.newValueMode;
1981
+ if (Pe("", e.multiple !== !0, !0), P == null)
1982
+ return;
1983
+ (X === "toggle" ? Ce : xt)(P, X === "add-unique"), e.multiple !== !0 && (B.value !== null && B.value.focus(), ke());
1984
+ };
1985
+ if (e.onNewValue !== void 0 ? t("newValue", b.value, D) : D(b.value), e.multiple !== !0)
1986
+ return;
1987
+ }
1988
+ u.value === !0 ? ze() : i.innerLoading.value !== !0 && Fe();
1989
+ }
1990
+ }
1991
+ function zt() {
1992
+ return y === !0 ? te.value : L.value !== null && L.value.contentEl !== null ? L.value.contentEl : void 0;
1993
+ }
1994
+ function kl() {
1995
+ return zt();
1996
+ }
1997
+ function ql() {
1998
+ return e.hideSelected === !0 ? [] : l["selected-item"] !== void 0 ? we.value.map((o) => l["selected-item"](o)).slice() : l.selected !== void 0 ? [].concat(l.selected()) : e.useChips === !0 ? we.value.map((o, m) => c(Lo, {
1999
+ key: "option-" + m,
2000
+ removable: i.editable.value === !0 && Ae.value(o.opt) !== !0,
2001
+ dense: !0,
2002
+ textColor: e.color,
2003
+ tabindex: ce.value,
2004
+ onRemove() {
2005
+ o.removeAtIndex(m);
2006
+ }
2007
+ }, () => c("span", {
2008
+ class: "ellipsis",
2009
+ [o.html === !0 ? "innerHTML" : "textContent"]: ee.value(o.opt)
2010
+ }))) : [
2011
+ c("span", {
2012
+ [Ue.value === !0 ? "innerHTML" : "textContent"]: G.value
2013
+ })
2014
+ ];
2015
+ }
2016
+ function Ft() {
2017
+ if (j.value === !0)
2018
+ return l["no-option"] !== void 0 ? l["no-option"]({ inputValue: b.value }) : void 0;
2019
+ const o = l.option !== void 0 ? l.option : (g) => c(ml, {
2020
+ key: g.index,
2021
+ ...g.itemProps
2022
+ }, () => c(
2023
+ ut,
2024
+ () => c(
2025
+ vl,
2026
+ () => c("span", {
2027
+ [g.html === !0 ? "innerHTML" : "textContent"]: g.label
2028
+ })
2029
+ )
2030
+ ));
2031
+ let m = re("div", Xe.value.map(o));
2032
+ return l["before-options"] !== void 0 && (m = l["before-options"]().concat(m)), rl(l["after-options"], m);
2033
+ }
2034
+ function Vl(o, m) {
2035
+ const g = m === !0 ? { ...We.value, ...i.splitAttrs.attributes.value } : void 0, F = {
2036
+ ref: m === !0 ? B : void 0,
2037
+ key: "i_t",
2038
+ class: A.value,
2039
+ style: e.inputStyle,
2040
+ value: b.value !== void 0 ? b.value : "",
2041
+ // required for Android in order to show ENTER key when in form
2042
+ type: "search",
2043
+ ...g,
2044
+ id: m === !0 ? i.targetUid.value : void 0,
2045
+ maxlength: e.maxlength,
2046
+ autocomplete: e.autocomplete,
2047
+ "data-autofocus": o === !0 || e.autofocus === !0 || void 0,
2048
+ disabled: e.disable === !0,
2049
+ readonly: e.readonly === !0,
2050
+ ...Sl.value
2051
+ };
2052
+ return o !== !0 && y === !0 && (Array.isArray(F.class) === !0 ? F.class = [...F.class, "no-pointer-events"] : F.class += " no-pointer-events"), c("input", F);
2053
+ }
2054
+ function It(o) {
2055
+ C !== null && (clearTimeout(C), C = null), k !== null && (clearTimeout(k), k = null), !(o && o.target && o.target.qComposing === !0) && (Je(o.target.value || ""), q = !0, $ = b.value, i.focused.value !== !0 && (y !== !0 || x.value === !0) && i.focus(), e.onFilter !== void 0 && (C = setTimeout(() => {
2056
+ C = null, Re(b.value);
2057
+ }, e.inputDebounce)));
2058
+ }
2059
+ function Je(o, m) {
2060
+ b.value !== o && (b.value = o, m === !0 || e.inputDebounce === 0 || e.inputDebounce === "0" ? t("inputValue", o) : k = setTimeout(() => {
2061
+ k = null, t("inputValue", o);
2062
+ }, e.inputDebounce));
2063
+ }
2064
+ function Pe(o, m, g) {
2065
+ q = g !== !0, e.useInput === !0 && (Je(o, !0), (m === !0 || g !== !0) && ($ = o), m !== !0 && Re(o));
2066
+ }
2067
+ function Re(o, m, g) {
2068
+ if (e.onFilter === void 0 || m !== !0 && i.focused.value !== !0)
2069
+ return;
2070
+ i.innerLoading.value === !0 ? t("filterAbort") : (i.innerLoading.value = !0, f.value = !0), o !== "" && e.multiple !== !0 && v.value.length !== 0 && q !== !0 && o === ee.value(v.value[0]) && (o = "");
2071
+ const F = setTimeout(() => {
2072
+ u.value === !0 && (u.value = !1);
2073
+ }, 10);
2074
+ S !== null && clearTimeout(S), S = F, t(
2075
+ "filter",
2076
+ o,
2077
+ (D, P) => {
2078
+ (m === !0 || i.focused.value === !0) && S === F && (clearTimeout(S), typeof D == "function" && D(), f.value = !1, ve(() => {
2079
+ i.innerLoading.value = !1, i.editable.value === !0 && (m === !0 ? u.value === !0 && ke() : u.value === !0 ? ft(!0) : u.value = !0), typeof P == "function" && ve(() => {
2080
+ P(n);
2081
+ }), typeof g == "function" && ve(() => {
2082
+ g(n);
2083
+ });
2084
+ }));
2085
+ },
2086
+ () => {
2087
+ i.focused.value === !0 && S === F && (clearTimeout(S), i.innerLoading.value = !1, f.value = !1), u.value === !0 && (u.value = !1);
2088
+ }
2089
+ );
2090
+ }
2091
+ function xl() {
2092
+ return c(po, {
2093
+ ref: L,
2094
+ class: z.value,
2095
+ style: e.popupContentStyle,
2096
+ modelValue: u.value,
2097
+ fit: e.menuShrink !== !0,
2098
+ cover: e.optionsCover === !0 && j.value !== !0 && e.useInput !== !0,
2099
+ anchor: e.menuAnchor,
2100
+ self: e.menuSelf,
2101
+ offset: e.menuOffset,
2102
+ dark: w.value,
2103
+ noParentEvent: !0,
2104
+ noRefocus: !0,
2105
+ noFocus: !0,
2106
+ noRouteDismiss: e.popupNoRouteDismiss,
2107
+ square: st.value,
2108
+ transitionShow: e.transitionShow,
2109
+ transitionHide: e.transitionHide,
2110
+ transitionDuration: e.transitionDuration,
2111
+ separateClosePopup: !0,
2112
+ ...Se.value,
2113
+ onScrollPassive: h,
2114
+ onBeforeShow: Ot,
2115
+ onBeforeHide: _l,
2116
+ onShow: Bl
2117
+ }, Ft);
2118
+ }
2119
+ function _l(o) {
2120
+ Mt(o), ze();
2121
+ }
2122
+ function Bl() {
2123
+ se();
2124
+ }
2125
+ function Al(o) {
2126
+ Me(o), B.value !== null && B.value.focus(), x.value = !0, window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, 0);
2127
+ }
2128
+ function El(o) {
2129
+ Me(o), ve(() => {
2130
+ x.value = !1;
2131
+ });
2132
+ }
2133
+ function Rl() {
2134
+ const o = [
2135
+ c(Oo, {
2136
+ class: `col-auto ${i.fieldClass.value}`,
2137
+ ...R.value,
2138
+ for: i.targetUid.value,
2139
+ dark: w.value,
2140
+ square: !0,
2141
+ loading: f.value,
2142
+ itemAligned: !1,
2143
+ filled: !0,
2144
+ stackLabel: b.value.length !== 0,
2145
+ ...i.splitAttrs.listeners.value,
2146
+ onFocus: Al,
2147
+ onBlur: El
2148
+ }, {
2149
+ ...l,
2150
+ rawControl: () => i.getControl(!0),
2151
+ before: void 0,
2152
+ after: void 0
2153
+ })
2154
+ ];
2155
+ return u.value === !0 && o.push(
2156
+ c("div", {
2157
+ ref: te,
2158
+ class: z.value + " scroll",
2159
+ style: e.popupContentStyle,
2160
+ ...Se.value,
2161
+ onClick: he,
2162
+ onScrollPassive: h
2163
+ }, Ft())
2164
+ ), c(No, {
2165
+ ref: H,
2166
+ modelValue: a.value,
2167
+ position: e.useInput === !0 ? "top" : void 0,
2168
+ transitionShow: K,
2169
+ transitionHide: e.transitionHide,
2170
+ transitionDuration: e.transitionDuration,
2171
+ noRouteDismiss: e.popupNoRouteDismiss,
2172
+ onBeforeShow: Ot,
2173
+ onBeforeHide: zl,
2174
+ onHide: Fl,
2175
+ onShow: Il
2176
+ }, () => c("div", {
2177
+ class: "q-select__dialog" + (w.value === !0 ? " q-select__dialog--dark q-dark" : "") + (x.value === !0 ? " q-select__dialog--focused" : "")
2178
+ }, o));
2179
+ }
2180
+ function zl(o) {
2181
+ Mt(o), H.value !== null && H.value.__updateRefocusTarget(
2182
+ i.rootRef.value.querySelector(".q-field__native > [tabindex]:last-child")
2183
+ ), i.focused.value = !1;
2184
+ }
2185
+ function Fl(o) {
2186
+ ke(), i.focused.value === !1 && t("blur", o), Ie();
2187
+ }
2188
+ function Il() {
2189
+ const o = document.activeElement;
2190
+ (o === null || o.id !== i.targetUid.value) && B.value !== null && B.value !== o && B.value.focus(), se();
2191
+ }
2192
+ function ze() {
2193
+ a.value !== !0 && (p.value = -1, u.value === !0 && (u.value = !1), i.focused.value === !1 && (S !== null && (clearTimeout(S), S = null), i.innerLoading.value === !0 && (t("filterAbort"), i.innerLoading.value = !1, f.value = !1)));
2194
+ }
2195
+ function Fe(o) {
2196
+ i.editable.value === !0 && (y === !0 ? (i.onControlFocusin(o), a.value = !0, ve(() => {
2197
+ i.focus();
2198
+ })) : i.focus(), e.onFilter !== void 0 ? Re(b.value) : (j.value !== !0 || l["no-option"] !== void 0) && (u.value = !0));
2199
+ }
2200
+ function ke() {
2201
+ a.value = !1, ze();
2202
+ }
2203
+ function Ie() {
2204
+ e.useInput === !0 && Pe(
2205
+ e.multiple !== !0 && e.fillInput === !0 && v.value.length !== 0 && ee.value(v.value[0]) || "",
2206
+ !0,
2207
+ !0
2208
+ );
2209
+ }
2210
+ function ft(o) {
2211
+ let m = -1;
2212
+ if (o === !0) {
2213
+ if (v.value.length !== 0) {
2214
+ const g = de.value(v.value[0]);
2215
+ m = e.options.findIndex((F) => pe(de.value(F), g));
2216
+ }
2217
+ Q(m);
2218
+ }
2219
+ Ee(m);
2220
+ }
2221
+ function Tl(o, m) {
2222
+ u.value === !0 && i.innerLoading.value === !1 && (Q(-1, !0), ve(() => {
2223
+ u.value === !0 && i.innerLoading.value === !1 && (o > m ? Q() : ft(!0));
2224
+ }));
2225
+ }
2226
+ function Tt() {
2227
+ a.value === !1 && L.value !== null && L.value.updatePosition();
2228
+ }
2229
+ function Ot(o) {
2230
+ o !== void 0 && Me(o), t("popupShow", o), i.hasPopupOpen = !0, i.onControlFocusin(o);
2231
+ }
2232
+ function Mt(o) {
2233
+ o !== void 0 && Me(o), t("popupHide", o), i.hasPopupOpen = !1, i.onControlFocusout(o);
2234
+ }
2235
+ function Lt() {
2236
+ y = d.platform.is.mobile !== !0 && e.behavior !== "dialog" ? !1 : e.behavior !== "menu" && (e.useInput === !0 ? l["no-option"] !== void 0 || e.onFilter !== void 0 || j.value === !1 : !0), K = d.platform.is.ios === !0 && y === !0 && e.useInput === !0 ? "fade" : e.transitionShow;
2237
+ }
2238
+ return ol(Lt), Ll(Tt), Lt(), Be(() => {
2239
+ C !== null && clearTimeout(C), k !== null && clearTimeout(k);
2240
+ }), Object.assign(n, {
2241
+ showPopup: Fe,
2242
+ hidePopup: ke,
2243
+ removeAtIndex: ct,
2244
+ add: xt,
2245
+ toggleOption: Ce,
2246
+ getOptionIndex: () => p.value,
2247
+ setOptionIndex: Ee,
2248
+ moveOptionSelection: Ze,
2249
+ filter: Re,
2250
+ updateMenuPosition: Tt,
2251
+ updateInputValue: Pe,
2252
+ isOptionSelected: dt,
2253
+ getEmittingOptionValue: Vt,
2254
+ isOptionDisabled: (...o) => Ae.value.apply(null, o) === !0,
2255
+ getOptionValue: (...o) => de.value.apply(null, o),
2256
+ getOptionLabel: (...o) => ee.value.apply(null, o)
2257
+ }), Object.assign(i, {
2258
+ innerValue: v,
2259
+ fieldClass: r(
2260
+ () => `q-select q-field--auto-height q-select--with${e.useInput !== !0 ? "out" : ""}-input q-select--with${e.useChips !== !0 ? "out" : ""}-chips q-select--${e.multiple === !0 ? "multiple" : "single"}`
2261
+ ),
2262
+ inputRef: Y,
2263
+ targetRef: B,
2264
+ hasValue: O,
2265
+ showPopup: Fe,
2266
+ floatingLabel: r(
2267
+ () => e.hideSelected !== !0 && O.value === !0 || typeof b.value == "number" || b.value.length !== 0 || kt(e.displayValue)
2268
+ ),
2269
+ getControlChild: () => {
2270
+ if (i.editable.value !== !1 && (a.value === !0 || j.value !== !0 || l["no-option"] !== void 0))
2271
+ return y === !0 ? Rl() : xl();
2272
+ i.hasPopupOpen === !0 && (i.hasPopupOpen = !1);
2273
+ },
2274
+ controlEvents: {
2275
+ onFocusin(o) {
2276
+ i.onControlFocusin(o);
2277
+ },
2278
+ onFocusout(o) {
2279
+ i.onControlFocusout(o, () => {
2280
+ Ie(), ze();
2281
+ });
2282
+ },
2283
+ onClick(o) {
2284
+ if (he(o), y !== !0 && u.value === !0) {
2285
+ ze(), B.value !== null && B.value.focus();
2286
+ return;
2287
+ }
2288
+ Fe(o);
2289
+ }
2290
+ },
2291
+ getControl: (o) => {
2292
+ const m = ql(), g = o === !0 || a.value !== !0 || y !== !0;
2293
+ if (e.useInput === !0)
2294
+ m.push(Vl(o, g));
2295
+ else if (i.editable.value === !0) {
2296
+ const D = g === !0 ? We.value : void 0;
2297
+ m.push(
2298
+ c("input", {
2299
+ ref: g === !0 ? B : void 0,
2300
+ key: "d_t",
2301
+ class: "q-select__focus-target",
2302
+ id: g === !0 ? i.targetUid.value : void 0,
2303
+ value: G.value,
2304
+ readonly: !0,
2305
+ "data-autofocus": o === !0 || e.autofocus === !0 || void 0,
2306
+ ...D,
2307
+ onKeydown: Rt,
2308
+ onKeyup: Bt,
2309
+ onKeypress: Et
2310
+ })
2311
+ ), g === !0 && typeof e.autocomplete == "string" && e.autocomplete.length !== 0 && m.push(
2312
+ c("input", {
2313
+ class: "q-select__autocomplete-input",
2314
+ autocomplete: e.autocomplete,
2315
+ tabindex: -1,
2316
+ onKeyup: At
2317
+ })
2318
+ );
2319
+ }
2320
+ if (U.value !== void 0 && e.disable !== !0 && Ye.value.length !== 0) {
2321
+ const D = Ye.value.map((P) => c("option", { value: P, selected: !0 }));
2322
+ m.push(
2323
+ c("select", {
2324
+ class: "hidden",
2325
+ name: U.value,
2326
+ multiple: e.multiple
2327
+ }, D)
2328
+ );
2329
+ }
2330
+ const F = e.useInput === !0 || g !== !0 ? void 0 : i.splitAttrs.attributes.value;
2331
+ return c("div", {
2332
+ class: "q-field__native row items-center",
2333
+ ...F,
2334
+ ...i.splitAttrs.listeners.value
2335
+ }, m);
2336
+ },
2337
+ getInnerAppend: () => e.loading !== !0 && f.value !== !0 && e.hideDropdownIcon !== !0 ? [
2338
+ c(_e, {
2339
+ class: "q-select__dropdown-icon" + (u.value === !0 ? " rotate-180" : ""),
2340
+ name: $e.value
2341
+ })
2342
+ ] : null
2343
+ }), bl(i);
2344
+ }
2345
+ }), nn = { class: "app-select__amount" }, un = /* @__PURE__ */ $l({
2346
+ __name: "AppSelect",
2347
+ props: {
2348
+ modelValue: {},
2349
+ size: { default: eo.MD },
2350
+ options: {},
2351
+ multiple: { type: Boolean },
2352
+ label: {},
2353
+ placeholder: {},
2354
+ required: { type: Boolean },
2355
+ clearable: { type: Boolean },
2356
+ disabled: { type: Boolean },
2357
+ loading: { type: Boolean },
2358
+ filtering: { type: Boolean },
2359
+ autofocus: { type: Boolean },
2360
+ rules: {},
2361
+ lazyRules: { type: [Boolean, String] },
2362
+ menuClass: {}
2363
+ },
2364
+ emits: ["update:modelValue"],
2365
+ setup(e, { emit: l }) {
2366
+ const t = e, n = l, d = I(!1), u = I(""), a = r({
2367
+ get() {
2368
+ if (t.modelValue) {
2369
+ if (t.multiple && Array.isArray(t.modelValue))
2370
+ return t.options.filter(
2371
+ (s) => t.modelValue.includes(s.value)
2372
+ );
2373
+ if (!Array.isArray(t.modelValue))
2374
+ return t.options.find(
2375
+ (s) => s.value === t.modelValue
2376
+ );
2377
+ }
2378
+ },
2379
+ set(s) {
2380
+ if (!s) {
2381
+ n("update:modelValue", void 0);
2382
+ return;
2383
+ }
2384
+ if (t.multiple && Array.isArray(s)) {
2385
+ const y = s.map((q) => q.value);
2386
+ n("update:modelValue", y);
2387
+ } else Array.isArray(s) || n("update:modelValue", s.value);
2388
+ }
2389
+ }), p = r(() => {
2390
+ var s;
2391
+ if (Array.isArray(a.value)) {
2392
+ if (t.multiple && a.value.length == 0)
2393
+ return t.placeholder;
2394
+ } else return ((s = a.value) == null ? void 0 : s.label) || t.placeholder || "";
2395
+ return "";
2396
+ }), b = r(() => !(!t.clearable || !t.modelValue || t.modelValue && Array.isArray(t.modelValue) && !t.modelValue.length)), x = r(() => u.value ? t.options.filter(
2397
+ (s) => s.label.toLowerCase().includes(u.value.toLowerCase())
2398
+ ) : t.options), f = r(() => {
2399
+ if (t.rules)
2400
+ return t.required ? [...t.rules, Dt] : t.rules;
2401
+ if (t.required)
2402
+ return [Dt];
2403
+ }), C = () => {
2404
+ a.value = void 0;
2405
+ }, k = (s, y) => {
2406
+ y(() => {
2407
+ u.value = s;
2408
+ });
2409
+ };
2410
+ return (s, y) => (ue(), fe("div", {
2411
+ class: Ge(["app-select", [{ "app-select_opened": d.value }, `app-select_${s.size}`]])
2412
+ }, [
2413
+ s.label ? (ue(), fe("label", {
2414
+ key: 0,
2415
+ class: Ge(["app-select__label", { "app-select__label_bold": s.required }])
2416
+ }, De(s.required ? `${s.label} *` : s.label), 3)) : Oe("", !0),
2417
+ je(Hl(on), {
2418
+ standout: "",
2419
+ "hide-bottom-space": "",
2420
+ "hide-dropdown-icon": "",
2421
+ "no-error-icon": "",
2422
+ behavior: "menu",
2423
+ "popup-no-route-dismiss": "",
2424
+ "popup-content-class": `app-select-menu app-select-menu_${s.size} ${s.menuClass}`,
2425
+ placeholder: s.filtering && "Почніть вводити",
2426
+ "input-debounce": "50",
2427
+ modelValue: a.value,
2428
+ "onUpdate:modelValue": y[0] || (y[0] = (q) => a.value = q),
2429
+ options: x.value,
2430
+ multiple: s.multiple,
2431
+ "use-input": s.filtering && (Array.isArray(a.value) || !a.value),
2432
+ rules: f.value,
2433
+ "lazy-rules": s.lazyRules,
2434
+ autofocus: s.autofocus,
2435
+ disable: s.disabled,
2436
+ loading: s.loading,
2437
+ onFilter: k,
2438
+ onPopupShow: y[1] || (y[1] = (q) => d.value = !0),
2439
+ onPopupHide: y[2] || (y[2] = (q) => d.value = !1)
2440
+ }, {
2441
+ append: ge(() => [
2442
+ b.value ? (ue(), fe("i", {
2443
+ key: 0,
2444
+ class: "icon-kl icon-kl-circle-close app-select__clear",
2445
+ onClick: Dl(C, ["stop", "prevent"])
2446
+ })) : Oe("", !0),
2447
+ y[3] || (y[3] = mt("i", { class: "icon-kl icon-kl-arrow-down app-select__drop-icon" }, null, -1))
2448
+ ]),
2449
+ selected: ge(() => {
2450
+ var q, S;
2451
+ return [
2452
+ Array.isArray(a.value) ? (ue(), fe(et, { key: 0 }, [
2453
+ !s.filtering || a.value.length ? (ue(), fe("span", {
2454
+ key: 0,
2455
+ class: Ge([
2456
+ "app-select__selected",
2457
+ {
2458
+ "app-select__placeholder": !((q = a.value) != null && q.length) && s.placeholder
2459
+ }
2460
+ ])
2461
+ }, [
2462
+ (S = a.value) != null && S.length ? (ue(), fe(et, { key: 0 }, [
2463
+ y[4] || (y[4] = gt(" Вибрано ")),
2464
+ mt("span", nn, De(a.value.length), 1)
2465
+ ], 64)) : (ue(), fe(et, { key: 1 }, [
2466
+ gt(De(t.placeholder), 1)
2467
+ ], 64))
2468
+ ], 2)) : Oe("", !0)
2469
+ ], 64)) : (ue(), fe(et, { key: 1 }, [
2470
+ !s.filtering || a.value ? (ue(), fe("span", {
2471
+ key: 0,
2472
+ class: Ge([
2473
+ "app-select__selected",
2474
+ { "app-select__placeholder": !a.value && s.placeholder }
2475
+ ])
2476
+ }, De(p.value), 3)) : Oe("", !0)
2477
+ ], 64))
2478
+ ];
2479
+ }),
2480
+ option: ge((q) => [
2481
+ je(ml, Pl({
2482
+ class: ["app-select__option", { "app-select__option_selected": q.selected }]
2483
+ }, q.itemProps), {
2484
+ default: ge(() => [
2485
+ t.multiple ? (ue(), $t(ut, {
2486
+ key: 0,
2487
+ class: "option-multiple",
2488
+ avatar: ""
2489
+ }, {
2490
+ default: ge(() => [
2491
+ je(Bo, {
2492
+ size: "30px",
2493
+ "model-value": q.selected,
2494
+ "onUpdate:modelValue": () => q.toggleOption(q.opt)
2495
+ }, null, 8, ["model-value", "onUpdate:modelValue"])
2496
+ ]),
2497
+ _: 2
2498
+ }, 1024)) : Oe("", !0),
2499
+ q.opt.done ? (ue(), $t(ut, {
2500
+ key: 1,
2501
+ class: "option-done",
2502
+ avatar: ""
2503
+ }, {
2504
+ default: ge(() => y[5] || (y[5] = [
2505
+ mt("i", { class: "icon-kl icon-kl-check option-done__icon" }, null, -1)
2506
+ ])),
2507
+ _: 1
2508
+ })) : Oe("", !0),
2509
+ je(ut, null, {
2510
+ default: ge(() => [
2511
+ je(vl, null, {
2512
+ default: ge(() => [
2513
+ gt(De(q.opt.label), 1)
2514
+ ]),
2515
+ _: 2
2516
+ }, 1024)
2517
+ ]),
2518
+ _: 2
2519
+ }, 1024)
2520
+ ]),
2521
+ _: 2
2522
+ }, 1040, ["class"])
2523
+ ]),
2524
+ _: 1
2525
+ }, 8, ["popup-content-class", "placeholder", "modelValue", "options", "multiple", "use-input", "rules", "lazy-rules", "autofocus", "disable", "loading"])
2526
+ ], 2));
2527
+ }
2528
+ }), dn = /* @__PURE__ */ to(un, [["__scopeId", "data-v-3977036d"]]);
2529
+ export {
2530
+ dn as default
2531
+ };