@tempots/beatui 0.91.0 → 0.93.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 (39) hide show
  1. package/dist/auth/index.cjs.js +1 -1
  2. package/dist/auth/index.es.js +1 -1
  3. package/dist/{auth-divider-VzrKnv2d.cjs → auth-divider-C3E16pml.cjs} +1 -1
  4. package/dist/{auth-divider-B4n8lGx5.js → auth-divider-Rt0WDKAe.js} +3 -3
  5. package/dist/beatui.css +271 -262
  6. package/dist/beatui.tailwind.css +271 -262
  7. package/dist/better-auth/index.cjs.js +1 -1
  8. package/dist/better-auth/index.es.js +2 -2
  9. package/dist/deep-merge-Blrucd-E.cjs +1 -0
  10. package/dist/{deep-merge-BdRgguFO.js → deep-merge-CoLO4id0.js} +593 -587
  11. package/dist/duration-input-47x7nbGh.cjs +1 -0
  12. package/dist/{duration-input-BZhzeELL.js → duration-input-DrVonjKK.js} +42 -42
  13. package/dist/index.cjs.js +2 -2
  14. package/dist/index.es.js +692 -691
  15. package/dist/json-schema/index.cjs.js +1 -1
  16. package/dist/json-schema/index.es.js +5 -5
  17. package/dist/json-structure/index.cjs.js +1 -1
  18. package/dist/json-structure/index.es.js +3 -3
  19. package/dist/lexical/index.cjs.js +25 -25
  20. package/dist/lexical/index.es.js +1820 -1812
  21. package/dist/lexical.css +51 -49
  22. package/dist/{modal-C-d5Btti.cjs → modal-DUlqGUW7.cjs} +1 -1
  23. package/dist/{modal-DTz98Dk7.js → modal-ZitwUeXx.js} +1 -1
  24. package/dist/{notice-BDTfBGtx.cjs → notice-DAVOTnfA.cjs} +1 -1
  25. package/dist/{notice-CZuh-h6a.js → notice-E_p2hg1G.js} +1 -1
  26. package/dist/styles-url-BIeImEjl.js +4 -0
  27. package/dist/styles-url-CkPTI32j.cjs +1 -0
  28. package/dist/types/lexical/types.d.ts +5 -0
  29. package/dist/{use-form-Cd8YFWaN.js → use-form-BQRVnIp9.js} +167 -166
  30. package/dist/use-form-DTyNw0kM.cjs +2 -0
  31. package/dist/{widget-customization-BY4Ox_4e.js → widget-customization-C-fSx3RB.js} +307 -306
  32. package/dist/widget-customization-xEBfEPhQ.cjs +1 -0
  33. package/package.json +1 -1
  34. package/dist/deep-merge-CI1g9sjh.cjs +0 -1
  35. package/dist/duration-input-a1fCTfKl.cjs +0 -1
  36. package/dist/styles-url-4g2WnNJ8.js +0 -4
  37. package/dist/styles-url-mlDYoWbF.cjs +0 -1
  38. package/dist/use-form-DQVN_Zjb.cjs +0 -2
  39. package/dist/widget-customization-eyQ2pxvu.cjs +0 -1
@@ -1,12 +1,12 @@
1
- import { Task as ye, Use as O, Value as f, prop as ae, html as h, attr as l, on as C, WithElement as te, Empty as S, aria as J, bind as ie, computedOf as V, style as we, OnDispose as ne, When as U, NotEmpty as Re, Fragment as N, ForEach as ee, coalesce as Ne, Ensure as Pe, OneOfType as je, Repeat as We, signal as _e, input as se, emitValue as P, emitValueAsNumber as ke } from "@tempots/dom";
1
+ import { Task as ye, Use as O, Value as p, prop as ae, html as g, attr as l, on as C, WithElement as te, Empty as M, aria as J, bind as ie, computedOf as V, style as we, OnDispose as ne, When as U, NotEmpty as Ne, Fragment as N, ForEach as ee, coalesce as Pe, Ensure as je, OneOfType as We, Repeat as Ze, signal as _e, input as se, emitValue as P, emitValueAsNumber as ke } from "@tempots/dom";
2
2
  import { B as F, b as Ce, f as De, I as E, d as ce } from "./translations-CiBhB2FV.js";
3
- import { l as Ze } from "./colors-BY0Ja_bf.js";
4
- import { g as He } from "./timer-Rd2sKnvH.js";
5
- import { ElementRect as qe } from "@tempots/ui";
6
- import { I as W, a as Ye, g as Ge, B as be } from "./input-container-9r1F3KuX.js";
7
- import { C as oe, I as Ve, m as Je, c as Xe, d as fe, O as K, e as Ie } from "./use-form-Cd8YFWaN.js";
3
+ import { l as He } from "./colors-BY0Ja_bf.js";
4
+ import { g as qe } from "./timer-Rd2sKnvH.js";
5
+ import { ElementRect as Ye } from "@tempots/ui";
6
+ import { I as W, a as Ge, g as Je, B as be } from "./input-container-9r1F3KuX.js";
7
+ import { C as oe, I as Ae, m as Xe, c as Qe, d as fe, O as K, e as Ie } from "./use-form-BQRVnIp9.js";
8
8
  import { C as q } from "./text-input-BgPx8BbG.js";
9
- import { S as Ae } from "./stack-Bm-UZosx.js";
9
+ import { S as Le } from "./stack-Bm-UZosx.js";
10
10
  let pe = null;
11
11
  async function he() {
12
12
  const t = globalThis;
@@ -15,7 +15,7 @@ async function he() {
15
15
  return t.Temporal || (t.Temporal = n), n;
16
16
  })), pe);
17
17
  }
18
- const Qe = (t, e) => e ? ye(he, {
18
+ const Ke = (t, e) => e ? ye(he, {
19
19
  then: t,
20
20
  pending: e.pending,
21
21
  error: e.error
@@ -26,78 +26,82 @@ function de({
26
26
  accept: n = "*/*",
27
27
  enableClick: s = !0,
28
28
  content: r,
29
- disabled: b = !1,
30
- allowMultiple: i
29
+ disabled: h = !1,
30
+ allowMultiple: o
31
31
  }) {
32
- return O(F, (g) => {
33
- const p = f.deriveProp(e ?? []), v = ae(!1), d = (u) => {
34
- u.preventDefault(), u.stopPropagation(), v.value = !0;
35
- }, m = (u) => {
36
- u.preventDefault(), u.stopPropagation(), (!u.currentTarget || !u.currentTarget.contains(u.relatedTarget)) && (v.value = !1);
37
- }, y = (u) => {
38
- u.preventDefault(), u.stopPropagation(), v.value = !1;
39
- const x = Array.from(u.dataTransfer?.files || []);
40
- x.length > 0 && (p.value = x, t(x, "dragdrop"));
41
- }, o = (u) => {
42
- f.get(s) && u.currentTarget.querySelector(
32
+ return O(F, (m) => {
33
+ const b = p.deriveProp(e ?? []), w = ae(!1), f = (a) => {
34
+ a.preventDefault(), a.stopPropagation(), w.value = !0;
35
+ }, d = (a) => {
36
+ a.preventDefault(), a.stopPropagation(), (!a.currentTarget || !a.currentTarget.contains(a.relatedTarget)) && (w.value = !1);
37
+ }, x = (a) => {
38
+ a.preventDefault(), a.stopPropagation(), w.value = !1;
39
+ const v = Array.from(a.dataTransfer?.files || []);
40
+ v.length > 0 && (b.value = v, t(v, "dragdrop"));
41
+ }, i = (a) => {
42
+ p.get(s) && a.currentTarget.querySelector(
43
43
  'input[type="file"]'
44
44
  )?.click();
45
45
  };
46
- let a = null;
46
+ let u = null;
47
47
  const D = () => {
48
- if (a == null) return;
49
- const u = Array.from(a.files ?? []);
50
- u.length > 0 && (p.value = u, t(u, "click")), a.value = "";
51
- }, M = (u) => {
52
- f.get(s) && (u.key === "Enter" || u.key === " ") && (u.preventDefault(), o(u));
48
+ if (u == null) return;
49
+ const a = Array.from(u.files ?? []);
50
+ a.length > 0 && (b.value = a, t(a, "click")), u.value = "";
51
+ }, S = (a) => {
52
+ p.get(s) && (a.key === "Enter" || a.key === " ") && (a.preventDefault(), i(a));
53
53
  };
54
- return h.div(
54
+ return g.div(
55
55
  l.role("button"),
56
56
  l.tabindex(
57
- f.map(s, (u) => u ? 0 : -1)
57
+ p.map(s, (a) => a ? 0 : -1)
58
58
  ),
59
59
  l.style("position: relative;"),
60
- C.dragover(d),
61
- C.dragleave(m),
62
- C.drop(y),
63
- C.click(o),
64
- C.keydown(M),
60
+ C.dragover(f),
61
+ C.dragleave(d),
62
+ C.drop(x),
63
+ C.click(i),
64
+ C.keydown(S),
65
65
  // Hidden file input
66
- h.input(
66
+ g.input(
67
67
  l.type("file"),
68
- l.disabled(b),
68
+ l.disabled(h),
69
69
  l.accept(n),
70
- l.multiple(i),
70
+ l.multiple(o),
71
71
  l.style(
72
72
  "position: absolute; left: -9999px; opacity: 0; pointer-events: none;"
73
73
  ),
74
74
  C.change(D),
75
- te((u) => (a = u, p.on((x) => {
75
+ te((a) => (u = a, b.on((v) => {
76
76
  const $ = globalThis.DataTransfer;
77
77
  if ($ != null) {
78
78
  const I = new $();
79
- x.forEach((A) => I.items.add(A)), u.files = I.files;
79
+ v.forEach((A) => I.items.add(A)), a.files = I.files;
80
80
  }
81
- }), S))
81
+ }), M))
82
82
  ),
83
83
  // Screen reader instructions
84
- J.label(ie(g.$.dropZoneInstructions)(s)),
84
+ J.label(ie(m.$.dropZoneInstructions)(s)),
85
85
  // Content
86
- r({ files: p, clear: () => p.value = [], change: (u) => p.set(u) })
86
+ r({
87
+ files: b,
88
+ clear: () => b.value = [],
89
+ change: (a) => b.set(a)
90
+ })
87
91
  );
88
92
  });
89
93
  }
90
- function Ke(t, e) {
94
+ function et(t, e) {
91
95
  return t.length === e.length && t.every((n, s) => n === e[s]);
92
96
  }
93
- function et(t, e, n) {
97
+ function tt(t, e, n) {
94
98
  const s = ["bc-segmented-input", `bc-segmented-input--size-${t}`];
95
99
  return n === "squared" && s.push("bc-segmented-input--squared"), e && s.push("bc-segmented-input--disabled"), s.join(" ");
96
100
  }
97
- function tt(t) {
101
+ function nt(t) {
98
102
  if (t == null) return "";
99
103
  const e = /* @__PURE__ */ new Map(), n = Ce(t, "solid", "light"), s = Ce(t, "solid", "dark");
100
- return e.set("--si-indicator-bg", n.backgroundColor), e.set("--si-active-text", n.textColor), e.set("--si-indicator-bg-dark", s.backgroundColor), e.set("--si-active-text-dark", s.textColor), Array.from(e.entries()).map(([r, b]) => `${r}: ${b}`).join("; ");
104
+ return e.set("--si-indicator-bg", n.backgroundColor), e.set("--si-active-text", n.textColor), e.set("--si-indicator-bg-dark", s.backgroundColor), e.set("--si-active-text-dark", s.textColor), Array.from(e.entries()).map(([r, h]) => `${r}: ${h}`).join("; ");
101
105
  }
102
106
  function Mt({
103
107
  options: t,
@@ -105,121 +109,121 @@ function Mt({
105
109
  onChange: n,
106
110
  size: s = "md",
107
111
  disabled: r = !1,
108
- variant: b = "pill",
109
- color: i
110
- }, ...g) {
111
- const p = Ze(t).map(([v, d]) => ({
112
- key: v,
113
- label: d
112
+ variant: h = "pill",
113
+ color: o
114
+ }, ...m) {
115
+ const b = He(t).map(([w, f]) => ({
116
+ key: w,
117
+ label: f
114
118
  }));
115
119
  return te(() => {
116
- const v = Object.fromEntries(
117
- p.map((m, y) => [m.key, y])
118
- ), d = ae(
119
- p.map(() => ({ left: 0, width: 0 })),
120
- Ke
120
+ const w = Object.fromEntries(
121
+ b.map((d, x) => [d.key, x])
122
+ ), f = ae(
123
+ b.map(() => ({ left: 0, width: 0 })),
124
+ et
121
125
  );
122
- return h.div(
126
+ return g.div(
123
127
  l.class(
124
128
  V(
125
129
  s,
126
130
  r,
127
- b
131
+ h
128
132
  )(
129
- (m, y, o) => et(
130
- m ?? "md",
131
- y ?? !1,
132
- o ?? "pill"
133
+ (d, x, i) => tt(
134
+ d ?? "md",
135
+ x ?? !1,
136
+ i ?? "pill"
133
137
  )
134
138
  )
135
139
  ),
136
140
  l.style(
137
- i != null ? f.map(i, (m) => tt(m)) : ""
141
+ o != null ? p.map(o, (d) => nt(d)) : ""
138
142
  ),
139
- h.div(
143
+ g.div(
140
144
  l.class("bc-segmented-input__container"),
141
- h.div(
145
+ g.div(
142
146
  l.class("bc-segmented-input__indicator"),
143
147
  we.width(
144
148
  V(
145
149
  e,
146
- d
147
- )((m, y) => {
148
- const { width: o } = y[v[m] ?? 0];
149
- return `${o}px`;
150
+ f
151
+ )((d, x) => {
152
+ const { width: i } = x[w[d] ?? 0];
153
+ return `${i}px`;
150
154
  })
151
155
  ),
152
156
  we.left(
153
157
  V(
154
158
  e,
155
- d
156
- )((m, y) => {
157
- const { left: o } = y[v[m] ?? 0];
158
- return `${o}px`;
159
+ f
160
+ )((d, x) => {
161
+ const { left: i } = x[w[d] ?? 0];
162
+ return `${i}px`;
159
163
  })
160
164
  )
161
165
  ),
162
166
  // clickable buttons
163
- p.map(({ label: m, key: y }, o) => h.button(
167
+ b.map(({ label: d, key: x }, i) => g.button(
164
168
  l.type("button"),
165
- C.click((a) => {
166
- a.preventDefault(), f.get(r) || n?.(y);
169
+ C.click((u) => {
170
+ u.preventDefault(), p.get(r) || n?.(x);
167
171
  }),
168
172
  l.disabled(r),
169
173
  l.class("bc-segmented-input__segment"),
170
174
  l.class(
171
- f.map(e, (a) => a === y ? "bc-segmented-input__segment--active" : "bc-segmented-input__segment--inactive")
175
+ p.map(e, (u) => u === x ? "bc-segmented-input__segment--active" : "bc-segmented-input__segment--inactive")
172
176
  ),
173
- qe((a) => {
177
+ Ye((u) => {
174
178
  function D() {
175
- d.update((u) => {
176
- const x = [...u];
177
- return x[o] = {
178
- width: a.value.width,
179
- left: a.value.localLeft
180
- }, x;
179
+ f.update((a) => {
180
+ const v = [...a];
181
+ return v[i] = {
182
+ width: u.value.width,
183
+ left: u.value.localLeft
184
+ }, v;
181
185
  });
182
186
  }
183
- const M = He(D);
184
- return ne(M, a.on(D));
187
+ const S = qe(D);
188
+ return ne(S, u.on(D));
185
189
  }),
186
- m
190
+ d
187
191
  ))
188
192
  ),
189
- ...g
193
+ ...m
190
194
  );
191
195
  });
192
196
  }
193
- function nt(t) {
197
+ function st(t) {
194
198
  const e = t.type.toLowerCase();
195
199
  return e.startsWith("image/") && (e.includes("jpeg") || e.includes("jpg") || e.includes("png") || e.includes("gif") || e.includes("webp") || e.includes("svg"));
196
200
  }
197
- function st(t) {
201
+ function lt(t) {
198
202
  const e = t.type.toLowerCase();
199
203
  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";
200
204
  }
201
205
  function me(t) {
202
206
  return U(
203
- t.map(nt),
207
+ t.map(st),
204
208
  () => {
205
209
  const e = ae(null);
206
210
  return t.on((n) => {
207
211
  e.value && URL.revokeObjectURL(e.value);
208
212
  const s = URL.createObjectURL(n);
209
213
  e.value = s;
210
- }), h.div(
214
+ }), g.div(
211
215
  ne(() => {
212
216
  e.value && URL.revokeObjectURL(e.value);
213
217
  }),
214
218
  l.class("bc-file-input__thumbnail-container"),
215
- h.img(
219
+ g.img(
216
220
  l.src(e),
217
221
  l.alt(t.map((n) => n.name)),
218
222
  l.class("bc-file-input__thumbnail")
219
223
  )
220
224
  );
221
225
  },
222
- () => E({ icon: t.map(st) })
226
+ () => E({ icon: t.map(lt) })
223
227
  );
224
228
  }
225
229
  const St = (t, ...e) => {
@@ -227,48 +231,48 @@ const St = (t, ...e) => {
227
231
  value: n = ae([]),
228
232
  accept: s = "*/*",
229
233
  maxFiles: r,
230
- maxFileSize: b,
231
- onChange: i,
232
- onBlur: g,
233
- disabled: p,
234
- hasError: v,
235
- mode: d = "default",
236
- showFileList: m = !0,
237
- ...y
238
- } = t, o = n, a = f.map(d, (k) => k === "input"), D = f.map(d, (k) => k === "compact"), M = (k) => {
234
+ maxFileSize: h,
235
+ onChange: o,
236
+ onBlur: m,
237
+ disabled: b,
238
+ hasError: w,
239
+ mode: f = "default",
240
+ showFileList: d = !0,
241
+ ...x
242
+ } = t, i = n, u = p.map(f, (k) => k === "input"), D = p.map(f, (k) => k === "compact"), S = (k) => {
239
243
  let c = k;
240
244
  if (r != null) {
241
- const w = f.get(r);
242
- c = c.slice(0, w);
245
+ const y = p.get(r);
246
+ c = c.slice(0, y);
243
247
  }
244
- if (b) {
245
- const w = f.get(b);
246
- c = c.filter((T) => T.size <= w);
248
+ if (h) {
249
+ const y = p.get(h);
250
+ c = c.filter((T) => T.size <= y);
247
251
  }
248
- i?.(c);
249
- }, u = (k) => {
250
- const w = o.value.filter((T, z) => z !== k);
251
- i?.(w);
252
- }, x = () => {
253
- i?.([]);
252
+ o?.(c);
253
+ }, a = (k) => {
254
+ const y = i.value.filter((T, z) => z !== k);
255
+ o?.(y);
256
+ }, v = () => {
257
+ o?.([]);
254
258
  }, $ = ({
255
259
  files: k,
256
260
  clear: c,
257
- change: w
261
+ change: y
258
262
  }) => O(
259
263
  F,
260
- (T) => h.div(
264
+ (T) => g.div(
261
265
  l.class("bc-file-input__drop-zone"),
262
- h.div(
266
+ g.div(
263
267
  l.class(
264
268
  "bc-file-input__drop-zone-content bc-file-input__drop-zone-content--empty"
265
269
  ),
266
270
  E({ icon: "mdi:cloud-upload-outline", size: "xl" }),
267
- h.div(
271
+ g.div(
268
272
  l.class("bc-file-input__drop-zone-text"),
269
273
  ie(T.$.filesInputInstructions)(
270
274
  r,
271
- b,
275
+ h,
272
276
  T.$.fileSizeUnits.value
273
277
  )
274
278
  )
@@ -278,36 +282,36 @@ const St = (t, ...e) => {
278
282
  files: k
279
283
  }) => O(
280
284
  F,
281
- (c) => h.div(
285
+ (c) => g.div(
282
286
  l.class("bc-file-input__compact-drop-zone"),
283
287
  U(
284
- k.map((w) => w.length > 0),
285
- () => h.div(
288
+ k.map((y) => y.length > 0),
289
+ () => g.div(
286
290
  l.class("bc-file-input__compact-file-list"),
287
- ee(k, (w, T) => {
291
+ ee(k, (y, T) => {
288
292
  const z = T.index;
289
- return h.div(
293
+ return g.div(
290
294
  l.class("bc-file-input__compact-file-item"),
291
- h.div(
295
+ g.div(
292
296
  l.class("bc-file-input__compact-file-icon"),
293
- me(w)
297
+ me(y)
294
298
  ),
295
- h.div(
299
+ g.div(
296
300
  l.class("bc-file-input__compact-file-info"),
297
- h.div(
301
+ g.div(
298
302
  l.class("bc-file-input__compact-file-name"),
299
- l.title(w.$.name),
300
- w.$.name
303
+ l.title(y.$.name),
304
+ y.$.name
301
305
  ),
302
- h.div(
306
+ g.div(
303
307
  l.class("bc-file-input__compact-file-meta"),
304
308
  V(
305
- w.$.size,
309
+ y.$.size,
306
310
  c.$.fileSizeUnits
307
311
  )((_, B) => De(_, { units: B })),
308
312
  " • ",
309
313
  V(
310
- w.$.type,
314
+ y.$.type,
311
315
  c.$.unknownType
312
316
  )((_, B) => _ || B)
313
317
  )
@@ -316,22 +320,22 @@ const St = (t, ...e) => {
316
320
  {
317
321
  size: "sm",
318
322
  label: c.$.removeFile,
319
- disabled: p,
320
- onClick: () => u(z)
323
+ disabled: b,
324
+ onClick: () => a(z)
321
325
  },
322
326
  l.class("bc-file-input__compact-remove-button")
323
327
  )
324
328
  );
325
329
  })
326
330
  ),
327
- () => h.div(
331
+ () => g.div(
328
332
  l.class("bc-file-input__compact-placeholder"),
329
333
  E({ icon: "mdi:cloud-upload-outline", size: "lg" }),
330
- h.div(
334
+ g.div(
331
335
  l.class("bc-file-input__compact-placeholder-text"),
332
336
  ie(c.$.filesInputInstructions)(
333
337
  r,
334
- b,
338
+ h,
335
339
  c.$.fileSizeUnits.value
336
340
  )
337
341
  )
@@ -342,31 +346,31 @@ const St = (t, ...e) => {
342
346
  files: k
343
347
  }) => O(
344
348
  F,
345
- (c) => h.div(
349
+ (c) => g.div(
346
350
  l.class("bc-file-input__compact-input"),
347
351
  U(
348
- k.map((w) => w.length > 0),
349
- () => h.span(
352
+ k.map((y) => y.length > 0),
353
+ () => g.span(
350
354
  l.class("bc-file-input__compact-value"),
351
355
  ee(
352
356
  k,
353
- (w) => h.span(
357
+ (y) => g.span(
354
358
  l.class("bc-file-input__compact-value-item"),
355
- me(w),
356
- h.span(
359
+ me(y),
360
+ g.span(
357
361
  l.class("bc-file-input__compact-value-item-name"),
358
- w.$.name
362
+ y.$.name
359
363
  )
360
364
  )
361
365
  )
362
366
  ),
363
- () => h.span(
367
+ () => g.span(
364
368
  l.class("bc-file-input__compact-placeholder"),
365
369
  E({ icon: "mdi:cloud-upload-outline", size: "md" }),
366
370
  " ",
367
371
  ie(c.$.filesInputInstructions)(
368
372
  r,
369
- b,
373
+ h,
370
374
  c.$.fileSizeUnits.value
371
375
  )
372
376
  )
@@ -377,87 +381,87 @@ const St = (t, ...e) => {
377
381
  F,
378
382
  (k) => W(
379
383
  {
380
- baseContainer: f.map(a, (c) => !c),
381
- disabled: p,
382
- hasError: v,
384
+ baseContainer: p.map(u, (c) => !c),
385
+ disabled: b,
386
+ hasError: w,
383
387
  after: U(
384
- a,
388
+ u,
385
389
  () => U(
386
- o.map(({ length: c }) => c > 0),
390
+ i.map(({ length: c }) => c > 0),
387
391
  () => oe(
388
392
  {
389
393
  size: "sm",
390
394
  label: k.$.clearAllFiles,
391
- disabled: p,
392
- onClick: x
395
+ disabled: b,
396
+ onClick: v
393
397
  },
394
398
  l.class("bc-file-input__compact-clear")
395
399
  )
396
400
  )
397
401
  ),
398
- ...y,
402
+ ...x,
399
403
  input: U(
400
- a,
401
- () => h.div(
404
+ u,
405
+ () => g.div(
402
406
  l.class("bc-file-input bc-file-input--input"),
403
407
  de({
404
- value: o,
408
+ value: i,
405
409
  accept: s,
406
410
  enableClick: !0,
407
- allowMultiple: f.map(r ?? 1 / 0, (c) => c > 1),
408
- disabled: p,
409
- onChange: M,
411
+ allowMultiple: p.map(r ?? 1 / 0, (c) => c > 1),
412
+ disabled: b,
413
+ onChange: S,
410
414
  content: A
411
415
  })
412
416
  ),
413
417
  () => U(
414
418
  D,
415
- () => h.div(
419
+ () => g.div(
416
420
  l.class("bc-file-input bc-file-input--compact"),
417
421
  de({
418
- value: o,
422
+ value: i,
419
423
  accept: s,
420
424
  enableClick: !0,
421
- allowMultiple: f.map(r ?? 1 / 0, (c) => c > 1),
422
- disabled: p,
423
- onChange: M,
425
+ allowMultiple: p.map(r ?? 1 / 0, (c) => c > 1),
426
+ disabled: b,
427
+ onChange: S,
424
428
  content: I
425
429
  })
426
430
  ),
427
- () => h.div(
431
+ () => g.div(
428
432
  l.class("bc-file-input"),
429
433
  de({
430
- value: o,
434
+ value: i,
431
435
  accept: s,
432
436
  enableClick: !0,
433
- allowMultiple: f.map(r ?? 1 / 0, (c) => c > 1),
434
- disabled: p,
435
- onChange: M,
437
+ allowMultiple: p.map(r ?? 1 / 0, (c) => c > 1),
438
+ disabled: b,
439
+ onChange: S,
436
440
  content: $
437
441
  }),
438
442
  U(
439
- m,
440
- () => Re(
441
- o,
443
+ d,
444
+ () => Ne(
445
+ i,
442
446
  () => N(
443
- h.div(
447
+ g.div(
444
448
  l.class("bc-file-input__file-list"),
445
- ee(o, (c, w) => {
446
- const T = w.index;
447
- return h.div(
449
+ ee(i, (c, y) => {
450
+ const T = y.index;
451
+ return g.div(
448
452
  l.class("bc-file-input__file-item"),
449
- h.div(
453
+ g.div(
450
454
  l.class("bc-file-input__file-icon"),
451
455
  me(c)
452
456
  ),
453
- h.div(
457
+ g.div(
454
458
  l.class("bc-file-input__file-info"),
455
- h.div(
459
+ g.div(
456
460
  l.class("bc-file-input__file-name"),
457
461
  l.title(c.$.name),
458
462
  c.$.name
459
463
  ),
460
- h.div(
464
+ g.div(
461
465
  l.class("bc-file-input__file-meta"),
462
466
  V(
463
467
  c.$.size,
@@ -476,8 +480,8 @@ const St = (t, ...e) => {
476
480
  {
477
481
  size: "sm",
478
482
  label: k.$.removeFile,
479
- disabled: p,
480
- onClick: () => u(T)
483
+ disabled: b,
484
+ onClick: () => a(T)
481
485
  },
482
486
  l.class("bc-file-input__remove-button")
483
487
  )
@@ -485,18 +489,18 @@ const St = (t, ...e) => {
485
489
  })
486
490
  ),
487
491
  U(
488
- o.map(({ length: c }) => c > 1),
489
- () => h.div(
492
+ i.map(({ length: c }) => c > 1),
493
+ () => g.div(
490
494
  l.class(
491
495
  "bc-file-input__clear-all-button-container"
492
496
  ),
493
- h.button(
497
+ g.button(
494
498
  l.type("button"),
495
499
  l.class("bc-file-input__clear-all-button"),
496
- l.disabled(p),
500
+ l.disabled(b),
497
501
  k.$.clearAllFiles,
498
502
  C.click((c) => {
499
- c.preventDefault(), c.stopPropagation(), x();
503
+ c.preventDefault(), c.stopPropagation(), v();
500
504
  })
501
505
  )
502
506
  )
@@ -512,117 +516,119 @@ const St = (t, ...e) => {
512
516
  )
513
517
  );
514
518
  };
515
- function Le(t, e, n) {
516
- const s = f.map(t, (i) => i != null), r = V(
519
+ function Ue(t, e, n) {
520
+ const s = p.map(t, (o) => o != null), r = V(
517
521
  s,
518
522
  e ?? !1
519
- )((i, g) => !i || g), b = ce.clearValue;
520
- return h.button(
523
+ )((o, m) => !o || m), h = ce.clearValue;
524
+ return g.button(
521
525
  l.type("button"),
522
526
  l.class("bc-input-container__reset"),
523
- J.label(b),
524
- l.title(b),
527
+ J.label(h),
528
+ l.title(h),
525
529
  l.disabled(r),
526
530
  E({ icon: "mdi:close", size: "sm" }),
527
- C.click((i) => {
528
- i.stopPropagation(), n?.(null);
531
+ C.click((o) => {
532
+ o.stopPropagation(), n?.(null);
529
533
  })
530
534
  );
531
535
  }
532
- const ge = "$$tts-exp-", lt = (t, e) => te((n) => {
536
+ const ge = "$$tts-exp-", rt = (t, e) => te((n) => {
533
537
  const s = `${ge}${t}`;
534
- return ne(f.on(e, (r) => Reflect.set(n, s, r)));
538
+ return ne(p.on(e, (r) => Reflect.set(n, s, r)));
535
539
  }), Tt = (t, e) => {
536
540
  const n = `${ge}${t}`;
537
541
  return (s) => {
538
542
  e(Reflect.get(s.target, n));
539
543
  };
540
- }, rt = (t, e) => {
544
+ }, $e = (t, e) => {
541
545
  const n = `${ge}${t}`;
542
546
  return (s) => {
543
- const r = s.target, b = r.selectedIndex, i = r.options[b];
544
- e(Reflect.get(i, n));
547
+ const r = s.target, h = r.selectedIndex, o = r.options[h];
548
+ e(Reflect.get(o, n));
545
549
  };
546
550
  };
547
- function $e(...t) {
548
- return h.div(l.class("bc-group"), ...t);
551
+ function Me(...t) {
552
+ return g.div(l.class("bc-group"), ...t);
549
553
  }
550
- const Ue = (t, e, n) => Pe(
554
+ const Ee = (t, e, n) => je(
551
555
  t,
552
- (s) => je(s, {
556
+ (s) => We(s, {
553
557
  value: (r) => {
554
- const b = V(
558
+ const h = V(
555
559
  r,
556
560
  n
557
- )((i, g) => e(i.value, g));
558
- return h.option(
559
- l.selected(b),
560
- lt("value", r.$.value),
561
+ )((o, m) => e(o.value, m));
562
+ return g.option(
563
+ l.selected(h),
564
+ rt("value", r.$.value),
561
565
  r.$.label
562
566
  );
563
567
  },
564
- group: (r) => h.optgroup(
568
+ group: (r) => g.optgroup(
565
569
  l.label(r.$.group),
566
570
  ee(
567
571
  r.$.options,
568
- (b) => Ue(
569
- b,
572
+ (h) => Ee(
573
+ h,
570
574
  e,
571
575
  n
572
576
  )
573
577
  )
574
578
  ),
575
- break: () => h.hr()
579
+ break: () => g.hr()
576
580
  })
577
581
  ), it = (t) => {
578
582
  const {
579
583
  value: e,
580
584
  onBlur: n,
581
585
  onChange: s,
582
- options: r,
583
- unselectedLabel: b,
584
- equality: i = (v, d) => v === d,
585
- after: g
586
+ onInput: r,
587
+ options: h,
588
+ unselectedLabel: o,
589
+ equality: m = (f, d) => f === d,
590
+ after: b
586
591
  } = t;
587
- let p;
592
+ let w;
588
593
  return W(
589
594
  {
590
595
  ...t,
591
596
  after: N(
592
- Ye({
597
+ Ge({
593
598
  icon: "ph:caret-down-bold",
594
599
  color: "neutral",
595
600
  size: "sm"
596
601
  }),
597
- g
602
+ b
598
603
  ),
599
- input: h.select(
600
- te((v) => {
601
- p = v;
602
- const d = new MutationObserver((m) => {
603
- const { removedNodes: y } = m[0];
604
- y.length > 0 && (p.selectedIndex = 0);
604
+ input: g.select(
605
+ te((f) => {
606
+ w = f;
607
+ const d = new MutationObserver((x) => {
608
+ const { removedNodes: i } = x[0];
609
+ i.length > 0 && (w.selectedIndex = 0);
605
610
  });
606
- return d.observe(v, { childList: !0 }), ne(() => d.disconnect());
611
+ return d.observe(f, { childList: !0 }), ne(() => d.disconnect());
607
612
  }),
608
613
  q(t),
609
614
  l.class("bc-native-select bc-input"),
610
615
  O(
611
616
  F,
612
- (v) => h.option(
617
+ (f) => g.option(
613
618
  l.hidden("hidden"),
614
- Ne(b, v.$.selectOne)
619
+ Pe(o, f.$.selectOne)
615
620
  )
616
621
  ),
617
- ee(r, (v) => Ue(v, i, e)),
618
- n != null ? C.blur(n) : S,
619
- s != null ? C.change(rt("value", (v) => s(v))) : S
622
+ ee(h, (f) => Ee(f, m, e)),
623
+ n != null ? C.blur(n) : M,
624
+ s != null ? C.change($e("value", (f) => s(f))) : M,
625
+ r != null ? C.input($e("value", (f) => r(f))) : M
620
626
  )
621
627
  },
622
628
  C.click(() => {
623
- if (p?.focus(), typeof p?.showPicker == "function")
629
+ if (w?.focus(), typeof w?.showPicker == "function")
624
630
  try {
625
- p.showPicker();
631
+ w.showPicker();
626
632
  } catch {
627
633
  }
628
634
  })
@@ -633,33 +639,33 @@ function ot(t) {
633
639
  return it({
634
640
  ...r,
635
641
  value: e.signal,
636
- onChange: Xe(e, n),
637
- onBlur: Je(e, s)
642
+ onChange: Qe(e, n),
643
+ onBlur: Xe(e, s)
638
644
  });
639
645
  }
640
646
  function zt(t) {
641
- return Ve({
647
+ return Ae({
642
648
  ...t,
643
649
  content: ot(t)
644
650
  });
645
651
  }
646
652
  function ct(t, e, n) {
647
653
  const s = t.length.map((r) => r);
648
- return We(
654
+ return Ze(
649
655
  s,
650
656
  (r) => {
651
- const b = t.item(r.index), i = [];
657
+ const h = t.item(r.index), o = [];
652
658
  return N(
653
659
  ne(() => {
654
- i.forEach((g) => g());
660
+ o.forEach((m) => m());
655
661
  }),
656
662
  e({
657
663
  list: t,
658
- item: b,
664
+ item: h,
659
665
  position: r,
660
666
  remove: () => t.removeAt(r.index),
661
- move: (g) => {
662
- switch (g) {
667
+ move: (m) => {
668
+ switch (m) {
663
669
  case "up":
664
670
  if (r.index === 0) return;
665
671
  t.move(r.index, r.index - 1);
@@ -675,27 +681,27 @@ function ct(t, e, n) {
675
681
  t.move(r.index, t.length.value - 1);
676
682
  }
677
683
  },
678
- canMove: (g) => {
679
- const p = (() => {
680
- switch (g) {
684
+ canMove: (m) => {
685
+ const b = (() => {
686
+ switch (m) {
681
687
  case "up":
682
688
  return _e(r.index > 0);
683
689
  case "down":
684
- return t.length.map((v) => r.index < v - 1);
690
+ return t.length.map((w) => r.index < w - 1);
685
691
  }
686
692
  })();
687
- return i.push(() => p.dispose()), p;
693
+ return o.push(() => b.dispose()), b;
688
694
  },
689
- cannotMove: (g) => {
690
- const p = (() => {
691
- switch (g) {
695
+ cannotMove: (m) => {
696
+ const b = (() => {
697
+ switch (m) {
692
698
  case "up":
693
699
  return _e(r.index === 0);
694
700
  case "down":
695
- return t.length.map((v) => r.index === v - 1);
701
+ return t.length.map((w) => r.index === w - 1);
696
702
  }
697
703
  })();
698
- return i.push(() => p.dispose()), p;
704
+ return o.push(() => b.dispose()), b;
699
705
  }
700
706
  })
701
707
  );
@@ -703,27 +709,27 @@ function ct(t, e, n) {
703
709
  n
704
710
  );
705
711
  }
706
- const Me = {
712
+ const Se = {
707
713
  9: { pattern: /^[0-9]$/ },
708
714
  A: { pattern: /^[A-Za-z]$/, transform: (t) => t.toUpperCase() },
709
715
  "*": { pattern: /^.$/ }
710
716
  }, at = (t) => t instanceof RegExp;
711
- function Ee(t, e, n) {
717
+ function Oe(t, e, n) {
712
718
  if (t == null) return [];
713
- const s = n ? { ...Me, ...e } : e ?? Me, r = (i, g) => {
714
- const p = s[g];
715
- p ? i.push({ type: "pattern", name: g, ...p }) : i.push({ type: "literal", char: g });
716
- }, b = [];
719
+ const s = n ? { ...Se, ...e } : e ?? Se, r = (o, m) => {
720
+ const b = s[m];
721
+ b ? o.push({ type: "pattern", name: m, ...b }) : o.push({ type: "literal", char: m });
722
+ }, h = [];
717
723
  if (typeof t == "string") {
718
- for (const i of t) r(b, i);
719
- return b;
724
+ for (const o of t) r(h, o);
725
+ return h;
720
726
  }
721
- for (const i of t)
722
- if (typeof i == "string")
723
- if (i.length <= 1) r(b, i);
724
- else for (const g of i) r(b, g);
725
- else at(i) ? b.push({ type: "pattern", pattern: i }) : typeof i == "object" && i && b.push(i);
726
- return b;
727
+ for (const o of t)
728
+ if (typeof o == "string")
729
+ if (o.length <= 1) r(h, o);
730
+ else for (const m of o) r(h, m);
731
+ else at(o) ? h.push({ type: "pattern", pattern: o }) : typeof o == "object" && o && h.push(o);
732
+ return h;
727
733
  }
728
734
  function ut(t, e) {
729
735
  return (n) => {
@@ -741,117 +747,117 @@ function ut(t, e) {
741
747
  }
742
748
  };
743
749
  }
744
- function Se(t, e, n, s, r, b) {
745
- const i = {
750
+ function Te(t, e, n, s, r, h) {
751
+ const o = {
746
752
  raw: t,
747
753
  previousConformed: e,
748
754
  cursor: r ?? t.length,
749
755
  completed: !1
750
- }, g = s.definitions ?? {}, p = typeof n == "function" ? n(t, i) : n, v = Ee(
751
- p,
752
- g,
756
+ }, m = s.definitions ?? {}, b = typeof n == "function" ? n(t, o) : n, w = Oe(
757
+ b,
758
+ m,
753
759
  s.useDefaultDefinitions ?? !0
754
- ), d = ut(s.allowMode, s.allow), m = /* @__PURE__ */ new Set();
755
- for (const _ of v) _.type === "literal" && m.add(_.char);
756
- if (s.prefix) for (const _ of s.prefix) m.add(_);
757
- if (s.suffix) for (const _ of s.suffix) m.add(_);
758
- const y = Array.from(t).filter((_) => d(_) && !m.has(_));
759
- if (y.length === 0) return { value: "", cursor: 0, completed: !1 };
760
- const o = [], a = [];
761
- let D = 0, M = 0, u = 0, x = -1;
762
- for (const _ of v) {
760
+ ), f = ut(s.allowMode, s.allow), d = /* @__PURE__ */ new Set();
761
+ for (const _ of w) _.type === "literal" && d.add(_.char);
762
+ if (s.prefix) for (const _ of s.prefix) d.add(_);
763
+ if (s.suffix) for (const _ of s.suffix) d.add(_);
764
+ const x = Array.from(t).filter((_) => f(_) && !d.has(_));
765
+ if (x.length === 0) return { value: "", cursor: 0, completed: !1 };
766
+ const i = [], u = [];
767
+ let D = 0, S = 0, a = 0, v = -1;
768
+ for (const _ of w) {
763
769
  if (_.type === "literal") {
764
- o.push(_.char), a.push({ kind: "literal", filled: !0 });
770
+ i.push(_.char), u.push({ kind: "literal", filled: !0 });
765
771
  continue;
766
772
  }
767
- M += _.optional ? 0 : 1;
768
- const B = y[D];
773
+ S += _.optional ? 0 : 1;
774
+ const B = x[D];
769
775
  if (B == null)
770
776
  break;
771
777
  if (_.type === "any") {
772
- u++, o.push(_.transform ? _.transform(B) : B), a.push({ kind: "slot", filled: !0 }), x = a.length - 1, D++;
778
+ a++, i.push(_.transform ? _.transform(B) : B), u.push({ kind: "slot", filled: !0 }), v = u.length - 1, D++;
773
779
  continue;
774
780
  }
775
781
  if (_.type === "pattern")
776
782
  if (_.pattern.test(B)) {
777
- u++;
783
+ a++;
778
784
  const R = _.transform ? _.transform(B) : B;
779
- o.push(R), a.push({ kind: "slot", filled: !0 }), x = a.length - 1, D++;
785
+ i.push(R), u.push({ kind: "slot", filled: !0 }), v = u.length - 1, D++;
780
786
  } else {
781
787
  D++;
782
788
  continue;
783
789
  }
784
790
  }
785
- const $ = o.join(""), I = (s.prefix ?? "") + $ + (s.suffix ?? "");
791
+ const $ = i.join(""), I = (s.prefix ?? "") + $ + (s.suffix ?? "");
786
792
  let k = (s.prefix ?? "").length;
787
- if (x >= 0) {
788
- let _ = x + 1;
789
- if ((b?.policy ?? "smart") !== "sticky")
790
- for (; _ < a.length && a[_].kind === "literal"; ) _++;
793
+ if (v >= 0) {
794
+ let _ = v + 1;
795
+ if ((h?.policy ?? "smart") !== "sticky")
796
+ for (; _ < u.length && u[_].kind === "literal"; ) _++;
791
797
  k += _;
792
798
  }
793
- const c = s.completion?.mode === "min" ? (s.completion.minChars ?? 0) <= u : s.completion?.mode === "custom" ? !!s.completion.isComplete?.(I) : M > 0 && u >= M, w = s.pipe?.(I, { ...i, completed: c });
799
+ const c = s.completion?.mode === "min" ? (s.completion.minChars ?? 0) <= a : s.completion?.mode === "custom" ? !!s.completion.isComplete?.(I) : S > 0 && a >= S, y = s.pipe?.(I, { ...o, completed: c });
794
800
  let T, z = k;
795
- return w === !1 ? (T = e, z = e.length) : typeof w == "string" ? (T = w, z = w.length) : typeof w == "object" && w ? (T = w.value, z = w.cursor ?? w.value.length) : T = I, { value: T, cursor: z, completed: c };
801
+ return y === !1 ? (T = e, z = e.length) : typeof y == "string" ? (T = y, z = y.length) : typeof y == "object" && y ? (T = y.value, z = y.cursor ?? y.value.length) : T = I, { value: T, cursor: z, completed: c };
796
802
  }
797
803
  function ft(t, e) {
798
804
  const n = e?.strategy ?? "none";
799
805
  return n === "custom" && e?.unmask ? e.unmask(t) : n === "strip" ? t.replace(/[^A-Za-z0-9]/g, "") : t;
800
806
  }
801
- const Oe = (t) => {
807
+ const Fe = (t) => {
802
808
  const {
803
809
  value: e,
804
810
  onBlur: n,
805
811
  onChange: s,
806
812
  onInput: r,
807
- onAccept: b,
808
- onComplete: i,
809
- mask: g,
810
- definitions: p,
811
- useDefaultDefinitions: v,
812
- extraLiterals: d,
813
- prefix: m,
814
- suffix: y,
815
- autofix: o,
816
- pipe: a,
813
+ onAccept: h,
814
+ onComplete: o,
815
+ mask: m,
816
+ definitions: b,
817
+ useDefaultDefinitions: w,
818
+ extraLiterals: f,
819
+ prefix: d,
820
+ suffix: x,
821
+ autofix: i,
822
+ pipe: u,
817
823
  completion: D,
818
- unmask: M,
819
- allowMode: u,
820
- allow: x,
824
+ unmask: S,
825
+ allowMode: a,
826
+ allow: v,
821
827
  placeholder: $,
822
828
  placeholderOptions: I
823
829
  } = t, A = V(
824
830
  e,
825
- g,
826
- p,
827
- v,
828
- d,
829
831
  m,
830
- y,
831
- o,
832
+ b,
833
+ w,
834
+ f,
835
+ d,
836
+ x,
837
+ i,
832
838
  D,
833
- M,
834
- u,
839
+ S,
840
+ a,
835
841
  $,
836
842
  I
837
- )((c, w, T, z, _, B, R, X, Q, Y, Z, le, j) => w ? Se(c ?? "", "", w, {
843
+ )((c, y, T, z, _, B, R, X, Q, Y, Z, le, j) => y ? Te(c ?? "", "", y, {
838
844
  definitions: T ?? {},
839
845
  useDefaultDefinitions: z ?? !0,
840
846
  extraLiterals: _ ?? [],
841
847
  autofix: X ?? "none",
842
848
  completion: Q ?? { mode: "mask" },
843
- pipe: a ?? ((L) => L),
849
+ pipe: u ?? ((L) => L),
844
850
  unmask: Y ?? { strategy: "none" },
845
851
  allowMode: Z ?? "all",
846
- allow: x,
852
+ allow: v,
847
853
  prefix: B,
848
854
  suffix: R
849
- }).value : c ?? ""), k = (c, w) => {
850
- const T = c.value ?? "", z = f.get(e) ?? "", _ = g != null ? f.get(g) : null, B = p != null ? f.get(p) : void 0, R = v != null ? f.get(v) : void 0, X = d != null ? f.get(d) : void 0, Q = o != null ? f.get(o) : void 0, Y = D != null ? f.get(D) : void 0, Z = M != null ? f.get(M) : void 0, le = u != null ? f.get(u) : void 0, j = m != null ? f.get(m) : void 0, L = y != null ? f.get(y) : void 0, {
855
+ }).value : c ?? ""), k = (c, y) => {
856
+ const T = c.value ?? "", z = p.get(e) ?? "", _ = m != null ? p.get(m) : null, B = b != null ? p.get(b) : void 0, R = w != null ? p.get(w) : void 0, X = f != null ? p.get(f) : void 0, Q = i != null ? p.get(i) : void 0, Y = D != null ? p.get(D) : void 0, Z = S != null ? p.get(S) : void 0, le = a != null ? p.get(a) : void 0, j = d != null ? p.get(d) : void 0, L = x != null ? p.get(x) : void 0, {
851
857
  value: H,
852
858
  cursor: ue,
853
859
  completed: ve
854
- } = _ ? Se(
860
+ } = _ ? Te(
855
861
  T,
856
862
  z,
857
863
  _,
@@ -861,15 +867,15 @@ const Oe = (t) => {
861
867
  extraLiterals: X ?? [],
862
868
  autofix: Q ?? "none",
863
869
  completion: Y ?? { mode: "mask" },
864
- pipe: a ?? ((Fe) => Fe),
870
+ pipe: u ?? ((Re) => Re),
865
871
  unmask: Z ?? { strategy: "none" },
866
872
  allowMode: le ?? "all",
867
- allow: x,
873
+ allow: v,
868
874
  prefix: j,
869
875
  suffix: L
870
876
  },
871
877
  c.selectionStart ?? T.length,
872
- t.cursor ? f.get(t.cursor) : void 0
878
+ t.cursor ? p.get(t.cursor) : void 0
873
879
  ) : { value: T, cursor: T.length, completed: !0 };
874
880
  if (H !== T) {
875
881
  c.value = H;
@@ -879,12 +885,12 @@ const Oe = (t) => {
879
885
  }
880
886
  }
881
887
  const xe = ft(H, Z);
882
- b?.({
888
+ h?.({
883
889
  raw: xe,
884
890
  conformed: H,
885
891
  completed: ve,
886
892
  cursor: ue
887
- }), w === "input" ? r?.(H) : (s?.(H), ve && i?.({ raw: xe, conformed: H }));
893
+ }), y === "input" ? r?.(H) : (s?.(H), ve && o?.({ raw: xe, conformed: H }));
888
894
  };
889
895
  return W({
890
896
  ...t,
@@ -892,18 +898,18 @@ const Oe = (t) => {
892
898
  q(t),
893
899
  l.value(A),
894
900
  l.class("bc-input"),
895
- n != null ? C.blur(n) : S,
901
+ n != null ? C.blur(n) : M,
896
902
  te(
897
903
  (c) => c instanceof HTMLInputElement ? N(
898
904
  C.input(() => k(c, "input")),
899
905
  C.change(() => k(c, "change")),
900
- C.keydown((w) => {
901
- if (w.key !== "Backspace" || !(t.cursor ? f.get(t.cursor)?.backspaceRubberBand ?? !0 : !0)) return;
906
+ C.keydown((y) => {
907
+ if (y.key !== "Backspace" || !(t.cursor ? p.get(t.cursor)?.backspaceRubberBand ?? !0 : !0)) return;
902
908
  const z = c.selectionStart ?? 0, _ = c.selectionEnd ?? z;
903
909
  if (z !== _ || z <= 0) return;
904
- const B = c.value ?? "", R = g != null ? f.get(g) : null;
910
+ const B = c.value ?? "", R = m != null ? p.get(m) : null;
905
911
  if (!R) return;
906
- const X = p != null ? f.get(p) : void 0, Q = v != null ? f.get(v) : !0, Y = m != null ? f.get(m) : void 0, Z = y != null ? f.get(y) : void 0, le = Ee(
912
+ const X = b != null ? p.get(b) : void 0, Q = w != null ? p.get(w) : !0, Y = d != null ? p.get(d) : void 0, Z = x != null ? p.get(x) : void 0, le = Oe(
907
913
  typeof R == "function" ? R(B, {
908
914
  raw: B,
909
915
  previousConformed: B,
@@ -920,34 +926,34 @@ const Oe = (t) => {
920
926
  if (j.has(B[z - 1])) {
921
927
  let L = z - 1;
922
928
  for (; L >= 0 && j.has(B[L]); ) L--;
923
- L >= 0 && (w.preventDefault(), w.stopPropagation(), c.value = B.slice(0, L) + B.slice(L + 1), k(c, "input"));
929
+ L >= 0 && (y.preventDefault(), y.stopPropagation(), c.value = B.slice(0, L) + B.slice(L + 1), k(c, "input"));
924
930
  }
925
931
  })
926
- ) : S
932
+ ) : M
927
933
  )
928
934
  )
929
935
  });
930
936
  }, Bt = (t) => {
931
- const { value: e, onBlur: n, onChange: s, onInput: r, rows: b } = t;
937
+ const { value: e, onBlur: n, onChange: s, onInput: r, rows: h } = t;
932
938
  return W({
933
939
  baseContainer: !0,
934
940
  ...t,
935
- input: h.textarea(
941
+ input: g.textarea(
936
942
  l.class(
937
943
  V(t.size ?? "md")(
938
- (i) => Ge(
944
+ (o) => Je(
939
945
  !1,
940
- i ?? "md"
946
+ o ?? "md"
941
947
  )
942
948
  )
943
949
  ),
944
950
  q(t),
945
- l.rows(b ?? 3),
951
+ l.rows(h ?? 3),
946
952
  l.value(e),
947
953
  l.class("bc-input"),
948
- n != null ? C.blur(P(n)) : S,
949
- s != null ? C.change(P(s)) : S,
950
- r != null ? C.input(P(r)) : S
954
+ n != null ? C.blur(P(n)) : M,
955
+ s != null ? C.change(P(s)) : M,
956
+ r != null ? C.input(P(r)) : M
951
957
  )
952
958
  });
953
959
  };
@@ -962,150 +968,150 @@ function G(t, e) {
962
968
  return Math.round(t * s) / s;
963
969
  }
964
970
  const Vt = (t) => {
965
- const { value: e, step: n, min: s, max: r, onBlur: b, onChange: i, onInput: g, after: p } = t, v = (y) => {
966
- const o = s != null ? f.get(s) : void 0, a = r != null ? f.get(r) : void 0;
967
- return o != null && y < o ? o : a != null && y > a ? a : y;
968
- }, d = n != null ? O(F, (y) => {
969
- const o = V(
971
+ const { value: e, step: n, min: s, max: r, onBlur: h, onChange: o, onInput: m, after: b } = t, w = (x) => {
972
+ const i = s != null ? p.get(s) : void 0, u = r != null ? p.get(r) : void 0;
973
+ return i != null && x < i ? i : u != null && x > u ? u : x;
974
+ }, f = n != null ? O(F, (x) => {
975
+ const i = V(
970
976
  e,
971
977
  s
972
- )((u, x) => x == null ? !0 : (u ?? 0) > x), a = V(
978
+ )((a, v) => v == null ? !0 : (a ?? 0) > v), u = V(
973
979
  e,
974
980
  r
975
- )((u, x) => x == null ? !0 : (u ?? 0) < x), D = (u) => {
976
- const x = f.get(e) ?? 0, $ = f.get(n), I = u?.shiftKey ? 10 : 1, A = G(
977
- x - $ * I,
981
+ )((a, v) => v == null ? !0 : (a ?? 0) < v), D = (a) => {
982
+ const v = p.get(e) ?? 0, $ = p.get(n), I = a?.shiftKey ? 10 : 1, A = G(
983
+ v - $ * I,
978
984
  $
979
- ), k = s != null ? f.get(s) : void 0;
985
+ ), k = s != null ? p.get(s) : void 0;
980
986
  if (k != null && A < k)
981
987
  return;
982
- const c = v(A);
983
- c !== x && i && i(c);
984
- }, M = (u) => {
985
- const x = f.get(e) ?? 0, $ = f.get(n), I = u?.shiftKey ? 10 : 1, A = G(
986
- x + $ * I,
988
+ const c = w(A);
989
+ c !== v && (o?.(c), m?.(c));
990
+ }, S = (a) => {
991
+ const v = p.get(e) ?? 0, $ = p.get(n), I = a?.shiftKey ? 10 : 1, A = G(
992
+ v + $ * I,
987
993
  $
988
- ), k = r != null ? f.get(r) : void 0;
994
+ ), k = r != null ? p.get(r) : void 0;
989
995
  if (k != null && A > k)
990
996
  return;
991
- const c = v(A);
992
- c !== x && i && i(c);
997
+ const c = w(A);
998
+ c !== v && (o?.(c), m?.(c));
993
999
  };
994
- return Ae(
1000
+ return Le(
995
1001
  l.class("bc-number-input-steppers"),
996
1002
  // Increment second
997
- h.button(
1003
+ g.button(
998
1004
  l.type("button"),
999
1005
  l.class(
1000
1006
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
1001
1007
  ),
1002
1008
  l.disabled(
1003
1009
  V(
1004
- a,
1010
+ u,
1005
1011
  t.disabled ?? !1
1006
- )((u, x) => !u || x)
1012
+ )((a, v) => !a || v)
1007
1013
  ),
1008
- C.click((u) => M(u)),
1009
- J.label(y.$.incrementValue),
1014
+ C.click((a) => S(a)),
1015
+ J.label(x.$.incrementValue),
1010
1016
  E({ icon: "line-md:plus", size: "xs" })
1011
1017
  ),
1012
1018
  // Decrement first (matches tests expecting first button to be decrement)
1013
- h.button(
1019
+ g.button(
1014
1020
  l.type("button"),
1015
1021
  l.class(
1016
1022
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
1017
1023
  ),
1018
1024
  l.disabled(
1019
1025
  V(
1020
- o,
1026
+ i,
1021
1027
  t.disabled ?? !1
1022
- )((u, x) => !u || x)
1028
+ )((a, v) => !a || v)
1023
1029
  ),
1024
- C.click((u) => D(u)),
1025
- J.label(y.$.decrementValue),
1030
+ C.click((a) => D(a)),
1031
+ J.label(x.$.decrementValue),
1026
1032
  E({ icon: "line-md:minus", size: "xs" })
1027
1033
  )
1028
1034
  );
1029
- }) : null, m = p != null && d != null ? N(d, p) : p ?? d;
1035
+ }) : null, d = b != null && f != null ? N(f, b) : b ?? f;
1030
1036
  return W({
1031
1037
  ...t,
1032
1038
  input: se.number(
1033
- s != null ? l.min(s) : S,
1034
- r != null ? l.max(r) : S,
1039
+ s != null ? l.min(s) : M,
1040
+ r != null ? l.max(r) : M,
1035
1041
  q(t),
1036
1042
  l.valueAsNumber(e),
1037
1043
  l.step(n),
1038
1044
  l.class("bc-input bc-number-input"),
1039
- b != null ? C.blur(P(b)) : S,
1040
- i != null ? C.change(ke(i)) : S,
1041
- g != null ? C.input(ke(g)) : S,
1045
+ h != null ? C.blur(P(h)) : M,
1046
+ o != null ? C.change(ke(o)) : M,
1047
+ m != null ? C.input(ke(m)) : M,
1042
1048
  // Add wheel event support when step is defined
1043
- n != null ? C.wheel((y) => {
1044
- y.preventDefault();
1045
- const o = f.get(e) ?? 0, a = f.get(n), D = y.shiftKey ? 10 : 1, M = y.deltaY < 0 ? a * D : -a * D, u = v(G(o + M, a));
1046
- u !== o && i && i(u);
1047
- }) : S
1049
+ n != null ? C.wheel((x) => {
1050
+ x.preventDefault();
1051
+ const i = p.get(e) ?? 0, u = p.get(n), D = x.shiftKey ? 10 : 1, S = x.deltaY < 0 ? u * D : -u * D, a = w(G(i + S, u));
1052
+ a !== i && (o?.(a), m?.(a));
1053
+ }) : M
1048
1054
  ),
1049
- after: m
1055
+ after: d
1050
1056
  });
1051
- }, Te = (t) => {
1057
+ }, ze = (t) => {
1052
1058
  if (t == null || t === "") return null;
1053
1059
  const e = Number(t);
1054
1060
  return Number.isNaN(e) ? null : e;
1055
1061
  }, At = (t) => {
1056
- const { value: e, step: n, min: s, max: r, onBlur: b, onChange: i, onInput: g, after: p } = t, v = (o) => {
1057
- const a = s != null ? f.get(s) : void 0, D = r != null ? f.get(r) : void 0;
1058
- return a != null && o < a ? a : D != null && o > D ? D : o;
1059
- }, d = (() => {
1062
+ const { value: e, step: n, min: s, max: r, onBlur: h, onChange: o, onInput: m, after: b } = t, w = (i) => {
1063
+ const u = s != null ? p.get(s) : void 0, D = r != null ? p.get(r) : void 0;
1064
+ return u != null && i < u ? u : D != null && i > D ? D : i;
1065
+ }, f = (() => {
1060
1066
  if (n == null) return null;
1061
- const o = V(
1067
+ const i = V(
1062
1068
  e,
1063
1069
  s
1064
- )((x, $) => {
1065
- const I = x ?? 0;
1070
+ )((v, $) => {
1071
+ const I = v ?? 0;
1066
1072
  return $ == null ? !0 : I > $;
1067
- }), a = V(
1073
+ }), u = V(
1068
1074
  e,
1069
1075
  r
1070
- )((x, $) => {
1071
- const I = x ?? 0;
1076
+ )((v, $) => {
1077
+ const I = v ?? 0;
1072
1078
  return $ == null ? !0 : I < $;
1073
- }), D = (x) => {
1074
- const $ = f.get(e) ?? 0, I = f.get(n), A = x?.shiftKey ? 10 : 1, k = G($ - I * A, I), c = s != null ? f.get(s) : void 0;
1079
+ }), D = (v) => {
1080
+ const $ = p.get(e) ?? 0, I = p.get(n), A = v?.shiftKey ? 10 : 1, k = G($ - I * A, I), c = s != null ? p.get(s) : void 0;
1075
1081
  if (c != null && k < c) return;
1076
- const w = v(k);
1077
- w !== $ && i && i(w);
1078
- }, M = (x) => {
1079
- const $ = f.get(e) ?? 0, I = f.get(n), A = x?.shiftKey ? 10 : 1, k = G($ + I * A, I), c = r != null ? f.get(r) : void 0;
1082
+ const y = w(k);
1083
+ y !== $ && (o?.(y), m?.(y));
1084
+ }, S = (v) => {
1085
+ const $ = p.get(e) ?? 0, I = p.get(n), A = v?.shiftKey ? 10 : 1, k = G($ + I * A, I), c = r != null ? p.get(r) : void 0;
1080
1086
  if (c != null && k > c) return;
1081
- const w = v(k);
1082
- w !== $ && i && i(w);
1087
+ const y = w(k);
1088
+ y !== $ && (o?.(y), m?.(y));
1083
1089
  };
1084
- return ((x, $) => Ae(
1090
+ return ((v, $) => Le(
1085
1091
  l.class("bc-number-input-steppers"),
1086
- h.button(
1092
+ g.button(
1087
1093
  l.type("button"),
1088
1094
  l.class(
1089
1095
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
1090
1096
  ),
1091
1097
  l.disabled(
1092
1098
  V(
1093
- a,
1099
+ u,
1094
1100
  t.disabled ?? !1
1095
1101
  )((I, A) => !I || A)
1096
1102
  ),
1097
- C.click((I) => M(I)),
1098
- J.label(x),
1103
+ C.click((I) => S(I)),
1104
+ J.label(v),
1099
1105
  E({ icon: "line-md:plus", size: "xs" })
1100
1106
  ),
1101
- h.button(
1107
+ g.button(
1102
1108
  l.type("button"),
1103
1109
  l.class(
1104
1110
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
1105
1111
  ),
1106
1112
  l.disabled(
1107
1113
  V(
1108
- o,
1114
+ i,
1109
1115
  t.disabled ?? !1
1110
1116
  )((I, A) => !I || A)
1111
1117
  ),
@@ -1117,43 +1123,43 @@ const Vt = (t) => {
1117
1123
  ce.incrementValue,
1118
1124
  ce.decrementValue
1119
1125
  );
1120
- })(), m = Le(
1126
+ })(), d = Ue(
1121
1127
  e,
1122
1128
  t.disabled,
1123
- i ?? g
1124
- ), y = p != null && d != null ? N(d, m, p) : p != null ? N(m, p) : d != null ? N(d, m) : m;
1129
+ o ?? m
1130
+ ), x = b != null && f != null ? N(f, d, b) : b != null ? N(d, b) : f != null ? N(f, d) : d;
1125
1131
  return W({
1126
1132
  ...t,
1127
1133
  input: se.number(
1128
1134
  // min/max attributes and reactive watchers (no forced correction)
1129
- s != null ? l.min(s) : S,
1130
- r != null ? l.max(r) : S,
1135
+ s != null ? l.min(s) : M,
1136
+ r != null ? l.max(r) : M,
1131
1137
  q(t),
1132
1138
  // Represent null as empty string so the field can be cleared
1133
- l.value(f.map(e, (o) => o == null ? "" : String(o))),
1139
+ l.value(p.map(e, (i) => i == null ? "" : String(i))),
1134
1140
  l.step(n),
1135
1141
  l.class("bc-input bc-number-input"),
1136
- b != null ? C.blur(P(b)) : S,
1137
- i != null ? C.change(
1138
- P((o) => {
1139
- const a = Te(o);
1140
- i(a);
1142
+ h != null ? C.blur(P(h)) : M,
1143
+ o != null ? C.change(
1144
+ P((i) => {
1145
+ const u = ze(i);
1146
+ o(u);
1141
1147
  })
1142
- ) : S,
1143
- g != null ? C.input(
1144
- P((o) => {
1145
- const a = Te(o);
1146
- g(a);
1148
+ ) : M,
1149
+ m != null ? C.input(
1150
+ P((i) => {
1151
+ const u = ze(i);
1152
+ m(u);
1147
1153
  })
1148
- ) : S,
1154
+ ) : M,
1149
1155
  // Wheel support when step is defined
1150
- n != null ? C.wheel((o) => {
1151
- o.preventDefault();
1152
- const a = f.get(e) ?? 0, D = f.get(n), M = o.shiftKey ? 10 : 1, u = o.deltaY < 0 ? D * M : -D * M, x = v(G(a + u, D));
1153
- x !== a && i && i(x);
1154
- }) : S
1156
+ n != null ? C.wheel((i) => {
1157
+ i.preventDefault();
1158
+ const u = p.get(e) ?? 0, D = p.get(n), S = i.shiftKey ? 10 : 1, a = i.deltaY < 0 ? D * S : -D * S, v = w(G(u + a, D));
1159
+ v !== u && (o?.(v), m?.(v));
1160
+ }) : M
1155
1161
  ),
1156
- after: y
1162
+ after: x
1157
1163
  });
1158
1164
  }, Lt = (t) => {
1159
1165
  const e = {
@@ -1161,7 +1167,7 @@ const Vt = (t) => {
1161
1167
  pattern: /[0-9A-Fa-f]/,
1162
1168
  transform: (s) => s.toLowerCase()
1163
1169
  };
1164
- return Oe({
1170
+ return Fe({
1165
1171
  ...t,
1166
1172
  mask: [
1167
1173
  e,
@@ -1228,7 +1234,7 @@ function bt(t) {
1228
1234
  }
1229
1235
  };
1230
1236
  }
1231
- const ze = (t, e) => {
1237
+ const Be = (t, e) => {
1232
1238
  if (t == null) return null;
1233
1239
  try {
1234
1240
  return t.Duration.from(e);
@@ -1236,35 +1242,35 @@ const ze = (t, e) => {
1236
1242
  return null;
1237
1243
  }
1238
1244
  }, Ut = (t) => {
1239
- const { value: e, onChange: n, onInput: s, after: r, disabled: b, onBlur: i } = t, g = () => {
1240
- const d = Le(e, b, n ?? s);
1241
- return r != null ? N(d, r) : d;
1242
- }, p = t.placeholder != null ? S : l.placeholder("P0DT0H0M0S");
1243
- return Qe(
1244
- (d) => Oe({
1245
+ const { value: e, onChange: n, onInput: s, after: r, disabled: h, onBlur: o } = t, m = () => {
1246
+ const f = Ue(e, h, n ?? s);
1247
+ return r != null ? N(f, r) : f;
1248
+ }, b = t.placeholder != null ? M : l.placeholder("P0DT0H0M0S");
1249
+ return Ke(
1250
+ (f) => Fe({
1245
1251
  ...t,
1246
- value: f.map(e, (m) => m?.toString() ?? ""),
1247
- onChange: n ? (m) => n(m === "" ? null : d.Duration.from(m)) : void 0,
1252
+ value: p.map(e, (d) => d?.toString() ?? ""),
1253
+ onChange: n ? (d) => n(d === "" ? null : f.Duration.from(d)) : void 0,
1248
1254
  onInput: void 0,
1249
- ...bt(d.Duration.from),
1255
+ ...bt(f.Duration.from),
1250
1256
  placeholder: "P0DT0H0M0S",
1251
- after: g()
1257
+ after: m()
1252
1258
  }),
1253
1259
  { pending: () => {
1254
- const d = (m) => (y) => {
1255
- const a = y.currentTarget?.value ?? "";
1256
- if (a === "") {
1257
- m(null);
1260
+ const f = (d) => (x) => {
1261
+ const u = x.currentTarget?.value ?? "";
1262
+ if (u === "") {
1263
+ d(null);
1258
1264
  return;
1259
1265
  }
1260
- const D = globalThis.Temporal, M = ze(D, a);
1261
- if (M != null) {
1262
- m(M);
1266
+ const D = globalThis.Temporal, S = Be(D, u);
1267
+ if (S != null) {
1268
+ d(S);
1263
1269
  return;
1264
1270
  }
1265
- he().then((u) => {
1266
- const x = ze(u, a);
1267
- x != null && m(x);
1271
+ he().then((a) => {
1272
+ const v = Be(a, u);
1273
+ v != null && d(v);
1268
1274
  }).catch(() => {
1269
1275
  });
1270
1276
  };
@@ -1272,14 +1278,14 @@ const ze = (t, e) => {
1272
1278
  ...t,
1273
1279
  input: se.text(
1274
1280
  q(t),
1275
- l.value(f.map(e, (m) => m?.toString() ?? "")),
1281
+ l.value(p.map(e, (d) => d?.toString() ?? "")),
1276
1282
  l.class("bc-input"),
1277
- p,
1278
- i != null ? C.blur(() => i()) : S,
1279
- n != null ? C.change(d(n)) : S,
1280
- s != null ? C.input(d(s)) : S
1283
+ b,
1284
+ o != null ? C.blur(() => o()) : M,
1285
+ n != null ? C.change(f(n)) : M,
1286
+ s != null ? C.input(f(s)) : M
1281
1287
  ),
1282
- after: g()
1288
+ after: m()
1283
1289
  });
1284
1290
  } }
1285
1291
  );
@@ -1291,9 +1297,9 @@ const ze = (t, e) => {
1291
1297
  q(t),
1292
1298
  l.value(e),
1293
1299
  l.class("bc-input"),
1294
- n != null ? C.blur(P(n)) : S,
1295
- s != null ? C.change(P(s)) : S,
1296
- r != null ? C.input(P(r)) : S
1300
+ n != null ? C.blur(P(n)) : M,
1301
+ s != null ? C.change(P(s)) : M,
1302
+ r != null ? C.input(P(r)) : M
1297
1303
  )
1298
1304
  });
1299
1305
  };
@@ -1302,15 +1308,15 @@ function ht(t, e) {
1302
1308
  onMove: n,
1303
1309
  cannotMoveUp: s,
1304
1310
  cannotMoveDown: r,
1305
- onRemove: b,
1306
- showMove: i = !0,
1307
- showRemove: g = !0,
1308
- removeDisabled: p,
1309
- showMoveButtons: v = !0,
1310
- layout: d = "aside"
1311
- } = t, m = f.toSignal(d).map((a) => a === "aside"), y = U(
1312
- i,
1313
- () => h.div(
1311
+ onRemove: h,
1312
+ showMove: o = !0,
1313
+ showRemove: m = !0,
1314
+ removeDisabled: b,
1315
+ showMoveButtons: w = !0,
1316
+ layout: f = "aside"
1317
+ } = t, d = p.toSignal(f).map((u) => u === "aside"), x = U(
1318
+ o,
1319
+ () => g.div(
1314
1320
  l.class("bc-list-item-controls__move"),
1315
1321
  be(
1316
1322
  {
@@ -1322,10 +1328,10 @@ function ht(t, e) {
1322
1328
  },
1323
1329
  O(
1324
1330
  F,
1325
- (a) => E({
1331
+ (u) => E({
1326
1332
  size: "xs",
1327
1333
  icon: "line-md:arrow-up",
1328
- title: a.$.incrementValue
1334
+ title: u.$.incrementValue
1329
1335
  })
1330
1336
  )
1331
1337
  ),
@@ -1339,49 +1345,49 @@ function ht(t, e) {
1339
1345
  },
1340
1346
  O(
1341
1347
  F,
1342
- (a) => E({
1348
+ (u) => E({
1343
1349
  size: "xs",
1344
1350
  icon: "line-md:arrow-down",
1345
- title: a.$.decrementValue
1351
+ title: u.$.decrementValue
1346
1352
  })
1347
1353
  )
1348
1354
  )
1349
1355
  )
1350
- ), o = U(
1351
- g,
1356
+ ), i = U(
1357
+ m,
1352
1358
  () => O(
1353
1359
  F,
1354
- (a) => oe({
1360
+ (u) => oe({
1355
1361
  size: "xs",
1356
- label: f.map(a.$.removeItem, (D) => D.toLowerCase()),
1362
+ label: p.map(u.$.removeItem, (D) => D.toLowerCase()),
1357
1363
  color: "danger",
1358
- disabled: p,
1359
- onClick: b
1364
+ disabled: b,
1365
+ onClick: h
1360
1366
  })
1361
1367
  )
1362
1368
  );
1363
1369
  return U(
1364
- m,
1365
- () => h.div(
1370
+ d,
1371
+ () => g.div(
1366
1372
  l.class("bc-list-item-controls bc-list-item-controls--aside"),
1367
- h.div(l.class("bc-list-item-controls__content"), e),
1368
- h.div(
1373
+ g.div(l.class("bc-list-item-controls__content"), e),
1374
+ g.div(
1369
1375
  l.class("bc-list-item-controls__actions"),
1370
- U(v, () => y),
1371
- o
1376
+ U(w, () => x),
1377
+ i
1372
1378
  )
1373
1379
  ),
1374
- () => h.div(
1380
+ () => g.div(
1375
1381
  l.class("bc-list-item-controls bc-list-item-controls--below"),
1376
- h.div(l.class("bc-list-item-controls__content"), e),
1377
- h.div(
1382
+ g.div(l.class("bc-list-item-controls__content"), e),
1383
+ g.div(
1378
1384
  l.class("bc-list-item-controls__actions"),
1379
1385
  U(
1380
- v,
1381
- () => y,
1382
- () => h.div()
1386
+ w,
1387
+ () => x,
1388
+ () => g.div()
1383
1389
  ),
1384
- o
1390
+ i
1385
1391
  )
1386
1392
  )
1387
1393
  );
@@ -1392,16 +1398,16 @@ const gt = (t) => {
1392
1398
  element: n,
1393
1399
  separator: s,
1394
1400
  showMove: r = !0,
1395
- showRemove: b = !0,
1396
- showAdd: i = !0,
1397
- createItem: g,
1398
- addLabel: p,
1399
- controlsLayout: v = "aside",
1400
- removeDisabled: d,
1401
- addDisabled: m
1402
- } = t, y = U(
1403
- V(i, g)((o, a) => o && a != null),
1404
- () => $e(
1401
+ showRemove: h = !0,
1402
+ showAdd: o = !0,
1403
+ createItem: m,
1404
+ addLabel: b,
1405
+ controlsLayout: w = "aside",
1406
+ removeDisabled: f,
1407
+ addDisabled: d
1408
+ } = t, x = U(
1409
+ V(o, m)((i, u) => i && u != null),
1410
+ () => Me(
1405
1411
  l.class(
1406
1412
  "bc-group--gap-2 bc-group--align-center bc-group--justify-center"
1407
1413
  ),
@@ -1409,20 +1415,20 @@ const gt = (t) => {
1409
1415
  {
1410
1416
  size: "sm",
1411
1417
  variant: "filled",
1412
- onClick: () => e.push(g()),
1418
+ onClick: () => e.push(m()),
1413
1419
  disabled: V(
1414
1420
  e.disabled,
1415
- m ?? !1
1421
+ d ?? !1
1416
1422
  )(
1417
- (o, a) => o || a
1423
+ (i, u) => i || u
1418
1424
  )
1419
1425
  },
1420
1426
  O(
1421
1427
  F,
1422
- (o) => $e(
1428
+ (i) => Me(
1423
1429
  l.class("bc-group--gap-2"),
1424
1430
  E({ icon: "line-md:plus" }),
1425
- p ?? o.$.addLabel
1431
+ b ?? i.$.addLabel
1426
1432
  )
1427
1433
  )
1428
1434
  )
@@ -1431,54 +1437,54 @@ const gt = (t) => {
1431
1437
  return N(
1432
1438
  ct(
1433
1439
  e,
1434
- (o) => ht(
1440
+ (i) => ht(
1435
1441
  {
1436
- onMove: o.move,
1437
- cannotMoveUp: o.cannotMove("up"),
1438
- cannotMoveDown: o.cannotMove("down"),
1439
- onRemove: o.remove,
1442
+ onMove: i.move,
1443
+ cannotMoveUp: i.cannotMove("up"),
1444
+ cannotMoveDown: i.cannotMove("down"),
1445
+ onRemove: i.remove,
1440
1446
  showMove: r,
1441
- showRemove: b,
1442
- removeDisabled: d,
1443
- showMoveButtons: e.signal.map((a) => a.length > 1),
1444
- layout: v
1447
+ showRemove: h,
1448
+ removeDisabled: f,
1449
+ showMoveButtons: e.signal.map((u) => u.length > 1),
1450
+ layout: w
1445
1451
  },
1446
- n(o)
1452
+ n(i)
1447
1453
  ),
1448
1454
  s
1449
1455
  ),
1450
- y
1456
+ x
1451
1457
  );
1452
1458
  }, Ot = (t, ...e) => {
1453
1459
  const {
1454
1460
  controller: n,
1455
1461
  element: s,
1456
1462
  separator: r,
1457
- showMove: b,
1458
- showRemove: i,
1459
- showAdd: g,
1460
- createItem: p,
1461
- addLabel: v,
1462
- controlsLayout: d,
1463
- removeDisabled: m,
1464
- addDisabled: y,
1465
- ...o
1463
+ showMove: h,
1464
+ showRemove: o,
1465
+ showAdd: m,
1466
+ createItem: b,
1467
+ addLabel: w,
1468
+ controlsLayout: f,
1469
+ removeDisabled: d,
1470
+ addDisabled: x,
1471
+ ...i
1466
1472
  } = t;
1467
- return Ve(
1473
+ return Ae(
1468
1474
  {
1469
- ...o,
1475
+ ...i,
1470
1476
  content: gt({
1471
1477
  controller: n,
1472
1478
  element: s,
1473
1479
  separator: r,
1474
- showMove: b,
1475
- showRemove: i,
1476
- showAdd: g,
1477
- createItem: p,
1478
- addLabel: v,
1479
- controlsLayout: d,
1480
- removeDisabled: m,
1481
- addDisabled: y
1480
+ showMove: h,
1481
+ showRemove: o,
1482
+ showAdd: m,
1483
+ createItem: b,
1484
+ addLabel: w,
1485
+ controlsLayout: f,
1486
+ removeDisabled: d,
1487
+ addDisabled: x
1482
1488
  })
1483
1489
  },
1484
1490
  ...e
@@ -1504,45 +1510,45 @@ class Ft extends fe {
1504
1510
  * @param branches - Array of branch definitions describing the possible value types
1505
1511
  * @param equals - Optional equality function for comparing values. Defaults to `strictEqual`.
1506
1512
  */
1507
- constructor(e, n, s, r, b, i, g = K) {
1508
- super(e, n, s, r, b, g), this.branches = i;
1509
- const p = (d) => {
1510
- for (const m of i)
1511
- if (m.detect(d))
1512
- return m.key;
1513
- return i[0]?.key ?? "unknown";
1513
+ constructor(e, n, s, r, h, o, m = K) {
1514
+ super(e, n, s, r, h, m), this.branches = o;
1515
+ const b = (f) => {
1516
+ for (const d of o)
1517
+ if (d.detect(f))
1518
+ return d.key;
1519
+ return o[0]?.key ?? "unknown";
1514
1520
  };
1515
- this.activeBranch = s.map(p, K);
1516
- const v = (d) => {
1517
- if (this.#e.has(d))
1518
- return this.#e.get(d);
1519
- const m = i.find((o) => o.key === d);
1520
- if (!m)
1521
- throw new Error(`Unknown branch: ${d}`);
1522
- const y = new fe(
1523
- [...e, d],
1524
- (o) => {
1525
- this.change(o);
1521
+ this.activeBranch = s.map(b, K);
1522
+ const w = (f) => {
1523
+ if (this.#e.has(f))
1524
+ return this.#e.get(f);
1525
+ const d = o.find((i) => i.key === f);
1526
+ if (!d)
1527
+ throw new Error(`Unknown branch: ${f}`);
1528
+ const x = new fe(
1529
+ [...e, f],
1530
+ (i) => {
1531
+ this.change(i);
1526
1532
  },
1527
1533
  this.signal.map(
1528
- (o) => m.detect(o) ? o : m.defaultValue(),
1529
- g
1534
+ (i) => d.detect(i) ? i : d.defaultValue(),
1535
+ m
1530
1536
  ),
1531
- r.map(Ie([d])),
1537
+ r.map(Ie([f])),
1532
1538
  {
1533
1539
  disabled: this.disabled,
1534
1540
  validationMode: this.parent.validationMode
1535
1541
  },
1536
- g
1542
+ m
1537
1543
  );
1538
- return this.#e.set(d, y), y;
1544
+ return this.#e.set(f, x), x;
1539
1545
  };
1540
1546
  this.#t = this.activeBranch.map(
1541
- (d) => v(d),
1547
+ (f) => w(f),
1542
1548
  K
1543
1549
  ), this.onDispose(() => {
1544
- for (const d of this.#e.values())
1545
- d.dispose();
1550
+ for (const f of this.#e.values())
1551
+ f.dispose();
1546
1552
  this.#e.clear(), this.activeBranch.dispose(), this.#t.dispose();
1547
1553
  });
1548
1554
  }
@@ -1555,7 +1561,7 @@ class Ft extends fe {
1555
1561
  * @returns The `Controller<unknown>` for the active branch
1556
1562
  */
1557
1563
  get activeController() {
1558
- return f.get(this.#t);
1564
+ return p.get(this.#t);
1559
1565
  }
1560
1566
  /**
1561
1567
  * Gets or creates a controller for a specific branch by key.
@@ -1605,21 +1611,21 @@ class Ft extends fe {
1605
1611
  * @throws Error if the branch key is not found in the branches array
1606
1612
  */
1607
1613
  switchToBranch(e, n = !1) {
1608
- const s = this.branches.find((i) => i.key === e);
1614
+ const s = this.branches.find((o) => o.key === e);
1609
1615
  if (!s)
1610
1616
  throw new Error(`Unknown branch: ${e}`);
1611
- const r = f.get(this.signal);
1617
+ const r = p.get(this.signal);
1612
1618
  if (s.detect(r))
1613
1619
  return !0;
1614
1620
  if (s.convert) {
1615
- const i = s.convert(r);
1616
- if (i.ok)
1617
- return this.change(i.value), !0;
1621
+ const o = s.convert(r);
1622
+ if (o.ok)
1623
+ return this.change(o.value), !0;
1618
1624
  }
1619
1625
  if (n && typeof window == "object" && typeof window.confirm == "function" && !window.confirm(ce.changeTypeConfirmation))
1620
1626
  return !1;
1621
- const b = s.defaultValue();
1622
- return this.change(b), !0;
1627
+ const h = s.defaultValue();
1628
+ return this.change(h), !0;
1623
1629
  }
1624
1630
  /**
1625
1631
  * Gets the {@link UnionBranch} definition for the currently active branch.
@@ -1627,7 +1633,7 @@ class Ft extends fe {
1627
1633
  * @returns The active branch definition, or `undefined` if no branch matches
1628
1634
  */
1629
1635
  get activeBranchDefinition() {
1630
- const e = f.get(this.activeBranch);
1636
+ const e = p.get(this.activeBranch);
1631
1637
  return this.branches.find((n) => n.key === e);
1632
1638
  }
1633
1639
  }
@@ -1654,32 +1660,32 @@ function re(t) {
1654
1660
  }
1655
1661
  function vt(t, e) {
1656
1662
  if (e == null)
1657
- return Be(t);
1663
+ return Ve(t);
1658
1664
  if (t == null)
1659
1665
  return e;
1660
1666
  if (re(t) && re(e)) {
1661
1667
  const n = { ...e };
1662
1668
  for (const s of Object.keys(t))
1663
- n[s] === void 0 ? n[s] = Be(t[s]) : re(t[s]) && re(n[s]) && (n[s] = vt(t[s], n[s]));
1669
+ n[s] === void 0 ? n[s] = Ve(t[s]) : re(t[s]) && re(n[s]) && (n[s] = vt(t[s], n[s]));
1664
1670
  return n;
1665
1671
  }
1666
1672
  return e;
1667
1673
  }
1668
- function Be(t) {
1674
+ function Ve(t) {
1669
1675
  return typeof structuredClone == "function" ? structuredClone(t) : JSON.parse(JSON.stringify(t));
1670
1676
  }
1671
1677
  export {
1672
1678
  gt as B,
1673
- lt as E,
1679
+ rt as E,
1674
1680
  St as F,
1675
- $e as G,
1681
+ Me as G,
1676
1682
  Ot as L,
1677
- Oe as M,
1678
- Le as N,
1683
+ Fe as M,
1684
+ Ue as N,
1679
1685
  Mt as S,
1680
1686
  Bt as T,
1681
1687
  Lt as U,
1682
- Qe as W,
1688
+ Ke as W,
1683
1689
  Et as a,
1684
1690
  it as b,
1685
1691
  Ut as c,
@@ -1695,7 +1701,7 @@ export {
1695
1701
  ht as m,
1696
1702
  de as n,
1697
1703
  Tt as o,
1698
- rt as p,
1704
+ $e as p,
1699
1705
  he as q,
1700
1706
  G as r,
1701
1707
  Pt as s,