@vasakgroup/vue-libvasak 0.15.1 → 0.16.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,9 +1,9 @@
1
- import { ref as $, onMounted as J, onUnmounted as ve, watch as K, defineComponent as z, toRef as Be, computed as p, createElementBlock as s, unref as q, openBlock as i, normalizeStyle as se, createCommentVNode as h, createElementVNode as E, createVNode as O, toDisplayString as S, normalizeClass as x, renderSlot as A, createBlock as Q, onBeforeUnmount as ce, Fragment as Z, renderList as ne, withCtx as W, mergeModels as Ae, useAttrs as we, useId as ot, useModel as it, withDirectives as Ce, mergeProps as oe, isRef as st, vModelSelect as rt, inject as pe, getCurrentInstance as Fe, provide as de, createTextVNode as ze, toHandlers as qe, createSlots as ut, withModifiers as M, withKeys as F, Teleport as fe, Transition as ge, nextTick as Y, TransitionGroup as ct, vShow as Re, cloneVNode as dt, h as ft, Comment as mt, Text as bt } from "vue";
1
+ import { ref as w, onMounted as J, onUnmounted as ve, watch as K, defineComponent as z, toRef as Be, computed as p, createElementBlock as s, unref as q, openBlock as i, normalizeStyle as se, createCommentVNode as h, createElementVNode as E, createVNode as O, toDisplayString as S, normalizeClass as x, renderSlot as A, createBlock as Q, onBeforeUnmount as ce, Fragment as Z, renderList as ne, withCtx as W, mergeModels as Ae, useAttrs as $e, useId as ot, useModel as it, withDirectives as Ce, mergeProps as oe, isRef as st, vModelSelect as rt, inject as pe, getCurrentInstance as Fe, provide as de, createTextVNode as ze, toHandlers as qe, createSlots as ut, withModifiers as M, withKeys as F, Teleport as fe, Transition as ye, nextTick as Y, TransitionGroup as ct, vShow as Re, cloneVNode as dt, h as ft, Comment as mt, Text as bt } from "vue";
2
2
  import { listen as vt } from "@tauri-apps/api/event";
3
- import { getSymbolSource as pt, getIconSource as gt } from "@vasakgroup/plugin-vicons";
4
- import { getCurrentWindow as yt } from "@tauri-apps/api/window";
3
+ import { getSymbolSource as pt, getIconSource as yt } from "@vasakgroup/plugin-vicons";
4
+ import { getCurrentWindow as gt } from "@tauri-apps/api/window";
5
5
  import { useI18n as ht } from "@vasakgroup/tauri-plugin-i18n";
6
- const xt = "vicons:theme-changed", be = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ new Map(), re = $(0);
6
+ const xt = "vicons:theme-changed", be = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ new Map(), re = w(0);
7
7
  let le = 0, ue = null, te = null;
8
8
  function zn() {
9
9
  be.clear(), ae.clear(), le = 0, ue = null, te = null, re.value = 0;
@@ -11,12 +11,12 @@ function zn() {
11
11
  function kt() {
12
12
  be.clear(), ae.clear(), re.value++;
13
13
  }
14
- function $t() {
14
+ function wt() {
15
15
  return le++, ue || te ? te ?? Promise.resolve() : (te = vt(xt, kt).then((e) => {
16
16
  le <= 0 ? e() : ue = e, te = null;
17
17
  }), te);
18
18
  }
19
- function wt() {
19
+ function $t() {
20
20
  le--, !(le > 0) && (le = 0, ue?.(), ue = null);
21
21
  }
22
22
  function Ct(e, l) {
@@ -26,13 +26,13 @@ function Ct(e, l) {
26
26
  const n = ae.get(t);
27
27
  if (n)
28
28
  return n;
29
- const o = re.value, u = (l === "symbol" ? pt(e) : gt(e)).then((r) => (re.value === o && be.set(t, r), r)).finally(() => {
29
+ const o = re.value, u = (l === "symbol" ? pt(e) : yt(e)).then((r) => (re.value === o && be.set(t, r), r)).finally(() => {
30
30
  ae.get(t) === u && ae.delete(t);
31
31
  });
32
32
  return ae.set(t, u), u;
33
33
  }
34
34
  function zt(e, l) {
35
- const t = $("");
35
+ const t = w("");
36
36
  let a = !1, n = 0;
37
37
  async function o() {
38
38
  const u = ++n, r = e.value;
@@ -40,13 +40,13 @@ function zt(e, l) {
40
40
  t.value = "";
41
41
  return;
42
42
  }
43
- const m = await Ct(r, l.value);
44
- u === n && !a && (t.value = m);
43
+ const d = await Ct(r, l.value);
44
+ u === n && !a && (t.value = d);
45
45
  }
46
46
  return J(async () => {
47
- await $t(), a || await o();
47
+ await wt(), a || await o();
48
48
  }), ve(() => {
49
- a = !0, wt();
49
+ a = !0, $t();
50
50
  }), K([e, l], o), K(re, o), t;
51
51
  }
52
52
  const Et = ["src", "alt"], H = /* @__PURE__ */ z({
@@ -82,7 +82,7 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
82
82
  defaultOpen: { type: Boolean, default: !0 }
83
83
  },
84
84
  setup(e) {
85
- const l = e, t = $(l.defaultOpen);
85
+ const l = e, t = w(l.defaultOpen);
86
86
  return K(
87
87
  () => l.collapsed,
88
88
  (a) => {
@@ -182,9 +182,9 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
182
182
  },
183
183
  emits: ["update:modelValue", "update:collapsed", "change"],
184
184
  setup(e, { expose: l, emit: t }) {
185
- const a = e, n = t, o = $(a.collapsed ?? !1), u = $(!1);
186
- let r = null, m = null;
187
- const b = p(() => u.value || o.value), f = p(() => !!(a.title || a.subtitle));
185
+ const a = e, n = t, o = w(a.collapsed ?? !1), u = w(!1);
186
+ let r = null, d = null;
187
+ const b = p(() => u.value || o.value), m = p(() => !!(a.title || a.subtitle));
188
188
  p(() => a.categories.length > 0);
189
189
  function B() {
190
190
  return document.documentElement?.clientWidth || window.innerWidth;
@@ -195,22 +195,22 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
195
195
  function L() {
196
196
  o.value = !o.value, n("update:collapsed", o.value);
197
197
  }
198
- function g(d) {
199
- n("update:modelValue", d), n("change", d);
198
+ function y(f) {
199
+ n("update:modelValue", f), n("change", f);
200
200
  }
201
201
  return K(
202
202
  () => a.collapsed,
203
- (d) => {
204
- d !== void 0 && (o.value = d);
203
+ (f) => {
204
+ f !== void 0 && (o.value = f);
205
205
  }
206
206
  ), J(() => {
207
- r = window.matchMedia(`(max-width: ${Ve}px)`), D(), r.addEventListener("change", D), window.addEventListener("resize", D), typeof ResizeObserver < "u" && document.documentElement && (m = new ResizeObserver(D), m.observe(document.documentElement));
207
+ r = window.matchMedia(`(max-width: ${Ve}px)`), D(), r.addEventListener("change", D), window.addEventListener("resize", D), typeof ResizeObserver < "u" && document.documentElement && (d = new ResizeObserver(D), d.observe(document.documentElement));
208
208
  }), ce(() => {
209
- r?.removeEventListener("change", D), window.removeEventListener("resize", D), m?.disconnect(), m = null;
210
- }), l({ collapsed: b }), (d, V) => (i(), s("aside", {
209
+ r?.removeEventListener("change", D), window.removeEventListener("resize", D), d?.disconnect(), d = null;
210
+ }), l({ collapsed: b }), (f, V) => (i(), s("aside", {
211
211
  class: x(["relative z-30 flex h-full shrink-0 flex-col rounded-corner border border-ui-border bg-ui-surface/70 transition-all duration-300", ["w-[84px]", b.value ? "md:w-[84px]" : "md:w-72"]])
212
212
  }, [
213
- f.value || d.$slots.header ? (i(), s("header", Mt, [
213
+ m.value || f.$slots.header ? (i(), s("header", Mt, [
214
214
  E("div", It, [
215
215
  E("button", {
216
216
  type: "button",
@@ -225,13 +225,13 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
225
225
  size: 16
226
226
  }, null, 8, ["name"])
227
227
  ], 8, Ot),
228
- f.value && !b.value ? (i(), s("div", jt, [
228
+ m.value && !b.value ? (i(), s("div", jt, [
229
229
  e.title ? (i(), s("p", Pt, S(e.title), 1)) : h("", !0),
230
230
  e.subtitle ? (i(), s("p", Ft, S(e.subtitle), 1)) : h("", !0)
231
231
  ])) : h("", !0)
232
232
  ]),
233
- d.$slots.header && !b.value ? (i(), s("div", qt, [
234
- A(d.$slots, "header", { collapsed: b.value })
233
+ f.$slots.header && !b.value ? (i(), s("div", qt, [
234
+ A(f.$slots, "header", { collapsed: b.value })
235
235
  ])) : h("", !0)
236
236
  ])) : (i(), s("div", Rt, [
237
237
  E("button", {
@@ -255,20 +255,20 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
255
255
  collapsed: b.value
256
256
  }, {
257
257
  default: W(() => [
258
- (i(!0), s(Z, null, ne(j.items, (w) => (i(), Q(He, {
259
- key: w.id,
260
- label: w.label,
261
- icon: w.icon,
262
- badge: w.badge,
263
- disabled: w.disabled,
258
+ (i(!0), s(Z, null, ne(j.items, ($) => (i(), Q(He, {
259
+ key: $.id,
260
+ label: $.label,
261
+ icon: $.icon,
262
+ badge: $.badge,
263
+ disabled: $.disabled,
264
264
  collapsed: b.value,
265
- active: e.modelValue === w.id,
266
- onClick: (c) => g(w.id)
265
+ active: e.modelValue === $.id,
266
+ onClick: (c) => y($.id)
267
267
  }, null, 8, ["label", "icon", "badge", "disabled", "collapsed", "active", "onClick"]))), 128))
268
268
  ]),
269
269
  _: 2
270
270
  }, 1032, ["title", "collapsed"]))), 128)),
271
- A(d.$slots, "default", { collapsed: b.value })
271
+ A(f.$slots, "default", { collapsed: b.value })
272
272
  ])
273
273
  ], 2));
274
274
  }
@@ -285,12 +285,12 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
285
285
  }),
286
286
  emits: /* @__PURE__ */ Ae(["change"], ["update:modelValue"]),
287
287
  setup(e, { emit: l }) {
288
- const t = e, a = we(), n = ot(), o = p(() => a.id ?? n), u = l, [r, m] = it(e, "modelValue", {
288
+ const t = e, a = $e(), n = ot(), o = p(() => a.id ?? n), u = l, [r, d] = it(e, "modelValue", {
289
289
  set(b) {
290
- return m.number ? Number(b) : b;
290
+ return d.number ? Number(b) : b;
291
291
  }
292
292
  });
293
- return (b, f) => (i(), s("div", Wt, [
293
+ return (b, m) => (i(), s("div", Wt, [
294
294
  t.label ? (i(), s("label", {
295
295
  key: 0,
296
296
  for: o.value,
@@ -299,10 +299,10 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
299
299
  E("div", Gt, [
300
300
  Ce(E("select", oe({
301
301
  id: o.value,
302
- "onUpdate:modelValue": f[0] || (f[0] = (B) => st(r) ? r.value = B : null),
302
+ "onUpdate:modelValue": m[0] || (m[0] = (B) => st(r) ? r.value = B : null),
303
303
  class: "min-w-0 flex-1 appearance-none truncate rounded-corner border border-ui-border bg-ui-surface/60 py-1.5 pr-8 pl-2 text-sm text-tx-main"
304
304
  }, q(a), {
305
- onChange: f[1] || (f[1] = (B) => u("change", B))
305
+ onChange: m[1] || (m[1] = (B) => u("change", B))
306
306
  }), [
307
307
  A(b.$slots, "default")
308
308
  ], 16, Qt), [
@@ -318,7 +318,7 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
318
318
  ]));
319
319
  }
320
320
  }), Ee = /* @__PURE__ */ Symbol("barra de vasak");
321
- function $e(e) {
321
+ function we(e) {
322
322
  return e === "left" || e === "right" ? "vertical" : "horizontal";
323
323
  }
324
324
  const Xt = ["top", "bottom", "left", "right"];
@@ -328,11 +328,11 @@ function Jt(e) {
328
328
  function me() {
329
329
  const e = pe(Ee, null);
330
330
  if (e) return e;
331
- const l = $("top");
331
+ const l = w("top");
332
332
  return {
333
333
  posicion: l,
334
- orientacion: p(() => $e(l.value)),
335
- vertical: p(() => $e(l.value) === "vertical")
334
+ orientacion: p(() => we(l.value)),
335
+ vertical: p(() => we(l.value) === "vertical")
336
336
  };
337
337
  }
338
338
  const De = ["minimize", "maximize", "close"], Zt = "window", _t = "barPosition";
@@ -341,7 +341,7 @@ function ea(e) {
341
341
  return Jt(t) ? t : null;
342
342
  }
343
343
  function ta(e = "top") {
344
- const l = $(e);
344
+ const l = w(e);
345
345
  let t = null, a = !1;
346
346
  async function n() {
347
347
  try {
@@ -385,13 +385,13 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
385
385
  },
386
386
  emits: ["minimize", "maximize", "close"],
387
387
  setup(e, { emit: l }) {
388
- const t = e, { t: a } = ht(), n = p(() => t.minimizeLabel ?? a("ventana.minimizar")), o = p(() => t.maximizeLabel ?? a("ventana.maximizar")), u = p(() => t.closeLabel ?? a("ventana.cerrar")), r = l, { vertical: m } = me(), b = p(() => ({
388
+ const t = e, { t: a } = ht(), n = p(() => t.minimizeLabel ?? a("ventana.minimizar")), o = p(() => t.maximizeLabel ?? a("ventana.maximizar")), u = p(() => t.closeLabel ?? a("ventana.cerrar")), r = l, { vertical: d } = me(), b = p(() => ({
389
389
  minimize: t.controls.includes("minimize"),
390
390
  maximize: t.controls.includes("maximize"),
391
391
  close: t.controls.includes("close")
392
392
  }));
393
- function f() {
394
- return yt();
393
+ function m() {
394
+ return gt();
395
395
  }
396
396
  const B = Fe();
397
397
  function D(V) {
@@ -399,19 +399,19 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
399
399
  }
400
400
  function L() {
401
401
  if (D("Minimize")) return r("minimize");
402
- f().minimize();
402
+ m().minimize();
403
403
  }
404
- function g() {
404
+ function y() {
405
405
  if (D("Maximize")) return r("maximize");
406
- f().toggleMaximize();
406
+ m().toggleMaximize();
407
407
  }
408
- function d() {
408
+ function f() {
409
409
  if (D("Close")) return r("close");
410
- f().close();
410
+ m().close();
411
411
  }
412
412
  return (V, j) => e.controls.length ? (i(), s("div", {
413
413
  key: 0,
414
- class: x(["flex shrink-0 gap-1", q(m) ? "flex-col" : ""]),
414
+ class: x(["flex shrink-0 gap-1", q(d) ? "flex-col" : ""]),
415
415
  "data-tauri-drag-region": ""
416
416
  }, [
417
417
  b.value.minimize ? (i(), s("button", {
@@ -420,7 +420,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
420
420
  class: x([xe, "hover:bg-status-success"]),
421
421
  title: n.value,
422
422
  "aria-label": n.value,
423
- onClick: j[0] || (j[0] = (w) => L())
423
+ onClick: j[0] || (j[0] = ($) => L())
424
424
  }, [
425
425
  O(H, {
426
426
  name: "window-minimize",
@@ -434,7 +434,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
434
434
  class: x([xe, "hover:bg-status-warning"]),
435
435
  title: o.value,
436
436
  "aria-label": o.value,
437
- onClick: j[1] || (j[1] = (w) => g())
437
+ onClick: j[1] || (j[1] = ($) => y())
438
438
  }, [
439
439
  O(H, {
440
440
  name: "window-maximize",
@@ -448,7 +448,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
448
448
  class: x([xe, "hover:bg-status-error"]),
449
449
  title: u.value,
450
450
  "aria-label": u.value,
451
- onClick: j[2] || (j[2] = (w) => d())
451
+ onClick: j[2] || (j[2] = ($) => f())
452
452
  }, [
453
453
  O(H, {
454
454
  name: "window-close",
@@ -538,7 +538,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
538
538
  },
539
539
  emits: ["minimize", "maximize", "close"],
540
540
  setup(e) {
541
- const l = e, t = ta(), a = p(() => l.position ?? t.value), n = p(() => $e(a.value)), o = p(() => n.value === "vertical");
541
+ const l = e, t = ta(), a = p(() => l.position ?? t.value), n = p(() => we(a.value)), o = p(() => n.value === "vertical");
542
542
  de(Ee, { posicion: a, orientacion: n, vertical: o });
543
543
  const u = {
544
544
  top: "flex-col",
@@ -546,7 +546,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
546
546
  left: "flex-row",
547
547
  right: "flex-row-reverse"
548
548
  };
549
- return (r, m) => (i(), s("div", {
549
+ return (r, d) => (i(), s("div", {
550
550
  class: x(["flex h-screen w-screen overflow-hidden rounded-corner-window border border-ui-border bg-ui-bg/80", u[a.value]])
551
551
  }, [
552
552
  e.hideBar ? h("", !0) : (i(), Q(Ke, oe({
@@ -618,16 +618,16 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
618
618
  },
619
619
  emits: ["select", "close", "menu", "mover", "navegar"],
620
620
  setup(e, { emit: l }) {
621
- const t = e, a = l, { vertical: n, posicion: o } = me(), u = $(null), r = $(null), m = $(!1), b = $(!1), f = $(!1), B = $({ top: 0, left: 0, right: 0 });
621
+ const t = e, a = l, { vertical: n, posicion: o } = me(), u = w(null), r = w(null), d = w(!1), b = w(!1), m = w(!1), B = w({ top: 0, left: 0, right: 0 });
622
622
  let D = null, L = null;
623
- const g = p(() => t.tab.closable !== !1), d = p(() => t.tab.tooltip ?? t.tab.label), V = p(
623
+ const y = p(() => t.tab.closable !== !1), f = p(() => t.tab.tooltip ?? t.tab.label), V = p(
624
624
  () => t.tab.dirty ? `${t.tab.label} · ${t.dirtyLabel}` : t.tab.label
625
- ), j = p(() => t.tab.label.trim().charAt(0).toUpperCase()), w = p(() => m.value || f.value), c = p(
626
- () => !!t.tab.dirty && !(w.value && g.value)
625
+ ), j = p(() => t.tab.label.trim().charAt(0).toUpperCase()), $ = p(() => d.value || m.value), c = p(
626
+ () => !!t.tab.dirty && !($.value && y.value)
627
627
  ), v = p(
628
- () => g.value && (w.value || t.active || !t.tab.dirty)
629
- ), y = p(
630
- () => n.value && (m.value || b.value || f.value)
628
+ () => y.value && ($.value || t.active || !t.tab.dirty)
629
+ ), g = p(
630
+ () => n.value && (d.value || b.value || m.value)
631
631
  ), P = p(() => {
632
632
  const R = { position: "fixed", top: `${B.value.top}px`, zIndex: 50 };
633
633
  return o.value === "right" ? { ...R, right: `${B.value.right + Ie}px` } : { ...R, left: `${B.value.left + Ie}px` };
@@ -644,10 +644,10 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
644
644
  }
645
645
  function U(R) {
646
646
  const k = R.relatedTarget;
647
- k && r.value?.contains(k) || (f.value = !1);
647
+ k && r.value?.contains(k) || (m.value = !1);
648
648
  }
649
649
  function ee() {
650
- m.value = !0, _();
650
+ d.value = !0, _();
651
651
  }
652
652
  function G() {
653
653
  b.value = !0, _();
@@ -665,7 +665,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
665
665
  (Math.abs(R.clientX - L.x) > Me || Math.abs(R.clientY - L.y) > Me) && T();
666
666
  }
667
667
  function ie(R) {
668
- R.button === 1 && g.value && (R.preventDefault(), a("close"));
668
+ R.button === 1 && y.value && (R.preventDefault(), a("close"));
669
669
  }
670
670
  function nt(R) {
671
671
  R.preventDefault(), a("menu", { x: R.clientX, y: R.clientY });
@@ -679,7 +679,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
679
679
  ]]),
680
680
  role: "tab",
681
681
  "aria-selected": e.active,
682
- title: d.value,
682
+ title: f.value,
683
683
  "aria-label": V.value,
684
684
  tabindex: e.tabindex,
685
685
  onClick: k[5] || (k[5] = M((N) => a("select"), ["stop"])),
@@ -696,7 +696,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
696
696
  k[15] || (k[15] = F(M((N) => a("mover", -1), ["alt", "prevent", "stop"]), ["up"])),
697
697
  k[16] || (k[16] = F(M((N) => a("mover", 1), ["alt", "prevent", "stop"]), ["right"])),
698
698
  k[17] || (k[17] = F(M((N) => a("mover", 1), ["alt", "prevent", "stop"]), ["down"])),
699
- k[18] || (k[18] = F(M((N) => g.value && a("close"), ["prevent", "stop"]), ["delete"]))
699
+ k[18] || (k[18] = F(M((N) => y.value && a("close"), ["prevent", "stop"]), ["delete"]))
700
700
  ],
701
701
  onAuxclick: M(ie, ["stop"]),
702
702
  onContextmenu: nt,
@@ -705,7 +705,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
705
705
  onPointerup: T,
706
706
  onPointerleave: T,
707
707
  onMouseenter: ee,
708
- onMouseleave: k[19] || (k[19] = (N) => m.value = !1),
708
+ onMouseleave: k[19] || (k[19] = (N) => d.value = !1),
709
709
  onFocus: G,
710
710
  onBlur: k[20] || (k[20] = (N) => b.value = !1)
711
711
  }, [
@@ -735,27 +735,27 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
735
735
  })
736
736
  ], 8, fa)) : h("", !0),
737
737
  (i(), Q(fe, { to: "body" }, [
738
- O(ge, {
738
+ O(ye, {
739
739
  "enter-active-class": "transition duration-150 ease-out",
740
740
  "enter-from-class": "opacity-0 scale-95",
741
741
  "leave-active-class": "transition duration-100 ease-in",
742
742
  "leave-to-class": "opacity-0 scale-95"
743
743
  }, {
744
744
  default: W(() => [
745
- y.value ? (i(), s("div", {
745
+ g.value ? (i(), s("div", {
746
746
  key: 0,
747
747
  class: x(["flex items-center gap-2 rounded-corner border border-ui-border bg-ui-surface/95 px-3 py-1 text-sm shadow-lg", e.active ? "font-bold" : ""]),
748
748
  ref_key: "desplegadoRef",
749
749
  ref: r,
750
750
  style: se(P.value),
751
- onMouseenter: k[2] || (k[2] = (N) => f.value = !0),
752
- onMouseleave: k[3] || (k[3] = (N) => f.value = !1),
753
- onFocusin: k[4] || (k[4] = (N) => f.value = !0),
751
+ onMouseenter: k[2] || (k[2] = (N) => m.value = !0),
752
+ onMouseleave: k[3] || (k[3] = (N) => m.value = !1),
753
+ onFocusin: k[4] || (k[4] = (N) => m.value = !0),
754
754
  onFocusout: U
755
755
  }, [
756
756
  E("span", ma, S(e.tab.label), 1),
757
757
  e.tab.dirty ? (i(), s("span", ba)) : h("", !0),
758
- g.value ? (i(), s("button", {
758
+ y.value ? (i(), s("button", {
759
759
  key: 1,
760
760
  type: "button",
761
761
  class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
@@ -776,7 +776,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
776
776
  ]))
777
777
  ], 42, ua));
778
778
  }
779
- }), ga = ["aria-orientation"], ya = ["draggable", "onDragstart", "onDragover", "onDrop"], ha = ["title", "aria-label"], xa = /* @__PURE__ */ z({
779
+ }), ya = ["aria-orientation"], ga = ["draggable", "onDragstart", "onDragover", "onDrop"], ha = ["title", "aria-label"], xa = /* @__PURE__ */ z({
780
780
  __name: "TabBar",
781
781
  props: {
782
782
  tabs: {},
@@ -788,48 +788,48 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
788
788
  },
789
789
  emits: ["update:modelValue", "select", "close", "new", "reorder", "menu"],
790
790
  setup(e, { emit: l }) {
791
- const t = e, a = l, { vertical: n } = me(), o = $(null), u = $(0), r = $(null), m = $(null);
792
- function b(w) {
793
- a("update:modelValue", w), a("select", w);
791
+ const t = e, a = l, { vertical: n } = me(), o = w(null), u = w(0), r = w(null), d = w(null);
792
+ function b($) {
793
+ a("update:modelValue", $), a("select", $);
794
794
  }
795
- async function f(w, c) {
795
+ async function m($, c) {
796
796
  const v = t.tabs.length - 1;
797
797
  if (v < 0) return;
798
- const y = c === "primera" ? 0 : c === "ultima" ? v : c === "anterior" ? (w - 1 + t.tabs.length) % t.tabs.length : (w + 1) % t.tabs.length;
799
- u.value = y, await Y(), o.value?.querySelectorAll('[role="tab"]')?.[y]?.focus();
798
+ const g = c === "primera" ? 0 : c === "ultima" ? v : c === "anterior" ? ($ - 1 + t.tabs.length) % t.tabs.length : ($ + 1) % t.tabs.length;
799
+ u.value = g, await Y(), o.value?.querySelectorAll('[role="tab"]')?.[g]?.focus();
800
800
  }
801
- function B(w, c) {
801
+ function B($, c) {
802
802
  if (t.fixedOrder) return;
803
- const v = w + c;
803
+ const v = $ + c;
804
804
  if (v < 0 || v >= t.tabs.length) return;
805
- const y = [...t.tabs], [P] = y.splice(w, 1);
806
- P && (y.splice(v, 0, P), u.value = v, a("reorder", y));
805
+ const g = [...t.tabs], [P] = g.splice($, 1);
806
+ P && (g.splice(v, 0, P), u.value = v, a("reorder", g));
807
807
  }
808
- function D(w) {
808
+ function D($) {
809
809
  const c = o.value;
810
810
  if (!c) return;
811
- const v = w.deltaY || w.deltaX || 0, y = n.value ? c.scrollTop : c.scrollLeft;
812
- n.value ? c.scrollTop += v : c.scrollLeft += v, (n.value ? c.scrollTop : c.scrollLeft) !== y && w.preventDefault();
811
+ const v = $.deltaY || $.deltaX || 0, g = n.value ? c.scrollTop : c.scrollLeft;
812
+ n.value ? c.scrollTop += v : c.scrollLeft += v, (n.value ? c.scrollTop : c.scrollLeft) !== g && $.preventDefault();
813
813
  }
814
- function L(w, c) {
815
- t.fixedOrder || (r.value = w, c.dataTransfer?.setData("text/plain", String(w)), c.dataTransfer && (c.dataTransfer.effectAllowed = "move"));
814
+ function L($, c) {
815
+ t.fixedOrder || (r.value = $, c.dataTransfer?.setData("text/plain", String($)), c.dataTransfer && (c.dataTransfer.effectAllowed = "move"));
816
816
  }
817
- function g(w, c) {
818
- t.fixedOrder || r.value === null || (c.preventDefault(), m.value = w, c.dataTransfer && (c.dataTransfer.dropEffect = "move"));
817
+ function y($, c) {
818
+ t.fixedOrder || r.value === null || (c.preventDefault(), d.value = $, c.dataTransfer && (c.dataTransfer.dropEffect = "move"));
819
819
  }
820
- function d(w) {
820
+ function f($) {
821
821
  const c = r.value;
822
- if (V(), t.fixedOrder || c === null || c === w) return;
823
- const v = [...t.tabs], [y] = v.splice(c, 1);
824
- y && (v.splice(w, 0, y), a("reorder", v));
822
+ if (V(), t.fixedOrder || c === null || c === $) return;
823
+ const v = [...t.tabs], [g] = v.splice(c, 1);
824
+ g && (v.splice($, 0, g), a("reorder", v));
825
825
  }
826
826
  function V() {
827
- r.value = null, m.value = null;
827
+ r.value = null, d.value = null;
828
828
  }
829
829
  const j = p(
830
830
  () => n.value ? "flex h-full flex-col items-center gap-1 overflow-y-auto overflow-x-hidden" : "flex items-center gap-1 overflow-x-auto overflow-y-hidden"
831
831
  );
832
- return (w, c) => (i(), s("div", {
832
+ return ($, c) => (i(), s("div", {
833
833
  class: x(["flex min-h-0 min-w-0 items-center gap-1", q(n) ? "w-full flex-col" : "h-full"]),
834
834
  role: "tablist",
835
835
  "aria-orientation": q(n) ? "vertical" : "horizontal"
@@ -840,16 +840,16 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
840
840
  class: x(j.value),
841
841
  onWheel: D
842
842
  }, [
843
- (i(!0), s(Z, null, ne(e.tabs, (v, y) => (i(), s("div", {
843
+ (i(!0), s(Z, null, ne(e.tabs, (v, g) => (i(), s("div", {
844
844
  key: v.id,
845
845
  class: x(["transition-opacity", [
846
- r.value === y ? "opacity-40" : "",
847
- m.value === y && r.value !== y ? "ring-2 ring-secondary rounded-corner" : ""
846
+ r.value === g ? "opacity-40" : "",
847
+ d.value === g && r.value !== g ? "ring-2 ring-secondary rounded-corner" : ""
848
848
  ]]),
849
849
  draggable: !e.fixedOrder,
850
- onDragstart: (P) => L(y, P),
851
- onDragover: (P) => g(y, P),
852
- onDrop: M((P) => d(y), ["prevent"]),
850
+ onDragstart: (P) => L(g, P),
851
+ onDragover: (P) => y(g, P),
852
+ onDrop: M((P) => f(g), ["prevent"]),
853
853
  onDragend: V
854
854
  }, [
855
855
  O(Ge, {
@@ -857,14 +857,14 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
857
857
  active: v.id === e.modelValue,
858
858
  "close-label": e.closeLabel,
859
859
  "dirty-label": e.dirtyLabel,
860
- tabindex: y === u.value ? 0 : -1,
860
+ tabindex: g === u.value ? 0 : -1,
861
861
  onSelect: (P) => b(v.id),
862
862
  onClose: (P) => a("close", v.id),
863
863
  onMenu: (P) => a("menu", { id: v.id, ...P }),
864
- onNavegar: (P) => f(y, P),
865
- onMover: (P) => B(y, P)
864
+ onNavegar: (P) => m(g, P),
865
+ onMover: (P) => B(g, P)
866
866
  }, null, 8, ["tab", "active", "close-label", "dirty-label", "tabindex", "onSelect", "onClose", "onMenu", "onNavegar", "onMover"])
867
- ], 42, ya))), 128))
867
+ ], 42, ga))), 128))
868
868
  ], 34),
869
869
  e.newLabel ? (i(), s("button", {
870
870
  key: 0,
@@ -880,7 +880,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
880
880
  size: 14
881
881
  })
882
882
  ], 8, ha)) : h("", !0)
883
- ], 10, ga));
883
+ ], 10, ya));
884
884
  }
885
885
  }), ka = ["id", "aria-label", "type", "value", "placeholder", "disabled", "readonly", "required", "aria-describedby", "autocomplete", "aria-invalid"], Qe = /* @__PURE__ */ z({
886
886
  __name: "TextInput",
@@ -899,7 +899,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
899
899
  required: { type: Boolean, default: !1 },
900
900
  lazy: { type: Boolean, default: !1 }
901
901
  },
902
- emits: ["update:modelValue"],
902
+ emits: ["update:modelValue", "keyup", "keydown"],
903
903
  setup(e, { emit: l }) {
904
904
  const t = e, a = l;
905
905
  function n(r) {
@@ -915,7 +915,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
915
915
  t.mono ? "font-mono" : "",
916
916
  t.disabled ? "cursor-not-allowed opacity-60" : ""
917
917
  ]);
918
- return (r, m) => (i(), s("input", {
918
+ return (r, d) => (i(), s("input", {
919
919
  id: e.id,
920
920
  "aria-label": e.ariaLabel,
921
921
  type: e.type,
@@ -929,10 +929,12 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
929
929
  "aria-invalid": e.invalid || void 0,
930
930
  class: x(u.value),
931
931
  onInput: n,
932
- onChange: o
932
+ onChange: o,
933
+ onKeyup: d[0] || (d[0] = (b) => a("keyup", b)),
934
+ onKeydown: d[1] || (d[1] = (b) => a("keydown", b))
933
935
  }, null, 42, ka));
934
936
  }
935
- }), $a = { class: "pointer-events-none absolute left-2 flex items-center" }, wa = ["aria-label"], Le = /* @__PURE__ */ z({
937
+ }), wa = { class: "pointer-events-none absolute left-2 flex items-center" }, $a = ["aria-label"], Le = /* @__PURE__ */ z({
936
938
  __name: "SearchField",
937
939
  props: {
938
940
  modelValue: { default: "" },
@@ -949,9 +951,9 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
949
951
  },
950
952
  emits: ["update:modelValue", "search", "clear"],
951
953
  setup(e, { expose: l, emit: t }) {
952
- const a = e, n = t, o = $(null);
954
+ const a = e, n = t, o = w(null);
953
955
  let u;
954
- const r = p(() => a.modelValue.length > 0), m = p(
956
+ const r = p(() => a.modelValue.length > 0), d = p(
955
957
  () => a.listboxId ? {
956
958
  role: "combobox",
957
959
  "aria-autocomplete": "list",
@@ -960,33 +962,33 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
960
962
  "aria-activedescendant": a.activeOptionId || void 0
961
963
  } : {}
962
964
  ), b = p(() => a.clearable && r.value && !a.disabled);
963
- function f() {
965
+ function m() {
964
966
  clearTimeout(u), u = void 0;
965
967
  }
966
- function B(d) {
967
- n("update:modelValue", d), !(a.debounce <= 0) && (f(), u = setTimeout(() => n("search", d), a.debounce));
968
+ function B(f) {
969
+ n("update:modelValue", f), !(a.debounce <= 0) && (m(), u = setTimeout(() => n("search", f), a.debounce));
968
970
  }
969
971
  function D() {
970
- f(), n("search", a.modelValue);
972
+ m(), n("search", a.modelValue);
971
973
  }
972
974
  function L() {
973
- f(), n("update:modelValue", ""), n("clear"), g();
975
+ m(), n("update:modelValue", ""), n("clear"), y();
974
976
  }
975
- function g() {
977
+ function y() {
976
978
  o.value?.$el?.focus?.();
977
979
  }
978
- return l({ enfocar: g }), J(async () => {
979
- a.autofocus && (await Y(), g());
980
- }), ve(f), K(
980
+ return l({ enfocar: y }), J(async () => {
981
+ a.autofocus && (await Y(), y());
982
+ }), ve(m), K(
981
983
  () => a.disabled,
982
- (d) => {
983
- d && f();
984
+ (f) => {
985
+ f && m();
984
986
  }
985
- ), (d, V) => (i(), s("div", {
987
+ ), (f, V) => (i(), s("div", {
986
988
  class: "relative flex items-center",
987
989
  onKeydown: F(D, ["enter"])
988
990
  }, [
989
- E("span", $a, [
991
+ E("span", wa, [
990
992
  O(H, {
991
993
  name: e.busy ? "content-loading" : "system-search",
992
994
  type: "symbol",
@@ -1001,7 +1003,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
1001
1003
  "model-value": e.modelValue,
1002
1004
  placeholder: e.placeholder || e.label,
1003
1005
  ariaLabel: e.label || void 0
1004
- }, m.value, {
1006
+ }, d.value, {
1005
1007
  disabled: e.disabled,
1006
1008
  class: ["pl-7 [&::-webkit-search-cancel-button]:appearance-none", b.value ? "pr-8" : ""],
1007
1009
  "onUpdate:modelValue": B
@@ -1021,7 +1023,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
1021
1023
  size: 12,
1022
1024
  alt: ""
1023
1025
  })
1024
- ], 40, wa)) : h("", !0)
1026
+ ], 40, $a)) : h("", !0)
1025
1027
  ], 32));
1026
1028
  }
1027
1029
  }), Ca = ["title", "aria-label", "aria-expanded"], za = /* @__PURE__ */ z({
@@ -1036,10 +1038,10 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
1036
1038
  },
1037
1039
  emits: ["update:modelValue", "search", "open", "close"],
1038
1040
  setup(e, { emit: l }) {
1039
- const t = e, a = l, { vertical: n, posicion: o } = me(), u = $(!1), r = $(null), m = p(() => n.value || t.collapsed), b = p(() => !m.value || u.value), f = p(() => {
1040
- if (!m.value) return "";
1041
- const g = "absolute z-40 w-64 rounded-corner border border-ui-border bg-ui-surface/95 p-1 shadow-lg";
1042
- return o.value === "left" ? `${g} left-full top-0 ml-1` : o.value === "right" ? `${g} right-full top-0 mr-1` : o.value === "bottom" ? `${g} bottom-full right-0 mb-1` : `${g} top-full right-0 mt-1`;
1041
+ const t = e, a = l, { vertical: n, posicion: o } = me(), u = w(!1), r = w(null), d = p(() => n.value || t.collapsed), b = p(() => !d.value || u.value), m = p(() => {
1042
+ if (!d.value) return "";
1043
+ const y = "absolute z-40 w-64 rounded-corner border border-ui-border bg-ui-surface/95 p-1 shadow-lg";
1044
+ return o.value === "left" ? `${y} left-full top-0 ml-1` : o.value === "right" ? `${y} right-full top-0 mr-1` : o.value === "bottom" ? `${y} bottom-full right-0 mb-1` : `${y} top-full right-0 mt-1`;
1043
1045
  });
1044
1046
  async function B() {
1045
1047
  u.value = !0, a("open"), await Y(), r.value?.enfocar();
@@ -1047,24 +1049,24 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
1047
1049
  function D() {
1048
1050
  u.value && (u.value = !1, a("close"));
1049
1051
  }
1050
- function L(g) {
1051
- const d = g.relatedTarget;
1052
- d && g.currentTarget.contains(d) || D();
1052
+ function L(y) {
1053
+ const f = y.relatedTarget;
1054
+ f && y.currentTarget.contains(f) || D();
1053
1055
  }
1054
- return (g, d) => (i(), s("div", {
1056
+ return (y, f) => (i(), s("div", {
1055
1057
  class: "relative flex shrink-0 items-center",
1056
1058
  onFocusout: L
1057
1059
  }, [
1058
- m.value ? (i(), s("button", {
1060
+ d.value ? (i(), s("button", {
1059
1061
  key: 0,
1060
1062
  type: "button",
1061
1063
  class: "flex size-7 items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 hover:bg-ui-surface/70",
1062
1064
  title: e.label,
1063
1065
  "aria-label": e.label,
1064
1066
  "aria-expanded": u.value,
1065
- onMousedown: d[0] || (d[0] = M(() => {
1067
+ onMousedown: f[0] || (f[0] = M(() => {
1066
1068
  }, ["prevent"])),
1067
- onClick: d[1] || (d[1] = (V) => u.value ? D() : B())
1069
+ onClick: f[1] || (f[1] = (V) => u.value ? D() : B())
1068
1070
  }, [
1069
1071
  O(H, {
1070
1072
  name: "system-search",
@@ -1074,7 +1076,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
1074
1076
  ], 40, Ca)) : h("", !0),
1075
1077
  b.value ? (i(), s("div", {
1076
1078
  key: 1,
1077
- class: x(f.value),
1079
+ class: x(m.value),
1078
1080
  onKeydown: F(D, ["esc"])
1079
1081
  }, [
1080
1082
  O(Le, {
@@ -1085,9 +1087,9 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
1085
1087
  label: e.label,
1086
1088
  disabled: e.disabled,
1087
1089
  debounce: e.debounce,
1088
- class: x(m.value ? "" : "w-48"),
1089
- "onUpdate:modelValue": d[2] || (d[2] = (V) => a("update:modelValue", V)),
1090
- onSearch: d[3] || (d[3] = (V) => a("search", V))
1090
+ class: x(d.value ? "" : "w-48"),
1091
+ "onUpdate:modelValue": f[2] || (f[2] = (V) => a("update:modelValue", V)),
1092
+ onSearch: f[3] || (f[3] = (V) => a("search", V))
1091
1093
  }, null, 8, ["model-value", "placeholder", "label", "disabled", "debounce", "class"])
1092
1094
  ], 34)) : h("", !0)
1093
1095
  ], 32));
@@ -1125,7 +1127,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
1125
1127
  }, u = (r) => {
1126
1128
  t.stopPropagation && r.stopPropagation(), t.preventDefault && r.preventDefault(), !t.disabled && !t.loading && a("click");
1127
1129
  };
1128
- return (r, m) => (i(), s("button", {
1130
+ return (r, d) => (i(), s("button", {
1129
1131
  type: t.type,
1130
1132
  onClick: u,
1131
1133
  class: x(["rounded-corner transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2", [
@@ -1153,12 +1155,12 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
1153
1155
  }, null, 8, Ba)) : h("", !0)
1154
1156
  ], 10, Ea));
1155
1157
  }
1156
- }), ye = (e, l) => {
1158
+ }), ge = (e, l) => {
1157
1159
  const t = e.__vccOpts || e;
1158
1160
  for (const [a, n] of l)
1159
1161
  t[a] = n;
1160
1162
  return t;
1161
- }, Sa = /* @__PURE__ */ ye(Aa, [["__scopeId", "data-v-2eaf6e27"]]), Ye = {
1163
+ }, Sa = /* @__PURE__ */ ge(Aa, [["__scopeId", "data-v-2eaf6e27"]]), Ye = {
1162
1164
  info: "border-ui-border bg-ui-surface/70 text-tx-main",
1163
1165
  success: "border-status-success/40 bg-status-success/10 text-tx-main",
1164
1166
  warning: "border-status-warning/40 bg-status-warning/10 text-tx-main",
@@ -1310,7 +1312,7 @@ function Ga(e, l) {
1310
1312
  if (!t) return e;
1311
1313
  const a = [];
1312
1314
  for (let n = 0; n < e.length; n++) {
1313
- const o = e[n], u = ke(t, o.valor), r = ke(t, o.etiqueta), m = r === 10 ? 20 : r, f = ke(t, o.detalle) === 100 ? 100 : 40, B = Math.min(u, m, f);
1315
+ const o = e[n], u = ke(t, o.valor), r = ke(t, o.etiqueta), d = r === 10 ? 20 : r, m = ke(t, o.detalle) === 100 ? 100 : 40, B = Math.min(u, d, m);
1314
1316
  B !== 100 && a.push({ opcion: o, rango: B, orden: n });
1315
1317
  }
1316
1318
  return a.sort((n, o) => n.rango - o.rango || n.orden - o.orden), a.map((n) => n.opcion);
@@ -1346,21 +1348,21 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1346
1348
  },
1347
1349
  emits: ["update:modelValue"],
1348
1350
  setup(e, { emit: l }) {
1349
- const t = e, a = l, n = $(""), o = $(!1), u = $(0), r = $(null), m = $(null), b = $(null), f = Qa(), B = p(
1351
+ const t = e, a = l, n = w(""), o = w(!1), u = w(0), r = w(null), d = w(null), b = w(null), m = Qa(), B = p(
1350
1352
  () => t.options.find((T) => T.valor === t.modelValue) ?? null
1351
- ), D = p(() => Ga(t.options, n.value)), L = p(() => D.value.slice(0, t.limit)), g = p(() => Math.max(0, D.value.length - t.limit)), d = p(
1352
- () => L.value.length > 0 ? `${f}-${u.value}` : void 0
1353
+ ), D = p(() => Ga(t.options, n.value)), L = p(() => D.value.slice(0, t.limit)), y = p(() => Math.max(0, D.value.length - t.limit)), f = p(
1354
+ () => L.value.length > 0 ? `${m}-${u.value}` : void 0
1353
1355
  );
1354
1356
  function V(T) {
1355
- a("update:modelValue", T), w();
1357
+ a("update:modelValue", T), $();
1356
1358
  }
1357
1359
  async function j() {
1358
1360
  o.value = !0;
1359
1361
  const T = L.value.findIndex((C) => C.valor === t.modelValue);
1360
1362
  u.value = T >= 0 ? T : 0, await Y(), b.value?.enfocar(), U();
1361
1363
  }
1362
- function w(T = !0) {
1363
- o.value && (o.value = !1, n.value = "", T && Y(() => m.value?.focus()));
1364
+ function $(T = !0) {
1365
+ o.value && (o.value = !1, n.value = "", T && Y(() => d.value?.focus()));
1364
1366
  }
1365
1367
  function c(T) {
1366
1368
  const C = L.value.length;
@@ -1369,18 +1371,18 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1369
1371
  function v(T) {
1370
1372
  u.value = T, U();
1371
1373
  }
1372
- function y(T) {
1374
+ function g(T) {
1373
1375
  const C = T.target?.closest?.("[data-indice]");
1374
1376
  if (!C) return null;
1375
1377
  const I = Number(C.getAttribute("data-indice"));
1376
1378
  return Number.isInteger(I) ? I : null;
1377
1379
  }
1378
1380
  function P(T) {
1379
- const C = y(T), I = C === null ? void 0 : L.value[C];
1381
+ const C = g(T), I = C === null ? void 0 : L.value[C];
1380
1382
  I && V(I.valor);
1381
1383
  }
1382
1384
  function _(T) {
1383
- const C = y(T);
1385
+ const C = g(T);
1384
1386
  C !== null && (u.value = C);
1385
1387
  }
1386
1388
  function U() {
@@ -1395,14 +1397,14 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1395
1397
  K(
1396
1398
  () => t.disabled,
1397
1399
  (T) => {
1398
- T && w(!1);
1400
+ T && $(!1);
1399
1401
  }
1400
1402
  ), K(n, () => {
1401
1403
  u.value = 0, U();
1402
1404
  });
1403
1405
  function G(T) {
1404
1406
  const C = T.relatedTarget;
1405
- C && T.currentTarget.contains(C) || w(!1);
1407
+ C && T.currentTarget.contains(C) || $(!1);
1406
1408
  }
1407
1409
  return (T, C) => (i(), s("div", {
1408
1410
  class: "relative",
@@ -1410,14 +1412,14 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1410
1412
  }, [
1411
1413
  E("button", {
1412
1414
  ref_key: "boton",
1413
- ref: m,
1415
+ ref: d,
1414
1416
  type: "button",
1415
1417
  disabled: e.disabled,
1416
1418
  class: "flex w-full items-center justify-between gap-2 rounded-corner border border-ui-border-strong bg-ui-surface px-2 py-1 text-left text-sm text-tx-main transition-colors hover:bg-ui-bg/60 disabled:cursor-not-allowed disabled:opacity-50",
1417
1419
  "aria-label": e.label || void 0,
1418
1420
  "aria-expanded": o.value,
1419
1421
  "aria-haspopup": "listbox",
1420
- onClick: C[0] || (C[0] = (I) => o.value ? w() : j()),
1422
+ onClick: C[0] || (C[0] = (I) => o.value ? $() : j()),
1421
1423
  onKeydown: [
1422
1424
  C[1] || (C[1] = F(M((I) => o.value ? c(1) : j(), ["prevent"]), ["down"])),
1423
1425
  C[2] || (C[2] = F(M((I) => o.value ? c(-1) : j(), ["prevent"]), ["up"]))
@@ -1438,13 +1440,13 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1438
1440
  key: 0,
1439
1441
  class: x(["absolute z-20 w-full min-w-64 rounded-corner border border-ui-border-strong bg-ui-bg shadow-lg", e.up ? "bottom-full mb-1" : "mt-1"]),
1440
1442
  onKeydown: [
1441
- C[4] || (C[4] = F(M((I) => w(), ["prevent"]), ["escape"])),
1443
+ C[4] || (C[4] = F(M((I) => $(), ["prevent"]), ["escape"])),
1442
1444
  C[5] || (C[5] = F(M((I) => c(1), ["prevent"]), ["down"])),
1443
1445
  C[6] || (C[6] = F(M((I) => c(-1), ["prevent"]), ["up"])),
1444
1446
  C[7] || (C[7] = F(M((I) => v(0), ["prevent"]), ["home"])),
1445
1447
  C[8] || (C[8] = F(M((I) => v(L.value.length - 1), ["prevent"]), ["end"])),
1446
1448
  C[9] || (C[9] = F(M((I) => ee(), ["prevent"]), ["enter"])),
1447
- C[10] || (C[10] = F((I) => w(!1), ["tab"]))
1449
+ C[10] || (C[10] = F((I) => $(!1), ["tab"]))
1448
1450
  ],
1449
1451
  onClick: P,
1450
1452
  onMousemove: _
@@ -1457,13 +1459,13 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1457
1459
  "onUpdate:modelValue": C[3] || (C[3] = (I) => n.value = I),
1458
1460
  label: e.label,
1459
1461
  placeholder: e.searchPlaceholder,
1460
- "listbox-id": q(f),
1461
- "active-option-id": d.value,
1462
+ "listbox-id": q(m),
1463
+ "active-option-id": f.value,
1462
1464
  expanded: o.value
1463
1465
  }, null, 8, ["modelValue", "label", "placeholder", "listbox-id", "active-option-id", "expanded"])
1464
1466
  ]),
1465
1467
  E("ul", {
1466
- id: q(f),
1468
+ id: q(m),
1467
1469
  ref_key: "lista",
1468
1470
  ref: r,
1469
1471
  role: "listbox",
@@ -1471,7 +1473,7 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1471
1473
  }, [
1472
1474
  L.value.length === 0 ? (i(), s("li", el, S(e.emptyText), 1)) : h("", !0),
1473
1475
  (i(!0), s(Z, null, ne(L.value, (I, ie) => (i(), s("li", {
1474
- id: `${q(f)}-${ie}`,
1476
+ id: `${q(m)}-${ie}`,
1475
1477
  key: I.valor,
1476
1478
  "data-indice": ie,
1477
1479
  role: "option",
@@ -1484,7 +1486,7 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1484
1486
  E("span", al, S(I.etiqueta), 1),
1485
1487
  I.detalle ? (i(), s("span", ll, S(I.detalle), 1)) : h("", !0)
1486
1488
  ], 10, tl))), 128)),
1487
- g.value > 0 ? (i(), s("li", nl, "+" + S(g.value), 1)) : h("", !0)
1489
+ y.value > 0 ? (i(), s("li", nl, "+" + S(y.value), 1)) : h("", !0)
1488
1490
  ], 8, _a)
1489
1491
  ], 34)) : h("", !0)
1490
1492
  ], 32));
@@ -1504,7 +1506,7 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1504
1506
  A(l.$slots, "default", {}, void 0, !0)
1505
1507
  ], 2));
1506
1508
  }
1507
- }), rl = /* @__PURE__ */ ye(sl, [["__scopeId", "data-v-45bd4eab"]]), ul = { class: "flex items-center gap-3 flex-1 min-w-0" }, cl = ["src", "alt"], dl = { class: "min-w-0" }, fl = { class: "font-semibold truncate" }, ml = {
1509
+ }), rl = /* @__PURE__ */ ge(sl, [["__scopeId", "data-v-45bd4eab"]]), ul = { class: "flex items-center gap-3 flex-1 min-w-0" }, cl = ["src", "alt"], dl = { class: "min-w-0" }, fl = { class: "font-semibold truncate" }, ml = {
1508
1510
  key: 0,
1509
1511
  class: "text-xs text-gray-400 truncate"
1510
1512
  }, bl = {
@@ -1516,7 +1518,7 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1516
1518
  }, pl = {
1517
1519
  key: 1,
1518
1520
  class: "w-2 h-2 rounded-full bg-green-500"
1519
- }, gl = /* @__PURE__ */ z({
1521
+ }, yl = /* @__PURE__ */ z({
1520
1522
  __name: "DeviceCard",
1521
1523
  props: {
1522
1524
  icon: {},
@@ -1553,7 +1555,7 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1553
1555
  e.subtitle ? (i(), s("div", ml, S(e.subtitle), 1)) : h("", !0),
1554
1556
  e.metadata ? (i(), s("div", bl, S(e.metadata), 1)) : h("", !0),
1555
1557
  e.extraInfo && e.extraInfo.length > 0 ? (i(), s("div", vl, [
1556
- (i(!0), s(Z, null, ne(e.extraInfo, (r, m) => (i(), s("span", { key: m }, S(r), 1))), 128))
1558
+ (i(!0), s(Z, null, ne(e.extraInfo, (r, d) => (i(), s("span", { key: d }, S(r), 1))), 128))
1557
1559
  ])) : h("", !0)
1558
1560
  ])
1559
1561
  ]),
@@ -1569,19 +1571,19 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1569
1571
  function Ze() {
1570
1572
  const e = pe(Je, null);
1571
1573
  if (e) return e;
1572
- const l = $(!1);
1574
+ const l = w(!1);
1573
1575
  return {
1574
1576
  abierto: p(() => l.value),
1575
1577
  cerrar: () => {
1576
1578
  l.value = !1;
1577
1579
  },
1578
- idDelTitulo: $(null),
1580
+ idDelTitulo: w(null),
1579
1581
  ponerElTitulo: () => {
1580
1582
  }
1581
1583
  };
1582
1584
  }
1583
1585
  let je = 0;
1584
- function yl() {
1586
+ function gl() {
1585
1587
  return je += 1, `vsk-dialogo-titulo-${je}`;
1586
1588
  }
1587
1589
  const hl = /* @__PURE__ */ z({
@@ -1591,7 +1593,7 @@ const hl = /* @__PURE__ */ z({
1591
1593
  },
1592
1594
  emits: ["update:open"],
1593
1595
  setup(e, { emit: l }) {
1594
- const t = e, a = l, n = $(null);
1596
+ const t = e, a = l, n = w(null);
1595
1597
  return de(Je, {
1596
1598
  abierto: p(() => t.open),
1597
1599
  cerrar: () => a("update:open", !1),
@@ -1605,58 +1607,58 @@ const hl = /* @__PURE__ */ z({
1605
1607
  inheritAttrs: !1,
1606
1608
  __name: "DialogContent",
1607
1609
  setup(e) {
1608
- const l = we(), t = p(() => l.class ?? ""), a = p(() => {
1609
- const { class: d, ...V } = l;
1610
+ const l = $e(), t = p(() => l.class ?? ""), a = p(() => {
1611
+ const { class: f, ...V } = l;
1610
1612
  return V;
1611
- }), n = Ze(), o = p(() => n.abierto.value), u = $(null), r = $(null);
1612
- let m = null;
1613
+ }), n = Ze(), o = p(() => n.abierto.value), u = w(null), r = w(null);
1614
+ let d = null;
1613
1615
  function b() {
1614
1616
  return r.value ? [...r.value.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')] : [];
1615
1617
  }
1616
- function f(d) {
1617
- if (d.key === "Escape") {
1618
+ function m(f) {
1619
+ if (f.key === "Escape") {
1618
1620
  n.cerrar();
1619
1621
  return;
1620
1622
  }
1621
- if (d.key !== "Tab") return;
1623
+ if (f.key !== "Tab") return;
1622
1624
  const V = b();
1623
1625
  if (V.length === 0) {
1624
- d.preventDefault(), r.value?.focus();
1626
+ f.preventDefault(), r.value?.focus();
1625
1627
  return;
1626
1628
  }
1627
- const j = V[0], w = V[V.length - 1], c = document.activeElement;
1628
- d.shiftKey && (c === j || c === r.value) ? (d.preventDefault(), w.focus()) : !d.shiftKey && c === w && (d.preventDefault(), j.focus());
1629
+ const j = V[0], $ = V[V.length - 1], c = document.activeElement;
1630
+ f.shiftKey && (c === j || c === r.value) ? (f.preventDefault(), $.focus()) : !f.shiftKey && c === $ && (f.preventDefault(), j.focus());
1629
1631
  }
1630
- function B(d) {
1631
- d.target === d.currentTarget && n.cerrar();
1632
+ function B(f) {
1633
+ f.target === f.currentTarget && n.cerrar();
1632
1634
  }
1633
- function D(d) {
1634
- u.value?.contains(d.target) || f(d);
1635
+ function D(f) {
1636
+ u.value?.contains(f.target) || m(f);
1635
1637
  }
1636
1638
  function L() {
1637
1639
  document.removeEventListener("keydown", D);
1638
1640
  }
1639
- function g() {
1640
- const d = m;
1641
- m = null, d?.isConnected && d.focus();
1641
+ function y() {
1642
+ const f = d;
1643
+ d = null, f?.isConnected && f.focus();
1642
1644
  }
1643
1645
  return K(
1644
1646
  o,
1645
- async (d) => {
1646
- if (d) {
1647
- m = document.activeElement, document.addEventListener("keydown", D), await Y(), r.value?.focus();
1647
+ async (f) => {
1648
+ if (f) {
1649
+ d = document.activeElement, document.addEventListener("keydown", D), await Y(), r.value?.focus();
1648
1650
  return;
1649
1651
  }
1650
- L(), g();
1652
+ L(), y();
1651
1653
  },
1652
1654
  // `watch` no corre para el valor inicial, y un diálogo se puede montar ya
1653
1655
  // abierto —una vista que arranca preguntando algo—. Sin esto, ése no recibe
1654
1656
  // el foco y ni Escape ni el Tab hacen nada: el `aria-modal` queda en promesa.
1655
1657
  { immediate: !0 }
1656
1658
  ), ve(() => {
1657
- L(), g();
1658
- }), (d, V) => (i(), Q(fe, { to: "body" }, [
1659
- O(ge, {
1659
+ L(), y();
1660
+ }), (f, V) => (i(), Q(fe, { to: "body" }, [
1661
+ O(ye, {
1660
1662
  "enter-active-class": "transition-opacity duration-200 ease-out",
1661
1663
  "leave-active-class": "transition-opacity duration-150 ease-in",
1662
1664
  "enter-from-class": "opacity-0",
@@ -1669,7 +1671,7 @@ const hl = /* @__PURE__ */ z({
1669
1671
  ref: u,
1670
1672
  class: "fixed inset-0 z-50 flex items-center justify-center",
1671
1673
  onClick: B,
1672
- onKeydown: f
1674
+ onKeydown: m
1673
1675
  }, [
1674
1676
  V[0] || (V[0] = E("div", { class: "absolute inset-0 bg-ui-border-dark/40" }, null, -1)),
1675
1677
  E("div", oe({
@@ -1685,7 +1687,7 @@ const hl = /* @__PURE__ */ z({
1685
1687
  "relative z-10 w-full max-w-lg rounded-corner border border-ui-border bg-ui-bg/80 p-6 text-tx-main shadow-lg"
1686
1688
  ]
1687
1689
  }), [
1688
- A(d.$slots, "default")
1690
+ A(f.$slots, "default")
1689
1691
  ], 16, xl)
1690
1692
  ], 544)) : h("", !0)
1691
1693
  ]),
@@ -1693,10 +1695,10 @@ const hl = /* @__PURE__ */ z({
1693
1695
  })
1694
1696
  ]));
1695
1697
  }
1696
- }), $l = { class: "text-sm text-tx-muted" }, wl = /* @__PURE__ */ z({
1698
+ }), wl = { class: "text-sm text-tx-muted" }, $l = /* @__PURE__ */ z({
1697
1699
  __name: "DialogDescription",
1698
1700
  setup(e) {
1699
- return (l, t) => (i(), s("p", $l, [
1701
+ return (l, t) => (i(), s("p", wl, [
1700
1702
  A(l.$slots, "default")
1701
1703
  ]));
1702
1704
  }
@@ -1717,7 +1719,7 @@ const hl = /* @__PURE__ */ z({
1717
1719
  }), Ll = ["id"], Tl = /* @__PURE__ */ z({
1718
1720
  __name: "DialogTitle",
1719
1721
  setup(e) {
1720
- const l = Ze(), t = yl();
1722
+ const l = Ze(), t = gl();
1721
1723
  return J(() => l.ponerElTitulo(t)), ve(() => l.ponerElTitulo(null)), (a, n) => (i(), s("h2", {
1722
1724
  id: q(t),
1723
1725
  class: "font-semibold text-lg leading-none tracking-tight"
@@ -1729,17 +1731,17 @@ const hl = /* @__PURE__ */ z({
1729
1731
  function he() {
1730
1732
  const e = pe(_e, null);
1731
1733
  if (e) return e;
1732
- const l = $(!1);
1734
+ const l = w(!1);
1733
1735
  return {
1734
1736
  abierto: l,
1735
1737
  idDelMenu: "vsk-menu-suelto",
1736
- idDeLaEtiqueta: $(null),
1738
+ idDeLaEtiqueta: w(null),
1737
1739
  ponerLaEtiqueta: () => {
1738
1740
  },
1739
- disparador: $(null),
1741
+ disparador: w(null),
1740
1742
  ponerElDisparador: () => {
1741
1743
  },
1742
- focoAlAbrir: $("ninguno"),
1744
+ focoAlAbrir: w("ninguno"),
1743
1745
  abrir: () => {
1744
1746
  l.value = !0;
1745
1747
  },
@@ -1762,53 +1764,53 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
1762
1764
  },
1763
1765
  emits: ["update:open"],
1764
1766
  setup(e, { emit: l }) {
1765
- const t = e, a = l, n = $(!1), o = $(null), u = $(null), r = $("ninguno"), m = et();
1767
+ const t = e, a = l, n = w(!1), o = w(null), u = w(null), r = w("ninguno"), d = et();
1766
1768
  let b = null;
1767
- const f = p({
1769
+ const m = p({
1768
1770
  get: () => t.open ?? n.value,
1769
- set: (g) => {
1770
- t.open === void 0 && (n.value = g), a("update:open", g);
1771
+ set: (y) => {
1772
+ t.open === void 0 && (n.value = y), a("update:open", y);
1771
1773
  }
1772
1774
  });
1773
- K(f, (g) => {
1774
- if (g) {
1775
- const d = document.activeElement;
1776
- b = d instanceof HTMLElement ? d : null;
1775
+ K(m, (y) => {
1776
+ if (y) {
1777
+ const f = document.activeElement;
1778
+ b = f instanceof HTMLElement ? f : null;
1777
1779
  } else
1778
1780
  r.value = "ninguno";
1779
1781
  });
1780
- function B(g = "ninguno") {
1781
- r.value = g, f.value = !0;
1782
+ function B(y = "ninguno") {
1783
+ r.value = y, m.value = !0;
1782
1784
  }
1783
- function D(g = {}) {
1784
- if (f.value = !1, !g.devolverElFoco) return;
1785
- const d = b ?? o.value;
1786
- d?.isConnected && d.focus();
1785
+ function D(y = {}) {
1786
+ if (m.value = !1, !y.devolverElFoco) return;
1787
+ const f = b ?? o.value;
1788
+ f?.isConnected && f.focus();
1787
1789
  }
1788
- function L(g = "ninguno") {
1789
- if (f.value) {
1790
+ function L(y = "ninguno") {
1791
+ if (m.value) {
1790
1792
  D({ devolverElFoco: !0 });
1791
1793
  return;
1792
1794
  }
1793
- B(g);
1795
+ B(y);
1794
1796
  }
1795
1797
  return de(_e, {
1796
- abierto: f,
1797
- idDelMenu: m,
1798
+ abierto: m,
1799
+ idDelMenu: d,
1798
1800
  idDeLaEtiqueta: u,
1799
- ponerLaEtiqueta: (g) => {
1800
- u.value = g;
1801
+ ponerLaEtiqueta: (y) => {
1802
+ u.value = y;
1801
1803
  },
1802
1804
  disparador: o,
1803
- ponerElDisparador: (g) => {
1804
- o.value = g;
1805
+ ponerElDisparador: (y) => {
1806
+ o.value = y;
1805
1807
  },
1806
1808
  focoAlAbrir: r,
1807
1809
  abrir: B,
1808
1810
  cerrar: D,
1809
1811
  alternar: L
1810
- }), (g, d) => (i(), s("div", Bl, [
1811
- A(g.$slots, "default")
1812
+ }), (y, f) => (i(), s("div", Bl, [
1813
+ A(y.$slots, "default")
1812
1814
  ]));
1813
1815
  }
1814
1816
  }), Sl = ["id", "aria-labelledby", "inert"], Vl = {
@@ -1823,7 +1825,7 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
1823
1825
  sideOffset: { default: 4 }
1824
1826
  },
1825
1827
  setup(e) {
1826
- const l = e, t = he(), { idDelMenu: a, idDeLaEtiqueta: n } = t, o = p(() => t.disparador.value), u = p(() => t.abierto.value), r = $(null), m = $({
1828
+ const l = e, t = he(), { idDelMenu: a, idDeLaEtiqueta: n } = t, o = p(() => t.disparador.value), u = p(() => t.abierto.value), r = w(null), d = w({
1827
1829
  top: 0,
1828
1830
  left: 0,
1829
1831
  techo: null
@@ -1833,28 +1835,28 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
1833
1835
  left: "right",
1834
1836
  right: "left"
1835
1837
  };
1836
- function f(c, v) {
1837
- const y = l.sideOffset + X;
1838
+ function m(c, v) {
1839
+ const g = l.sideOffset + X;
1838
1840
  switch (c) {
1839
1841
  case "bottom":
1840
- return window.innerHeight - v.bottom - y;
1842
+ return window.innerHeight - v.bottom - g;
1841
1843
  case "top":
1842
- return v.top - y;
1844
+ return v.top - g;
1843
1845
  case "right":
1844
- return window.innerWidth - v.right - y;
1846
+ return window.innerWidth - v.right - g;
1845
1847
  case "left":
1846
- return v.left - y;
1848
+ return v.left - g;
1847
1849
  }
1848
1850
  }
1849
- function B(c, v, y) {
1850
- return y < v ? v : Math.min(Math.max(c, v), y);
1851
+ function B(c, v, g) {
1852
+ return g < v ? v : Math.min(Math.max(c, v), g);
1851
1853
  }
1852
1854
  function D() {
1853
1855
  if (!o.value || !r.value) return;
1854
- const c = o.value.getBoundingClientRect(), v = r.value.scrollHeight, y = r.value.offsetWidth, P = l.side === "top" || l.side === "bottom", _ = P ? v : y;
1856
+ const c = o.value.getBoundingClientRect(), v = r.value.scrollHeight, g = r.value.offsetWidth, P = l.side === "top" || l.side === "bottom", _ = P ? v : g;
1855
1857
  let U = l.side;
1856
- const ee = f(U, c);
1857
- ee < _ && f(b[U], c) > ee && (U = b[U]);
1858
+ const ee = m(U, c);
1859
+ ee < _ && m(b[U], c) > ee && (U = b[U]);
1858
1860
  let G = 0, T = 0, C = null;
1859
1861
  switch (U) {
1860
1862
  case "bottom": {
@@ -1862,12 +1864,12 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
1862
1864
  break;
1863
1865
  }
1864
1866
  case "top": {
1865
- C = Math.max(f("top", c), 0), G = c.top - l.sideOffset - Math.min(v, C);
1867
+ C = Math.max(m("top", c), 0), G = c.top - l.sideOffset - Math.min(v, C);
1866
1868
  break;
1867
1869
  }
1868
1870
  case "left":
1869
1871
  case "right": {
1870
- T = U === "right" ? c.right + l.sideOffset : c.left - y - l.sideOffset;
1872
+ T = U === "right" ? c.right + l.sideOffset : c.left - g - l.sideOffset;
1871
1873
  const I = window.innerHeight - 2 * X;
1872
1874
  G = B(c.top, X, window.innerHeight - Math.min(v, I) - X), C = Math.max(window.innerHeight - G - X, 0);
1873
1875
  break;
@@ -1879,41 +1881,41 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
1879
1881
  T = c.left;
1880
1882
  break;
1881
1883
  case "center":
1882
- T = c.left + c.width / 2 - y / 2;
1884
+ T = c.left + c.width / 2 - g / 2;
1883
1885
  break;
1884
1886
  case "end":
1885
- T = c.right - y;
1887
+ T = c.right - g;
1886
1888
  break;
1887
1889
  }
1888
- T = B(T, X, window.innerWidth - y - X), m.value = { top: G, left: T, techo: C };
1890
+ T = B(T, X, window.innerWidth - g - X), d.value = { top: G, left: T, techo: C };
1889
1891
  }
1890
1892
  function L() {
1891
1893
  return r.value ? Array.from(r.value.querySelectorAll('[role="menuitem"]')) : [];
1892
1894
  }
1893
- function g(c) {
1895
+ function y(c) {
1894
1896
  const v = L();
1895
1897
  if (!v.length) return;
1896
- const y = v.length;
1897
- v[(c % y + y) % y]?.focus();
1898
+ const g = v.length;
1899
+ v[(c % g + g) % g]?.focus();
1898
1900
  }
1899
- function d() {
1901
+ function f() {
1900
1902
  const c = document.activeElement;
1901
1903
  return c instanceof HTMLElement ? L().indexOf(c) : -1;
1902
1904
  }
1903
1905
  function V(c) {
1904
- const v = d();
1906
+ const v = f();
1905
1907
  switch (c.key) {
1906
1908
  case "ArrowDown":
1907
- c.preventDefault(), g(v + 1);
1909
+ c.preventDefault(), y(v + 1);
1908
1910
  break;
1909
1911
  case "ArrowUp":
1910
- c.preventDefault(), g(v <= 0 ? -1 : v - 1);
1912
+ c.preventDefault(), y(v <= 0 ? -1 : v - 1);
1911
1913
  break;
1912
1914
  case "Home":
1913
- c.preventDefault(), g(0);
1915
+ c.preventDefault(), y(0);
1914
1916
  break;
1915
1917
  case "End":
1916
- c.preventDefault(), g(-1);
1918
+ c.preventDefault(), y(-1);
1917
1919
  break;
1918
1920
  case "Escape":
1919
1921
  c.preventDefault(), c.stopPropagation(), t.cerrar({ devolverElFoco: !0 });
@@ -1929,10 +1931,10 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
1929
1931
  D();
1930
1932
  }), t.focoAlAbrir.value) {
1931
1933
  case "primero":
1932
- g(0);
1934
+ y(0);
1933
1935
  break;
1934
1936
  case "ultimo":
1935
- g(-1);
1937
+ y(-1);
1936
1938
  break;
1937
1939
  // Abierto con el ratón: el foco va al menú y no a un ítem —no hay
1938
1940
  // ninguno elegido todavía—, que es lo que deja andar las flechas y el
@@ -1944,22 +1946,22 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
1944
1946
  function j(c) {
1945
1947
  u.value && (c && r.value?.contains(c.target) || D());
1946
1948
  }
1947
- function w(c) {
1948
- const v = c.target, y = !!v.closest("[data-dropdown-content]"), P = !!o.value?.contains(v);
1949
- !y && !P && t.cerrar();
1949
+ function $(c) {
1950
+ const v = c.target, g = !!v.closest("[data-dropdown-content]"), P = !!o.value?.contains(v);
1951
+ !g && !P && t.cerrar();
1950
1952
  }
1951
1953
  return J(() => {
1952
- document.addEventListener("click", w), window.addEventListener("resize", j), window.addEventListener("scroll", j, !0);
1954
+ document.addEventListener("click", $), window.addEventListener("resize", j), window.addEventListener("scroll", j, !0);
1953
1955
  }), ce(() => {
1954
- document.removeEventListener("click", w), window.removeEventListener("resize", j), window.removeEventListener("scroll", j, !0);
1956
+ document.removeEventListener("click", $), window.removeEventListener("resize", j), window.removeEventListener("scroll", j, !0);
1955
1957
  }), (c, v) => (i(), Q(fe, { to: "body" }, [
1956
- O(ge, {
1958
+ O(ye, {
1957
1959
  "enter-active-class": "transition-all duration-150 ease-in-out",
1958
1960
  "leave-active-class": "transition-all duration-150 ease-in-out",
1959
1961
  "enter-from-class": "opacity-0 scale-95",
1960
1962
  "leave-to-class": "opacity-0 scale-95",
1961
- onEnter: v[1] || (v[1] = (y) => y.offsetHeight),
1962
- onLeave: v[2] || (v[2] = (y) => y.offsetHeight)
1963
+ onEnter: v[1] || (v[1] = (g) => g.offsetHeight),
1964
+ onLeave: v[2] || (v[2] = (g) => g.offsetHeight)
1963
1965
  }, {
1964
1966
  default: W(() => [
1965
1967
  Ce(E("div", oe({
@@ -1974,16 +1976,16 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
1974
1976
  inert: !u.value,
1975
1977
  style: {
1976
1978
  position: "fixed",
1977
- top: `${m.value.top}px`,
1978
- left: `${m.value.left}px`,
1979
- maxHeight: m.value.techo === null ? void 0 : `${m.value.techo}px`,
1979
+ top: `${d.value.top}px`,
1980
+ left: `${d.value.left}px`,
1981
+ maxHeight: d.value.techo === null ? void 0 : `${d.value.techo}px`,
1980
1982
  overflowY: "auto",
1981
1983
  overscrollBehavior: "contain",
1982
1984
  zIndex: 50
1983
1985
  },
1984
1986
  "data-dropdown-content": "",
1985
1987
  class: "min-w-30 rounded-corner border border-primary bg-ui-bg/80 shadow-lg focus:outline-none",
1986
- onClick: v[0] || (v[0] = (y) => y.stopPropagation()),
1988
+ onClick: v[0] || (v[0] = (g) => g.stopPropagation()),
1987
1989
  onKeydown: V
1988
1990
  }), [
1989
1991
  E("div", Vl, [
@@ -2077,35 +2079,35 @@ const Rl = z({
2077
2079
  disabled: { type: Boolean, default: !1 }
2078
2080
  },
2079
2081
  setup(e, { slots: l, attrs: t }) {
2080
- const a = he(), n = $(null);
2082
+ const a = he(), n = w(null);
2081
2083
  function o() {
2082
2084
  a.ponerElDisparador(ql(n.value));
2083
2085
  }
2084
2086
  function u() {
2085
2087
  e.disabled || (o(), a.alternar());
2086
2088
  }
2087
- function r(m) {
2089
+ function r(d) {
2088
2090
  if (!e.disabled)
2089
- switch (m.key) {
2091
+ switch (d.key) {
2090
2092
  case "Enter":
2091
2093
  case " ":
2092
- m.preventDefault(), o(), a.alternar("primero");
2094
+ d.preventDefault(), o(), a.alternar("primero");
2093
2095
  break;
2094
2096
  case "ArrowDown":
2095
- m.preventDefault(), o(), a.abrir("primero");
2097
+ d.preventDefault(), o(), a.abrir("primero");
2096
2098
  break;
2097
2099
  case "ArrowUp":
2098
- m.preventDefault(), o(), a.abrir("ultimo");
2100
+ d.preventDefault(), o(), a.abrir("ultimo");
2099
2101
  break;
2100
2102
  case "Escape":
2101
- a.abierto.value && (m.preventDefault(), a.cerrar({ devolverElFoco: !0 }));
2103
+ a.abierto.value && (d.preventDefault(), a.cerrar({ devolverElFoco: !0 }));
2102
2104
  break;
2103
2105
  }
2104
2106
  }
2105
2107
  return () => {
2106
- const m = {
2107
- ref: (f) => {
2108
- n.value = f, o();
2108
+ const d = {
2109
+ ref: (m) => {
2110
+ n.value = m, o();
2109
2111
  },
2110
2112
  "aria-haspopup": "menu",
2111
2113
  "aria-expanded": a.abierto.value ? "true" : "false",
@@ -2117,12 +2119,12 @@ const Rl = z({
2117
2119
  onKeydown: r
2118
2120
  }, b = l.default?.() ?? [];
2119
2121
  if (e.asChild) {
2120
- const f = tt(b);
2121
- if (f) return dt(f, { ...t, ...m });
2122
+ const m = tt(b);
2123
+ if (m) return dt(m, { ...t, ...d });
2122
2124
  }
2123
2125
  return ft(
2124
2126
  "div",
2125
- { ...t, class: ["dropdown-menu-trigger inline-block", t.class], ...m },
2127
+ { ...t, class: ["dropdown-menu-trigger inline-block", t.class], ...d },
2126
2128
  b
2127
2129
  );
2128
2130
  };
@@ -2147,7 +2149,7 @@ const Rl = z({
2147
2149
  A(l.$slots, "default", {}, void 0, !0)
2148
2150
  ], 2));
2149
2151
  }
2150
- }), Ul = /* @__PURE__ */ ye(Hl, [["__scopeId", "data-v-c0d9d9cb"]]), Wl = /* @__PURE__ */ z({
2152
+ }), Ul = /* @__PURE__ */ ge(Hl, [["__scopeId", "data-v-c0d9d9cb"]]), Wl = /* @__PURE__ */ z({
2151
2153
  __name: "ListCard",
2152
2154
  props: {
2153
2155
  clickable: { type: Boolean, default: !1 },
@@ -2171,7 +2173,7 @@ const Rl = z({
2171
2173
  A(o.$slots, "default", {}, void 0, !0)
2172
2174
  ], 2));
2173
2175
  }
2174
- }), Kl = /* @__PURE__ */ ye(Wl, [["__scopeId", "data-v-f86d47da"]]), Gl = { class: "background rounded-corner flex flex-row items-center gap-2 justify-between w-full h-auto p-4 transition-all duration-200 hover:bg-ui-surface/80 dark:hover:bg-ui-surface-dark/80" }, Ql = ["title", "aria-label"], Yl = ["src"], Xl = {
2176
+ }), Kl = /* @__PURE__ */ ge(Wl, [["__scopeId", "data-v-f86d47da"]]), Gl = { class: "background rounded-corner flex flex-row items-center gap-2 justify-between w-full h-auto p-4 transition-all duration-200 hover:bg-ui-surface/80 dark:hover:bg-ui-surface-dark/80" }, Ql = ["title", "aria-label"], Yl = ["src"], Xl = {
2175
2177
  key: 1,
2176
2178
  class: "w-8 h-8 flex items-center justify-center"
2177
2179
  }, Jl = ["src"], Zl = ["min", "max", "value", "aria-label", "aria-valuetext"], _l = /* @__PURE__ */ z({
@@ -2191,15 +2193,15 @@ const Rl = z({
2191
2193
  setup(e, { emit: l }) {
2192
2194
  const t = e, a = l, n = p(() => {
2193
2195
  if (t.max <= t.min) return 0;
2194
- const m = t.max - t.min, b = t.modelValue - t.min;
2195
- return Math.round(b / m * 100);
2196
- }), o = p(() => t.getPercentageClass ? t.getPercentageClass(n.value) : ""), u = (m) => {
2197
- const b = m.target;
2196
+ const d = t.max - t.min, b = t.modelValue - t.min;
2197
+ return Math.round(b / d * 100);
2198
+ }), o = p(() => t.getPercentageClass ? t.getPercentageClass(n.value) : ""), u = (d) => {
2199
+ const b = d.target;
2198
2200
  a("update:modelValue", Number(b.value));
2199
2201
  }, r = () => {
2200
2202
  a("buttonClick");
2201
2203
  };
2202
- return (m, b) => (i(), s("div", Gl, [
2204
+ return (d, b) => (i(), s("div", Gl, [
2203
2205
  e.showButton ? (i(), s("button", {
2204
2206
  key: 0,
2205
2207
  onClick: r,
@@ -2383,10 +2385,10 @@ const Rl = z({
2383
2385
  function lt() {
2384
2386
  const e = pe(at, null);
2385
2387
  if (e) return e;
2386
- const l = $(!1);
2388
+ const l = w(!1);
2387
2389
  return {
2388
2390
  abierto: p(() => l.value),
2389
- disparador: $(null),
2391
+ disparador: w(null),
2390
2392
  ponerElDisparador: () => {
2391
2393
  },
2392
2394
  abrir: () => {
@@ -2404,7 +2406,7 @@ const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
2404
2406
  delayDuration: { default: 200 }
2405
2407
  },
2406
2408
  setup(e) {
2407
- const l = e, t = $(!1), a = $(null);
2409
+ const l = e, t = w(!1), a = w(null);
2408
2410
  let n = null;
2409
2411
  function o() {
2410
2412
  l.disabled || (n = setTimeout(() => {
@@ -2422,7 +2424,7 @@ const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
2422
2424
  },
2423
2425
  abrir: o,
2424
2426
  cerrar: u
2425
- }), (r, m) => (i(), s("div", dn, [
2427
+ }), (r, d) => (i(), s("div", dn, [
2426
2428
  A(r.$slots, "default")
2427
2429
  ]));
2428
2430
  }
@@ -2435,32 +2437,32 @@ const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
2435
2437
  sideOffset: { default: 4 }
2436
2438
  },
2437
2439
  setup(e) {
2438
- const l = we(), t = p(() => l.class ?? ""), a = e, n = lt(), o = p(() => n.abierto.value), u = $(null), r = $({ top: 0, left: 0 });
2439
- function m() {
2440
+ const l = $e(), t = p(() => l.class ?? ""), a = e, n = lt(), o = p(() => n.abierto.value), u = w(null), r = w({ top: 0, left: 0 });
2441
+ function d() {
2440
2442
  const b = n.disparador.value;
2441
2443
  if (!b || !u.value) return;
2442
- const f = b.getBoundingClientRect(), B = u.value.getBoundingClientRect();
2444
+ const m = b.getBoundingClientRect(), B = u.value.getBoundingClientRect();
2443
2445
  let D = 0, L = 0;
2444
2446
  switch (a.side) {
2445
2447
  case "bottom":
2446
- D = f.bottom + a.sideOffset, L = f.left + f.width / 2 - B.width / 2;
2448
+ D = m.bottom + a.sideOffset, L = m.left + m.width / 2 - B.width / 2;
2447
2449
  break;
2448
2450
  case "top":
2449
- D = f.top - B.height - a.sideOffset, L = f.left + f.width / 2 - B.width / 2;
2451
+ D = m.top - B.height - a.sideOffset, L = m.left + m.width / 2 - B.width / 2;
2450
2452
  break;
2451
2453
  case "left":
2452
- L = f.left - B.width - a.sideOffset, D = f.top + f.height / 2 - B.height / 2;
2454
+ L = m.left - B.width - a.sideOffset, D = m.top + m.height / 2 - B.height / 2;
2453
2455
  break;
2454
2456
  case "right":
2455
- L = f.right + a.sideOffset, D = f.top + f.height / 2 - B.height / 2;
2457
+ L = m.right + a.sideOffset, D = m.top + m.height / 2 - B.height / 2;
2456
2458
  break;
2457
2459
  }
2458
2460
  r.value = { top: D, left: L };
2459
2461
  }
2460
2462
  return K(o, async (b) => {
2461
- b && (await Y(), requestAnimationFrame(m));
2462
- }), (b, f) => (i(), Q(fe, { to: "body" }, [
2463
- O(ge, {
2463
+ b && (await Y(), requestAnimationFrame(d));
2464
+ }), (b, m) => (i(), Q(fe, { to: "body" }, [
2465
+ O(ye, {
2464
2466
  "enter-active-class": "transition-all duration-200 ease-in-out",
2465
2467
  "leave-active-class": "transition-all duration-200 ease-in-out",
2466
2468
  "enter-from-class": "opacity-0 scale-95",
@@ -2488,7 +2490,7 @@ const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
2488
2490
  }), bn = /* @__PURE__ */ z({
2489
2491
  __name: "TooltipTrigger",
2490
2492
  setup(e) {
2491
- const l = lt(), t = $(null);
2493
+ const l = lt(), t = w(null);
2492
2494
  function a() {
2493
2495
  return t.value ? t.value.firstElementChild ?? t.value : null;
2494
2496
  }
@@ -2509,10 +2511,10 @@ const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
2509
2511
  A(o.$slots, "default")
2510
2512
  ], 544));
2511
2513
  }
2512
- }), vn = ["title"], pn = ["src", "alt"], gn = {
2514
+ }), vn = ["title"], pn = ["src", "alt"], yn = {
2513
2515
  key: 0,
2514
2516
  class: "absolute bottom-1 right-1 bg-primary dark:bg-primary-dark text-white text-xs rounded-full w-4 h-4 flex items-center justify-center font-bold animate-bounce"
2515
- }, yn = /* @__PURE__ */ z({
2517
+ }, gn = /* @__PURE__ */ z({
2516
2518
  __name: "TrayIconButton",
2517
2519
  props: {
2518
2520
  icon: {},
@@ -2527,7 +2529,7 @@ const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
2527
2529
  },
2528
2530
  emits: ["click"],
2529
2531
  setup(e, { emit: l }) {
2530
- const t = l, a = $(!1), n = () => {
2532
+ const t = l, a = w(!1), n = () => {
2531
2533
  t("click");
2532
2534
  };
2533
2535
  return (o, u) => (i(), s("div", {
@@ -2542,7 +2544,7 @@ const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
2542
2544
  alt: e.alt,
2543
2545
  class: x(["m-auto h-5.5 w-auto transition-all duration-300", e.iconClass])
2544
2546
  }, null, 10, pn),
2545
- e.badge !== null && e.badge > 0 ? (i(), s("div", gn, S(e.badge), 1)) : h("", !0),
2547
+ e.badge !== null && e.badge > 0 ? (i(), s("div", yn, S(e.badge), 1)) : h("", !0),
2546
2548
  e.showCustomTooltip && e.customTooltipText ? (i(), s("div", {
2547
2549
  key: 1,
2548
2550
  class: x(["absolute top-1 left-1/2 transform -translate-x-1/2 text-xs font-semibold p-1 rounded-corner transition-all duration-300 pointer-events-none background", [
@@ -2577,10 +2579,10 @@ const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
2577
2579
  Qe,
2578
2580
  Na,
2579
2581
  rl,
2580
- gl,
2582
+ yl,
2581
2583
  hl,
2582
2584
  kl,
2583
- wl,
2585
+ $l,
2584
2586
  zl,
2585
2587
  Dl,
2586
2588
  Tl,
@@ -2600,7 +2602,7 @@ const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
2600
2602
  fn,
2601
2603
  mn,
2602
2604
  bn,
2603
- yn
2605
+ gn
2604
2606
  ], En = {
2605
2607
  install(e) {
2606
2608
  hn.forEach((l) => {
@@ -2619,10 +2621,10 @@ export {
2619
2621
  at as CLAVE_DEL_TOOLTIP,
2620
2622
  Ee as CLAVE_DE_LA_BARRA,
2621
2623
  rl as ConfigSection,
2622
- gl as DeviceCard,
2624
+ yl as DeviceCard,
2623
2625
  hl as Dialog,
2624
2626
  kl as DialogContent,
2625
- wl as DialogDescription,
2627
+ $l as DialogDescription,
2626
2628
  zl as DialogFooter,
2627
2629
  Dl as DialogHeader,
2628
2630
  Tl as DialogTitle,
@@ -2657,14 +2659,14 @@ export {
2657
2659
  fn as Tooltip,
2658
2660
  mn as TooltipContent,
2659
2661
  bn as TooltipTrigger,
2660
- yn as TrayIconButton,
2662
+ gn as TrayIconButton,
2661
2663
  We as WindowControls,
2662
2664
  ra as WindowFrame,
2663
2665
  Ga as buscarOpciones,
2664
2666
  En as default,
2665
2667
  Jt as esPosicion,
2666
2668
  zn as olvidarLosIconosDelTema,
2667
- $e as orientacionDe,
2669
+ we as orientacionDe,
2668
2670
  ea as posicionDe,
2669
2671
  Xe as rolDelTono,
2670
2672
  Ze as usarElDialogo,