@tempots/beatui 0.59.0 → 0.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/{2019-Dks2DDHw.cjs → 2019-CSG1mHKh.cjs} +1 -1
  2. package/dist/{2019-D8FDunSq.js → 2019-xRoq64Hq.js} +2 -2
  3. package/dist/{2020-Db2sT3RF.js → 2020-BxLJruSu.js} +2 -2
  4. package/dist/{2020-C8VDmyg1.cjs → 2020-CySfMcC9.cjs} +1 -1
  5. package/dist/{ar-x9O6JsRN.cjs → ar-B7Vs1jtG.cjs} +1 -1
  6. package/dist/{ar-CKheF7Rb.js → ar-BOqk-mzn.js} +1 -1
  7. package/dist/auth/index.cjs.js +1 -1
  8. package/dist/auth/index.es.js +4 -4
  9. package/dist/beatui.css +173 -0
  10. package/dist/beatui.tailwind.css +173 -0
  11. package/dist/{de-CqFnIl0Y.js → de-CviZ-p_4.js} +1 -1
  12. package/dist/{de-C0nhZh4a.cjs → de-DNjhUbYu.cjs} +1 -1
  13. package/dist/{es-C3c1-2iA.cjs → es-D82T2KKm.cjs} +1 -1
  14. package/dist/{es-Cv9ZSjqz.js → es-DxuZQTVE.js} +1 -1
  15. package/dist/{fa-CG8B9M9O.js → fa-BBySqLUh.js} +1 -1
  16. package/dist/{fa-BbV4_mYi.cjs → fa-C7eY3MZF.cjs} +1 -1
  17. package/dist/{fr-B2f1Pmal.js → fr-DBCblSme.js} +1 -1
  18. package/dist/{fr-DlFsnCqK.cjs → fr-DlXc2xhl.cjs} +1 -1
  19. package/dist/{he-DwQ2QMJE.cjs → he-1Czj0G0s.cjs} +1 -1
  20. package/dist/{he-BmHa696l.js → he-DUrHwGF6.js} +1 -1
  21. package/dist/{hi-DNII_Adz.js → hi-BdJqIhvL.js} +1 -1
  22. package/dist/{hi-DaHMe_1C.cjs → hi-DyWQTexo.cjs} +1 -1
  23. package/dist/{index-M6PBne67.js → index-B6myFAz5.js} +1 -1
  24. package/dist/{index-ZRQP8j2O.cjs → index-BLTlhUPG.cjs} +1 -1
  25. package/dist/{index-DjLKVVL-.cjs → index-CMIeO1pS.cjs} +1 -1
  26. package/dist/{index-BAa_FdQV.cjs → index-Cok4rljj.cjs} +2 -2
  27. package/dist/{index-DCOaDJ8f.js → index-D6_EcuJG.js} +1 -1
  28. package/dist/{index-C86Mq1ak.js → index-DGQhsTxm.js} +6 -6
  29. package/dist/{index-Do9WmZEc.cjs → index-Duw9TkLf.cjs} +1 -1
  30. package/dist/{index-BYflP18C.js → index-yhjOw19A.js} +3 -3
  31. package/dist/index.cjs.js +2 -2
  32. package/dist/index.es.js +10 -10
  33. package/dist/{it-894w7K0i.js → it-B7HY_G0n.js} +1 -1
  34. package/dist/{it-Cli1u40l.cjs → it-BhqBuhZq.cjs} +1 -1
  35. package/dist/{ja-DY7Zij7O.cjs → ja-Be1SXGQn.cjs} +1 -1
  36. package/dist/{ja-j4AV8eVy.js → ja-DavHeIBC.js} +1 -1
  37. package/dist/json-schema/index.cjs.js +1 -1
  38. package/dist/json-schema/index.es.js +1 -1
  39. package/dist/{ko-CNZqypvW.js → ko-Be3o52et.js} +1 -1
  40. package/dist/{ko-CHlprpVP.cjs → ko-BuyoVlmH.cjs} +1 -1
  41. package/dist/{modal-1Y-q1wDn.js → modal-BT2LwYlK.js} +2 -2
  42. package/dist/{modal-D765-SiT.cjs → modal-DT3cH1Kz.cjs} +1 -1
  43. package/dist/{nl-CzTp9ds0.js → nl-DJIY4R0b.js} +1 -1
  44. package/dist/{nl-CgMv4O0P.cjs → nl-FD8OAOWL.cjs} +1 -1
  45. package/dist/{notice-D8w_39td.cjs → notice-CUTUN2Kh.cjs} +1 -1
  46. package/dist/{notice-DJ-olOQx.js → notice-Cs95CTP3.js} +1 -1
  47. package/dist/{pl-DQid7ctL.js → pl-Bqoq63Fm.js} +1 -1
  48. package/dist/{pl-Cm8Lerxg.cjs → pl-weZLWcSD.cjs} +1 -1
  49. package/dist/prosemirror/index.cjs.js +1 -1
  50. package/dist/prosemirror/index.es.js +1 -1
  51. package/dist/{pt-BAU0nrtN.js → pt-7g4YVboz.js} +1 -1
  52. package/dist/{pt-k6sIkC0v.cjs → pt-BuBrXOmS.cjs} +1 -1
  53. package/dist/{ru-Dioznrt_.cjs → ru-Br9Wedcu.cjs} +1 -1
  54. package/dist/{ru-CtYj3NlJ.js → ru-hvj4lu1_.js} +1 -1
  55. package/dist/{toolbar-BMzapKW0.cjs → toolbar-Bk_vLHOS.cjs} +1 -1
  56. package/dist/{toolbar-Bo4GA6tM.js → toolbar-ReCF2tBa.js} +1 -1
  57. package/dist/{tr-CwCsfbe5.cjs → tr-BSuvz1N5.cjs} +1 -1
  58. package/dist/{tr-wS-zWzvh.js → tr-qxangEut.js} +1 -1
  59. package/dist/{translations-Dm7vjy7D.js → translations-BtsgtW4T.js} +1 -1
  60. package/dist/translations-CGTcEchB.cjs +1 -0
  61. package/dist/{translations-Do71ycSR.js → translations-D5WRSMhS.js} +245 -239
  62. package/dist/{translations-CD_Qi9EQ.cjs → translations-DmVvxPlr.cjs} +1 -1
  63. package/dist/types/components/button/button.d.ts +7 -1
  64. package/dist/types/components/form/input/files-input.d.ts +1 -1
  65. package/dist/{ur-8NSFWrMo.js → ur-CCcFf5OU.js} +1 -1
  66. package/dist/{ur-D3nkqfyQ.cjs → ur-DBg2MZvK.cjs} +1 -1
  67. package/dist/utils-3Mm1sj4Q.cjs +1 -0
  68. package/dist/{utils-byyCrT3S.js → utils-CutcxfzK.js} +963 -884
  69. package/dist/{vi-CngHpCNM.js → vi-BAHqe-lr.js} +1 -1
  70. package/dist/{vi-BAAJHs3a.cjs → vi-DeH8SXUt.cjs} +1 -1
  71. package/dist/{zh-Bkxc6ZmR.js → zh-B-ZsrhFY.js} +1 -1
  72. package/dist/{zh-CRWrZhUp.cjs → zh-Ceo_KGzC.cjs} +1 -1
  73. package/package.json +1 -1
  74. package/dist/translations-t-neYabN.cjs +0 -1
  75. package/dist/utils-sDRkbnf9.cjs +0 -1
@@ -1,27 +1,27 @@
1
- import { Use as H, Value as p, prop as tt, html as I, attr as l, on as C, WithElement as it, Empty as T, aria as z, bind as _t, computedOf as V, style as ft, OnDispose as X, When as E, NotEmpty as Qt, Fragment as L, ForEach as dt, svg as Tt, svgAttr as ht, emitValue as P, coalesce as Jt, Ensure as Kt, OneOfType as te, Repeat as Pt, signal as Ft, input as Q, emitValueAsNullableDate as ee, emitValueAsNullableDateTime as ne, emitValueAsNumber as Y, emit as se, Task as At } from "@tempots/dom";
2
- import { f as re } from "./colors-pQZlNrwM.js";
3
- import { g as ae } from "./timer-DzWb416P.js";
4
- import { ElementRect as jt, AutoSelect as le } from "@tempots/ui";
5
- import { a as W, b as O, f as oe, I as N, C as j, c as ce, d as $t, T as ie, g as ue, L as pe, e as Vt, h as fe, B as gt } from "./translations-Do71ycSR.js";
6
- import { C as yt, m as de, d as me, I as Ht, E as he, P as ge, S as ot, s as be, e as bt, O as rt, f as Bt } from "./notice-DJ-olOQx.js";
7
- function Wt(t) {
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";
2
+ import { f as ae } from "./colors-pQZlNrwM.js";
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-D5WRSMhS.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-Cs95CTP3.js";
7
+ function Zt(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);
11
11
  }
12
- function xe(t) {
12
+ function ve(t) {
13
13
  if (typeof t != "string") return !1;
14
14
  const e = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i, s = t.match(e);
15
15
  if (!s) return !1;
16
16
  const [, n, r, c] = s, a = parseInt(n, 10), i = parseInt(r, 10), o = parseInt(c, 10);
17
17
  return a >= 0 && a <= 255 && i >= 0 && i <= 255 && o >= 0 && o <= 255;
18
18
  }
19
- function ve(t) {
19
+ function xe(t) {
20
20
  if (typeof t != "string") return !1;
21
21
  const e = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0|1|0?\.\d+)\s*\)$/i, s = t.match(e);
22
22
  if (!s) return !1;
23
- const [, n, r, c, a] = s, i = parseInt(n, 10), o = parseInt(r, 10), u = parseInt(c, 10), f = parseFloat(a);
24
- return i >= 0 && i <= 255 && o >= 0 && o <= 255 && u >= 0 && u <= 255 && f >= 0 && f <= 1;
23
+ const [, n, r, c, a] = s, i = parseInt(n, 10), o = parseInt(r, 10), u = parseInt(c, 10), d = parseFloat(a);
24
+ return i >= 0 && i <= 255 && o >= 0 && o <= 255 && u >= 0 && u <= 255 && d >= 0 && d <= 1;
25
25
  }
26
26
  function we(t) {
27
27
  if (typeof t != "string") return !1;
@@ -30,22 +30,22 @@ function we(t) {
30
30
  const [, n, r, c] = s, a = parseInt(n, 10), i = parseInt(r, 10), o = parseInt(c, 10);
31
31
  return a >= 0 && a <= 360 && i >= 0 && i <= 100 && o >= 0 && o <= 100;
32
32
  }
33
- function xn(t) {
34
- return Wt(t) || xe(t) || ve(t) || we(t);
33
+ function vn(t) {
34
+ return Zt(t) || ve(t) || xe(t) || we(t);
35
35
  }
36
36
  function _e(t) {
37
- if (!Wt(t)) return null;
37
+ if (!Zt(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
  }
41
- function kt(t, e, s) {
41
+ function Ct(t, e, s) {
42
42
  const n = (r) => {
43
43
  const c = Math.round(Math.max(0, Math.min(255, r))).toString(16);
44
44
  return c.length === 1 ? "0" + c : c;
45
45
  };
46
46
  return `#${n(t)}${n(e)}${n(s)}`;
47
47
  }
48
- function ct(t) {
48
+ function it(t) {
49
49
  const e = _e(t);
50
50
  if (!e) return null;
51
51
  const s = /^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
@@ -55,12 +55,12 @@ function ct(t) {
55
55
  b: parseInt(s[3], 16)
56
56
  } : null;
57
57
  }
58
- function vn(t, e) {
59
- const s = ct(t), n = ct(e);
58
+ function xn(t, e) {
59
+ const s = it(t), n = it(e);
60
60
  if (!s || !n) return null;
61
- const r = (u, f, g) => {
62
- const [h, d, x] = [u, f, g].map((w) => (w = w / 255, w <= 0.03928 ? w / 12.92 : Math.pow((w + 0.055) / 1.055, 2.4)));
63
- return 0.2126 * h + 0.7152 * d + 0.0722 * x;
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;
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 f = parseInt(u.slice(0, 2), 16), g = parseInt(u.slice(2, 4), 16), h = parseInt(u.slice(4, 6), 16), d = parseInt(u.slice(6, 8), 16) / 255;
76
- return [f, g, h, d];
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];
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 f = parseInt(u[0] + u[0], 16), g = parseInt(u[1] + u[1], 16), h = parseInt(u[2] + u[2], 16), d = parseInt(u[3] + u[3], 16) / 255;
87
- return [f, g, h, d];
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];
88
88
  }
89
89
  if (u.length === 3) {
90
- const f = parseInt(u[0] + u[0], 16), g = parseInt(u[1] + u[1], 16), h = parseInt(u[2] + u[2], 16);
91
- return [f, g, h, 1];
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];
92
92
  }
93
93
  }
94
94
  const n = t.match(
@@ -110,24 +110,24 @@ 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]), f = parseFloat(c[2]), g = parseFloat(c[3]), h = c[4] != null ? parseFloat(c[4]) : 1, [d, x, w] = Zt(u, f / 100, g / 100);
114
- return [d, x, w, h];
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];
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]), f = parseFloat(a[2]) / 100, g = parseFloat(a[3]) / 100, h = a[4] != null ? parseFloat(a[4]) : 1, [d, x, w] = Ie(u, f, g);
121
- return [d, x, w, h];
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];
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], f = parseFloat(i[2]), g = parseFloat(i[3]), h = i[4] != null ? parseFloat(i[4]) : 1, d = u.endsWith("%") ? Math.max(0, Math.min(1, parseFloat(u) / 100)) : Math.max(0, Math.min(1, parseFloat(u))), [x, w, _] = Me(d, f, g);
128
- return [x, w, _, h];
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];
129
129
  }
130
- const o = ct(t);
130
+ const o = it(t);
131
131
  return o ? [o.r, o.g, o.b, 1] : [0, 0, 0, 1];
132
132
  }
133
133
  function ye(t, e, s, n) {
@@ -142,7 +142,7 @@ function ke(t) {
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 Zt(t, e, s) {
145
+ function Yt(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;
@@ -156,10 +156,10 @@ function Ie(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] = Zt(t, 1, 0.5).map((g) => g / 255), i = 1 - e - s, o = r * i + e, u = c * i + e, f = a * i + e;
160
- return [Math.round(o * 255), Math.round(u * 255), Math.round(f * 255)];
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;
160
+ return [Math.round(o * 255), Math.round(u * 255), Math.round(d * 255)];
161
161
  }
162
- function It(t, e, s) {
162
+ function Mt(t, e, s) {
163
163
  t /= 255, e /= 255, s /= 255;
164
164
  const n = Math.max(t, e, s), r = Math.min(t, e, s);
165
165
  let c = 0, a = 0;
@@ -180,25 +180,25 @@ function It(t, e, s) {
180
180
  return [Math.round(c), Math.round(a * 100), Math.round(i * 100)];
181
181
  }
182
182
  function Ce(t, e, s) {
183
- const [n] = It(t, e, s), r = t / 255, c = e / 255, a = s / 255, i = Math.min(r, c, a), o = 1 - Math.max(r, c, a);
183
+ const [n] = Mt(t, e, s), r = t / 255, c = e / 255, a = s / 255, i = Math.min(r, c, a), o = 1 - Math.max(r, c, a);
184
184
  return [n, Math.round(i * 100), Math.round(o * 100)];
185
185
  }
186
- function xt(t) {
186
+ function wt(t) {
187
187
  const e = t / 255;
188
188
  return e <= 0.04045 ? e / 12.92 : Math.pow((e + 0.055) / 1.055, 2.4);
189
189
  }
190
- function vt(t) {
190
+ function _t(t) {
191
191
  const e = t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 0.4166666666666667) - 0.055;
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, f = i * i * i, g = o * o * o, h = 4.0767416621 * u - 3.3077115913 * f + 0.2309699292 * g, d = -1.2684380046 * u + 2.6097574011 * f - 0.3413193965 * g, x = -0.0041960863 * u - 0.7034186147 * f + 1.707614701 * g;
196
- return [vt(h), vt(d), vt(x)];
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)];
197
197
  }
198
198
  function De(t, e, s) {
199
- const n = xt(t), r = xt(e), c = xt(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), f = Math.cbrt(i), g = Math.cbrt(o), h = 0.2104542553 * u + 0.793617785 * f - 0.0040720468 * g, d = 1.9779984951 * u - 2.428592205 * f + 0.4505937099 * g, x = 0.0259040371 * u + 0.7827717662 * f - 0.808675766 * g, w = Math.sqrt(d * d + x * x);
200
- let _ = Math.atan2(x, d) * 180 / Math.PI;
201
- return _ < 0 && (_ += 360), [h, w, _];
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, _, $];
202
202
  }
203
203
  function at(t, e, s, n, r, c) {
204
204
  switch (r) {
@@ -207,17 +207,17 @@ function at(t, e, s, n, r, c) {
207
207
  const a = (o) => o.toString(16).padStart(2, "0"), i = Math.max(0, Math.min(255, Math.round(n * 255)));
208
208
  return `#${a(t)}${a(e)}${a(s)}${a(i)}`;
209
209
  }
210
- return kt(t, e, s);
210
+ return Ct(t, e, s);
211
211
  case "rgb":
212
212
  return `rgb(${t}, ${e}, ${s})`;
213
213
  case "rgba":
214
214
  return `rgba(${t}, ${e}, ${s}, ${Math.round(n * 100) / 100})`;
215
215
  case "hsl": {
216
- const [a, i, o] = It(t, e, s);
216
+ const [a, i, o] = Mt(t, e, s);
217
217
  return `hsl(${a}, ${i}%, ${o}%)`;
218
218
  }
219
219
  case "hsla": {
220
- const [a, i, o] = It(t, e, s);
220
+ const [a, i, o] = Mt(t, e, s);
221
221
  return `hsla(${a}, ${i}%, ${o}%, ${Math.round(n * 100) / 100})`;
222
222
  }
223
223
  case "hwb": {
@@ -225,8 +225,8 @@ 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), f = (Math.round(i * 1e3) / 1e3).toFixed(3), g = (Math.round(o * 10) / 10).toFixed(1), h = Math.round(n * 100) / 100;
229
- return c || n < 1 ? `oklch(${u} ${f} ${g} / ${h})` : `oklch(${u} ${f} ${g})`;
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})`;
230
230
  }
231
231
  }
232
232
  }
@@ -247,7 +247,7 @@ const wn = (t) => Te(t).split("_").join(" "), Te = (t) => (t = t.replace(/::/g,
247
247
  "No implementation found for base64 decoding"
248
248
  );
249
249
  };
250
- function Lt({
250
+ function $t({
251
251
  onChange: t,
252
252
  value: e,
253
253
  accept: s = "*/*",
@@ -256,41 +256,41 @@ function Lt({
256
256
  disabled: c = !1,
257
257
  allowMultiple: a
258
258
  }) {
259
- return H(W, (i) => {
260
- const o = p.deriveProp(e ?? []), u = tt(!1), f = (b) => {
261
- b.preventDefault(), b.stopPropagation(), u.value = !0;
262
- }, g = (b) => {
263
- b.preventDefault(), b.stopPropagation(), (!b.currentTarget || !b.currentTarget.contains(b.relatedTarget)) && (u.value = !1);
264
- }, h = (b) => {
265
- b.preventDefault(), b.stopPropagation(), u.value = !1;
266
- const m = Array.from(b.dataTransfer?.files || []);
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 || []);
267
267
  m.length > 0 && (o.value = m, t(m, "dragdrop"));
268
- }, d = (b) => {
269
- p.get(n) && b.currentTarget.querySelector(
268
+ }, f = (x) => {
269
+ p.get(n) && x.currentTarget.querySelector(
270
270
  'input[type="file"]'
271
271
  )?.click();
272
272
  };
273
- let x = null;
274
- const w = () => {
275
- if (x == null) return;
276
- const b = Array.from(x.files ?? []);
277
- b.length > 0 && (o.value = b, t(b, "click")), x.value = "";
278
- }, _ = (b) => {
279
- p.get(n) && (b.key === "Enter" || b.key === " ") && (b.preventDefault(), d(b));
273
+ let w = null;
274
+ const _ = () => {
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));
280
280
  };
281
- return I.div(
281
+ return y.div(
282
282
  l.role("button"),
283
283
  l.tabindex(
284
- p.map(n, (b) => b ? 0 : -1)
284
+ p.map(n, (x) => x ? 0 : -1)
285
285
  ),
286
286
  l.style("position: relative;"),
287
- C.dragover(f),
288
- C.dragleave(g),
289
- C.drop(h),
290
- C.click(d),
291
- C.keydown(_),
287
+ I.dragover(d),
288
+ I.dragleave(b),
289
+ I.drop(g),
290
+ I.click(f),
291
+ I.keydown($),
292
292
  // Hidden file input
293
- I.input(
293
+ y.input(
294
294
  l.type("file"),
295
295
  l.disabled(c),
296
296
  l.accept(s),
@@ -298,17 +298,17 @@ function Lt({
298
298
  l.style(
299
299
  "position: absolute; left: -9999px; opacity: 0; pointer-events: none;"
300
300
  ),
301
- C.change(w),
302
- it((b) => (x = b, o.on((m) => {
301
+ I.change(_),
302
+ ut((x) => (w = x, o.on((m) => {
303
303
  const M = globalThis.DataTransfer;
304
304
  if (M != null) {
305
- const k = new M();
306
- m.forEach(($) => k.items.add($)), b.files = k.files;
305
+ const D = new M();
306
+ m.forEach((S) => D.items.add(S)), x.files = D.files;
307
307
  }
308
- }), T))
308
+ }), F))
309
309
  ),
310
310
  // Screen reader instructions
311
- z.label(_t(i.$.dropZoneInstructions)(n)),
311
+ R.label(ft(i.$.dropZoneInstructions)(n)),
312
312
  // Content
313
313
  r({ files: o, clear: () => o.value = [], change: o.set })
314
314
  );
@@ -328,72 +328,72 @@ function $n({
328
328
  size: n = "md",
329
329
  disabled: r = !1
330
330
  }, ...c) {
331
- const a = re(t).map(([i, o]) => ({
331
+ const a = ae(t).map(([i, o]) => ({
332
332
  key: i,
333
333
  label: o
334
334
  }));
335
- return it(() => {
335
+ return ut(() => {
336
336
  const i = Object.fromEntries(
337
- a.map((u, f) => [u.key, f])
337
+ a.map((u, d) => [u.key, d])
338
338
  ), o = tt(
339
339
  a.map(() => ({ left: 0, width: 0 })),
340
340
  Ae
341
341
  );
342
- return I.div(
342
+ return y.div(
343
343
  l.class(
344
- V(
344
+ B(
345
345
  n,
346
346
  r
347
347
  )(
348
- (u, f) => Ve(u ?? "md", f ?? !1)
348
+ (u, d) => Ve(u ?? "md", d ?? !1)
349
349
  )
350
350
  ),
351
- I.div(
351
+ y.div(
352
352
  l.class("bc-segmented-input__container"),
353
- I.div(
353
+ y.div(
354
354
  l.class("bc-segmented-input__indicator"),
355
- ft.width(
356
- V(
355
+ ht.width(
356
+ B(
357
357
  e,
358
358
  o
359
- )((u, f) => {
360
- const { width: g } = f[i[u] ?? 0];
361
- return `${g}px`;
359
+ )((u, d) => {
360
+ const { width: b } = d[i[u] ?? 0];
361
+ return `${b}px`;
362
362
  })
363
363
  ),
364
- ft.left(
365
- V(
364
+ ht.left(
365
+ B(
366
366
  e,
367
367
  o
368
- )((u, f) => {
369
- const { left: g } = f[i[u] ?? 0];
370
- return `${g}px`;
368
+ )((u, d) => {
369
+ const { left: b } = d[i[u] ?? 0];
370
+ return `${b}px`;
371
371
  })
372
372
  )
373
373
  ),
374
374
  // clickable buttons
375
- a.map(({ label: u, key: f }, g) => I.button(
375
+ a.map(({ label: u, key: d }, b) => y.button(
376
376
  l.type("button"),
377
- C.click((h) => {
378
- h.preventDefault(), p.get(r) || s?.(f);
377
+ I.click((g) => {
378
+ g.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, (h) => h === f ? "bc-segmented-input__segment--active" : "bc-segmented-input__segment--inactive")
383
+ p.map(e, (g) => g === d ? "bc-segmented-input__segment--active" : "bc-segmented-input__segment--inactive")
384
384
  ),
385
- jt((h) => {
386
- function d() {
387
- o.update((w) => {
388
- const _ = [...w];
389
- return _[g] = {
390
- width: h.value.width,
391
- left: h.value.localLeft
392
- }, _;
385
+ Ht((g) => {
386
+ function f() {
387
+ o.update((_) => {
388
+ const $ = [..._];
389
+ return $[b] = {
390
+ width: g.value.width,
391
+ left: g.value.localLeft
392
+ }, $;
393
393
  });
394
394
  }
395
- const x = ae(d);
396
- return X(x, h.on(d));
395
+ const w = le(f);
396
+ return X(w, g.on(f));
397
397
  }),
398
398
  u
399
399
  ))
@@ -410,8 +410,8 @@ function Le(t) {
410
410
  const e = t.type.toLowerCase();
411
411
  return e.startsWith("image/") ? "vscode-icons:file-type-image" : e.startsWith("video/") ? "vscode-icons:file-type-video" : e.startsWith("audio/") ? "vscode-icons:file-type-audio" : e.includes("pdf") ? "vscode-icons:file-type-pdf2" : e.includes("word") || e.includes("document") ? "vscode-icons:file-type-word" : e.includes("excel") || e.includes("spreadsheet") ? "vscode-icons:file-type-excel" : e.includes("powerpoint") || e.includes("presentation") ? "vscode-icons:file-type-powerpoint" : e.includes("zip") || e.includes("archive") ? "vscode-icons:file-type-zip" : e.includes("text") ? "vscode-icons:file-type-text" : e.includes("json") ? "vscode-icons:file-type-json-official" : e.includes("csv") ? "vscode-icons:file-type-csv" : e.includes("xml") ? "vscode-icons:file-type-xml" : e.includes("yaml") ? "vscode-icons:file-type-yaml-official" : "vscode-icons:file-type-binary";
412
412
  }
413
- function Et(t) {
414
- return E(
413
+ function yt(t) {
414
+ return L(
415
415
  t.map(Be),
416
416
  () => {
417
417
  const e = tt(null);
@@ -419,22 +419,22 @@ function Et(t) {
419
419
  e.value && URL.revokeObjectURL(e.value);
420
420
  const n = URL.createObjectURL(s);
421
421
  e.value = n;
422
- }), I.div(
422
+ }), y.div(
423
423
  X(() => {
424
424
  e.value && URL.revokeObjectURL(e.value);
425
425
  }),
426
426
  l.class("bc-file-input__thumbnail-container"),
427
- I.img(
427
+ y.img(
428
428
  l.src(e),
429
429
  l.alt(t.map((s) => s.name)),
430
430
  l.class("bc-file-input__thumbnail")
431
431
  )
432
432
  );
433
433
  },
434
- () => N({ icon: t.map(Le) })
434
+ () => U({ icon: t.map(Le) })
435
435
  );
436
436
  }
437
- const Ee = (t, ...e) => {
437
+ const ze = (t, ...e) => {
438
438
  const {
439
439
  value: s = tt([]),
440
440
  accept: n = "*/*",
@@ -444,194 +444,273 @@ const Ee = (t, ...e) => {
444
444
  onBlur: i,
445
445
  disabled: o,
446
446
  hasError: u,
447
- mode: f = "default",
448
- showFileList: g = !0,
449
- ...h
450
- } = t, d = s, x = p.map(f, (k) => k === "compact"), w = (k) => {
451
- let $ = k;
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;
452
452
  if (r != null) {
453
- const v = p.get(r);
454
- $ = $.slice(0, v);
453
+ const k = p.get(r);
454
+ h = h.slice(0, k);
455
455
  }
456
456
  if (c) {
457
- const v = p.get(c);
458
- $ = $.filter((y) => y.size <= v);
457
+ const k = p.get(c);
458
+ h = h.filter((T) => T.size <= k);
459
459
  }
460
- a?.($);
461
- }, _ = (k) => {
462
- const v = d.value.filter((y, D) => D !== k);
463
- a?.(v);
464
- }, b = () => {
460
+ a?.(h);
461
+ }, x = (v) => {
462
+ const k = f.value.filter((T, A) => A !== v);
463
+ a?.(k);
464
+ }, m = () => {
465
465
  a?.([]);
466
- }, m = ({
467
- files: k,
468
- clear: $,
469
- change: v
470
- }) => H(
466
+ }, M = ({
467
+ files: v,
468
+ clear: h,
469
+ change: k
470
+ }) => P(
471
471
  W,
472
- (y) => I.div(
472
+ (T) => y.div(
473
473
  l.class("bc-file-input__drop-zone"),
474
- I.div(
474
+ y.div(
475
475
  l.class(
476
476
  "bc-file-input__drop-zone-content bc-file-input__drop-zone-content--empty"
477
477
  ),
478
- N({ icon: "mdi:cloud-upload-outline", size: "xl" }),
479
- I.div(
478
+ U({ icon: "mdi:cloud-upload-outline", size: "xl" }),
479
+ y.div(
480
480
  l.class("bc-file-input__drop-zone-text"),
481
- _t(y.$.filesInputInstructions)(
481
+ ft(T.$.filesInputInstructions)(
482
482
  r,
483
483
  c,
484
- y.$.fileSizeUnits.value
484
+ T.$.fileSizeUnits.value
485
485
  )
486
486
  )
487
487
  )
488
488
  )
489
- ), M = ({
490
- files: k
491
- }) => H(
489
+ ), D = ({
490
+ files: v
491
+ }) => P(
492
492
  W,
493
- ($) => I.div(
493
+ (h) => y.div(
494
+ l.class("bc-file-input__compact-drop-zone"),
495
+ L(
496
+ v.map((k) => k.length > 0),
497
+ () => y.div(
498
+ l.class("bc-file-input__compact-file-list"),
499
+ ot(v, (k, T) => {
500
+ const A = T.index;
501
+ return y.div(
502
+ l.class("bc-file-input__compact-file-item"),
503
+ y.div(
504
+ l.class("bc-file-input__compact-file-icon"),
505
+ yt(k)
506
+ ),
507
+ y.div(
508
+ l.class("bc-file-input__compact-file-info"),
509
+ y.div(
510
+ l.class("bc-file-input__compact-file-name"),
511
+ l.title(k.$.name),
512
+ k.$.name
513
+ ),
514
+ y.div(
515
+ l.class("bc-file-input__compact-file-meta"),
516
+ B(
517
+ k.$.size,
518
+ h.$.fileSizeUnits
519
+ )((C, V) => Lt(C, { units: V })),
520
+ " • ",
521
+ B(
522
+ k.$.type,
523
+ h.$.unknownType
524
+ )((C, V) => C || V)
525
+ )
526
+ ),
527
+ mt(
528
+ {
529
+ size: "sm",
530
+ label: h.$.removeFile,
531
+ disabled: o,
532
+ onClick: () => x(A)
533
+ },
534
+ l.class("bc-file-input__compact-remove-button")
535
+ )
536
+ );
537
+ })
538
+ ),
539
+ () => y.div(
540
+ l.class("bc-file-input__compact-placeholder"),
541
+ U({ icon: "mdi:cloud-upload-outline", size: "lg" }),
542
+ y.div(
543
+ l.class("bc-file-input__compact-placeholder-text"),
544
+ ft(h.$.filesInputInstructions)(
545
+ r,
546
+ c,
547
+ h.$.fileSizeUnits.value
548
+ )
549
+ )
550
+ )
551
+ )
552
+ )
553
+ ), S = ({
554
+ files: v
555
+ }) => P(
556
+ W,
557
+ (h) => y.div(
494
558
  l.class("bc-file-input__compact-input"),
495
- E(
496
- k.map((v) => v.length > 0),
497
- () => I.span(
559
+ L(
560
+ v.map((k) => k.length > 0),
561
+ () => y.span(
498
562
  l.class("bc-file-input__compact-value"),
499
- dt(
500
- k,
501
- (v) => I.span(
563
+ ot(
564
+ v,
565
+ (k) => y.span(
502
566
  l.class("bc-file-input__compact-value-item"),
503
- Et(v),
504
- I.span(
567
+ yt(k),
568
+ y.span(
505
569
  l.class("bc-file-input__compact-value-item-name"),
506
- v.$.name
570
+ k.$.name
507
571
  )
508
572
  )
509
573
  )
510
574
  ),
511
- () => I.span(
575
+ () => y.span(
512
576
  l.class("bc-file-input__compact-placeholder"),
513
- N({ icon: "mdi:cloud-upload-outline", size: "md" }),
577
+ U({ icon: "mdi:cloud-upload-outline", size: "md" }),
514
578
  " ",
515
- _t($.$.filesInputInstructions)(
579
+ ft(h.$.filesInputInstructions)(
516
580
  r,
517
581
  c,
518
- $.$.fileSizeUnits.value
582
+ h.$.fileSizeUnits.value
519
583
  )
520
584
  )
521
585
  )
522
586
  )
523
587
  );
524
- return H(
588
+ return P(
525
589
  W,
526
- (k) => O(
590
+ (v) => O(
527
591
  {
528
- baseContainer: p.map(x, ($) => !$),
592
+ baseContainer: p.map(w, (h) => !h),
529
593
  disabled: o,
530
594
  hasError: u,
531
- after: E(
532
- x,
533
- () => E(
534
- d.map(({ length: $ }) => $ > 0),
535
- () => yt(
595
+ after: L(
596
+ w,
597
+ () => L(
598
+ f.map(({ length: h }) => h > 0),
599
+ () => mt(
536
600
  {
537
601
  size: "sm",
538
- label: k.$.clearAllFiles,
602
+ label: v.$.clearAllFiles,
539
603
  disabled: o,
540
- onClick: b
604
+ onClick: m
541
605
  },
542
606
  l.class("bc-file-input__compact-clear")
543
607
  )
544
608
  )
545
609
  ),
546
- ...h,
547
- input: E(
548
- x,
549
- () => I.div(
550
- l.class("bc-file-input bc-file-input--compact"),
551
- Lt({
552
- value: d,
610
+ ...g,
611
+ input: L(
612
+ w,
613
+ () => y.div(
614
+ l.class("bc-file-input bc-file-input--input"),
615
+ $t({
616
+ value: f,
553
617
  accept: n,
554
618
  enableClick: !0,
555
- allowMultiple: p.map(r ?? 1 / 0, ($) => $ > 1),
619
+ allowMultiple: p.map(r ?? 1 / 0, (h) => h > 1),
556
620
  disabled: o,
557
- onChange: w,
558
- content: M
621
+ onChange: $,
622
+ content: S
559
623
  })
560
624
  ),
561
- () => I.div(
562
- l.class("bc-file-input"),
563
- Lt({
564
- value: d,
565
- accept: n,
566
- enableClick: !0,
567
- allowMultiple: p.map(r ?? 1 / 0, ($) => $ > 1),
568
- disabled: o,
569
- onChange: w,
570
- content: m
571
- }),
572
- E(
573
- g,
574
- () => Qt(
575
- d,
576
- () => L(
577
- I.div(
578
- l.class("bc-file-input__file-list"),
579
- dt(d, ($, v) => {
580
- const y = v.index;
581
- return I.div(
582
- l.class("bc-file-input__file-item"),
583
- I.div(
584
- l.class("bc-file-input__file-icon"),
585
- Et($)
586
- ),
587
- I.div(
588
- l.class("bc-file-input__file-info"),
589
- I.div(
590
- l.class("bc-file-input__file-name"),
591
- l.title($.$.name),
592
- $.$.name
625
+ () => L(
626
+ _,
627
+ () => y.div(
628
+ l.class("bc-file-input bc-file-input--compact"),
629
+ $t({
630
+ value: f,
631
+ accept: n,
632
+ enableClick: !0,
633
+ allowMultiple: p.map(r ?? 1 / 0, (h) => h > 1),
634
+ disabled: o,
635
+ onChange: $,
636
+ content: D
637
+ })
638
+ ),
639
+ () => y.div(
640
+ l.class("bc-file-input"),
641
+ $t({
642
+ value: f,
643
+ accept: n,
644
+ enableClick: !0,
645
+ allowMultiple: p.map(r ?? 1 / 0, (h) => h > 1),
646
+ disabled: o,
647
+ onChange: $,
648
+ content: M
649
+ }),
650
+ L(
651
+ b,
652
+ () => Jt(
653
+ f,
654
+ () => z(
655
+ y.div(
656
+ l.class("bc-file-input__file-list"),
657
+ ot(f, (h, k) => {
658
+ const T = k.index;
659
+ return y.div(
660
+ l.class("bc-file-input__file-item"),
661
+ y.div(
662
+ l.class("bc-file-input__file-icon"),
663
+ yt(h)
593
664
  ),
594
- I.div(
595
- l.class("bc-file-input__file-meta"),
596
- V(
597
- $.$.size,
598
- k.$.fileSizeUnits
599
- )(
600
- (D, F) => oe(D, { units: F })
665
+ y.div(
666
+ l.class("bc-file-input__file-info"),
667
+ y.div(
668
+ l.class("bc-file-input__file-name"),
669
+ l.title(h.$.name),
670
+ h.$.name
601
671
  ),
602
- " • ",
603
- V(
604
- $.$.type,
605
- k.$.unknownType
606
- )((D, F) => D || F)
672
+ y.div(
673
+ l.class("bc-file-input__file-meta"),
674
+ B(
675
+ h.$.size,
676
+ v.$.fileSizeUnits
677
+ )(
678
+ (A, C) => Lt(A, { units: C })
679
+ ),
680
+ " • ",
681
+ B(
682
+ h.$.type,
683
+ v.$.unknownType
684
+ )((A, C) => A || C)
685
+ )
686
+ ),
687
+ mt(
688
+ {
689
+ size: "sm",
690
+ label: v.$.removeFile,
691
+ disabled: o,
692
+ onClick: () => x(T)
693
+ },
694
+ l.class("bc-file-input__remove-button")
607
695
  )
696
+ );
697
+ })
698
+ ),
699
+ L(
700
+ f.map(({ length: h }) => h > 1),
701
+ () => y.div(
702
+ l.class(
703
+ "bc-file-input__clear-all-button-container"
608
704
  ),
609
- yt(
610
- {
611
- size: "sm",
612
- label: k.$.removeFile,
613
- disabled: o,
614
- onClick: () => _(y)
615
- },
616
- l.class("bc-file-input__remove-button")
705
+ y.button(
706
+ l.type("button"),
707
+ l.class("bc-file-input__clear-all-button"),
708
+ l.disabled(o),
709
+ v.$.clearAllFiles,
710
+ I.click((h) => {
711
+ h.preventDefault(), h.stopPropagation(), m();
712
+ })
617
713
  )
618
- );
619
- })
620
- ),
621
- E(
622
- d.map(({ length: $ }) => $ > 1),
623
- () => I.div(
624
- l.class(
625
- "bc-file-input__clear-all-button-container"
626
- ),
627
- I.button(
628
- l.type("button"),
629
- l.class("bc-file-input__clear-all-button"),
630
- l.disabled(o),
631
- k.$.clearAllFiles,
632
- C.click(($) => {
633
- $.preventDefault(), $.stopPropagation(), b();
634
- })
635
714
  )
636
715
  )
637
716
  )
@@ -645,7 +724,7 @@ const Ee = (t, ...e) => {
645
724
  )
646
725
  );
647
726
  };
648
- async function Re(t) {
727
+ async function Ee(t) {
649
728
  return new Promise((e, s) => {
650
729
  const n = new FileReader();
651
730
  n.readAsDataURL(t), n.onload = () => {
@@ -654,8 +733,8 @@ async function Re(t) {
654
733
  }, n.onerror = (r) => s(r);
655
734
  });
656
735
  }
657
- function ze(t) {
658
- return Promise.all(t.map(Re));
736
+ function Re(t) {
737
+ return Promise.all(t.map(Ee));
659
738
  }
660
739
  function Ue(t) {
661
740
  if (t.length >= 4) {
@@ -684,20 +763,20 @@ function Oe(t) {
684
763
  onChange: s,
685
764
  onInput: n,
686
765
  ...r
687
- } = t, c = /* @__PURE__ */ new Map(), a = p.toSignal(e).map((f) => f.map((g, h) => {
688
- const d = c.get(g), x = Ne(g ?? ""), w = d?.type || Ue(x), _ = d?.name ?? `file-${h}`, b = x.buffer.slice(
689
- x.byteOffset,
690
- x.byteOffset + x.byteLength
691
- ), m = new Blob([b], { type: w });
692
- return new File([m], _, { type: w });
693
- })), i = (f) => (g) => {
694
- f && ze(g).then((h) => {
695
- for (const [d, x] of h.entries())
696
- c.set(x, { name: g[d].name, type: g[d].type });
697
- f(h);
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(
768
+ w.byteOffset,
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);
698
777
  });
699
778
  }, o = i(s), u = i(n);
700
- return Ee({
779
+ return ze({
701
780
  ...r,
702
781
  value: a,
703
782
  onChange: o,
@@ -725,117 +804,117 @@ function yn(t) {
725
804
  }
726
805
  function Pe(t, e) {
727
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 = [];
728
- for (let d = 0; d < i; d++) {
729
- const x = d / i * Math.PI * 2, w = e * (1 + (a() * 2 - 1) * o), _ = Math.cos(x) * w, b = Math.sin(x) * w;
730
- u.push({ x: _, y: b });
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 });
731
810
  }
732
- const f = (u[0].x + u[i - 1].x) / 2, g = (u[0].y + u[i - 1].y) / 2;
733
- let h = `M ${f.toFixed(3)} ${g.toFixed(3)}`;
734
- for (let d = 0; d < i; d++) {
735
- const x = u[d], w = u[(d + 1) % i], _ = (x.x + w.x) / 2, b = (x.y + w.y) / 2;
736
- h += ` Q ${x.x.toFixed(3)} ${x.y.toFixed(3)} ${_.toFixed(3)} ${b.toFixed(3)}`;
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)}`;
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)}`;
737
816
  }
738
- return h += " Z", h;
817
+ return g += " Z", g;
739
818
  }
740
819
  const kn = (t) => {
741
- 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")), f = p.map(
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(
742
821
  u,
743
- ([v, y, D]) => [v, y, D]
744
- ), g = p.map(u, ([, , , v]) => v), h = tt(p.get(g) ?? 1), d = p.map(i ?? !1, (v) => v), x = p.map(
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(
745
824
  t.colorTextFormat ?? "rgb",
746
825
  (v) => v
747
- ), w = V(
748
- f,
749
- h,
750
- x,
751
- d
826
+ ), _ = B(
827
+ d,
828
+ g,
829
+ w,
830
+ f
752
831
  )(
753
- ([v, y, D], F, A, S) => at(v, y, D, F ?? 1, lt(A, S), S)
754
- ), _ = p.map(
832
+ ([v, h, k], T, A, C) => at(v, h, k, T ?? 1, lt(A, C), C)
833
+ ), $ = p.map(
755
834
  t.colorTextFormat ?? "hex",
756
835
  (v) => v
757
- ), b = p.map(o, (v) => `${-v / 2} ${-v / 2} ${v} ${v}`), m = V(
758
- f,
836
+ ), x = p.map(o, (v) => `${-v / 2} ${-v / 2} ${v} ${v}`), m = B(
837
+ d,
759
838
  o
760
- )((v, y) => Pe(v, y / 2)), M = V(
761
- f,
762
- h,
763
- d
839
+ )((v, h) => Pe(v, h / 2)), M = B(
840
+ d,
841
+ g,
842
+ f
764
843
  )(
765
- ([v, y, D], F, A) => A || F < 1 ? ye(v, y, D, F) : kt(v, y, D)
766
- ), k = I.div(
844
+ ([v, h, k], T, A) => A || T < 1 ? ye(v, h, k, T) : Ct(v, h, k)
845
+ ), D = y.div(
767
846
  l.class("bc-color-swatch-input__control"),
768
847
  l.class(
769
848
  p.map(
770
- d,
849
+ f,
771
850
  (v) => v ? "bc-color-swatch-input__control--alpha" : ""
772
851
  )
773
852
  ),
774
853
  l.style(
775
- V(o)((v) => `min-width:${v + 2}px;height:${v + 2}px`)
854
+ B(o)((v) => `min-width:${v + 2}px;height:${v + 2}px`)
776
855
  ),
777
856
  // The SVG blob preview
778
- Tt.svg(
857
+ At.svg(
779
858
  l.class("bc-color-swatch-input__svg"),
780
- ht.viewBox(b),
781
- Tt.path(ht.d(m), ht.fill(M))
859
+ bt.viewBox(x),
860
+ At.path(bt.d(m), bt.fill(M))
782
861
  ),
783
862
  // Invisible native input overlays the blob for picker and accessibility
784
- I.input(
863
+ y.input(
785
864
  l.type("color"),
786
- j(t),
865
+ H(t),
787
866
  // Native color input needs hex without alpha
788
- l.value(p.map(f, ([v, y, D]) => kt(v, y, D))),
867
+ l.value(p.map(d, ([v, h, k]) => Ct(v, h, k))),
789
868
  l.class(
790
869
  "bc-input bc-color-swatch-input bc-color-swatch-input__native"
791
870
  ),
792
- s != null ? C.blur(s) : T,
793
- n != null ? C.change((v) => {
794
- const y = v.target.value;
871
+ s != null ? I.blur(s) : F,
872
+ n != null ? I.change((v) => {
873
+ const h = v.target.value;
795
874
  if (!n) return;
796
- const { r: D, g: F, b: A } = ct(y) ?? { r: 0, g: 0, b: 0 }, S = p.get(h) ?? 1, B = lt(
797
- p.get(_),
798
- p.get(d)
799
- ), U = at(D, F, A, S, B, p.get(d));
800
- n(U);
801
- }) : T,
802
- r != null ? C.input((v) => {
803
- const y = v.target.value;
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($),
877
+ p.get(f)
878
+ ), N = at(k, T, A, C, V, p.get(f));
879
+ n(N);
880
+ }) : F,
881
+ r != null ? I.input((v) => {
882
+ const h = v.target.value;
804
883
  if (!r) return;
805
- const { r: D, g: F, b: A } = ct(y) ?? { r: 0, g: 0, b: 0 }, S = p.get(h) ?? 1, B = lt(
806
- p.get(_),
807
- p.get(d)
808
- ), U = at(D, F, A, S, B, p.get(d));
809
- r(U);
810
- }) : T
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($),
886
+ p.get(f)
887
+ ), N = at(k, T, A, C, V, p.get(f));
888
+ r(N);
889
+ }) : F
811
890
  )
812
- ), $ = E(
813
- d,
814
- () => I.input(
891
+ ), S = L(
892
+ f,
893
+ () => y.input(
815
894
  l.type("range"),
816
895
  l.class("bc-color-swatch-input__alpha"),
817
896
  l.min(0),
818
897
  l.max(1),
819
898
  l.step(0.01),
820
- l.value(p.map(h, (v) => String(v ?? 1))),
899
+ l.value(p.map(g, (v) => String(v ?? 1))),
821
900
  l.disabled(t.disabled),
822
- C.input((v) => {
823
- const y = parseFloat(v.target.value);
824
- h.set(y);
825
- const [D, F, A] = p.get(f), S = lt(
826
- p.get(_),
827
- p.get(d)
828
- ), B = at(D, F, A, y, S, p.get(d));
829
- r?.(B);
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($),
906
+ p.get(f)
907
+ ), V = at(k, T, A, h, C, p.get(f));
908
+ r?.(V);
830
909
  }),
831
- C.change((v) => {
832
- const y = parseFloat(v.target.value);
833
- h.set(y);
834
- const [D, F, A] = p.get(f), S = lt(
835
- p.get(_),
836
- p.get(d)
837
- ), B = at(D, F, A, y, S, p.get(d));
838
- n?.(B);
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($),
915
+ p.get(f)
916
+ ), V = at(k, T, A, h, C, p.get(f));
917
+ n?.(V);
839
918
  })
840
919
  )
841
920
  );
@@ -844,27 +923,27 @@ const kn = (t) => {
844
923
  ...t,
845
924
  // ensure our control does not try to grow
846
925
  growInput: !1,
847
- input: k,
926
+ input: D,
848
927
  // If caller provided an `after`, append RGB before it
849
- after: L(
850
- E(
928
+ after: z(
929
+ L(
851
930
  c ?? !1,
852
- () => I.span(l.class("bc-color-swatch-input__rgb"), w)
931
+ () => y.span(l.class("bc-color-swatch-input__rgb"), _)
853
932
  ),
854
- $,
933
+ S,
855
934
  t.after
856
935
  )
857
936
  });
858
- }, Mt = "$$tts-exp-", je = (t, e) => it((s) => {
859
- const n = `${Mt}${t}`;
937
+ }, St = "$$tts-exp-", je = (t, e) => ut((s) => {
938
+ const n = `${St}${t}`;
860
939
  return X(p.on(e, (r) => Reflect.set(s, n, r)));
861
940
  }), In = (t, e) => {
862
- const s = `${Mt}${t}`;
941
+ const s = `${St}${t}`;
863
942
  return (n) => {
864
943
  e(Reflect.get(n.target, s));
865
944
  };
866
945
  }, He = (t, e) => {
867
- const s = `${Mt}${t}`;
946
+ const s = `${St}${t}`;
868
947
  return (n) => {
869
948
  const r = n.target, c = r.selectedIndex, a = r.options[c];
870
949
  e(Reflect.get(a, s));
@@ -875,9 +954,9 @@ function We(t, e, s) {
875
954
  return t !== "default" && n.push(`bc-card--${t}`), e !== "md" && n.push(`bc-card--padding-${e}`), s !== "lg" && n.push(`bc-card--rounded-${s}`), n.join(" ");
876
955
  }
877
956
  function Cn({ variant: t = "default", size: e = "md", roundedness: s = "lg" } = {}, ...n) {
878
- return I.div(
957
+ return y.div(
879
958
  l.class(
880
- V(
959
+ B(
881
960
  t,
882
961
  e,
883
962
  s
@@ -892,8 +971,8 @@ function Cn({ variant: t = "default", size: e = "md", roundedness: s = "lg" } =
892
971
  ...n
893
972
  );
894
973
  }
895
- function pt(...t) {
896
- return I.div(l.class("bc-group"), ...t);
974
+ function dt(...t) {
975
+ return y.div(l.class("bc-group"), ...t);
897
976
  }
898
977
  const Mn = ({
899
978
  startEditing: t,
@@ -903,7 +982,7 @@ const Mn = ({
903
982
  disabled: r
904
983
  }) => {
905
984
  const c = p.deriveProp(t ?? !1), a = tt(!1), i = p.map(r ?? !1, (o) => o);
906
- return I.div(
985
+ return y.div(
907
986
  l.class("bc-editable-text"),
908
987
  l.class(
909
988
  p.map(
@@ -911,19 +990,19 @@ const Mn = ({
911
990
  (o) => o ? "bc-editable-text--disabled" : ""
912
991
  )
913
992
  ),
914
- z.disabled(i),
915
- E(
993
+ R.disabled(i),
994
+ L(
916
995
  c,
917
- () => I.input(
996
+ () => y.input(
918
997
  l.placeholder(n),
919
998
  l.value(e),
920
999
  l.class("bc-editable-text__input"),
921
- le(),
922
- C.keydown((o) => {
1000
+ oe(),
1001
+ I.keydown((o) => {
923
1002
  o.key === "Enter" ? c.set(!1) : o.key === "Escape" && (a.set(!0), c.set(!1));
924
1003
  }),
925
- C.blur(
926
- P((o) => {
1004
+ I.blur(
1005
+ j((o) => {
927
1006
  if (c.set(!1), a.value) {
928
1007
  a.set(!1);
929
1008
  return;
@@ -932,58 +1011,58 @@ const Mn = ({
932
1011
  })
933
1012
  )
934
1013
  ),
935
- () => I.span(
936
- C.click(() => {
1014
+ () => y.span(
1015
+ I.click(() => {
937
1016
  p.get(i) || c.set(!0);
938
1017
  }),
939
1018
  l.class("bc-editable-text__display"),
940
- E(
1019
+ L(
941
1020
  p.map(e, (o) => o != null && o.trim() !== ""),
942
- () => I.span(l.class("bc-editable-text__text"), e),
943
- () => I.span(
1021
+ () => y.span(l.class("bc-editable-text__text"), e),
1022
+ () => y.span(
944
1023
  l.class("bc-editable-text__placeholder"),
945
1024
  n
946
1025
  )
947
1026
  ),
948
- E(
1027
+ L(
949
1028
  p.map(i, (o) => !o),
950
- () => I.button(
1029
+ () => y.button(
951
1030
  l.type("button"),
952
1031
  l.class("bc-editable-text__edit-button"),
953
- H(W, (o) => z.label(o.$.editLabel)),
954
- C.click(() => c.set(!0)),
955
- N({ icon: "line-md/pencil", color: "neutral" })
1032
+ P(W, (o) => R.label(o.$.editLabel)),
1033
+ I.click(() => c.set(!0)),
1034
+ U({ icon: "line-md/pencil", color: "neutral" })
956
1035
  )
957
1036
  )
958
1037
  )
959
1038
  )
960
1039
  );
961
- }, Yt = (t, e, s) => Kt(
1040
+ }, Xt = (t, e, s) => te(
962
1041
  t,
963
- (n) => te(n, {
1042
+ (n) => ee(n, {
964
1043
  value: (r) => {
965
- const c = V(
1044
+ const c = B(
966
1045
  r,
967
1046
  s
968
1047
  )((a, i) => e(a.value, i));
969
- return I.option(
1048
+ return y.option(
970
1049
  l.selected(c),
971
1050
  je("value", r.$.value),
972
1051
  r.$.label
973
1052
  );
974
1053
  },
975
- group: (r) => I.optgroup(
1054
+ group: (r) => y.optgroup(
976
1055
  l.label(r.$.group),
977
- dt(
1056
+ ot(
978
1057
  r.$.options,
979
- (c) => Yt(
1058
+ (c) => Xt(
980
1059
  c,
981
1060
  e,
982
1061
  s
983
1062
  )
984
1063
  )
985
1064
  ),
986
- break: () => I.hr()
1065
+ break: () => y.hr()
987
1066
  })
988
1067
  ), Ze = (t) => {
989
1068
  const {
@@ -992,14 +1071,14 @@ const Mn = ({
992
1071
  onChange: n,
993
1072
  options: r,
994
1073
  unselectedLabel: c,
995
- equality: a = (u, f) => u === f,
1074
+ equality: a = (u, d) => u === d,
996
1075
  after: i
997
1076
  } = t;
998
1077
  let o;
999
1078
  return O(
1000
1079
  {
1001
1080
  ...t,
1002
- after: L(
1081
+ after: z(
1003
1082
  ce({
1004
1083
  icon: "ph:caret-down-bold",
1005
1084
  color: "neutral",
@@ -1007,30 +1086,30 @@ const Mn = ({
1007
1086
  }),
1008
1087
  i
1009
1088
  ),
1010
- input: I.select(
1011
- it((u) => {
1089
+ input: y.select(
1090
+ ut((u) => {
1012
1091
  o = u;
1013
- const f = new MutationObserver((g) => {
1014
- const { removedNodes: h } = g[0];
1015
- h.length > 0 && (o.selectedIndex = 0);
1092
+ const d = new MutationObserver((b) => {
1093
+ const { removedNodes: g } = b[0];
1094
+ g.length > 0 && (o.selectedIndex = 0);
1016
1095
  });
1017
- return f.observe(u, { childList: !0 }), X(() => f.disconnect());
1096
+ return d.observe(u, { childList: !0 }), X(() => d.disconnect());
1018
1097
  }),
1019
- j(t),
1098
+ H(t),
1020
1099
  l.class("bc-native-select bc-input"),
1021
- H(
1100
+ P(
1022
1101
  W,
1023
- (u) => I.option(
1102
+ (u) => y.option(
1024
1103
  l.hidden("hidden"),
1025
- Jt(c, u.$.selectOne)
1104
+ Kt(c, u.$.selectOne)
1026
1105
  )
1027
1106
  ),
1028
- dt(r, (u) => Yt(u, a, e)),
1029
- s != null ? C.blur(s) : T,
1030
- n != null ? C.change(He("value", (u) => n(u))) : T
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
1031
1110
  )
1032
1111
  },
1033
- C.click(() => {
1112
+ I.click(() => {
1034
1113
  o?.focus(), typeof o?.showPicker == "function" && o.showPicker();
1035
1114
  })
1036
1115
  );
@@ -1041,23 +1120,23 @@ function Ye(t) {
1041
1120
  ...r,
1042
1121
  value: e.signal,
1043
1122
  onChange: me(e, s),
1044
- onBlur: de(e, n)
1123
+ onBlur: fe(e, n)
1045
1124
  });
1046
1125
  }
1047
1126
  function Dn(t) {
1048
- return Ht({
1127
+ return Wt({
1049
1128
  ...t,
1050
1129
  content: Ye(t)
1051
1130
  });
1052
1131
  }
1053
1132
  function Xe(t, e, s) {
1054
1133
  const n = t.length.map((r) => r);
1055
- return L(
1056
- Pt(
1134
+ return z(
1135
+ jt(
1057
1136
  n,
1058
1137
  (r) => {
1059
1138
  const c = t.item(r.index), a = [];
1060
- return L(
1139
+ return z(
1061
1140
  X(() => {
1062
1141
  a.forEach((i) => i());
1063
1142
  }),
@@ -1087,7 +1166,7 @@ function Xe(t, e, s) {
1087
1166
  const o = (() => {
1088
1167
  switch (i) {
1089
1168
  case "up":
1090
- return Ft(r.index > 0);
1169
+ return Vt(r.index > 0);
1091
1170
  case "down":
1092
1171
  return t.length.map((u) => r.index < u - 1);
1093
1172
  }
@@ -1098,7 +1177,7 @@ function Xe(t, e, s) {
1098
1177
  const o = (() => {
1099
1178
  switch (i) {
1100
1179
  case "up":
1101
- return Ft(r.index === 0);
1180
+ return Vt(r.index === 0);
1102
1181
  case "down":
1103
1182
  return t.length.map((u) => r.index === u - 1);
1104
1183
  }
@@ -1117,7 +1196,7 @@ const Rt = {
1117
1196
  A: { pattern: /^[A-Za-z]$/, transform: (t) => t.toUpperCase() },
1118
1197
  "*": { pattern: /^.$/ }
1119
1198
  }, qe = (t) => t instanceof RegExp;
1120
- function Xt(t, e, s) {
1199
+ function qt(t, e, s) {
1121
1200
  if (t == null) return [];
1122
1201
  const n = s ? { ...Rt, ...e } : e ?? Rt, r = (a, i) => {
1123
1202
  const o = n[i];
@@ -1150,64 +1229,64 @@ function Ge(t, e) {
1150
1229
  }
1151
1230
  };
1152
1231
  }
1153
- function zt(t, e, s, n, r, c) {
1232
+ function Ut(t, e, s, n, r, c) {
1154
1233
  const a = {
1155
1234
  raw: t,
1156
1235
  previousConformed: e,
1157
1236
  cursor: r ?? t.length,
1158
1237
  completed: !1
1159
- }, i = n.definitions ?? {}, o = typeof s == "function" ? s(t, a) : s, u = Xt(
1238
+ }, i = n.definitions ?? {}, o = typeof s == "function" ? s(t, a) : s, u = qt(
1160
1239
  o,
1161
1240
  i,
1162
1241
  n.useDefaultDefinitions ?? !0
1163
- ), f = Ge(n.allowMode, n.allow), g = /* @__PURE__ */ new Set();
1164
- for (const S of u) S.type === "literal" && g.add(S.char);
1165
- if (n.prefix) for (const S of n.prefix) g.add(S);
1166
- if (n.suffix) for (const S of n.suffix) g.add(S);
1167
- const h = Array.from(t).filter((S) => f(S) && !g.has(S));
1168
- if (h.length === 0) return { value: "", cursor: 0, completed: !1 };
1169
- const d = [], x = [];
1170
- let w = 0, _ = 0, b = 0, m = -1;
1171
- for (const S of u) {
1172
- if (S.type === "literal") {
1173
- d.push(S.char), x.push({ kind: "literal", filled: !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 };
1248
+ const f = [], w = [];
1249
+ let _ = 0, $ = 0, x = 0, m = -1;
1250
+ for (const C of u) {
1251
+ if (C.type === "literal") {
1252
+ f.push(C.char), w.push({ kind: "literal", filled: !0 });
1174
1253
  continue;
1175
1254
  }
1176
- _ += S.optional ? 0 : 1;
1177
- const B = h[w];
1178
- if (B == null)
1255
+ $ += C.optional ? 0 : 1;
1256
+ const V = g[_];
1257
+ if (V == null)
1179
1258
  break;
1180
- if (S.type === "any") {
1181
- b++, d.push(S.transform ? S.transform(B) : B), x.push({ kind: "slot", filled: !0 }), m = x.length - 1, w++;
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, _++;
1182
1261
  continue;
1183
1262
  }
1184
- if (S.type === "pattern")
1185
- if (S.pattern.test(B)) {
1186
- b++;
1187
- const U = S.transform ? S.transform(B) : B;
1188
- d.push(U), x.push({ kind: "slot", filled: !0 }), m = x.length - 1, w++;
1263
+ if (C.type === "pattern")
1264
+ if (C.pattern.test(V)) {
1265
+ x++;
1266
+ const N = C.transform ? C.transform(V) : V;
1267
+ f.push(N), w.push({ kind: "slot", filled: !0 }), m = w.length - 1, _++;
1189
1268
  } else {
1190
- w++;
1269
+ _++;
1191
1270
  continue;
1192
1271
  }
1193
1272
  }
1194
- const M = d.join(""), k = (n.prefix ?? "") + M + (n.suffix ?? "");
1273
+ const M = f.join(""), D = (n.prefix ?? "") + M + (n.suffix ?? "");
1195
1274
  let v = (n.prefix ?? "").length;
1196
1275
  if (m >= 0) {
1197
- let S = m + 1;
1276
+ let C = m + 1;
1198
1277
  if ((c?.policy ?? "smart") !== "sticky")
1199
- for (; S < x.length && x[S].kind === "literal"; ) S++;
1200
- v += S;
1278
+ for (; C < w.length && w[C].kind === "literal"; ) C++;
1279
+ v += C;
1201
1280
  }
1202
- const y = n.completion?.mode === "min" ? (n.completion.minChars ?? 0) <= b : n.completion?.mode === "custom" ? !!n.completion.isComplete?.(k) : _ > 0 && b >= _, D = n.pipe?.(k, { ...a, completed: y });
1203
- let F, A = v;
1204
- return D === !1 ? (F = e, A = e.length) : typeof D == "string" ? (F = D, A = D.length) : typeof D == "object" && D ? (F = D.value, A = D.cursor ?? D.value.length) : F = k, { value: F, cursor: A, completed: y };
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 };
1205
1284
  }
1206
1285
  function Qe(t, e) {
1207
1286
  const s = e?.strategy ?? "none";
1208
1287
  return s === "custom" && e?.unmask ? e.unmask(t) : s === "strip" ? t.replace(/[^A-Za-z0-9]/g, "") : t;
1209
1288
  }
1210
- const qt = (t) => {
1289
+ const Gt = (t) => {
1211
1290
  const {
1212
1291
  value: e,
1213
1292
  onBlur: s,
@@ -1218,141 +1297,141 @@ const qt = (t) => {
1218
1297
  mask: i,
1219
1298
  definitions: o,
1220
1299
  useDefaultDefinitions: u,
1221
- extraLiterals: f,
1222
- prefix: g,
1223
- suffix: h,
1224
- autofix: d,
1225
- pipe: x,
1226
- completion: w,
1227
- unmask: _,
1228
- allowMode: b,
1300
+ extraLiterals: d,
1301
+ prefix: b,
1302
+ suffix: g,
1303
+ autofix: f,
1304
+ pipe: w,
1305
+ completion: _,
1306
+ unmask: $,
1307
+ allowMode: x,
1229
1308
  allow: m,
1230
1309
  placeholder: M,
1231
- placeholderOptions: k
1232
- } = t, $ = V(
1310
+ placeholderOptions: D
1311
+ } = t, S = B(
1233
1312
  e,
1234
1313
  i,
1235
1314
  o,
1236
1315
  u,
1237
- f,
1238
- g,
1239
- h,
1240
1316
  d,
1241
- w,
1242
- _,
1243
1317
  b,
1318
+ g,
1319
+ f,
1320
+ _,
1321
+ $,
1322
+ x,
1244
1323
  M,
1245
- k
1246
- )((y, D, F, A, S, B, U, nt, st, K, q, ut, Z) => D ? zt(y ?? "", "", D, {
1247
- definitions: F ?? {},
1324
+ D
1325
+ )((h, k, T, A, C, V, N, nt, st, K, q, pt, Z) => k ? Ut(h ?? "", "", k, {
1326
+ definitions: T ?? {},
1248
1327
  useDefaultDefinitions: A ?? !0,
1249
- extraLiterals: S ?? [],
1328
+ extraLiterals: C ?? [],
1250
1329
  autofix: nt ?? "none",
1251
1330
  completion: st ?? { mode: "mask" },
1252
- pipe: x ?? ((R) => R),
1331
+ pipe: w ?? ((E) => E),
1253
1332
  unmask: K ?? { strategy: "none" },
1254
1333
  allowMode: q ?? "all",
1255
1334
  allow: m,
1256
- prefix: B,
1257
- suffix: U
1258
- }).value : y ?? ""), v = (y, D) => {
1259
- const F = y.value ?? "", A = p.get(e) ?? "", S = i != null ? p.get(i) : null, B = o != null ? p.get(o) : void 0, U = u != null ? p.get(u) : void 0, nt = f != null ? p.get(f) : void 0, st = d != null ? p.get(d) : void 0, K = w != null ? p.get(w) : void 0, q = _ != null ? p.get(_) : void 0, ut = b != null ? p.get(b) : void 0, Z = g != null ? p.get(g) : void 0, R = h != null ? p.get(h) : void 0, {
1335
+ prefix: V,
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, {
1260
1339
  value: G,
1261
- cursor: mt,
1262
- completed: Dt
1263
- } = S ? zt(
1264
- F,
1340
+ cursor: gt,
1341
+ completed: Tt
1342
+ } = C ? Ut(
1343
+ T,
1265
1344
  A,
1266
- S,
1345
+ C,
1267
1346
  {
1268
- definitions: B ?? {},
1269
- useDefaultDefinitions: U ?? !0,
1347
+ definitions: V ?? {},
1348
+ useDefaultDefinitions: N ?? !0,
1270
1349
  extraLiterals: nt ?? [],
1271
1350
  autofix: st ?? "none",
1272
1351
  completion: K ?? { mode: "mask" },
1273
- pipe: x ?? ((Gt) => Gt),
1352
+ pipe: w ?? ((Qt) => Qt),
1274
1353
  unmask: q ?? { strategy: "none" },
1275
- allowMode: ut ?? "all",
1354
+ allowMode: pt ?? "all",
1276
1355
  allow: m,
1277
1356
  prefix: Z,
1278
- suffix: R
1357
+ suffix: E
1279
1358
  },
1280
- y.selectionStart ?? F.length,
1359
+ h.selectionStart ?? T.length,
1281
1360
  t.cursor ? p.get(t.cursor) : void 0
1282
- ) : { value: F, cursor: F.length, completed: !0 };
1283
- if (G !== F) {
1284
- y.value = G;
1361
+ ) : { value: T, cursor: T.length, completed: !0 };
1362
+ if (G !== T) {
1363
+ h.value = G;
1285
1364
  try {
1286
- y.setSelectionRange(mt, mt);
1365
+ h.setSelectionRange(gt, gt);
1287
1366
  } catch {
1288
1367
  }
1289
1368
  }
1290
- const St = Qe(G, q);
1369
+ const Ft = Qe(G, q);
1291
1370
  c?.({
1292
- raw: St,
1371
+ raw: Ft,
1293
1372
  conformed: G,
1294
- completed: Dt,
1295
- cursor: mt
1296
- }), D === "input" ? r?.(G) : (n?.(G), Dt && a?.({ raw: St, conformed: G }));
1373
+ completed: Tt,
1374
+ cursor: gt
1375
+ }), k === "input" ? r?.(G) : (n?.(G), Tt && a?.({ raw: Ft, conformed: G }));
1297
1376
  };
1298
- return L(
1377
+ return z(
1299
1378
  O({
1300
1379
  ...t,
1301
1380
  input: Q.text(
1302
- j(t),
1303
- l.value($),
1381
+ H(t),
1382
+ l.value(S),
1304
1383
  l.class("bc-input"),
1305
- s != null ? C.blur(s) : T,
1306
- it(
1307
- (y) => y instanceof HTMLInputElement ? L(
1308
- C.input(() => v(y, "input")),
1309
- C.change(() => v(y, "change")),
1310
- C.keydown((D) => {
1311
- if (D.key !== "Backspace" || !(t.cursor ? p.get(t.cursor)?.backspaceRubberBand ?? !0 : !0)) return;
1312
- const A = y.selectionStart ?? 0, S = y.selectionEnd ?? A;
1313
- if (A !== S || A <= 0) return;
1314
- const B = y.value ?? "", U = i != null ? p.get(i) : null;
1315
- if (!U) return;
1316
- const nt = o != null ? p.get(o) : void 0, st = u != null ? p.get(u) : !0, K = g != null ? p.get(g) : void 0, q = h != null ? p.get(h) : void 0, ut = Xt(
1317
- typeof U == "function" ? U(B, {
1318
- raw: B,
1319
- previousConformed: B,
1384
+ s != null ? I.blur(s) : F,
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;
1392
+ if (A !== C || A <= 0) return;
1393
+ const V = h.value ?? "", N = i != null ? p.get(i) : null;
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(
1396
+ typeof N == "function" ? N(V, {
1397
+ raw: V,
1398
+ previousConformed: V,
1320
1399
  cursor: A,
1321
1400
  completed: !1
1322
- }) : U,
1401
+ }) : N,
1323
1402
  nt ?? {},
1324
1403
  st ?? !0
1325
1404
  ), Z = /* @__PURE__ */ new Set();
1326
- for (const R of ut)
1327
- R.type === "literal" && Z.add(R.char);
1328
- if (K) for (const R of K) Z.add(R);
1329
- if (q) for (const R of q) Z.add(R);
1330
- if (Z.has(B[A - 1])) {
1331
- let R = A - 1;
1332
- for (; R >= 0 && Z.has(B[R]); ) R--;
1333
- R >= 0 && (D.preventDefault(), D.stopPropagation(), y.value = B.slice(0, R) + B.slice(R + 1), v(y, "input"));
1405
+ for (const E of pt)
1406
+ E.type === "literal" && Z.add(E.char);
1407
+ if (K) for (const E of K) Z.add(E);
1408
+ if (q) for (const E of q) Z.add(E);
1409
+ if (Z.has(V[A - 1])) {
1410
+ let E = A - 1;
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"));
1334
1413
  }
1335
1414
  })
1336
- ) : T
1415
+ ) : F
1337
1416
  )
1338
1417
  )
1339
1418
  })
1340
1419
  );
1341
1420
  };
1342
1421
  function J(t, e, s) {
1343
- const n = p.map(t, (c) => c != null), r = $t.clearValue;
1344
- return L(
1422
+ const n = p.map(t, (c) => c != null), r = It.clearValue;
1423
+ return z(
1345
1424
  X(() => p.dispose(n)),
1346
- E(
1425
+ L(
1347
1426
  n,
1348
- () => I.button(
1427
+ () => y.button(
1349
1428
  l.type("button"),
1350
1429
  l.class("bc-input-container__reset"),
1351
- z.label(r),
1430
+ R.label(r),
1352
1431
  l.title(r),
1353
1432
  l.disabled(e ?? !1),
1354
- N({ icon: "mdi:close", size: "sm" }),
1355
- C.click((c) => {
1433
+ U({ icon: "mdi:close", size: "sm" }),
1434
+ I.click((c) => {
1356
1435
  c.preventDefault(), c.stopPropagation(), s?.(null);
1357
1436
  })
1358
1437
  )
@@ -1364,13 +1443,13 @@ const Sn = (t) => {
1364
1443
  return O({
1365
1444
  ...t,
1366
1445
  input: Q.date(
1367
- j(t),
1446
+ H(t),
1368
1447
  l.valueAsDate(e),
1369
1448
  l.class("bc-input"),
1370
- s != null ? C.blur(P(s)) : T,
1371
- n != null ? C.change(ee(n)) : T
1449
+ s != null ? I.blur(j(s)) : F,
1450
+ n != null ? I.change(ne(n)) : F
1372
1451
  ),
1373
- after: r != null ? L(a, r) : a
1452
+ after: r != null ? z(a, r) : a
1374
1453
  });
1375
1454
  }, Je = (t) => {
1376
1455
  const e = t.getFullYear(), s = t.getMonth() + 1, n = t.getDate(), r = t.getHours(), c = t.getMinutes(), a = t.getSeconds();
@@ -1380,15 +1459,15 @@ const Sn = (t) => {
1380
1459
  return O({
1381
1460
  ...t,
1382
1461
  input: Q["datetime-local"](
1383
- j(t),
1462
+ H(t),
1384
1463
  l.value(p.map(a, (o) => o ?? null)),
1385
1464
  l.class("bc-input"),
1386
- s != null ? C.blur(P(s)) : T,
1387
- n != null ? C.change(ne(n)) : T
1465
+ s != null ? I.blur(j(s)) : F,
1466
+ n != null ? I.change(se(n)) : F
1388
1467
  ),
1389
- after: r != null ? L(i, r) : i
1468
+ after: r != null ? z(i, r) : i
1390
1469
  });
1391
- }, Ut = (t) => typeof t == "string" && t.trim() === "" ? null : t, Ke = (t) => t ?? "";
1470
+ }, Nt = (t) => typeof t == "string" && t.trim() === "" ? null : t, Ke = (t) => t ?? "";
1392
1471
  function et(t) {
1393
1472
  return (e) => {
1394
1473
  const { value: s, onBlur: n, onChange: r, onInput: c, after: a, disabled: i, ...o } = e, u = J(s, i, r);
@@ -1396,10 +1475,10 @@ function et(t) {
1396
1475
  ...o,
1397
1476
  disabled: i,
1398
1477
  value: p.map(s, Ke),
1399
- onChange: r != null ? (f) => r(Ut(f)) : void 0,
1400
- onInput: c != null ? (f) => c(Ut(f)) : void 0,
1478
+ onChange: r != null ? (d) => r(Nt(d)) : void 0,
1479
+ onInput: c != null ? (d) => c(Nt(d)) : void 0,
1401
1480
  onBlur: n,
1402
- after: a != null ? L(u, a) : u
1481
+ after: a != null ? z(u, a) : u
1403
1482
  });
1404
1483
  };
1405
1484
  }
@@ -1408,225 +1487,225 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1408
1487
  return O({
1409
1488
  baseContainer: !0,
1410
1489
  ...t,
1411
- input: I.textarea(
1490
+ input: y.textarea(
1412
1491
  l.class(
1413
- V(t.size ?? "md")(
1492
+ B(t.size ?? "md")(
1414
1493
  (a) => ue(
1415
1494
  !1,
1416
1495
  a ?? "md"
1417
1496
  )
1418
1497
  )
1419
1498
  ),
1420
- j(t),
1499
+ H(t),
1421
1500
  l.rows(c ?? 3),
1422
1501
  l.value(e),
1423
1502
  l.class("bc-input"),
1424
- s != null ? C.blur(P(s)) : T,
1425
- n != null ? C.change(P(n)) : T,
1426
- r != null ? C.input(P(r)) : T
1503
+ s != null ? I.blur(j(s)) : F,
1504
+ n != null ? I.change(j(n)) : F,
1505
+ r != null ? I.input(j(r)) : F
1427
1506
  )
1428
1507
  });
1429
1508
  }, Bn = et(
1430
1509
  tn
1431
1510
  ), Ln = (t) => {
1432
- const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i, after: o } = t, u = (h) => {
1433
- const d = n != null ? p.get(n) : void 0, x = r != null ? p.get(r) : void 0;
1434
- return d != null && h < d ? d : x != null && h > x ? x : h;
1435
- }, f = s != null ? H(W, (h) => {
1436
- const d = V(
1511
+ const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i, after: o } = t, u = (g) => {
1512
+ 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) => {
1515
+ const f = B(
1437
1516
  e,
1438
1517
  n
1439
- )((b, m) => m == null ? !0 : (b ?? 0) > m), x = V(
1518
+ )((x, m) => m == null ? !0 : (x ?? 0) > m), w = B(
1440
1519
  e,
1441
1520
  r
1442
- )((b, m) => m == null ? !0 : (b ?? 0) < m), w = (b) => {
1443
- const m = p.get(e) ?? 0, M = p.get(s), k = b?.shiftKey ? 10 : 1, $ = m - M * k, v = n != null ? p.get(n) : void 0;
1444
- if (v != null && $ < v)
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)
1445
1524
  return;
1446
- const y = u($);
1447
- y !== m && a && a(y);
1448
- }, _ = (b) => {
1449
- const m = p.get(e) ?? 0, M = p.get(s), k = b?.shiftKey ? 10 : 1, $ = m + M * k, v = r != null ? p.get(r) : void 0;
1450
- if (v != null && $ > v)
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)
1451
1530
  return;
1452
- const y = u($);
1453
- y !== m && a && a(y);
1531
+ const h = u(S);
1532
+ h !== m && a && a(h);
1454
1533
  };
1455
- return ot(
1534
+ return ct(
1456
1535
  l.class("bc-number-input-steppers"),
1457
1536
  // Increment second
1458
- I.button(
1537
+ y.button(
1459
1538
  l.type("button"),
1460
1539
  l.class(
1461
1540
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
1462
1541
  ),
1463
1542
  l.disabled(
1464
- V(
1465
- x,
1543
+ B(
1544
+ w,
1466
1545
  t.disabled ?? !1
1467
- )((b, m) => !b || m)
1546
+ )((x, m) => !x || m)
1468
1547
  ),
1469
- C.click((b) => _(b)),
1470
- z.label(h.$.incrementValue),
1471
- N({ icon: "line-md:plus", size: "xs" })
1548
+ I.click((x) => $(x)),
1549
+ R.label(g.$.incrementValue),
1550
+ U({ icon: "line-md:plus", size: "xs" })
1472
1551
  ),
1473
1552
  // Decrement first (matches tests expecting first button to be decrement)
1474
- I.button(
1553
+ y.button(
1475
1554
  l.type("button"),
1476
1555
  l.class(
1477
1556
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
1478
1557
  ),
1479
1558
  l.disabled(
1480
- V(
1481
- d,
1559
+ B(
1560
+ f,
1482
1561
  t.disabled ?? !1
1483
- )((b, m) => !b || m)
1562
+ )((x, m) => !x || m)
1484
1563
  ),
1485
- C.click((b) => w(b)),
1486
- z.label(h.$.decrementValue),
1487
- N({ icon: "line-md:minus", size: "xs" })
1564
+ I.click((x) => _(x)),
1565
+ R.label(g.$.decrementValue),
1566
+ U({ icon: "line-md:minus", size: "xs" })
1488
1567
  )
1489
1568
  );
1490
- }) : null, g = o != null && f != null ? L(f, o) : o ?? f;
1569
+ }) : null, b = o != null && d != null ? z(d, o) : o ?? d;
1491
1570
  return O({
1492
1571
  ...t,
1493
1572
  input: Q.number(
1494
- n != null ? L(
1573
+ n != null ? z(
1495
1574
  l.min(n),
1496
1575
  X(
1497
- p.on(n, (h) => {
1498
- h < p.get(e);
1576
+ p.on(n, (g) => {
1577
+ g < p.get(e);
1499
1578
  })
1500
1579
  )
1501
- ) : T,
1502
- r != null ? L(
1580
+ ) : F,
1581
+ r != null ? z(
1503
1582
  l.max(r),
1504
1583
  X(
1505
- p.on(r, (h) => {
1506
- h > p.get(e);
1584
+ p.on(r, (g) => {
1585
+ g > p.get(e);
1507
1586
  })
1508
1587
  )
1509
- ) : T,
1510
- j(t),
1588
+ ) : F,
1589
+ H(t),
1511
1590
  l.valueAsNumber(e),
1512
1591
  l.step(s),
1513
1592
  l.class("bc-input bc-number-input"),
1514
- c != null ? C.blur(P(c)) : T,
1515
- a != null ? C.change(Y(a)) : T,
1516
- i != null ? C.input(Y(i)) : T,
1593
+ c != null ? I.blur(j(c)) : F,
1594
+ a != null ? I.change(Y(a)) : F,
1595
+ i != null ? I.input(Y(i)) : F,
1517
1596
  // Add wheel event support when step is defined
1518
- s != null ? C.wheel((h) => {
1519
- h.preventDefault();
1520
- const d = p.get(e) ?? 0, x = p.get(s), w = h.shiftKey ? 10 : 1, _ = h.deltaY < 0 ? x * w : -x * w, b = u(d + _);
1521
- b !== d && a && a(b);
1522
- }) : T
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
1523
1602
  ),
1524
- after: g
1603
+ after: b
1525
1604
  });
1526
- }, Nt = (t) => {
1605
+ }, Ot = (t) => {
1527
1606
  if (t == null || t === "") return null;
1528
1607
  const e = Number(t);
1529
1608
  return Number.isNaN(e) ? null : e;
1530
- }, En = (t) => {
1531
- const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i, after: o } = t, u = (d) => {
1532
- const x = n != null ? p.get(n) : void 0, w = r != null ? p.get(r) : void 0;
1533
- return x != null && d < x ? x : w != null && d > w ? w : d;
1534
- }, f = (() => {
1609
+ }, zn = (t) => {
1610
+ 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;
1613
+ }, d = (() => {
1535
1614
  if (s == null) return null;
1536
- const d = V(
1615
+ const f = B(
1537
1616
  e,
1538
1617
  n
1539
1618
  )((m, M) => {
1540
- const k = m ?? 0;
1541
- return M == null ? !0 : k > M;
1542
- }), x = V(
1619
+ const D = m ?? 0;
1620
+ return M == null ? !0 : D > M;
1621
+ }), w = B(
1543
1622
  e,
1544
1623
  r
1545
1624
  )((m, M) => {
1546
- const k = m ?? 0;
1547
- return M == null ? !0 : k < M;
1548
- }), w = (m) => {
1549
- const M = p.get(e) ?? 0, k = p.get(s), $ = m?.shiftKey ? 10 : 1, v = M - k * $, y = n != null ? p.get(n) : void 0;
1550
- if (y != null && v < y) return;
1551
- const D = u(v);
1552
- D !== M && a && a(D);
1553
- }, _ = (m) => {
1554
- const M = p.get(e) ?? 0, k = p.get(s), $ = m?.shiftKey ? 10 : 1, v = M + k * $, y = r != null ? p.get(r) : void 0;
1555
- if (y != null && v > y) return;
1556
- const D = u(v);
1557
- D !== M && a && a(D);
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);
1558
1637
  };
1559
- return ((m, M) => ot(
1638
+ return ((m, M) => ct(
1560
1639
  l.class("bc-number-input-steppers"),
1561
- I.button(
1640
+ y.button(
1562
1641
  l.type("button"),
1563
1642
  l.class(
1564
1643
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
1565
1644
  ),
1566
1645
  l.disabled(
1567
- V(
1568
- x,
1646
+ B(
1647
+ w,
1569
1648
  t.disabled ?? !1
1570
- )((k, $) => !k || $)
1649
+ )((D, S) => !D || S)
1571
1650
  ),
1572
- C.click((k) => _(k)),
1573
- z.label(m),
1574
- N({ icon: "line-md:plus", size: "xs" })
1651
+ I.click((D) => $(D)),
1652
+ R.label(m),
1653
+ U({ icon: "line-md:plus", size: "xs" })
1575
1654
  ),
1576
- I.button(
1655
+ y.button(
1577
1656
  l.type("button"),
1578
1657
  l.class(
1579
1658
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
1580
1659
  ),
1581
1660
  l.disabled(
1582
- V(
1583
- d,
1661
+ B(
1662
+ f,
1584
1663
  t.disabled ?? !1
1585
- )((k, $) => !k || $)
1664
+ )((D, S) => !D || S)
1586
1665
  ),
1587
- C.click((k) => w(k)),
1588
- z.label(M),
1589
- N({ icon: "line-md:minus", size: "xs" })
1666
+ I.click((D) => _(D)),
1667
+ R.label(M),
1668
+ U({ icon: "line-md:minus", size: "xs" })
1590
1669
  )
1591
1670
  ))(
1592
- $t.incrementValue,
1593
- $t.decrementValue
1671
+ It.incrementValue,
1672
+ It.decrementValue
1594
1673
  );
1595
- })(), g = J(e, t.disabled, a), h = o != null && f != null ? L(f, g, o) : o != null ? L(g, o) : f != null ? L(f, g) : g;
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;
1596
1675
  return O({
1597
1676
  ...t,
1598
1677
  input: Q.number(
1599
1678
  // min/max attributes and reactive watchers (no forced correction)
1600
- n != null ? l.min(n) : T,
1601
- r != null ? l.max(r) : T,
1602
- j(t),
1679
+ n != null ? l.min(n) : F,
1680
+ r != null ? l.max(r) : F,
1681
+ H(t),
1603
1682
  // Represent null as empty string so the field can be cleared
1604
- l.value(p.map(e, (d) => d == null ? "" : String(d))),
1683
+ l.value(p.map(e, (f) => f == null ? "" : String(f))),
1605
1684
  l.step(s),
1606
1685
  l.class("bc-input bc-number-input"),
1607
- c != null ? C.blur(P(c)) : T,
1608
- a != null ? C.change(
1609
- P((d) => {
1610
- const x = Nt(d);
1611
- a(x);
1686
+ c != null ? I.blur(j(c)) : F,
1687
+ a != null ? I.change(
1688
+ j((f) => {
1689
+ const w = Ot(f);
1690
+ a(w);
1612
1691
  })
1613
- ) : T,
1614
- i != null ? C.input(
1615
- P((d) => {
1616
- const x = Nt(d);
1617
- i(x);
1692
+ ) : F,
1693
+ i != null ? I.input(
1694
+ j((f) => {
1695
+ const w = Ot(f);
1696
+ i(w);
1618
1697
  })
1619
- ) : T,
1698
+ ) : F,
1620
1699
  // Wheel support when step is defined
1621
- s != null ? C.wheel((d) => {
1622
- d.preventDefault();
1623
- const x = p.get(e) ?? 0, w = p.get(s), _ = d.shiftKey ? 10 : 1, b = d.deltaY < 0 ? w * _ : -w * _, m = u(x + b);
1624
- m !== x && a && a(m);
1625
- }) : T
1700
+ s != null ? I.wheel((f) => {
1701
+ f.preventDefault();
1702
+ const w = p.get(e) ?? 0, _ = p.get(s), $ = f.shiftKey ? 10 : 1, x = f.deltaY < 0 ? _ * $ : -_ * $, m = u(w + x);
1703
+ m !== w && a && a(m);
1704
+ }) : F
1626
1705
  ),
1627
- after: h
1706
+ after: g
1628
1707
  });
1629
- }, Rn = ({
1708
+ }, En = ({
1630
1709
  value: t,
1631
1710
  onChange: e,
1632
1711
  onInput: s,
@@ -1637,89 +1716,89 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1637
1716
  size: i = "md",
1638
1717
  id: o,
1639
1718
  color: u = "primary",
1640
- tabIndex: f = 0
1719
+ tabIndex: d = 0
1641
1720
  }) => {
1642
- const g = o ?? be("switch");
1643
- function h(_, b) {
1721
+ const b = o ?? be("switch");
1722
+ function g($, x) {
1644
1723
  const m = [
1645
1724
  "bc-switch",
1646
- `bc-switch--size-${b}`,
1647
- `bc-switch--${b}`
1725
+ `bc-switch--size-${x}`,
1726
+ `bc-switch--${x}`
1648
1727
  ];
1649
- return _ && m.push("bc-switch--disabled"), m.join(" ");
1728
+ return $ && m.push("bc-switch--disabled"), m.join(" ");
1650
1729
  }
1651
- function d(_) {
1652
- const b = _ ?? "primary", m = /* @__PURE__ */ new Map(), M = Vt(b, "solid", "light"), k = Vt(b, "solid", "dark");
1653
- return m.set("--switch-track-on-bg", M.backgroundColor), m.set("--switch-track-on-label", M.textColor), m.set("--switch-track-on-bg-dark", k.backgroundColor), m.set("--switch-track-on-label-dark", k.textColor), m.set(
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(
1654
1733
  "--switch-track-on-border-dark",
1655
- fe(b, "dark")
1656
- ), Array.from(m.entries()).map(([$, v]) => `${$}: ${v}`).join("; ");
1734
+ de(x, "dark")
1735
+ ), Array.from(m.entries()).map(([S, v]) => `${S}: ${v}`).join("; ");
1657
1736
  }
1658
- const x = () => {
1737
+ const w = () => {
1659
1738
  p.get(a) || (e?.(!p.get(t)), s?.(!p.get(t)));
1660
- }, w = (_) => {
1661
- p.get(a) || (_.key === " " || _.key === "Enter") && (_.preventDefault(), x());
1739
+ }, _ = ($) => {
1740
+ p.get(a) || ($.key === " " || $.key === "Enter") && ($.preventDefault(), w());
1662
1741
  };
1663
- return I.div(
1742
+ return y.div(
1664
1743
  l.class(
1665
- V(
1744
+ B(
1666
1745
  a ?? !1,
1667
1746
  i
1668
1747
  )(
1669
- (_, b) => h(_ ?? !1, b ?? "md")
1748
+ ($, x) => g($ ?? !1, x ?? "md")
1670
1749
  )
1671
1750
  ),
1672
1751
  l.style(
1673
- V(u)(
1674
- (_) => d(_)
1752
+ B(u)(
1753
+ ($) => f($)
1675
1754
  )
1676
1755
  ),
1677
- l.id(g),
1756
+ l.id(b),
1678
1757
  l.role("switch"),
1679
1758
  l.tabindex(
1680
- V(
1759
+ B(
1681
1760
  a ?? !1,
1682
- f
1683
- )((_, b) => _ ? -1 : b ?? 0)
1761
+ d
1762
+ )(($, x) => $ ? -1 : x ?? 0)
1684
1763
  ),
1685
- z.checked(t),
1686
- z.disabled(a),
1687
- C.click(x),
1688
- C.keydown(w),
1689
- n != null ? C.blur(n) : null,
1690
- I.div(
1764
+ R.checked(t),
1765
+ R.disabled(a),
1766
+ I.click(w),
1767
+ I.keydown(_),
1768
+ n != null ? I.blur(n) : null,
1769
+ y.div(
1691
1770
  l.class("bc-switch__track"),
1692
1771
  l.class(
1693
1772
  p.map(
1694
1773
  t,
1695
- (_) => _ ? "bc-switch__track--on" : "bc-switch__track--off"
1774
+ ($) => $ ? "bc-switch__track--on" : "bc-switch__track--off"
1696
1775
  )
1697
1776
  ),
1698
- r != null ? I.div(
1699
- z.hidden(!0),
1777
+ r != null ? y.div(
1778
+ R.hidden(!0),
1700
1779
  l.class("bc-switch__track-label bc-switch__track-label--off"),
1701
1780
  l.class(
1702
1781
  p.map(
1703
1782
  t,
1704
- (_) => _ ? "bc-switch__track-label--hidden" : "bc-switch__track-label--visible"
1783
+ ($) => $ ? "bc-switch__track-label--hidden" : "bc-switch__track-label--visible"
1705
1784
  )
1706
1785
  ),
1707
1786
  r
1708
1787
  ) : null,
1709
- c != null ? I.div(
1788
+ c != null ? y.div(
1710
1789
  l.class("bc-switch__track-label bc-switch__track-label--on"),
1711
1790
  l.class(
1712
1791
  p.map(
1713
1792
  t,
1714
- (_) => _ ? "bc-switch__track-label--visible" : "bc-switch__track-label--hidden"
1793
+ ($) => $ ? "bc-switch__track-label--visible" : "bc-switch__track-label--hidden"
1715
1794
  )
1716
1795
  ),
1717
1796
  c
1718
1797
  ) : null,
1719
- jt(
1720
- (_) => H(
1798
+ Ht(
1799
+ ($) => P(
1721
1800
  pe,
1722
- ({ direction: b }) => I.div(
1801
+ ({ direction: x }) => y.div(
1723
1802
  l.class("bc-switch__thumb"),
1724
1803
  l.class(
1725
1804
  p.map(
@@ -1727,15 +1806,15 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1727
1806
  (m) => m ? "bc-switch__thumb--on" : "bc-switch__thumb--off"
1728
1807
  )
1729
1808
  ),
1730
- ft.transform(
1731
- V(
1809
+ ht.transform(
1810
+ B(
1732
1811
  t,
1733
- _,
1812
+ $,
1734
1813
  i,
1735
- b
1736
- )((m, { width: M }, k, $) => {
1814
+ x
1815
+ )((m, { width: M }, D, S) => {
1737
1816
  const v = (() => {
1738
- switch (k) {
1817
+ switch (D) {
1739
1818
  case "xs":
1740
1819
  return 5;
1741
1820
  case "sm":
@@ -1747,8 +1826,8 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1747
1826
  case "xl":
1748
1827
  return 8;
1749
1828
  }
1750
- })(), y = $ === "rtl" ? `calc((var(--spacing-base) * ${v}) - ${M}px)` : `calc(${M}px - (var(--spacing-base) * ${v}))`;
1751
- return m ? `translateX(${y})` : "translateX(0)";
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)";
1752
1831
  })
1753
1832
  )
1754
1833
  )
@@ -1762,7 +1841,7 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1762
1841
  pattern: /[0-9A-Fa-f]/,
1763
1842
  transform: (n) => n.toLowerCase()
1764
1843
  };
1765
- return qt({
1844
+ return Gt({
1766
1845
  ...t,
1767
1846
  mask: [
1768
1847
  e,
@@ -1805,7 +1884,7 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1805
1884
  // Sensible default placeholder; can be overridden via options.placeholder
1806
1885
  placeholder: t.placeholder ?? "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1807
1886
  });
1808
- }, zn = et(en), nn = "line-md:star-alt-filled", sn = "line-md:star-alt", rn = (t) => {
1887
+ }, Rn = et(en), nn = "line-md:star-alt-filled", sn = "line-md:star-alt", rn = (t) => {
1809
1888
  const {
1810
1889
  value: e,
1811
1890
  onChange: s,
@@ -1816,42 +1895,42 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1816
1895
  fullIcon: i = nn,
1817
1896
  emptyIcon: o = sn,
1818
1897
  size: u = "md",
1819
- onBlur: f,
1820
- rounding: g = 1
1821
- } = t, h = () => {
1822
- const m = p.get(g);
1898
+ onBlur: d,
1899
+ rounding: b = 1
1900
+ } = t, g = () => {
1901
+ const m = p.get(b);
1823
1902
  return m > 0 ? m : 1;
1824
- }, d = (m) => Math.min(Math.max(m, 0), p.get(r)), x = (m, M) => {
1903
+ }, f = (m) => Math.min(Math.max(m, 0), p.get(r)), w = (m, M) => {
1825
1904
  if (p.get(n ?? !1)) return;
1826
- const $ = m.currentTarget.getBoundingClientRect(), v = (m.clientX - $.left) / $.width, y = M - 1 + v, D = h(), F = Math.ceil(y / D) * D, A = d(F);
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);
1827
1906
  s?.(A);
1828
- }, w = (m) => {
1907
+ }, _ = (m) => {
1829
1908
  if (p.get(n ?? !1)) return;
1830
- const M = h(), k = p.get(e) ?? 0;
1831
- let $;
1909
+ const M = g(), D = p.get(e) ?? 0;
1910
+ let S;
1832
1911
  switch (m.key) {
1833
1912
  case "ArrowRight":
1834
1913
  case "ArrowUp":
1835
- $ = d(k + M);
1914
+ S = f(D + M);
1836
1915
  break;
1837
1916
  case "ArrowLeft":
1838
1917
  case "ArrowDown":
1839
- $ = d(k - M);
1918
+ S = f(D - M);
1840
1919
  break;
1841
1920
  case "Home":
1842
- $ = 0;
1921
+ S = 0;
1843
1922
  break;
1844
1923
  case "End":
1845
- $ = p.get(r);
1924
+ S = p.get(r);
1846
1925
  break;
1847
1926
  default:
1848
1927
  return;
1849
1928
  }
1850
- m.preventDefault(), s?.($);
1851
- }, _ = p.map(u, (m) => `bc-icon--${m}`), b = ({ index: m, counter: M }) => I.span(
1929
+ m.preventDefault(), s?.(S);
1930
+ }, $ = p.map(u, (m) => `bc-icon--${m}`), x = ({ index: m, counter: M }) => y.span(
1852
1931
  l.class("bc-rating-input__icon-container"),
1853
- l.class(_),
1854
- N(
1932
+ l.class($),
1933
+ U(
1855
1934
  {
1856
1935
  icon: o,
1857
1936
  size: u,
@@ -1860,16 +1939,16 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1860
1939
  },
1861
1940
  l.class("bc-rating-input__icon-empty")
1862
1941
  ),
1863
- I.span(
1942
+ y.span(
1864
1943
  l.class("bc-rating-input__icon-clipper"),
1865
- l.class(_),
1866
- ft.width(
1867
- p.map(e, (k) => {
1868
- const $ = Math.floor(k);
1869
- return $ > m ? "100%" : $ < m ? "0%" : `${(k - m) * 100}%`;
1944
+ l.class($),
1945
+ ht.width(
1946
+ p.map(e, (D) => {
1947
+ const S = Math.floor(D);
1948
+ return S > m ? "100%" : S < m ? "0%" : `${(D - m) * 100}%`;
1870
1949
  })
1871
1950
  ),
1872
- N(
1951
+ U(
1873
1952
  {
1874
1953
  icon: i,
1875
1954
  size: u,
@@ -1879,8 +1958,8 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1879
1958
  l.class("bc-rating-input__icon-full")
1880
1959
  )
1881
1960
  ),
1882
- C.click(
1883
- se((k) => x(k, M), {
1961
+ I.click(
1962
+ re((D) => w(D, M), {
1884
1963
  preventDefault: !0,
1885
1964
  stopPropagation: !0
1886
1965
  })
@@ -1891,30 +1970,30 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1891
1970
  growInput: !1,
1892
1971
  focusableSelector: '[role="slider"]',
1893
1972
  ...t,
1894
- input: I.div(
1973
+ input: y.div(
1895
1974
  // Common input attributes (id, required, invalid, custom classes, etc.)
1896
- j(t),
1975
+ H(t),
1897
1976
  l.class("bc-rating-input"),
1898
1977
  // ARIA slider semantics
1899
1978
  l.role("slider"),
1900
1979
  l.tabindex(p.map(n ?? !1, (m) => m ? -1 : 0)),
1901
- z.disabled(n ?? !1),
1902
- z.valuemin(0),
1903
- z.valuemax(p.map(r, (m) => m ?? 0)),
1904
- z.valuenow(p.map(e, (m) => m ?? 0)),
1905
- z.valuetext(
1906
- V(
1980
+ R.disabled(n ?? !1),
1981
+ R.valuemin(0),
1982
+ R.valuemax(p.map(r, (m) => m ?? 0)),
1983
+ R.valuenow(p.map(e, (m) => m ?? 0)),
1984
+ R.valuetext(
1985
+ B(
1907
1986
  e,
1908
1987
  r
1909
1988
  )((m, M) => {
1910
- const k = m ?? 0, $ = M ?? 0;
1911
- return `${String(k)} / ${String($)}`;
1989
+ const D = m ?? 0, S = M ?? 0;
1990
+ return `${String(D)} / ${String(S)}`;
1912
1991
  })
1913
1992
  ),
1914
1993
  // Keyboard & focus handlers
1915
- C.keydown(w),
1916
- f != null ? C.blur(f) : null,
1917
- Pt(r, b)
1994
+ I.keydown(_),
1995
+ d != null ? I.blur(d) : null,
1996
+ jt(r, x)
1918
1997
  )
1919
1998
  });
1920
1999
  }, Un = (t) => {
@@ -1926,7 +2005,7 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1926
2005
  // Pass through numeric changes; clear button will call onChange(null)
1927
2006
  onChange: s,
1928
2007
  onBlur: n,
1929
- after: r != null ? L(i, r) : i
2008
+ after: r != null ? z(i, r) : i
1930
2009
  });
1931
2010
  }, Nn = (t) => {
1932
2011
  const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i } = t;
@@ -1934,71 +2013,71 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1934
2013
  ...t,
1935
2014
  // Make sure clicks anywhere focus the range input
1936
2015
  focusableSelector: 'input[type="range"]',
1937
- input: I.input(
2016
+ input: y.input(
1938
2017
  l.type("range"),
1939
- j(t),
2018
+ H(t),
1940
2019
  l.min(n),
1941
2020
  l.max(r),
1942
2021
  l.step(s),
1943
2022
  // Using value as number to keep it in sync
1944
2023
  l.valueAsNumber(e),
1945
2024
  l.class("bc-input bc-slider-input"),
1946
- c != null ? C.blur(Y(c)) : T,
1947
- a != null ? C.change(Y(a)) : T,
1948
- i != null ? C.input(Y(i)) : T
2025
+ c != null ? I.blur(Y(c)) : F,
2026
+ a != null ? I.change(Y(a)) : F,
2027
+ i != null ? I.input(Y(i)) : F
1949
2028
  )
1950
2029
  });
1951
2030
  }, On = (t) => {
1952
- const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i } = t, o = p.map(e, (f) => {
1953
- if (f != null) return f;
1954
- const g = n != null ? p.get(n) : void 0;
1955
- return typeof g == "number" ? g : 0;
1956
- }), u = J(e, t.disabled, (f) => {
1957
- a?.(f);
2031
+ const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i } = t, o = p.map(e, (d) => {
2032
+ 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);
1958
2037
  });
1959
2038
  return O(
1960
2039
  {
1961
2040
  ...t,
1962
2041
  focusableSelector: 'input[type="range"]',
1963
2042
  after: u,
1964
- input: I.input(
2043
+ input: y.input(
1965
2044
  l.type("range"),
1966
- j(t),
2045
+ H(t),
1967
2046
  l.min(n),
1968
2047
  l.max(r),
1969
2048
  l.step(s),
1970
2049
  l.valueAsNumber(o),
1971
2050
  l.class("bc-input bc-slider-input"),
1972
- c != null ? C.blur(Y(c)) : T,
1973
- a != null ? C.change(
1974
- Y((f) => {
1975
- a(f);
2051
+ c != null ? I.blur(Y(c)) : F,
2052
+ a != null ? I.change(
2053
+ Y((d) => {
2054
+ a(d);
1976
2055
  })
1977
- ) : T,
1978
- i != null ? C.input(
1979
- Y((f) => {
1980
- i(f);
2056
+ ) : F,
2057
+ i != null ? I.input(
2058
+ Y((d) => {
2059
+ i(d);
1981
2060
  })
1982
- ) : T
2061
+ ) : F
1983
2062
  )
1984
2063
  },
1985
2064
  // Ensure container grows input naturally
1986
- L()
2065
+ z()
1987
2066
  );
1988
2067
  };
1989
- let wt = null;
1990
- async function Ct() {
2068
+ let kt = null;
2069
+ async function Dt() {
1991
2070
  const t = globalThis;
1992
- return t.Temporal ? t.Temporal : (wt || (wt = import("./index.esm-DPNh6inz.js").then((e) => {
2071
+ return t.Temporal ? t.Temporal : (kt || (kt = import("./index.esm-DPNh6inz.js").then((e) => {
1993
2072
  const s = e.Temporal;
1994
2073
  return t.Temporal || (t.Temporal = s), s;
1995
- })), wt);
2074
+ })), kt);
1996
2075
  }
1997
- const an = (t, e) => e ? At(Ct, {
2076
+ const an = (t, e) => e ? Bt(Dt, {
1998
2077
  then: t,
1999
2078
  pending: e.pending,
2000
2079
  error: e.error
2001
- }) : At(Ct, 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;
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;
2002
2081
  function cn(t) {
2003
2082
  return {
2004
2083
  mask: null,
@@ -2022,7 +2101,7 @@ function cn(t) {
2022
2101
  }
2023
2102
  };
2024
2103
  }
2025
- const Ot = (t, e) => {
2104
+ const Pt = (t, e) => {
2026
2105
  if (t == null) return null;
2027
2106
  try {
2028
2107
  return t.Duration.from(e);
@@ -2032,13 +2111,13 @@ const Ot = (t, e) => {
2032
2111
  }, Pn = (t) => {
2033
2112
  const { value: e, onChange: s, after: n, disabled: r, onBlur: c } = t, a = () => {
2034
2113
  const u = J(e, r, s);
2035
- return n != null ? L(u, n) : u;
2036
- }, i = t.placeholder != null ? T : l.placeholder("P0DT0H0M0S");
2114
+ return n != null ? z(u, n) : u;
2115
+ }, i = t.placeholder != null ? F : l.placeholder("P0DT0H0M0S");
2037
2116
  return an(
2038
- (u) => qt({
2117
+ (u) => Gt({
2039
2118
  ...t,
2040
- value: p.map(e, (f) => f?.toString() ?? ""),
2041
- onChange: s ? (f) => s(f === "" ? null : u.Duration.from(f)) : void 0,
2119
+ value: p.map(e, (d) => d?.toString() ?? ""),
2120
+ onChange: s ? (d) => s(d === "" ? null : u.Duration.from(d)) : void 0,
2042
2121
  onInput: void 0,
2043
2122
  ...cn(u.Duration.from),
2044
2123
  placeholder: "P0DT0H0M0S",
@@ -2047,28 +2126,28 @@ const Ot = (t, e) => {
2047
2126
  { pending: () => O({
2048
2127
  ...t,
2049
2128
  input: Q.text(
2050
- j(t),
2129
+ H(t),
2051
2130
  l.value(p.map(e, (u) => u?.toString() ?? "")),
2052
2131
  l.class("bc-input"),
2053
2132
  i,
2054
- c != null ? C.blur(() => c()) : T,
2055
- s != null ? C.change((u) => {
2056
- const g = u.currentTarget?.value ?? "";
2057
- if (g === "") {
2133
+ c != null ? I.blur(() => c()) : F,
2134
+ s != null ? I.change((u) => {
2135
+ const b = u.currentTarget?.value ?? "";
2136
+ if (b === "") {
2058
2137
  s(null);
2059
2138
  return;
2060
2139
  }
2061
- const h = globalThis.Temporal, d = Ot(h, g);
2062
- if (d != null) {
2063
- s(d);
2140
+ const g = globalThis.Temporal, f = Pt(g, b);
2141
+ if (f != null) {
2142
+ s(f);
2064
2143
  return;
2065
2144
  }
2066
- Ct().then((x) => {
2067
- const w = Ot(x, g);
2068
- w != null && s(w);
2145
+ Dt().then((w) => {
2146
+ const _ = Pt(w, b);
2147
+ _ != null && s(_);
2069
2148
  }).catch(() => {
2070
2149
  });
2071
- }) : T
2150
+ }) : F
2072
2151
  ),
2073
2152
  after: a()
2074
2153
  }) }
@@ -2078,12 +2157,12 @@ const Ot = (t, e) => {
2078
2157
  return O({
2079
2158
  ...t,
2080
2159
  input: Q.url(
2081
- j(t),
2160
+ H(t),
2082
2161
  l.value(e),
2083
2162
  l.class("bc-input"),
2084
- s != null ? C.blur(P(s)) : T,
2085
- n != null ? C.change(P(n)) : T,
2086
- r != null ? C.input(P(r)) : T
2163
+ s != null ? I.blur(j(s)) : F,
2164
+ n != null ? I.change(j(n)) : F,
2165
+ r != null ? I.input(j(r)) : F
2087
2166
  )
2088
2167
  });
2089
2168
  }, jn = et(un), pn = (t) => {
@@ -2097,46 +2176,46 @@ const Ot = (t, e) => {
2097
2176
  createItem: i,
2098
2177
  addLabel: o,
2099
2178
  controlsLayout: u = "aside",
2100
- removeDisabled: f,
2101
- addDisabled: g
2102
- } = t, h = p.toSignal(u).map((w) => w === "aside"), d = (w) => {
2103
- const _ = E(
2179
+ removeDisabled: d,
2180
+ addDisabled: b
2181
+ } = t, g = p.toSignal(u).map((_) => _ === "aside"), f = (_) => {
2182
+ const $ = L(
2104
2183
  r ?? !1,
2105
- () => I.div(
2184
+ () => y.div(
2106
2185
  l.class("bc-group--align-center"),
2107
2186
  l.class(
2108
- h.map(
2187
+ g.map(
2109
2188
  (m) => m ? "bc-group--direction-column bc-group--gap-1" : "bc-group--direction-row bc-group--gap-1"
2110
2189
  )
2111
2190
  ),
2112
- gt(
2191
+ vt(
2113
2192
  {
2114
2193
  size: "xs",
2115
2194
  roundedness: "full",
2116
2195
  variant: "text",
2117
- onClick: () => w.move("up"),
2118
- disabled: w.cannotMove("up")
2196
+ onClick: () => _.move("up"),
2197
+ disabled: _.cannotMove("up")
2119
2198
  },
2120
- H(
2199
+ P(
2121
2200
  W,
2122
- (m) => N({
2201
+ (m) => U({
2123
2202
  size: "xs",
2124
2203
  icon: "line-md:arrow-up",
2125
2204
  title: m.$.incrementValue
2126
2205
  })
2127
2206
  )
2128
2207
  ),
2129
- gt(
2208
+ vt(
2130
2209
  {
2131
2210
  size: "xs",
2132
2211
  roundedness: "full",
2133
2212
  variant: "text",
2134
- onClick: () => w.move("down"),
2135
- disabled: w.cannotMove("down")
2213
+ onClick: () => _.move("down"),
2214
+ disabled: _.cannotMove("down")
2136
2215
  },
2137
- H(
2216
+ P(
2138
2217
  W,
2139
- (m) => N({
2218
+ (m) => U({
2140
2219
  size: "xs",
2141
2220
  icon: "line-md:arrow-down",
2142
2221
  title: m.$.decrementValue
@@ -2144,84 +2223,84 @@ const Ot = (t, e) => {
2144
2223
  )
2145
2224
  )
2146
2225
  )
2147
- ), b = E(
2226
+ ), x = L(
2148
2227
  c,
2149
- () => H(
2228
+ () => P(
2150
2229
  W,
2151
- (m) => yt({
2230
+ (m) => mt({
2152
2231
  size: "xs",
2153
2232
  // Use a lowercase label to satisfy tests that query with [aria-label*="remove"]
2154
2233
  label: p.map(m.$.removeItem, (M) => M.toLowerCase()),
2155
2234
  color: "danger",
2156
- disabled: f,
2157
- onClick: w.remove
2235
+ disabled: d,
2236
+ onClick: _.remove
2158
2237
  })
2159
2238
  )
2160
2239
  );
2161
- return (m) => E(
2162
- h,
2163
- () => pt(
2240
+ return (m) => L(
2241
+ g,
2242
+ () => dt(
2164
2243
  l.class("bc-group--gap-1 bc-group--align-center"),
2165
- ot(l.class("bc-stack--grow"), m),
2166
- ot(
2244
+ ct(l.class("bc-stack--grow"), m),
2245
+ ct(
2167
2246
  l.class("bc-stack--align-center"),
2168
- E(
2247
+ L(
2169
2248
  e.signal.map((M) => M.length > 1),
2170
- () => _
2249
+ () => $
2171
2250
  ),
2172
- b
2251
+ x
2173
2252
  )
2174
2253
  ),
2175
- () => ot(
2254
+ () => ct(
2176
2255
  l.class("bc-stack--gap-2"),
2177
2256
  m,
2178
- pt(
2257
+ dt(
2179
2258
  l.class("bc-group--gap-2 bc-group--justify-between"),
2180
- E(
2259
+ L(
2181
2260
  e.signal.map((M) => M.length > 1),
2182
- () => _,
2183
- () => I.div()
2261
+ () => $,
2262
+ () => y.div()
2184
2263
  ),
2185
- b
2264
+ x
2186
2265
  )
2187
2266
  )
2188
2267
  );
2189
- }, x = E(
2190
- V(a, i)((w, _) => w && _ != null),
2191
- () => pt(
2268
+ }, w = L(
2269
+ B(a, i)((_, $) => _ && $ != null),
2270
+ () => dt(
2192
2271
  l.class(
2193
2272
  "bc-group--gap-2 bc-group--align-center bc-group--justify-center"
2194
2273
  ),
2195
- gt(
2274
+ vt(
2196
2275
  {
2197
2276
  size: "sm",
2198
2277
  variant: "filled",
2199
2278
  onClick: () => e.push(i()),
2200
- disabled: V(
2279
+ disabled: B(
2201
2280
  e.disabled,
2202
- g ?? !1
2281
+ b ?? !1
2203
2282
  )(
2204
- (w, _) => w || _
2283
+ (_, $) => _ || $
2205
2284
  )
2206
2285
  },
2207
- H(
2286
+ P(
2208
2287
  W,
2209
- (w) => pt(
2288
+ (_) => dt(
2210
2289
  l.class("bc-group--gap-2"),
2211
- N({ icon: "line-md:plus" }),
2212
- o ?? w.$.addLabel
2290
+ U({ icon: "line-md:plus" }),
2291
+ o ?? _.$.addLabel
2213
2292
  )
2214
2293
  )
2215
2294
  )
2216
2295
  )
2217
2296
  );
2218
- return L(
2297
+ return z(
2219
2298
  Xe(
2220
2299
  e,
2221
- (w) => d(w)(s(w)),
2300
+ (_) => f(_)(s(_)),
2222
2301
  n
2223
2302
  ),
2224
- x
2303
+ w
2225
2304
  );
2226
2305
  }, Hn = (t, ...e) => {
2227
2306
  const {
@@ -2233,14 +2312,14 @@ const Ot = (t, e) => {
2233
2312
  showAdd: i,
2234
2313
  createItem: o,
2235
2314
  addLabel: u,
2236
- controlsLayout: f,
2237
- removeDisabled: g,
2238
- addDisabled: h,
2239
- ...d
2315
+ controlsLayout: d,
2316
+ removeDisabled: b,
2317
+ addDisabled: g,
2318
+ ...f
2240
2319
  } = t;
2241
- return Ht(
2320
+ return Wt(
2242
2321
  {
2243
- ...d,
2322
+ ...f,
2244
2323
  content: pn({
2245
2324
  controller: s,
2246
2325
  element: n,
@@ -2250,58 +2329,58 @@ const Ot = (t, e) => {
2250
2329
  showAdd: i,
2251
2330
  createItem: o,
2252
2331
  addLabel: u,
2253
- controlsLayout: f,
2254
- removeDisabled: g,
2255
- addDisabled: h
2332
+ controlsLayout: d,
2333
+ removeDisabled: b,
2334
+ addDisabled: g
2256
2335
  })
2257
2336
  },
2258
2337
  ...e
2259
2338
  );
2260
2339
  };
2261
- class Wn extends bt {
2340
+ class Wn extends xt {
2262
2341
  branches;
2263
2342
  activeBranch;
2264
2343
  #e;
2265
2344
  #t = /* @__PURE__ */ new Map();
2266
2345
  constructor(e, s, n, r, c, a, i = rt) {
2267
2346
  super(e, s, n, r, c, i), this.branches = a;
2268
- const o = (f) => {
2269
- for (const g of a)
2270
- if (g.detect(f))
2271
- return g.key;
2347
+ const o = (d) => {
2348
+ for (const b of a)
2349
+ if (b.detect(d))
2350
+ return b.key;
2272
2351
  return a[0]?.key ?? "unknown";
2273
2352
  };
2274
2353
  this.activeBranch = n.map(o, rt);
2275
- const u = (f) => {
2276
- if (this.#t.has(f))
2277
- return this.#t.get(f);
2278
- const g = a.find((d) => d.key === f);
2279
- if (!g)
2280
- throw new Error(`Unknown branch: ${f}`);
2281
- const h = new bt(
2282
- [...e, f],
2283
- (d) => {
2284
- this.change(d);
2354
+ const u = (d) => {
2355
+ if (this.#t.has(d))
2356
+ return this.#t.get(d);
2357
+ const b = a.find((f) => f.key === d);
2358
+ if (!b)
2359
+ throw new Error(`Unknown branch: ${d}`);
2360
+ const g = new xt(
2361
+ [...e, d],
2362
+ (f) => {
2363
+ this.change(f);
2285
2364
  },
2286
2365
  this.signal.map(
2287
- (d) => g.detect(d) ? d : g.defaultValue(),
2366
+ (f) => b.detect(f) ? f : b.defaultValue(),
2288
2367
  i
2289
2368
  ),
2290
- r.map(Bt([f])),
2369
+ r.map(Et([d])),
2291
2370
  {
2292
2371
  disabled: this.disabled,
2293
2372
  validationMode: this.parent.validationMode
2294
2373
  },
2295
2374
  i
2296
2375
  );
2297
- return this.#t.set(f, h), h;
2376
+ return this.#t.set(d, g), g;
2298
2377
  };
2299
2378
  this.#e = this.activeBranch.map(
2300
- (f) => u(f),
2379
+ (d) => u(d),
2301
2380
  rt
2302
2381
  ), this.onDispose(() => {
2303
- for (const f of this.#t.values())
2304
- f.dispose();
2382
+ for (const d of this.#t.values())
2383
+ d.dispose();
2305
2384
  this.#t.clear(), this.activeBranch.dispose(), this.#e.dispose();
2306
2385
  });
2307
2386
  }
@@ -2320,7 +2399,7 @@ class Wn extends bt {
2320
2399
  throw new Error(`Unknown branch: ${e}`);
2321
2400
  if (this.#t.has(e))
2322
2401
  return this.#t.get(e);
2323
- const n = new bt(
2402
+ const n = new xt(
2324
2403
  [...this.path, e],
2325
2404
  (r) => {
2326
2405
  this.change(r);
@@ -2329,7 +2408,7 @@ class Wn extends bt {
2329
2408
  (r) => s.detect(r) ? r : s.defaultValue(),
2330
2409
  rt
2331
2410
  ),
2332
- this.status.map(Bt([e])),
2411
+ this.status.map(Et([e])),
2333
2412
  {
2334
2413
  disabled: this.disabled,
2335
2414
  validationMode: this.parent.validationMode
@@ -2388,19 +2467,19 @@ function Xn(t) {
2388
2467
  }
2389
2468
  export {
2390
2469
  we as $,
2391
- Rn as A,
2470
+ En as A,
2392
2471
  pn as B,
2393
2472
  kn as C,
2394
2473
  en as D,
2395
2474
  je as E,
2396
- Ee as F,
2397
- pt as G,
2398
- zn as H,
2475
+ ze as F,
2476
+ dt as G,
2477
+ Rn as H,
2399
2478
  Un as I,
2400
2479
  Nn as J,
2401
2480
  On as K,
2402
2481
  Hn as L,
2403
- qt as M,
2482
+ Gt as M,
2404
2483
  Ze as N,
2405
2484
  Pn as O,
2406
2485
  un as P,
@@ -2408,43 +2487,43 @@ export {
2408
2487
  rn as R,
2409
2488
  $n as S,
2410
2489
  tn as T,
2411
- Lt as U,
2490
+ $t as U,
2412
2491
  Cn as V,
2413
2492
  an as W,
2414
2493
  In as X,
2415
2494
  He as Y,
2416
- xe as Z,
2417
- ve as _,
2495
+ ve as Z,
2496
+ xe as _,
2418
2497
  J as a,
2419
- kt as a0,
2420
- ct as a1,
2421
- vn as a2,
2498
+ Ct as a0,
2499
+ it as a1,
2500
+ xn as a2,
2422
2501
  $e as a3,
2423
2502
  ye as a4,
2424
2503
  ke as a5,
2425
- Zt as a6,
2504
+ Yt as a6,
2426
2505
  Ie as a7,
2427
- It as a8,
2506
+ Mt as a8,
2428
2507
  Ce as a9,
2429
- xt as aa,
2430
- vt as ab,
2508
+ wt as aa,
2509
+ _t as ab,
2431
2510
  Me as ac,
2432
2511
  De as ad,
2433
2512
  at as ae,
2434
2513
  lt as af,
2435
- Ct as ag,
2514
+ Dt as ag,
2436
2515
  _n as ah,
2437
2516
  wn as ai,
2438
- Wt as b,
2517
+ Zt as b,
2439
2518
  _e as c,
2440
2519
  cn as d,
2441
- Ut as e,
2520
+ Nt as e,
2442
2521
  Wn as f,
2443
2522
  Yn as g,
2444
2523
  Xn as h,
2445
- xn as i,
2524
+ vn as i,
2446
2525
  yn as j,
2447
- Re as k,
2526
+ Ee as k,
2448
2527
  Oe as l,
2449
2528
  Mn as m,
2450
2529
  Ke as n,
@@ -2459,5 +2538,5 @@ export {
2459
2538
  Bn as w,
2460
2539
  An as x,
2461
2540
  Ln as y,
2462
- En as z
2541
+ zn as z
2463
2542
  };