@validol4ik/uikit 0.3.42 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1057 @@
1
+ import { computed as u, markRaw as ge, defineComponent as G, h as v, withDirectives as pe, getCurrentInstance as Z, unref as H, ref as ae, onBeforeUnmount as Ce, Transition as Le, openBlock as w, createBlock as Be, normalizeClass as P, withCtx as Re, createElementBlock as A, createCommentVNode as N, renderSlot as we, Fragment as Pe, createTextVNode as xe, toDisplayString as Me, createElementVNode as Y, normalizeStyle as Ae, defineAsyncComponent as ee } from "vue";
2
+ const me = {
3
+ PRIMARY: "primary",
4
+ INFO: "info"
5
+ }, S = {
6
+ SM: "sm",
7
+ MD: "md",
8
+ LG: "lg"
9
+ }, Te = {
10
+ [S.SM]: "3px 9px",
11
+ [S.MD]: "5px 12px",
12
+ [S.LG]: "9px 20px"
13
+ }, X = {
14
+ xs: 18,
15
+ sm: 24,
16
+ md: 32,
17
+ lg: 38,
18
+ xl: 46
19
+ }, he = {
20
+ size: String
21
+ };
22
+ function be(e, t = X) {
23
+ return u(() => e.size !== void 0 ? { fontSize: e.size in t ? `${t[e.size]}px` : e.size } : null);
24
+ }
25
+ function te(e) {
26
+ return ge(G(e));
27
+ }
28
+ function Oe(e) {
29
+ return ge(e);
30
+ }
31
+ function ze(e, t) {
32
+ return e !== void 0 && e() || t;
33
+ }
34
+ function Et(e, t) {
35
+ if (e !== void 0) {
36
+ const a = e();
37
+ if (a != null)
38
+ return a.slice();
39
+ }
40
+ return t;
41
+ }
42
+ function K(e, t) {
43
+ return e !== void 0 ? t.concat(e()) : t;
44
+ }
45
+ function St(e, t) {
46
+ return e === void 0 ? t : t !== void 0 ? t.concat(e()) : e();
47
+ }
48
+ function Ct(e, t, a, n, o, c) {
49
+ t.key = n + o;
50
+ const l = v(e, t, a);
51
+ return o === !0 ? pe(l, c()) : l;
52
+ }
53
+ const oe = "0 0 24 24", re = (e) => e, W = (e) => `ionicons ${e}`, ye = {
54
+ "mdi-": (e) => `mdi ${e}`,
55
+ "icon-": re,
56
+ // fontawesome equiv
57
+ "bt-": (e) => `bt ${e}`,
58
+ "eva-": (e) => `eva ${e}`,
59
+ "ion-md": W,
60
+ "ion-ios": W,
61
+ "ion-logo": W,
62
+ "iconfont ": re,
63
+ "ti-": (e) => `themify-icon ${e}`,
64
+ "bi-": (e) => `bootstrap-icons ${e}`
65
+ }, ke = {
66
+ o_: "-outlined",
67
+ r_: "-round",
68
+ s_: "-sharp"
69
+ }, $e = {
70
+ sym_o_: "-outlined",
71
+ sym_r_: "-rounded",
72
+ sym_s_: "-sharp"
73
+ }, je = new RegExp("^(" + Object.keys(ye).join("|") + ")"), De = new RegExp("^(" + Object.keys(ke).join("|") + ")"), ie = new RegExp("^(" + Object.keys($e).join("|") + ")"), Ie = /^[Mm]\s?[-+]?\.?\d/, Ve = /^img:/, Ke = /^svguse:/, Ne = /^ion-/, Fe = /^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /, le = te({
74
+ name: "QIcon",
75
+ props: {
76
+ ...he,
77
+ tag: {
78
+ type: String,
79
+ default: "i"
80
+ },
81
+ name: String,
82
+ color: String,
83
+ left: Boolean,
84
+ right: Boolean
85
+ },
86
+ setup(e, { slots: t }) {
87
+ const { proxy: { $q: a } } = Z(), n = be(e), o = u(
88
+ () => "q-icon" + (e.left === !0 ? " on-left" : "") + (e.right === !0 ? " on-right" : "") + (e.color !== void 0 ? ` text-${e.color}` : "")
89
+ ), c = u(() => {
90
+ let l, r = e.name;
91
+ if (r === "none" || !r)
92
+ return { none: !0 };
93
+ if (a.iconMapFn !== null) {
94
+ const d = a.iconMapFn(r);
95
+ if (d !== void 0)
96
+ if (d.icon !== void 0) {
97
+ if (r = d.icon, r === "none" || !r)
98
+ return { none: !0 };
99
+ } else
100
+ return {
101
+ cls: d.cls,
102
+ content: d.content !== void 0 ? d.content : " "
103
+ };
104
+ }
105
+ if (Ie.test(r) === !0) {
106
+ const [d, b = oe] = r.split("|");
107
+ return {
108
+ svg: !0,
109
+ viewBox: b,
110
+ nodes: d.split("&&").map((s) => {
111
+ const [y, m, k] = s.split("@@");
112
+ return v("path", { style: m, d: y, transform: k });
113
+ })
114
+ };
115
+ }
116
+ if (Ve.test(r) === !0)
117
+ return {
118
+ img: !0,
119
+ src: r.substring(4)
120
+ };
121
+ if (Ke.test(r) === !0) {
122
+ const [d, b = oe] = r.split("|");
123
+ return {
124
+ svguse: !0,
125
+ src: d.substring(7),
126
+ viewBox: b
127
+ };
128
+ }
129
+ let _ = " ";
130
+ const h = r.match(je);
131
+ if (h !== null)
132
+ l = ye[h[1]](r);
133
+ else if (Fe.test(r) === !0)
134
+ l = r;
135
+ else if (Ne.test(r) === !0)
136
+ l = `ionicons ion-${a.platform.is.ios === !0 ? "ios" : "md"}${r.substring(3)}`;
137
+ else if (ie.test(r) === !0) {
138
+ l = "notranslate material-symbols";
139
+ const d = r.match(ie);
140
+ d !== null && (r = r.substring(6), l += $e[d[1]]), _ = r;
141
+ } else {
142
+ l = "notranslate material-icons";
143
+ const d = r.match(De);
144
+ d !== null && (r = r.substring(2), l += ke[d[1]]), _ = r;
145
+ }
146
+ return {
147
+ cls: l,
148
+ content: _
149
+ };
150
+ });
151
+ return () => {
152
+ const l = {
153
+ class: o.value,
154
+ style: n.value,
155
+ "aria-hidden": "true",
156
+ role: "presentation"
157
+ };
158
+ return c.value.none === !0 ? v(e.tag, l, ze(t.default)) : c.value.img === !0 ? v(e.tag, l, K(t.default, [
159
+ v("img", { src: c.value.src })
160
+ ])) : c.value.svg === !0 ? v(e.tag, l, K(t.default, [
161
+ v("svg", {
162
+ viewBox: c.value.viewBox || "0 0 24 24"
163
+ }, c.value.nodes)
164
+ ])) : c.value.svguse === !0 ? v(e.tag, l, K(t.default, [
165
+ v("svg", {
166
+ viewBox: c.value.viewBox
167
+ }, [
168
+ v("use", { "xlink:href": c.value.src })
169
+ ])
170
+ ])) : (c.value.cls !== void 0 && (l.class += " " + c.value.cls), v(e.tag, l, K(t.default, [
171
+ c.value.content
172
+ ])));
173
+ };
174
+ }
175
+ }), Qe = {
176
+ size: {
177
+ type: [String, Number],
178
+ default: "1em"
179
+ },
180
+ color: String
181
+ };
182
+ function He(e) {
183
+ return {
184
+ cSize: u(() => e.size in X ? `${X[e.size]}px` : e.size),
185
+ classes: u(
186
+ () => "q-spinner" + (e.color ? ` text-${e.color}` : "")
187
+ )
188
+ };
189
+ }
190
+ const Ge = te({
191
+ name: "QSpinner",
192
+ props: {
193
+ ...Qe,
194
+ thickness: {
195
+ type: Number,
196
+ default: 5
197
+ }
198
+ },
199
+ setup(e) {
200
+ const { cSize: t, classes: a } = He(e);
201
+ return () => v("svg", {
202
+ class: a.value + " q-spinner-mat",
203
+ width: t.value,
204
+ height: t.value,
205
+ viewBox: "25 25 50 50"
206
+ }, [
207
+ v("circle", {
208
+ class: "path",
209
+ cx: "50",
210
+ cy: "50",
211
+ r: "20",
212
+ fill: "none",
213
+ stroke: "currentColor",
214
+ "stroke-width": e.thickness,
215
+ "stroke-miterlimit": "10"
216
+ })
217
+ ]);
218
+ }
219
+ });
220
+ function Ue(e, t) {
221
+ const a = e.style;
222
+ for (const n in t)
223
+ a[n] = t[n];
224
+ }
225
+ function Lt(e) {
226
+ if (e == null)
227
+ return;
228
+ if (typeof e == "string")
229
+ try {
230
+ return document.querySelector(e) || void 0;
231
+ } catch {
232
+ return;
233
+ }
234
+ const t = H(e);
235
+ if (t)
236
+ return t.$el || t;
237
+ }
238
+ function Bt(e, t) {
239
+ if (e == null || e.contains(t) === !0)
240
+ return !0;
241
+ for (let a = e.nextElementSibling; a !== null; a = a.nextElementSibling)
242
+ if (a.contains(t))
243
+ return !0;
244
+ return !1;
245
+ }
246
+ const U = {
247
+ hasPassive: !1,
248
+ passiveCapture: !0,
249
+ notPassiveCapture: !0
250
+ };
251
+ try {
252
+ const e = Object.defineProperty({}, "passive", {
253
+ get() {
254
+ Object.assign(U, {
255
+ hasPassive: !0,
256
+ passive: { passive: !0 },
257
+ notPassive: { passive: !1 },
258
+ passiveCapture: { passive: !0, capture: !0 },
259
+ notPassiveCapture: { passive: !1, capture: !0 }
260
+ });
261
+ }
262
+ });
263
+ window.addEventListener("qtest", null, e), window.removeEventListener("qtest", null, e);
264
+ } catch {
265
+ }
266
+ function Rt() {
267
+ }
268
+ function Ye(e) {
269
+ 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]), {
270
+ top: e.clientY,
271
+ left: e.clientX
272
+ };
273
+ }
274
+ function wt(e) {
275
+ if (e.path)
276
+ return e.path;
277
+ if (e.composedPath)
278
+ return e.composedPath();
279
+ const t = [];
280
+ let a = e.target;
281
+ for (; a; ) {
282
+ if (t.push(a), a.tagName === "HTML")
283
+ return t.push(document), t.push(window), t;
284
+ a = a.parentElement;
285
+ }
286
+ }
287
+ function _e(e) {
288
+ e.stopPropagation();
289
+ }
290
+ function We(e) {
291
+ e.cancelable !== !1 && e.preventDefault();
292
+ }
293
+ function O(e) {
294
+ e.cancelable !== !1 && e.preventDefault(), e.stopPropagation();
295
+ }
296
+ function Xe(e, t, a) {
297
+ const n = `__q_${t}_evt`;
298
+ e[n] = e[n] !== void 0 ? e[n].concat(a) : a, a.forEach((o) => {
299
+ o[0].addEventListener(o[1], e[o[2]], U[o[3]]);
300
+ });
301
+ }
302
+ function Je(e, t) {
303
+ const a = `__q_${t}_evt`;
304
+ e[a] !== void 0 && (e[a].forEach((n) => {
305
+ n[0].removeEventListener(n[1], e[n[2]], U[n[3]]);
306
+ }), e[a] = void 0);
307
+ }
308
+ function Ze(e) {
309
+ return e !== Object(e) || e.isComposing === !0 || e.qKeyEvent === !0;
310
+ }
311
+ function J(e, t) {
312
+ return Ze(e) === !0 ? !1 : [].concat(t).includes(e.keyCode);
313
+ }
314
+ function et(e, t = 250) {
315
+ let a = !1, n;
316
+ return function() {
317
+ return a === !1 && (a = !0, setTimeout(() => {
318
+ a = !1;
319
+ }, t), n = e.apply(this, arguments)), n;
320
+ };
321
+ }
322
+ function se(e, t, a, n) {
323
+ a.modifiers.stop === !0 && _e(e);
324
+ const o = a.modifiers.color;
325
+ let c = a.modifiers.center;
326
+ c = c === !0 || n === !0;
327
+ const l = document.createElement("span"), r = document.createElement("span"), _ = Ye(e), { left: h, top: d, width: b, height: s } = t.getBoundingClientRect(), y = Math.sqrt(b * b + s * s), m = y / 2, k = `${(b - y) / 2}px`, f = c ? k : `${_.left - h - m}px`, $ = `${(s - y) / 2}px`, T = c ? $ : `${_.top - d - m}px`;
328
+ r.className = "q-ripple__inner", Ue(r, {
329
+ height: `${y}px`,
330
+ width: `${y}px`,
331
+ transform: `translate3d(${f},${T},0) scale3d(.2,.2,1)`,
332
+ opacity: 0
333
+ }), l.className = `q-ripple${o ? " text-" + o : ""}`, l.setAttribute("dir", "ltr"), l.appendChild(r), t.appendChild(l);
334
+ const x = () => {
335
+ l.remove(), clearTimeout(M);
336
+ };
337
+ a.abort.push(x);
338
+ let M = setTimeout(() => {
339
+ r.classList.add("q-ripple__inner--enter"), r.style.transform = `translate3d(${k},${$},0) scale3d(1,1,1)`, r.style.opacity = 0.2, M = setTimeout(() => {
340
+ r.classList.remove("q-ripple__inner--enter"), r.classList.add("q-ripple__inner--leave"), r.style.opacity = 0, M = setTimeout(() => {
341
+ l.remove(), a.abort.splice(a.abort.indexOf(x), 1);
342
+ }, 275);
343
+ }, 250);
344
+ }, 50);
345
+ }
346
+ function ue(e, { modifiers: t, value: a, arg: n }) {
347
+ const o = Object.assign({}, e.cfg.ripple, t, a);
348
+ e.modifiers = {
349
+ early: o.early === !0,
350
+ stop: o.stop === !0,
351
+ center: o.center === !0,
352
+ color: o.color || n,
353
+ keyCodes: [].concat(o.keyCodes || 13)
354
+ };
355
+ }
356
+ const tt = Oe(
357
+ {
358
+ name: "ripple",
359
+ beforeMount(e, t) {
360
+ const a = t.instance.$.appContext.config.globalProperties.$q.config || {};
361
+ if (a.ripple === !1)
362
+ return;
363
+ const n = {
364
+ cfg: a,
365
+ enabled: t.value !== !1,
366
+ modifiers: {},
367
+ abort: [],
368
+ start(o) {
369
+ n.enabled === !0 && o.qSkipRipple !== !0 && o.type === (n.modifiers.early === !0 ? "pointerdown" : "click") && se(o, e, n, o.qKeyEvent === !0);
370
+ },
371
+ keystart: et((o) => {
372
+ n.enabled === !0 && o.qSkipRipple !== !0 && J(o, n.modifiers.keyCodes) === !0 && o.type === `key${n.modifiers.early === !0 ? "down" : "up"}` && se(o, e, n, !0);
373
+ }, 300)
374
+ };
375
+ ue(n, t), e.__qripple = n, Xe(n, "main", [
376
+ [e, "pointerdown", "start", "passive"],
377
+ [e, "click", "start", "passive"],
378
+ [e, "keydown", "keystart", "passive"],
379
+ [e, "keyup", "keystart", "passive"]
380
+ ]);
381
+ },
382
+ updated(e, t) {
383
+ if (t.oldValue !== t.value) {
384
+ const a = e.__qripple;
385
+ a !== void 0 && (a.enabled = t.value !== !1, a.enabled === !0 && Object(t.value) === t.value && ue(a, t));
386
+ }
387
+ },
388
+ beforeUnmount(e) {
389
+ const t = e.__qripple;
390
+ t !== void 0 && (t.abort.forEach((a) => {
391
+ a();
392
+ }), Je(t, "main"), delete e._qripple);
393
+ }
394
+ }
395
+ ), qe = {
396
+ left: "start",
397
+ center: "center",
398
+ right: "end",
399
+ between: "between",
400
+ around: "around",
401
+ evenly: "evenly",
402
+ stretch: "stretch"
403
+ }, nt = Object.keys(qe), at = {
404
+ align: {
405
+ type: String,
406
+ validator: (e) => nt.includes(e)
407
+ }
408
+ };
409
+ function ot(e) {
410
+ return u(() => {
411
+ const t = e.align === void 0 ? e.vertical === !0 ? "stretch" : "left" : e.align;
412
+ return `${e.vertical === !0 ? "items" : "justify"}-${qe[t]}`;
413
+ });
414
+ }
415
+ function Pt(e) {
416
+ if (Object(e.$parent) === e.$parent)
417
+ return e.$parent;
418
+ let { parent: t } = e.$;
419
+ for (; Object(t) === t; ) {
420
+ if (Object(t.proxy) === t.proxy)
421
+ return t.proxy;
422
+ t = t.parent;
423
+ }
424
+ }
425
+ function rt(e) {
426
+ return e.appContext.config.globalProperties.$router !== void 0;
427
+ }
428
+ function xt(e) {
429
+ return e.isUnmounted === !0 || e.isDeactivated === !0;
430
+ }
431
+ function ce(e) {
432
+ return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
433
+ }
434
+ function de(e, t) {
435
+ return (e.aliasOf || e) === (t.aliasOf || t);
436
+ }
437
+ function it(e, t) {
438
+ for (const a in t) {
439
+ const n = t[a], o = e[a];
440
+ if (typeof n == "string") {
441
+ if (n !== o)
442
+ return !1;
443
+ } else if (Array.isArray(o) === !1 || o.length !== n.length || n.some((c, l) => c !== o[l]))
444
+ return !1;
445
+ }
446
+ return !0;
447
+ }
448
+ function fe(e, t) {
449
+ return Array.isArray(t) === !0 ? e.length === t.length && e.every((a, n) => a === t[n]) : e.length === 1 && e[0] === t;
450
+ }
451
+ function lt(e, t) {
452
+ return Array.isArray(e) === !0 ? fe(e, t) : Array.isArray(t) === !0 ? fe(t, e) : e === t;
453
+ }
454
+ function st(e, t) {
455
+ if (Object.keys(e).length !== Object.keys(t).length)
456
+ return !1;
457
+ for (const a in e)
458
+ if (lt(e[a], t[a]) === !1)
459
+ return !1;
460
+ return !0;
461
+ }
462
+ const Ee = {
463
+ // router-link
464
+ to: [String, Object],
465
+ replace: Boolean,
466
+ // regular <a> link
467
+ href: String,
468
+ target: String,
469
+ // state
470
+ disable: Boolean
471
+ }, Mt = {
472
+ ...Ee,
473
+ // router-link
474
+ exact: Boolean,
475
+ activeClass: {
476
+ type: String,
477
+ default: "q-router-link--active"
478
+ },
479
+ exactActiveClass: {
480
+ type: String,
481
+ default: "q-router-link--exact-active"
482
+ }
483
+ };
484
+ function ut({ fallbackTag: e, useDisableForRouterLinkProps: t = !0 } = {}) {
485
+ const a = Z(), { props: n, proxy: o, emit: c } = a, l = rt(a), r = u(() => n.disable !== !0 && n.href !== void 0), _ = t === !0 ? u(
486
+ () => l === !0 && n.disable !== !0 && r.value !== !0 && n.to !== void 0 && n.to !== null && n.to !== ""
487
+ ) : u(
488
+ () => l === !0 && r.value !== !0 && n.to !== void 0 && n.to !== null && n.to !== ""
489
+ ), h = u(() => _.value === !0 ? T(n.to) : null), d = u(() => h.value !== null), b = u(() => r.value === !0 || d.value === !0), s = u(() => n.type === "a" || b.value === !0 ? "a" : n.tag || e || "div"), y = u(() => r.value === !0 ? {
490
+ href: n.href,
491
+ target: n.target
492
+ } : d.value === !0 ? {
493
+ href: h.value.href,
494
+ target: n.target
495
+ } : {}), m = u(() => {
496
+ if (d.value === !1)
497
+ return -1;
498
+ const { matched: g } = h.value, { length: q } = g, C = g[q - 1];
499
+ if (C === void 0)
500
+ return -1;
501
+ const B = o.$route.matched;
502
+ if (B.length === 0)
503
+ return -1;
504
+ const R = B.findIndex(
505
+ de.bind(null, C)
506
+ );
507
+ if (R !== -1)
508
+ return R;
509
+ const F = ce(g[q - 2]);
510
+ return (
511
+ // we are dealing with nested routes
512
+ q > 1 && ce(C) === F && B[B.length - 1].path !== F ? B.findIndex(
513
+ de.bind(null, g[q - 2])
514
+ ) : R
515
+ );
516
+ }), k = u(
517
+ () => d.value === !0 && m.value !== -1 && it(o.$route.params, h.value.params)
518
+ ), f = u(
519
+ () => k.value === !0 && m.value === o.$route.matched.length - 1 && st(o.$route.params, h.value.params)
520
+ ), $ = u(() => d.value === !0 ? f.value === !0 ? ` ${n.exactActiveClass} ${n.activeClass}` : n.exact === !0 ? "" : k.value === !0 ? ` ${n.activeClass}` : "" : "");
521
+ function T(g) {
522
+ try {
523
+ return o.$router.resolve(g);
524
+ } catch {
525
+ }
526
+ return null;
527
+ }
528
+ function x(g, { returnRouterError: q, to: C = n.to, replace: B = n.replace } = {}) {
529
+ if (n.disable === !0)
530
+ return g.preventDefault(), Promise.resolve(!1);
531
+ if (
532
+ // don't redirect with control keys;
533
+ // should match RouterLink from Vue Router
534
+ g.metaKey || g.altKey || g.ctrlKey || g.shiftKey || g.button !== void 0 && g.button !== 0 || n.target === "_blank"
535
+ )
536
+ return Promise.resolve(!1);
537
+ g.preventDefault();
538
+ const R = o.$router[B === !0 ? "replace" : "push"](C);
539
+ return q === !0 ? R : R.then(() => {
540
+ }).catch(() => {
541
+ });
542
+ }
543
+ function M(g) {
544
+ if (d.value === !0) {
545
+ const q = (C) => x(g, C);
546
+ c("click", g, q), g.defaultPrevented !== !0 && q();
547
+ } else
548
+ c("click", g);
549
+ }
550
+ return {
551
+ hasRouterLink: d,
552
+ hasHrefLink: r,
553
+ hasLink: b,
554
+ linkTag: s,
555
+ resolvedLink: h,
556
+ linkIsActive: k,
557
+ linkIsExactActive: f,
558
+ linkClass: $,
559
+ linkAttrs: y,
560
+ getLink: T,
561
+ navigateToRouterLink: x,
562
+ navigateOnClick: M
563
+ };
564
+ }
565
+ const ve = {
566
+ none: 0,
567
+ xs: 4,
568
+ sm: 8,
569
+ md: 16,
570
+ lg: 24,
571
+ xl: 32
572
+ }, ct = {
573
+ xs: 8,
574
+ sm: 10,
575
+ md: 14,
576
+ lg: 20,
577
+ xl: 24
578
+ }, dt = ["button", "submit", "reset"], ft = /[^\s]\/[^\s]/, vt = ["flat", "outline", "push", "unelevated"];
579
+ function Se(e, t) {
580
+ return e.flat === !0 ? "flat" : e.outline === !0 ? "outline" : e.push === !0 ? "push" : e.unelevated === !0 ? "unelevated" : t;
581
+ }
582
+ function At(e) {
583
+ const t = Se(e);
584
+ return t !== void 0 ? { [t]: !0 } : {};
585
+ }
586
+ const gt = {
587
+ ...he,
588
+ ...Ee,
589
+ type: {
590
+ type: String,
591
+ default: "button"
592
+ },
593
+ label: [Number, String],
594
+ icon: String,
595
+ iconRight: String,
596
+ ...vt.reduce(
597
+ (e, t) => (e[t] = Boolean) && e,
598
+ {}
599
+ ),
600
+ square: Boolean,
601
+ rounded: Boolean,
602
+ glossy: Boolean,
603
+ size: String,
604
+ fab: Boolean,
605
+ fabMini: Boolean,
606
+ padding: String,
607
+ color: String,
608
+ textColor: String,
609
+ noCaps: Boolean,
610
+ noWrap: Boolean,
611
+ dense: Boolean,
612
+ tabindex: [Number, String],
613
+ ripple: {
614
+ type: [Boolean, Object],
615
+ default: !0
616
+ },
617
+ align: {
618
+ ...at.align,
619
+ default: "center"
620
+ },
621
+ stack: Boolean,
622
+ stretch: Boolean,
623
+ loading: {
624
+ type: Boolean,
625
+ default: null
626
+ },
627
+ disable: Boolean
628
+ }, pt = {
629
+ ...gt,
630
+ round: Boolean
631
+ };
632
+ function mt(e) {
633
+ const t = be(e, ct), a = ot(e), { hasRouterLink: n, hasLink: o, linkTag: c, linkAttrs: l, navigateOnClick: r } = ut({
634
+ fallbackTag: "button"
635
+ }), _ = u(() => {
636
+ const f = e.fab === !1 && e.fabMini === !1 ? t.value : {};
637
+ return e.padding !== void 0 ? Object.assign({}, f, {
638
+ padding: e.padding.split(/\s+/).map(($) => $ in ve ? ve[$] + "px" : $).join(" "),
639
+ minWidth: "0",
640
+ minHeight: "0"
641
+ }) : f;
642
+ }), h = u(
643
+ () => e.rounded === !0 || e.fab === !0 || e.fabMini === !0
644
+ ), d = u(
645
+ () => e.disable !== !0 && e.loading !== !0
646
+ ), b = u(() => d.value === !0 ? e.tabindex || 0 : -1), s = u(() => Se(e, "standard")), y = u(() => {
647
+ const f = { tabindex: b.value };
648
+ return o.value === !0 ? Object.assign(f, l.value) : dt.includes(e.type) === !0 && (f.type = e.type), c.value === "a" ? (e.disable === !0 ? f["aria-disabled"] = "true" : f.href === void 0 && (f.role = "button"), n.value !== !0 && ft.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
+ role: "progressbar",
650
+ "aria-valuemin": 0,
651
+ "aria-valuemax": 100,
652
+ "aria-valuenow": e.percentage
653
+ }), f;
654
+ }), m = u(() => {
655
+ let f;
656
+ 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}`);
657
+ const $ = e.round === !0 ? "round" : `rectangle${h.value === !0 ? " q-btn--rounded" : e.square === !0 ? " q-btn--square" : ""}`;
658
+ return `q-btn--${s.value} q-btn--${$}` + (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" : "");
659
+ }), k = u(
660
+ () => a.value + (e.stack === !0 ? " column" : " row") + (e.noWrap === !0 ? " no-wrap text-no-wrap" : "") + (e.loading === !0 ? " q-btn__content--hidden" : "")
661
+ );
662
+ return {
663
+ classes: m,
664
+ style: _,
665
+ innerClasses: k,
666
+ attributes: y,
667
+ hasLink: o,
668
+ linkTag: c,
669
+ navigateOnClick: r,
670
+ isActionable: d
671
+ };
672
+ }
673
+ const { passiveCapture: E } = U;
674
+ let z = null, j = null, D = null;
675
+ const ht = te({
676
+ name: "QBtn",
677
+ props: {
678
+ ...pt,
679
+ percentage: Number,
680
+ darkPercentage: Boolean,
681
+ onTouchstart: [Function, Array]
682
+ },
683
+ emits: ["click", "keydown", "mousedown", "keyup"],
684
+ setup(e, { slots: t, emit: a }) {
685
+ const { proxy: n } = Z(), {
686
+ classes: o,
687
+ style: c,
688
+ innerClasses: l,
689
+ attributes: r,
690
+ hasLink: _,
691
+ linkTag: h,
692
+ navigateOnClick: d,
693
+ isActionable: b
694
+ } = mt(e), s = ae(null), y = ae(null);
695
+ let m = null, k, f = null;
696
+ const $ = u(
697
+ () => e.label !== void 0 && e.label !== null && e.label !== ""
698
+ ), T = u(() => e.disable === !0 || e.ripple === !1 ? !1 : {
699
+ keyCodes: _.value === !0 ? [13, 32] : [13],
700
+ ...e.ripple === !0 ? {} : e.ripple
701
+ }), x = u(() => ({ center: e.round })), M = u(() => {
702
+ const i = Math.max(0, Math.min(100, e.percentage));
703
+ return i > 0 ? { transition: "transform 0.6s", transform: `translateX(${i - 100}%)` } : {};
704
+ }), g = u(() => {
705
+ if (e.loading === !0)
706
+ return {
707
+ onMousedown: V,
708
+ onTouchstart: V,
709
+ onClick: V,
710
+ onKeydown: V,
711
+ onKeyup: V
712
+ };
713
+ if (b.value === !0) {
714
+ const i = {
715
+ onClick: C,
716
+ onKeydown: B,
717
+ onMousedown: F
718
+ };
719
+ if (n.$q.platform.has.touch === !0) {
720
+ const p = e.onTouchstart !== void 0 ? "" : "Passive";
721
+ i[`onTouchstart${p}`] = R;
722
+ }
723
+ return i;
724
+ }
725
+ return {
726
+ // needed; especially for disabled <a> tags
727
+ onClick: O
728
+ };
729
+ }), q = u(() => ({
730
+ ref: s,
731
+ class: "q-btn q-btn-item non-selectable no-outline " + o.value,
732
+ style: c.value,
733
+ ...r.value,
734
+ ...g.value
735
+ }));
736
+ function C(i) {
737
+ if (s.value !== null) {
738
+ if (i !== void 0) {
739
+ if (i.defaultPrevented === !0)
740
+ return;
741
+ const p = document.activeElement;
742
+ if (e.type === "submit" && p !== document.body && s.value.contains(p) === !1 && p.contains(s.value) === !1) {
743
+ s.value.focus();
744
+ const Q = () => {
745
+ document.removeEventListener("keydown", O, !0), document.removeEventListener("keyup", Q, E), s.value !== null && s.value.removeEventListener("blur", Q, E);
746
+ };
747
+ document.addEventListener("keydown", O, !0), document.addEventListener("keyup", Q, E), s.value.addEventListener("blur", Q, E);
748
+ }
749
+ }
750
+ d(i);
751
+ }
752
+ }
753
+ function B(i) {
754
+ s.value !== null && (a("keydown", i), J(i, [13, 32]) === !0 && j !== s.value && (j !== null && I(), i.defaultPrevented !== !0 && (s.value.focus(), j = s.value, s.value.classList.add("q-btn--active"), document.addEventListener("keyup", L, !0), s.value.addEventListener("blur", L, E)), O(i)));
755
+ }
756
+ function R(i) {
757
+ s.value !== null && (a("touchstart", i), i.defaultPrevented !== !0 && (z !== s.value && (z !== null && I(), z = s.value, m = i.target, m.addEventListener("touchcancel", L, E), m.addEventListener("touchend", L, E)), k = !0, f !== null && clearTimeout(f), f = setTimeout(() => {
758
+ f = null, k = !1;
759
+ }, 200)));
760
+ }
761
+ function F(i) {
762
+ s.value !== null && (i.qSkipRipple = k === !0, a("mousedown", i), i.defaultPrevented !== !0 && D !== s.value && (D !== null && I(), D = s.value, s.value.classList.add("q-btn--active"), document.addEventListener("mouseup", L, E)));
763
+ }
764
+ function L(i) {
765
+ if (s.value !== null && !(i !== void 0 && i.type === "blur" && document.activeElement === s.value)) {
766
+ if (i !== void 0 && i.type === "keyup") {
767
+ if (j === s.value && J(i, [13, 32]) === !0) {
768
+ const p = new MouseEvent("click", i);
769
+ p.qKeyEvent = !0, i.defaultPrevented === !0 && We(p), i.cancelBubble === !0 && _e(p), s.value.dispatchEvent(p), O(i), i.qKeyEvent = !0;
770
+ }
771
+ a("keyup", i);
772
+ }
773
+ I();
774
+ }
775
+ }
776
+ function I(i) {
777
+ const p = y.value;
778
+ i !== !0 && (z === s.value || D === s.value) && p !== null && p !== document.activeElement && (p.setAttribute("tabindex", -1), p.focus()), z === s.value && (m !== null && (m.removeEventListener("touchcancel", L, E), m.removeEventListener("touchend", L, E)), z = m = null), D === s.value && (document.removeEventListener("mouseup", L, E), D = null), j === s.value && (document.removeEventListener("keyup", L, !0), s.value !== null && s.value.removeEventListener("blur", L, E), j = null), s.value !== null && s.value.classList.remove("q-btn--active");
779
+ }
780
+ function V(i) {
781
+ O(i), i.qSkipRipple = !0;
782
+ }
783
+ return Ce(() => {
784
+ I(!0);
785
+ }), Object.assign(n, {
786
+ click: (i) => {
787
+ b.value === !0 && C(i);
788
+ }
789
+ }), () => {
790
+ let i = [];
791
+ e.icon !== void 0 && i.push(
792
+ v(le, {
793
+ name: e.icon,
794
+ left: e.stack !== !0 && $.value === !0,
795
+ role: "img"
796
+ })
797
+ ), $.value === !0 && i.push(
798
+ v("span", { class: "block" }, [e.label])
799
+ ), i = K(t.default, i), e.iconRight !== void 0 && e.round === !1 && i.push(
800
+ v(le, {
801
+ name: e.iconRight,
802
+ right: e.stack !== !0 && $.value === !0,
803
+ role: "img"
804
+ })
805
+ );
806
+ const p = [
807
+ v("span", {
808
+ class: "q-focus-helper",
809
+ ref: y
810
+ })
811
+ ];
812
+ return e.loading === !0 && e.percentage !== void 0 && p.push(
813
+ v("span", {
814
+ class: "q-btn__progress absolute-full overflow-hidden" + (e.darkPercentage === !0 ? " q-btn__progress--dark" : "")
815
+ }, [
816
+ v("span", {
817
+ class: "q-btn__progress-indicator fit block",
818
+ style: M.value
819
+ })
820
+ ])
821
+ ), p.push(
822
+ v("span", {
823
+ class: "q-btn__content text-center col items-center q-anchor--skip " + l.value
824
+ }, i)
825
+ ), e.loading !== null && p.push(
826
+ v(Le, {
827
+ name: "q-transition--fade"
828
+ }, () => e.loading === !0 ? [
829
+ v("span", {
830
+ key: "loading",
831
+ class: "absolute-full flex flex-center"
832
+ }, t.loading !== void 0 ? t.loading() : [v(Ge)])
833
+ ] : null)
834
+ ), pe(
835
+ v(
836
+ h.value,
837
+ q.value,
838
+ p
839
+ ),
840
+ [[
841
+ tt,
842
+ T.value,
843
+ void 0,
844
+ x.value
845
+ ]]
846
+ );
847
+ };
848
+ }
849
+ }), bt = /* @__PURE__ */ G({
850
+ __name: "AppButton",
851
+ props: {
852
+ size: { default: S.MD },
853
+ transparent: { type: Boolean },
854
+ flat: { type: Boolean },
855
+ rounded: { type: Boolean },
856
+ color: { default: me.PRIMARY },
857
+ iconLeft: {},
858
+ iconRight: {},
859
+ iconMiddle: {},
860
+ disabled: { type: Boolean },
861
+ loading: { type: Boolean },
862
+ to: {},
863
+ href: {},
864
+ target: {},
865
+ submit: { type: Boolean },
866
+ ariaLabel: {},
867
+ label: {}
868
+ },
869
+ emits: ["click"],
870
+ setup(e) {
871
+ const t = e, a = u(() => [
872
+ "app-btn",
873
+ {
874
+ "app-btn_default": !t.transparent && !t.flat,
875
+ "app-btn_trans": t.transparent,
876
+ "app-btn_flat": t.flat,
877
+ "app-btn_rounded": t.rounded,
878
+ "app-btn_sm": t.size === S.SM,
879
+ "app-btn_md": t.size === S.MD,
880
+ "app-btn_lg": t.size === S.LG,
881
+ "app-btn_icon-left": t.iconLeft,
882
+ "app-btn_icon-right": t.iconRight,
883
+ "app-btn_icon-middle": t.iconMiddle
884
+ },
885
+ `app-btn_${t.color}`
886
+ ]);
887
+ return (n, o) => (w(), Be(H(ht), {
888
+ "no-caps": "",
889
+ unelevated: "",
890
+ class: P(a.value),
891
+ padding: H(Te)[n.size || H(S).MD],
892
+ loading: n.loading,
893
+ disable: n.disabled || void 0,
894
+ to: n.to,
895
+ href: n.href,
896
+ target: n.target,
897
+ type: n.submit ? "submit" : void 0,
898
+ "aria-label": n.ariaLabel,
899
+ onClick: o[0] || (o[0] = (c) => n.$emit("click", c))
900
+ }, {
901
+ default: Re(() => [
902
+ n.iconLeft || n.iconMiddle ? (w(), A("i", {
903
+ key: 0,
904
+ class: P([
905
+ "icon-kl",
906
+ n.iconLeft ? "icon-kl_left" : "icon-kl_middle",
907
+ `icon-kl-${n.iconLeft || n.iconMiddle}`,
908
+ n.transparent || n.flat ? `text-${n.color}` : "text-secondary"
909
+ ])
910
+ }, null, 2)) : N("", !0),
911
+ we(n.$slots, "default", {}, void 0, !0),
912
+ n.label ? (w(), A(Pe, { key: 1 }, [
913
+ xe(Me(n.label), 1)
914
+ ], 64)) : N("", !0),
915
+ n.iconRight ? (w(), A("i", {
916
+ key: 2,
917
+ class: P([
918
+ "icon-kl",
919
+ "icon-kl_right",
920
+ `icon-kl-${n.iconRight}`,
921
+ n.transparent ? `text-${n.color}` : "text-secondary"
922
+ ])
923
+ }, null, 2)) : N("", !0)
924
+ ]),
925
+ _: 3
926
+ }, 8, ["class", "padding", "loading", "disable", "to", "href", "target", "type", "aria-label"]));
927
+ }
928
+ }), ne = (e, t) => {
929
+ const a = e.__vccOpts || e;
930
+ for (const [n, o] of t)
931
+ a[n] = o;
932
+ return a;
933
+ }, Tt = /* @__PURE__ */ ne(bt, [["__scopeId", "data-v-0aee6cab"]]), yt = ["checked", "disabled"], kt = { class: "app-toggle__thumb" }, $t = /* @__PURE__ */ G({
934
+ __name: "AppToggle",
935
+ props: {
936
+ modelValue: { type: Boolean },
937
+ size: { default: S.MD },
938
+ label: {},
939
+ disabled: { type: Boolean },
940
+ color: { default: me.PRIMARY },
941
+ iconColor: {},
942
+ icon: {},
943
+ iconActive: {}
944
+ },
945
+ emits: ["update:modelValue"],
946
+ setup(e, { emit: t }) {
947
+ const a = e, n = t, o = u({
948
+ get: () => a.modelValue,
949
+ set: (l) => {
950
+ n("update:modelValue", l);
951
+ }
952
+ }), c = u(() => [
953
+ "app-toggle",
954
+ {
955
+ "app-toggle_sm": a.size === S.SM,
956
+ "app-toggle_md": a.size === S.MD,
957
+ "app-toggle_lg": a.size === S.LG,
958
+ "app-toggle_active": o.value,
959
+ "app-toggle_disabled": a.disabled
960
+ },
961
+ `app-toggle_${a.color}`
962
+ ]);
963
+ return (l, r) => (w(), A("label", {
964
+ class: P(c.value)
965
+ }, [
966
+ Y("input", {
967
+ type: "checkbox",
968
+ checked: o.value,
969
+ onChange: r[0] || (r[0] = (_) => o.value = !o.value),
970
+ disabled: l.disabled,
971
+ class: "app-toggle__input"
972
+ }, null, 40, yt),
973
+ Y("span", {
974
+ class: P(["app-toggle__slider", o.value ? `bg-${l.color}` : ""])
975
+ }, [
976
+ Y("span", kt, [
977
+ l.icon && !l.modelValue ? (w(), A("i", {
978
+ key: 0,
979
+ class: P(["icon-kl", `icon-kl-${l.icon}`, "app-toggle__icon"])
980
+ }, null, 2)) : N("", !0),
981
+ l.iconActive && l.modelValue ? (w(), A("i", {
982
+ key: 1,
983
+ class: P([
984
+ "icon-kl",
985
+ `icon-kl-${l.iconActive}`,
986
+ "app-toggle__icon",
987
+ o.value ? `text-${l.iconColor}` : ""
988
+ ])
989
+ }, null, 2)) : N("", !0)
990
+ ])
991
+ ], 2)
992
+ ], 2));
993
+ }
994
+ }), Ot = /* @__PURE__ */ ne($t, [["__scopeId", "data-v-ce818477"]]), _t = /* @__PURE__ */ G({
995
+ __name: "AppIcon",
996
+ props: {
997
+ name: {},
998
+ size: {},
999
+ color: {}
1000
+ },
1001
+ setup(e) {
1002
+ return (t, a) => (w(), A("i", {
1003
+ class: P(["icon-kl", `icon-kl-${t.name}`, t.color ? `text-${t.color}` : ""]),
1004
+ style: Ae(t.size ? `font-size: ${t.size}` : void 0)
1005
+ }, null, 6));
1006
+ }
1007
+ }), zt = /* @__PURE__ */ ne(_t, [["__scopeId", "data-v-941765ee"]]), jt = ee(
1008
+ () => import("./AppButtonCopy-B1kLZgFy.js")
1009
+ ), Dt = ee(
1010
+ () => import("./AppSelect-DepQBlef.js")
1011
+ ), It = ee(
1012
+ () => import("./DropdownButton-CTs9oLQ2.js")
1013
+ );
1014
+ export {
1015
+ Tt as A,
1016
+ Pt as B,
1017
+ me as C,
1018
+ xt as D,
1019
+ Lt as E,
1020
+ Ue as F,
1021
+ Ye as G,
1022
+ zt as H,
1023
+ jt as I,
1024
+ Dt as J,
1025
+ Ot as K,
1026
+ It as L,
1027
+ le as Q,
1028
+ tt as R,
1029
+ S,
1030
+ ne as _,
1031
+ K as a,
1032
+ he as b,
1033
+ te as c,
1034
+ ut as d,
1035
+ Et as e,
1036
+ Mt as f,
1037
+ Ge as g,
1038
+ ze as h,
1039
+ J as i,
1040
+ Ct as j,
1041
+ St as k,
1042
+ U as l,
1043
+ wt as m,
1044
+ Bt as n,
1045
+ Rt as o,
1046
+ We as p,
1047
+ _e as q,
1048
+ Ze as r,
1049
+ O as s,
1050
+ At as t,
1051
+ be as u,
1052
+ gt as v,
1053
+ ht as w,
1054
+ Xe as x,
1055
+ Je as y,
1056
+ rt as z
1057
+ };