@validol4ik/uikit 0.9.4 → 0.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/{AppButtonCopy-CBOiSOFe.js → AppButtonCopy-4SswxN9E.js} +1 -1
  2. package/dist/{AppButtonCopy-CJq8F3gr.cjs → AppButtonCopy-C-ztdhMo.cjs} +1 -1
  3. package/dist/AppSelect-BmeBIImq.cjs +1 -0
  4. package/dist/AppSelect-BnjDEXM-.js +1985 -0
  5. package/dist/BottomSheet-DSqcRbL0.cjs +1 -0
  6. package/dist/BottomSheet-qodpM1oq.js +103 -0
  7. package/dist/DropdownButton-0caxYIDd.cjs +1 -0
  8. package/dist/{DropdownButton-C37a5e17.js → DropdownButton-CmUx9BXY.js} +8 -7
  9. package/dist/QDialog-Pw0XBuWk.js +264 -0
  10. package/dist/QDialog-f6QBtGnd.cjs +1 -0
  11. package/dist/QMenu-BEJJgJal.js +536 -0
  12. package/dist/QMenu-xk1k4IZT.cjs +1 -0
  13. package/dist/escape-key-BmiNyljw.cjs +1 -0
  14. package/dist/escape-key-DphMa6bO.js +281 -0
  15. package/dist/index-ChHy5BBm.cjs +1 -0
  16. package/dist/index-jCxpgc08.js +1838 -0
  17. package/dist/kl.woff +0 -0
  18. package/dist/style.css +1 -1
  19. package/dist/types/components/AppIcon/iconsList.d.ts +2 -2
  20. package/dist/types/components/buttons/CloseButton/CloseButton.vue.d.ts +5 -0
  21. package/dist/types/components/buttons/CloseButton/types.d.ts +4 -0
  22. package/dist/types/components/menu/BottomSheet/BottomSheet.vue.d.ts +38 -0
  23. package/dist/types/components/menu/BottomSheet/types.d.ts +11 -0
  24. package/dist/types/components/menu/MenuItem/MenuItem.vue.d.ts +29 -0
  25. package/dist/types/components/menu/MenuItem/types.d.ts +21 -0
  26. package/dist/types/components/menu/SystemMenu.vue.d.ts +17 -0
  27. package/dist/types/index.d.ts +58 -1
  28. package/dist/uikit.cjs +1 -1
  29. package/dist/uikit.es.js +10 -6
  30. package/package.json +1 -1
  31. package/dist/AppSelect-BOROROsn.cjs +0 -1
  32. package/dist/AppSelect-CZfoTaTG.js +0 -2304
  33. package/dist/DropdownButton-BQrXTfDg.cjs +0 -1
  34. package/dist/QMenu-Ci2SWpGp.js +0 -808
  35. package/dist/QMenu-DGfnSFI-.cjs +0 -1
  36. package/dist/index-CTeqfCv_.js +0 -1674
  37. package/dist/index-Cekw313Q.cjs +0 -1
@@ -1,1674 +0,0 @@
1
- import { computed as r, markRaw as Ee, defineComponent as K, h as p, withDirectives as oe, getCurrentInstance as ee, unref as Z, ref as W, onBeforeUnmount as Qe, Transition as Ue, openBlock as h, createBlock as ae, normalizeClass as P, withCtx as He, createElementBlock as _, createCommentVNode as V, renderSlot as se, Fragment as ie, createTextVNode as Pe, toDisplayString as Y, withModifiers as Le, createElementVNode as T, toRaw as Q, createVNode as Xe, normalizeStyle as re, watch as We, onMounted as Ye, renderList as Re, withKeys as Ge, vModelText as Je, nextTick as be, useModel as Ze, mergeModels as et, defineAsyncComponent as ge } from "vue";
2
- const $n = ({ app: e }) => {
3
- const t = e.config.globalProperties.$q;
4
- t.iconMapFn = (n) => {
5
- if (n.startsWith("icon-kl:"))
6
- return {
7
- cls: `icon-kl icon-kl-${n.slice(8)}`
8
- };
9
- };
10
- }, Me = {
11
- PRIMARY: "primary",
12
- INFO: "info"
13
- }, z = {
14
- SM: "sm",
15
- MD: "md",
16
- LG: "lg",
17
- XL: "xl"
18
- }, tt = {
19
- [z.SM]: "3px 9px",
20
- [z.MD]: "5px 12px",
21
- [z.LG]: "6px 15px",
22
- [z.XL]: "9px 20px"
23
- }, pe = {
24
- xs: 18,
25
- sm: 24,
26
- md: 32,
27
- lg: 38,
28
- xl: 46
29
- }, ue = {
30
- size: String
31
- };
32
- function ce(e, t = pe) {
33
- return r(() => e.size !== void 0 ? { fontSize: e.size in t ? `${t[e.size]}px` : e.size } : null);
34
- }
35
- function te(e) {
36
- return Ee(K(e));
37
- }
38
- function Ve(e) {
39
- return Ee(e);
40
- }
41
- function Ae(e, t) {
42
- return e !== void 0 && e() || t;
43
- }
44
- function qn(e, t) {
45
- if (e !== void 0) {
46
- const n = e();
47
- if (n != null)
48
- return n.slice();
49
- }
50
- return t;
51
- }
52
- function N(e, t) {
53
- return e !== void 0 ? t.concat(e()) : t;
54
- }
55
- function Cn(e, t) {
56
- return e === void 0 ? t : t !== void 0 ? t.concat(e()) : e();
57
- }
58
- function Sn(e, t, n, a, s, l) {
59
- t.key = a + s;
60
- const o = p(e, t, n);
61
- return s === !0 ? oe(o, l()) : o;
62
- }
63
- const he = "0 0 24 24", fe = (e) => e, ve = (e) => `ionicons ${e}`, Ie = {
64
- "mdi-": (e) => `mdi ${e}`,
65
- "icon-": fe,
66
- // fontawesome equiv
67
- "bt-": (e) => `bt ${e}`,
68
- "eva-": (e) => `eva ${e}`,
69
- "ion-md": ve,
70
- "ion-ios": ve,
71
- "ion-logo": ve,
72
- "iconfont ": fe,
73
- "ti-": (e) => `themify-icon ${e}`,
74
- "bi-": (e) => `bootstrap-icons ${e}`,
75
- "i-": fe
76
- // UnoCSS pure icons
77
- }, Te = {
78
- o_: "-outlined",
79
- r_: "-round",
80
- s_: "-sharp"
81
- }, ze = {
82
- sym_o_: "-outlined",
83
- sym_r_: "-rounded",
84
- sym_s_: "-sharp"
85
- }, nt = new RegExp("^(" + Object.keys(Ie).join("|") + ")"), at = new RegExp("^(" + Object.keys(Te).join("|") + ")"), ke = new RegExp("^(" + Object.keys(ze).join("|") + ")"), lt = /^[Mm]\s?[-+]?\.?\d/, ot = /^img:/, st = /^svguse:/, it = /^ion-/, rt = /^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /, me = te({
86
- name: "QIcon",
87
- props: {
88
- ...ue,
89
- tag: {
90
- type: String,
91
- default: "i"
92
- },
93
- name: String,
94
- color: String,
95
- left: Boolean,
96
- right: Boolean
97
- },
98
- setup(e, { slots: t }) {
99
- const { proxy: { $q: n } } = ee(), a = ce(e), s = r(
100
- () => "q-icon" + (e.left === !0 ? " on-left" : "") + (e.right === !0 ? " on-right" : "") + (e.color !== void 0 ? ` text-${e.color}` : "")
101
- ), l = r(() => {
102
- let o, i = e.name;
103
- if (i === "none" || !i)
104
- return { none: !0 };
105
- if (n.iconMapFn !== null) {
106
- const f = n.iconMapFn(i);
107
- if (f !== void 0)
108
- if (f.icon !== void 0) {
109
- if (i = f.icon, i === "none" || !i)
110
- return { none: !0 };
111
- } else
112
- return {
113
- cls: f.cls,
114
- content: f.content !== void 0 ? f.content : " "
115
- };
116
- }
117
- if (lt.test(i) === !0) {
118
- const [f, C = he] = i.split("|");
119
- return {
120
- svg: !0,
121
- viewBox: C,
122
- nodes: f.split("&&").map((d) => {
123
- const [q, u, m] = d.split("@@");
124
- return p("path", { style: u, d: q, transform: m });
125
- })
126
- };
127
- }
128
- if (ot.test(i) === !0)
129
- return {
130
- img: !0,
131
- src: i.substring(4)
132
- };
133
- if (st.test(i) === !0) {
134
- const [f, C = he] = i.split("|");
135
- return {
136
- svguse: !0,
137
- src: f.substring(7),
138
- viewBox: C
139
- };
140
- }
141
- let $ = " ";
142
- const y = i.match(nt);
143
- if (y !== null)
144
- o = Ie[y[1]](i);
145
- else if (rt.test(i) === !0)
146
- o = i;
147
- else if (it.test(i) === !0)
148
- o = `ionicons ion-${n.platform.is.ios === !0 ? "ios" : "md"}${i.substring(3)}`;
149
- else if (ke.test(i) === !0) {
150
- o = "notranslate material-symbols";
151
- const f = i.match(ke);
152
- f !== null && (i = i.substring(6), o += ze[f[1]]), $ = i;
153
- } else {
154
- o = "notranslate material-icons";
155
- const f = i.match(at);
156
- f !== null && (i = i.substring(2), o += Te[f[1]]), $ = i;
157
- }
158
- return {
159
- cls: o,
160
- content: $
161
- };
162
- });
163
- return () => {
164
- const o = {
165
- class: s.value,
166
- style: a.value,
167
- "aria-hidden": "true"
168
- };
169
- return l.value.none === !0 ? p(e.tag, o, Ae(t.default)) : l.value.img === !0 ? p(e.tag, o, N(t.default, [
170
- p("img", { src: l.value.src })
171
- ])) : l.value.svg === !0 ? p(e.tag, o, N(t.default, [
172
- p("svg", {
173
- viewBox: l.value.viewBox || "0 0 24 24"
174
- }, l.value.nodes)
175
- ])) : l.value.svguse === !0 ? p(e.tag, o, N(t.default, [
176
- p("svg", {
177
- viewBox: l.value.viewBox
178
- }, [
179
- p("use", { "xlink:href": l.value.src })
180
- ])
181
- ])) : (l.value.cls !== void 0 && (o.class += " " + l.value.cls), p(e.tag, o, N(t.default, [
182
- l.value.content
183
- ])));
184
- };
185
- }
186
- }), ut = {
187
- size: {
188
- type: [String, Number],
189
- default: "1em"
190
- },
191
- color: String
192
- };
193
- function ct(e) {
194
- return {
195
- cSize: r(() => e.size in pe ? `${pe[e.size]}px` : e.size),
196
- classes: r(
197
- () => "q-spinner" + (e.color ? ` text-${e.color}` : "")
198
- )
199
- };
200
- }
201
- const Oe = te({
202
- name: "QSpinner",
203
- props: {
204
- ...ut,
205
- thickness: {
206
- type: Number,
207
- default: 5
208
- }
209
- },
210
- setup(e) {
211
- const { cSize: t, classes: n } = ct(e);
212
- return () => p("svg", {
213
- class: n.value + " q-spinner-mat",
214
- width: t.value,
215
- height: t.value,
216
- viewBox: "25 25 50 50"
217
- }, [
218
- p("circle", {
219
- class: "path",
220
- cx: "50",
221
- cy: "50",
222
- r: "20",
223
- fill: "none",
224
- stroke: "currentColor",
225
- "stroke-width": e.thickness,
226
- "stroke-miterlimit": "10"
227
- })
228
- ]);
229
- }
230
- });
231
- function dt(e, t) {
232
- const n = e.style;
233
- for (const a in t)
234
- n[a] = t[a];
235
- }
236
- function Bn(e) {
237
- if (e == null)
238
- return;
239
- if (typeof e == "string")
240
- try {
241
- return document.querySelector(e) || void 0;
242
- } catch {
243
- return;
244
- }
245
- const t = Z(e);
246
- if (t)
247
- return t.$el || t;
248
- }
249
- function wn(e, t) {
250
- if (e == null || e.contains(t) === !0)
251
- return !0;
252
- for (let n = e.nextElementSibling; n !== null; n = n.nextElementSibling)
253
- if (n.contains(t))
254
- return !0;
255
- return !1;
256
- }
257
- const de = {
258
- hasPassive: !1,
259
- passiveCapture: !0,
260
- notPassiveCapture: !0
261
- };
262
- try {
263
- const e = Object.defineProperty({}, "passive", {
264
- get() {
265
- Object.assign(de, {
266
- hasPassive: !0,
267
- passive: { passive: !0 },
268
- notPassive: { passive: !1 },
269
- passiveCapture: { passive: !0, capture: !0 },
270
- notPassiveCapture: { passive: !1, capture: !0 }
271
- });
272
- }
273
- });
274
- window.addEventListener("qtest", null, e), window.removeEventListener("qtest", null, e);
275
- } catch {
276
- }
277
- function En() {
278
- }
279
- function ft(e) {
280
- 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]), {
281
- top: e.clientY,
282
- left: e.clientX
283
- };
284
- }
285
- function Pn(e) {
286
- if (e.path)
287
- return e.path;
288
- if (e.composedPath)
289
- return e.composedPath();
290
- const t = [];
291
- let n = e.target;
292
- for (; n; ) {
293
- if (t.push(n), n.tagName === "HTML")
294
- return t.push(document), t.push(window), t;
295
- n = n.parentElement;
296
- }
297
- }
298
- function je(e) {
299
- e.stopPropagation();
300
- }
301
- function vt(e) {
302
- e.cancelable !== !1 && e.preventDefault();
303
- }
304
- function D(e) {
305
- e.cancelable !== !1 && e.preventDefault(), e.stopPropagation();
306
- }
307
- function pt(e, t, n) {
308
- const a = `__q_${t}_evt`;
309
- e[a] = e[a] !== void 0 ? e[a].concat(n) : n, n.forEach((s) => {
310
- s[0].addEventListener(s[1], e[s[2]], de[s[3]]);
311
- });
312
- }
313
- function mt(e, t) {
314
- const n = `__q_${t}_evt`;
315
- e[n] !== void 0 && (e[n].forEach((a) => {
316
- a[0].removeEventListener(a[1], e[a[2]], de[a[3]]);
317
- }), e[n] = void 0);
318
- }
319
- function gt(e) {
320
- return e !== Object(e) || e.isComposing === !0 || e.qKeyEvent === !0;
321
- }
322
- function le(e, t) {
323
- return gt(e) === !0 ? !1 : [].concat(t).includes(e.keyCode);
324
- }
325
- function bt(e, t = 250) {
326
- let n = !1, a;
327
- return function() {
328
- return n === !1 && (n = !0, setTimeout(() => {
329
- n = !1;
330
- }, t), a = e.apply(this, arguments)), a;
331
- };
332
- }
333
- function ye(e, t, n, a) {
334
- n.modifiers.stop === !0 && je(e);
335
- const s = n.modifiers.color;
336
- let l = n.modifiers.center;
337
- l = l === !0 || a === !0;
338
- const o = document.createElement("span"), i = document.createElement("span"), $ = ft(e), { left: y, top: f, width: C, height: d } = t.getBoundingClientRect(), q = Math.sqrt(C * C + d * d), u = q / 2, m = `${(C - q) / 2}px`, v = l ? m : `${$.left - y - u}px`, b = `${(d - q) / 2}px`, S = l ? b : `${$.top - f - u}px`;
339
- i.className = "q-ripple__inner", dt(i, {
340
- height: `${q}px`,
341
- width: `${q}px`,
342
- transform: `translate3d(${v},${S},0) scale3d(.2,.2,1)`,
343
- opacity: 0
344
- }), o.className = `q-ripple${s ? " text-" + s : ""}`, o.setAttribute("dir", "ltr"), o.appendChild(i), t.appendChild(o);
345
- const w = () => {
346
- o.remove(), clearTimeout(E);
347
- };
348
- n.abort.push(w);
349
- let E = setTimeout(() => {
350
- i.classList.add("q-ripple__inner--enter"), i.style.transform = `translate3d(${m},${b},0) scale3d(1,1,1)`, i.style.opacity = 0.2, E = setTimeout(() => {
351
- i.classList.remove("q-ripple__inner--enter"), i.classList.add("q-ripple__inner--leave"), i.style.opacity = 0, E = setTimeout(() => {
352
- o.remove(), n.abort.splice(n.abort.indexOf(w), 1);
353
- }, 275);
354
- }, 250);
355
- }, 50);
356
- }
357
- function _e(e, { modifiers: t, value: n, arg: a }) {
358
- const s = Object.assign({}, e.cfg.ripple, t, n);
359
- e.modifiers = {
360
- early: s.early === !0,
361
- stop: s.stop === !0,
362
- center: s.center === !0,
363
- color: s.color || a,
364
- keyCodes: [].concat(s.keyCodes || 13)
365
- };
366
- }
367
- const ht = Ve(
368
- {
369
- name: "ripple",
370
- beforeMount(e, t) {
371
- const n = t.instance.$.appContext.config.globalProperties.$q.config || {};
372
- if (n.ripple === !1) return;
373
- const a = {
374
- cfg: n,
375
- enabled: t.value !== !1,
376
- modifiers: {},
377
- abort: [],
378
- start(s) {
379
- a.enabled === !0 && s.qSkipRipple !== !0 && s.type === (a.modifiers.early === !0 ? "pointerdown" : "click") && ye(s, e, a, s.qKeyEvent === !0);
380
- },
381
- keystart: bt((s) => {
382
- a.enabled === !0 && s.qSkipRipple !== !0 && le(s, a.modifiers.keyCodes) === !0 && s.type === `key${a.modifiers.early === !0 ? "down" : "up"}` && ye(s, e, a, !0);
383
- }, 300)
384
- };
385
- _e(a, t), e.__qripple = a, pt(a, "main", [
386
- [e, "pointerdown", "start", "passive"],
387
- [e, "click", "start", "passive"],
388
- [e, "keydown", "keystart", "passive"],
389
- [e, "keyup", "keystart", "passive"]
390
- ]);
391
- },
392
- updated(e, t) {
393
- if (t.oldValue !== t.value) {
394
- const n = e.__qripple;
395
- n !== void 0 && (n.enabled = t.value !== !1, n.enabled === !0 && Object(t.value) === t.value && _e(n, t));
396
- }
397
- },
398
- beforeUnmount(e) {
399
- const t = e.__qripple;
400
- t !== void 0 && (t.abort.forEach((n) => {
401
- n();
402
- }), mt(t, "main"), delete e._qripple);
403
- }
404
- }
405
- ), De = {
406
- left: "start",
407
- center: "center",
408
- right: "end",
409
- between: "between",
410
- around: "around",
411
- evenly: "evenly",
412
- stretch: "stretch"
413
- }, kt = Object.keys(De), yt = {
414
- align: {
415
- type: String,
416
- validator: (e) => kt.includes(e)
417
- }
418
- };
419
- function _t(e) {
420
- return r(() => {
421
- const t = e.align === void 0 ? e.vertical === !0 ? "stretch" : "left" : e.align;
422
- return `${e.vertical === !0 ? "items" : "justify"}-${De[t]}`;
423
- });
424
- }
425
- function ne(e) {
426
- if (Object(e.$parent) === e.$parent)
427
- return e.$parent;
428
- let { parent: t } = e.$;
429
- for (; Object(t) === t; ) {
430
- if (Object(t.proxy) === t.proxy)
431
- return t.proxy;
432
- t = t.parent;
433
- }
434
- }
435
- function $t(e) {
436
- return e.appContext.config.globalProperties.$router !== void 0;
437
- }
438
- function Ln(e) {
439
- return e.isUnmounted === !0 || e.isDeactivated === !0;
440
- }
441
- function $e(e) {
442
- return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
443
- }
444
- function qe(e, t) {
445
- return (e.aliasOf || e) === (t.aliasOf || t);
446
- }
447
- function qt(e, t) {
448
- for (const n in t) {
449
- const a = t[n], s = e[n];
450
- if (typeof a == "string") {
451
- if (a !== s)
452
- return !1;
453
- } else if (Array.isArray(s) === !1 || s.length !== a.length || a.some((l, o) => l !== s[o]))
454
- return !1;
455
- }
456
- return !0;
457
- }
458
- function Ce(e, t) {
459
- return Array.isArray(t) === !0 ? e.length === t.length && e.every((n, a) => n === t[a]) : e.length === 1 && e[0] === t;
460
- }
461
- function Ct(e, t) {
462
- return Array.isArray(e) === !0 ? Ce(e, t) : Array.isArray(t) === !0 ? Ce(t, e) : e === t;
463
- }
464
- function St(e, t) {
465
- if (Object.keys(e).length !== Object.keys(t).length)
466
- return !1;
467
- for (const n in e)
468
- if (Ct(e[n], t[n]) === !1)
469
- return !1;
470
- return !0;
471
- }
472
- const xe = {
473
- // router-link
474
- to: [String, Object],
475
- replace: Boolean,
476
- // regular <a> link
477
- href: String,
478
- target: String,
479
- // state
480
- disable: Boolean
481
- }, Rn = {
482
- ...xe,
483
- // router-link
484
- exact: Boolean,
485
- activeClass: {
486
- type: String,
487
- default: "q-router-link--active"
488
- },
489
- exactActiveClass: {
490
- type: String,
491
- default: "q-router-link--exact-active"
492
- }
493
- };
494
- function Bt({ fallbackTag: e, useDisableForRouterLinkProps: t = !0 } = {}) {
495
- const n = ee(), { props: a, proxy: s, emit: l } = n, o = $t(n), i = r(() => a.disable !== !0 && a.href !== void 0), $ = t === !0 ? r(
496
- () => o === !0 && a.disable !== !0 && i.value !== !0 && a.to !== void 0 && a.to !== null && a.to !== ""
497
- ) : r(
498
- () => o === !0 && i.value !== !0 && a.to !== void 0 && a.to !== null && a.to !== ""
499
- ), y = r(() => $.value === !0 ? S(a.to) : null), f = r(() => y.value !== null), C = r(() => i.value === !0 || f.value === !0), d = r(() => a.type === "a" || C.value === !0 ? "a" : a.tag || e || "div"), q = r(() => i.value === !0 ? {
500
- href: a.href,
501
- target: a.target
502
- } : f.value === !0 ? {
503
- href: y.value.href,
504
- target: a.target
505
- } : {}), u = r(() => {
506
- if (f.value === !1)
507
- return -1;
508
- const { matched: k } = y.value, { length: L } = k, R = k[L - 1];
509
- if (R === void 0)
510
- return -1;
511
- const O = s.$route.matched;
512
- if (O.length === 0)
513
- return -1;
514
- const j = O.findIndex(
515
- qe.bind(null, R)
516
- );
517
- if (j !== -1)
518
- return j;
519
- const F = $e(k[L - 2]);
520
- return (
521
- // we are dealing with nested routes
522
- L > 1 && $e(R) === F && O[O.length - 1].path !== F ? O.findIndex(
523
- qe.bind(null, k[L - 2])
524
- ) : j
525
- );
526
- }), m = r(
527
- () => f.value === !0 && u.value !== -1 && qt(s.$route.params, y.value.params)
528
- ), v = r(
529
- () => m.value === !0 && u.value === s.$route.matched.length - 1 && St(s.$route.params, y.value.params)
530
- ), b = r(() => f.value === !0 ? v.value === !0 ? ` ${a.exactActiveClass} ${a.activeClass}` : a.exact === !0 ? "" : m.value === !0 ? ` ${a.activeClass}` : "" : "");
531
- function S(k) {
532
- try {
533
- return s.$router.resolve(k);
534
- } catch {
535
- }
536
- return null;
537
- }
538
- function w(k, { returnRouterError: L, to: R = a.to, replace: O = a.replace } = {}) {
539
- if (a.disable === !0)
540
- return k.preventDefault(), Promise.resolve(!1);
541
- if (
542
- // don't redirect with control keys;
543
- // should match RouterLink from Vue Router
544
- k.metaKey || k.altKey || k.ctrlKey || k.shiftKey || k.button !== void 0 && k.button !== 0 || a.target === "_blank"
545
- )
546
- return Promise.resolve(!1);
547
- k.preventDefault();
548
- const j = s.$router[O === !0 ? "replace" : "push"](R);
549
- return L === !0 ? j : j.then(() => {
550
- }).catch(() => {
551
- });
552
- }
553
- function E(k) {
554
- if (f.value === !0) {
555
- const L = (R) => w(k, R);
556
- l("click", k, L), k.defaultPrevented !== !0 && L();
557
- } else
558
- l("click", k);
559
- }
560
- return {
561
- hasRouterLink: f,
562
- hasHrefLink: i,
563
- hasLink: C,
564
- linkTag: d,
565
- resolvedLink: y,
566
- linkIsActive: m,
567
- linkIsExactActive: v,
568
- linkClass: b,
569
- linkAttrs: q,
570
- getLink: S,
571
- navigateToRouterLink: w,
572
- navigateOnClick: E
573
- };
574
- }
575
- const Se = {
576
- none: 0,
577
- xs: 4,
578
- sm: 8,
579
- md: 16,
580
- lg: 24,
581
- xl: 32
582
- }, wt = {
583
- xs: 8,
584
- sm: 10,
585
- md: 14,
586
- lg: 20,
587
- xl: 24
588
- }, Et = ["button", "submit", "reset"], Pt = /[^\s]\/[^\s]/, Lt = ["flat", "outline", "push", "unelevated"];
589
- function Ne(e, t) {
590
- return e.flat === !0 ? "flat" : e.outline === !0 ? "outline" : e.push === !0 ? "push" : e.unelevated === !0 ? "unelevated" : t;
591
- }
592
- function Mn(e) {
593
- const t = Ne(e);
594
- return t !== void 0 ? { [t]: !0 } : {};
595
- }
596
- const Rt = {
597
- ...ue,
598
- ...xe,
599
- type: {
600
- type: String,
601
- default: "button"
602
- },
603
- label: [Number, String],
604
- icon: String,
605
- iconRight: String,
606
- ...Lt.reduce(
607
- (e, t) => (e[t] = Boolean) && e,
608
- {}
609
- ),
610
- square: Boolean,
611
- rounded: Boolean,
612
- glossy: Boolean,
613
- size: String,
614
- fab: Boolean,
615
- fabMini: Boolean,
616
- padding: String,
617
- color: String,
618
- textColor: String,
619
- noCaps: Boolean,
620
- noWrap: Boolean,
621
- dense: Boolean,
622
- tabindex: [Number, String],
623
- ripple: {
624
- type: [Boolean, Object],
625
- default: !0
626
- },
627
- align: {
628
- ...yt.align,
629
- default: "center"
630
- },
631
- stack: Boolean,
632
- stretch: Boolean,
633
- loading: {
634
- type: Boolean,
635
- default: null
636
- },
637
- disable: Boolean
638
- }, Mt = {
639
- ...Rt,
640
- round: Boolean
641
- };
642
- function Vt(e) {
643
- const t = ce(e, wt), n = _t(e), { hasRouterLink: a, hasLink: s, linkTag: l, linkAttrs: o, navigateOnClick: i } = Bt({
644
- fallbackTag: "button"
645
- }), $ = r(() => {
646
- const v = e.fab === !1 && e.fabMini === !1 ? t.value : {};
647
- return e.padding !== void 0 ? Object.assign({}, v, {
648
- padding: e.padding.split(/\s+/).map((b) => b in Se ? Se[b] + "px" : b).join(" "),
649
- minWidth: "0",
650
- minHeight: "0"
651
- }) : v;
652
- }), y = r(
653
- () => e.rounded === !0 || e.fab === !0 || e.fabMini === !0
654
- ), f = r(
655
- () => e.disable !== !0 && e.loading !== !0
656
- ), C = r(() => f.value === !0 ? e.tabindex || 0 : -1), d = r(() => Ne(e, "standard")), q = r(() => {
657
- const v = { tabindex: C.value };
658
- return s.value === !0 ? Object.assign(v, o.value) : Et.includes(e.type) === !0 && (v.type = e.type), l.value === "a" ? (e.disable === !0 ? v["aria-disabled"] = "true" : v.href === void 0 && (v.role = "button"), a.value !== !0 && Pt.test(e.type) === !0 && (v.type = e.type)) : e.disable === !0 && (v.disabled = "", v["aria-disabled"] = "true"), e.loading === !0 && e.percentage !== void 0 && Object.assign(v, {
659
- role: "progressbar",
660
- "aria-valuemin": 0,
661
- "aria-valuemax": 100,
662
- "aria-valuenow": e.percentage
663
- }), v;
664
- }), u = r(() => {
665
- let v;
666
- e.color !== void 0 ? e.flat === !0 || e.outline === !0 ? v = `text-${e.textColor || e.color}` : v = `bg-${e.color} text-${e.textColor || "white"}` : e.textColor && (v = `text-${e.textColor}`);
667
- const b = e.round === !0 ? "round" : `rectangle${y.value === !0 ? " q-btn--rounded" : e.square === !0 ? " q-btn--square" : ""}`;
668
- return `q-btn--${d.value} q-btn--${b}` + (v !== void 0 ? " " + v : "") + (f.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" : "");
669
- }), m = r(
670
- () => n.value + (e.stack === !0 ? " column" : " row") + (e.noWrap === !0 ? " no-wrap text-no-wrap" : "") + (e.loading === !0 ? " q-btn__content--hidden" : "")
671
- );
672
- return {
673
- classes: u,
674
- style: $,
675
- innerClasses: m,
676
- attributes: q,
677
- hasLink: s,
678
- linkTag: l,
679
- navigateOnClick: i,
680
- isActionable: f
681
- };
682
- }
683
- const { passiveCapture: I } = de;
684
- let U = null, H = null, X = null;
685
- const At = te({
686
- name: "QBtn",
687
- props: {
688
- ...Mt,
689
- percentage: Number,
690
- darkPercentage: Boolean,
691
- onTouchstart: [Function, Array]
692
- },
693
- emits: ["click", "keydown", "mousedown", "keyup"],
694
- setup(e, { slots: t, emit: n }) {
695
- const { proxy: a } = ee(), {
696
- classes: s,
697
- style: l,
698
- innerClasses: o,
699
- attributes: i,
700
- hasLink: $,
701
- linkTag: y,
702
- navigateOnClick: f,
703
- isActionable: C
704
- } = Vt(e), d = W(null), q = W(null);
705
- let u = null, m, v = null;
706
- const b = r(
707
- () => e.label !== void 0 && e.label !== null && e.label !== ""
708
- ), S = r(() => e.disable === !0 || e.ripple === !1 ? !1 : {
709
- keyCodes: $.value === !0 ? [13, 32] : [13],
710
- ...e.ripple === !0 ? {} : e.ripple
711
- }), w = r(() => ({ center: e.round })), E = r(() => {
712
- const c = Math.max(0, Math.min(100, e.percentage));
713
- return c > 0 ? { transition: "transform 0.6s", transform: `translateX(${c - 100}%)` } : {};
714
- }), k = r(() => {
715
- if (e.loading === !0)
716
- return {
717
- onMousedown: M,
718
- onTouchstart: M,
719
- onClick: M,
720
- onKeydown: M,
721
- onKeyup: M
722
- };
723
- if (C.value === !0) {
724
- const c = {
725
- onClick: R,
726
- onKeydown: O,
727
- onMousedown: F
728
- };
729
- if (a.$q.platform.has.touch === !0) {
730
- const B = e.onTouchstart !== void 0 ? "" : "Passive";
731
- c[`onTouchstart${B}`] = j;
732
- }
733
- return c;
734
- }
735
- return {
736
- // needed; especially for disabled <a> tags
737
- onClick: D
738
- };
739
- }), L = r(() => ({
740
- ref: d,
741
- class: "q-btn q-btn-item non-selectable no-outline " + s.value,
742
- style: l.value,
743
- ...i.value,
744
- ...k.value
745
- }));
746
- function R(c) {
747
- if (d.value !== null) {
748
- if (c !== void 0) {
749
- if (c.defaultPrevented === !0) return;
750
- const B = document.activeElement;
751
- if (e.type === "submit" && B !== document.body && d.value.contains(B) === !1 && B.contains(d.value) === !1) {
752
- c.qAvoidFocus !== !0 && d.value.focus();
753
- const x = () => {
754
- var J;
755
- document.removeEventListener("keydown", D, !0), document.removeEventListener("keyup", x, I), (J = d.value) == null || J.removeEventListener("blur", x, I);
756
- };
757
- document.addEventListener("keydown", D, !0), document.addEventListener("keyup", x, I), d.value.addEventListener("blur", x, I);
758
- }
759
- }
760
- f(c);
761
- }
762
- }
763
- function O(c) {
764
- d.value !== null && (n("keydown", c), le(c, [13, 32]) === !0 && H !== d.value && (H !== null && g(), c.defaultPrevented !== !0 && (c.qAvoidFocus !== !0 && d.value.focus(), H = d.value, d.value.classList.add("q-btn--active"), document.addEventListener("keyup", A, !0), d.value.addEventListener("blur", A, I)), D(c)));
765
- }
766
- function j(c) {
767
- d.value !== null && (n("touchstart", c), c.defaultPrevented !== !0 && (U !== d.value && (U !== null && g(), U = d.value, u = c.target, u.addEventListener("touchcancel", A, I), u.addEventListener("touchend", A, I)), m = !0, v !== null && clearTimeout(v), v = setTimeout(() => {
768
- v = null, m = !1;
769
- }, 200)));
770
- }
771
- function F(c) {
772
- d.value !== null && (c.qSkipRipple = m === !0, n("mousedown", c), c.defaultPrevented !== !0 && X !== d.value && (X !== null && g(), X = d.value, d.value.classList.add("q-btn--active"), document.addEventListener("mouseup", A, I)));
773
- }
774
- function A(c) {
775
- if (d.value !== null && !((c == null ? void 0 : c.type) === "blur" && document.activeElement === d.value)) {
776
- if ((c == null ? void 0 : c.type) === "keyup") {
777
- if (H === d.value && le(c, [13, 32]) === !0) {
778
- const B = new MouseEvent("click", c);
779
- B.qKeyEvent = !0, c.defaultPrevented === !0 && vt(B), c.cancelBubble === !0 && je(B), d.value.dispatchEvent(B), D(c), c.qKeyEvent = !0;
780
- }
781
- n("keyup", c);
782
- }
783
- g();
784
- }
785
- }
786
- function g(c) {
787
- var x, J;
788
- const B = q.value;
789
- c !== !0 && (U === d.value || X === d.value) && B !== null && B !== document.activeElement && (B.setAttribute("tabindex", -1), B.focus()), U === d.value && (u !== null && (u.removeEventListener("touchcancel", A, I), u.removeEventListener("touchend", A, I)), U = u = null), X === d.value && (document.removeEventListener("mouseup", A, I), X = null), H === d.value && (document.removeEventListener("keyup", A, !0), (x = d.value) == null || x.removeEventListener("blur", A, I), H = null), (J = d.value) == null || J.classList.remove("q-btn--active");
790
- }
791
- function M(c) {
792
- D(c), c.qSkipRipple = !0;
793
- }
794
- return Qe(() => {
795
- g(!0);
796
- }), Object.assign(a, {
797
- click: (c) => {
798
- C.value === !0 && R(c);
799
- }
800
- }), () => {
801
- let c = [];
802
- e.icon !== void 0 && c.push(
803
- p(me, {
804
- name: e.icon,
805
- left: e.stack !== !0 && b.value === !0,
806
- role: "img"
807
- })
808
- ), b.value === !0 && c.push(
809
- p("span", { class: "block" }, [e.label])
810
- ), c = N(t.default, c), e.iconRight !== void 0 && e.round === !1 && c.push(
811
- p(me, {
812
- name: e.iconRight,
813
- right: e.stack !== !0 && b.value === !0,
814
- role: "img"
815
- })
816
- );
817
- const B = [
818
- p("span", {
819
- class: "q-focus-helper",
820
- ref: q
821
- })
822
- ];
823
- return e.loading === !0 && e.percentage !== void 0 && B.push(
824
- p("span", {
825
- class: "q-btn__progress absolute-full overflow-hidden" + (e.darkPercentage === !0 ? " q-btn__progress--dark" : "")
826
- }, [
827
- p("span", {
828
- class: "q-btn__progress-indicator fit block",
829
- style: E.value
830
- })
831
- ])
832
- ), B.push(
833
- p("span", {
834
- class: "q-btn__content text-center col items-center q-anchor--skip " + o.value
835
- }, c)
836
- ), e.loading !== null && B.push(
837
- p(Ue, {
838
- name: "q-transition--fade"
839
- }, () => e.loading === !0 ? [
840
- p("span", {
841
- key: "loading",
842
- class: "absolute-full flex flex-center"
843
- }, t.loading !== void 0 ? t.loading() : [p(Oe)])
844
- ] : null)
845
- ), oe(
846
- p(
847
- y.value,
848
- L.value,
849
- B
850
- ),
851
- [[
852
- ht,
853
- S.value,
854
- void 0,
855
- w.value
856
- ]]
857
- );
858
- };
859
- }
860
- }), It = /* @__PURE__ */ K({
861
- __name: "AppButton",
862
- props: {
863
- size: { default: z.MD },
864
- transparent: { type: Boolean },
865
- flat: { type: Boolean },
866
- rounded: { type: Boolean },
867
- color: { default: Me.PRIMARY },
868
- iconLeft: {},
869
- iconRight: {},
870
- iconMiddle: {},
871
- disabled: { type: Boolean },
872
- loading: { type: Boolean },
873
- to: {},
874
- href: {},
875
- target: {},
876
- submit: { type: Boolean },
877
- ariaLabel: {},
878
- label: {},
879
- download: {}
880
- },
881
- emits: ["click"],
882
- setup(e) {
883
- const t = e, n = r(() => [
884
- "app-btn",
885
- {
886
- "app-btn_default": !t.transparent && !t.flat,
887
- "app-btn_trans": t.transparent,
888
- "app-btn_flat": t.flat,
889
- "app-btn_rounded": t.rounded,
890
- "app-btn_icon-left": t.iconLeft,
891
- "app-btn_icon-right": t.iconRight,
892
- "app-btn_icon-middle": t.iconMiddle
893
- },
894
- `app-btn_${t.size}`,
895
- `app-btn_${t.color}`
896
- ]);
897
- return (a, s) => (h(), ae(Z(At), {
898
- "no-caps": "",
899
- unelevated: "",
900
- class: P(n.value),
901
- padding: Z(tt)[a.size || Z(z).MD],
902
- loading: a.loading,
903
- disable: a.disabled || void 0,
904
- to: a.to,
905
- href: a.href,
906
- target: a.target,
907
- type: a.submit ? "submit" : void 0,
908
- "aria-label": a.ariaLabel,
909
- download: a.download,
910
- onClick: s[0] || (s[0] = (l) => a.$emit("click", l))
911
- }, {
912
- default: He(() => [
913
- a.iconLeft || a.iconMiddle ? (h(), _("i", {
914
- key: 0,
915
- class: P([
916
- "icon-kl",
917
- a.iconLeft ? "icon-kl_left" : "icon-kl_middle",
918
- `icon-kl-${a.iconLeft || a.iconMiddle}`,
919
- a.transparent || a.flat ? `text-${a.color}` : "text-secondary"
920
- ])
921
- }, null, 2)) : V("", !0),
922
- se(a.$slots, "default", {}, void 0, !0),
923
- a.label ? (h(), _(ie, { key: 1 }, [
924
- Pe(Y(a.label), 1)
925
- ], 64)) : V("", !0),
926
- a.iconRight ? (h(), _("i", {
927
- key: 2,
928
- class: P([
929
- "icon-kl",
930
- "icon-kl_right",
931
- `icon-kl-${a.iconRight}`,
932
- a.transparent ? `text-${a.color}` : "text-secondary"
933
- ])
934
- }, null, 2)) : V("", !0)
935
- ]),
936
- _: 3
937
- }, 8, ["class", "padding", "loading", "disable", "to", "href", "target", "type", "aria-label", "download"]));
938
- }
939
- }), G = (e, t) => {
940
- const n = e.__vccOpts || e;
941
- for (const [a, s] of t)
942
- n[a] = s;
943
- return n;
944
- }, Vn = /* @__PURE__ */ G(It, [["__scopeId", "data-v-c9951ab6"]]), Tt = {
945
- key: 0,
946
- class: "app-toggle__label app-toggle__label_left"
947
- }, zt = { class: "app-toggle__container" }, Ot = ["checked", "disabled"], jt = { class: "app-toggle__thumb" }, Dt = {
948
- key: 1,
949
- class: "app-toggle__label"
950
- }, xt = /* @__PURE__ */ K({
951
- __name: "AppToggle",
952
- props: {
953
- modelValue: { type: Boolean },
954
- size: { default: z.MD },
955
- label: {},
956
- disabled: { type: Boolean },
957
- color: { default: Me.PRIMARY },
958
- iconColor: {},
959
- icon: {},
960
- iconActive: {},
961
- labelLeft: { type: Boolean }
962
- },
963
- emits: ["update:modelValue"],
964
- setup(e, { emit: t }) {
965
- const n = e, a = t, s = r({
966
- get: () => n.modelValue,
967
- set: (o) => {
968
- a("update:modelValue", o);
969
- }
970
- }), l = r(() => [
971
- "app-toggle",
972
- {
973
- "app-toggle_active": s.value,
974
- "app-toggle_disabled": n.disabled
975
- },
976
- `app-toggle_${n.size}`,
977
- `app-toggle_${n.color}`
978
- ]);
979
- return (o, i) => (h(), _("div", {
980
- class: P(l.value),
981
- onClick: i[1] || (i[1] = Le(() => {
982
- }, ["stop"]))
983
- }, [
984
- o.label && o.labelLeft ? (h(), _("span", Tt, Y(o.label), 1)) : V("", !0),
985
- T("label", zt, [
986
- T("input", {
987
- type: "checkbox",
988
- checked: s.value,
989
- onChange: i[0] || (i[0] = ($) => s.value = !s.value),
990
- disabled: o.disabled,
991
- class: "app-toggle__input"
992
- }, null, 40, Ot),
993
- T("span", {
994
- class: P(["app-toggle__slider", s.value ? `bg-${o.color}` : ""])
995
- }, [
996
- T("span", jt, [
997
- o.icon && !o.modelValue ? (h(), _("i", {
998
- key: 0,
999
- class: P(["icon-kl", `icon-kl-${o.icon}`, "app-toggle__icon"])
1000
- }, null, 2)) : V("", !0),
1001
- o.modelValue && (o.iconActive || o.icon) ? (h(), _("i", {
1002
- key: 1,
1003
- class: P([
1004
- "icon-kl",
1005
- `icon-kl-${o.iconActive || o.icon}`,
1006
- "app-toggle__icon",
1007
- s.value ? `text-${o.iconColor}` : ""
1008
- ])
1009
- }, null, 2)) : V("", !0)
1010
- ])
1011
- ], 2),
1012
- se(o.$slots, "default", {}, void 0, !0)
1013
- ]),
1014
- o.label && !o.labelLeft ? (h(), _("span", Dt, Y(o.label), 1)) : V("", !0)
1015
- ], 2));
1016
- }
1017
- }), Nt = /* @__PURE__ */ G(xt, [["__scopeId", "data-v-ba49356e"]]), Ke = {
1018
- dark: {
1019
- type: Boolean,
1020
- default: null
1021
- }
1022
- };
1023
- function Fe(e, t) {
1024
- return r(() => e.dark === null ? t.dark.isActive : e.dark);
1025
- }
1026
- function Kt(e, t) {
1027
- const n = W(null), a = r(() => e.disable === !0 ? null : p("span", {
1028
- ref: n,
1029
- class: "no-outline",
1030
- tabindex: -1
1031
- }));
1032
- function s(l) {
1033
- const o = t.value;
1034
- (l == null ? void 0 : l.qAvoidFocus) !== !0 && ((l == null ? void 0 : l.type.indexOf("key")) === 0 ? document.activeElement !== o && (o == null ? void 0 : o.contains(document.activeElement)) === !0 && o.focus() : n.value !== null && (l === void 0 || (o == null ? void 0 : o.contains(l.target)) === !0) && n.value.focus());
1035
- }
1036
- return {
1037
- refocusTargetEl: a,
1038
- refocusTarget: s
1039
- };
1040
- }
1041
- const Ft = {
1042
- name: String
1043
- };
1044
- function Qt(e = {}) {
1045
- return (t, n, a) => {
1046
- t[n](
1047
- p("input", {
1048
- class: "hidden" + (a || ""),
1049
- ...e.value
1050
- })
1051
- );
1052
- };
1053
- }
1054
- function An(e) {
1055
- return r(() => e.name || e.for);
1056
- }
1057
- const Ut = {
1058
- xs: 30,
1059
- sm: 35,
1060
- md: 40,
1061
- lg: 50,
1062
- xl: 60
1063
- }, Ht = {
1064
- ...Ke,
1065
- ...ue,
1066
- ...Ft,
1067
- modelValue: {
1068
- required: !0,
1069
- default: null
1070
- },
1071
- val: {},
1072
- trueValue: { default: !0 },
1073
- falseValue: { default: !1 },
1074
- indeterminateValue: { default: null },
1075
- checkedIcon: String,
1076
- uncheckedIcon: String,
1077
- indeterminateIcon: String,
1078
- toggleOrder: {
1079
- type: String,
1080
- validator: (e) => e === "tf" || e === "ft"
1081
- },
1082
- toggleIndeterminate: Boolean,
1083
- label: String,
1084
- leftLabel: Boolean,
1085
- color: String,
1086
- keepColor: Boolean,
1087
- dense: Boolean,
1088
- disable: Boolean,
1089
- tabindex: [String, Number]
1090
- }, Xt = ["update:modelValue"];
1091
- function Wt(e, t) {
1092
- const { props: n, slots: a, emit: s, proxy: l } = ee(), { $q: o } = l, i = Fe(n, o), $ = W(null), { refocusTargetEl: y, refocusTarget: f } = Kt(n, $), C = ce(n, Ut), d = r(
1093
- () => n.val !== void 0 && Array.isArray(n.modelValue)
1094
- ), q = r(() => {
1095
- const g = Q(n.val);
1096
- return d.value === !0 ? n.modelValue.findIndex((M) => Q(M) === g) : -1;
1097
- }), u = r(() => d.value === !0 ? q.value !== -1 : Q(n.modelValue) === Q(n.trueValue)), m = r(() => d.value === !0 ? q.value === -1 : Q(n.modelValue) === Q(n.falseValue)), v = r(
1098
- () => u.value === !1 && m.value === !1
1099
- ), b = r(() => n.disable === !0 ? -1 : n.tabindex || 0), S = r(
1100
- () => `q-${e} cursor-pointer no-outline row inline no-wrap items-center` + (n.disable === !0 ? " disabled" : "") + (i.value === !0 ? ` q-${e}--dark` : "") + (n.dense === !0 ? ` q-${e}--dense` : "") + (n.leftLabel === !0 ? " reverse" : "")
1101
- ), w = r(() => {
1102
- const g = u.value === !0 ? "truthy" : m.value === !0 ? "falsy" : "indet", M = n.color !== void 0 && (n.keepColor === !0 || m.value !== !0) ? ` text-${n.color}` : "";
1103
- return `q-${e}__inner relative-position non-selectable q-${e}__inner--${g}${M}`;
1104
- }), E = r(() => {
1105
- const g = { type: "checkbox" };
1106
- return n.name !== void 0 && Object.assign(g, {
1107
- // see https://vuejs.org/guide/extras/render-function.html#creating-vnodes (.prop)
1108
- ".checked": u.value,
1109
- "^checked": u.value === !0 ? "checked" : void 0,
1110
- name: n.name,
1111
- value: d.value === !0 ? n.val : n.trueValue
1112
- }), g;
1113
- }), k = Qt(E), L = r(() => {
1114
- const g = {
1115
- tabindex: b.value,
1116
- role: "checkbox",
1117
- "aria-label": n.label,
1118
- "aria-checked": v.value === !0 ? "mixed" : u.value === !0 ? "true" : "false"
1119
- };
1120
- return n.disable === !0 && (g["aria-disabled"] = "true"), g;
1121
- });
1122
- function R(g) {
1123
- g !== void 0 && (D(g), f(g)), n.disable !== !0 && s("update:modelValue", O(), g);
1124
- }
1125
- function O() {
1126
- if (d.value === !0) {
1127
- if (u.value === !0) {
1128
- const g = n.modelValue.slice();
1129
- return g.splice(q.value, 1), g;
1130
- }
1131
- return n.modelValue.concat([n.val]);
1132
- }
1133
- if (u.value === !0) {
1134
- if (n.toggleOrder !== "ft" || n.toggleIndeterminate === !1)
1135
- return n.falseValue;
1136
- } else if (m.value === !0) {
1137
- if (n.toggleOrder === "ft" || n.toggleIndeterminate === !1)
1138
- return n.trueValue;
1139
- } else
1140
- return n.toggleOrder !== "ft" ? n.trueValue : n.falseValue;
1141
- return n.indeterminateValue;
1142
- }
1143
- function j(g) {
1144
- (g.keyCode === 13 || g.keyCode === 32) && D(g);
1145
- }
1146
- function F(g) {
1147
- (g.keyCode === 13 || g.keyCode === 32) && R(g);
1148
- }
1149
- const A = t(u, v);
1150
- return Object.assign(l, { toggle: R }), () => {
1151
- const g = A();
1152
- n.disable !== !0 && k(
1153
- g,
1154
- "unshift",
1155
- ` q-${e}__native absolute q-ma-none q-pa-none`
1156
- );
1157
- const M = [
1158
- p("div", {
1159
- class: w.value,
1160
- style: C.value,
1161
- "aria-hidden": "true"
1162
- }, g)
1163
- ];
1164
- y.value !== null && M.push(y.value);
1165
- const c = n.label !== void 0 ? N(a.default, [n.label]) : Ae(a.default);
1166
- return c !== void 0 && M.push(
1167
- p("div", {
1168
- class: `q-${e}__label q-anchor--skip`
1169
- }, c)
1170
- ), p("div", {
1171
- ref: $,
1172
- class: S.value,
1173
- ...L.value,
1174
- onClick: R,
1175
- onKeydown: j,
1176
- onKeyup: F
1177
- }, M);
1178
- };
1179
- }
1180
- const Yt = () => p("div", {
1181
- key: "svg",
1182
- class: "q-checkbox__bg absolute"
1183
- }, [
1184
- p("svg", {
1185
- class: "q-checkbox__svg fit absolute-full",
1186
- viewBox: "0 0 24 24"
1187
- }, [
1188
- p("path", {
1189
- class: "q-checkbox__truthy",
1190
- fill: "none",
1191
- d: "M1.73,12.91 8.1,19.28 22.79,4.59"
1192
- }),
1193
- p("path", {
1194
- class: "q-checkbox__indet",
1195
- d: "M4,14H20V10H4"
1196
- })
1197
- ])
1198
- ]), Gt = te({
1199
- name: "QCheckbox",
1200
- props: Ht,
1201
- emits: Xt,
1202
- setup(e) {
1203
- const t = Yt();
1204
- function n(a, s) {
1205
- const l = r(
1206
- () => (a.value === !0 ? e.checkedIcon : s.value === !0 ? e.indeterminateIcon : e.uncheckedIcon) || null
1207
- );
1208
- return () => l.value !== null ? [
1209
- p("div", {
1210
- key: "icon",
1211
- class: "q-checkbox__icon-container absolute-full flex flex-center no-wrap"
1212
- }, [
1213
- p(me, {
1214
- class: "q-checkbox__icon",
1215
- name: l.value
1216
- })
1217
- ])
1218
- ] : [t];
1219
- }
1220
- return Wt("checkbox", n);
1221
- }
1222
- }), Jt = [];
1223
- function Zt(e) {
1224
- return Jt.find(
1225
- (t) => t.contentEl !== null && t.contentEl.contains(e)
1226
- );
1227
- }
1228
- function en(e, t) {
1229
- do {
1230
- if (e.$options.name === "QMenu") {
1231
- if (e.hide(t), e.$props.separateClosePopup === !0)
1232
- return ne(e);
1233
- } else if (e.__qPortal === !0) {
1234
- const n = ne(e);
1235
- return (n == null ? void 0 : n.$options.name) === "QPopupProxy" ? (e.hide(t), n) : e;
1236
- }
1237
- e = ne(e);
1238
- } while (e != null);
1239
- }
1240
- function tn(e, t, n) {
1241
- for (; n !== 0 && e !== void 0 && e !== null; ) {
1242
- if (e.__qPortal === !0) {
1243
- if (n--, e.$options.name === "QMenu") {
1244
- e = en(e, t);
1245
- continue;
1246
- }
1247
- e.hide(t);
1248
- }
1249
- e = ne(e);
1250
- }
1251
- }
1252
- function Be(e) {
1253
- if (e === !1)
1254
- return 0;
1255
- if (e === !0 || e === void 0)
1256
- return 1;
1257
- const t = parseInt(e, 10);
1258
- return isNaN(t) ? 0 : t;
1259
- }
1260
- const nn = Ve(
1261
- {
1262
- name: "close-popup",
1263
- beforeMount(e, { value: t }) {
1264
- const n = {
1265
- depth: Be(t),
1266
- handler(a) {
1267
- n.depth !== 0 && setTimeout(() => {
1268
- const s = Zt(e);
1269
- s !== void 0 && tn(s, a, n.depth);
1270
- });
1271
- },
1272
- handlerKey(a) {
1273
- le(a, 13) === !0 && n.handler(a);
1274
- }
1275
- };
1276
- e.__qclosepopup = n, e.addEventListener("click", n.handler), e.addEventListener("keyup", n.handlerKey);
1277
- },
1278
- updated(e, { value: t, oldValue: n }) {
1279
- t !== n && (e.__qclosepopup.depth = Be(t));
1280
- },
1281
- beforeUnmount(e) {
1282
- const t = e.__qclosepopup;
1283
- e.removeEventListener("click", t.handler), e.removeEventListener("keyup", t.handlerKey), delete e.__qclosepopup;
1284
- }
1285
- }
1286
- ), an = {
1287
- key: 0,
1288
- class: "menu-item__loading"
1289
- }, ln = {
1290
- key: 0,
1291
- class: "menu-item__checked"
1292
- }, on = {
1293
- key: 2,
1294
- class: "menu-item__icon"
1295
- }, sn = { class: "menu-item__label" }, rn = {
1296
- key: 3,
1297
- class: "menu-item__icon-right icon-kl icon-kl-arrow-right"
1298
- }, un = /* @__PURE__ */ K({
1299
- __name: "PopupItem",
1300
- props: {
1301
- label: {},
1302
- icon: {},
1303
- iconSize: {},
1304
- color: {},
1305
- iconRight: {},
1306
- arrow: { type: Boolean },
1307
- toggle: { type: Boolean },
1308
- checkbox: { type: Boolean },
1309
- active: { type: Boolean },
1310
- modelValue: { type: Boolean },
1311
- persistent: { type: Boolean },
1312
- loading: { type: Boolean },
1313
- disabled: { type: Boolean },
1314
- gap: { type: Boolean },
1315
- checked: { type: Boolean },
1316
- isMobile: { type: Boolean }
1317
- },
1318
- emits: ["update:modelValue", "closePopup"],
1319
- setup(e, { emit: t }) {
1320
- const n = e, a = t, s = () => {
1321
- n.disabled || (n.toggle || n.checkbox ? a("update:modelValue", !n.modelValue) : n.persistent || a("closePopup"));
1322
- };
1323
- return (l, o) => oe((h(), _("div", {
1324
- class: P(["menu-item", [
1325
- { "menu-item_gap": l.gap },
1326
- { "menu-item_disabled": l.disabled },
1327
- { "menu-item_active": l.active },
1328
- { "menu-item_mobile": l.isMobile }
1329
- ]]),
1330
- onClick: s
1331
- }, [
1332
- T("div", {
1333
- class: P(["row items-center no-wrap", `text-${l.color ? l.color : "dark"}`])
1334
- }, [
1335
- l.loading ? (h(), _("div", an, [
1336
- Xe(Z(Oe), {
1337
- size: "19px",
1338
- color: l.color ? l.color : "dark"
1339
- }, null, 8, ["color"])
1340
- ])) : (h(), _(ie, { key: 1 }, [
1341
- l.checked ? (h(), _("div", ln, [...o[3] || (o[3] = [
1342
- T("i", { class: "icon-kl icon-kl-check" }, null, -1)
1343
- ])])) : V("", !0),
1344
- l.checkbox ? (h(), ae(Gt, {
1345
- key: 1,
1346
- class: "menu-item__checkbox",
1347
- size: "34px",
1348
- "model-value": l.modelValue,
1349
- "onUpdate:modelValue": o[0] || (o[0] = (i) => a("update:modelValue", i)),
1350
- onClick: o[1] || (o[1] = Le(() => {
1351
- }, ["stop"]))
1352
- }, null, 8, ["model-value"])) : V("", !0),
1353
- l.icon ? (h(), _("div", on, [
1354
- T("i", {
1355
- class: P(`icon-kl icon-kl-${l.icon}`),
1356
- style: re({ fontSize: l.iconSize || "27px" })
1357
- }, null, 6)
1358
- ])) : V("", !0)
1359
- ], 64)),
1360
- T("span", sn, Y(l.label), 1)
1361
- ], 2),
1362
- l.$slots.right ? se(l.$slots, "right", { key: 0 }, void 0, !0) : l.toggle ? (h(), ae(Nt, {
1363
- key: 1,
1364
- class: "menu-item__toggle",
1365
- "model-value": l.modelValue,
1366
- disabled: l.disabled || l.loading,
1367
- "onUpdate:modelValue": o[2] || (o[2] = (i) => a("update:modelValue", i))
1368
- }, null, 8, ["model-value", "disabled"])) : l.iconRight ? (h(), _("i", {
1369
- key: 2,
1370
- class: P([
1371
- "menu-item__icon-right menu-item__icon-right_custom icon-kl",
1372
- `icon-kl-${l.iconRight}`
1373
- ])
1374
- }, null, 2)) : l.arrow ? (h(), _("i", rn)) : V("", !0)
1375
- ], 2)), [
1376
- [nn, !l.toggle && !l.checkbox && !l.persistent && !l.disabled]
1377
- ]);
1378
- }
1379
- }), In = /* @__PURE__ */ G(un, [["__scopeId", "data-v-4b2a03b5"]]), cn = /* @__PURE__ */ K({
1380
- __name: "AppIcon",
1381
- props: {
1382
- name: {},
1383
- size: {},
1384
- color: {}
1385
- },
1386
- setup(e) {
1387
- return (t, n) => (h(), _("i", {
1388
- class: P(["icon-kl", `icon-kl-${t.name}`, t.color ? `text-${t.color}` : ""]),
1389
- style: re(t.size ? `font-size: ${t.size}` : void 0)
1390
- }, null, 6));
1391
- }
1392
- }), Tn = /* @__PURE__ */ G(cn, [["__scopeId", "data-v-941765ee"]]), dn = {
1393
- xs: 2,
1394
- sm: 4,
1395
- md: 6,
1396
- lg: 10,
1397
- xl: 14
1398
- };
1399
- function we(e, t, n) {
1400
- return {
1401
- transform: t === !0 ? `translateX(${n.lang.rtl === !0 ? "-" : ""}100%) scale3d(${-e},1,1)` : `scale3d(${e},1,1)`
1402
- };
1403
- }
1404
- const fn = te({
1405
- name: "QLinearProgress",
1406
- props: {
1407
- ...Ke,
1408
- ...ue,
1409
- value: {
1410
- type: Number,
1411
- default: 0
1412
- },
1413
- buffer: Number,
1414
- color: String,
1415
- trackColor: String,
1416
- reverse: Boolean,
1417
- stripe: Boolean,
1418
- indeterminate: Boolean,
1419
- query: Boolean,
1420
- rounded: Boolean,
1421
- animationSpeed: {
1422
- type: [String, Number],
1423
- default: 2100
1424
- },
1425
- instantFeedback: Boolean
1426
- },
1427
- setup(e, { slots: t }) {
1428
- const { proxy: n } = ee(), a = Fe(e, n.$q), s = ce(e, dn), l = r(() => e.indeterminate === !0 || e.query === !0), o = r(() => e.reverse !== e.query), i = r(() => ({
1429
- ...s.value !== null ? s.value : {},
1430
- "--q-linear-progress-speed": `${e.animationSpeed}ms`
1431
- })), $ = r(
1432
- () => "q-linear-progress" + (e.color !== void 0 ? ` text-${e.color}` : "") + (e.reverse === !0 || e.query === !0 ? " q-linear-progress--reverse" : "") + (e.rounded === !0 ? " rounded-borders" : "")
1433
- ), y = r(() => we(e.buffer !== void 0 ? e.buffer : 1, o.value, n.$q)), f = r(() => `with${e.instantFeedback === !0 ? "out" : ""}-transition`), C = r(
1434
- () => `q-linear-progress__track absolute-full q-linear-progress__track--${f.value} q-linear-progress__track--${a.value === !0 ? "dark" : "light"}` + (e.trackColor !== void 0 ? ` bg-${e.trackColor}` : "")
1435
- ), d = r(() => we(l.value === !0 ? 1 : e.value, o.value, n.$q)), q = r(
1436
- () => `q-linear-progress__model absolute-full q-linear-progress__model--${f.value} q-linear-progress__model--${l.value === !0 ? "in" : ""}determinate`
1437
- ), u = r(() => ({ width: `${e.value * 100}%` })), m = r(
1438
- () => `q-linear-progress__stripe absolute-${e.reverse === !0 ? "right" : "left"} q-linear-progress__stripe--${f.value}`
1439
- );
1440
- return () => {
1441
- const v = [
1442
- p("div", {
1443
- class: C.value,
1444
- style: y.value
1445
- }),
1446
- p("div", {
1447
- class: q.value,
1448
- style: d.value
1449
- })
1450
- ];
1451
- return e.stripe === !0 && l.value === !1 && v.push(
1452
- p("div", {
1453
- class: m.value,
1454
- style: u.value
1455
- })
1456
- ), p("div", {
1457
- class: $.value,
1458
- style: i.value,
1459
- role: "progressbar",
1460
- "aria-valuemin": 0,
1461
- "aria-valuemax": 1,
1462
- "aria-valuenow": e.indeterminate === !0 ? void 0 : e.value
1463
- }, N(t.default, v));
1464
- };
1465
- }
1466
- }), vn = {
1467
- key: 0,
1468
- class: "code-field__label"
1469
- }, pn = { class: "code-field__inputs" }, mn = ["onUpdate:modelValue", "disabled", "onInput", "onKeydown", "onPaste"], gn = /* @__PURE__ */ K({
1470
- __name: "AppCodeInput",
1471
- props: {
1472
- length: { default: 5 },
1473
- size: { default: z.MD },
1474
- label: {},
1475
- disabled: { type: Boolean },
1476
- loading: { type: Boolean },
1477
- autofocus: { type: Boolean },
1478
- color: {}
1479
- },
1480
- emits: ["update:modelValue", "completed"],
1481
- setup(e, { expose: t, emit: n }) {
1482
- const a = e, s = n, l = W(Array(a.length).fill("")), o = W([]), i = r(() => [
1483
- "code-field",
1484
- {
1485
- "code-field_disabled": a.disabled || a.loading
1486
- },
1487
- `code-field_${a.size}`,
1488
- `code-field_${a.color}`
1489
- ]), $ = r(() => {
1490
- let u = "";
1491
- return a.size == z.SM && (u += `width: ${a.length * 26 + (a.length - 1) * 5}px`), a.size == z.MD && (u += `width: ${a.length * 32 + (a.length - 1) * 8}px`), a.size == z.LG && (u += `width: ${a.length * 44 + (a.length - 1) * 10}px`), u;
1492
- }), y = (u, m) => {
1493
- var S;
1494
- const b = u.target.value;
1495
- if (b.length === 1)
1496
- m < a.length - 1 && o.value && ((S = o.value[m + 1]) == null || S.focus());
1497
- else if (b.length > 1) {
1498
- const w = b.slice(0, a.length - m).split("");
1499
- w.forEach((E, k) => {
1500
- l.value[m + k] = E;
1501
- }), be(() => {
1502
- var E;
1503
- o.value && ((E = o.value[Math.min(m + w.length, a.length - 1)]) == null || E.focus());
1504
- });
1505
- }
1506
- }, f = (u) => {
1507
- var m;
1508
- l.value[u] === "" && o.value && u > 0 && ((m = o.value[u - 1]) == null || m.focus());
1509
- }, C = (u, m) => {
1510
- var S;
1511
- u.preventDefault();
1512
- const v = ((S = u.clipboardData) == null ? void 0 : S.getData("text")) ?? "";
1513
- if (!v) return;
1514
- const b = v.slice(0, a.length - m).split("");
1515
- b.forEach((w, E) => {
1516
- l.value[m + E] = w;
1517
- }), be(() => {
1518
- var w;
1519
- o.value && ((w = o.value[Math.min(m + b.length, a.length - 1)]) == null || w.focus());
1520
- });
1521
- };
1522
- We(
1523
- l,
1524
- (u) => {
1525
- const m = u.join("");
1526
- d(m);
1527
- },
1528
- { deep: !0 }
1529
- );
1530
- const d = (u) => {
1531
- s("update:modelValue", u), u.length === a.length && !u.includes(" ") && s("completed", u);
1532
- }, q = (u) => {
1533
- u && (l.value = u.split("").slice(0, a.length));
1534
- };
1535
- return Ye(() => {
1536
- a.autofocus && o.value && o.value[0] && o.value[0].focus();
1537
- }), t({
1538
- injectCode: q
1539
- }), (u, m) => (h(), _("div", {
1540
- class: P(i.value),
1541
- style: re($.value)
1542
- }, [
1543
- u.label ? (h(), _("label", vn, Y(u.label), 1)) : V("", !0),
1544
- T("div", pn, [
1545
- (h(!0), _(ie, null, Re(u.length, (v, b) => oe((h(), _("input", {
1546
- key: b,
1547
- "onUpdate:modelValue": (S) => l.value[b] = S,
1548
- ref_for: !0,
1549
- ref_key: "inputRefs",
1550
- ref: o,
1551
- type: "number",
1552
- maxlength: "1",
1553
- class: "code-field__input",
1554
- disabled: u.disabled || u.loading,
1555
- onInput: (S) => y(S, b),
1556
- onKeydown: Ge((S) => f(b), ["backspace"]),
1557
- onPaste: (S) => C(S, b)
1558
- }, null, 40, mn)), [
1559
- [Je, l.value[b]]
1560
- ])), 128))
1561
- ]),
1562
- u.loading ? (h(), ae(fn, {
1563
- key: 1,
1564
- indeterminate: "",
1565
- rounded: "",
1566
- color: u.color,
1567
- class: "code-field__loading"
1568
- }, null, 8, ["color"])) : V("", !0)
1569
- ], 6));
1570
- }
1571
- }), zn = /* @__PURE__ */ G(gn, [["__scopeId", "data-v-4e11db87"]]), bn = { class: "app-segment__track" }, hn = { class: "app-segment__buttons" }, kn = ["onClick", "disabled"], yn = /* @__PURE__ */ K({
1572
- __name: "AppSegment",
1573
- props: /* @__PURE__ */ et({
1574
- options: {},
1575
- disabled: { type: Boolean },
1576
- size: { default: z.MD }
1577
- }, {
1578
- modelValue: {},
1579
- modelModifiers: {}
1580
- }),
1581
- emits: ["update:modelValue"],
1582
- setup(e) {
1583
- const t = Ze(e, "modelValue"), n = e, a = r(
1584
- () => n.options.findIndex((l) => l.value === t.value)
1585
- );
1586
- function s(l) {
1587
- n.disabled || (t.value = l);
1588
- }
1589
- return (l, o) => (h(), _("div", {
1590
- class: P(["app-segment", [{ "app-segment_disabled": l.disabled }, `app-segment_${l.size}`]])
1591
- }, [
1592
- T("div", bn, [
1593
- T("div", {
1594
- class: "app-segment__thumb",
1595
- style: re({
1596
- width: `${100 / l.options.length}%`,
1597
- transform: `translateX(${a.value * 100}%)`
1598
- })
1599
- }, null, 4)
1600
- ]),
1601
- T("div", hn, [
1602
- (h(!0), _(ie, null, Re(l.options, (i, $) => (h(), _("button", {
1603
- key: $,
1604
- class: P(["app-segment__btn", { active: t.value === i.value }]),
1605
- onClick: (y) => s(i.value),
1606
- disabled: l.disabled
1607
- }, [
1608
- se(l.$slots, "option", { option: i }, () => [
1609
- Pe(Y(i.label), 1)
1610
- ], !0)
1611
- ], 10, kn))), 128))
1612
- ])
1613
- ], 2));
1614
- }
1615
- }), On = /* @__PURE__ */ G(yn, [["__scopeId", "data-v-ff56abdf"]]), jn = ge(
1616
- () => import("./AppButtonCopy-CBOiSOFe.js")
1617
- ), Dn = ge(
1618
- () => import("./AppSelect-CZfoTaTG.js")
1619
- ), xn = ge(
1620
- () => import("./DropdownButton-C37a5e17.js")
1621
- );
1622
- export {
1623
- Vn as A,
1624
- At as B,
1625
- Me as C,
1626
- pt as D,
1627
- mt as E,
1628
- $t as F,
1629
- Jt as G,
1630
- Ln as H,
1631
- Bn as I,
1632
- dt as J,
1633
- ft as K,
1634
- en as L,
1635
- jn as M,
1636
- zn as N,
1637
- Tn as O,
1638
- In as P,
1639
- me as Q,
1640
- ht as R,
1641
- z as S,
1642
- On as T,
1643
- Dn as U,
1644
- Nt as V,
1645
- xn as W,
1646
- $n as X,
1647
- G as _,
1648
- Fe as a,
1649
- Oe as b,
1650
- te as c,
1651
- ue as d,
1652
- ce as e,
1653
- Sn as f,
1654
- Cn as g,
1655
- Ae as h,
1656
- Rn as i,
1657
- Bt as j,
1658
- le as k,
1659
- qn as l,
1660
- de as m,
1661
- Pn as n,
1662
- wn as o,
1663
- vt as p,
1664
- En as q,
1665
- Ft as r,
1666
- D as s,
1667
- An as t,
1668
- Ke as u,
1669
- gt as v,
1670
- je as w,
1671
- N as x,
1672
- Rt as y,
1673
- Mn as z
1674
- };