@tempots/beatui 0.61.5 → 0.61.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
- import { Use as P, Value as p, prop as tt, html as y, attr as l, on as I, WithElement as ut, Empty as F, aria as R, bind as ft, computedOf as B, style as ht, OnDispose as X, When as L, NotEmpty as Jt, Fragment as z, ForEach as ot, svg as At, svgAttr as bt, emitValue as j, coalesce as Kt, Ensure as te, OneOfType as ee, Repeat as jt, signal as Vt, input as Q, emitValueAsNullableDate as ne, emitValueAsNullableDateTime as se, emitValueAsNumber as Y, emit as re, Task as Bt } from "@tempots/dom";
1
+ import { Use as P, Value as p, prop as tt, html as y, attr as l, on as k, WithElement as ut, Empty as D, aria as R, bind as ft, computedOf as B, style as ht, OnDispose as G, When as L, NotEmpty as te, Fragment as z, ForEach as ot, svg as At, svgAttr as bt, emitValue as j, coalesce as ee, Ensure as ne, OneOfType as se, Repeat as Wt, signal as Vt, input as Q, emitValueAsNullableDate as Bt, emitValueAsNullableDateTime as Lt, emitValueAsNumber as Y, emit as re, Task as zt } from "@tempots/dom";
2
2
  import { f as ae } from "./colors-pQZlNrwM.js";
3
3
  import { g as le } from "./timer-DzWb416P.js";
4
- import { ElementRect as Ht, AutoSelect as oe } from "@tempots/ui";
5
- import { a as W, b as O, f as Lt, I as U, C as H, c as ce, d as It, T as ie, g as ue, L as pe, e as zt, h as de, B as vt } from "./translations-BUTBIDsS.js";
6
- import { C as mt, m as fe, d as me, I as Wt, E as he, P as ge, S as ct, s as be, e as xt, O as rt, f as Et } from "./notice-BH_pePhd.js";
7
- function Zt(t) {
4
+ import { ElementRect as Zt, AutoSelect as oe } from "@tempots/ui";
5
+ import { a as W, b as O, f as Et, I as U, C as H, c as ce, d as kt, T as ie, g as ue, L as pe, e as Rt, h as de, B as vt } from "./translations-BUTBIDsS.js";
6
+ import { C as mt, m as fe, d as me, I as Yt, E as he, P as ge, S as ct, s as be, e as xt, O as rt, f as Ut } from "./notice-BH_pePhd.js";
7
+ function Xt(t) {
8
8
  if (typeof t != "string") return !1;
9
9
  const e = t.startsWith("#") ? t.slice(1) : t;
10
10
  return /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(e);
@@ -31,10 +31,10 @@ function we(t) {
31
31
  return a >= 0 && a <= 360 && i >= 0 && i <= 100 && o >= 0 && o <= 100;
32
32
  }
33
33
  function vn(t) {
34
- return Zt(t) || ve(t) || xe(t) || we(t);
34
+ return Xt(t) || ve(t) || xe(t) || we(t);
35
35
  }
36
36
  function _e(t) {
37
- if (!Zt(t)) return null;
37
+ if (!Xt(t)) return null;
38
38
  let e = t.startsWith("#") ? t.slice(1) : t;
39
39
  return e.length === 3 && (e = e.split("").map((s) => s + s).join("")), `#${e.toLowerCase()}`;
40
40
  }
@@ -58,9 +58,9 @@ function it(t) {
58
58
  function xn(t, e) {
59
59
  const s = it(t), n = it(e);
60
60
  if (!s || !n) return null;
61
- const r = (u, d, b) => {
62
- const [g, f, w] = [u, d, b].map((_) => (_ = _ / 255, _ <= 0.03928 ? _ / 12.92 : Math.pow((_ + 0.055) / 1.055, 2.4)));
63
- return 0.2126 * g + 0.7152 * f + 0.0722 * w;
61
+ const r = (u, d, h) => {
62
+ const [b, f, w] = [u, d, h].map(($) => ($ = $ / 255, $ <= 0.03928 ? $ / 12.92 : Math.pow(($ + 0.055) / 1.055, 2.4)));
63
+ return 0.2126 * b + 0.7152 * f + 0.0722 * w;
64
64
  }, c = r(s.r, s.g, s.b), a = r(n.r, n.g, n.b), i = Math.max(c, a), o = Math.min(c, a);
65
65
  return (i + 0.05) / (o + 0.05);
66
66
  }
@@ -72,8 +72,8 @@ function $e(t) {
72
72
  if (s) {
73
73
  const u = s[1];
74
74
  if (u.length === 8) {
75
- const d = parseInt(u.slice(0, 2), 16), b = parseInt(u.slice(2, 4), 16), g = parseInt(u.slice(4, 6), 16), f = parseInt(u.slice(6, 8), 16) / 255;
76
- return [d, b, g, f];
75
+ const d = parseInt(u.slice(0, 2), 16), h = parseInt(u.slice(2, 4), 16), b = parseInt(u.slice(4, 6), 16), f = parseInt(u.slice(6, 8), 16) / 255;
76
+ return [d, h, b, f];
77
77
  }
78
78
  if (u.length === 6)
79
79
  return [
@@ -83,12 +83,12 @@ function $e(t) {
83
83
  1
84
84
  ];
85
85
  if (u.length === 4) {
86
- const d = parseInt(u[0] + u[0], 16), b = parseInt(u[1] + u[1], 16), g = parseInt(u[2] + u[2], 16), f = parseInt(u[3] + u[3], 16) / 255;
87
- return [d, b, g, f];
86
+ const d = parseInt(u[0] + u[0], 16), h = parseInt(u[1] + u[1], 16), b = parseInt(u[2] + u[2], 16), f = parseInt(u[3] + u[3], 16) / 255;
87
+ return [d, h, b, f];
88
88
  }
89
89
  if (u.length === 3) {
90
- const d = parseInt(u[0] + u[0], 16), b = parseInt(u[1] + u[1], 16), g = parseInt(u[2] + u[2], 16);
91
- return [d, b, g, 1];
90
+ const d = parseInt(u[0] + u[0], 16), h = parseInt(u[1] + u[1], 16), b = parseInt(u[2] + u[2], 16);
91
+ return [d, h, b, 1];
92
92
  }
93
93
  }
94
94
  const n = t.match(
@@ -110,22 +110,22 @@ function $e(t) {
110
110
  /^hsla?\(\s*([+-]?[\d.]+)(?:deg)?\s*[ ,]?\s*([\d.]+)%\s*[ ,]?\s*([\d.]+)%\s*(?:[/,]\s*(\d?(?:\.\d+)?))?\s*\)$/i
111
111
  );
112
112
  if (c) {
113
- const u = parseFloat(c[1]), d = parseFloat(c[2]), b = parseFloat(c[3]), g = c[4] != null ? parseFloat(c[4]) : 1, [f, w, _] = Yt(u, d / 100, b / 100);
114
- return [f, w, _, g];
113
+ const u = parseFloat(c[1]), d = parseFloat(c[2]), h = parseFloat(c[3]), b = c[4] != null ? parseFloat(c[4]) : 1, [f, w, $] = qt(u, d / 100, h / 100);
114
+ return [f, w, $, b];
115
115
  }
116
116
  const a = t.match(
117
117
  /^hwb\(\s*([+-]?[\d.]+)(?:deg)?\s*[, ]\s*([\d.]+)%\s*[, ]\s*([\d.]+)%\s*(?:[/]\s*(\d?(?:\.\d+)?))?\s*\)$/i
118
118
  );
119
119
  if (a) {
120
- const u = parseFloat(a[1]), d = parseFloat(a[2]) / 100, b = parseFloat(a[3]) / 100, g = a[4] != null ? parseFloat(a[4]) : 1, [f, w, _] = Ie(u, d, b);
121
- return [f, w, _, g];
120
+ const u = parseFloat(a[1]), d = parseFloat(a[2]) / 100, h = parseFloat(a[3]) / 100, b = a[4] != null ? parseFloat(a[4]) : 1, [f, w, $] = ke(u, d, h);
121
+ return [f, w, $, b];
122
122
  }
123
123
  const i = t.match(
124
124
  /^oklch\(\s*([+-]?[\d.]+%?)\s+([\d.]+)\s+([+-]?[\d.]+)(?:deg)?(?:\s*\/\s*(\d?(?:\.\d+)?))?\s*\)$/i
125
125
  );
126
126
  if (i) {
127
- const u = i[1], d = parseFloat(i[2]), b = parseFloat(i[3]), g = i[4] != null ? parseFloat(i[4]) : 1, f = u.endsWith("%") ? Math.max(0, Math.min(1, parseFloat(u) / 100)) : Math.max(0, Math.min(1, parseFloat(u))), [w, _, $] = Me(f, d, b);
128
- return [w, _, $, g];
127
+ const u = i[1], d = parseFloat(i[2]), h = parseFloat(i[3]), b = i[4] != null ? parseFloat(i[4]) : 1, f = u.endsWith("%") ? Math.max(0, Math.min(1, parseFloat(u) / 100)) : Math.max(0, Math.min(1, parseFloat(u))), [w, $, _] = Me(f, d, h);
128
+ return [w, $, _, b];
129
129
  }
130
130
  const o = it(t);
131
131
  return o ? [o.r, o.g, o.b, 1] : [0, 0, 0, 1];
@@ -136,13 +136,13 @@ function ye(t, e, s, n) {
136
136
  Math.min(1, Math.round(n * 100) / 100)
137
137
  )})`;
138
138
  }
139
- function ke(t) {
139
+ function Ie(t) {
140
140
  let e = t + 1831565813;
141
141
  return function() {
142
142
  return e = Math.imul(e ^ e >>> 15, e | 1), e ^= e + Math.imul(e ^ e >>> 7, e | 61), ((e ^ e >>> 14) >>> 0) / 4294967296;
143
143
  };
144
144
  }
145
- function Yt(t, e, s) {
145
+ function qt(t, e, s) {
146
146
  t = (t % 360 + 360) % 360;
147
147
  const n = (1 - Math.abs(2 * s - 1)) * e, r = n * (1 - Math.abs(t / 60 % 2 - 1)), c = s - n / 2;
148
148
  let a = 0, i = 0, o = 0;
@@ -152,11 +152,11 @@ function Yt(t, e, s) {
152
152
  Math.round((o + c) * 255)
153
153
  ];
154
154
  }
155
- function Ie(t, e, s) {
155
+ function ke(t, e, s) {
156
156
  t = (t % 360 + 360) % 360;
157
157
  const n = e + s;
158
158
  n > 1 && (e /= n, s /= n);
159
- const [r, c, a] = Yt(t, 1, 0.5).map((b) => b / 255), i = 1 - e - s, o = r * i + e, u = c * i + e, d = a * i + e;
159
+ const [r, c, a] = qt(t, 1, 0.5).map((h) => h / 255), i = 1 - e - s, o = r * i + e, u = c * i + e, d = a * i + e;
160
160
  return [Math.round(o * 255), Math.round(u * 255), Math.round(d * 255)];
161
161
  }
162
162
  function Mt(t, e, s) {
@@ -192,13 +192,13 @@ function _t(t) {
192
192
  return Math.round(Math.max(0, Math.min(1, e)) * 255);
193
193
  }
194
194
  function Me(t, e, s) {
195
- const n = s * Math.PI / 180, r = Math.cos(n) * e, c = Math.sin(n) * e, a = t + 0.3963377774 * r + 0.2158037573 * c, i = t - 0.1055613458 * r - 0.0638541728 * c, o = t - 0.0894841775 * r - 1.291485548 * c, u = a * a * a, d = i * i * i, b = o * o * o, g = 4.0767416621 * u - 3.3077115913 * d + 0.2309699292 * b, f = -1.2684380046 * u + 2.6097574011 * d - 0.3413193965 * b, w = -0.0041960863 * u - 0.7034186147 * d + 1.707614701 * b;
196
- return [_t(g), _t(f), _t(w)];
195
+ const n = s * Math.PI / 180, r = Math.cos(n) * e, c = Math.sin(n) * e, a = t + 0.3963377774 * r + 0.2158037573 * c, i = t - 0.1055613458 * r - 0.0638541728 * c, o = t - 0.0894841775 * r - 1.291485548 * c, u = a * a * a, d = i * i * i, h = o * o * o, b = 4.0767416621 * u - 3.3077115913 * d + 0.2309699292 * h, f = -1.2684380046 * u + 2.6097574011 * d - 0.3413193965 * h, w = -0.0041960863 * u - 0.7034186147 * d + 1.707614701 * h;
196
+ return [_t(b), _t(f), _t(w)];
197
197
  }
198
- function De(t, e, s) {
199
- const n = wt(t), r = wt(e), c = wt(s), a = 0.4122214708 * n + 0.5363325363 * r + 0.0514459929 * c, i = 0.2119034982 * n + 0.6806995451 * r + 0.1073969566 * c, o = 0.0883024619 * n + 0.2817188376 * r + 0.6299787005 * c, u = Math.cbrt(a), d = Math.cbrt(i), b = Math.cbrt(o), g = 0.2104542553 * u + 0.793617785 * d - 0.0040720468 * b, f = 1.9779984951 * u - 2.428592205 * d + 0.4505937099 * b, w = 0.0259040371 * u + 0.7827717662 * d - 0.808675766 * b, _ = Math.sqrt(f * f + w * w);
200
- let $ = Math.atan2(w, f) * 180 / Math.PI;
201
- return $ < 0 && ($ += 360), [g, _, $];
198
+ function Se(t, e, s) {
199
+ const n = wt(t), r = wt(e), c = wt(s), a = 0.4122214708 * n + 0.5363325363 * r + 0.0514459929 * c, i = 0.2119034982 * n + 0.6806995451 * r + 0.1073969566 * c, o = 0.0883024619 * n + 0.2817188376 * r + 0.6299787005 * c, u = Math.cbrt(a), d = Math.cbrt(i), h = Math.cbrt(o), b = 0.2104542553 * u + 0.793617785 * d - 0.0040720468 * h, f = 1.9779984951 * u - 2.428592205 * d + 0.4505937099 * h, w = 0.0259040371 * u + 0.7827717662 * d - 0.808675766 * h, $ = Math.sqrt(f * f + w * w);
200
+ let _ = Math.atan2(w, f) * 180 / Math.PI;
201
+ return _ < 0 && (_ += 360), [b, $, _];
202
202
  }
203
203
  function at(t, e, s, n, r, c) {
204
204
  switch (r) {
@@ -225,15 +225,15 @@ function at(t, e, s, n, r, c) {
225
225
  return n < 1 ? `hwb(${a} ${i}% ${o}% / ${Math.round(n * 100) / 100})` : `hwb(${a} ${i}% ${o}%)`;
226
226
  }
227
227
  case "oklch": {
228
- const [a, i, o] = De(t, e, s), u = (Math.round(a * 1e3) / 1e3).toFixed(3), d = (Math.round(i * 1e3) / 1e3).toFixed(3), b = (Math.round(o * 10) / 10).toFixed(1), g = Math.round(n * 100) / 100;
229
- return c || n < 1 ? `oklch(${u} ${d} ${b} / ${g})` : `oklch(${u} ${d} ${b})`;
228
+ const [a, i, o] = Se(t, e, s), u = (Math.round(a * 1e3) / 1e3).toFixed(3), d = (Math.round(i * 1e3) / 1e3).toFixed(3), h = (Math.round(o * 10) / 10).toFixed(1), b = Math.round(n * 100) / 100;
229
+ return c || n < 1 ? `oklch(${u} ${d} ${h} / ${b})` : `oklch(${u} ${d} ${h})`;
230
230
  }
231
231
  }
232
232
  }
233
233
  function lt(t, e) {
234
234
  return e ? t === "rgb" ? "rgba" : t === "hsl" ? "hsla" : t : t === "rgba" ? "rgb" : t === "hsla" ? "hsl" : t;
235
235
  }
236
- class Se extends Error {
236
+ class De extends Error {
237
237
  constructor(e = "Missing implementation") {
238
238
  super(e), this.name = "MissingImplementationError";
239
239
  }
@@ -243,7 +243,7 @@ const wn = (t) => Te(t).split("_").join(" "), Te = (t) => (t = t.replace(/::/g,
243
243
  return Buffer.from(t, "base64").toString("utf8");
244
244
  if (typeof atob < "u")
245
245
  return atob(t);
246
- throw new Se(
246
+ throw new De(
247
247
  "No implementation found for base64 decoding"
248
248
  );
249
249
  };
@@ -257,38 +257,38 @@ function $t({
257
257
  allowMultiple: a
258
258
  }) {
259
259
  return P(W, (i) => {
260
- const o = p.deriveProp(e ?? []), u = tt(!1), d = (x) => {
261
- x.preventDefault(), x.stopPropagation(), u.value = !0;
262
- }, b = (x) => {
263
- x.preventDefault(), x.stopPropagation(), (!x.currentTarget || !x.currentTarget.contains(x.relatedTarget)) && (u.value = !1);
264
- }, g = (x) => {
265
- x.preventDefault(), x.stopPropagation(), u.value = !1;
266
- const m = Array.from(x.dataTransfer?.files || []);
260
+ const o = p.deriveProp(e ?? []), u = tt(!1), d = (v) => {
261
+ v.preventDefault(), v.stopPropagation(), u.value = !0;
262
+ }, h = (v) => {
263
+ v.preventDefault(), v.stopPropagation(), (!v.currentTarget || !v.currentTarget.contains(v.relatedTarget)) && (u.value = !1);
264
+ }, b = (v) => {
265
+ v.preventDefault(), v.stopPropagation(), u.value = !1;
266
+ const m = Array.from(v.dataTransfer?.files || []);
267
267
  m.length > 0 && (o.value = m, t(m, "dragdrop"));
268
- }, f = (x) => {
269
- p.get(n) && x.currentTarget.querySelector(
268
+ }, f = (v) => {
269
+ p.get(n) && v.currentTarget.querySelector(
270
270
  'input[type="file"]'
271
271
  )?.click();
272
272
  };
273
273
  let w = null;
274
- const _ = () => {
274
+ const $ = () => {
275
275
  if (w == null) return;
276
- const x = Array.from(w.files ?? []);
277
- x.length > 0 && (o.value = x, t(x, "click")), w.value = "";
278
- }, $ = (x) => {
279
- p.get(n) && (x.key === "Enter" || x.key === " ") && (x.preventDefault(), f(x));
276
+ const v = Array.from(w.files ?? []);
277
+ v.length > 0 && (o.value = v, t(v, "click")), w.value = "";
278
+ }, _ = (v) => {
279
+ p.get(n) && (v.key === "Enter" || v.key === " ") && (v.preventDefault(), f(v));
280
280
  };
281
281
  return y.div(
282
282
  l.role("button"),
283
283
  l.tabindex(
284
- p.map(n, (x) => x ? 0 : -1)
284
+ p.map(n, (v) => v ? 0 : -1)
285
285
  ),
286
286
  l.style("position: relative;"),
287
- I.dragover(d),
288
- I.dragleave(b),
289
- I.drop(g),
290
- I.click(f),
291
- I.keydown($),
287
+ k.dragover(d),
288
+ k.dragleave(h),
289
+ k.drop(b),
290
+ k.click(f),
291
+ k.keydown(_),
292
292
  // Hidden file input
293
293
  y.input(
294
294
  l.type("file"),
@@ -298,14 +298,14 @@ function $t({
298
298
  l.style(
299
299
  "position: absolute; left: -9999px; opacity: 0; pointer-events: none;"
300
300
  ),
301
- I.change(_),
302
- ut((x) => (w = x, o.on((m) => {
301
+ k.change($),
302
+ ut((v) => (w = v, o.on((m) => {
303
303
  const M = globalThis.DataTransfer;
304
304
  if (M != null) {
305
- const D = new M();
306
- m.forEach((S) => D.items.add(S)), x.files = D.files;
305
+ const S = new M();
306
+ m.forEach((T) => S.items.add(T)), v.files = S.files;
307
307
  }
308
- }), F))
308
+ }), D))
309
309
  ),
310
310
  // Screen reader instructions
311
311
  R.label(ft(i.$.dropZoneInstructions)(n)),
@@ -357,8 +357,8 @@ function $n({
357
357
  e,
358
358
  o
359
359
  )((u, d) => {
360
- const { width: b } = d[i[u] ?? 0];
361
- return `${b}px`;
360
+ const { width: h } = d[i[u] ?? 0];
361
+ return `${h}px`;
362
362
  })
363
363
  ),
364
364
  ht.left(
@@ -366,34 +366,34 @@ function $n({
366
366
  e,
367
367
  o
368
368
  )((u, d) => {
369
- const { left: b } = d[i[u] ?? 0];
370
- return `${b}px`;
369
+ const { left: h } = d[i[u] ?? 0];
370
+ return `${h}px`;
371
371
  })
372
372
  )
373
373
  ),
374
374
  // clickable buttons
375
- a.map(({ label: u, key: d }, b) => y.button(
375
+ a.map(({ label: u, key: d }, h) => y.button(
376
376
  l.type("button"),
377
- I.click((g) => {
378
- g.preventDefault(), p.get(r) || s?.(d);
377
+ k.click((b) => {
378
+ b.preventDefault(), p.get(r) || s?.(d);
379
379
  }),
380
380
  l.disabled(r),
381
381
  l.class("bc-segmented-input__segment"),
382
382
  l.class(
383
- p.map(e, (g) => g === d ? "bc-segmented-input__segment--active" : "bc-segmented-input__segment--inactive")
383
+ p.map(e, (b) => b === d ? "bc-segmented-input__segment--active" : "bc-segmented-input__segment--inactive")
384
384
  ),
385
- Ht((g) => {
385
+ Zt((b) => {
386
386
  function f() {
387
- o.update((_) => {
388
- const $ = [..._];
389
- return $[b] = {
390
- width: g.value.width,
391
- left: g.value.localLeft
392
- }, $;
387
+ o.update(($) => {
388
+ const _ = [...$];
389
+ return _[h] = {
390
+ width: b.value.width,
391
+ left: b.value.localLeft
392
+ }, _;
393
393
  });
394
394
  }
395
395
  const w = le(f);
396
- return X(w, g.on(f));
396
+ return G(w, b.on(f));
397
397
  }),
398
398
  u
399
399
  ))
@@ -420,7 +420,7 @@ function yt(t) {
420
420
  const n = URL.createObjectURL(s);
421
421
  e.value = n;
422
422
  }), y.div(
423
- X(() => {
423
+ G(() => {
424
424
  e.value && URL.revokeObjectURL(e.value);
425
425
  }),
426
426
  l.class("bc-file-input__thumbnail-container"),
@@ -445,31 +445,31 @@ const ze = (t, ...e) => {
445
445
  disabled: o,
446
446
  hasError: u,
447
447
  mode: d = "default",
448
- showFileList: b = !0,
449
- ...g
450
- } = t, f = s, w = p.map(d, (v) => v === "input"), _ = p.map(d, (v) => v === "compact"), $ = (v) => {
451
- let h = v;
448
+ showFileList: h = !0,
449
+ ...b
450
+ } = t, f = s, w = p.map(d, (x) => x === "input"), $ = p.map(d, (x) => x === "compact"), _ = (x) => {
451
+ let g = x;
452
452
  if (r != null) {
453
- const k = p.get(r);
454
- h = h.slice(0, k);
453
+ const I = p.get(r);
454
+ g = g.slice(0, I);
455
455
  }
456
456
  if (c) {
457
- const k = p.get(c);
458
- h = h.filter((T) => T.size <= k);
457
+ const I = p.get(c);
458
+ g = g.filter((F) => F.size <= I);
459
459
  }
460
- a?.(h);
461
- }, x = (v) => {
462
- const k = f.value.filter((T, A) => A !== v);
463
- a?.(k);
460
+ a?.(g);
461
+ }, v = (x) => {
462
+ const I = f.value.filter((F, A) => A !== x);
463
+ a?.(I);
464
464
  }, m = () => {
465
465
  a?.([]);
466
466
  }, M = ({
467
- files: v,
468
- clear: h,
469
- change: k
467
+ files: x,
468
+ clear: g,
469
+ change: I
470
470
  }) => P(
471
471
  W,
472
- (T) => y.div(
472
+ (F) => y.div(
473
473
  l.class("bc-file-input__drop-zone"),
474
474
  y.div(
475
475
  l.class(
@@ -478,58 +478,58 @@ const ze = (t, ...e) => {
478
478
  U({ icon: "mdi:cloud-upload-outline", size: "xl" }),
479
479
  y.div(
480
480
  l.class("bc-file-input__drop-zone-text"),
481
- ft(T.$.filesInputInstructions)(
481
+ ft(F.$.filesInputInstructions)(
482
482
  r,
483
483
  c,
484
- T.$.fileSizeUnits.value
484
+ F.$.fileSizeUnits.value
485
485
  )
486
486
  )
487
487
  )
488
488
  )
489
- ), D = ({
490
- files: v
489
+ ), S = ({
490
+ files: x
491
491
  }) => P(
492
492
  W,
493
- (h) => y.div(
493
+ (g) => y.div(
494
494
  l.class("bc-file-input__compact-drop-zone"),
495
495
  L(
496
- v.map((k) => k.length > 0),
496
+ x.map((I) => I.length > 0),
497
497
  () => y.div(
498
498
  l.class("bc-file-input__compact-file-list"),
499
- ot(v, (k, T) => {
500
- const A = T.index;
499
+ ot(x, (I, F) => {
500
+ const A = F.index;
501
501
  return y.div(
502
502
  l.class("bc-file-input__compact-file-item"),
503
503
  y.div(
504
504
  l.class("bc-file-input__compact-file-icon"),
505
- yt(k)
505
+ yt(I)
506
506
  ),
507
507
  y.div(
508
508
  l.class("bc-file-input__compact-file-info"),
509
509
  y.div(
510
510
  l.class("bc-file-input__compact-file-name"),
511
- l.title(k.$.name),
512
- k.$.name
511
+ l.title(I.$.name),
512
+ I.$.name
513
513
  ),
514
514
  y.div(
515
515
  l.class("bc-file-input__compact-file-meta"),
516
516
  B(
517
- k.$.size,
518
- h.$.fileSizeUnits
519
- )((C, V) => Lt(C, { units: V })),
517
+ I.$.size,
518
+ g.$.fileSizeUnits
519
+ )((C, V) => Et(C, { units: V })),
520
520
  " • ",
521
521
  B(
522
- k.$.type,
523
- h.$.unknownType
522
+ I.$.type,
523
+ g.$.unknownType
524
524
  )((C, V) => C || V)
525
525
  )
526
526
  ),
527
527
  mt(
528
528
  {
529
529
  size: "sm",
530
- label: h.$.removeFile,
530
+ label: g.$.removeFile,
531
531
  disabled: o,
532
- onClick: () => x(A)
532
+ onClick: () => v(A)
533
533
  },
534
534
  l.class("bc-file-input__compact-remove-button")
535
535
  )
@@ -541,33 +541,33 @@ const ze = (t, ...e) => {
541
541
  U({ icon: "mdi:cloud-upload-outline", size: "lg" }),
542
542
  y.div(
543
543
  l.class("bc-file-input__compact-placeholder-text"),
544
- ft(h.$.filesInputInstructions)(
544
+ ft(g.$.filesInputInstructions)(
545
545
  r,
546
546
  c,
547
- h.$.fileSizeUnits.value
547
+ g.$.fileSizeUnits.value
548
548
  )
549
549
  )
550
550
  )
551
551
  )
552
552
  )
553
- ), S = ({
554
- files: v
553
+ ), T = ({
554
+ files: x
555
555
  }) => P(
556
556
  W,
557
- (h) => y.div(
557
+ (g) => y.div(
558
558
  l.class("bc-file-input__compact-input"),
559
559
  L(
560
- v.map((k) => k.length > 0),
560
+ x.map((I) => I.length > 0),
561
561
  () => y.span(
562
562
  l.class("bc-file-input__compact-value"),
563
563
  ot(
564
- v,
565
- (k) => y.span(
564
+ x,
565
+ (I) => y.span(
566
566
  l.class("bc-file-input__compact-value-item"),
567
- yt(k),
567
+ yt(I),
568
568
  y.span(
569
569
  l.class("bc-file-input__compact-value-item-name"),
570
- k.$.name
570
+ I.$.name
571
571
  )
572
572
  )
573
573
  )
@@ -576,10 +576,10 @@ const ze = (t, ...e) => {
576
576
  l.class("bc-file-input__compact-placeholder"),
577
577
  U({ icon: "mdi:cloud-upload-outline", size: "md" }),
578
578
  " ",
579
- ft(h.$.filesInputInstructions)(
579
+ ft(g.$.filesInputInstructions)(
580
580
  r,
581
581
  c,
582
- h.$.fileSizeUnits.value
582
+ g.$.fileSizeUnits.value
583
583
  )
584
584
  )
585
585
  )
@@ -587,19 +587,19 @@ const ze = (t, ...e) => {
587
587
  );
588
588
  return P(
589
589
  W,
590
- (v) => O(
590
+ (x) => O(
591
591
  {
592
- baseContainer: p.map(w, (h) => !h),
592
+ baseContainer: p.map(w, (g) => !g),
593
593
  disabled: o,
594
594
  hasError: u,
595
595
  after: L(
596
596
  w,
597
597
  () => L(
598
- f.map(({ length: h }) => h > 0),
598
+ f.map(({ length: g }) => g > 0),
599
599
  () => mt(
600
600
  {
601
601
  size: "sm",
602
- label: v.$.clearAllFiles,
602
+ label: x.$.clearAllFiles,
603
603
  disabled: o,
604
604
  onClick: m
605
605
  },
@@ -607,7 +607,7 @@ const ze = (t, ...e) => {
607
607
  )
608
608
  )
609
609
  ),
610
- ...g,
610
+ ...b,
611
611
  input: L(
612
612
  w,
613
613
  () => y.div(
@@ -616,24 +616,24 @@ const ze = (t, ...e) => {
616
616
  value: f,
617
617
  accept: n,
618
618
  enableClick: !0,
619
- allowMultiple: p.map(r ?? 1 / 0, (h) => h > 1),
619
+ allowMultiple: p.map(r ?? 1 / 0, (g) => g > 1),
620
620
  disabled: o,
621
- onChange: $,
622
- content: S
621
+ onChange: _,
622
+ content: T
623
623
  })
624
624
  ),
625
625
  () => L(
626
- _,
626
+ $,
627
627
  () => y.div(
628
628
  l.class("bc-file-input bc-file-input--compact"),
629
629
  $t({
630
630
  value: f,
631
631
  accept: n,
632
632
  enableClick: !0,
633
- allowMultiple: p.map(r ?? 1 / 0, (h) => h > 1),
633
+ allowMultiple: p.map(r ?? 1 / 0, (g) => g > 1),
634
634
  disabled: o,
635
- onChange: $,
636
- content: D
635
+ onChange: _,
636
+ content: S
637
637
  })
638
638
  ),
639
639
  () => y.div(
@@ -642,54 +642,54 @@ const ze = (t, ...e) => {
642
642
  value: f,
643
643
  accept: n,
644
644
  enableClick: !0,
645
- allowMultiple: p.map(r ?? 1 / 0, (h) => h > 1),
645
+ allowMultiple: p.map(r ?? 1 / 0, (g) => g > 1),
646
646
  disabled: o,
647
- onChange: $,
647
+ onChange: _,
648
648
  content: M
649
649
  }),
650
650
  L(
651
- b,
652
- () => Jt(
651
+ h,
652
+ () => te(
653
653
  f,
654
654
  () => z(
655
655
  y.div(
656
656
  l.class("bc-file-input__file-list"),
657
- ot(f, (h, k) => {
658
- const T = k.index;
657
+ ot(f, (g, I) => {
658
+ const F = I.index;
659
659
  return y.div(
660
660
  l.class("bc-file-input__file-item"),
661
661
  y.div(
662
662
  l.class("bc-file-input__file-icon"),
663
- yt(h)
663
+ yt(g)
664
664
  ),
665
665
  y.div(
666
666
  l.class("bc-file-input__file-info"),
667
667
  y.div(
668
668
  l.class("bc-file-input__file-name"),
669
- l.title(h.$.name),
670
- h.$.name
669
+ l.title(g.$.name),
670
+ g.$.name
671
671
  ),
672
672
  y.div(
673
673
  l.class("bc-file-input__file-meta"),
674
674
  B(
675
- h.$.size,
676
- v.$.fileSizeUnits
675
+ g.$.size,
676
+ x.$.fileSizeUnits
677
677
  )(
678
- (A, C) => Lt(A, { units: C })
678
+ (A, C) => Et(A, { units: C })
679
679
  ),
680
680
  " • ",
681
681
  B(
682
- h.$.type,
683
- v.$.unknownType
682
+ g.$.type,
683
+ x.$.unknownType
684
684
  )((A, C) => A || C)
685
685
  )
686
686
  ),
687
687
  mt(
688
688
  {
689
689
  size: "sm",
690
- label: v.$.removeFile,
690
+ label: x.$.removeFile,
691
691
  disabled: o,
692
- onClick: () => x(T)
692
+ onClick: () => v(F)
693
693
  },
694
694
  l.class("bc-file-input__remove-button")
695
695
  )
@@ -697,7 +697,7 @@ const ze = (t, ...e) => {
697
697
  })
698
698
  ),
699
699
  L(
700
- f.map(({ length: h }) => h > 1),
700
+ f.map(({ length: g }) => g > 1),
701
701
  () => y.div(
702
702
  l.class(
703
703
  "bc-file-input__clear-all-button-container"
@@ -706,9 +706,9 @@ const ze = (t, ...e) => {
706
706
  l.type("button"),
707
707
  l.class("bc-file-input__clear-all-button"),
708
708
  l.disabled(o),
709
- v.$.clearAllFiles,
710
- I.click((h) => {
711
- h.preventDefault(), h.stopPropagation(), m();
709
+ x.$.clearAllFiles,
710
+ k.click((g) => {
711
+ g.preventDefault(), g.stopPropagation(), m();
712
712
  })
713
713
  )
714
714
  )
@@ -763,17 +763,17 @@ function Oe(t) {
763
763
  onChange: s,
764
764
  onInput: n,
765
765
  ...r
766
- } = t, c = /* @__PURE__ */ new Map(), a = p.toSignal(e).map((d) => d.map((b, g) => {
767
- const f = c.get(b), w = Ne(b ?? ""), _ = f?.type || Ue(w), $ = f?.name ?? `file-${g}`, x = w.buffer.slice(
766
+ } = t, c = /* @__PURE__ */ new Map(), a = p.toSignal(e).map((d) => d.map((h, b) => {
767
+ const f = c.get(h), w = Ne(h ?? ""), $ = f?.type || Ue(w), _ = f?.name ?? `file-${b}`, v = w.buffer.slice(
768
768
  w.byteOffset,
769
769
  w.byteOffset + w.byteLength
770
- ), m = new Blob([x], { type: _ });
771
- return new File([m], $, { type: _ });
772
- })), i = (d) => (b) => {
773
- d && Re(b).then((g) => {
774
- for (const [f, w] of g.entries())
775
- c.set(w, { name: b[f].name, type: b[f].type });
776
- d(g);
770
+ ), m = new Blob([v], { type: $ });
771
+ return new File([m], _, { type: $ });
772
+ })), i = (d) => (h) => {
773
+ d && Re(h).then((b) => {
774
+ for (const [f, w] of b.entries())
775
+ c.set(w, { name: h[f].name, type: h[f].type });
776
+ d(b);
777
777
  });
778
778
  }, o = i(s), u = i(n);
779
779
  return ze({
@@ -803,60 +803,60 @@ function yn(t) {
803
803
  });
804
804
  }
805
805
  function Pe(t, e) {
806
- const [s, n, r] = t, c = s << 16 ^ n << 8 ^ r, a = ke(c), i = 6 + Math.floor(a() * 5), o = 0.18 + a() * 0.06, u = [];
806
+ const [s, n, r] = t, c = s << 16 ^ n << 8 ^ r, a = Ie(c), i = 6 + Math.floor(a() * 5), o = 0.18 + a() * 0.06, u = [];
807
807
  for (let f = 0; f < i; f++) {
808
- const w = f / i * Math.PI * 2, _ = e * (1 + (a() * 2 - 1) * o), $ = Math.cos(w) * _, x = Math.sin(w) * _;
809
- u.push({ x: $, y: x });
808
+ const w = f / i * Math.PI * 2, $ = e * (1 + (a() * 2 - 1) * o), _ = Math.cos(w) * $, v = Math.sin(w) * $;
809
+ u.push({ x: _, y: v });
810
810
  }
811
- const d = (u[0].x + u[i - 1].x) / 2, b = (u[0].y + u[i - 1].y) / 2;
812
- let g = `M ${d.toFixed(3)} ${b.toFixed(3)}`;
811
+ const d = (u[0].x + u[i - 1].x) / 2, h = (u[0].y + u[i - 1].y) / 2;
812
+ let b = `M ${d.toFixed(3)} ${h.toFixed(3)}`;
813
813
  for (let f = 0; f < i; f++) {
814
- const w = u[f], _ = u[(f + 1) % i], $ = (w.x + _.x) / 2, x = (w.y + _.y) / 2;
815
- g += ` Q ${w.x.toFixed(3)} ${w.y.toFixed(3)} ${$.toFixed(3)} ${x.toFixed(3)}`;
814
+ const w = u[f], $ = u[(f + 1) % i], _ = (w.x + $.x) / 2, v = (w.y + $.y) / 2;
815
+ b += ` Q ${w.x.toFixed(3)} ${w.y.toFixed(3)} ${_.toFixed(3)} ${v.toFixed(3)}`;
816
816
  }
817
- return g += " Z", g;
817
+ return b += " Z", b;
818
818
  }
819
- const kn = (t) => {
820
- const { value: e, onBlur: s, onChange: n, onInput: r, displayValue: c, size: a, withAlpha: i } = t, o = p.map(a ?? 32, (v) => v), u = p.map(e, (v) => $e(v ?? "#000000")), d = p.map(
819
+ const In = (t) => {
820
+ const { value: e, onBlur: s, onChange: n, onInput: r, displayValue: c, size: a, withAlpha: i } = t, o = p.map(a ?? 32, (x) => x), u = p.map(e, (x) => $e(x ?? "#000000")), d = p.map(
821
821
  u,
822
- ([v, h, k]) => [v, h, k]
823
- ), b = p.map(u, ([, , , v]) => v), g = tt(p.get(b) ?? 1), f = p.map(i ?? !1, (v) => v), w = p.map(
822
+ ([x, g, I]) => [x, g, I]
823
+ ), h = p.map(u, ([, , , x]) => x), b = tt(p.get(h) ?? 1), f = p.map(i ?? !1, (x) => x), w = p.map(
824
824
  t.colorTextFormat ?? "rgb",
825
- (v) => v
826
- ), _ = B(
825
+ (x) => x
826
+ ), $ = B(
827
827
  d,
828
- g,
828
+ b,
829
829
  w,
830
830
  f
831
831
  )(
832
- ([v, h, k], T, A, C) => at(v, h, k, T ?? 1, lt(A, C), C)
833
- ), $ = p.map(
832
+ ([x, g, I], F, A, C) => at(x, g, I, F ?? 1, lt(A, C), C)
833
+ ), _ = p.map(
834
834
  t.colorTextFormat ?? "hex",
835
- (v) => v
836
- ), x = p.map(o, (v) => `${-v / 2} ${-v / 2} ${v} ${v}`), m = B(
835
+ (x) => x
836
+ ), v = p.map(o, (x) => `${-x / 2} ${-x / 2} ${x} ${x}`), m = B(
837
837
  d,
838
838
  o
839
- )((v, h) => Pe(v, h / 2)), M = B(
839
+ )((x, g) => Pe(x, g / 2)), M = B(
840
840
  d,
841
- g,
841
+ b,
842
842
  f
843
843
  )(
844
- ([v, h, k], T, A) => A || T < 1 ? ye(v, h, k, T) : Ct(v, h, k)
845
- ), D = y.div(
844
+ ([x, g, I], F, A) => A || F < 1 ? ye(x, g, I, F) : Ct(x, g, I)
845
+ ), S = y.div(
846
846
  l.class("bc-color-swatch-input__control"),
847
847
  l.class(
848
848
  p.map(
849
849
  f,
850
- (v) => v ? "bc-color-swatch-input__control--alpha" : ""
850
+ (x) => x ? "bc-color-swatch-input__control--alpha" : ""
851
851
  )
852
852
  ),
853
853
  l.style(
854
- B(o)((v) => `min-width:${v + 2}px;height:${v + 2}px`)
854
+ B(o)((x) => `min-width:${x + 2}px;height:${x + 2}px`)
855
855
  ),
856
856
  // The SVG blob preview
857
857
  At.svg(
858
858
  l.class("bc-color-swatch-input__svg"),
859
- bt.viewBox(x),
859
+ bt.viewBox(v),
860
860
  At.path(bt.d(m), bt.fill(M))
861
861
  ),
862
862
  // Invisible native input overlays the blob for picker and accessibility
@@ -864,31 +864,31 @@ const kn = (t) => {
864
864
  l.type("color"),
865
865
  H(t),
866
866
  // Native color input needs hex without alpha
867
- l.value(p.map(d, ([v, h, k]) => Ct(v, h, k))),
867
+ l.value(p.map(d, ([x, g, I]) => Ct(x, g, I))),
868
868
  l.class(
869
869
  "bc-input bc-color-swatch-input bc-color-swatch-input__native"
870
870
  ),
871
- s != null ? I.blur(s) : F,
872
- n != null ? I.change((v) => {
873
- const h = v.target.value;
871
+ s != null ? k.blur(s) : D,
872
+ n != null ? k.change((x) => {
873
+ const g = x.target.value;
874
874
  if (!n) return;
875
- const { r: k, g: T, b: A } = it(h) ?? { r: 0, g: 0, b: 0 }, C = p.get(g) ?? 1, V = lt(
876
- p.get($),
875
+ const { r: I, g: F, b: A } = it(g) ?? { r: 0, g: 0, b: 0 }, C = p.get(b) ?? 1, V = lt(
876
+ p.get(_),
877
877
  p.get(f)
878
- ), N = at(k, T, A, C, V, p.get(f));
878
+ ), N = at(I, F, A, C, V, p.get(f));
879
879
  n(N);
880
- }) : F,
881
- r != null ? I.input((v) => {
882
- const h = v.target.value;
880
+ }) : D,
881
+ r != null ? k.input((x) => {
882
+ const g = x.target.value;
883
883
  if (!r) return;
884
- const { r: k, g: T, b: A } = it(h) ?? { r: 0, g: 0, b: 0 }, C = p.get(g) ?? 1, V = lt(
885
- p.get($),
884
+ const { r: I, g: F, b: A } = it(g) ?? { r: 0, g: 0, b: 0 }, C = p.get(b) ?? 1, V = lt(
885
+ p.get(_),
886
886
  p.get(f)
887
- ), N = at(k, T, A, C, V, p.get(f));
887
+ ), N = at(I, F, A, C, V, p.get(f));
888
888
  r(N);
889
- }) : F
889
+ }) : D
890
890
  )
891
- ), S = L(
891
+ ), T = L(
892
892
  f,
893
893
  () => y.input(
894
894
  l.type("range"),
@@ -896,24 +896,24 @@ const kn = (t) => {
896
896
  l.min(0),
897
897
  l.max(1),
898
898
  l.step(0.01),
899
- l.value(p.map(g, (v) => String(v ?? 1))),
899
+ l.value(p.map(b, (x) => String(x ?? 1))),
900
900
  l.disabled(t.disabled),
901
- I.input((v) => {
902
- const h = parseFloat(v.target.value);
903
- g.set(h);
904
- const [k, T, A] = p.get(d), C = lt(
905
- p.get($),
901
+ k.input((x) => {
902
+ const g = parseFloat(x.target.value);
903
+ b.set(g);
904
+ const [I, F, A] = p.get(d), C = lt(
905
+ p.get(_),
906
906
  p.get(f)
907
- ), V = at(k, T, A, h, C, p.get(f));
907
+ ), V = at(I, F, A, g, C, p.get(f));
908
908
  r?.(V);
909
909
  }),
910
- I.change((v) => {
911
- const h = parseFloat(v.target.value);
912
- g.set(h);
913
- const [k, T, A] = p.get(d), C = lt(
914
- p.get($),
910
+ k.change((x) => {
911
+ const g = parseFloat(x.target.value);
912
+ b.set(g);
913
+ const [I, F, A] = p.get(d), C = lt(
914
+ p.get(_),
915
915
  p.get(f)
916
- ), V = at(k, T, A, h, C, p.get(f));
916
+ ), V = at(I, F, A, g, C, p.get(f));
917
917
  n?.(V);
918
918
  })
919
919
  )
@@ -923,27 +923,27 @@ const kn = (t) => {
923
923
  ...t,
924
924
  // ensure our control does not try to grow
925
925
  growInput: !1,
926
- input: D,
926
+ input: S,
927
927
  // If caller provided an `after`, append RGB before it
928
928
  after: z(
929
929
  L(
930
930
  c ?? !1,
931
- () => y.span(l.class("bc-color-swatch-input__rgb"), _)
931
+ () => y.span(l.class("bc-color-swatch-input__rgb"), $)
932
932
  ),
933
- S,
933
+ T,
934
934
  t.after
935
935
  )
936
936
  });
937
- }, St = "$$tts-exp-", je = (t, e) => ut((s) => {
938
- const n = `${St}${t}`;
939
- return X(p.on(e, (r) => Reflect.set(s, n, r)));
940
- }), In = (t, e) => {
941
- const s = `${St}${t}`;
937
+ }, Dt = "$$tts-exp-", je = (t, e) => ut((s) => {
938
+ const n = `${Dt}${t}`;
939
+ return G(p.on(e, (r) => Reflect.set(s, n, r)));
940
+ }), kn = (t, e) => {
941
+ const s = `${Dt}${t}`;
942
942
  return (n) => {
943
943
  e(Reflect.get(n.target, s));
944
944
  };
945
945
  }, He = (t, e) => {
946
- const s = `${St}${t}`;
946
+ const s = `${Dt}${t}`;
947
947
  return (n) => {
948
948
  const r = n.target, c = r.selectedIndex, a = r.options[c];
949
949
  e(Reflect.get(a, s));
@@ -998,10 +998,10 @@ const Mn = ({
998
998
  l.value(e),
999
999
  l.class("bc-editable-text__input"),
1000
1000
  oe(),
1001
- I.keydown((o) => {
1001
+ k.keydown((o) => {
1002
1002
  o.key === "Enter" ? c.set(!1) : o.key === "Escape" && (a.set(!0), c.set(!1));
1003
1003
  }),
1004
- I.blur(
1004
+ k.blur(
1005
1005
  j((o) => {
1006
1006
  if (c.set(!1), a.value) {
1007
1007
  a.set(!1);
@@ -1012,7 +1012,7 @@ const Mn = ({
1012
1012
  )
1013
1013
  ),
1014
1014
  () => y.span(
1015
- I.click(() => {
1015
+ k.click(() => {
1016
1016
  p.get(i) || c.set(!0);
1017
1017
  }),
1018
1018
  l.class("bc-editable-text__display"),
@@ -1030,16 +1030,16 @@ const Mn = ({
1030
1030
  l.type("button"),
1031
1031
  l.class("bc-editable-text__edit-button"),
1032
1032
  P(W, (o) => R.label(o.$.editLabel)),
1033
- I.click(() => c.set(!0)),
1033
+ k.click(() => c.set(!0)),
1034
1034
  U({ icon: "line-md/pencil", color: "neutral" })
1035
1035
  )
1036
1036
  )
1037
1037
  )
1038
1038
  )
1039
1039
  );
1040
- }, Xt = (t, e, s) => te(
1040
+ }, Gt = (t, e, s) => ne(
1041
1041
  t,
1042
- (n) => ee(n, {
1042
+ (n) => se(n, {
1043
1043
  value: (r) => {
1044
1044
  const c = B(
1045
1045
  r,
@@ -1055,7 +1055,7 @@ const Mn = ({
1055
1055
  l.label(r.$.group),
1056
1056
  ot(
1057
1057
  r.$.options,
1058
- (c) => Xt(
1058
+ (c) => Gt(
1059
1059
  c,
1060
1060
  e,
1061
1061
  s
@@ -1089,11 +1089,11 @@ const Mn = ({
1089
1089
  input: y.select(
1090
1090
  ut((u) => {
1091
1091
  o = u;
1092
- const d = new MutationObserver((b) => {
1093
- const { removedNodes: g } = b[0];
1094
- g.length > 0 && (o.selectedIndex = 0);
1092
+ const d = new MutationObserver((h) => {
1093
+ const { removedNodes: b } = h[0];
1094
+ b.length > 0 && (o.selectedIndex = 0);
1095
1095
  });
1096
- return d.observe(u, { childList: !0 }), X(() => d.disconnect());
1096
+ return d.observe(u, { childList: !0 }), G(() => d.disconnect());
1097
1097
  }),
1098
1098
  H(t),
1099
1099
  l.class("bc-native-select bc-input"),
@@ -1101,15 +1101,15 @@ const Mn = ({
1101
1101
  W,
1102
1102
  (u) => y.option(
1103
1103
  l.hidden("hidden"),
1104
- Kt(c, u.$.selectOne)
1104
+ ee(c, u.$.selectOne)
1105
1105
  )
1106
1106
  ),
1107
- ot(r, (u) => Xt(u, a, e)),
1108
- s != null ? I.blur(s) : F,
1109
- n != null ? I.change(He("value", (u) => n(u))) : F
1107
+ ot(r, (u) => Gt(u, a, e)),
1108
+ s != null ? k.blur(s) : D,
1109
+ n != null ? k.change(He("value", (u) => n(u))) : D
1110
1110
  )
1111
1111
  },
1112
- I.click(() => {
1112
+ k.click(() => {
1113
1113
  o?.focus(), typeof o?.showPicker == "function" && o.showPicker();
1114
1114
  })
1115
1115
  );
@@ -1123,8 +1123,8 @@ function Ye(t) {
1123
1123
  onBlur: fe(e, n)
1124
1124
  });
1125
1125
  }
1126
- function Dn(t) {
1127
- return Wt({
1126
+ function Sn(t) {
1127
+ return Yt({
1128
1128
  ...t,
1129
1129
  content: Ye(t)
1130
1130
  });
@@ -1132,12 +1132,12 @@ function Dn(t) {
1132
1132
  function Xe(t, e, s) {
1133
1133
  const n = t.length.map((r) => r);
1134
1134
  return z(
1135
- jt(
1135
+ Wt(
1136
1136
  n,
1137
1137
  (r) => {
1138
1138
  const c = t.item(r.index), a = [];
1139
1139
  return z(
1140
- X(() => {
1140
+ G(() => {
1141
1141
  a.forEach((i) => i());
1142
1142
  }),
1143
1143
  e({
@@ -1191,14 +1191,14 @@ function Xe(t, e, s) {
1191
1191
  )
1192
1192
  );
1193
1193
  }
1194
- const Rt = {
1194
+ const Nt = {
1195
1195
  9: { pattern: /^[0-9]$/ },
1196
1196
  A: { pattern: /^[A-Za-z]$/, transform: (t) => t.toUpperCase() },
1197
1197
  "*": { pattern: /^.$/ }
1198
1198
  }, qe = (t) => t instanceof RegExp;
1199
- function qt(t, e, s) {
1199
+ function Qt(t, e, s) {
1200
1200
  if (t == null) return [];
1201
- const n = s ? { ...Rt, ...e } : e ?? Rt, r = (a, i) => {
1201
+ const n = s ? { ...Nt, ...e } : e ?? Nt, r = (a, i) => {
1202
1202
  const o = n[i];
1203
1203
  o ? a.push({ type: "pattern", name: i, ...o }) : a.push({ type: "literal", char: i });
1204
1204
  }, c = [];
@@ -1229,64 +1229,64 @@ function Ge(t, e) {
1229
1229
  }
1230
1230
  };
1231
1231
  }
1232
- function Ut(t, e, s, n, r, c) {
1232
+ function Ot(t, e, s, n, r, c) {
1233
1233
  const a = {
1234
1234
  raw: t,
1235
1235
  previousConformed: e,
1236
1236
  cursor: r ?? t.length,
1237
1237
  completed: !1
1238
- }, i = n.definitions ?? {}, o = typeof s == "function" ? s(t, a) : s, u = qt(
1238
+ }, i = n.definitions ?? {}, o = typeof s == "function" ? s(t, a) : s, u = Qt(
1239
1239
  o,
1240
1240
  i,
1241
1241
  n.useDefaultDefinitions ?? !0
1242
- ), d = Ge(n.allowMode, n.allow), b = /* @__PURE__ */ new Set();
1243
- for (const C of u) C.type === "literal" && b.add(C.char);
1244
- if (n.prefix) for (const C of n.prefix) b.add(C);
1245
- if (n.suffix) for (const C of n.suffix) b.add(C);
1246
- const g = Array.from(t).filter((C) => d(C) && !b.has(C));
1247
- if (g.length === 0) return { value: "", cursor: 0, completed: !1 };
1242
+ ), d = Ge(n.allowMode, n.allow), h = /* @__PURE__ */ new Set();
1243
+ for (const C of u) C.type === "literal" && h.add(C.char);
1244
+ if (n.prefix) for (const C of n.prefix) h.add(C);
1245
+ if (n.suffix) for (const C of n.suffix) h.add(C);
1246
+ const b = Array.from(t).filter((C) => d(C) && !h.has(C));
1247
+ if (b.length === 0) return { value: "", cursor: 0, completed: !1 };
1248
1248
  const f = [], w = [];
1249
- let _ = 0, $ = 0, x = 0, m = -1;
1249
+ let $ = 0, _ = 0, v = 0, m = -1;
1250
1250
  for (const C of u) {
1251
1251
  if (C.type === "literal") {
1252
1252
  f.push(C.char), w.push({ kind: "literal", filled: !0 });
1253
1253
  continue;
1254
1254
  }
1255
- $ += C.optional ? 0 : 1;
1256
- const V = g[_];
1255
+ _ += C.optional ? 0 : 1;
1256
+ const V = b[$];
1257
1257
  if (V == null)
1258
1258
  break;
1259
1259
  if (C.type === "any") {
1260
- x++, f.push(C.transform ? C.transform(V) : V), w.push({ kind: "slot", filled: !0 }), m = w.length - 1, _++;
1260
+ v++, f.push(C.transform ? C.transform(V) : V), w.push({ kind: "slot", filled: !0 }), m = w.length - 1, $++;
1261
1261
  continue;
1262
1262
  }
1263
1263
  if (C.type === "pattern")
1264
1264
  if (C.pattern.test(V)) {
1265
- x++;
1265
+ v++;
1266
1266
  const N = C.transform ? C.transform(V) : V;
1267
- f.push(N), w.push({ kind: "slot", filled: !0 }), m = w.length - 1, _++;
1267
+ f.push(N), w.push({ kind: "slot", filled: !0 }), m = w.length - 1, $++;
1268
1268
  } else {
1269
- _++;
1269
+ $++;
1270
1270
  continue;
1271
1271
  }
1272
1272
  }
1273
- const M = f.join(""), D = (n.prefix ?? "") + M + (n.suffix ?? "");
1274
- let v = (n.prefix ?? "").length;
1273
+ const M = f.join(""), S = (n.prefix ?? "") + M + (n.suffix ?? "");
1274
+ let x = (n.prefix ?? "").length;
1275
1275
  if (m >= 0) {
1276
1276
  let C = m + 1;
1277
1277
  if ((c?.policy ?? "smart") !== "sticky")
1278
1278
  for (; C < w.length && w[C].kind === "literal"; ) C++;
1279
- v += C;
1279
+ x += C;
1280
1280
  }
1281
- const h = n.completion?.mode === "min" ? (n.completion.minChars ?? 0) <= x : n.completion?.mode === "custom" ? !!n.completion.isComplete?.(D) : $ > 0 && x >= $, k = n.pipe?.(D, { ...a, completed: h });
1282
- let T, A = v;
1283
- return k === !1 ? (T = e, A = e.length) : typeof k == "string" ? (T = k, A = k.length) : typeof k == "object" && k ? (T = k.value, A = k.cursor ?? k.value.length) : T = D, { value: T, cursor: A, completed: h };
1281
+ const g = n.completion?.mode === "min" ? (n.completion.minChars ?? 0) <= v : n.completion?.mode === "custom" ? !!n.completion.isComplete?.(S) : _ > 0 && v >= _, I = n.pipe?.(S, { ...a, completed: g });
1282
+ let F, A = x;
1283
+ return I === !1 ? (F = e, A = e.length) : typeof I == "string" ? (F = I, A = I.length) : typeof I == "object" && I ? (F = I.value, A = I.cursor ?? I.value.length) : F = S, { value: F, cursor: A, completed: g };
1284
1284
  }
1285
1285
  function Qe(t, e) {
1286
1286
  const s = e?.strategy ?? "none";
1287
1287
  return s === "custom" && e?.unmask ? e.unmask(t) : s === "strip" ? t.replace(/[^A-Za-z0-9]/g, "") : t;
1288
1288
  }
1289
- const Gt = (t) => {
1289
+ const Jt = (t) => {
1290
1290
  const {
1291
1291
  value: e,
1292
1292
  onBlur: s,
@@ -1298,49 +1298,49 @@ const Gt = (t) => {
1298
1298
  definitions: o,
1299
1299
  useDefaultDefinitions: u,
1300
1300
  extraLiterals: d,
1301
- prefix: b,
1302
- suffix: g,
1301
+ prefix: h,
1302
+ suffix: b,
1303
1303
  autofix: f,
1304
1304
  pipe: w,
1305
- completion: _,
1306
- unmask: $,
1307
- allowMode: x,
1305
+ completion: $,
1306
+ unmask: _,
1307
+ allowMode: v,
1308
1308
  allow: m,
1309
1309
  placeholder: M,
1310
- placeholderOptions: D
1311
- } = t, S = B(
1310
+ placeholderOptions: S
1311
+ } = t, T = B(
1312
1312
  e,
1313
1313
  i,
1314
1314
  o,
1315
1315
  u,
1316
1316
  d,
1317
+ h,
1317
1318
  b,
1318
- g,
1319
1319
  f,
1320
- _,
1321
1320
  $,
1322
- x,
1321
+ _,
1322
+ v,
1323
1323
  M,
1324
- D
1325
- )((h, k, T, A, C, V, N, nt, st, K, q, pt, Z) => k ? Ut(h ?? "", "", k, {
1326
- definitions: T ?? {},
1324
+ S
1325
+ )((g, I, F, A, C, V, N, nt, st, K, X, pt, Z) => I ? Ot(g ?? "", "", I, {
1326
+ definitions: F ?? {},
1327
1327
  useDefaultDefinitions: A ?? !0,
1328
1328
  extraLiterals: C ?? [],
1329
1329
  autofix: nt ?? "none",
1330
1330
  completion: st ?? { mode: "mask" },
1331
1331
  pipe: w ?? ((E) => E),
1332
1332
  unmask: K ?? { strategy: "none" },
1333
- allowMode: q ?? "all",
1333
+ allowMode: X ?? "all",
1334
1334
  allow: m,
1335
1335
  prefix: V,
1336
1336
  suffix: N
1337
- }).value : h ?? ""), v = (h, k) => {
1338
- const T = h.value ?? "", A = p.get(e) ?? "", C = i != null ? p.get(i) : null, V = o != null ? p.get(o) : void 0, N = u != null ? p.get(u) : void 0, nt = d != null ? p.get(d) : void 0, st = f != null ? p.get(f) : void 0, K = _ != null ? p.get(_) : void 0, q = $ != null ? p.get($) : void 0, pt = x != null ? p.get(x) : void 0, Z = b != null ? p.get(b) : void 0, E = g != null ? p.get(g) : void 0, {
1339
- value: G,
1337
+ }).value : g ?? ""), x = (g, I) => {
1338
+ const F = g.value ?? "", A = p.get(e) ?? "", C = i != null ? p.get(i) : null, V = o != null ? p.get(o) : void 0, N = u != null ? p.get(u) : void 0, nt = d != null ? p.get(d) : void 0, st = f != null ? p.get(f) : void 0, K = $ != null ? p.get($) : void 0, X = _ != null ? p.get(_) : void 0, pt = v != null ? p.get(v) : void 0, Z = h != null ? p.get(h) : void 0, E = b != null ? p.get(b) : void 0, {
1339
+ value: q,
1340
1340
  cursor: gt,
1341
1341
  completed: Tt
1342
- } = C ? Ut(
1343
- T,
1342
+ } = C ? Ot(
1343
+ F,
1344
1344
  A,
1345
1345
  C,
1346
1346
  {
@@ -1349,50 +1349,50 @@ const Gt = (t) => {
1349
1349
  extraLiterals: nt ?? [],
1350
1350
  autofix: st ?? "none",
1351
1351
  completion: K ?? { mode: "mask" },
1352
- pipe: w ?? ((Qt) => Qt),
1353
- unmask: q ?? { strategy: "none" },
1352
+ pipe: w ?? ((Kt) => Kt),
1353
+ unmask: X ?? { strategy: "none" },
1354
1354
  allowMode: pt ?? "all",
1355
1355
  allow: m,
1356
1356
  prefix: Z,
1357
1357
  suffix: E
1358
1358
  },
1359
- h.selectionStart ?? T.length,
1359
+ g.selectionStart ?? F.length,
1360
1360
  t.cursor ? p.get(t.cursor) : void 0
1361
- ) : { value: T, cursor: T.length, completed: !0 };
1362
- if (G !== T) {
1363
- h.value = G;
1361
+ ) : { value: F, cursor: F.length, completed: !0 };
1362
+ if (q !== F) {
1363
+ g.value = q;
1364
1364
  try {
1365
- h.setSelectionRange(gt, gt);
1365
+ g.setSelectionRange(gt, gt);
1366
1366
  } catch {
1367
1367
  }
1368
1368
  }
1369
- const Ft = Qe(G, q);
1369
+ const Ft = Qe(q, X);
1370
1370
  c?.({
1371
1371
  raw: Ft,
1372
- conformed: G,
1372
+ conformed: q,
1373
1373
  completed: Tt,
1374
1374
  cursor: gt
1375
- }), k === "input" ? r?.(G) : (n?.(G), Tt && a?.({ raw: Ft, conformed: G }));
1375
+ }), I === "input" ? r?.(q) : (n?.(q), Tt && a?.({ raw: Ft, conformed: q }));
1376
1376
  };
1377
1377
  return z(
1378
1378
  O({
1379
1379
  ...t,
1380
1380
  input: Q.text(
1381
1381
  H(t),
1382
- l.value(S),
1382
+ l.value(T),
1383
1383
  l.class("bc-input"),
1384
- s != null ? I.blur(s) : F,
1384
+ s != null ? k.blur(s) : D,
1385
1385
  ut(
1386
- (h) => h instanceof HTMLInputElement ? z(
1387
- I.input(() => v(h, "input")),
1388
- I.change(() => v(h, "change")),
1389
- I.keydown((k) => {
1390
- if (k.key !== "Backspace" || !(t.cursor ? p.get(t.cursor)?.backspaceRubberBand ?? !0 : !0)) return;
1391
- const A = h.selectionStart ?? 0, C = h.selectionEnd ?? A;
1386
+ (g) => g instanceof HTMLInputElement ? z(
1387
+ k.input(() => x(g, "input")),
1388
+ k.change(() => x(g, "change")),
1389
+ k.keydown((I) => {
1390
+ if (I.key !== "Backspace" || !(t.cursor ? p.get(t.cursor)?.backspaceRubberBand ?? !0 : !0)) return;
1391
+ const A = g.selectionStart ?? 0, C = g.selectionEnd ?? A;
1392
1392
  if (A !== C || A <= 0) return;
1393
- const V = h.value ?? "", N = i != null ? p.get(i) : null;
1393
+ const V = g.value ?? "", N = i != null ? p.get(i) : null;
1394
1394
  if (!N) return;
1395
- const nt = o != null ? p.get(o) : void 0, st = u != null ? p.get(u) : !0, K = b != null ? p.get(b) : void 0, q = g != null ? p.get(g) : void 0, pt = qt(
1395
+ const nt = o != null ? p.get(o) : void 0, st = u != null ? p.get(u) : !0, K = h != null ? p.get(h) : void 0, X = b != null ? p.get(b) : void 0, pt = Qt(
1396
1396
  typeof N == "function" ? N(V, {
1397
1397
  raw: V,
1398
1398
  previousConformed: V,
@@ -1405,23 +1405,22 @@ const Gt = (t) => {
1405
1405
  for (const E of pt)
1406
1406
  E.type === "literal" && Z.add(E.char);
1407
1407
  if (K) for (const E of K) Z.add(E);
1408
- if (q) for (const E of q) Z.add(E);
1408
+ if (X) for (const E of X) Z.add(E);
1409
1409
  if (Z.has(V[A - 1])) {
1410
1410
  let E = A - 1;
1411
1411
  for (; E >= 0 && Z.has(V[E]); ) E--;
1412
- E >= 0 && (k.preventDefault(), k.stopPropagation(), h.value = V.slice(0, E) + V.slice(E + 1), v(h, "input"));
1412
+ E >= 0 && (I.preventDefault(), I.stopPropagation(), g.value = V.slice(0, E) + V.slice(E + 1), x(g, "input"));
1413
1413
  }
1414
1414
  })
1415
- ) : F
1415
+ ) : D
1416
1416
  )
1417
1417
  )
1418
1418
  })
1419
1419
  );
1420
1420
  };
1421
1421
  function J(t, e, s) {
1422
- const n = p.map(t, (c) => c != null), r = It.clearValue;
1422
+ const n = p.map(t, (c) => c != null), r = kt.clearValue;
1423
1423
  return z(
1424
- X(() => p.dispose(n)),
1425
1424
  L(
1426
1425
  n,
1427
1426
  () => y.button(
@@ -1431,52 +1430,54 @@ function J(t, e, s) {
1431
1430
  l.title(r),
1432
1431
  l.disabled(e ?? !1),
1433
1432
  U({ icon: "mdi:close", size: "sm" }),
1434
- I.click((c) => {
1435
- c.preventDefault(), c.stopPropagation(), s?.(null);
1433
+ k.click((c) => {
1434
+ c.stopPropagation(), s?.(null);
1436
1435
  })
1437
1436
  )
1438
1437
  )
1439
1438
  );
1440
1439
  }
1441
- const Sn = (t) => {
1442
- const { value: e, onBlur: s, onChange: n, after: r, disabled: c } = t, a = J(e, c, n);
1440
+ const Dn = (t) => {
1441
+ const { value: e, onBlur: s, onChange: n, onInput: r, after: c, disabled: a } = t, i = J(e, a, n ?? r);
1443
1442
  return O({
1444
1443
  ...t,
1445
1444
  input: Q.date(
1446
1445
  H(t),
1447
1446
  l.valueAsDate(e),
1448
1447
  l.class("bc-input"),
1449
- s != null ? I.blur(j(s)) : F,
1450
- n != null ? I.change(ne(n)) : F
1448
+ s != null ? k.blur(j(s)) : D,
1449
+ n != null ? k.change(Bt(n)) : D,
1450
+ r != null ? k.input(Bt(r)) : D
1451
1451
  ),
1452
- after: r != null ? z(a, r) : a
1452
+ after: c != null ? z(i, c) : i
1453
1453
  });
1454
1454
  }, Je = (t) => {
1455
1455
  const e = t.getFullYear(), s = t.getMonth() + 1, n = t.getDate(), r = t.getHours(), c = t.getMinutes(), a = t.getSeconds();
1456
1456
  return `${e}-${s.toString().padStart(2, "0")}-${n.toString().padStart(2, "0")}T${r.toString().padStart(2, "0")}:${c.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}`;
1457
1457
  }, Tn = (t) => {
1458
- const { value: e, onBlur: s, onChange: n, after: r, disabled: c } = t, a = p.map(e, (o) => o != null ? Je(o) : null), i = J(e, c, n);
1458
+ const { value: e, onBlur: s, onChange: n, onInput: r, after: c, disabled: a } = t, i = p.map(e, (u) => u != null ? Je(u) : null), o = J(e, a, n ?? r);
1459
1459
  return O({
1460
1460
  ...t,
1461
1461
  input: Q["datetime-local"](
1462
1462
  H(t),
1463
- l.value(p.map(a, (o) => o ?? null)),
1463
+ l.value(p.map(i, (u) => u ?? null)),
1464
1464
  l.class("bc-input"),
1465
- s != null ? I.blur(j(s)) : F,
1466
- n != null ? I.change(se(n)) : F
1465
+ s != null ? k.blur(j(s)) : D,
1466
+ n != null ? k.change(Lt(n)) : D,
1467
+ r != null ? k.input(Lt(r)) : D
1467
1468
  ),
1468
- after: r != null ? z(i, r) : i
1469
+ after: c != null ? z(o, c) : o
1469
1470
  });
1470
- }, Nt = (t) => typeof t == "string" && t.trim() === "" ? null : t, Ke = (t) => t ?? "";
1471
+ }, Pt = (t) => typeof t == "string" && t.trim() === "" ? null : t, Ke = (t) => t ?? "";
1471
1472
  function et(t) {
1472
1473
  return (e) => {
1473
- const { value: s, onBlur: n, onChange: r, onInput: c, after: a, disabled: i, ...o } = e, u = J(s, i, r);
1474
+ const { value: s, onBlur: n, onChange: r, onInput: c, after: a, disabled: i, ...o } = e, u = J(s, i, r ?? c);
1474
1475
  return t({
1475
1476
  ...o,
1476
1477
  disabled: i,
1477
1478
  value: p.map(s, Ke),
1478
- onChange: r != null ? (d) => r(Nt(d)) : void 0,
1479
- onInput: c != null ? (d) => c(Nt(d)) : void 0,
1479
+ onChange: r != null ? (d) => r(Pt(d)) : void 0,
1480
+ onInput: c != null ? (d) => c(Pt(d)) : void 0,
1480
1481
  onBlur: n,
1481
1482
  after: a != null ? z(u, a) : u
1482
1483
  });
@@ -1500,36 +1501,36 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1500
1501
  l.rows(c ?? 3),
1501
1502
  l.value(e),
1502
1503
  l.class("bc-input"),
1503
- s != null ? I.blur(j(s)) : F,
1504
- n != null ? I.change(j(n)) : F,
1505
- r != null ? I.input(j(r)) : F
1504
+ s != null ? k.blur(j(s)) : D,
1505
+ n != null ? k.change(j(n)) : D,
1506
+ r != null ? k.input(j(r)) : D
1506
1507
  )
1507
1508
  });
1508
1509
  }, Bn = et(
1509
1510
  tn
1510
1511
  ), Ln = (t) => {
1511
- const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i, after: o } = t, u = (g) => {
1512
+ const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i, after: o } = t, u = (b) => {
1512
1513
  const f = n != null ? p.get(n) : void 0, w = r != null ? p.get(r) : void 0;
1513
- return f != null && g < f ? f : w != null && g > w ? w : g;
1514
- }, d = s != null ? P(W, (g) => {
1514
+ return f != null && b < f ? f : w != null && b > w ? w : b;
1515
+ }, d = s != null ? P(W, (b) => {
1515
1516
  const f = B(
1516
1517
  e,
1517
1518
  n
1518
- )((x, m) => m == null ? !0 : (x ?? 0) > m), w = B(
1519
+ )((v, m) => m == null ? !0 : (v ?? 0) > m), w = B(
1519
1520
  e,
1520
1521
  r
1521
- )((x, m) => m == null ? !0 : (x ?? 0) < m), _ = (x) => {
1522
- const m = p.get(e) ?? 0, M = p.get(s), D = x?.shiftKey ? 10 : 1, S = m - M * D, v = n != null ? p.get(n) : void 0;
1523
- if (v != null && S < v)
1522
+ )((v, m) => m == null ? !0 : (v ?? 0) < m), $ = (v) => {
1523
+ const m = p.get(e) ?? 0, M = p.get(s), S = v?.shiftKey ? 10 : 1, T = m - M * S, x = n != null ? p.get(n) : void 0;
1524
+ if (x != null && T < x)
1524
1525
  return;
1525
- const h = u(S);
1526
- h !== m && a && a(h);
1527
- }, $ = (x) => {
1528
- const m = p.get(e) ?? 0, M = p.get(s), D = x?.shiftKey ? 10 : 1, S = m + M * D, v = r != null ? p.get(r) : void 0;
1529
- if (v != null && S > v)
1526
+ const g = u(T);
1527
+ g !== m && a && a(g);
1528
+ }, _ = (v) => {
1529
+ const m = p.get(e) ?? 0, M = p.get(s), S = v?.shiftKey ? 10 : 1, T = m + M * S, x = r != null ? p.get(r) : void 0;
1530
+ if (x != null && T > x)
1530
1531
  return;
1531
- const h = u(S);
1532
- h !== m && a && a(h);
1532
+ const g = u(T);
1533
+ g !== m && a && a(g);
1533
1534
  };
1534
1535
  return ct(
1535
1536
  l.class("bc-number-input-steppers"),
@@ -1543,10 +1544,10 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1543
1544
  B(
1544
1545
  w,
1545
1546
  t.disabled ?? !1
1546
- )((x, m) => !x || m)
1547
+ )((v, m) => !v || m)
1547
1548
  ),
1548
- I.click((x) => $(x)),
1549
- R.label(g.$.incrementValue),
1549
+ k.click((v) => _(v)),
1550
+ R.label(b.$.incrementValue),
1550
1551
  U({ icon: "line-md:plus", size: "xs" })
1551
1552
  ),
1552
1553
  // Decrement first (matches tests expecting first button to be decrement)
@@ -1559,81 +1560,81 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1559
1560
  B(
1560
1561
  f,
1561
1562
  t.disabled ?? !1
1562
- )((x, m) => !x || m)
1563
+ )((v, m) => !v || m)
1563
1564
  ),
1564
- I.click((x) => _(x)),
1565
- R.label(g.$.decrementValue),
1565
+ k.click((v) => $(v)),
1566
+ R.label(b.$.decrementValue),
1566
1567
  U({ icon: "line-md:minus", size: "xs" })
1567
1568
  )
1568
1569
  );
1569
- }) : null, b = o != null && d != null ? z(d, o) : o ?? d;
1570
+ }) : null, h = o != null && d != null ? z(d, o) : o ?? d;
1570
1571
  return O({
1571
1572
  ...t,
1572
1573
  input: Q.number(
1573
1574
  n != null ? z(
1574
1575
  l.min(n),
1575
- X(
1576
- p.on(n, (g) => {
1577
- g < p.get(e);
1576
+ G(
1577
+ p.on(n, (b) => {
1578
+ b < p.get(e);
1578
1579
  })
1579
1580
  )
1580
- ) : F,
1581
+ ) : D,
1581
1582
  r != null ? z(
1582
1583
  l.max(r),
1583
- X(
1584
- p.on(r, (g) => {
1585
- g > p.get(e);
1584
+ G(
1585
+ p.on(r, (b) => {
1586
+ b > p.get(e);
1586
1587
  })
1587
1588
  )
1588
- ) : F,
1589
+ ) : D,
1589
1590
  H(t),
1590
1591
  l.valueAsNumber(e),
1591
1592
  l.step(s),
1592
1593
  l.class("bc-input bc-number-input"),
1593
- c != null ? I.blur(j(c)) : F,
1594
- a != null ? I.change(Y(a)) : F,
1595
- i != null ? I.input(Y(i)) : F,
1594
+ c != null ? k.blur(j(c)) : D,
1595
+ a != null ? k.change(Y(a)) : D,
1596
+ i != null ? k.input(Y(i)) : D,
1596
1597
  // Add wheel event support when step is defined
1597
- s != null ? I.wheel((g) => {
1598
- g.preventDefault();
1599
- const f = p.get(e) ?? 0, w = p.get(s), _ = g.shiftKey ? 10 : 1, $ = g.deltaY < 0 ? w * _ : -w * _, x = u(f + $);
1600
- x !== f && a && a(x);
1601
- }) : F
1598
+ s != null ? k.wheel((b) => {
1599
+ b.preventDefault();
1600
+ const f = p.get(e) ?? 0, w = p.get(s), $ = b.shiftKey ? 10 : 1, _ = b.deltaY < 0 ? w * $ : -w * $, v = u(f + _);
1601
+ v !== f && a && a(v);
1602
+ }) : D
1602
1603
  ),
1603
- after: b
1604
+ after: h
1604
1605
  });
1605
- }, Ot = (t) => {
1606
+ }, jt = (t) => {
1606
1607
  if (t == null || t === "") return null;
1607
1608
  const e = Number(t);
1608
1609
  return Number.isNaN(e) ? null : e;
1609
1610
  }, zn = (t) => {
1610
1611
  const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i, after: o } = t, u = (f) => {
1611
- const w = n != null ? p.get(n) : void 0, _ = r != null ? p.get(r) : void 0;
1612
- return w != null && f < w ? w : _ != null && f > _ ? _ : f;
1612
+ const w = n != null ? p.get(n) : void 0, $ = r != null ? p.get(r) : void 0;
1613
+ return w != null && f < w ? w : $ != null && f > $ ? $ : f;
1613
1614
  }, d = (() => {
1614
1615
  if (s == null) return null;
1615
1616
  const f = B(
1616
1617
  e,
1617
1618
  n
1618
1619
  )((m, M) => {
1619
- const D = m ?? 0;
1620
- return M == null ? !0 : D > M;
1620
+ const S = m ?? 0;
1621
+ return M == null ? !0 : S > M;
1621
1622
  }), w = B(
1622
1623
  e,
1623
1624
  r
1624
1625
  )((m, M) => {
1625
- const D = m ?? 0;
1626
- return M == null ? !0 : D < M;
1627
- }), _ = (m) => {
1628
- const M = p.get(e) ?? 0, D = p.get(s), S = m?.shiftKey ? 10 : 1, v = M - D * S, h = n != null ? p.get(n) : void 0;
1629
- if (h != null && v < h) return;
1630
- const k = u(v);
1631
- k !== M && a && a(k);
1632
- }, $ = (m) => {
1633
- const M = p.get(e) ?? 0, D = p.get(s), S = m?.shiftKey ? 10 : 1, v = M + D * S, h = r != null ? p.get(r) : void 0;
1634
- if (h != null && v > h) return;
1635
- const k = u(v);
1636
- k !== M && a && a(k);
1626
+ const S = m ?? 0;
1627
+ return M == null ? !0 : S < M;
1628
+ }), $ = (m) => {
1629
+ const M = p.get(e) ?? 0, S = p.get(s), T = m?.shiftKey ? 10 : 1, x = M - S * T, g = n != null ? p.get(n) : void 0;
1630
+ if (g != null && x < g) return;
1631
+ const I = u(x);
1632
+ I !== M && a && a(I);
1633
+ }, _ = (m) => {
1634
+ const M = p.get(e) ?? 0, S = p.get(s), T = m?.shiftKey ? 10 : 1, x = M + S * T, g = r != null ? p.get(r) : void 0;
1635
+ if (g != null && x > g) return;
1636
+ const I = u(x);
1637
+ I !== M && a && a(I);
1637
1638
  };
1638
1639
  return ((m, M) => ct(
1639
1640
  l.class("bc-number-input-steppers"),
@@ -1646,9 +1647,9 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1646
1647
  B(
1647
1648
  w,
1648
1649
  t.disabled ?? !1
1649
- )((D, S) => !D || S)
1650
+ )((S, T) => !S || T)
1650
1651
  ),
1651
- I.click((D) => $(D)),
1652
+ k.click((S) => _(S)),
1652
1653
  R.label(m),
1653
1654
  U({ icon: "line-md:plus", size: "xs" })
1654
1655
  ),
@@ -1661,49 +1662,53 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1661
1662
  B(
1662
1663
  f,
1663
1664
  t.disabled ?? !1
1664
- )((D, S) => !D || S)
1665
+ )((S, T) => !S || T)
1665
1666
  ),
1666
- I.click((D) => _(D)),
1667
+ k.click((S) => $(S)),
1667
1668
  R.label(M),
1668
1669
  U({ icon: "line-md:minus", size: "xs" })
1669
1670
  )
1670
1671
  ))(
1671
- It.incrementValue,
1672
- It.decrementValue
1672
+ kt.incrementValue,
1673
+ kt.decrementValue
1673
1674
  );
1674
- })(), b = J(e, t.disabled, a), g = o != null && d != null ? z(d, b, o) : o != null ? z(b, o) : d != null ? z(d, b) : b;
1675
+ })(), h = J(
1676
+ e,
1677
+ t.disabled,
1678
+ a ?? i
1679
+ ), b = o != null && d != null ? z(d, h, o) : o != null ? z(h, o) : d != null ? z(d, h) : h;
1675
1680
  return O({
1676
1681
  ...t,
1677
1682
  input: Q.number(
1678
1683
  // min/max attributes and reactive watchers (no forced correction)
1679
- n != null ? l.min(n) : F,
1680
- r != null ? l.max(r) : F,
1684
+ n != null ? l.min(n) : D,
1685
+ r != null ? l.max(r) : D,
1681
1686
  H(t),
1682
1687
  // Represent null as empty string so the field can be cleared
1683
1688
  l.value(p.map(e, (f) => f == null ? "" : String(f))),
1684
1689
  l.step(s),
1685
1690
  l.class("bc-input bc-number-input"),
1686
- c != null ? I.blur(j(c)) : F,
1687
- a != null ? I.change(
1691
+ c != null ? k.blur(j(c)) : D,
1692
+ a != null ? k.change(
1688
1693
  j((f) => {
1689
- const w = Ot(f);
1694
+ const w = jt(f);
1690
1695
  a(w);
1691
1696
  })
1692
- ) : F,
1693
- i != null ? I.input(
1697
+ ) : D,
1698
+ i != null ? k.input(
1694
1699
  j((f) => {
1695
- const w = Ot(f);
1700
+ const w = jt(f);
1696
1701
  i(w);
1697
1702
  })
1698
- ) : F,
1703
+ ) : D,
1699
1704
  // Wheel support when step is defined
1700
- s != null ? I.wheel((f) => {
1705
+ s != null ? k.wheel((f) => {
1701
1706
  f.preventDefault();
1702
- const w = p.get(e) ?? 0, _ = p.get(s), $ = f.shiftKey ? 10 : 1, x = f.deltaY < 0 ? _ * $ : -_ * $, m = u(w + x);
1707
+ const w = p.get(e) ?? 0, $ = p.get(s), _ = f.shiftKey ? 10 : 1, v = f.deltaY < 0 ? $ * _ : -$ * _, m = u(w + v);
1703
1708
  m !== w && a && a(m);
1704
- }) : F
1709
+ }) : D
1705
1710
  ),
1706
- after: g
1711
+ after: b
1707
1712
  });
1708
1713
  }, En = ({
1709
1714
  value: t,
@@ -1718,26 +1723,26 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1718
1723
  color: u = "primary",
1719
1724
  tabIndex: d = 0
1720
1725
  }) => {
1721
- const b = o ?? be("switch");
1722
- function g($, x) {
1726
+ const h = o ?? be("switch");
1727
+ function b(_, v) {
1723
1728
  const m = [
1724
1729
  "bc-switch",
1725
- `bc-switch--size-${x}`,
1726
- `bc-switch--${x}`
1730
+ `bc-switch--size-${v}`,
1731
+ `bc-switch--${v}`
1727
1732
  ];
1728
- return $ && m.push("bc-switch--disabled"), m.join(" ");
1733
+ return _ && m.push("bc-switch--disabled"), m.join(" ");
1729
1734
  }
1730
- function f($) {
1731
- const x = $ ?? "primary", m = /* @__PURE__ */ new Map(), M = zt(x, "solid", "light"), D = zt(x, "solid", "dark");
1732
- return m.set("--switch-track-on-bg", M.backgroundColor), m.set("--switch-track-on-label", M.textColor), m.set("--switch-track-on-bg-dark", D.backgroundColor), m.set("--switch-track-on-label-dark", D.textColor), m.set(
1735
+ function f(_) {
1736
+ const v = _ ?? "primary", m = /* @__PURE__ */ new Map(), M = Rt(v, "solid", "light"), S = Rt(v, "solid", "dark");
1737
+ return m.set("--switch-track-on-bg", M.backgroundColor), m.set("--switch-track-on-label", M.textColor), m.set("--switch-track-on-bg-dark", S.backgroundColor), m.set("--switch-track-on-label-dark", S.textColor), m.set(
1733
1738
  "--switch-track-on-border-dark",
1734
- de(x, "dark")
1735
- ), Array.from(m.entries()).map(([S, v]) => `${S}: ${v}`).join("; ");
1739
+ de(v, "dark")
1740
+ ), Array.from(m.entries()).map(([T, x]) => `${T}: ${x}`).join("; ");
1736
1741
  }
1737
1742
  const w = () => {
1738
1743
  p.get(a) || (e?.(!p.get(t)), s?.(!p.get(t)));
1739
- }, _ = ($) => {
1740
- p.get(a) || ($.key === " " || $.key === "Enter") && ($.preventDefault(), w());
1744
+ }, $ = (_) => {
1745
+ p.get(a) || (_.key === " " || _.key === "Enter") && (_.preventDefault(), w());
1741
1746
  };
1742
1747
  return y.div(
1743
1748
  l.class(
@@ -1745,33 +1750,33 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1745
1750
  a ?? !1,
1746
1751
  i
1747
1752
  )(
1748
- ($, x) => g($ ?? !1, x ?? "md")
1753
+ (_, v) => b(_ ?? !1, v ?? "md")
1749
1754
  )
1750
1755
  ),
1751
1756
  l.style(
1752
1757
  B(u)(
1753
- ($) => f($)
1758
+ (_) => f(_)
1754
1759
  )
1755
1760
  ),
1756
- l.id(b),
1761
+ l.id(h),
1757
1762
  l.role("switch"),
1758
1763
  l.tabindex(
1759
1764
  B(
1760
1765
  a ?? !1,
1761
1766
  d
1762
- )(($, x) => $ ? -1 : x ?? 0)
1767
+ )((_, v) => _ ? -1 : v ?? 0)
1763
1768
  ),
1764
1769
  R.checked(t),
1765
1770
  R.disabled(a),
1766
- I.click(w),
1767
- I.keydown(_),
1768
- n != null ? I.blur(n) : null,
1771
+ k.click(w),
1772
+ k.keydown($),
1773
+ n != null ? k.blur(n) : null,
1769
1774
  y.div(
1770
1775
  l.class("bc-switch__track"),
1771
1776
  l.class(
1772
1777
  p.map(
1773
1778
  t,
1774
- ($) => $ ? "bc-switch__track--on" : "bc-switch__track--off"
1779
+ (_) => _ ? "bc-switch__track--on" : "bc-switch__track--off"
1775
1780
  )
1776
1781
  ),
1777
1782
  r != null ? y.div(
@@ -1780,7 +1785,7 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1780
1785
  l.class(
1781
1786
  p.map(
1782
1787
  t,
1783
- ($) => $ ? "bc-switch__track-label--hidden" : "bc-switch__track-label--visible"
1788
+ (_) => _ ? "bc-switch__track-label--hidden" : "bc-switch__track-label--visible"
1784
1789
  )
1785
1790
  ),
1786
1791
  r
@@ -1790,15 +1795,15 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1790
1795
  l.class(
1791
1796
  p.map(
1792
1797
  t,
1793
- ($) => $ ? "bc-switch__track-label--visible" : "bc-switch__track-label--hidden"
1798
+ (_) => _ ? "bc-switch__track-label--visible" : "bc-switch__track-label--hidden"
1794
1799
  )
1795
1800
  ),
1796
1801
  c
1797
1802
  ) : null,
1798
- Ht(
1799
- ($) => P(
1803
+ Zt(
1804
+ (_) => P(
1800
1805
  pe,
1801
- ({ direction: x }) => y.div(
1806
+ ({ direction: v }) => y.div(
1802
1807
  l.class("bc-switch__thumb"),
1803
1808
  l.class(
1804
1809
  p.map(
@@ -1809,12 +1814,12 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1809
1814
  ht.transform(
1810
1815
  B(
1811
1816
  t,
1812
- $,
1817
+ _,
1813
1818
  i,
1814
- x
1815
- )((m, { width: M }, D, S) => {
1816
- const v = (() => {
1817
- switch (D) {
1819
+ v
1820
+ )((m, { width: M }, S, T) => {
1821
+ const x = (() => {
1822
+ switch (S) {
1818
1823
  case "xs":
1819
1824
  return 5;
1820
1825
  case "sm":
@@ -1826,8 +1831,8 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1826
1831
  case "xl":
1827
1832
  return 8;
1828
1833
  }
1829
- })(), h = S === "rtl" ? `calc((var(--spacing-base) * ${v}) - ${M}px)` : `calc(${M}px - (var(--spacing-base) * ${v}))`;
1830
- return m ? `translateX(${h})` : "translateX(0)";
1834
+ })(), g = T === "rtl" ? `calc((var(--spacing-base) * ${x}) - ${M}px)` : `calc(${M}px - (var(--spacing-base) * ${x}))`;
1835
+ return m ? `translateX(${g})` : "translateX(0)";
1831
1836
  })
1832
1837
  )
1833
1838
  )
@@ -1841,7 +1846,7 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1841
1846
  pattern: /[0-9A-Fa-f]/,
1842
1847
  transform: (n) => n.toLowerCase()
1843
1848
  };
1844
- return Gt({
1849
+ return Jt({
1845
1850
  ...t,
1846
1851
  mask: [
1847
1852
  e,
@@ -1896,40 +1901,40 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1896
1901
  emptyIcon: o = sn,
1897
1902
  size: u = "md",
1898
1903
  onBlur: d,
1899
- rounding: b = 1
1900
- } = t, g = () => {
1901
- const m = p.get(b);
1904
+ rounding: h = 1
1905
+ } = t, b = () => {
1906
+ const m = p.get(h);
1902
1907
  return m > 0 ? m : 1;
1903
1908
  }, f = (m) => Math.min(Math.max(m, 0), p.get(r)), w = (m, M) => {
1904
1909
  if (p.get(n ?? !1)) return;
1905
- const S = m.currentTarget.getBoundingClientRect(), v = (m.clientX - S.left) / S.width, h = M - 1 + v, k = g(), T = Math.ceil(h / k) * k, A = f(T);
1910
+ const T = m.currentTarget.getBoundingClientRect(), x = (m.clientX - T.left) / T.width, g = M - 1 + x, I = b(), F = Math.ceil(g / I) * I, A = f(F);
1906
1911
  s?.(A);
1907
- }, _ = (m) => {
1912
+ }, $ = (m) => {
1908
1913
  if (p.get(n ?? !1)) return;
1909
- const M = g(), D = p.get(e) ?? 0;
1910
- let S;
1914
+ const M = b(), S = p.get(e) ?? 0;
1915
+ let T;
1911
1916
  switch (m.key) {
1912
1917
  case "ArrowRight":
1913
1918
  case "ArrowUp":
1914
- S = f(D + M);
1919
+ T = f(S + M);
1915
1920
  break;
1916
1921
  case "ArrowLeft":
1917
1922
  case "ArrowDown":
1918
- S = f(D - M);
1923
+ T = f(S - M);
1919
1924
  break;
1920
1925
  case "Home":
1921
- S = 0;
1926
+ T = 0;
1922
1927
  break;
1923
1928
  case "End":
1924
- S = p.get(r);
1929
+ T = p.get(r);
1925
1930
  break;
1926
1931
  default:
1927
1932
  return;
1928
1933
  }
1929
- m.preventDefault(), s?.(S);
1930
- }, $ = p.map(u, (m) => `bc-icon--${m}`), x = ({ index: m, counter: M }) => y.span(
1934
+ m.preventDefault(), s?.(T);
1935
+ }, _ = p.map(u, (m) => `bc-icon--${m}`), v = ({ index: m, counter: M }) => y.span(
1931
1936
  l.class("bc-rating-input__icon-container"),
1932
- l.class($),
1937
+ l.class(_),
1933
1938
  U(
1934
1939
  {
1935
1940
  icon: o,
@@ -1941,11 +1946,11 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1941
1946
  ),
1942
1947
  y.span(
1943
1948
  l.class("bc-rating-input__icon-clipper"),
1944
- l.class($),
1949
+ l.class(_),
1945
1950
  ht.width(
1946
- p.map(e, (D) => {
1947
- const S = Math.floor(D);
1948
- return S > m ? "100%" : S < m ? "0%" : `${(D - m) * 100}%`;
1951
+ p.map(e, (S) => {
1952
+ const T = Math.floor(S);
1953
+ return T > m ? "100%" : T < m ? "0%" : `${(S - m) * 100}%`;
1949
1954
  })
1950
1955
  ),
1951
1956
  U(
@@ -1958,8 +1963,8 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1958
1963
  l.class("bc-rating-input__icon-full")
1959
1964
  )
1960
1965
  ),
1961
- I.click(
1962
- re((D) => w(D, M), {
1966
+ k.click(
1967
+ re((S) => w(S, M), {
1963
1968
  preventDefault: !0,
1964
1969
  stopPropagation: !0
1965
1970
  })
@@ -1986,26 +1991,27 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1986
1991
  e,
1987
1992
  r
1988
1993
  )((m, M) => {
1989
- const D = m ?? 0, S = M ?? 0;
1990
- return `${String(D)} / ${String(S)}`;
1994
+ const S = m ?? 0, T = M ?? 0;
1995
+ return `${String(S)} / ${String(T)}`;
1991
1996
  })
1992
1997
  ),
1993
1998
  // Keyboard & focus handlers
1994
- I.keydown(_),
1995
- d != null ? I.blur(d) : null,
1996
- jt(r, x)
1999
+ k.keydown($),
2000
+ d != null ? k.blur(d) : null,
2001
+ Wt(r, v)
1997
2002
  )
1998
2003
  });
1999
2004
  }, Un = (t) => {
2000
- const { value: e, onChange: s, onBlur: n, after: r, disabled: c, ...a } = t, i = J(e, c, s);
2005
+ const { value: e, onChange: s, onInput: n, onBlur: r, after: c, disabled: a, ...i } = t, o = J(e, a, s ?? n);
2001
2006
  return rn({
2002
- ...a,
2007
+ ...i,
2003
2008
  // Map null -> 0 for display so the control shows as empty when null
2004
- value: p.map(e, (o) => o ?? 0),
2009
+ value: p.map(e, (u) => u ?? 0),
2005
2010
  // Pass through numeric changes; clear button will call onChange(null)
2006
2011
  onChange: s,
2007
- onBlur: n,
2008
- after: r != null ? z(i, r) : i
2012
+ onInput: n,
2013
+ onBlur: r,
2014
+ after: c != null ? z(o, c) : o
2009
2015
  });
2010
2016
  }, Nn = (t) => {
2011
2017
  const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i } = t;
@@ -2022,19 +2028,21 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
2022
2028
  // Using value as number to keep it in sync
2023
2029
  l.valueAsNumber(e),
2024
2030
  l.class("bc-input bc-slider-input"),
2025
- c != null ? I.blur(Y(c)) : F,
2026
- a != null ? I.change(Y(a)) : F,
2027
- i != null ? I.input(Y(i)) : F
2031
+ c != null ? k.blur(Y(c)) : D,
2032
+ a != null ? k.change(Y(a)) : D,
2033
+ i != null ? k.input(Y(i)) : D
2028
2034
  )
2029
2035
  });
2030
2036
  }, On = (t) => {
2031
2037
  const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i } = t, o = p.map(e, (d) => {
2032
2038
  if (d != null) return d;
2033
- const b = n != null ? p.get(n) : void 0;
2034
- return typeof b == "number" ? b : 0;
2035
- }), u = J(e, t.disabled, (d) => {
2036
- a?.(d);
2037
- });
2039
+ const h = n != null ? p.get(n) : void 0;
2040
+ return typeof h == "number" ? h : 0;
2041
+ }), u = J(
2042
+ e,
2043
+ t.disabled,
2044
+ a ?? i
2045
+ );
2038
2046
  return O(
2039
2047
  {
2040
2048
  ...t,
@@ -2048,36 +2056,36 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
2048
2056
  l.step(s),
2049
2057
  l.valueAsNumber(o),
2050
2058
  l.class("bc-input bc-slider-input"),
2051
- c != null ? I.blur(Y(c)) : F,
2052
- a != null ? I.change(
2059
+ c != null ? k.blur(Y(c)) : D,
2060
+ a != null ? k.change(
2053
2061
  Y((d) => {
2054
2062
  a(d);
2055
2063
  })
2056
- ) : F,
2057
- i != null ? I.input(
2064
+ ) : D,
2065
+ i != null ? k.input(
2058
2066
  Y((d) => {
2059
2067
  i(d);
2060
2068
  })
2061
- ) : F
2069
+ ) : D
2062
2070
  )
2063
2071
  },
2064
2072
  // Ensure container grows input naturally
2065
2073
  z()
2066
2074
  );
2067
2075
  };
2068
- let kt = null;
2069
- async function Dt() {
2076
+ let It = null;
2077
+ async function St() {
2070
2078
  const t = globalThis;
2071
- return t.Temporal ? t.Temporal : (kt || (kt = import("./index.esm-DPNh6inz.js").then((e) => {
2079
+ return t.Temporal ? t.Temporal : (It || (It = import("./index.esm-DPNh6inz.js").then((e) => {
2072
2080
  const s = e.Temporal;
2073
2081
  return t.Temporal || (t.Temporal = s), s;
2074
- })), kt);
2082
+ })), It);
2075
2083
  }
2076
- const an = (t, e) => e ? Bt(Dt, {
2084
+ const an = (t, e) => e ? zt(St, {
2077
2085
  then: t,
2078
2086
  pending: e.pending,
2079
2087
  error: e.error
2080
- }) : Bt(Dt, t), ln = /^P(\d+([YMWD]|$)){0,4}(T(\d+([HMS]|$)){0,3})?$/i, on = /^P(?:(\d+Y)?(\d+M)?(\d+W)?(\d+D)?)(T(\d+H)?(\d+M)?(\d+S)?)?$/i;
2088
+ }) : zt(St, t), ln = /^P(\d+([YMWD]|$)){0,4}(T(\d+([HMS]|$)){0,3})?$/i, on = /^P(?:(\d+Y)?(\d+M)?(\d+W)?(\d+D)?)(T(\d+H)?(\d+M)?(\d+S)?)?$/i;
2081
2089
  function cn(t) {
2082
2090
  return {
2083
2091
  mask: null,
@@ -2101,7 +2109,7 @@ function cn(t) {
2101
2109
  }
2102
2110
  };
2103
2111
  }
2104
- const Pt = (t, e) => {
2112
+ const Ht = (t, e) => {
2105
2113
  if (t == null) return null;
2106
2114
  try {
2107
2115
  return t.Duration.from(e);
@@ -2109,48 +2117,52 @@ const Pt = (t, e) => {
2109
2117
  return null;
2110
2118
  }
2111
2119
  }, Pn = (t) => {
2112
- const { value: e, onChange: s, after: n, disabled: r, onBlur: c } = t, a = () => {
2113
- const u = J(e, r, s);
2114
- return n != null ? z(u, n) : u;
2115
- }, i = t.placeholder != null ? F : l.placeholder("P0DT0H0M0S");
2120
+ const { value: e, onChange: s, onInput: n, after: r, disabled: c, onBlur: a } = t, i = () => {
2121
+ const d = J(e, c, s ?? n);
2122
+ return r != null ? z(d, r) : d;
2123
+ }, o = t.placeholder != null ? D : l.placeholder("P0DT0H0M0S");
2116
2124
  return an(
2117
- (u) => Gt({
2125
+ (d) => Jt({
2118
2126
  ...t,
2119
- value: p.map(e, (d) => d?.toString() ?? ""),
2120
- onChange: s ? (d) => s(d === "" ? null : u.Duration.from(d)) : void 0,
2127
+ value: p.map(e, (h) => h?.toString() ?? ""),
2128
+ onChange: s ? (h) => s(h === "" ? null : d.Duration.from(h)) : void 0,
2121
2129
  onInput: void 0,
2122
- ...cn(u.Duration.from),
2130
+ ...cn(d.Duration.from),
2123
2131
  placeholder: "P0DT0H0M0S",
2124
- after: a()
2132
+ after: i()
2125
2133
  }),
2126
- { pending: () => O({
2127
- ...t,
2128
- input: Q.text(
2129
- H(t),
2130
- l.value(p.map(e, (u) => u?.toString() ?? "")),
2131
- l.class("bc-input"),
2132
- i,
2133
- c != null ? I.blur(() => c()) : F,
2134
- s != null ? I.change((u) => {
2135
- const b = u.currentTarget?.value ?? "";
2136
- if (b === "") {
2137
- s(null);
2138
- return;
2139
- }
2140
- const g = globalThis.Temporal, f = Pt(g, b);
2141
- if (f != null) {
2142
- s(f);
2143
- return;
2144
- }
2145
- Dt().then((w) => {
2146
- const _ = Pt(w, b);
2147
- _ != null && s(_);
2148
- }).catch(() => {
2149
- });
2150
- }) : F
2151
- ),
2152
- after: a()
2153
- }) }
2134
+ { pending: () => {
2135
+ const d = (h) => (b) => {
2136
+ const w = b.currentTarget?.value ?? "";
2137
+ if (w === "") {
2138
+ h(null);
2139
+ return;
2140
+ }
2141
+ const $ = globalThis.Temporal, _ = Ht($, w);
2142
+ if (_ != null) {
2143
+ h(_);
2144
+ return;
2145
+ }
2146
+ St().then((v) => {
2147
+ const m = Ht(v, w);
2148
+ m != null && h(m);
2149
+ }).catch(() => {
2150
+ });
2151
+ };
2152
+ return O({
2153
+ ...t,
2154
+ input: Q.text(
2155
+ H(t),
2156
+ l.value(p.map(e, (h) => h?.toString() ?? "")),
2157
+ l.class("bc-input"),
2158
+ o,
2159
+ a != null ? k.blur(() => a()) : D,
2160
+ s != null ? k.change(d(s)) : D,
2161
+ n != null ? k.input(d(n)) : D
2162
+ ),
2163
+ after: i()
2164
+ });
2165
+ } }
2154
2166
  );
2155
2167
  }, un = (t) => {
2156
2168
  const { value: e, onBlur: s, onChange: n, onInput: r } = t;
@@ -2160,9 +2172,9 @@ const Pt = (t, e) => {
2160
2172
  H(t),
2161
2173
  l.value(e),
2162
2174
  l.class("bc-input"),
2163
- s != null ? I.blur(j(s)) : F,
2164
- n != null ? I.change(j(n)) : F,
2165
- r != null ? I.input(j(r)) : F
2175
+ s != null ? k.blur(j(s)) : D,
2176
+ n != null ? k.change(j(n)) : D,
2177
+ r != null ? k.input(j(r)) : D
2166
2178
  )
2167
2179
  });
2168
2180
  }, jn = et(un), pn = (t) => {
@@ -2177,14 +2189,14 @@ const Pt = (t, e) => {
2177
2189
  addLabel: o,
2178
2190
  controlsLayout: u = "aside",
2179
2191
  removeDisabled: d,
2180
- addDisabled: b
2181
- } = t, g = p.toSignal(u).map((_) => _ === "aside"), f = (_) => {
2182
- const $ = L(
2192
+ addDisabled: h
2193
+ } = t, b = p.toSignal(u).map(($) => $ === "aside"), f = ($) => {
2194
+ const _ = L(
2183
2195
  r ?? !1,
2184
2196
  () => y.div(
2185
2197
  l.class("bc-group--align-center"),
2186
2198
  l.class(
2187
- g.map(
2199
+ b.map(
2188
2200
  (m) => m ? "bc-group--direction-column bc-group--gap-1" : "bc-group--direction-row bc-group--gap-1"
2189
2201
  )
2190
2202
  ),
@@ -2193,8 +2205,8 @@ const Pt = (t, e) => {
2193
2205
  size: "xs",
2194
2206
  roundedness: "full",
2195
2207
  variant: "text",
2196
- onClick: () => _.move("up"),
2197
- disabled: _.cannotMove("up")
2208
+ onClick: () => $.move("up"),
2209
+ disabled: $.cannotMove("up")
2198
2210
  },
2199
2211
  P(
2200
2212
  W,
@@ -2210,8 +2222,8 @@ const Pt = (t, e) => {
2210
2222
  size: "xs",
2211
2223
  roundedness: "full",
2212
2224
  variant: "text",
2213
- onClick: () => _.move("down"),
2214
- disabled: _.cannotMove("down")
2225
+ onClick: () => $.move("down"),
2226
+ disabled: $.cannotMove("down")
2215
2227
  },
2216
2228
  P(
2217
2229
  W,
@@ -2223,7 +2235,7 @@ const Pt = (t, e) => {
2223
2235
  )
2224
2236
  )
2225
2237
  )
2226
- ), x = L(
2238
+ ), v = L(
2227
2239
  c,
2228
2240
  () => P(
2229
2241
  W,
@@ -2233,12 +2245,12 @@ const Pt = (t, e) => {
2233
2245
  label: p.map(m.$.removeItem, (M) => M.toLowerCase()),
2234
2246
  color: "danger",
2235
2247
  disabled: d,
2236
- onClick: _.remove
2248
+ onClick: $.remove
2237
2249
  })
2238
2250
  )
2239
2251
  );
2240
2252
  return (m) => L(
2241
- g,
2253
+ b,
2242
2254
  () => dt(
2243
2255
  l.class("bc-group--gap-1 bc-group--align-center"),
2244
2256
  ct(l.class("bc-stack--grow"), m),
@@ -2246,9 +2258,9 @@ const Pt = (t, e) => {
2246
2258
  l.class("bc-stack--align-center"),
2247
2259
  L(
2248
2260
  e.signal.map((M) => M.length > 1),
2249
- () => $
2261
+ () => _
2250
2262
  ),
2251
- x
2263
+ v
2252
2264
  )
2253
2265
  ),
2254
2266
  () => ct(
@@ -2258,15 +2270,15 @@ const Pt = (t, e) => {
2258
2270
  l.class("bc-group--gap-2 bc-group--justify-between"),
2259
2271
  L(
2260
2272
  e.signal.map((M) => M.length > 1),
2261
- () => $,
2273
+ () => _,
2262
2274
  () => y.div()
2263
2275
  ),
2264
- x
2276
+ v
2265
2277
  )
2266
2278
  )
2267
2279
  );
2268
2280
  }, w = L(
2269
- B(a, i)((_, $) => _ && $ != null),
2281
+ B(a, i)(($, _) => $ && _ != null),
2270
2282
  () => dt(
2271
2283
  l.class(
2272
2284
  "bc-group--gap-2 bc-group--align-center bc-group--justify-center"
@@ -2278,17 +2290,17 @@ const Pt = (t, e) => {
2278
2290
  onClick: () => e.push(i()),
2279
2291
  disabled: B(
2280
2292
  e.disabled,
2281
- b ?? !1
2293
+ h ?? !1
2282
2294
  )(
2283
- (_, $) => _ || $
2295
+ ($, _) => $ || _
2284
2296
  )
2285
2297
  },
2286
2298
  P(
2287
2299
  W,
2288
- (_) => dt(
2300
+ ($) => dt(
2289
2301
  l.class("bc-group--gap-2"),
2290
2302
  U({ icon: "line-md:plus" }),
2291
- o ?? _.$.addLabel
2303
+ o ?? $.$.addLabel
2292
2304
  )
2293
2305
  )
2294
2306
  )
@@ -2297,7 +2309,7 @@ const Pt = (t, e) => {
2297
2309
  return z(
2298
2310
  Xe(
2299
2311
  e,
2300
- (_) => f(_)(s(_)),
2312
+ ($) => f($)(s($)),
2301
2313
  n
2302
2314
  ),
2303
2315
  w
@@ -2313,11 +2325,11 @@ const Pt = (t, e) => {
2313
2325
  createItem: o,
2314
2326
  addLabel: u,
2315
2327
  controlsLayout: d,
2316
- removeDisabled: b,
2317
- addDisabled: g,
2328
+ removeDisabled: h,
2329
+ addDisabled: b,
2318
2330
  ...f
2319
2331
  } = t;
2320
- return Wt(
2332
+ return Yt(
2321
2333
  {
2322
2334
  ...f,
2323
2335
  content: pn({
@@ -2330,8 +2342,8 @@ const Pt = (t, e) => {
2330
2342
  createItem: o,
2331
2343
  addLabel: u,
2332
2344
  controlsLayout: d,
2333
- removeDisabled: b,
2334
- addDisabled: g
2345
+ removeDisabled: h,
2346
+ addDisabled: b
2335
2347
  })
2336
2348
  },
2337
2349
  ...e
@@ -2345,35 +2357,35 @@ class Wn extends xt {
2345
2357
  constructor(e, s, n, r, c, a, i = rt) {
2346
2358
  super(e, s, n, r, c, i), this.branches = a;
2347
2359
  const o = (d) => {
2348
- for (const b of a)
2349
- if (b.detect(d))
2350
- return b.key;
2360
+ for (const h of a)
2361
+ if (h.detect(d))
2362
+ return h.key;
2351
2363
  return a[0]?.key ?? "unknown";
2352
2364
  };
2353
2365
  this.activeBranch = n.map(o, rt);
2354
2366
  const u = (d) => {
2355
2367
  if (this.#t.has(d))
2356
2368
  return this.#t.get(d);
2357
- const b = a.find((f) => f.key === d);
2358
- if (!b)
2369
+ const h = a.find((f) => f.key === d);
2370
+ if (!h)
2359
2371
  throw new Error(`Unknown branch: ${d}`);
2360
- const g = new xt(
2372
+ const b = new xt(
2361
2373
  [...e, d],
2362
2374
  (f) => {
2363
2375
  this.change(f);
2364
2376
  },
2365
2377
  this.signal.map(
2366
- (f) => b.detect(f) ? f : b.defaultValue(),
2378
+ (f) => h.detect(f) ? f : h.defaultValue(),
2367
2379
  i
2368
2380
  ),
2369
- r.map(Et([d])),
2381
+ r.map(Ut([d])),
2370
2382
  {
2371
2383
  disabled: this.disabled,
2372
2384
  validationMode: this.parent.validationMode
2373
2385
  },
2374
2386
  i
2375
2387
  );
2376
- return this.#t.set(d, g), g;
2388
+ return this.#t.set(d, b), b;
2377
2389
  };
2378
2390
  this.#e = this.activeBranch.map(
2379
2391
  (d) => u(d),
@@ -2408,7 +2420,7 @@ class Wn extends xt {
2408
2420
  (r) => s.detect(r) ? r : s.defaultValue(),
2409
2421
  rt
2410
2422
  ),
2411
- this.status.map(Et([e])),
2423
+ this.status.map(Ut([e])),
2412
2424
  {
2413
2425
  disabled: this.disabled,
2414
2426
  validationMode: this.parent.validationMode
@@ -2469,7 +2481,7 @@ export {
2469
2481
  we as $,
2470
2482
  En as A,
2471
2483
  pn as B,
2472
- kn as C,
2484
+ In as C,
2473
2485
  en as D,
2474
2486
  je as E,
2475
2487
  ze as F,
@@ -2479,7 +2491,7 @@ export {
2479
2491
  Nn as J,
2480
2492
  On as K,
2481
2493
  Hn as L,
2482
- Gt as M,
2494
+ Jt as M,
2483
2495
  Ze as N,
2484
2496
  Pn as O,
2485
2497
  un as P,
@@ -2490,7 +2502,7 @@ export {
2490
2502
  $t as U,
2491
2503
  Cn as V,
2492
2504
  an as W,
2493
- In as X,
2505
+ kn as X,
2494
2506
  He as Y,
2495
2507
  ve as Z,
2496
2508
  xe as _,
@@ -2500,24 +2512,24 @@ export {
2500
2512
  xn as a2,
2501
2513
  $e as a3,
2502
2514
  ye as a4,
2503
- ke as a5,
2504
- Yt as a6,
2505
- Ie as a7,
2515
+ Ie as a5,
2516
+ qt as a6,
2517
+ ke as a7,
2506
2518
  Mt as a8,
2507
2519
  Ce as a9,
2508
2520
  wt as aa,
2509
2521
  _t as ab,
2510
2522
  Me as ac,
2511
- De as ad,
2523
+ Se as ad,
2512
2524
  at as ae,
2513
2525
  lt as af,
2514
- Dt as ag,
2526
+ St as ag,
2515
2527
  _n as ah,
2516
2528
  wn as ai,
2517
- Zt as b,
2529
+ Xt as b,
2518
2530
  _e as c,
2519
2531
  cn as d,
2520
- Nt as e,
2532
+ Pt as e,
2521
2533
  Wn as f,
2522
2534
  Yn as g,
2523
2535
  Xn as h,
@@ -2529,8 +2541,8 @@ export {
2529
2541
  Ke as n,
2530
2542
  Xe as o,
2531
2543
  Ye as p,
2532
- Dn as q,
2533
- Sn as r,
2544
+ Sn as q,
2545
+ Dn as r,
2534
2546
  Tn as s,
2535
2547
  Zn as t,
2536
2548
  Fn as u,