@babylonlabs-io/core-ui 1.24.0 → 1.25.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.
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +426 -420
- package/dist/index.es.js.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/widgets/sections/AmountSubsection/AmountSubsection.d.ts +2 -1
- package/dist/widgets/sections/AmountSubsection/AmountSubsection.js +20 -2
- package/dist/widgets/sections/AmountSubsection/AmountSubsection.stories.d.ts +1 -0
- package/dist/widgets/sections/AmountSubsection/AmountSubsection.stories.js +21 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as c, jsxs as b, Fragment as ze } from "react/jsx-runtime";
|
|
2
2
|
import * as Je from "react";
|
|
3
3
|
import I, { useState as ee, useRef as it, useCallback as oe, createContext as ur, useMemo as Ie, forwardRef as Me, useContext as Dt, useEffect as le, createElement as Lr, Children as Qt, cloneElement as Vr, isValidElement as Fr, useImperativeHandle as Rn, useId as Bn } from "react";
|
|
4
|
-
import { twJoin as
|
|
4
|
+
import { twJoin as O, twMerge as ce } from "tailwind-merge";
|
|
5
5
|
import * as Ui from "react-dom";
|
|
6
6
|
import { createPortal as zi } from "react-dom";
|
|
7
7
|
function ut({
|
|
@@ -44,7 +44,7 @@ function Nl({
|
|
|
44
44
|
}),
|
|
45
45
|
[t, o, i, l]
|
|
46
46
|
);
|
|
47
|
-
return /* @__PURE__ */ c(Dr.Provider, { value: f, children: /* @__PURE__ */ c("div", { className:
|
|
47
|
+
return /* @__PURE__ */ c(Dr.Provider, { value: f, children: /* @__PURE__ */ c("div", { className: O("bbn-accordion", i && "bbn-accordion-disabled", n), children: s }) });
|
|
48
48
|
}
|
|
49
49
|
const we = Me(
|
|
50
50
|
({ variant: e = "contained", size: t = "large", color: r = "primary", fluid: n = !1, className: i, disabled: s, ...o }, a) => /* @__PURE__ */ c(
|
|
@@ -53,7 +53,7 @@ const we = Me(
|
|
|
53
53
|
...o,
|
|
54
54
|
disabled: s,
|
|
55
55
|
ref: a,
|
|
56
|
-
className:
|
|
56
|
+
className: O(
|
|
57
57
|
"bbn-btn",
|
|
58
58
|
`bbn-btn-${e}`,
|
|
59
59
|
`bbn-btn-${r}`,
|
|
@@ -65,14 +65,14 @@ const we = Me(
|
|
|
65
65
|
)
|
|
66
66
|
);
|
|
67
67
|
we.displayName = "Button";
|
|
68
|
-
const Pn = ({ className: e, ...t }) => /* @__PURE__ */ c("button", { ...t, className:
|
|
68
|
+
const Pn = ({ className: e, ...t }) => /* @__PURE__ */ c("button", { ...t, className: O("bbn-btn-icon", e) }), In = Me(
|
|
69
69
|
({ className: e, ...t }, r) => /* @__PURE__ */ c(
|
|
70
70
|
we,
|
|
71
71
|
{
|
|
72
72
|
...t,
|
|
73
73
|
ref: r,
|
|
74
74
|
variant: "contained",
|
|
75
|
-
className:
|
|
75
|
+
className: O(
|
|
76
76
|
"!bg-error-main text-white font-medium !text-sm hover:!bg-error-main/90 transition-colors",
|
|
77
77
|
e
|
|
78
78
|
)
|
|
@@ -87,9 +87,9 @@ function Cl({
|
|
|
87
87
|
renderIcon: n = () => null
|
|
88
88
|
}) {
|
|
89
89
|
const { expanded: i, toggle: s } = Dt(Dr), o = n(i);
|
|
90
|
-
return /* @__PURE__ */ b("div", { className:
|
|
90
|
+
return /* @__PURE__ */ b("div", { className: O("bbn-accordion-summary", e), onClick: s, children: [
|
|
91
91
|
r,
|
|
92
|
-
o && /* @__PURE__ */ c(Pn, { className:
|
|
92
|
+
o && /* @__PURE__ */ c(Pn, { className: O("bbn-accordion-icon", t), children: o })
|
|
93
93
|
] });
|
|
94
94
|
}
|
|
95
95
|
function _r(e, t) {
|
|
@@ -139,13 +139,13 @@ function kl({
|
|
|
139
139
|
), /* @__PURE__ */ c(
|
|
140
140
|
"div",
|
|
141
141
|
{
|
|
142
|
-
className:
|
|
142
|
+
className: O("bbn-accordion-details", n),
|
|
143
143
|
style: {
|
|
144
144
|
height: s ? f : "0px",
|
|
145
145
|
visibility: o ? "visible" : "hidden",
|
|
146
146
|
transitionDuration: `${t}ms`
|
|
147
147
|
},
|
|
148
|
-
children: l ? /* @__PURE__ */ c("div", { ref: u, className:
|
|
148
|
+
children: l ? /* @__PURE__ */ c("div", { ref: u, className: O("bbn-accordion-content", r), children: i }) : null
|
|
149
149
|
}
|
|
150
150
|
);
|
|
151
151
|
}
|
|
@@ -155,7 +155,7 @@ const W = Me(
|
|
|
155
155
|
{
|
|
156
156
|
...i,
|
|
157
157
|
ref: s,
|
|
158
|
-
className:
|
|
158
|
+
className: O(`bbn-text-${e}`, n)
|
|
159
159
|
},
|
|
160
160
|
r
|
|
161
161
|
)
|
|
@@ -167,14 +167,14 @@ const Mr = Me(
|
|
|
167
167
|
{
|
|
168
168
|
...i,
|
|
169
169
|
ref: s,
|
|
170
|
-
className:
|
|
170
|
+
className: O(`bbn-${e}`, n)
|
|
171
171
|
},
|
|
172
172
|
r
|
|
173
173
|
)
|
|
174
174
|
);
|
|
175
175
|
Mr.displayName = "Heading";
|
|
176
176
|
function er({ className: e, style: t, size: r = "large", variant: n = "circular", alt: i, url: s, children: o }) {
|
|
177
|
-
return /* @__PURE__ */ c("div", { style: t, className:
|
|
177
|
+
return /* @__PURE__ */ c("div", { style: t, className: O("bbn-avatar", `bbn-avatar-${r}`, `bbn-avatar-${n}`, e), children: s ? /* @__PURE__ */ c("img", { className: "bbn-avatar-img", src: s, alt: i }) : o });
|
|
178
178
|
}
|
|
179
179
|
const Ol = ({
|
|
180
180
|
max: e = 1 / 0,
|
|
@@ -185,7 +185,7 @@ const Ol = ({
|
|
|
185
185
|
...s
|
|
186
186
|
}) => {
|
|
187
187
|
const o = Qt.count(r);
|
|
188
|
-
return /* @__PURE__ */ b("div", { className:
|
|
188
|
+
return /* @__PURE__ */ b("div", { className: O("bbn-avatar-group", t), children: [
|
|
189
189
|
Qt.map(
|
|
190
190
|
r,
|
|
191
191
|
(a, l) => Fr(a) && l + 1 <= e ? Vr(a, {
|
|
@@ -219,10 +219,10 @@ const Ol = ({
|
|
|
219
219
|
onStateChange: d
|
|
220
220
|
});
|
|
221
221
|
function w(N) {
|
|
222
|
-
var
|
|
223
|
-
g(N.currentTarget.checked), (
|
|
222
|
+
var V;
|
|
223
|
+
g(N.currentTarget.checked), (V = i == null ? void 0 : i.onChange) == null || V.call(i, N);
|
|
224
224
|
}
|
|
225
|
-
const
|
|
225
|
+
const _ = /* @__PURE__ */ b("span", { className: O("bbn-switcher", o && "bbn-switcher-disabled", a), children: [
|
|
226
226
|
u(x),
|
|
227
227
|
/* @__PURE__ */ c(
|
|
228
228
|
"input",
|
|
@@ -243,17 +243,17 @@ const Ol = ({
|
|
|
243
243
|
{
|
|
244
244
|
as: "label",
|
|
245
245
|
variant: "body1",
|
|
246
|
-
className:
|
|
246
|
+
className: O(
|
|
247
247
|
"bbn-switcher-label",
|
|
248
248
|
s === "left" ? "bbn-switcher-left" : "bbn-switcher-right",
|
|
249
249
|
f
|
|
250
250
|
),
|
|
251
251
|
children: [
|
|
252
|
-
|
|
252
|
+
_,
|
|
253
253
|
t
|
|
254
254
|
]
|
|
255
255
|
}
|
|
256
|
-
) :
|
|
256
|
+
) : _;
|
|
257
257
|
}), Zi = {
|
|
258
258
|
false: /* @__PURE__ */ c("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ c(
|
|
259
259
|
"path",
|
|
@@ -622,8 +622,8 @@ var Es = function(t, r) {
|
|
|
622
622
|
function Ss(e) {
|
|
623
623
|
var t, r = e.state, n = e.name, i = e.options, s = r.elements.arrow, o = r.modifiersData.popperOffsets, a = Fe(r.placement), l = Pr(a), f = [me, Ne].indexOf(a) >= 0, u = f ? "height" : "width";
|
|
624
624
|
if (!(!s || !o)) {
|
|
625
|
-
var d = Es(i.padding, r), m = Br(s), v = l === "y" ? he : me, x = l === "y" ? xe : Ne, g = r.rects.reference[u] + r.rects.reference[l] - o[l] - r.rects.popper[u], w = o[l] - r.rects.reference[l],
|
|
626
|
-
r.modifiersData[n] = (t = {}, t[$] = D, t.centerOffset = D -
|
|
625
|
+
var d = Es(i.padding, r), m = Br(s), v = l === "y" ? he : me, x = l === "y" ? xe : Ne, g = r.rects.reference[u] + r.rects.reference[l] - o[l] - r.rects.popper[u], w = o[l] - r.rects.reference[l], _ = Mt(s), N = _ ? l === "y" ? _.clientHeight || 0 : _.clientWidth || 0 : 0, V = g / 2 - w / 2, k = d[v], E = N - m[u] - d[x], A = N / 2 - m[u] / 2 + V, D = kt(k, A, E), $ = l;
|
|
626
|
+
r.modifiersData[n] = (t = {}, t[$] = D, t.centerOffset = D - A, t);
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
629
|
function As(e) {
|
|
@@ -664,22 +664,22 @@ function fn(e) {
|
|
|
664
664
|
y: g
|
|
665
665
|
};
|
|
666
666
|
v = w.x, g = w.y;
|
|
667
|
-
var
|
|
667
|
+
var _ = o.hasOwnProperty("x"), N = o.hasOwnProperty("y"), V = me, k = he, E = window;
|
|
668
668
|
if (f) {
|
|
669
|
-
var
|
|
670
|
-
if (
|
|
671
|
-
|
|
672
|
-
var R = d &&
|
|
669
|
+
var A = Mt(r), D = "clientHeight", $ = "clientWidth";
|
|
670
|
+
if (A === ge(r) && (A = qe(r), je(A).position !== "static" && a === "absolute" && (D = "scrollHeight", $ = "scrollWidth")), A = A, i === he || (i === me || i === Ne) && s === At) {
|
|
671
|
+
k = xe;
|
|
672
|
+
var R = d && A === E && E.visualViewport ? E.visualViewport.height : (
|
|
673
673
|
// $FlowFixMe[prop-missing]
|
|
674
|
-
|
|
674
|
+
A[D]
|
|
675
675
|
);
|
|
676
676
|
g -= R - n.height, g *= l ? 1 : -1;
|
|
677
677
|
}
|
|
678
678
|
if (i === me || (i === he || i === xe) && s === At) {
|
|
679
|
-
|
|
680
|
-
var H = d &&
|
|
679
|
+
V = Ne;
|
|
680
|
+
var H = d && A === E && E.visualViewport ? E.visualViewport.width : (
|
|
681
681
|
// $FlowFixMe[prop-missing]
|
|
682
|
-
|
|
682
|
+
A[$]
|
|
683
683
|
);
|
|
684
684
|
v -= H - n.width, v *= l ? 1 : -1;
|
|
685
685
|
}
|
|
@@ -695,9 +695,9 @@ function fn(e) {
|
|
|
695
695
|
};
|
|
696
696
|
if (v = M.x, g = M.y, l) {
|
|
697
697
|
var j;
|
|
698
|
-
return Object.assign({}, P, (j = {}, j[
|
|
698
|
+
return Object.assign({}, P, (j = {}, j[k] = N ? "0" : "", j[V] = _ ? "0" : "", j.transform = (E.devicePixelRatio || 1) <= 1 ? "translate(" + v + "px, " + g + "px)" : "translate3d(" + v + "px, " + g + "px, 0)", j));
|
|
699
699
|
}
|
|
700
|
-
return Object.assign({}, P, (t = {}, t[
|
|
700
|
+
return Object.assign({}, P, (t = {}, t[k] = N ? g + "px" : "", t[V] = _ ? v + "px" : "", t.transform = "", t));
|
|
701
701
|
}
|
|
702
702
|
function Ds(e) {
|
|
703
703
|
var t = e.state, r = e.options, n = r.gpuAcceleration, i = n === void 0 ? !0 : n, s = r.adaptive, o = s === void 0 ? !0 : s, a = r.roundOffsets, l = a === void 0 ? !0 : a, f = {
|
|
@@ -897,15 +897,15 @@ function Kn(e) {
|
|
|
897
897
|
}
|
|
898
898
|
function Lt(e, t) {
|
|
899
899
|
t === void 0 && (t = {});
|
|
900
|
-
var r = t, n = r.placement, i = n === void 0 ? e.placement : n, s = r.strategy, o = s === void 0 ? e.strategy : s, a = r.boundary, l = a === void 0 ? ls : a, f = r.rootBoundary, u = f === void 0 ? Wn : f, d = r.elementContext, m = d === void 0 ? xt : d, v = r.altBoundary, x = v === void 0 ? !1 : v, g = r.padding, w = g === void 0 ? 0 : g,
|
|
901
|
-
reference:
|
|
902
|
-
element:
|
|
900
|
+
var r = t, n = r.placement, i = n === void 0 ? e.placement : n, s = r.strategy, o = s === void 0 ? e.strategy : s, a = r.boundary, l = a === void 0 ? ls : a, f = r.rootBoundary, u = f === void 0 ? Wn : f, d = r.elementContext, m = d === void 0 ? xt : d, v = r.altBoundary, x = v === void 0 ? !1 : v, g = r.padding, w = g === void 0 ? 0 : g, _ = Xn(typeof w != "number" ? w : Gn(w, _t)), N = m === xt ? cs : xt, V = e.rects.popper, k = e.elements[x ? N : m], E = Hs(rt(k) ? k : k.contextElement || qe(e.elements.popper), l, u, o), A = ht(e.elements.reference), D = Kn({
|
|
901
|
+
reference: A,
|
|
902
|
+
element: V,
|
|
903
903
|
placement: i
|
|
904
|
-
}), $ = Er(Object.assign({},
|
|
905
|
-
top:
|
|
906
|
-
bottom: R.bottom -
|
|
907
|
-
left:
|
|
908
|
-
right: R.right -
|
|
904
|
+
}), $ = Er(Object.assign({}, V, D)), R = m === xt ? $ : A, H = {
|
|
905
|
+
top: E.top - R.top + _.top,
|
|
906
|
+
bottom: R.bottom - E.bottom + _.bottom,
|
|
907
|
+
left: E.left - R.left + _.left,
|
|
908
|
+
right: R.right - E.right + _.right
|
|
909
909
|
}, P = e.modifiersData.offset;
|
|
910
910
|
if (m === xt && P) {
|
|
911
911
|
var M = P[i];
|
|
@@ -945,7 +945,7 @@ function Us(e) {
|
|
|
945
945
|
function zs(e) {
|
|
946
946
|
var t = e.state, r = e.options, n = e.name;
|
|
947
947
|
if (!t.modifiersData[n]._skip) {
|
|
948
|
-
for (var i = r.mainAxis, s = i === void 0 ? !0 : i, o = r.altAxis, a = o === void 0 ? !0 : o, l = r.fallbackPlacements, f = r.padding, u = r.boundary, d = r.rootBoundary, m = r.altBoundary, v = r.flipVariations, x = v === void 0 ? !0 : v, g = r.allowedAutoPlacements, w = t.options.placement,
|
|
948
|
+
for (var i = r.mainAxis, s = i === void 0 ? !0 : i, o = r.altAxis, a = o === void 0 ? !0 : o, l = r.fallbackPlacements, f = r.padding, u = r.boundary, d = r.rootBoundary, m = r.altBoundary, v = r.flipVariations, x = v === void 0 ? !0 : v, g = r.allowedAutoPlacements, w = t.options.placement, _ = Fe(w), N = _ === w, V = l || (N || !x ? [Yt(w)] : Us(w)), k = [w].concat(V).reduce(function($e, ke) {
|
|
949
949
|
return $e.concat(Fe(ke) === Tr ? Ws(t, {
|
|
950
950
|
placement: ke,
|
|
951
951
|
boundary: u,
|
|
@@ -954,15 +954,15 @@ function zs(e) {
|
|
|
954
954
|
flipVariations: x,
|
|
955
955
|
allowedAutoPlacements: g
|
|
956
956
|
}) : ke);
|
|
957
|
-
}, []),
|
|
958
|
-
var P =
|
|
957
|
+
}, []), E = t.rects.reference, A = t.rects.popper, D = /* @__PURE__ */ new Map(), $ = !0, R = k[0], H = 0; H < k.length; H++) {
|
|
958
|
+
var P = k[H], M = Fe(P), j = mt(P) === ft, z = [he, xe].indexOf(M) >= 0, J = z ? "width" : "height", X = Lt(t, {
|
|
959
959
|
placement: P,
|
|
960
960
|
boundary: u,
|
|
961
961
|
rootBoundary: d,
|
|
962
962
|
altBoundary: m,
|
|
963
963
|
padding: f
|
|
964
964
|
}), Q = z ? j ? Ne : me : j ? xe : he;
|
|
965
|
-
|
|
965
|
+
E[J] > A[J] && (Q = Yt(Q));
|
|
966
966
|
var Se = Yt(Q), fe = [];
|
|
967
967
|
if (s && fe.push(X[M] <= 0), a && fe.push(X[Q] <= 0, X[Se] <= 0), fe.every(function($e) {
|
|
968
968
|
return $e;
|
|
@@ -974,7 +974,7 @@ function zs(e) {
|
|
|
974
974
|
}
|
|
975
975
|
if ($)
|
|
976
976
|
for (var Te = x ? 3 : 1, ot = function(ke) {
|
|
977
|
-
var Ge =
|
|
977
|
+
var Ge = k.find(function(He) {
|
|
978
978
|
var Ae = D.get(He);
|
|
979
979
|
if (Ae)
|
|
980
980
|
return Ae.slice(0, ke).every(function(Ye) {
|
|
@@ -1088,7 +1088,7 @@ function ta(e) {
|
|
|
1088
1088
|
rootBoundary: f,
|
|
1089
1089
|
padding: d,
|
|
1090
1090
|
altBoundary: u
|
|
1091
|
-
}),
|
|
1091
|
+
}), _ = Fe(t.placement), N = mt(t.placement), V = !N, k = Pr(_), E = ea(k), A = t.modifiersData.popperOffsets, D = t.rects.reference, $ = t.rects.popper, R = typeof g == "function" ? g(Object.assign({}, t.rects, {
|
|
1092
1092
|
placement: t.placement
|
|
1093
1093
|
})) : g, H = typeof R == "number" ? {
|
|
1094
1094
|
mainAxis: R,
|
|
@@ -1100,17 +1100,17 @@ function ta(e) {
|
|
|
1100
1100
|
x: 0,
|
|
1101
1101
|
y: 0
|
|
1102
1102
|
};
|
|
1103
|
-
if (
|
|
1103
|
+
if (A) {
|
|
1104
1104
|
if (s) {
|
|
1105
|
-
var j, z =
|
|
1105
|
+
var j, z = k === "y" ? he : me, J = k === "y" ? xe : Ne, X = k === "y" ? "height" : "width", Q = A[k], Se = Q + w[z], fe = Q - w[J], Te = v ? -$[X] / 2 : 0, ot = N === ft ? D[X] : $[X], Ze = N === ft ? -$[X] : -D[X], Xe = t.elements.arrow, $e = v && Xe ? Br(Xe) : {
|
|
1106
1106
|
width: 0,
|
|
1107
1107
|
height: 0
|
|
1108
|
-
}, ke = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Zn(), Ge = ke[z], He = ke[J], Ae = kt(0, D[X], $e[X]), Ye =
|
|
1109
|
-
|
|
1108
|
+
}, ke = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Zn(), Ge = ke[z], He = ke[J], Ae = kt(0, D[X], $e[X]), Ye = V ? D[X] / 2 - Te - Ae - Ge - H.mainAxis : ot - Ae - Ge - H.mainAxis, bt = V ? -D[X] / 2 + Te + Ae + He + H.mainAxis : Ze + Ae + He + H.mainAxis, wt = t.elements.arrow && Mt(t.elements.arrow), jt = wt ? k === "y" ? wt.clientTop || 0 : wt.clientLeft || 0 : 0, $t = (j = P == null ? void 0 : P[k]) != null ? j : 0, Ht = Q + Ye - $t - jt, Wt = Q + bt - $t, Ut = kt(v ? nr(Se, Ht) : Se, Q, v ? et(fe, Wt) : fe);
|
|
1109
|
+
A[k] = Ut, M[k] = Ut - Q;
|
|
1110
1110
|
}
|
|
1111
1111
|
if (a) {
|
|
1112
|
-
var zt, tn =
|
|
1113
|
-
|
|
1112
|
+
var zt, tn = k === "x" ? he : me, qt = k === "x" ? xe : Ne, h = A[E], p = E === "y" ? "height" : "width", y = h + w[tn], F = h - w[qt], S = [he, me].indexOf(_) !== -1, C = (zt = P == null ? void 0 : P[E]) != null ? zt : 0, B = S ? y : h - D[p] - $[p] - C + H.altAxis, U = S ? h + D[p] + $[p] - C - H.altAxis : F, q = v && S ? Os(B, h, U) : kt(v ? B : y, h, v ? U : F);
|
|
1113
|
+
A[E] = q, M[E] = q - h;
|
|
1114
1114
|
}
|
|
1115
1115
|
t.modifiersData[n] = M;
|
|
1116
1116
|
}
|
|
@@ -1231,15 +1231,15 @@ function fa(e) {
|
|
|
1231
1231
|
styles: {}
|
|
1232
1232
|
}, d = [], m = !1, v = {
|
|
1233
1233
|
state: u,
|
|
1234
|
-
setOptions: function(
|
|
1235
|
-
var N = typeof
|
|
1234
|
+
setOptions: function(_) {
|
|
1235
|
+
var N = typeof _ == "function" ? _(u.options) : _;
|
|
1236
1236
|
g(), u.options = Object.assign({}, s, u.options, N), u.scrollParents = {
|
|
1237
1237
|
reference: rt(a) ? Ot(a) : a.contextElement ? Ot(a.contextElement) : [],
|
|
1238
1238
|
popper: Ot(l)
|
|
1239
1239
|
};
|
|
1240
|
-
var
|
|
1241
|
-
return u.orderedModifiers =
|
|
1242
|
-
return
|
|
1240
|
+
var V = la(ua([].concat(n, u.options.modifiers)));
|
|
1241
|
+
return u.orderedModifiers = V.filter(function(k) {
|
|
1242
|
+
return k.enabled;
|
|
1243
1243
|
}), x(), v.update();
|
|
1244
1244
|
},
|
|
1245
1245
|
// Sync update – it will always be executed, even if not necessary. This
|
|
@@ -1249,21 +1249,21 @@ function fa(e) {
|
|
|
1249
1249
|
// prefer the async Popper#update method
|
|
1250
1250
|
forceUpdate: function() {
|
|
1251
1251
|
if (!m) {
|
|
1252
|
-
var
|
|
1253
|
-
if (gn(N,
|
|
1252
|
+
var _ = u.elements, N = _.reference, V = _.popper;
|
|
1253
|
+
if (gn(N, V)) {
|
|
1254
1254
|
u.rects = {
|
|
1255
|
-
reference: aa(N, Mt(
|
|
1256
|
-
popper: Br(
|
|
1255
|
+
reference: aa(N, Mt(V), u.options.strategy === "fixed"),
|
|
1256
|
+
popper: Br(V)
|
|
1257
1257
|
}, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(H) {
|
|
1258
1258
|
return u.modifiersData[H.name] = Object.assign({}, H.data);
|
|
1259
1259
|
});
|
|
1260
|
-
for (var
|
|
1260
|
+
for (var k = 0; k < u.orderedModifiers.length; k++) {
|
|
1261
1261
|
if (u.reset === !0) {
|
|
1262
|
-
u.reset = !1,
|
|
1262
|
+
u.reset = !1, k = -1;
|
|
1263
1263
|
continue;
|
|
1264
1264
|
}
|
|
1265
|
-
var
|
|
1266
|
-
typeof
|
|
1265
|
+
var E = u.orderedModifiers[k], A = E.fn, D = E.options, $ = D === void 0 ? {} : D, R = E.name;
|
|
1266
|
+
typeof A == "function" && (u = A({
|
|
1267
1267
|
state: u,
|
|
1268
1268
|
options: $,
|
|
1269
1269
|
name: R,
|
|
@@ -1291,16 +1291,16 @@ function fa(e) {
|
|
|
1291
1291
|
});
|
|
1292
1292
|
function x() {
|
|
1293
1293
|
u.orderedModifiers.forEach(function(w) {
|
|
1294
|
-
var
|
|
1295
|
-
if (typeof
|
|
1296
|
-
var
|
|
1294
|
+
var _ = w.name, N = w.options, V = N === void 0 ? {} : N, k = w.effect;
|
|
1295
|
+
if (typeof k == "function") {
|
|
1296
|
+
var E = k({
|
|
1297
1297
|
state: u,
|
|
1298
|
-
name:
|
|
1298
|
+
name: _,
|
|
1299
1299
|
instance: v,
|
|
1300
|
-
options:
|
|
1301
|
-
}),
|
|
1300
|
+
options: V
|
|
1301
|
+
}), A = function() {
|
|
1302
1302
|
};
|
|
1303
|
-
d.push(
|
|
1303
|
+
d.push(E || A);
|
|
1304
1304
|
}
|
|
1305
1305
|
});
|
|
1306
1306
|
}
|
|
@@ -1507,7 +1507,7 @@ function Qn({
|
|
|
1507
1507
|
placement: n,
|
|
1508
1508
|
modifiers: [{ name: "offset", options: { offset: i } }]
|
|
1509
1509
|
});
|
|
1510
|
-
return ka([l, r], a, { enabled: e }), /* @__PURE__ */ c(dr, { mounted: e, children: /* @__PURE__ */ c("div", { ref: f, style: { ...u.popper, ...o }, className:
|
|
1510
|
+
return ka([l, r], a, { enabled: e }), /* @__PURE__ */ c(dr, { mounted: e, children: /* @__PURE__ */ c("div", { ref: f, style: { ...u.popper, ...o }, className: O("bbn-popover", t), children: s }) });
|
|
1511
1511
|
}
|
|
1512
1512
|
function Oa(e) {
|
|
1513
1513
|
const [t, r] = ee({ width: 0, height: 0 });
|
|
@@ -1546,50 +1546,50 @@ const Ea = (e) => e.label, ei = Me(
|
|
|
1546
1546
|
renderSelectedOption: x = Ea,
|
|
1547
1547
|
...g
|
|
1548
1548
|
}, w) => {
|
|
1549
|
-
const
|
|
1550
|
-
Rn(w, () =>
|
|
1551
|
-
const { width: N } = Oa(
|
|
1549
|
+
const _ = it(null);
|
|
1550
|
+
Rn(w, () => _.current, []);
|
|
1551
|
+
const { width: N } = Oa(_.current), [V, k] = ut({
|
|
1552
1552
|
value: s,
|
|
1553
1553
|
defaultValue: o,
|
|
1554
1554
|
onStateChange: (P) => void (P ? d == null ? void 0 : d() : v == null ? void 0 : v())
|
|
1555
|
-
}), [
|
|
1555
|
+
}), [E, A] = ut({
|
|
1556
1556
|
value: r,
|
|
1557
1557
|
defaultValue: n,
|
|
1558
1558
|
onStateChange: m
|
|
1559
1559
|
}), D = Ie(
|
|
1560
|
-
() => a.find((P) => P.value ===
|
|
1561
|
-
[a,
|
|
1560
|
+
() => a.find((P) => P.value === E),
|
|
1561
|
+
[a, E]
|
|
1562
1562
|
), $ = oe(
|
|
1563
1563
|
(P) => {
|
|
1564
|
-
|
|
1564
|
+
A(P.value), k(!1);
|
|
1565
1565
|
},
|
|
1566
|
-
[
|
|
1566
|
+
[A, k]
|
|
1567
1567
|
), R = oe(() => {
|
|
1568
|
-
|
|
1569
|
-
}, [
|
|
1570
|
-
e ||
|
|
1571
|
-
}, [
|
|
1568
|
+
k(!1);
|
|
1569
|
+
}, [k]), H = oe(() => {
|
|
1570
|
+
e || k(!V);
|
|
1571
|
+
}, [V, e, k]);
|
|
1572
1572
|
return /* @__PURE__ */ b(ze, { children: [
|
|
1573
1573
|
/* @__PURE__ */ b(
|
|
1574
1574
|
"div",
|
|
1575
1575
|
{
|
|
1576
|
-
ref:
|
|
1577
|
-
className:
|
|
1576
|
+
ref: _,
|
|
1577
|
+
className: O("bbn-select", e && "bbn-select-disabled", `bbn-select-${u}`, t),
|
|
1578
1578
|
onClick: H,
|
|
1579
1579
|
tabIndex: e ? -1 : 0,
|
|
1580
1580
|
...g,
|
|
1581
1581
|
children: [
|
|
1582
1582
|
/* @__PURE__ */ c("span", { children: D ? x(D) : i }),
|
|
1583
|
-
/* @__PURE__ */ c(ss, { className:
|
|
1583
|
+
/* @__PURE__ */ c(ss, { className: O("bbn-select-icon", V && "bbn-select-icon-open"), size: 20 })
|
|
1584
1584
|
]
|
|
1585
1585
|
}
|
|
1586
1586
|
),
|
|
1587
1587
|
/* @__PURE__ */ c(
|
|
1588
1588
|
Qn,
|
|
1589
1589
|
{
|
|
1590
|
-
anchorEl:
|
|
1591
|
-
className:
|
|
1592
|
-
open:
|
|
1590
|
+
anchorEl: _.current,
|
|
1591
|
+
className: O("bbn-select-menu custom-scrollbar", f),
|
|
1592
|
+
open: V && !e,
|
|
1593
1593
|
onClickOutside: R,
|
|
1594
1594
|
offset: [0, 4],
|
|
1595
1595
|
placement: "bottom-start",
|
|
@@ -1597,7 +1597,7 @@ const Ea = (e) => e.label, ei = Me(
|
|
|
1597
1597
|
children: a.map((P) => /* @__PURE__ */ c(
|
|
1598
1598
|
"div",
|
|
1599
1599
|
{
|
|
1600
|
-
className:
|
|
1600
|
+
className: O(
|
|
1601
1601
|
"bbn-select-option",
|
|
1602
1602
|
(D == null ? void 0 : D.value) === P.value && "bbn-select-option-selected",
|
|
1603
1603
|
l
|
|
@@ -1614,20 +1614,20 @@ const Ea = (e) => e.label, ei = Me(
|
|
|
1614
1614
|
);
|
|
1615
1615
|
ei.displayName = "Select";
|
|
1616
1616
|
const hr = Me(
|
|
1617
|
-
({ className: e, prefix: t, suffix: r, disabled: n = !1, state: i = "default", ...s }, o) => /* @__PURE__ */ b("div", { className:
|
|
1617
|
+
({ className: e, prefix: t, suffix: r, disabled: n = !1, state: i = "default", ...s }, o) => /* @__PURE__ */ b("div", { className: O("bbn-input", n && "bbn-input-disabled", `bbn-input-${i}`), children: [
|
|
1618
1618
|
t && /* @__PURE__ */ c("div", { className: "bbn-input-prefix", children: t }),
|
|
1619
|
-
/* @__PURE__ */ c("input", { ref: o, className:
|
|
1619
|
+
/* @__PURE__ */ c("input", { ref: o, className: O("bbn-input-field", e), disabled: n, ...s }),
|
|
1620
1620
|
r && /* @__PURE__ */ c("div", { className: "bbn-input-suffix", children: r })
|
|
1621
1621
|
] })
|
|
1622
1622
|
);
|
|
1623
1623
|
hr.displayName = "Input";
|
|
1624
1624
|
function mr({ children: e, label: t, hint: r, state: n = "default", className: i }) {
|
|
1625
|
-
return /* @__PURE__ */ b("div", { className:
|
|
1625
|
+
return /* @__PURE__ */ b("div", { className: O("bbn-form-control", i), children: [
|
|
1626
1626
|
t ? /* @__PURE__ */ b("label", { className: "bbn-form-control-label", children: [
|
|
1627
1627
|
/* @__PURE__ */ c("div", { className: "bbn-form-control-title", children: t }),
|
|
1628
1628
|
e
|
|
1629
1629
|
] }) : e,
|
|
1630
|
-
r && /* @__PURE__ */ c("div", { className:
|
|
1630
|
+
r && /* @__PURE__ */ c("div", { className: O("bbn-form-control-hint", `bbn-form-control-hint-${n}`), children: r })
|
|
1631
1631
|
] });
|
|
1632
1632
|
}
|
|
1633
1633
|
const ti = ur({
|
|
@@ -1677,7 +1677,7 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1677
1677
|
"div",
|
|
1678
1678
|
{
|
|
1679
1679
|
...t,
|
|
1680
|
-
className:
|
|
1680
|
+
className: O("bbn-backdrop", e ? "animate-backdrop-in" : "animate-backdrop-out", t.className)
|
|
1681
1681
|
}
|
|
1682
1682
|
), pr = ({
|
|
1683
1683
|
children: e,
|
|
@@ -1691,10 +1691,10 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1691
1691
|
}) => {
|
|
1692
1692
|
const { mounted: l, unmount: f } = ri({ open: t });
|
|
1693
1693
|
return /* @__PURE__ */ b(dr, { mounted: l, children: [
|
|
1694
|
-
/* @__PURE__ */ c("div", { ...a, className:
|
|
1694
|
+
/* @__PURE__ */ c("div", { ...a, className: O("bbn-dialog-wrapper", r), children: /* @__PURE__ */ c(
|
|
1695
1695
|
"div",
|
|
1696
1696
|
{
|
|
1697
|
-
className:
|
|
1697
|
+
className: O("bbn-dialog", t ? "animate-modal-in" : "animate-modal-out", o),
|
|
1698
1698
|
onAnimationEnd: f,
|
|
1699
1699
|
children: e
|
|
1700
1700
|
}
|
|
@@ -1721,7 +1721,7 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1721
1721
|
return /* @__PURE__ */ c(
|
|
1722
1722
|
"div",
|
|
1723
1723
|
{
|
|
1724
|
-
className:
|
|
1724
|
+
className: O(
|
|
1725
1725
|
"flex items-center justify-center",
|
|
1726
1726
|
i && {
|
|
1727
1727
|
default: "bg-accent-secondary/10",
|
|
@@ -1799,7 +1799,7 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1799
1799
|
viewBox: "0 0 14 16",
|
|
1800
1800
|
fill: "none",
|
|
1801
1801
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1802
|
-
className:
|
|
1802
|
+
className: O("transition-opacity duration-200", i, e),
|
|
1803
1803
|
children: /* @__PURE__ */ c(
|
|
1804
1804
|
"path",
|
|
1805
1805
|
{
|
|
@@ -1823,7 +1823,7 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1823
1823
|
viewBox: "0 0 14 14",
|
|
1824
1824
|
fill: "none",
|
|
1825
1825
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1826
|
-
className:
|
|
1826
|
+
className: O("transition-opacity duration-200", i, e),
|
|
1827
1827
|
children: /* @__PURE__ */ c(
|
|
1828
1828
|
"path",
|
|
1829
1829
|
{
|
|
@@ -1847,7 +1847,7 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1847
1847
|
viewBox: "0 0 22 20",
|
|
1848
1848
|
fill: "none",
|
|
1849
1849
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1850
|
-
className:
|
|
1850
|
+
className: O("transition-opacity duration-200", i, e),
|
|
1851
1851
|
children: /* @__PURE__ */ c(
|
|
1852
1852
|
"path",
|
|
1853
1853
|
{
|
|
@@ -1871,7 +1871,7 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1871
1871
|
viewBox: "0 0 20 20",
|
|
1872
1872
|
fill: "none",
|
|
1873
1873
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1874
|
-
className:
|
|
1874
|
+
className: O("transition-opacity duration-200", i, e),
|
|
1875
1875
|
children: [
|
|
1876
1876
|
/* @__PURE__ */ c(
|
|
1877
1877
|
"rect",
|
|
@@ -1908,7 +1908,7 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1908
1908
|
viewBox: "0 0 20 20",
|
|
1909
1909
|
fill: "none",
|
|
1910
1910
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1911
|
-
className:
|
|
1911
|
+
className: O("transition-opacity duration-200", i, e),
|
|
1912
1912
|
children: [
|
|
1913
1913
|
/* @__PURE__ */ c(
|
|
1914
1914
|
"rect",
|
|
@@ -1946,7 +1946,7 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1946
1946
|
"div",
|
|
1947
1947
|
{
|
|
1948
1948
|
...i,
|
|
1949
|
-
className:
|
|
1949
|
+
className: O(
|
|
1950
1950
|
"bbn-dialog-mobile",
|
|
1951
1951
|
t ? "animate-mobile-modal-in" : "animate-mobile-modal-out",
|
|
1952
1952
|
r
|
|
@@ -1968,7 +1968,7 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1968
1968
|
),
|
|
1969
1969
|
/* @__PURE__ */ c(ni, { open: t, onClick: n })
|
|
1970
1970
|
] });
|
|
1971
|
-
}, vr = ({ className: e, children: t, title: r, onClose: n }) => /* @__PURE__ */ b("div", { className:
|
|
1971
|
+
}, vr = ({ className: e, children: t, title: r, onClose: n }) => /* @__PURE__ */ b("div", { className: O("bbn-dialog-header", e), children: [
|
|
1972
1972
|
/* @__PURE__ */ b("div", { className: "bbn-dialog-title", children: [
|
|
1973
1973
|
/* @__PURE__ */ c(Mr, { variant: "h5", children: r }),
|
|
1974
1974
|
!!n && /* @__PURE__ */ c(Pn, { className: "shrink-0", onClick: n, children: /* @__PURE__ */ c("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ c(
|
|
@@ -1980,9 +1980,9 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1980
1980
|
) }) })
|
|
1981
1981
|
] }),
|
|
1982
1982
|
t
|
|
1983
|
-
] }), gr = (e) => /* @__PURE__ */ c("div", { ...e, className:
|
|
1983
|
+
] }), gr = (e) => /* @__PURE__ */ c("div", { ...e, className: O("bbn-dialog-body", e.className) }), Wr = (e) => /* @__PURE__ */ c("div", { ...e, className: O("bbn-dialog-footer", e.className) });
|
|
1984
1984
|
function Sl({ className: e, ...t }) {
|
|
1985
|
-
return /* @__PURE__ */ c("span", { ...t, className:
|
|
1985
|
+
return /* @__PURE__ */ c("span", { ...t, className: O("bbn-chip", e) });
|
|
1986
1986
|
}
|
|
1987
1987
|
function Al({ size: e = 40, className: t }) {
|
|
1988
1988
|
return /* @__PURE__ */ c("span", { className: ce("bbn-loader text-current", t), style: { width: e, height: e }, children: /* @__PURE__ */ c("svg", { viewBox: "22 22 44 44", children: /* @__PURE__ */ c("circle", { cx: "44", cy: "44", r: "20.2", fill: "none", stroke: "currentColor", strokeWidth: "3.6" }) }) });
|
|
@@ -1995,47 +1995,47 @@ function qa(e, t, r) {
|
|
|
1995
1995
|
if (typeof e != "function")
|
|
1996
1996
|
throw new TypeError(ai);
|
|
1997
1997
|
t = bn(t) || 0, ir(r) && (u = !!r.leading, d = "maxWait" in r, s = d ? Ua(bn(r.maxWait) || 0, t) : s, m = "trailing" in r ? !!r.trailing : m);
|
|
1998
|
-
function v(
|
|
1998
|
+
function v(A) {
|
|
1999
1999
|
var D = n, $ = i;
|
|
2000
|
-
return n = i = void 0, f =
|
|
2000
|
+
return n = i = void 0, f = A, o = e.apply($, D), o;
|
|
2001
2001
|
}
|
|
2002
|
-
function x(
|
|
2003
|
-
return f =
|
|
2002
|
+
function x(A) {
|
|
2003
|
+
return f = A, a = setTimeout(_, t), u ? v(A) : o;
|
|
2004
2004
|
}
|
|
2005
|
-
function g(
|
|
2006
|
-
var D =
|
|
2005
|
+
function g(A) {
|
|
2006
|
+
var D = A - l, $ = A - f, R = t - D;
|
|
2007
2007
|
return d ? za(R, s - $) : R;
|
|
2008
2008
|
}
|
|
2009
|
-
function w(
|
|
2010
|
-
var D =
|
|
2009
|
+
function w(A) {
|
|
2010
|
+
var D = A - l, $ = A - f;
|
|
2011
2011
|
return l === void 0 || D >= t || D < 0 || d && $ >= s;
|
|
2012
2012
|
}
|
|
2013
|
-
function
|
|
2014
|
-
var
|
|
2015
|
-
if (w(
|
|
2016
|
-
return N(
|
|
2017
|
-
a = setTimeout(
|
|
2013
|
+
function _() {
|
|
2014
|
+
var A = Nr();
|
|
2015
|
+
if (w(A))
|
|
2016
|
+
return N(A);
|
|
2017
|
+
a = setTimeout(_, g(A));
|
|
2018
2018
|
}
|
|
2019
|
-
function N(
|
|
2020
|
-
return a = void 0, m && n ? v(
|
|
2019
|
+
function N(A) {
|
|
2020
|
+
return a = void 0, m && n ? v(A) : (n = i = void 0, o);
|
|
2021
2021
|
}
|
|
2022
|
-
function
|
|
2022
|
+
function V() {
|
|
2023
2023
|
a !== void 0 && clearTimeout(a), f = 0, n = l = i = a = void 0;
|
|
2024
2024
|
}
|
|
2025
|
-
function
|
|
2025
|
+
function k() {
|
|
2026
2026
|
return a === void 0 ? o : N(Nr());
|
|
2027
2027
|
}
|
|
2028
|
-
function
|
|
2029
|
-
var
|
|
2030
|
-
if (n = arguments, i = this, l =
|
|
2028
|
+
function E() {
|
|
2029
|
+
var A = Nr(), D = w(A);
|
|
2030
|
+
if (n = arguments, i = this, l = A, D) {
|
|
2031
2031
|
if (a === void 0)
|
|
2032
2032
|
return x(l);
|
|
2033
2033
|
if (d)
|
|
2034
|
-
return a = setTimeout(
|
|
2034
|
+
return a = setTimeout(_, t), v(l);
|
|
2035
2035
|
}
|
|
2036
|
-
return a === void 0 && (a = setTimeout(
|
|
2036
|
+
return a === void 0 && (a = setTimeout(_, t)), o;
|
|
2037
2037
|
}
|
|
2038
|
-
return
|
|
2038
|
+
return E.cancel = V, E.flush = k, E;
|
|
2039
2039
|
}
|
|
2040
2040
|
function Za(e, t, r) {
|
|
2041
2041
|
var n = !0, i = !0;
|
|
@@ -2123,7 +2123,7 @@ function Qa({
|
|
|
2123
2123
|
{
|
|
2124
2124
|
variant: "caption",
|
|
2125
2125
|
as: "th",
|
|
2126
|
-
className:
|
|
2126
|
+
className: O("bbn-cell-left", n && "bbn-table-sortable", m, i && s ? "bbn-frozen-shadow" : "", t),
|
|
2127
2127
|
onClick: () => {
|
|
2128
2128
|
if (n && e) {
|
|
2129
2129
|
const x = a.find((g) => g.key === e);
|
|
@@ -2138,7 +2138,7 @@ function Qa({
|
|
|
2138
2138
|
/* @__PURE__ */ c(
|
|
2139
2139
|
as,
|
|
2140
2140
|
{
|
|
2141
|
-
className:
|
|
2141
|
+
className: O(
|
|
2142
2142
|
"bbn-sort-icon bbn-sort-icon-up",
|
|
2143
2143
|
d === "asc" ? "bbn-sort-icon-active" : "bbn-sort-icon-inactive"
|
|
2144
2144
|
)
|
|
@@ -2147,7 +2147,7 @@ function Qa({
|
|
|
2147
2147
|
/* @__PURE__ */ c(
|
|
2148
2148
|
is,
|
|
2149
2149
|
{
|
|
2150
|
-
className:
|
|
2150
|
+
className: O(
|
|
2151
2151
|
"bbn-sort-icon bbn-sort-icon-down",
|
|
2152
2152
|
d === "desc" ? "bbn-sort-icon-active" : "bbn-sort-icon-inactive"
|
|
2153
2153
|
)
|
|
@@ -2206,7 +2206,7 @@ function to({
|
|
|
2206
2206
|
{
|
|
2207
2207
|
variant: "body2",
|
|
2208
2208
|
as: "td",
|
|
2209
|
-
className:
|
|
2209
|
+
className: O("bbn-cell-left", a, i && s ? "bbn-frozen-shadow" : "", e),
|
|
2210
2210
|
"data-column": n,
|
|
2211
2211
|
...o,
|
|
2212
2212
|
children: t ? t(r) : r
|
|
@@ -2225,7 +2225,7 @@ function ro({
|
|
|
2225
2225
|
return /* @__PURE__ */ c(
|
|
2226
2226
|
"tr",
|
|
2227
2227
|
{
|
|
2228
|
-
className:
|
|
2228
|
+
className: O(
|
|
2229
2229
|
r && "selected",
|
|
2230
2230
|
!!i && n && "cursor-pointer",
|
|
2231
2231
|
!n && "opacity-50"
|
|
@@ -2263,50 +2263,50 @@ function no({
|
|
|
2263
2263
|
}, v) {
|
|
2264
2264
|
const x = it(null);
|
|
2265
2265
|
Rn(v, () => x.current, []);
|
|
2266
|
-
const { sortStates: g, handleColumnSort: w, sortedData:
|
|
2266
|
+
const { sortStates: g, handleColumnSort: w, sortedData: _ } = eo(e, t), { isScrolledTop: N } = Ka(x, { onLoadMore: o, hasMore: i, loading: s }), { isLeftScrolled: V, isRightScrolled: k } = Ja(x), [E, A] = ut({
|
|
2267
2267
|
value: f,
|
|
2268
2268
|
defaultValue: u ?? null,
|
|
2269
2269
|
onStateChange: d
|
|
2270
2270
|
}), D = oe(
|
|
2271
2271
|
(R) => {
|
|
2272
2272
|
if (!a || l && !l(R)) return;
|
|
2273
|
-
const H =
|
|
2274
|
-
|
|
2273
|
+
const H = E === R.id ? null : R.id;
|
|
2274
|
+
A(H), a(H === null ? null : R);
|
|
2275
2275
|
},
|
|
2276
|
-
[a, l,
|
|
2276
|
+
[a, l, E, A]
|
|
2277
2277
|
), $ = Ie(
|
|
2278
2278
|
() => ({
|
|
2279
|
-
data:
|
|
2279
|
+
data: _,
|
|
2280
2280
|
columns: t,
|
|
2281
2281
|
sortStates: g,
|
|
2282
2282
|
onColumnSort: w,
|
|
2283
2283
|
onRowSelect: D
|
|
2284
2284
|
}),
|
|
2285
|
-
[
|
|
2285
|
+
[_, t, g, w, D]
|
|
2286
2286
|
);
|
|
2287
|
-
return /* @__PURE__ */ c(li.Provider, { value: $, children: /* @__PURE__ */ c("div", { ref: x, className:
|
|
2288
|
-
/* @__PURE__ */ c("thead", { className:
|
|
2287
|
+
return /* @__PURE__ */ c(li.Provider, { value: $, children: /* @__PURE__ */ c("div", { ref: x, className: O("bbn-table-wrapper", n), children: /* @__PURE__ */ b("table", { className: O("bbn-table", r), ...m, children: [
|
|
2288
|
+
/* @__PURE__ */ c("thead", { className: O("bbn-table-header", N && "scrolled-top"), children: /* @__PURE__ */ c("tr", { children: t.map((R) => /* @__PURE__ */ c(
|
|
2289
2289
|
Qa,
|
|
2290
2290
|
{
|
|
2291
2291
|
className: R.headerClassName,
|
|
2292
2292
|
name: R.key,
|
|
2293
2293
|
sorter: R.sorter,
|
|
2294
2294
|
frozen: R.frozen,
|
|
2295
|
-
showFrozenShadow: R.frozen === "left" &&
|
|
2295
|
+
showFrozenShadow: R.frozen === "left" && V || R.frozen === "right" && k,
|
|
2296
2296
|
children: R.header
|
|
2297
2297
|
},
|
|
2298
2298
|
R.key
|
|
2299
2299
|
)) }) }),
|
|
2300
|
-
/* @__PURE__ */ c("tbody", { className: "bbn-table-body", children:
|
|
2300
|
+
/* @__PURE__ */ c("tbody", { className: "bbn-table-body", children: _.map((R) => /* @__PURE__ */ c(
|
|
2301
2301
|
ro,
|
|
2302
2302
|
{
|
|
2303
2303
|
row: R,
|
|
2304
2304
|
columns: t,
|
|
2305
|
-
isSelected:
|
|
2305
|
+
isSelected: E === R.id,
|
|
2306
2306
|
isSelectable: l ? l(R) : !0,
|
|
2307
2307
|
onSelect: D,
|
|
2308
|
-
isLeftScrolled:
|
|
2309
|
-
isRightScrolled:
|
|
2308
|
+
isLeftScrolled: V,
|
|
2309
|
+
isRightScrolled: k
|
|
2310
2310
|
},
|
|
2311
2311
|
R.id
|
|
2312
2312
|
)) })
|
|
@@ -2314,7 +2314,7 @@ function no({
|
|
|
2314
2314
|
}
|
|
2315
2315
|
const io = Me(no);
|
|
2316
2316
|
function so({ as: e = "div", className: t, children: r }) {
|
|
2317
|
-
return Lr(e, { className:
|
|
2317
|
+
return Lr(e, { className: O("bbn-card", t) }, r);
|
|
2318
2318
|
}
|
|
2319
2319
|
function Ll(e) {
|
|
2320
2320
|
const [t = !1, r] = ut({
|
|
@@ -2324,7 +2324,7 @@ function Ll(e) {
|
|
|
2324
2324
|
});
|
|
2325
2325
|
return /* @__PURE__ */ b("div", { className: "bbn-toggle", onClick: () => void r(!t), children: [
|
|
2326
2326
|
/* @__PURE__ */ c("span", { className: "bbn-toggle-bg", children: e.activeIcon }),
|
|
2327
|
-
/* @__PURE__ */ c("span", { className:
|
|
2327
|
+
/* @__PURE__ */ c("span", { className: O("bbn-toggle-control", t && "bbn-toggle-control-active") }),
|
|
2328
2328
|
/* @__PURE__ */ c("span", { className: "bbn-toggle-bg", children: e.inactiveIcon })
|
|
2329
2329
|
] });
|
|
2330
2330
|
}
|
|
@@ -2342,17 +2342,17 @@ function Vl({ className: e, orientation: t = "vertical", children: r }) {
|
|
|
2342
2342
|
) });
|
|
2343
2343
|
}
|
|
2344
2344
|
function Fl({ className: e, orientation: t = "horizontal", title: r, value: n, suffix: i }) {
|
|
2345
|
-
return /* @__PURE__ */ b("div", { className:
|
|
2345
|
+
return /* @__PURE__ */ b("div", { className: O("bbn-list-item", `bbn-list-item-${t}`, e), children: [
|
|
2346
2346
|
/* @__PURE__ */ c(
|
|
2347
2347
|
W,
|
|
2348
2348
|
{
|
|
2349
2349
|
as: "div",
|
|
2350
|
-
className:
|
|
2350
|
+
className: O("bbn-list-title", `bbn-list-title-${t}`),
|
|
2351
2351
|
variant: t === "horizontal" ? "body1" : "body2",
|
|
2352
2352
|
children: r
|
|
2353
2353
|
}
|
|
2354
2354
|
),
|
|
2355
|
-
/* @__PURE__ */ b(W, { as: "div", className:
|
|
2355
|
+
/* @__PURE__ */ b(W, { as: "div", className: O("bbn-list-value", `bbn-list-value-${t}`), variant: "body1", children: [
|
|
2356
2356
|
n,
|
|
2357
2357
|
i
|
|
2358
2358
|
] })
|
|
@@ -2369,16 +2369,16 @@ function Dl({
|
|
|
2369
2369
|
contentClassName: a
|
|
2370
2370
|
}) {
|
|
2371
2371
|
const l = typeof t == "number" ? t > 0 : t != null, f = typeof t == "number" && t > r ? `${r}+` : t, u = `bbn-badge-${n}`, d = `bbn-badge-${i}`;
|
|
2372
|
-
return /* @__PURE__ */ b("div", { className:
|
|
2372
|
+
return /* @__PURE__ */ b("div", { className: O("bbn-badge", s), children: [
|
|
2373
2373
|
e,
|
|
2374
|
-
l && /* @__PURE__ */ c("span", { className:
|
|
2374
|
+
l && /* @__PURE__ */ c("span", { className: O("bbn-badge-indicator", u, d, o), children: /* @__PURE__ */ c("span", { className: O("bbn-badge-content", a), children: f }) })
|
|
2375
2375
|
] });
|
|
2376
2376
|
}
|
|
2377
2377
|
const Bt = ({
|
|
2378
2378
|
children: e,
|
|
2379
2379
|
style: t,
|
|
2380
2380
|
className: r
|
|
2381
|
-
}) => /* @__PURE__ */ c("div", { className:
|
|
2381
|
+
}) => /* @__PURE__ */ c("div", { className: O("flex rounded bg-secondary-highlight p-4 text-accent-primary", r), style: t, children: e });
|
|
2382
2382
|
function oo(e) {
|
|
2383
2383
|
return st({ attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8Z" }, child: [] }, { tag: "path", attr: { d: "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8Z" }, child: [] }] })(e);
|
|
2384
2384
|
}
|
|
@@ -2387,7 +2387,7 @@ function lo({ counter: e, max: t, onAdd: r, alwaysShowCounter: n = !1 }) {
|
|
|
2387
2387
|
return /* @__PURE__ */ b(
|
|
2388
2388
|
"div",
|
|
2389
2389
|
{
|
|
2390
|
-
className:
|
|
2390
|
+
className: O(
|
|
2391
2391
|
"bg-primary-highlight flex overflow-hidden rounded-md border border-accent-primary w-fit",
|
|
2392
2392
|
i && "cursor-pointer",
|
|
2393
2393
|
!s && !i && "hidden",
|
|
@@ -2396,7 +2396,7 @@ function lo({ counter: e, max: t, onAdd: r, alwaysShowCounter: n = !1 }) {
|
|
|
2396
2396
|
onClick: i ? r : void 0,
|
|
2397
2397
|
children: [
|
|
2398
2398
|
i && /* @__PURE__ */ c("div", { className: "flex h-10 w-10 items-center justify-center", children: /* @__PURE__ */ c(oo, { size: 20 }) }),
|
|
2399
|
-
s && /* @__PURE__ */ b("div", { className:
|
|
2399
|
+
s && /* @__PURE__ */ b("div", { className: O(
|
|
2400
2400
|
"flex h-10 items-center px-2 text-sm sm:px-4 sm:text-base",
|
|
2401
2401
|
i && "border-l border-accent-primary"
|
|
2402
2402
|
), children: [
|
|
@@ -2429,7 +2429,7 @@ const ci = ur(void 0), ui = () => Dt(ci), co = ({ children: e, value: t }) => /*
|
|
|
2429
2429
|
}, v = () => f || r ? /* @__PURE__ */ b(
|
|
2430
2430
|
"div",
|
|
2431
2431
|
{
|
|
2432
|
-
className:
|
|
2432
|
+
className: O(
|
|
2433
2433
|
"flex items-center p-4",
|
|
2434
2434
|
u && "border-b border-[#38708533] dark:border-[#404040]"
|
|
2435
2435
|
),
|
|
@@ -2466,7 +2466,7 @@ const ci = ur(void 0), ui = () => Dt(ci), co = ({ children: e, value: t }) => /*
|
|
|
2466
2466
|
r && /* @__PURE__ */ c(
|
|
2467
2467
|
"h3",
|
|
2468
2468
|
{
|
|
2469
|
-
className:
|
|
2469
|
+
className: O(
|
|
2470
2470
|
"flex-1 text-sm font-medium text-accent-primary",
|
|
2471
2471
|
f ? "ml-3" : "",
|
|
2472
2472
|
m[s]
|
|
@@ -2484,7 +2484,7 @@ const ci = ur(void 0), ui = () => Dt(ci), co = ({ children: e, value: t }) => /*
|
|
|
2484
2484
|
d && /* @__PURE__ */ c(
|
|
2485
2485
|
"div",
|
|
2486
2486
|
{
|
|
2487
|
-
className:
|
|
2487
|
+
className: O(
|
|
2488
2488
|
"fixed inset-0 z-40 bg-black/50 transition-opacity duration-300",
|
|
2489
2489
|
e ? "opacity-100" : "pointer-events-none opacity-0"
|
|
2490
2490
|
),
|
|
@@ -2494,7 +2494,7 @@ const ci = ur(void 0), ui = () => Dt(ci), co = ({ children: e, value: t }) => /*
|
|
|
2494
2494
|
/* @__PURE__ */ c(
|
|
2495
2495
|
"div",
|
|
2496
2496
|
{
|
|
2497
|
-
className:
|
|
2497
|
+
className: O(
|
|
2498
2498
|
"transform transition-transform duration-300 ease-in-out",
|
|
2499
2499
|
"bg-[#FFFFFF] dark:bg-[#252525]",
|
|
2500
2500
|
"fixed inset-y-0 right-0 z-50",
|
|
@@ -2508,7 +2508,7 @@ const ci = ur(void 0), ui = () => Dt(ci), co = ({ children: e, value: t }) => /*
|
|
|
2508
2508
|
] }) : /* @__PURE__ */ c(
|
|
2509
2509
|
"div",
|
|
2510
2510
|
{
|
|
2511
|
-
className:
|
|
2511
|
+
className: O(
|
|
2512
2512
|
"transform transition-transform duration-300 ease-in-out",
|
|
2513
2513
|
"bg-[#FFFFFF] dark:bg-[#252525]",
|
|
2514
2514
|
"absolute inset-0 rounded-lg",
|
|
@@ -2537,8 +2537,8 @@ const di = ({
|
|
|
2537
2537
|
className: o,
|
|
2538
2538
|
mobileMode: a = "dialog"
|
|
2539
2539
|
}) => {
|
|
2540
|
-
const [l, f] = ee(!1), u = it(null), d = Pt(), m = r !== void 0 ? r : l, v = (
|
|
2541
|
-
r === void 0 && f(
|
|
2540
|
+
const [l, f] = ee(!1), u = it(null), d = Pt(), m = r !== void 0 ? r : l, v = (_) => {
|
|
2541
|
+
r === void 0 && f(_), n == null || n(_);
|
|
2542
2542
|
}, x = () => v(!1), g = /* @__PURE__ */ c("div", { className: "relative w-full overflow-hidden", children: e }), w = t || /* @__PURE__ */ c("button", { className: "rounded p-2 hover:bg-gray-100 dark:hover:bg-gray-800", onClick: () => v(!m), children: "Menu" });
|
|
2543
2543
|
return /* @__PURE__ */ b(co, { value: { isOpen: m, setIsOpen: v, onClose: x, isMobile: d }, children: [
|
|
2544
2544
|
/* @__PURE__ */ c("div", { ref: u, className: "inline-block", children: I.isValidElement(w) && I.cloneElement(w, {
|
|
@@ -2551,7 +2551,7 @@ const di = ({
|
|
|
2551
2551
|
{
|
|
2552
2552
|
open: m,
|
|
2553
2553
|
onClose: x,
|
|
2554
|
-
className:
|
|
2554
|
+
className: O(
|
|
2555
2555
|
"relative bg-[#FFFFFF] dark:bg-[#252525] text-primary-main",
|
|
2556
2556
|
o
|
|
2557
2557
|
),
|
|
@@ -2577,7 +2577,7 @@ const di = ({
|
|
|
2577
2577
|
offset: s,
|
|
2578
2578
|
placement: i,
|
|
2579
2579
|
onClickOutside: x,
|
|
2580
|
-
className:
|
|
2580
|
+
className: O(
|
|
2581
2581
|
"rounded-lg border border-[#38708533] bg-[#FFFFFF] shadow-lg dark:border-[#404040] dark:bg-[#252525]",
|
|
2582
2582
|
"min-w-[294px]",
|
|
2583
2583
|
o
|
|
@@ -2606,7 +2606,7 @@ const di = ({
|
|
|
2606
2606
|
{
|
|
2607
2607
|
onClick: d,
|
|
2608
2608
|
disabled: i,
|
|
2609
|
-
className:
|
|
2609
|
+
className: O("w-full text-left", i && "cursor-not-allowed opacity-50", s),
|
|
2610
2610
|
children: o
|
|
2611
2611
|
}
|
|
2612
2612
|
) : /* @__PURE__ */ b(
|
|
@@ -2614,7 +2614,7 @@ const di = ({
|
|
|
2614
2614
|
{
|
|
2615
2615
|
onClick: d,
|
|
2616
2616
|
disabled: i,
|
|
2617
|
-
className:
|
|
2617
|
+
className: O(
|
|
2618
2618
|
"flex w-full items-center justify-between p-6",
|
|
2619
2619
|
"transition-colors hover:bg-accent-secondary/5",
|
|
2620
2620
|
"text-left",
|
|
@@ -2677,7 +2677,7 @@ const di = ({
|
|
|
2677
2677
|
"button",
|
|
2678
2678
|
{
|
|
2679
2679
|
onClick: () => u(!0),
|
|
2680
|
-
className:
|
|
2680
|
+
className: O(
|
|
2681
2681
|
"flex w-full items-center justify-between p-6",
|
|
2682
2682
|
"transition-colors hover:bg-accent-secondary/5",
|
|
2683
2683
|
"text-left focus:outline-none",
|
|
@@ -2707,7 +2707,7 @@ const di = ({
|
|
|
2707
2707
|
fullHeight: d == null ? void 0 : d.isMobile,
|
|
2708
2708
|
fullWidth: d == null ? void 0 : d.isMobile,
|
|
2709
2709
|
onBackdropClick: d != null && d.isMobile ? void 0 : () => u(!1),
|
|
2710
|
-
className:
|
|
2710
|
+
className: O(d != null && d.isMobile ? "z-60" : "z-50", a),
|
|
2711
2711
|
children: e
|
|
2712
2712
|
}
|
|
2713
2713
|
)
|
|
@@ -2737,7 +2737,7 @@ const di = ({
|
|
|
2737
2737
|
role: "menuitem",
|
|
2738
2738
|
onClick: r,
|
|
2739
2739
|
disabled: o,
|
|
2740
|
-
className:
|
|
2740
|
+
className: O(
|
|
2741
2741
|
"flex w-full items-center justify-between p-4",
|
|
2742
2742
|
"transition-colors hover:bg-accent-secondary/5",
|
|
2743
2743
|
"text-left focus:outline-none",
|
|
@@ -2812,7 +2812,7 @@ const hi = ({
|
|
|
2812
2812
|
symbols: t = 8,
|
|
2813
2813
|
size: r = "body2",
|
|
2814
2814
|
className: n
|
|
2815
|
-
}) => e ? /* @__PURE__ */ c(W, { variant: r, className:
|
|
2815
|
+
}) => e ? /* @__PURE__ */ c(W, { variant: r, className: O("text-accent-primary", n), children: /* @__PURE__ */ c("span", { children: ho(e, t) ?? e }) }) : null;
|
|
2816
2816
|
function mi(e = {}) {
|
|
2817
2817
|
const { copiedText: t = "Copied ✓", timeout: r = 2e3 } = e, [n, i] = ee({}), [s, o] = ee({}), a = oe(
|
|
2818
2818
|
(d, m) => {
|
|
@@ -2896,16 +2896,16 @@ const Ml = ({
|
|
|
2896
2896
|
);
|
|
2897
2897
|
};
|
|
2898
2898
|
function pi({ children: e, className: t, iconClassName: r, messageClassName: n }) {
|
|
2899
|
-
return /* @__PURE__ */ b("div", { className:
|
|
2899
|
+
return /* @__PURE__ */ b("div", { className: O("bbn-warning", t), children: [
|
|
2900
2900
|
/* @__PURE__ */ c(
|
|
2901
2901
|
Va,
|
|
2902
2902
|
{
|
|
2903
2903
|
variant: "secondary",
|
|
2904
2904
|
size: 22,
|
|
2905
|
-
className:
|
|
2905
|
+
className: O("bbn-warning-icon", r)
|
|
2906
2906
|
}
|
|
2907
2907
|
),
|
|
2908
|
-
/* @__PURE__ */ c("p", { className:
|
|
2908
|
+
/* @__PURE__ */ c("p", { className: O("bbn-warning-message", n), children: e })
|
|
2909
2909
|
] });
|
|
2910
2910
|
}
|
|
2911
2911
|
var It = (e) => e.type === "checkbox", Qe = (e) => e instanceof Date, ue = (e) => e == null;
|
|
@@ -2929,7 +2929,7 @@ function se(e) {
|
|
|
2929
2929
|
return e;
|
|
2930
2930
|
return t;
|
|
2931
2931
|
}
|
|
2932
|
-
var yr = (e) => /^\w*$/.test(e), te = (e) => e === void 0, qr = (e) => Array.isArray(e) ? e.filter(Boolean) : [], Zr = (e) => qr(e.replace(/["|']|\]/g, "").split(/\.|\[/)),
|
|
2932
|
+
var yr = (e) => /^\w*$/.test(e), te = (e) => e === void 0, qr = (e) => Array.isArray(e) ? e.filter(Boolean) : [], Zr = (e) => qr(e.replace(/["|']|\]/g, "").split(/\.|\[/)), L = (e, t, r) => {
|
|
2933
2933
|
if (!t || !re(e))
|
|
2934
2934
|
return r;
|
|
2935
2935
|
const n = (yr(t) ? [t] : Zr(t)).reduce((i, s) => ue(i) ? i : i[s], e);
|
|
@@ -3012,7 +3012,7 @@ function wi(e) {
|
|
|
3012
3012
|
l.current.isValid && r._setValid(!0);
|
|
3013
3013
|
}, [r]), I.useMemo(() => bi(o, r, l.current, !1), [o, r]);
|
|
3014
3014
|
}
|
|
3015
|
-
var Le = (e) => typeof e == "string", xi = (e, t, r, n, i) => Le(e) ? (n && t.watch.add(e),
|
|
3015
|
+
var Le = (e) => typeof e == "string", xi = (e, t, r, n, i) => Le(e) ? (n && t.watch.add(e), L(r, e, i)) : Array.isArray(e) ? e.map((s) => (n && t.watch.add(s), L(r, s))) : (n && (t.watchAll = !0), r), Sr = (e) => ue(e) || !vi(e);
|
|
3016
3016
|
function Be(e, t, r = /* @__PURE__ */ new WeakSet()) {
|
|
3017
3017
|
if (Sr(e) || Sr(t))
|
|
3018
3018
|
return e === t;
|
|
@@ -3059,7 +3059,7 @@ function Ni(e) {
|
|
|
3059
3059
|
}), [r, s, n, o]), I.useEffect(() => r._removeUnmounted()), m;
|
|
3060
3060
|
}
|
|
3061
3061
|
function go(e) {
|
|
3062
|
-
const t = pt(), { name: r, disabled: n, control: i = t.control, shouldUnregister: s, defaultValue: o } = e, a = yi(i._names.array, r), l = I.useMemo(() =>
|
|
3062
|
+
const t = pt(), { name: r, disabled: n, control: i = t.control, shouldUnregister: s, defaultValue: o } = e, a = yi(i._names.array, r), l = I.useMemo(() => L(i._formValues, r, L(i._defaultValues, r, o)), [i, r, o]), f = Ni({
|
|
3063
3063
|
control: i,
|
|
3064
3064
|
name: r,
|
|
3065
3065
|
defaultValue: l,
|
|
@@ -3077,23 +3077,23 @@ function go(e) {
|
|
|
3077
3077
|
const v = I.useMemo(() => Object.defineProperties({}, {
|
|
3078
3078
|
invalid: {
|
|
3079
3079
|
enumerable: !0,
|
|
3080
|
-
get: () => !!
|
|
3080
|
+
get: () => !!L(u.errors, r)
|
|
3081
3081
|
},
|
|
3082
3082
|
isDirty: {
|
|
3083
3083
|
enumerable: !0,
|
|
3084
|
-
get: () => !!
|
|
3084
|
+
get: () => !!L(u.dirtyFields, r)
|
|
3085
3085
|
},
|
|
3086
3086
|
isTouched: {
|
|
3087
3087
|
enumerable: !0,
|
|
3088
|
-
get: () => !!
|
|
3088
|
+
get: () => !!L(u.touchedFields, r)
|
|
3089
3089
|
},
|
|
3090
3090
|
isValidating: {
|
|
3091
3091
|
enumerable: !0,
|
|
3092
|
-
get: () => !!
|
|
3092
|
+
get: () => !!L(u.validatingFields, r)
|
|
3093
3093
|
},
|
|
3094
3094
|
error: {
|
|
3095
3095
|
enumerable: !0,
|
|
3096
|
-
get: () =>
|
|
3096
|
+
get: () => L(u.errors, r)
|
|
3097
3097
|
}
|
|
3098
3098
|
}), [u, r]), x = I.useCallback((N) => m.current.onChange({
|
|
3099
3099
|
target: {
|
|
@@ -3103,19 +3103,19 @@ function go(e) {
|
|
|
3103
3103
|
type: sr.CHANGE
|
|
3104
3104
|
}), [r]), g = I.useCallback(() => m.current.onBlur({
|
|
3105
3105
|
target: {
|
|
3106
|
-
value:
|
|
3106
|
+
value: L(i._formValues, r),
|
|
3107
3107
|
name: r
|
|
3108
3108
|
},
|
|
3109
3109
|
type: sr.BLUR
|
|
3110
3110
|
}), [r, i._formValues]), w = I.useCallback((N) => {
|
|
3111
|
-
const
|
|
3112
|
-
|
|
3111
|
+
const V = L(i._fields, r);
|
|
3112
|
+
V && N && (V._f.ref = {
|
|
3113
3113
|
focus: () => N.focus && N.focus(),
|
|
3114
3114
|
select: () => N.select && N.select(),
|
|
3115
|
-
setCustomValidity: (
|
|
3115
|
+
setCustomValidity: (k) => N.setCustomValidity(k),
|
|
3116
3116
|
reportValidity: () => N.reportValidity()
|
|
3117
3117
|
});
|
|
3118
|
-
}, [i._fields, r]),
|
|
3118
|
+
}, [i._fields, r]), _ = I.useMemo(() => ({
|
|
3119
3119
|
name: r,
|
|
3120
3120
|
value: f,
|
|
3121
3121
|
...pe(n) || u.disabled ? { disabled: u.disabled || n } : {},
|
|
@@ -3129,16 +3129,16 @@ function go(e) {
|
|
|
3129
3129
|
...d.current.rules,
|
|
3130
3130
|
...pe(d.current.disabled) ? { disabled: d.current.disabled } : {}
|
|
3131
3131
|
});
|
|
3132
|
-
const
|
|
3133
|
-
const
|
|
3134
|
-
|
|
3132
|
+
const V = (k, E) => {
|
|
3133
|
+
const A = L(i._fields, k);
|
|
3134
|
+
A && A._f && (A._f.mount = E);
|
|
3135
3135
|
};
|
|
3136
|
-
if (
|
|
3137
|
-
const
|
|
3138
|
-
Z(i._defaultValues, r,
|
|
3136
|
+
if (V(r, !0), N) {
|
|
3137
|
+
const k = se(L(i._options.defaultValues, r));
|
|
3138
|
+
Z(i._defaultValues, r, k), te(L(i._formValues, r)) && Z(i._formValues, r, k);
|
|
3139
3139
|
}
|
|
3140
3140
|
return !a && i.register(r), () => {
|
|
3141
|
-
(a ? N && !i._state.action : N) ? i.unregister(r) :
|
|
3141
|
+
(a ? N && !i._state.action : N) ? i.unregister(r) : V(r, !1);
|
|
3142
3142
|
};
|
|
3143
3143
|
}, [r, i, a, s]), I.useEffect(() => {
|
|
3144
3144
|
i._setDisabledField({
|
|
@@ -3146,10 +3146,10 @@ function go(e) {
|
|
|
3146
3146
|
name: r
|
|
3147
3147
|
});
|
|
3148
3148
|
}, [n, r, i]), I.useMemo(() => ({
|
|
3149
|
-
field:
|
|
3149
|
+
field: _,
|
|
3150
3150
|
formState: u,
|
|
3151
3151
|
fieldState: v
|
|
3152
|
-
}), [
|
|
3152
|
+
}), [_, u, v]);
|
|
3153
3153
|
}
|
|
3154
3154
|
var Ci = (e, t, r, n, i) => t ? {
|
|
3155
3155
|
...r[e],
|
|
@@ -3252,7 +3252,7 @@ function kn(e) {
|
|
|
3252
3252
|
var xo = (e, t, r, n) => {
|
|
3253
3253
|
const i = {};
|
|
3254
3254
|
for (const s of e) {
|
|
3255
|
-
const o =
|
|
3255
|
+
const o = L(t, s);
|
|
3256
3256
|
o && Z(i, s, o._f);
|
|
3257
3257
|
}
|
|
3258
3258
|
return {
|
|
@@ -3272,7 +3272,7 @@ const En = "AsyncFunction";
|
|
|
3272
3272
|
var No = (e) => !!e && !!e.validate && !!(Ee(e.validate) && e.validate.constructor.name === En || re(e.validate) && Object.values(e.validate).find((t) => t.constructor.name === En)), Co = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), Sn = (e, t, r) => !r && (t.watchAll || t.watch.has(e) || [...t.watch].some((n) => e.startsWith(n) && /^\.\w+/.test(e.slice(n.length))));
|
|
3273
3273
|
const St = (e, t, r, n) => {
|
|
3274
3274
|
for (const i of r || Object.keys(e)) {
|
|
3275
|
-
const s =
|
|
3275
|
+
const s = L(e, i);
|
|
3276
3276
|
if (s) {
|
|
3277
3277
|
const { _f: o, ...a } = s;
|
|
3278
3278
|
if (o) {
|
|
@@ -3288,7 +3288,7 @@ const St = (e, t, r, n) => {
|
|
|
3288
3288
|
}
|
|
3289
3289
|
};
|
|
3290
3290
|
function An(e, t, r) {
|
|
3291
|
-
const n =
|
|
3291
|
+
const n = L(e, r);
|
|
3292
3292
|
if (n || yr(r))
|
|
3293
3293
|
return {
|
|
3294
3294
|
error: n,
|
|
@@ -3296,7 +3296,7 @@ function An(e, t, r) {
|
|
|
3296
3296
|
};
|
|
3297
3297
|
const i = r.split(".");
|
|
3298
3298
|
for (; i.length; ) {
|
|
3299
|
-
const s = i.join("."), o =
|
|
3299
|
+
const s = i.join("."), o = L(t, s), a = L(e, s);
|
|
3300
3300
|
if (o && !Array.isArray(o) && r !== s)
|
|
3301
3301
|
return { name: r };
|
|
3302
3302
|
if (a && a.type)
|
|
@@ -3319,8 +3319,8 @@ var ko = (e, t, r, n) => {
|
|
|
3319
3319
|
r(e);
|
|
3320
3320
|
const { name: i, ...s } = e;
|
|
3321
3321
|
return de(s) || Object.keys(s).length >= Object.keys(t).length || Object.keys(s).find((o) => t[o] === (!n || Oe.all));
|
|
3322
|
-
}, Oo = (e, t, r) => !e || !t || e === t || Et(e).some((n) => n && (r ? n === t : n.startsWith(t) || t.startsWith(n))), Eo = (e, t, r, n, i) => i.isOnAll ? !1 : !r && i.isOnTouch ? !(t || e) : (r ? n.isOnBlur : i.isOnBlur) ? !e : (r ? n.isOnChange : i.isOnChange) ? e : !0, So = (e, t) => !qr(
|
|
3323
|
-
const n = Et(
|
|
3322
|
+
}, Oo = (e, t, r) => !e || !t || e === t || Et(e).some((n) => n && (r ? n === t : n.startsWith(t) || t.startsWith(n))), Eo = (e, t, r, n, i) => i.isOnAll ? !1 : !r && i.isOnTouch ? !(t || e) : (r ? n.isOnBlur : i.isOnBlur) ? !e : (r ? n.isOnChange : i.isOnChange) ? e : !0, So = (e, t) => !qr(L(e, t)).length && ne(e, t), Ao = (e, t, r) => {
|
|
3323
|
+
const n = Et(L(e, r));
|
|
3324
3324
|
return Z(n, "root", t[r]), Z(e, r, n), e;
|
|
3325
3325
|
}, Jt = (e) => Le(e);
|
|
3326
3326
|
function Ln(e, t, r = "validate") {
|
|
@@ -3335,29 +3335,29 @@ var lt = (e) => re(e) && !lr(e) ? e : {
|
|
|
3335
3335
|
value: e,
|
|
3336
3336
|
message: ""
|
|
3337
3337
|
}, Vn = async (e, t, r, n, i, s) => {
|
|
3338
|
-
const { ref: o, refs: a, required: l, maxLength: f, minLength: u, min: d, max: m, pattern: v, validate: x, name: g, valueAsNumber: w, mount:
|
|
3339
|
-
if (!
|
|
3338
|
+
const { ref: o, refs: a, required: l, maxLength: f, minLength: u, min: d, max: m, pattern: v, validate: x, name: g, valueAsNumber: w, mount: _ } = e._f, N = L(r, g);
|
|
3339
|
+
if (!_ || t.has(g))
|
|
3340
3340
|
return {};
|
|
3341
|
-
const
|
|
3342
|
-
i &&
|
|
3343
|
-
},
|
|
3341
|
+
const V = a ? a[0] : o, k = (M) => {
|
|
3342
|
+
i && V.reportValidity && (V.setCustomValidity(pe(M) ? "" : M || ""), V.reportValidity());
|
|
3343
|
+
}, E = {}, A = Kr(o), D = It(o), $ = A || D, R = (w || Yr(o)) && te(o.value) && te(N) || ar(o) && o.value === "" || N === "" || Array.isArray(N) && !N.length, H = Ci.bind(null, g, n, E), P = (M, j, z, J = Re.maxLength, X = Re.minLength) => {
|
|
3344
3344
|
const Q = M ? j : z;
|
|
3345
|
-
|
|
3345
|
+
E[g] = {
|
|
3346
3346
|
type: M ? J : X,
|
|
3347
3347
|
message: Q,
|
|
3348
3348
|
ref: o,
|
|
3349
3349
|
...H(M ? J : X, Q)
|
|
3350
3350
|
};
|
|
3351
3351
|
};
|
|
3352
|
-
if (s ? !Array.isArray(N) || !N.length : l && (!$ && (R || ue(N)) || pe(N) && !N || D && !Si(a).isValid ||
|
|
3352
|
+
if (s ? !Array.isArray(N) || !N.length : l && (!$ && (R || ue(N)) || pe(N) && !N || D && !Si(a).isValid || A && !Li(a).isValid)) {
|
|
3353
3353
|
const { value: M, message: j } = Jt(l) ? { value: !!l, message: l } : lt(l);
|
|
3354
|
-
if (M && (
|
|
3354
|
+
if (M && (E[g] = {
|
|
3355
3355
|
type: Re.required,
|
|
3356
3356
|
message: j,
|
|
3357
|
-
ref:
|
|
3357
|
+
ref: V,
|
|
3358
3358
|
...H(Re.required, j)
|
|
3359
3359
|
}, !n))
|
|
3360
|
-
return
|
|
3360
|
+
return k(j), E;
|
|
3361
3361
|
}
|
|
3362
3362
|
if (!R && (!ue(d) || !ue(m))) {
|
|
3363
3363
|
let M, j;
|
|
@@ -3370,50 +3370,50 @@ var lt = (e) => re(e) && !lr(e) ? e : {
|
|
|
3370
3370
|
Le(z.value) && N && (M = Se ? Q(N) > Q(z.value) : fe ? N > z.value : X > new Date(z.value)), Le(J.value) && N && (j = Se ? Q(N) < Q(J.value) : fe ? N < J.value : X < new Date(J.value));
|
|
3371
3371
|
}
|
|
3372
3372
|
if ((M || j) && (P(!!M, z.message, J.message, Re.max, Re.min), !n))
|
|
3373
|
-
return
|
|
3373
|
+
return k(E[g].message), E;
|
|
3374
3374
|
}
|
|
3375
3375
|
if ((f || u) && !R && (Le(N) || s && Array.isArray(N))) {
|
|
3376
3376
|
const M = lt(f), j = lt(u), z = !ue(M.value) && N.length > +M.value, J = !ue(j.value) && N.length < +j.value;
|
|
3377
3377
|
if ((z || J) && (P(z, M.message, j.message), !n))
|
|
3378
|
-
return
|
|
3378
|
+
return k(E[g].message), E;
|
|
3379
3379
|
}
|
|
3380
3380
|
if (v && !R && Le(N)) {
|
|
3381
3381
|
const { value: M, message: j } = lt(v);
|
|
3382
|
-
if (lr(M) && !N.match(M) && (
|
|
3382
|
+
if (lr(M) && !N.match(M) && (E[g] = {
|
|
3383
3383
|
type: Re.pattern,
|
|
3384
3384
|
message: j,
|
|
3385
3385
|
ref: o,
|
|
3386
3386
|
...H(Re.pattern, j)
|
|
3387
3387
|
}, !n))
|
|
3388
|
-
return
|
|
3388
|
+
return k(j), E;
|
|
3389
3389
|
}
|
|
3390
3390
|
if (x) {
|
|
3391
3391
|
if (Ee(x)) {
|
|
3392
|
-
const M = await x(N, r), j = Ln(M,
|
|
3393
|
-
if (j && (
|
|
3392
|
+
const M = await x(N, r), j = Ln(M, V);
|
|
3393
|
+
if (j && (E[g] = {
|
|
3394
3394
|
...j,
|
|
3395
3395
|
...H(Re.validate, j.message)
|
|
3396
3396
|
}, !n))
|
|
3397
|
-
return
|
|
3397
|
+
return k(j.message), E;
|
|
3398
3398
|
} else if (re(x)) {
|
|
3399
3399
|
let M = {};
|
|
3400
3400
|
for (const j in x) {
|
|
3401
3401
|
if (!de(M) && !n)
|
|
3402
3402
|
break;
|
|
3403
|
-
const z = Ln(await x[j](N, r),
|
|
3403
|
+
const z = Ln(await x[j](N, r), V, j);
|
|
3404
3404
|
z && (M = {
|
|
3405
3405
|
...z,
|
|
3406
3406
|
...H(j, z.message)
|
|
3407
|
-
},
|
|
3407
|
+
}, k(z.message), n && (E[g] = M));
|
|
3408
3408
|
}
|
|
3409
|
-
if (!de(M) && (
|
|
3410
|
-
ref:
|
|
3409
|
+
if (!de(M) && (E[g] = {
|
|
3410
|
+
ref: V,
|
|
3411
3411
|
...M
|
|
3412
3412
|
}, !n))
|
|
3413
|
-
return
|
|
3413
|
+
return E;
|
|
3414
3414
|
}
|
|
3415
3415
|
}
|
|
3416
|
-
return
|
|
3416
|
+
return k(!0), E;
|
|
3417
3417
|
};
|
|
3418
3418
|
const Lo = {
|
|
3419
3419
|
mode: Oe.onSubmit,
|
|
@@ -3481,19 +3481,19 @@ function Vo(e = {}) {
|
|
|
3481
3481
|
validatingFields: r.validatingFields,
|
|
3482
3482
|
isValidating: !de(r.validatingFields)
|
|
3483
3483
|
}));
|
|
3484
|
-
},
|
|
3485
|
-
if (
|
|
3486
|
-
if (o.action = !0, C && Array.isArray(
|
|
3487
|
-
const B = y(
|
|
3488
|
-
|
|
3484
|
+
}, _ = (h, p = [], y, F, S = !0, C = !0) => {
|
|
3485
|
+
if (F && y && !t.disabled) {
|
|
3486
|
+
if (o.action = !0, C && Array.isArray(L(n, h))) {
|
|
3487
|
+
const B = y(L(n, h), F.argA, F.argB);
|
|
3488
|
+
S && Z(n, h, B);
|
|
3489
3489
|
}
|
|
3490
|
-
if (C && Array.isArray(
|
|
3491
|
-
const B = y(
|
|
3492
|
-
|
|
3490
|
+
if (C && Array.isArray(L(r.errors, h))) {
|
|
3491
|
+
const B = y(L(r.errors, h), F.argA, F.argB);
|
|
3492
|
+
S && Z(r.errors, h, B), So(r.errors, h);
|
|
3493
3493
|
}
|
|
3494
|
-
if ((u.touchedFields || d.touchedFields) && C && Array.isArray(
|
|
3495
|
-
const B = y(
|
|
3496
|
-
|
|
3494
|
+
if ((u.touchedFields || d.touchedFields) && C && Array.isArray(L(r.touchedFields, h))) {
|
|
3495
|
+
const B = y(L(r.touchedFields, h), F.argA, F.argB);
|
|
3496
|
+
S && Z(r.touchedFields, h, B);
|
|
3497
3497
|
}
|
|
3498
3498
|
(u.dirtyFields || d.dirtyFields) && (r.dirtyFields = Nt(i, s)), m.state.next({
|
|
3499
3499
|
name: h,
|
|
@@ -3508,40 +3508,40 @@ function Vo(e = {}) {
|
|
|
3508
3508
|
Z(r.errors, h, p), m.state.next({
|
|
3509
3509
|
errors: r.errors
|
|
3510
3510
|
});
|
|
3511
|
-
},
|
|
3511
|
+
}, V = (h) => {
|
|
3512
3512
|
r.errors = h, m.state.next({
|
|
3513
3513
|
errors: r.errors,
|
|
3514
3514
|
isValid: !1
|
|
3515
3515
|
});
|
|
3516
|
-
},
|
|
3517
|
-
const
|
|
3518
|
-
if (
|
|
3519
|
-
const C =
|
|
3520
|
-
te(C) ||
|
|
3516
|
+
}, k = (h, p, y, F) => {
|
|
3517
|
+
const S = L(n, h);
|
|
3518
|
+
if (S) {
|
|
3519
|
+
const C = L(s, h, te(y) ? L(i, h) : y);
|
|
3520
|
+
te(C) || F && F.defaultChecked || p ? Z(s, h, p ? C : kn(S._f)) : z(h, C), o.mount && g();
|
|
3521
3521
|
}
|
|
3522
|
-
},
|
|
3522
|
+
}, E = (h, p, y, F, S) => {
|
|
3523
3523
|
let C = !1, B = !1;
|
|
3524
3524
|
const U = {
|
|
3525
3525
|
name: h
|
|
3526
3526
|
};
|
|
3527
3527
|
if (!t.disabled) {
|
|
3528
|
-
if (!y ||
|
|
3528
|
+
if (!y || F) {
|
|
3529
3529
|
(u.isDirty || d.isDirty) && (B = r.isDirty, r.isDirty = U.isDirty = P(), C = B !== U.isDirty);
|
|
3530
|
-
const q = Be(
|
|
3531
|
-
B = !!
|
|
3530
|
+
const q = Be(L(i, h), p);
|
|
3531
|
+
B = !!L(r.dirtyFields, h), q ? ne(r.dirtyFields, h) : Z(r.dirtyFields, h, !0), U.dirtyFields = r.dirtyFields, C = C || (u.dirtyFields || d.dirtyFields) && B !== !q;
|
|
3532
3532
|
}
|
|
3533
3533
|
if (y) {
|
|
3534
|
-
const q =
|
|
3534
|
+
const q = L(r.touchedFields, h);
|
|
3535
3535
|
q || (Z(r.touchedFields, h, y), U.touchedFields = r.touchedFields, C = C || (u.touchedFields || d.touchedFields) && q !== y);
|
|
3536
3536
|
}
|
|
3537
|
-
C &&
|
|
3537
|
+
C && S && m.state.next(U);
|
|
3538
3538
|
}
|
|
3539
3539
|
return C ? U : {};
|
|
3540
|
-
},
|
|
3541
|
-
const
|
|
3542
|
-
if (t.delayError && y ? (l = x(() => N(h, y)), l(t.delayError)) : (clearTimeout(f), l = null, y ? Z(r.errors, h, y) : ne(r.errors, h)), (y ? !Be(
|
|
3540
|
+
}, A = (h, p, y, F) => {
|
|
3541
|
+
const S = L(r.errors, h), C = (u.isValid || d.isValid) && pe(p) && r.isValid !== p;
|
|
3542
|
+
if (t.delayError && y ? (l = x(() => N(h, y)), l(t.delayError)) : (clearTimeout(f), l = null, y ? Z(r.errors, h, y) : ne(r.errors, h)), (y ? !Be(S, y) : S) || !de(F) || C) {
|
|
3543
3543
|
const B = {
|
|
3544
|
-
...
|
|
3544
|
+
...F,
|
|
3545
3545
|
...C && pe(p) ? { isValid: p } : {},
|
|
3546
3546
|
errors: r.errors,
|
|
3547
3547
|
name: h
|
|
@@ -3559,8 +3559,8 @@ function Vo(e = {}) {
|
|
|
3559
3559
|
const { errors: p } = await D(h);
|
|
3560
3560
|
if (h)
|
|
3561
3561
|
for (const y of h) {
|
|
3562
|
-
const
|
|
3563
|
-
|
|
3562
|
+
const F = L(p, y);
|
|
3563
|
+
F ? Z(r.errors, y, F) : ne(r.errors, y);
|
|
3564
3564
|
}
|
|
3565
3565
|
else
|
|
3566
3566
|
r.errors = p;
|
|
@@ -3568,17 +3568,17 @@ function Vo(e = {}) {
|
|
|
3568
3568
|
}, R = async (h, p, y = {
|
|
3569
3569
|
valid: !0
|
|
3570
3570
|
}) => {
|
|
3571
|
-
for (const
|
|
3572
|
-
const
|
|
3573
|
-
if (
|
|
3574
|
-
const { _f: C, ...B } =
|
|
3571
|
+
for (const F in h) {
|
|
3572
|
+
const S = h[F];
|
|
3573
|
+
if (S) {
|
|
3574
|
+
const { _f: C, ...B } = S;
|
|
3575
3575
|
if (C) {
|
|
3576
|
-
const U = a.array.has(C.name), q =
|
|
3577
|
-
q && u.validatingFields && w([
|
|
3578
|
-
const ye = await Vn(
|
|
3579
|
-
if (q && u.validatingFields && w([
|
|
3576
|
+
const U = a.array.has(C.name), q = S._f && No(S._f);
|
|
3577
|
+
q && u.validatingFields && w([F], !0);
|
|
3578
|
+
const ye = await Vn(S, a.disabled, s, v, t.shouldUseNativeValidation && !p, U);
|
|
3579
|
+
if (q && u.validatingFields && w([F]), ye[C.name] && (y.valid = !1, p))
|
|
3580
3580
|
break;
|
|
3581
|
-
!p && (
|
|
3581
|
+
!p && (L(ye, C.name) ? U ? Ao(r.errors, ye, C.name) : Z(r.errors, C.name, ye[C.name]) : ne(r.errors, C.name));
|
|
3582
3582
|
}
|
|
3583
3583
|
!de(B) && await R(B, p, y);
|
|
3584
3584
|
}
|
|
@@ -3586,57 +3586,57 @@ function Vo(e = {}) {
|
|
|
3586
3586
|
return y.valid;
|
|
3587
3587
|
}, H = () => {
|
|
3588
3588
|
for (const h of a.unMount) {
|
|
3589
|
-
const p =
|
|
3589
|
+
const p = L(n, h);
|
|
3590
3590
|
p && (p._f.refs ? p._f.refs.every((y) => !Cr(y)) : !Cr(p._f.ref)) && He(h);
|
|
3591
3591
|
}
|
|
3592
3592
|
a.unMount = /* @__PURE__ */ new Set();
|
|
3593
3593
|
}, P = (h, p) => !t.disabled && (h && p && Z(s, h, p), !Be(Te(), i)), M = (h, p, y) => xi(h, a, {
|
|
3594
3594
|
...o.mount ? s : te(p) ? i : Le(h) ? { [h]: p } : p
|
|
3595
|
-
}, y, p), j = (h) => qr(
|
|
3596
|
-
const
|
|
3597
|
-
let
|
|
3598
|
-
if (
|
|
3599
|
-
const C =
|
|
3600
|
-
C && (!C.disabled && Z(s, h, Ai(p, C)),
|
|
3601
|
-
(!B.defaultChecked || !B.disabled) && (Array.isArray(
|
|
3602
|
-
}) : C.refs.forEach((B) => B.checked = B.value ===
|
|
3595
|
+
}, y, p), j = (h) => qr(L(o.mount ? s : i, h, t.shouldUnregister ? L(i, h, []) : [])), z = (h, p, y = {}) => {
|
|
3596
|
+
const F = L(n, h);
|
|
3597
|
+
let S = p;
|
|
3598
|
+
if (F) {
|
|
3599
|
+
const C = F._f;
|
|
3600
|
+
C && (!C.disabled && Z(s, h, Ai(p, C)), S = ar(C.ref) && ue(p) ? "" : p, ki(C.ref) ? [...C.ref.options].forEach((B) => B.selected = S.includes(B.value)) : C.refs ? It(C.ref) ? C.refs.forEach((B) => {
|
|
3601
|
+
(!B.defaultChecked || !B.disabled) && (Array.isArray(S) ? B.checked = !!S.find((U) => U === B.value) : B.checked = S === B.value || !!S);
|
|
3602
|
+
}) : C.refs.forEach((B) => B.checked = B.value === S) : Yr(C.ref) ? C.ref.value = "" : (C.ref.value = S, C.ref.type || m.state.next({
|
|
3603
3603
|
name: h,
|
|
3604
3604
|
values: se(s)
|
|
3605
3605
|
})));
|
|
3606
3606
|
}
|
|
3607
|
-
(y.shouldDirty || y.shouldTouch) &&
|
|
3607
|
+
(y.shouldDirty || y.shouldTouch) && E(h, S, y.shouldTouch, y.shouldDirty, !0), y.shouldValidate && fe(h);
|
|
3608
3608
|
}, J = (h, p, y) => {
|
|
3609
|
-
for (const
|
|
3610
|
-
if (!p.hasOwnProperty(
|
|
3609
|
+
for (const F in p) {
|
|
3610
|
+
if (!p.hasOwnProperty(F))
|
|
3611
3611
|
return;
|
|
3612
|
-
const
|
|
3613
|
-
(a.array.has(h) || re(
|
|
3612
|
+
const S = p[F], C = h + "." + F, B = L(n, C);
|
|
3613
|
+
(a.array.has(h) || re(S) || B && !B._f) && !Qe(S) ? J(C, S, y) : z(C, S, y);
|
|
3614
3614
|
}
|
|
3615
3615
|
}, X = (h, p, y = {}) => {
|
|
3616
|
-
const
|
|
3617
|
-
Z(s, h, C),
|
|
3616
|
+
const F = L(n, h), S = a.array.has(h), C = se(p);
|
|
3617
|
+
Z(s, h, C), S ? (m.array.next({
|
|
3618
3618
|
name: h,
|
|
3619
3619
|
values: se(s)
|
|
3620
3620
|
}), (u.isDirty || u.dirtyFields || d.isDirty || d.dirtyFields) && y.shouldDirty && m.state.next({
|
|
3621
3621
|
name: h,
|
|
3622
3622
|
dirtyFields: Nt(i, s),
|
|
3623
3623
|
isDirty: P(h, C)
|
|
3624
|
-
})) :
|
|
3624
|
+
})) : F && !F._f && !ue(C) ? J(h, C, y) : z(h, C, y), Sn(h, a) && m.state.next({ ...r, name: h }), m.state.next({
|
|
3625
3625
|
name: o.mount ? h : void 0,
|
|
3626
3626
|
values: se(s)
|
|
3627
3627
|
});
|
|
3628
3628
|
}, Q = async (h) => {
|
|
3629
3629
|
o.mount = !0;
|
|
3630
3630
|
const p = h.target;
|
|
3631
|
-
let y = p.name,
|
|
3632
|
-
const
|
|
3633
|
-
|
|
3631
|
+
let y = p.name, F = !0;
|
|
3632
|
+
const S = L(n, y), C = (q) => {
|
|
3633
|
+
F = Number.isNaN(q) || Qe(q) && isNaN(q.getTime()) || Be(q, L(s, y, q));
|
|
3634
3634
|
}, B = On(t.mode), U = On(t.reValidateMode);
|
|
3635
|
-
if (
|
|
3635
|
+
if (S) {
|
|
3636
3636
|
let q, ye;
|
|
3637
|
-
const Zt = p.type ? kn(
|
|
3638
|
-
Z(s, y, Zt), We ? (
|
|
3639
|
-
const xr =
|
|
3637
|
+
const Zt = p.type ? kn(S._f) : gi(h), We = h.type === sr.BLUR || h.type === sr.FOCUS_OUT, $i = !Co(S._f) && !t.resolver && !L(r.errors, y) && !S._f.deps || Eo(We, L(r.touchedFields, y), r.isSubmitted, U, B), wr = Sn(y, a, We);
|
|
3638
|
+
Z(s, y, Zt), We ? (S._f.onBlur && S._f.onBlur(h), l && l(0)) : S._f.onChange && S._f.onChange(h);
|
|
3639
|
+
const xr = E(y, Zt, We), Hi = !de(xr) || wr;
|
|
3640
3640
|
if (!We && m.state.next({
|
|
3641
3641
|
name: y,
|
|
3642
3642
|
type: h.type,
|
|
@@ -3645,58 +3645,58 @@ function Vo(e = {}) {
|
|
|
3645
3645
|
return (u.isValid || d.isValid) && (t.mode === "onBlur" ? We && g() : We || g()), Hi && m.state.next({ name: y, ...wr ? {} : xr });
|
|
3646
3646
|
if (!We && wr && m.state.next({ ...r }), t.resolver) {
|
|
3647
3647
|
const { errors: rn } = await D([y]);
|
|
3648
|
-
if (C(Zt),
|
|
3648
|
+
if (C(Zt), F) {
|
|
3649
3649
|
const Wi = An(r.errors, n, y), nn = An(rn, n, Wi.name || y);
|
|
3650
3650
|
q = nn.error, y = nn.name, ye = de(rn);
|
|
3651
3651
|
}
|
|
3652
3652
|
} else
|
|
3653
|
-
w([y], !0), q = (await Vn(
|
|
3654
|
-
|
|
3653
|
+
w([y], !0), q = (await Vn(S, a.disabled, s, v, t.shouldUseNativeValidation))[y], w([y]), C(Zt), F && (q ? ye = !1 : (u.isValid || d.isValid) && (ye = await R(n, !0)));
|
|
3654
|
+
F && (S._f.deps && fe(S._f.deps), A(y, ye, q, xr));
|
|
3655
3655
|
}
|
|
3656
3656
|
}, Se = (h, p) => {
|
|
3657
|
-
if (
|
|
3657
|
+
if (L(r.errors, p) && h.focus)
|
|
3658
3658
|
return h.focus(), 1;
|
|
3659
3659
|
}, fe = async (h, p = {}) => {
|
|
3660
|
-
let y,
|
|
3661
|
-
const
|
|
3660
|
+
let y, F;
|
|
3661
|
+
const S = Et(h);
|
|
3662
3662
|
if (t.resolver) {
|
|
3663
|
-
const C = await $(te(h) ? h :
|
|
3664
|
-
y = de(C),
|
|
3665
|
-
} else h ? (
|
|
3666
|
-
const B =
|
|
3663
|
+
const C = await $(te(h) ? h : S);
|
|
3664
|
+
y = de(C), F = h ? !S.some((B) => L(C, B)) : y;
|
|
3665
|
+
} else h ? (F = (await Promise.all(S.map(async (C) => {
|
|
3666
|
+
const B = L(n, C);
|
|
3667
3667
|
return await R(B && B._f ? { [C]: B } : B);
|
|
3668
|
-
}))).every(Boolean), !(!
|
|
3668
|
+
}))).every(Boolean), !(!F && !r.isValid) && g()) : F = y = await R(n);
|
|
3669
3669
|
return m.state.next({
|
|
3670
3670
|
...!Le(h) || (u.isValid || d.isValid) && y !== r.isValid ? {} : { name: h },
|
|
3671
3671
|
...t.resolver || !h ? { isValid: y } : {},
|
|
3672
3672
|
errors: r.errors
|
|
3673
|
-
}), p.shouldFocus && !
|
|
3673
|
+
}), p.shouldFocus && !F && St(n, Se, h ? S : a.mount), F;
|
|
3674
3674
|
}, Te = (h) => {
|
|
3675
3675
|
const p = {
|
|
3676
3676
|
...o.mount ? s : i
|
|
3677
3677
|
};
|
|
3678
|
-
return te(h) ? p : Le(h) ?
|
|
3678
|
+
return te(h) ? p : Le(h) ? L(p, h) : h.map((y) => L(p, y));
|
|
3679
3679
|
}, ot = (h, p) => ({
|
|
3680
|
-
invalid: !!
|
|
3681
|
-
isDirty: !!
|
|
3682
|
-
error:
|
|
3683
|
-
isValidating: !!
|
|
3684
|
-
isTouched: !!
|
|
3680
|
+
invalid: !!L((p || r).errors, h),
|
|
3681
|
+
isDirty: !!L((p || r).dirtyFields, h),
|
|
3682
|
+
error: L((p || r).errors, h),
|
|
3683
|
+
isValidating: !!L(r.validatingFields, h),
|
|
3684
|
+
isTouched: !!L((p || r).touchedFields, h)
|
|
3685
3685
|
}), Ze = (h) => {
|
|
3686
3686
|
h && Et(h).forEach((p) => ne(r.errors, p)), m.state.next({
|
|
3687
3687
|
errors: h ? r.errors : {}
|
|
3688
3688
|
});
|
|
3689
3689
|
}, Xe = (h, p, y) => {
|
|
3690
|
-
const
|
|
3690
|
+
const F = (L(n, h, { _f: {} })._f || {}).ref, S = L(r.errors, h) || {}, { ref: C, message: B, type: U, ...q } = S;
|
|
3691
3691
|
Z(r.errors, h, {
|
|
3692
3692
|
...q,
|
|
3693
3693
|
...p,
|
|
3694
|
-
ref:
|
|
3694
|
+
ref: F
|
|
3695
3695
|
}), m.state.next({
|
|
3696
3696
|
name: h,
|
|
3697
3697
|
errors: r.errors,
|
|
3698
3698
|
isValid: !1
|
|
3699
|
-
}), y && y.shouldFocus &&
|
|
3699
|
+
}), y && y.shouldFocus && F && F.focus && F.focus();
|
|
3700
3700
|
}, $e = (h, p) => Ee(h) ? m.state.subscribe({
|
|
3701
3701
|
next: (y) => "values" in y && h(M(void 0, p), y)
|
|
3702
3702
|
}) : M(h, p, !0), ke = (h) => m.state.subscribe({
|
|
@@ -3726,8 +3726,8 @@ function Vo(e = {}) {
|
|
|
3726
3726
|
}, Ae = ({ disabled: h, name: p }) => {
|
|
3727
3727
|
(pe(h) && o.mount || h || a.disabled.has(p)) && (h ? a.disabled.add(p) : a.disabled.delete(p));
|
|
3728
3728
|
}, Ye = (h, p = {}) => {
|
|
3729
|
-
let y =
|
|
3730
|
-
const
|
|
3729
|
+
let y = L(n, h);
|
|
3730
|
+
const F = pe(p.disabled) || pe(t.disabled);
|
|
3731
3731
|
return Z(n, h, {
|
|
3732
3732
|
...y || {},
|
|
3733
3733
|
_f: {
|
|
@@ -3739,8 +3739,8 @@ function Vo(e = {}) {
|
|
|
3739
3739
|
}), a.mount.add(h), y ? Ae({
|
|
3740
3740
|
disabled: pe(p.disabled) ? p.disabled : t.disabled,
|
|
3741
3741
|
name: h
|
|
3742
|
-
}) :
|
|
3743
|
-
...
|
|
3742
|
+
}) : k(h, !0, p.value), {
|
|
3743
|
+
...F ? { disabled: p.disabled || t.disabled } : {},
|
|
3744
3744
|
...t.progressive ? {
|
|
3745
3745
|
required: !!p.required,
|
|
3746
3746
|
min: Ct(p.min),
|
|
@@ -3752,10 +3752,10 @@ function Vo(e = {}) {
|
|
|
3752
3752
|
name: h,
|
|
3753
3753
|
onChange: Q,
|
|
3754
3754
|
onBlur: Q,
|
|
3755
|
-
ref: (
|
|
3756
|
-
if (
|
|
3757
|
-
Ye(h, p), y =
|
|
3758
|
-
const C = te(
|
|
3755
|
+
ref: (S) => {
|
|
3756
|
+
if (S) {
|
|
3757
|
+
Ye(h, p), y = L(n, h);
|
|
3758
|
+
const C = te(S.value) && S.querySelectorAll && S.querySelectorAll("input,select,textarea")[0] || S, B = yo(C), U = y._f.refs || [];
|
|
3759
3759
|
if (B ? U.find((q) => q === C) : C === y._f.ref)
|
|
3760
3760
|
return;
|
|
3761
3761
|
Z(n, h, {
|
|
@@ -3765,60 +3765,60 @@ function Vo(e = {}) {
|
|
|
3765
3765
|
refs: [
|
|
3766
3766
|
...U.filter(Cr),
|
|
3767
3767
|
C,
|
|
3768
|
-
...Array.isArray(
|
|
3768
|
+
...Array.isArray(L(i, h)) ? [{}] : []
|
|
3769
3769
|
],
|
|
3770
3770
|
ref: { type: C.type, name: h }
|
|
3771
3771
|
} : { ref: C }
|
|
3772
3772
|
}
|
|
3773
|
-
}),
|
|
3773
|
+
}), k(h, !1, void 0, C);
|
|
3774
3774
|
} else
|
|
3775
|
-
y =
|
|
3775
|
+
y = L(n, h, {}), y._f && (y._f.mount = !1), (t.shouldUnregister || p.shouldUnregister) && !(yi(a.array, h) && o.action) && a.unMount.add(h);
|
|
3776
3776
|
}
|
|
3777
3777
|
};
|
|
3778
3778
|
}, bt = () => t.shouldFocusError && St(n, Se, a.mount), wt = (h) => {
|
|
3779
3779
|
pe(h) && (m.state.next({ disabled: h }), St(n, (p, y) => {
|
|
3780
|
-
const
|
|
3781
|
-
|
|
3782
|
-
|
|
3780
|
+
const F = L(n, y);
|
|
3781
|
+
F && (p.disabled = F._f.disabled || h, Array.isArray(F._f.refs) && F._f.refs.forEach((S) => {
|
|
3782
|
+
S.disabled = F._f.disabled || h;
|
|
3783
3783
|
}));
|
|
3784
3784
|
}, 0, !1));
|
|
3785
3785
|
}, jt = (h, p) => async (y) => {
|
|
3786
|
-
let
|
|
3786
|
+
let F;
|
|
3787
3787
|
y && (y.preventDefault && y.preventDefault(), y.persist && y.persist());
|
|
3788
|
-
let
|
|
3788
|
+
let S = se(s);
|
|
3789
3789
|
if (m.state.next({
|
|
3790
3790
|
isSubmitting: !0
|
|
3791
3791
|
}), t.resolver) {
|
|
3792
3792
|
const { errors: C, values: B } = await D();
|
|
3793
|
-
r.errors = C,
|
|
3793
|
+
r.errors = C, S = se(B);
|
|
3794
3794
|
} else
|
|
3795
3795
|
await R(n);
|
|
3796
3796
|
if (a.disabled.size)
|
|
3797
3797
|
for (const C of a.disabled)
|
|
3798
|
-
ne(
|
|
3798
|
+
ne(S, C);
|
|
3799
3799
|
if (ne(r.errors, "root"), de(r.errors)) {
|
|
3800
3800
|
m.state.next({
|
|
3801
3801
|
errors: {}
|
|
3802
3802
|
});
|
|
3803
3803
|
try {
|
|
3804
|
-
await h(
|
|
3804
|
+
await h(S, y);
|
|
3805
3805
|
} catch (C) {
|
|
3806
|
-
|
|
3806
|
+
F = C;
|
|
3807
3807
|
}
|
|
3808
3808
|
} else
|
|
3809
3809
|
p && await p({ ...r.errors }, y), bt(), setTimeout(bt);
|
|
3810
3810
|
if (m.state.next({
|
|
3811
3811
|
isSubmitted: !0,
|
|
3812
3812
|
isSubmitting: !1,
|
|
3813
|
-
isSubmitSuccessful: de(r.errors) && !
|
|
3813
|
+
isSubmitSuccessful: de(r.errors) && !F,
|
|
3814
3814
|
submitCount: r.submitCount + 1,
|
|
3815
3815
|
errors: r.errors
|
|
3816
|
-
}),
|
|
3817
|
-
throw
|
|
3816
|
+
}), F)
|
|
3817
|
+
throw F;
|
|
3818
3818
|
}, $t = (h, p = {}) => {
|
|
3819
|
-
|
|
3819
|
+
L(n, h) && (te(p.defaultValue) ? X(h, se(L(i, h))) : (X(h, p.defaultValue), Z(i, h, se(p.defaultValue))), p.keepTouched || ne(r.touchedFields, h), p.keepDirty || (ne(r.dirtyFields, h), r.isDirty = p.defaultValue ? P(h, se(L(i, h))) : P()), p.keepError || (ne(r.errors, h), u.isValid && g()), m.state.next({ ...r }));
|
|
3820
3820
|
}, Ht = (h, p = {}) => {
|
|
3821
|
-
const y = h ? se(h) : i,
|
|
3821
|
+
const y = h ? se(h) : i, F = se(y), S = de(h), C = S ? i : F;
|
|
3822
3822
|
if (p.keepDefaultValues || (i = y), !p.keepValues) {
|
|
3823
3823
|
if (p.keepDirtyValues) {
|
|
3824
3824
|
const B = /* @__PURE__ */ new Set([
|
|
@@ -3826,11 +3826,11 @@ function Vo(e = {}) {
|
|
|
3826
3826
|
...Object.keys(Nt(i, s))
|
|
3827
3827
|
]);
|
|
3828
3828
|
for (const U of Array.from(B))
|
|
3829
|
-
|
|
3829
|
+
L(r.dirtyFields, U) ? Z(C, U, L(s, U)) : X(U, L(C, U));
|
|
3830
3830
|
} else {
|
|
3831
3831
|
if (zr && te(h))
|
|
3832
3832
|
for (const B of a.mount) {
|
|
3833
|
-
const U =
|
|
3833
|
+
const U = L(n, B);
|
|
3834
3834
|
if (U && U._f) {
|
|
3835
3835
|
const q = Array.isArray(U._f.refs) ? U._f.refs[0] : U._f.ref;
|
|
3836
3836
|
if (ar(q)) {
|
|
@@ -3844,7 +3844,7 @@ function Vo(e = {}) {
|
|
|
3844
3844
|
}
|
|
3845
3845
|
if (p.keepFieldsRef)
|
|
3846
3846
|
for (const B of a.mount)
|
|
3847
|
-
X(B,
|
|
3847
|
+
X(B, L(C, B));
|
|
3848
3848
|
else
|
|
3849
3849
|
n = {};
|
|
3850
3850
|
}
|
|
@@ -3864,19 +3864,19 @@ function Vo(e = {}) {
|
|
|
3864
3864
|
focus: ""
|
|
3865
3865
|
}, o.mount = !u.isValid || !!p.keepIsValid || !!p.keepDirtyValues, o.watch = !!t.shouldUnregister, m.state.next({
|
|
3866
3866
|
submitCount: p.keepSubmitCount ? r.submitCount : 0,
|
|
3867
|
-
isDirty:
|
|
3867
|
+
isDirty: S ? !1 : p.keepDirty ? r.isDirty : !!(p.keepDefaultValues && !Be(h, i)),
|
|
3868
3868
|
isSubmitted: p.keepIsSubmitted ? r.isSubmitted : !1,
|
|
3869
|
-
dirtyFields:
|
|
3869
|
+
dirtyFields: S ? {} : p.keepDirtyValues ? p.keepDefaultValues && s ? Nt(i, s) : r.dirtyFields : p.keepDefaultValues && h ? Nt(i, h) : p.keepDirty ? r.dirtyFields : {},
|
|
3870
3870
|
touchedFields: p.keepTouched ? r.touchedFields : {},
|
|
3871
3871
|
errors: p.keepErrors ? r.errors : {},
|
|
3872
3872
|
isSubmitSuccessful: p.keepIsSubmitSuccessful ? r.isSubmitSuccessful : !1,
|
|
3873
3873
|
isSubmitting: !1
|
|
3874
3874
|
});
|
|
3875
3875
|
}, Wt = (h, p) => Ht(Ee(h) ? h(s) : h, p), Ut = (h, p = {}) => {
|
|
3876
|
-
const y =
|
|
3877
|
-
if (
|
|
3878
|
-
const
|
|
3879
|
-
|
|
3876
|
+
const y = L(n, h), F = y && y._f;
|
|
3877
|
+
if (F) {
|
|
3878
|
+
const S = F.refs ? F.refs[0] : F.ref;
|
|
3879
|
+
S.focus && (S.focus(), p.shouldSelect && Ee(S.select) && S.select());
|
|
3880
3880
|
}
|
|
3881
3881
|
}, zt = (h) => {
|
|
3882
3882
|
r = {
|
|
@@ -3896,9 +3896,9 @@ function Vo(e = {}) {
|
|
|
3896
3896
|
_getWatch: M,
|
|
3897
3897
|
_getDirty: P,
|
|
3898
3898
|
_setValid: g,
|
|
3899
|
-
_setFieldArray:
|
|
3899
|
+
_setFieldArray: _,
|
|
3900
3900
|
_setDisabledField: Ae,
|
|
3901
|
-
_setErrors:
|
|
3901
|
+
_setErrors: V,
|
|
3902
3902
|
_getFieldArray: j,
|
|
3903
3903
|
_reset: Ht,
|
|
3904
3904
|
_resetDefaultValues: () => Ee(t.defaultValues) && t.defaultValues().then((h) => {
|
|
@@ -4032,7 +4032,7 @@ function Fo(e = {}) {
|
|
|
4032
4032
|
}
|
|
4033
4033
|
const Fn = (e, t, r) => {
|
|
4034
4034
|
if (e && "reportValidity" in e) {
|
|
4035
|
-
const n =
|
|
4035
|
+
const n = L(r, t);
|
|
4036
4036
|
e.setCustomValidity(n && n.message || ""), e.reportValidity();
|
|
4037
4037
|
}
|
|
4038
4038
|
}, Vi = (e, t) => {
|
|
@@ -4044,9 +4044,9 @@ const Fn = (e, t, r) => {
|
|
|
4044
4044
|
t.shouldUseNativeValidation && Vi(e, t);
|
|
4045
4045
|
const r = {};
|
|
4046
4046
|
for (const n in e) {
|
|
4047
|
-
const i =
|
|
4047
|
+
const i = L(t.fields, n), s = Object.assign(e[n] || {}, { ref: i && i.ref });
|
|
4048
4048
|
if (_o(t.names || Object.keys(e), n)) {
|
|
4049
|
-
const o = Object.assign({},
|
|
4049
|
+
const o = Object.assign({}, L(r, n));
|
|
4050
4050
|
Z(o, "root", s), Z(r, n, o);
|
|
4051
4051
|
} else Z(r, n, s);
|
|
4052
4052
|
}
|
|
@@ -4105,7 +4105,7 @@ function Tl({
|
|
|
4105
4105
|
}, [f, u.watch]), /* @__PURE__ */ c(vo, { ...u, children: /* @__PURE__ */ c(
|
|
4106
4106
|
"form",
|
|
4107
4107
|
{
|
|
4108
|
-
className:
|
|
4108
|
+
className: O("bbn-form", e),
|
|
4109
4109
|
name: t,
|
|
4110
4110
|
onSubmit: u.handleSubmit(l),
|
|
4111
4111
|
...a,
|
|
@@ -4156,19 +4156,19 @@ function Bl({
|
|
|
4156
4156
|
}) {
|
|
4157
4157
|
const {
|
|
4158
4158
|
ref: w,
|
|
4159
|
-
value:
|
|
4159
|
+
value: _ = "",
|
|
4160
4160
|
error: N,
|
|
4161
|
-
invalid:
|
|
4162
|
-
onChange:
|
|
4163
|
-
onBlur:
|
|
4164
|
-
} = vt({ name: e, defaultValue: l, autoFocus: a, shouldUnregister: v, validateOnMount: g }),
|
|
4165
|
-
return /* @__PURE__ */ c(mr, { label: r, className: s, state:
|
|
4161
|
+
invalid: V,
|
|
4162
|
+
onChange: k,
|
|
4163
|
+
onBlur: E
|
|
4164
|
+
} = vt({ name: e, defaultValue: l, autoFocus: a, shouldUnregister: v, validateOnMount: g }), A = V ? "error" : x;
|
|
4165
|
+
return /* @__PURE__ */ c(mr, { label: r, className: s, state: A, hint: V ? N : n, children: /* @__PURE__ */ c(
|
|
4166
4166
|
hr,
|
|
4167
4167
|
{
|
|
4168
4168
|
inputMode: "decimal",
|
|
4169
4169
|
pattern: "^-?\\d*\\.?\\d*$",
|
|
4170
4170
|
ref: w,
|
|
4171
|
-
value:
|
|
4171
|
+
value: _,
|
|
4172
4172
|
id: t,
|
|
4173
4173
|
name: e,
|
|
4174
4174
|
type: u,
|
|
@@ -4178,11 +4178,11 @@ function Bl({
|
|
|
4178
4178
|
placeholder: f,
|
|
4179
4179
|
suffix: d,
|
|
4180
4180
|
prefix: m,
|
|
4181
|
-
state:
|
|
4181
|
+
state: A,
|
|
4182
4182
|
onChange: (R) => {
|
|
4183
|
-
To.test(R.target.value) &&
|
|
4183
|
+
To.test(R.target.value) && k(R.target.value);
|
|
4184
4184
|
},
|
|
4185
|
-
onBlur:
|
|
4185
|
+
onBlur: E
|
|
4186
4186
|
}
|
|
4187
4187
|
) });
|
|
4188
4188
|
}
|
|
@@ -4206,17 +4206,17 @@ function Pl({
|
|
|
4206
4206
|
}) {
|
|
4207
4207
|
const {
|
|
4208
4208
|
ref: w,
|
|
4209
|
-
value:
|
|
4209
|
+
value: _ = "",
|
|
4210
4210
|
error: N,
|
|
4211
|
-
invalid:
|
|
4212
|
-
onChange:
|
|
4213
|
-
onBlur:
|
|
4214
|
-
} = vt({ name: e, defaultValue: l, autoFocus: a, shouldUnregister: v, validateOnMount: g }),
|
|
4215
|
-
return /* @__PURE__ */ c(mr, { label: r, className: s, state:
|
|
4211
|
+
invalid: V,
|
|
4212
|
+
onChange: k,
|
|
4213
|
+
onBlur: E
|
|
4214
|
+
} = vt({ name: e, defaultValue: l, autoFocus: a, shouldUnregister: v, validateOnMount: g }), A = V ? "error" : x;
|
|
4215
|
+
return /* @__PURE__ */ c(mr, { label: r, className: s, state: A, hint: V ? N : n, children: /* @__PURE__ */ c(
|
|
4216
4216
|
hr,
|
|
4217
4217
|
{
|
|
4218
4218
|
ref: w,
|
|
4219
|
-
value:
|
|
4219
|
+
value: _,
|
|
4220
4220
|
id: t,
|
|
4221
4221
|
name: e,
|
|
4222
4222
|
type: u,
|
|
@@ -4226,9 +4226,9 @@ function Pl({
|
|
|
4226
4226
|
placeholder: f,
|
|
4227
4227
|
suffix: d,
|
|
4228
4228
|
prefix: m,
|
|
4229
|
-
state:
|
|
4230
|
-
onChange:
|
|
4231
|
-
onBlur:
|
|
4229
|
+
state: A,
|
|
4230
|
+
onChange: k,
|
|
4231
|
+
onBlur: E
|
|
4232
4232
|
}
|
|
4233
4233
|
) });
|
|
4234
4234
|
}
|
|
@@ -4314,27 +4314,27 @@ function $l({
|
|
|
4314
4314
|
placeholder: x,
|
|
4315
4315
|
shouldUnregister: g,
|
|
4316
4316
|
state: w,
|
|
4317
|
-
validateOnMount:
|
|
4317
|
+
validateOnMount: _,
|
|
4318
4318
|
onOpen: N,
|
|
4319
|
-
onClose:
|
|
4320
|
-
renderSelectedOption:
|
|
4319
|
+
onClose: V,
|
|
4320
|
+
renderSelectedOption: k
|
|
4321
4321
|
}) {
|
|
4322
4322
|
const {
|
|
4323
|
-
ref:
|
|
4324
|
-
value:
|
|
4323
|
+
ref: E,
|
|
4324
|
+
value: A = "",
|
|
4325
4325
|
error: D,
|
|
4326
4326
|
invalid: $,
|
|
4327
4327
|
onChange: R,
|
|
4328
4328
|
onBlur: H
|
|
4329
|
-
} = vt({ name: s, defaultValue: v, autoFocus: m, shouldUnregister: g, validateOnMount:
|
|
4329
|
+
} = vt({ name: s, defaultValue: v, autoFocus: m, shouldUnregister: g, validateOnMount: _ }), P = $ ? "error" : w;
|
|
4330
4330
|
return /* @__PURE__ */ c(mr, { label: a, className: u, state: P, hint: $ ? D : l, children: /* @__PURE__ */ c(
|
|
4331
4331
|
ei,
|
|
4332
4332
|
{
|
|
4333
4333
|
open: e,
|
|
4334
4334
|
defaultOpen: t,
|
|
4335
4335
|
options: r,
|
|
4336
|
-
ref:
|
|
4337
|
-
value:
|
|
4336
|
+
ref: E,
|
|
4337
|
+
value: A,
|
|
4338
4338
|
id: o,
|
|
4339
4339
|
name: s,
|
|
4340
4340
|
className: f,
|
|
@@ -4347,9 +4347,9 @@ function $l({
|
|
|
4347
4347
|
onBlur: H,
|
|
4348
4348
|
onOpen: N,
|
|
4349
4349
|
onClose: () => {
|
|
4350
|
-
H == null || H(),
|
|
4350
|
+
H == null || H(), V == null || V();
|
|
4351
4351
|
},
|
|
4352
|
-
renderSelectedOption:
|
|
4352
|
+
renderSelectedOption: k
|
|
4353
4353
|
}
|
|
4354
4354
|
) });
|
|
4355
4355
|
}
|
|
@@ -4793,20 +4793,20 @@ var Pe = /* @__PURE__ */ function() {
|
|
|
4793
4793
|
for (; !n[0] && n.length > 1; ) n.shift();
|
|
4794
4794
|
}
|
|
4795
4795
|
return function(n, i, s, o) {
|
|
4796
|
-
var a, l, f, u, d, m, v, x, g, w,
|
|
4796
|
+
var a, l, f, u, d, m, v, x, g, w, _, N, V, k, E, A, D, $, R = n.constructor, H = n.s == i.s ? 1 : -1, P = n.d, M = i.d;
|
|
4797
4797
|
if (!n.s) return new R(n);
|
|
4798
4798
|
if (!i.s) throw Error(Ce + "Division by zero");
|
|
4799
|
-
for (l = n.e - i.e, D = M.length,
|
|
4799
|
+
for (l = n.e - i.e, D = M.length, E = P.length, v = new R(H), x = v.d = [], f = 0; M[f] == (P[f] || 0); ) ++f;
|
|
4800
4800
|
if (M[f] > (P[f] || 0) && --l, s == null ? N = s = R.precision : o ? N = s + (ie(n) - ie(i)) + 1 : N = s, N < 0) return new R(0);
|
|
4801
4801
|
if (N = N / Y + 2 | 0, f = 0, D == 1)
|
|
4802
|
-
for (u = 0, M = M[0], N++; (f <
|
|
4803
|
-
|
|
4802
|
+
for (u = 0, M = M[0], N++; (f < E || u) && N--; f++)
|
|
4803
|
+
V = u * ae + (P[f] || 0), x[f] = V / M | 0, u = V % M | 0;
|
|
4804
4804
|
else {
|
|
4805
|
-
for (u = ae / (M[0] + 1) | 0, u > 1 && (M = e(M, u), P = e(P, u), D = M.length,
|
|
4806
|
-
$ = M.slice(), $.unshift(0),
|
|
4805
|
+
for (u = ae / (M[0] + 1) | 0, u > 1 && (M = e(M, u), P = e(P, u), D = M.length, E = P.length), k = D, g = P.slice(0, D), w = g.length; w < D; ) g[w++] = 0;
|
|
4806
|
+
$ = M.slice(), $.unshift(0), A = M[0], M[1] >= ae / 2 && ++A;
|
|
4807
4807
|
do
|
|
4808
|
-
u = 0, a = t(M, g, D, w), a < 0 ? (
|
|
4809
|
-
while ((
|
|
4808
|
+
u = 0, a = t(M, g, D, w), a < 0 ? (_ = g[0], D != w && (_ = _ * ae + (g[1] || 0)), u = _ / A | 0, u > 1 ? (u >= ae && (u = ae - 1), d = e(M, u), m = d.length, w = g.length, a = t(d, g, m, w), a == 1 && (u--, r(d, D < m ? $ : M, m))) : (u == 0 && (a = u = 1), d = M.slice()), m = d.length, m < w && d.unshift(0), r(g, d, w), a == -1 && (w = g.length, a = t(M, g, D, w), a < 1 && (u++, r(g, D < w ? $ : M, w))), w = g.length) : a === 0 && (u++, g = [0]), x[f++] = u, a && g[0] ? g[w++] = P[k] || 0 : (g = [P[k]], w = 1);
|
|
4809
|
+
while ((k++ < E || g[0] !== void 0) && N--);
|
|
4810
4810
|
}
|
|
4811
4811
|
return x[0] || x.shift(), v.e = l, G(v, o ? s + ie(v) + 1 : s);
|
|
4812
4812
|
};
|
|
@@ -5028,26 +5028,32 @@ const Zo = (e, t, r) => new en(e).toDecimalPlaces(t, r).toNumber(), Ul = ({
|
|
|
5028
5028
|
prefix: o,
|
|
5029
5029
|
min: a = "0",
|
|
5030
5030
|
step: l = "any",
|
|
5031
|
-
autoFocus: f = !0
|
|
5031
|
+
autoFocus: f = !0,
|
|
5032
|
+
decimals: u
|
|
5032
5033
|
}) => {
|
|
5033
|
-
const
|
|
5034
|
+
const d = Ni({ name: e, defaultValue: "" }), { setValue: m } = pt(), v = parseFloat(d || "0"), x = Pi(v, (s == null ? void 0 : s.price) ?? 0, {
|
|
5034
5035
|
zeroDisplay: "$0.00"
|
|
5035
|
-
}),
|
|
5036
|
-
|
|
5036
|
+
}), g = (N) => {
|
|
5037
|
+
let V = N.target.value;
|
|
5038
|
+
if (u !== void 0 && u >= 0) {
|
|
5039
|
+
const [k, E] = V.split(".", 2);
|
|
5040
|
+
E !== void 0 && E.length > u ? V = k + "." + E.slice(0, u) : E !== void 0 ? V = k + "." + E : V.includes(".") && (V = k);
|
|
5041
|
+
}
|
|
5042
|
+
m(e, V, {
|
|
5037
5043
|
shouldValidate: !0,
|
|
5038
5044
|
shouldDirty: !0,
|
|
5039
5045
|
shouldTouch: !0
|
|
5040
5046
|
});
|
|
5041
|
-
},
|
|
5042
|
-
(
|
|
5047
|
+
}, w = (N) => {
|
|
5048
|
+
(N.key === "ArrowUp" || N.key === "ArrowDown") && N.preventDefault();
|
|
5043
5049
|
};
|
|
5044
|
-
let
|
|
5045
|
-
return s && (
|
|
5050
|
+
let _;
|
|
5051
|
+
return s && (_ = `${Zo(Number(s.balance), s.decimals ?? Jr)} ${s.symbol}`, o && (_ = `${o}: ${_}`)), /* @__PURE__ */ b(ze, { children: [
|
|
5046
5052
|
/* @__PURE__ */ c(Ro, { name: e, defaultValue: "" }),
|
|
5047
5053
|
/* @__PURE__ */ c(Bt, { className: "flex w-full flex-col content-center justify-between gap-4", children: /* @__PURE__ */ c(
|
|
5048
5054
|
Ur,
|
|
5049
5055
|
{
|
|
5050
|
-
amount:
|
|
5056
|
+
amount: d,
|
|
5051
5057
|
currencyIcon: t,
|
|
5052
5058
|
currencyName: r,
|
|
5053
5059
|
placeholder: i,
|
|
@@ -5056,10 +5062,10 @@ const Zo = (e, t, r) => new en(e).toDecimalPlaces(t, r).toNumber(), Ul = ({
|
|
|
5056
5062
|
min: a,
|
|
5057
5063
|
step: l,
|
|
5058
5064
|
autoFocus: f,
|
|
5059
|
-
onChange:
|
|
5060
|
-
onKeyDown:
|
|
5061
|
-
amountUsd:
|
|
5062
|
-
subtitle:
|
|
5065
|
+
onChange: g,
|
|
5066
|
+
onKeyDown: w,
|
|
5067
|
+
amountUsd: x,
|
|
5068
|
+
subtitle: _
|
|
5063
5069
|
}
|
|
5064
5070
|
) })
|
|
5065
5071
|
] });
|
|
@@ -5563,12 +5569,12 @@ const Gl = ({
|
|
|
5563
5569
|
d: "M24.9127 15.3708C24.9711 14.9333 25.0002 14.4812 25.0002 14C25.0002 13.5333 24.9711 13.0667 24.8982 12.6292L27.8586 10.325C28.1211 10.1208 28.194 9.72708 28.0336 9.43542L25.2336 4.59375C25.0586 4.27292 24.694 4.17083 24.3732 4.27292L20.8877 5.67292C20.1586 5.11875 19.3857 4.65208 18.5252 4.30208L18.0002 0.597916C17.9419 0.247916 17.6502 0 17.3002 0H11.7002C11.3502 0 11.0732 0.247916 11.0148 0.597916L10.4898 4.30208C9.62941 4.65208 8.84191 5.13333 8.12732 5.67292L4.64191 4.27292C4.32107 4.15625 3.95649 4.27292 3.78149 4.59375L0.996075 9.43542C0.821075 9.74167 0.879408 10.1208 1.17107 10.325L4.13149 12.6292C4.05857 13.0667 4.00024 13.5479 4.00024 14C4.00024 14.4521 4.02941 14.9333 4.10232 15.3708L1.14191 17.675C0.879408 17.8792 0.806491 18.2729 0.966908 18.5646L3.76691 23.4062C3.94191 23.7271 4.30649 23.8292 4.62732 23.7271L8.11274 22.3271C8.84191 22.8812 9.61482 23.3479 10.4752 23.6979L11.0002 27.4021C11.0732 27.7521 11.3502 28 11.7002 28H17.3002C17.6502 28 17.9419 27.7521 17.9857 27.4021L18.5107 23.6979C19.3711 23.3479 20.1586 22.8812 20.8732 22.3271L24.3586 23.7271C24.6794 23.8438 25.044 23.7271 25.219 23.4062L28.019 18.5646C28.194 18.2437 28.1211 17.8792 27.844 17.675L24.9127 15.3708ZM14.5002 19.25C11.6127 19.25 9.25024 16.8875 9.25024 14C9.25024 11.1125 11.6127 8.75 14.5002 8.75C17.3877 8.75 19.7502 11.1125 19.7502 14C19.7502 16.8875 17.3877 19.25 14.5002 19.25Z",
|
|
5564
5570
|
fill: "#9E9E9E"
|
|
5565
5571
|
}
|
|
5566
|
-
) }), Ii = () => /* @__PURE__ */ c("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M9 18L15 12L9 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }), cl = ({ children: e, className: t = "" }) => /* @__PURE__ */ c(W, { variant: "body1", className:
|
|
5572
|
+
) }), Ii = () => /* @__PURE__ */ c("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M9 18L15 12L9 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }), cl = ({ children: e, className: t = "" }) => /* @__PURE__ */ c(W, { variant: "body1", className: O("px-7 pb-6 text-accent-primary md:hidden", t), children: e }), ul = ({
|
|
5567
5573
|
background: e = "none",
|
|
5568
5574
|
backgroundClassName: t = "",
|
|
5569
5575
|
className: r = "",
|
|
5570
5576
|
children: n
|
|
5571
|
-
}) => /* @__PURE__ */ c("div", { className:
|
|
5577
|
+
}) => /* @__PURE__ */ c("div", { className: O((() => {
|
|
5572
5578
|
switch (e) {
|
|
5573
5579
|
case "secondary":
|
|
5574
5580
|
return "mx-[21px] rounded-lg bg-secondary-highlight md:mx-0 md:bg-transparent";
|
|
@@ -5663,7 +5669,7 @@ const Mn = ({
|
|
|
5663
5669
|
isCopied: i,
|
|
5664
5670
|
onCopy: s,
|
|
5665
5671
|
className: o
|
|
5666
|
-
}) => /* @__PURE__ */ c("div", { className:
|
|
5672
|
+
}) => /* @__PURE__ */ c("div", { className: O(
|
|
5667
5673
|
"bg-secondary-highlight dark:bg-secondary-strokeLight rounded-[4px] p-3 flex-1 md:p-4",
|
|
5668
5674
|
o
|
|
5669
5675
|
), children: /* @__PURE__ */ b("div", { className: "flex flex-col w-full", children: [
|
|
@@ -5718,7 +5724,7 @@ const Mn = ({
|
|
|
5718
5724
|
n || t(!e);
|
|
5719
5725
|
},
|
|
5720
5726
|
disabled: n,
|
|
5721
|
-
className:
|
|
5727
|
+
className: O(
|
|
5722
5728
|
"relative inline-flex h-[31px] w-[55px] items-center rounded-full transition-colors duration-300 ease-in-out",
|
|
5723
5729
|
"focus:outline-none focus:ring-2 focus:ring-primary-main focus:ring-offset-2",
|
|
5724
5730
|
e ? "bg-primary-main dark:bg-primary-light" : "bg-[#78788029]",
|
|
@@ -5733,7 +5739,7 @@ const Mn = ({
|
|
|
5733
5739
|
children: /* @__PURE__ */ c(
|
|
5734
5740
|
"span",
|
|
5735
5741
|
{
|
|
5736
|
-
className:
|
|
5742
|
+
className: O(
|
|
5737
5743
|
"inline-block w-[27px] h-[27px] transform rounded-full bg-white transition-transform duration-300 ease-in-out",
|
|
5738
5744
|
"flex items-center justify-center shadow-sm",
|
|
5739
5745
|
e ? "translate-x-[26px]" : "translate-x-[2px]"
|
|
@@ -5748,7 +5754,7 @@ const Mn = ({
|
|
|
5748
5754
|
value: n,
|
|
5749
5755
|
onChange: i,
|
|
5750
5756
|
className: s
|
|
5751
|
-
}) => /* @__PURE__ */ b("div", { className:
|
|
5757
|
+
}) => /* @__PURE__ */ b("div", { className: O(
|
|
5752
5758
|
"flex items-center justify-between w-full bg-secondary-highlight dark:bg-secondary-strokeLight rounded-[4px] p-3 md:bg-transparent md:dark:bg-transparent md:p-0 md:mb-0",
|
|
5753
5759
|
s
|
|
5754
5760
|
), children: [
|
|
@@ -5780,7 +5786,7 @@ const Mn = ({
|
|
|
5780
5786
|
onCopy: n,
|
|
5781
5787
|
className: i,
|
|
5782
5788
|
icon: s
|
|
5783
|
-
}) => /* @__PURE__ */ c("div", { className:
|
|
5789
|
+
}) => /* @__PURE__ */ c("div", { className: O(
|
|
5784
5790
|
"flex items-center justify-between w-full bg-secondary-highlight dark:bg-secondary-strokeLight rounded-[4px] p-3 md:bg-transparent md:dark:bg-transparent md:p-0 md:mb-0",
|
|
5785
5791
|
i
|
|
5786
5792
|
), children: /* @__PURE__ */ c("div", { className: "flex flex-col w-full", children: /* @__PURE__ */ b("div", { className: "flex items-center gap-4 mb-3", children: [
|
|
@@ -5828,8 +5834,8 @@ const Mn = ({
|
|
|
5828
5834
|
forceOpen: d = !1,
|
|
5829
5835
|
onOpenChange: m
|
|
5830
5836
|
}) => {
|
|
5831
|
-
var
|
|
5832
|
-
const { copyToClipboard: v, isCopied: x } = mi(), [g, w] = ee(d),
|
|
5837
|
+
var V, k, E, A;
|
|
5838
|
+
const { copyToClipboard: v, isCopied: x } = mi(), [g, w] = ee(d), _ = oe((D) => {
|
|
5833
5839
|
w(D), m == null || m(D);
|
|
5834
5840
|
}, [m]), N = oe(() => {
|
|
5835
5841
|
w(!1), u();
|
|
@@ -5839,7 +5845,7 @@ const Mn = ({
|
|
|
5839
5845
|
{
|
|
5840
5846
|
trigger: e,
|
|
5841
5847
|
open: g,
|
|
5842
|
-
onOpenChange:
|
|
5848
|
+
onOpenChange: _,
|
|
5843
5849
|
mobileMode: "dialog",
|
|
5844
5850
|
className: "shadow-lg border border-[#38708533] bg-[#FFFFFF] dark:bg-[#252525] dark:border-[#404040] rounded-lg",
|
|
5845
5851
|
children: /* @__PURE__ */ b("div", { className: "p-4 space-y-6 w-full text-primary-main", children: [
|
|
@@ -5848,8 +5854,8 @@ const Mn = ({
|
|
|
5848
5854
|
Mn,
|
|
5849
5855
|
{
|
|
5850
5856
|
walletType: "Bitcoin",
|
|
5851
|
-
walletName: (
|
|
5852
|
-
walletIcon: (
|
|
5857
|
+
walletName: (V = n.BTC) == null ? void 0 : V.name,
|
|
5858
|
+
walletIcon: (k = n.BTC) == null ? void 0 : k.icon,
|
|
5853
5859
|
address: t,
|
|
5854
5860
|
isCopied: x("btc"),
|
|
5855
5861
|
onCopy: () => v("btc", t)
|
|
@@ -5859,8 +5865,8 @@ const Mn = ({
|
|
|
5859
5865
|
Mn,
|
|
5860
5866
|
{
|
|
5861
5867
|
walletType: "Babylon",
|
|
5862
|
-
walletName: (
|
|
5863
|
-
walletIcon: (
|
|
5868
|
+
walletName: (E = n.BBN) == null ? void 0 : E.name,
|
|
5869
|
+
walletIcon: (A = n.BBN) == null ? void 0 : A.icon,
|
|
5864
5870
|
address: r,
|
|
5865
5871
|
isCopied: x("bbn"),
|
|
5866
5872
|
onCopy: () => v("bbn", r)
|
|
@@ -5983,12 +5989,12 @@ function Ql({ className: e, orientation: t = "vertical", children: r }) {
|
|
|
5983
5989
|
) });
|
|
5984
5990
|
}
|
|
5985
5991
|
function ec({ className: e, orientation: t = "horizontal", title: r, value: n, suffix: i }) {
|
|
5986
|
-
return /* @__PURE__ */ b("div", { className:
|
|
5992
|
+
return /* @__PURE__ */ b("div", { className: O("bbn-list-item-legacy", `bbn-list-item-legacy-${t}`, e), children: [
|
|
5987
5993
|
/* @__PURE__ */ c(
|
|
5988
5994
|
W,
|
|
5989
5995
|
{
|
|
5990
5996
|
as: "div",
|
|
5991
|
-
className:
|
|
5997
|
+
className: O("bbn-list-title-legacy", `bbn-list-title-legacy-${t}`),
|
|
5992
5998
|
variant: t === "horizontal" ? "body1" : "body2",
|
|
5993
5999
|
children: r
|
|
5994
6000
|
}
|
|
@@ -5997,7 +6003,7 @@ function ec({ className: e, orientation: t = "horizontal", title: r, value: n, s
|
|
|
5997
6003
|
W,
|
|
5998
6004
|
{
|
|
5999
6005
|
as: "div",
|
|
6000
|
-
className:
|
|
6006
|
+
className: O("bbn-list-value-legacy", `bbn-list-value-legacy-${t}`),
|
|
6001
6007
|
variant: "body1",
|
|
6002
6008
|
children: [
|
|
6003
6009
|
n,
|