@tempots/beatui 0.61.2 → 0.61.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ar-CZ-UB9pc.cjs → ar-CefikVG3.cjs} +1 -1
- package/dist/{ar-TEVFGyor.js → ar-aMLQTGVh.js} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +4 -4
- package/dist/{de-DAzM31i4.js → de-DBFOC44R.js} +1 -1
- package/dist/{de-IZSle3Nd.cjs → de-ZRnkggf5.cjs} +1 -1
- package/dist/{es-C7Gx9dqG.js → es-C4xOThaT.js} +1 -1
- package/dist/{es-DYe8rpsj.cjs → es-IkNtVSp2.cjs} +1 -1
- package/dist/{fa-CEbnfFly.cjs → fa-B-byOhgU.cjs} +1 -1
- package/dist/{fa-DKX_zJDi.js → fa-B7X_xydY.js} +1 -1
- package/dist/{fr-BRfNV0Yj.js → fr-AmjzbxN_.js} +1 -1
- package/dist/{fr-CrG0l5HN.cjs → fr-F0ZegdR2.cjs} +1 -1
- package/dist/{he-D6hsIiTH.cjs → he-BcEFNuYz.cjs} +1 -1
- package/dist/{he-DRAV97MO.js → he-DY-9yiOC.js} +1 -1
- package/dist/{hi-DyS6BNlk.cjs → hi-CarXvOJD.cjs} +1 -1
- package/dist/{hi-BaZyjzct.js → hi-Clkyp5Fu.js} +1 -1
- package/dist/{index-nqoZcPdT.js → index-CGoK9M1f.js} +3 -3
- package/dist/{index-Bu4A7nbp.js → index-D4U7cDIP.js} +1 -1
- package/dist/{index-BJxozmss.cjs → index-DJ6AuTd_.cjs} +2 -2
- package/dist/{index-Ch-e3nx4.cjs → index-J7CsYy0-.cjs} +1 -1
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +10 -10
- package/dist/{it-TCCyUGRc.js → it-BC32WmGF.js} +1 -1
- package/dist/{it-5c_IK4cL.cjs → it-ops3Czzi.cjs} +1 -1
- package/dist/{ja-VrfuPGN3.cjs → ja-2dzONSkh.cjs} +1 -1
- package/dist/{ja-Bpc6MfYs.js → ja-JNSZS_Hv.js} +1 -1
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +3 -3
- package/dist/{ko-BBN3tai6.js → ko-B8l0TJp0.js} +1 -1
- package/dist/{ko-BKSVpY_x.cjs → ko-uVJEhtyQ.cjs} +1 -1
- package/dist/{modal-DJDeFIxV.js → modal-DQ9LXrC4.js} +2 -2
- package/dist/{modal-DA0OKusk.cjs → modal-mwKwnIZS.cjs} +1 -1
- package/dist/{nl-CwXW1x3G.js → nl-BpYESHP8.js} +1 -1
- package/dist/{nl-Bry6kgvp.cjs → nl-DXnbYulJ.cjs} +1 -1
- package/dist/{notice-Cpso9PgQ.js → notice-BH_pePhd.js} +80 -79
- package/dist/{notice-BIcHmVnn.cjs → notice-D3As5ZhJ.cjs} +2 -2
- package/dist/{pl-CI2JMYK3.cjs → pl-RbiIBA3C.cjs} +1 -1
- package/dist/{pl-utONv5st.js → pl-_sWhGdrs.js} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/{pt-pg3nMUQB.cjs → pt-BAecyAv-.cjs} +1 -1
- package/dist/{pt-BKZlur2O.js → pt-BmiQvHUz.js} +1 -1
- package/dist/{ru-DcagJ4uT.cjs → ru-DZ4gJ6yr.cjs} +1 -1
- package/dist/{ru-B6HTgTqQ.js → ru-DacnqexG.js} +1 -1
- package/dist/{toolbar-_yJ-dm-Z.js → toolbar-Bk5-22ln.js} +1 -1
- package/dist/{toolbar-CC22Z53U.cjs → toolbar-wEm8iNet.cjs} +1 -1
- package/dist/{tr-BabBuwqd.cjs → tr-7jGF_acJ.cjs} +1 -1
- package/dist/{tr-DhELxnEm.js → tr-BSS5b_v6.js} +1 -1
- package/dist/{translations-g3qGTkzw.js → translations-BUTBIDsS.js} +36 -36
- package/dist/{translations-BRRDPpLp.cjs → translations-C7HVMcOQ.cjs} +1 -1
- package/dist/translations-hMQlZmD4.cjs +1 -0
- package/dist/{translations-ConAsIH1.js → translations-zGwuSQWQ.js} +1 -1
- package/dist/types/components/form/control/control.d.ts +3 -1
- package/dist/{ur-CT09S1x5.js → ur-C6Ky6OCl.js} +1 -1
- package/dist/{ur-BVE5ZRyR.cjs → ur-ZT6fZFId.cjs} +1 -1
- package/dist/{utils-B25pniId.cjs → utils-DKHQo6zE.cjs} +1 -1
- package/dist/{utils-BRzdi3Gx.js → utils-DplD1EWi.js} +2 -2
- package/dist/{vi-BsZzI9Fa.js → vi-Bx2gx2S0.js} +1 -1
- package/dist/{vi-DvU7fKay.cjs → vi-tNs62pgs.cjs} +1 -1
- package/dist/{zh-CijYgDFA.cjs → zh-CBnP8_Lf.cjs} +1 -1
- package/dist/{zh-BeCkrv4q.js → zh-eixtg-Ce.js} +1 -1
- package/package.json +1 -1
- package/dist/translations-DM5R5VZ0.cjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Use as q, coalesce as
|
|
2
|
-
import { a as z, B as
|
|
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";
|
|
3
3
|
const K = /* @__PURE__ */ new Map();
|
|
4
4
|
function H(e) {
|
|
5
5
|
const s = K.get(e) ?? 0;
|
|
@@ -456,7 +456,7 @@ const w = {
|
|
|
456
456
|
return m.success(s);
|
|
457
457
|
}
|
|
458
458
|
};
|
|
459
|
-
function
|
|
459
|
+
function oe({
|
|
460
460
|
size: e = "sm",
|
|
461
461
|
icon: s = "line-md:close",
|
|
462
462
|
disabled: t,
|
|
@@ -466,8 +466,8 @@ function ce({
|
|
|
466
466
|
label: l
|
|
467
467
|
}, ...a) {
|
|
468
468
|
return q(z, (c) => {
|
|
469
|
-
const p =
|
|
470
|
-
return
|
|
469
|
+
const p = X(l, c.$.closeModal);
|
|
470
|
+
return le(
|
|
471
471
|
{
|
|
472
472
|
variant: "text",
|
|
473
473
|
size: e,
|
|
@@ -486,7 +486,7 @@ function ce({
|
|
|
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),
|
|
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) => {
|
|
490
490
|
const {
|
|
491
491
|
value: s,
|
|
492
492
|
onBlur: t,
|
|
@@ -536,8 +536,8 @@ const Ae = (...e) => f.span(o.class(U("emphasis")), ...e), oe = (...e) => f.span
|
|
|
536
536
|
x.checked(s),
|
|
537
537
|
x.disabled(r),
|
|
538
538
|
i != null ? x.labelledby(b) : _,
|
|
539
|
-
|
|
540
|
-
t != null ?
|
|
539
|
+
I.keydown(v),
|
|
540
|
+
t != null ? I.blur(t) : _,
|
|
541
541
|
N({
|
|
542
542
|
icon: k(
|
|
543
543
|
s,
|
|
@@ -554,21 +554,21 @@ const Ae = (...e) => f.span(o.class(U("emphasis")), ...e), oe = (...e) => f.span
|
|
|
554
554
|
o.class("bc-checkbox-input__label"),
|
|
555
555
|
o.id(b),
|
|
556
556
|
o.for(h),
|
|
557
|
-
|
|
557
|
+
he(i)
|
|
558
558
|
) : _
|
|
559
559
|
)
|
|
560
560
|
},
|
|
561
|
-
|
|
561
|
+
I.click(S)
|
|
562
562
|
);
|
|
563
|
-
},
|
|
563
|
+
}, de = f.span(
|
|
564
564
|
o.class("bc-input-wrapper__required"),
|
|
565
565
|
" *"
|
|
566
566
|
);
|
|
567
|
-
function
|
|
567
|
+
function pe(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
|
|
571
|
+
function fe(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
|
}
|
|
@@ -576,7 +576,7 @@ function G(e, s) {
|
|
|
576
576
|
if (e === "horizontal-fixed" && s != null)
|
|
577
577
|
return `--input-wrapper-label-width: ${s}`;
|
|
578
578
|
}
|
|
579
|
-
const
|
|
579
|
+
const Z = ({
|
|
580
580
|
fullWidth: e = !1,
|
|
581
581
|
required: s,
|
|
582
582
|
label: t,
|
|
@@ -593,7 +593,7 @@ const Y = ({
|
|
|
593
593
|
}, ...v) => {
|
|
594
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");
|
|
595
595
|
return f.div(
|
|
596
|
-
o.class(C.map(g, (y) =>
|
|
596
|
+
o.class(C.map(g, (y) => pe(y))),
|
|
597
597
|
o.class(
|
|
598
598
|
C.map(
|
|
599
599
|
e,
|
|
@@ -628,7 +628,7 @@ const Y = ({
|
|
|
628
628
|
u,
|
|
629
629
|
d
|
|
630
630
|
)(
|
|
631
|
-
(y, V) =>
|
|
631
|
+
(y, V) => fe(
|
|
632
632
|
y ?? !1,
|
|
633
633
|
V ?? !1
|
|
634
634
|
)
|
|
@@ -636,7 +636,7 @@ const Y = ({
|
|
|
636
636
|
),
|
|
637
637
|
t
|
|
638
638
|
),
|
|
639
|
-
t != null && s ?
|
|
639
|
+
t != null && s ? de : _
|
|
640
640
|
),
|
|
641
641
|
// Show description under label when horizontal
|
|
642
642
|
O(
|
|
@@ -653,7 +653,7 @@ const Y = ({
|
|
|
653
653
|
)
|
|
654
654
|
)
|
|
655
655
|
),
|
|
656
|
-
i != null ?
|
|
656
|
+
i != null ? ue(i) : _,
|
|
657
657
|
n
|
|
658
658
|
) : _,
|
|
659
659
|
f.div(
|
|
@@ -705,7 +705,7 @@ const Fe = (e) => {
|
|
|
705
705
|
onChange: r,
|
|
706
706
|
onInput: l,
|
|
707
707
|
placeholder: a
|
|
708
|
-
} = s, c = n ??
|
|
708
|
+
} = s, c = n ?? ce({
|
|
709
709
|
icon: "line-md:email",
|
|
710
710
|
size: e.size,
|
|
711
711
|
color: "neutral"
|
|
@@ -715,14 +715,14 @@ const Fe = (e) => {
|
|
|
715
715
|
(p) => W({
|
|
716
716
|
...e,
|
|
717
717
|
before: c,
|
|
718
|
-
input:
|
|
719
|
-
|
|
720
|
-
o.placeholder(
|
|
718
|
+
input: ne.email(
|
|
719
|
+
Y(s),
|
|
720
|
+
o.placeholder(X(a, p.$.emailPlaceholderText)),
|
|
721
721
|
o.value(t),
|
|
722
722
|
o.class("bc-input"),
|
|
723
|
-
i != null ?
|
|
724
|
-
r != null ?
|
|
725
|
-
l != null ?
|
|
723
|
+
i != null ? I.blur(F(i)) : _,
|
|
724
|
+
r != null ? I.change(F(r)) : _,
|
|
725
|
+
l != null ? I.input(F(l)) : _
|
|
726
726
|
)
|
|
727
727
|
})
|
|
728
728
|
);
|
|
@@ -743,7 +743,7 @@ const Fe = (e) => {
|
|
|
743
743
|
name: "password",
|
|
744
744
|
disabled: c,
|
|
745
745
|
...b
|
|
746
|
-
}, v =
|
|
746
|
+
}, v = E(!0), u = k(
|
|
747
747
|
v,
|
|
748
748
|
p
|
|
749
749
|
)((d, g) => d ? g ?? "current-password" : "off");
|
|
@@ -756,7 +756,7 @@ const Fe = (e) => {
|
|
|
756
756
|
o.type("button"),
|
|
757
757
|
o.class("bc-input-container__password-toggle"),
|
|
758
758
|
x.label(d.$.togglePasswordVisibility),
|
|
759
|
-
|
|
759
|
+
I.click(() => v.update((A) => !A)),
|
|
760
760
|
O(
|
|
761
761
|
v,
|
|
762
762
|
() => N({ icon: "line-md:watch" }),
|
|
@@ -768,7 +768,7 @@ const Fe = (e) => {
|
|
|
768
768
|
disabled: c,
|
|
769
769
|
hasError: a,
|
|
770
770
|
input: f.input(
|
|
771
|
-
|
|
771
|
+
Y({
|
|
772
772
|
...S,
|
|
773
773
|
autocomplete: u,
|
|
774
774
|
placeholder: g
|
|
@@ -780,41 +780,42 @@ const Fe = (e) => {
|
|
|
780
780
|
),
|
|
781
781
|
o.class("bc-input"),
|
|
782
782
|
o.value(s),
|
|
783
|
-
t != null ?
|
|
784
|
-
n != null ?
|
|
785
|
-
i != null ?
|
|
783
|
+
t != null ? I.blur(F(t)) : _,
|
|
784
|
+
n != null ? I.change(F(n)) : _,
|
|
785
|
+
i != null ? I.input(F(i)) : _
|
|
786
786
|
),
|
|
787
787
|
after: l != null ? P(T, l) : T
|
|
788
788
|
});
|
|
789
789
|
});
|
|
790
|
-
},
|
|
790
|
+
}, be = (
|
|
791
791
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
792
792
|
(e, s) => () => {
|
|
793
793
|
e.markTouched(), s?.();
|
|
794
794
|
}
|
|
795
|
-
),
|
|
795
|
+
), J = (e, s) => (t) => {
|
|
796
796
|
e.change(t), s?.(t);
|
|
797
797
|
};
|
|
798
|
-
function
|
|
799
|
-
const { controller: t, onBlur: n, onChange: i, id: r,
|
|
798
|
+
function ee(e, s) {
|
|
799
|
+
const { controller: t, onBlur: n, onChange: i, id: r, triggerOn: l, ...a } = s;
|
|
800
800
|
return e({
|
|
801
801
|
id: r ?? t.name,
|
|
802
802
|
disabled: t.disabled,
|
|
803
803
|
value: t.signal,
|
|
804
804
|
hasError: t.errorVisible,
|
|
805
805
|
name: t.name,
|
|
806
|
-
...
|
|
807
|
-
|
|
808
|
-
|
|
806
|
+
...a,
|
|
807
|
+
onInput: l === "input" ? J(t, i) : void 0,
|
|
808
|
+
onChange: l !== "input" ? J(t, i) : void 0,
|
|
809
|
+
onBlur: be(t, n)
|
|
809
810
|
});
|
|
810
811
|
}
|
|
811
812
|
function xe(e, { id: s, labelFor: t, ...n }, ...i) {
|
|
812
813
|
const r = s ?? n.controller.name ?? H("control");
|
|
813
|
-
return
|
|
814
|
+
return Z(
|
|
814
815
|
{
|
|
815
816
|
...n,
|
|
816
817
|
labelFor: t ?? r,
|
|
817
|
-
content:
|
|
818
|
+
content: ee(
|
|
818
819
|
(a) => e({ ...a, id: r }),
|
|
819
820
|
n
|
|
820
821
|
)
|
|
@@ -824,7 +825,7 @@ function xe(e, { id: s, labelFor: t, ...n }, ...i) {
|
|
|
824
825
|
}
|
|
825
826
|
function me(e, s) {
|
|
826
827
|
const { toInput: t, fromInput: n, controller: i, ...r } = s, l = i.transform(t, n);
|
|
827
|
-
return
|
|
828
|
+
return ee(e, {
|
|
828
829
|
...r,
|
|
829
830
|
controller: l
|
|
830
831
|
});
|
|
@@ -835,7 +836,7 @@ function Pe(e, {
|
|
|
835
836
|
...n
|
|
836
837
|
}, ...i) {
|
|
837
838
|
const r = s ?? n.controller.name ?? H("control");
|
|
838
|
-
return
|
|
839
|
+
return Z(
|
|
839
840
|
{
|
|
840
841
|
...n,
|
|
841
842
|
labelFor: t ?? r,
|
|
@@ -885,11 +886,11 @@ class M {
|
|
|
885
886
|
dirty;
|
|
886
887
|
dependencyErrors;
|
|
887
888
|
#e = {
|
|
888
|
-
disabled:
|
|
889
|
-
touched:
|
|
889
|
+
disabled: E(!1),
|
|
890
|
+
touched: E(!1)
|
|
890
891
|
};
|
|
891
892
|
#t;
|
|
892
|
-
#s =
|
|
893
|
+
#s = E(void 0);
|
|
893
894
|
parent;
|
|
894
895
|
disabled;
|
|
895
896
|
#n = [];
|
|
@@ -991,11 +992,11 @@ class ye extends M {
|
|
|
991
992
|
#e = /* @__PURE__ */ new Map();
|
|
992
993
|
#t = /* @__PURE__ */ new Map();
|
|
993
994
|
#s = /* @__PURE__ */ new Map();
|
|
994
|
-
#n =
|
|
995
|
+
#n = E(!1);
|
|
995
996
|
touchedDeep = this.#n;
|
|
996
997
|
#r = /* @__PURE__ */ new Map();
|
|
997
998
|
#i = /* @__PURE__ */ new Map();
|
|
998
|
-
#l =
|
|
999
|
+
#l = E(!1);
|
|
999
1000
|
dirtyDeep = this.#l;
|
|
1000
1001
|
#o;
|
|
1001
1002
|
#u;
|
|
@@ -1092,11 +1093,11 @@ class we extends M {
|
|
|
1092
1093
|
length;
|
|
1093
1094
|
#t = /* @__PURE__ */ new Map();
|
|
1094
1095
|
#s = /* @__PURE__ */ new Map();
|
|
1095
|
-
#n =
|
|
1096
|
+
#n = E(!1);
|
|
1096
1097
|
touchedDeep = this.#n;
|
|
1097
1098
|
#r = /* @__PURE__ */ new Map();
|
|
1098
1099
|
#i = /* @__PURE__ */ new Map();
|
|
1099
|
-
#l =
|
|
1100
|
+
#l = E(!1);
|
|
1100
1101
|
dirtyDeep = this.#l;
|
|
1101
1102
|
#o;
|
|
1102
1103
|
#u;
|
|
@@ -1237,7 +1238,7 @@ function Ce({
|
|
|
1237
1238
|
validationMode: i,
|
|
1238
1239
|
validateDebounceMs: r
|
|
1239
1240
|
}) {
|
|
1240
|
-
const l = C.deriveProp(e), a =
|
|
1241
|
+
const l = C.deriveProp(e), a = E(D.valid), c = E(!1), p = E(i ?? "touchedOrSubmit"), h = (d) => {
|
|
1241
1242
|
a.set(d);
|
|
1242
1243
|
};
|
|
1243
1244
|
let b;
|
|
@@ -1272,30 +1273,30 @@ function Ce({
|
|
|
1272
1273
|
c.dispose(), l.dispose(), a.dispose(), p.dispose(), b && clearTimeout(b);
|
|
1273
1274
|
}), { controller: u, setStatus: h };
|
|
1274
1275
|
}
|
|
1275
|
-
function
|
|
1276
|
+
function se(e) {
|
|
1276
1277
|
return P(o.disabled(e.disabled), o.name(e.name));
|
|
1277
1278
|
}
|
|
1278
1279
|
function Ne(e, {
|
|
1279
1280
|
triggerOn: s = "change"
|
|
1280
1281
|
} = {}) {
|
|
1281
1282
|
return P(
|
|
1282
|
-
|
|
1283
|
+
se(e),
|
|
1283
1284
|
o.value(e.signal),
|
|
1284
|
-
(s === "input" ?
|
|
1285
|
+
(s === "input" ? I.input : I.change)(F(e.change))
|
|
1285
1286
|
);
|
|
1286
1287
|
}
|
|
1287
1288
|
function Le(e, {
|
|
1288
1289
|
triggerOn: s = "change"
|
|
1289
1290
|
} = {}) {
|
|
1290
1291
|
return P(
|
|
1291
|
-
|
|
1292
|
+
se(e),
|
|
1292
1293
|
o.valueAsNumber(e.signal),
|
|
1293
|
-
(s === "input" ?
|
|
1294
|
-
|
|
1294
|
+
(s === "input" ? I.input : I.change)(
|
|
1295
|
+
ie(e.change)
|
|
1295
1296
|
)
|
|
1296
1297
|
);
|
|
1297
1298
|
}
|
|
1298
|
-
function
|
|
1299
|
+
function Q(e) {
|
|
1299
1300
|
return e.issues != null ? D.invalid(Se(e.issues)) : D.valid;
|
|
1300
1301
|
}
|
|
1301
1302
|
async function je({
|
|
@@ -1312,11 +1313,11 @@ async function je({
|
|
|
1312
1313
|
return t.length === 1 && t[0] === "root" ? D.invalid({
|
|
1313
1314
|
message: r
|
|
1314
1315
|
}) : D.invalid({
|
|
1315
|
-
dependencies:
|
|
1316
|
+
dependencies: te(t, r)
|
|
1316
1317
|
});
|
|
1317
1318
|
}
|
|
1318
1319
|
}
|
|
1319
|
-
function
|
|
1320
|
+
function te(e, s) {
|
|
1320
1321
|
if (e.length === 1)
|
|
1321
1322
|
return {
|
|
1322
1323
|
[e[0]]: { message: s }
|
|
@@ -1324,7 +1325,7 @@ function se(e, s) {
|
|
|
1324
1325
|
const [t, ...n] = e;
|
|
1325
1326
|
return {
|
|
1326
1327
|
[t]: {
|
|
1327
|
-
dependencies:
|
|
1328
|
+
dependencies: te(n, s)
|
|
1328
1329
|
}
|
|
1329
1330
|
};
|
|
1330
1331
|
}
|
|
@@ -1339,10 +1340,10 @@ function qe({
|
|
|
1339
1340
|
initialValue: e,
|
|
1340
1341
|
validationMode: n ?? "touchedOrSubmit",
|
|
1341
1342
|
validateDebounceMs: i,
|
|
1342
|
-
validate: (n ?? "touchedOrSubmit") === "onSubmit" || s == null ? void 0 : async (h) =>
|
|
1343
|
+
validate: (n ?? "touchedOrSubmit") === "onSubmit" || s == null ? void 0 : async (h) => Q(
|
|
1343
1344
|
await s["~standard"].validate(h)
|
|
1344
1345
|
)
|
|
1345
|
-
}), a =
|
|
1346
|
+
}), a = E(!1), c = r.object();
|
|
1346
1347
|
return c.onDispose(a.dispose), {
|
|
1347
1348
|
controller: c,
|
|
1348
1349
|
setStatus: l,
|
|
@@ -1353,7 +1354,7 @@ function qe({
|
|
|
1353
1354
|
a.set(!1);
|
|
1354
1355
|
return;
|
|
1355
1356
|
}
|
|
1356
|
-
const u =
|
|
1357
|
+
const u = Q(await v(S));
|
|
1357
1358
|
if (l(u), u.type === "invalid") {
|
|
1358
1359
|
a.set(!1);
|
|
1359
1360
|
return;
|
|
@@ -1391,7 +1392,7 @@ function De(e) {
|
|
|
1391
1392
|
return "info";
|
|
1392
1393
|
}
|
|
1393
1394
|
}
|
|
1394
|
-
function
|
|
1395
|
+
function Ie(e, s, t, n) {
|
|
1395
1396
|
const i = [
|
|
1396
1397
|
"bc-notice",
|
|
1397
1398
|
`bc-notice--${e}`,
|
|
@@ -1409,7 +1410,7 @@ function ze({
|
|
|
1409
1410
|
onDismiss: l,
|
|
1410
1411
|
class: a
|
|
1411
1412
|
}, ...c) {
|
|
1412
|
-
const p =
|
|
1413
|
+
const p = E(!0);
|
|
1413
1414
|
return O(p, () => {
|
|
1414
1415
|
const h = C.map(
|
|
1415
1416
|
r,
|
|
@@ -1429,11 +1430,11 @@ function ze({
|
|
|
1429
1430
|
S,
|
|
1430
1431
|
h,
|
|
1431
1432
|
a
|
|
1432
|
-
)((d, g, T, A) =>
|
|
1433
|
+
)((d, g, T, A) => Ie(d, g, T, A))
|
|
1433
1434
|
),
|
|
1434
1435
|
// Accessibility role mapping (always defined)
|
|
1435
1436
|
o.role(C.map(v, (d) => d)),
|
|
1436
|
-
|
|
1437
|
+
re(
|
|
1437
1438
|
C.map(i, (d) => d === !1),
|
|
1438
1439
|
() => f.div(
|
|
1439
1440
|
o.class("bc-notice__icon"),
|
|
@@ -1451,7 +1452,7 @@ function ze({
|
|
|
1451
1452
|
),
|
|
1452
1453
|
f.div(
|
|
1453
1454
|
o.class("bc-notice__body"),
|
|
1454
|
-
|
|
1455
|
+
ae(
|
|
1455
1456
|
n,
|
|
1456
1457
|
(d) => f.div(o.class("bc-notice__title"), d)
|
|
1457
1458
|
),
|
|
@@ -1459,7 +1460,7 @@ function ze({
|
|
|
1459
1460
|
),
|
|
1460
1461
|
O(
|
|
1461
1462
|
h,
|
|
1462
|
-
() =>
|
|
1463
|
+
() => oe({
|
|
1463
1464
|
size: "xs",
|
|
1464
1465
|
label: u.$.closeModal,
|
|
1465
1466
|
onClick: () => {
|
|
@@ -1473,22 +1474,22 @@ function ze({
|
|
|
1473
1474
|
}
|
|
1474
1475
|
export {
|
|
1475
1476
|
we as A,
|
|
1476
|
-
|
|
1477
|
-
|
|
1477
|
+
ee as B,
|
|
1478
|
+
oe as C,
|
|
1478
1479
|
Ve as D,
|
|
1479
1480
|
Fe as E,
|
|
1480
|
-
|
|
1481
|
-
|
|
1481
|
+
Z as I,
|
|
1482
|
+
ue as L,
|
|
1482
1483
|
Pe as M,
|
|
1483
1484
|
ze as N,
|
|
1484
1485
|
$ as O,
|
|
1485
1486
|
$e as P,
|
|
1486
|
-
|
|
1487
|
+
de as R,
|
|
1487
1488
|
Me as S,
|
|
1488
1489
|
D as a,
|
|
1489
1490
|
Oe as b,
|
|
1490
1491
|
xe as c,
|
|
1491
|
-
|
|
1492
|
+
J as d,
|
|
1492
1493
|
M as e,
|
|
1493
1494
|
j as f,
|
|
1494
1495
|
me as g,
|
|
@@ -1497,16 +1498,16 @@ export {
|
|
|
1497
1498
|
ke as j,
|
|
1498
1499
|
Se as k,
|
|
1499
1500
|
Ce as l,
|
|
1500
|
-
|
|
1501
|
-
|
|
1501
|
+
be as m,
|
|
1502
|
+
se as n,
|
|
1502
1503
|
Ne as o,
|
|
1503
1504
|
Be as p,
|
|
1504
1505
|
Le as q,
|
|
1505
|
-
|
|
1506
|
+
Q as r,
|
|
1506
1507
|
H as s,
|
|
1507
1508
|
je as t,
|
|
1508
1509
|
qe as u,
|
|
1509
1510
|
Ae as v,
|
|
1510
1511
|
ge as w,
|
|
1511
|
-
|
|
1512
|
+
he as x
|
|
1512
1513
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const s=require("@tempots/dom"),w=require("./translations-DM5R5VZ0.cjs"),L=new Map;function T(e){const t=L.get(e)??0;return L.set(e,t+1),`${e}-${t}`}const v={notAsked:{type:"NotAsked"},loading(e=void 0){return{type:"Loading",previousValue:e}},success(e){return{type:"AsyncSuccess",value:e}},failure(e){return{type:"AsyncFailure",error:e}},isSuccess(e){return e.type==="AsyncSuccess"},isFailure(e){return e.type==="AsyncFailure"},isNotAsked(e){return e.type==="NotAsked"},isLoading(e){return e.type==="Loading"},getOrElse(e,t){return v.isSuccess(e)?e.value:t},getOrElseLazy(e,t){return v.isSuccess(e)?e.value:t()},getOrNull(e){return v.isSuccess(e)?e.value:null},getOrUndefined(e){return v.isSuccess(e)?e.value:void 0},getUnsafe:e=>{if(v.isSuccess(e))return e.value;throw v.isFailure(e)?e.error:new Error("Cannot get value from a not-asked or loading result")},match:(e,{success:t,failure:n,loading:r,notAsked:a=r})=>v.isSuccess(e)?t(e.value):v.isFailure(e)?n(e.error):v.isNotAsked(e)?a():r(e.previousValue),whenSuccess:(e,t)=>(v.isSuccess(e)&&t(e.value),e),whenFailure:(e,t)=>(v.isFailure(e)&&t(e.error),e),equals:(e,t,n={valueEquals:(r,a)=>r===a,errorEquals:(r,a)=>r===a})=>e.type==="AsyncSuccess"&&t.type==="AsyncSuccess"?n.valueEquals(e.value,t.value):e.type==="AsyncFailure"&&t.type==="AsyncFailure"?n.errorEquals(e.error,t.error):e.type==="Loading"&&t.type==="Loading"?n.valueEquals(e.previousValue,t.previousValue):e.type==="NotAsked"&&t.type==="NotAsked",all:e=>{const t=[];for(const n of e)if(v.isSuccess(n))t.push(n.value);else return n;return v.success(t)},ofPromise:async e=>{try{const t=await e;return v.success(t)}catch(t){return v.failure(t instanceof Error?t:new Error(String(t)))}}},O=(e,t)=>e===t||e!==e&&t!==t,S={valid:{type:"valid"},invalid(e){return{type:"invalid",error:e}},isValid(e){return e.type==="valid"},isInvalid(e){return e.type==="invalid"},match:(e,t,n)=>S.isValid(e)?t():n(e.error),toResult:(e,t)=>S.match(e,()=>f.success(t),n=>f.failure(n)),whenValid:(e,t)=>(S.isValid(e)&&t(),e),whenInvalid:(e,t)=>(S.isInvalid(e)&&t(e.error),e)},f={success(e){return{type:"Success",value:e}},failure(e){return{type:"Failure",error:e}},map:(e,t)=>e.type==="Success"?f.success(t(e.value)):e,flatMap:(e,t)=>e.type==="Success"?t(e.value):e,toAsync(e){return f.match(e,t=>v.success(t),t=>v.failure(t))},toValidation(e){return f.match(e,()=>S.valid,t=>S.invalid(t))},isSuccess(e){return e.type==="Success"},isFailure(e){return e.type==="Failure"},getOrElse(e,t){return f.isSuccess(e)?e.value:t},getOrElseLazy(e,t){return f.isSuccess(e)?e.value:t()},getOrNull(e){return f.isSuccess(e)?e.value:null},getOrUndefined(e){return f.isSuccess(e)?e.value:void 0},getUnsafe:e=>{if(f.isSuccess(e))return e.value;throw e.error},match:(e,t,n)=>f.isSuccess(e)?t(e.value):n(e.error),whenSuccess:(e,t)=>(f.isSuccess(e)&&t(e.value),e),whenFailure:(e,t)=>(f.isFailure(e)&&t(e.error),e),combine:(e,t,n,r)=>f.match(e,a=>f.match(t,i=>f.success(n(a,i)),i=>f.failure(i)),a=>f.match(t,i=>f.failure(a),i=>f.failure(r(a,i)))),equals:(e,t,n={valueEquals:(r,a)=>r===a,errorEquals:(r,a)=>r===a})=>e.type==="Success"&&t.type==="Success"?n.valueEquals(e.value,t.value):e.type==="Failure"&&t.type==="Failure"?n.errorEquals(e.error,t.error):!1,all:e=>{const t=[];for(const n of e)if(f.isSuccess(n))t.push(n.value);else return n;return f.success(t)}};function N({size:e="sm",icon:t="line-md:close",disabled:n,roundedness:r="full",color:a="base",onClick:i,label:o},...l){return s.Use(w.BeatUII18n,c=>{const p=s.coalesce(o,c.$.closeModal);return w.Button({variant:"text",size:e,roundedness:r,disabled:n,color:a,onClick:i},s.attr.title(p),s.aria.label(p),...l,w.Icon({icon:t,size:e??"sm"}))})}function F(e){return`bc-label bc-label--${e}`}const ee=(...e)=>s.html.span(s.attr.class(F("emphasis")),...e),j=(...e)=>s.html.span(s.attr.class(F("default")),...e),q=(...e)=>s.html.span(s.attr.class(F("muted")),...e),te=(...e)=>s.html.span(s.attr.class(F("danger")),...e),se=e=>{const{value:t,onBlur:n,onChange:r,placeholder:a,disabled:i,id:o,checkedIcon:l,uncheckedIcon:c,iconSize:p="lg"}=e,h=o??T("checkbox"),m=`${h}-label`,k=()=>{if(s.Value.get(i??!1))return;const u=s.Value.get(t);r?.(!u)},g=u=>{s.Value.get(i??!1)||(u.key===" "||u.key==="Enter")&&(u.preventDefault(),k())};return w.InputContainer({baseContainer:!0,growInput:!1,...e,input:s.html.span(s.attr.class("bc-checkbox-input"),s.html.span(s.attr.class("bc-checkbox-input__checkbox"),s.attr.class(s.Value.map(t,u=>u?"bc-checkbox-input__checkbox--checked":"bc-checkbox-input__checkbox--unchecked")),s.attr.class(s.Value.map(i??!1,u=>u?"bc-checkbox-input__checkbox--disabled":"")),s.attr.id(h),s.attr.role("checkbox"),s.attr.tabindex(s.Value.map(i??!1,u=>u?-1:0)),s.aria.checked(t),s.aria.disabled(i),a!=null?s.aria.labelledby(m):s.Empty,s.on.keydown(g),n!=null?s.on.blur(n):s.Empty,w.Icon({icon:s.computedOf(t,l,c)((u,d,b)=>u?d??"akar-icons/check-box-fill":b??"akar-icons/box"),accessibility:"decorative",size:p})),a!=null?s.html.label(s.attr.class("bc-checkbox-input__label"),s.attr.id(m),s.attr.for(h),q(a)):s.Empty)},s.on.click(k))},U=s.html.span(s.attr.class("bc-input-wrapper__required")," *");function ne(e){const t=["bc-input-wrapper"];return e!=="vertical"&&t.push(`bc-input-wrapper--${e}`),t.join(" ")}function re(e,t){const n=["bc-input-wrapper__label-text"];return e?n.push("bc-input-wrapper__label-text--error"):t?n.push("bc-input-wrapper__label-text--disabled"):n.push("bc-input-wrapper__label-text--default"),n.join(" ")}function x(e,t){if(e==="horizontal-fixed"&&t!=null)return`--input-wrapper-label-width: ${t}`}const B=({fullWidth:e=!1,required:t,label:n,labelChildren:r,context:a,description:i,content:o,error:l,labelFor:c,hasError:p,disabled:h,layout:m,labelWidth:k},...g)=>{const u=p??l!=null,d=h??!1,b=m??"vertical",C=T("input-wrapper"),I=i?`${C}-description`:void 0,_=l!=null?`${C}-error`:void 0,A=s.computedOf(b)(y=>y!=="vertical");return s.html.div(s.attr.class(s.Value.map(b,y=>ne(y))),s.attr.class(s.Value.map(e,y=>y?"bc-input-wrapper--full-width":"")),s.When(s.computedOf(b,k??void 0)((y,E)=>x(y,E)!=null),()=>s.attr.style(s.Value.map(s.computedOf(b,k??void 0)((y,E)=>x(y,E)),y=>y))),n!=null||a!=null?s.html.div(s.attr.class("bc-input-wrapper__header"),s.html.div(s.attr.class("bc-input-wrapper__label-section"),s.html.label(s.attr.class("bc-input-wrapper__label"),c!=null?s.attr.for(c):s.Empty,s.html.span(s.attr.class(s.computedOf(u,d)((y,E)=>re(y??!1,E??!1))),n),n!=null&&t?U:s.Empty),s.When(s.computedOf(A,i)((y,E)=>y&&E!=null),()=>s.html.div(s.attr.class("bc-input-wrapper__description bc-input-wrapper__description--under-label"),s.attr.id(I),i))),a!=null?j(a):s.Empty,r):s.Empty,s.html.div(s.attr.class("bc-input-wrapper__content"),[I,_].filter(Boolean).length>0?s.dataAttr.describedby([I,_].filter(Boolean).join(" ")):s.Empty,t?s.dataAttr.required("true"):s.Empty,s.When(u,()=>s.dataAttr.invalid("true")),o),s.When(s.computedOf(A,i)((y,E)=>!y&&E!=null),()=>s.html.div(s.attr.class("bc-input-wrapper__description"),s.attr.id(I),i)),l!=null?s.When(u,()=>s.html.div(s.attr.class("bc-input-wrapper__error"),s.attr.id(_),s.aria.live("polite"),s.attr.role("alert"),l)):null,...g)};function ae(...e){return s.html.div(s.attr.class("bc-stack"),...e)}const ie=e=>{const t={name:"email",autocomplete:"email",...e},{value:n,before:r,onBlur:a,onChange:i,onInput:o,placeholder:l}=t,c=r??w.InputIcon({icon:"line-md:email",size:e.size,color:"neutral"});return s.Use(w.BeatUII18n,p=>w.InputContainer({...e,before:c,input:s.input.email(w.CommonInputAttributes(t),s.attr.placeholder(s.coalesce(l,p.$.emailPlaceholderText)),s.attr.value(n),s.attr.class("bc-input"),a!=null?s.on.blur(s.emitValue(a)):s.Empty,i!=null?s.on.change(s.emitValue(i)):s.Empty,o!=null?s.on.input(s.emitValue(o)):s.Empty)}))},le=e=>{const{value:t,onBlur:n,onChange:r,onInput:a,before:i,after:o,hasError:l,disabled:c,autocomplete:p,placeholder:h,...m}=e,k={name:"password",disabled:c,...m},g=s.prop(!0),u=s.computedOf(g,p)((d,b)=>d?b??"current-password":"off");return s.Use(w.BeatUII18n,d=>{const b=s.computedOf(d.$.passwordPlaceholderText,g,h)((I,_,A)=>_?"•••••••••••••••":A??I),C=s.html.button(s.attr.type("button"),s.attr.class("bc-input-container__password-toggle"),s.aria.label(d.$.togglePasswordVisibility),s.on.click(()=>g.update(I=>!I)),s.When(g,()=>w.Icon({icon:"line-md:watch"}),()=>w.Icon({icon:"line-md:watch-off"})));return w.InputContainer({before:i,disabled:c,hasError:l,input:s.html.input(w.CommonInputAttributes({...k,autocomplete:u,placeholder:b}),s.When(g,()=>s.Fragment(s.attr.type("password")),()=>s.Fragment(s.attr.type("text"))),s.attr.class("bc-input"),s.attr.value(t),n!=null?s.on.blur(s.emitValue(n)):s.Empty,r!=null?s.on.change(s.emitValue(r)):s.Empty,a!=null?s.on.input(s.emitValue(a)):s.Empty),after:o!=null?s.Fragment(C,o):C})})},W=(e,t)=>()=>{e.markTouched(),t?.()},z=(e,t)=>n=>{e.change(n),t?.(n)};function P(e,t){const{controller:n,onBlur:r,onChange:a,id:i,...o}=t;return e({id:i??n.name,disabled:n.disabled,value:n.signal,hasError:n.errorVisible,name:n.name,...o,onChange:z(n,a),onBlur:W(n,r)})}function oe(e,{id:t,labelFor:n,...r},...a){const i=t??r.controller.name??T("control");return B({...r,labelFor:n??i,content:P(l=>e({...l,id:i}),r)},...a)}function H(e,t){const{toInput:n,fromInput:r,controller:a,...i}=t,o=a.transform(n,r);return P(e,{...i,controller:o})}function ce(e,{id:t,labelFor:n,...r},...a){const i=t??r.controller.name??T("control");return B({...r,labelFor:n??i,content:H(e,{...r,id:i})},...a)}function ue(e){return e.split(".").map(n=>{const r=n.match(/^\[(\d+)\]$/);return r?Number(r[1]):n})}function R(e){return typeof e=="number"?`[${e}]`:`.${e}`}function K(e){if(e.length===0)return"";const[t,...n]=e;return[typeof t=="number"?`[${t}]`:t,...n.map(R)].join("")}function D(e){return function(n){if(n.type==="valid")return n;let r=n.error;for(const a of e)if(r=r?.dependencies?.[a],r==null)return S.valid;return S.invalid(r)}}class V{path;change;signal;status;error;hasError;touched;errorVisible;dirty;dependencyErrors;#e={disabled:s.prop(!1),touched:s.prop(!1)};#s;#t=s.prop(void 0);parent;disabled;#n=[];disabledOrHasErrors;constructor(t,n,r,a,i,o=O){this.path=t,this.change=n,this.signal=r,this.status=a,this.#s=o,this.#t.set(r.value),this.error=a.map(l=>l?.type==="invalid"?l.error?.message:void 0),this.hasError=this.error.map(l=>l!=null),this.touched=this.#e.touched,i.validationMode?this.errorVisible=s.computedOf(this.hasError,this.touched,i.validationMode)((l,c,p)=>p==="continuous"?!!l:!!l&&!!c):this.errorVisible=s.computedOf(this.hasError,this.touched)((l,c)=>!!l&&!!c),this.dirty=s.computedOf(this.signal,this.#t)((l,c)=>!this.#s(l,c)),this.dependencyErrors=a.map(l=>l?.type==="invalid"?l.error?.dependencies:void 0),this.parent=i,this.disabled=s.computedOf(this.#e.disabled,i.disabled)((l,c)=>l||c),this.disabledOrHasErrors=s.computedOf(this.disabled,this.hasError)((l,c)=>l||c),this.onDispose(()=>{this.#e.disabled.dispose(),this.#e.touched.dispose(),this.disabled.dispose(),this.error.dispose(),this.errorVisible.dispose(),this.dirty.dispose(),this.#t.dispose(),this.dependencyErrors.dispose(),this.disabledOrHasErrors.dispose()})}get name(){return K(this.path)}onDispose=t=>{this.#n.push(t)};dispose=()=>{for(const t of this.#n)try{t()}catch(n){console.error("Error in dispose callback:",n)}this.#n.length=0};setDisabled=t=>{this.#e.disabled.set(t)};disable=()=>this.setDisabled(!0);enable=()=>this.setDisabled(!1);markTouched=()=>{this.#e.touched.set(!0)};resetTouched=()=>{this.#e.touched.set(!1)};markPristine=()=>{this.#t.set(this.signal.value)};reset=()=>{this.change(this.#t.value)};array=(t=O)=>new J(this.path,this.change,this.signal,this.status,this.parent,t);object=(t=O)=>new G(this.path,this.change,this.signal,this.status,this.parent,t);transform=(t,n,r=[],a=O)=>new V([...this.path,...r],i=>this.change(n(i)),this.signal.map(t,a),this.status.map(D(r)),this.parent,a);asyncTransform=(t,n,r,a=[],i=O)=>new V([...this.path,...a],o=>{n(o).then(l=>this.change(l))},this.signal.mapAsync(t,r,void 0,i),this.status.map(D(a)),this.parent,i)}class G extends V{#e=new Map;#s=new Map;#t=new Map;#n=s.prop(!1);touchedDeep=this.#n;#a=new Map;#r=new Map;#l=s.prop(!1);dirtyDeep=this.#l;#c;#u;#o=()=>{let t=!1;for(const n of this.#s.values())if(n){t=!0;break}this.#n.set(this.touched.value||t)};constructor(t,n,r,a,i,o){super(t,n,r.map(c=>c??{},o),a,i,o),this.#c=this.touched.on(()=>{this.#o()}),this.#u=this.dirty.on(()=>{this.#i()});const l=this.signal.on(()=>this.#i());this.onDispose(()=>{for(const c of this.#e.values())c.dispose();this.#e.clear();for(const c of this.#t.values())c();this.#t.clear(),this.#s.clear(),this.#n.dispose();for(const c of this.#r.values())c();this.#r.clear(),this.#a.clear(),this.#l.dispose(),this.#c(),this.#u(),l()})}field=t=>{if(this.#e.has(t))return this.#e.get(t);const n=async o=>{this.change({...this.signal.value,[t]:o})},r=new V([...this.path,t],n,this.signal.map(o=>o[t]),this.status.map(D([t])),{disabled:this.disabled,validationMode:this.parent.validationMode});this.#e.set(t,r);const a=r.touched.on(o=>{this.#s.set(t,o),this.#o()});this.#t.set(t,a);const i=r.dirty.on(o=>{this.#a.set(t,o),this.#i()});return this.#r.set(t,i),r};markAllTouched=()=>{this.markTouched();const t=this.signal.value;for(const n of Object.keys(t))this.field(n).markTouched();for(const n of this.#e.values())n.markTouched()};markAllPristine=()=>{this.markPristine();const t=this.signal.value;for(const n of Object.keys(t))this.field(n).markPristine?.();for(const n of this.#e.values())n.markPristine?.()};#i=()=>{let t=!1;for(const n of this.#a.values())if(n){t=!0;break}this.#l.set(this.dirty.value||t)}}class J extends V{#e=new Array;length;#s=new Map;#t=new Map;#n=s.prop(!1);touchedDeep=this.#n;#a=new Map;#r=new Map;#l=s.prop(!1);dirtyDeep=this.#l;#c;#u;#o=()=>{let t=!1;for(const n of this.#s.values())if(n){t=!0;break}this.#n.set(this.touched.value||t)};constructor(t,n,r,a,i,o){const l=r.map(h=>h??[],o);super(t,n,l,a,i,o);const c=l.on(h=>{const m=this.#e.length-h.length;m>0&&(this.#e.splice(h.length,m).forEach((k,g)=>{const u=h.length+g;k.dispose(),this.#t.get(u)?.(),this.#t.delete(u),this.#s.delete(u),this.#r.get(u)?.(),this.#r.delete(u),this.#a.delete(u)}),this.#o(),this.#i())});this.length=l.map(h=>h.length),this.#c=this.touched.on(()=>{this.#o()}),this.#u=this.dirty.on(()=>{this.#i()});const p=this.signal.on(()=>this.#i());this.onDispose(()=>{for(const h of this.#e)h.dispose();this.length.dispose(),this.#e.length=0,c(),l.dispose();for(const h of this.#t.values())h();this.#t.clear(),this.#s.clear(),this.#n.dispose();for(const h of this.#r.values())h();this.#r.clear(),this.#a.clear(),this.#l.dispose(),this.#c(),this.#u(),p()})}item=t=>{if(this.#e[t])return this.#e[t];const n=async o=>{const l=this.signal.value.slice();l[t]=o,this.change(l)},r=new V([...this.path,t],n,this.signal.map(o=>o[t]),this.status.map(D([t])),{disabled:this.disabled,validationMode:this.parent.validationMode});this.#e[t]=r;const a=r.touched.on(o=>{this.#s.set(t,o),this.#o()});this.#t.set(t,a);const i=r.dirty.on(o=>{this.#a.set(t,o),this.#i()});return this.#r.set(t,i),r};push=(...t)=>{this.change([...this.signal.value,...t])};pop=()=>{this.splice(this.signal.value.length-1,1)};shift=()=>{this.splice(0,1)};unshift=(...t)=>{this.change([...t,...this.signal.value])};removeAt=t=>{this.splice(t,1)};splice=(t,n)=>{const r=this.signal.value.slice();r.splice(t,n),this.change(r)};move=(t,n,r=1)=>{if(r<1||t===n)return;const a=this.signal.value.slice(),i=a.splice(t,r);a.splice(n,0,...i),this.change(a)};markAllTouched=()=>{this.markTouched();const t=this.signal.value.length;for(let n=0;n<t;n++)this.item(n).markTouched()};markAllPristine=()=>{this.markPristine();const t=this.signal.value.length;for(let n=0;n<t;n++)this.item(n).markPristine?.()};#i=()=>{let t=!1;for(const n of this.#a.values())if(n){t=!0;break}this.#l.set(this.dirty.value||t)}}function Q(e){function t(n){return typeof n=="number"?n:n.toString()}return e.map(n=>typeof n=="object"&&n.key!=null?t(n.key):t(n))}function X(e){const t=e.filter(a=>a.path==null||a.path.length===0).map(a=>a.message),n=e.filter(a=>a.path!=null&&a.path.length>0).reduce((a,i)=>{const o=Q(i.path),l=o.pop();let c=a;for(const p of o)c.dependencies==null&&(c.dependencies={}),c.dependencies[p]==null&&(c.dependencies[p]={}),c=c.dependencies[p];return c.dependencies==null&&(c.dependencies={}),c.dependencies[l]={message:i.message},a},{}),r=t.join(`
|
|
2
|
-
`);return{...n,message:r!=""?r:void 0}}function Y({initialValue:e,onChange:t,validate:n,equals:r,validationMode:a,validateDebounceMs:i}){const o=s.Value.deriveProp(e),l=s.prop(S.valid),c=s.prop(!1),p=s.prop(a??"touchedOrSubmit"),h=d=>{l.set(d)};let m;const k=async d=>{if(n!=null){const b=await n(d);h(b)}},g=async d=>{o.set(d),t?.(d);const b=p.value;if(n!=null){if(b==="onSubmit")return;const
|
|
1
|
+
"use strict";const s=require("@tempots/dom"),w=require("./translations-hMQlZmD4.cjs"),x=new Map;function T(e){const t=x.get(e)??0;return x.set(e,t+1),`${e}-${t}`}const v={notAsked:{type:"NotAsked"},loading(e=void 0){return{type:"Loading",previousValue:e}},success(e){return{type:"AsyncSuccess",value:e}},failure(e){return{type:"AsyncFailure",error:e}},isSuccess(e){return e.type==="AsyncSuccess"},isFailure(e){return e.type==="AsyncFailure"},isNotAsked(e){return e.type==="NotAsked"},isLoading(e){return e.type==="Loading"},getOrElse(e,t){return v.isSuccess(e)?e.value:t},getOrElseLazy(e,t){return v.isSuccess(e)?e.value:t()},getOrNull(e){return v.isSuccess(e)?e.value:null},getOrUndefined(e){return v.isSuccess(e)?e.value:void 0},getUnsafe:e=>{if(v.isSuccess(e))return e.value;throw v.isFailure(e)?e.error:new Error("Cannot get value from a not-asked or loading result")},match:(e,{success:t,failure:n,loading:r,notAsked:a=r})=>v.isSuccess(e)?t(e.value):v.isFailure(e)?n(e.error):v.isNotAsked(e)?a():r(e.previousValue),whenSuccess:(e,t)=>(v.isSuccess(e)&&t(e.value),e),whenFailure:(e,t)=>(v.isFailure(e)&&t(e.error),e),equals:(e,t,n={valueEquals:(r,a)=>r===a,errorEquals:(r,a)=>r===a})=>e.type==="AsyncSuccess"&&t.type==="AsyncSuccess"?n.valueEquals(e.value,t.value):e.type==="AsyncFailure"&&t.type==="AsyncFailure"?n.errorEquals(e.error,t.error):e.type==="Loading"&&t.type==="Loading"?n.valueEquals(e.previousValue,t.previousValue):e.type==="NotAsked"&&t.type==="NotAsked",all:e=>{const t=[];for(const n of e)if(v.isSuccess(n))t.push(n.value);else return n;return v.success(t)},ofPromise:async e=>{try{const t=await e;return v.success(t)}catch(t){return v.failure(t instanceof Error?t:new Error(String(t)))}}},O=(e,t)=>e===t||e!==e&&t!==t,S={valid:{type:"valid"},invalid(e){return{type:"invalid",error:e}},isValid(e){return e.type==="valid"},isInvalid(e){return e.type==="invalid"},match:(e,t,n)=>S.isValid(e)?t():n(e.error),toResult:(e,t)=>S.match(e,()=>f.success(t),n=>f.failure(n)),whenValid:(e,t)=>(S.isValid(e)&&t(),e),whenInvalid:(e,t)=>(S.isInvalid(e)&&t(e.error),e)},f={success(e){return{type:"Success",value:e}},failure(e){return{type:"Failure",error:e}},map:(e,t)=>e.type==="Success"?f.success(t(e.value)):e,flatMap:(e,t)=>e.type==="Success"?t(e.value):e,toAsync(e){return f.match(e,t=>v.success(t),t=>v.failure(t))},toValidation(e){return f.match(e,()=>S.valid,t=>S.invalid(t))},isSuccess(e){return e.type==="Success"},isFailure(e){return e.type==="Failure"},getOrElse(e,t){return f.isSuccess(e)?e.value:t},getOrElseLazy(e,t){return f.isSuccess(e)?e.value:t()},getOrNull(e){return f.isSuccess(e)?e.value:null},getOrUndefined(e){return f.isSuccess(e)?e.value:void 0},getUnsafe:e=>{if(f.isSuccess(e))return e.value;throw e.error},match:(e,t,n)=>f.isSuccess(e)?t(e.value):n(e.error),whenSuccess:(e,t)=>(f.isSuccess(e)&&t(e.value),e),whenFailure:(e,t)=>(f.isFailure(e)&&t(e.error),e),combine:(e,t,n,r)=>f.match(e,a=>f.match(t,i=>f.success(n(a,i)),i=>f.failure(i)),a=>f.match(t,i=>f.failure(a),i=>f.failure(r(a,i)))),equals:(e,t,n={valueEquals:(r,a)=>r===a,errorEquals:(r,a)=>r===a})=>e.type==="Success"&&t.type==="Success"?n.valueEquals(e.value,t.value):e.type==="Failure"&&t.type==="Failure"?n.errorEquals(e.error,t.error):!1,all:e=>{const t=[];for(const n of e)if(f.isSuccess(n))t.push(n.value);else return n;return f.success(t)}};function j({size:e="sm",icon:t="line-md:close",disabled:n,roundedness:r="full",color:a="base",onClick:i,label:o},...l){return s.Use(w.BeatUII18n,c=>{const p=s.coalesce(o,c.$.closeModal);return w.Button({variant:"text",size:e,roundedness:r,disabled:n,color:a,onClick:i},s.attr.title(p),s.aria.label(p),...l,w.Icon({icon:t,size:e??"sm"}))})}function F(e){return`bc-label bc-label--${e}`}const ee=(...e)=>s.html.span(s.attr.class(F("emphasis")),...e),q=(...e)=>s.html.span(s.attr.class(F("default")),...e),U=(...e)=>s.html.span(s.attr.class(F("muted")),...e),te=(...e)=>s.html.span(s.attr.class(F("danger")),...e),se=e=>{const{value:t,onBlur:n,onChange:r,placeholder:a,disabled:i,id:o,checkedIcon:l,uncheckedIcon:c,iconSize:p="lg"}=e,h=o??T("checkbox"),m=`${h}-label`,k=()=>{if(s.Value.get(i??!1))return;const u=s.Value.get(t);r?.(!u)},g=u=>{s.Value.get(i??!1)||(u.key===" "||u.key==="Enter")&&(u.preventDefault(),k())};return w.InputContainer({baseContainer:!0,growInput:!1,...e,input:s.html.span(s.attr.class("bc-checkbox-input"),s.html.span(s.attr.class("bc-checkbox-input__checkbox"),s.attr.class(s.Value.map(t,u=>u?"bc-checkbox-input__checkbox--checked":"bc-checkbox-input__checkbox--unchecked")),s.attr.class(s.Value.map(i??!1,u=>u?"bc-checkbox-input__checkbox--disabled":"")),s.attr.id(h),s.attr.role("checkbox"),s.attr.tabindex(s.Value.map(i??!1,u=>u?-1:0)),s.aria.checked(t),s.aria.disabled(i),a!=null?s.aria.labelledby(m):s.Empty,s.on.keydown(g),n!=null?s.on.blur(n):s.Empty,w.Icon({icon:s.computedOf(t,l,c)((u,d,b)=>u?d??"akar-icons/check-box-fill":b??"akar-icons/box"),accessibility:"decorative",size:p})),a!=null?s.html.label(s.attr.class("bc-checkbox-input__label"),s.attr.id(m),s.attr.for(h),U(a)):s.Empty)},s.on.click(k))},W=s.html.span(s.attr.class("bc-input-wrapper__required")," *");function ne(e){const t=["bc-input-wrapper"];return e!=="vertical"&&t.push(`bc-input-wrapper--${e}`),t.join(" ")}function re(e,t){const n=["bc-input-wrapper__label-text"];return e?n.push("bc-input-wrapper__label-text--error"):t?n.push("bc-input-wrapper__label-text--disabled"):n.push("bc-input-wrapper__label-text--default"),n.join(" ")}function N(e,t){if(e==="horizontal-fixed"&&t!=null)return`--input-wrapper-label-width: ${t}`}const P=({fullWidth:e=!1,required:t,label:n,labelChildren:r,context:a,description:i,content:o,error:l,labelFor:c,hasError:p,disabled:h,layout:m,labelWidth:k},...g)=>{const u=p??l!=null,d=h??!1,b=m??"vertical",I=T("input-wrapper"),C=i?`${I}-description`:void 0,_=l!=null?`${I}-error`:void 0,A=s.computedOf(b)(y=>y!=="vertical");return s.html.div(s.attr.class(s.Value.map(b,y=>ne(y))),s.attr.class(s.Value.map(e,y=>y?"bc-input-wrapper--full-width":"")),s.When(s.computedOf(b,k??void 0)((y,E)=>N(y,E)!=null),()=>s.attr.style(s.Value.map(s.computedOf(b,k??void 0)((y,E)=>N(y,E)),y=>y))),n!=null||a!=null?s.html.div(s.attr.class("bc-input-wrapper__header"),s.html.div(s.attr.class("bc-input-wrapper__label-section"),s.html.label(s.attr.class("bc-input-wrapper__label"),c!=null?s.attr.for(c):s.Empty,s.html.span(s.attr.class(s.computedOf(u,d)((y,E)=>re(y??!1,E??!1))),n),n!=null&&t?W:s.Empty),s.When(s.computedOf(A,i)((y,E)=>y&&E!=null),()=>s.html.div(s.attr.class("bc-input-wrapper__description bc-input-wrapper__description--under-label"),s.attr.id(C),i))),a!=null?q(a):s.Empty,r):s.Empty,s.html.div(s.attr.class("bc-input-wrapper__content"),[C,_].filter(Boolean).length>0?s.dataAttr.describedby([C,_].filter(Boolean).join(" ")):s.Empty,t?s.dataAttr.required("true"):s.Empty,s.When(u,()=>s.dataAttr.invalid("true")),o),s.When(s.computedOf(A,i)((y,E)=>!y&&E!=null),()=>s.html.div(s.attr.class("bc-input-wrapper__description"),s.attr.id(C),i)),l!=null?s.When(u,()=>s.html.div(s.attr.class("bc-input-wrapper__error"),s.attr.id(_),s.aria.live("polite"),s.attr.role("alert"),l)):null,...g)};function ae(...e){return s.html.div(s.attr.class("bc-stack"),...e)}const ie=e=>{const t={name:"email",autocomplete:"email",...e},{value:n,before:r,onBlur:a,onChange:i,onInput:o,placeholder:l}=t,c=r??w.InputIcon({icon:"line-md:email",size:e.size,color:"neutral"});return s.Use(w.BeatUII18n,p=>w.InputContainer({...e,before:c,input:s.input.email(w.CommonInputAttributes(t),s.attr.placeholder(s.coalesce(l,p.$.emailPlaceholderText)),s.attr.value(n),s.attr.class("bc-input"),a!=null?s.on.blur(s.emitValue(a)):s.Empty,i!=null?s.on.change(s.emitValue(i)):s.Empty,o!=null?s.on.input(s.emitValue(o)):s.Empty)}))},le=e=>{const{value:t,onBlur:n,onChange:r,onInput:a,before:i,after:o,hasError:l,disabled:c,autocomplete:p,placeholder:h,...m}=e,k={name:"password",disabled:c,...m},g=s.prop(!0),u=s.computedOf(g,p)((d,b)=>d?b??"current-password":"off");return s.Use(w.BeatUII18n,d=>{const b=s.computedOf(d.$.passwordPlaceholderText,g,h)((C,_,A)=>_?"•••••••••••••••":A??C),I=s.html.button(s.attr.type("button"),s.attr.class("bc-input-container__password-toggle"),s.aria.label(d.$.togglePasswordVisibility),s.on.click(()=>g.update(C=>!C)),s.When(g,()=>w.Icon({icon:"line-md:watch"}),()=>w.Icon({icon:"line-md:watch-off"})));return w.InputContainer({before:i,disabled:c,hasError:l,input:s.html.input(w.CommonInputAttributes({...k,autocomplete:u,placeholder:b}),s.When(g,()=>s.Fragment(s.attr.type("password")),()=>s.Fragment(s.attr.type("text"))),s.attr.class("bc-input"),s.attr.value(t),n!=null?s.on.blur(s.emitValue(n)):s.Empty,r!=null?s.on.change(s.emitValue(r)):s.Empty,a!=null?s.on.input(s.emitValue(a)):s.Empty),after:o!=null?s.Fragment(I,o):I})})},z=(e,t)=>()=>{e.markTouched(),t?.()},M=(e,t)=>n=>{e.change(n),t?.(n)};function $(e,t){const{controller:n,onBlur:r,onChange:a,id:i,triggerOn:o,...l}=t;return e({id:i??n.name,disabled:n.disabled,value:n.signal,hasError:n.errorVisible,name:n.name,...l,onInput:o==="input"?M(n,a):void 0,onChange:o!=="input"?M(n,a):void 0,onBlur:z(n,r)})}function oe(e,{id:t,labelFor:n,...r},...a){const i=t??r.controller.name??T("control");return P({...r,labelFor:n??i,content:$(l=>e({...l,id:i}),r)},...a)}function H(e,t){const{toInput:n,fromInput:r,controller:a,...i}=t,o=a.transform(n,r);return $(e,{...i,controller:o})}function ce(e,{id:t,labelFor:n,...r},...a){const i=t??r.controller.name??T("control");return P({...r,labelFor:n??i,content:H(e,{...r,id:i})},...a)}function ue(e){return e.split(".").map(n=>{const r=n.match(/^\[(\d+)\]$/);return r?Number(r[1]):n})}function R(e){return typeof e=="number"?`[${e}]`:`.${e}`}function K(e){if(e.length===0)return"";const[t,...n]=e;return[typeof t=="number"?`[${t}]`:t,...n.map(R)].join("")}function D(e){return function(n){if(n.type==="valid")return n;let r=n.error;for(const a of e)if(r=r?.dependencies?.[a],r==null)return S.valid;return S.invalid(r)}}class V{path;change;signal;status;error;hasError;touched;errorVisible;dirty;dependencyErrors;#e={disabled:s.prop(!1),touched:s.prop(!1)};#s;#t=s.prop(void 0);parent;disabled;#n=[];disabledOrHasErrors;constructor(t,n,r,a,i,o=O){this.path=t,this.change=n,this.signal=r,this.status=a,this.#s=o,this.#t.set(r.value),this.error=a.map(l=>l?.type==="invalid"?l.error?.message:void 0),this.hasError=this.error.map(l=>l!=null),this.touched=this.#e.touched,i.validationMode?this.errorVisible=s.computedOf(this.hasError,this.touched,i.validationMode)((l,c,p)=>p==="continuous"?!!l:!!l&&!!c):this.errorVisible=s.computedOf(this.hasError,this.touched)((l,c)=>!!l&&!!c),this.dirty=s.computedOf(this.signal,this.#t)((l,c)=>!this.#s(l,c)),this.dependencyErrors=a.map(l=>l?.type==="invalid"?l.error?.dependencies:void 0),this.parent=i,this.disabled=s.computedOf(this.#e.disabled,i.disabled)((l,c)=>l||c),this.disabledOrHasErrors=s.computedOf(this.disabled,this.hasError)((l,c)=>l||c),this.onDispose(()=>{this.#e.disabled.dispose(),this.#e.touched.dispose(),this.disabled.dispose(),this.error.dispose(),this.errorVisible.dispose(),this.dirty.dispose(),this.#t.dispose(),this.dependencyErrors.dispose(),this.disabledOrHasErrors.dispose()})}get name(){return K(this.path)}onDispose=t=>{this.#n.push(t)};dispose=()=>{for(const t of this.#n)try{t()}catch(n){console.error("Error in dispose callback:",n)}this.#n.length=0};setDisabled=t=>{this.#e.disabled.set(t)};disable=()=>this.setDisabled(!0);enable=()=>this.setDisabled(!1);markTouched=()=>{this.#e.touched.set(!0)};resetTouched=()=>{this.#e.touched.set(!1)};markPristine=()=>{this.#t.set(this.signal.value)};reset=()=>{this.change(this.#t.value)};array=(t=O)=>new J(this.path,this.change,this.signal,this.status,this.parent,t);object=(t=O)=>new G(this.path,this.change,this.signal,this.status,this.parent,t);transform=(t,n,r=[],a=O)=>new V([...this.path,...r],i=>this.change(n(i)),this.signal.map(t,a),this.status.map(D(r)),this.parent,a);asyncTransform=(t,n,r,a=[],i=O)=>new V([...this.path,...a],o=>{n(o).then(l=>this.change(l))},this.signal.mapAsync(t,r,void 0,i),this.status.map(D(a)),this.parent,i)}class G extends V{#e=new Map;#s=new Map;#t=new Map;#n=s.prop(!1);touchedDeep=this.#n;#a=new Map;#r=new Map;#l=s.prop(!1);dirtyDeep=this.#l;#c;#u;#o=()=>{let t=!1;for(const n of this.#s.values())if(n){t=!0;break}this.#n.set(this.touched.value||t)};constructor(t,n,r,a,i,o){super(t,n,r.map(c=>c??{},o),a,i,o),this.#c=this.touched.on(()=>{this.#o()}),this.#u=this.dirty.on(()=>{this.#i()});const l=this.signal.on(()=>this.#i());this.onDispose(()=>{for(const c of this.#e.values())c.dispose();this.#e.clear();for(const c of this.#t.values())c();this.#t.clear(),this.#s.clear(),this.#n.dispose();for(const c of this.#r.values())c();this.#r.clear(),this.#a.clear(),this.#l.dispose(),this.#c(),this.#u(),l()})}field=t=>{if(this.#e.has(t))return this.#e.get(t);const n=async o=>{this.change({...this.signal.value,[t]:o})},r=new V([...this.path,t],n,this.signal.map(o=>o[t]),this.status.map(D([t])),{disabled:this.disabled,validationMode:this.parent.validationMode});this.#e.set(t,r);const a=r.touched.on(o=>{this.#s.set(t,o),this.#o()});this.#t.set(t,a);const i=r.dirty.on(o=>{this.#a.set(t,o),this.#i()});return this.#r.set(t,i),r};markAllTouched=()=>{this.markTouched();const t=this.signal.value;for(const n of Object.keys(t))this.field(n).markTouched();for(const n of this.#e.values())n.markTouched()};markAllPristine=()=>{this.markPristine();const t=this.signal.value;for(const n of Object.keys(t))this.field(n).markPristine?.();for(const n of this.#e.values())n.markPristine?.()};#i=()=>{let t=!1;for(const n of this.#a.values())if(n){t=!0;break}this.#l.set(this.dirty.value||t)}}class J extends V{#e=new Array;length;#s=new Map;#t=new Map;#n=s.prop(!1);touchedDeep=this.#n;#a=new Map;#r=new Map;#l=s.prop(!1);dirtyDeep=this.#l;#c;#u;#o=()=>{let t=!1;for(const n of this.#s.values())if(n){t=!0;break}this.#n.set(this.touched.value||t)};constructor(t,n,r,a,i,o){const l=r.map(h=>h??[],o);super(t,n,l,a,i,o);const c=l.on(h=>{const m=this.#e.length-h.length;m>0&&(this.#e.splice(h.length,m).forEach((k,g)=>{const u=h.length+g;k.dispose(),this.#t.get(u)?.(),this.#t.delete(u),this.#s.delete(u),this.#r.get(u)?.(),this.#r.delete(u),this.#a.delete(u)}),this.#o(),this.#i())});this.length=l.map(h=>h.length),this.#c=this.touched.on(()=>{this.#o()}),this.#u=this.dirty.on(()=>{this.#i()});const p=this.signal.on(()=>this.#i());this.onDispose(()=>{for(const h of this.#e)h.dispose();this.length.dispose(),this.#e.length=0,c(),l.dispose();for(const h of this.#t.values())h();this.#t.clear(),this.#s.clear(),this.#n.dispose();for(const h of this.#r.values())h();this.#r.clear(),this.#a.clear(),this.#l.dispose(),this.#c(),this.#u(),p()})}item=t=>{if(this.#e[t])return this.#e[t];const n=async o=>{const l=this.signal.value.slice();l[t]=o,this.change(l)},r=new V([...this.path,t],n,this.signal.map(o=>o[t]),this.status.map(D([t])),{disabled:this.disabled,validationMode:this.parent.validationMode});this.#e[t]=r;const a=r.touched.on(o=>{this.#s.set(t,o),this.#o()});this.#t.set(t,a);const i=r.dirty.on(o=>{this.#a.set(t,o),this.#i()});return this.#r.set(t,i),r};push=(...t)=>{this.change([...this.signal.value,...t])};pop=()=>{this.splice(this.signal.value.length-1,1)};shift=()=>{this.splice(0,1)};unshift=(...t)=>{this.change([...t,...this.signal.value])};removeAt=t=>{this.splice(t,1)};splice=(t,n)=>{const r=this.signal.value.slice();r.splice(t,n),this.change(r)};move=(t,n,r=1)=>{if(r<1||t===n)return;const a=this.signal.value.slice(),i=a.splice(t,r);a.splice(n,0,...i),this.change(a)};markAllTouched=()=>{this.markTouched();const t=this.signal.value.length;for(let n=0;n<t;n++)this.item(n).markTouched()};markAllPristine=()=>{this.markPristine();const t=this.signal.value.length;for(let n=0;n<t;n++)this.item(n).markPristine?.()};#i=()=>{let t=!1;for(const n of this.#a.values())if(n){t=!0;break}this.#l.set(this.dirty.value||t)}}function Q(e){function t(n){return typeof n=="number"?n:n.toString()}return e.map(n=>typeof n=="object"&&n.key!=null?t(n.key):t(n))}function X(e){const t=e.filter(a=>a.path==null||a.path.length===0).map(a=>a.message),n=e.filter(a=>a.path!=null&&a.path.length>0).reduce((a,i)=>{const o=Q(i.path),l=o.pop();let c=a;for(const p of o)c.dependencies==null&&(c.dependencies={}),c.dependencies[p]==null&&(c.dependencies[p]={}),c=c.dependencies[p];return c.dependencies==null&&(c.dependencies={}),c.dependencies[l]={message:i.message},a},{}),r=t.join(`
|
|
2
|
+
`);return{...n,message:r!=""?r:void 0}}function Y({initialValue:e,onChange:t,validate:n,equals:r,validationMode:a,validateDebounceMs:i}){const o=s.Value.deriveProp(e),l=s.prop(S.valid),c=s.prop(!1),p=s.prop(a??"touchedOrSubmit"),h=d=>{l.set(d)};let m;const k=async d=>{if(n!=null){const b=await n(d);h(b)}},g=async d=>{o.set(d),t?.(d);const b=p.value;if(n!=null){if(b==="onSubmit")return;const I=i??0;I>0?(m&&clearTimeout(m),m=setTimeout(()=>{k(d)},I)):await k(d)}},u=new V([],g,o,l,{disabled:c,validationMode:p},r??O);return u.onDispose(()=>{c.dispose(),o.dispose(),l.dispose(),p.dispose(),m&&clearTimeout(m)}),{controller:u,setStatus:h}}function L(e){return s.Fragment(s.attr.disabled(e.disabled),s.attr.name(e.name))}function he(e,{triggerOn:t="change"}={}){return s.Fragment(L(e),s.attr.value(e.signal),(t==="input"?s.on.input:s.on.change)(s.emitValue(e.change)))}function de(e,{triggerOn:t="change"}={}){return s.Fragment(L(e),s.attr.valueAsNumber(e.signal),(t==="input"?s.on.input:s.on.change)(s.emitValueAsNumber(e.change)))}function B(e){return e.issues!=null?S.invalid(X(e.issues)):S.valid}async function pe({task:e,errorMessage:t,errorPath:n=["root"],validation:r}){try{const a=await e();return r!=null?r(a):S.valid}catch(a){const i=t??(a instanceof Error?a.message:"Operation failed");return n.length===1&&n[0]==="root"?S.invalid({message:i}):S.invalid({dependencies:Z(n,i)})}}function Z(e,t){if(e.length===1)return{[e[0]]:{message:t}};const[n,...r]=e;return{[n]:{dependencies:Z(r,t)}}}function me({initialValue:e={},schema:t,onSubmit:n=async()=>S.valid,validationMode:r,validateDebounceMs:a}){const{controller:i,setStatus:o}=Y({initialValue:e,validationMode:r??"touchedOrSubmit",validateDebounceMs:a,validate:(r??"touchedOrSubmit")==="onSubmit"||t==null?void 0:async h=>B(await t["~standard"].validate(h))}),l=s.prop(!1),c=i.object();return c.onDispose(l.dispose),{controller:c,setStatus:o,submit:async h=>{if(l.set(!0),h?.preventDefault(),c.markAllTouched(),(r??"touchedOrSubmit")==="onSubmit"){const k=c.signal.value,g=t?.["~standard"].validate;if(g==null){l.set(!1);return}const u=B(await g(k));if(o(u),u.type==="invalid"){l.set(!1);return}}const m=await n(c.signal.value);l.set(!1),m.type==="invalid"&&o(m)},submitting:l}}function fe(e){switch(e){case"success":return"material-symbols:check-circle-outline";case"warning":return"material-symbols:warning-outline";case"danger":return"material-symbols:error-outline";case"info":default:return"material-symbols:info-outline"}}function be(e){switch(e){case"success":return"success";case"warning":return"warning";case"danger":return"danger";case"info":default:return"info"}}function ge(e,t,n,r){const a=["bc-notice",`bc-notice--${e}`,`bc-notice--tone-${t}`];return n&&a.push("bc-notice--dismissible"),r&&r.length>0&&a.push(r),a.join(" ")}function ye({variant:e="info",tone:t="subtle",role:n,title:r,icon:a,closable:i=!1,onDismiss:o,class:l},...c){const p=s.prop(!0);return s.When(p,()=>{const h=s.Value.map(i,u=>!!u||o!=null),m=s.Value.map(e,u=>u??"info"),k=s.Value.map(t,u=>u??"subtle"),g=s.computedOf(n,m)((u,d)=>u??(d==="danger"?"alert":"status"));return s.Use(w.BeatUII18n,u=>s.html.div(s.attr.class(s.computedOf(m,k,h,l)((d,b,I,C)=>ge(d,b,I,C))),s.attr.role(s.Value.map(g,d=>d)),s.Unless(s.Value.map(a,d=>d===!1),()=>s.html.div(s.attr.class("bc-notice__icon"),w.Icon({icon:s.computedOf(a,m)((d,b)=>d===void 0?fe(b):String(d)),size:"md",color:s.Value.map(m,be)}))),s.html.div(s.attr.class("bc-notice__body"),s.Ensure(r,d=>s.html.div(s.attr.class("bc-notice__title"),d)),s.html.div(s.attr.class("bc-notice__content"),...c)),s.When(h,()=>j({size:"xs",label:u.$.closeModal,onClick:()=>{p.set(!1),o?.()}}))))})}exports.ArrayController=J;exports.BaseControl=$;exports.BaseMappedControl=H;exports.CheckboxInput=se;exports.CloseButton=j;exports.Control=oe;exports.Controller=V;exports.DangerLabel=te;exports.EmailInput=ie;exports.EmphasisLabel=ee;exports.InputWrapper=P;exports.Label=q;exports.MappedControl=ce;exports.MutedLabel=U;exports.Notice=ye;exports.O=O;exports.ObjectController=G;exports.PasswordInput=le;exports.RequiredSymbol=W;exports.Stack=ae;exports.a=S;exports.connectCommonAttributes=L;exports.connectNumberInput=de;exports.connectStringInput=he;exports.convertStandardSchemaIssues=X;exports.convertStandardSchemaPathToPath=Q;exports.makeMapValidation=D;exports.makeOnBlurHandler=z;exports.makeOnChangeHandler=M;exports.parsePath=ue;exports.pathToString=K;exports.sessionId=T;exports.standardSchemaResultToValidation=B;exports.taskToValidation=pe;exports.useController=Y;exports.useForm=me;exports.wrapSegment=R;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./translations-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./translations-hMQlZmD4.cjs"),l={loadingExtended:"Ładowanie, proszę czekać",loadingShort:"Ładowanie...",locale:"Język",iconDescription:"Ikona",loadingIcon:"Ikona ładowania",failedToLoadIcon:"Nie udało się załadować ikony",editLabel:"Edytuj",selectOne:"Wybierz jeden",selectMany:"Wybierz wiele",noResults:"Brak wyników",passwordPlaceholderText:"Tajne hasło",togglePasswordVisibility:"Przełącz widoczność hasła",toggleMenu:"Przełącz menu",toggleAside:"Przełącz panel boczny",mainNavigation:"Główna nawigacja",sidebar:"Pasek boczny",closeDrawer:"Zamknij szufladę",closeModal:"Zamknij modal",confirm:"Potwierdź",cancel:"Anuluj",addLabel:"Dodaj",removeItem:"Usuń element",currentLocale:"Polski",ar:"Arabski",de:"Niemiecki",en:"Angielski",es:"Hiszpański",fr:"Francuski",hi:"Hindi",it:"Włoski",ja:"Japoński",ko:"Koreański",nl:"Holenderski",pl:"Polski",pt:"Portugalski",ru:"Rosyjski",tr:"Turecki",vi:"Wietnamski",zh:"Chiński",he:"Hebrajski",fa:"Perski",ur:"Urdu",emailPlaceholderText:"Wprowadź adres e-mail",incrementValue:"Zwiększ wartość",decrementValue:"Zmniejsz wartość",dropZoneInstructions:e=>e?"Kliknij aby wybrać lub przeciągnij pliki tutaj, lub naciśnij Enter lub Spację, aby otworzyć selektor plików":"Przeciągnij pliki tutaj",fileSizeUnits:["Bajty","KB","MB","GB","TB"],removeFile:"Usuń plik",clearAllFiles:"Usuń wszystkie pliki",clearValue:"Wyczyść wartość",unknownType:"Nieznany typ",filesInputInstructions:(e,i,o)=>{let n=e==null||e>1?"Kliknij aby wybrać lub przeciągnij pliki tutaj":"Kliknij aby wybrać lub przeciągnij plik tutaj";if(e||i){const a=[];if(e!=null&&e>1&&a.push(`do ${e} plików`),i&&o){const r=t.formatFileSize(i,{units:o});a.push(`maks ${r} każdy`)}a.length>0&&(n+=` (${a.join(", ")})`)}return n},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"Ładowanie PDF...",loadFailed:"Nie udało się załadować PDF",invalidPdf:"Nieprawidłowy plik PDF",pageOutOfRange:(e,i)=>`Strona ${e} jest poza zakresem (1-${i})`,renderFailed:"Nie udało się wyrenderować strony PDF"}};exports.default=l;exports.pl=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../index-DJ6AuTd_.cjs");exports.DEFAULT_FEATURES=r.DEFAULT_FEATURES;exports.ProseMirrorMarkdownInput=r.ProseMirrorMarkdownInput;exports.ProseMirrorToolbar=r.ProseMirrorToolbar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./translations-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./translations-hMQlZmD4.cjs"),t={loadingExtended:"Carregando, por favor aguarde",loadingShort:"Carregando...",locale:"Idioma",iconDescription:"Ícone",loadingIcon:"Ícone de carregamento",failedToLoadIcon:"Falha ao carregar ícone",editLabel:"Editar",selectOne:"Selecionar um",selectMany:"Selecionar vários",noResults:"Sem resultados",passwordPlaceholderText:"Senha Secreta",togglePasswordVisibility:"Alternar visibilidade da senha",toggleMenu:"Alternar menu",toggleAside:"Alternar painel lateral",mainNavigation:"Navegação principal",sidebar:"Barra lateral",closeDrawer:"Fechar gaveta",closeModal:"Fechar modal",confirm:"Confirmar",cancel:"Cancelar",addLabel:"Adicionar",removeItem:"Remover item",currentLocale:"Português",ar:"Árabe",de:"Alemão",en:"Inglês",es:"Espanhol",fr:"Francês",hi:"Hindi",it:"Italiano",ja:"Japonês",ko:"Coreano",nl:"Holandês",pl:"Polonês",pt:"Português",ru:"Russo",tr:"Turco",vi:"Vietnamita",zh:"Chinês",he:"Hebraico",fa:"Persa",ur:"Urdu",emailPlaceholderText:"Digite seu e-mail",incrementValue:"Incrementar valor",decrementValue:"Decrementar valor",dropZoneInstructions:e=>e?"Clique para escolher ou arraste arquivos aqui, ou pressione Enter ou Espaço para abrir o seletor de arquivos":"Arraste arquivos aqui",fileSizeUnits:["Bytes","KB","MB","GB","TB"],removeFile:"Remover arquivo",clearAllFiles:"Limpar todos os arquivos",clearValue:"Limpar valor",unknownType:"Tipo desconhecido",filesInputInstructions:(e,a,o)=>{let i=e==null||e>1?"Clique para escolher ou arraste arquivos aqui":"Clique para escolher ou arraste um arquivo aqui";if(e||a){const r=[];if(e!=null&&e>1&&r.push(`até ${e} arquivos`),a&&o){const l=n.formatFileSize(a,{units:o});r.push(`máx ${l} cada`)}r.length>0&&(i+=` (${r.join(", ")})`)}return i},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"Carregando PDF...",loadFailed:"Falha ao carregar PDF",invalidPdf:"Arquivo PDF inválido",pageOutOfRange:(e,a)=>`A página ${e} está fora do intervalo (1-${a})`,renderFailed:"Falha ao renderizar página do PDF"}};exports.default=t;
|