@tempots/beatui 0.61.14 → 0.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
- import { Use as q, coalesce as X, aria as x, attr as o, html as f, on as I, Value as C, Empty as _, computedOf as k, When as O, dataAttr as R, input as ne, emitValue as F, prop as E, Fragment as P, emitValueAsNumber as ie, Unless as re, Ensure as ae } from "@tempots/dom";
2
- import { a as z, B as le, I as N, b as W, c as ce, C as Y } from "./translations-BUTBIDsS.js";
1
+ import { Use as q, coalesce as Q, aria as x, attr as c, html as f, on as D, Value as S, Empty as C, computedOf as w, When as V, dataAttr as R, input as ne, emitValue as F, prop as I, Fragment as N, TextNode as re, emitValueAsNumber as ie, Unless as ae, Ensure as le } from "@tempots/dom";
2
+ import { a as z, B as oe, I as B, b as W, c as ce, C as X } from "./translations-BUTBIDsS.js";
3
3
  const K = /* @__PURE__ */ new Map();
4
4
  function H(e) {
5
5
  const s = K.get(e) ?? 0;
6
6
  return K.set(e, s + 1), `${e}-${s}`;
7
7
  }
8
- const w = {
8
+ const y = {
9
9
  /**
10
10
  * Creates a loading state.
11
11
  * @param previousValue - The previous value.
@@ -84,7 +84,7 @@ const w = {
84
84
  * @public
85
85
  */
86
86
  getOrElse(e, s) {
87
- return w.isSuccess(e) ? e.value : s;
87
+ return y.isSuccess(e) ? e.value : s;
88
88
  },
89
89
  /**
90
90
  * Gets the value if the result is a success; otherwise, returns the value from the alternative function.
@@ -95,7 +95,7 @@ const w = {
95
95
  * function.
96
96
  */
97
97
  getOrElseLazy(e, s) {
98
- return w.isSuccess(e) ? e.value : s();
98
+ return y.isSuccess(e) ? e.value : s();
99
99
  },
100
100
  /**
101
101
  * Gets the value if the result is a success; otherwise, returns `null`.
@@ -104,7 +104,7 @@ const w = {
104
104
  * @public
105
105
  */
106
106
  getOrNull(e) {
107
- return w.isSuccess(e) ? e.value : null;
107
+ return y.isSuccess(e) ? e.value : null;
108
108
  },
109
109
  /**
110
110
  * Gets the value if the result is a success; otherwise, returns `undefined`.
@@ -113,7 +113,7 @@ const w = {
113
113
  * @public
114
114
  */
115
115
  getOrUndefined(e) {
116
- return w.isSuccess(e) ? e.value : void 0;
116
+ return y.isSuccess(e) ? e.value : void 0;
117
117
  },
118
118
  /**
119
119
  * Gets the value of a `AsyncResult` if it is a `Success`, otherwise it throws the error contained in the `Failure`.
@@ -121,9 +121,9 @@ const w = {
121
121
  * @returns The value of the `AsyncResult` if it is a `Success`.
122
122
  */
123
123
  getUnsafe: (e) => {
124
- if (w.isSuccess(e))
124
+ if (y.isSuccess(e))
125
125
  return e.value;
126
- throw w.isFailure(e) ? e.error : new Error("Cannot get value from a not-asked or loading result");
126
+ throw y.isFailure(e) ? e.error : new Error("Cannot get value from a not-asked or loading result");
127
127
  },
128
128
  /**
129
129
  * Based on the state of the result, it picks the appropriate function to call and returns the result.
@@ -138,8 +138,8 @@ const w = {
138
138
  success: s,
139
139
  failure: t,
140
140
  loading: n,
141
- notAsked: i = n
142
- }) => w.isSuccess(e) ? s(e.value) : w.isFailure(e) ? t(e.error) : w.isNotAsked(e) ? i() : n(e.previousValue),
141
+ notAsked: r = n
142
+ }) => y.isSuccess(e) ? s(e.value) : y.isFailure(e) ? t(e.error) : y.isNotAsked(e) ? r() : n(e.previousValue),
143
143
  /**
144
144
  * When the result is a success, it applies the function to the value.
145
145
  *
@@ -148,7 +148,7 @@ const w = {
148
148
  * @returns The result that was passed in.
149
149
  * @public
150
150
  */
151
- whenSuccess: (e, s) => (w.isSuccess(e) && s(e.value), e),
151
+ whenSuccess: (e, s) => (y.isSuccess(e) && s(e.value), e),
152
152
  /**
153
153
  * When the result is a failure, it applies the function to the error.
154
154
  *
@@ -157,7 +157,7 @@ const w = {
157
157
  * @returns The result that was passed in.
158
158
  * @public
159
159
  */
160
- whenFailure: (e, s) => (w.isFailure(e) && s(e.error), e),
160
+ whenFailure: (e, s) => (y.isFailure(e) && s(e.error), e),
161
161
  /**
162
162
  * Compares two results for equality.
163
163
  * @param r1 - The first result.
@@ -166,8 +166,8 @@ const w = {
166
166
  * @returns `true` if the results are equal, `false` otherwise.
167
167
  */
168
168
  equals: (e, s, t = {
169
- valueEquals: (n, i) => n === i,
170
- errorEquals: (n, i) => n === i
169
+ valueEquals: (n, r) => n === r,
170
+ errorEquals: (n, r) => n === r
171
171
  }) => e.type === "AsyncSuccess" && s.type === "AsyncSuccess" ? t.valueEquals(e.value, s.value) : e.type === "AsyncFailure" && s.type === "AsyncFailure" ? t.errorEquals(e.error, s.error) : e.type === "Loading" && s.type === "Loading" ? t.valueEquals(e.previousValue, s.previousValue) : e.type === "NotAsked" && s.type === "NotAsked",
172
172
  /**
173
173
  * Combines multiple results into a single result.
@@ -177,11 +177,11 @@ const w = {
177
177
  all: (e) => {
178
178
  const s = [];
179
179
  for (const t of e)
180
- if (w.isSuccess(t))
180
+ if (y.isSuccess(t))
181
181
  s.push(t.value);
182
182
  else
183
183
  return t;
184
- return w.success(s);
184
+ return y.success(s);
185
185
  },
186
186
  /**
187
187
  * Converts a Promise to an AsyncResult.
@@ -191,12 +191,12 @@ const w = {
191
191
  ofPromise: async (e) => {
192
192
  try {
193
193
  const s = await e;
194
- return w.success(s);
194
+ return y.success(s);
195
195
  } catch (s) {
196
- return w.failure(s instanceof Error ? s : new Error(String(s)));
196
+ return y.failure(s instanceof Error ? s : new Error(String(s)));
197
197
  }
198
198
  }
199
- }, $ = (e, s) => e === s || e !== e && s !== s, D = {
199
+ }, $ = (e, s) => e === s || e !== e && s !== s, _ = {
200
200
  /**
201
201
  * Creates a valid `Validation`.
202
202
  * @returns A `Validation` that is `Valid`.
@@ -234,14 +234,14 @@ const w = {
234
234
  * @param invalid - The mapping function for an invalid value.
235
235
  * @returns The mapped value.
236
236
  */
237
- match: (e, s, t) => D.isValid(e) ? s() : t(e.error),
237
+ match: (e, s, t) => _.isValid(e) ? s() : t(e.error),
238
238
  /**
239
239
  * Maps the value of a `Validation` to a new `Validation`.
240
240
  * @param validation - The `Validation` to map.
241
241
  * @param value - The value to map.
242
242
  * @returns A new `Validation` with the mapped value.
243
243
  */
244
- toResult: (e, s) => D.match(
244
+ toResult: (e, s) => _.match(
245
245
  e,
246
246
  () => m.success(s),
247
247
  (t) => m.failure(t)
@@ -253,7 +253,7 @@ const w = {
253
253
  * @param apply - The function to execute when the `Validation` is valid.
254
254
  * @returns The `Validation` object.
255
255
  */
256
- whenValid: (e, s) => (D.isValid(e) && s(), e),
256
+ whenValid: (e, s) => (_.isValid(e) && s(), e),
257
257
  /**
258
258
  * Execute a function when the `Validation` is invalid.
259
259
  *
@@ -261,7 +261,7 @@ const w = {
261
261
  * @param apply - The function to execute when the `Validation` is invalid.
262
262
  * @returns The `Validation` object.
263
263
  */
264
- whenInvalid: (e, s) => (D.isInvalid(e) && s(e.error), e)
264
+ whenInvalid: (e, s) => (_.isInvalid(e) && s(e.error), e)
265
265
  }, m = {
266
266
  /**
267
267
  * Creates a successful `Result`.
@@ -308,8 +308,8 @@ const w = {
308
308
  toAsync(e) {
309
309
  return m.match(
310
310
  e,
311
- (s) => w.success(s),
312
- (s) => w.failure(s)
311
+ (s) => y.success(s),
312
+ (s) => y.failure(s)
313
313
  );
314
314
  },
315
315
  /**
@@ -321,8 +321,8 @@ const w = {
321
321
  toValidation(e) {
322
322
  return m.match(
323
323
  e,
324
- () => D.valid,
325
- (s) => D.invalid(s)
324
+ () => _.valid,
325
+ (s) => _.invalid(s)
326
326
  );
327
327
  },
328
328
  /**
@@ -418,16 +418,16 @@ const w = {
418
418
  */
419
419
  combine: (e, s, t, n) => m.match(
420
420
  e,
421
- (i) => m.match(
421
+ (r) => m.match(
422
422
  s,
423
- (r) => m.success(t(i, r)),
424
- (r) => m.failure(r)
423
+ (i) => m.success(t(r, i)),
424
+ (i) => m.failure(i)
425
425
  ),
426
- (i) => m.match(
426
+ (r) => m.match(
427
427
  s,
428
428
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
429
- (r) => m.failure(i),
430
- (r) => m.failure(n(i, r))
429
+ (i) => m.failure(r),
430
+ (i) => m.failure(n(r, i))
431
431
  )
432
432
  ),
433
433
  /**
@@ -438,8 +438,8 @@ const w = {
438
438
  * @returns `true` if the results are equal, `false` otherwise.
439
439
  */
440
440
  equals: (e, s, t = {
441
- valueEquals: (n, i) => n === i,
442
- errorEquals: (n, i) => n === i
441
+ valueEquals: (n, r) => n === r,
442
+ errorEquals: (n, r) => n === r
443
443
  }) => e.type === "Success" && s.type === "Success" ? t.valueEquals(e.value, s.value) : e.type === "Failure" && s.type === "Failure" ? t.errorEquals(e.error, s.error) : !1,
444
444
  /**
445
445
  * Combines multiple results into a single result.
@@ -456,53 +456,53 @@ const w = {
456
456
  return m.success(s);
457
457
  }
458
458
  };
459
- function oe({
459
+ function ue({
460
460
  size: e = "sm",
461
461
  icon: s = "line-md:close",
462
462
  disabled: t,
463
463
  roundedness: n = "full",
464
- color: i = "base",
465
- onClick: r,
464
+ color: r = "base",
465
+ onClick: i,
466
466
  label: l
467
467
  }, ...a) {
468
- return q(z, (c) => {
469
- const p = X(l, c.$.closeModal);
470
- return le(
468
+ return q(z, (o) => {
469
+ const p = Q(l, o.$.closeModal);
470
+ return oe(
471
471
  {
472
472
  variant: "text",
473
473
  size: e,
474
474
  roundedness: n,
475
475
  disabled: t,
476
- color: i,
477
- onClick: r
476
+ color: r,
477
+ onClick: i
478
478
  },
479
- o.title(p),
479
+ c.title(p),
480
480
  x.label(p),
481
481
  ...a,
482
- N({ icon: s, size: e ?? "sm" })
482
+ B({ icon: s, size: e ?? "sm" })
483
483
  );
484
484
  });
485
485
  }
486
486
  function U(e) {
487
487
  return `bc-label bc-label--${e}`;
488
488
  }
489
- const Ae = (...e) => f.span(o.class(U("emphasis")), ...e), ue = (...e) => f.span(o.class(U("default")), ...e), he = (...e) => f.span(o.class(U("muted")), ...e), Ve = (...e) => f.span(o.class(U("danger")), ...e), Oe = (e) => {
489
+ const Oe = (...e) => f.span(c.class(U("emphasis")), ...e), he = (...e) => f.span(c.class(U("default")), ...e), de = (...e) => f.span(c.class(U("muted")), ...e), Me = (...e) => f.span(c.class(U("danger")), ...e), Fe = (e) => {
490
490
  const {
491
491
  value: s,
492
492
  onBlur: t,
493
493
  onChange: n,
494
- placeholder: i,
495
- disabled: r,
494
+ placeholder: r,
495
+ disabled: i,
496
496
  id: l,
497
497
  checkedIcon: a,
498
- uncheckedIcon: c,
498
+ uncheckedIcon: o,
499
499
  iconSize: p = "lg"
500
- } = e, h = l ?? H("checkbox"), b = `${h}-label`, S = () => {
501
- if (C.get(r ?? !1)) return;
502
- const u = C.get(s);
500
+ } = e, h = l ?? H("checkbox"), b = `${h}-label`, k = () => {
501
+ if (S.get(i ?? !1)) return;
502
+ const u = S.get(s);
503
503
  n?.(!u);
504
- }, v = (u) => {
505
- C.get(r ?? !1) || (u.key === " " || u.key === "Enter") && (u.preventDefault(), S());
504
+ }, g = (u) => {
505
+ S.get(i ?? !1) || (u.key === " " || u.key === "Enter") && (u.preventDefault(), k());
506
506
  };
507
507
  return W(
508
508
  {
@@ -510,190 +510,179 @@ const Ae = (...e) => f.span(o.class(U("emphasis")), ...e), ue = (...e) => f.span
510
510
  growInput: !1,
511
511
  ...e,
512
512
  input: f.span(
513
- o.class("bc-checkbox-input"),
513
+ c.class("bc-checkbox-input"),
514
514
  f.span(
515
- o.class("bc-checkbox-input__checkbox"),
516
- o.class(
517
- C.map(
515
+ c.class("bc-checkbox-input__checkbox"),
516
+ c.class(
517
+ S.map(
518
518
  s,
519
519
  (u) => u ? "bc-checkbox-input__checkbox--checked" : "bc-checkbox-input__checkbox--unchecked"
520
520
  )
521
521
  ),
522
- o.class(
523
- C.map(
524
- r ?? !1,
522
+ c.class(
523
+ S.map(
524
+ i ?? !1,
525
525
  (u) => u ? "bc-checkbox-input__checkbox--disabled" : ""
526
526
  )
527
527
  ),
528
- o.id(h),
529
- o.role("checkbox"),
530
- o.tabindex(
531
- C.map(
532
- r ?? !1,
528
+ c.id(h),
529
+ c.role("checkbox"),
530
+ c.tabindex(
531
+ S.map(
532
+ i ?? !1,
533
533
  (u) => u ? -1 : 0
534
534
  )
535
535
  ),
536
536
  x.checked(s),
537
- x.disabled(r),
538
- i != null ? x.labelledby(b) : _,
539
- I.keydown(v),
540
- t != null ? I.blur(t) : _,
541
- N({
542
- icon: k(
537
+ x.disabled(i),
538
+ r != null ? x.labelledby(b) : C,
539
+ D.keydown(g),
540
+ t != null ? D.blur(t) : C,
541
+ B({
542
+ icon: w(
543
543
  s,
544
544
  a,
545
- c
545
+ o
546
546
  )(
547
- (u, d, g) => u ? d ?? "akar-icons/check-box-fill" : g ?? "akar-icons/box"
547
+ (u, d, v) => u ? d ?? "akar-icons/check-box-fill" : v ?? "akar-icons/box"
548
548
  ),
549
549
  accessibility: "decorative",
550
550
  size: p
551
551
  })
552
552
  ),
553
- i != null ? f.label(
554
- o.class("bc-checkbox-input__label"),
555
- o.id(b),
556
- o.for(h),
557
- he(i)
558
- ) : _
553
+ r != null ? f.label(
554
+ c.class("bc-checkbox-input__label"),
555
+ c.id(b),
556
+ c.for(h),
557
+ de(r)
558
+ ) : C
559
559
  )
560
560
  },
561
- I.click(S)
561
+ D.click(k)
562
562
  );
563
- }, de = f.span(
564
- o.class("bc-input-wrapper__required"),
563
+ }, pe = f.span(
564
+ c.class("bc-input-wrapper__required"),
565
565
  " *"
566
566
  );
567
- function pe(e) {
567
+ function fe(e) {
568
568
  const s = ["bc-input-wrapper"];
569
569
  return e !== "vertical" && s.push(`bc-input-wrapper--${e}`), s.join(" ");
570
570
  }
571
- function fe(e, s) {
571
+ function be(e, s) {
572
572
  const t = ["bc-input-wrapper__label-text"];
573
573
  return e ? t.push("bc-input-wrapper__label-text--error") : s ? t.push("bc-input-wrapper__label-text--disabled") : t.push("bc-input-wrapper__label-text--default"), t.join(" ");
574
574
  }
575
- function G(e, s) {
575
+ function me(e, s) {
576
576
  if (e === "horizontal-fixed" && s != null)
577
577
  return `--input-wrapper-label-width: ${s}`;
578
578
  }
579
- const Z = ({
579
+ const Y = ({
580
580
  fullWidth: e = !1,
581
581
  required: s,
582
582
  label: t,
583
583
  labelChildren: n,
584
- context: i,
585
- description: r,
584
+ context: r,
585
+ description: i,
586
586
  content: l,
587
587
  error: a,
588
- labelFor: c,
588
+ labelFor: o,
589
589
  hasError: p,
590
590
  disabled: h,
591
591
  layout: b,
592
- labelWidth: S
593
- }, ...v) => {
594
- const u = p ?? a != null, d = h ?? !1, g = b ?? "vertical", T = H("input-wrapper"), A = r ? `${T}-description` : void 0, B = a != null ? `${T}-error` : void 0, L = k(g)((y) => y !== "vertical");
592
+ labelWidth: k
593
+ }, ...g) => {
594
+ const u = p ?? a != null, d = h ?? !1, v = b ?? "vertical", T = H("input-wrapper"), A = i ? `${T}-description` : void 0, P = a != null ? `${T}-error` : void 0, L = w(v)((E) => E !== "vertical"), te = w(
595
+ v,
596
+ k ?? void 0
597
+ )((E, M) => me(E, M));
595
598
  return f.div(
596
- o.class(C.map(g, (y) => pe(y))),
597
- o.class(
598
- C.map(
599
+ c.class(S.map(v, (E) => fe(E))),
600
+ c.class(
601
+ S.map(
599
602
  e,
600
- (y) => y ? "bc-input-wrapper--full-width" : ""
601
- )
602
- ),
603
- O(
604
- k(
605
- g,
606
- S ?? void 0
607
- )((y, V) => G(y, V) != null),
608
- () => o.style(
609
- C.map(
610
- k(
611
- g,
612
- S ?? void 0
613
- )((y, V) => G(y, V)),
614
- (y) => y
615
- )
603
+ (E) => E ? "bc-input-wrapper--full-width" : ""
616
604
  )
617
605
  ),
618
- t != null || i != null ? f.div(
619
- o.class("bc-input-wrapper__header"),
606
+ c.style(te),
607
+ t != null || r != null ? f.div(
608
+ c.class("bc-input-wrapper__header"),
620
609
  f.div(
621
- o.class("bc-input-wrapper__label-section"),
610
+ c.class("bc-input-wrapper__label-section"),
622
611
  f.label(
623
- o.class("bc-input-wrapper__label"),
624
- c != null ? o.for(c) : _,
612
+ c.class("bc-input-wrapper__label"),
613
+ o != null ? c.for(o) : C,
625
614
  f.span(
626
- o.class(
627
- k(
615
+ c.class(
616
+ w(
628
617
  u,
629
618
  d
630
619
  )(
631
- (y, V) => fe(
632
- y ?? !1,
633
- V ?? !1
620
+ (E, M) => be(
621
+ E ?? !1,
622
+ M ?? !1
634
623
  )
635
624
  )
636
625
  ),
637
626
  t
638
627
  ),
639
- t != null && s ? de : _
628
+ t != null && s ? pe : C
640
629
  ),
641
630
  // Show description under label when horizontal
642
- O(
643
- k(
631
+ V(
632
+ w(
644
633
  L,
645
- r
646
- )((y, V) => y && V != null),
634
+ i
635
+ )((E, M) => E && M != null),
647
636
  () => f.div(
648
- o.class(
637
+ c.class(
649
638
  "bc-input-wrapper__description bc-input-wrapper__description--under-label"
650
639
  ),
651
- o.id(A),
652
- r
640
+ c.id(A),
641
+ i
653
642
  )
654
643
  )
655
644
  ),
656
- i != null ? ue(i) : _,
645
+ r != null ? he(r) : C,
657
646
  n
658
- ) : _,
647
+ ) : C,
659
648
  f.div(
660
- o.class("bc-input-wrapper__content"),
649
+ c.class("bc-input-wrapper__content"),
661
650
  // Add data attributes to help inputs inherit accessibility information
662
- [A, B].filter(Boolean).length > 0 ? R.describedby(
663
- [A, B].filter(Boolean).join(" ")
664
- ) : _,
665
- s ? R.required("true") : _,
666
- O(u, () => R.invalid("true")),
651
+ [A, P].filter(Boolean).length > 0 ? R.describedby(
652
+ [A, P].filter(Boolean).join(" ")
653
+ ) : C,
654
+ s ? R.required("true") : C,
655
+ V(u, () => R.invalid("true")),
667
656
  l
668
657
  ),
669
658
  // Show description at bottom only when not horizontal
670
- O(
671
- k(L, r)((y, V) => !y && V != null),
659
+ V(
660
+ w(L, i)((E, M) => !E && M != null),
672
661
  () => f.div(
673
- o.class("bc-input-wrapper__description"),
674
- o.id(A),
675
- r
662
+ c.class("bc-input-wrapper__description"),
663
+ c.id(A),
664
+ i
676
665
  )
677
666
  ),
678
- a != null ? O(
667
+ V(
679
668
  u,
680
669
  () => f.div(
681
- o.class("bc-input-wrapper__error"),
682
- o.id(B),
670
+ c.class("bc-input-wrapper__error"),
671
+ c.id(P),
683
672
  x.live("polite"),
684
673
  // Announce errors to screen readers
685
- o.role("alert"),
674
+ c.role("alert"),
686
675
  // Mark as alert for immediate attention
687
676
  a
688
677
  )
689
- ) : null,
690
- ...v
678
+ ),
679
+ ...g
691
680
  );
692
681
  };
693
- function Me(...e) {
694
- return f.div(o.class("bc-stack"), ...e);
682
+ function $e(...e) {
683
+ return f.div(c.class("bc-stack"), ...e);
695
684
  }
696
- const Fe = (e) => {
685
+ const xe = (e) => {
697
686
  const s = {
698
687
  name: "email",
699
688
  autocomplete: "email",
@@ -701,11 +690,11 @@ const Fe = (e) => {
701
690
  }, {
702
691
  value: t,
703
692
  before: n,
704
- onBlur: i,
705
- onChange: r,
693
+ onBlur: r,
694
+ onChange: i,
706
695
  onInput: l,
707
696
  placeholder: a
708
- } = s, c = n ?? ce({
697
+ } = s, o = n ?? ce({
709
698
  icon: "line-md:email",
710
699
  size: e.size,
711
700
  color: "neutral"
@@ -714,167 +703,169 @@ const Fe = (e) => {
714
703
  z,
715
704
  (p) => W({
716
705
  ...e,
717
- before: c,
706
+ before: o,
718
707
  input: ne.email(
719
- Y(s),
720
- o.placeholder(X(a, p.$.emailPlaceholderText)),
721
- o.value(t),
722
- o.class("bc-input"),
723
- i != null ? I.blur(F(i)) : _,
724
- r != null ? I.change(F(r)) : _,
725
- l != null ? I.input(F(l)) : _
708
+ X(s),
709
+ c.placeholder(Q(a, p.$.emailPlaceholderText)),
710
+ c.value(t),
711
+ c.class("bc-input"),
712
+ r != null ? D.blur(F(r)) : C,
713
+ i != null ? D.change(F(i)) : C,
714
+ l != null ? D.input(F(l)) : C
726
715
  )
727
716
  })
728
717
  );
729
- }, $e = (e) => {
718
+ }, Ne = (e) => {
730
719
  const {
731
720
  value: s,
732
721
  onBlur: t,
733
722
  onChange: n,
734
- onInput: i,
735
- before: r,
723
+ onInput: r,
724
+ before: i,
736
725
  after: l,
737
726
  hasError: a,
738
- disabled: c,
727
+ disabled: o,
739
728
  autocomplete: p,
740
729
  placeholder: h,
741
730
  ...b
742
- } = e, S = {
731
+ } = e, k = {
743
732
  name: "password",
744
- disabled: c,
733
+ disabled: o,
745
734
  ...b
746
- }, v = E(!0), u = k(
747
- v,
735
+ }, g = I(!0), u = w(
736
+ g,
748
737
  p
749
- )((d, g) => d ? g ?? "current-password" : "off");
738
+ )((d, v) => d ? v ?? "current-password" : "off");
750
739
  return q(z, (d) => {
751
- const g = k(
740
+ const v = w(
752
741
  d.$.passwordPlaceholderText,
753
- v,
742
+ g,
754
743
  h
755
- )((A, B, L) => B ? "•••••••••••••••" : L ?? A), T = f.button(
756
- o.type("button"),
757
- o.class("bc-input-container__password-toggle"),
744
+ )((A, P, L) => P ? "•••••••••••••••" : L ?? A), T = f.button(
745
+ c.type("button"),
746
+ c.class("bc-input-container__password-toggle"),
758
747
  x.label(d.$.togglePasswordVisibility),
759
- I.click(() => v.update((A) => !A)),
760
- O(
761
- v,
762
- () => N({ icon: "line-md:watch" }),
763
- () => N({ icon: "line-md:watch-off" })
748
+ D.click(() => g.update((A) => !A)),
749
+ V(
750
+ g,
751
+ () => B({ icon: "line-md:watch" }),
752
+ () => B({ icon: "line-md:watch-off" })
764
753
  )
765
754
  );
766
755
  return W({
767
- before: r,
768
- disabled: c,
756
+ before: i,
757
+ disabled: o,
769
758
  hasError: a,
770
759
  input: f.input(
771
- Y({
772
- ...S,
760
+ X({
761
+ ...k,
773
762
  autocomplete: u,
774
- placeholder: g
763
+ placeholder: v
775
764
  }),
776
- O(
777
- v,
778
- () => P(o.type("password")),
779
- () => P(o.type("text"))
765
+ V(
766
+ g,
767
+ () => N(c.type("password")),
768
+ () => N(c.type("text"))
780
769
  ),
781
- o.class("bc-input"),
782
- o.value(s),
783
- t != null ? I.blur(F(t)) : _,
784
- n != null ? I.change(F(n)) : _,
785
- i != null ? I.input(F(i)) : _
770
+ c.class("bc-input"),
771
+ c.value(s),
772
+ t != null ? D.blur(F(t)) : C,
773
+ n != null ? D.change(F(n)) : C,
774
+ r != null ? D.input(F(r)) : C
786
775
  ),
787
- after: l != null ? P(T, l) : T
776
+ after: l != null ? N(T, l) : T
788
777
  });
789
778
  });
790
- }, be = (
779
+ }, ge = (
791
780
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
792
781
  (e, s) => () => {
793
782
  e.markTouched(), s?.();
794
783
  }
795
- ), J = (e, s) => (t) => {
784
+ ), G = (e, s) => (t) => {
796
785
  e.change(t), s?.(t);
797
786
  };
798
- function ee(e, s) {
799
- const { controller: t, onBlur: n, onChange: i, id: r, triggerOn: l, ...a } = s;
787
+ function Z(e, s) {
788
+ const { controller: t, onBlur: n, onChange: r, id: i, triggerOn: l, ...a } = s;
800
789
  return e({
801
- id: r ?? t.name,
790
+ id: i ?? t.name,
802
791
  disabled: t.disabled,
803
792
  value: t.signal,
804
793
  hasError: t.errorVisible,
805
794
  name: t.name,
806
795
  ...a,
807
- onInput: l === "input" ? J(t, i) : void 0,
808
- onChange: l !== "input" ? J(t, i) : void 0,
809
- onBlur: be(t, n)
796
+ onInput: l === "input" ? G(t, r) : void 0,
797
+ onChange: l !== "input" ? G(t, r) : void 0,
798
+ onBlur: ge(t, n)
810
799
  });
811
800
  }
812
- function xe(e, { id: s, labelFor: t, ...n }, ...i) {
813
- const r = s ?? n.controller.name ?? H("control");
814
- return Z(
801
+ function Pe(e, { id: s, labelFor: t, ...n }, ...r) {
802
+ const i = s ?? n.controller.name ?? H("control"), l = t ?? i;
803
+ return Y(
815
804
  {
816
805
  ...n,
817
- labelFor: t ?? r,
818
- content: ee(
819
- (a) => e({ ...a, id: r }),
806
+ hasError: n.controller.errorVisible,
807
+ error: re(n.controller.error.map((a) => a ?? "")),
808
+ labelFor: l,
809
+ content: Z(
810
+ (a) => e({ ...a, id: i }),
820
811
  n
821
812
  )
822
813
  },
823
- ...i
814
+ ...r
824
815
  );
825
816
  }
826
- function me(e, s) {
827
- const { toInput: t, fromInput: n, controller: i, ...r } = s, l = i.transform(t, n);
828
- return ee(e, {
829
- ...r,
817
+ function ve(e, s) {
818
+ const { toInput: t, fromInput: n, controller: r, ...i } = s, l = r.transform(t, n);
819
+ return Z(e, {
820
+ ...i,
830
821
  controller: l
831
822
  });
832
823
  }
833
- function Pe(e, {
824
+ function Be(e, {
834
825
  id: s,
835
826
  labelFor: t,
836
827
  ...n
837
- }, ...i) {
838
- const r = s ?? n.controller.name ?? H("control");
839
- return Z(
828
+ }, ...r) {
829
+ const i = s ?? n.controller.name ?? H("control");
830
+ return Y(
840
831
  {
841
832
  ...n,
842
- labelFor: t ?? r,
843
- content: me(e, {
833
+ labelFor: t ?? i,
834
+ content: ve(e, {
844
835
  ...n,
845
- id: r
836
+ id: i
846
837
  })
847
838
  },
848
- ...i
839
+ ...r
849
840
  );
850
841
  }
851
- function Be(e) {
842
+ function Le(e) {
852
843
  return e.split(".").map((t) => {
853
844
  const n = t.match(/^\[(\d+)\]$/);
854
845
  return n ? Number(n[1]) : t;
855
846
  });
856
847
  }
857
- function ge(e) {
848
+ function ye(e) {
858
849
  return typeof e == "number" ? `[${e}]` : `.${e}`;
859
850
  }
860
- function ve(e) {
851
+ function we(e) {
861
852
  if (e.length === 0) return "";
862
853
  const [s, ...t] = e;
863
854
  return [
864
855
  typeof s == "number" ? `[${s}]` : s,
865
- ...t.map(ge)
856
+ ...t.map(ye)
866
857
  ].join("");
867
858
  }
868
859
  function j(e) {
869
860
  return function(t) {
870
861
  if (t.type === "valid") return t;
871
862
  let n = t.error;
872
- for (const i of e)
873
- if (n = n?.dependencies?.[i], n == null) return D.valid;
874
- return D.invalid(n);
863
+ for (const r of e)
864
+ if (n = n?.dependencies?.[r], n == null) return _.valid;
865
+ return _.invalid(n);
875
866
  };
876
867
  }
877
- class M {
868
+ class O {
878
869
  path;
879
870
  change;
880
871
  signal;
@@ -886,42 +877,42 @@ class M {
886
877
  dirty;
887
878
  dependencyErrors;
888
879
  #e = {
889
- disabled: E(!1),
890
- touched: E(!1)
880
+ disabled: I(!1),
881
+ touched: I(!1)
891
882
  };
892
883
  #t;
893
- #s = E(void 0);
884
+ #s = I(void 0);
894
885
  parent;
895
886
  disabled;
896
887
  #n = [];
897
888
  disabledOrHasErrors;
898
- constructor(s, t, n, i, r, l = $) {
899
- this.path = s, this.change = t, this.signal = n, this.status = i, this.#t = l, this.#s.set(n.value), this.error = i.map(
889
+ constructor(s, t, n, r, i, l = $) {
890
+ this.path = s, this.change = t, this.signal = n, this.status = r, this.#t = l, this.#s.set(n.value), this.error = r.map(
900
891
  (a) => a?.type === "invalid" ? a.error?.message : void 0
901
- ), this.hasError = this.error.map((a) => a != null), this.touched = this.#e.touched, r.validationMode ? this.errorVisible = k(
892
+ ), this.hasError = this.error.map((a) => a != null), this.touched = this.#e.touched, i.validationMode ? this.errorVisible = w(
902
893
  this.hasError,
903
894
  this.touched,
904
- r.validationMode
905
- )((a, c, p) => p === "continuous" ? !!a : !!a && !!c) : this.errorVisible = k(
895
+ i.validationMode
896
+ )((a, o, p) => p === "continuous" ? !!a : !!a && !!o) : this.errorVisible = w(
906
897
  this.hasError,
907
898
  this.touched
908
- )((a, c) => !!a && !!c), this.dirty = k(
899
+ )((a, o) => !!a && !!o), this.dirty = w(
909
900
  this.signal,
910
901
  this.#s
911
- )((a, c) => !this.#t(a, c)), this.dependencyErrors = i.map(
902
+ )((a, o) => !this.#t(a, o)), this.dependencyErrors = r.map(
912
903
  (a) => a?.type === "invalid" ? a.error?.dependencies : void 0
913
- ), this.parent = r, this.disabled = k(
904
+ ), this.parent = i, this.disabled = w(
914
905
  this.#e.disabled,
915
- r.disabled
916
- )((a, c) => a || c), this.disabledOrHasErrors = k(
906
+ i.disabled
907
+ )((a, o) => a || o), this.disabledOrHasErrors = w(
917
908
  this.disabled,
918
909
  this.hasError
919
- )((a, c) => a || c), this.onDispose(() => {
910
+ )((a, o) => a || o), this.onDispose(() => {
920
911
  this.#e.disabled.dispose(), this.#e.touched.dispose(), this.disabled.dispose(), this.error.dispose(), this.errorVisible.dispose(), this.dirty.dispose(), this.#s.dispose(), this.dependencyErrors.dispose(), this.disabledOrHasErrors.dispose();
921
912
  });
922
913
  }
923
914
  get name() {
924
- return ve(this.path);
915
+ return we(this.path);
925
916
  }
926
917
  onDispose = (s) => {
927
918
  this.#n.push(s);
@@ -952,7 +943,7 @@ class M {
952
943
  reset = () => {
953
944
  this.change(this.#s.value);
954
945
  };
955
- array = (s = $) => new we(
946
+ array = (s = $) => new Se(
956
947
  this.path,
957
948
  this.change,
958
949
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -961,7 +952,7 @@ class M {
961
952
  this.parent,
962
953
  s
963
954
  );
964
- object = (s = $) => new ye(
955
+ object = (s = $) => new ke(
965
956
  this.path,
966
957
  this.change,
967
958
  this.signal,
@@ -969,38 +960,38 @@ class M {
969
960
  this.parent,
970
961
  s
971
962
  );
972
- transform = (s, t, n = [], i = $) => new M(
963
+ transform = (s, t, n = [], r = $) => new O(
973
964
  [...this.path, ...n],
974
- (r) => this.change(t(r)),
975
- this.signal.map(s, i),
965
+ (i) => this.change(t(i)),
966
+ this.signal.map(s, r),
976
967
  this.status.map(j(n)),
977
968
  this.parent,
978
- i
969
+ r
979
970
  );
980
- asyncTransform = (s, t, n, i = [], r = $) => new M(
981
- [...this.path, ...i],
971
+ asyncTransform = (s, t, n, r = [], i = $) => new O(
972
+ [...this.path, ...r],
982
973
  (l) => {
983
974
  t(l).then((a) => this.change(a));
984
975
  },
985
- this.signal.mapAsync(s, n, void 0, r),
986
- this.status.map(j(i)),
976
+ this.signal.mapAsync(s, n, void 0, i),
977
+ this.status.map(j(r)),
987
978
  this.parent,
988
- r
979
+ i
989
980
  );
990
981
  }
991
- class ye extends M {
982
+ class ke extends O {
992
983
  #e = /* @__PURE__ */ new Map();
993
984
  #t = /* @__PURE__ */ new Map();
994
985
  #s = /* @__PURE__ */ new Map();
995
- #n = E(!1);
986
+ #n = I(!1);
996
987
  touchedDeep = this.#n;
997
- #r = /* @__PURE__ */ new Map();
998
988
  #i = /* @__PURE__ */ new Map();
999
- #l = E(!1);
989
+ #r = /* @__PURE__ */ new Map();
990
+ #l = I(!1);
1000
991
  dirtyDeep = this.#l;
1001
- #o;
992
+ #c;
1002
993
  #u;
1003
- #c = () => {
994
+ #o = () => {
1004
995
  let s = !1;
1005
996
  for (const t of this.#t.values())
1006
997
  if (t) {
@@ -1009,28 +1000,28 @@ class ye extends M {
1009
1000
  }
1010
1001
  this.#n.set(this.touched.value || s);
1011
1002
  };
1012
- constructor(s, t, n, i, r, l) {
1003
+ constructor(s, t, n, r, i, l) {
1013
1004
  super(
1014
1005
  s,
1015
1006
  t,
1016
- n.map((c) => c ?? {}, l),
1017
- i,
1007
+ n.map((o) => o ?? {}, l),
1018
1008
  r,
1009
+ i,
1019
1010
  l
1020
- ), this.#o = this.touched.on(() => {
1021
- this.#c();
1011
+ ), this.#c = this.touched.on(() => {
1012
+ this.#o();
1022
1013
  }), this.#u = this.dirty.on(() => {
1023
1014
  this.#a();
1024
1015
  });
1025
1016
  const a = this.signal.on(() => this.#a());
1026
1017
  this.onDispose(() => {
1027
- for (const c of this.#e.values())
1028
- c.dispose();
1018
+ for (const o of this.#e.values())
1019
+ o.dispose();
1029
1020
  this.#e.clear();
1030
- for (const c of this.#s.values()) c();
1021
+ for (const o of this.#s.values()) o();
1031
1022
  this.#s.clear(), this.#t.clear(), this.#n.dispose();
1032
- for (const c of this.#i.values()) c();
1033
- this.#i.clear(), this.#r.clear(), this.#l.dispose(), this.#o(), this.#u(), a();
1023
+ for (const o of this.#r.values()) o();
1024
+ this.#r.clear(), this.#i.clear(), this.#l.dispose(), this.#c(), this.#u(), a();
1034
1025
  });
1035
1026
  }
1036
1027
  field = (s) => {
@@ -1041,7 +1032,7 @@ class ye extends M {
1041
1032
  ...this.signal.value,
1042
1033
  [s]: l
1043
1034
  });
1044
- }, n = new M(
1035
+ }, n = new O(
1045
1036
  [...this.path, s],
1046
1037
  t,
1047
1038
  this.signal.map((l) => l[s]),
@@ -1053,14 +1044,14 @@ class ye extends M {
1053
1044
  }
1054
1045
  );
1055
1046
  this.#e.set(s, n);
1056
- const i = n.touched.on((l) => {
1057
- this.#t.set(s, l), this.#c();
1047
+ const r = n.touched.on((l) => {
1048
+ this.#t.set(s, l), this.#o();
1058
1049
  });
1059
- this.#s.set(s, i);
1060
- const r = n.dirty.on((l) => {
1061
- this.#r.set(s, l), this.#a();
1050
+ this.#s.set(s, r);
1051
+ const i = n.dirty.on((l) => {
1052
+ this.#i.set(s, l), this.#a();
1062
1053
  });
1063
- return this.#i.set(s, r), n;
1054
+ return this.#r.set(s, i), n;
1064
1055
  };
1065
1056
  markAllTouched = () => {
1066
1057
  this.markTouched();
@@ -1080,7 +1071,7 @@ class ye extends M {
1080
1071
  };
1081
1072
  #a = () => {
1082
1073
  let s = !1;
1083
- for (const t of this.#r.values())
1074
+ for (const t of this.#i.values())
1084
1075
  if (t) {
1085
1076
  s = !0;
1086
1077
  break;
@@ -1088,20 +1079,20 @@ class ye extends M {
1088
1079
  this.#l.set(this.dirty.value || s);
1089
1080
  };
1090
1081
  }
1091
- class we extends M {
1082
+ class Se extends O {
1092
1083
  #e = new Array();
1093
1084
  length;
1094
1085
  #t = /* @__PURE__ */ new Map();
1095
1086
  #s = /* @__PURE__ */ new Map();
1096
- #n = E(!1);
1087
+ #n = I(!1);
1097
1088
  touchedDeep = this.#n;
1098
- #r = /* @__PURE__ */ new Map();
1099
1089
  #i = /* @__PURE__ */ new Map();
1100
- #l = E(!1);
1090
+ #r = /* @__PURE__ */ new Map();
1091
+ #l = I(!1);
1101
1092
  dirtyDeep = this.#l;
1102
- #o;
1093
+ #c;
1103
1094
  #u;
1104
- #c = () => {
1095
+ #o = () => {
1105
1096
  let s = !1;
1106
1097
  for (const t of this.#t.values())
1107
1098
  if (t) {
@@ -1110,18 +1101,18 @@ class we extends M {
1110
1101
  }
1111
1102
  this.#n.set(this.touched.value || s);
1112
1103
  };
1113
- constructor(s, t, n, i, r, l) {
1104
+ constructor(s, t, n, r, i, l) {
1114
1105
  const a = n.map((h) => h ?? [], l);
1115
- super(s, t, a, i, r, l);
1116
- const c = a.on((h) => {
1106
+ super(s, t, a, r, i, l);
1107
+ const o = a.on((h) => {
1117
1108
  const b = this.#e.length - h.length;
1118
- b > 0 && (this.#e.splice(h.length, b).forEach((S, v) => {
1119
- const u = h.length + v;
1120
- S.dispose(), this.#s.get(u)?.(), this.#s.delete(u), this.#t.delete(u), this.#i.get(u)?.(), this.#i.delete(u), this.#r.delete(u);
1121
- }), this.#c(), this.#a());
1109
+ b > 0 && (this.#e.splice(h.length, b).forEach((k, g) => {
1110
+ const u = h.length + g;
1111
+ k.dispose(), this.#s.get(u)?.(), this.#s.delete(u), this.#t.delete(u), this.#r.get(u)?.(), this.#r.delete(u), this.#i.delete(u);
1112
+ }), this.#o(), this.#a());
1122
1113
  });
1123
- this.length = a.map((h) => h.length), this.#o = this.touched.on(() => {
1124
- this.#c();
1114
+ this.length = a.map((h) => h.length), this.#c = this.touched.on(() => {
1115
+ this.#o();
1125
1116
  }), this.#u = this.dirty.on(() => {
1126
1117
  this.#a();
1127
1118
  });
@@ -1129,11 +1120,11 @@ class we extends M {
1129
1120
  this.onDispose(() => {
1130
1121
  for (const h of this.#e)
1131
1122
  h.dispose();
1132
- this.length.dispose(), this.#e.length = 0, c(), a.dispose();
1123
+ this.length.dispose(), this.#e.length = 0, o(), a.dispose();
1133
1124
  for (const h of this.#s.values()) h();
1134
1125
  this.#s.clear(), this.#t.clear(), this.#n.dispose();
1135
- for (const h of this.#i.values()) h();
1136
- this.#i.clear(), this.#r.clear(), this.#l.dispose(), this.#o(), this.#u(), p();
1126
+ for (const h of this.#r.values()) h();
1127
+ this.#r.clear(), this.#i.clear(), this.#l.dispose(), this.#c(), this.#u(), p();
1137
1128
  });
1138
1129
  }
1139
1130
  item = (s) => {
@@ -1142,7 +1133,7 @@ class we extends M {
1142
1133
  const t = async (l) => {
1143
1134
  const a = this.signal.value.slice();
1144
1135
  a[s] = l, this.change(a);
1145
- }, n = new M(
1136
+ }, n = new O(
1146
1137
  [...this.path, s],
1147
1138
  t,
1148
1139
  this.signal.map((l) => l[s]),
@@ -1153,14 +1144,14 @@ class we extends M {
1153
1144
  }
1154
1145
  );
1155
1146
  this.#e[s] = n;
1156
- const i = n.touched.on((l) => {
1157
- this.#t.set(s, l), this.#c();
1147
+ const r = n.touched.on((l) => {
1148
+ this.#t.set(s, l), this.#o();
1158
1149
  });
1159
- this.#s.set(s, i);
1160
- const r = n.dirty.on((l) => {
1161
- this.#r.set(s, l), this.#a();
1150
+ this.#s.set(s, r);
1151
+ const i = n.dirty.on((l) => {
1152
+ this.#i.set(s, l), this.#a();
1162
1153
  });
1163
- return this.#i.set(s, r), n;
1154
+ return this.#r.set(s, i), n;
1164
1155
  };
1165
1156
  push = (...s) => {
1166
1157
  this.change([...this.signal.value, ...s]);
@@ -1183,8 +1174,8 @@ class we extends M {
1183
1174
  };
1184
1175
  move = (s, t, n = 1) => {
1185
1176
  if (n < 1 || s === t) return;
1186
- const i = this.signal.value.slice(), r = i.splice(s, n);
1187
- i.splice(t, 0, ...r), this.change(i);
1177
+ const r = this.signal.value.slice(), i = r.splice(s, n);
1178
+ r.splice(t, 0, ...i), this.change(r);
1188
1179
  };
1189
1180
  markAllTouched = () => {
1190
1181
  this.markTouched();
@@ -1200,7 +1191,7 @@ class we extends M {
1200
1191
  };
1201
1192
  #a = () => {
1202
1193
  let s = !1;
1203
- for (const t of this.#r.values())
1194
+ for (const t of this.#i.values())
1204
1195
  if (t) {
1205
1196
  s = !0;
1206
1197
  break;
@@ -1208,7 +1199,7 @@ class we extends M {
1208
1199
  this.#l.set(this.dirty.value || s);
1209
1200
  };
1210
1201
  }
1211
- function ke(e) {
1202
+ function Ce(e) {
1212
1203
  function s(t) {
1213
1204
  return typeof t == "number" ? t : t.toString();
1214
1205
  }
@@ -1216,13 +1207,13 @@ function ke(e) {
1216
1207
  (t) => typeof t == "object" && t.key != null ? s(t.key) : s(t)
1217
1208
  );
1218
1209
  }
1219
- function Se(e) {
1220
- const s = e.filter((i) => i.path == null || i.path.length === 0).map((i) => i.message), t = e.filter((i) => i.path != null && i.path.length > 0).reduce((i, r) => {
1221
- const l = ke(r.path), a = l.pop();
1222
- let c = i;
1210
+ function _e(e) {
1211
+ const s = e.filter((r) => r.path == null || r.path.length === 0).map((r) => r.message), t = e.filter((r) => r.path != null && r.path.length > 0).reduce((r, i) => {
1212
+ const l = Ce(i.path), a = l.pop();
1213
+ let o = r;
1223
1214
  for (const p of l)
1224
- c.dependencies == null && (c.dependencies = {}), c.dependencies[p] == null && (c.dependencies[p] = {}), c = c.dependencies[p];
1225
- return c.dependencies == null && (c.dependencies = {}), c.dependencies[a] = { message: r.message }, i;
1215
+ o.dependencies == null && (o.dependencies = {}), o.dependencies[p] == null && (o.dependencies[p] = {}), o = o.dependencies[p];
1216
+ return o.dependencies == null && (o.dependencies = {}), o.dependencies[a] = { message: i.message }, r;
1226
1217
  }, {}), n = s.join(`
1227
1218
  `);
1228
1219
  return {
@@ -1230,94 +1221,94 @@ function Se(e) {
1230
1221
  message: n != "" ? n : void 0
1231
1222
  };
1232
1223
  }
1233
- function Ce({
1224
+ function De({
1234
1225
  initialValue: e,
1235
1226
  onChange: s,
1236
1227
  validate: t,
1237
1228
  equals: n,
1238
- validationMode: i,
1239
- validateDebounceMs: r
1229
+ validationMode: r,
1230
+ validateDebounceMs: i
1240
1231
  }) {
1241
- const l = C.deriveProp(e), a = E(D.valid), c = E(!1), p = E(i ?? "touchedOrSubmit"), h = (d) => {
1232
+ const l = S.deriveProp(e), a = I(_.valid), o = I(!1), p = I(r ?? "touchedOrSubmit"), h = (d) => {
1242
1233
  a.set(d);
1243
1234
  };
1244
1235
  let b;
1245
- const S = async (d) => {
1236
+ const k = async (d) => {
1246
1237
  if (t != null) {
1247
- const g = await t(d);
1248
- h(g);
1238
+ const v = await t(d);
1239
+ h(v);
1249
1240
  }
1250
- }, v = async (d) => {
1241
+ }, g = async (d) => {
1251
1242
  l.set(d), s?.(d);
1252
- const g = p.value;
1243
+ const v = p.value;
1253
1244
  if (t != null) {
1254
- if (g === "onSubmit")
1245
+ if (v === "onSubmit")
1255
1246
  return;
1256
- const T = r ?? 0;
1247
+ const T = i ?? 0;
1257
1248
  T > 0 ? (b && clearTimeout(b), b = setTimeout(() => {
1258
- S(d);
1259
- }, T)) : await S(d);
1249
+ k(d);
1250
+ }, T)) : await k(d);
1260
1251
  }
1261
- }, u = new M(
1252
+ }, u = new O(
1262
1253
  [],
1263
- v,
1254
+ g,
1264
1255
  l,
1265
1256
  a,
1266
1257
  {
1267
- disabled: c,
1258
+ disabled: o,
1268
1259
  validationMode: p
1269
1260
  },
1270
1261
  n ?? $
1271
1262
  );
1272
1263
  return u.onDispose(() => {
1273
- c.dispose(), l.dispose(), a.dispose(), p.dispose(), b && clearTimeout(b);
1264
+ o.dispose(), l.dispose(), a.dispose(), p.dispose(), b && clearTimeout(b);
1274
1265
  }), { controller: u, setStatus: h };
1275
1266
  }
1276
- function se(e) {
1277
- return P(o.disabled(e.disabled), o.name(e.name));
1267
+ function ee(e) {
1268
+ return N(c.disabled(e.disabled), c.name(e.name));
1278
1269
  }
1279
- function Ne(e, {
1270
+ function je(e, {
1280
1271
  triggerOn: s = "change"
1281
1272
  } = {}) {
1282
- return P(
1283
- se(e),
1284
- o.value(e.signal),
1285
- (s === "input" ? I.input : I.change)(F(e.change))
1273
+ return N(
1274
+ ee(e),
1275
+ c.value(e.signal),
1276
+ (s === "input" ? D.input : D.change)(F(e.change))
1286
1277
  );
1287
1278
  }
1288
- function Le(e, {
1279
+ function qe(e, {
1289
1280
  triggerOn: s = "change"
1290
1281
  } = {}) {
1291
- return P(
1292
- se(e),
1293
- o.valueAsNumber(e.signal),
1294
- (s === "input" ? I.input : I.change)(
1282
+ return N(
1283
+ ee(e),
1284
+ c.valueAsNumber(e.signal),
1285
+ (s === "input" ? D.input : D.change)(
1295
1286
  ie(e.change)
1296
1287
  )
1297
1288
  );
1298
1289
  }
1299
- function Q(e) {
1300
- return e.issues != null ? D.invalid(Se(e.issues)) : D.valid;
1290
+ function J(e) {
1291
+ return e.issues != null ? _.invalid(_e(e.issues)) : _.valid;
1301
1292
  }
1302
- async function je({
1293
+ async function ze({
1303
1294
  task: e,
1304
1295
  errorMessage: s,
1305
1296
  errorPath: t = ["root"],
1306
1297
  validation: n
1307
1298
  }) {
1308
1299
  try {
1309
- const i = await e();
1310
- return n != null ? n(i) : D.valid;
1311
- } catch (i) {
1312
- const r = s ?? (i instanceof Error ? i.message : "Operation failed");
1313
- return t.length === 1 && t[0] === "root" ? D.invalid({
1314
- message: r
1315
- }) : D.invalid({
1316
- dependencies: te(t, r)
1300
+ const r = await e();
1301
+ return n != null ? n(r) : _.valid;
1302
+ } catch (r) {
1303
+ const i = s ?? (r instanceof Error ? r.message : "Operation failed");
1304
+ return t.length === 1 && t[0] === "root" ? _.invalid({
1305
+ message: i
1306
+ }) : _.invalid({
1307
+ dependencies: se(t, i)
1317
1308
  });
1318
1309
  }
1319
1310
  }
1320
- function te(e, s) {
1311
+ function se(e, s) {
1321
1312
  if (e.length === 1)
1322
1313
  return {
1323
1314
  [e[0]]: { message: s }
@@ -1325,48 +1316,48 @@ function te(e, s) {
1325
1316
  const [t, ...n] = e;
1326
1317
  return {
1327
1318
  [t]: {
1328
- dependencies: te(n, s)
1319
+ dependencies: se(n, s)
1329
1320
  }
1330
1321
  };
1331
1322
  }
1332
- function qe({
1323
+ function He({
1333
1324
  initialValue: e = {},
1334
1325
  schema: s,
1335
- onSubmit: t = async () => D.valid,
1326
+ onSubmit: t = async () => _.valid,
1336
1327
  validationMode: n,
1337
- validateDebounceMs: i
1328
+ validateDebounceMs: r
1338
1329
  }) {
1339
- const { controller: r, setStatus: l } = Ce({
1330
+ const { controller: i, setStatus: l } = De({
1340
1331
  initialValue: e,
1341
1332
  validationMode: n ?? "touchedOrSubmit",
1342
- validateDebounceMs: i,
1343
- validate: (n ?? "touchedOrSubmit") === "onSubmit" || s == null ? void 0 : async (h) => Q(
1333
+ validateDebounceMs: r,
1334
+ validate: (n ?? "touchedOrSubmit") === "onSubmit" || s == null ? void 0 : async (h) => J(
1344
1335
  await s["~standard"].validate(h)
1345
1336
  )
1346
- }), a = E(!1), c = r.object();
1347
- return c.onDispose(a.dispose), {
1348
- controller: c,
1337
+ }), a = I(!1), o = i.object();
1338
+ return o.onDispose(a.dispose), {
1339
+ controller: o,
1349
1340
  setStatus: l,
1350
1341
  submit: async (h) => {
1351
- if (a.set(!0), h?.preventDefault(), c.markAllTouched(), (n ?? "touchedOrSubmit") === "onSubmit") {
1352
- const S = c.signal.value, v = s?.["~standard"].validate;
1353
- if (v == null) {
1342
+ if (a.set(!0), h?.preventDefault(), o.markAllTouched(), (n ?? "touchedOrSubmit") === "onSubmit") {
1343
+ const k = o.signal.value, g = s?.["~standard"].validate;
1344
+ if (g == null) {
1354
1345
  a.set(!1);
1355
1346
  return;
1356
1347
  }
1357
- const u = Q(await v(S));
1348
+ const u = J(await g(k));
1358
1349
  if (l(u), u.type === "invalid") {
1359
1350
  a.set(!1);
1360
1351
  return;
1361
1352
  }
1362
1353
  }
1363
- const b = await t(c.signal.value);
1354
+ const b = await t(o.signal.value);
1364
1355
  a.set(!1), b.type === "invalid" && l(b);
1365
1356
  },
1366
1357
  submitting: a
1367
1358
  };
1368
1359
  }
1369
- function _e(e) {
1360
+ function Ee(e) {
1370
1361
  switch (e) {
1371
1362
  case "success":
1372
1363
  return "material-symbols:check-circle-outline";
@@ -1379,7 +1370,7 @@ function _e(e) {
1379
1370
  return "material-symbols:info-outline";
1380
1371
  }
1381
1372
  }
1382
- function De(e) {
1373
+ function Ie(e) {
1383
1374
  switch (e) {
1384
1375
  case "success":
1385
1376
  return "success";
@@ -1392,30 +1383,30 @@ function De(e) {
1392
1383
  return "info";
1393
1384
  }
1394
1385
  }
1395
- function Ie(e, s, t, n) {
1396
- const i = [
1386
+ function Te(e, s, t, n) {
1387
+ const r = [
1397
1388
  "bc-notice",
1398
1389
  `bc-notice--${e}`,
1399
1390
  `bc-notice--tone-${s}`
1400
1391
  ];
1401
- return t && i.push("bc-notice--dismissible"), n && n.length > 0 && i.push(n), i.join(" ");
1392
+ return t && r.push("bc-notice--dismissible"), n && n.length > 0 && r.push(n), r.join(" ");
1402
1393
  }
1403
- function ze({
1394
+ function Ue({
1404
1395
  variant: e = "info",
1405
1396
  tone: s = "subtle",
1406
1397
  role: t,
1407
1398
  title: n,
1408
- icon: i,
1409
- closable: r = !1,
1399
+ icon: r,
1400
+ closable: i = !1,
1410
1401
  onDismiss: l,
1411
1402
  class: a
1412
- }, ...c) {
1413
- const p = E(!0);
1414
- return O(p, () => {
1415
- const h = C.map(
1416
- r,
1403
+ }, ...o) {
1404
+ const p = I(!0);
1405
+ return V(p, () => {
1406
+ const h = S.map(
1407
+ i,
1417
1408
  (u) => !!u || l != null
1418
- ), b = C.map(e, (u) => u ?? "info"), S = C.map(s, (u) => u ?? "subtle"), v = k(
1409
+ ), b = S.map(e, (u) => u ?? "info"), k = S.map(s, (u) => u ?? "subtle"), g = w(
1419
1410
  t,
1420
1411
  b
1421
1412
  )(
@@ -1424,43 +1415,43 @@ function ze({
1424
1415
  return q(
1425
1416
  z,
1426
1417
  (u) => f.div(
1427
- o.class(
1428
- k(
1418
+ c.class(
1419
+ w(
1429
1420
  b,
1430
- S,
1421
+ k,
1431
1422
  h,
1432
1423
  a
1433
- )((d, g, T, A) => Ie(d, g, T, A))
1424
+ )((d, v, T, A) => Te(d, v, T, A))
1434
1425
  ),
1435
1426
  // Accessibility role mapping (always defined)
1436
- o.role(C.map(v, (d) => d)),
1437
- re(
1438
- C.map(i, (d) => d === !1),
1427
+ c.role(S.map(g, (d) => d)),
1428
+ ae(
1429
+ S.map(r, (d) => d === !1),
1439
1430
  () => f.div(
1440
- o.class("bc-notice__icon"),
1441
- N({
1442
- icon: k(
1443
- i,
1431
+ c.class("bc-notice__icon"),
1432
+ B({
1433
+ icon: w(
1434
+ r,
1444
1435
  b
1445
1436
  )(
1446
- (d, g) => d === void 0 ? _e(g) : String(d)
1437
+ (d, v) => d === void 0 ? Ee(v) : String(d)
1447
1438
  ),
1448
1439
  size: "md",
1449
- color: C.map(b, De)
1440
+ color: S.map(b, Ie)
1450
1441
  })
1451
1442
  )
1452
1443
  ),
1453
1444
  f.div(
1454
- o.class("bc-notice__body"),
1455
- ae(
1445
+ c.class("bc-notice__body"),
1446
+ le(
1456
1447
  n,
1457
- (d) => f.div(o.class("bc-notice__title"), d)
1448
+ (d) => f.div(c.class("bc-notice__title"), d)
1458
1449
  ),
1459
- f.div(o.class("bc-notice__content"), ...c)
1450
+ f.div(c.class("bc-notice__content"), ...o)
1460
1451
  ),
1461
- O(
1452
+ V(
1462
1453
  h,
1463
- () => oe({
1454
+ () => ue({
1464
1455
  size: "xs",
1465
1456
  label: u.$.closeModal,
1466
1457
  onClick: () => {
@@ -1473,41 +1464,41 @@ function ze({
1473
1464
  });
1474
1465
  }
1475
1466
  export {
1476
- we as A,
1477
- ee as B,
1478
- oe as C,
1479
- Ve as D,
1480
- Fe as E,
1481
- Z as I,
1482
- ue as L,
1483
- Pe as M,
1484
- ze as N,
1467
+ Se as A,
1468
+ Z as B,
1469
+ ue as C,
1470
+ Me as D,
1471
+ xe as E,
1472
+ Y as I,
1473
+ he as L,
1474
+ Be as M,
1475
+ Ue as N,
1485
1476
  $ as O,
1486
- $e as P,
1487
- de as R,
1488
- Me as S,
1489
- D as a,
1490
- Oe as b,
1491
- xe as c,
1492
- J as d,
1493
- M as e,
1477
+ Ne as P,
1478
+ pe as R,
1479
+ $e as S,
1480
+ _ as a,
1481
+ Fe as b,
1482
+ Pe as c,
1483
+ G as d,
1484
+ O as e,
1494
1485
  j as f,
1495
- me as g,
1496
- ve as h,
1497
- ye as i,
1498
- ke as j,
1499
- Se as k,
1500
- Ce as l,
1501
- be as m,
1502
- se as n,
1503
- Ne as o,
1504
- Be as p,
1505
- Le as q,
1506
- Q as r,
1486
+ ve as g,
1487
+ we as h,
1488
+ ke as i,
1489
+ Ce as j,
1490
+ _e as k,
1491
+ De as l,
1492
+ ge as m,
1493
+ ee as n,
1494
+ je as o,
1495
+ Le as p,
1496
+ qe as q,
1497
+ J as r,
1507
1498
  H as s,
1508
- je as t,
1509
- qe as u,
1510
- Ae as v,
1511
- ge as w,
1512
- he as x
1499
+ ze as t,
1500
+ He as u,
1501
+ Oe as v,
1502
+ ye as w,
1503
+ de as x
1513
1504
  };