@leodamours/ds-components 0.2.11 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
- import { defineComponent as S, ref as j, watch as we, computed as C, openBlock as g, createElementBlock as v, normalizeClass as T, toDisplayString as E, createCommentVNode as D, renderSlot as N, createTextVNode as X, createBlock as I, resolveDynamicComponent as $e, normalizeStyle as he, createElementVNode as F, shallowRef as Ct, getCurrentScope as Ft, onScopeDispose as $t, shallowReadonly as be, unref as R, mergeProps as de, createVNode as _, withCtx as Re, Teleport as Le, withModifiers as Dt, Fragment as se, renderList as re, nextTick as je, withKeys as st, onBeforeUnmount as rt, Transition as at, onMounted as Et, TransitionGroup as At } from "vue";
2
- const Bt = ["aria-label"], Tt = ["src", "alt"], ss = /* @__PURE__ */ S({
1
+ import { defineComponent as z, ref as j, watch as he, computed as w, openBlock as g, createElementBlock as h, normalizeClass as R, toDisplayString as L, createCommentVNode as V, renderSlot as P, createTextVNode as K, createBlock as N, resolveDynamicComponent as Te, normalizeStyle as le, createElementVNode as k, shallowRef as Tt, getCurrentScope as Vt, onScopeDispose as Rt, shallowReadonly as me, unref as B, mergeProps as fe, createVNode as ee, withCtx as Ae, Teleport as Oe, withModifiers as Lt, Fragment as re, renderList as ae, nextTick as ke, onMounted as ot, withKeys as rt, onBeforeUnmount as at, Transition as lt, TransitionGroup as St } from "vue";
2
+ import { a as Mo, c as jo, e as Po, g as Io, b as Fo, d as No, h as Wo, f as Ho, r as qo, s as Ko, i as Uo, t as Xo } from "./palette-DkSoRw54.js";
3
+ const Bt = ["aria-label"], At = ["src", "alt"], ho = /* @__PURE__ */ z({
3
4
  __name: "DsAvatar",
4
5
  props: {
5
6
  src: {},
@@ -9,11 +10,11 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ss = /* @__PURE__ */ S({
9
10
  variant: { default: "brand" }
10
11
  },
11
12
  setup(e) {
12
- const t = e, n = j(!1);
13
- we(() => t.src, () => {
14
- n.value = !1;
13
+ const n = e, t = j(!1);
14
+ he(() => n.src, () => {
15
+ t.value = !1;
15
16
  });
16
- const o = C(() => t.name ? t.name.split(" ").map((a) => a[0]).slice(0, 2).join("").toUpperCase() : "?"), s = C(() => [
17
+ const s = w(() => n.name ? n.name.split(" ").map((a) => a[0]).slice(0, 2).join("").toUpperCase() : "?"), o = w(() => [
17
18
  "inline-flex",
18
19
  "items-center",
19
20
  "justify-center",
@@ -25,8 +26,8 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ss = /* @__PURE__ */ S({
25
26
  md: "w-8 h-8 text-sm",
26
27
  lg: "w-10 h-10 text-base",
27
28
  xl: "w-12 h-12 text-lg"
28
- }[t.size]
29
- ].join(" ")), r = C(() => [
29
+ }[n.size]
30
+ ].join(" ")), r = w(() => [
30
31
  "w-full",
31
32
  "h-full",
32
33
  "flex",
@@ -37,27 +38,27 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ss = /* @__PURE__ */ S({
37
38
  {
38
39
  brand: "bg-brand-soft text-brand-on-soft",
39
40
  neutral: "bg-neutral-soft text-neutral-on-soft"
40
- }[t.variant]
41
+ }[n.variant]
41
42
  ].join(" "));
42
- return (a, d) => (g(), v("span", {
43
- class: T(s.value),
43
+ return (a, i) => (g(), h("span", {
44
+ class: R(o.value),
44
45
  role: "img",
45
46
  "aria-label": e.alt || e.name
46
47
  }, [
47
- e.src && !n.value ? (g(), v("img", {
48
+ e.src && !t.value ? (g(), h("img", {
48
49
  key: 0,
49
50
  src: e.src,
50
51
  alt: e.alt || e.name || "",
51
52
  class: "w-full h-full object-cover rounded-full",
52
- onError: d[0] || (d[0] = (i) => n.value = !0)
53
- }, null, 40, Tt)) : (g(), v("span", {
53
+ onError: i[0] || (i[0] = (c) => t.value = !0)
54
+ }, null, 40, At)) : (g(), h("span", {
54
55
  key: 1,
55
- class: T(r.value),
56
+ class: R(r.value),
56
57
  "aria-hidden": "true"
57
- }, E(o.value), 3))
58
+ }, L(s.value), 3))
58
59
  ], 10, Bt));
59
60
  }
60
- }), rs = /* @__PURE__ */ S({
61
+ }), vo = /* @__PURE__ */ z({
61
62
  __name: "DsBadge",
62
63
  props: {
63
64
  label: {},
@@ -66,14 +67,14 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ss = /* @__PURE__ */ S({
66
67
  dot: { type: Boolean, default: !1 }
67
68
  },
68
69
  setup(e) {
69
- const t = e, n = C(() => {
70
- const s = [
70
+ const n = e, t = w(() => {
71
+ const o = [
71
72
  "inline-flex",
72
73
  "items-center",
73
74
  "font-medium",
74
75
  "rounded-full",
75
76
  "whitespace-nowrap"
76
- ], r = t.dot ? { sm: "px-1.5 py-0.5", md: "px-2 py-0.5", lg: "px-2.5 py-1" } : { sm: "px-1.5 py-0.5 text-xs", md: "px-2 py-0.5 text-xs", lg: "px-2.5 py-1 text-sm" }, a = {
77
+ ], r = n.dot ? { sm: "px-1.5 py-0.5", md: "px-2 py-0.5", lg: "px-2.5 py-1" } : { sm: "px-1.5 py-0.5 text-xs", md: "px-2 py-0.5 text-xs", lg: "px-2.5 py-1 text-sm" }, a = {
77
78
  brand: "bg-brand-soft text-brand-on-soft",
78
79
  neutral: "bg-neutral-soft text-neutral-on-soft",
79
80
  error: "bg-error-soft text-error-on-soft",
@@ -83,12 +84,12 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ss = /* @__PURE__ */ S({
83
84
  processing: "bg-processing-soft text-processing-on-soft"
84
85
  };
85
86
  return [
86
- ...s,
87
- r[t.size],
88
- a[t.variant]
87
+ ...o,
88
+ r[n.size],
89
+ a[n.variant]
89
90
  ].join(" ");
90
- }), o = C(() => {
91
- const s = { sm: "w-1.5 h-1.5", md: "w-2 h-2", lg: "w-2.5 h-2.5" }, r = {
91
+ }), s = w(() => {
92
+ const o = { sm: "w-1.5 h-1.5", md: "w-2 h-2", lg: "w-2.5 h-2.5" }, r = {
92
93
  brand: "bg-brand",
93
94
  neutral: "bg-neutral",
94
95
  error: "bg-error",
@@ -97,22 +98,22 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ss = /* @__PURE__ */ S({
97
98
  info: "bg-info",
98
99
  processing: "bg-processing"
99
100
  };
100
- return ["inline-block", "rounded-full", s[t.size], r[t.variant]].join(" ");
101
+ return ["inline-block", "rounded-full", o[n.size], r[n.variant]].join(" ");
101
102
  });
102
- return (s, r) => (g(), v("span", {
103
- class: T(n.value)
103
+ return (o, r) => (g(), h("span", {
104
+ class: R(t.value)
104
105
  }, [
105
- e.dot ? (g(), v("span", {
106
+ e.dot ? (g(), h("span", {
106
107
  key: 0,
107
- class: T(o.value),
108
+ class: R(s.value),
108
109
  "aria-hidden": "true"
109
- }, null, 2)) : D("", !0),
110
- e.dot ? D("", !0) : N(s.$slots, "default", { key: 1 }, () => [
111
- X(E(e.label), 1)
110
+ }, null, 2)) : V("", !0),
111
+ e.dot ? V("", !0) : P(o.$slots, "default", { key: 1 }, () => [
112
+ K(L(e.label), 1)
112
113
  ])
113
114
  ], 2));
114
115
  }
115
- }), Rt = ["type", "disabled", "aria-label", "aria-busy"], Lt = { key: 1 }, Ot = /* @__PURE__ */ S({
116
+ }), Ot = ["type", "disabled", "aria-label", "aria-busy"], zt = { key: 1 }, it = /* @__PURE__ */ z({
116
117
  __name: "DsButton",
117
118
  props: {
118
119
  label: {},
@@ -128,8 +129,8 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ss = /* @__PURE__ */ S({
128
129
  },
129
130
  emits: ["click"],
130
131
  setup(e) {
131
- const t = e, n = C(() => {
132
- const s = [
132
+ const n = e, t = w(() => {
133
+ const o = [
133
134
  "inline-flex",
134
135
  "items-center",
135
136
  "justify-center",
@@ -139,7 +140,7 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ss = /* @__PURE__ */ S({
139
140
  "transition-colors",
140
141
  "focus-visible:outline-none",
141
142
  "focus-visible:ring-2",
142
- "focus-visible:ring-brand",
143
+ "focus-visible:ring-focus-ring",
143
144
  "focus-visible:ring-offset-2",
144
145
  "disabled:cursor-not-allowed",
145
146
  "disabled:opacity-95",
@@ -196,43 +197,88 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ss = /* @__PURE__ */ S({
196
197
  "border-error-border-strong",
197
198
  "hover:bg-error-hover",
198
199
  "active:bg-error-active"
200
+ ],
201
+ warning: [
202
+ "bg-warning",
203
+ "text-warning-on-solid",
204
+ "border",
205
+ "border-warning-border-strong",
206
+ "hover:bg-warning-hover",
207
+ "active:bg-warning-active"
199
208
  ]
200
- }, d = t.fullWidth ? ["w-full"] : [];
209
+ }, i = n.fullWidth ? ["w-full"] : [];
201
210
  return [
202
- ...s,
203
- ...r[t.size],
204
- ...a[t.variant],
205
- ...d
211
+ ...o,
212
+ ...r[n.size],
213
+ ...a[n.variant],
214
+ ...i
206
215
  ].join(" ");
207
- }), o = C(() => ({
216
+ }), s = w(() => ({
208
217
  small: "w-3 h-3",
209
218
  medium: "w-4 h-4",
210
219
  large: "w-5 h-5"
211
- })[t.size]);
212
- return (s, r) => (g(), v("button", {
220
+ })[n.size]);
221
+ return (o, r) => (g(), h("button", {
213
222
  type: e.htmlType,
214
223
  disabled: e.disabled || e.loading,
215
224
  "aria-label": e.ariaLabel,
216
225
  "aria-busy": e.loading ? "true" : void 0,
217
- class: T(n.value),
218
- onClick: r[0] || (r[0] = (a) => s.$emit("click", a))
226
+ class: R(t.value),
227
+ onClick: r[0] || (r[0] = (a) => o.$emit("click", a))
219
228
  }, [
220
- e.iconLeft ? (g(), I($e(e.iconLeft), {
229
+ e.iconLeft ? (g(), N(Te(e.iconLeft), {
221
230
  key: 0,
222
- class: T(o.value),
223
- style: he(e.label || s.$slots.default ? "margin-right: 0.375rem" : ""),
231
+ class: R(s.value),
232
+ style: le(e.label || o.$slots.default ? "margin-right: 0.375rem" : ""),
224
233
  "aria-hidden": "true"
225
- }, null, 8, ["class", "style"])) : D("", !0),
226
- e.label ? (g(), v("span", Lt, E(e.label), 1)) : N(s.$slots, "default", { key: 2 }),
227
- e.iconRight ? (g(), I($e(e.iconRight), {
234
+ }, null, 8, ["class", "style"])) : V("", !0),
235
+ e.label ? (g(), h("span", zt, L(e.label), 1)) : P(o.$slots, "default", { key: 2 }),
236
+ e.iconRight ? (g(), N(Te(e.iconRight), {
228
237
  key: 3,
229
- class: T(o.value),
230
- style: he(e.label || s.$slots.default ? "margin-left: 0.375rem" : ""),
238
+ class: R(s.value),
239
+ style: le(e.label || o.$slots.default ? "margin-left: 0.375rem" : ""),
231
240
  "aria-hidden": "true"
232
- }, null, 8, ["class", "style"])) : D("", !0)
233
- ], 10, Rt));
241
+ }, null, 8, ["class", "style"])) : V("", !0)
242
+ ], 10, Ot));
243
+ }
244
+ }), Et = {
245
+ key: 0,
246
+ class: "px-4 py-3 border-b border-b-solid border-border"
247
+ }, Mt = {
248
+ key: 1,
249
+ class: "px-4 py-3 border-t border-t-solid border-border"
250
+ }, po = /* @__PURE__ */ z({
251
+ __name: "DsCard",
252
+ props: {
253
+ variant: { default: "default" },
254
+ noPadding: { type: Boolean, default: !1 }
255
+ },
256
+ setup(e) {
257
+ const n = e, t = w(() => {
258
+ const o = ["rounded-lg", "bg-bg", "overflow-hidden"], r = {
259
+ default: ["border", "border-solid", "border-border-strong", "legacy-card-box-shadow"],
260
+ outlined: ["border", "border-solid", "border-border-strong"],
261
+ elevated: ["shadow-default"]
262
+ };
263
+ return [...o, ...r[n.variant]].join(" ");
264
+ }), s = w(() => n.noPadding ? "" : "px-4 py-4");
265
+ return (o, r) => (g(), h("div", {
266
+ class: R(t.value)
267
+ }, [
268
+ o.$slots.header ? (g(), h("div", Et, [
269
+ P(o.$slots, "header")
270
+ ])) : V("", !0),
271
+ k("div", {
272
+ class: R(s.value)
273
+ }, [
274
+ P(o.$slots, "default")
275
+ ], 2),
276
+ o.$slots.footer ? (g(), h("div", Mt, [
277
+ P(o.$slots, "footer")
278
+ ])) : V("", !0)
279
+ ], 2));
234
280
  }
235
- }), Vt = ["id", "checked", "disabled", "value"], St = {
281
+ }), jt = ["id", "checked", "disabled", "value"], Pt = {
236
282
  key: 0,
237
283
  viewBox: "0 0 12 12",
238
284
  fill: "none",
@@ -241,7 +287,7 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ss = /* @__PURE__ */ S({
241
287
  "stroke-linecap": "round",
242
288
  "stroke-linejoin": "round",
243
289
  class: "w-full h-full"
244
- }, as = /* @__PURE__ */ S({
290
+ }, yo = /* @__PURE__ */ z({
245
291
  __name: "DsCheckbox",
246
292
  props: {
247
293
  modelValue: { type: Boolean, default: !1 },
@@ -252,143 +298,143 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ss = /* @__PURE__ */ S({
252
298
  size: { default: "medium" }
253
299
  },
254
300
  emits: ["update:modelValue", "change"],
255
- setup(e, { emit: t }) {
256
- const n = e, o = t, s = {
301
+ setup(e, { emit: n }) {
302
+ const t = e, s = n, o = {
257
303
  small: { box: "w-3.5 h-3.5", label: "text-xs", radius: "rounded" },
258
304
  medium: { box: "w-4 h-4", label: "text-sm", radius: "rounded" },
259
305
  large: { box: "w-5 h-5", label: "text-base", radius: "rounded-md" }
260
- }, r = C(() => {
261
- const i = s[n.size], f = [
262
- i.box,
263
- i.radius,
306
+ }, r = w(() => {
307
+ const c = o[t.size], f = [
308
+ c.box,
309
+ c.radius,
264
310
  "inline-flex items-center justify-center",
265
311
  "border border-solid",
266
- "transition-all duration-150",
312
+ "transition-all duration-fast",
267
313
  "shrink-0"
268
314
  ];
269
- return n.disabled ? f.push(
270
- n.modelValue ? "bg-brand-disabled border-brand-disabled text-brand-on-solid" : "bg-bg-tertiary border-border text-transparent",
315
+ return t.disabled ? f.push(
316
+ t.modelValue ? "bg-brand-disabled border-brand-disabled text-brand-on-solid" : "bg-bg-tertiary border-border text-transparent",
271
317
  "opacity-60"
272
- ) : n.modelValue ? f.push("bg-brand border-brand text-brand-on-solid") : f.push(
318
+ ) : t.modelValue ? f.push("bg-brand border-brand text-brand-on-solid") : f.push(
273
319
  "bg-bg border-border-strong text-transparent",
274
320
  "group-hover:border-brand",
275
- "peer-focus-visible:ring-2 peer-focus-visible:ring-brand peer-focus-visible:ring-offset-2"
321
+ "peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring peer-focus-visible:ring-offset-2"
276
322
  ), f.join(" ");
277
- }), a = C(() => [
323
+ }), a = w(() => [
278
324
  "font-sans select-none",
279
- s[n.size].label,
280
- n.disabled ? "text-fg-disabled" : "text-fg"
281
- ].join(" ")), d = (i) => {
282
- if (n.disabled) return;
283
- const c = i.target.checked;
284
- o("update:modelValue", c), o("change", c, i);
325
+ o[t.size].label,
326
+ t.disabled ? "text-fg-disabled" : "text-fg"
327
+ ].join(" ")), i = (c) => {
328
+ if (t.disabled) return;
329
+ const d = c.target.checked;
330
+ s("update:modelValue", d), s("change", d, c);
285
331
  };
286
- return (i, f) => (g(), v("label", {
287
- class: T([
332
+ return (c, f) => (g(), h("label", {
333
+ class: R([
288
334
  "inline-flex items-center gap-2",
289
335
  e.disabled ? "cursor-not-allowed" : "cursor-pointer",
290
336
  "group"
291
337
  ])
292
338
  }, [
293
- F("input", {
339
+ k("input", {
294
340
  id: e.id,
295
341
  type: "checkbox",
296
342
  checked: e.modelValue,
297
343
  disabled: e.disabled,
298
344
  value: e.value,
299
345
  class: "sr-only peer",
300
- onChange: d
301
- }, null, 40, Vt),
302
- F("span", {
303
- class: T(r.value),
346
+ onChange: i
347
+ }, null, 40, jt),
348
+ k("span", {
349
+ class: R(r.value),
304
350
  "aria-hidden": "true"
305
351
  }, [
306
- e.modelValue ? (g(), v("svg", St, [...f[0] || (f[0] = [
307
- F("polyline", { points: "2.5 6 5 8.5 9.5 3.5" }, null, -1)
308
- ])])) : D("", !0)
352
+ e.modelValue ? (g(), h("svg", Pt, [...f[0] || (f[0] = [
353
+ k("polyline", { points: "2.5 6 5 8.5 9.5 3.5" }, null, -1)
354
+ ])])) : V("", !0)
309
355
  ], 2),
310
- e.label || i.$slots.default ? (g(), v("span", {
356
+ e.label || c.$slots.default ? (g(), h("span", {
311
357
  key: 0,
312
- class: T(a.value)
358
+ class: R(a.value)
313
359
  }, [
314
- N(i.$slots, "default", {}, () => [
315
- X(E(e.label), 1)
360
+ P(c.$slots, "default", {}, () => [
361
+ K(L(e.label), 1)
316
362
  ])
317
- ], 2)) : D("", !0)
363
+ ], 2)) : V("", !0)
318
364
  ], 2));
319
365
  }
320
- }), ae = Math.min, q = Math.max, De = Math.round, Fe = Math.floor, Z = (e) => ({
366
+ }), ie = Math.min, q = Math.max, Ve = Math.round, De = Math.floor, Z = (e) => ({
321
367
  x: e,
322
368
  y: e
323
- }), zt = {
369
+ }), It = {
324
370
  left: "right",
325
371
  right: "left",
326
372
  bottom: "top",
327
373
  top: "bottom"
328
- }, Mt = {
374
+ }, Ft = {
329
375
  start: "end",
330
376
  end: "start"
331
377
  };
332
- function Pe(e, t, n) {
333
- return q(e, ae(t, n));
378
+ function Fe(e, n, t) {
379
+ return q(e, ie(n, t));
334
380
  }
335
- function pe(e, t) {
336
- return typeof e == "function" ? e(t) : e;
381
+ function ye(e, n) {
382
+ return typeof e == "function" ? e(n) : e;
337
383
  }
338
- function le(e) {
384
+ function ce(e) {
339
385
  return e.split("-")[0];
340
386
  }
341
- function ye(e) {
387
+ function xe(e) {
342
388
  return e.split("-")[1];
343
389
  }
344
- function lt(e) {
390
+ function ct(e) {
345
391
  return e === "x" ? "y" : "x";
346
392
  }
347
- function He(e) {
393
+ function qe(e) {
348
394
  return e === "y" ? "height" : "width";
349
395
  }
350
- const jt = /* @__PURE__ */ new Set(["top", "bottom"]);
396
+ const Nt = /* @__PURE__ */ new Set(["top", "bottom"]);
351
397
  function ne(e) {
352
- return jt.has(le(e)) ? "y" : "x";
398
+ return Nt.has(ce(e)) ? "y" : "x";
353
399
  }
354
- function qe(e) {
355
- return lt(ne(e));
400
+ function Ke(e) {
401
+ return ct(ne(e));
356
402
  }
357
- function Pt(e, t, n) {
358
- n === void 0 && (n = !1);
359
- const o = ye(e), s = qe(e), r = He(s);
360
- let a = s === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
361
- return t.reference[r] > t.floating[r] && (a = Ee(a)), [a, Ee(a)];
403
+ function Wt(e, n, t) {
404
+ t === void 0 && (t = !1);
405
+ const s = xe(e), o = Ke(e), r = qe(o);
406
+ let a = o === "x" ? s === (t ? "end" : "start") ? "right" : "left" : s === "start" ? "bottom" : "top";
407
+ return n.reference[r] > n.floating[r] && (a = Re(a)), [a, Re(a)];
362
408
  }
363
- function It(e) {
364
- const t = Ee(e);
365
- return [Ie(e), t, Ie(t)];
409
+ function Ht(e) {
410
+ const n = Re(e);
411
+ return [Ne(e), n, Ne(n)];
366
412
  }
367
- function Ie(e) {
368
- return e.replace(/start|end/g, (t) => Mt[t]);
413
+ function Ne(e) {
414
+ return e.replace(/start|end/g, (n) => Ft[n]);
369
415
  }
370
- const Je = ["left", "right"], Qe = ["right", "left"], Nt = ["top", "bottom"], Wt = ["bottom", "top"];
371
- function Ht(e, t, n) {
416
+ const Je = ["left", "right"], Qe = ["right", "left"], qt = ["top", "bottom"], Kt = ["bottom", "top"];
417
+ function Ut(e, n, t) {
372
418
  switch (e) {
373
419
  case "top":
374
420
  case "bottom":
375
- return n ? t ? Qe : Je : t ? Je : Qe;
421
+ return t ? n ? Qe : Je : n ? Je : Qe;
376
422
  case "left":
377
423
  case "right":
378
- return t ? Nt : Wt;
424
+ return n ? qt : Kt;
379
425
  default:
380
426
  return [];
381
427
  }
382
428
  }
383
- function qt(e, t, n, o) {
384
- const s = ye(e);
385
- let r = Ht(le(e), n === "start", o);
386
- return s && (r = r.map((a) => a + "-" + s), t && (r = r.concat(r.map(Ie)))), r;
429
+ function Xt(e, n, t, s) {
430
+ const o = xe(e);
431
+ let r = Ut(ce(e), t === "start", s);
432
+ return o && (r = r.map((a) => a + "-" + o), n && (r = r.concat(r.map(Ne)))), r;
387
433
  }
388
- function Ee(e) {
389
- return e.replace(/left|right|bottom|top/g, (t) => zt[t]);
434
+ function Re(e) {
435
+ return e.replace(/left|right|bottom|top/g, (n) => It[n]);
390
436
  }
391
- function Kt(e) {
437
+ function Yt(e) {
392
438
  return {
393
439
  top: 0,
394
440
  right: 0,
@@ -397,318 +443,318 @@ function Kt(e) {
397
443
  ...e
398
444
  };
399
445
  }
400
- function it(e) {
401
- return typeof e != "number" ? Kt(e) : {
446
+ function dt(e) {
447
+ return typeof e != "number" ? Yt(e) : {
402
448
  top: e,
403
449
  right: e,
404
450
  bottom: e,
405
451
  left: e
406
452
  };
407
453
  }
408
- function Ae(e) {
454
+ function Le(e) {
409
455
  const {
410
- x: t,
411
- y: n,
412
- width: o,
413
- height: s
456
+ x: n,
457
+ y: t,
458
+ width: s,
459
+ height: o
414
460
  } = e;
415
461
  return {
416
- width: o,
417
- height: s,
418
- top: n,
419
- left: t,
420
- right: t + o,
421
- bottom: n + s,
422
- x: t,
423
- y: n
462
+ width: s,
463
+ height: o,
464
+ top: t,
465
+ left: n,
466
+ right: n + s,
467
+ bottom: t + o,
468
+ x: n,
469
+ y: t
424
470
  };
425
471
  }
426
- function Ze(e, t, n) {
472
+ function Ze(e, n, t) {
427
473
  let {
428
- reference: o,
429
- floating: s
474
+ reference: s,
475
+ floating: o
430
476
  } = e;
431
- const r = ne(t), a = qe(t), d = He(a), i = le(t), f = r === "y", c = o.x + o.width / 2 - s.width / 2, l = o.y + o.height / 2 - s.height / 2, m = o[d] / 2 - s[d] / 2;
477
+ const r = ne(n), a = Ke(n), i = qe(a), c = ce(n), f = r === "y", d = s.x + s.width / 2 - o.width / 2, l = s.y + s.height / 2 - o.height / 2, b = s[i] / 2 - o[i] / 2;
432
478
  let u;
433
- switch (i) {
479
+ switch (c) {
434
480
  case "top":
435
481
  u = {
436
- x: c,
437
- y: o.y - s.height
482
+ x: d,
483
+ y: s.y - o.height
438
484
  };
439
485
  break;
440
486
  case "bottom":
441
487
  u = {
442
- x: c,
443
- y: o.y + o.height
488
+ x: d,
489
+ y: s.y + s.height
444
490
  };
445
491
  break;
446
492
  case "right":
447
493
  u = {
448
- x: o.x + o.width,
494
+ x: s.x + s.width,
449
495
  y: l
450
496
  };
451
497
  break;
452
498
  case "left":
453
499
  u = {
454
- x: o.x - s.width,
500
+ x: s.x - o.width,
455
501
  y: l
456
502
  };
457
503
  break;
458
504
  default:
459
505
  u = {
460
- x: o.x,
461
- y: o.y
506
+ x: s.x,
507
+ y: s.y
462
508
  };
463
509
  }
464
- switch (ye(t)) {
510
+ switch (xe(n)) {
465
511
  case "start":
466
- u[a] -= m * (n && f ? -1 : 1);
512
+ u[a] -= b * (t && f ? -1 : 1);
467
513
  break;
468
514
  case "end":
469
- u[a] += m * (n && f ? -1 : 1);
515
+ u[a] += b * (t && f ? -1 : 1);
470
516
  break;
471
517
  }
472
518
  return u;
473
519
  }
474
- async function Ut(e, t) {
475
- var n;
476
- t === void 0 && (t = {});
520
+ async function Gt(e, n) {
521
+ var t;
522
+ n === void 0 && (n = {});
477
523
  const {
478
- x: o,
479
- y: s,
524
+ x: s,
525
+ y: o,
480
526
  platform: r,
481
527
  rects: a,
482
- elements: d,
483
- strategy: i
528
+ elements: i,
529
+ strategy: c
484
530
  } = e, {
485
531
  boundary: f = "clippingAncestors",
486
- rootBoundary: c = "viewport",
532
+ rootBoundary: d = "viewport",
487
533
  elementContext: l = "floating",
488
- altBoundary: m = !1,
534
+ altBoundary: b = !1,
489
535
  padding: u = 0
490
- } = pe(t, e), h = it(u), y = d[m ? l === "floating" ? "reference" : "floating" : l], p = Ae(await r.getClippingRect({
491
- element: (n = await (r.isElement == null ? void 0 : r.isElement(y))) == null || n ? y : y.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(d.floating)),
536
+ } = ye(n, e), v = dt(u), y = i[b ? l === "floating" ? "reference" : "floating" : l], p = Le(await r.getClippingRect({
537
+ element: (t = await (r.isElement == null ? void 0 : r.isElement(y))) == null || t ? y : y.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(i.floating)),
492
538
  boundary: f,
493
- rootBoundary: c,
494
- strategy: i
495
- })), k = l === "floating" ? {
496
- x: o,
497
- y: s,
539
+ rootBoundary: d,
540
+ strategy: c
541
+ })), C = l === "floating" ? {
542
+ x: s,
543
+ y: o,
498
544
  width: a.floating.width,
499
545
  height: a.floating.height
500
- } : a.reference, x = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(d.floating)), $ = await (r.isElement == null ? void 0 : r.isElement(x)) ? await (r.getScale == null ? void 0 : r.getScale(x)) || {
546
+ } : a.reference, D = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(i.floating)), A = await (r.isElement == null ? void 0 : r.isElement(D)) ? await (r.getScale == null ? void 0 : r.getScale(D)) || {
501
547
  x: 1,
502
548
  y: 1
503
549
  } : {
504
550
  x: 1,
505
551
  y: 1
506
- }, B = Ae(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
507
- elements: d,
508
- rect: k,
509
- offsetParent: x,
510
- strategy: i
511
- }) : k);
552
+ }, T = Le(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
553
+ elements: i,
554
+ rect: C,
555
+ offsetParent: D,
556
+ strategy: c
557
+ }) : C);
512
558
  return {
513
- top: (p.top - B.top + h.top) / $.y,
514
- bottom: (B.bottom - p.bottom + h.bottom) / $.y,
515
- left: (p.left - B.left + h.left) / $.x,
516
- right: (B.right - p.right + h.right) / $.x
559
+ top: (p.top - T.top + v.top) / A.y,
560
+ bottom: (T.bottom - p.bottom + v.bottom) / A.y,
561
+ left: (p.left - T.left + v.left) / A.x,
562
+ right: (T.right - p.right + v.right) / A.x
517
563
  };
518
564
  }
519
- const Xt = async (e, t, n) => {
565
+ const Jt = async (e, n, t) => {
520
566
  const {
521
- placement: o = "bottom",
522
- strategy: s = "absolute",
567
+ placement: s = "bottom",
568
+ strategy: o = "absolute",
523
569
  middleware: r = [],
524
570
  platform: a
525
- } = n, d = r.filter(Boolean), i = await (a.isRTL == null ? void 0 : a.isRTL(t));
571
+ } = t, i = r.filter(Boolean), c = await (a.isRTL == null ? void 0 : a.isRTL(n));
526
572
  let f = await a.getElementRects({
527
573
  reference: e,
528
- floating: t,
529
- strategy: s
574
+ floating: n,
575
+ strategy: o
530
576
  }), {
531
- x: c,
577
+ x: d,
532
578
  y: l
533
- } = Ze(f, o, i), m = o, u = {}, h = 0;
534
- for (let y = 0; y < d.length; y++) {
535
- var b;
579
+ } = Ze(f, s, c), b = s, u = {}, v = 0;
580
+ for (let y = 0; y < i.length; y++) {
581
+ var m;
536
582
  const {
537
583
  name: p,
538
- fn: k
539
- } = d[y], {
540
- x,
541
- y: $,
542
- data: B,
543
- reset: O
544
- } = await k({
545
- x: c,
584
+ fn: C
585
+ } = i[y], {
586
+ x: D,
587
+ y: A,
588
+ data: T,
589
+ reset: S
590
+ } = await C({
591
+ x: d,
546
592
  y: l,
547
- initialPlacement: o,
548
- placement: m,
549
- strategy: s,
593
+ initialPlacement: s,
594
+ placement: b,
595
+ strategy: o,
550
596
  middlewareData: u,
551
597
  rects: f,
552
598
  platform: {
553
599
  ...a,
554
- detectOverflow: (b = a.detectOverflow) != null ? b : Ut
600
+ detectOverflow: (m = a.detectOverflow) != null ? m : Gt
555
601
  },
556
602
  elements: {
557
603
  reference: e,
558
- floating: t
604
+ floating: n
559
605
  }
560
606
  });
561
- c = x ?? c, l = $ ?? l, u = {
607
+ d = D ?? d, l = A ?? l, u = {
562
608
  ...u,
563
609
  [p]: {
564
610
  ...u[p],
565
- ...B
611
+ ...T
566
612
  }
567
- }, O && h <= 50 && (h++, typeof O == "object" && (O.placement && (m = O.placement), O.rects && (f = O.rects === !0 ? await a.getElementRects({
613
+ }, S && v <= 50 && (v++, typeof S == "object" && (S.placement && (b = S.placement), S.rects && (f = S.rects === !0 ? await a.getElementRects({
568
614
  reference: e,
569
- floating: t,
570
- strategy: s
571
- }) : O.rects), {
572
- x: c,
615
+ floating: n,
616
+ strategy: o
617
+ }) : S.rects), {
618
+ x: d,
573
619
  y: l
574
- } = Ze(f, m, i)), y = -1);
620
+ } = Ze(f, b, c)), y = -1);
575
621
  }
576
622
  return {
577
- x: c,
623
+ x: d,
578
624
  y: l,
579
- placement: m,
580
- strategy: s,
625
+ placement: b,
626
+ strategy: o,
581
627
  middlewareData: u
582
628
  };
583
- }, Yt = (e) => ({
629
+ }, Qt = (e) => ({
584
630
  name: "arrow",
585
631
  options: e,
586
- async fn(t) {
632
+ async fn(n) {
587
633
  const {
588
- x: n,
589
- y: o,
590
- placement: s,
634
+ x: t,
635
+ y: s,
636
+ placement: o,
591
637
  rects: r,
592
638
  platform: a,
593
- elements: d,
594
- middlewareData: i
595
- } = t, {
639
+ elements: i,
640
+ middlewareData: c
641
+ } = n, {
596
642
  element: f,
597
- padding: c = 0
598
- } = pe(e, t) || {};
643
+ padding: d = 0
644
+ } = ye(e, n) || {};
599
645
  if (f == null)
600
646
  return {};
601
- const l = it(c), m = {
602
- x: n,
603
- y: o
604
- }, u = qe(s), h = He(u), b = await a.getDimensions(f), y = u === "y", p = y ? "top" : "left", k = y ? "bottom" : "right", x = y ? "clientHeight" : "clientWidth", $ = r.reference[h] + r.reference[u] - m[u] - r.floating[h], B = m[u] - r.reference[u], O = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(f));
605
- let A = O ? O[x] : 0;
606
- (!A || !await (a.isElement == null ? void 0 : a.isElement(O))) && (A = d.floating[x] || r.floating[h]);
607
- const z = $ / 2 - B / 2, M = A / 2 - b[h] / 2 - 1, W = ae(l[p], M), Y = ae(l[k], M), U = W, w = A - b[h] - Y, L = A / 2 - b[h] / 2 + z, V = Pe(U, L, w), P = !i.arrow && ye(s) != null && L !== V && r.reference[h] / 2 - (L < U ? W : Y) - b[h] / 2 < 0, H = P ? L < U ? L - U : L - w : 0;
647
+ const l = dt(d), b = {
648
+ x: t,
649
+ y: s
650
+ }, u = Ke(o), v = qe(u), m = await a.getDimensions(f), y = u === "y", p = y ? "top" : "left", C = y ? "bottom" : "right", D = y ? "clientHeight" : "clientWidth", A = r.reference[v] + r.reference[u] - b[u] - r.floating[v], T = b[u] - r.reference[u], S = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(f));
651
+ let $ = S ? S[D] : 0;
652
+ (!$ || !await (a.isElement == null ? void 0 : a.isElement(S))) && ($ = i.floating[D] || r.floating[v]);
653
+ const M = A / 2 - T / 2, I = $ / 2 - m[v] / 2 - 1, W = ie(l[p], I), Y = ie(l[C], I), X = W, x = $ - m[v] - Y, O = $ / 2 - m[v] / 2 + M, E = Fe(X, O, x), F = !c.arrow && xe(o) != null && O !== E && r.reference[v] / 2 - (O < X ? W : Y) - m[v] / 2 < 0, H = F ? O < X ? O - X : O - x : 0;
608
654
  return {
609
- [u]: m[u] + H,
655
+ [u]: b[u] + H,
610
656
  data: {
611
- [u]: V,
612
- centerOffset: L - V - H,
613
- ...P && {
657
+ [u]: E,
658
+ centerOffset: O - E - H,
659
+ ...F && {
614
660
  alignmentOffset: H
615
661
  }
616
662
  },
617
- reset: P
663
+ reset: F
618
664
  };
619
665
  }
620
- }), Gt = function(e) {
666
+ }), Zt = function(e) {
621
667
  return e === void 0 && (e = {}), {
622
668
  name: "flip",
623
669
  options: e,
624
- async fn(t) {
625
- var n, o;
670
+ async fn(n) {
671
+ var t, s;
626
672
  const {
627
- placement: s,
673
+ placement: o,
628
674
  middlewareData: r,
629
675
  rects: a,
630
- initialPlacement: d,
631
- platform: i,
676
+ initialPlacement: i,
677
+ platform: c,
632
678
  elements: f
633
- } = t, {
634
- mainAxis: c = !0,
679
+ } = n, {
680
+ mainAxis: d = !0,
635
681
  crossAxis: l = !0,
636
- fallbackPlacements: m,
682
+ fallbackPlacements: b,
637
683
  fallbackStrategy: u = "bestFit",
638
- fallbackAxisSideDirection: h = "none",
639
- flipAlignment: b = !0,
684
+ fallbackAxisSideDirection: v = "none",
685
+ flipAlignment: m = !0,
640
686
  ...y
641
- } = pe(e, t);
642
- if ((n = r.arrow) != null && n.alignmentOffset)
687
+ } = ye(e, n);
688
+ if ((t = r.arrow) != null && t.alignmentOffset)
643
689
  return {};
644
- const p = le(s), k = ne(d), x = le(d) === d, $ = await (i.isRTL == null ? void 0 : i.isRTL(f.floating)), B = m || (x || !b ? [Ee(d)] : It(d)), O = h !== "none";
645
- !m && O && B.push(...qt(d, b, h, $));
646
- const A = [d, ...B], z = await i.detectOverflow(t, y), M = [];
647
- let W = ((o = r.flip) == null ? void 0 : o.overflows) || [];
648
- if (c && M.push(z[p]), l) {
649
- const L = Pt(s, a, $);
650
- M.push(z[L[0]], z[L[1]]);
690
+ const p = ce(o), C = ne(i), D = ce(i) === i, A = await (c.isRTL == null ? void 0 : c.isRTL(f.floating)), T = b || (D || !m ? [Re(i)] : Ht(i)), S = v !== "none";
691
+ !b && S && T.push(...Xt(i, m, v, A));
692
+ const $ = [i, ...T], M = await c.detectOverflow(n, y), I = [];
693
+ let W = ((s = r.flip) == null ? void 0 : s.overflows) || [];
694
+ if (d && I.push(M[p]), l) {
695
+ const O = Wt(o, a, A);
696
+ I.push(M[O[0]], M[O[1]]);
651
697
  }
652
698
  if (W = [...W, {
653
- placement: s,
654
- overflows: M
655
- }], !M.every((L) => L <= 0)) {
656
- var Y, U;
657
- const L = (((Y = r.flip) == null ? void 0 : Y.index) || 0) + 1, V = A[L];
658
- if (V && (!(l === "alignment" ? k !== ne(V) : !1) || // We leave the current main axis only if every placement on that axis
699
+ placement: o,
700
+ overflows: I
701
+ }], !I.every((O) => O <= 0)) {
702
+ var Y, X;
703
+ const O = (((Y = r.flip) == null ? void 0 : Y.index) || 0) + 1, E = $[O];
704
+ if (E && (!(l === "alignment" ? C !== ne(E) : !1) || // We leave the current main axis only if every placement on that axis
659
705
  // overflows the main axis.
660
- W.every((G) => ne(G.placement) === k ? G.overflows[0] > 0 : !0)))
706
+ W.every((G) => ne(G.placement) === C ? G.overflows[0] > 0 : !0)))
661
707
  return {
662
708
  data: {
663
- index: L,
709
+ index: O,
664
710
  overflows: W
665
711
  },
666
712
  reset: {
667
- placement: V
713
+ placement: E
668
714
  }
669
715
  };
670
- let P = (U = W.filter((H) => H.overflows[0] <= 0).sort((H, G) => H.overflows[1] - G.overflows[1])[0]) == null ? void 0 : U.placement;
671
- if (!P)
716
+ let F = (X = W.filter((H) => H.overflows[0] <= 0).sort((H, G) => H.overflows[1] - G.overflows[1])[0]) == null ? void 0 : X.placement;
717
+ if (!F)
672
718
  switch (u) {
673
719
  case "bestFit": {
674
- var w;
675
- const H = (w = W.filter((G) => {
676
- if (O) {
720
+ var x;
721
+ const H = (x = W.filter((G) => {
722
+ if (S) {
677
723
  const oe = ne(G.placement);
678
- return oe === k || // Create a bias to the `y` side axis due to horizontal
724
+ return oe === C || // Create a bias to the `y` side axis due to horizontal
679
725
  // reading directions favoring greater width.
680
726
  oe === "y";
681
727
  }
682
728
  return !0;
683
- }).map((G) => [G.placement, G.overflows.filter((oe) => oe > 0).reduce((oe, kt) => oe + kt, 0)]).sort((G, oe) => G[1] - oe[1])[0]) == null ? void 0 : w[0];
684
- H && (P = H);
729
+ }).map((G) => [G.placement, G.overflows.filter((oe) => oe > 0).reduce((oe, Dt) => oe + Dt, 0)]).sort((G, oe) => G[1] - oe[1])[0]) == null ? void 0 : x[0];
730
+ H && (F = H);
685
731
  break;
686
732
  }
687
733
  case "initialPlacement":
688
- P = d;
734
+ F = i;
689
735
  break;
690
736
  }
691
- if (s !== P)
737
+ if (o !== F)
692
738
  return {
693
739
  reset: {
694
- placement: P
740
+ placement: F
695
741
  }
696
742
  };
697
743
  }
698
744
  return {};
699
745
  }
700
746
  };
701
- }, Jt = /* @__PURE__ */ new Set(["left", "top"]);
702
- async function Qt(e, t) {
747
+ }, _t = /* @__PURE__ */ new Set(["left", "top"]);
748
+ async function en(e, n) {
703
749
  const {
704
- placement: n,
705
- platform: o,
706
- elements: s
707
- } = e, r = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), a = le(n), d = ye(n), i = ne(n) === "y", f = Jt.has(a) ? -1 : 1, c = r && i ? -1 : 1, l = pe(t, e);
750
+ placement: t,
751
+ platform: s,
752
+ elements: o
753
+ } = e, r = await (s.isRTL == null ? void 0 : s.isRTL(o.floating)), a = ce(t), i = xe(t), c = ne(t) === "y", f = _t.has(a) ? -1 : 1, d = r && c ? -1 : 1, l = ye(n, e);
708
754
  let {
709
- mainAxis: m,
755
+ mainAxis: b,
710
756
  crossAxis: u,
711
- alignmentAxis: h
757
+ alignmentAxis: v
712
758
  } = typeof l == "number" ? {
713
759
  mainAxis: l,
714
760
  crossAxis: 0,
@@ -718,127 +764,127 @@ async function Qt(e, t) {
718
764
  crossAxis: l.crossAxis || 0,
719
765
  alignmentAxis: l.alignmentAxis
720
766
  };
721
- return d && typeof h == "number" && (u = d === "end" ? h * -1 : h), i ? {
722
- x: u * c,
723
- y: m * f
767
+ return i && typeof v == "number" && (u = i === "end" ? v * -1 : v), c ? {
768
+ x: u * d,
769
+ y: b * f
724
770
  } : {
725
- x: m * f,
726
- y: u * c
771
+ x: b * f,
772
+ y: u * d
727
773
  };
728
774
  }
729
- const Zt = function(e) {
775
+ const tn = function(e) {
730
776
  return e === void 0 && (e = 0), {
731
777
  name: "offset",
732
778
  options: e,
733
- async fn(t) {
734
- var n, o;
779
+ async fn(n) {
780
+ var t, s;
735
781
  const {
736
- x: s,
782
+ x: o,
737
783
  y: r,
738
784
  placement: a,
739
- middlewareData: d
740
- } = t, i = await Qt(t, e);
741
- return a === ((n = d.offset) == null ? void 0 : n.placement) && (o = d.arrow) != null && o.alignmentOffset ? {} : {
742
- x: s + i.x,
743
- y: r + i.y,
785
+ middlewareData: i
786
+ } = n, c = await en(n, e);
787
+ return a === ((t = i.offset) == null ? void 0 : t.placement) && (s = i.arrow) != null && s.alignmentOffset ? {} : {
788
+ x: o + c.x,
789
+ y: r + c.y,
744
790
  data: {
745
- ...i,
791
+ ...c,
746
792
  placement: a
747
793
  }
748
794
  };
749
795
  }
750
796
  };
751
- }, _t = function(e) {
797
+ }, nn = function(e) {
752
798
  return e === void 0 && (e = {}), {
753
799
  name: "shift",
754
800
  options: e,
755
- async fn(t) {
801
+ async fn(n) {
756
802
  const {
757
- x: n,
758
- y: o,
759
- placement: s,
803
+ x: t,
804
+ y: s,
805
+ placement: o,
760
806
  platform: r
761
- } = t, {
807
+ } = n, {
762
808
  mainAxis: a = !0,
763
- crossAxis: d = !1,
764
- limiter: i = {
809
+ crossAxis: i = !1,
810
+ limiter: c = {
765
811
  fn: (p) => {
766
812
  let {
767
- x: k,
768
- y: x
813
+ x: C,
814
+ y: D
769
815
  } = p;
770
816
  return {
771
- x: k,
772
- y: x
817
+ x: C,
818
+ y: D
773
819
  };
774
820
  }
775
821
  },
776
822
  ...f
777
- } = pe(e, t), c = {
778
- x: n,
779
- y: o
780
- }, l = await r.detectOverflow(t, f), m = ne(le(s)), u = lt(m);
781
- let h = c[u], b = c[m];
823
+ } = ye(e, n), d = {
824
+ x: t,
825
+ y: s
826
+ }, l = await r.detectOverflow(n, f), b = ne(ce(o)), u = ct(b);
827
+ let v = d[u], m = d[b];
782
828
  if (a) {
783
- const p = u === "y" ? "top" : "left", k = u === "y" ? "bottom" : "right", x = h + l[p], $ = h - l[k];
784
- h = Pe(x, h, $);
829
+ const p = u === "y" ? "top" : "left", C = u === "y" ? "bottom" : "right", D = v + l[p], A = v - l[C];
830
+ v = Fe(D, v, A);
785
831
  }
786
- if (d) {
787
- const p = m === "y" ? "top" : "left", k = m === "y" ? "bottom" : "right", x = b + l[p], $ = b - l[k];
788
- b = Pe(x, b, $);
832
+ if (i) {
833
+ const p = b === "y" ? "top" : "left", C = b === "y" ? "bottom" : "right", D = m + l[p], A = m - l[C];
834
+ m = Fe(D, m, A);
789
835
  }
790
- const y = i.fn({
791
- ...t,
792
- [u]: h,
793
- [m]: b
836
+ const y = c.fn({
837
+ ...n,
838
+ [u]: v,
839
+ [b]: m
794
840
  });
795
841
  return {
796
842
  ...y,
797
843
  data: {
798
- x: y.x - n,
799
- y: y.y - o,
844
+ x: y.x - t,
845
+ y: y.y - s,
800
846
  enabled: {
801
847
  [u]: a,
802
- [m]: d
848
+ [b]: i
803
849
  }
804
850
  }
805
851
  };
806
852
  }
807
853
  };
808
- }, en = function(e) {
854
+ }, sn = function(e) {
809
855
  return e === void 0 && (e = {}), {
810
856
  name: "size",
811
857
  options: e,
812
- async fn(t) {
813
- var n, o;
858
+ async fn(n) {
859
+ var t, s;
814
860
  const {
815
- placement: s,
861
+ placement: o,
816
862
  rects: r,
817
863
  platform: a,
818
- elements: d
819
- } = t, {
820
- apply: i = () => {
864
+ elements: i
865
+ } = n, {
866
+ apply: c = () => {
821
867
  },
822
868
  ...f
823
- } = pe(e, t), c = await a.detectOverflow(t, f), l = le(s), m = ye(s), u = ne(s) === "y", {
824
- width: h,
825
- height: b
869
+ } = ye(e, n), d = await a.detectOverflow(n, f), l = ce(o), b = xe(o), u = ne(o) === "y", {
870
+ width: v,
871
+ height: m
826
872
  } = r.floating;
827
873
  let y, p;
828
- l === "top" || l === "bottom" ? (y = l, p = m === (await (a.isRTL == null ? void 0 : a.isRTL(d.floating)) ? "start" : "end") ? "left" : "right") : (p = l, y = m === "end" ? "top" : "bottom");
829
- const k = b - c.top - c.bottom, x = h - c.left - c.right, $ = ae(b - c[y], k), B = ae(h - c[p], x), O = !t.middlewareData.shift;
830
- let A = $, z = B;
831
- if ((n = t.middlewareData.shift) != null && n.enabled.x && (z = x), (o = t.middlewareData.shift) != null && o.enabled.y && (A = k), O && !m) {
832
- const W = q(c.left, 0), Y = q(c.right, 0), U = q(c.top, 0), w = q(c.bottom, 0);
833
- u ? z = h - 2 * (W !== 0 || Y !== 0 ? W + Y : q(c.left, c.right)) : A = b - 2 * (U !== 0 || w !== 0 ? U + w : q(c.top, c.bottom));
874
+ l === "top" || l === "bottom" ? (y = l, p = b === (await (a.isRTL == null ? void 0 : a.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (p = l, y = b === "end" ? "top" : "bottom");
875
+ const C = m - d.top - d.bottom, D = v - d.left - d.right, A = ie(m - d[y], C), T = ie(v - d[p], D), S = !n.middlewareData.shift;
876
+ let $ = A, M = T;
877
+ if ((t = n.middlewareData.shift) != null && t.enabled.x && (M = D), (s = n.middlewareData.shift) != null && s.enabled.y && ($ = C), S && !b) {
878
+ const W = q(d.left, 0), Y = q(d.right, 0), X = q(d.top, 0), x = q(d.bottom, 0);
879
+ u ? M = v - 2 * (W !== 0 || Y !== 0 ? W + Y : q(d.left, d.right)) : $ = m - 2 * (X !== 0 || x !== 0 ? X + x : q(d.top, d.bottom));
834
880
  }
835
- await i({
836
- ...t,
837
- availableWidth: z,
838
- availableHeight: A
881
+ await c({
882
+ ...n,
883
+ availableWidth: M,
884
+ availableHeight: $
839
885
  });
840
- const M = await a.getDimensions(d.floating);
841
- return h !== M.width || b !== M.height ? {
886
+ const I = await a.getDimensions(i.floating);
887
+ return v !== I.width || m !== I.height ? {
842
888
  reset: {
843
889
  rects: !0
844
890
  }
@@ -846,83 +892,83 @@ const Zt = function(e) {
846
892
  }
847
893
  };
848
894
  };
849
- function Oe() {
895
+ function ze() {
850
896
  return typeof window < "u";
851
897
  }
852
- function ue(e) {
853
- return Ke(e) ? (e.nodeName || "").toLowerCase() : "#document";
898
+ function be(e) {
899
+ return Ue(e) ? (e.nodeName || "").toLowerCase() : "#document";
854
900
  }
855
- function K(e) {
856
- var t;
857
- return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
901
+ function U(e) {
902
+ var n;
903
+ return (e == null || (n = e.ownerDocument) == null ? void 0 : n.defaultView) || window;
858
904
  }
859
905
  function te(e) {
860
- var t;
861
- return (t = (Ke(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
906
+ var n;
907
+ return (n = (Ue(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : n.documentElement;
862
908
  }
863
- function Ke(e) {
864
- return Oe() ? e instanceof Node || e instanceof K(e).Node : !1;
909
+ function Ue(e) {
910
+ return ze() ? e instanceof Node || e instanceof U(e).Node : !1;
865
911
  }
866
912
  function J(e) {
867
- return Oe() ? e instanceof Element || e instanceof K(e).Element : !1;
913
+ return ze() ? e instanceof Element || e instanceof U(e).Element : !1;
868
914
  }
869
- function ee(e) {
870
- return Oe() ? e instanceof HTMLElement || e instanceof K(e).HTMLElement : !1;
915
+ function _(e) {
916
+ return ze() ? e instanceof HTMLElement || e instanceof U(e).HTMLElement : !1;
871
917
  }
872
918
  function _e(e) {
873
- return !Oe() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof K(e).ShadowRoot;
919
+ return !ze() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof U(e).ShadowRoot;
874
920
  }
875
- const tn = /* @__PURE__ */ new Set(["inline", "contents"]);
921
+ const on = /* @__PURE__ */ new Set(["inline", "contents"]);
876
922
  function Ce(e) {
877
923
  const {
878
- overflow: t,
879
- overflowX: n,
880
- overflowY: o,
881
- display: s
924
+ overflow: n,
925
+ overflowX: t,
926
+ overflowY: s,
927
+ display: o
882
928
  } = Q(e);
883
- return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !tn.has(s);
929
+ return /auto|scroll|overlay|hidden|clip/.test(n + s + t) && !on.has(o);
884
930
  }
885
- const nn = /* @__PURE__ */ new Set(["table", "td", "th"]);
886
- function on(e) {
887
- return nn.has(ue(e));
931
+ const rn = /* @__PURE__ */ new Set(["table", "td", "th"]);
932
+ function an(e) {
933
+ return rn.has(be(e));
888
934
  }
889
- const sn = [":popover-open", ":modal"];
890
- function Ve(e) {
891
- return sn.some((t) => {
935
+ const ln = [":popover-open", ":modal"];
936
+ function Ee(e) {
937
+ return ln.some((n) => {
892
938
  try {
893
- return e.matches(t);
939
+ return e.matches(n);
894
940
  } catch {
895
941
  return !1;
896
942
  }
897
943
  });
898
944
  }
899
- const rn = ["transform", "translate", "scale", "rotate", "perspective"], an = ["transform", "translate", "scale", "rotate", "perspective", "filter"], ln = ["paint", "layout", "strict", "content"];
900
- function Ue(e) {
901
- const t = Xe(), n = J(e) ? Q(e) : e;
902
- return rn.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || an.some((o) => (n.willChange || "").includes(o)) || ln.some((o) => (n.contain || "").includes(o));
903
- }
904
- function cn(e) {
905
- let t = ie(e);
906
- for (; ee(t) && !ve(t); ) {
907
- if (Ue(t))
908
- return t;
909
- if (Ve(t))
945
+ const cn = ["transform", "translate", "scale", "rotate", "perspective"], dn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], un = ["paint", "layout", "strict", "content"];
946
+ function Xe(e) {
947
+ const n = Ye(), t = J(e) ? Q(e) : e;
948
+ return cn.some((s) => t[s] ? t[s] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !n && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !n && (t.filter ? t.filter !== "none" : !1) || dn.some((s) => (t.willChange || "").includes(s)) || un.some((s) => (t.contain || "").includes(s));
949
+ }
950
+ function fn(e) {
951
+ let n = de(e);
952
+ for (; _(n) && !pe(n); ) {
953
+ if (Xe(n))
954
+ return n;
955
+ if (Ee(n))
910
956
  return null;
911
- t = ie(t);
957
+ n = de(n);
912
958
  }
913
959
  return null;
914
960
  }
915
- function Xe() {
961
+ function Ye() {
916
962
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
917
963
  }
918
- const dn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
919
- function ve(e) {
920
- return dn.has(ue(e));
964
+ const bn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
965
+ function pe(e) {
966
+ return bn.has(be(e));
921
967
  }
922
968
  function Q(e) {
923
- return K(e).getComputedStyle(e);
969
+ return U(e).getComputedStyle(e);
924
970
  }
925
- function Se(e) {
971
+ function Me(e) {
926
972
  return J(e) ? {
927
973
  scrollLeft: e.scrollLeft,
928
974
  scrollTop: e.scrollTop
@@ -931,545 +977,545 @@ function Se(e) {
931
977
  scrollTop: e.scrollY
932
978
  };
933
979
  }
934
- function ie(e) {
935
- if (ue(e) === "html")
980
+ function de(e) {
981
+ if (be(e) === "html")
936
982
  return e;
937
- const t = (
983
+ const n = (
938
984
  // Step into the shadow DOM of the parent of a slotted node.
939
985
  e.assignedSlot || // DOM Element detected.
940
986
  e.parentNode || // ShadowRoot detected.
941
987
  _e(e) && e.host || // Fallback.
942
988
  te(e)
943
989
  );
944
- return _e(t) ? t.host : t;
990
+ return _e(n) ? n.host : n;
945
991
  }
946
- function ct(e) {
947
- const t = ie(e);
948
- return ve(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : ee(t) && Ce(t) ? t : ct(t);
992
+ function ut(e) {
993
+ const n = de(e);
994
+ return pe(n) ? e.ownerDocument ? e.ownerDocument.body : e.body : _(n) && Ce(n) ? n : ut(n);
949
995
  }
950
- function ke(e, t, n) {
951
- var o;
952
- t === void 0 && (t = []), n === void 0 && (n = !0);
953
- const s = ct(e), r = s === ((o = e.ownerDocument) == null ? void 0 : o.body), a = K(s);
996
+ function $e(e, n, t) {
997
+ var s;
998
+ n === void 0 && (n = []), t === void 0 && (t = !0);
999
+ const o = ut(e), r = o === ((s = e.ownerDocument) == null ? void 0 : s.body), a = U(o);
954
1000
  if (r) {
955
- const d = Ne(a);
956
- return t.concat(a, a.visualViewport || [], Ce(s) ? s : [], d && n ? ke(d) : []);
1001
+ const i = We(a);
1002
+ return n.concat(a, a.visualViewport || [], Ce(o) ? o : [], i && t ? $e(i) : []);
957
1003
  }
958
- return t.concat(s, ke(s, [], n));
1004
+ return n.concat(o, $e(o, [], t));
959
1005
  }
960
- function Ne(e) {
1006
+ function We(e) {
961
1007
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
962
1008
  }
963
- function dt(e) {
964
- const t = Q(e);
965
- let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
966
- const s = ee(e), r = s ? e.offsetWidth : n, a = s ? e.offsetHeight : o, d = De(n) !== r || De(o) !== a;
967
- return d && (n = r, o = a), {
968
- width: n,
969
- height: o,
970
- $: d
1009
+ function ft(e) {
1010
+ const n = Q(e);
1011
+ let t = parseFloat(n.width) || 0, s = parseFloat(n.height) || 0;
1012
+ const o = _(e), r = o ? e.offsetWidth : t, a = o ? e.offsetHeight : s, i = Ve(t) !== r || Ve(s) !== a;
1013
+ return i && (t = r, s = a), {
1014
+ width: t,
1015
+ height: s,
1016
+ $: i
971
1017
  };
972
1018
  }
973
- function Ye(e) {
1019
+ function Ge(e) {
974
1020
  return J(e) ? e : e.contextElement;
975
1021
  }
976
- function ge(e) {
977
- const t = Ye(e);
978
- if (!ee(t))
1022
+ function ve(e) {
1023
+ const n = Ge(e);
1024
+ if (!_(n))
979
1025
  return Z(1);
980
- const n = t.getBoundingClientRect(), {
981
- width: o,
982
- height: s,
1026
+ const t = n.getBoundingClientRect(), {
1027
+ width: s,
1028
+ height: o,
983
1029
  $: r
984
- } = dt(t);
985
- let a = (r ? De(n.width) : n.width) / o, d = (r ? De(n.height) : n.height) / s;
986
- return (!a || !Number.isFinite(a)) && (a = 1), (!d || !Number.isFinite(d)) && (d = 1), {
1030
+ } = ft(n);
1031
+ let a = (r ? Ve(t.width) : t.width) / s, i = (r ? Ve(t.height) : t.height) / o;
1032
+ return (!a || !Number.isFinite(a)) && (a = 1), (!i || !Number.isFinite(i)) && (i = 1), {
987
1033
  x: a,
988
- y: d
1034
+ y: i
989
1035
  };
990
1036
  }
991
- const un = /* @__PURE__ */ Z(0);
992
- function ut(e) {
993
- const t = K(e);
994
- return !Xe() || !t.visualViewport ? un : {
995
- x: t.visualViewport.offsetLeft,
996
- y: t.visualViewport.offsetTop
1037
+ const mn = /* @__PURE__ */ Z(0);
1038
+ function bt(e) {
1039
+ const n = U(e);
1040
+ return !Ye() || !n.visualViewport ? mn : {
1041
+ x: n.visualViewport.offsetLeft,
1042
+ y: n.visualViewport.offsetTop
997
1043
  };
998
1044
  }
999
- function fn(e, t, n) {
1000
- return t === void 0 && (t = !1), !n || t && n !== K(e) ? !1 : t;
1045
+ function gn(e, n, t) {
1046
+ return n === void 0 && (n = !1), !t || n && t !== U(e) ? !1 : n;
1001
1047
  }
1002
- function ce(e, t, n, o) {
1003
- t === void 0 && (t = !1), n === void 0 && (n = !1);
1004
- const s = e.getBoundingClientRect(), r = Ye(e);
1048
+ function ue(e, n, t, s) {
1049
+ n === void 0 && (n = !1), t === void 0 && (t = !1);
1050
+ const o = e.getBoundingClientRect(), r = Ge(e);
1005
1051
  let a = Z(1);
1006
- t && (o ? J(o) && (a = ge(o)) : a = ge(e));
1007
- const d = fn(r, n, o) ? ut(r) : Z(0);
1008
- let i = (s.left + d.x) / a.x, f = (s.top + d.y) / a.y, c = s.width / a.x, l = s.height / a.y;
1052
+ n && (s ? J(s) && (a = ve(s)) : a = ve(e));
1053
+ const i = gn(r, t, s) ? bt(r) : Z(0);
1054
+ let c = (o.left + i.x) / a.x, f = (o.top + i.y) / a.y, d = o.width / a.x, l = o.height / a.y;
1009
1055
  if (r) {
1010
- const m = K(r), u = o && J(o) ? K(o) : o;
1011
- let h = m, b = Ne(h);
1012
- for (; b && o && u !== h; ) {
1013
- const y = ge(b), p = b.getBoundingClientRect(), k = Q(b), x = p.left + (b.clientLeft + parseFloat(k.paddingLeft)) * y.x, $ = p.top + (b.clientTop + parseFloat(k.paddingTop)) * y.y;
1014
- i *= y.x, f *= y.y, c *= y.x, l *= y.y, i += x, f += $, h = K(b), b = Ne(h);
1056
+ const b = U(r), u = s && J(s) ? U(s) : s;
1057
+ let v = b, m = We(v);
1058
+ for (; m && s && u !== v; ) {
1059
+ const y = ve(m), p = m.getBoundingClientRect(), C = Q(m), D = p.left + (m.clientLeft + parseFloat(C.paddingLeft)) * y.x, A = p.top + (m.clientTop + parseFloat(C.paddingTop)) * y.y;
1060
+ c *= y.x, f *= y.y, d *= y.x, l *= y.y, c += D, f += A, v = U(m), m = We(v);
1015
1061
  }
1016
1062
  }
1017
- return Ae({
1018
- width: c,
1063
+ return Le({
1064
+ width: d,
1019
1065
  height: l,
1020
- x: i,
1066
+ x: c,
1021
1067
  y: f
1022
1068
  });
1023
1069
  }
1024
- function ze(e, t) {
1025
- const n = Se(e).scrollLeft;
1026
- return t ? t.left + n : ce(te(e)).left + n;
1070
+ function je(e, n) {
1071
+ const t = Me(e).scrollLeft;
1072
+ return n ? n.left + t : ue(te(e)).left + t;
1027
1073
  }
1028
- function ft(e, t) {
1029
- const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - ze(e, n), s = n.top + t.scrollTop;
1074
+ function mt(e, n) {
1075
+ const t = e.getBoundingClientRect(), s = t.left + n.scrollLeft - je(e, t), o = t.top + n.scrollTop;
1030
1076
  return {
1031
- x: o,
1032
- y: s
1077
+ x: s,
1078
+ y: o
1033
1079
  };
1034
1080
  }
1035
- function bn(e) {
1081
+ function hn(e) {
1036
1082
  let {
1037
- elements: t,
1038
- rect: n,
1039
- offsetParent: o,
1040
- strategy: s
1083
+ elements: n,
1084
+ rect: t,
1085
+ offsetParent: s,
1086
+ strategy: o
1041
1087
  } = e;
1042
- const r = s === "fixed", a = te(o), d = t ? Ve(t.floating) : !1;
1043
- if (o === a || d && r)
1044
- return n;
1045
- let i = {
1088
+ const r = o === "fixed", a = te(s), i = n ? Ee(n.floating) : !1;
1089
+ if (s === a || i && r)
1090
+ return t;
1091
+ let c = {
1046
1092
  scrollLeft: 0,
1047
1093
  scrollTop: 0
1048
1094
  }, f = Z(1);
1049
- const c = Z(0), l = ee(o);
1050
- if ((l || !l && !r) && ((ue(o) !== "body" || Ce(a)) && (i = Se(o)), ee(o))) {
1051
- const u = ce(o);
1052
- f = ge(o), c.x = u.x + o.clientLeft, c.y = u.y + o.clientTop;
1095
+ const d = Z(0), l = _(s);
1096
+ if ((l || !l && !r) && ((be(s) !== "body" || Ce(a)) && (c = Me(s)), _(s))) {
1097
+ const u = ue(s);
1098
+ f = ve(s), d.x = u.x + s.clientLeft, d.y = u.y + s.clientTop;
1053
1099
  }
1054
- const m = a && !l && !r ? ft(a, i) : Z(0);
1100
+ const b = a && !l && !r ? mt(a, c) : Z(0);
1055
1101
  return {
1056
- width: n.width * f.x,
1057
- height: n.height * f.y,
1058
- x: n.x * f.x - i.scrollLeft * f.x + c.x + m.x,
1059
- y: n.y * f.y - i.scrollTop * f.y + c.y + m.y
1102
+ width: t.width * f.x,
1103
+ height: t.height * f.y,
1104
+ x: t.x * f.x - c.scrollLeft * f.x + d.x + b.x,
1105
+ y: t.y * f.y - c.scrollTop * f.y + d.y + b.y
1060
1106
  };
1061
1107
  }
1062
- function mn(e) {
1108
+ function vn(e) {
1063
1109
  return Array.from(e.getClientRects());
1064
1110
  }
1065
- function gn(e) {
1066
- const t = te(e), n = Se(e), o = e.ownerDocument.body, s = q(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), r = q(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
1067
- let a = -n.scrollLeft + ze(e);
1068
- const d = -n.scrollTop;
1069
- return Q(o).direction === "rtl" && (a += q(t.clientWidth, o.clientWidth) - s), {
1070
- width: s,
1111
+ function pn(e) {
1112
+ const n = te(e), t = Me(e), s = e.ownerDocument.body, o = q(n.scrollWidth, n.clientWidth, s.scrollWidth, s.clientWidth), r = q(n.scrollHeight, n.clientHeight, s.scrollHeight, s.clientHeight);
1113
+ let a = -t.scrollLeft + je(e);
1114
+ const i = -t.scrollTop;
1115
+ return Q(s).direction === "rtl" && (a += q(n.clientWidth, s.clientWidth) - o), {
1116
+ width: o,
1071
1117
  height: r,
1072
1118
  x: a,
1073
- y: d
1119
+ y: i
1074
1120
  };
1075
1121
  }
1076
1122
  const et = 25;
1077
- function hn(e, t) {
1078
- const n = K(e), o = te(e), s = n.visualViewport;
1079
- let r = o.clientWidth, a = o.clientHeight, d = 0, i = 0;
1080
- if (s) {
1081
- r = s.width, a = s.height;
1082
- const c = Xe();
1083
- (!c || c && t === "fixed") && (d = s.offsetLeft, i = s.offsetTop);
1123
+ function yn(e, n) {
1124
+ const t = U(e), s = te(e), o = t.visualViewport;
1125
+ let r = s.clientWidth, a = s.clientHeight, i = 0, c = 0;
1126
+ if (o) {
1127
+ r = o.width, a = o.height;
1128
+ const d = Ye();
1129
+ (!d || d && n === "fixed") && (i = o.offsetLeft, c = o.offsetTop);
1084
1130
  }
1085
- const f = ze(o);
1131
+ const f = je(s);
1086
1132
  if (f <= 0) {
1087
- const c = o.ownerDocument, l = c.body, m = getComputedStyle(l), u = c.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, h = Math.abs(o.clientWidth - l.clientWidth - u);
1088
- h <= et && (r -= h);
1133
+ const d = s.ownerDocument, l = d.body, b = getComputedStyle(l), u = d.compatMode === "CSS1Compat" && parseFloat(b.marginLeft) + parseFloat(b.marginRight) || 0, v = Math.abs(s.clientWidth - l.clientWidth - u);
1134
+ v <= et && (r -= v);
1089
1135
  } else f <= et && (r += f);
1090
1136
  return {
1091
1137
  width: r,
1092
1138
  height: a,
1093
- x: d,
1094
- y: i
1139
+ x: i,
1140
+ y: c
1095
1141
  };
1096
1142
  }
1097
- const vn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
1098
- function pn(e, t) {
1099
- const n = ce(e, !0, t === "fixed"), o = n.top + e.clientTop, s = n.left + e.clientLeft, r = ee(e) ? ge(e) : Z(1), a = e.clientWidth * r.x, d = e.clientHeight * r.y, i = s * r.x, f = o * r.y;
1143
+ const xn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
1144
+ function wn(e, n) {
1145
+ const t = ue(e, !0, n === "fixed"), s = t.top + e.clientTop, o = t.left + e.clientLeft, r = _(e) ? ve(e) : Z(1), a = e.clientWidth * r.x, i = e.clientHeight * r.y, c = o * r.x, f = s * r.y;
1100
1146
  return {
1101
1147
  width: a,
1102
- height: d,
1103
- x: i,
1148
+ height: i,
1149
+ x: c,
1104
1150
  y: f
1105
1151
  };
1106
1152
  }
1107
- function tt(e, t, n) {
1108
- let o;
1109
- if (t === "viewport")
1110
- o = hn(e, n);
1111
- else if (t === "document")
1112
- o = gn(te(e));
1113
- else if (J(t))
1114
- o = pn(t, n);
1153
+ function tt(e, n, t) {
1154
+ let s;
1155
+ if (n === "viewport")
1156
+ s = yn(e, t);
1157
+ else if (n === "document")
1158
+ s = pn(te(e));
1159
+ else if (J(n))
1160
+ s = wn(n, t);
1115
1161
  else {
1116
- const s = ut(e);
1117
- o = {
1118
- x: t.x - s.x,
1119
- y: t.y - s.y,
1120
- width: t.width,
1121
- height: t.height
1162
+ const o = bt(e);
1163
+ s = {
1164
+ x: n.x - o.x,
1165
+ y: n.y - o.y,
1166
+ width: n.width,
1167
+ height: n.height
1122
1168
  };
1123
1169
  }
1124
- return Ae(o);
1170
+ return Le(s);
1125
1171
  }
1126
- function bt(e, t) {
1127
- const n = ie(e);
1128
- return n === t || !J(n) || ve(n) ? !1 : Q(n).position === "fixed" || bt(n, t);
1172
+ function gt(e, n) {
1173
+ const t = de(e);
1174
+ return t === n || !J(t) || pe(t) ? !1 : Q(t).position === "fixed" || gt(t, n);
1129
1175
  }
1130
- function yn(e, t) {
1131
- const n = t.get(e);
1132
- if (n)
1133
- return n;
1134
- let o = ke(e, [], !1).filter((d) => J(d) && ue(d) !== "body"), s = null;
1176
+ function kn(e, n) {
1177
+ const t = n.get(e);
1178
+ if (t)
1179
+ return t;
1180
+ let s = $e(e, [], !1).filter((i) => J(i) && be(i) !== "body"), o = null;
1135
1181
  const r = Q(e).position === "fixed";
1136
- let a = r ? ie(e) : e;
1137
- for (; J(a) && !ve(a); ) {
1138
- const d = Q(a), i = Ue(a);
1139
- !i && d.position === "fixed" && (s = null), (r ? !i && !s : !i && d.position === "static" && !!s && vn.has(s.position) || Ce(a) && !i && bt(e, a)) ? o = o.filter((c) => c !== a) : s = d, a = ie(a);
1182
+ let a = r ? de(e) : e;
1183
+ for (; J(a) && !pe(a); ) {
1184
+ const i = Q(a), c = Xe(a);
1185
+ !c && i.position === "fixed" && (o = null), (r ? !c && !o : !c && i.position === "static" && !!o && xn.has(o.position) || Ce(a) && !c && gt(e, a)) ? s = s.filter((d) => d !== a) : o = i, a = de(a);
1140
1186
  }
1141
- return t.set(e, o), o;
1187
+ return n.set(e, s), s;
1142
1188
  }
1143
- function xn(e) {
1189
+ function $n(e) {
1144
1190
  let {
1145
- element: t,
1146
- boundary: n,
1147
- rootBoundary: o,
1148
- strategy: s
1191
+ element: n,
1192
+ boundary: t,
1193
+ rootBoundary: s,
1194
+ strategy: o
1149
1195
  } = e;
1150
- const a = [...n === "clippingAncestors" ? Ve(t) ? [] : yn(t, this._c) : [].concat(n), o], d = a[0], i = a.reduce((f, c) => {
1151
- const l = tt(t, c, s);
1152
- return f.top = q(l.top, f.top), f.right = ae(l.right, f.right), f.bottom = ae(l.bottom, f.bottom), f.left = q(l.left, f.left), f;
1153
- }, tt(t, d, s));
1196
+ const a = [...t === "clippingAncestors" ? Ee(n) ? [] : kn(n, this._c) : [].concat(t), s], i = a[0], c = a.reduce((f, d) => {
1197
+ const l = tt(n, d, o);
1198
+ return f.top = q(l.top, f.top), f.right = ie(l.right, f.right), f.bottom = ie(l.bottom, f.bottom), f.left = q(l.left, f.left), f;
1199
+ }, tt(n, i, o));
1154
1200
  return {
1155
- width: i.right - i.left,
1156
- height: i.bottom - i.top,
1157
- x: i.left,
1158
- y: i.top
1201
+ width: c.right - c.left,
1202
+ height: c.bottom - c.top,
1203
+ x: c.left,
1204
+ y: c.top
1159
1205
  };
1160
1206
  }
1161
- function wn(e) {
1207
+ function Cn(e) {
1162
1208
  const {
1163
- width: t,
1164
- height: n
1165
- } = dt(e);
1209
+ width: n,
1210
+ height: t
1211
+ } = ft(e);
1166
1212
  return {
1167
- width: t,
1168
- height: n
1213
+ width: n,
1214
+ height: t
1169
1215
  };
1170
1216
  }
1171
- function kn(e, t, n) {
1172
- const o = ee(t), s = te(t), r = n === "fixed", a = ce(e, !0, r, t);
1173
- let d = {
1217
+ function Dn(e, n, t) {
1218
+ const s = _(n), o = te(n), r = t === "fixed", a = ue(e, !0, r, n);
1219
+ let i = {
1174
1220
  scrollLeft: 0,
1175
1221
  scrollTop: 0
1176
1222
  };
1177
- const i = Z(0);
1223
+ const c = Z(0);
1178
1224
  function f() {
1179
- i.x = ze(s);
1225
+ c.x = je(o);
1180
1226
  }
1181
- if (o || !o && !r)
1182
- if ((ue(t) !== "body" || Ce(s)) && (d = Se(t)), o) {
1183
- const u = ce(t, !0, r, t);
1184
- i.x = u.x + t.clientLeft, i.y = u.y + t.clientTop;
1185
- } else s && f();
1186
- r && !o && s && f();
1187
- const c = s && !o && !r ? ft(s, d) : Z(0), l = a.left + d.scrollLeft - i.x - c.x, m = a.top + d.scrollTop - i.y - c.y;
1227
+ if (s || !s && !r)
1228
+ if ((be(n) !== "body" || Ce(o)) && (i = Me(n)), s) {
1229
+ const u = ue(n, !0, r, n);
1230
+ c.x = u.x + n.clientLeft, c.y = u.y + n.clientTop;
1231
+ } else o && f();
1232
+ r && !s && o && f();
1233
+ const d = o && !s && !r ? mt(o, i) : Z(0), l = a.left + i.scrollLeft - c.x - d.x, b = a.top + i.scrollTop - c.y - d.y;
1188
1234
  return {
1189
1235
  x: l,
1190
- y: m,
1236
+ y: b,
1191
1237
  width: a.width,
1192
1238
  height: a.height
1193
1239
  };
1194
1240
  }
1195
- function Me(e) {
1241
+ function Ie(e) {
1196
1242
  return Q(e).position === "static";
1197
1243
  }
1198
- function nt(e, t) {
1199
- if (!ee(e) || Q(e).position === "fixed")
1244
+ function nt(e, n) {
1245
+ if (!_(e) || Q(e).position === "fixed")
1200
1246
  return null;
1201
- if (t)
1202
- return t(e);
1203
- let n = e.offsetParent;
1204
- return te(e) === n && (n = n.ownerDocument.body), n;
1205
- }
1206
- function mt(e, t) {
1207
- const n = K(e);
1208
- if (Ve(e))
1209
- return n;
1210
- if (!ee(e)) {
1211
- let s = ie(e);
1212
- for (; s && !ve(s); ) {
1213
- if (J(s) && !Me(s))
1214
- return s;
1215
- s = ie(s);
1247
+ if (n)
1248
+ return n(e);
1249
+ let t = e.offsetParent;
1250
+ return te(e) === t && (t = t.ownerDocument.body), t;
1251
+ }
1252
+ function ht(e, n) {
1253
+ const t = U(e);
1254
+ if (Ee(e))
1255
+ return t;
1256
+ if (!_(e)) {
1257
+ let o = de(e);
1258
+ for (; o && !pe(o); ) {
1259
+ if (J(o) && !Ie(o))
1260
+ return o;
1261
+ o = de(o);
1216
1262
  }
1217
- return n;
1263
+ return t;
1218
1264
  }
1219
- let o = nt(e, t);
1220
- for (; o && on(o) && Me(o); )
1221
- o = nt(o, t);
1222
- return o && ve(o) && Me(o) && !Ue(o) ? n : o || cn(e) || n;
1265
+ let s = nt(e, n);
1266
+ for (; s && an(s) && Ie(s); )
1267
+ s = nt(s, n);
1268
+ return s && pe(s) && Ie(s) && !Xe(s) ? t : s || fn(e) || t;
1223
1269
  }
1224
- const Cn = async function(e) {
1225
- const t = this.getOffsetParent || mt, n = this.getDimensions, o = await n(e.floating);
1270
+ const Tn = async function(e) {
1271
+ const n = this.getOffsetParent || ht, t = this.getDimensions, s = await t(e.floating);
1226
1272
  return {
1227
- reference: kn(e.reference, await t(e.floating), e.strategy),
1273
+ reference: Dn(e.reference, await n(e.floating), e.strategy),
1228
1274
  floating: {
1229
1275
  x: 0,
1230
1276
  y: 0,
1231
- width: o.width,
1232
- height: o.height
1277
+ width: s.width,
1278
+ height: s.height
1233
1279
  }
1234
1280
  };
1235
1281
  };
1236
- function Fn(e) {
1282
+ function Vn(e) {
1237
1283
  return Q(e).direction === "rtl";
1238
1284
  }
1239
- const $n = {
1240
- convertOffsetParentRelativeRectToViewportRelativeRect: bn,
1285
+ const Rn = {
1286
+ convertOffsetParentRelativeRectToViewportRelativeRect: hn,
1241
1287
  getDocumentElement: te,
1242
- getClippingRect: xn,
1243
- getOffsetParent: mt,
1244
- getElementRects: Cn,
1245
- getClientRects: mn,
1246
- getDimensions: wn,
1247
- getScale: ge,
1288
+ getClippingRect: $n,
1289
+ getOffsetParent: ht,
1290
+ getElementRects: Tn,
1291
+ getClientRects: vn,
1292
+ getDimensions: Cn,
1293
+ getScale: ve,
1248
1294
  isElement: J,
1249
- isRTL: Fn
1295
+ isRTL: Vn
1250
1296
  };
1251
- function gt(e, t) {
1252
- return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
1297
+ function vt(e, n) {
1298
+ return e.x === n.x && e.y === n.y && e.width === n.width && e.height === n.height;
1253
1299
  }
1254
- function Dn(e, t) {
1255
- let n = null, o;
1256
- const s = te(e);
1300
+ function Ln(e, n) {
1301
+ let t = null, s;
1302
+ const o = te(e);
1257
1303
  function r() {
1258
- var d;
1259
- clearTimeout(o), (d = n) == null || d.disconnect(), n = null;
1304
+ var i;
1305
+ clearTimeout(s), (i = t) == null || i.disconnect(), t = null;
1260
1306
  }
1261
- function a(d, i) {
1262
- d === void 0 && (d = !1), i === void 0 && (i = 1), r();
1307
+ function a(i, c) {
1308
+ i === void 0 && (i = !1), c === void 0 && (c = 1), r();
1263
1309
  const f = e.getBoundingClientRect(), {
1264
- left: c,
1310
+ left: d,
1265
1311
  top: l,
1266
- width: m,
1312
+ width: b,
1267
1313
  height: u
1268
1314
  } = f;
1269
- if (d || t(), !m || !u)
1315
+ if (i || n(), !b || !u)
1270
1316
  return;
1271
- const h = Fe(l), b = Fe(s.clientWidth - (c + m)), y = Fe(s.clientHeight - (l + u)), p = Fe(c), x = {
1272
- rootMargin: -h + "px " + -b + "px " + -y + "px " + -p + "px",
1273
- threshold: q(0, ae(1, i)) || 1
1317
+ const v = De(l), m = De(o.clientWidth - (d + b)), y = De(o.clientHeight - (l + u)), p = De(d), D = {
1318
+ rootMargin: -v + "px " + -m + "px " + -y + "px " + -p + "px",
1319
+ threshold: q(0, ie(1, c)) || 1
1274
1320
  };
1275
- let $ = !0;
1276
- function B(O) {
1277
- const A = O[0].intersectionRatio;
1278
- if (A !== i) {
1279
- if (!$)
1321
+ let A = !0;
1322
+ function T(S) {
1323
+ const $ = S[0].intersectionRatio;
1324
+ if ($ !== c) {
1325
+ if (!A)
1280
1326
  return a();
1281
- A ? a(!1, A) : o = setTimeout(() => {
1327
+ $ ? a(!1, $) : s = setTimeout(() => {
1282
1328
  a(!1, 1e-7);
1283
1329
  }, 1e3);
1284
1330
  }
1285
- A === 1 && !gt(f, e.getBoundingClientRect()) && a(), $ = !1;
1331
+ $ === 1 && !vt(f, e.getBoundingClientRect()) && a(), A = !1;
1286
1332
  }
1287
1333
  try {
1288
- n = new IntersectionObserver(B, {
1289
- ...x,
1334
+ t = new IntersectionObserver(T, {
1335
+ ...D,
1290
1336
  // Handle <iframe>s
1291
- root: s.ownerDocument
1337
+ root: o.ownerDocument
1292
1338
  });
1293
1339
  } catch {
1294
- n = new IntersectionObserver(B, x);
1340
+ t = new IntersectionObserver(T, D);
1295
1341
  }
1296
- n.observe(e);
1342
+ t.observe(e);
1297
1343
  }
1298
1344
  return a(!0), r;
1299
1345
  }
1300
- function En(e, t, n, o) {
1301
- o === void 0 && (o = {});
1346
+ function Sn(e, n, t, s) {
1347
+ s === void 0 && (s = {});
1302
1348
  const {
1303
- ancestorScroll: s = !0,
1349
+ ancestorScroll: o = !0,
1304
1350
  ancestorResize: r = !0,
1305
1351
  elementResize: a = typeof ResizeObserver == "function",
1306
- layoutShift: d = typeof IntersectionObserver == "function",
1307
- animationFrame: i = !1
1308
- } = o, f = Ye(e), c = s || r ? [...f ? ke(f) : [], ...ke(t)] : [];
1309
- c.forEach((p) => {
1310
- s && p.addEventListener("scroll", n, {
1352
+ layoutShift: i = typeof IntersectionObserver == "function",
1353
+ animationFrame: c = !1
1354
+ } = s, f = Ge(e), d = o || r ? [...f ? $e(f) : [], ...$e(n)] : [];
1355
+ d.forEach((p) => {
1356
+ o && p.addEventListener("scroll", t, {
1311
1357
  passive: !0
1312
- }), r && p.addEventListener("resize", n);
1358
+ }), r && p.addEventListener("resize", t);
1313
1359
  });
1314
- const l = f && d ? Dn(f, n) : null;
1315
- let m = -1, u = null;
1360
+ const l = f && i ? Ln(f, t) : null;
1361
+ let b = -1, u = null;
1316
1362
  a && (u = new ResizeObserver((p) => {
1317
- let [k] = p;
1318
- k && k.target === f && u && (u.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1319
- var x;
1320
- (x = u) == null || x.observe(t);
1321
- })), n();
1322
- }), f && !i && u.observe(f), u.observe(t));
1323
- let h, b = i ? ce(e) : null;
1324
- i && y();
1363
+ let [C] = p;
1364
+ C && C.target === f && u && (u.unobserve(n), cancelAnimationFrame(b), b = requestAnimationFrame(() => {
1365
+ var D;
1366
+ (D = u) == null || D.observe(n);
1367
+ })), t();
1368
+ }), f && !c && u.observe(f), u.observe(n));
1369
+ let v, m = c ? ue(e) : null;
1370
+ c && y();
1325
1371
  function y() {
1326
- const p = ce(e);
1327
- b && !gt(b, p) && n(), b = p, h = requestAnimationFrame(y);
1372
+ const p = ue(e);
1373
+ m && !vt(m, p) && t(), m = p, v = requestAnimationFrame(y);
1328
1374
  }
1329
- return n(), () => {
1375
+ return t(), () => {
1330
1376
  var p;
1331
- c.forEach((k) => {
1332
- s && k.removeEventListener("scroll", n), r && k.removeEventListener("resize", n);
1333
- }), l == null || l(), (p = u) == null || p.disconnect(), u = null, i && cancelAnimationFrame(h);
1377
+ d.forEach((C) => {
1378
+ o && C.removeEventListener("scroll", t), r && C.removeEventListener("resize", t);
1379
+ }), l == null || l(), (p = u) == null || p.disconnect(), u = null, c && cancelAnimationFrame(v);
1334
1380
  };
1335
1381
  }
1336
- const ht = Zt, vt = _t, pt = Gt, An = en, Bn = Yt, Tn = (e, t, n) => {
1337
- const o = /* @__PURE__ */ new Map(), s = {
1338
- platform: $n,
1339
- ...n
1382
+ const pt = tn, yt = nn, xt = Zt, Bn = sn, An = Qt, On = (e, n, t) => {
1383
+ const s = /* @__PURE__ */ new Map(), o = {
1384
+ platform: Rn,
1385
+ ...t
1340
1386
  }, r = {
1341
- ...s.platform,
1342
- _c: o
1387
+ ...o.platform,
1388
+ _c: s
1343
1389
  };
1344
- return Xt(e, t, {
1345
- ...s,
1390
+ return Jt(e, n, {
1391
+ ...o,
1346
1392
  platform: r
1347
1393
  });
1348
1394
  };
1349
- function Rn(e) {
1395
+ function zn(e) {
1350
1396
  return e != null && typeof e == "object" && "$el" in e;
1351
1397
  }
1352
- function We(e) {
1353
- if (Rn(e)) {
1354
- const t = e.$el;
1355
- return Ke(t) && ue(t) === "#comment" ? null : t;
1398
+ function He(e) {
1399
+ if (zn(e)) {
1400
+ const n = e.$el;
1401
+ return Ue(n) && be(n) === "#comment" ? null : n;
1356
1402
  }
1357
1403
  return e;
1358
1404
  }
1359
- function me(e) {
1360
- return typeof e == "function" ? e() : R(e);
1405
+ function ge(e) {
1406
+ return typeof e == "function" ? e() : B(e);
1361
1407
  }
1362
- function Ln(e) {
1408
+ function En(e) {
1363
1409
  return {
1364
1410
  name: "arrow",
1365
1411
  options: e,
1366
- fn(t) {
1367
- const n = We(me(e.element));
1368
- return n == null ? {} : Bn({
1369
- element: n,
1412
+ fn(n) {
1413
+ const t = He(ge(e.element));
1414
+ return t == null ? {} : An({
1415
+ element: t,
1370
1416
  padding: e.padding
1371
- }).fn(t);
1417
+ }).fn(n);
1372
1418
  }
1373
1419
  };
1374
1420
  }
1375
- function yt(e) {
1421
+ function wt(e) {
1376
1422
  return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1377
1423
  }
1378
- function ot(e, t) {
1379
- const n = yt(e);
1380
- return Math.round(t * n) / n;
1424
+ function st(e, n) {
1425
+ const t = wt(e);
1426
+ return Math.round(n * t) / t;
1381
1427
  }
1382
- function xt(e, t, n) {
1383
- n === void 0 && (n = {});
1384
- const o = n.whileElementsMounted, s = C(() => {
1385
- var A;
1386
- return (A = me(n.open)) != null ? A : !0;
1387
- }), r = C(() => me(n.middleware)), a = C(() => {
1388
- var A;
1389
- return (A = me(n.placement)) != null ? A : "bottom";
1390
- }), d = C(() => {
1391
- var A;
1392
- return (A = me(n.strategy)) != null ? A : "absolute";
1393
- }), i = C(() => {
1394
- var A;
1395
- return (A = me(n.transform)) != null ? A : !0;
1396
- }), f = C(() => We(e.value)), c = C(() => We(t.value)), l = j(0), m = j(0), u = j(d.value), h = j(a.value), b = Ct({}), y = j(!1), p = C(() => {
1397
- const A = {
1428
+ function kt(e, n, t) {
1429
+ t === void 0 && (t = {});
1430
+ const s = t.whileElementsMounted, o = w(() => {
1431
+ var $;
1432
+ return ($ = ge(t.open)) != null ? $ : !0;
1433
+ }), r = w(() => ge(t.middleware)), a = w(() => {
1434
+ var $;
1435
+ return ($ = ge(t.placement)) != null ? $ : "bottom";
1436
+ }), i = w(() => {
1437
+ var $;
1438
+ return ($ = ge(t.strategy)) != null ? $ : "absolute";
1439
+ }), c = w(() => {
1440
+ var $;
1441
+ return ($ = ge(t.transform)) != null ? $ : !0;
1442
+ }), f = w(() => He(e.value)), d = w(() => He(n.value)), l = j(0), b = j(0), u = j(i.value), v = j(a.value), m = Tt({}), y = j(!1), p = w(() => {
1443
+ const $ = {
1398
1444
  position: u.value,
1399
1445
  left: "0",
1400
1446
  top: "0"
1401
1447
  };
1402
- if (!c.value)
1403
- return A;
1404
- const z = ot(c.value, l.value), M = ot(c.value, m.value);
1405
- return i.value ? {
1406
- ...A,
1407
- transform: "translate(" + z + "px, " + M + "px)",
1408
- ...yt(c.value) >= 1.5 && {
1448
+ if (!d.value)
1449
+ return $;
1450
+ const M = st(d.value, l.value), I = st(d.value, b.value);
1451
+ return c.value ? {
1452
+ ...$,
1453
+ transform: "translate(" + M + "px, " + I + "px)",
1454
+ ...wt(d.value) >= 1.5 && {
1409
1455
  willChange: "transform"
1410
1456
  }
1411
1457
  } : {
1412
1458
  position: u.value,
1413
- left: z + "px",
1414
- top: M + "px"
1459
+ left: M + "px",
1460
+ top: I + "px"
1415
1461
  };
1416
1462
  });
1417
- let k;
1418
- function x() {
1419
- if (f.value == null || c.value == null)
1463
+ let C;
1464
+ function D() {
1465
+ if (f.value == null || d.value == null)
1420
1466
  return;
1421
- const A = s.value;
1422
- Tn(f.value, c.value, {
1467
+ const $ = o.value;
1468
+ On(f.value, d.value, {
1423
1469
  middleware: r.value,
1424
1470
  placement: a.value,
1425
- strategy: d.value
1426
- }).then((z) => {
1427
- l.value = z.x, m.value = z.y, u.value = z.strategy, h.value = z.placement, b.value = z.middlewareData, y.value = A !== !1;
1471
+ strategy: i.value
1472
+ }).then((M) => {
1473
+ l.value = M.x, b.value = M.y, u.value = M.strategy, v.value = M.placement, m.value = M.middlewareData, y.value = $ !== !1;
1428
1474
  });
1429
1475
  }
1430
- function $() {
1431
- typeof k == "function" && (k(), k = void 0);
1476
+ function A() {
1477
+ typeof C == "function" && (C(), C = void 0);
1432
1478
  }
1433
- function B() {
1434
- if ($(), o === void 0) {
1435
- x();
1479
+ function T() {
1480
+ if (A(), s === void 0) {
1481
+ D();
1436
1482
  return;
1437
1483
  }
1438
- if (f.value != null && c.value != null) {
1439
- k = o(f.value, c.value, x);
1484
+ if (f.value != null && d.value != null) {
1485
+ C = s(f.value, d.value, D);
1440
1486
  return;
1441
1487
  }
1442
1488
  }
1443
- function O() {
1444
- s.value || (y.value = !1);
1489
+ function S() {
1490
+ o.value || (y.value = !1);
1445
1491
  }
1446
- return we([r, a, d, s], x, {
1492
+ return he([r, a, i, o], D, {
1447
1493
  flush: "sync"
1448
- }), we([f, c], B, {
1494
+ }), he([f, d], T, {
1449
1495
  flush: "sync"
1450
- }), we(s, O, {
1496
+ }), he(o, S, {
1451
1497
  flush: "sync"
1452
- }), Ft() && $t($), {
1453
- x: be(l),
1454
- y: be(m),
1455
- strategy: be(u),
1456
- placement: be(h),
1457
- middlewareData: be(b),
1458
- isPositioned: be(y),
1498
+ }), Vt() && Rt(A), {
1499
+ x: me(l),
1500
+ y: me(b),
1501
+ strategy: me(u),
1502
+ placement: me(v),
1503
+ middlewareData: me(m),
1504
+ isPositioned: me(y),
1459
1505
  floatingStyles: p,
1460
- update: x
1506
+ update: D
1461
1507
  };
1462
1508
  }
1463
- const On = /* @__PURE__ */ S({
1509
+ const Mn = /* @__PURE__ */ z({
1464
1510
  inheritAttrs: !1,
1465
1511
  __name: "DsIconCheck",
1466
1512
  setup(e) {
1467
- return (t, n) => (g(), v("svg", de({
1513
+ return (n, t) => (g(), h("svg", fe({
1468
1514
  fill: "none",
1469
1515
  stroke: "currentColor",
1470
1516
  viewBox: "0 0 24 24"
1471
- }, t.$attrs, { "aria-hidden": "true" }), [...n[0] || (n[0] = [
1472
- F("path", {
1517
+ }, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
1518
+ k("path", {
1473
1519
  "stroke-linecap": "round",
1474
1520
  "stroke-linejoin": "round",
1475
1521
  "stroke-width": "2",
@@ -1477,16 +1523,16 @@ const On = /* @__PURE__ */ S({
1477
1523
  }, null, -1)
1478
1524
  ])], 16));
1479
1525
  }
1480
- }), Ge = /* @__PURE__ */ S({
1526
+ }), Pe = /* @__PURE__ */ z({
1481
1527
  inheritAttrs: !1,
1482
1528
  __name: "DsIconChevronDown",
1483
1529
  setup(e) {
1484
- return (t, n) => (g(), v("svg", de({
1530
+ return (n, t) => (g(), h("svg", fe({
1485
1531
  fill: "none",
1486
1532
  stroke: "currentColor",
1487
1533
  viewBox: "0 0 24 24"
1488
- }, t.$attrs, { "aria-hidden": "true" }), [...n[0] || (n[0] = [
1489
- F("path", {
1534
+ }, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
1535
+ k("path", {
1490
1536
  "stroke-linecap": "round",
1491
1537
  "stroke-linejoin": "round",
1492
1538
  "stroke-width": "2",
@@ -1494,16 +1540,16 @@ const On = /* @__PURE__ */ S({
1494
1540
  }, null, -1)
1495
1541
  ])], 16));
1496
1542
  }
1497
- }), Vn = /* @__PURE__ */ S({
1543
+ }), jn = /* @__PURE__ */ z({
1498
1544
  inheritAttrs: !1,
1499
1545
  __name: "DsIconChevronUp",
1500
1546
  setup(e) {
1501
- return (t, n) => (g(), v("svg", de({
1547
+ return (n, t) => (g(), h("svg", fe({
1502
1548
  fill: "none",
1503
1549
  stroke: "currentColor",
1504
1550
  viewBox: "0 0 24 24"
1505
- }, t.$attrs, { "aria-hidden": "true" }), [...n[0] || (n[0] = [
1506
- F("path", {
1551
+ }, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
1552
+ k("path", {
1507
1553
  "stroke-linecap": "round",
1508
1554
  "stroke-linejoin": "round",
1509
1555
  "stroke-width": "2",
@@ -1511,16 +1557,16 @@ const On = /* @__PURE__ */ S({
1511
1557
  }, null, -1)
1512
1558
  ])], 16));
1513
1559
  }
1514
- }), Sn = /* @__PURE__ */ S({
1560
+ }), Pn = /* @__PURE__ */ z({
1515
1561
  inheritAttrs: !1,
1516
1562
  __name: "DsIconInfo",
1517
1563
  setup(e) {
1518
- return (t, n) => (g(), v("svg", de({
1564
+ return (n, t) => (g(), h("svg", fe({
1519
1565
  fill: "none",
1520
1566
  stroke: "currentColor",
1521
1567
  viewBox: "0 0 24 24"
1522
- }, t.$attrs, { "aria-hidden": "true" }), [...n[0] || (n[0] = [
1523
- F("path", {
1568
+ }, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
1569
+ k("path", {
1524
1570
  "stroke-linecap": "round",
1525
1571
  "stroke-linejoin": "round",
1526
1572
  "stroke-width": "2",
@@ -1528,16 +1574,16 @@ const On = /* @__PURE__ */ S({
1528
1574
  }, null, -1)
1529
1575
  ])], 16));
1530
1576
  }
1531
- }), zn = /* @__PURE__ */ S({
1577
+ }), In = /* @__PURE__ */ z({
1532
1578
  inheritAttrs: !1,
1533
1579
  __name: "DsIconSort",
1534
1580
  setup(e) {
1535
- return (t, n) => (g(), v("svg", de({
1581
+ return (n, t) => (g(), h("svg", fe({
1536
1582
  fill: "none",
1537
1583
  stroke: "currentColor",
1538
1584
  viewBox: "0 0 24 24"
1539
- }, t.$attrs, { "aria-hidden": "true" }), [...n[0] || (n[0] = [
1540
- F("path", {
1585
+ }, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
1586
+ k("path", {
1541
1587
  "stroke-linecap": "round",
1542
1588
  "stroke-linejoin": "round",
1543
1589
  "stroke-width": "2",
@@ -1545,16 +1591,16 @@ const On = /* @__PURE__ */ S({
1545
1591
  }, null, -1)
1546
1592
  ])], 16));
1547
1593
  }
1548
- }), wt = /* @__PURE__ */ S({
1594
+ }), $t = /* @__PURE__ */ z({
1549
1595
  inheritAttrs: !1,
1550
1596
  __name: "DsIconWarning",
1551
1597
  setup(e) {
1552
- return (t, n) => (g(), v("svg", de({
1598
+ return (n, t) => (g(), h("svg", fe({
1553
1599
  fill: "none",
1554
1600
  stroke: "currentColor",
1555
1601
  viewBox: "0 0 24 24"
1556
- }, t.$attrs, { "aria-hidden": "true" }), [...n[0] || (n[0] = [
1557
- F("path", {
1602
+ }, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
1603
+ k("path", {
1558
1604
  "stroke-linecap": "round",
1559
1605
  "stroke-linejoin": "round",
1560
1606
  "stroke-width": "2",
@@ -1562,16 +1608,16 @@ const On = /* @__PURE__ */ S({
1562
1608
  }, null, -1)
1563
1609
  ])], 16));
1564
1610
  }
1565
- }), Be = /* @__PURE__ */ S({
1611
+ }), Se = /* @__PURE__ */ z({
1566
1612
  inheritAttrs: !1,
1567
1613
  __name: "DsIconX",
1568
1614
  setup(e) {
1569
- return (t, n) => (g(), v("svg", de({
1615
+ return (n, t) => (g(), h("svg", fe({
1570
1616
  fill: "none",
1571
1617
  stroke: "currentColor",
1572
1618
  viewBox: "0 0 24 24"
1573
- }, t.$attrs, { "aria-hidden": "true" }), [...n[0] || (n[0] = [
1574
- F("path", {
1619
+ }, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
1620
+ k("path", {
1575
1621
  "stroke-linecap": "round",
1576
1622
  "stroke-linejoin": "round",
1577
1623
  "stroke-width": "2",
@@ -1580,15 +1626,15 @@ const On = /* @__PURE__ */ S({
1580
1626
  ])], 16));
1581
1627
  }
1582
1628
  });
1583
- let Mn = 0;
1584
- function fe(e = "ds") {
1585
- return `${e}-${++Mn}`;
1629
+ let Fn = 0;
1630
+ function se(e = "ds") {
1631
+ return `${e}-${++Fn}`;
1586
1632
  }
1587
- const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-selected", "aria-disabled", "onClick", "onMouseenter"], Nn = {
1633
+ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-selected", "aria-disabled", "onClick", "onMouseenter"], qn = {
1588
1634
  key: 0,
1589
1635
  class: "px-3 py-2 text-sm text-fg-disabled",
1590
1636
  role: "status"
1591
- }, ls = /* @__PURE__ */ S({
1637
+ }, xo = /* @__PURE__ */ z({
1592
1638
  __name: "DsDropdownSelect",
1593
1639
  props: {
1594
1640
  modelValue: {},
@@ -1603,185 +1649,251 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
1603
1649
  emptyText: { default: "No options available" }
1604
1650
  },
1605
1651
  emits: ["update:modelValue", "change"],
1606
- setup(e, { emit: t }) {
1607
- const n = e, o = t, s = j(), r = j(), a = j(!1), d = fe("listbox"), i = j(-1), f = C(() => {
1608
- if (!(!a.value || i.value < 0))
1609
- return c(i.value);
1610
- }), c = (w) => `${d}-option-${w}`, { floatingStyles: l } = xt(s, r, {
1652
+ setup(e, { emit: n }) {
1653
+ const t = e, s = n, o = j(), r = j(), a = j(!1), i = se("listbox"), c = j(-1), f = w(() => {
1654
+ if (!(!a.value || c.value < 0))
1655
+ return d(c.value);
1656
+ }), d = (x) => `${i}-option-${x}`, { floatingStyles: l } = kt(o, r, {
1611
1657
  placement: "bottom-start",
1612
1658
  middleware: [
1613
- ht(4),
1614
- pt(),
1615
- vt({ padding: 8 }),
1616
- An({
1617
- apply({ rects: w }) {
1659
+ pt(4),
1660
+ xt(),
1661
+ yt({ padding: 8 }),
1662
+ Bn({
1663
+ apply({ rects: x }) {
1618
1664
  r.value && Object.assign(r.value.style, {
1619
- minWidth: `${w.reference.width}px`
1665
+ minWidth: `${x.reference.width}px`
1620
1666
  });
1621
1667
  }
1622
1668
  })
1623
1669
  ],
1624
- whileElementsMounted: En
1625
- }), m = C(() => n.modelValue), u = C(() => n.options.find((w) => b(w) === m.value)), h = C(() => u.value ? y(u.value) : ""), b = (w) => typeof w == "object" && w !== null ? w.value : w, y = (w) => typeof w == "object" && w !== null ? w.label : String(w), p = (w) => typeof w == "object" && w !== null && w.disabled || !1, k = () => {
1626
- je(() => {
1627
- const w = r.value;
1628
- if (!w || i.value < 0) return;
1629
- const L = w.querySelector(`#${c(i.value)}`);
1630
- L == null || L.scrollIntoView({ block: "nearest" });
1670
+ whileElementsMounted: Sn
1671
+ }), b = w(() => t.modelValue), u = w(() => t.options.find((x) => m(x) === b.value)), v = w(() => u.value ? y(u.value) : ""), m = (x) => typeof x == "object" && x !== null ? x.value : x, y = (x) => typeof x == "object" && x !== null ? x.label : String(x), p = (x) => typeof x == "object" && x !== null && x.disabled || !1, C = () => {
1672
+ ke(() => {
1673
+ const x = r.value;
1674
+ if (!x || c.value < 0) return;
1675
+ const O = x.querySelector(`#${d(c.value)}`);
1676
+ O == null || O.scrollIntoView({ block: "nearest" });
1631
1677
  });
1632
- }, x = (w, L) => {
1633
- let V = w;
1634
- for (; V >= 0 && V < n.options.length; ) {
1635
- if (!p(n.options[V])) return V;
1636
- V += L;
1678
+ }, D = (x, O) => {
1679
+ let E = x;
1680
+ for (; E >= 0 && E < t.options.length; ) {
1681
+ if (!p(t.options[E])) return E;
1682
+ E += O;
1637
1683
  }
1638
1684
  return -1;
1639
- }, $ = () => {
1640
- const w = x(i.value + 1, 1);
1641
- w >= 0 && (i.value = w, k());
1642
- }, B = () => {
1643
- const w = x(i.value - 1, -1);
1644
- w >= 0 && (i.value = w, k());
1645
- }, O = () => {
1646
- const w = x(0, 1);
1647
- w >= 0 && (i.value = w, k());
1648
1685
  }, A = () => {
1649
- const w = x(n.options.length - 1, -1);
1650
- w >= 0 && (i.value = w, k());
1651
- }, z = () => {
1652
- n.disabled || n.loading || (a.value = !0, je(() => {
1653
- const w = n.options.findIndex(
1654
- (L) => b(L) === m.value
1686
+ const x = D(c.value + 1, 1);
1687
+ x >= 0 && (c.value = x, C());
1688
+ }, T = () => {
1689
+ const x = D(c.value - 1, -1);
1690
+ x >= 0 && (c.value = x, C());
1691
+ }, S = () => {
1692
+ const x = D(0, 1);
1693
+ x >= 0 && (c.value = x, C());
1694
+ }, $ = () => {
1695
+ const x = D(t.options.length - 1, -1);
1696
+ x >= 0 && (c.value = x, C());
1697
+ }, M = () => {
1698
+ t.disabled || t.loading || (a.value = !0, ke(() => {
1699
+ const x = t.options.findIndex(
1700
+ (O) => m(O) === b.value
1655
1701
  );
1656
- w >= 0 && !p(n.options[w]) ? i.value = w : O(), k();
1702
+ x >= 0 && !p(t.options[x]) ? c.value = x : S(), C();
1657
1703
  }));
1658
- }, M = () => {
1659
- a.value = !1, i.value = -1;
1704
+ }, I = () => {
1705
+ a.value = !1, c.value = -1;
1660
1706
  }, W = () => {
1661
- n.disabled || n.loading || (a.value ? M() : z());
1662
- }, Y = (w) => {
1663
- if (p(w)) return;
1664
- const L = b(w);
1665
- o("update:modelValue", L), o("change", L, w), M();
1666
- }, U = (w) => {
1667
- if (!(n.disabled || n.loading)) {
1707
+ t.disabled || t.loading || (a.value ? I() : M());
1708
+ }, Y = (x) => {
1709
+ if (p(x)) return;
1710
+ const O = m(x);
1711
+ s("update:modelValue", O), s("change", O, x), I();
1712
+ }, X = (x) => {
1713
+ if (!(t.disabled || t.loading)) {
1668
1714
  if (!a.value) {
1669
- (w.key === "ArrowDown" || w.key === "ArrowUp" || w.key === "Enter" || w.key === " ") && (w.preventDefault(), z());
1715
+ (x.key === "ArrowDown" || x.key === "ArrowUp" || x.key === "Enter" || x.key === " ") && (x.preventDefault(), M());
1670
1716
  return;
1671
1717
  }
1672
- switch (w.key) {
1718
+ switch (x.key) {
1673
1719
  case "ArrowDown":
1674
- w.preventDefault(), i.value < 0 ? O() : $();
1720
+ x.preventDefault(), c.value < 0 ? S() : A();
1675
1721
  break;
1676
1722
  case "ArrowUp":
1677
- w.preventDefault(), i.value < 0 ? A() : B();
1723
+ x.preventDefault(), c.value < 0 ? $() : T();
1678
1724
  break;
1679
1725
  case "Home":
1680
- w.preventDefault(), O();
1726
+ x.preventDefault(), S();
1681
1727
  break;
1682
1728
  case "End":
1683
- w.preventDefault(), A();
1729
+ x.preventDefault(), $();
1684
1730
  break;
1685
1731
  case "Enter":
1686
1732
  case " ":
1687
- w.preventDefault(), i.value >= 0 && i.value < n.options.length && Y(n.options[i.value]);
1733
+ x.preventDefault(), c.value >= 0 && c.value < t.options.length && Y(t.options[c.value]);
1688
1734
  break;
1689
1735
  case "Escape":
1690
- w.preventDefault(), M();
1736
+ x.preventDefault(), I();
1691
1737
  break;
1692
1738
  case "Tab":
1693
- M();
1739
+ I();
1694
1740
  break;
1695
1741
  }
1696
1742
  }
1697
1743
  };
1698
- return (w, L) => (g(), v("div", jn, [
1699
- _(Ot, {
1744
+ return (x, O) => (g(), h("div", Nn, [
1745
+ ee(it, {
1700
1746
  ref_key: "triggerRef",
1701
- ref: s,
1747
+ ref: o,
1702
1748
  variant: e.variant,
1703
1749
  disabled: e.disabled,
1704
1750
  loading: e.loading,
1705
1751
  size: e.size,
1706
1752
  iconLeft: e.iconLeft,
1707
- iconRight: R(Ge),
1753
+ iconRight: B(Pe),
1708
1754
  fullWidth: e.fullWidth,
1709
1755
  role: "combobox",
1710
1756
  "aria-expanded": a.value ? "true" : "false",
1711
- "aria-controls": R(d),
1757
+ "aria-controls": B(i),
1712
1758
  "aria-haspopup": "listbox",
1713
1759
  "aria-activedescendant": f.value,
1714
1760
  onClick: W,
1715
- onKeydown: U
1761
+ onKeydown: X
1716
1762
  }, {
1717
- default: Re(() => [
1718
- N(w.$slots, "trigger", {}, () => [
1719
- X(E(h.value || e.placeholder), 1)
1763
+ default: Ae(() => [
1764
+ P(x.$slots, "trigger", {}, () => [
1765
+ K(L(v.value || e.placeholder), 1)
1720
1766
  ])
1721
1767
  ]),
1722
1768
  _: 3
1723
1769
  }, 8, ["variant", "disabled", "loading", "size", "iconLeft", "iconRight", "fullWidth", "aria-expanded", "aria-controls", "aria-activedescendant"]),
1724
- (g(), I(Le, { to: "body" }, [
1725
- a.value ? (g(), v("div", {
1770
+ (g(), N(Oe, { to: "body" }, [
1771
+ a.value ? (g(), h("div", {
1726
1772
  key: 0,
1727
1773
  ref_key: "floatingRef",
1728
1774
  ref: r,
1729
- id: R(d),
1775
+ id: B(i),
1730
1776
  role: "listbox",
1731
1777
  "aria-label": e.placeholder,
1732
- style: he(R(l)),
1733
- class: "z-50 min-w-32 bg-bg border border-solid border-border rounded-md shadow-default max-h-64 overflow-y-auto",
1734
- onClick: L[0] || (L[0] = Dt(() => {
1778
+ style: le(B(l)),
1779
+ class: "z-dropdown min-w-32 bg-bg border border-solid border-border rounded-md shadow-default max-h-64 overflow-y-auto",
1780
+ onClick: O[0] || (O[0] = Lt(() => {
1735
1781
  }, ["stop"]))
1736
1782
  }, [
1737
- (g(!0), v(se, null, re(e.options, (V, P) => (g(), v("div", {
1738
- key: b(V),
1739
- id: c(P),
1783
+ (g(!0), h(re, null, ae(e.options, (E, F) => (g(), h("div", {
1784
+ key: m(E),
1785
+ id: d(F),
1740
1786
  role: "option",
1741
- "aria-selected": m.value === b(V) ? "true" : "false",
1742
- "aria-disabled": p(V) ? "true" : void 0,
1743
- class: T([
1787
+ "aria-selected": b.value === m(E) ? "true" : "false",
1788
+ "aria-disabled": p(E) ? "true" : void 0,
1789
+ class: R([
1744
1790
  "px-3 py-2 text-sm transition-colors outline-none",
1745
- p(V) ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
1746
- m.value === b(V) ? "bg-brand text-brand-on-solid" : "",
1747
- i.value === P && m.value !== b(V) ? "bg-surface-hover" : "",
1748
- (i.value !== P && m.value !== b(V), ""),
1749
- P === 0 ? "rounded-t-md" : "",
1750
- P === e.options.length - 1 ? "rounded-b-md" : ""
1791
+ p(E) ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
1792
+ b.value === m(E) ? "bg-brand text-brand-on-solid" : "",
1793
+ c.value === F && b.value !== m(E) ? "bg-surface-hover" : "",
1794
+ (c.value !== F && b.value !== m(E), ""),
1795
+ F === 0 ? "rounded-t-md" : "",
1796
+ F === e.options.length - 1 ? "rounded-b-md" : ""
1751
1797
  ]),
1752
- onClick: (H) => Y(V),
1753
- onMouseenter: (H) => i.value = P
1798
+ onClick: (H) => Y(E),
1799
+ onMouseenter: (H) => c.value = F
1754
1800
  }, [
1755
- N(w.$slots, "option", {
1756
- option: V,
1757
- index: P
1801
+ P(x.$slots, "option", {
1802
+ option: E,
1803
+ index: F
1758
1804
  }, () => [
1759
- X(E(y(V)), 1)
1805
+ K(L(y(E)), 1)
1760
1806
  ])
1761
- ], 42, In))), 128)),
1762
- e.options.length ? D("", !0) : (g(), v("div", Nn, E(e.emptyText), 1))
1763
- ], 12, Pn)) : D("", !0)
1807
+ ], 42, Hn))), 128)),
1808
+ e.options.length ? V("", !0) : (g(), h("div", qn, L(e.emptyText), 1))
1809
+ ], 12, Wn)) : V("", !0)
1764
1810
  ])),
1765
- a.value ? (g(), v("div", {
1811
+ a.value ? (g(), h("div", {
1766
1812
  key: 0,
1767
- class: "fixed inset-0 z-40",
1768
- onClick: M
1769
- })) : D("", !0)
1813
+ class: "fixed inset-0 z-dropdown",
1814
+ onClick: I
1815
+ })) : V("", !0)
1770
1816
  ]));
1771
1817
  }
1772
- }), Wn = { class: "w-full" }, Hn = ["for"], qn = {
1818
+ }), Kn = ["aria-expanded"], Un = { class: "text-label" }, Xn = { class: "flex items-center gap-2" }, Yn = { class: "px-4 pb-4 border-t border-t-solid border-border" }, Gn = { class: "pt-3" }, wo = /* @__PURE__ */ z({
1819
+ __name: "DsExpandableCard",
1820
+ props: {
1821
+ title: {},
1822
+ modelValue: { type: Boolean },
1823
+ defaultExpanded: { type: Boolean, default: !1 },
1824
+ variant: { default: "default" }
1825
+ },
1826
+ emits: ["update:modelValue"],
1827
+ setup(e, { emit: n }) {
1828
+ const t = e, s = n, o = j(null), r = j(0), a = j(t.modelValue ?? t.defaultExpanded), i = w(() => t.modelValue !== void 0 ? t.modelValue : a.value);
1829
+ function c() {
1830
+ const b = !i.value;
1831
+ a.value = b, s("update:modelValue", b);
1832
+ }
1833
+ const f = w(() => ({
1834
+ maxHeight: i.value ? `${r.value}px` : "0px"
1835
+ }));
1836
+ function d() {
1837
+ o.value && (o.value.style.maxHeight = "none", r.value = o.value.scrollHeight, o.value.style.maxHeight = i.value ? `${r.value}px` : "0px");
1838
+ }
1839
+ ot(() => {
1840
+ ke(d);
1841
+ }), he(i, () => {
1842
+ ke(d);
1843
+ });
1844
+ const l = w(() => {
1845
+ const b = ["rounded-lg", "bg-bg", "overflow-hidden"], u = {
1846
+ default: ["border", "border-solid", "border-border-strong", "legacy-card-box-shadow"],
1847
+ outlined: ["border", "border-solid", "border-border-strong"],
1848
+ elevated: ["shadow-default"]
1849
+ };
1850
+ return [...b, ...u[t.variant]].join(" ");
1851
+ });
1852
+ return (b, u) => (g(), h("div", {
1853
+ class: R(l.value)
1854
+ }, [
1855
+ k("button", {
1856
+ type: "button",
1857
+ class: "w-full flex items-center justify-between px-4 py-3 text-left bg-transparent border-none cursor-pointer",
1858
+ "aria-expanded": i.value,
1859
+ onClick: c
1860
+ }, [
1861
+ k("span", Un, L(e.title), 1),
1862
+ k("span", Xn, [
1863
+ P(b.$slots, "header-extra"),
1864
+ ee(B(Pe), {
1865
+ class: R(["w-4 h-4 text-fg-secondary transition-transform duration-normal", { "rotate-180": i.value }]),
1866
+ "aria-hidden": "true"
1867
+ }, null, 8, ["class"])
1868
+ ])
1869
+ ], 8, Kn),
1870
+ k("div", {
1871
+ ref_key: "contentRef",
1872
+ ref: o,
1873
+ class: "overflow-hidden transition-all duration-normal ease-in-out",
1874
+ style: le(f.value)
1875
+ }, [
1876
+ k("div", Yn, [
1877
+ k("div", Gn, [
1878
+ P(b.$slots, "default")
1879
+ ])
1880
+ ])
1881
+ ], 4)
1882
+ ], 2));
1883
+ }
1884
+ }), Jn = { class: "w-full" }, Qn = ["for"], Zn = {
1773
1885
  key: 0,
1774
1886
  class: "text-error ml-1",
1775
1887
  "aria-hidden": "true"
1776
- }, Kn = { class: "relative" }, Un = {
1888
+ }, _n = { class: "relative" }, es = {
1777
1889
  key: 0,
1778
1890
  class: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",
1779
1891
  "aria-hidden": "true"
1780
- }, Xn = ["id", "type", "value", "placeholder", "disabled", "readonly", "required", "autocomplete", "maxlength", "min", "max", "step", "aria-describedby", "aria-invalid"], Yn = {
1892
+ }, ts = ["id", "type", "value", "placeholder", "disabled", "readonly", "required", "autocomplete", "maxlength", "min", "max", "step", "aria-describedby", "aria-invalid"], ns = {
1781
1893
  key: 1,
1782
1894
  class: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",
1783
1895
  "aria-hidden": "true"
1784
- }, is = /* @__PURE__ */ S({
1896
+ }, ko = /* @__PURE__ */ z({
1785
1897
  __name: "DsInput",
1786
1898
  props: {
1787
1899
  modelValue: {},
@@ -1804,12 +1916,12 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
1804
1916
  step: {}
1805
1917
  },
1806
1918
  emits: ["update:modelValue", "blur", "focus", "enter", "clear"],
1807
- setup(e, { expose: t, emit: n }) {
1808
- const o = e, s = n, r = j(null), a = fe("input"), d = `${a}-help`, i = `${a}-error`, f = C(() => {
1809
- const x = [];
1810
- return o.helpText && !o.error && x.push(d), o.error && x.push(i), x.length > 0 ? x.join(" ") : void 0;
1811
- }), c = C(() => o.clearable && m.value && !o.disabled), l = C(() => o.iconRight || o.clearable), m = C(() => o.modelValue == null ? !1 : typeof o.modelValue == "string" ? o.modelValue.length > 0 : !0), u = C(() => {
1812
- const x = [
1919
+ setup(e, { expose: n, emit: t }) {
1920
+ const s = e, o = t, r = j(null), a = se("input"), i = `${a}-help`, c = `${a}-error`, f = w(() => {
1921
+ const T = [];
1922
+ return s.helpText && !s.error && T.push(i), s.error && T.push(c), T.length > 0 ? T.join(" ") : void 0;
1923
+ }), d = w(() => s.clearable && b.value && !s.disabled), l = w(() => s.iconRight || s.clearable), b = w(() => s.modelValue == null ? !1 : typeof s.modelValue == "string" ? s.modelValue.length > 0 : !0), u = w(() => {
1924
+ const T = [
1813
1925
  "block",
1814
1926
  "w-full",
1815
1927
  "rounded-md",
@@ -1827,62 +1939,72 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
1827
1939
  "disabled:bg-surface-disabled",
1828
1940
  "disabled:text-fg-disabled",
1829
1941
  "box-border"
1830
- ], B = {
1942
+ ], $ = {
1831
1943
  small: { text: "text-sm", py: "py-1", px: "px-2", pl: "pl-8", pr: "pr-8" },
1832
1944
  medium: { text: "text-base", py: "py-2", px: "px-3", pl: "pl-10", pr: "pr-10" },
1833
1945
  large: { text: "text-lg", py: "py-3", px: "px-4", pl: "pl-12", pr: "pr-12" }
1834
- }[o.size], O = o.error ? ["border-error-border", "focus:border-error", "focus:ring-error"] : ["border-border", "focus:border-border-focus", "focus:ring-brand"];
1946
+ }[s.size], M = s.error ? ["border-error-border", "focus:border-error", "focus:ring-error"] : ["border-border", "focus:border-border-focus", "focus:ring-focus-ring"];
1835
1947
  return [
1836
- ...x,
1837
- B.text,
1838
- B.py,
1839
- o.iconLeft ? B.pl : B.px,
1840
- l.value ? B.pr : B.px,
1841
- ...O
1948
+ ...T,
1949
+ $.text,
1950
+ $.py,
1951
+ s.iconLeft ? $.pl : $.px,
1952
+ l.value ? $.pr : $.px,
1953
+ ...M
1842
1954
  ].join(" ");
1843
- }), h = C(() => {
1844
- const x = { small: "w-4 h-4", medium: "w-5 h-5", large: "w-6 h-6" }, $ = o.error ? "text-error" : "text-fg-tertiary";
1845
- return `${x[o.size]} ${$}`;
1955
+ }), v = w(() => [
1956
+ "absolute inset-y-0 flex items-center justify-center",
1957
+ {
1958
+ small: "right-2",
1959
+ medium: "right-3",
1960
+ large: "right-3"
1961
+ }[s.size],
1962
+ "appearance-none bg-transparent border-none p-0 m-0",
1963
+ "text-fg-tertiary hover:text-fg-secondary",
1964
+ "cursor-pointer transition-colors"
1965
+ ].join(" ")), m = w(() => ({ small: "w-3.5 h-3.5", medium: "w-4 h-4", large: "w-5 h-5" })[s.size]), y = w(() => {
1966
+ const T = { small: "w-4 h-4", medium: "w-5 h-5", large: "w-6 h-6" }, S = s.error ? "text-error" : "text-fg-tertiary";
1967
+ return `${T[s.size]} ${S}`;
1846
1968
  });
1847
- function b(x) {
1848
- const $ = x.target;
1849
- if (o.type === "number") {
1850
- const B = Number($.value);
1851
- s("update:modelValue", Number.isNaN(B) ? $.value : B);
1969
+ function p(T) {
1970
+ const S = T.target;
1971
+ if (s.type === "number") {
1972
+ const $ = Number(S.value);
1973
+ o("update:modelValue", Number.isNaN($) ? S.value : $);
1852
1974
  } else
1853
- s("update:modelValue", $.value);
1975
+ o("update:modelValue", S.value);
1854
1976
  }
1855
- function y() {
1856
- var x;
1857
- s("update:modelValue", ""), s("clear"), (x = r.value) == null || x.focus();
1977
+ function C() {
1978
+ var T;
1979
+ o("update:modelValue", ""), o("clear"), (T = r.value) == null || T.focus();
1858
1980
  }
1859
- function p() {
1860
- var x;
1861
- (x = r.value) == null || x.focus();
1981
+ function D() {
1982
+ var T;
1983
+ (T = r.value) == null || T.focus();
1862
1984
  }
1863
- function k() {
1864
- var x;
1865
- (x = r.value) == null || x.blur();
1985
+ function A() {
1986
+ var T;
1987
+ (T = r.value) == null || T.blur();
1866
1988
  }
1867
- return t({ focus: p, blur: k, inputRef: r }), (x, $) => (g(), v("div", Wn, [
1868
- e.label ? (g(), v("label", {
1989
+ return n({ focus: D, blur: A, inputRef: r }), (T, S) => (g(), h("div", Jn, [
1990
+ e.label ? (g(), h("label", {
1869
1991
  key: 0,
1870
- for: R(a),
1992
+ for: B(a),
1871
1993
  class: "block text-label mb-1"
1872
1994
  }, [
1873
- X(E(e.label) + " ", 1),
1874
- e.required ? (g(), v("span", qn, "*")) : D("", !0)
1875
- ], 8, Hn)) : D("", !0),
1876
- F("div", Kn, [
1877
- e.iconLeft ? (g(), v("div", Un, [
1878
- (g(), I($e(e.iconLeft), {
1879
- class: T(h.value)
1995
+ K(L(e.label) + " ", 1),
1996
+ e.required ? (g(), h("span", Zn, "*")) : V("", !0)
1997
+ ], 8, Qn)) : V("", !0),
1998
+ k("div", _n, [
1999
+ e.iconLeft ? (g(), h("div", es, [
2000
+ (g(), N(Te(e.iconLeft), {
2001
+ class: R(y.value)
1880
2002
  }, null, 8, ["class"]))
1881
- ])) : D("", !0),
1882
- F("input", {
2003
+ ])) : V("", !0),
2004
+ k("input", {
1883
2005
  ref_key: "inputRef",
1884
2006
  ref: r,
1885
- id: R(a),
2007
+ id: B(a),
1886
2008
  type: e.type,
1887
2009
  value: e.modelValue,
1888
2010
  placeholder: e.placeholder,
@@ -1896,45 +2018,47 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
1896
2018
  step: e.step,
1897
2019
  "aria-describedby": f.value,
1898
2020
  "aria-invalid": e.error ? "true" : void 0,
1899
- class: T(u.value),
1900
- onInput: b,
1901
- onBlur: $[0] || ($[0] = (B) => x.$emit("blur", B)),
1902
- onFocus: $[1] || ($[1] = (B) => x.$emit("focus", B)),
1903
- onKeydown: $[2] || ($[2] = st((B) => x.$emit("enter"), ["enter"]))
1904
- }, null, 42, Xn),
1905
- e.iconRight && !c.value ? (g(), v("div", Yn, [
1906
- (g(), I($e(e.iconRight), {
1907
- class: T(h.value)
2021
+ class: R(u.value),
2022
+ onInput: p,
2023
+ onBlur: S[0] || (S[0] = ($) => T.$emit("blur", $)),
2024
+ onFocus: S[1] || (S[1] = ($) => T.$emit("focus", $)),
2025
+ onKeydown: S[2] || (S[2] = rt(($) => T.$emit("enter"), ["enter"]))
2026
+ }, null, 42, ts),
2027
+ e.iconRight && !d.value ? (g(), h("div", ns, [
2028
+ (g(), N(Te(e.iconRight), {
2029
+ class: R(y.value)
1908
2030
  }, null, 8, ["class"]))
1909
- ])) : D("", !0),
1910
- c.value ? (g(), v("button", {
2031
+ ])) : V("", !0),
2032
+ d.value ? (g(), h("button", {
1911
2033
  key: 2,
1912
2034
  type: "button",
1913
2035
  "aria-label": "Clear input",
1914
- class: "absolute inset-y-0 right-0 pr-3 flex items-center text-fg-tertiary hover:text-fg-secondary transition-colors",
1915
- onClick: y
2036
+ class: R(v.value),
2037
+ onClick: C
1916
2038
  }, [
1917
- _(R(Be), { class: "w-4 h-4" })
1918
- ])) : D("", !0)
2039
+ ee(B(Se), {
2040
+ class: R(m.value)
2041
+ }, null, 8, ["class"])
2042
+ ], 2)) : V("", !0)
1919
2043
  ]),
1920
- e.helpText && !e.error ? (g(), v("div", {
2044
+ e.helpText && !e.error ? (g(), h("div", {
1921
2045
  key: 1,
1922
- id: d,
2046
+ id: i,
1923
2047
  class: "mt-1 text-caption"
1924
- }, E(e.helpText), 1)) : D("", !0),
1925
- e.error ? (g(), v("div", {
2048
+ }, L(e.helpText), 1)) : V("", !0),
2049
+ e.error ? (g(), h("div", {
1926
2050
  key: 2,
1927
- id: i,
2051
+ id: c,
1928
2052
  class: "mt-1 text-sm text-error font-sans",
1929
2053
  role: "alert",
1930
2054
  "aria-live": "polite"
1931
- }, E(e.error), 1)) : D("", !0)
2055
+ }, L(e.error), 1)) : V("", !0)
1932
2056
  ]));
1933
2057
  }
1934
- }), Gn = {
2058
+ }), ss = {
1935
2059
  key: 1,
1936
2060
  class: "sr-only"
1937
- }, Jn = /* @__PURE__ */ S({
2061
+ }, os = /* @__PURE__ */ z({
1938
2062
  __name: "DsLoadingSpinner",
1939
2063
  props: {
1940
2064
  size: { default: "medium" },
@@ -1943,10 +2067,10 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
1943
2067
  centered: { type: Boolean, default: !1 }
1944
2068
  },
1945
2069
  setup(e) {
1946
- const t = e, n = C(() => {
2070
+ const n = e, t = w(() => {
1947
2071
  const r = ["inline-flex", "items-center"];
1948
- return t.centered && r.push("justify-center"), t.text && r.push("gap-2"), r.join(" ");
1949
- }), o = C(() => {
2072
+ return n.centered && r.push("justify-center"), n.text && r.push("gap-2"), r.join(" ");
2073
+ }), s = w(() => {
1950
2074
  const r = [
1951
2075
  "animate-spin",
1952
2076
  "rounded-full",
@@ -1955,7 +2079,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
1955
2079
  small: ["w-4", "h-4", "border-2"],
1956
2080
  medium: ["w-6", "h-6", "border-4"],
1957
2081
  large: ["w-8", "h-8", "border-6"]
1958
- }, d = {
2082
+ }, i = {
1959
2083
  primary: [
1960
2084
  "border-brand",
1961
2085
  "border-t-transparent"
@@ -1975,37 +2099,37 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
1975
2099
  };
1976
2100
  return [
1977
2101
  ...r,
1978
- ...a[t.size],
1979
- ...d[t.variant]
2102
+ ...a[n.size],
2103
+ ...i[n.variant]
1980
2104
  ].join(" ");
1981
- }), s = C(() => [
2105
+ }), o = w(() => [
1982
2106
  {
1983
2107
  small: "text-sm",
1984
2108
  medium: "text-base",
1985
2109
  large: "text-lg"
1986
- }[t.size],
2110
+ }[n.size],
1987
2111
  "text-fg-secondary",
1988
2112
  "font-medium"
1989
2113
  ].join(" "));
1990
- return (r, a) => (g(), v("div", {
1991
- class: T(n.value),
2114
+ return (r, a) => (g(), h("div", {
2115
+ class: R(t.value),
1992
2116
  role: "status",
1993
2117
  "aria-live": "polite"
1994
2118
  }, [
1995
- F("div", {
1996
- class: T(o.value),
2119
+ k("div", {
2120
+ class: R(s.value),
1997
2121
  "aria-hidden": "true"
1998
2122
  }, null, 2),
1999
- e.text ? (g(), v("span", {
2123
+ e.text ? (g(), h("span", {
2000
2124
  key: 0,
2001
- class: T(s.value)
2002
- }, E(e.text), 3)) : (g(), v("span", Gn, "Loading"))
2125
+ class: R(o.value)
2126
+ }, L(e.text), 3)) : (g(), h("span", ss, "Loading"))
2003
2127
  ], 2));
2004
2128
  }
2005
- }), Qn = ["aria-labelledby"], Zn = { class: "flex items-center justify-between px-6 py-4 border-b border-solid border-border" }, _n = ["id"], eo = { class: "px-6 py-4 overflow-y-auto flex-1" }, to = {
2129
+ }), rs = ["aria-labelledby"], as = { class: "flex items-center justify-between px-6 py-4" }, ls = ["id"], is = { class: "px-6 py-4 overflow-y-auto flex-1" }, cs = {
2006
2130
  key: 0,
2007
- class: "px-6 py-4 border-t border-solid border-border"
2008
- }, cs = /* @__PURE__ */ S({
2131
+ class: "px-6 py-4"
2132
+ }, ds = /* @__PURE__ */ z({
2009
2133
  __name: "DsModal",
2010
2134
  props: {
2011
2135
  modelValue: { type: Boolean },
@@ -2015,23 +2139,23 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
2015
2139
  persistent: { type: Boolean, default: !1 }
2016
2140
  },
2017
2141
  emits: ["update:modelValue", "close"],
2018
- setup(e, { emit: t }) {
2019
- const n = e, o = t, s = fe("modal-title"), r = j(null);
2142
+ setup(e, { emit: n }) {
2143
+ const t = e, s = n, o = se("modal-title"), r = j(null);
2020
2144
  let a = null;
2021
- const d = C(() => `relative z-10 bg-bg rounded-lg shadow-lg w-full ${{
2145
+ const i = w(() => `relative z-sticky bg-bg rounded-xl shadow-lg overflow-hidden w-full ${{
2022
2146
  sm: "max-w-sm",
2023
2147
  md: "max-w-lg",
2024
2148
  lg: "max-w-2xl",
2025
2149
  xl: "max-w-4xl"
2026
- }[n.size]} max-h-[90vh] flex flex-col`);
2027
- function i() {
2028
- o("update:modelValue", !1), o("close");
2150
+ }[t.size]} max-h-[90vh] flex flex-col`);
2151
+ function c() {
2152
+ s("update:modelValue", !1), s("close");
2029
2153
  }
2030
2154
  function f() {
2031
- n.persistent || i();
2155
+ t.persistent || c();
2032
2156
  }
2033
- function c() {
2034
- n.persistent || i();
2157
+ function d() {
2158
+ t.persistent || c();
2035
2159
  }
2036
2160
  function l() {
2037
2161
  return r.value ? Array.from(
@@ -2040,81 +2164,85 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
2040
2164
  )
2041
2165
  ) : [];
2042
2166
  }
2043
- function m(u) {
2167
+ function b(u) {
2044
2168
  if (u.key !== "Tab") return;
2045
- const h = l();
2046
- if (h.length === 0) return;
2047
- const b = h[0], y = h[h.length - 1];
2048
- u.shiftKey && document.activeElement === b ? (u.preventDefault(), y.focus()) : !u.shiftKey && document.activeElement === y && (u.preventDefault(), b.focus());
2169
+ const v = l();
2170
+ if (v.length === 0) return;
2171
+ const m = v[0], y = v[v.length - 1];
2172
+ u.shiftKey && document.activeElement === m ? (u.preventDefault(), y.focus()) : !u.shiftKey && document.activeElement === y && (u.preventDefault(), m.focus());
2049
2173
  }
2050
- return we(
2051
- () => n.modelValue,
2174
+ return he(
2175
+ () => t.modelValue,
2052
2176
  async (u) => {
2053
- var h;
2054
- u ? (a = document.activeElement, document.body.style.overflow = "hidden", document.addEventListener("keydown", m), await je(), (h = r.value) == null || h.focus()) : (document.body.style.overflow = "", document.removeEventListener("keydown", m), a == null || a.focus(), a = null);
2177
+ var v;
2178
+ u ? (a = document.activeElement, document.body.style.overflow = "hidden", document.addEventListener("keydown", b), await ke(), (v = r.value) == null || v.focus()) : (document.body.style.overflow = "", document.removeEventListener("keydown", b), a == null || a.focus(), a = null);
2055
2179
  }
2056
- ), rt(() => {
2057
- document.body.style.overflow = "", document.removeEventListener("keydown", m);
2058
- }), (u, h) => (g(), I(Le, { to: "body" }, [
2059
- _(at, {
2060
- "enter-active-class": "transition-opacity duration-200",
2061
- "enter-from-class": "opacity-0",
2062
- "enter-to-class": "opacity-100",
2063
- "leave-active-class": "transition-opacity duration-200",
2064
- "leave-from-class": "opacity-100",
2065
- "leave-to-class": "opacity-0"
2180
+ ), at(() => {
2181
+ document.body.style.overflow = "", document.removeEventListener("keydown", b);
2182
+ }), (u, v) => (g(), N(Oe, { to: "body" }, [
2183
+ ee(lt, {
2184
+ "enter-active-class": "ds-modal-enter-active",
2185
+ "enter-from-class": "ds-modal-enter-from",
2186
+ "enter-to-class": "ds-modal-enter-to",
2187
+ "leave-active-class": "ds-modal-leave-active",
2188
+ "leave-from-class": "ds-modal-enter-to",
2189
+ "leave-to-class": "ds-modal-enter-from"
2066
2190
  }, {
2067
- default: Re(() => [
2068
- e.modelValue ? (g(), v("div", {
2191
+ default: Ae(() => [
2192
+ e.modelValue ? (g(), h("div", {
2069
2193
  key: 0,
2070
- class: "fixed inset-0 z-50 flex items-center justify-center p-4",
2071
- onKeydown: st(c, ["escape"])
2194
+ class: "fixed inset-0 z-modal flex items-center justify-center p-4",
2195
+ onKeydown: rt(d, ["escape"])
2072
2196
  }, [
2073
- F("div", {
2074
- class: "absolute inset-0 bg-bg-inverse/50",
2197
+ k("div", {
2198
+ class: "absolute inset-0 bg-overlay backdrop-blur-sm",
2075
2199
  "aria-hidden": "true",
2076
2200
  onClick: f
2077
2201
  }),
2078
- F("div", {
2202
+ k("div", {
2079
2203
  ref_key: "panelRef",
2080
2204
  ref: r,
2081
2205
  role: "dialog",
2082
2206
  "aria-modal": "true",
2083
- "aria-labelledby": R(s),
2084
- class: T(d.value),
2207
+ "aria-labelledby": B(o),
2208
+ class: R(i.value),
2085
2209
  tabindex: "-1"
2086
2210
  }, [
2087
- F("div", Zn, [
2088
- N(u.$slots, "header", {}, () => [
2089
- F("h2", {
2090
- id: R(s),
2211
+ k("div", as, [
2212
+ P(u.$slots, "header", {}, () => [
2213
+ k("h2", {
2214
+ id: B(o),
2091
2215
  class: "text-heading-lg m-0"
2092
- }, E(e.title), 9, _n)
2093
- ]),
2094
- e.closable ? (g(), v("button", {
2216
+ }, L(e.title), 9, ls)
2217
+ ], !0),
2218
+ e.closable ? (g(), N(it, {
2095
2219
  key: 0,
2096
- type: "button",
2097
- class: "p-1 rounded-md text-fg-tertiary hover:text-fg hover:bg-surface-hover-light transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand",
2220
+ variant: "ghost",
2221
+ size: "small",
2222
+ "icon-left": B(Se),
2098
2223
  "aria-label": "Close dialog",
2099
- onClick: i
2100
- }, [
2101
- _(R(Be), { class: "w-5 h-5" })
2102
- ])) : D("", !0)
2224
+ onClick: c
2225
+ }, null, 8, ["icon-left"])) : V("", !0)
2103
2226
  ]),
2104
- F("div", eo, [
2105
- N(u.$slots, "default")
2227
+ k("div", is, [
2228
+ P(u.$slots, "default", {}, void 0, !0)
2106
2229
  ]),
2107
- u.$slots.footer ? (g(), v("div", to, [
2108
- N(u.$slots, "footer")
2109
- ])) : D("", !0)
2110
- ], 10, Qn)
2111
- ], 32)) : D("", !0)
2230
+ u.$slots.footer ? (g(), h("div", cs, [
2231
+ P(u.$slots, "footer", {}, void 0, !0)
2232
+ ])) : V("", !0)
2233
+ ], 10, rs)
2234
+ ], 32)) : V("", !0)
2112
2235
  ]),
2113
2236
  _: 3
2114
2237
  })
2115
2238
  ]));
2116
2239
  }
2117
- }), no = ["id", "name", "checked", "disabled", "value"], ds = /* @__PURE__ */ S({
2240
+ }), Ct = (e, n) => {
2241
+ const t = e.__vccOpts || e;
2242
+ for (const [s, o] of n)
2243
+ t[s] = o;
2244
+ return t;
2245
+ }, $o = /* @__PURE__ */ Ct(ds, [["__scopeId", "data-v-cc8b4649"]]), us = ["id", "name", "checked", "disabled", "value"], Co = /* @__PURE__ */ z({
2118
2246
  __name: "DsRadio",
2119
2247
  props: {
2120
2248
  modelValue: { type: [String, Number, Boolean] },
@@ -2126,84 +2254,84 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
2126
2254
  size: { default: "medium" }
2127
2255
  },
2128
2256
  emits: ["update:modelValue", "change"],
2129
- setup(e, { emit: t }) {
2130
- const n = e, o = t, s = C(() => n.modelValue === n.value), r = {
2257
+ setup(e, { emit: n }) {
2258
+ const t = e, s = n, o = w(() => t.modelValue === t.value), r = {
2131
2259
  small: { circle: "w-3.5 h-3.5", dot: "w-1.5 h-1.5", label: "text-xs" },
2132
2260
  medium: { circle: "w-4 h-4", dot: "w-2 h-2", label: "text-sm" },
2133
2261
  large: { circle: "w-5 h-5", dot: "w-2.5 h-2.5", label: "text-base" }
2134
- }, a = C(() => {
2262
+ }, a = w(() => {
2135
2263
  const l = [
2136
- r[n.size].circle,
2264
+ r[t.size].circle,
2137
2265
  "rounded-full",
2138
2266
  "inline-flex items-center justify-center",
2139
2267
  "border border-solid",
2140
- "transition-all duration-150",
2268
+ "transition-all duration-fast",
2141
2269
  "shrink-0"
2142
2270
  ];
2143
- return n.disabled ? l.push(
2144
- s.value ? "bg-bg border-brand-disabled" : "bg-bg-tertiary border-border",
2271
+ return t.disabled ? l.push(
2272
+ o.value ? "bg-bg border-brand-disabled" : "bg-bg-tertiary border-border",
2145
2273
  "opacity-60"
2146
- ) : s.value ? l.push("bg-bg border-brand") : l.push(
2274
+ ) : o.value ? l.push("bg-bg border-brand") : l.push(
2147
2275
  "bg-bg border-border-strong",
2148
2276
  "group-hover:border-brand",
2149
- "peer-focus-visible:ring-2 peer-focus-visible:ring-brand peer-focus-visible:ring-offset-2"
2277
+ "peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring peer-focus-visible:ring-offset-2"
2150
2278
  ), l.join(" ");
2151
- }), d = C(() => {
2152
- const l = [r[n.size].dot, "rounded-full"];
2153
- return n.disabled ? l.push("bg-brand-disabled") : l.push("bg-brand"), l.join(" ");
2154
- }), i = C(() => [
2279
+ }), i = w(() => {
2280
+ const l = [r[t.size].dot, "rounded-full"];
2281
+ return t.disabled ? l.push("bg-brand-disabled") : l.push("bg-brand"), l.join(" ");
2282
+ }), c = w(() => [
2155
2283
  "font-sans select-none",
2156
- r[n.size].label,
2157
- n.disabled ? "text-fg-disabled" : "text-fg"
2158
- ].join(" ")), f = (c) => {
2159
- if (n.disabled) return;
2160
- const l = c.target, m = n.value ?? l.value;
2161
- o("update:modelValue", m), o("change", m, c);
2284
+ r[t.size].label,
2285
+ t.disabled ? "text-fg-disabled" : "text-fg"
2286
+ ].join(" ")), f = (d) => {
2287
+ if (t.disabled) return;
2288
+ const l = d.target, b = t.value ?? l.value;
2289
+ s("update:modelValue", b), s("change", b, d);
2162
2290
  };
2163
- return (c, l) => (g(), v("label", {
2164
- class: T([
2291
+ return (d, l) => (g(), h("label", {
2292
+ class: R([
2165
2293
  "inline-flex items-center gap-2",
2166
2294
  e.disabled ? "cursor-not-allowed" : "cursor-pointer",
2167
2295
  "group"
2168
2296
  ])
2169
2297
  }, [
2170
- F("input", {
2298
+ k("input", {
2171
2299
  id: e.id,
2172
2300
  type: "radio",
2173
2301
  name: e.name,
2174
- checked: s.value,
2302
+ checked: o.value,
2175
2303
  disabled: e.disabled,
2176
2304
  value: e.value,
2177
2305
  class: "sr-only peer",
2178
2306
  onChange: f
2179
- }, null, 40, no),
2180
- F("span", {
2181
- class: T(a.value),
2307
+ }, null, 40, us),
2308
+ k("span", {
2309
+ class: R(a.value),
2182
2310
  "aria-hidden": "true"
2183
2311
  }, [
2184
- s.value ? (g(), v("span", {
2312
+ o.value ? (g(), h("span", {
2185
2313
  key: 0,
2186
- class: T(d.value)
2187
- }, null, 2)) : D("", !0)
2314
+ class: R(i.value)
2315
+ }, null, 2)) : V("", !0)
2188
2316
  ], 2),
2189
- e.label || c.$slots.default ? (g(), v("span", {
2317
+ e.label || d.$slots.default ? (g(), h("span", {
2190
2318
  key: 0,
2191
- class: T(i.value)
2319
+ class: R(c.value)
2192
2320
  }, [
2193
- N(c.$slots, "default", {}, () => [
2194
- X(E(e.label), 1)
2321
+ P(d.$slots, "default", {}, () => [
2322
+ K(L(e.label), 1)
2195
2323
  ])
2196
- ], 2)) : D("", !0)
2324
+ ], 2)) : V("", !0)
2197
2325
  ], 2));
2198
2326
  }
2199
- }), oo = { class: "w-full" }, so = ["for"], ro = {
2327
+ }), fs = { class: "w-full" }, bs = ["for"], ms = {
2200
2328
  key: 0,
2201
2329
  class: "text-error ml-1",
2202
2330
  "aria-hidden": "true"
2203
- }, ao = { class: "relative" }, lo = ["id", "value", "disabled", "required", "aria-describedby", "aria-invalid"], io = ["selected"], co = ["value", "disabled"], uo = {
2331
+ }, gs = { class: "relative" }, hs = ["id", "value", "disabled", "required", "aria-describedby", "aria-invalid"], vs = ["selected"], ps = ["value", "disabled"], ys = {
2204
2332
  class: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",
2205
2333
  "aria-hidden": "true"
2206
- }, us = /* @__PURE__ */ S({
2334
+ }, Do = /* @__PURE__ */ z({
2207
2335
  __name: "DsSelect",
2208
2336
  props: {
2209
2337
  modelValue: {},
@@ -2217,12 +2345,12 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
2217
2345
  options: {}
2218
2346
  },
2219
2347
  emits: ["update:modelValue", "blur", "focus"],
2220
- setup(e, { emit: t }) {
2221
- const n = e, o = t, s = fe("select"), r = `${s}-help`, a = `${s}-error`, d = C(() => {
2222
- const c = [];
2223
- return n.helpText && !n.error && c.push(r), n.error && c.push(a), c.length > 0 ? c.join(" ") : void 0;
2224
- }), i = C(() => {
2225
- const c = [
2348
+ setup(e, { emit: n }) {
2349
+ const t = e, s = n, o = se("select"), r = `${o}-help`, a = `${o}-error`, i = w(() => {
2350
+ const d = [];
2351
+ return t.helpText && !t.error && d.push(r), t.error && d.push(a), d.length > 0 ? d.join(" ") : void 0;
2352
+ }), c = w(() => {
2353
+ const d = [
2226
2354
  "block",
2227
2355
  "w-full",
2228
2356
  "rounded-md",
@@ -2245,75 +2373,208 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
2245
2373
  small: "px-2 py-1 text-sm",
2246
2374
  medium: "px-3 py-2 text-base",
2247
2375
  large: "px-4 py-3 text-lg"
2248
- }, m = n.error ? ["border-error-border", "focus:border-error", "focus:ring-error"] : ["border-border", "focus:border-border-focus", "focus:ring-brand"];
2249
- return [...c, l[n.size], ...m].join(" ");
2250
- }), f = (c) => {
2251
- const m = c.target.value, u = n.options.find((h) => String(h.value) === m);
2252
- o("update:modelValue", u && typeof u.value == "number" ? u.value : m);
2376
+ }, b = t.error ? ["border-error-border", "focus:border-error", "focus:ring-error"] : ["border-border", "focus:border-border-focus", "focus:ring-focus-ring"];
2377
+ return [...d, l[t.size], ...b].join(" ");
2378
+ }), f = (d) => {
2379
+ const b = d.target.value, u = t.options.find((v) => String(v.value) === b);
2380
+ s("update:modelValue", u && typeof u.value == "number" ? u.value : b);
2253
2381
  };
2254
- return (c, l) => (g(), v("div", oo, [
2255
- e.label ? (g(), v("label", {
2382
+ return (d, l) => (g(), h("div", fs, [
2383
+ e.label ? (g(), h("label", {
2256
2384
  key: 0,
2257
- for: R(s),
2385
+ for: B(o),
2258
2386
  class: "block text-label mb-1"
2259
2387
  }, [
2260
- X(E(e.label) + " ", 1),
2261
- e.required ? (g(), v("span", ro, "*")) : D("", !0)
2262
- ], 8, so)) : D("", !0),
2263
- F("div", ao, [
2264
- F("select", {
2265
- id: R(s),
2388
+ K(L(e.label) + " ", 1),
2389
+ e.required ? (g(), h("span", ms, "*")) : V("", !0)
2390
+ ], 8, bs)) : V("", !0),
2391
+ k("div", gs, [
2392
+ k("select", {
2393
+ id: B(o),
2266
2394
  value: e.modelValue,
2267
2395
  disabled: e.disabled,
2268
2396
  required: e.required,
2269
- "aria-describedby": d.value,
2397
+ "aria-describedby": i.value,
2270
2398
  "aria-invalid": e.error ? "true" : void 0,
2271
- class: T(i.value),
2399
+ class: R(c.value),
2272
2400
  onChange: f,
2273
- onBlur: l[0] || (l[0] = (m) => c.$emit("blur", m)),
2274
- onFocus: l[1] || (l[1] = (m) => c.$emit("focus", m))
2401
+ onBlur: l[0] || (l[0] = (b) => d.$emit("blur", b)),
2402
+ onFocus: l[1] || (l[1] = (b) => d.$emit("focus", b))
2275
2403
  }, [
2276
- e.placeholder ? (g(), v("option", {
2404
+ e.placeholder ? (g(), h("option", {
2277
2405
  key: 0,
2278
2406
  value: "",
2279
2407
  disabled: "",
2280
2408
  selected: !e.modelValue
2281
- }, E(e.placeholder), 9, io)) : D("", !0),
2282
- (g(!0), v(se, null, re(e.options, (m) => (g(), v("option", {
2283
- key: m.value,
2284
- value: m.value,
2285
- disabled: m.disabled
2286
- }, E(m.label), 9, co))), 128))
2287
- ], 42, lo),
2288
- F("div", uo, [
2289
- _(R(Ge), { class: "w-4 h-4 text-fg-tertiary" })
2409
+ }, L(e.placeholder), 9, vs)) : V("", !0),
2410
+ (g(!0), h(re, null, ae(e.options, (b) => (g(), h("option", {
2411
+ key: b.value,
2412
+ value: b.value,
2413
+ disabled: b.disabled
2414
+ }, L(b.label), 9, ps))), 128))
2415
+ ], 42, hs),
2416
+ k("div", ys, [
2417
+ ee(B(Pe), { class: "w-4 h-4 text-fg-tertiary" })
2290
2418
  ])
2291
2419
  ]),
2292
- e.helpText && !e.error ? (g(), v("div", {
2420
+ e.helpText && !e.error ? (g(), h("div", {
2293
2421
  key: 1,
2294
2422
  id: r,
2295
2423
  class: "mt-1 text-caption"
2296
- }, E(e.helpText), 1)) : D("", !0),
2297
- e.error ? (g(), v("div", {
2424
+ }, L(e.helpText), 1)) : V("", !0),
2425
+ e.error ? (g(), h("div", {
2298
2426
  key: 2,
2299
2427
  id: a,
2300
2428
  class: "mt-1 text-sm text-error font-sans",
2301
2429
  role: "alert",
2302
2430
  "aria-live": "polite"
2303
- }, E(e.error), 1)) : D("", !0)
2431
+ }, L(e.error), 1)) : V("", !0)
2432
+ ]));
2433
+ }
2434
+ }), xs = { class: "flex flex-col gap-1.5" }, ws = {
2435
+ key: 0,
2436
+ class: "flex items-center justify-between"
2437
+ }, ks = ["for"], $s = {
2438
+ key: 1,
2439
+ class: "text-body-sm tabular-nums"
2440
+ }, Cs = ["id", "value", "min", "max", "step", "disabled"], Ds = /* @__PURE__ */ z({
2441
+ __name: "DsSlider",
2442
+ props: {
2443
+ modelValue: { default: 0 },
2444
+ min: { default: 0 },
2445
+ max: { default: 100 },
2446
+ step: { default: 1 },
2447
+ disabled: { type: Boolean, default: !1 },
2448
+ label: {},
2449
+ showValue: { type: Boolean, default: !1 }
2450
+ },
2451
+ emits: ["update:modelValue"],
2452
+ setup(e, { emit: n }) {
2453
+ const t = e, s = n, o = se(), r = w(() => (t.modelValue - t.min) / (t.max - t.min) * 100), a = w(() => ({
2454
+ "--slider-percent": `${r.value}%`
2455
+ }));
2456
+ function i(c) {
2457
+ const f = c.target;
2458
+ s("update:modelValue", Number(f.value));
2459
+ }
2460
+ return (c, f) => (g(), h("div", xs, [
2461
+ e.label || e.showValue ? (g(), h("div", ws, [
2462
+ e.label ? (g(), h("label", {
2463
+ key: 0,
2464
+ for: B(o),
2465
+ class: "text-label"
2466
+ }, L(e.label), 9, ks)) : V("", !0),
2467
+ e.showValue ? (g(), h("span", $s, L(e.modelValue), 1)) : V("", !0)
2468
+ ])) : V("", !0),
2469
+ k("input", {
2470
+ id: B(o),
2471
+ type: "range",
2472
+ class: R(["ds-slider", { "opacity-50 cursor-not-allowed": e.disabled }]),
2473
+ value: e.modelValue,
2474
+ min: e.min,
2475
+ max: e.max,
2476
+ step: e.step,
2477
+ disabled: e.disabled,
2478
+ style: le(a.value),
2479
+ onInput: i
2480
+ }, null, 46, Cs)
2304
2481
  ]));
2305
2482
  }
2306
- }), fo = { class: "w-full overflow-x-auto shadow-sm" }, bo = {
2483
+ }), To = /* @__PURE__ */ Ct(Ds, [["__scopeId", "data-v-75234e8c"]]), Ts = ["id", "checked", "aria-checked", "disabled"], Vo = /* @__PURE__ */ z({
2484
+ __name: "DsSwitch",
2485
+ props: {
2486
+ modelValue: { type: Boolean, default: !1 },
2487
+ label: {},
2488
+ id: {},
2489
+ disabled: { type: Boolean, default: !1 },
2490
+ size: { default: "medium" },
2491
+ labelPosition: { default: "right" }
2492
+ },
2493
+ emits: ["update:modelValue", "change"],
2494
+ setup(e, { emit: n }) {
2495
+ const t = e, s = n, o = se("switch"), r = t.id ?? o, a = {
2496
+ small: { track: "w-7 h-4", thumb: "w-3 h-3", translate: "translate-x-3", label: "text-xs" },
2497
+ medium: { track: "w-9 h-5", thumb: "w-4 h-4", translate: "translate-x-4", label: "text-sm" },
2498
+ large: { track: "w-11 h-6", thumb: "w-5 h-5", translate: "translate-x-5", label: "text-base" }
2499
+ }, i = w(() => {
2500
+ const b = [
2501
+ a[t.size].track,
2502
+ "relative inline-flex items-center",
2503
+ "rounded-full",
2504
+ "border border-solid border-transparent",
2505
+ "transition-colors duration-fast",
2506
+ "shrink-0"
2507
+ ];
2508
+ return t.disabled ? b.push(
2509
+ t.modelValue ? "bg-brand-disabled" : "bg-neutral-border",
2510
+ "opacity-60"
2511
+ ) : t.modelValue ? b.push("bg-brand", "group-hover:bg-brand-hover") : b.push("bg-neutral-border", "group-hover:bg-neutral-border-hover"), t.disabled || b.push("peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring peer-focus-visible:ring-offset-2"), b.join(" ");
2512
+ }), c = w(() => {
2513
+ const l = a[t.size], b = [
2514
+ l.thumb,
2515
+ "absolute left-0.5",
2516
+ "rounded-full",
2517
+ "bg-bg",
2518
+ "shadow-thumb",
2519
+ "transition-transform duration-fast"
2520
+ ];
2521
+ return t.modelValue && b.push(l.translate), b.join(" ");
2522
+ }), f = w(() => [
2523
+ "font-sans select-none",
2524
+ a[t.size].label,
2525
+ t.disabled ? "text-fg-disabled" : "text-fg"
2526
+ ].join(" ")), d = (l) => {
2527
+ if (t.disabled) return;
2528
+ const u = l.target.checked;
2529
+ s("update:modelValue", u), s("change", u, l);
2530
+ };
2531
+ return (l, b) => (g(), h("label", {
2532
+ class: R([
2533
+ "inline-flex items-center gap-2",
2534
+ e.labelPosition === "left" ? "flex-row-reverse" : "",
2535
+ e.disabled ? "cursor-not-allowed" : "cursor-pointer",
2536
+ "group"
2537
+ ])
2538
+ }, [
2539
+ k("input", {
2540
+ id: B(r),
2541
+ type: "checkbox",
2542
+ role: "switch",
2543
+ checked: e.modelValue,
2544
+ "aria-checked": e.modelValue,
2545
+ disabled: e.disabled,
2546
+ class: "sr-only peer",
2547
+ onChange: d
2548
+ }, null, 40, Ts),
2549
+ k("span", {
2550
+ class: R(i.value),
2551
+ "aria-hidden": "true"
2552
+ }, [
2553
+ k("span", {
2554
+ class: R(c.value)
2555
+ }, null, 2)
2556
+ ], 2),
2557
+ e.label || l.$slots.default ? (g(), h("span", {
2558
+ key: 0,
2559
+ class: R(f.value)
2560
+ }, [
2561
+ P(l.$slots, "default", {}, () => [
2562
+ K(L(e.label), 1)
2563
+ ])
2564
+ ], 2)) : V("", !0)
2565
+ ], 2));
2566
+ }
2567
+ }), Vs = { class: "w-full overflow-x-auto shadow-sm" }, Rs = {
2307
2568
  class: "w-full border-collapse text-sm",
2308
2569
  role: "table"
2309
- }, mo = { class: "border-b border-solid border-border bg-bg-secondary" }, go = ["aria-sort", "onClick"], ho = {
2570
+ }, Ls = { class: "border-b border-solid border-border bg-bg-secondary" }, Ss = ["aria-sort", "onClick"], Bs = {
2310
2571
  key: 0,
2311
2572
  class: "inline-flex",
2312
2573
  "aria-hidden": "true"
2313
- }, vo = { class: "border-solid border-border" }, po = { key: 0 }, yo = ["colspan"], xo = { key: 1 }, wo = ["colspan"], ko = ["onClick"], Co = ["onClick"], Fo = {
2574
+ }, As = { class: "border-solid border-border" }, Os = { key: 0 }, zs = ["colspan"], Es = { key: 1 }, Ms = ["colspan"], js = ["onClick"], Ps = ["onClick"], Is = {
2314
2575
  key: 0,
2315
2576
  class: "flex items-center justify-between px-4 py-3 border-t border-solid border-border bg-bg-secondary text-sm"
2316
- }, $o = { class: "text-fg-secondary" }, Do = { class: "flex gap-2" }, Eo = ["disabled"], Ao = ["disabled"], fs = /* @__PURE__ */ S({
2577
+ }, Fs = { class: "text-fg-secondary" }, Ns = { class: "flex gap-2" }, Ws = ["disabled"], Hs = ["disabled"], Ro = /* @__PURE__ */ z({
2317
2578
  __name: "DsTable",
2318
2579
  props: {
2319
2580
  columns: {},
@@ -2330,138 +2591,138 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
2330
2591
  pagination: {}
2331
2592
  },
2332
2593
  emits: ["update:sortBy", "update:sortOrder", "update:page", "row:click", "cell:click"],
2333
- setup(e, { expose: t, emit: n }) {
2334
- const o = e, s = n, r = C(() => o.pagination ? Math.ceil(o.pagination.total / o.pagination.perPage) : 0), a = C(() => o.pagination ? (o.pagination.page - 1) * o.pagination.perPage + 1 : 0), d = C(() => o.pagination ? Math.min(
2335
- o.pagination.page * o.pagination.perPage,
2336
- o.pagination.total
2594
+ setup(e, { expose: n, emit: t }) {
2595
+ const s = e, o = t, r = w(() => s.pagination ? Math.ceil(s.pagination.total / s.pagination.perPage) : 0), a = w(() => s.pagination ? (s.pagination.page - 1) * s.pagination.perPage + 1 : 0), i = w(() => s.pagination ? Math.min(
2596
+ s.pagination.page * s.pagination.perPage,
2597
+ s.pagination.total
2337
2598
  ) : 0);
2338
- function i(b) {
2339
- o.sortBy === b ? o.sortOrder === "asc" ? s("update:sortOrder", "desc") : (s("update:sortBy", ""), s("update:sortOrder", "asc")) : (s("update:sortBy", b), s("update:sortOrder", "asc"));
2599
+ function c(m) {
2600
+ s.sortBy === m ? s.sortOrder === "asc" ? o("update:sortOrder", "desc") : (o("update:sortBy", ""), o("update:sortOrder", "asc")) : (o("update:sortBy", m), o("update:sortOrder", "asc"));
2340
2601
  }
2341
- function f(b) {
2342
- if (b.sortable)
2343
- return o.sortBy !== b.key ? "none" : o.sortOrder === "asc" ? "ascending" : "descending";
2602
+ function f(m) {
2603
+ if (m.sortable)
2604
+ return s.sortBy !== m.key ? "none" : s.sortOrder === "asc" ? "ascending" : "descending";
2344
2605
  }
2345
- function c(b) {
2346
- return b === "center" ? "justify-center" : b === "right" ? "justify-end" : "";
2606
+ function d(m) {
2607
+ return m === "center" ? "justify-center" : m === "right" ? "justify-end" : "";
2347
2608
  }
2348
- function l(b) {
2609
+ function l(m) {
2349
2610
  return [
2350
2611
  "px-4 py-3 text-left font-sans text-sm font-500 text-fg-secondary",
2351
- b.sortable ? "cursor-pointer select-none hover:text-fg" : ""
2612
+ m.sortable ? "cursor-pointer select-none hover:text-fg" : ""
2352
2613
  ].join(" ");
2353
2614
  }
2354
- function m(b) {
2355
- return `px-4 py-3 ${b.align === "center" ? "text-center" : b.align === "right" ? "text-right" : "text-left"}`;
2615
+ function b(m) {
2616
+ return `px-4 py-3 ${m.align === "center" ? "text-center" : m.align === "right" ? "text-right" : "text-left"}`;
2356
2617
  }
2357
- function u(b, y) {
2358
- s("row:click", b, y);
2618
+ function u(m, y) {
2619
+ o("row:click", m, y);
2359
2620
  }
2360
- function h(b, y) {
2361
- s("cell:click", b, y);
2621
+ function v(m, y) {
2622
+ o("cell:click", m, y);
2362
2623
  }
2363
- return t({
2624
+ return n({
2364
2625
  handleRowClick: u,
2365
- handleCellClick: h
2366
- }), (b, y) => (g(), v("div", fo, [
2367
- F("table", bo, [
2368
- F("thead", {
2369
- class: T(e.stickyHeader ? "sticky top-0 z-10" : "")
2626
+ handleCellClick: v
2627
+ }), (m, y) => (g(), h("div", Vs, [
2628
+ k("table", Rs, [
2629
+ k("thead", {
2630
+ class: R(e.stickyHeader ? "sticky top-0 z-sticky" : "")
2370
2631
  }, [
2371
- F("tr", mo, [
2372
- (g(!0), v(se, null, re(e.columns, (p) => (g(), v("th", {
2632
+ k("tr", Ls, [
2633
+ (g(!0), h(re, null, ae(e.columns, (p) => (g(), h("th", {
2373
2634
  key: p.key,
2374
- style: he(p.width ? { width: p.width } : void 0),
2375
- class: T(l(p)),
2635
+ style: le(p.width ? { width: p.width } : void 0),
2636
+ class: R(l(p)),
2376
2637
  "aria-sort": f(p),
2377
- onClick: (k) => p.sortable ? i(p.key) : void 0
2638
+ onClick: (C) => p.sortable ? c(p.key) : void 0
2378
2639
  }, [
2379
- F("div", {
2380
- class: T(["flex items-center gap-1", c(p.align)])
2640
+ k("div", {
2641
+ class: R(["flex items-center gap-1", d(p.align)])
2381
2642
  }, [
2382
- N(b.$slots, `header-${p.key}`, { column: p }, () => [
2383
- X(E(p.label), 1)
2643
+ P(m.$slots, `header-${p.key}`, { column: p }, () => [
2644
+ K(L(p.label), 1)
2384
2645
  ]),
2385
- p.sortable ? (g(), v("span", ho, [
2386
- e.sortBy === p.key && e.sortOrder === "asc" ? (g(), I(R(Vn), {
2646
+ p.sortable ? (g(), h("span", Bs, [
2647
+ e.sortBy === p.key && e.sortOrder === "asc" ? (g(), N(B(jn), {
2387
2648
  key: 0,
2388
2649
  class: "w-4 h-4"
2389
- })) : e.sortBy === p.key && e.sortOrder === "desc" ? (g(), I(R(Ge), {
2650
+ })) : e.sortBy === p.key && e.sortOrder === "desc" ? (g(), N(B(Pe), {
2390
2651
  key: 1,
2391
2652
  class: "w-4 h-4"
2392
- })) : (g(), I(R(zn), {
2653
+ })) : (g(), N(B(In), {
2393
2654
  key: 2,
2394
2655
  class: "w-4 h-4 text-fg-tertiary"
2395
2656
  }))
2396
- ])) : D("", !0)
2657
+ ])) : V("", !0)
2397
2658
  ], 2)
2398
- ], 14, go))), 128))
2659
+ ], 14, Ss))), 128))
2399
2660
  ])
2400
2661
  ], 2),
2401
- F("tbody", vo, [
2402
- e.loading ? (g(), v("tr", po, [
2403
- F("td", {
2662
+ k("tbody", As, [
2663
+ e.loading ? (g(), h("tr", Os, [
2664
+ k("td", {
2404
2665
  colspan: e.columns.length,
2405
2666
  class: "text-center py-12"
2406
2667
  }, [
2407
- N(b.$slots, "loading", {}, () => [
2408
- _(Jn, { centered: "" })
2668
+ P(m.$slots, "loading", {}, () => [
2669
+ ee(os, { centered: "" })
2409
2670
  ])
2410
- ], 8, yo)
2411
- ])) : e.rows.length === 0 ? (g(), v("tr", xo, [
2412
- F("td", {
2671
+ ], 8, zs)
2672
+ ])) : e.rows.length === 0 ? (g(), h("tr", Es, [
2673
+ k("td", {
2413
2674
  colspan: e.columns.length,
2414
2675
  class: "text-center py-12 text-fg-secondary"
2415
2676
  }, [
2416
- N(b.$slots, "empty", {}, () => [
2417
- X(E(e.emptyText), 1)
2677
+ P(m.$slots, "empty", {}, () => [
2678
+ K(L(e.emptyText), 1)
2418
2679
  ])
2419
- ], 8, wo)
2420
- ])) : D("", !0),
2421
- (g(!0), v(se, null, re(e.rows, (p, k) => (g(), v("tr", {
2422
- key: k,
2423
- class: T([
2680
+ ], 8, Ms)
2681
+ ])) : V("", !0),
2682
+ (g(!0), h(re, null, ae(e.rows, (p, C) => (g(), h("tr", {
2683
+ key: C,
2684
+ class: R([
2424
2685
  "border-b border-solid border-y-border-light transition-colors hover:bg-surface-hover-light border-x-border",
2425
- e.striped && k % 2 === 1 ? "bg-bg-secondary" : ""
2686
+ e.striped && C % 2 === 1 ? "bg-bg-secondary" : ""
2426
2687
  ]),
2427
- onClick: (x) => u(p, k)
2688
+ onClick: (D) => u(p, C)
2428
2689
  }, [
2429
- (g(!0), v(se, null, re(e.columns, (x) => (g(), v("td", {
2430
- key: x.key,
2431
- class: T(m(x)),
2432
- onClick: ($) => h(p, x.key)
2690
+ (g(!0), h(re, null, ae(e.columns, (D) => (g(), h("td", {
2691
+ key: D.key,
2692
+ class: R(b(D)),
2693
+ onClick: (A) => v(p, D.key)
2433
2694
  }, [
2434
- N(b.$slots, `cell-${x.key}`, {
2695
+ P(m.$slots, `cell-${D.key}`, {
2435
2696
  row: p,
2436
- value: p[x.key],
2437
- index: k
2697
+ value: p[D.key],
2698
+ index: C
2438
2699
  }, () => [
2439
- X(E(p[x.key]), 1)
2700
+ K(L(p[D.key]), 1)
2440
2701
  ])
2441
- ], 10, Co))), 128))
2442
- ], 10, ko))), 128))
2702
+ ], 10, Ps))), 128))
2703
+ ], 10, js))), 128))
2443
2704
  ])
2444
2705
  ]),
2445
- e.pagination ? (g(), v("div", Fo, [
2446
- F("span", $o, E(a.value) + "–" + E(d.value) + " " + E(e.ofLabel) + " " + E(e.pagination.total), 1),
2447
- F("div", Do, [
2448
- F("button", {
2706
+ e.pagination ? (g(), h("div", Is, [
2707
+ k("span", Fs, L(a.value) + "–" + L(i.value) + " " + L(e.ofLabel) + " " + L(e.pagination.total), 1),
2708
+ k("div", Ns, [
2709
+ k("button", {
2449
2710
  type: "button",
2450
2711
  disabled: e.pagination.page <= 1,
2451
2712
  class: "px-3 py-1 rounded-md border border-solid border-border bg-bg text-fg disabled:opacity-50 disabled:cursor-not-allowed hover:bg-surface-hover-light transition-colors",
2452
- onClick: y[0] || (y[0] = (p) => b.$emit("update:page", e.pagination.page - 1))
2453
- }, E(e.previousPageLabel), 9, Eo),
2454
- F("button", {
2713
+ onClick: y[0] || (y[0] = (p) => m.$emit("update:page", e.pagination.page - 1))
2714
+ }, L(e.previousPageLabel), 9, Ws),
2715
+ k("button", {
2455
2716
  type: "button",
2456
2717
  disabled: e.pagination.page >= r.value,
2457
2718
  class: "px-3 py-1 rounded-md border border-solid border-border bg-bg text-fg disabled:opacity-50 disabled:cursor-not-allowed hover:bg-surface-hover-light transition-colors",
2458
- onClick: y[1] || (y[1] = (p) => b.$emit("update:page", e.pagination.page + 1))
2459
- }, E(e.nextPageLabel), 9, Ao)
2719
+ onClick: y[1] || (y[1] = (p) => m.$emit("update:page", e.pagination.page + 1))
2720
+ }, L(e.nextPageLabel), 9, Hs)
2460
2721
  ])
2461
- ])) : D("", !0)
2722
+ ])) : V("", !0)
2462
2723
  ]));
2463
2724
  }
2464
- }), Bo = ["aria-label"], To = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick", "onKeydown"], Ro = ["id", "aria-labelledby", "hidden"], bs = /* @__PURE__ */ S({
2725
+ }), qs = ["aria-label"], Ks = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick", "onKeydown"], Us = ["id", "aria-labelledby", "hidden"], Lo = /* @__PURE__ */ z({
2465
2726
  __name: "DsTabs",
2466
2727
  props: {
2467
2728
  modelValue: {},
@@ -2470,38 +2731,38 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
2470
2731
  ariaLabel: { default: "Tabs" }
2471
2732
  },
2472
2733
  emits: ["update:modelValue"],
2473
- setup(e, { emit: t }) {
2474
- const n = e, o = t, s = fe("tabs"), r = C(
2475
- () => n.variant === "line" ? "flex border-b border-solid border-border gap-0" : "flex gap-1 bg-neutral-soft p-1 rounded-lg"
2734
+ setup(e, { emit: n }) {
2735
+ const t = e, s = n, o = se("tabs"), r = w(
2736
+ () => t.variant === "line" ? "flex border-b border-solid border-border gap-0" : "flex gap-1 bg-neutral-soft p-1 rounded-lg"
2476
2737
  );
2477
2738
  function a(f) {
2478
- f.disabled || o("update:modelValue", f.key);
2739
+ f.disabled || s("update:modelValue", f.key);
2479
2740
  }
2480
- function d(f) {
2481
- const c = n.modelValue === f.key, l = "font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed";
2482
- return n.variant === "line" ? [
2741
+ function i(f) {
2742
+ const d = t.modelValue === f.key, l = "font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed";
2743
+ return t.variant === "line" ? [
2483
2744
  l,
2484
2745
  "px-4 py-2 text-sm border-b-2 border-solid border-t-0 border-l-0 border-r-0 bg-transparent -mb-px",
2485
- c ? "border-b-brand text-brand" : "border-b-transparent text-fg-secondary hover:text-fg hover:border-b-border-strong"
2746
+ d ? "border-b-brand text-brand" : "border-b-transparent text-fg-secondary hover:text-fg hover:border-b-border-strong"
2486
2747
  ].join(" ") : [
2487
2748
  l,
2488
2749
  "px-3 py-1.5 text-sm rounded-md border-0",
2489
- c ? "bg-bg text-fg shadow-default" : "bg-transparent text-fg-secondary hover:text-fg"
2750
+ d ? "bg-bg text-fg shadow-default" : "bg-transparent text-fg-secondary hover:text-fg"
2490
2751
  ].join(" ");
2491
2752
  }
2492
- function i(f, c) {
2493
- const l = n.tabs.filter((y) => !y.disabled), m = l.findIndex(
2494
- (y) => y.key === n.tabs[c].key
2753
+ function c(f, d) {
2754
+ const l = t.tabs.filter((y) => !y.disabled), b = l.findIndex(
2755
+ (y) => y.key === t.tabs[d].key
2495
2756
  );
2496
2757
  let u = -1;
2497
2758
  switch (f.key) {
2498
2759
  case "ArrowRight":
2499
2760
  case "ArrowDown":
2500
- f.preventDefault(), u = (m + 1) % l.length;
2761
+ f.preventDefault(), u = (b + 1) % l.length;
2501
2762
  break;
2502
2763
  case "ArrowLeft":
2503
2764
  case "ArrowUp":
2504
- f.preventDefault(), u = (m - 1 + l.length) % l.length;
2765
+ f.preventDefault(), u = (b - 1 + l.length) % l.length;
2505
2766
  break;
2506
2767
  case "Home":
2507
2768
  f.preventDefault(), u = 0;
@@ -2512,54 +2773,54 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
2512
2773
  default:
2513
2774
  return;
2514
2775
  }
2515
- const h = l[u];
2516
- o("update:modelValue", h.key);
2517
- const b = document.getElementById(`${s}-tab-${h.key}`);
2518
- b == null || b.focus();
2776
+ const v = l[u];
2777
+ s("update:modelValue", v.key);
2778
+ const m = document.getElementById(`${o}-tab-${v.key}`);
2779
+ m == null || m.focus();
2519
2780
  }
2520
- return (f, c) => (g(), v("div", null, [
2521
- F("div", {
2522
- class: T(r.value),
2781
+ return (f, d) => (g(), h("div", null, [
2782
+ k("div", {
2783
+ class: R(r.value),
2523
2784
  role: "tablist",
2524
2785
  "aria-label": e.ariaLabel
2525
2786
  }, [
2526
- (g(!0), v(se, null, re(e.tabs, (l, m) => (g(), v("button", {
2787
+ (g(!0), h(re, null, ae(e.tabs, (l, b) => (g(), h("button", {
2527
2788
  key: l.key,
2528
- id: `${R(s)}-tab-${l.key}`,
2789
+ id: `${B(o)}-tab-${l.key}`,
2529
2790
  role: "tab",
2530
2791
  type: "button",
2531
2792
  "aria-selected": e.modelValue === l.key,
2532
- "aria-controls": `${R(s)}-panel-${l.key}`,
2793
+ "aria-controls": `${B(o)}-panel-${l.key}`,
2533
2794
  tabindex: e.modelValue === l.key ? 0 : -1,
2534
2795
  disabled: l.disabled,
2535
- class: T(d(l)),
2796
+ class: R(i(l)),
2536
2797
  onClick: (u) => a(l),
2537
- onKeydown: (u) => i(u, m)
2538
- }, E(l.label), 43, To))), 128))
2539
- ], 10, Bo),
2540
- (g(!0), v(se, null, re(e.tabs, (l) => (g(), v("div", {
2798
+ onKeydown: (u) => c(u, b)
2799
+ }, L(l.label), 43, Ks))), 128))
2800
+ ], 10, qs),
2801
+ (g(!0), h(re, null, ae(e.tabs, (l) => (g(), h("div", {
2541
2802
  key: l.key,
2542
- id: `${R(s)}-panel-${l.key}`,
2803
+ id: `${B(o)}-panel-${l.key}`,
2543
2804
  role: "tabpanel",
2544
- "aria-labelledby": `${R(s)}-tab-${l.key}`,
2805
+ "aria-labelledby": `${B(o)}-tab-${l.key}`,
2545
2806
  hidden: e.modelValue !== l.key,
2546
2807
  tabindex: 0
2547
2808
  }, [
2548
- e.modelValue === l.key ? N(f.$slots, l.key, { key: 0 }) : D("", !0)
2549
- ], 8, Ro))), 128))
2809
+ e.modelValue === l.key ? P(f.$slots, l.key, { key: 0 }) : V("", !0)
2810
+ ], 8, Us))), 128))
2550
2811
  ]));
2551
2812
  }
2552
- }), Lo = { class: "w-full" }, Oo = ["for"], Vo = {
2813
+ }), Xs = { class: "w-full" }, Ys = ["for"], Gs = {
2553
2814
  key: 0,
2554
2815
  class: "text-error ml-1",
2555
2816
  "aria-hidden": "true"
2556
- }, So = { class: "relative" }, zo = ["id", "value", "placeholder", "disabled", "readonly", "required", "rows", "maxlength", "aria-describedby", "aria-invalid"], Mo = {
2817
+ }, Js = { class: "relative" }, Qs = ["id", "value", "placeholder", "disabled", "readonly", "required", "rows", "maxlength", "aria-describedby", "aria-invalid"], Zs = {
2557
2818
  key: 1,
2558
2819
  class: "flex justify-between mt-1"
2559
- }, jo = {
2820
+ }, _s = {
2560
2821
  key: 2,
2561
2822
  class: "text-caption ml-auto"
2562
- }, ms = /* @__PURE__ */ S({
2823
+ }, So = /* @__PURE__ */ z({
2563
2824
  __name: "DsTextarea",
2564
2825
  props: {
2565
2826
  modelValue: {},
@@ -2575,12 +2836,12 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
2575
2836
  maxLength: {}
2576
2837
  },
2577
2838
  emits: ["update:modelValue", "blur", "focus"],
2578
- setup(e, { expose: t, emit: n }) {
2579
- const o = e, s = n, r = j(null), a = fe("textarea"), d = `${a}-help`, i = `${a}-error`, f = C(() => {
2580
- const b = [];
2581
- return o.helpText && !o.error && b.push(d), o.error && b.push(i), b.length > 0 ? b.join(" ") : void 0;
2582
- }), c = C(() => (o.modelValue || "").length), l = C(() => {
2583
- const b = [
2839
+ setup(e, { expose: n, emit: t }) {
2840
+ const s = e, o = t, r = j(null), a = se("textarea"), i = `${a}-help`, c = `${a}-error`, f = w(() => {
2841
+ const m = [];
2842
+ return s.helpText && !s.error && m.push(i), s.error && m.push(c), m.length > 0 ? m.join(" ") : void 0;
2843
+ }), d = w(() => (s.modelValue || "").length), l = w(() => {
2844
+ const m = [
2584
2845
  "block",
2585
2846
  "w-full",
2586
2847
  "rounded-md",
@@ -2603,34 +2864,34 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
2603
2864
  small: "px-2 py-1 text-sm",
2604
2865
  medium: "px-3 py-2 text-base",
2605
2866
  large: "px-4 py-3 text-lg"
2606
- }, p = o.error ? ["border-error-border", "focus:border-error", "focus:ring-error"] : ["border-border", "focus:border-border-focus", "focus:ring-brand"];
2607
- return [...b, y[o.size], ...p].join(" ");
2608
- }), m = (b) => {
2609
- const y = b.target;
2610
- s("update:modelValue", y.value);
2867
+ }, p = s.error ? ["border-error-border", "focus:border-error", "focus:ring-error"] : ["border-border", "focus:border-border-focus", "focus:ring-focus-ring"];
2868
+ return [...m, y[s.size], ...p].join(" ");
2869
+ }), b = (m) => {
2870
+ const y = m.target;
2871
+ o("update:modelValue", y.value);
2611
2872
  };
2612
2873
  function u() {
2613
- var b;
2614
- (b = r.value) == null || b.focus();
2874
+ var m;
2875
+ (m = r.value) == null || m.focus();
2615
2876
  }
2616
- function h() {
2617
- var b;
2618
- (b = r.value) == null || b.blur();
2877
+ function v() {
2878
+ var m;
2879
+ (m = r.value) == null || m.blur();
2619
2880
  }
2620
- return t({ focus: u, blur: h, textareaRef: r }), (b, y) => (g(), v("div", Lo, [
2621
- e.label ? (g(), v("label", {
2881
+ return n({ focus: u, blur: v, textareaRef: r }), (m, y) => (g(), h("div", Xs, [
2882
+ e.label ? (g(), h("label", {
2622
2883
  key: 0,
2623
- for: R(a),
2884
+ for: B(a),
2624
2885
  class: "block text-label mb-1"
2625
2886
  }, [
2626
- X(E(e.label) + " ", 1),
2627
- e.required ? (g(), v("span", Vo, "*")) : D("", !0)
2628
- ], 8, Oo)) : D("", !0),
2629
- F("div", So, [
2630
- F("textarea", {
2887
+ K(L(e.label) + " ", 1),
2888
+ e.required ? (g(), h("span", Gs, "*")) : V("", !0)
2889
+ ], 8, Ys)) : V("", !0),
2890
+ k("div", Js, [
2891
+ k("textarea", {
2631
2892
  ref_key: "textareaRef",
2632
2893
  ref: r,
2633
- id: R(a),
2894
+ id: B(a),
2634
2895
  value: e.modelValue,
2635
2896
  placeholder: e.placeholder,
2636
2897
  disabled: e.disabled,
@@ -2640,181 +2901,181 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
2640
2901
  maxlength: e.maxLength,
2641
2902
  "aria-describedby": f.value,
2642
2903
  "aria-invalid": e.error ? "true" : void 0,
2643
- class: T(l.value),
2644
- onInput: m,
2645
- onBlur: y[0] || (y[0] = (p) => b.$emit("blur", p)),
2646
- onFocus: y[1] || (y[1] = (p) => b.$emit("focus", p))
2647
- }, null, 42, zo)
2904
+ class: R(l.value),
2905
+ onInput: b,
2906
+ onBlur: y[0] || (y[0] = (p) => m.$emit("blur", p)),
2907
+ onFocus: y[1] || (y[1] = (p) => m.$emit("focus", p))
2908
+ }, null, 42, Qs)
2648
2909
  ]),
2649
- e.helpText || e.error || e.maxLength ? (g(), v("div", Mo, [
2650
- e.helpText && !e.error ? (g(), v("div", {
2910
+ e.helpText || e.error || e.maxLength ? (g(), h("div", Zs, [
2911
+ e.helpText && !e.error ? (g(), h("div", {
2651
2912
  key: 0,
2652
- id: d,
2913
+ id: i,
2653
2914
  class: "text-caption"
2654
- }, E(e.helpText), 1)) : D("", !0),
2655
- e.error ? (g(), v("div", {
2915
+ }, L(e.helpText), 1)) : V("", !0),
2916
+ e.error ? (g(), h("div", {
2656
2917
  key: 1,
2657
- id: i,
2918
+ id: c,
2658
2919
  class: "text-sm text-error font-sans",
2659
2920
  role: "alert",
2660
2921
  "aria-live": "polite"
2661
- }, E(e.error), 1)) : D("", !0),
2662
- e.maxLength ? (g(), v("div", jo, E(c.value) + " / " + E(e.maxLength), 1)) : D("", !0)
2663
- ])) : D("", !0)
2922
+ }, L(e.error), 1)) : V("", !0),
2923
+ e.maxLength ? (g(), h("div", _s, L(d.value) + " / " + L(e.maxLength), 1)) : V("", !0)
2924
+ ])) : V("", !0)
2664
2925
  ]));
2665
2926
  }
2666
- }), Po = { class: "flex flex-col items-center justify-center h-screen gap-4px" }, Io = { class: "text-heading-xl text-fg m-0 p-0" }, No = { class: "text-body-lg text-fg-secondary m-0 p-0" }, gs = /* @__PURE__ */ S({
2927
+ }), eo = { class: "flex flex-col items-center justify-center h-screen gap-4px" }, to = { class: "text-heading-xl text-fg m-0 p-0" }, no = { class: "text-body-lg text-fg-secondary m-0 p-0" }, Bo = /* @__PURE__ */ z({
2667
2928
  __name: "DsUnderConstruction",
2668
2929
  props: {
2669
2930
  title: { default: "Under Construction" },
2670
2931
  description: { default: "This page is under construction. Please check back later." }
2671
2932
  },
2672
2933
  setup(e) {
2673
- return (t, n) => (g(), v("div", Po, [
2674
- _(R(wt), { class: "w-10 h-10 text-fg-secondary" }),
2675
- F("h2", Io, E(e.title), 1),
2676
- F("p", No, E(e.description), 1)
2934
+ return (n, t) => (g(), h("div", eo, [
2935
+ ee(B($t), { class: "w-10 h-10 text-fg-secondary" }),
2936
+ k("h2", to, L(e.title), 1),
2937
+ k("p", no, L(e.description), 1)
2677
2938
  ]));
2678
2939
  }
2679
- }), Wo = ["role", "aria-live"], Ho = { class: "flex items-start gap-3 flex-1 min-w-0" }, qo = { class: "flex-1 min-w-0" }, Ko = {
2940
+ }), so = ["role", "aria-live"], oo = { class: "flex items-start gap-3 flex-1 min-w-0" }, ro = { class: "flex-1 min-w-0" }, ao = {
2680
2941
  key: 0,
2681
2942
  class: "text-label m-0"
2682
- }, Uo = /* @__PURE__ */ S({
2943
+ }, lo = /* @__PURE__ */ z({
2683
2944
  __name: "DsToast",
2684
2945
  props: {
2685
2946
  toast: {}
2686
2947
  },
2687
2948
  emits: ["dismiss"],
2688
- setup(e, { emit: t }) {
2689
- const n = e, o = t;
2690
- let s = null, r = n.toast.duration, a = 0;
2691
- function d() {
2692
- r <= 0 || (a = Date.now(), s = setTimeout(() => {
2693
- o("dismiss", n.toast.id);
2949
+ setup(e, { emit: n }) {
2950
+ const t = e, s = n;
2951
+ let o = null, r = t.toast.duration, a = 0;
2952
+ function i() {
2953
+ r <= 0 || (a = Date.now(), o = setTimeout(() => {
2954
+ s("dismiss", t.toast.id);
2694
2955
  }, r));
2695
2956
  }
2696
- function i() {
2697
- s && (clearTimeout(s), s = null, r -= Date.now() - a);
2957
+ function c() {
2958
+ o && (clearTimeout(o), o = null, r -= Date.now() - a);
2698
2959
  }
2699
2960
  function f() {
2700
- d();
2961
+ i();
2701
2962
  }
2702
- const c = {
2963
+ const d = {
2703
2964
  brand: "border-l-brand",
2704
2965
  error: "border-l-error",
2705
2966
  success: "border-l-success",
2706
2967
  warning: "border-l-warning",
2707
2968
  info: "border-l-info"
2708
- }, l = C(() => [
2969
+ }, l = w(() => [
2709
2970
  "flex items-start gap-3 w-80 p-4 bg-bg border border-solid border-border rounded-lg shadow-lg",
2710
2971
  "border-l-4",
2711
- c[n.toast.variant] || "border-l-brand"
2712
- ].join(" ")), m = {
2972
+ d[t.toast.variant] || "border-l-brand"
2973
+ ].join(" ")), b = {
2713
2974
  brand: "text-brand",
2714
2975
  error: "text-error",
2715
2976
  success: "text-success",
2716
2977
  warning: "text-warning",
2717
2978
  info: "text-info"
2718
- }, u = C(() => ["shrink-0 mt-0.5", m[n.toast.variant] || "text-brand"].join(" "));
2719
- return Et(() => {
2720
- n.toast.duration > 0 && d();
2721
- }), rt(() => {
2722
- s && clearTimeout(s);
2723
- }), (h, b) => (g(), v("div", {
2724
- class: T(l.value),
2979
+ }, u = w(() => ["shrink-0 mt-0.5", b[t.toast.variant] || "text-brand"].join(" "));
2980
+ return ot(() => {
2981
+ t.toast.duration > 0 && i();
2982
+ }), at(() => {
2983
+ o && clearTimeout(o);
2984
+ }), (v, m) => (g(), h("div", {
2985
+ class: R(l.value),
2725
2986
  role: e.toast.variant === "error" ? "alert" : "status",
2726
2987
  "aria-live": e.toast.variant === "error" ? "assertive" : "polite",
2727
- onMouseenter: i,
2988
+ onMouseenter: c,
2728
2989
  onMouseleave: f
2729
2990
  }, [
2730
- F("div", Ho, [
2731
- F("span", {
2732
- class: T(u.value),
2991
+ k("div", oo, [
2992
+ k("span", {
2993
+ class: R(u.value),
2733
2994
  "aria-hidden": "true"
2734
2995
  }, [
2735
- e.toast.variant === "success" ? (g(), I(R(On), {
2996
+ e.toast.variant === "success" ? (g(), N(B(Mn), {
2736
2997
  key: 0,
2737
2998
  class: "w-5 h-5"
2738
- })) : e.toast.variant === "error" ? (g(), I(R(Be), {
2999
+ })) : e.toast.variant === "error" ? (g(), N(B(Se), {
2739
3000
  key: 1,
2740
3001
  class: "w-5 h-5"
2741
- })) : e.toast.variant === "warning" ? (g(), I(R(wt), {
3002
+ })) : e.toast.variant === "warning" ? (g(), N(B($t), {
2742
3003
  key: 2,
2743
3004
  class: "w-5 h-5"
2744
- })) : (g(), I(R(Sn), {
3005
+ })) : (g(), N(B(Pn), {
2745
3006
  key: 3,
2746
3007
  class: "w-5 h-5"
2747
3008
  }))
2748
3009
  ], 2),
2749
- F("div", qo, [
2750
- e.toast.title ? (g(), v("p", Ko, E(e.toast.title), 1)) : D("", !0),
2751
- F("p", {
2752
- class: T(["text-body-sm m-0", e.toast.title ? "mt-0.5" : ""])
2753
- }, E(e.toast.message), 3)
3010
+ k("div", ro, [
3011
+ e.toast.title ? (g(), h("p", ao, L(e.toast.title), 1)) : V("", !0),
3012
+ k("p", {
3013
+ class: R(["text-body-sm m-0", e.toast.title ? "mt-0.5" : ""])
3014
+ }, L(e.toast.message), 3)
2754
3015
  ])
2755
3016
  ]),
2756
- e.toast.closable ? (g(), v("button", {
3017
+ e.toast.closable ? (g(), h("button", {
2757
3018
  key: 0,
2758
3019
  type: "button",
2759
- class: "p-1 rounded-md text-fg-tertiary hover:text-fg transition-colors shrink-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand",
3020
+ class: "appearance-none bg-transparent border-none p-1 rounded-md text-fg-tertiary hover:text-fg cursor-pointer transition-colors shrink-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring",
2760
3021
  "aria-label": "Dismiss notification",
2761
- onClick: b[0] || (b[0] = (y) => h.$emit("dismiss", e.toast.id))
3022
+ onClick: m[0] || (m[0] = (y) => v.$emit("dismiss", e.toast.id))
2762
3023
  }, [
2763
- _(R(Be), { class: "w-4 h-4" })
2764
- ])) : D("", !0)
2765
- ], 42, Wo));
3024
+ ee(B(Se), { class: "w-4 h-4" })
3025
+ ])) : V("", !0)
3026
+ ], 42, so));
2766
3027
  }
2767
3028
  });
2768
- let Xo = 0;
2769
- const Te = j([]);
2770
- function xe(e, t, n) {
2771
- const o = ++Xo, s = {
2772
- id: o,
3029
+ let io = 0;
3030
+ const Be = j([]);
3031
+ function we(e, n, t) {
3032
+ const s = ++io, o = {
3033
+ id: s,
2773
3034
  variant: e,
2774
- message: t,
2775
- title: n == null ? void 0 : n.title,
2776
- duration: (n == null ? void 0 : n.duration) ?? 5e3,
2777
- closable: (n == null ? void 0 : n.closable) ?? !0
3035
+ message: n,
3036
+ title: t == null ? void 0 : t.title,
3037
+ duration: (t == null ? void 0 : t.duration) ?? 5e3,
3038
+ closable: (t == null ? void 0 : t.closable) ?? !0
2778
3039
  };
2779
- return Te.value.push(s), o;
3040
+ return Be.value.push(o), s;
2780
3041
  }
2781
- function Yo(e) {
2782
- const t = Te.value.findIndex((n) => n.id === e);
2783
- t !== -1 && Te.value.splice(t, 1);
3042
+ function co(e) {
3043
+ const n = Be.value.findIndex((t) => t.id === e);
3044
+ n !== -1 && Be.value.splice(n, 1);
2784
3045
  }
2785
- function Go() {
3046
+ function uo() {
2786
3047
  return {
2787
- toasts: Te,
2788
- removeToast: Yo,
2789
- success: (e, t) => xe("success", e, t),
2790
- error: (e, t) => xe("error", e, t),
2791
- warning: (e, t) => xe("warning", e, t),
2792
- info: (e, t) => xe("info", e, t),
2793
- brand: (e, t) => xe("brand", e, t)
3048
+ toasts: Be,
3049
+ removeToast: co,
3050
+ success: (e, n) => we("success", e, n),
3051
+ error: (e, n) => we("error", e, n),
3052
+ warning: (e, n) => we("warning", e, n),
3053
+ info: (e, n) => we("info", e, n),
3054
+ brand: (e, n) => we("brand", e, n)
2794
3055
  };
2795
3056
  }
2796
- const Jo = {
2797
- class: "fixed top-4 right-4 z-50 flex flex-col gap-3",
3057
+ const fo = {
3058
+ class: "fixed top-4 right-4 z-toast flex flex-col gap-3",
2798
3059
  "aria-label": "Notifications"
2799
- }, hs = /* @__PURE__ */ S({
3060
+ }, Ao = /* @__PURE__ */ z({
2800
3061
  __name: "DsToastContainer",
2801
3062
  setup(e) {
2802
- const { toasts: t, removeToast: n } = Go();
2803
- return (o, s) => (g(), I(Le, { to: "body" }, [
2804
- F("div", Jo, [
2805
- _(At, {
2806
- "enter-active-class": "transition-all duration-300 ease-out",
3063
+ const { toasts: n, removeToast: t } = uo();
3064
+ return (s, o) => (g(), N(Oe, { to: "body" }, [
3065
+ k("div", fo, [
3066
+ ee(St, {
3067
+ "enter-active-class": "transition-all duration-slow ease-out",
2807
3068
  "enter-from-class": "opacity-0 translate-x-8",
2808
3069
  "enter-to-class": "opacity-100 translate-x-0",
2809
- "leave-active-class": "transition-all duration-200 ease-in",
3070
+ "leave-active-class": "transition-all duration-normal ease-in",
2810
3071
  "leave-from-class": "opacity-100 translate-x-0",
2811
3072
  "leave-to-class": "opacity-0 translate-x-8"
2812
3073
  }, {
2813
- default: Re(() => [
2814
- (g(!0), v(se, null, re(R(t), (r) => (g(), I(Uo, {
3074
+ default: Ae(() => [
3075
+ (g(!0), h(re, null, ae(B(n), (r) => (g(), N(lo, {
2815
3076
  key: r.id,
2816
3077
  toast: r,
2817
- onDismiss: R(n)
3078
+ onDismiss: B(t)
2818
3079
  }, null, 8, ["toast", "onDismiss"]))), 128))
2819
3080
  ]),
2820
3081
  _: 1
@@ -2822,7 +3083,7 @@ const Jo = {
2822
3083
  ])
2823
3084
  ]));
2824
3085
  }
2825
- }), Qo = ["aria-describedby"], Zo = ["id"], vs = /* @__PURE__ */ S({
3086
+ }), bo = ["aria-describedby"], mo = ["id"], Oo = /* @__PURE__ */ z({
2826
3087
  __name: "DsTooltip",
2827
3088
  props: {
2828
3089
  content: {},
@@ -2830,235 +3091,107 @@ const Jo = {
2830
3091
  disabled: { type: Boolean, default: !1 }
2831
3092
  },
2832
3093
  setup(e) {
2833
- const t = e, n = fe("tooltip"), o = j(!1), s = j(null), r = j(null), a = j(null), { floatingStyles: d, middlewareData: i, placement: f } = xt(s, r, {
2834
- placement: C(() => t.placement),
2835
- middleware: [ht(8), pt(), vt({ padding: 8 }), Ln({ element: a })]
2836
- }), c = C(() => {
2837
- const u = i.value.arrow;
3094
+ const n = e, t = se("tooltip"), s = j(!1), o = j(null), r = j(null), a = j(null), { floatingStyles: i, middlewareData: c, placement: f } = kt(o, r, {
3095
+ placement: w(() => n.placement),
3096
+ middleware: [pt(8), xt(), yt({ padding: 8 }), En({ element: a })]
3097
+ }), d = w(() => {
3098
+ const u = c.value.arrow;
2838
3099
  if (!u) return {};
2839
- const h = f.value.split("-")[0], b = { top: "bottom", right: "left", bottom: "top", left: "right" }[h];
3100
+ const v = f.value.split("-")[0], m = { top: "bottom", right: "left", bottom: "top", left: "right" }[v];
2840
3101
  return {
2841
3102
  left: u.x != null ? `${u.x}px` : "",
2842
3103
  top: u.y != null ? `${u.y}px` : "",
2843
- [b]: "-4px"
3104
+ [m]: "-4px"
2844
3105
  };
2845
3106
  });
2846
3107
  function l() {
2847
- t.disabled || (o.value = !0);
3108
+ n.disabled || (s.value = !0);
2848
3109
  }
2849
- function m() {
2850
- o.value = !1;
3110
+ function b() {
3111
+ s.value = !1;
2851
3112
  }
2852
- return (u, h) => (g(), v("div", {
3113
+ return (u, v) => (g(), h("div", {
2853
3114
  class: "inline-flex",
2854
3115
  onMouseenter: l,
2855
- onMouseleave: m,
3116
+ onMouseleave: b,
2856
3117
  onFocusin: l,
2857
- onFocusout: m
3118
+ onFocusout: b
2858
3119
  }, [
2859
- F("div", {
3120
+ k("div", {
2860
3121
  ref_key: "referenceRef",
2861
- ref: s,
2862
- "aria-describedby": o.value ? R(n) : void 0
3122
+ ref: o,
3123
+ "aria-describedby": s.value ? B(t) : void 0
2863
3124
  }, [
2864
- N(u.$slots, "default")
2865
- ], 8, Qo),
2866
- (g(), I(Le, { to: "body" }, [
2867
- _(at, {
2868
- "enter-active-class": "transition-opacity duration-150",
3125
+ P(u.$slots, "default")
3126
+ ], 8, bo),
3127
+ (g(), N(Oe, { to: "body" }, [
3128
+ ee(lt, {
3129
+ "enter-active-class": "transition-opacity duration-fast",
2869
3130
  "enter-from-class": "opacity-0",
2870
3131
  "enter-to-class": "opacity-100",
2871
- "leave-active-class": "transition-opacity duration-150",
3132
+ "leave-active-class": "transition-opacity duration-fast",
2872
3133
  "leave-from-class": "opacity-100",
2873
3134
  "leave-to-class": "opacity-0"
2874
3135
  }, {
2875
- default: Re(() => [
2876
- o.value && !e.disabled ? (g(), v("div", {
3136
+ default: Ae(() => [
3137
+ s.value && !e.disabled ? (g(), h("div", {
2877
3138
  key: 0,
2878
- id: R(n),
3139
+ id: B(t),
2879
3140
  ref_key: "floatingRef",
2880
3141
  ref: r,
2881
3142
  role: "tooltip",
2882
- style: he(R(d)),
2883
- class: "z-50 px-2 py-1 text-xs font-medium bg-bg-inverse text-fg-inverse rounded-md shadow-md max-w-xs pointer-events-none"
3143
+ style: le(B(i)),
3144
+ class: "z-tooltip px-2 py-1 text-xs font-medium bg-bg-inverse text-fg-inverse rounded-md shadow-md max-w-xs pointer-events-none"
2884
3145
  }, [
2885
- X(E(e.content) + " ", 1),
2886
- F("div", {
3146
+ K(L(e.content) + " ", 1),
3147
+ k("div", {
2887
3148
  ref_key: "arrowRef",
2888
3149
  ref: a,
2889
- style: he(c.value),
3150
+ style: le(d.value),
2890
3151
  class: "absolute w-2 h-2 bg-bg-inverse rotate-45"
2891
3152
  }, null, 4)
2892
- ], 12, Zo)) : D("", !0)
3153
+ ], 12, mo)) : V("", !0)
2893
3154
  ]),
2894
3155
  _: 1
2895
3156
  })
2896
3157
  ]))
2897
3158
  ], 32));
2898
3159
  }
2899
- }), _o = {
2900
- // Core UI
2901
- bg: "#FFFFFF",
2902
- "bg-secondary": "#F8FAFC",
2903
- "bg-tertiary": "#F1F5F9",
2904
- "bg-inverse": "#0F172A",
2905
- "bg-inverse-secondary": "#1E293B",
2906
- fg: "#0F172A",
2907
- "fg-secondary": "#64748B",
2908
- "fg-tertiary": "#94A3B8",
2909
- "fg-inverse": "#FFFFFF",
2910
- "fg-disabled": "#94A3B8",
2911
- icon: "#64748B",
2912
- "icon-hover": "#0F172A",
2913
- "icon-active": "#0EA5E9",
2914
- "icon-inverse": "#FFFFFF",
2915
- "icon-disabled": "#CBD5E1",
2916
- border: "#E2E8F0",
2917
- "border-light": "#F1F5F9",
2918
- "border-strong": "#CBD5E1",
2919
- "border-focus": "#0F172A",
2920
- "surface-hover": "#E2E8F0",
2921
- "surface-hover-light": "#F1F5F9",
2922
- "surface-active": "#B7E6FD",
2923
- "surface-disabled": "#FAFCFF",
2924
- // Brand
2925
- brand: "#0EA5E9",
2926
- "brand-hover": "#0284C7",
2927
- "brand-active": "#0369A1",
2928
- "brand-disabled": "#BAE6FD",
2929
- "brand-soft": "#F0F9FF",
2930
- "brand-soft-hover": "#E0F2FE",
2931
- "brand-soft-active": "#B7E6FD",
2932
- "brand-on-solid": "#FFFFFF",
2933
- "brand-on-soft": "#0EA5E9",
2934
- "brand-secondary": "#6366F1",
2935
- // Neutral
2936
- neutral: "#64748B",
2937
- "neutral-soft": "#F8FAFC",
2938
- "neutral-soft-hover": "#F1F5F9",
2939
- "neutral-soft-active": "#E2E8F0",
2940
- "neutral-on-solid": "#FFFFFF",
2941
- "neutral-on-soft": "#0F172A",
2942
- "neutral-border": "#D1D5DB",
2943
- "neutral-border-hover": "#B5BCC9",
2944
- "neutral-border-strong": "#94A3B8",
2945
- // Error
2946
- error: "#EF4444",
2947
- "error-hover": "#DC2626",
2948
- "error-active": "#B91C1C",
2949
- "error-soft": "#FEF2F2",
2950
- "error-soft-hover": "#FEE2E2",
2951
- "error-soft-active": "#FECACA",
2952
- "error-on-solid": "#FFFFFF",
2953
- "error-on-soft": "#EF4444",
2954
- "error-border": "#F8CDD1",
2955
- "error-border-hover": "#F5A6B3",
2956
- "error-border-strong": "#B91C1C",
2957
- // Success
2958
- success: "#10B981",
2959
- "success-hover": "#0A8D63",
2960
- "success-active": "#047857",
2961
- "success-soft": "#ECFDF5",
2962
- "success-soft-hover": "#D1FAE5",
2963
- "success-soft-active": "#A7F3D0",
2964
- "success-on-solid": "#FFFFFF",
2965
- "success-on-soft": "#10B981",
2966
- "success-border": "#BEF3D0",
2967
- "success-border-hover": "#86EFAC",
2968
- "success-border-strong": "#0EA875",
2969
- // Warning
2970
- warning: "#F59E0B",
2971
- "warning-hover": "#D97706",
2972
- "warning-active": "#B45309",
2973
- "warning-soft": "#FFFBEB",
2974
- "warning-soft-hover": "#FEF3C7",
2975
- "warning-soft-active": "#FDE68A",
2976
- "warning-on-solid": "#FFFFFF",
2977
- "warning-on-soft": "#92400E",
2978
- "warning-border": "#F3E6A5",
2979
- "warning-border-hover": "#E6D378",
2980
- // Info
2981
- info: "#3B82F6",
2982
- "info-hover": "#2563EB",
2983
- "info-active": "#1D4ED8",
2984
- "info-soft": "#EFF6FF",
2985
- "info-soft-hover": "#DBEAFE",
2986
- "info-soft-active": "#BFDBFE",
2987
- "info-on-solid": "#FFFFFF",
2988
- "info-on-soft": "#1E40AF",
2989
- "info-border": "#C5D7F5",
2990
- "info-border-hover": "#A8CCF2",
2991
- // Processing
2992
- processing: "#06B6D4",
2993
- "processing-hover": "#0891B2",
2994
- "processing-active": "#0E7490",
2995
- "processing-soft": "#ECFEFF",
2996
- "processing-soft-hover": "#CFFAFE",
2997
- "processing-soft-active": "#A5F3FC",
2998
- "processing-on-solid": "#FFFFFF",
2999
- "processing-on-soft": "#155E75",
3000
- "processing-border": "#B3F0FC",
3001
- "processing-border-hover": "#7FE8F5",
3002
- // Transcript (domain-specific)
3003
- "transcript-bg": "#FEFCE8",
3004
- "transcript-highlight": "#FEF3C7",
3005
- "transcript-speaker": "#EDE9FE",
3006
- "transcript-timestamp": "#F3F4F6"
3007
- }, es = {
3008
- "space-1": "4px",
3009
- "space-2": "8px",
3010
- "space-3": "12px",
3011
- "space-4": "16px",
3012
- "space-5": "24px",
3013
- "space-6": "32px",
3014
- "space-7": "48px",
3015
- "space-8": "64px"
3016
- }, ts = {
3017
- "radius-sm": "4px",
3018
- "radius-md": "6px",
3019
- "radius-lg": "8px",
3020
- "radius-xl": "12px",
3021
- "radius-full": "9999px"
3022
- }, ns = {
3023
- "shadow-sm": "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
3024
- "shadow-md": "0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 4px 6px -1px rgba(0, 0, 0, 0.1)",
3025
- "shadow-lg": "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"
3026
- }, ps = { ..._o, ...es, ...ts, ...ns };
3027
- function ys(e) {
3028
- return `--ds-${e}`;
3029
- }
3030
- function xs(e, t = ":root") {
3031
- const n = Object.entries(e).map(([o, s]) => ` --ds-${o}: ${s};`).join(`
3032
- `);
3033
- return `${t} {
3034
- ${n}
3035
- }`;
3036
- }
3160
+ });
3037
3161
  export {
3038
- ss as DsAvatar,
3039
- rs as DsBadge,
3040
- Ot as DsButton,
3041
- as as DsCheckbox,
3042
- ls as DsDropdownSelect,
3043
- is as DsInput,
3044
- Jn as DsLoadingSpinner,
3045
- cs as DsModal,
3046
- ds as DsRadio,
3047
- us as DsSelect,
3048
- fs as DsTable,
3049
- bs as DsTabs,
3050
- ms as DsTextarea,
3051
- Uo as DsToast,
3052
- hs as DsToastContainer,
3053
- vs as DsTooltip,
3054
- gs as DsUnderConstruction,
3055
- ps as allTokens,
3056
- _o as colorTokens,
3057
- xs as generateThemeCss,
3058
- ts as radiusTokens,
3059
- ns as shadowTokens,
3060
- es as spacingTokens,
3061
- ys as tokenToCssVar,
3062
- fe as useId,
3063
- Go as useToast
3162
+ ho as DsAvatar,
3163
+ vo as DsBadge,
3164
+ it as DsButton,
3165
+ po as DsCard,
3166
+ yo as DsCheckbox,
3167
+ xo as DsDropdownSelect,
3168
+ wo as DsExpandableCard,
3169
+ ko as DsInput,
3170
+ os as DsLoadingSpinner,
3171
+ $o as DsModal,
3172
+ Co as DsRadio,
3173
+ Do as DsSelect,
3174
+ To as DsSlider,
3175
+ Vo as DsSwitch,
3176
+ Ro as DsTable,
3177
+ Lo as DsTabs,
3178
+ So as DsTextarea,
3179
+ lo as DsToast,
3180
+ Ao as DsToastContainer,
3181
+ Oo as DsTooltip,
3182
+ Bo as DsUnderConstruction,
3183
+ Mo as allTokens,
3184
+ jo as colorTokens,
3185
+ Po as expandBases,
3186
+ Io as generateFullTheme,
3187
+ Fo as generatePalette,
3188
+ No as generateThemeCss,
3189
+ Wo as hexToHSL,
3190
+ Ho as hslToHex,
3191
+ qo as radiusTokens,
3192
+ Ko as shadowTokens,
3193
+ Uo as spacingTokens,
3194
+ Xo as tokenToCssVar,
3195
+ se as useId,
3196
+ uo as useToast
3064
3197
  };