@validol4ik/uikit 0.2.11 → 0.2.13

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