@validol4ik/uikit 0.3.10 → 0.3.12

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.
package/dist/uikit.es.js CHANGED
@@ -1,70 +1,86 @@
1
- import { computed as c, markRaw as he, defineComponent as U, getCurrentInstance as ae, h as v, ref as W, onBeforeUnmount as Be, Transition as Re, withDirectives as Me, openBlock as I, createBlock as ye, unref as V, normalizeClass as Y, withCtx as Oe, createElementBlock as H, createCommentVNode as Z, renderSlot as Te, Fragment as je, createTextVNode as ze, toDisplayString as Ie, normalizeStyle as De, defineAsyncComponent as Ne, reactive as Ae, mergeProps as Ke, withModifiers as Fe } from "vue";
2
- const ke = {
1
+ import { computed as d, markRaw as fn, defineComponent as mt, h, withDirectives as vn, getCurrentInstance as ne, unref as Je, ref as P, onBeforeUnmount as me, Transition as dt, openBlock as ue, createBlock as $t, normalizeClass as Ve, withCtx as xe, createElementBlock as de, createCommentVNode as Ce, renderSlot as yo, Fragment as rt, createTextVNode as Vt, toDisplayString as Ze, normalizeStyle as wo, toRaw as Ue, reactive as So, onMounted as gt, watch as Z, onBeforeUpdate as mn, inject as ko, nextTick as fe, onDeactivated as Pt, onActivated as gn, onUnmounted as xo, Teleport as Co, onBeforeMount as qo, onUpdated as _o, createVNode as it, mergeProps as hn, createElementVNode as Wt, withModifiers as pn } from "vue";
2
+ const bn = {
3
3
  PRIMARY: "primary",
4
4
  INFO: "info"
5
- }, L = {
5
+ }, qe = {
6
6
  SM: "sm",
7
7
  MD: "md",
8
8
  LG: "lg"
9
- }, Ve = {
10
- [L.SM]: "3px 9px",
11
- [L.MD]: "5px 12px",
12
- [L.LG]: "9px 20px"
13
- }, te = {
9
+ }, Eo = {
10
+ [qe.SM]: "3px 9px",
11
+ [qe.MD]: "5px 12px",
12
+ [qe.LG]: "9px 20px"
13
+ }, nl = {
14
14
  xs: 18,
15
15
  sm: 24,
16
16
  md: 32,
17
17
  lg: 38,
18
18
  xl: 46
19
- }, we = {
19
+ }, zt = {
20
20
  size: String
21
21
  };
22
- function xe(e, t = te) {
23
- return c(() => e.size !== void 0 ? { fontSize: e.size in t ? `${t[e.size]}px` : e.size } : null);
22
+ function It(e, t = nl) {
23
+ return d(() => e.size !== void 0 ? { fontSize: e.size in t ? `${t[e.size]}px` : e.size } : null);
24
24
  }
25
- function Ye(e, t, a, o) {
25
+ function dl(e, t, l, n) {
26
26
  return Object.defineProperty(e, t, {
27
- get: a,
28
- set: o,
27
+ get: l,
28
+ set: n,
29
29
  enumerable: !0
30
30
  }), e;
31
31
  }
32
- function ie(e) {
33
- return he(U(e));
32
+ function ge(e) {
33
+ return fn(mt(e));
34
34
  }
35
- function He(e) {
36
- return he(e);
35
+ function Bo(e) {
36
+ return fn(e);
37
37
  }
38
- function We(e, t) {
38
+ function ke(e, t) {
39
39
  return e !== void 0 && e() || t;
40
40
  }
41
- function A(e, t) {
41
+ function Vo(e, t) {
42
+ if (e !== void 0) {
43
+ const l = e();
44
+ if (l != null)
45
+ return l.slice();
46
+ }
47
+ return t;
48
+ }
49
+ function Ae(e, t) {
42
50
  return e !== void 0 ? t.concat(e()) : t;
43
51
  }
44
- const re = "0 0 24 24", le = (e) => e, J = (e) => `ionicons ${e}`, Ce = {
52
+ function To(e, t) {
53
+ return e === void 0 ? t : t !== void 0 ? t.concat(e()) : e();
54
+ }
55
+ function $o(e, t, l, n, o, u) {
56
+ t.key = n + o;
57
+ const a = h(e, t, l);
58
+ return o === !0 ? vn(a, u()) : a;
59
+ }
60
+ const Tl = "0 0 24 24", $l = (e) => e, Kt = (e) => `ionicons ${e}`, yn = {
45
61
  "mdi-": (e) => `mdi ${e}`,
46
- "icon-": le,
62
+ "icon-": $l,
47
63
  // fontawesome equiv
48
64
  "bt-": (e) => `bt ${e}`,
49
65
  "eva-": (e) => `eva ${e}`,
50
- "ion-md": J,
51
- "ion-ios": J,
52
- "ion-logo": J,
53
- "iconfont ": le,
66
+ "ion-md": Kt,
67
+ "ion-ios": Kt,
68
+ "ion-logo": Kt,
69
+ "iconfont ": $l,
54
70
  "ti-": (e) => `themify-icon ${e}`,
55
71
  "bi-": (e) => `bootstrap-icons ${e}`
56
- }, _e = {
72
+ }, wn = {
57
73
  o_: "-outlined",
58
74
  r_: "-round",
59
75
  s_: "-sharp"
60
- }, $e = {
76
+ }, Sn = {
61
77
  sym_o_: "-outlined",
62
78
  sym_r_: "-rounded",
63
79
  sym_s_: "-sharp"
64
- }, Qe = new RegExp("^(" + Object.keys(Ce).join("|") + ")"), Ge = new RegExp("^(" + Object.keys(_e).join("|") + ")"), se = new RegExp("^(" + Object.keys($e).join("|") + ")"), Ue = /^[Mm]\s?[-+]?\.?\d/, Xe = /^img:/, Ze = /^svguse:/, Je = /^ion-/, et = /^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /, ue = ie({
80
+ }, Ro = new RegExp("^(" + Object.keys(yn).join("|") + ")"), Lo = new RegExp("^(" + Object.keys(wn).join("|") + ")"), Rl = new RegExp("^(" + Object.keys(Sn).join("|") + ")"), Mo = /^[Mm]\s?[-+]?\.?\d/, Ao = /^img:/, Oo = /^svguse:/, Po = /^ion-/, zo = /^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /, _e = ge({
65
81
  name: "QIcon",
66
82
  props: {
67
- ...we,
83
+ ...zt,
68
84
  tag: {
69
85
  type: String,
70
86
  default: "i"
@@ -75,127 +91,127 @@ const re = "0 0 24 24", le = (e) => e, J = (e) => `ionicons ${e}`, Ce = {
75
91
  right: Boolean
76
92
  },
77
93
  setup(e, { slots: t }) {
78
- const { proxy: { $q: a } } = ae(), o = xe(e), n = c(
94
+ const { proxy: { $q: l } } = ne(), n = It(e), o = d(
79
95
  () => "q-icon" + (e.left === !0 ? " on-left" : "") + (e.right === !0 ? " on-right" : "") + (e.color !== void 0 ? ` text-${e.color}` : "")
80
- ), s = c(() => {
81
- let u, r = e.name;
96
+ ), u = d(() => {
97
+ let a, r = e.name;
82
98
  if (r === "none" || !r)
83
99
  return { none: !0 };
84
- if (a.iconMapFn !== null) {
85
- const d = a.iconMapFn(r);
86
- if (d !== void 0)
87
- if (d.icon !== void 0) {
88
- if (r = d.icon, r === "none" || !r)
100
+ if (l.iconMapFn !== null) {
101
+ const s = l.iconMapFn(r);
102
+ if (s !== void 0)
103
+ if (s.icon !== void 0) {
104
+ if (r = s.icon, r === "none" || !r)
89
105
  return { none: !0 };
90
106
  } else
91
107
  return {
92
- cls: d.cls,
93
- content: d.content !== void 0 ? d.content : " "
108
+ cls: s.cls,
109
+ content: s.content !== void 0 ? s.content : " "
94
110
  };
95
111
  }
96
- if (Ue.test(r) === !0) {
97
- const [d, h = re] = r.split("|");
112
+ if (Mo.test(r) === !0) {
113
+ const [s, y = Tl] = r.split("|");
98
114
  return {
99
115
  svg: !0,
100
- viewBox: h,
101
- nodes: d.split("&&").map((l) => {
102
- const [y, b, k] = l.split("@@");
103
- return v("path", { style: b, d: y, transform: k });
116
+ viewBox: y,
117
+ nodes: s.split("&&").map((v) => {
118
+ const [c, m, C] = v.split("@@");
119
+ return h("path", { style: m, d: c, transform: C });
104
120
  })
105
121
  };
106
122
  }
107
- if (Xe.test(r) === !0)
123
+ if (Ao.test(r) === !0)
108
124
  return {
109
125
  img: !0,
110
126
  src: r.substring(4)
111
127
  };
112
- if (Ze.test(r) === !0) {
113
- const [d, h = re] = r.split("|");
128
+ if (Oo.test(r) === !0) {
129
+ const [s, y = Tl] = r.split("|");
114
130
  return {
115
131
  svguse: !0,
116
- src: d.substring(7),
117
- viewBox: h
132
+ src: s.substring(7),
133
+ viewBox: y
118
134
  };
119
135
  }
120
- let x = " ";
121
- const g = r.match(Qe);
122
- if (g !== null)
123
- u = Ce[g[1]](r);
124
- else if (et.test(r) === !0)
125
- u = r;
126
- else if (Je.test(r) === !0)
127
- u = `ionicons ion-${a.platform.is.ios === !0 ? "ios" : "md"}${r.substring(3)}`;
128
- else if (se.test(r) === !0) {
129
- u = "notranslate material-symbols";
130
- const d = r.match(se);
131
- d !== null && (r = r.substring(6), u += $e[d[1]]), x = r;
136
+ let g = " ";
137
+ const b = r.match(Ro);
138
+ if (b !== null)
139
+ a = yn[b[1]](r);
140
+ else if (zo.test(r) === !0)
141
+ a = r;
142
+ else if (Po.test(r) === !0)
143
+ a = `ionicons ion-${l.platform.is.ios === !0 ? "ios" : "md"}${r.substring(3)}`;
144
+ else if (Rl.test(r) === !0) {
145
+ a = "notranslate material-symbols";
146
+ const s = r.match(Rl);
147
+ s !== null && (r = r.substring(6), a += Sn[s[1]]), g = r;
132
148
  } else {
133
- u = "notranslate material-icons";
134
- const d = r.match(Ge);
135
- d !== null && (r = r.substring(2), u += _e[d[1]]), x = r;
149
+ a = "notranslate material-icons";
150
+ const s = r.match(Lo);
151
+ s !== null && (r = r.substring(2), a += wn[s[1]]), g = r;
136
152
  }
137
153
  return {
138
- cls: u,
139
- content: x
154
+ cls: a,
155
+ content: g
140
156
  };
141
157
  });
142
158
  return () => {
143
- const u = {
144
- class: n.value,
145
- style: o.value,
159
+ const a = {
160
+ class: o.value,
161
+ style: n.value,
146
162
  "aria-hidden": "true",
147
163
  role: "presentation"
148
164
  };
149
- return s.value.none === !0 ? v(e.tag, u, We(t.default)) : s.value.img === !0 ? v(e.tag, u, A(t.default, [
150
- v("img", { src: s.value.src })
151
- ])) : s.value.svg === !0 ? v(e.tag, u, A(t.default, [
152
- v("svg", {
153
- viewBox: s.value.viewBox || "0 0 24 24"
154
- }, s.value.nodes)
155
- ])) : s.value.svguse === !0 ? v(e.tag, u, A(t.default, [
156
- v("svg", {
157
- viewBox: s.value.viewBox
165
+ return u.value.none === !0 ? h(e.tag, a, ke(t.default)) : u.value.img === !0 ? h(e.tag, a, Ae(t.default, [
166
+ h("img", { src: u.value.src })
167
+ ])) : u.value.svg === !0 ? h(e.tag, a, Ae(t.default, [
168
+ h("svg", {
169
+ viewBox: u.value.viewBox || "0 0 24 24"
170
+ }, u.value.nodes)
171
+ ])) : u.value.svguse === !0 ? h(e.tag, a, Ae(t.default, [
172
+ h("svg", {
173
+ viewBox: u.value.viewBox
158
174
  }, [
159
- v("use", { "xlink:href": s.value.src })
175
+ h("use", { "xlink:href": u.value.src })
160
176
  ])
161
- ])) : (s.value.cls !== void 0 && (u.class += " " + s.value.cls), v(e.tag, u, A(t.default, [
162
- s.value.content
177
+ ])) : (u.value.cls !== void 0 && (a.class += " " + u.value.cls), h(e.tag, a, Ae(t.default, [
178
+ u.value.content
163
179
  ])));
164
180
  };
165
181
  }
166
- }), tt = {
182
+ }), Io = {
167
183
  size: {
168
184
  type: [String, Number],
169
185
  default: "1em"
170
186
  },
171
187
  color: String
172
188
  };
173
- function nt(e) {
189
+ function Fo(e) {
174
190
  return {
175
- cSize: c(() => e.size in te ? `${te[e.size]}px` : e.size),
176
- classes: c(
191
+ cSize: d(() => e.size in nl ? `${nl[e.size]}px` : e.size),
192
+ classes: d(
177
193
  () => "q-spinner" + (e.color ? ` text-${e.color}` : "")
178
194
  )
179
195
  };
180
196
  }
181
- const ot = ie({
197
+ const kn = ge({
182
198
  name: "QSpinner",
183
199
  props: {
184
- ...tt,
200
+ ...Io,
185
201
  thickness: {
186
202
  type: Number,
187
203
  default: 5
188
204
  }
189
205
  },
190
206
  setup(e) {
191
- const { cSize: t, classes: a } = nt(e);
192
- return () => v("svg", {
193
- class: a.value + " q-spinner-mat",
207
+ const { cSize: t, classes: l } = Fo(e);
208
+ return () => h("svg", {
209
+ class: l.value + " q-spinner-mat",
194
210
  width: t.value,
195
211
  height: t.value,
196
212
  viewBox: "25 25 50 50"
197
213
  }, [
198
- v("circle", {
214
+ h("circle", {
199
215
  class: "path",
200
216
  cx: "50",
201
217
  cy: "50",
@@ -208,12 +224,33 @@ const ot = ie({
208
224
  ]);
209
225
  }
210
226
  });
211
- function at(e, t) {
212
- const a = e.style;
213
- for (const o in t)
214
- a[o] = t[o];
227
+ function ol(e, t) {
228
+ const l = e.style;
229
+ for (const n in t)
230
+ l[n] = t[n];
231
+ }
232
+ function Ho(e) {
233
+ if (e == null)
234
+ return;
235
+ if (typeof e == "string")
236
+ try {
237
+ return document.querySelector(e) || void 0;
238
+ } catch {
239
+ return;
240
+ }
241
+ const t = Je(e);
242
+ if (t)
243
+ return t.$el || t;
215
244
  }
216
- const X = {
245
+ function xn(e, t) {
246
+ if (e == null || e.contains(t) === !0)
247
+ return !0;
248
+ for (let l = e.nextElementSibling; l !== null; l = l.nextElementSibling)
249
+ if (l.contains(t))
250
+ return !0;
251
+ return !1;
252
+ }
253
+ const re = {
217
254
  hasPassive: !1,
218
255
  passiveCapture: !0,
219
256
  notPassiveCapture: !0
@@ -221,7 +258,7 @@ const X = {
221
258
  try {
222
259
  const e = Object.defineProperty({}, "passive", {
223
260
  get() {
224
- Object.assign(X, {
261
+ Object.assign(re, {
225
262
  hasPassive: !0,
226
263
  passive: { passive: !0 },
227
264
  notPassive: { passive: !1 },
@@ -233,101 +270,116 @@ try {
233
270
  window.addEventListener("qtest", null, e), window.removeEventListener("qtest", null, e);
234
271
  } catch {
235
272
  }
236
- function it(e) {
273
+ function Do() {
274
+ }
275
+ function Cn(e) {
237
276
  return e.touches && e.touches[0] ? e = e.touches[0] : e.changedTouches && e.changedTouches[0] ? e = e.changedTouches[0] : e.targetTouches && e.targetTouches[0] && (e = e.targetTouches[0]), {
238
277
  top: e.clientY,
239
278
  left: e.clientX
240
279
  };
241
280
  }
242
- function Se(e) {
281
+ function jo(e) {
282
+ if (e.path)
283
+ return e.path;
284
+ if (e.composedPath)
285
+ return e.composedPath();
286
+ const t = [];
287
+ let l = e.target;
288
+ for (; l; ) {
289
+ if (t.push(l), l.tagName === "HTML")
290
+ return t.push(document), t.push(window), t;
291
+ l = l.parentElement;
292
+ }
293
+ }
294
+ function Ee(e) {
243
295
  e.stopPropagation();
244
296
  }
245
- function rt(e) {
297
+ function be(e) {
246
298
  e.cancelable !== !1 && e.preventDefault();
247
299
  }
248
- function O(e) {
300
+ function le(e) {
249
301
  e.cancelable !== !1 && e.preventDefault(), e.stopPropagation();
250
302
  }
251
- function lt(e, t, a) {
252
- const o = `__q_${t}_evt`;
253
- e[o] = e[o] !== void 0 ? e[o].concat(a) : a, a.forEach((n) => {
254
- n[0].addEventListener(n[1], e[n[2]], X[n[3]]);
303
+ function il(e, t, l) {
304
+ const n = `__q_${t}_evt`;
305
+ e[n] = e[n] !== void 0 ? e[n].concat(l) : l, l.forEach((o) => {
306
+ o[0].addEventListener(o[1], e[o[2]], re[o[3]]);
255
307
  });
256
308
  }
257
- function st(e, t) {
258
- const a = `__q_${t}_evt`;
259
- e[a] !== void 0 && (e[a].forEach((o) => {
260
- o[0].removeEventListener(o[1], e[o[2]], X[o[3]]);
261
- }), e[a] = void 0);
309
+ function qn(e, t) {
310
+ const l = `__q_${t}_evt`;
311
+ e[l] !== void 0 && (e[l].forEach((n) => {
312
+ n[0].removeEventListener(n[1], e[n[2]], re[n[3]]);
313
+ }), e[l] = void 0);
262
314
  }
263
- function ut(e) {
315
+ function _n(e) {
264
316
  return e !== Object(e) || e.isComposing === !0 || e.qKeyEvent === !0;
265
317
  }
266
- function ne(e, t) {
267
- return ut(e) === !0 ? !1 : [].concat(t).includes(e.keyCode);
318
+ function Fe(e, t) {
319
+ return _n(e) === !0 ? !1 : [].concat(t).includes(e.keyCode);
268
320
  }
269
- function ct(e, t = 250) {
270
- let a = !1, o;
321
+ function No(e, t = 250) {
322
+ let l = !1, n;
271
323
  return function() {
272
- return a === !1 && (a = !0, setTimeout(() => {
273
- a = !1;
274
- }, t), o = e.apply(this, arguments)), o;
324
+ return l === !1 && (l = !0, setTimeout(() => {
325
+ l = !1;
326
+ }, t), n = e.apply(this, arguments)), n;
275
327
  };
276
328
  }
277
- function ce(e, t, a, o) {
278
- a.modifiers.stop === !0 && Se(e);
279
- const n = a.modifiers.color;
280
- let s = a.modifiers.center;
281
- s = s === !0 || o === !0;
282
- const u = document.createElement("span"), r = document.createElement("span"), x = it(e), { left: g, top: d, width: h, height: l } = t.getBoundingClientRect(), y = Math.sqrt(h * h + l * l), b = y / 2, k = `${(h - y) / 2}px`, f = s ? k : `${x.left - g - b}px`, w = `${(l - y) / 2}px`, M = s ? w : `${x.top - d - b}px`;
283
- r.className = "q-ripple__inner", at(r, {
284
- height: `${y}px`,
285
- width: `${y}px`,
286
- transform: `translate3d(${f},${M},0) scale3d(.2,.2,1)`,
329
+ function Ll(e, t, l, n) {
330
+ l.modifiers.stop === !0 && Ee(e);
331
+ const o = l.modifiers.color;
332
+ let u = l.modifiers.center;
333
+ u = u === !0 || n === !0;
334
+ const a = document.createElement("span"), r = document.createElement("span"), g = Cn(e), { left: b, top: s, width: y, height: v } = t.getBoundingClientRect(), c = Math.sqrt(y * y + v * v), m = c / 2, C = `${(y - c) / 2}px`, p = u ? C : `${g.left - b - m}px`, O = `${(v - c) / 2}px`, T = u ? O : `${g.top - s - m}px`;
335
+ r.className = "q-ripple__inner", ol(r, {
336
+ height: `${c}px`,
337
+ width: `${c}px`,
338
+ transform: `translate3d(${p},${T},0) scale3d(.2,.2,1)`,
287
339
  opacity: 0
288
- }), u.className = `q-ripple${n ? " text-" + n : ""}`, u.setAttribute("dir", "ltr"), u.appendChild(r), t.appendChild(u);
289
- const P = () => {
290
- u.remove(), clearTimeout(B);
340
+ }), a.className = `q-ripple${o ? " text-" + o : ""}`, a.setAttribute("dir", "ltr"), a.appendChild(r), t.appendChild(a);
341
+ const k = () => {
342
+ a.remove(), clearTimeout(M);
291
343
  };
292
- a.abort.push(P);
293
- let B = setTimeout(() => {
294
- r.classList.add("q-ripple__inner--enter"), r.style.transform = `translate3d(${k},${w},0) scale3d(1,1,1)`, r.style.opacity = 0.2, B = setTimeout(() => {
295
- r.classList.remove("q-ripple__inner--enter"), r.classList.add("q-ripple__inner--leave"), r.style.opacity = 0, B = setTimeout(() => {
296
- u.remove(), a.abort.splice(a.abort.indexOf(P), 1);
344
+ l.abort.push(k);
345
+ let M = setTimeout(() => {
346
+ r.classList.add("q-ripple__inner--enter"), r.style.transform = `translate3d(${C},${O},0) scale3d(1,1,1)`, r.style.opacity = 0.2, M = setTimeout(() => {
347
+ r.classList.remove("q-ripple__inner--enter"), r.classList.add("q-ripple__inner--leave"), r.style.opacity = 0, M = setTimeout(() => {
348
+ a.remove(), l.abort.splice(l.abort.indexOf(k), 1);
297
349
  }, 275);
298
350
  }, 250);
299
351
  }, 50);
300
352
  }
301
- function de(e, { modifiers: t, value: a, arg: o }) {
302
- const n = Object.assign({}, e.cfg.ripple, t, a);
353
+ function Ml(e, { modifiers: t, value: l, arg: n }) {
354
+ const o = Object.assign({}, e.cfg.ripple, t, l);
303
355
  e.modifiers = {
304
- early: n.early === !0,
305
- stop: n.stop === !0,
306
- center: n.center === !0,
307
- color: n.color || o,
308
- keyCodes: [].concat(n.keyCodes || 13)
356
+ early: o.early === !0,
357
+ stop: o.stop === !0,
358
+ center: o.center === !0,
359
+ color: o.color || n,
360
+ keyCodes: [].concat(o.keyCodes || 13)
309
361
  };
310
362
  }
311
- const dt = He(
363
+ const En = Bo(
312
364
  {
313
365
  name: "ripple",
314
366
  beforeMount(e, t) {
315
- const a = t.instance.$.appContext.config.globalProperties.$q.config || {};
316
- if (a.ripple === !1)
367
+ const l = t.instance.$.appContext.config.globalProperties.$q.config || {};
368
+ if (l.ripple === !1)
317
369
  return;
318
- const o = {
319
- cfg: a,
370
+ const n = {
371
+ cfg: l,
320
372
  enabled: t.value !== !1,
321
373
  modifiers: {},
322
374
  abort: [],
323
- start(n) {
324
- o.enabled === !0 && n.qSkipRipple !== !0 && n.type === (o.modifiers.early === !0 ? "pointerdown" : "click") && ce(n, e, o, n.qKeyEvent === !0);
375
+ start(o) {
376
+ n.enabled === !0 && o.qSkipRipple !== !0 && o.type === (n.modifiers.early === !0 ? "pointerdown" : "click") && Ll(o, e, n, o.qKeyEvent === !0);
325
377
  },
326
- keystart: ct((n) => {
327
- o.enabled === !0 && n.qSkipRipple !== !0 && ne(n, o.modifiers.keyCodes) === !0 && n.type === `key${o.modifiers.early === !0 ? "down" : "up"}` && ce(n, e, o, !0);
378
+ keystart: No((o) => {
379
+ n.enabled === !0 && o.qSkipRipple !== !0 && Fe(o, n.modifiers.keyCodes) === !0 && o.type === `key${n.modifiers.early === !0 ? "down" : "up"}` && Ll(o, e, n, !0);
328
380
  }, 300)
329
381
  };
330
- de(o, t), e.__qripple = o, lt(o, "main", [
382
+ Ml(n, t), e.__qripple = n, il(n, "main", [
331
383
  [e, "pointerdown", "start", "passive"],
332
384
  [e, "click", "start", "passive"],
333
385
  [e, "keydown", "keystart", "passive"],
@@ -336,18 +388,18 @@ const dt = He(
336
388
  },
337
389
  updated(e, t) {
338
390
  if (t.oldValue !== t.value) {
339
- const a = e.__qripple;
340
- a !== void 0 && (a.enabled = t.value !== !1, a.enabled === !0 && Object(t.value) === t.value && de(a, t));
391
+ const l = e.__qripple;
392
+ l !== void 0 && (l.enabled = t.value !== !1, l.enabled === !0 && Object(t.value) === t.value && Ml(l, t));
341
393
  }
342
394
  },
343
395
  beforeUnmount(e) {
344
396
  const t = e.__qripple;
345
- t !== void 0 && (t.abort.forEach((a) => {
346
- a();
347
- }), st(t, "main"), delete e._qripple);
397
+ t !== void 0 && (t.abort.forEach((l) => {
398
+ l();
399
+ }), qn(t, "main"), delete e._qripple);
348
400
  }
349
401
  }
350
- ), Ee = {
402
+ ), Bn = {
351
403
  left: "start",
352
404
  center: "center",
353
405
  right: "end",
@@ -355,53 +407,66 @@ const dt = He(
355
407
  around: "around",
356
408
  evenly: "evenly",
357
409
  stretch: "stretch"
358
- }, ft = Object.keys(Ee), vt = {
410
+ }, Wo = Object.keys(Bn), Ko = {
359
411
  align: {
360
412
  type: String,
361
- validator: (e) => ft.includes(e)
413
+ validator: (e) => Wo.includes(e)
362
414
  }
363
415
  };
364
- function pt(e) {
365
- return c(() => {
416
+ function Qo(e) {
417
+ return d(() => {
366
418
  const t = e.align === void 0 ? e.vertical === !0 ? "stretch" : "left" : e.align;
367
- return `${e.vertical === !0 ? "items" : "justify"}-${Ee[t]}`;
419
+ return `${e.vertical === !0 ? "items" : "justify"}-${Bn[t]}`;
368
420
  });
369
421
  }
370
- function mt(e) {
422
+ function Qt(e) {
423
+ if (Object(e.$parent) === e.$parent)
424
+ return e.$parent;
425
+ let { parent: t } = e.$;
426
+ for (; Object(t) === t; ) {
427
+ if (Object(t.proxy) === t.proxy)
428
+ return t.proxy;
429
+ t = t.parent;
430
+ }
431
+ }
432
+ function Vn(e) {
371
433
  return e.appContext.config.globalProperties.$router !== void 0;
372
434
  }
373
- function fe(e) {
435
+ function Tn(e) {
436
+ return e.isUnmounted === !0 || e.isDeactivated === !0;
437
+ }
438
+ function Al(e) {
374
439
  return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
375
440
  }
376
- function ve(e, t) {
441
+ function Ol(e, t) {
377
442
  return (e.aliasOf || e) === (t.aliasOf || t);
378
443
  }
379
- function bt(e, t) {
380
- for (const a in t) {
381
- const o = t[a], n = e[a];
382
- if (typeof o == "string") {
383
- if (o !== n)
444
+ function Uo(e, t) {
445
+ for (const l in t) {
446
+ const n = t[l], o = e[l];
447
+ if (typeof n == "string") {
448
+ if (n !== o)
384
449
  return !1;
385
- } else if (Array.isArray(n) === !1 || n.length !== o.length || o.some((s, u) => s !== n[u]))
450
+ } else if (Array.isArray(o) === !1 || o.length !== n.length || n.some((u, a) => u !== o[a]))
386
451
  return !1;
387
452
  }
388
453
  return !0;
389
454
  }
390
- function pe(e, t) {
391
- return Array.isArray(t) === !0 ? e.length === t.length && e.every((a, o) => a === t[o]) : e.length === 1 && e[0] === t;
455
+ function Pl(e, t) {
456
+ return Array.isArray(t) === !0 ? e.length === t.length && e.every((l, n) => l === t[n]) : e.length === 1 && e[0] === t;
392
457
  }
393
- function gt(e, t) {
394
- return Array.isArray(e) === !0 ? pe(e, t) : Array.isArray(t) === !0 ? pe(t, e) : e === t;
458
+ function Yo(e, t) {
459
+ return Array.isArray(e) === !0 ? Pl(e, t) : Array.isArray(t) === !0 ? Pl(t, e) : e === t;
395
460
  }
396
- function ht(e, t) {
461
+ function Xo(e, t) {
397
462
  if (Object.keys(e).length !== Object.keys(t).length)
398
463
  return !1;
399
- for (const a in e)
400
- if (gt(e[a], t[a]) === !1)
464
+ for (const l in e)
465
+ if (Yo(e[l], t[l]) === !1)
401
466
  return !1;
402
467
  return !0;
403
468
  }
404
- const yt = {
469
+ const $n = {
405
470
  // router-link
406
471
  to: [String, Object],
407
472
  replace: Boolean,
@@ -410,108 +475,120 @@ const yt = {
410
475
  target: String,
411
476
  // state
412
477
  disable: Boolean
478
+ }, Go = {
479
+ ...$n,
480
+ // router-link
481
+ exact: Boolean,
482
+ activeClass: {
483
+ type: String,
484
+ default: "q-router-link--active"
485
+ },
486
+ exactActiveClass: {
487
+ type: String,
488
+ default: "q-router-link--exact-active"
489
+ }
413
490
  };
414
- function kt({ fallbackTag: e, useDisableForRouterLinkProps: t = !0 } = {}) {
415
- const a = ae(), { props: o, proxy: n, emit: s } = a, u = mt(a), r = c(() => o.disable !== !0 && o.href !== void 0), x = t === !0 ? c(
416
- () => u === !0 && o.disable !== !0 && r.value !== !0 && o.to !== void 0 && o.to !== null && o.to !== ""
417
- ) : c(
418
- () => u === !0 && r.value !== !0 && o.to !== void 0 && o.to !== null && o.to !== ""
419
- ), g = c(() => x.value === !0 ? M(o.to) : null), d = c(() => g.value !== null), h = c(() => r.value === !0 || d.value === !0), l = c(() => o.type === "a" || h.value === !0 ? "a" : o.tag || e || "div"), y = c(() => r.value === !0 ? {
420
- href: o.href,
421
- target: o.target
422
- } : d.value === !0 ? {
423
- href: g.value.href,
424
- target: o.target
425
- } : {}), b = c(() => {
426
- if (d.value === !1)
491
+ function Rn({ fallbackTag: e, useDisableForRouterLinkProps: t = !0 } = {}) {
492
+ const l = ne(), { props: n, proxy: o, emit: u } = l, a = Vn(l), r = d(() => n.disable !== !0 && n.href !== void 0), g = t === !0 ? d(
493
+ () => a === !0 && n.disable !== !0 && r.value !== !0 && n.to !== void 0 && n.to !== null && n.to !== ""
494
+ ) : d(
495
+ () => a === !0 && r.value !== !0 && n.to !== void 0 && n.to !== null && n.to !== ""
496
+ ), b = d(() => g.value === !0 ? T(n.to) : null), s = d(() => b.value !== null), y = d(() => r.value === !0 || s.value === !0), v = d(() => n.type === "a" || y.value === !0 ? "a" : n.tag || e || "div"), c = d(() => r.value === !0 ? {
497
+ href: n.href,
498
+ target: n.target
499
+ } : s.value === !0 ? {
500
+ href: b.value.href,
501
+ target: n.target
502
+ } : {}), m = d(() => {
503
+ if (s.value === !1)
427
504
  return -1;
428
- const { matched: p } = g.value, { length: C } = p, $ = p[C - 1];
429
- if ($ === void 0)
505
+ const { matched: R } = b.value, { length: V } = R, A = R[V - 1];
506
+ if (A === void 0)
430
507
  return -1;
431
- const E = n.$route.matched;
432
- if (E.length === 0)
508
+ const z = o.$route.matched;
509
+ if (z.length === 0)
433
510
  return -1;
434
- const q = E.findIndex(
435
- ve.bind(null, $)
511
+ const N = z.findIndex(
512
+ Ol.bind(null, A)
436
513
  );
437
- if (q !== -1)
438
- return q;
439
- const K = fe(p[C - 2]);
514
+ if (N !== -1)
515
+ return N;
516
+ const J = Al(R[V - 2]);
440
517
  return (
441
518
  // we are dealing with nested routes
442
- C > 1 && fe($) === K && E[E.length - 1].path !== K ? E.findIndex(
443
- ve.bind(null, p[C - 2])
444
- ) : q
519
+ V > 1 && Al(A) === J && z[z.length - 1].path !== J ? z.findIndex(
520
+ Ol.bind(null, R[V - 2])
521
+ ) : N
445
522
  );
446
- }), k = c(
447
- () => d.value === !0 && b.value !== -1 && bt(n.$route.params, g.value.params)
448
- ), f = c(
449
- () => k.value === !0 && b.value === n.$route.matched.length - 1 && ht(n.$route.params, g.value.params)
450
- ), w = c(() => d.value === !0 ? f.value === !0 ? ` ${o.exactActiveClass} ${o.activeClass}` : o.exact === !0 ? "" : k.value === !0 ? ` ${o.activeClass}` : "" : "");
451
- function M(p) {
523
+ }), C = d(
524
+ () => s.value === !0 && m.value !== -1 && Uo(o.$route.params, b.value.params)
525
+ ), p = d(
526
+ () => C.value === !0 && m.value === o.$route.matched.length - 1 && Xo(o.$route.params, b.value.params)
527
+ ), O = d(() => s.value === !0 ? p.value === !0 ? ` ${n.exactActiveClass} ${n.activeClass}` : n.exact === !0 ? "" : C.value === !0 ? ` ${n.activeClass}` : "" : "");
528
+ function T(R) {
452
529
  try {
453
- return n.$router.resolve(p);
530
+ return o.$router.resolve(R);
454
531
  } catch {
455
532
  }
456
533
  return null;
457
534
  }
458
- function P(p, { returnRouterError: C, to: $ = o.to, replace: E = o.replace } = {}) {
459
- if (o.disable === !0)
460
- return p.preventDefault(), Promise.resolve(!1);
535
+ function k(R, { returnRouterError: V, to: A = n.to, replace: z = n.replace } = {}) {
536
+ if (n.disable === !0)
537
+ return R.preventDefault(), Promise.resolve(!1);
461
538
  if (
462
539
  // don't redirect with control keys;
463
540
  // should match RouterLink from Vue Router
464
- p.metaKey || p.altKey || p.ctrlKey || p.shiftKey || p.button !== void 0 && p.button !== 0 || o.target === "_blank"
541
+ R.metaKey || R.altKey || R.ctrlKey || R.shiftKey || R.button !== void 0 && R.button !== 0 || n.target === "_blank"
465
542
  )
466
543
  return Promise.resolve(!1);
467
- p.preventDefault();
468
- const q = n.$router[E === !0 ? "replace" : "push"]($);
469
- return C === !0 ? q : q.then(() => {
544
+ R.preventDefault();
545
+ const N = o.$router[z === !0 ? "replace" : "push"](A);
546
+ return V === !0 ? N : N.then(() => {
470
547
  }).catch(() => {
471
548
  });
472
549
  }
473
- function B(p) {
474
- if (d.value === !0) {
475
- const C = ($) => P(p, $);
476
- s("click", p, C), p.defaultPrevented !== !0 && C();
550
+ function M(R) {
551
+ if (s.value === !0) {
552
+ const V = (A) => k(R, A);
553
+ u("click", R, V), R.defaultPrevented !== !0 && V();
477
554
  } else
478
- s("click", p);
555
+ u("click", R);
479
556
  }
480
557
  return {
481
- hasRouterLink: d,
558
+ hasRouterLink: s,
482
559
  hasHrefLink: r,
483
- hasLink: h,
484
- linkTag: l,
485
- resolvedLink: g,
486
- linkIsActive: k,
487
- linkIsExactActive: f,
488
- linkClass: w,
489
- linkAttrs: y,
490
- getLink: M,
491
- navigateToRouterLink: P,
492
- navigateOnClick: B
560
+ hasLink: y,
561
+ linkTag: v,
562
+ resolvedLink: b,
563
+ linkIsActive: C,
564
+ linkIsExactActive: p,
565
+ linkClass: O,
566
+ linkAttrs: c,
567
+ getLink: T,
568
+ navigateToRouterLink: k,
569
+ navigateOnClick: M
493
570
  };
494
571
  }
495
- const me = {
572
+ const zl = {
496
573
  none: 0,
497
574
  xs: 4,
498
575
  sm: 8,
499
576
  md: 16,
500
577
  lg: 24,
501
578
  xl: 32
502
- }, wt = {
579
+ }, Zo = {
503
580
  xs: 8,
504
581
  sm: 10,
505
582
  md: 14,
506
583
  lg: 20,
507
584
  xl: 24
508
- }, xt = ["button", "submit", "reset"], Ct = /[^\s]\/[^\s]/, _t = ["flat", "outline", "push", "unelevated"];
509
- function $t(e, t) {
585
+ }, Jo = ["button", "submit", "reset"], ei = /[^\s]\/[^\s]/, ti = ["flat", "outline", "push", "unelevated"];
586
+ function li(e, t) {
510
587
  return e.flat === !0 ? "flat" : e.outline === !0 ? "outline" : e.push === !0 ? "push" : e.unelevated === !0 ? "unelevated" : t;
511
588
  }
512
- const St = {
513
- ...we,
514
- ...yt,
589
+ const ni = {
590
+ ...zt,
591
+ ...$n,
515
592
  type: {
516
593
  type: String,
517
594
  default: "button"
@@ -519,7 +596,7 @@ const St = {
519
596
  label: [Number, String],
520
597
  icon: String,
521
598
  iconRight: String,
522
- ..._t.reduce(
599
+ ...ti.reduce(
523
600
  (e, t) => (e[t] = Boolean) && e,
524
601
  {}
525
602
  ),
@@ -541,7 +618,7 @@ const St = {
541
618
  default: !0
542
619
  },
543
620
  align: {
544
- ...vt.align,
621
+ ...Ko.align,
545
622
  default: "center"
546
623
  },
547
624
  stack: Boolean,
@@ -551,235 +628,235 @@ const St = {
551
628
  default: null
552
629
  },
553
630
  disable: Boolean
554
- }, Et = {
555
- ...St,
631
+ }, oi = {
632
+ ...ni,
556
633
  round: Boolean
557
634
  };
558
- function qt(e) {
559
- const t = xe(e, wt), a = pt(e), { hasRouterLink: o, hasLink: n, linkTag: s, linkAttrs: u, navigateOnClick: r } = kt({
635
+ function ii(e) {
636
+ const t = It(e, Zo), l = Qo(e), { hasRouterLink: n, hasLink: o, linkTag: u, linkAttrs: a, navigateOnClick: r } = Rn({
560
637
  fallbackTag: "button"
561
- }), x = c(() => {
562
- const f = e.fab === !1 && e.fabMini === !1 ? t.value : {};
563
- return e.padding !== void 0 ? Object.assign({}, f, {
564
- padding: e.padding.split(/\s+/).map((w) => w in me ? me[w] + "px" : w).join(" "),
638
+ }), g = d(() => {
639
+ const p = e.fab === !1 && e.fabMini === !1 ? t.value : {};
640
+ return e.padding !== void 0 ? Object.assign({}, p, {
641
+ padding: e.padding.split(/\s+/).map((O) => O in zl ? zl[O] + "px" : O).join(" "),
565
642
  minWidth: "0",
566
643
  minHeight: "0"
567
- }) : f;
568
- }), g = c(
644
+ }) : p;
645
+ }), b = d(
569
646
  () => e.rounded === !0 || e.fab === !0 || e.fabMini === !0
570
- ), d = c(
647
+ ), s = d(
571
648
  () => e.disable !== !0 && e.loading !== !0
572
- ), h = c(() => d.value === !0 ? e.tabindex || 0 : -1), l = c(() => $t(e, "standard")), y = c(() => {
573
- const f = { tabindex: h.value };
574
- return n.value === !0 ? Object.assign(f, u.value) : xt.includes(e.type) === !0 && (f.type = e.type), s.value === "a" ? (e.disable === !0 ? f["aria-disabled"] = "true" : f.href === void 0 && (f.role = "button"), o.value !== !0 && Ct.test(e.type) === !0 && (f.type = e.type)) : e.disable === !0 && (f.disabled = "", f["aria-disabled"] = "true"), e.loading === !0 && e.percentage !== void 0 && Object.assign(f, {
649
+ ), y = d(() => s.value === !0 ? e.tabindex || 0 : -1), v = d(() => li(e, "standard")), c = d(() => {
650
+ const p = { tabindex: y.value };
651
+ return o.value === !0 ? Object.assign(p, a.value) : Jo.includes(e.type) === !0 && (p.type = e.type), u.value === "a" ? (e.disable === !0 ? p["aria-disabled"] = "true" : p.href === void 0 && (p.role = "button"), n.value !== !0 && ei.test(e.type) === !0 && (p.type = e.type)) : e.disable === !0 && (p.disabled = "", p["aria-disabled"] = "true"), e.loading === !0 && e.percentage !== void 0 && Object.assign(p, {
575
652
  role: "progressbar",
576
653
  "aria-valuemin": 0,
577
654
  "aria-valuemax": 100,
578
655
  "aria-valuenow": e.percentage
579
- }), f;
580
- }), b = c(() => {
581
- let f;
582
- e.color !== void 0 ? e.flat === !0 || e.outline === !0 ? f = `text-${e.textColor || e.color}` : f = `bg-${e.color} text-${e.textColor || "white"}` : e.textColor && (f = `text-${e.textColor}`);
583
- const w = e.round === !0 ? "round" : `rectangle${g.value === !0 ? " q-btn--rounded" : e.square === !0 ? " q-btn--square" : ""}`;
584
- return `q-btn--${l.value} q-btn--${w}` + (f !== void 0 ? " " + f : "") + (d.value === !0 ? " q-btn--actionable q-focusable q-hoverable" : e.disable === !0 ? " disabled" : "") + (e.fab === !0 ? " q-btn--fab" : e.fabMini === !0 ? " q-btn--fab-mini" : "") + (e.noCaps === !0 ? " q-btn--no-uppercase" : "") + (e.dense === !0 ? " q-btn--dense" : "") + (e.stretch === !0 ? " no-border-radius self-stretch" : "") + (e.glossy === !0 ? " glossy" : "") + (e.square ? " q-btn--square" : "");
585
- }), k = c(
586
- () => a.value + (e.stack === !0 ? " column" : " row") + (e.noWrap === !0 ? " no-wrap text-no-wrap" : "") + (e.loading === !0 ? " q-btn__content--hidden" : "")
656
+ }), p;
657
+ }), m = d(() => {
658
+ let p;
659
+ e.color !== void 0 ? e.flat === !0 || e.outline === !0 ? p = `text-${e.textColor || e.color}` : p = `bg-${e.color} text-${e.textColor || "white"}` : e.textColor && (p = `text-${e.textColor}`);
660
+ const O = e.round === !0 ? "round" : `rectangle${b.value === !0 ? " q-btn--rounded" : e.square === !0 ? " q-btn--square" : ""}`;
661
+ return `q-btn--${v.value} q-btn--${O}` + (p !== void 0 ? " " + p : "") + (s.value === !0 ? " q-btn--actionable q-focusable q-hoverable" : e.disable === !0 ? " disabled" : "") + (e.fab === !0 ? " q-btn--fab" : e.fabMini === !0 ? " q-btn--fab-mini" : "") + (e.noCaps === !0 ? " q-btn--no-uppercase" : "") + (e.dense === !0 ? " q-btn--dense" : "") + (e.stretch === !0 ? " no-border-radius self-stretch" : "") + (e.glossy === !0 ? " glossy" : "") + (e.square ? " q-btn--square" : "");
662
+ }), C = d(
663
+ () => l.value + (e.stack === !0 ? " column" : " row") + (e.noWrap === !0 ? " no-wrap text-no-wrap" : "") + (e.loading === !0 ? " q-btn__content--hidden" : "")
587
664
  );
588
665
  return {
589
- classes: b,
590
- style: x,
591
- innerClasses: k,
592
- attributes: y,
593
- hasLink: n,
594
- linkTag: s,
666
+ classes: m,
667
+ style: g,
668
+ innerClasses: C,
669
+ attributes: c,
670
+ hasLink: o,
671
+ linkTag: u,
595
672
  navigateOnClick: r,
596
- isActionable: d
673
+ isActionable: s
597
674
  };
598
675
  }
599
- const { passiveCapture: _ } = X;
600
- let T = null, j = null, z = null;
601
- const Lt = ie({
676
+ const { passiveCapture: he } = re;
677
+ let Ye = null, Xe = null, Ge = null;
678
+ const ui = ge({
602
679
  name: "QBtn",
603
680
  props: {
604
- ...Et,
681
+ ...oi,
605
682
  percentage: Number,
606
683
  darkPercentage: Boolean,
607
684
  onTouchstart: [Function, Array]
608
685
  },
609
686
  emits: ["click", "keydown", "mousedown", "keyup"],
610
- setup(e, { slots: t, emit: a }) {
611
- const { proxy: o } = ae(), {
612
- classes: n,
613
- style: s,
614
- innerClasses: u,
687
+ setup(e, { slots: t, emit: l }) {
688
+ const { proxy: n } = ne(), {
689
+ classes: o,
690
+ style: u,
691
+ innerClasses: a,
615
692
  attributes: r,
616
- hasLink: x,
617
- linkTag: g,
618
- navigateOnClick: d,
619
- isActionable: h
620
- } = qt(e), l = W(null), y = W(null);
621
- let b = null, k, f = null;
622
- const w = c(
693
+ hasLink: g,
694
+ linkTag: b,
695
+ navigateOnClick: s,
696
+ isActionable: y
697
+ } = ii(e), v = P(null), c = P(null);
698
+ let m = null, C, p = null;
699
+ const O = d(
623
700
  () => e.label !== void 0 && e.label !== null && e.label !== ""
624
- ), M = c(() => e.disable === !0 || e.ripple === !1 ? !1 : {
625
- keyCodes: x.value === !0 ? [13, 32] : [13],
701
+ ), T = d(() => e.disable === !0 || e.ripple === !1 ? !1 : {
702
+ keyCodes: g.value === !0 ? [13, 32] : [13],
626
703
  ...e.ripple === !0 ? {} : e.ripple
627
- }), P = c(() => ({ center: e.round })), B = c(() => {
628
- const i = Math.max(0, Math.min(100, e.percentage));
629
- return i > 0 ? { transition: "transform 0.6s", transform: `translateX(${i - 100}%)` } : {};
630
- }), p = c(() => {
704
+ }), k = d(() => ({ center: e.round })), M = d(() => {
705
+ const B = Math.max(0, Math.min(100, e.percentage));
706
+ return B > 0 ? { transition: "transform 0.6s", transform: `translateX(${B - 100}%)` } : {};
707
+ }), R = d(() => {
631
708
  if (e.loading === !0)
632
709
  return {
633
- onMousedown: N,
634
- onTouchstart: N,
635
- onClick: N,
636
- onKeydown: N,
637
- onKeyup: N
710
+ onMousedown: K,
711
+ onTouchstart: K,
712
+ onClick: K,
713
+ onKeydown: K,
714
+ onKeyup: K
638
715
  };
639
- if (h.value === !0) {
640
- const i = {
641
- onClick: $,
642
- onKeydown: E,
643
- onMousedown: K
716
+ if (y.value === !0) {
717
+ const B = {
718
+ onClick: A,
719
+ onKeydown: z,
720
+ onMousedown: J
644
721
  };
645
- if (o.$q.platform.has.touch === !0) {
646
- const m = e.onTouchstart !== void 0 ? "" : "Passive";
647
- i[`onTouchstart${m}`] = q;
722
+ if (n.$q.platform.has.touch === !0) {
723
+ const D = e.onTouchstart !== void 0 ? "" : "Passive";
724
+ B[`onTouchstart${D}`] = N;
648
725
  }
649
- return i;
726
+ return B;
650
727
  }
651
728
  return {
652
729
  // needed; especially for disabled <a> tags
653
- onClick: O
730
+ onClick: le
654
731
  };
655
- }), C = c(() => ({
656
- ref: l,
657
- class: "q-btn q-btn-item non-selectable no-outline " + n.value,
658
- style: s.value,
732
+ }), V = d(() => ({
733
+ ref: v,
734
+ class: "q-btn q-btn-item non-selectable no-outline " + o.value,
735
+ style: u.value,
659
736
  ...r.value,
660
- ...p.value
737
+ ...R.value
661
738
  }));
662
- function $(i) {
663
- if (l.value !== null) {
664
- if (i !== void 0) {
665
- if (i.defaultPrevented === !0)
739
+ function A(B) {
740
+ if (v.value !== null) {
741
+ if (B !== void 0) {
742
+ if (B.defaultPrevented === !0)
666
743
  return;
667
- const m = document.activeElement;
668
- if (e.type === "submit" && m !== document.body && l.value.contains(m) === !1 && m.contains(l.value) === !1) {
669
- l.value.focus();
670
- const F = () => {
671
- document.removeEventListener("keydown", O, !0), document.removeEventListener("keyup", F, _), l.value !== null && l.value.removeEventListener("blur", F, _);
744
+ const D = document.activeElement;
745
+ if (e.type === "submit" && D !== document.body && v.value.contains(D) === !1 && D.contains(v.value) === !1) {
746
+ v.value.focus();
747
+ const X = () => {
748
+ document.removeEventListener("keydown", le, !0), document.removeEventListener("keyup", X, he), v.value !== null && v.value.removeEventListener("blur", X, he);
672
749
  };
673
- document.addEventListener("keydown", O, !0), document.addEventListener("keyup", F, _), l.value.addEventListener("blur", F, _);
750
+ document.addEventListener("keydown", le, !0), document.addEventListener("keyup", X, he), v.value.addEventListener("blur", X, he);
674
751
  }
675
752
  }
676
- d(i);
753
+ s(B);
677
754
  }
678
755
  }
679
- function E(i) {
680
- l.value !== null && (a("keydown", i), ne(i, [13, 32]) === !0 && j !== l.value && (j !== null && D(), i.defaultPrevented !== !0 && (l.value.focus(), j = l.value, l.value.classList.add("q-btn--active"), document.addEventListener("keyup", S, !0), l.value.addEventListener("blur", S, _)), O(i)));
756
+ function z(B) {
757
+ v.value !== null && (l("keydown", B), Fe(B, [13, 32]) === !0 && Xe !== v.value && (Xe !== null && L(), B.defaultPrevented !== !0 && (v.value.focus(), Xe = v.value, v.value.classList.add("q-btn--active"), document.addEventListener("keyup", U, !0), v.value.addEventListener("blur", U, he)), le(B)));
681
758
  }
682
- function q(i) {
683
- l.value !== null && (a("touchstart", i), i.defaultPrevented !== !0 && (T !== l.value && (T !== null && D(), T = l.value, b = i.target, b.addEventListener("touchcancel", S, _), b.addEventListener("touchend", S, _)), k = !0, f !== null && clearTimeout(f), f = setTimeout(() => {
684
- f = null, k = !1;
759
+ function N(B) {
760
+ v.value !== null && (l("touchstart", B), B.defaultPrevented !== !0 && (Ye !== v.value && (Ye !== null && L(), Ye = v.value, m = B.target, m.addEventListener("touchcancel", U, he), m.addEventListener("touchend", U, he)), C = !0, p !== null && clearTimeout(p), p = setTimeout(() => {
761
+ p = null, C = !1;
685
762
  }, 200)));
686
763
  }
687
- function K(i) {
688
- l.value !== null && (i.qSkipRipple = k === !0, a("mousedown", i), i.defaultPrevented !== !0 && z !== l.value && (z !== null && D(), z = l.value, l.value.classList.add("q-btn--active"), document.addEventListener("mouseup", S, _)));
764
+ function J(B) {
765
+ v.value !== null && (B.qSkipRipple = C === !0, l("mousedown", B), B.defaultPrevented !== !0 && Ge !== v.value && (Ge !== null && L(), Ge = v.value, v.value.classList.add("q-btn--active"), document.addEventListener("mouseup", U, he)));
689
766
  }
690
- function S(i) {
691
- if (l.value !== null && !(i !== void 0 && i.type === "blur" && document.activeElement === l.value)) {
692
- if (i !== void 0 && i.type === "keyup") {
693
- if (j === l.value && ne(i, [13, 32]) === !0) {
694
- const m = new MouseEvent("click", i);
695
- m.qKeyEvent = !0, i.defaultPrevented === !0 && rt(m), i.cancelBubble === !0 && Se(m), l.value.dispatchEvent(m), O(i), i.qKeyEvent = !0;
767
+ function U(B) {
768
+ if (v.value !== null && !(B !== void 0 && B.type === "blur" && document.activeElement === v.value)) {
769
+ if (B !== void 0 && B.type === "keyup") {
770
+ if (Xe === v.value && Fe(B, [13, 32]) === !0) {
771
+ const D = new MouseEvent("click", B);
772
+ D.qKeyEvent = !0, B.defaultPrevented === !0 && be(D), B.cancelBubble === !0 && Ee(D), v.value.dispatchEvent(D), le(B), B.qKeyEvent = !0;
696
773
  }
697
- a("keyup", i);
774
+ l("keyup", B);
698
775
  }
699
- D();
776
+ L();
700
777
  }
701
778
  }
702
- function D(i) {
703
- const m = y.value;
704
- i !== !0 && (T === l.value || z === l.value) && m !== null && m !== document.activeElement && (m.setAttribute("tabindex", -1), m.focus()), T === l.value && (b !== null && (b.removeEventListener("touchcancel", S, _), b.removeEventListener("touchend", S, _)), T = b = null), z === l.value && (document.removeEventListener("mouseup", S, _), z = null), j === l.value && (document.removeEventListener("keyup", S, !0), l.value !== null && l.value.removeEventListener("blur", S, _), j = null), l.value !== null && l.value.classList.remove("q-btn--active");
779
+ function L(B) {
780
+ const D = c.value;
781
+ B !== !0 && (Ye === v.value || Ge === v.value) && D !== null && D !== document.activeElement && (D.setAttribute("tabindex", -1), D.focus()), Ye === v.value && (m !== null && (m.removeEventListener("touchcancel", U, he), m.removeEventListener("touchend", U, he)), Ye = m = null), Ge === v.value && (document.removeEventListener("mouseup", U, he), Ge = null), Xe === v.value && (document.removeEventListener("keyup", U, !0), v.value !== null && v.value.removeEventListener("blur", U, he), Xe = null), v.value !== null && v.value.classList.remove("q-btn--active");
705
782
  }
706
- function N(i) {
707
- O(i), i.qSkipRipple = !0;
783
+ function K(B) {
784
+ le(B), B.qSkipRipple = !0;
708
785
  }
709
- return Be(() => {
710
- D(!0);
711
- }), Object.assign(o, {
712
- click: (i) => {
713
- h.value === !0 && $(i);
786
+ return me(() => {
787
+ L(!0);
788
+ }), Object.assign(n, {
789
+ click: (B) => {
790
+ y.value === !0 && A(B);
714
791
  }
715
792
  }), () => {
716
- let i = [];
717
- e.icon !== void 0 && i.push(
718
- v(ue, {
793
+ let B = [];
794
+ e.icon !== void 0 && B.push(
795
+ h(_e, {
719
796
  name: e.icon,
720
- left: e.stack !== !0 && w.value === !0,
797
+ left: e.stack !== !0 && O.value === !0,
721
798
  role: "img"
722
799
  })
723
- ), w.value === !0 && i.push(
724
- v("span", { class: "block" }, [e.label])
725
- ), i = A(t.default, i), e.iconRight !== void 0 && e.round === !1 && i.push(
726
- v(ue, {
800
+ ), O.value === !0 && B.push(
801
+ h("span", { class: "block" }, [e.label])
802
+ ), B = Ae(t.default, B), e.iconRight !== void 0 && e.round === !1 && B.push(
803
+ h(_e, {
727
804
  name: e.iconRight,
728
- right: e.stack !== !0 && w.value === !0,
805
+ right: e.stack !== !0 && O.value === !0,
729
806
  role: "img"
730
807
  })
731
808
  );
732
- const m = [
733
- v("span", {
809
+ const D = [
810
+ h("span", {
734
811
  class: "q-focus-helper",
735
- ref: y
812
+ ref: c
736
813
  })
737
814
  ];
738
- return e.loading === !0 && e.percentage !== void 0 && m.push(
739
- v("span", {
815
+ return e.loading === !0 && e.percentage !== void 0 && D.push(
816
+ h("span", {
740
817
  class: "q-btn__progress absolute-full overflow-hidden" + (e.darkPercentage === !0 ? " q-btn__progress--dark" : "")
741
818
  }, [
742
- v("span", {
819
+ h("span", {
743
820
  class: "q-btn__progress-indicator fit block",
744
- style: B.value
821
+ style: M.value
745
822
  })
746
823
  ])
747
- ), m.push(
748
- v("span", {
749
- class: "q-btn__content text-center col items-center q-anchor--skip " + u.value
750
- }, i)
751
- ), e.loading !== null && m.push(
752
- v(Re, {
824
+ ), D.push(
825
+ h("span", {
826
+ class: "q-btn__content text-center col items-center q-anchor--skip " + a.value
827
+ }, B)
828
+ ), e.loading !== null && D.push(
829
+ h(dt, {
753
830
  name: "q-transition--fade"
754
831
  }, () => e.loading === !0 ? [
755
- v("span", {
832
+ h("span", {
756
833
  key: "loading",
757
834
  class: "absolute-full flex flex-center"
758
- }, t.loading !== void 0 ? t.loading() : [v(ot)])
835
+ }, t.loading !== void 0 ? t.loading() : [h(kn)])
759
836
  ] : null)
760
- ), Me(
761
- v(
762
- g.value,
763
- C.value,
764
- m
837
+ ), vn(
838
+ h(
839
+ b.value,
840
+ V.value,
841
+ D
765
842
  ),
766
843
  [[
767
- dt,
768
- M.value,
844
+ En,
845
+ T.value,
769
846
  void 0,
770
- P.value
847
+ k.value
771
848
  ]]
772
849
  );
773
850
  };
774
851
  }
775
- }), Pt = /* @__PURE__ */ U({
852
+ }), ai = /* @__PURE__ */ mt({
776
853
  __name: "index",
777
854
  props: {
778
- size: { default: L.MD },
855
+ size: { default: qe.MD },
779
856
  transparent: { type: Boolean },
780
857
  flat: { type: Boolean },
781
858
  rounded: { type: Boolean },
782
- color: { default: ke.PRIMARY },
859
+ color: { default: bn.PRIMARY },
783
860
  iconLeft: {},
784
861
  iconRight: {},
785
862
  iconMiddle: {},
@@ -794,69 +871,69 @@ const Lt = ie({
794
871
  },
795
872
  emits: ["click"],
796
873
  setup(e) {
797
- const t = e, a = c(() => [
874
+ const t = e, l = d(() => [
798
875
  "app-btn",
799
876
  {
800
877
  "app-btn_default": !t.transparent && !t.flat,
801
878
  "app-btn_trans": t.transparent,
802
879
  "app-btn_flat": t.flat,
803
880
  "app-btn_rounded": t.rounded,
804
- "app-btn_sm": t.size === L.SM,
805
- "app-btn_md": t.size === L.MD,
806
- "app-btn_lg": t.size === L.LG,
881
+ "app-btn_sm": t.size === qe.SM,
882
+ "app-btn_md": t.size === qe.MD,
883
+ "app-btn_lg": t.size === qe.LG,
807
884
  "app-btn_icon-left": t.iconLeft,
808
885
  "app-btn_icon-right": t.iconRight,
809
886
  "app-btn_icon-middle": t.iconMiddle
810
887
  },
811
888
  `app-btn_${t.color}`
812
889
  ]);
813
- return (o, n) => (I(), ye(V(Lt), {
890
+ return (n, o) => (ue(), $t(Je(ui), {
814
891
  "no-caps": "",
815
892
  unelevated: "",
816
- class: Y(a.value),
817
- padding: V(Ve)[o.size || V(L).MD],
818
- loading: o.loading,
819
- disable: o.disabled || void 0,
820
- to: o.to,
821
- href: o.href,
822
- target: o.target,
823
- type: o.submit ? "submit" : void 0,
824
- "aria-label": o.ariaLabel,
825
- onClick: n[0] || (n[0] = (s) => o.$emit("click", s))
893
+ class: Ve(l.value),
894
+ padding: Je(Eo)[n.size || Je(qe).MD],
895
+ loading: n.loading,
896
+ disable: n.disabled || void 0,
897
+ to: n.to,
898
+ href: n.href,
899
+ target: n.target,
900
+ type: n.submit ? "submit" : void 0,
901
+ "aria-label": n.ariaLabel,
902
+ onClick: o[0] || (o[0] = (u) => n.$emit("click", u))
826
903
  }, {
827
- default: Oe(() => [
828
- o.iconLeft || o.iconMiddle ? (I(), H("i", {
904
+ default: xe(() => [
905
+ n.iconLeft || n.iconMiddle ? (ue(), de("i", {
829
906
  key: 0,
830
- class: Y([
907
+ class: Ve([
831
908
  "icon-kl",
832
- o.iconLeft ? "icon-kl_left" : "icon-kl_middle",
833
- `icon-kl-${o.iconLeft || o.iconMiddle}`,
834
- o.transparent || o.flat ? `text-${o.color}` : "text-secondary"
909
+ n.iconLeft ? "icon-kl_left" : "icon-kl_middle",
910
+ `icon-kl-${n.iconLeft || n.iconMiddle}`,
911
+ n.transparent || n.flat ? `text-${n.color}` : "text-secondary"
835
912
  ])
836
- }, null, 2)) : Z("", !0),
837
- Te(o.$slots, "default", {}, void 0, !0),
838
- o.label ? (I(), H(je, { key: 1 }, [
839
- ze(Ie(o.label), 1)
840
- ], 64)) : Z("", !0),
841
- o.iconRight ? (I(), H("i", {
913
+ }, null, 2)) : Ce("", !0),
914
+ yo(n.$slots, "default", {}, void 0, !0),
915
+ n.label ? (ue(), de(rt, { key: 1 }, [
916
+ Vt(Ze(n.label), 1)
917
+ ], 64)) : Ce("", !0),
918
+ n.iconRight ? (ue(), de("i", {
842
919
  key: 2,
843
- class: Y([
920
+ class: Ve([
844
921
  "icon-kl",
845
922
  "icon-kl_right",
846
- `icon-kl-${o.iconRight}`,
847
- o.transparent ? `text-${o.color}` : "text-secondary"
923
+ `icon-kl-${n.iconRight}`,
924
+ n.transparent ? `text-${n.color}` : "text-secondary"
848
925
  ])
849
- }, null, 2)) : Z("", !0)
926
+ }, null, 2)) : Ce("", !0)
850
927
  ]),
851
928
  _: 3
852
929
  }, 8, ["class", "padding", "loading", "disable", "to", "href", "target", "type", "aria-label"]));
853
930
  }
854
- }), qe = (e, t) => {
855
- const a = e.__vccOpts || e;
856
- for (const [o, n] of t)
857
- a[o] = n;
858
- return a;
859
- }, Bt = /* @__PURE__ */ qe(Pt, [["__scopeId", "data-v-ac94630a"]]), Rt = /* @__PURE__ */ U({
931
+ }), fl = (e, t) => {
932
+ const l = e.__vccOpts || e;
933
+ for (const [n, o] of t)
934
+ l[n] = o;
935
+ return l;
936
+ }, Ln = /* @__PURE__ */ fl(ai, [["__scopeId", "data-v-ac94630a"]]), ri = /* @__PURE__ */ mt({
860
937
  __name: "index",
861
938
  props: {
862
939
  name: {},
@@ -864,31 +941,363 @@ const Lt = ie({
864
941
  color: {}
865
942
  },
866
943
  setup(e) {
867
- return (t, a) => (I(), H("i", {
868
- class: Y(["icon-kl", `icon-kl-${t.name}`, t.color ? `text-${t.color}` : ""]),
869
- style: De(t.size ? `font-size: ${t.size}` : void 0)
944
+ return (t, l) => (ue(), de("i", {
945
+ class: Ve(["icon-kl", `icon-kl-${t.name}`, t.color ? `text-${t.color}` : ""]),
946
+ style: wo(t.size ? `font-size: ${t.size}` : void 0)
870
947
  }, null, 6));
871
948
  }
872
- }), Vt = /* @__PURE__ */ qe(Rt, [["__scopeId", "data-v-73419357"]]), Yt = Ne(
873
- () => Promise.resolve().then(() => Kt)
874
- ), Q = W(
949
+ }), si = /* @__PURE__ */ fl(ri, [["__scopeId", "data-v-73419357"]]), ht = {
950
+ dark: {
951
+ type: Boolean,
952
+ default: null
953
+ }
954
+ };
955
+ function pt(e, t) {
956
+ return d(() => e.dark === null ? t.dark.isActive : e.dark);
957
+ }
958
+ function ci(e, t) {
959
+ const l = P(null), n = d(() => e.disable === !0 ? null : h("span", {
960
+ ref: l,
961
+ class: "no-outline",
962
+ tabindex: -1
963
+ }));
964
+ function o(u) {
965
+ const a = t.value;
966
+ u !== void 0 && u.type.indexOf("key") === 0 ? a !== null && document.activeElement !== a && a.contains(document.activeElement) === !0 && a.focus() : l.value !== null && (u === void 0 || a !== null && a.contains(u.target) === !0) && l.value.focus();
967
+ }
968
+ return {
969
+ refocusTargetEl: n,
970
+ refocusTarget: o
971
+ };
972
+ }
973
+ const Mn = {
974
+ name: String
975
+ };
976
+ function di(e = {}) {
977
+ return (t, l, n) => {
978
+ t[l](
979
+ h("input", {
980
+ class: "hidden" + (n || ""),
981
+ ...e.value
982
+ })
983
+ );
984
+ };
985
+ }
986
+ function fi(e) {
987
+ return d(() => e.name || e.for);
988
+ }
989
+ const vi = {
990
+ xs: 30,
991
+ sm: 35,
992
+ md: 40,
993
+ lg: 50,
994
+ xl: 60
995
+ }, mi = {
996
+ ...ht,
997
+ ...zt,
998
+ ...Mn,
999
+ modelValue: {
1000
+ required: !0,
1001
+ default: null
1002
+ },
1003
+ val: {},
1004
+ trueValue: { default: !0 },
1005
+ falseValue: { default: !1 },
1006
+ indeterminateValue: { default: null },
1007
+ checkedIcon: String,
1008
+ uncheckedIcon: String,
1009
+ indeterminateIcon: String,
1010
+ toggleOrder: {
1011
+ type: String,
1012
+ validator: (e) => e === "tf" || e === "ft"
1013
+ },
1014
+ toggleIndeterminate: Boolean,
1015
+ label: String,
1016
+ leftLabel: Boolean,
1017
+ color: String,
1018
+ keepColor: Boolean,
1019
+ dense: Boolean,
1020
+ disable: Boolean,
1021
+ tabindex: [String, Number]
1022
+ }, gi = ["update:modelValue"];
1023
+ function hi(e, t) {
1024
+ const { props: l, slots: n, emit: o, proxy: u } = ne(), { $q: a } = u, r = pt(l, a), g = P(null), { refocusTargetEl: b, refocusTarget: s } = ci(l, g), y = It(l, vi), v = d(
1025
+ () => l.val !== void 0 && Array.isArray(l.modelValue)
1026
+ ), c = d(() => {
1027
+ const L = Ue(l.val);
1028
+ return v.value === !0 ? l.modelValue.findIndex((K) => Ue(K) === L) : -1;
1029
+ }), m = d(() => v.value === !0 ? c.value !== -1 : Ue(l.modelValue) === Ue(l.trueValue)), C = d(() => v.value === !0 ? c.value === -1 : Ue(l.modelValue) === Ue(l.falseValue)), p = d(
1030
+ () => m.value === !1 && C.value === !1
1031
+ ), O = d(() => l.disable === !0 ? -1 : l.tabindex || 0), T = d(
1032
+ () => `q-${e} cursor-pointer no-outline row inline no-wrap items-center` + (l.disable === !0 ? " disabled" : "") + (r.value === !0 ? ` q-${e}--dark` : "") + (l.dense === !0 ? ` q-${e}--dense` : "") + (l.leftLabel === !0 ? " reverse" : "")
1033
+ ), k = d(() => {
1034
+ const L = m.value === !0 ? "truthy" : C.value === !0 ? "falsy" : "indet", K = l.color !== void 0 && (l.keepColor === !0 || C.value !== !0) ? ` text-${l.color}` : "";
1035
+ return `q-${e}__inner relative-position non-selectable q-${e}__inner--${L}${K}`;
1036
+ }), M = d(() => {
1037
+ const L = { type: "checkbox" };
1038
+ return l.name !== void 0 && Object.assign(L, {
1039
+ // see https://vuejs.org/guide/extras/render-function.html#creating-vnodes (.prop)
1040
+ ".checked": m.value,
1041
+ "^checked": m.value === !0 ? "checked" : void 0,
1042
+ name: l.name,
1043
+ value: v.value === !0 ? l.val : l.trueValue
1044
+ }), L;
1045
+ }), R = di(M), V = d(() => {
1046
+ const L = {
1047
+ tabindex: O.value,
1048
+ role: "checkbox",
1049
+ "aria-label": l.label,
1050
+ "aria-checked": p.value === !0 ? "mixed" : m.value === !0 ? "true" : "false"
1051
+ };
1052
+ return l.disable === !0 && (L["aria-disabled"] = "true"), L;
1053
+ });
1054
+ function A(L) {
1055
+ L !== void 0 && (le(L), s(L)), l.disable !== !0 && o("update:modelValue", z(), L);
1056
+ }
1057
+ function z() {
1058
+ if (v.value === !0) {
1059
+ if (m.value === !0) {
1060
+ const L = l.modelValue.slice();
1061
+ return L.splice(c.value, 1), L;
1062
+ }
1063
+ return l.modelValue.concat([l.val]);
1064
+ }
1065
+ if (m.value === !0) {
1066
+ if (l.toggleOrder !== "ft" || l.toggleIndeterminate === !1)
1067
+ return l.falseValue;
1068
+ } else if (C.value === !0) {
1069
+ if (l.toggleOrder === "ft" || l.toggleIndeterminate === !1)
1070
+ return l.trueValue;
1071
+ } else
1072
+ return l.toggleOrder !== "ft" ? l.trueValue : l.falseValue;
1073
+ return l.indeterminateValue;
1074
+ }
1075
+ function N(L) {
1076
+ (L.keyCode === 13 || L.keyCode === 32) && le(L);
1077
+ }
1078
+ function J(L) {
1079
+ (L.keyCode === 13 || L.keyCode === 32) && A(L);
1080
+ }
1081
+ const U = t(m, p);
1082
+ return Object.assign(u, { toggle: A }), () => {
1083
+ const L = U();
1084
+ l.disable !== !0 && R(
1085
+ L,
1086
+ "unshift",
1087
+ ` q-${e}__native absolute q-ma-none q-pa-none`
1088
+ );
1089
+ const K = [
1090
+ h("div", {
1091
+ class: k.value,
1092
+ style: y.value,
1093
+ "aria-hidden": "true"
1094
+ }, L)
1095
+ ];
1096
+ b.value !== null && K.push(b.value);
1097
+ const B = l.label !== void 0 ? Ae(n.default, [l.label]) : ke(n.default);
1098
+ return B !== void 0 && K.push(
1099
+ h("div", {
1100
+ class: `q-${e}__label q-anchor--skip`
1101
+ }, B)
1102
+ ), h("div", {
1103
+ ref: g,
1104
+ class: T.value,
1105
+ ...V.value,
1106
+ onClick: A,
1107
+ onKeydown: N,
1108
+ onKeyup: J
1109
+ }, K);
1110
+ };
1111
+ }
1112
+ const pi = () => h("div", {
1113
+ key: "svg",
1114
+ class: "q-checkbox__bg absolute"
1115
+ }, [
1116
+ h("svg", {
1117
+ class: "q-checkbox__svg fit absolute-full",
1118
+ viewBox: "0 0 24 24"
1119
+ }, [
1120
+ h("path", {
1121
+ class: "q-checkbox__truthy",
1122
+ fill: "none",
1123
+ d: "M1.73,12.91 8.1,19.28 22.79,4.59"
1124
+ }),
1125
+ h("path", {
1126
+ class: "q-checkbox__indet",
1127
+ d: "M4,14H20V10H4"
1128
+ })
1129
+ ])
1130
+ ]), bi = ge({
1131
+ name: "QCheckbox",
1132
+ props: mi,
1133
+ emits: gi,
1134
+ setup(e) {
1135
+ const t = pi();
1136
+ function l(n, o) {
1137
+ const u = d(
1138
+ () => (n.value === !0 ? e.checkedIcon : o.value === !0 ? e.indeterminateIcon : e.uncheckedIcon) || null
1139
+ );
1140
+ return () => u.value !== null ? [
1141
+ h("div", {
1142
+ key: "icon",
1143
+ class: "q-checkbox__icon-container absolute-full flex flex-center no-wrap"
1144
+ }, [
1145
+ h(_e, {
1146
+ class: "q-checkbox__icon",
1147
+ name: u.value
1148
+ })
1149
+ ])
1150
+ ] : [t];
1151
+ }
1152
+ return hi("checkbox", l);
1153
+ }
1154
+ }), Tt = ge({
1155
+ name: "QItemSection",
1156
+ props: {
1157
+ avatar: Boolean,
1158
+ thumbnail: Boolean,
1159
+ side: Boolean,
1160
+ top: Boolean,
1161
+ noWrap: Boolean
1162
+ },
1163
+ setup(e, { slots: t }) {
1164
+ const l = d(
1165
+ () => `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" : "")
1166
+ );
1167
+ return () => h("div", { class: l.value }, ke(t.default));
1168
+ }
1169
+ }), An = ge({
1170
+ name: "QItemLabel",
1171
+ props: {
1172
+ overline: Boolean,
1173
+ caption: Boolean,
1174
+ header: Boolean,
1175
+ lines: [Number, String]
1176
+ },
1177
+ setup(e, { slots: t }) {
1178
+ const l = d(() => parseInt(e.lines, 10)), n = d(
1179
+ () => "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" : "") + (l.value === 1 ? " ellipsis" : "")
1180
+ ), o = d(() => e.lines !== void 0 && l.value > 1 ? {
1181
+ overflow: "hidden",
1182
+ display: "-webkit-box",
1183
+ "-webkit-box-orient": "vertical",
1184
+ "-webkit-line-clamp": l.value
1185
+ } : null);
1186
+ return () => h("div", {
1187
+ style: o.value,
1188
+ class: n.value
1189
+ }, ke(t.default));
1190
+ }
1191
+ }), On = ge({
1192
+ name: "QItem",
1193
+ props: {
1194
+ ...ht,
1195
+ ...Go,
1196
+ tag: {
1197
+ type: String,
1198
+ default: "div"
1199
+ },
1200
+ active: {
1201
+ type: Boolean,
1202
+ default: null
1203
+ },
1204
+ clickable: Boolean,
1205
+ dense: Boolean,
1206
+ insetLevel: Number,
1207
+ tabindex: [String, Number],
1208
+ focused: Boolean,
1209
+ manualFocus: Boolean
1210
+ },
1211
+ emits: ["click", "keyup"],
1212
+ setup(e, { slots: t, emit: l }) {
1213
+ const { proxy: { $q: n } } = ne(), o = pt(e, n), { hasLink: u, linkAttrs: a, linkClass: r, linkTag: g, navigateOnClick: b } = Rn(), s = P(null), y = P(null), v = d(
1214
+ () => e.clickable === !0 || u.value === !0 || e.tag === "label"
1215
+ ), c = d(
1216
+ () => e.disable !== !0 && v.value === !0
1217
+ ), m = d(
1218
+ () => "q-item q-item-type row no-wrap" + (e.dense === !0 ? " q-item--dense" : "") + (o.value === !0 ? " q-item--dark" : "") + (u.value === !0 && e.active === null ? r.value : e.active === !0 ? ` q-item--active${e.activeClass !== void 0 ? ` ${e.activeClass}` : ""}` : "") + (e.disable === !0 ? " disabled" : "") + (c.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" : "") : "")
1219
+ ), C = d(() => e.insetLevel === void 0 ? null : {
1220
+ ["padding" + (n.lang.rtl === !0 ? "Right" : "Left")]: 16 + e.insetLevel * 56 + "px"
1221
+ });
1222
+ function p(k) {
1223
+ c.value === !0 && (y.value !== null && (k.qKeyEvent !== !0 && document.activeElement === s.value ? y.value.focus() : document.activeElement === y.value && s.value.focus()), b(k));
1224
+ }
1225
+ function O(k) {
1226
+ if (c.value === !0 && Fe(k, [13, 32]) === !0) {
1227
+ le(k), k.qKeyEvent = !0;
1228
+ const M = new MouseEvent("click", k);
1229
+ M.qKeyEvent = !0, s.value.dispatchEvent(M);
1230
+ }
1231
+ l("keyup", k);
1232
+ }
1233
+ function T() {
1234
+ const k = Vo(t.default, []);
1235
+ return c.value === !0 && k.unshift(
1236
+ h("div", { class: "q-focus-helper", tabindex: -1, ref: y })
1237
+ ), k;
1238
+ }
1239
+ return () => {
1240
+ const k = {
1241
+ ref: s,
1242
+ class: m.value,
1243
+ style: C.value,
1244
+ role: "listitem",
1245
+ onClick: p,
1246
+ onKeyup: O
1247
+ };
1248
+ return c.value === !0 ? (k.tabindex = e.tabindex || "0", Object.assign(k, a.value)) : v.value === !0 && (k["aria-disabled"] = "true"), h(
1249
+ g.value,
1250
+ k,
1251
+ T()
1252
+ );
1253
+ };
1254
+ }
1255
+ }), Il = (e) => e ? !0 : "Обовʼязкове поле";
1256
+ let Ut, xt = 0;
1257
+ const ie = new Array(256);
1258
+ for (let e = 0; e < 256; e++)
1259
+ ie[e] = (e + 256).toString(16).substring(1);
1260
+ const yi = (() => {
1261
+ const e = typeof crypto < "u" ? crypto : typeof window < "u" ? window.crypto || window.msCrypto : void 0;
1262
+ if (e !== void 0) {
1263
+ if (e.randomBytes !== void 0)
1264
+ return e.randomBytes;
1265
+ if (e.getRandomValues !== void 0)
1266
+ return (t) => {
1267
+ const l = new Uint8Array(t);
1268
+ return e.getRandomValues(l), l;
1269
+ };
1270
+ }
1271
+ return (t) => {
1272
+ const l = [];
1273
+ for (let n = t; n > 0; n--)
1274
+ l.push(Math.floor(Math.random() * 256));
1275
+ return l;
1276
+ };
1277
+ })(), Fl = 4096;
1278
+ function ul() {
1279
+ (Ut === void 0 || xt + 16 > Fl) && (xt = 0, Ut = yi(Fl));
1280
+ const e = Array.prototype.slice.call(Ut, xt, xt += 16);
1281
+ return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, ie[e[0]] + ie[e[1]] + ie[e[2]] + ie[e[3]] + "-" + ie[e[4]] + ie[e[5]] + "-" + ie[e[6]] + ie[e[7]] + "-" + ie[e[8]] + ie[e[9]] + "-" + ie[e[10]] + ie[e[11]] + ie[e[12]] + ie[e[13]] + ie[e[14]] + ie[e[15]];
1282
+ }
1283
+ const ft = P(
875
1284
  !1
876
1285
  );
877
- let oe;
878
- function Mt(e, t) {
879
- const a = /(edg|edge|edga|edgios)\/([\w.]+)/.exec(e) || /(opr)[\/]([\w.]+)/.exec(e) || /(vivaldi)[\/]([\w.]+)/.exec(e) || /(chrome|crios)[\/]([\w.]+)/.exec(e) || /(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e) || /(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e) || /(firefox|fxios)[\/]([\w.]+)/.exec(e) || /(webkit)[\/]([\w.]+)/.exec(e) || /(opera)(?:.*version|)[\/]([\w.]+)/.exec(e) || [];
1286
+ let al;
1287
+ function wi(e, t) {
1288
+ const l = /(edg|edge|edga|edgios)\/([\w.]+)/.exec(e) || /(opr)[\/]([\w.]+)/.exec(e) || /(vivaldi)[\/]([\w.]+)/.exec(e) || /(chrome|crios)[\/]([\w.]+)/.exec(e) || /(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e) || /(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e) || /(firefox|fxios)[\/]([\w.]+)/.exec(e) || /(webkit)[\/]([\w.]+)/.exec(e) || /(opera)(?:.*version|)[\/]([\w.]+)/.exec(e) || [];
880
1289
  return {
881
- browser: a[5] || a[3] || a[1] || "",
882
- version: a[4] || a[2] || "0",
1290
+ browser: l[5] || l[3] || l[1] || "",
1291
+ version: l[4] || l[2] || "0",
883
1292
  platform: t[0] || ""
884
1293
  };
885
1294
  }
886
- function Ot(e) {
1295
+ function Si(e) {
887
1296
  return /(ipad)/.exec(e) || /(ipod)/.exec(e) || /(windows phone)/.exec(e) || /(iphone)/.exec(e) || /(kindle)/.exec(e) || /(silk)/.exec(e) || /(android)/.exec(e) || /(win)/.exec(e) || /(mac)/.exec(e) || /(linux)/.exec(e) || /(cros)/.exec(e) || /(playbook)/.exec(e) || /(bb)/.exec(e) || /(blackberry)/.exec(e) || [];
888
1297
  }
889
- const Le = "ontouchstart" in window || window.navigator.maxTouchPoints > 0;
890
- function Tt(e) {
891
- const t = e.toLowerCase(), a = Ot(t), o = Mt(t, a), n = {
1298
+ const Pn = "ontouchstart" in window || window.navigator.maxTouchPoints > 0;
1299
+ function ki(e) {
1300
+ const t = e.toLowerCase(), l = Si(t), n = wi(t, l), o = {
892
1301
  mobile: !1,
893
1302
  desktop: !1,
894
1303
  cordova: !1,
@@ -921,54 +1330,54 @@ function Tt(e) {
921
1330
  playbook: !1,
922
1331
  silk: !1
923
1332
  };
924
- o.browser && (n[o.browser] = !0, n.version = o.version, n.versionNumber = parseInt(o.version, 10)), o.platform && (n[o.platform] = !0);
925
- const s = n.android || n.ios || n.bb || n.blackberry || n.ipad || n.iphone || n.ipod || n.kindle || n.playbook || n.silk || n["windows phone"];
926
- if (s === !0 || t.indexOf("mobile") !== -1 ? n.mobile = !0 : n.desktop = !0, n["windows phone"] && (n.winphone = !0, delete n["windows phone"]), n.edga || n.edgios || n.edg ? (n.edge = !0, o.browser = "edge") : n.crios ? (n.chrome = !0, o.browser = "chrome") : n.fxios && (n.firefox = !0, o.browser = "firefox"), (n.ipod || n.ipad || n.iphone) && (n.ios = !0), n.vivaldi && (o.browser = "vivaldi", n.vivaldi = !0), // Chrome, Opera 15+, Vivaldi and Safari are webkit based browsers
927
- (n.chrome || n.opr || n.safari || n.vivaldi || n.mobile === !0 && n.ios !== !0 && s !== !0) && (n.webkit = !0), n.opr && (o.browser = "opera", n.opera = !0), n.safari && (n.blackberry || n.bb ? (o.browser = "blackberry", n.blackberry = !0) : n.playbook ? (o.browser = "playbook", n.playbook = !0) : n.android ? (o.browser = "android", n.android = !0) : n.kindle ? (o.browser = "kindle", n.kindle = !0) : n.silk && (o.browser = "silk", n.silk = !0)), n.name = o.browser, n.platform = o.platform, t.indexOf("electron") !== -1)
928
- n.electron = !0;
1333
+ n.browser && (o[n.browser] = !0, o.version = n.version, o.versionNumber = parseInt(n.version, 10)), n.platform && (o[n.platform] = !0);
1334
+ const u = o.android || o.ios || o.bb || o.blackberry || o.ipad || o.iphone || o.ipod || o.kindle || o.playbook || o.silk || o["windows phone"];
1335
+ if (u === !0 || t.indexOf("mobile") !== -1 ? o.mobile = !0 : o.desktop = !0, o["windows phone"] && (o.winphone = !0, delete o["windows phone"]), o.edga || o.edgios || o.edg ? (o.edge = !0, n.browser = "edge") : o.crios ? (o.chrome = !0, n.browser = "chrome") : o.fxios && (o.firefox = !0, n.browser = "firefox"), (o.ipod || o.ipad || o.iphone) && (o.ios = !0), o.vivaldi && (n.browser = "vivaldi", o.vivaldi = !0), // Chrome, Opera 15+, Vivaldi and Safari are webkit based browsers
1336
+ (o.chrome || o.opr || o.safari || o.vivaldi || o.mobile === !0 && o.ios !== !0 && u !== !0) && (o.webkit = !0), o.opr && (n.browser = "opera", o.opera = !0), o.safari && (o.blackberry || o.bb ? (n.browser = "blackberry", o.blackberry = !0) : o.playbook ? (n.browser = "playbook", o.playbook = !0) : o.android ? (n.browser = "android", o.android = !0) : o.kindle ? (n.browser = "kindle", o.kindle = !0) : o.silk && (n.browser = "silk", o.silk = !0)), o.name = n.browser, o.platform = n.platform, t.indexOf("electron") !== -1)
1337
+ o.electron = !0;
929
1338
  else if (document.location.href.indexOf("-extension://") !== -1)
930
- n.bex = !0;
1339
+ o.bex = !0;
931
1340
  else {
932
- if (window.Capacitor !== void 0 ? (n.capacitor = !0, n.nativeMobile = !0, n.nativeMobileWrapper = "capacitor") : (window._cordovaNative !== void 0 || window.cordova !== void 0) && (n.cordova = !0, n.nativeMobile = !0, n.nativeMobileWrapper = "cordova"), Q.value === !0 && (oe = { is: { ...n } }), Le === !0 && n.mac === !0 && (n.desktop === !0 && n.safari === !0 || n.nativeMobile === !0 && n.android !== !0 && n.ios !== !0 && n.ipad !== !0)) {
933
- delete n.mac, delete n.desktop;
934
- const u = Math.min(window.innerHeight, window.innerWidth) > 414 ? "ipad" : "iphone";
935
- Object.assign(n, {
1341
+ if (window.Capacitor !== void 0 ? (o.capacitor = !0, o.nativeMobile = !0, o.nativeMobileWrapper = "capacitor") : (window._cordovaNative !== void 0 || window.cordova !== void 0) && (o.cordova = !0, o.nativeMobile = !0, o.nativeMobileWrapper = "cordova"), ft.value === !0 && (al = { is: { ...o } }), Pn === !0 && o.mac === !0 && (o.desktop === !0 && o.safari === !0 || o.nativeMobile === !0 && o.android !== !0 && o.ios !== !0 && o.ipad !== !0)) {
1342
+ delete o.mac, delete o.desktop;
1343
+ const a = Math.min(window.innerHeight, window.innerWidth) > 414 ? "ipad" : "iphone";
1344
+ Object.assign(o, {
936
1345
  mobile: !0,
937
1346
  ios: !0,
938
- platform: u,
939
- [u]: !0
1347
+ platform: a,
1348
+ [a]: !0
940
1349
  });
941
1350
  }
942
- n.mobile !== !0 && window.navigator.userAgentData && window.navigator.userAgentData.mobile && (delete n.desktop, n.mobile = !0);
1351
+ o.mobile !== !0 && window.navigator.userAgentData && window.navigator.userAgentData.mobile && (delete o.desktop, o.mobile = !0);
943
1352
  }
944
- return n;
1353
+ return o;
945
1354
  }
946
- const be = navigator.userAgent || navigator.vendor || window.opera, jt = {
1355
+ const Hl = navigator.userAgent || navigator.vendor || window.opera, xi = {
947
1356
  has: {
948
1357
  touch: !1,
949
1358
  webStorage: !1
950
1359
  },
951
1360
  within: { iframe: !1 }
952
- }, G = {
953
- userAgent: be,
954
- is: Tt(be),
1361
+ }, ve = {
1362
+ userAgent: Hl,
1363
+ is: ki(Hl),
955
1364
  has: {
956
- touch: Le
1365
+ touch: Pn
957
1366
  },
958
1367
  within: {
959
1368
  iframe: window.self !== window.top
960
1369
  }
961
- }, ge = {
1370
+ }, rl = {
962
1371
  install(e) {
963
1372
  const { $q: t } = e;
964
- Q.value === !0 ? (e.onSSRHydrated.push(() => {
965
- Object.assign(t.platform, G), Q.value = !1;
966
- }), t.platform = Ae(this)) : t.platform = this;
1373
+ ft.value === !0 ? (e.onSSRHydrated.push(() => {
1374
+ Object.assign(t.platform, ve), ft.value = !1;
1375
+ }), t.platform = So(this)) : t.platform = this;
967
1376
  }
968
1377
  };
969
1378
  {
970
1379
  let e;
971
- Ye(G.has, "webStorage", () => {
1380
+ dl(ve.has, "webStorage", () => {
972
1381
  if (e !== void 0)
973
1382
  return e;
974
1383
  try {
@@ -977,79 +1386,3066 @@ const be = navigator.userAgent || navigator.vendor || window.opera, jt = {
977
1386
  } catch {
978
1387
  }
979
1388
  return e = !1, !1;
980
- }), Object.assign(ge, G), Q.value === !0 && (Object.assign(ge, oe, jt), oe = null);
1389
+ }), Object.assign(rl, ve), ft.value === !0 && (Object.assign(rl, al, xi), al = null);
981
1390
  }
982
- const R = [];
983
- function Pe(e) {
984
- R[R.length - 1](e);
1391
+ function Ci(e) {
1392
+ return e ?? null;
985
1393
  }
986
- function zt(e) {
987
- G.is.desktop === !0 && (R.push(e), R.length === 1 && document.body.addEventListener("focusin", Pe));
1394
+ function Dl(e, t) {
1395
+ return e ?? (t === !0 ? `f_${ul()}` : null);
988
1396
  }
989
- function It(e) {
990
- const t = R.indexOf(e);
991
- t !== -1 && (R.splice(t, 1), R.length === 0 && document.body.removeEventListener("focusin", Pe));
1397
+ function qi({ getValue: e, required: t = !0 } = {}) {
1398
+ if (ft.value === !0) {
1399
+ const l = e !== void 0 ? P(Ci(e())) : P(null);
1400
+ return t === !0 && l.value === null && gt(() => {
1401
+ l.value = `f_${ul()}`;
1402
+ }), e !== void 0 && Z(e, (n) => {
1403
+ l.value = Dl(n, t);
1404
+ }), l;
1405
+ }
1406
+ return e !== void 0 ? d(() => Dl(e(), t)) : P(`f_${ul()}`);
992
1407
  }
993
- function Dt(e) {
994
- const t = document.createElement("textarea");
995
- t.value = e, t.contentEditable = "true", t.style.position = "fixed";
996
- const a = () => {
1408
+ const jl = /^on[A-Z]/;
1409
+ function _i() {
1410
+ const { attrs: e, vnode: t } = ne(), l = {
1411
+ listeners: P({}),
1412
+ attributes: P({})
997
1413
  };
998
- zt(a), document.body.appendChild(t), t.focus(), t.select();
999
- const o = document.execCommand("copy");
1000
- return t.remove(), It(a), o;
1001
- }
1002
- function Nt(e) {
1003
- return navigator.clipboard !== void 0 ? navigator.clipboard.writeText(e) : new Promise((t, a) => {
1004
- const o = Dt(e);
1005
- o ? t(!0) : a(o);
1414
+ function n() {
1415
+ const o = {}, u = {};
1416
+ for (const a in e)
1417
+ a !== "class" && a !== "style" && jl.test(a) === !1 && (o[a] = e[a]);
1418
+ for (const a in t.props)
1419
+ jl.test(a) === !0 && (u[a] = t.props[a]);
1420
+ l.attributes.value = o, l.listeners.value = u;
1421
+ }
1422
+ return mn(n), n(), l;
1423
+ }
1424
+ const Ei = "_q_fo_";
1425
+ function Bi({ validate: e, resetValidation: t, requiresQForm: l }) {
1426
+ const n = ko(Ei, !1);
1427
+ if (n !== !1) {
1428
+ const { props: o, proxy: u } = ne();
1429
+ Object.assign(u, { validate: e, resetValidation: t }), Z(() => o.disable, (a) => {
1430
+ a === !0 ? (typeof t == "function" && t(), n.unbindComponent(u)) : n.bindComponent(u);
1431
+ }), gt(() => {
1432
+ o.disable !== !0 && n.bindComponent(u);
1433
+ }), me(() => {
1434
+ o.disable !== !0 && n.unbindComponent(u);
1435
+ });
1436
+ } else l === !0 && console.error("Parent QForm not found on useFormChild()!");
1437
+ }
1438
+ const Nl = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/, Wl = /^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/, Kl = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, Ct = /^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])\)$/, qt = /^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)\)$/, Yt = {
1439
+ date: (e) => /^-?[\d]+\/[0-1]\d\/[0-3]\d$/.test(e),
1440
+ time: (e) => /^([0-1]?\d|2[0-3]):[0-5]\d$/.test(e),
1441
+ fulltime: (e) => /^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(e),
1442
+ timeOrFulltime: (e) => /^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/.test(e),
1443
+ // -- RFC 5322 --
1444
+ // -- Added in v2.6.6 --
1445
+ // This is a basic helper validation.
1446
+ // For something more complex (like RFC 822) you should write and use your own rule.
1447
+ // We won't be accepting PRs to enhance the one below because of the reason above.
1448
+ // eslint-disable-next-line
1449
+ 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),
1450
+ hexColor: (e) => Nl.test(e),
1451
+ hexaColor: (e) => Wl.test(e),
1452
+ hexOrHexaColor: (e) => Kl.test(e),
1453
+ rgbColor: (e) => Ct.test(e),
1454
+ rgbaColor: (e) => qt.test(e),
1455
+ rgbOrRgbaColor: (e) => Ct.test(e) || qt.test(e),
1456
+ hexOrRgbColor: (e) => Nl.test(e) || Ct.test(e),
1457
+ hexaOrRgbaColor: (e) => Wl.test(e) || qt.test(e),
1458
+ anyColor: (e) => Kl.test(e) || Ct.test(e) || qt.test(e)
1459
+ };
1460
+ function zn(e, t = 250, l) {
1461
+ let n = null;
1462
+ function o() {
1463
+ const u = arguments, a = () => {
1464
+ n = null, e.apply(this, u);
1465
+ };
1466
+ n !== null && clearTimeout(n), n = setTimeout(a, t);
1467
+ }
1468
+ return o.cancel = () => {
1469
+ n !== null && clearTimeout(n);
1470
+ }, o;
1471
+ }
1472
+ const Vi = [!0, !1, "ondemand"], Ti = {
1473
+ modelValue: {},
1474
+ error: {
1475
+ type: Boolean,
1476
+ default: null
1477
+ },
1478
+ errorMessage: String,
1479
+ noErrorIcon: Boolean,
1480
+ rules: Array,
1481
+ reactiveRules: Boolean,
1482
+ lazyRules: {
1483
+ type: [Boolean, String],
1484
+ default: !1,
1485
+ // statement unneeded but avoids future vue implementation changes
1486
+ validator: (e) => Vi.includes(e)
1487
+ }
1488
+ };
1489
+ function $i(e, t) {
1490
+ const { props: l, proxy: n } = ne(), o = P(!1), u = P(null), a = P(!1);
1491
+ Bi({ validate: C, resetValidation: m });
1492
+ let r = 0, g;
1493
+ const b = d(
1494
+ () => l.rules !== void 0 && l.rules !== null && l.rules.length !== 0
1495
+ ), s = d(() => l.disable !== !0 && b.value === !0 && t.value === !1), y = d(
1496
+ () => l.error === !0 || o.value === !0
1497
+ ), v = d(() => typeof l.errorMessage == "string" && l.errorMessage.length !== 0 ? l.errorMessage : u.value);
1498
+ Z(() => l.modelValue, () => {
1499
+ a.value = !0, s.value === !0 && l.lazyRules === !1 && p();
1500
+ });
1501
+ function c() {
1502
+ l.lazyRules !== "ondemand" && s.value === !0 && a.value === !0 && p();
1503
+ }
1504
+ Z(() => l.reactiveRules, (O) => {
1505
+ O === !0 ? g === void 0 && (g = Z(() => l.rules, c, { immediate: !0, deep: !0 })) : g !== void 0 && (g(), g = void 0);
1506
+ }, { immediate: !0 }), Z(() => l.lazyRules, c), Z(e, (O) => {
1507
+ O === !0 ? a.value = !0 : s.value === !0 && l.lazyRules !== "ondemand" && p();
1006
1508
  });
1509
+ function m() {
1510
+ r++, t.value = !1, a.value = !1, o.value = !1, u.value = null, p.cancel();
1511
+ }
1512
+ function C(O = l.modelValue) {
1513
+ if (l.disable === !0 || b.value === !1)
1514
+ return !0;
1515
+ const T = ++r, k = t.value !== !0 ? () => {
1516
+ a.value = !0;
1517
+ } : () => {
1518
+ }, M = (V, A) => {
1519
+ V === !0 && k(), o.value = V, u.value = A || null, t.value = !1;
1520
+ }, R = [];
1521
+ for (let V = 0; V < l.rules.length; V++) {
1522
+ const A = l.rules[V];
1523
+ let z;
1524
+ if (typeof A == "function" ? z = A(O, Yt) : typeof A == "string" && Yt[A] !== void 0 && (z = Yt[A](O)), z === !1 || typeof z == "string")
1525
+ return M(!0, z), !1;
1526
+ z !== !0 && z !== void 0 && R.push(z);
1527
+ }
1528
+ return R.length === 0 ? (M(!1), !0) : (t.value = !0, Promise.all(R).then(
1529
+ (V) => {
1530
+ if (V === void 0 || Array.isArray(V) === !1 || V.length === 0)
1531
+ return T === r && M(!1), !0;
1532
+ const A = V.find((z) => z === !1 || typeof z == "string");
1533
+ return T === r && M(A !== void 0, A), A === void 0;
1534
+ },
1535
+ (V) => (T === r && (console.error(V), M(!0)), !1)
1536
+ ));
1537
+ }
1538
+ const p = zn(C, 0);
1539
+ return me(() => {
1540
+ g !== void 0 && g(), p.cancel();
1541
+ }), Object.assign(n, { resetValidation: m, validate: C }), dl(n, "hasError", () => y.value), {
1542
+ isDirtyModel: a,
1543
+ hasRules: b,
1544
+ hasError: y,
1545
+ errorMessage: v,
1546
+ validate: C,
1547
+ resetValidation: m
1548
+ };
1007
1549
  }
1008
- const ee = {
1009
- COPY: "copy_o",
1010
- COPIED: "copied_o"
1011
- }, At = /* @__PURE__ */ U({
1012
- __name: "index",
1550
+ let Oe = [], vt = [];
1551
+ function In(e) {
1552
+ vt = vt.filter((t) => t !== e);
1553
+ }
1554
+ function Ri(e) {
1555
+ In(e), vt.push(e);
1556
+ }
1557
+ function Ql(e) {
1558
+ In(e), vt.length === 0 && Oe.length !== 0 && (Oe[Oe.length - 1](), Oe = []);
1559
+ }
1560
+ function vl(e) {
1561
+ vt.length === 0 ? e() : Oe.push(e);
1562
+ }
1563
+ function Li(e) {
1564
+ Oe = Oe.filter((t) => t !== e);
1565
+ }
1566
+ function sl(e) {
1567
+ return e != null && ("" + e).length !== 0;
1568
+ }
1569
+ const Mi = {
1570
+ ...ht,
1571
+ ...Ti,
1572
+ label: String,
1573
+ stackLabel: Boolean,
1574
+ hint: String,
1575
+ hideHint: Boolean,
1576
+ prefix: String,
1577
+ suffix: String,
1578
+ labelColor: String,
1579
+ color: String,
1580
+ bgColor: String,
1581
+ filled: Boolean,
1582
+ outlined: Boolean,
1583
+ borderless: Boolean,
1584
+ standout: [Boolean, String],
1585
+ square: Boolean,
1586
+ loading: Boolean,
1587
+ labelSlot: Boolean,
1588
+ bottomSlots: Boolean,
1589
+ hideBottomSpace: Boolean,
1590
+ rounded: Boolean,
1591
+ dense: Boolean,
1592
+ itemAligned: Boolean,
1593
+ counter: Boolean,
1594
+ clearable: Boolean,
1595
+ clearIcon: String,
1596
+ disable: Boolean,
1597
+ readonly: Boolean,
1598
+ autofocus: Boolean,
1599
+ for: String
1600
+ }, ml = {
1601
+ ...Mi,
1602
+ maxlength: [Number, String]
1603
+ }, Fn = ["update:modelValue", "clear", "focus", "blur"];
1604
+ function Hn({ requiredForAttr: e = !0, tagProp: t, changeEvent: l = !1 } = {}) {
1605
+ const { props: n, proxy: o } = ne(), u = pt(n, o.$q), a = qi({
1606
+ required: e,
1607
+ getValue: () => n.for
1608
+ });
1609
+ return {
1610
+ requiredForAttr: e,
1611
+ changeEvent: l,
1612
+ tag: t === !0 ? d(() => n.tag) : { value: "label" },
1613
+ isDark: u,
1614
+ editable: d(
1615
+ () => n.disable !== !0 && n.readonly !== !0
1616
+ ),
1617
+ innerLoading: P(!1),
1618
+ focused: P(!1),
1619
+ hasPopupOpen: !1,
1620
+ splitAttrs: _i(),
1621
+ targetUid: a,
1622
+ rootRef: P(null),
1623
+ targetRef: P(null),
1624
+ controlRef: P(null)
1625
+ /**
1626
+ * user supplied additionals:
1627
+
1628
+ * innerValue - computed
1629
+ * floatingLabel - computed
1630
+ * inputRef - computed
1631
+
1632
+ * fieldClass - computed
1633
+ * hasShadow - computed
1634
+
1635
+ * controlEvents - Object with fn(e)
1636
+
1637
+ * getControl - fn
1638
+ * getInnerAppend - fn
1639
+ * getControlChild - fn
1640
+ * getShadowControl - fn
1641
+ * showPopup - fn
1642
+ */
1643
+ };
1644
+ }
1645
+ function Dn(e) {
1646
+ const { props: t, emit: l, slots: n, attrs: o, proxy: u } = ne(), { $q: a } = u;
1647
+ let r = null;
1648
+ e.hasValue === void 0 && (e.hasValue = d(() => sl(t.modelValue))), e.emitValue === void 0 && (e.emitValue = (E) => {
1649
+ l("update:modelValue", E);
1650
+ }), e.controlEvents === void 0 && (e.controlEvents = {
1651
+ onFocusin: N,
1652
+ onFocusout: J
1653
+ }), Object.assign(e, {
1654
+ clearValue: U,
1655
+ onControlFocusin: N,
1656
+ onControlFocusout: J,
1657
+ focus: A
1658
+ }), e.computedCounter === void 0 && (e.computedCounter = d(() => {
1659
+ if (t.counter !== !1) {
1660
+ const E = typeof t.modelValue == "string" || typeof t.modelValue == "number" ? ("" + t.modelValue).length : Array.isArray(t.modelValue) === !0 ? t.modelValue.length : 0, I = t.maxlength !== void 0 ? t.maxlength : t.maxValues;
1661
+ return E + (I !== void 0 ? " / " + I : "");
1662
+ }
1663
+ }));
1664
+ const {
1665
+ isDirtyModel: g,
1666
+ hasRules: b,
1667
+ hasError: s,
1668
+ errorMessage: y,
1669
+ resetValidation: v
1670
+ } = $i(e.focused, e.innerLoading), c = e.floatingLabel !== void 0 ? d(() => t.stackLabel === !0 || e.focused.value === !0 || e.floatingLabel.value === !0) : d(() => t.stackLabel === !0 || e.focused.value === !0 || e.hasValue.value === !0), m = d(
1671
+ () => t.bottomSlots === !0 || t.hint !== void 0 || b.value === !0 || t.counter === !0 || t.error !== null
1672
+ ), C = d(() => t.filled === !0 ? "filled" : t.outlined === !0 ? "outlined" : t.borderless === !0 ? "borderless" : t.standout ? "standout" : "standard"), p = d(
1673
+ () => `q-field row no-wrap items-start q-field--${C.value}` + (e.fieldClass !== void 0 ? ` ${e.fieldClass.value}` : "") + (t.rounded === !0 ? " q-field--rounded" : "") + (t.square === !0 ? " q-field--square" : "") + (c.value === !0 ? " q-field--float" : "") + (T.value === !0 ? " q-field--labeled" : "") + (t.dense === !0 ? " q-field--dense" : "") + (t.itemAligned === !0 ? " q-field--item-aligned q-item-type" : "") + (e.isDark.value === !0 ? " q-field--dark" : "") + (e.getControl === void 0 ? " q-field--auto-height" : "") + (e.focused.value === !0 ? " q-field--focused" : "") + (s.value === !0 ? " q-field--error" : "") + (s.value === !0 || e.focused.value === !0 ? " q-field--highlighted" : "") + (t.hideBottomSpace !== !0 && m.value === !0 ? " q-field--with-bottom" : "") + (t.disable === !0 ? " q-field--disabled" : t.readonly === !0 ? " q-field--readonly" : "")
1674
+ ), O = d(
1675
+ () => "q-field__control relative-position row no-wrap" + (t.bgColor !== void 0 ? ` bg-${t.bgColor}` : "") + (s.value === !0 ? " text-negative" : typeof t.standout == "string" && t.standout.length !== 0 && e.focused.value === !0 ? ` ${t.standout}` : t.color !== void 0 ? ` text-${t.color}` : "")
1676
+ ), T = d(
1677
+ () => t.labelSlot === !0 || t.label !== void 0
1678
+ ), k = d(
1679
+ () => "q-field__label no-pointer-events absolute ellipsis" + (t.labelColor !== void 0 && s.value !== !0 ? ` text-${t.labelColor}` : "")
1680
+ ), M = d(() => ({
1681
+ id: e.targetUid.value,
1682
+ editable: e.editable.value,
1683
+ focused: e.focused.value,
1684
+ floatingLabel: c.value,
1685
+ modelValue: t.modelValue,
1686
+ emitValue: e.emitValue
1687
+ })), R = d(() => {
1688
+ const E = {};
1689
+ return e.targetUid.value && (E.for = e.targetUid.value), t.disable === !0 && (E["aria-disabled"] = "true"), E;
1690
+ });
1691
+ function V() {
1692
+ const E = document.activeElement;
1693
+ let I = e.targetRef !== void 0 && e.targetRef.value;
1694
+ I && (E === null || E.id !== e.targetUid.value) && (I.hasAttribute("tabindex") === !0 || (I = I.querySelector("[tabindex]")), I && I !== E && I.focus({ preventScroll: !0 }));
1695
+ }
1696
+ function A() {
1697
+ vl(V);
1698
+ }
1699
+ function z() {
1700
+ Li(V);
1701
+ const E = document.activeElement;
1702
+ E !== null && e.rootRef.value.contains(E) && E.blur();
1703
+ }
1704
+ function N(E) {
1705
+ r !== null && (clearTimeout(r), r = null), e.editable.value === !0 && e.focused.value === !1 && (e.focused.value = !0, l("focus", E));
1706
+ }
1707
+ function J(E, I) {
1708
+ r !== null && clearTimeout(r), r = setTimeout(() => {
1709
+ r = 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, l("blur", E)), I !== void 0 && I());
1710
+ });
1711
+ }
1712
+ function U(E) {
1713
+ le(E), 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(), t.type === "file" && (e.inputRef.value.value = null), l("update:modelValue", null), e.changeEvent === !0 && l("change", null), l("clear", t.modelValue), fe(() => {
1714
+ const I = g.value;
1715
+ v(), g.value = I;
1716
+ });
1717
+ }
1718
+ function L(E) {
1719
+ [13, 32].includes(E.keyCode) && U(E);
1720
+ }
1721
+ function K() {
1722
+ const E = [];
1723
+ return n.prepend !== void 0 && E.push(
1724
+ h("div", {
1725
+ class: "q-field__prepend q-field__marginal row no-wrap items-center",
1726
+ key: "prepend",
1727
+ onClick: be
1728
+ }, n.prepend())
1729
+ ), E.push(
1730
+ h("div", {
1731
+ class: "q-field__control-container col relative-position row no-wrap q-anchor--skip"
1732
+ }, B())
1733
+ ), s.value === !0 && t.noErrorIcon === !1 && E.push(
1734
+ X("error", [
1735
+ h(_e, { name: a.iconSet.field.error, color: "negative" })
1736
+ ])
1737
+ ), t.loading === !0 || e.innerLoading.value === !0 ? E.push(
1738
+ X(
1739
+ "inner-loading-append",
1740
+ n.loading !== void 0 ? n.loading() : [h(kn, { color: t.color })]
1741
+ )
1742
+ ) : t.clearable === !0 && e.hasValue.value === !0 && e.editable.value === !0 && E.push(
1743
+ X("inner-clearable-append", [
1744
+ h(_e, {
1745
+ class: "q-field__focusable-action",
1746
+ name: t.clearIcon || a.iconSet.field.clear,
1747
+ tabindex: 0,
1748
+ role: "button",
1749
+ "aria-hidden": "false",
1750
+ "aria-label": a.lang.label.clear,
1751
+ onKeyup: L,
1752
+ onClick: U
1753
+ })
1754
+ ])
1755
+ ), n.append !== void 0 && E.push(
1756
+ h("div", {
1757
+ class: "q-field__append q-field__marginal row no-wrap items-center",
1758
+ key: "append",
1759
+ onClick: be
1760
+ }, n.append())
1761
+ ), e.getInnerAppend !== void 0 && E.push(
1762
+ X("inner-append", e.getInnerAppend())
1763
+ ), e.getControlChild !== void 0 && E.push(
1764
+ e.getControlChild()
1765
+ ), E;
1766
+ }
1767
+ function B() {
1768
+ const E = [];
1769
+ return t.prefix !== void 0 && t.prefix !== null && E.push(
1770
+ h("div", {
1771
+ class: "q-field__prefix no-pointer-events row items-center"
1772
+ }, t.prefix)
1773
+ ), e.getShadowControl !== void 0 && e.hasShadow.value === !0 && E.push(
1774
+ e.getShadowControl()
1775
+ ), e.getControl !== void 0 ? E.push(e.getControl()) : n.rawControl !== void 0 ? E.push(n.rawControl()) : n.control !== void 0 && E.push(
1776
+ h("div", {
1777
+ ref: e.targetRef,
1778
+ class: "q-field__native row",
1779
+ tabindex: -1,
1780
+ ...e.splitAttrs.attributes.value,
1781
+ "data-autofocus": t.autofocus === !0 || void 0
1782
+ }, n.control(M.value))
1783
+ ), T.value === !0 && E.push(
1784
+ h("div", {
1785
+ class: k.value
1786
+ }, ke(n.label, t.label))
1787
+ ), t.suffix !== void 0 && t.suffix !== null && E.push(
1788
+ h("div", {
1789
+ class: "q-field__suffix no-pointer-events row items-center"
1790
+ }, t.suffix)
1791
+ ), E.concat(ke(n.default));
1792
+ }
1793
+ function D() {
1794
+ let E, I;
1795
+ s.value === !0 ? y.value !== null ? (E = [h("div", { role: "alert" }, y.value)], I = `q--slot-error-${y.value}`) : (E = ke(n.error), I = "q--slot-error") : (t.hideHint !== !0 || e.focused.value === !0) && (t.hint !== void 0 ? (E = [h("div", t.hint)], I = `q--slot-hint-${t.hint}`) : (E = ke(n.hint), I = "q--slot-hint"));
1796
+ const se = t.counter === !0 || n.counter !== void 0;
1797
+ if (t.hideBottomSpace === !0 && se === !1 && E === void 0)
1798
+ return;
1799
+ const f = h("div", {
1800
+ key: I,
1801
+ class: "q-field__messages col"
1802
+ }, E);
1803
+ return h("div", {
1804
+ class: "q-field__bottom row items-start q-field__bottom--" + (t.hideBottomSpace !== !0 ? "animated" : "stale"),
1805
+ onClick: be
1806
+ }, [
1807
+ t.hideBottomSpace === !0 ? f : h(dt, { name: "q-transition--field-message" }, () => f),
1808
+ se === !0 ? h("div", {
1809
+ class: "q-field__counter"
1810
+ }, n.counter !== void 0 ? n.counter() : e.computedCounter.value) : null
1811
+ ]);
1812
+ }
1813
+ function X(E, I) {
1814
+ return I === null ? null : h("div", {
1815
+ key: E,
1816
+ class: "q-field__append q-field__marginal row no-wrap items-center q-anchor--skip"
1817
+ }, I);
1818
+ }
1819
+ let ae = !1;
1820
+ return Pt(() => {
1821
+ ae = !0;
1822
+ }), gn(() => {
1823
+ ae === !0 && t.autofocus === !0 && u.focus();
1824
+ }), t.autofocus === !0 && gt(() => {
1825
+ u.focus();
1826
+ }), me(() => {
1827
+ r !== null && clearTimeout(r);
1828
+ }), Object.assign(u, { focus: A, blur: z }), function() {
1829
+ const I = e.getControl === void 0 && n.control === void 0 ? {
1830
+ ...e.splitAttrs.attributes.value,
1831
+ "data-autofocus": t.autofocus === !0 || void 0,
1832
+ ...R.value
1833
+ } : R.value;
1834
+ return h(e.tag.value, {
1835
+ ref: e.rootRef,
1836
+ class: [
1837
+ p.value,
1838
+ o.class
1839
+ ],
1840
+ style: o.style,
1841
+ ...I
1842
+ }, [
1843
+ n.before !== void 0 ? h("div", {
1844
+ class: "q-field__before q-field__marginal row no-wrap items-center",
1845
+ onClick: be
1846
+ }, n.before()) : null,
1847
+ h("div", {
1848
+ class: "q-field__inner relative-position col self-stretch"
1849
+ }, [
1850
+ h("div", {
1851
+ ref: e.controlRef,
1852
+ class: O.value,
1853
+ tabindex: -1,
1854
+ ...e.controlEvents
1855
+ }, K()),
1856
+ m.value === !0 ? D() : null
1857
+ ]),
1858
+ n.after !== void 0 ? h("div", {
1859
+ class: "q-field__after q-field__marginal row no-wrap items-center",
1860
+ onClick: be
1861
+ }, n.after()) : null
1862
+ ]);
1863
+ };
1864
+ }
1865
+ const Ai = ge({
1866
+ name: "QField",
1867
+ inheritAttrs: !1,
1013
1868
  props: {
1014
- text: {},
1015
- size: {},
1016
- transparent: { type: Boolean, default: !0 },
1017
- flat: { type: Boolean },
1018
- rounded: { type: Boolean },
1019
- color: { default: ke.INFO },
1020
- iconLeft: {},
1021
- iconRight: {},
1022
- iconMiddle: {},
1023
- disabled: { type: Boolean },
1024
- loading: { type: Boolean },
1025
- to: {},
1026
- href: {},
1027
- target: {},
1028
- submit: { type: Boolean },
1029
- ariaLabel: {},
1030
- label: {}
1869
+ ...ml,
1870
+ tag: {
1871
+ type: String,
1872
+ default: "label"
1873
+ }
1031
1874
  },
1032
- setup(e) {
1033
- const t = e, a = W(ee.COPY), o = () => {
1034
- a.value = ee.COPIED, setTimeout(() => {
1035
- a.value = ee.COPY;
1036
- }, 2e3);
1037
- }, n = () => {
1038
- Nt(t.text).then(o).catch((s) => {
1039
- console.log(s);
1040
- });
1875
+ emits: Fn,
1876
+ setup() {
1877
+ return Dn(
1878
+ Hn({ tagProp: !0 })
1879
+ );
1880
+ }
1881
+ }), Oi = {
1882
+ xs: 8,
1883
+ sm: 10,
1884
+ md: 14,
1885
+ lg: 20,
1886
+ xl: 24
1887
+ }, Pi = ge({
1888
+ name: "QChip",
1889
+ props: {
1890
+ ...ht,
1891
+ ...zt,
1892
+ dense: Boolean,
1893
+ icon: String,
1894
+ iconRight: String,
1895
+ iconRemove: String,
1896
+ iconSelected: String,
1897
+ label: [String, Number],
1898
+ color: String,
1899
+ textColor: String,
1900
+ modelValue: {
1901
+ type: Boolean,
1902
+ default: !0
1903
+ },
1904
+ selected: {
1905
+ type: Boolean,
1906
+ default: null
1907
+ },
1908
+ square: Boolean,
1909
+ outline: Boolean,
1910
+ clickable: Boolean,
1911
+ removable: Boolean,
1912
+ removeAriaLabel: String,
1913
+ tabindex: [String, Number],
1914
+ disable: Boolean,
1915
+ ripple: {
1916
+ type: [Boolean, Object],
1917
+ default: !0
1918
+ }
1919
+ },
1920
+ emits: ["update:modelValue", "update:selected", "remove", "click"],
1921
+ setup(e, { slots: t, emit: l }) {
1922
+ const { proxy: { $q: n } } = ne(), o = pt(e, n), u = It(e, Oi), a = d(() => e.selected === !0 || e.icon !== void 0), r = d(() => e.selected === !0 ? e.iconSelected || n.iconSet.chip.selected : e.icon), g = d(() => e.iconRemove || n.iconSet.chip.remove), b = d(
1923
+ () => e.disable === !1 && (e.clickable === !0 || e.selected !== null)
1924
+ ), s = d(() => {
1925
+ const p = e.outline === !0 && e.color || e.textColor;
1926
+ return "q-chip row inline no-wrap items-center" + (e.outline === !1 && e.color !== void 0 ? ` bg-${e.color}` : "") + (p ? ` text-${p} 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" : "") + (b.value === !0 ? " q-chip--clickable cursor-pointer non-selectable q-hoverable" : "") + (e.square === !0 ? " q-chip--square" : "") + (o.value === !0 ? " q-chip--dark q-dark" : "");
1927
+ }), y = d(() => {
1928
+ const p = e.disable === !0 ? { tabindex: -1, "aria-disabled": "true" } : { tabindex: e.tabindex || 0 }, O = {
1929
+ ...p,
1930
+ role: "button",
1931
+ "aria-hidden": "false",
1932
+ "aria-label": e.removeAriaLabel || n.lang.label.remove
1933
+ };
1934
+ return { chip: p, remove: O };
1935
+ });
1936
+ function v(p) {
1937
+ p.keyCode === 13 && c(p);
1938
+ }
1939
+ function c(p) {
1940
+ e.disable || (l("update:selected", !e.selected), l("click", p));
1941
+ }
1942
+ function m(p) {
1943
+ (p.keyCode === void 0 || p.keyCode === 13) && (le(p), e.disable === !1 && (l("update:modelValue", !1), l("remove")));
1944
+ }
1945
+ function C() {
1946
+ const p = [];
1947
+ b.value === !0 && p.push(
1948
+ h("div", { class: "q-focus-helper" })
1949
+ ), a.value === !0 && p.push(
1950
+ h(_e, {
1951
+ class: "q-chip__icon q-chip__icon--left",
1952
+ name: r.value
1953
+ })
1954
+ );
1955
+ const O = e.label !== void 0 ? [h("div", { class: "ellipsis" }, [e.label])] : void 0;
1956
+ return p.push(
1957
+ h("div", {
1958
+ class: "q-chip__content col row no-wrap items-center q-anchor--skip"
1959
+ }, To(t.default, O))
1960
+ ), e.iconRight && p.push(
1961
+ h(_e, {
1962
+ class: "q-chip__icon q-chip__icon--right",
1963
+ name: e.iconRight
1964
+ })
1965
+ ), e.removable === !0 && p.push(
1966
+ h(_e, {
1967
+ class: "q-chip__icon q-chip__icon--remove cursor-pointer",
1968
+ name: g.value,
1969
+ ...y.value.remove,
1970
+ onClick: m,
1971
+ onKeyup: m
1972
+ })
1973
+ ), p;
1974
+ }
1975
+ return () => {
1976
+ if (e.modelValue === !1) return;
1977
+ const p = {
1978
+ class: s.value,
1979
+ style: u.value
1980
+ };
1981
+ return b.value === !0 && Object.assign(
1982
+ p,
1983
+ y.value.chip,
1984
+ { onClick: c, onKeyup: v }
1985
+ ), $o(
1986
+ "div",
1987
+ p,
1988
+ C(),
1989
+ "ripple",
1990
+ e.ripple !== !1 && e.disable !== !0,
1991
+ () => [[En, e.ripple]]
1992
+ );
1041
1993
  };
1042
- return (s, u) => (I(), ye(V(Bt), Ke(t, {
1043
- "icon-middle": a.value,
1044
- onClick: Fe(n, ["prevent"])
1045
- }), null, 16, ["icon-middle"]));
1046
1994
  }
1047
- }), Kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1048
- __proto__: null,
1049
- default: At
1050
- }, Symbol.toStringTag, { value: "Module" }));
1995
+ });
1996
+ function zi() {
1997
+ if (window.getSelection !== void 0) {
1998
+ const e = window.getSelection();
1999
+ e.empty !== void 0 ? e.empty() : e.removeAllRanges !== void 0 && (e.removeAllRanges(), rl.is.mobile !== !0 && e.addRange(document.createRange()));
2000
+ } else document.selection !== void 0 && document.selection.empty();
2001
+ }
2002
+ const Ii = {
2003
+ /* SSR does not know about Element */
2004
+ target: {
2005
+ type: [Boolean, String, Element],
2006
+ default: !0
2007
+ },
2008
+ noParentEvent: Boolean
2009
+ }, Fi = {
2010
+ ...Ii,
2011
+ contextMenu: Boolean
2012
+ };
2013
+ function Hi({
2014
+ showing: e,
2015
+ avoidEmit: t,
2016
+ // required for QPopupProxy (true)
2017
+ configureAnchorEl: l
2018
+ // optional
2019
+ }) {
2020
+ const { props: n, proxy: o, emit: u } = ne(), a = P(null);
2021
+ let r = null;
2022
+ function g(c) {
2023
+ return a.value === null ? !1 : c === void 0 || c.touches === void 0 || c.touches.length <= 1;
2024
+ }
2025
+ const b = {};
2026
+ l === void 0 && (Object.assign(b, {
2027
+ hide(c) {
2028
+ o.hide(c);
2029
+ },
2030
+ toggle(c) {
2031
+ o.toggle(c), c.qAnchorHandled = !0;
2032
+ },
2033
+ toggleKey(c) {
2034
+ Fe(c, 13) === !0 && b.toggle(c);
2035
+ },
2036
+ contextClick(c) {
2037
+ o.hide(c), be(c), fe(() => {
2038
+ o.show(c), c.qAnchorHandled = !0;
2039
+ });
2040
+ },
2041
+ prevent: be,
2042
+ mobileTouch(c) {
2043
+ if (b.mobileCleanup(c), g(c) !== !0)
2044
+ return;
2045
+ o.hide(c), a.value.classList.add("non-selectable");
2046
+ const m = c.target;
2047
+ il(b, "anchor", [
2048
+ [m, "touchmove", "mobileCleanup", "passive"],
2049
+ [m, "touchend", "mobileCleanup", "passive"],
2050
+ [m, "touchcancel", "mobileCleanup", "passive"],
2051
+ [a.value, "contextmenu", "prevent", "notPassive"]
2052
+ ]), r = setTimeout(() => {
2053
+ r = null, o.show(c), c.qAnchorHandled = !0;
2054
+ }, 300);
2055
+ },
2056
+ mobileCleanup(c) {
2057
+ a.value.classList.remove("non-selectable"), r !== null && (clearTimeout(r), r = null), e.value === !0 && c !== void 0 && zi();
2058
+ }
2059
+ }), l = function(c = n.contextMenu) {
2060
+ if (n.noParentEvent === !0 || a.value === null) return;
2061
+ let m;
2062
+ c === !0 ? o.$q.platform.is.mobile === !0 ? m = [
2063
+ [a.value, "touchstart", "mobileTouch", "passive"]
2064
+ ] : m = [
2065
+ [a.value, "mousedown", "hide", "passive"],
2066
+ [a.value, "contextmenu", "contextClick", "notPassive"]
2067
+ ] : m = [
2068
+ [a.value, "click", "toggle", "passive"],
2069
+ [a.value, "keyup", "toggleKey", "passive"]
2070
+ ], il(b, "anchor", m);
2071
+ });
2072
+ function s() {
2073
+ qn(b, "anchor");
2074
+ }
2075
+ function y(c) {
2076
+ for (a.value = c; a.value.classList.contains("q-anchor--skip"); )
2077
+ a.value = a.value.parentNode;
2078
+ l();
2079
+ }
2080
+ function v() {
2081
+ if (n.target === !1 || n.target === "" || o.$el.parentNode === null)
2082
+ a.value = null;
2083
+ else if (n.target === !0)
2084
+ y(o.$el.parentNode);
2085
+ else {
2086
+ let c = n.target;
2087
+ if (typeof n.target == "string")
2088
+ try {
2089
+ c = document.querySelector(n.target);
2090
+ } catch {
2091
+ c = void 0;
2092
+ }
2093
+ c != null ? (a.value = c.$el || c, l()) : (a.value = null, console.error(`Anchor: target "${n.target}" not found`));
2094
+ }
2095
+ }
2096
+ return Z(() => n.contextMenu, (c) => {
2097
+ a.value !== null && (s(), l(c));
2098
+ }), Z(() => n.target, () => {
2099
+ a.value !== null && s(), v();
2100
+ }), Z(() => n.noParentEvent, (c) => {
2101
+ a.value !== null && (c === !0 ? s() : l());
2102
+ }), gt(() => {
2103
+ v(), t !== !0 && n.modelValue === !0 && a.value === null && u("update:modelValue", !1);
2104
+ }), me(() => {
2105
+ r !== null && clearTimeout(r), s();
2106
+ }), {
2107
+ anchorEl: a,
2108
+ canShow: g,
2109
+ anchorEvents: b
2110
+ };
2111
+ }
2112
+ function Di(e, t) {
2113
+ const l = P(null);
2114
+ let n;
2115
+ function o(r, g) {
2116
+ const b = `${g !== void 0 ? "add" : "remove"}EventListener`, s = g !== void 0 ? g : n;
2117
+ r !== window && r[b]("scroll", s, re.passive), window[b]("scroll", s, re.passive), n = g;
2118
+ }
2119
+ function u() {
2120
+ l.value !== null && (o(l.value), l.value = null);
2121
+ }
2122
+ const a = Z(() => e.noParentEvent, () => {
2123
+ l.value !== null && (u(), t());
2124
+ });
2125
+ return me(a), {
2126
+ localScrollTarget: l,
2127
+ unconfigureScrollTarget: u,
2128
+ changeScrollEvent: o
2129
+ };
2130
+ }
2131
+ const jn = {
2132
+ modelValue: {
2133
+ type: Boolean,
2134
+ default: null
2135
+ },
2136
+ "onUpdate:modelValue": [Function, Array]
2137
+ }, Nn = [
2138
+ "beforeShow",
2139
+ "show",
2140
+ "beforeHide",
2141
+ "hide"
2142
+ ];
2143
+ function Wn({
2144
+ showing: e,
2145
+ canShow: t,
2146
+ // optional
2147
+ hideOnRouteChange: l,
2148
+ // optional
2149
+ handleShow: n,
2150
+ // optional
2151
+ handleHide: o,
2152
+ // optional
2153
+ processOnMount: u
2154
+ // optional
2155
+ }) {
2156
+ const a = ne(), { props: r, emit: g, proxy: b } = a;
2157
+ let s;
2158
+ function y(T) {
2159
+ e.value === !0 ? m(T) : v(T);
2160
+ }
2161
+ function v(T) {
2162
+ if (r.disable === !0 || T !== void 0 && T.qAnchorHandled === !0 || t !== void 0 && t(T) !== !0)
2163
+ return;
2164
+ const k = r["onUpdate:modelValue"] !== void 0;
2165
+ k === !0 && (g("update:modelValue", !0), s = T, fe(() => {
2166
+ s === T && (s = void 0);
2167
+ })), (r.modelValue === null || k === !1) && c(T);
2168
+ }
2169
+ function c(T) {
2170
+ e.value !== !0 && (e.value = !0, g("beforeShow", T), n !== void 0 ? n(T) : g("show", T));
2171
+ }
2172
+ function m(T) {
2173
+ if (r.disable === !0)
2174
+ return;
2175
+ const k = r["onUpdate:modelValue"] !== void 0;
2176
+ k === !0 && (g("update:modelValue", !1), s = T, fe(() => {
2177
+ s === T && (s = void 0);
2178
+ })), (r.modelValue === null || k === !1) && C(T);
2179
+ }
2180
+ function C(T) {
2181
+ e.value !== !1 && (e.value = !1, g("beforeHide", T), o !== void 0 ? o(T) : g("hide", T));
2182
+ }
2183
+ function p(T) {
2184
+ r.disable === !0 && T === !0 ? r["onUpdate:modelValue"] !== void 0 && g("update:modelValue", !1) : T === !0 !== e.value && (T === !0 ? c : C)(s);
2185
+ }
2186
+ Z(() => r.modelValue, p), l !== void 0 && Vn(a) === !0 && Z(() => b.$route.fullPath, () => {
2187
+ l.value === !0 && e.value === !0 && m();
2188
+ }), gt(() => {
2189
+ p(r.modelValue);
2190
+ });
2191
+ const O = { show: v, hide: m, toggle: y };
2192
+ return Object.assign(b, O), O;
2193
+ }
2194
+ const Ul = {};
2195
+ let ji = 1, Ni = document.body;
2196
+ function Wi(e, t) {
2197
+ const l = document.createElement("div");
2198
+ if (l.id = t !== void 0 ? `q-portal--${t}--${ji++}` : e, Ul.globalNodes !== void 0) {
2199
+ const n = Ul.globalNodes.class;
2200
+ n !== void 0 && (l.className = n);
2201
+ }
2202
+ return Ni.appendChild(l), l;
2203
+ }
2204
+ function Ki(e) {
2205
+ e.remove();
2206
+ }
2207
+ const ct = [];
2208
+ function Qi(e, t) {
2209
+ do {
2210
+ if (e.$options.name === "QMenu") {
2211
+ if (e.hide(t), e.$props.separateClosePopup === !0)
2212
+ return Qt(e);
2213
+ } else if (e.__qPortal === !0) {
2214
+ const l = Qt(e);
2215
+ return l !== void 0 && l.$options.name === "QPopupProxy" ? (e.hide(t), l) : e;
2216
+ }
2217
+ e = Qt(e);
2218
+ } while (e != null);
2219
+ }
2220
+ const Ui = ge({
2221
+ name: "QPortal",
2222
+ setup(e, { slots: t }) {
2223
+ return () => t.default();
2224
+ }
2225
+ });
2226
+ function Yi(e) {
2227
+ for (e = e.parent; e != null; ) {
2228
+ if (e.type.name === "QGlobalDialog")
2229
+ return !0;
2230
+ if (e.type.name === "QDialog" || e.type.name === "QMenu")
2231
+ return !1;
2232
+ e = e.parent;
2233
+ }
2234
+ return !1;
2235
+ }
2236
+ function Kn(e, t, l, n) {
2237
+ const o = P(!1), u = P(!1);
2238
+ let a = null;
2239
+ const r = {}, g = n === "dialog" && Yi(e);
2240
+ function b(y) {
2241
+ if (y === !0) {
2242
+ Ql(r), u.value = !0;
2243
+ return;
2244
+ }
2245
+ u.value = !1, o.value === !1 && (g === !1 && a === null && (a = Wi(!1, n)), o.value = !0, ct.push(e.proxy), Ri(r));
2246
+ }
2247
+ function s(y) {
2248
+ if (u.value = !1, y !== !0) return;
2249
+ Ql(r), o.value = !1;
2250
+ const v = ct.indexOf(e.proxy);
2251
+ v !== -1 && ct.splice(v, 1), a !== null && (Ki(a), a = null);
2252
+ }
2253
+ return xo(() => {
2254
+ s(!0);
2255
+ }), e.proxy.__qPortal = !0, dl(e.proxy, "contentEl", () => t.value), {
2256
+ showPortal: b,
2257
+ hidePortal: s,
2258
+ portalIsActive: o,
2259
+ portalIsAccessible: u,
2260
+ renderPortal: () => g === !0 ? l() : o.value === !0 ? [h(Co, { to: a }, h(Ui, l))] : void 0
2261
+ };
2262
+ }
2263
+ const Qn = {
2264
+ transitionShow: {
2265
+ type: String,
2266
+ default: "fade"
2267
+ },
2268
+ transitionHide: {
2269
+ type: String,
2270
+ default: "fade"
2271
+ },
2272
+ transitionDuration: {
2273
+ type: [String, Number],
2274
+ default: 300
2275
+ }
2276
+ };
2277
+ function Un(e, t = () => {
2278
+ }, l = () => {
2279
+ }) {
2280
+ return {
2281
+ transitionProps: d(() => {
2282
+ const n = `q-transition--${e.transitionShow || t()}`, o = `q-transition--${e.transitionHide || l()}`;
2283
+ return {
2284
+ appear: !0,
2285
+ enterFromClass: `${n}-enter-from`,
2286
+ enterActiveClass: `${n}-enter-active`,
2287
+ enterToClass: `${n}-enter-to`,
2288
+ leaveFromClass: `${o}-leave-from`,
2289
+ leaveActiveClass: `${o}-leave-active`,
2290
+ leaveToClass: `${o}-leave-to`
2291
+ };
2292
+ }),
2293
+ transitionStyle: d(() => `--q-transition-duration: ${e.transitionDuration}ms`)
2294
+ };
2295
+ }
2296
+ function Yn() {
2297
+ let e;
2298
+ const t = ne();
2299
+ function l() {
2300
+ e = void 0;
2301
+ }
2302
+ return Pt(l), me(l), {
2303
+ removeTick: l,
2304
+ registerTick(n) {
2305
+ e = n, fe(() => {
2306
+ e === n && (Tn(t) === !1 && e(), e = void 0);
2307
+ });
2308
+ }
2309
+ };
2310
+ }
2311
+ function Xn() {
2312
+ let e = null;
2313
+ const t = ne();
2314
+ function l() {
2315
+ e !== null && (clearTimeout(e), e = null);
2316
+ }
2317
+ return Pt(l), me(l), {
2318
+ removeTimeout: l,
2319
+ registerTimeout(n, o) {
2320
+ l(), Tn(t) === !1 && (e = setTimeout(() => {
2321
+ e = null, n();
2322
+ }, o));
2323
+ }
2324
+ };
2325
+ }
2326
+ const Xi = [Element, String], Gi = [null, document, document.body, document.scrollingElement, document.documentElement];
2327
+ function Zi(e, t) {
2328
+ let l = Ho(t);
2329
+ if (l === void 0) {
2330
+ if (e == null)
2331
+ return window;
2332
+ l = e.closest(".scroll,.scroll-y,.overflow-auto");
2333
+ }
2334
+ return Gi.includes(l) ? window : l;
2335
+ }
2336
+ function Ji(e) {
2337
+ return e === window ? window.pageYOffset || window.scrollY || document.body.scrollTop || 0 : e.scrollTop;
2338
+ }
2339
+ function eu(e) {
2340
+ return e === window ? window.pageXOffset || window.scrollX || document.body.scrollLeft || 0 : e.scrollLeft;
2341
+ }
2342
+ let _t;
2343
+ function tu() {
2344
+ if (_t !== void 0)
2345
+ return _t;
2346
+ const e = document.createElement("p"), t = document.createElement("div");
2347
+ ol(e, {
2348
+ width: "100%",
2349
+ height: "200px"
2350
+ }), ol(t, {
2351
+ position: "absolute",
2352
+ top: "0px",
2353
+ left: "0px",
2354
+ visibility: "hidden",
2355
+ width: "200px",
2356
+ height: "150px",
2357
+ overflow: "hidden"
2358
+ }), t.appendChild(e), document.body.appendChild(t);
2359
+ const l = e.offsetWidth;
2360
+ t.style.overflow = "scroll";
2361
+ let n = e.offsetWidth;
2362
+ return l === n && (n = t.clientWidth), t.remove(), _t = l - n, _t;
2363
+ }
2364
+ function lu(e, t = !0) {
2365
+ return !e || e.nodeType !== Node.ELEMENT_NODE ? !1 : t ? e.scrollHeight > e.clientHeight && (e.classList.contains("scroll") || e.classList.contains("overflow-auto") || ["auto", "scroll"].includes(window.getComputedStyle(e)["overflow-y"])) : e.scrollWidth > e.clientWidth && (e.classList.contains("scroll") || e.classList.contains("overflow-auto") || ["auto", "scroll"].includes(window.getComputedStyle(e)["overflow-x"]));
2366
+ }
2367
+ const Pe = [];
2368
+ let tt;
2369
+ function nu(e) {
2370
+ tt = e.keyCode === 27;
2371
+ }
2372
+ function ou() {
2373
+ tt === !0 && (tt = !1);
2374
+ }
2375
+ function iu(e) {
2376
+ tt === !0 && (tt = !1, Fe(e, 27) === !0 && Pe[Pe.length - 1](e));
2377
+ }
2378
+ function Gn(e) {
2379
+ window[e]("keydown", nu), window[e]("blur", ou), window[e]("keyup", iu), tt = !1;
2380
+ }
2381
+ function Zn(e) {
2382
+ ve.is.desktop === !0 && (Pe.push(e), Pe.length === 1 && Gn("addEventListener"));
2383
+ }
2384
+ function Rt(e) {
2385
+ const t = Pe.indexOf(e);
2386
+ t !== -1 && (Pe.splice(t, 1), Pe.length === 0 && Gn("removeEventListener"));
2387
+ }
2388
+ const ze = [];
2389
+ function Jn(e) {
2390
+ ze[ze.length - 1](e);
2391
+ }
2392
+ function gl(e) {
2393
+ ve.is.desktop === !0 && (ze.push(e), ze.length === 1 && document.body.addEventListener("focusin", Jn));
2394
+ }
2395
+ function Lt(e) {
2396
+ const t = ze.indexOf(e);
2397
+ t !== -1 && (ze.splice(t, 1), ze.length === 0 && document.body.removeEventListener("focusin", Jn));
2398
+ }
2399
+ const { notPassiveCapture: Mt } = re, Ie = [];
2400
+ function At(e) {
2401
+ const t = e.target;
2402
+ if (t === void 0 || t.nodeType === 8 || t.classList.contains("no-pointer-events") === !0)
2403
+ return;
2404
+ let l = ct.length - 1;
2405
+ for (; l >= 0; ) {
2406
+ const n = ct[l].$;
2407
+ if (n.type.name === "QTooltip") {
2408
+ l--;
2409
+ continue;
2410
+ }
2411
+ if (n.type.name !== "QDialog")
2412
+ break;
2413
+ if (n.props.seamless !== !0)
2414
+ return;
2415
+ l--;
2416
+ }
2417
+ for (let n = Ie.length - 1; n >= 0; n--) {
2418
+ const o = Ie[n];
2419
+ if ((o.anchorEl.value === null || o.anchorEl.value.contains(t) === !1) && (t === document.body || o.innerRef.value !== null && o.innerRef.value.contains(t) === !1))
2420
+ e.qClickOutside = !0, o.onClickOutside(e);
2421
+ else
2422
+ return;
2423
+ }
2424
+ }
2425
+ function uu(e) {
2426
+ Ie.push(e), Ie.length === 1 && (document.addEventListener("mousedown", At, Mt), document.addEventListener("touchstart", At, Mt));
2427
+ }
2428
+ function Yl(e) {
2429
+ const t = Ie.findIndex((l) => l === e);
2430
+ t !== -1 && (Ie.splice(t, 1), Ie.length === 0 && (document.removeEventListener("mousedown", At, Mt), document.removeEventListener("touchstart", At, Mt)));
2431
+ }
2432
+ let Xl, Gl;
2433
+ function Zl(e) {
2434
+ const t = e.split(" ");
2435
+ return t.length !== 2 ? !1 : ["top", "center", "bottom"].includes(t[0]) !== !0 ? (console.error("Anchor/Self position must start with one of top/center/bottom"), !1) : ["left", "middle", "right", "start", "end"].includes(t[1]) !== !0 ? (console.error("Anchor/Self position must end with one of left/middle/right/start/end"), !1) : !0;
2436
+ }
2437
+ function au(e) {
2438
+ return e ? !(e.length !== 2 || typeof e[0] != "number" || typeof e[1] != "number") : !0;
2439
+ }
2440
+ const cl = {
2441
+ "start#ltr": "left",
2442
+ "start#rtl": "right",
2443
+ "end#ltr": "right",
2444
+ "end#rtl": "left"
2445
+ };
2446
+ ["left", "middle", "right"].forEach((e) => {
2447
+ cl[`${e}#ltr`] = e, cl[`${e}#rtl`] = e;
2448
+ });
2449
+ function Jl(e, t) {
2450
+ const l = e.split(" ");
2451
+ return {
2452
+ vertical: l[0],
2453
+ horizontal: cl[`${l[1]}#${t === !0 ? "rtl" : "ltr"}`]
2454
+ };
2455
+ }
2456
+ function ru(e, t) {
2457
+ let { top: l, left: n, right: o, bottom: u, width: a, height: r } = e.getBoundingClientRect();
2458
+ return t !== void 0 && (l -= t[1], n -= t[0], u += t[1], o += t[0], a += t[0], r += t[1]), {
2459
+ top: l,
2460
+ bottom: u,
2461
+ height: r,
2462
+ left: n,
2463
+ right: o,
2464
+ width: a,
2465
+ middle: n + (o - n) / 2,
2466
+ center: l + (u - l) / 2
2467
+ };
2468
+ }
2469
+ function su(e, t, l) {
2470
+ let { top: n, left: o } = e.getBoundingClientRect();
2471
+ return n += t.top, o += t.left, l !== void 0 && (n += l[1], o += l[0]), {
2472
+ top: n,
2473
+ bottom: n + 1,
2474
+ height: 1,
2475
+ left: o,
2476
+ right: o + 1,
2477
+ width: 1,
2478
+ middle: o,
2479
+ center: n
2480
+ };
2481
+ }
2482
+ function cu(e, t) {
2483
+ return {
2484
+ top: 0,
2485
+ center: t / 2,
2486
+ bottom: t,
2487
+ left: 0,
2488
+ middle: e / 2,
2489
+ right: e
2490
+ };
2491
+ }
2492
+ function en(e, t, l, n) {
2493
+ return {
2494
+ top: e[l.vertical] - t[n.vertical],
2495
+ left: e[l.horizontal] - t[n.horizontal]
2496
+ };
2497
+ }
2498
+ function eo(e, t = 0) {
2499
+ if (e.targetEl === null || e.anchorEl === null || t > 5)
2500
+ return;
2501
+ if (e.targetEl.offsetHeight === 0 || e.targetEl.offsetWidth === 0) {
2502
+ setTimeout(() => {
2503
+ eo(e, t + 1);
2504
+ }, 10);
2505
+ return;
2506
+ }
2507
+ const {
2508
+ targetEl: l,
2509
+ offset: n,
2510
+ anchorEl: o,
2511
+ anchorOrigin: u,
2512
+ selfOrigin: a,
2513
+ absoluteOffset: r,
2514
+ fit: g,
2515
+ cover: b,
2516
+ maxHeight: s,
2517
+ maxWidth: y
2518
+ } = e;
2519
+ if (ve.is.ios === !0 && window.visualViewport !== void 0) {
2520
+ const V = document.body.style, { offsetLeft: A, offsetTop: z } = window.visualViewport;
2521
+ A !== Xl && (V.setProperty("--q-pe-left", A + "px"), Xl = A), z !== Gl && (V.setProperty("--q-pe-top", z + "px"), Gl = z);
2522
+ }
2523
+ const { scrollLeft: v, scrollTop: c } = l, m = r === void 0 ? ru(o, b === !0 ? [0, 0] : n) : su(o, r, n);
2524
+ Object.assign(l.style, {
2525
+ top: 0,
2526
+ left: 0,
2527
+ minWidth: null,
2528
+ minHeight: null,
2529
+ maxWidth: y,
2530
+ maxHeight: s,
2531
+ visibility: "visible"
2532
+ });
2533
+ const { offsetWidth: C, offsetHeight: p } = l, { elWidth: O, elHeight: T } = g === !0 || b === !0 ? { elWidth: Math.max(m.width, C), elHeight: b === !0 ? Math.max(m.height, p) : p } : { elWidth: C, elHeight: p };
2534
+ let k = { maxWidth: y, maxHeight: s };
2535
+ (g === !0 || b === !0) && (k.minWidth = m.width + "px", b === !0 && (k.minHeight = m.height + "px")), Object.assign(l.style, k);
2536
+ const M = cu(O, T);
2537
+ let R = en(m, M, u, a);
2538
+ if (r === void 0 || n === void 0)
2539
+ Xt(R, m, M, u, a);
2540
+ else {
2541
+ const { top: V, left: A } = R;
2542
+ Xt(R, m, M, u, a);
2543
+ let z = !1;
2544
+ if (R.top !== V) {
2545
+ z = !0;
2546
+ const N = 2 * n[1];
2547
+ m.center = m.top -= N, m.bottom -= N + 2;
2548
+ }
2549
+ if (R.left !== A) {
2550
+ z = !0;
2551
+ const N = 2 * n[0];
2552
+ m.middle = m.left -= N, m.right -= N + 2;
2553
+ }
2554
+ z === !0 && (R = en(m, M, u, a), Xt(R, m, M, u, a));
2555
+ }
2556
+ k = {
2557
+ top: R.top + "px",
2558
+ left: R.left + "px"
2559
+ }, R.maxHeight !== void 0 && (k.maxHeight = R.maxHeight + "px", m.height > R.maxHeight && (k.minHeight = k.maxHeight)), R.maxWidth !== void 0 && (k.maxWidth = R.maxWidth + "px", m.width > R.maxWidth && (k.minWidth = k.maxWidth)), Object.assign(l.style, k), l.scrollTop !== c && (l.scrollTop = c), l.scrollLeft !== v && (l.scrollLeft = v);
2560
+ }
2561
+ function Xt(e, t, l, n, o) {
2562
+ const u = l.bottom, a = l.right, r = tu(), g = window.innerHeight - r, b = document.body.clientWidth;
2563
+ if (e.top < 0 || e.top + u > g)
2564
+ if (o.vertical === "center")
2565
+ e.top = t[n.vertical] > g / 2 ? Math.max(0, g - u) : 0, e.maxHeight = Math.min(u, g);
2566
+ else if (t[n.vertical] > g / 2) {
2567
+ const s = Math.min(
2568
+ g,
2569
+ n.vertical === "center" ? t.center : n.vertical === o.vertical ? t.bottom : t.top
2570
+ );
2571
+ e.maxHeight = Math.min(u, s), e.top = Math.max(0, s - u);
2572
+ } else
2573
+ e.top = Math.max(
2574
+ 0,
2575
+ n.vertical === "center" ? t.center : n.vertical === o.vertical ? t.top : t.bottom
2576
+ ), e.maxHeight = Math.min(u, g - e.top);
2577
+ if (e.left < 0 || e.left + a > b)
2578
+ if (e.maxWidth = Math.min(a, b), o.horizontal === "middle")
2579
+ e.left = t[n.horizontal] > b / 2 ? Math.max(0, b - a) : 0;
2580
+ else if (t[n.horizontal] > b / 2) {
2581
+ const s = Math.min(
2582
+ b,
2583
+ n.horizontal === "middle" ? t.middle : n.horizontal === o.horizontal ? t.right : t.left
2584
+ );
2585
+ e.maxWidth = Math.min(a, s), e.left = Math.max(0, s - e.maxWidth);
2586
+ } else
2587
+ e.left = Math.max(
2588
+ 0,
2589
+ n.horizontal === "middle" ? t.middle : n.horizontal === o.horizontal ? t.left : t.right
2590
+ ), e.maxWidth = Math.min(a, b - e.left);
2591
+ }
2592
+ const du = ge({
2593
+ name: "QMenu",
2594
+ inheritAttrs: !1,
2595
+ props: {
2596
+ ...Fi,
2597
+ ...jn,
2598
+ ...ht,
2599
+ ...Qn,
2600
+ persistent: Boolean,
2601
+ autoClose: Boolean,
2602
+ separateClosePopup: Boolean,
2603
+ noRouteDismiss: Boolean,
2604
+ noRefocus: Boolean,
2605
+ noFocus: Boolean,
2606
+ fit: Boolean,
2607
+ cover: Boolean,
2608
+ square: Boolean,
2609
+ anchor: {
2610
+ type: String,
2611
+ validator: Zl
2612
+ },
2613
+ self: {
2614
+ type: String,
2615
+ validator: Zl
2616
+ },
2617
+ offset: {
2618
+ type: Array,
2619
+ validator: au
2620
+ },
2621
+ scrollTarget: Xi,
2622
+ touchPosition: Boolean,
2623
+ maxHeight: {
2624
+ type: String,
2625
+ default: null
2626
+ },
2627
+ maxWidth: {
2628
+ type: String,
2629
+ default: null
2630
+ }
2631
+ },
2632
+ emits: [
2633
+ ...Nn,
2634
+ "click",
2635
+ "escapeKey"
2636
+ ],
2637
+ setup(e, { slots: t, emit: l, attrs: n }) {
2638
+ let o = null, u, a, r;
2639
+ const g = ne(), { proxy: b } = g, { $q: s } = b, y = P(null), v = P(!1), c = d(
2640
+ () => e.persistent !== !0 && e.noRouteDismiss !== !0
2641
+ ), m = pt(e, s), { registerTick: C, removeTick: p } = Yn(), { registerTimeout: O } = Xn(), { transitionProps: T, transitionStyle: k } = Un(e), { localScrollTarget: M, changeScrollEvent: R, unconfigureScrollTarget: V } = Di(e, F), { anchorEl: A, canShow: z } = Hi({ showing: v }), { hide: N } = Wn({
2642
+ showing: v,
2643
+ canShow: z,
2644
+ handleShow: se,
2645
+ handleHide: f,
2646
+ hideOnRouteChange: c,
2647
+ processOnMount: !0
2648
+ }), { showPortal: J, hidePortal: U, renderPortal: L } = Kn(g, y, W, "menu"), K = {
2649
+ anchorEl: A,
2650
+ innerRef: y,
2651
+ onClickOutside(w) {
2652
+ if (e.persistent !== !0 && v.value === !0)
2653
+ return N(w), // always prevent touch event
2654
+ (w.type === "touchstart" || w.target.classList.contains("q-dialog__backdrop")) && le(w), !0;
2655
+ }
2656
+ }, B = d(
2657
+ () => Jl(
2658
+ e.anchor || (e.cover === !0 ? "center middle" : "bottom start"),
2659
+ s.lang.rtl
2660
+ )
2661
+ ), D = d(() => e.cover === !0 ? B.value : Jl(e.self || "top start", s.lang.rtl)), X = d(
2662
+ () => (e.square === !0 ? " q-menu--square" : "") + (m.value === !0 ? " q-menu--dark q-dark" : "")
2663
+ ), ae = d(() => e.autoClose === !0 ? { onClick: j } : {}), E = d(
2664
+ () => v.value === !0 && e.persistent !== !0
2665
+ );
2666
+ Z(E, (w) => {
2667
+ w === !0 ? (Zn(x), uu(K)) : (Rt(x), Yl(K));
2668
+ });
2669
+ function I() {
2670
+ vl(() => {
2671
+ let w = y.value;
2672
+ w && w.contains(document.activeElement) !== !0 && (w = w.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]") || w.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]") || w.querySelector("[autofocus], [data-autofocus]") || w, w.focus({ preventScroll: !0 }));
2673
+ });
2674
+ }
2675
+ function se(w) {
2676
+ if (o = e.noRefocus === !1 ? document.activeElement : null, gl(G), J(), F(), u = void 0, w !== void 0 && (e.touchPosition || e.contextMenu)) {
2677
+ const ee = Cn(w);
2678
+ if (ee.left !== void 0) {
2679
+ const { top: ye, left: He } = A.value.getBoundingClientRect();
2680
+ u = { left: ee.left - He, top: ee.top - ye };
2681
+ }
2682
+ }
2683
+ a === void 0 && (a = Z(
2684
+ () => s.screen.width + "|" + s.screen.height + "|" + e.self + "|" + e.anchor + "|" + s.lang.rtl,
2685
+ $
2686
+ )), e.noFocus !== !0 && document.activeElement.blur(), C(() => {
2687
+ $(), e.noFocus !== !0 && I();
2688
+ }), O(() => {
2689
+ s.platform.is.ios === !0 && (r = e.autoClose, y.value.click()), $(), J(!0), l("show", w);
2690
+ }, e.transitionDuration);
2691
+ }
2692
+ function f(w) {
2693
+ p(), U(), S(!0), o !== null && // menu was hidden from code or ESC plugin
2694
+ (w === void 0 || w.qClickOutside !== !0) && (((w && w.type.indexOf("key") === 0 ? o.closest('[tabindex]:not([tabindex^="-"])') : void 0) || o).focus(), o = null), O(() => {
2695
+ U(!0), l("hide", w);
2696
+ }, e.transitionDuration);
2697
+ }
2698
+ function S(w) {
2699
+ u = void 0, a !== void 0 && (a(), a = void 0), (w === !0 || v.value === !0) && (Lt(G), V(), Yl(K), Rt(x)), w !== !0 && (o = null);
2700
+ }
2701
+ function F() {
2702
+ (A.value !== null || e.scrollTarget !== void 0) && (M.value = Zi(A.value, e.scrollTarget), R(M.value, $));
2703
+ }
2704
+ function j(w) {
2705
+ r !== !0 ? (Qi(b, w), l("click", w)) : r = !1;
2706
+ }
2707
+ function G(w) {
2708
+ E.value === !0 && e.noFocus !== !0 && xn(y.value, w.target) !== !0 && I();
2709
+ }
2710
+ function x(w) {
2711
+ l("escapeKey"), N(w);
2712
+ }
2713
+ function $() {
2714
+ eo({
2715
+ targetEl: y.value,
2716
+ offset: e.offset,
2717
+ anchorEl: A.value,
2718
+ anchorOrigin: B.value,
2719
+ selfOrigin: D.value,
2720
+ absoluteOffset: u,
2721
+ fit: e.fit,
2722
+ cover: e.cover,
2723
+ maxHeight: e.maxHeight,
2724
+ maxWidth: e.maxWidth
2725
+ });
2726
+ }
2727
+ function W() {
2728
+ return h(
2729
+ dt,
2730
+ T.value,
2731
+ () => v.value === !0 ? h("div", {
2732
+ role: "menu",
2733
+ ...n,
2734
+ ref: y,
2735
+ tabindex: -1,
2736
+ class: [
2737
+ "q-menu q-position-engine scroll" + X.value,
2738
+ n.class
2739
+ ],
2740
+ style: [
2741
+ n.style,
2742
+ k.value
2743
+ ],
2744
+ ...ae.value
2745
+ }, ke(t.default)) : null
2746
+ );
2747
+ }
2748
+ return me(S), Object.assign(b, { focus: I, updatePosition: $ }), L;
2749
+ }
2750
+ });
2751
+ function fu(e, t, l) {
2752
+ function n() {
2753
+ }
2754
+ return me(() => {
2755
+ e.value === !0 && void 0;
2756
+ }), {
2757
+ removeFromHistory: n,
2758
+ addToHistory() {
2759
+ }
2760
+ };
2761
+ }
2762
+ let ut = 0, Gt, Zt, st, Jt = !1, tn, ln, nn, Me = null;
2763
+ function vu(e) {
2764
+ mu(e) && le(e);
2765
+ }
2766
+ function mu(e) {
2767
+ if (e.target === document.body || e.target.classList.contains("q-layout__backdrop"))
2768
+ return !0;
2769
+ const t = jo(e), l = e.shiftKey && !e.deltaX, n = !l && Math.abs(e.deltaX) <= Math.abs(e.deltaY), o = l || n ? e.deltaY : e.deltaX;
2770
+ for (let u = 0; u < t.length; u++) {
2771
+ const a = t[u];
2772
+ if (lu(a, n))
2773
+ return n ? o < 0 && a.scrollTop === 0 ? !0 : o > 0 && a.scrollTop + a.clientHeight === a.scrollHeight : o < 0 && a.scrollLeft === 0 ? !0 : o > 0 && a.scrollLeft + a.clientWidth === a.scrollWidth;
2774
+ }
2775
+ return !0;
2776
+ }
2777
+ function on(e) {
2778
+ e.target === document && (document.scrollingElement.scrollTop = document.scrollingElement.scrollTop);
2779
+ }
2780
+ function Et(e) {
2781
+ Jt !== !0 && (Jt = !0, requestAnimationFrame(() => {
2782
+ Jt = !1;
2783
+ const { height: t } = e.target, { clientHeight: l, scrollTop: n } = document.scrollingElement;
2784
+ (st === void 0 || t !== window.innerHeight) && (st = l - t, document.scrollingElement.scrollTop = n), n > st && (document.scrollingElement.scrollTop -= Math.ceil((n - st) / 8));
2785
+ }));
2786
+ }
2787
+ function un(e) {
2788
+ const t = document.body, l = window.visualViewport !== void 0;
2789
+ if (e === "add") {
2790
+ const { overflowY: n, overflowX: o } = window.getComputedStyle(t);
2791
+ Gt = eu(window), Zt = Ji(window), tn = t.style.left, ln = t.style.top, nn = window.location.href, t.style.left = `-${Gt}px`, t.style.top = `-${Zt}px`, o !== "hidden" && (o === "scroll" || t.scrollWidth > window.innerWidth) && t.classList.add("q-body--force-scrollbar-x"), n !== "hidden" && (n === "scroll" || t.scrollHeight > window.innerHeight) && t.classList.add("q-body--force-scrollbar-y"), t.classList.add("q-body--prevent-scroll"), document.qScrollPrevented = !0, ve.is.ios === !0 && (l === !0 ? (window.scrollTo(0, 0), window.visualViewport.addEventListener("resize", Et, re.passiveCapture), window.visualViewport.addEventListener("scroll", Et, re.passiveCapture), window.scrollTo(0, 0)) : window.addEventListener("scroll", on, re.passiveCapture));
2792
+ }
2793
+ ve.is.desktop === !0 && ve.is.mac === !0 && window[`${e}EventListener`]("wheel", vu, re.notPassive), e === "remove" && (ve.is.ios === !0 && (l === !0 ? (window.visualViewport.removeEventListener("resize", Et, re.passiveCapture), window.visualViewport.removeEventListener("scroll", Et, re.passiveCapture)) : window.removeEventListener("scroll", on, re.passiveCapture)), t.classList.remove("q-body--prevent-scroll"), t.classList.remove("q-body--force-scrollbar-x"), t.classList.remove("q-body--force-scrollbar-y"), document.qScrollPrevented = !1, t.style.left = tn, t.style.top = ln, window.location.href === nn && window.scrollTo(Gt, Zt), st = void 0);
2794
+ }
2795
+ function gu(e) {
2796
+ let t = "add";
2797
+ if (e === !0) {
2798
+ if (ut++, Me !== null) {
2799
+ clearTimeout(Me), Me = null;
2800
+ return;
2801
+ }
2802
+ if (ut > 1)
2803
+ return;
2804
+ } else {
2805
+ if (ut === 0 || (ut--, ut > 0))
2806
+ return;
2807
+ if (t = "remove", ve.is.ios === !0 && ve.is.nativeMobile === !0) {
2808
+ Me !== null && clearTimeout(Me), Me = setTimeout(() => {
2809
+ un(t), Me = null;
2810
+ }, 100);
2811
+ return;
2812
+ }
2813
+ }
2814
+ un(t);
2815
+ }
2816
+ function hu() {
2817
+ let e;
2818
+ return {
2819
+ preventBodyScroll(t) {
2820
+ t !== e && (e !== void 0 || t === !0) && (e = t, gu(t));
2821
+ }
2822
+ };
2823
+ }
2824
+ let Bt = 0;
2825
+ const pu = {
2826
+ standard: "fixed-full flex-center",
2827
+ top: "fixed-top justify-center",
2828
+ bottom: "fixed-bottom justify-center",
2829
+ right: "fixed-right items-center",
2830
+ left: "fixed-left items-center"
2831
+ }, an = {
2832
+ standard: ["scale", "scale"],
2833
+ top: ["slide-down", "slide-up"],
2834
+ bottom: ["slide-up", "slide-down"],
2835
+ right: ["slide-left", "slide-right"],
2836
+ left: ["slide-right", "slide-left"]
2837
+ }, bu = ge({
2838
+ name: "QDialog",
2839
+ inheritAttrs: !1,
2840
+ props: {
2841
+ ...jn,
2842
+ ...Qn,
2843
+ transitionShow: String,
2844
+ // override useTransitionProps
2845
+ transitionHide: String,
2846
+ // override useTransitionProps
2847
+ persistent: Boolean,
2848
+ autoClose: Boolean,
2849
+ allowFocusOutside: Boolean,
2850
+ noEscDismiss: Boolean,
2851
+ noBackdropDismiss: Boolean,
2852
+ noRouteDismiss: Boolean,
2853
+ noRefocus: Boolean,
2854
+ noFocus: Boolean,
2855
+ noShake: Boolean,
2856
+ seamless: Boolean,
2857
+ maximized: Boolean,
2858
+ fullWidth: Boolean,
2859
+ fullHeight: Boolean,
2860
+ square: Boolean,
2861
+ backdropFilter: String,
2862
+ position: {
2863
+ type: String,
2864
+ default: "standard",
2865
+ validator: (e) => ["standard", "top", "bottom", "left", "right"].includes(e)
2866
+ }
2867
+ },
2868
+ emits: [
2869
+ ...Nn,
2870
+ "shake",
2871
+ "click",
2872
+ "escapeKey"
2873
+ ],
2874
+ setup(e, { slots: t, emit: l, attrs: n }) {
2875
+ const o = ne(), u = P(null), a = P(!1), r = P(!1);
2876
+ let g = null, b = null, s, y;
2877
+ const v = d(
2878
+ () => e.persistent !== !0 && e.noRouteDismiss !== !0 && e.seamless !== !0
2879
+ ), { preventBodyScroll: c } = hu(), { registerTimeout: m } = Xn(), { registerTick: C, removeTick: p } = Yn(), { transitionProps: O, transitionStyle: T } = Un(
2880
+ e,
2881
+ () => an[e.position][0],
2882
+ () => an[e.position][1]
2883
+ ), k = d(() => T.value + (e.backdropFilter !== void 0 ? `;backdrop-filter:${e.backdropFilter};-webkit-backdrop-filter:${e.backdropFilter}` : "")), { showPortal: M, hidePortal: R, portalIsAccessible: V, renderPortal: A } = Kn(
2884
+ o,
2885
+ u,
2886
+ G,
2887
+ "dialog"
2888
+ ), { hide: z } = Wn({
2889
+ showing: a,
2890
+ hideOnRouteChange: v,
2891
+ handleShow: D,
2892
+ handleHide: X,
2893
+ processOnMount: !0
2894
+ }), { addToHistory: N, removeFromHistory: J } = fu(a, z), U = d(
2895
+ () => `q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized === !0 ? "maximized" : "minimized"} q-dialog__inner--${e.position} ${pu[e.position]}` + (r.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" : "")
2896
+ ), L = d(() => a.value === !0 && e.seamless !== !0), K = d(() => e.autoClose === !0 ? { onClick: S } : {}), B = d(() => [
2897
+ `q-dialog fullscreen no-pointer-events q-dialog--${L.value === !0 ? "modal" : "seamless"}`,
2898
+ n.class
2899
+ ]);
2900
+ Z(() => e.maximized, (x) => {
2901
+ a.value === !0 && f(x);
2902
+ }), Z(L, (x) => {
2903
+ c(x), x === !0 ? (gl(j), Zn(I)) : (Lt(j), Rt(I));
2904
+ });
2905
+ function D(x) {
2906
+ N(), b = e.noRefocus === !1 && document.activeElement !== null ? document.activeElement : null, f(e.maximized), M(), r.value = !0, e.noFocus !== !0 ? (document.activeElement !== null && document.activeElement.blur(), C(ae)) : p(), m(() => {
2907
+ if (o.proxy.$q.platform.is.ios === !0) {
2908
+ if (e.seamless !== !0 && document.activeElement) {
2909
+ const { top: $, bottom: W } = document.activeElement.getBoundingClientRect(), { innerHeight: w } = window, ee = window.visualViewport !== void 0 ? window.visualViewport.height : w;
2910
+ $ > 0 && W > ee / 2 && (document.scrollingElement.scrollTop = Math.min(
2911
+ document.scrollingElement.scrollHeight - ee,
2912
+ W >= w ? 1 / 0 : Math.ceil(document.scrollingElement.scrollTop + W - ee / 2)
2913
+ )), document.activeElement.scrollIntoView();
2914
+ }
2915
+ y = !0, u.value.click(), y = !1;
2916
+ }
2917
+ M(!0), r.value = !1, l("show", x);
2918
+ }, e.transitionDuration);
2919
+ }
2920
+ function X(x) {
2921
+ p(), J(), se(!0), r.value = !0, R(), b !== null && (((x && x.type.indexOf("key") === 0 ? b.closest('[tabindex]:not([tabindex^="-"])') : void 0) || b).focus(), b = null), m(() => {
2922
+ R(!0), r.value = !1, l("hide", x);
2923
+ }, e.transitionDuration);
2924
+ }
2925
+ function ae(x) {
2926
+ vl(() => {
2927
+ let $ = u.value;
2928
+ if ($ !== null) {
2929
+ if (x !== void 0) {
2930
+ const W = $.querySelector(x);
2931
+ if (W !== null) {
2932
+ W.focus({ preventScroll: !0 });
2933
+ return;
2934
+ }
2935
+ }
2936
+ $.contains(document.activeElement) !== !0 && ($ = $.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]") || $.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]") || $.querySelector("[autofocus], [data-autofocus]") || $, $.focus({ preventScroll: !0 }));
2937
+ }
2938
+ });
2939
+ }
2940
+ function E(x) {
2941
+ x && typeof x.focus == "function" ? x.focus({ preventScroll: !0 }) : ae(), l("shake");
2942
+ const $ = u.value;
2943
+ $ !== null && ($.classList.remove("q-animate--scale"), $.classList.add("q-animate--scale"), g !== null && clearTimeout(g), g = setTimeout(() => {
2944
+ g = null, u.value !== null && ($.classList.remove("q-animate--scale"), ae());
2945
+ }, 170));
2946
+ }
2947
+ function I() {
2948
+ e.seamless !== !0 && (e.persistent === !0 || e.noEscDismiss === !0 ? e.maximized !== !0 && e.noShake !== !0 && E() : (l("escapeKey"), z()));
2949
+ }
2950
+ function se(x) {
2951
+ g !== null && (clearTimeout(g), g = null), (x === !0 || a.value === !0) && (f(!1), e.seamless !== !0 && (c(!1), Lt(j), Rt(I))), x !== !0 && (b = null);
2952
+ }
2953
+ function f(x) {
2954
+ x === !0 ? s !== !0 && (Bt < 1 && document.body.classList.add("q-body--dialog"), Bt++, s = !0) : s === !0 && (Bt < 2 && document.body.classList.remove("q-body--dialog"), Bt--, s = !1);
2955
+ }
2956
+ function S(x) {
2957
+ y !== !0 && (z(x), l("click", x));
2958
+ }
2959
+ function F(x) {
2960
+ e.persistent !== !0 && e.noBackdropDismiss !== !0 ? z(x) : e.noShake !== !0 && E();
2961
+ }
2962
+ function j(x) {
2963
+ e.allowFocusOutside !== !0 && V.value === !0 && xn(u.value, x.target) !== !0 && ae('[tabindex]:not([tabindex="-1"])');
2964
+ }
2965
+ Object.assign(o.proxy, {
2966
+ // expose public methods
2967
+ focus: ae,
2968
+ shake: E,
2969
+ // private but needed by QSelect
2970
+ __updateRefocusTarget(x) {
2971
+ b = x || null;
2972
+ }
2973
+ }), me(se);
2974
+ function G() {
2975
+ return h("div", {
2976
+ role: "dialog",
2977
+ "aria-modal": L.value === !0 ? "true" : "false",
2978
+ ...n,
2979
+ class: B.value
2980
+ }, [
2981
+ h(dt, {
2982
+ name: "q-transition--fade",
2983
+ appear: !0
2984
+ }, () => L.value === !0 ? h("div", {
2985
+ class: "q-dialog__backdrop fixed-full",
2986
+ style: k.value,
2987
+ "aria-hidden": "true",
2988
+ tabindex: -1,
2989
+ onClick: F
2990
+ }) : null),
2991
+ h(
2992
+ dt,
2993
+ O.value,
2994
+ () => a.value === !0 ? h("div", {
2995
+ ref: u,
2996
+ class: U.value,
2997
+ style: T.value,
2998
+ tabindex: -1,
2999
+ ...K.value
3000
+ }, ke(t.default)) : null
3001
+ )
3002
+ ]);
3003
+ }
3004
+ return A;
3005
+ }
3006
+ });
3007
+ let Ot = !1;
3008
+ {
3009
+ const e = document.createElement("div");
3010
+ e.setAttribute("dir", "rtl"), Object.assign(e.style, {
3011
+ width: "1px",
3012
+ height: "1px",
3013
+ overflow: "auto"
3014
+ });
3015
+ const t = document.createElement("div");
3016
+ Object.assign(t.style, {
3017
+ width: "1000px",
3018
+ height: "1px"
3019
+ }), document.body.appendChild(e), e.appendChild(t), e.scrollLeft = -1e3, Ot = e.scrollLeft >= 0, e.remove();
3020
+ }
3021
+ const pe = 1e3, yu = [
3022
+ "start",
3023
+ "center",
3024
+ "end",
3025
+ "start-force",
3026
+ "center-force",
3027
+ "end-force"
3028
+ ], to = Array.prototype.filter, wu = window.getComputedStyle(document.body).overflowAnchor === void 0 ? Do : function(e, t) {
3029
+ e !== null && (e._qOverflowAnimationFrame !== void 0 && cancelAnimationFrame(e._qOverflowAnimationFrame), e._qOverflowAnimationFrame = requestAnimationFrame(() => {
3030
+ if (e === null)
3031
+ return;
3032
+ e._qOverflowAnimationFrame = void 0;
3033
+ const l = e.children || [];
3034
+ to.call(l, (o) => o.dataset && o.dataset.qVsAnchor !== void 0).forEach((o) => {
3035
+ delete o.dataset.qVsAnchor;
3036
+ });
3037
+ const n = l[t];
3038
+ n && n.dataset && (n.dataset.qVsAnchor = "");
3039
+ }));
3040
+ };
3041
+ function et(e, t) {
3042
+ return e + t;
3043
+ }
3044
+ function el(e, t, l, n, o, u, a, r) {
3045
+ const g = e === window ? document.scrollingElement || document.documentElement : e, b = o === !0 ? "offsetWidth" : "offsetHeight", s = {
3046
+ scrollStart: 0,
3047
+ scrollViewSize: -a - r,
3048
+ scrollMaxSize: 0,
3049
+ offsetStart: -a,
3050
+ offsetEnd: -r
3051
+ };
3052
+ if (o === !0 ? (e === window ? (s.scrollStart = window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, s.scrollViewSize += document.documentElement.clientWidth) : (s.scrollStart = g.scrollLeft, s.scrollViewSize += g.clientWidth), s.scrollMaxSize = g.scrollWidth, u === !0 && (s.scrollStart = (Ot === !0 ? s.scrollMaxSize - s.scrollViewSize : 0) - s.scrollStart)) : (e === window ? (s.scrollStart = window.pageYOffset || window.scrollY || document.body.scrollTop || 0, s.scrollViewSize += document.documentElement.clientHeight) : (s.scrollStart = g.scrollTop, s.scrollViewSize += g.clientHeight), s.scrollMaxSize = g.scrollHeight), l !== null)
3053
+ for (let y = l.previousElementSibling; y !== null; y = y.previousElementSibling)
3054
+ y.classList.contains("q-virtual-scroll--skip") === !1 && (s.offsetStart += y[b]);
3055
+ if (n !== null)
3056
+ for (let y = n.nextElementSibling; y !== null; y = y.nextElementSibling)
3057
+ y.classList.contains("q-virtual-scroll--skip") === !1 && (s.offsetEnd += y[b]);
3058
+ if (t !== e) {
3059
+ const y = g.getBoundingClientRect(), v = t.getBoundingClientRect();
3060
+ o === !0 ? (s.offsetStart += v.left - y.left, s.offsetEnd -= v.width) : (s.offsetStart += v.top - y.top, s.offsetEnd -= v.height), e !== window && (s.offsetStart += s.scrollStart), s.offsetEnd += s.scrollMaxSize - s.offsetStart;
3061
+ }
3062
+ return s;
3063
+ }
3064
+ function rn(e, t, l, n) {
3065
+ t === "end" && (t = (e === window ? document.body : e)[l === !0 ? "scrollWidth" : "scrollHeight"]), e === window ? l === !0 ? (n === !0 && (t = (Ot === !0 ? document.body.scrollWidth - document.documentElement.clientWidth : 0) - t), window.scrollTo(t, window.pageYOffset || window.scrollY || document.body.scrollTop || 0)) : window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, t) : l === !0 ? (n === !0 && (t = (Ot === !0 ? e.scrollWidth - e.offsetWidth : 0) - t), e.scrollLeft = t) : e.scrollTop = t;
3066
+ }
3067
+ function at(e, t, l, n) {
3068
+ if (l >= n)
3069
+ return 0;
3070
+ const o = t.length, u = Math.floor(l / pe), a = Math.floor((n - 1) / pe) + 1;
3071
+ let r = e.slice(u, a).reduce(et, 0);
3072
+ return l % pe !== 0 && (r -= t.slice(u * pe, l).reduce(et, 0)), n % pe !== 0 && n !== o && (r -= t.slice(n, a * pe).reduce(et, 0)), r;
3073
+ }
3074
+ const Su = {
3075
+ virtualScrollSliceSize: {
3076
+ type: [Number, String],
3077
+ default: 10
3078
+ },
3079
+ virtualScrollSliceRatioBefore: {
3080
+ type: [Number, String],
3081
+ default: 1
3082
+ },
3083
+ virtualScrollSliceRatioAfter: {
3084
+ type: [Number, String],
3085
+ default: 1
3086
+ },
3087
+ virtualScrollItemSize: {
3088
+ type: [Number, String],
3089
+ default: 24
3090
+ },
3091
+ virtualScrollStickySizeStart: {
3092
+ type: [Number, String],
3093
+ default: 0
3094
+ },
3095
+ virtualScrollStickySizeEnd: {
3096
+ type: [Number, String],
3097
+ default: 0
3098
+ },
3099
+ tableColspan: [Number, String]
3100
+ }, sn = {
3101
+ virtualScrollHorizontal: Boolean,
3102
+ onVirtualScroll: Function,
3103
+ ...Su
3104
+ };
3105
+ function ku({
3106
+ virtualScrollLength: e,
3107
+ getVirtualScrollTarget: t,
3108
+ getVirtualScrollEl: l,
3109
+ virtualScrollItemSizeComputed: n
3110
+ // optional
3111
+ }) {
3112
+ const o = ne(), { props: u, emit: a, proxy: r } = o, { $q: g } = r;
3113
+ let b, s, y, v = [], c;
3114
+ const m = P(0), C = P(0), p = P({}), O = P(null), T = P(null), k = P(null), M = P({ from: 0, to: 0 }), R = d(() => u.tableColspan !== void 0 ? u.tableColspan : 100);
3115
+ n === void 0 && (n = d(() => u.virtualScrollItemSize));
3116
+ const V = d(() => n.value + ";" + u.virtualScrollHorizontal), A = d(
3117
+ () => V.value + ";" + u.virtualScrollSliceRatioBefore + ";" + u.virtualScrollSliceRatioAfter
3118
+ );
3119
+ Z(A, () => {
3120
+ X();
3121
+ }), Z(V, z);
3122
+ function z() {
3123
+ D(s, !0);
3124
+ }
3125
+ function N(f) {
3126
+ D(f === void 0 ? s : f);
3127
+ }
3128
+ function J(f, S) {
3129
+ const F = t();
3130
+ if (F == null || F.nodeType === 8)
3131
+ return;
3132
+ const j = el(
3133
+ F,
3134
+ l(),
3135
+ O.value,
3136
+ T.value,
3137
+ u.virtualScrollHorizontal,
3138
+ g.lang.rtl,
3139
+ u.virtualScrollStickySizeStart,
3140
+ u.virtualScrollStickySizeEnd
3141
+ );
3142
+ y !== j.scrollViewSize && X(j.scrollViewSize), L(
3143
+ F,
3144
+ j,
3145
+ Math.min(e.value - 1, Math.max(0, parseInt(f, 10) || 0)),
3146
+ 0,
3147
+ yu.indexOf(S) !== -1 ? S : s !== -1 && f > s ? "end" : "start"
3148
+ );
3149
+ }
3150
+ function U() {
3151
+ const f = t();
3152
+ if (f == null || f.nodeType === 8)
3153
+ return;
3154
+ const S = el(
3155
+ f,
3156
+ l(),
3157
+ O.value,
3158
+ T.value,
3159
+ u.virtualScrollHorizontal,
3160
+ g.lang.rtl,
3161
+ u.virtualScrollStickySizeStart,
3162
+ u.virtualScrollStickySizeEnd
3163
+ ), F = e.value - 1, j = S.scrollMaxSize - S.offsetStart - S.offsetEnd - C.value;
3164
+ if (b === S.scrollStart)
3165
+ return;
3166
+ if (S.scrollMaxSize <= 0) {
3167
+ L(f, S, 0, 0);
3168
+ return;
3169
+ }
3170
+ y !== S.scrollViewSize && X(S.scrollViewSize), K(M.value.from);
3171
+ const G = Math.floor(S.scrollMaxSize - Math.max(S.scrollViewSize, S.offsetEnd) - Math.min(c[F], S.scrollViewSize / 2));
3172
+ if (G > 0 && Math.ceil(S.scrollStart) >= G) {
3173
+ L(
3174
+ f,
3175
+ S,
3176
+ F,
3177
+ S.scrollMaxSize - S.offsetEnd - v.reduce(et, 0)
3178
+ );
3179
+ return;
3180
+ }
3181
+ let x = 0, $ = S.scrollStart - S.offsetStart, W = $;
3182
+ if ($ <= j && $ + S.scrollViewSize >= m.value)
3183
+ $ -= m.value, x = M.value.from, W = $;
3184
+ else
3185
+ for (let w = 0; $ >= v[w] && x < F; w++)
3186
+ $ -= v[w], x += pe;
3187
+ for (; $ > 0 && x < F; )
3188
+ $ -= c[x], $ > -S.scrollViewSize ? (x++, W = $) : W = c[x] + $;
3189
+ L(
3190
+ f,
3191
+ S,
3192
+ x,
3193
+ W
3194
+ );
3195
+ }
3196
+ function L(f, S, F, j, G) {
3197
+ const x = typeof G == "string" && G.indexOf("-force") !== -1, $ = x === !0 ? G.replace("-force", "") : G, W = $ !== void 0 ? $ : "start";
3198
+ let w = Math.max(0, F - p.value[W]), ee = w + p.value.total;
3199
+ ee > e.value && (ee = e.value, w = Math.max(0, ee - p.value.total)), b = S.scrollStart;
3200
+ const ye = w !== M.value.from || ee !== M.value.to;
3201
+ if (ye === !1 && $ === void 0) {
3202
+ E(F);
3203
+ return;
3204
+ }
3205
+ const { activeElement: He } = document, we = k.value;
3206
+ ye === !0 && we !== null && we !== He && we.contains(He) === !0 && (we.addEventListener("focusout", B), setTimeout(() => {
3207
+ we !== null && we.removeEventListener("focusout", B);
3208
+ })), wu(we, F - w);
3209
+ const bt = $ !== void 0 ? c.slice(w, F).reduce(et, 0) : 0;
3210
+ if (ye === !0) {
3211
+ const Te = ee >= M.value.from && w <= M.value.to ? M.value.to : ee;
3212
+ M.value = { from: w, to: Te }, m.value = at(v, c, 0, w), C.value = at(v, c, ee, e.value), requestAnimationFrame(() => {
3213
+ M.value.to !== ee && b === S.scrollStart && (M.value = { from: M.value.from, to: ee }, C.value = at(v, c, ee, e.value));
3214
+ });
3215
+ }
3216
+ requestAnimationFrame(() => {
3217
+ if (b !== S.scrollStart)
3218
+ return;
3219
+ ye === !0 && K(w);
3220
+ const Te = c.slice(w, F).reduce(et, 0), $e = Te + S.offsetStart + m.value, yt = $e + c[F];
3221
+ let lt = $e + j;
3222
+ if ($ !== void 0) {
3223
+ const Ft = Te - bt, nt = S.scrollStart + Ft;
3224
+ lt = x !== !0 && nt < $e && yt < nt + S.scrollViewSize ? nt : $ === "end" ? yt - S.scrollViewSize : $e - ($ === "start" ? 0 : Math.round((S.scrollViewSize - c[F]) / 2));
3225
+ }
3226
+ b = lt, rn(
3227
+ f,
3228
+ lt,
3229
+ u.virtualScrollHorizontal,
3230
+ g.lang.rtl
3231
+ ), E(F);
3232
+ });
3233
+ }
3234
+ function K(f) {
3235
+ const S = k.value;
3236
+ if (S) {
3237
+ const F = to.call(
3238
+ S.children,
3239
+ (w) => w.classList && w.classList.contains("q-virtual-scroll--skip") === !1
3240
+ ), j = F.length, G = u.virtualScrollHorizontal === !0 ? (w) => w.getBoundingClientRect().width : (w) => w.offsetHeight;
3241
+ let x = f, $, W;
3242
+ for (let w = 0; w < j; ) {
3243
+ for ($ = G(F[w]), w++; w < j && F[w].classList.contains("q-virtual-scroll--with-prev") === !0; )
3244
+ $ += G(F[w]), w++;
3245
+ W = $ - c[x], W !== 0 && (c[x] += W, v[Math.floor(x / pe)] += W), x++;
3246
+ }
3247
+ }
3248
+ }
3249
+ function B() {
3250
+ k.value !== null && k.value !== void 0 && k.value.focus();
3251
+ }
3252
+ function D(f, S) {
3253
+ const F = 1 * n.value;
3254
+ (S === !0 || Array.isArray(c) === !1) && (c = []);
3255
+ const j = c.length;
3256
+ c.length = e.value;
3257
+ for (let x = e.value - 1; x >= j; x--)
3258
+ c[x] = F;
3259
+ const G = Math.floor((e.value - 1) / pe);
3260
+ v = [];
3261
+ for (let x = 0; x <= G; x++) {
3262
+ let $ = 0;
3263
+ const W = Math.min((x + 1) * pe, e.value);
3264
+ for (let w = x * pe; w < W; w++)
3265
+ $ += c[w];
3266
+ v.push($);
3267
+ }
3268
+ s = -1, b = void 0, m.value = at(v, c, 0, M.value.from), C.value = at(v, c, M.value.to, e.value), f >= 0 ? (K(M.value.from), fe(() => {
3269
+ J(f);
3270
+ })) : I();
3271
+ }
3272
+ function X(f) {
3273
+ if (f === void 0 && typeof window < "u") {
3274
+ const $ = t();
3275
+ $ != null && $.nodeType !== 8 && (f = el(
3276
+ $,
3277
+ l(),
3278
+ O.value,
3279
+ T.value,
3280
+ u.virtualScrollHorizontal,
3281
+ g.lang.rtl,
3282
+ u.virtualScrollStickySizeStart,
3283
+ u.virtualScrollStickySizeEnd
3284
+ ).scrollViewSize);
3285
+ }
3286
+ y = f;
3287
+ const S = parseFloat(u.virtualScrollSliceRatioBefore) || 0, F = parseFloat(u.virtualScrollSliceRatioAfter) || 0, j = 1 + S + F, G = f === void 0 || f <= 0 ? 1 : Math.ceil(f / n.value), x = Math.max(
3288
+ 1,
3289
+ G,
3290
+ Math.ceil((u.virtualScrollSliceSize > 0 ? u.virtualScrollSliceSize : 10) / j)
3291
+ );
3292
+ p.value = {
3293
+ total: Math.ceil(x * j),
3294
+ start: Math.ceil(x * S),
3295
+ center: Math.ceil(x * (0.5 + S)),
3296
+ end: Math.ceil(x * (1 + S)),
3297
+ view: G
3298
+ };
3299
+ }
3300
+ function ae(f, S) {
3301
+ const F = u.virtualScrollHorizontal === !0 ? "width" : "height", j = {
3302
+ ["--q-virtual-scroll-item-" + F]: n.value + "px"
3303
+ };
3304
+ return [
3305
+ f === "tbody" ? h(f, {
3306
+ class: "q-virtual-scroll__padding",
3307
+ key: "before",
3308
+ ref: O
3309
+ }, [
3310
+ h("tr", [
3311
+ h("td", {
3312
+ style: { [F]: `${m.value}px`, ...j },
3313
+ colspan: R.value
3314
+ })
3315
+ ])
3316
+ ]) : h(f, {
3317
+ class: "q-virtual-scroll__padding",
3318
+ key: "before",
3319
+ ref: O,
3320
+ style: { [F]: `${m.value}px`, ...j }
3321
+ }),
3322
+ h(f, {
3323
+ class: "q-virtual-scroll__content",
3324
+ key: "content",
3325
+ ref: k,
3326
+ tabindex: -1
3327
+ }, S.flat()),
3328
+ f === "tbody" ? h(f, {
3329
+ class: "q-virtual-scroll__padding",
3330
+ key: "after",
3331
+ ref: T
3332
+ }, [
3333
+ h("tr", [
3334
+ h("td", {
3335
+ style: { [F]: `${C.value}px`, ...j },
3336
+ colspan: R.value
3337
+ })
3338
+ ])
3339
+ ]) : h(f, {
3340
+ class: "q-virtual-scroll__padding",
3341
+ key: "after",
3342
+ ref: T,
3343
+ style: { [F]: `${C.value}px`, ...j }
3344
+ })
3345
+ ];
3346
+ }
3347
+ function E(f) {
3348
+ s !== f && (u.onVirtualScroll !== void 0 && a("virtualScroll", {
3349
+ index: f,
3350
+ from: M.value.from,
3351
+ to: M.value.to - 1,
3352
+ direction: f < s ? "decrease" : "increase",
3353
+ ref: r
3354
+ }), s = f);
3355
+ }
3356
+ X();
3357
+ const I = zn(
3358
+ U,
3359
+ g.platform.is.ios === !0 ? 120 : 35
3360
+ );
3361
+ qo(() => {
3362
+ X();
3363
+ });
3364
+ let se = !1;
3365
+ return Pt(() => {
3366
+ se = !0;
3367
+ }), gn(() => {
3368
+ if (se !== !0) return;
3369
+ const f = t();
3370
+ b !== void 0 && f !== void 0 && f !== null && f.nodeType !== 8 ? rn(
3371
+ f,
3372
+ b,
3373
+ u.virtualScrollHorizontal,
3374
+ g.lang.rtl
3375
+ ) : J(s);
3376
+ }), me(() => {
3377
+ I.cancel();
3378
+ }), Object.assign(r, { scrollTo: J, reset: z, refresh: N }), {
3379
+ virtualScrollSliceRange: M,
3380
+ virtualScrollSliceSizeComputed: p,
3381
+ setVirtualScrollSize: X,
3382
+ onVirtualScrollEvt: I,
3383
+ localResetVirtualScroll: D,
3384
+ padVirtualScroll: ae,
3385
+ scrollTo: J,
3386
+ reset: z,
3387
+ refresh: N
3388
+ };
3389
+ }
3390
+ const xu = /[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/, Cu = /[\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, qu = /[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/, _u = /[a-z0-9_ -]$/i;
3391
+ function Eu(e) {
3392
+ return function(l) {
3393
+ if (l.type === "compositionend" || l.type === "change") {
3394
+ if (l.target.qComposing !== !0) return;
3395
+ l.target.qComposing = !1, e(l);
3396
+ } else l.type === "compositionupdate" && l.target.qComposing !== !0 && typeof l.data == "string" && (ve.is.firefox === !0 ? _u.test(l.data) === !1 : xu.test(l.data) === !0 || Cu.test(l.data) === !0 || qu.test(l.data) === !0) === !0 && (l.target.qComposing = !0);
3397
+ };
3398
+ }
3399
+ function Be(e, t) {
3400
+ if (e === t)
3401
+ return !0;
3402
+ if (e !== null && t !== null && typeof e == "object" && typeof t == "object") {
3403
+ if (e.constructor !== t.constructor)
3404
+ return !1;
3405
+ let l, n;
3406
+ if (e.constructor === Array) {
3407
+ if (l = e.length, l !== t.length)
3408
+ return !1;
3409
+ for (n = l; n-- !== 0; )
3410
+ if (Be(e[n], t[n]) !== !0)
3411
+ return !1;
3412
+ return !0;
3413
+ }
3414
+ if (e.constructor === Map) {
3415
+ if (e.size !== t.size)
3416
+ return !1;
3417
+ let u = e.entries();
3418
+ for (n = u.next(); n.done !== !0; ) {
3419
+ if (t.has(n.value[0]) !== !0)
3420
+ return !1;
3421
+ n = u.next();
3422
+ }
3423
+ for (u = e.entries(), n = u.next(); n.done !== !0; ) {
3424
+ if (Be(n.value[1], t.get(n.value[0])) !== !0)
3425
+ return !1;
3426
+ n = u.next();
3427
+ }
3428
+ return !0;
3429
+ }
3430
+ if (e.constructor === Set) {
3431
+ if (e.size !== t.size)
3432
+ return !1;
3433
+ const u = e.entries();
3434
+ for (n = u.next(); n.done !== !0; ) {
3435
+ if (t.has(n.value[0]) !== !0)
3436
+ return !1;
3437
+ n = u.next();
3438
+ }
3439
+ return !0;
3440
+ }
3441
+ if (e.buffer != null && e.buffer.constructor === ArrayBuffer) {
3442
+ if (l = e.length, l !== t.length)
3443
+ return !1;
3444
+ for (n = l; n-- !== 0; )
3445
+ if (e[n] !== t[n])
3446
+ return !1;
3447
+ return !0;
3448
+ }
3449
+ if (e.constructor === RegExp)
3450
+ return e.source === t.source && e.flags === t.flags;
3451
+ if (e.valueOf !== Object.prototype.valueOf)
3452
+ return e.valueOf() === t.valueOf();
3453
+ if (e.toString !== Object.prototype.toString)
3454
+ return e.toString() === t.toString();
3455
+ const o = Object.keys(e).filter((u) => e[u] !== void 0);
3456
+ if (l = o.length, l !== Object.keys(t).filter((u) => t[u] !== void 0).length)
3457
+ return !1;
3458
+ for (n = l; n-- !== 0; ) {
3459
+ const u = o[n];
3460
+ if (Be(e[u], t[u]) !== !0)
3461
+ return !1;
3462
+ }
3463
+ return !0;
3464
+ }
3465
+ return e !== e && t !== t;
3466
+ }
3467
+ function cn(e, t, l) {
3468
+ if (l <= t)
3469
+ return t;
3470
+ const n = l - t + 1;
3471
+ let o = t + (e - t) % n;
3472
+ return o < t && (o = n + o), o === 0 ? 0 : o;
3473
+ }
3474
+ const dn = (e) => ["add", "add-unique", "toggle"].includes(e), Bu = ".*+?^${}()|[]\\", Vu = Object.keys(ml);
3475
+ function tl(e, t) {
3476
+ if (typeof e == "function") return e;
3477
+ const l = e !== void 0 ? e : t;
3478
+ return (n) => n !== null && typeof n == "object" && l in n ? n[l] : n;
3479
+ }
3480
+ const Tu = ge({
3481
+ name: "QSelect",
3482
+ inheritAttrs: !1,
3483
+ props: {
3484
+ ...sn,
3485
+ ...Mn,
3486
+ ...ml,
3487
+ // override of useFieldProps > modelValue
3488
+ modelValue: {
3489
+ required: !0
3490
+ },
3491
+ multiple: Boolean,
3492
+ displayValue: [String, Number],
3493
+ displayValueHtml: Boolean,
3494
+ dropdownIcon: String,
3495
+ options: {
3496
+ type: Array,
3497
+ default: () => []
3498
+ },
3499
+ optionValue: [Function, String],
3500
+ optionLabel: [Function, String],
3501
+ optionDisable: [Function, String],
3502
+ hideSelected: Boolean,
3503
+ hideDropdownIcon: Boolean,
3504
+ fillInput: Boolean,
3505
+ maxValues: [Number, String],
3506
+ optionsDense: Boolean,
3507
+ optionsDark: {
3508
+ type: Boolean,
3509
+ default: null
3510
+ },
3511
+ optionsSelectedClass: String,
3512
+ optionsHtml: Boolean,
3513
+ optionsCover: Boolean,
3514
+ menuShrink: Boolean,
3515
+ menuAnchor: String,
3516
+ menuSelf: String,
3517
+ menuOffset: Array,
3518
+ popupContentClass: String,
3519
+ popupContentStyle: [String, Array, Object],
3520
+ popupNoRouteDismiss: Boolean,
3521
+ useInput: Boolean,
3522
+ useChips: Boolean,
3523
+ newValueMode: {
3524
+ type: String,
3525
+ validator: dn
3526
+ },
3527
+ mapOptions: Boolean,
3528
+ emitValue: Boolean,
3529
+ disableTabSelection: Boolean,
3530
+ inputDebounce: {
3531
+ type: [Number, String],
3532
+ default: 500
3533
+ },
3534
+ inputClass: [Array, String, Object],
3535
+ inputStyle: [Array, String, Object],
3536
+ tabindex: {
3537
+ type: [String, Number],
3538
+ default: 0
3539
+ },
3540
+ autocomplete: String,
3541
+ transitionShow: {},
3542
+ transitionHide: {},
3543
+ transitionDuration: {},
3544
+ behavior: {
3545
+ type: String,
3546
+ validator: (e) => ["default", "menu", "dialog"].includes(e),
3547
+ default: "default"
3548
+ },
3549
+ // override of useVirtualScrollProps > virtualScrollItemSize (no default)
3550
+ virtualScrollItemSize: sn.virtualScrollItemSize.type,
3551
+ onNewValue: Function,
3552
+ onFilter: Function
3553
+ },
3554
+ emits: [
3555
+ ...Fn,
3556
+ "add",
3557
+ "remove",
3558
+ "inputValue",
3559
+ "keyup",
3560
+ "keypress",
3561
+ "keydown",
3562
+ "popupShow",
3563
+ "popupHide",
3564
+ "filterAbort"
3565
+ ],
3566
+ setup(e, { slots: t, emit: l }) {
3567
+ const { proxy: n } = ne(), { $q: o } = n, u = P(!1), a = P(!1), r = P(-1), g = P(""), b = P(!1), s = P(!1);
3568
+ let y = null, v = null, c, m, C, p = null, O, T, k, M;
3569
+ const R = P(null), V = P(null), A = P(null), z = P(null), N = P(null), J = fi(e), U = Eu(ql), L = d(() => Array.isArray(e.options) ? e.options.length : 0), K = d(() => e.virtualScrollItemSize === void 0 ? e.optionsDense === !0 ? 24 : 48 : e.virtualScrollItemSize), {
3570
+ virtualScrollSliceRange: B,
3571
+ virtualScrollSliceSizeComputed: D,
3572
+ localResetVirtualScroll: X,
3573
+ padVirtualScroll: ae,
3574
+ onVirtualScrollEvt: E,
3575
+ scrollTo: I,
3576
+ setVirtualScrollSize: se
3577
+ } = ku({
3578
+ virtualScrollLength: L,
3579
+ getVirtualScrollTarget: io,
3580
+ getVirtualScrollEl: xl,
3581
+ virtualScrollItemSizeComputed: K
3582
+ }), f = Hn(), S = d(() => {
3583
+ const i = e.mapOptions === !0 && e.multiple !== !0, q = e.modelValue !== void 0 && (e.modelValue !== null || i === !0) ? e.multiple === !0 && Array.isArray(e.modelValue) ? e.modelValue : [e.modelValue] : [];
3584
+ if (e.mapOptions === !0 && Array.isArray(e.options) === !0) {
3585
+ const _ = e.mapOptions === !0 && c !== void 0 ? c : [], H = q.map((Y) => oo(Y, _));
3586
+ return e.modelValue === null && i === !0 ? H.filter((Y) => Y !== null) : H;
3587
+ }
3588
+ return q;
3589
+ }), F = d(() => {
3590
+ const i = {};
3591
+ return Vu.forEach((q) => {
3592
+ const _ = e[q];
3593
+ _ !== void 0 && (i[q] = _);
3594
+ }), i;
3595
+ }), j = d(() => e.optionsDark === null ? f.isDark.value : e.optionsDark), G = d(() => sl(S.value)), x = d(() => {
3596
+ let i = "q-field__input q-placeholder col";
3597
+ return e.hideSelected === !0 || S.value.length === 0 ? [i, e.inputClass] : (i += " q-field__input--padding", e.inputClass === void 0 ? i : [i, e.inputClass]);
3598
+ }), $ = d(
3599
+ () => (e.virtualScrollHorizontal === !0 ? "q-virtual-scroll--horizontal" : "") + (e.popupContentClass ? " " + e.popupContentClass : "")
3600
+ ), W = d(() => L.value === 0), w = d(
3601
+ () => S.value.map((i) => ce.value(i)).join(", ")
3602
+ ), ee = d(() => e.displayValue !== void 0 ? e.displayValue : w.value), ye = d(() => e.optionsHtml === !0 ? () => !0 : (i) => i != null && i.html === !0), He = d(() => e.displayValueHtml === !0 || e.displayValue === void 0 && (e.optionsHtml === !0 || S.value.some(ye.value))), we = d(() => f.focused.value === !0 ? e.tabindex : -1), bt = d(() => {
3603
+ const i = {
3604
+ tabindex: e.tabindex,
3605
+ role: "combobox",
3606
+ "aria-label": e.label,
3607
+ "aria-readonly": e.readonly === !0 ? "true" : "false",
3608
+ "aria-autocomplete": e.useInput === !0 ? "list" : "none",
3609
+ "aria-expanded": u.value === !0 ? "true" : "false",
3610
+ "aria-controls": `${f.targetUid.value}_lb`
3611
+ };
3612
+ return r.value >= 0 && (i["aria-activedescendant"] = `${f.targetUid.value}_${r.value}`), i;
3613
+ }), Te = d(() => ({
3614
+ id: `${f.targetUid.value}_lb`,
3615
+ role: "listbox",
3616
+ "aria-multiselectable": e.multiple === !0 ? "true" : "false"
3617
+ })), $e = d(() => S.value.map((i, q) => ({
3618
+ index: q,
3619
+ opt: i,
3620
+ html: ye.value(i),
3621
+ selected: !0,
3622
+ removeAtIndex: no,
3623
+ toggleOption: Re,
3624
+ tabindex: we.value
3625
+ }))), yt = d(() => {
3626
+ if (L.value === 0)
3627
+ return [];
3628
+ const { from: i, to: q } = B.value;
3629
+ return e.options.slice(i, q).map((_, H) => {
3630
+ const Y = De.value(_) === !0, Q = Dt(_) === !0, oe = i + H, te = {
3631
+ clickable: !0,
3632
+ active: Q,
3633
+ activeClass: nt.value,
3634
+ manualFocus: !0,
3635
+ focused: !1,
3636
+ disable: Y,
3637
+ tabindex: -1,
3638
+ dense: e.optionsDense,
3639
+ dark: j.value,
3640
+ role: "option",
3641
+ "aria-selected": Q === !0 ? "true" : "false",
3642
+ id: `${f.targetUid.value}_${oe}`,
3643
+ onClick: () => {
3644
+ Re(_);
3645
+ }
3646
+ };
3647
+ return Y !== !0 && (r.value === oe && (te.focused = !0), o.platform.is.desktop === !0 && (te.onMousemove = () => {
3648
+ u.value === !0 && je(oe);
3649
+ })), {
3650
+ index: oe,
3651
+ opt: _,
3652
+ html: ye.value(_),
3653
+ label: ce.value(_),
3654
+ selected: te.active,
3655
+ focused: te.focused,
3656
+ toggleOption: Re,
3657
+ setOptionIndex: je,
3658
+ itemProps: te
3659
+ };
3660
+ });
3661
+ }), lt = d(() => e.dropdownIcon !== void 0 ? e.dropdownIcon : o.iconSet.arrow.dropdown), Ft = d(
3662
+ () => e.optionsCover === !1 && e.outlined !== !0 && e.standout !== !0 && e.borderless !== !0 && e.rounded !== !0
3663
+ ), nt = d(() => e.optionsSelectedClass !== void 0 ? e.optionsSelectedClass : e.color !== void 0 ? `text-${e.color}` : ""), Se = d(() => tl(e.optionValue, "value")), ce = d(() => tl(e.optionLabel, "label")), De = d(() => tl(e.optionDisable, "disable")), wt = d(() => S.value.map(Se.value)), lo = d(() => {
3664
+ const i = {
3665
+ onInput: ql,
3666
+ // Safari < 10.2 & UIWebView doesn't fire compositionend when
3667
+ // switching focus before confirming composition choice
3668
+ // this also fixes the issue where some browsers e.g. iOS Chrome
3669
+ // fires "change" instead of "input" on autocomplete.
3670
+ onChange: U,
3671
+ onKeydown: kl,
3672
+ onKeyup: wl,
3673
+ onKeypress: Sl,
3674
+ onFocus: bl,
3675
+ onClick(q) {
3676
+ m === !0 && Ee(q);
3677
+ }
3678
+ };
3679
+ return i.onCompositionstart = i.onCompositionupdate = i.onCompositionend = U, i;
3680
+ });
3681
+ Z(S, (i) => {
3682
+ c = i, e.useInput === !0 && e.fillInput === !0 && e.multiple !== !0 && f.innerLoading.value !== !0 && (a.value !== !0 && u.value !== !0 || G.value !== !0) && (C !== !0 && Qe(), (a.value === !0 || u.value === !0) && Ne(""));
3683
+ }, { immediate: !0 }), Z(() => e.fillInput, Qe), Z(u, jt), Z(L, bo);
3684
+ function hl(i) {
3685
+ return e.emitValue === !0 ? Se.value(i) : i;
3686
+ }
3687
+ function Ht(i) {
3688
+ if (i !== -1 && i < S.value.length)
3689
+ if (e.multiple === !0) {
3690
+ const q = e.modelValue.slice();
3691
+ l("remove", { index: i, value: q.splice(i, 1)[0] }), l("update:modelValue", q);
3692
+ } else
3693
+ l("update:modelValue", null);
3694
+ }
3695
+ function no(i) {
3696
+ Ht(i), f.focus();
3697
+ }
3698
+ function pl(i, q) {
3699
+ const _ = hl(i);
3700
+ if (e.multiple !== !0) {
3701
+ e.fillInput === !0 && ot(
3702
+ ce.value(i),
3703
+ !0,
3704
+ !0
3705
+ ), l("update:modelValue", _);
3706
+ return;
3707
+ }
3708
+ if (S.value.length === 0) {
3709
+ l("add", { index: 0, value: _ }), l("update:modelValue", e.multiple === !0 ? [_] : _);
3710
+ return;
3711
+ }
3712
+ if (q === !0 && Dt(i) === !0 || e.maxValues !== void 0 && e.modelValue.length >= e.maxValues)
3713
+ return;
3714
+ const H = e.modelValue.slice();
3715
+ l("add", { index: H.length, value: _ }), H.push(_), l("update:modelValue", H);
3716
+ }
3717
+ function Re(i, q) {
3718
+ if (f.editable.value !== !0 || i === void 0 || De.value(i) === !0)
3719
+ return;
3720
+ const _ = Se.value(i);
3721
+ if (e.multiple !== !0) {
3722
+ q !== !0 && (ot(
3723
+ e.fillInput === !0 ? ce.value(i) : "",
3724
+ !0,
3725
+ !0
3726
+ ), Le()), V.value !== null && V.value.focus(), (S.value.length === 0 || Be(Se.value(S.value[0]), _) !== !0) && l("update:modelValue", e.emitValue === !0 ? _ : i);
3727
+ return;
3728
+ }
3729
+ if ((m !== !0 || b.value === !0) && f.focus(), bl(), S.value.length === 0) {
3730
+ const Q = e.emitValue === !0 ? _ : i;
3731
+ l("add", { index: 0, value: Q }), l("update:modelValue", e.multiple === !0 ? [Q] : Q);
3732
+ return;
3733
+ }
3734
+ const H = e.modelValue.slice(), Y = wt.value.findIndex((Q) => Be(Q, _));
3735
+ if (Y !== -1)
3736
+ l("remove", { index: Y, value: H.splice(Y, 1)[0] });
3737
+ else {
3738
+ if (e.maxValues !== void 0 && H.length >= e.maxValues)
3739
+ return;
3740
+ const Q = e.emitValue === !0 ? _ : i;
3741
+ l("add", { index: H.length, value: Q }), H.push(Q);
3742
+ }
3743
+ l("update:modelValue", H);
3744
+ }
3745
+ function je(i) {
3746
+ if (o.platform.is.desktop !== !0) return;
3747
+ const q = i !== -1 && i < L.value ? i : -1;
3748
+ r.value !== q && (r.value = q);
3749
+ }
3750
+ function St(i = 1, q) {
3751
+ if (u.value === !0) {
3752
+ let _ = r.value;
3753
+ do
3754
+ _ = cn(
3755
+ _ + i,
3756
+ -1,
3757
+ L.value - 1
3758
+ );
3759
+ while (_ !== -1 && _ !== r.value && De.value(e.options[_]) === !0);
3760
+ r.value !== _ && (je(_), I(_), q !== !0 && e.useInput === !0 && e.fillInput === !0 && kt(
3761
+ _ >= 0 ? ce.value(e.options[_]) : O,
3762
+ !0
3763
+ ));
3764
+ }
3765
+ }
3766
+ function oo(i, q) {
3767
+ const _ = (H) => Be(Se.value(H), i);
3768
+ return e.options.find(_) || q.find(_) || i;
3769
+ }
3770
+ function Dt(i) {
3771
+ const q = Se.value(i);
3772
+ return wt.value.find((_) => Be(_, q)) !== void 0;
3773
+ }
3774
+ function bl(i) {
3775
+ e.useInput === !0 && V.value !== null && (i === void 0 || V.value === i.target && i.target.value === w.value) && V.value.select();
3776
+ }
3777
+ function yl(i) {
3778
+ Fe(i, 27) === !0 && u.value === !0 && (Ee(i), Le(), Qe()), l("keyup", i);
3779
+ }
3780
+ function wl(i) {
3781
+ const { value: q } = i.target;
3782
+ if (i.keyCode !== void 0) {
3783
+ yl(i);
3784
+ return;
3785
+ }
3786
+ if (i.target.value = "", y !== null && (clearTimeout(y), y = null), v !== null && (clearTimeout(v), v = null), Qe(), typeof q == "string" && q.length !== 0) {
3787
+ const _ = q.toLocaleLowerCase(), H = (Q) => {
3788
+ const oe = e.options.find((te) => String(Q.value(te)).toLocaleLowerCase() === _);
3789
+ return oe === void 0 ? !1 : (S.value.indexOf(oe) === -1 ? Re(oe) : Le(), !0);
3790
+ }, Y = (Q) => {
3791
+ H(Se) !== !0 && Q !== !0 && H(ce) !== !0 && Ne(q, !0, () => Y(!0));
3792
+ };
3793
+ Y();
3794
+ } else
3795
+ f.clearValue(i);
3796
+ }
3797
+ function Sl(i) {
3798
+ l("keypress", i);
3799
+ }
3800
+ function kl(i) {
3801
+ if (l("keydown", i), _n(i) === !0)
3802
+ return;
3803
+ const q = g.value.length !== 0 && (e.newValueMode !== void 0 || e.onNewValue !== void 0), _ = i.shiftKey !== !0 && e.disableTabSelection !== !0 && e.multiple !== !0 && (r.value !== -1 || q === !0);
3804
+ if (i.keyCode === 27) {
3805
+ be(i);
3806
+ return;
3807
+ }
3808
+ if (i.keyCode === 9 && _ === !1) {
3809
+ We();
3810
+ return;
3811
+ }
3812
+ if (i.target === void 0 || i.target.id !== f.targetUid.value || f.editable.value !== !0) return;
3813
+ if (i.keyCode === 40 && f.innerLoading.value !== !0 && u.value === !1) {
3814
+ le(i), Ke();
3815
+ return;
3816
+ }
3817
+ if (i.keyCode === 8 && (e.useChips === !0 || e.clearable === !0) && e.hideSelected !== !0 && g.value.length === 0) {
3818
+ e.multiple === !0 && Array.isArray(e.modelValue) === !0 ? Ht(e.modelValue.length - 1) : e.multiple !== !0 && e.modelValue !== null && l("update:modelValue", null);
3819
+ return;
3820
+ }
3821
+ (i.keyCode === 35 || i.keyCode === 36) && (typeof g.value != "string" || g.value.length === 0) && (le(i), r.value = -1, St(i.keyCode === 36 ? 1 : -1, e.multiple)), (i.keyCode === 33 || i.keyCode === 34) && D.value !== void 0 && (le(i), r.value = Math.max(
3822
+ -1,
3823
+ Math.min(
3824
+ L.value,
3825
+ r.value + (i.keyCode === 33 ? -1 : 1) * D.value.view
3826
+ )
3827
+ ), St(i.keyCode === 33 ? 1 : -1, e.multiple)), (i.keyCode === 38 || i.keyCode === 40) && (le(i), St(i.keyCode === 38 ? -1 : 1, e.multiple));
3828
+ const H = L.value;
3829
+ if ((k === void 0 || M < Date.now()) && (k = ""), H > 0 && e.useInput !== !0 && i.key !== void 0 && i.key.length === 1 && i.altKey === !1 && i.ctrlKey === !1 && i.metaKey === !1 && (i.keyCode !== 32 || k.length !== 0)) {
3830
+ u.value !== !0 && Ke(i);
3831
+ const Y = i.key.toLocaleLowerCase(), Q = k.length === 1 && k[0] === Y;
3832
+ M = Date.now() + 1500, Q === !1 && (le(i), k += Y);
3833
+ const oe = new RegExp("^" + k.split("").map((Nt) => Bu.indexOf(Nt) !== -1 ? "\\" + Nt : Nt).join(".*"), "i");
3834
+ let te = r.value;
3835
+ if (Q === !0 || te < 0 || oe.test(ce.value(e.options[te])) !== !0)
3836
+ do
3837
+ te = cn(te + 1, -1, H - 1);
3838
+ while (te !== r.value && (De.value(e.options[te]) === !0 || oe.test(ce.value(e.options[te])) !== !0));
3839
+ r.value !== te && fe(() => {
3840
+ je(te), I(te), te >= 0 && e.useInput === !0 && e.fillInput === !0 && kt(ce.value(e.options[te]), !0);
3841
+ });
3842
+ return;
3843
+ }
3844
+ if (!(i.keyCode !== 13 && (i.keyCode !== 32 || e.useInput === !0 || k !== "") && (i.keyCode !== 9 || _ === !1))) {
3845
+ if (i.keyCode !== 9 && le(i), r.value !== -1 && r.value < H) {
3846
+ Re(e.options[r.value]);
3847
+ return;
3848
+ }
3849
+ if (q === !0) {
3850
+ const Y = (Q, oe) => {
3851
+ if (oe) {
3852
+ if (dn(oe) !== !0)
3853
+ return;
3854
+ } else
3855
+ oe = e.newValueMode;
3856
+ if (ot("", e.multiple !== !0, !0), Q == null)
3857
+ return;
3858
+ (oe === "toggle" ? Re : pl)(Q, oe === "add-unique"), e.multiple !== !0 && (V.value !== null && V.value.focus(), Le());
3859
+ };
3860
+ if (e.onNewValue !== void 0 ? l("newValue", g.value, Y) : Y(g.value), e.multiple !== !0)
3861
+ return;
3862
+ }
3863
+ u.value === !0 ? We() : f.innerLoading.value !== !0 && Ke();
3864
+ }
3865
+ }
3866
+ function xl() {
3867
+ return m === !0 ? N.value : A.value !== null && A.value.contentEl !== null ? A.value.contentEl : void 0;
3868
+ }
3869
+ function io() {
3870
+ return xl();
3871
+ }
3872
+ function uo() {
3873
+ return e.hideSelected === !0 ? [] : t["selected-item"] !== void 0 ? $e.value.map((i) => t["selected-item"](i)).slice() : t.selected !== void 0 ? [].concat(t.selected()) : e.useChips === !0 ? $e.value.map((i, q) => h(Pi, {
3874
+ key: "option-" + q,
3875
+ removable: f.editable.value === !0 && De.value(i.opt) !== !0,
3876
+ dense: !0,
3877
+ textColor: e.color,
3878
+ tabindex: we.value,
3879
+ onRemove() {
3880
+ i.removeAtIndex(q);
3881
+ }
3882
+ }, () => h("span", {
3883
+ class: "ellipsis",
3884
+ [i.html === !0 ? "innerHTML" : "textContent"]: ce.value(i.opt)
3885
+ }))) : [
3886
+ h("span", {
3887
+ [He.value === !0 ? "innerHTML" : "textContent"]: ee.value
3888
+ })
3889
+ ];
3890
+ }
3891
+ function Cl() {
3892
+ if (W.value === !0)
3893
+ return t["no-option"] !== void 0 ? t["no-option"]({ inputValue: g.value }) : void 0;
3894
+ const i = t.option !== void 0 ? t.option : (_) => h(On, {
3895
+ key: _.index,
3896
+ ..._.itemProps
3897
+ }, () => h(
3898
+ Tt,
3899
+ () => h(
3900
+ An,
3901
+ () => h("span", {
3902
+ [_.html === !0 ? "innerHTML" : "textContent"]: _.label
3903
+ })
3904
+ )
3905
+ ));
3906
+ let q = ae("div", yt.value.map(i));
3907
+ return t["before-options"] !== void 0 && (q = t["before-options"]().concat(q)), Ae(t["after-options"], q);
3908
+ }
3909
+ function ao(i, q) {
3910
+ const _ = q === !0 ? { ...bt.value, ...f.splitAttrs.attributes.value } : void 0, H = {
3911
+ ref: q === !0 ? V : void 0,
3912
+ key: "i_t",
3913
+ class: x.value,
3914
+ style: e.inputStyle,
3915
+ value: g.value !== void 0 ? g.value : "",
3916
+ // required for Android in order to show ENTER key when in form
3917
+ type: "search",
3918
+ ..._,
3919
+ id: q === !0 ? f.targetUid.value : void 0,
3920
+ maxlength: e.maxlength,
3921
+ autocomplete: e.autocomplete,
3922
+ "data-autofocus": i === !0 || e.autofocus === !0 || void 0,
3923
+ disabled: e.disable === !0,
3924
+ readonly: e.readonly === !0,
3925
+ ...lo.value
3926
+ };
3927
+ return i !== !0 && m === !0 && (Array.isArray(H.class) === !0 ? H.class = [...H.class, "no-pointer-events"] : H.class += " no-pointer-events"), h("input", H);
3928
+ }
3929
+ function ql(i) {
3930
+ y !== null && (clearTimeout(y), y = null), v !== null && (clearTimeout(v), v = null), !(i && i.target && i.target.qComposing === !0) && (kt(i.target.value || ""), C = !0, O = g.value, f.focused.value !== !0 && (m !== !0 || b.value === !0) && f.focus(), e.onFilter !== void 0 && (y = setTimeout(() => {
3931
+ y = null, Ne(g.value);
3932
+ }, e.inputDebounce)));
3933
+ }
3934
+ function kt(i, q) {
3935
+ g.value !== i && (g.value = i, q === !0 || e.inputDebounce === 0 || e.inputDebounce === "0" ? l("inputValue", i) : v = setTimeout(() => {
3936
+ v = null, l("inputValue", i);
3937
+ }, e.inputDebounce));
3938
+ }
3939
+ function ot(i, q, _) {
3940
+ C = _ !== !0, e.useInput === !0 && (kt(i, !0), (q === !0 || _ !== !0) && (O = i), q !== !0 && Ne(i));
3941
+ }
3942
+ function Ne(i, q, _) {
3943
+ if (e.onFilter === void 0 || q !== !0 && f.focused.value !== !0)
3944
+ return;
3945
+ f.innerLoading.value === !0 ? l("filterAbort") : (f.innerLoading.value = !0, s.value = !0), i !== "" && e.multiple !== !0 && S.value.length !== 0 && C !== !0 && i === ce.value(S.value[0]) && (i = "");
3946
+ const H = setTimeout(() => {
3947
+ u.value === !0 && (u.value = !1);
3948
+ }, 10);
3949
+ p !== null && clearTimeout(p), p = H, l(
3950
+ "filter",
3951
+ i,
3952
+ (Y, Q) => {
3953
+ (q === !0 || f.focused.value === !0) && p === H && (clearTimeout(p), typeof Y == "function" && Y(), s.value = !1, fe(() => {
3954
+ f.innerLoading.value = !1, f.editable.value === !0 && (q === !0 ? u.value === !0 && Le() : u.value === !0 ? jt(!0) : u.value = !0), typeof Q == "function" && fe(() => {
3955
+ Q(n);
3956
+ }), typeof _ == "function" && fe(() => {
3957
+ _(n);
3958
+ });
3959
+ }));
3960
+ },
3961
+ () => {
3962
+ f.focused.value === !0 && p === H && (clearTimeout(p), f.innerLoading.value = !1, s.value = !1), u.value === !0 && (u.value = !1);
3963
+ }
3964
+ );
3965
+ }
3966
+ function ro() {
3967
+ return h(du, {
3968
+ ref: A,
3969
+ class: $.value,
3970
+ style: e.popupContentStyle,
3971
+ modelValue: u.value,
3972
+ fit: e.menuShrink !== !0,
3973
+ cover: e.optionsCover === !0 && W.value !== !0 && e.useInput !== !0,
3974
+ anchor: e.menuAnchor,
3975
+ self: e.menuSelf,
3976
+ offset: e.menuOffset,
3977
+ dark: j.value,
3978
+ noParentEvent: !0,
3979
+ noRefocus: !0,
3980
+ noFocus: !0,
3981
+ noRouteDismiss: e.popupNoRouteDismiss,
3982
+ square: Ft.value,
3983
+ transitionShow: e.transitionShow,
3984
+ transitionHide: e.transitionHide,
3985
+ transitionDuration: e.transitionDuration,
3986
+ separateClosePopup: !0,
3987
+ ...Te.value,
3988
+ onScrollPassive: E,
3989
+ onBeforeShow: El,
3990
+ onBeforeHide: so,
3991
+ onShow: co
3992
+ }, Cl);
3993
+ }
3994
+ function so(i) {
3995
+ Bl(i), We();
3996
+ }
3997
+ function co() {
3998
+ se();
3999
+ }
4000
+ function fo(i) {
4001
+ Ee(i), V.value !== null && V.value.focus(), b.value = !0, window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, 0);
4002
+ }
4003
+ function vo(i) {
4004
+ Ee(i), fe(() => {
4005
+ b.value = !1;
4006
+ });
4007
+ }
4008
+ function mo() {
4009
+ const i = [
4010
+ h(Ai, {
4011
+ class: `col-auto ${f.fieldClass.value}`,
4012
+ ...F.value,
4013
+ for: f.targetUid.value,
4014
+ dark: j.value,
4015
+ square: !0,
4016
+ loading: s.value,
4017
+ itemAligned: !1,
4018
+ filled: !0,
4019
+ stackLabel: g.value.length !== 0,
4020
+ ...f.splitAttrs.listeners.value,
4021
+ onFocus: fo,
4022
+ onBlur: vo
4023
+ }, {
4024
+ ...t,
4025
+ rawControl: () => f.getControl(!0),
4026
+ before: void 0,
4027
+ after: void 0
4028
+ })
4029
+ ];
4030
+ return u.value === !0 && i.push(
4031
+ h("div", {
4032
+ ref: N,
4033
+ class: $.value + " scroll",
4034
+ style: e.popupContentStyle,
4035
+ ...Te.value,
4036
+ onClick: be,
4037
+ onScrollPassive: E
4038
+ }, Cl())
4039
+ ), h(bu, {
4040
+ ref: z,
4041
+ modelValue: a.value,
4042
+ position: e.useInput === !0 ? "top" : void 0,
4043
+ transitionShow: T,
4044
+ transitionHide: e.transitionHide,
4045
+ transitionDuration: e.transitionDuration,
4046
+ noRouteDismiss: e.popupNoRouteDismiss,
4047
+ onBeforeShow: El,
4048
+ onBeforeHide: go,
4049
+ onHide: ho,
4050
+ onShow: po
4051
+ }, () => h("div", {
4052
+ class: "q-select__dialog" + (j.value === !0 ? " q-select__dialog--dark q-dark" : "") + (b.value === !0 ? " q-select__dialog--focused" : "")
4053
+ }, i));
4054
+ }
4055
+ function go(i) {
4056
+ Bl(i), z.value !== null && z.value.__updateRefocusTarget(
4057
+ f.rootRef.value.querySelector(".q-field__native > [tabindex]:last-child")
4058
+ ), f.focused.value = !1;
4059
+ }
4060
+ function ho(i) {
4061
+ Le(), f.focused.value === !1 && l("blur", i), Qe();
4062
+ }
4063
+ function po() {
4064
+ const i = document.activeElement;
4065
+ (i === null || i.id !== f.targetUid.value) && V.value !== null && V.value !== i && V.value.focus(), se();
4066
+ }
4067
+ function We() {
4068
+ a.value !== !0 && (r.value = -1, u.value === !0 && (u.value = !1), f.focused.value === !1 && (p !== null && (clearTimeout(p), p = null), f.innerLoading.value === !0 && (l("filterAbort"), f.innerLoading.value = !1, s.value = !1)));
4069
+ }
4070
+ function Ke(i) {
4071
+ f.editable.value === !0 && (m === !0 ? (f.onControlFocusin(i), a.value = !0, fe(() => {
4072
+ f.focus();
4073
+ })) : f.focus(), e.onFilter !== void 0 ? Ne(g.value) : (W.value !== !0 || t["no-option"] !== void 0) && (u.value = !0));
4074
+ }
4075
+ function Le() {
4076
+ a.value = !1, We();
4077
+ }
4078
+ function Qe() {
4079
+ e.useInput === !0 && ot(
4080
+ e.multiple !== !0 && e.fillInput === !0 && S.value.length !== 0 && ce.value(S.value[0]) || "",
4081
+ !0,
4082
+ !0
4083
+ );
4084
+ }
4085
+ function jt(i) {
4086
+ let q = -1;
4087
+ if (i === !0) {
4088
+ if (S.value.length !== 0) {
4089
+ const _ = Se.value(S.value[0]);
4090
+ q = e.options.findIndex((H) => Be(Se.value(H), _));
4091
+ }
4092
+ X(q);
4093
+ }
4094
+ je(q);
4095
+ }
4096
+ function bo(i, q) {
4097
+ u.value === !0 && f.innerLoading.value === !1 && (X(-1, !0), fe(() => {
4098
+ u.value === !0 && f.innerLoading.value === !1 && (i > q ? X() : jt(!0));
4099
+ }));
4100
+ }
4101
+ function _l() {
4102
+ a.value === !1 && A.value !== null && A.value.updatePosition();
4103
+ }
4104
+ function El(i) {
4105
+ i !== void 0 && Ee(i), l("popupShow", i), f.hasPopupOpen = !0, f.onControlFocusin(i);
4106
+ }
4107
+ function Bl(i) {
4108
+ i !== void 0 && Ee(i), l("popupHide", i), f.hasPopupOpen = !1, f.onControlFocusout(i);
4109
+ }
4110
+ function Vl() {
4111
+ m = o.platform.is.mobile !== !0 && e.behavior !== "dialog" ? !1 : e.behavior !== "menu" && (e.useInput === !0 ? t["no-option"] !== void 0 || e.onFilter !== void 0 || W.value === !1 : !0), T = o.platform.is.ios === !0 && m === !0 && e.useInput === !0 ? "fade" : e.transitionShow;
4112
+ }
4113
+ return mn(Vl), _o(_l), Vl(), me(() => {
4114
+ y !== null && clearTimeout(y), v !== null && clearTimeout(v);
4115
+ }), Object.assign(n, {
4116
+ showPopup: Ke,
4117
+ hidePopup: Le,
4118
+ removeAtIndex: Ht,
4119
+ add: pl,
4120
+ toggleOption: Re,
4121
+ getOptionIndex: () => r.value,
4122
+ setOptionIndex: je,
4123
+ moveOptionSelection: St,
4124
+ filter: Ne,
4125
+ updateMenuPosition: _l,
4126
+ updateInputValue: ot,
4127
+ isOptionSelected: Dt,
4128
+ getEmittingOptionValue: hl,
4129
+ isOptionDisabled: (...i) => De.value.apply(null, i) === !0,
4130
+ getOptionValue: (...i) => Se.value.apply(null, i),
4131
+ getOptionLabel: (...i) => ce.value.apply(null, i)
4132
+ }), Object.assign(f, {
4133
+ innerValue: S,
4134
+ fieldClass: d(
4135
+ () => `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"}`
4136
+ ),
4137
+ inputRef: R,
4138
+ targetRef: V,
4139
+ hasValue: G,
4140
+ showPopup: Ke,
4141
+ floatingLabel: d(
4142
+ () => e.hideSelected !== !0 && G.value === !0 || typeof g.value == "number" || g.value.length !== 0 || sl(e.displayValue)
4143
+ ),
4144
+ getControlChild: () => {
4145
+ if (f.editable.value !== !1 && (a.value === !0 || W.value !== !0 || t["no-option"] !== void 0))
4146
+ return m === !0 ? mo() : ro();
4147
+ f.hasPopupOpen === !0 && (f.hasPopupOpen = !1);
4148
+ },
4149
+ controlEvents: {
4150
+ onFocusin(i) {
4151
+ f.onControlFocusin(i);
4152
+ },
4153
+ onFocusout(i) {
4154
+ f.onControlFocusout(i, () => {
4155
+ Qe(), We();
4156
+ });
4157
+ },
4158
+ onClick(i) {
4159
+ if (be(i), m !== !0 && u.value === !0) {
4160
+ We(), V.value !== null && V.value.focus();
4161
+ return;
4162
+ }
4163
+ Ke(i);
4164
+ }
4165
+ },
4166
+ getControl: (i) => {
4167
+ const q = uo(), _ = i === !0 || a.value !== !0 || m !== !0;
4168
+ if (e.useInput === !0)
4169
+ q.push(ao(i, _));
4170
+ else if (f.editable.value === !0) {
4171
+ const Y = _ === !0 ? bt.value : void 0;
4172
+ q.push(
4173
+ h("input", {
4174
+ ref: _ === !0 ? V : void 0,
4175
+ key: "d_t",
4176
+ class: "q-select__focus-target",
4177
+ id: _ === !0 ? f.targetUid.value : void 0,
4178
+ value: ee.value,
4179
+ readonly: !0,
4180
+ "data-autofocus": i === !0 || e.autofocus === !0 || void 0,
4181
+ ...Y,
4182
+ onKeydown: kl,
4183
+ onKeyup: yl,
4184
+ onKeypress: Sl
4185
+ })
4186
+ ), _ === !0 && typeof e.autocomplete == "string" && e.autocomplete.length !== 0 && q.push(
4187
+ h("input", {
4188
+ class: "q-select__autocomplete-input",
4189
+ autocomplete: e.autocomplete,
4190
+ tabindex: -1,
4191
+ onKeyup: wl
4192
+ })
4193
+ );
4194
+ }
4195
+ if (J.value !== void 0 && e.disable !== !0 && wt.value.length !== 0) {
4196
+ const Y = wt.value.map((Q) => h("option", { value: Q, selected: !0 }));
4197
+ q.push(
4198
+ h("select", {
4199
+ class: "hidden",
4200
+ name: J.value,
4201
+ multiple: e.multiple
4202
+ }, Y)
4203
+ );
4204
+ }
4205
+ const H = e.useInput === !0 || _ !== !0 ? void 0 : f.splitAttrs.attributes.value;
4206
+ return h("div", {
4207
+ class: "q-field__native row items-center",
4208
+ ...H,
4209
+ ...f.splitAttrs.listeners.value
4210
+ }, q);
4211
+ },
4212
+ getInnerAppend: () => e.loading !== !0 && s.value !== !0 && e.hideDropdownIcon !== !0 ? [
4213
+ h(_e, {
4214
+ class: "q-select__dropdown-icon" + (u.value === !0 ? " rotate-180" : ""),
4215
+ name: lt.value
4216
+ })
4217
+ ] : null
4218
+ }), Dn(f);
4219
+ }
4220
+ }), $u = { class: "app-select__amount" }, Ru = /* @__PURE__ */ mt({
4221
+ __name: "index",
4222
+ props: {
4223
+ modelValue: {},
4224
+ size: { default: qe.MD },
4225
+ options: {},
4226
+ multiple: { type: Boolean },
4227
+ label: {},
4228
+ placeholder: {},
4229
+ required: { type: Boolean },
4230
+ clearable: { type: Boolean },
4231
+ disabled: { type: Boolean },
4232
+ loading: { type: Boolean },
4233
+ filtering: { type: Boolean },
4234
+ autofocus: { type: Boolean },
4235
+ rules: {},
4236
+ lazyRules: { type: [Boolean, String] }
4237
+ },
4238
+ emits: ["update:modelValue"],
4239
+ setup(e, { emit: t }) {
4240
+ const l = e, n = t, o = P(!1), u = P(""), a = d({
4241
+ get() {
4242
+ return l.modelValue;
4243
+ },
4244
+ set(c) {
4245
+ n("update:modelValue", c);
4246
+ }
4247
+ }), r = d(() => {
4248
+ var c;
4249
+ if (Array.isArray(a.value)) {
4250
+ if (l.multiple && a.value.length == 0)
4251
+ return l.placeholder;
4252
+ } else return ((c = a.value) == null ? void 0 : c.label) || l.placeholder || "";
4253
+ return "";
4254
+ }), g = d(() => !(!l.clearable || !l.modelValue || l.modelValue && Array.isArray(l.modelValue) && !l.modelValue.length)), b = d(() => u.value ? l.options.filter(
4255
+ (c) => c.label.toLowerCase().includes(u.value.toLowerCase())
4256
+ ) : l.options), s = d(() => {
4257
+ if (l.rules)
4258
+ return l.required ? [...l.rules, Il] : l.rules;
4259
+ if (l.required)
4260
+ return [Il];
4261
+ }), y = () => {
4262
+ a.value = void 0;
4263
+ }, v = (c, m) => {
4264
+ m(() => {
4265
+ u.value = c;
4266
+ });
4267
+ };
4268
+ return (c, m) => (ue(), de("div", {
4269
+ class: Ve(["app-select", [{ "app-select_opened": o.value }, `app-select_${c.size}`]])
4270
+ }, [
4271
+ c.label ? (ue(), de("label", {
4272
+ key: 0,
4273
+ class: Ve(["app-select__label", { "app-select__label_bold": c.required }])
4274
+ }, Ze(c.required ? `${c.label} *` : c.label), 3)) : Ce("", !0),
4275
+ it(Je(Tu), {
4276
+ standout: "",
4277
+ "hide-bottom-space": "",
4278
+ "hide-dropdown-icon": "",
4279
+ "no-error-icon": "",
4280
+ behavior: "menu",
4281
+ "popup-content-class": `app-select-menu app-select-menu_${c.size}`,
4282
+ placeholder: c.filtering && "Почніть вводити",
4283
+ "input-debounce": "50",
4284
+ modelValue: a.value,
4285
+ "onUpdate:modelValue": m[0] || (m[0] = (C) => a.value = C),
4286
+ options: b.value,
4287
+ multiple: c.multiple,
4288
+ "use-input": c.filtering && (Array.isArray(a.value) || !a.value),
4289
+ rules: s.value,
4290
+ "lazy-rules": c.lazyRules,
4291
+ autofocus: c.autofocus,
4292
+ disable: c.disabled,
4293
+ loading: c.loading,
4294
+ onFilter: v,
4295
+ onPopupShow: m[1] || (m[1] = (C) => o.value = !0),
4296
+ onPopupHide: m[2] || (m[2] = (C) => o.value = !1)
4297
+ }, {
4298
+ append: xe(() => [
4299
+ g.value ? (ue(), de("i", {
4300
+ key: 0,
4301
+ class: "icon-kl icon-kl-close app-select__clear",
4302
+ onClick: pn(y, ["stop", "prevent"])
4303
+ })) : Ce("", !0),
4304
+ m[3] || (m[3] = Wt("i", { class: "icon-kl icon-kl-arrow-down app-select__drop-icon" }, null, -1))
4305
+ ]),
4306
+ selected: xe(() => {
4307
+ var C, p;
4308
+ return [
4309
+ Array.isArray(a.value) ? (ue(), de(rt, { key: 0 }, [
4310
+ !c.filtering || a.value.length ? (ue(), de("span", {
4311
+ key: 0,
4312
+ class: Ve([
4313
+ "app-select__selected",
4314
+ {
4315
+ "app-select__placeholder": !((C = a.value) != null && C.length) && c.placeholder
4316
+ }
4317
+ ])
4318
+ }, [
4319
+ (p = a.value) != null && p.length ? (ue(), de(rt, { key: 0 }, [
4320
+ m[4] || (m[4] = Vt(" Вибрано ")),
4321
+ Wt("span", $u, Ze(a.value.length), 1)
4322
+ ], 64)) : (ue(), de(rt, { key: 1 }, [
4323
+ Vt(Ze(l.placeholder), 1)
4324
+ ], 64))
4325
+ ], 2)) : Ce("", !0)
4326
+ ], 64)) : (ue(), de(rt, { key: 1 }, [
4327
+ !c.filtering || a.value ? (ue(), de("span", {
4328
+ key: 0,
4329
+ class: Ve([
4330
+ "app-select__selected",
4331
+ { "app-select__placeholder": !a.value && c.placeholder }
4332
+ ])
4333
+ }, Ze(r.value), 3)) : Ce("", !0)
4334
+ ], 64))
4335
+ ];
4336
+ }),
4337
+ option: xe((C) => [
4338
+ it(On, hn({
4339
+ class: ["app-select__option", { "app-select__option_selected": C.selected }]
4340
+ }, C.itemProps), {
4341
+ default: xe(() => [
4342
+ l.multiple ? (ue(), $t(Tt, {
4343
+ key: 0,
4344
+ class: "option-multiple",
4345
+ avatar: ""
4346
+ }, {
4347
+ default: xe(() => [
4348
+ it(bi, {
4349
+ size: "30px",
4350
+ "model-value": C.selected,
4351
+ "onUpdate:modelValue": () => C.toggleOption(C.opt)
4352
+ }, null, 8, ["model-value", "onUpdate:modelValue"])
4353
+ ]),
4354
+ _: 2
4355
+ }, 1024)) : Ce("", !0),
4356
+ C.opt.done ? (ue(), $t(Tt, {
4357
+ key: 1,
4358
+ class: "option-done",
4359
+ avatar: ""
4360
+ }, {
4361
+ default: xe(() => m[5] || (m[5] = [
4362
+ Wt("i", { class: "icon-kl icon-kl-check option-done__icon" }, null, -1)
4363
+ ])),
4364
+ _: 1
4365
+ })) : Ce("", !0),
4366
+ it(Tt, null, {
4367
+ default: xe(() => [
4368
+ it(An, null, {
4369
+ default: xe(() => [
4370
+ Vt(Ze(C.opt.label), 1)
4371
+ ]),
4372
+ _: 2
4373
+ }, 1024)
4374
+ ]),
4375
+ _: 2
4376
+ }, 1024)
4377
+ ]),
4378
+ _: 2
4379
+ }, 1040, ["class"])
4380
+ ]),
4381
+ _: 1
4382
+ }, 8, ["popup-content-class", "placeholder", "modelValue", "options", "multiple", "use-input", "rules", "lazy-rules", "autofocus", "disable", "loading"])
4383
+ ], 2));
4384
+ }
4385
+ }), Lu = /* @__PURE__ */ fl(Ru, [["__scopeId", "data-v-2646d558"]]);
4386
+ function Mu(e) {
4387
+ const t = document.createElement("textarea");
4388
+ t.value = e, t.contentEditable = "true", t.style.position = "fixed";
4389
+ const l = () => {
4390
+ };
4391
+ gl(l), document.body.appendChild(t), t.focus(), t.select();
4392
+ const n = document.execCommand("copy");
4393
+ return t.remove(), Lt(l), n;
4394
+ }
4395
+ function Au(e) {
4396
+ return navigator.clipboard !== void 0 ? navigator.clipboard.writeText(e) : new Promise((t, l) => {
4397
+ const n = Mu(e);
4398
+ n ? t(!0) : l(n);
4399
+ });
4400
+ }
4401
+ const ll = {
4402
+ COPY: "copy_o",
4403
+ COPIED: "copied_o"
4404
+ }, Ou = /* @__PURE__ */ mt({
4405
+ __name: "index",
4406
+ props: {
4407
+ text: {},
4408
+ size: {},
4409
+ transparent: { type: Boolean, default: !0 },
4410
+ flat: { type: Boolean },
4411
+ rounded: { type: Boolean },
4412
+ color: { default: bn.INFO },
4413
+ iconLeft: {},
4414
+ iconRight: {},
4415
+ iconMiddle: {},
4416
+ disabled: { type: Boolean },
4417
+ loading: { type: Boolean },
4418
+ to: {},
4419
+ href: {},
4420
+ target: {},
4421
+ submit: { type: Boolean },
4422
+ ariaLabel: {},
4423
+ label: {}
4424
+ },
4425
+ setup(e) {
4426
+ const t = e, l = P(ll.COPY), n = () => {
4427
+ l.value = ll.COPIED, setTimeout(() => {
4428
+ l.value = ll.COPY;
4429
+ }, 2e3);
4430
+ }, o = () => {
4431
+ Au(t.text).then(n).catch((u) => {
4432
+ console.log(u);
4433
+ });
4434
+ };
4435
+ return (u, a) => (ue(), $t(Je(Ln), hn(t, {
4436
+ "icon-middle": l.value,
4437
+ onClick: pn(o, ["prevent"])
4438
+ }), null, 16, ["icon-middle"]));
4439
+ }
4440
+ }), zu = {
4441
+ install(e) {
4442
+ e.component("AppIcon", si), e.component("AppButton", Ln), e.component("AppButtonCopy", Ou), e.component("AppSelect", Lu);
4443
+ }
4444
+ };
1051
4445
  export {
1052
- Bt as AppButton,
1053
- Yt as AppButtonCopy,
1054
- Vt as AppIcon
4446
+ Ln as AppButton,
4447
+ Ou as AppButtonCopy,
4448
+ si as AppIcon,
4449
+ Lu as AppSelect,
4450
+ zu as uiKitPlugin
1055
4451
  };