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