@babylonlabs-io/core-ui 1.24.0 → 1.26.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/components/Accordion/Accordion.d.ts +2 -1
- package/dist/components/Accordion/Accordion.js +2 -2
- package/dist/components/Accordion/components/AccordionSummary.d.ts +3 -1
- package/dist/components/Accordion/components/AccordionSummary.js +2 -2
- package/dist/components/Button/IconButton.d.ts +9 -3
- package/dist/components/Button/IconButton.js +4 -3
- package/dist/components/Button/IconButton.stories.d.ts +6 -0
- package/dist/components/Button/IconButton.stories.js +42 -0
- package/dist/components/Form/Input.js +1 -1
- package/dist/components/SubSection/SubSection.d.ts +3 -1
- package/dist/components/SubSection/SubSection.js +2 -1
- package/dist/components/Table/Table.js +5 -2
- package/dist/components/Table/Table.stories.d.ts +1 -0
- package/dist/components/Table/Table.stories.js +6 -0
- package/dist/components/Table/types/index.d.ts +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +984 -953
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +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
|
-
import { jsx as c, jsxs as
|
|
1
|
+
import { jsx as c, jsxs as y, Fragment as ze } from "react/jsx-runtime";
|
|
2
2
|
import * as Je from "react";
|
|
3
|
-
import
|
|
4
|
-
import { twJoin as
|
|
3
|
+
import P, { useState as ee, useRef as it, useCallback as oe, createContext as ur, useMemo as _e, forwardRef as Se, 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 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({
|
|
@@ -27,33 +27,34 @@ function Nl({
|
|
|
27
27
|
onChange: r,
|
|
28
28
|
className: n,
|
|
29
29
|
disabled: i = !1,
|
|
30
|
-
|
|
30
|
+
fluid: s = !1,
|
|
31
|
+
children: o
|
|
31
32
|
}) {
|
|
32
|
-
const [
|
|
33
|
+
const [a = !1, l] = ut({
|
|
33
34
|
value: e,
|
|
34
35
|
defaultValue: t,
|
|
35
36
|
onStateChange: r
|
|
36
|
-
}),
|
|
37
|
-
|
|
38
|
-
}, [
|
|
37
|
+
}), f = oe(() => {
|
|
38
|
+
l(!a);
|
|
39
|
+
}, [l, a]), u = _e(
|
|
39
40
|
() => ({
|
|
40
41
|
defaultExpanded: t,
|
|
41
42
|
disabled: i,
|
|
42
|
-
expanded:
|
|
43
|
-
toggle: i ? void 0 :
|
|
43
|
+
expanded: a && !i,
|
|
44
|
+
toggle: i ? void 0 : f
|
|
44
45
|
}),
|
|
45
|
-
[t,
|
|
46
|
+
[t, a, i, f]
|
|
46
47
|
);
|
|
47
|
-
return /* @__PURE__ */ c(Dr.Provider, { value:
|
|
48
|
+
return /* @__PURE__ */ c(Dr.Provider, { value: u, children: /* @__PURE__ */ c("div", { className: O("bbn-accordion", i && "bbn-accordion-disabled", s && "bbn-accordion-fluid", n), children: o }) });
|
|
48
49
|
}
|
|
49
|
-
const we =
|
|
50
|
+
const we = Se(
|
|
50
51
|
({ variant: e = "contained", size: t = "large", color: r = "primary", fluid: n = !1, className: i, disabled: s, ...o }, a) => /* @__PURE__ */ c(
|
|
51
52
|
"button",
|
|
52
53
|
{
|
|
53
54
|
...o,
|
|
54
55
|
disabled: s,
|
|
55
56
|
ref: a,
|
|
56
|
-
className:
|
|
57
|
+
className: O(
|
|
57
58
|
"bbn-btn",
|
|
58
59
|
`bbn-btn-${e}`,
|
|
59
60
|
`bbn-btn-${r}`,
|
|
@@ -65,14 +66,28 @@ const we = Me(
|
|
|
65
66
|
)
|
|
66
67
|
);
|
|
67
68
|
we.displayName = "Button";
|
|
68
|
-
const Pn = (
|
|
69
|
+
const Pn = Se(
|
|
70
|
+
({ variant: e = "outlined", size: t = "large", className: r, ...n }, i) => /* @__PURE__ */ c(
|
|
71
|
+
"button",
|
|
72
|
+
{
|
|
73
|
+
...n,
|
|
74
|
+
ref: i,
|
|
75
|
+
className: O(
|
|
76
|
+
"bbn-btn-icon",
|
|
77
|
+
`bbn-btn-icon-${e}`,
|
|
78
|
+
`bbn-btn-icon-${t}`,
|
|
79
|
+
r
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
), In = Se(
|
|
69
84
|
({ className: e, ...t }, r) => /* @__PURE__ */ c(
|
|
70
85
|
we,
|
|
71
86
|
{
|
|
72
87
|
...t,
|
|
73
88
|
ref: r,
|
|
74
89
|
variant: "contained",
|
|
75
|
-
className:
|
|
90
|
+
className: O(
|
|
76
91
|
"!bg-error-main text-white font-medium !text-sm hover:!bg-error-main/90 transition-colors",
|
|
77
92
|
e
|
|
78
93
|
)
|
|
@@ -83,13 +98,14 @@ In.displayName = "WalletDisconnectButton";
|
|
|
83
98
|
function Cl({
|
|
84
99
|
className: e,
|
|
85
100
|
iconClassName: t,
|
|
86
|
-
|
|
87
|
-
|
|
101
|
+
iconProps: r,
|
|
102
|
+
children: n,
|
|
103
|
+
renderIcon: i = () => null
|
|
88
104
|
}) {
|
|
89
|
-
const { expanded:
|
|
90
|
-
return /* @__PURE__ */
|
|
91
|
-
|
|
92
|
-
|
|
105
|
+
const { expanded: s, toggle: o } = Dt(Dr), a = i(s);
|
|
106
|
+
return /* @__PURE__ */ y("div", { className: O("bbn-accordion-summary", e), onClick: o, children: [
|
|
107
|
+
n,
|
|
108
|
+
a && /* @__PURE__ */ c(Pn, { className: O("bbn-accordion-icon", t), ...r, children: a })
|
|
93
109
|
] });
|
|
94
110
|
}
|
|
95
111
|
function _r(e, t) {
|
|
@@ -139,42 +155,42 @@ function kl({
|
|
|
139
155
|
), /* @__PURE__ */ c(
|
|
140
156
|
"div",
|
|
141
157
|
{
|
|
142
|
-
className:
|
|
158
|
+
className: O("bbn-accordion-details", n),
|
|
143
159
|
style: {
|
|
144
160
|
height: s ? f : "0px",
|
|
145
161
|
visibility: o ? "visible" : "hidden",
|
|
146
162
|
transitionDuration: `${t}ms`
|
|
147
163
|
},
|
|
148
|
-
children: l ? /* @__PURE__ */ c("div", { ref: u, className:
|
|
164
|
+
children: l ? /* @__PURE__ */ c("div", { ref: u, className: O("bbn-accordion-content", r), children: i }) : null
|
|
149
165
|
}
|
|
150
166
|
);
|
|
151
167
|
}
|
|
152
|
-
const W =
|
|
168
|
+
const W = Se(
|
|
153
169
|
({ variant: e = "body1", as: t = "p", children: r, className: n, ...i }, s) => Lr(
|
|
154
170
|
t,
|
|
155
171
|
{
|
|
156
172
|
...i,
|
|
157
173
|
ref: s,
|
|
158
|
-
className:
|
|
174
|
+
className: O(`bbn-text-${e}`, n)
|
|
159
175
|
},
|
|
160
176
|
r
|
|
161
177
|
)
|
|
162
178
|
);
|
|
163
179
|
W.displayName = "Text";
|
|
164
|
-
const Mr =
|
|
180
|
+
const Mr = Se(
|
|
165
181
|
({ variant: e, as: t = e, children: r, className: n, ...i }, s) => Lr(
|
|
166
182
|
t,
|
|
167
183
|
{
|
|
168
184
|
...i,
|
|
169
185
|
ref: s,
|
|
170
|
-
className:
|
|
186
|
+
className: O(`bbn-${e}`, n)
|
|
171
187
|
},
|
|
172
188
|
r
|
|
173
189
|
)
|
|
174
190
|
);
|
|
175
191
|
Mr.displayName = "Heading";
|
|
176
192
|
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:
|
|
193
|
+
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
194
|
}
|
|
179
195
|
const Ol = ({
|
|
180
196
|
max: e = 1 / 0,
|
|
@@ -185,7 +201,7 @@ const Ol = ({
|
|
|
185
201
|
...s
|
|
186
202
|
}) => {
|
|
187
203
|
const o = Qt.count(r);
|
|
188
|
-
return /* @__PURE__ */
|
|
204
|
+
return /* @__PURE__ */ y("div", { className: O("bbn-avatar-group", t), children: [
|
|
189
205
|
Qt.map(
|
|
190
206
|
r,
|
|
191
207
|
(a, l) => Fr(a) && l + 1 <= e ? Vr(a, {
|
|
@@ -194,12 +210,12 @@ const Ol = ({
|
|
|
194
210
|
variant: i
|
|
195
211
|
}) : null
|
|
196
212
|
),
|
|
197
|
-
o > e && /* @__PURE__ */
|
|
213
|
+
o > e && /* @__PURE__ */ y(er, { size: s.size, variant: i, className: n, children: [
|
|
198
214
|
"+",
|
|
199
215
|
o - e
|
|
200
216
|
] })
|
|
201
217
|
] });
|
|
202
|
-
}, jn =
|
|
218
|
+
}, jn = Se(function({
|
|
203
219
|
label: t,
|
|
204
220
|
checked: r,
|
|
205
221
|
defaultChecked: n = !1,
|
|
@@ -213,17 +229,17 @@ const Ol = ({
|
|
|
213
229
|
onChange: d,
|
|
214
230
|
...m
|
|
215
231
|
}, v) {
|
|
216
|
-
const [
|
|
232
|
+
const [N = !1, g] = ut({
|
|
217
233
|
value: r,
|
|
218
234
|
defaultValue: n,
|
|
219
235
|
onStateChange: d
|
|
220
236
|
});
|
|
221
|
-
function w(
|
|
222
|
-
var
|
|
223
|
-
g(
|
|
237
|
+
function w(x) {
|
|
238
|
+
var F;
|
|
239
|
+
g(x.currentTarget.checked), (F = i == null ? void 0 : i.onChange) == null || F.call(i, x);
|
|
224
240
|
}
|
|
225
|
-
const
|
|
226
|
-
u(
|
|
241
|
+
const M = /* @__PURE__ */ y("span", { className: O("bbn-switcher", o && "bbn-switcher-disabled", a), children: [
|
|
242
|
+
u(N),
|
|
227
243
|
/* @__PURE__ */ c(
|
|
228
244
|
"input",
|
|
229
245
|
{
|
|
@@ -233,27 +249,27 @@ const Ol = ({
|
|
|
233
249
|
className: "bbn-switcher-input",
|
|
234
250
|
...m,
|
|
235
251
|
...i,
|
|
236
|
-
checked:
|
|
252
|
+
checked: N,
|
|
237
253
|
onChange: w
|
|
238
254
|
}
|
|
239
255
|
)
|
|
240
256
|
] });
|
|
241
|
-
return t ? /* @__PURE__ */
|
|
257
|
+
return t ? /* @__PURE__ */ y(
|
|
242
258
|
W,
|
|
243
259
|
{
|
|
244
260
|
as: "label",
|
|
245
261
|
variant: "body1",
|
|
246
|
-
className:
|
|
262
|
+
className: O(
|
|
247
263
|
"bbn-switcher-label",
|
|
248
264
|
s === "left" ? "bbn-switcher-left" : "bbn-switcher-right",
|
|
249
265
|
f
|
|
250
266
|
),
|
|
251
267
|
children: [
|
|
252
|
-
|
|
268
|
+
M,
|
|
253
269
|
t
|
|
254
270
|
]
|
|
255
271
|
}
|
|
256
|
-
) :
|
|
272
|
+
) : M;
|
|
257
273
|
}), Zi = {
|
|
258
274
|
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
275
|
"path",
|
|
@@ -269,7 +285,7 @@ const Ol = ({
|
|
|
269
285
|
fill: "currentColor"
|
|
270
286
|
}
|
|
271
287
|
) })
|
|
272
|
-
}, Xi =
|
|
288
|
+
}, Xi = Se(function(t, r) {
|
|
273
289
|
return /* @__PURE__ */ c(jn, { ref: r, ...t, inputType: "checkbox", renderIcon: (n) => Zi[n.toString()] });
|
|
274
290
|
}), Gi = {
|
|
275
291
|
true: /* @__PURE__ */ c("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ c(
|
|
@@ -286,7 +302,7 @@ const Ol = ({
|
|
|
286
302
|
fill: "currentColor"
|
|
287
303
|
}
|
|
288
304
|
) })
|
|
289
|
-
}, Yi =
|
|
305
|
+
}, Yi = Se(function(t, r) {
|
|
290
306
|
return /* @__PURE__ */ c(jn, { ref: r, ...t, inputType: "radio", renderIcon: (n) => Gi[n.toString()] });
|
|
291
307
|
});
|
|
292
308
|
var $n = {
|
|
@@ -295,7 +311,7 @@ var $n = {
|
|
|
295
311
|
className: void 0,
|
|
296
312
|
style: void 0,
|
|
297
313
|
attr: void 0
|
|
298
|
-
}, sn =
|
|
314
|
+
}, sn = P.createContext && /* @__PURE__ */ P.createContext($n), Ki = ["attr", "size", "title"];
|
|
299
315
|
function Ji(e, t) {
|
|
300
316
|
if (e == null) return {};
|
|
301
317
|
var r = Qi(e, t), n, i;
|
|
@@ -365,12 +381,12 @@ function rs(e, t) {
|
|
|
365
381
|
return (t === "string" ? String : Number)(e);
|
|
366
382
|
}
|
|
367
383
|
function Hn(e) {
|
|
368
|
-
return e && e.map((t, r) => /* @__PURE__ */
|
|
384
|
+
return e && e.map((t, r) => /* @__PURE__ */ P.createElement(t.tag, rr({
|
|
369
385
|
key: r
|
|
370
386
|
}, t.attr), Hn(t.child)));
|
|
371
387
|
}
|
|
372
388
|
function st(e) {
|
|
373
|
-
return (t) => /* @__PURE__ */
|
|
389
|
+
return (t) => /* @__PURE__ */ P.createElement(ns, tr({
|
|
374
390
|
attr: rr({}, e.attr)
|
|
375
391
|
}, t), Hn(e.child));
|
|
376
392
|
}
|
|
@@ -381,7 +397,7 @@ function ns(e) {
|
|
|
381
397
|
size: i,
|
|
382
398
|
title: s
|
|
383
399
|
} = e, o = Ji(e, Ki), a = i || r.size || "1em", l;
|
|
384
|
-
return r.className && (l = r.className), e.className && (l = (l ? l + " " : "") + e.className), /* @__PURE__ */
|
|
400
|
+
return r.className && (l = r.className), e.className && (l = (l ? l + " " : "") + e.className), /* @__PURE__ */ P.createElement("svg", tr({
|
|
385
401
|
stroke: "currentColor",
|
|
386
402
|
fill: "currentColor",
|
|
387
403
|
strokeWidth: "0"
|
|
@@ -393,9 +409,9 @@ function ns(e) {
|
|
|
393
409
|
height: a,
|
|
394
410
|
width: a,
|
|
395
411
|
xmlns: "http://www.w3.org/2000/svg"
|
|
396
|
-
}), s && /* @__PURE__ */
|
|
412
|
+
}), s && /* @__PURE__ */ P.createElement("title", null, s), e.children);
|
|
397
413
|
};
|
|
398
|
-
return sn !== void 0 ? /* @__PURE__ */
|
|
414
|
+
return sn !== void 0 ? /* @__PURE__ */ P.createElement(sn.Consumer, null, (r) => t(r)) : t($n);
|
|
399
415
|
}
|
|
400
416
|
function is(e) {
|
|
401
417
|
return st({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M12 16L6 10H18L12 16Z" }, child: [] }] })(e);
|
|
@@ -418,8 +434,8 @@ var on = function(t) {
|
|
|
418
434
|
return e.concat([t + "-" + ft, t + "-" + At]);
|
|
419
435
|
}, []), Un = /* @__PURE__ */ [].concat(_t, [Tr]).reduce(function(e, t) {
|
|
420
436
|
return e.concat([t, t + "-" + ft, t + "-" + At]);
|
|
421
|
-
}, []), us = "beforeRead", fs = "read", ds = "afterRead", hs = "beforeMain", ms = "main", ps = "afterMain", vs = "beforeWrite", gs = "write",
|
|
422
|
-
function
|
|
437
|
+
}, []), us = "beforeRead", fs = "read", ds = "afterRead", hs = "beforeMain", ms = "main", ps = "afterMain", vs = "beforeWrite", gs = "write", bs = "afterWrite", ys = [us, fs, ds, hs, ms, ps, vs, gs, bs];
|
|
438
|
+
function Me(e) {
|
|
423
439
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
424
440
|
}
|
|
425
441
|
function ge(e) {
|
|
@@ -435,7 +451,7 @@ function rt(e) {
|
|
|
435
451
|
var t = ge(e).Element;
|
|
436
452
|
return e instanceof t || e instanceof Element;
|
|
437
453
|
}
|
|
438
|
-
function
|
|
454
|
+
function ye(e) {
|
|
439
455
|
var t = ge(e).HTMLElement;
|
|
440
456
|
return e instanceof t || e instanceof HTMLElement;
|
|
441
457
|
}
|
|
@@ -449,7 +465,7 @@ function ws(e) {
|
|
|
449
465
|
var t = e.state;
|
|
450
466
|
Object.keys(t.elements).forEach(function(r) {
|
|
451
467
|
var n = t.styles[r] || {}, i = t.attributes[r] || {}, s = t.elements[r];
|
|
452
|
-
!
|
|
468
|
+
!ye(s) || !Me(s) || (Object.assign(s.style, n), Object.keys(i).forEach(function(o) {
|
|
453
469
|
var a = i[o];
|
|
454
470
|
a === !1 ? s.removeAttribute(o) : s.setAttribute(o, a === !0 ? "" : a);
|
|
455
471
|
}));
|
|
@@ -473,7 +489,7 @@ function xs(e) {
|
|
|
473
489
|
var i = t.elements[n], s = t.attributes[n] || {}, o = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : r[n]), a = o.reduce(function(l, f) {
|
|
474
490
|
return l[f] = "", l;
|
|
475
491
|
}, {});
|
|
476
|
-
!
|
|
492
|
+
!ye(i) || !Me(i) || (Object.assign(i.style, a), Object.keys(s).forEach(function(l) {
|
|
477
493
|
i.removeAttribute(l);
|
|
478
494
|
}));
|
|
479
495
|
});
|
|
@@ -487,7 +503,7 @@ const Ns = {
|
|
|
487
503
|
effect: xs,
|
|
488
504
|
requires: ["computeStyles"]
|
|
489
505
|
};
|
|
490
|
-
function
|
|
506
|
+
function De(e) {
|
|
491
507
|
return e.split("-")[0];
|
|
492
508
|
}
|
|
493
509
|
var et = Math.max, nr = Math.min, dt = Math.round;
|
|
@@ -503,7 +519,7 @@ function zn() {
|
|
|
503
519
|
function ht(e, t, r) {
|
|
504
520
|
t === void 0 && (t = !1), r === void 0 && (r = !1);
|
|
505
521
|
var n = e.getBoundingClientRect(), i = 1, s = 1;
|
|
506
|
-
t &&
|
|
522
|
+
t && ye(e) && (i = e.offsetWidth > 0 && dt(n.width) / e.offsetWidth || 1, s = e.offsetHeight > 0 && dt(n.height) / e.offsetHeight || 1);
|
|
507
523
|
var o = rt(e) ? ge(e) : window, a = o.visualViewport, l = !zn() && r, f = (n.left + (l && a ? a.offsetLeft : 0)) / i, u = (n.top + (l && a ? a.offsetTop : 0)) / s, d = n.width / i, m = n.height / s;
|
|
508
524
|
return {
|
|
509
525
|
width: d,
|
|
@@ -543,7 +559,7 @@ function je(e) {
|
|
|
543
559
|
return ge(e).getComputedStyle(e);
|
|
544
560
|
}
|
|
545
561
|
function Cs(e) {
|
|
546
|
-
return ["table", "td", "th"].indexOf(
|
|
562
|
+
return ["table", "td", "th"].indexOf(Me(e)) >= 0;
|
|
547
563
|
}
|
|
548
564
|
function qe(e) {
|
|
549
565
|
return ((rt(e) ? e.ownerDocument : (
|
|
@@ -552,7 +568,7 @@ function qe(e) {
|
|
|
552
568
|
)) || window.document).documentElement;
|
|
553
569
|
}
|
|
554
570
|
function fr(e) {
|
|
555
|
-
return
|
|
571
|
+
return Me(e) === "html" ? e : (
|
|
556
572
|
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
557
573
|
// $FlowFixMe[incompatible-return]
|
|
558
574
|
// $FlowFixMe[prop-missing]
|
|
@@ -564,18 +580,18 @@ function fr(e) {
|
|
|
564
580
|
);
|
|
565
581
|
}
|
|
566
582
|
function un(e) {
|
|
567
|
-
return !
|
|
583
|
+
return !ye(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
568
584
|
je(e).position === "fixed" ? null : e.offsetParent;
|
|
569
585
|
}
|
|
570
586
|
function ks(e) {
|
|
571
587
|
var t = /firefox/i.test(Or()), r = /Trident/i.test(Or());
|
|
572
|
-
if (r &&
|
|
588
|
+
if (r && ye(e)) {
|
|
573
589
|
var n = je(e);
|
|
574
590
|
if (n.position === "fixed")
|
|
575
591
|
return null;
|
|
576
592
|
}
|
|
577
593
|
var i = fr(e);
|
|
578
|
-
for (Rr(i) && (i = i.host);
|
|
594
|
+
for (Rr(i) && (i = i.host); ye(i) && ["html", "body"].indexOf(Me(i)) < 0; ) {
|
|
579
595
|
var s = je(i);
|
|
580
596
|
if (s.transform !== "none" || s.perspective !== "none" || s.contain === "paint" || ["transform", "perspective"].indexOf(s.willChange) !== -1 || t && s.willChange === "filter" || t && s.filter && s.filter !== "none")
|
|
581
597
|
return i;
|
|
@@ -586,7 +602,7 @@ function ks(e) {
|
|
|
586
602
|
function Mt(e) {
|
|
587
603
|
for (var t = ge(e), r = un(e); r && Cs(r) && je(r).position === "static"; )
|
|
588
604
|
r = un(r);
|
|
589
|
-
return r && (
|
|
605
|
+
return r && (Me(r) === "html" || Me(r) === "body" && je(r).position === "static") ? t : r || ks(e) || t;
|
|
590
606
|
}
|
|
591
607
|
function Pr(e) {
|
|
592
608
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
@@ -620,10 +636,10 @@ var Es = function(t, r) {
|
|
|
620
636
|
})) : t, Xn(typeof t != "number" ? t : Gn(t, _t));
|
|
621
637
|
};
|
|
622
638
|
function Ss(e) {
|
|
623
|
-
var t, r = e.state, n = e.name, i = e.options, s = r.elements.arrow, o = r.modifiersData.popperOffsets, a =
|
|
639
|
+
var t, r = e.state, n = e.name, i = e.options, s = r.elements.arrow, o = r.modifiersData.popperOffsets, a = De(r.placement), l = Pr(a), f = [me, Ne].indexOf(a) >= 0, u = f ? "height" : "width";
|
|
624
640
|
if (!(!s || !o)) {
|
|
625
|
-
var d = Es(i.padding, r), m = Br(s), v = l === "y" ? he : me,
|
|
626
|
-
r.modifiersData[n] = (t = {}, t[$] =
|
|
641
|
+
var d = Es(i.padding, r), m = Br(s), v = l === "y" ? he : me, N = 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], M = Mt(s), x = M ? l === "y" ? M.clientHeight || 0 : M.clientWidth || 0 : 0, F = g / 2 - w / 2, k = d[v], E = x - m[u] - d[N], A = x / 2 - m[u] / 2 + F, _ = kt(k, A, E), $ = l;
|
|
642
|
+
r.modifiersData[n] = (t = {}, t[$] = _, t.centerOffset = _ - A, t);
|
|
627
643
|
}
|
|
628
644
|
}
|
|
629
645
|
function As(e) {
|
|
@@ -656,7 +672,7 @@ function Fs(e, t) {
|
|
|
656
672
|
};
|
|
657
673
|
}
|
|
658
674
|
function fn(e) {
|
|
659
|
-
var t, r = e.popper, n = e.popperRect, i = e.placement, s = e.variation, o = e.offsets, a = e.position, l = e.gpuAcceleration, f = e.adaptive, u = e.roundOffsets, d = e.isFixed, m = o.x, v = m === void 0 ? 0 : m,
|
|
675
|
+
var t, r = e.popper, n = e.popperRect, i = e.placement, s = e.variation, o = e.offsets, a = e.position, l = e.gpuAcceleration, f = e.adaptive, u = e.roundOffsets, d = e.isFixed, m = o.x, v = m === void 0 ? 0 : m, N = o.y, g = N === void 0 ? 0 : N, w = typeof u == "function" ? u({
|
|
660
676
|
x: v,
|
|
661
677
|
y: g
|
|
662
678
|
}) : {
|
|
@@ -664,44 +680,44 @@ function fn(e) {
|
|
|
664
680
|
y: g
|
|
665
681
|
};
|
|
666
682
|
v = w.x, g = w.y;
|
|
667
|
-
var
|
|
683
|
+
var M = o.hasOwnProperty("x"), x = o.hasOwnProperty("y"), F = me, k = he, E = window;
|
|
668
684
|
if (f) {
|
|
669
|
-
var
|
|
670
|
-
if (
|
|
671
|
-
|
|
672
|
-
var
|
|
685
|
+
var A = Mt(r), _ = "clientHeight", $ = "clientWidth";
|
|
686
|
+
if (A === ge(r) && (A = qe(r), je(A).position !== "static" && a === "absolute" && (_ = "scrollHeight", $ = "scrollWidth")), A = A, i === he || (i === me || i === Ne) && s === At) {
|
|
687
|
+
k = xe;
|
|
688
|
+
var I = d && A === E && E.visualViewport ? E.visualViewport.height : (
|
|
673
689
|
// $FlowFixMe[prop-missing]
|
|
674
|
-
|
|
690
|
+
A[_]
|
|
675
691
|
);
|
|
676
|
-
g -=
|
|
692
|
+
g -= I - n.height, g *= l ? 1 : -1;
|
|
677
693
|
}
|
|
678
694
|
if (i === me || (i === he || i === xe) && s === At) {
|
|
679
|
-
|
|
680
|
-
var H = d &&
|
|
695
|
+
F = Ne;
|
|
696
|
+
var H = d && A === E && E.visualViewport ? E.visualViewport.width : (
|
|
681
697
|
// $FlowFixMe[prop-missing]
|
|
682
|
-
|
|
698
|
+
A[$]
|
|
683
699
|
);
|
|
684
700
|
v -= H - n.width, v *= l ? 1 : -1;
|
|
685
701
|
}
|
|
686
702
|
}
|
|
687
|
-
var
|
|
703
|
+
var V = Object.assign({
|
|
688
704
|
position: a
|
|
689
|
-
}, f && Vs),
|
|
705
|
+
}, f && Vs), T = u === !0 ? Fs({
|
|
690
706
|
x: v,
|
|
691
707
|
y: g
|
|
692
708
|
}, ge(r)) : {
|
|
693
709
|
x: v,
|
|
694
710
|
y: g
|
|
695
711
|
};
|
|
696
|
-
if (v =
|
|
712
|
+
if (v = T.x, g = T.y, l) {
|
|
697
713
|
var j;
|
|
698
|
-
return Object.assign({},
|
|
714
|
+
return Object.assign({}, V, (j = {}, j[k] = x ? "0" : "", j[F] = M ? "0" : "", j.transform = (E.devicePixelRatio || 1) <= 1 ? "translate(" + v + "px, " + g + "px)" : "translate3d(" + v + "px, " + g + "px, 0)", j));
|
|
699
715
|
}
|
|
700
|
-
return Object.assign({},
|
|
716
|
+
return Object.assign({}, V, (t = {}, t[k] = x ? g + "px" : "", t[F] = M ? v + "px" : "", t.transform = "", t));
|
|
701
717
|
}
|
|
702
718
|
function Ds(e) {
|
|
703
719
|
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 = {
|
|
704
|
-
placement:
|
|
720
|
+
placement: De(t.placement),
|
|
705
721
|
variation: mt(t.placement),
|
|
706
722
|
popper: t.elements.popper,
|
|
707
723
|
popperRect: t.rects.popper,
|
|
@@ -809,7 +825,7 @@ function $r(e) {
|
|
|
809
825
|
return /auto|scroll|overlay|hidden/.test(r + i + n);
|
|
810
826
|
}
|
|
811
827
|
function Yn(e) {
|
|
812
|
-
return ["html", "body", "#document"].indexOf(
|
|
828
|
+
return ["html", "body", "#document"].indexOf(Me(e)) >= 0 ? e.ownerDocument.body : ye(e) && $r(e) ? e : Yn(fr(e));
|
|
813
829
|
}
|
|
814
830
|
function Ot(e, t) {
|
|
815
831
|
var r;
|
|
@@ -836,9 +852,9 @@ function hn(e, t, r) {
|
|
|
836
852
|
return t === Wn ? Er(Ps(e, r)) : rt(t) ? js(t, r) : Er(Is(qe(e)));
|
|
837
853
|
}
|
|
838
854
|
function $s(e) {
|
|
839
|
-
var t = Ot(fr(e)), r = ["absolute", "fixed"].indexOf(je(e).position) >= 0, n = r &&
|
|
855
|
+
var t = Ot(fr(e)), r = ["absolute", "fixed"].indexOf(je(e).position) >= 0, n = r && ye(e) ? Mt(e) : e;
|
|
840
856
|
return rt(n) ? t.filter(function(i) {
|
|
841
|
-
return rt(i) && qn(i, n) &&
|
|
857
|
+
return rt(i) && qn(i, n) && Me(i) !== "body";
|
|
842
858
|
}) : [];
|
|
843
859
|
}
|
|
844
860
|
function Hs(e, t, r, n) {
|
|
@@ -849,7 +865,7 @@ function Hs(e, t, r, n) {
|
|
|
849
865
|
return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
|
|
850
866
|
}
|
|
851
867
|
function Kn(e) {
|
|
852
|
-
var t = e.reference, r = e.element, n = e.placement, i = n ?
|
|
868
|
+
var t = e.reference, r = e.element, n = e.placement, i = n ? De(n) : null, s = n ? mt(n) : null, o = t.x + t.width / 2 - r.width / 2, a = t.y + t.height / 2 - r.height / 2, l;
|
|
853
869
|
switch (i) {
|
|
854
870
|
case he:
|
|
855
871
|
l = {
|
|
@@ -897,47 +913,47 @@ function Kn(e) {
|
|
|
897
913
|
}
|
|
898
914
|
function Lt(e, t) {
|
|
899
915
|
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,
|
|
901
|
-
reference:
|
|
902
|
-
element:
|
|
916
|
+
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, N = v === void 0 ? !1 : v, g = r.padding, w = g === void 0 ? 0 : g, M = Xn(typeof w != "number" ? w : Gn(w, _t)), x = m === xt ? cs : xt, F = e.rects.popper, k = e.elements[N ? x : m], E = Hs(rt(k) ? k : k.contextElement || qe(e.elements.popper), l, u, o), A = ht(e.elements.reference), _ = Kn({
|
|
917
|
+
reference: A,
|
|
918
|
+
element: F,
|
|
903
919
|
placement: i
|
|
904
|
-
}), $ = Er(Object.assign({},
|
|
905
|
-
top:
|
|
906
|
-
bottom:
|
|
907
|
-
left:
|
|
908
|
-
right:
|
|
909
|
-
},
|
|
910
|
-
if (m === xt &&
|
|
911
|
-
var
|
|
920
|
+
}), $ = Er(Object.assign({}, F, _)), I = m === xt ? $ : A, H = {
|
|
921
|
+
top: E.top - I.top + M.top,
|
|
922
|
+
bottom: I.bottom - E.bottom + M.bottom,
|
|
923
|
+
left: E.left - I.left + M.left,
|
|
924
|
+
right: I.right - E.right + M.right
|
|
925
|
+
}, V = e.modifiersData.offset;
|
|
926
|
+
if (m === xt && V) {
|
|
927
|
+
var T = V[i];
|
|
912
928
|
Object.keys(H).forEach(function(j) {
|
|
913
929
|
var z = [Ne, xe].indexOf(j) >= 0 ? 1 : -1, J = [he, xe].indexOf(j) >= 0 ? "y" : "x";
|
|
914
|
-
H[j] +=
|
|
930
|
+
H[j] += T[J] * z;
|
|
915
931
|
});
|
|
916
932
|
}
|
|
917
933
|
return H;
|
|
918
934
|
}
|
|
919
935
|
function Ws(e, t) {
|
|
920
936
|
t === void 0 && (t = {});
|
|
921
|
-
var r = t, n = r.placement, i = r.boundary, s = r.rootBoundary, o = r.padding, a = r.flipVariations, l = r.allowedAutoPlacements, f = l === void 0 ? Un : l, u = mt(n), d = u ? a ? cn : cn.filter(function(
|
|
922
|
-
return mt(
|
|
923
|
-
}) : _t, m = d.filter(function(
|
|
924
|
-
return f.indexOf(
|
|
937
|
+
var r = t, n = r.placement, i = r.boundary, s = r.rootBoundary, o = r.padding, a = r.flipVariations, l = r.allowedAutoPlacements, f = l === void 0 ? Un : l, u = mt(n), d = u ? a ? cn : cn.filter(function(N) {
|
|
938
|
+
return mt(N) === u;
|
|
939
|
+
}) : _t, m = d.filter(function(N) {
|
|
940
|
+
return f.indexOf(N) >= 0;
|
|
925
941
|
});
|
|
926
942
|
m.length === 0 && (m = d);
|
|
927
|
-
var v = m.reduce(function(
|
|
928
|
-
return
|
|
943
|
+
var v = m.reduce(function(N, g) {
|
|
944
|
+
return N[g] = Lt(e, {
|
|
929
945
|
placement: g,
|
|
930
946
|
boundary: i,
|
|
931
947
|
rootBoundary: s,
|
|
932
948
|
padding: o
|
|
933
|
-
})[
|
|
949
|
+
})[De(g)], N;
|
|
934
950
|
}, {});
|
|
935
|
-
return Object.keys(v).sort(function(
|
|
936
|
-
return v[
|
|
951
|
+
return Object.keys(v).sort(function(N, g) {
|
|
952
|
+
return v[N] - v[g];
|
|
937
953
|
});
|
|
938
954
|
}
|
|
939
955
|
function Us(e) {
|
|
940
|
-
if (
|
|
956
|
+
if (De(e) === Tr)
|
|
941
957
|
return [];
|
|
942
958
|
var t = Yt(e);
|
|
943
959
|
return [dn(e), t, dn(t)];
|
|
@@ -945,49 +961,49 @@ function Us(e) {
|
|
|
945
961
|
function zs(e) {
|
|
946
962
|
var t = e.state, r = e.options, n = e.name;
|
|
947
963
|
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,
|
|
949
|
-
return $e.concat(
|
|
964
|
+
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, N = v === void 0 ? !0 : v, g = r.allowedAutoPlacements, w = t.options.placement, M = De(w), x = M === w, F = l || (x || !N ? [Yt(w)] : Us(w)), k = [w].concat(F).reduce(function($e, ke) {
|
|
965
|
+
return $e.concat(De(ke) === Tr ? Ws(t, {
|
|
950
966
|
placement: ke,
|
|
951
967
|
boundary: u,
|
|
952
968
|
rootBoundary: d,
|
|
953
969
|
padding: f,
|
|
954
|
-
flipVariations:
|
|
970
|
+
flipVariations: N,
|
|
955
971
|
allowedAutoPlacements: g
|
|
956
972
|
}) : ke);
|
|
957
|
-
}, []),
|
|
958
|
-
var
|
|
959
|
-
placement:
|
|
973
|
+
}, []), E = t.rects.reference, A = t.rects.popper, _ = /* @__PURE__ */ new Map(), $ = !0, I = k[0], H = 0; H < k.length; H++) {
|
|
974
|
+
var V = k[H], T = De(V), j = mt(V) === ft, z = [he, xe].indexOf(T) >= 0, J = z ? "width" : "height", X = Lt(t, {
|
|
975
|
+
placement: V,
|
|
960
976
|
boundary: u,
|
|
961
977
|
rootBoundary: d,
|
|
962
978
|
altBoundary: m,
|
|
963
979
|
padding: f
|
|
964
980
|
}), Q = z ? j ? Ne : me : j ? xe : he;
|
|
965
|
-
|
|
966
|
-
var
|
|
967
|
-
if (s && fe.push(X[
|
|
981
|
+
E[J] > A[J] && (Q = Yt(Q));
|
|
982
|
+
var Ae = Yt(Q), fe = [];
|
|
983
|
+
if (s && fe.push(X[T] <= 0), a && fe.push(X[Q] <= 0, X[Ae] <= 0), fe.every(function($e) {
|
|
968
984
|
return $e;
|
|
969
985
|
})) {
|
|
970
|
-
|
|
986
|
+
I = V, $ = !1;
|
|
971
987
|
break;
|
|
972
988
|
}
|
|
973
|
-
|
|
989
|
+
_.set(V, fe);
|
|
974
990
|
}
|
|
975
991
|
if ($)
|
|
976
|
-
for (var
|
|
977
|
-
var Ge =
|
|
978
|
-
var
|
|
979
|
-
if (
|
|
980
|
-
return
|
|
992
|
+
for (var Re = N ? 3 : 1, ot = function(ke) {
|
|
993
|
+
var Ge = k.find(function(He) {
|
|
994
|
+
var Le = _.get(He);
|
|
995
|
+
if (Le)
|
|
996
|
+
return Le.slice(0, ke).every(function(Ye) {
|
|
981
997
|
return Ye;
|
|
982
998
|
});
|
|
983
999
|
});
|
|
984
1000
|
if (Ge)
|
|
985
|
-
return
|
|
986
|
-
}, Ze =
|
|
1001
|
+
return I = Ge, "break";
|
|
1002
|
+
}, Ze = Re; Ze > 0; Ze--) {
|
|
987
1003
|
var Xe = ot(Ze);
|
|
988
1004
|
if (Xe === "break") break;
|
|
989
1005
|
}
|
|
990
|
-
t.placement !==
|
|
1006
|
+
t.placement !== I && (t.modifiersData[n]._skip = !0, t.placement = I, t.reset = !0);
|
|
991
1007
|
}
|
|
992
1008
|
}
|
|
993
1009
|
const qs = {
|
|
@@ -1040,7 +1056,7 @@ const Xs = {
|
|
|
1040
1056
|
fn: Zs
|
|
1041
1057
|
};
|
|
1042
1058
|
function Gs(e, t, r) {
|
|
1043
|
-
var n =
|
|
1059
|
+
var n = De(e), i = [me, he].indexOf(n) >= 0 ? -1 : 1, s = typeof r == "function" ? r(Object.assign({}, t, {
|
|
1044
1060
|
placement: e
|
|
1045
1061
|
})) : r, o = s[0], a = s[1];
|
|
1046
1062
|
return o = o || 0, a = (a || 0) * i, [me, Ne].indexOf(n) >= 0 ? {
|
|
@@ -1083,36 +1099,36 @@ function ea(e) {
|
|
|
1083
1099
|
return e === "x" ? "y" : "x";
|
|
1084
1100
|
}
|
|
1085
1101
|
function ta(e) {
|
|
1086
|
-
var t = e.state, r = e.options, n = e.name, i = r.mainAxis, s = i === void 0 ? !0 : i, o = r.altAxis, a = o === void 0 ? !1 : o, l = r.boundary, f = r.rootBoundary, u = r.altBoundary, d = r.padding, m = r.tether, v = m === void 0 ? !0 : m,
|
|
1102
|
+
var t = e.state, r = e.options, n = e.name, i = r.mainAxis, s = i === void 0 ? !0 : i, o = r.altAxis, a = o === void 0 ? !1 : o, l = r.boundary, f = r.rootBoundary, u = r.altBoundary, d = r.padding, m = r.tether, v = m === void 0 ? !0 : m, N = r.tetherOffset, g = N === void 0 ? 0 : N, w = Lt(t, {
|
|
1087
1103
|
boundary: l,
|
|
1088
1104
|
rootBoundary: f,
|
|
1089
1105
|
padding: d,
|
|
1090
1106
|
altBoundary: u
|
|
1091
|
-
}),
|
|
1107
|
+
}), M = De(t.placement), x = mt(t.placement), F = !x, k = Pr(M), E = ea(k), A = t.modifiersData.popperOffsets, _ = t.rects.reference, $ = t.rects.popper, I = typeof g == "function" ? g(Object.assign({}, t.rects, {
|
|
1092
1108
|
placement: t.placement
|
|
1093
|
-
})) : g, H = typeof
|
|
1094
|
-
mainAxis:
|
|
1095
|
-
altAxis:
|
|
1109
|
+
})) : g, H = typeof I == "number" ? {
|
|
1110
|
+
mainAxis: I,
|
|
1111
|
+
altAxis: I
|
|
1096
1112
|
} : Object.assign({
|
|
1097
1113
|
mainAxis: 0,
|
|
1098
1114
|
altAxis: 0
|
|
1099
|
-
},
|
|
1115
|
+
}, I), V = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, T = {
|
|
1100
1116
|
x: 0,
|
|
1101
1117
|
y: 0
|
|
1102
1118
|
};
|
|
1103
|
-
if (
|
|
1119
|
+
if (A) {
|
|
1104
1120
|
if (s) {
|
|
1105
|
-
var j, z =
|
|
1121
|
+
var j, z = k === "y" ? he : me, J = k === "y" ? xe : Ne, X = k === "y" ? "height" : "width", Q = A[k], Ae = Q + w[z], fe = Q - w[J], Re = v ? -$[X] / 2 : 0, ot = x === ft ? _[X] : $[X], Ze = x === ft ? -$[X] : -_[X], Xe = t.elements.arrow, $e = v && Xe ? Br(Xe) : {
|
|
1106
1122
|
width: 0,
|
|
1107
1123
|
height: 0
|
|
1108
|
-
}, ke = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Zn(), Ge = ke[z], He = ke[J],
|
|
1109
|
-
|
|
1124
|
+
}, ke = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Zn(), Ge = ke[z], He = ke[J], Le = kt(0, _[X], $e[X]), Ye = F ? _[X] / 2 - Re - Le - Ge - H.mainAxis : ot - Le - Ge - H.mainAxis, yt = F ? -_[X] / 2 + Re + Le + He + H.mainAxis : Ze + Le + He + H.mainAxis, wt = t.elements.arrow && Mt(t.elements.arrow), jt = wt ? k === "y" ? wt.clientTop || 0 : wt.clientLeft || 0 : 0, $t = (j = V == null ? void 0 : V[k]) != null ? j : 0, Ht = Q + Ye - $t - jt, Wt = Q + yt - $t, Ut = kt(v ? nr(Ae, Ht) : Ae, Q, v ? et(fe, Wt) : fe);
|
|
1125
|
+
A[k] = Ut, T[k] = Ut - Q;
|
|
1110
1126
|
}
|
|
1111
1127
|
if (a) {
|
|
1112
|
-
var zt, tn =
|
|
1113
|
-
|
|
1128
|
+
var zt, tn = k === "x" ? he : me, qt = k === "x" ? xe : Ne, h = A[E], p = E === "y" ? "height" : "width", b = h + w[tn], D = h - w[qt], S = [he, me].indexOf(M) !== -1, C = (zt = V == null ? void 0 : V[E]) != null ? zt : 0, B = S ? b : h - _[p] - $[p] - C + H.altAxis, U = S ? h + _[p] + $[p] - C - H.altAxis : D, q = v && S ? Os(B, h, U) : kt(v ? B : b, h, v ? U : D);
|
|
1129
|
+
A[E] = q, T[E] = q - h;
|
|
1114
1130
|
}
|
|
1115
|
-
t.modifiersData[n] =
|
|
1131
|
+
t.modifiersData[n] = T;
|
|
1116
1132
|
}
|
|
1117
1133
|
}
|
|
1118
1134
|
const ra = {
|
|
@@ -1129,7 +1145,7 @@ function na(e) {
|
|
|
1129
1145
|
};
|
|
1130
1146
|
}
|
|
1131
1147
|
function ia(e) {
|
|
1132
|
-
return e === ge(e) || !
|
|
1148
|
+
return e === ge(e) || !ye(e) ? Ir(e) : na(e);
|
|
1133
1149
|
}
|
|
1134
1150
|
function sa(e) {
|
|
1135
1151
|
var t = e.getBoundingClientRect(), r = dt(t.width) / e.offsetWidth || 1, n = dt(t.height) / e.offsetHeight || 1;
|
|
@@ -1137,15 +1153,15 @@ function sa(e) {
|
|
|
1137
1153
|
}
|
|
1138
1154
|
function aa(e, t, r) {
|
|
1139
1155
|
r === void 0 && (r = !1);
|
|
1140
|
-
var n =
|
|
1156
|
+
var n = ye(t), i = ye(t) && sa(t), s = qe(t), o = ht(e, i, r), a = {
|
|
1141
1157
|
scrollLeft: 0,
|
|
1142
1158
|
scrollTop: 0
|
|
1143
1159
|
}, l = {
|
|
1144
1160
|
x: 0,
|
|
1145
1161
|
y: 0
|
|
1146
1162
|
};
|
|
1147
|
-
return (n || !n && !r) && ((
|
|
1148
|
-
$r(s)) && (a = ia(t)),
|
|
1163
|
+
return (n || !n && !r) && ((Me(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1164
|
+
$r(s)) && (a = ia(t)), ye(t) ? (l = ht(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : s && (l.x = jr(s))), {
|
|
1149
1165
|
x: o.left + a.scrollLeft - l.x,
|
|
1150
1166
|
y: o.top + a.scrollTop - l.y,
|
|
1151
1167
|
width: o.width,
|
|
@@ -1173,7 +1189,7 @@ function oa(e) {
|
|
|
1173
1189
|
}
|
|
1174
1190
|
function la(e) {
|
|
1175
1191
|
var t = oa(e);
|
|
1176
|
-
return
|
|
1192
|
+
return ys.reduce(function(r, n) {
|
|
1177
1193
|
return r.concat(t.filter(function(i) {
|
|
1178
1194
|
return i.phase === n;
|
|
1179
1195
|
}));
|
|
@@ -1231,16 +1247,16 @@ function fa(e) {
|
|
|
1231
1247
|
styles: {}
|
|
1232
1248
|
}, d = [], m = !1, v = {
|
|
1233
1249
|
state: u,
|
|
1234
|
-
setOptions: function(
|
|
1235
|
-
var
|
|
1236
|
-
g(), u.options = Object.assign({}, s, u.options,
|
|
1250
|
+
setOptions: function(M) {
|
|
1251
|
+
var x = typeof M == "function" ? M(u.options) : M;
|
|
1252
|
+
g(), u.options = Object.assign({}, s, u.options, x), u.scrollParents = {
|
|
1237
1253
|
reference: rt(a) ? Ot(a) : a.contextElement ? Ot(a.contextElement) : [],
|
|
1238
1254
|
popper: Ot(l)
|
|
1239
1255
|
};
|
|
1240
|
-
var
|
|
1241
|
-
return u.orderedModifiers =
|
|
1242
|
-
return
|
|
1243
|
-
}),
|
|
1256
|
+
var F = la(ua([].concat(n, u.options.modifiers)));
|
|
1257
|
+
return u.orderedModifiers = F.filter(function(k) {
|
|
1258
|
+
return k.enabled;
|
|
1259
|
+
}), N(), v.update();
|
|
1244
1260
|
},
|
|
1245
1261
|
// Sync update – it will always be executed, even if not necessary. This
|
|
1246
1262
|
// is useful for low frequency updates where sync behavior simplifies the
|
|
@@ -1249,24 +1265,24 @@ function fa(e) {
|
|
|
1249
1265
|
// prefer the async Popper#update method
|
|
1250
1266
|
forceUpdate: function() {
|
|
1251
1267
|
if (!m) {
|
|
1252
|
-
var
|
|
1253
|
-
if (gn(
|
|
1268
|
+
var M = u.elements, x = M.reference, F = M.popper;
|
|
1269
|
+
if (gn(x, F)) {
|
|
1254
1270
|
u.rects = {
|
|
1255
|
-
reference: aa(
|
|
1256
|
-
popper: Br(
|
|
1271
|
+
reference: aa(x, Mt(F), u.options.strategy === "fixed"),
|
|
1272
|
+
popper: Br(F)
|
|
1257
1273
|
}, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(H) {
|
|
1258
1274
|
return u.modifiersData[H.name] = Object.assign({}, H.data);
|
|
1259
1275
|
});
|
|
1260
|
-
for (var
|
|
1276
|
+
for (var k = 0; k < u.orderedModifiers.length; k++) {
|
|
1261
1277
|
if (u.reset === !0) {
|
|
1262
|
-
u.reset = !1,
|
|
1278
|
+
u.reset = !1, k = -1;
|
|
1263
1279
|
continue;
|
|
1264
1280
|
}
|
|
1265
|
-
var
|
|
1266
|
-
typeof
|
|
1281
|
+
var E = u.orderedModifiers[k], A = E.fn, _ = E.options, $ = _ === void 0 ? {} : _, I = E.name;
|
|
1282
|
+
typeof A == "function" && (u = A({
|
|
1267
1283
|
state: u,
|
|
1268
1284
|
options: $,
|
|
1269
|
-
name:
|
|
1285
|
+
name: I,
|
|
1270
1286
|
instance: v
|
|
1271
1287
|
}) || u);
|
|
1272
1288
|
}
|
|
@@ -1289,18 +1305,18 @@ function fa(e) {
|
|
|
1289
1305
|
v.setOptions(f).then(function(w) {
|
|
1290
1306
|
!m && f.onFirstUpdate && f.onFirstUpdate(w);
|
|
1291
1307
|
});
|
|
1292
|
-
function
|
|
1308
|
+
function N() {
|
|
1293
1309
|
u.orderedModifiers.forEach(function(w) {
|
|
1294
|
-
var
|
|
1295
|
-
if (typeof
|
|
1296
|
-
var
|
|
1310
|
+
var M = w.name, x = w.options, F = x === void 0 ? {} : x, k = w.effect;
|
|
1311
|
+
if (typeof k == "function") {
|
|
1312
|
+
var E = k({
|
|
1297
1313
|
state: u,
|
|
1298
|
-
name:
|
|
1314
|
+
name: M,
|
|
1299
1315
|
instance: v,
|
|
1300
|
-
options:
|
|
1301
|
-
}),
|
|
1316
|
+
options: F
|
|
1317
|
+
}), A = function() {
|
|
1302
1318
|
};
|
|
1303
|
-
d.push(
|
|
1319
|
+
d.push(E || A);
|
|
1304
1320
|
}
|
|
1305
1321
|
});
|
|
1306
1322
|
}
|
|
@@ -1365,7 +1381,7 @@ function Kt(e, t) {
|
|
|
1365
1381
|
}
|
|
1366
1382
|
return e !== e && t !== t;
|
|
1367
1383
|
}
|
|
1368
|
-
var
|
|
1384
|
+
var ba = function(t, r) {
|
|
1369
1385
|
try {
|
|
1370
1386
|
return Kt(t, r);
|
|
1371
1387
|
} catch (n) {
|
|
@@ -1374,7 +1390,7 @@ var ya = function(t, r) {
|
|
|
1374
1390
|
throw n;
|
|
1375
1391
|
}
|
|
1376
1392
|
};
|
|
1377
|
-
const
|
|
1393
|
+
const ya = /* @__PURE__ */ Jn(ba);
|
|
1378
1394
|
var wa = [], xa = function(t, r, n) {
|
|
1379
1395
|
n === void 0 && (n = {});
|
|
1380
1396
|
var i = Je.useRef(null), s = {
|
|
@@ -1400,14 +1416,14 @@ var wa = [], xa = function(t, r, n) {
|
|
|
1400
1416
|
enabled: !0,
|
|
1401
1417
|
phase: "write",
|
|
1402
1418
|
fn: function(v) {
|
|
1403
|
-
var
|
|
1419
|
+
var N = v.state, g = Object.keys(N.elements);
|
|
1404
1420
|
Ui.flushSync(function() {
|
|
1405
1421
|
l({
|
|
1406
1422
|
styles: on(g.map(function(w) {
|
|
1407
|
-
return [w,
|
|
1423
|
+
return [w, N.styles[w] || {}];
|
|
1408
1424
|
})),
|
|
1409
1425
|
attributes: on(g.map(function(w) {
|
|
1410
|
-
return [w,
|
|
1426
|
+
return [w, N.attributes[w]];
|
|
1411
1427
|
}))
|
|
1412
1428
|
});
|
|
1413
1429
|
});
|
|
@@ -1424,7 +1440,7 @@ var wa = [], xa = function(t, r, n) {
|
|
|
1424
1440
|
enabled: !1
|
|
1425
1441
|
}])
|
|
1426
1442
|
};
|
|
1427
|
-
return
|
|
1443
|
+
return ya(i.current, m) ? i.current || m : (i.current = m, m);
|
|
1428
1444
|
}, [s.onFirstUpdate, s.placement, s.strategy, s.modifiers, f]), d = Je.useRef();
|
|
1429
1445
|
return ln(function() {
|
|
1430
1446
|
d.current && d.current.setOptions(u);
|
|
@@ -1507,7 +1523,7 @@ function Qn({
|
|
|
1507
1523
|
placement: n,
|
|
1508
1524
|
modifiers: [{ name: "offset", options: { offset: i } }]
|
|
1509
1525
|
});
|
|
1510
|
-
return ka([l, r], a, { enabled: e }), /* @__PURE__ */ c(dr, { mounted: e, children: /* @__PURE__ */ c("div", { ref: f, style: { ...u.popper, ...o }, className:
|
|
1526
|
+
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
1527
|
}
|
|
1512
1528
|
function Oa(e) {
|
|
1513
1529
|
const [t, r] = ee({ width: 0, height: 0 });
|
|
@@ -1527,7 +1543,7 @@ function Oa(e) {
|
|
|
1527
1543
|
};
|
|
1528
1544
|
}, [e]), t;
|
|
1529
1545
|
}
|
|
1530
|
-
const Ea = (e) => e.label, ei =
|
|
1546
|
+
const Ea = (e) => e.label, ei = Se(
|
|
1531
1547
|
({
|
|
1532
1548
|
disabled: e,
|
|
1533
1549
|
className: t,
|
|
@@ -1543,69 +1559,69 @@ const Ea = (e) => e.label, ei = Me(
|
|
|
1543
1559
|
onOpen: d,
|
|
1544
1560
|
onSelect: m,
|
|
1545
1561
|
onClose: v,
|
|
1546
|
-
renderSelectedOption:
|
|
1562
|
+
renderSelectedOption: N = Ea,
|
|
1547
1563
|
...g
|
|
1548
1564
|
}, w) => {
|
|
1549
|
-
const
|
|
1550
|
-
Rn(w, () =>
|
|
1551
|
-
const { width:
|
|
1565
|
+
const M = it(null);
|
|
1566
|
+
Rn(w, () => M.current, []);
|
|
1567
|
+
const { width: x } = Oa(M.current), [F, k] = ut({
|
|
1552
1568
|
value: s,
|
|
1553
1569
|
defaultValue: o,
|
|
1554
|
-
onStateChange: (
|
|
1555
|
-
}), [
|
|
1570
|
+
onStateChange: (V) => void (V ? d == null ? void 0 : d() : v == null ? void 0 : v())
|
|
1571
|
+
}), [E, A] = ut({
|
|
1556
1572
|
value: r,
|
|
1557
1573
|
defaultValue: n,
|
|
1558
1574
|
onStateChange: m
|
|
1559
|
-
}),
|
|
1560
|
-
() => a.find((
|
|
1561
|
-
[a,
|
|
1575
|
+
}), _ = _e(
|
|
1576
|
+
() => a.find((V) => V.value === E),
|
|
1577
|
+
[a, E]
|
|
1562
1578
|
), $ = oe(
|
|
1563
|
-
(
|
|
1564
|
-
|
|
1579
|
+
(V) => {
|
|
1580
|
+
A(V.value), k(!1);
|
|
1565
1581
|
},
|
|
1566
|
-
[
|
|
1567
|
-
),
|
|
1568
|
-
|
|
1569
|
-
}, [
|
|
1570
|
-
e ||
|
|
1571
|
-
}, [
|
|
1572
|
-
return /* @__PURE__ */
|
|
1573
|
-
/* @__PURE__ */
|
|
1582
|
+
[A, k]
|
|
1583
|
+
), I = oe(() => {
|
|
1584
|
+
k(!1);
|
|
1585
|
+
}, [k]), H = oe(() => {
|
|
1586
|
+
e || k(!F);
|
|
1587
|
+
}, [F, e, k]);
|
|
1588
|
+
return /* @__PURE__ */ y(ze, { children: [
|
|
1589
|
+
/* @__PURE__ */ y(
|
|
1574
1590
|
"div",
|
|
1575
1591
|
{
|
|
1576
|
-
ref:
|
|
1577
|
-
className:
|
|
1592
|
+
ref: M,
|
|
1593
|
+
className: O("bbn-select", e && "bbn-select-disabled", `bbn-select-${u}`, t),
|
|
1578
1594
|
onClick: H,
|
|
1579
1595
|
tabIndex: e ? -1 : 0,
|
|
1580
1596
|
...g,
|
|
1581
1597
|
children: [
|
|
1582
|
-
/* @__PURE__ */ c("span", { children:
|
|
1583
|
-
/* @__PURE__ */ c(ss, { className:
|
|
1598
|
+
/* @__PURE__ */ c("span", { children: _ ? N(_) : i }),
|
|
1599
|
+
/* @__PURE__ */ c(ss, { className: O("bbn-select-icon", F && "bbn-select-icon-open"), size: 20 })
|
|
1584
1600
|
]
|
|
1585
1601
|
}
|
|
1586
1602
|
),
|
|
1587
1603
|
/* @__PURE__ */ c(
|
|
1588
1604
|
Qn,
|
|
1589
1605
|
{
|
|
1590
|
-
anchorEl:
|
|
1591
|
-
className:
|
|
1592
|
-
open:
|
|
1593
|
-
onClickOutside:
|
|
1606
|
+
anchorEl: M.current,
|
|
1607
|
+
className: O("bbn-select-menu custom-scrollbar", f),
|
|
1608
|
+
open: F && !e,
|
|
1609
|
+
onClickOutside: I,
|
|
1594
1610
|
offset: [0, 4],
|
|
1595
1611
|
placement: "bottom-start",
|
|
1596
|
-
style: { width:
|
|
1597
|
-
children: a.map((
|
|
1612
|
+
style: { width: x },
|
|
1613
|
+
children: a.map((V) => /* @__PURE__ */ c(
|
|
1598
1614
|
"div",
|
|
1599
1615
|
{
|
|
1600
|
-
className:
|
|
1616
|
+
className: O(
|
|
1601
1617
|
"bbn-select-option",
|
|
1602
|
-
(
|
|
1618
|
+
(_ == null ? void 0 : _.value) === V.value && "bbn-select-option-selected",
|
|
1603
1619
|
l
|
|
1604
1620
|
),
|
|
1605
|
-
onClick: () => $(
|
|
1606
|
-
children:
|
|
1621
|
+
onClick: () => $(V),
|
|
1622
|
+
children: V.label
|
|
1607
1623
|
},
|
|
1608
|
-
|
|
1624
|
+
V.value
|
|
1609
1625
|
))
|
|
1610
1626
|
}
|
|
1611
1627
|
)
|
|
@@ -1613,21 +1629,21 @@ const Ea = (e) => e.label, ei = Me(
|
|
|
1613
1629
|
}
|
|
1614
1630
|
);
|
|
1615
1631
|
ei.displayName = "Select";
|
|
1616
|
-
const hr =
|
|
1617
|
-
({ className: e, prefix: t, suffix: r, disabled: n = !1, state: i = "default", ...s }, o) => /* @__PURE__ */
|
|
1632
|
+
const hr = Se(
|
|
1633
|
+
({ className: e, prefix: t, suffix: r, disabled: n = !1, state: i = "default", ...s }, o) => /* @__PURE__ */ y("div", { className: O("bbn-input", `bbn-input-${i}`, n && "bbn-input-disabled", r && "bbn-input-has-suffix"), children: [
|
|
1618
1634
|
t && /* @__PURE__ */ c("div", { className: "bbn-input-prefix", children: t }),
|
|
1619
|
-
/* @__PURE__ */ c("input", { ref: o, className:
|
|
1635
|
+
/* @__PURE__ */ c("input", { ref: o, className: O("bbn-input-field", e), disabled: n, ...s }),
|
|
1620
1636
|
r && /* @__PURE__ */ c("div", { className: "bbn-input-suffix", children: r })
|
|
1621
1637
|
] })
|
|
1622
1638
|
);
|
|
1623
1639
|
hr.displayName = "Input";
|
|
1624
1640
|
function mr({ children: e, label: t, hint: r, state: n = "default", className: i }) {
|
|
1625
|
-
return /* @__PURE__ */
|
|
1626
|
-
t ? /* @__PURE__ */
|
|
1641
|
+
return /* @__PURE__ */ y("div", { className: O("bbn-form-control", i), children: [
|
|
1642
|
+
t ? /* @__PURE__ */ y("label", { className: "bbn-form-control-label", children: [
|
|
1627
1643
|
/* @__PURE__ */ c("div", { className: "bbn-form-control-title", children: t }),
|
|
1628
1644
|
e
|
|
1629
1645
|
] }) : e,
|
|
1630
|
-
r && /* @__PURE__ */ c("div", { className:
|
|
1646
|
+
r && /* @__PURE__ */ c("div", { className: O("bbn-form-control-hint", `bbn-form-control-hint-${n}`), children: r })
|
|
1631
1647
|
] });
|
|
1632
1648
|
}
|
|
1633
1649
|
const ti = ur({
|
|
@@ -1635,7 +1651,7 @@ const ti = ur({
|
|
|
1635
1651
|
updateDialog: () => null
|
|
1636
1652
|
});
|
|
1637
1653
|
function El({ children: e }) {
|
|
1638
|
-
const [t, r] = ee({}), n =
|
|
1654
|
+
const [t, r] = ee({}), n = _e(() => Object.values(t).some((a) => a), [t]);
|
|
1639
1655
|
le(
|
|
1640
1656
|
function() {
|
|
1641
1657
|
if (n) {
|
|
@@ -1650,7 +1666,7 @@ function El({ children: e }) {
|
|
|
1650
1666
|
r((l) => Reflect.deleteProperty(l, a) ? { ...l } : l);
|
|
1651
1667
|
}, []), s = oe((a, l) => {
|
|
1652
1668
|
r((f) => ({ ...f, [a]: l }));
|
|
1653
|
-
}, []), o =
|
|
1669
|
+
}, []), o = _e(() => ({ removeDialog: i, updateDialog: s }), [i, s]);
|
|
1654
1670
|
return /* @__PURE__ */ c(ti.Provider, { value: o, children: e });
|
|
1655
1671
|
}
|
|
1656
1672
|
function ri({ open: e = !1 } = {}) {
|
|
@@ -1677,7 +1693,7 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1677
1693
|
"div",
|
|
1678
1694
|
{
|
|
1679
1695
|
...t,
|
|
1680
|
-
className:
|
|
1696
|
+
className: O("bbn-backdrop", e ? "animate-backdrop-in" : "animate-backdrop-out", t.className)
|
|
1681
1697
|
}
|
|
1682
1698
|
), pr = ({
|
|
1683
1699
|
children: e,
|
|
@@ -1690,11 +1706,11 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1690
1706
|
...a
|
|
1691
1707
|
}) => {
|
|
1692
1708
|
const { mounted: l, unmount: f } = ri({ open: t });
|
|
1693
|
-
return /* @__PURE__ */
|
|
1694
|
-
/* @__PURE__ */ c("div", { ...a, className:
|
|
1709
|
+
return /* @__PURE__ */ y(dr, { mounted: l, children: [
|
|
1710
|
+
/* @__PURE__ */ c("div", { ...a, className: O("bbn-dialog-wrapper", r), children: /* @__PURE__ */ c(
|
|
1695
1711
|
"div",
|
|
1696
1712
|
{
|
|
1697
|
-
className:
|
|
1713
|
+
className: O("bbn-dialog", t ? "animate-modal-in" : "animate-modal-out", o),
|
|
1698
1714
|
onAnimationEnd: f,
|
|
1699
1715
|
children: e
|
|
1700
1716
|
}
|
|
@@ -1721,7 +1737,7 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1721
1737
|
return /* @__PURE__ */ c(
|
|
1722
1738
|
"div",
|
|
1723
1739
|
{
|
|
1724
|
-
className:
|
|
1740
|
+
className: O(
|
|
1725
1741
|
"flex items-center justify-center",
|
|
1726
1742
|
i && {
|
|
1727
1743
|
default: "bg-accent-secondary/10",
|
|
@@ -1773,7 +1789,7 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1773
1789
|
className: e = "",
|
|
1774
1790
|
size: t = 24,
|
|
1775
1791
|
variant: r = "primary"
|
|
1776
|
-
}) => /* @__PURE__ */ c(Hr, { variant: r, background: !0, rounded: !0, className: e, children: /* @__PURE__ */
|
|
1792
|
+
}) => /* @__PURE__ */ c(Hr, { variant: r, background: !0, rounded: !0, className: e, children: /* @__PURE__ */ y(
|
|
1777
1793
|
"svg",
|
|
1778
1794
|
{
|
|
1779
1795
|
style: { width: t, height: t },
|
|
@@ -1799,7 +1815,7 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1799
1815
|
viewBox: "0 0 14 16",
|
|
1800
1816
|
fill: "none",
|
|
1801
1817
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1802
|
-
className:
|
|
1818
|
+
className: O("transition-opacity duration-200", i, e),
|
|
1803
1819
|
children: /* @__PURE__ */ c(
|
|
1804
1820
|
"path",
|
|
1805
1821
|
{
|
|
@@ -1823,7 +1839,7 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1823
1839
|
viewBox: "0 0 14 14",
|
|
1824
1840
|
fill: "none",
|
|
1825
1841
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1826
|
-
className:
|
|
1842
|
+
className: O("transition-opacity duration-200", i, e),
|
|
1827
1843
|
children: /* @__PURE__ */ c(
|
|
1828
1844
|
"path",
|
|
1829
1845
|
{
|
|
@@ -1847,7 +1863,7 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1847
1863
|
viewBox: "0 0 22 20",
|
|
1848
1864
|
fill: "none",
|
|
1849
1865
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1850
|
-
className:
|
|
1866
|
+
className: O("transition-opacity duration-200", i, e),
|
|
1851
1867
|
children: /* @__PURE__ */ c(
|
|
1852
1868
|
"path",
|
|
1853
1869
|
{
|
|
@@ -1864,14 +1880,14 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1864
1880
|
color: n
|
|
1865
1881
|
}) => {
|
|
1866
1882
|
const i = n || Tt[r];
|
|
1867
|
-
return /* @__PURE__ */
|
|
1883
|
+
return /* @__PURE__ */ y(
|
|
1868
1884
|
"svg",
|
|
1869
1885
|
{
|
|
1870
1886
|
style: { width: t, height: t },
|
|
1871
1887
|
viewBox: "0 0 20 20",
|
|
1872
1888
|
fill: "none",
|
|
1873
1889
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1874
|
-
className:
|
|
1890
|
+
className: O("transition-opacity duration-200", i, e),
|
|
1875
1891
|
children: [
|
|
1876
1892
|
/* @__PURE__ */ c(
|
|
1877
1893
|
"rect",
|
|
@@ -1901,14 +1917,14 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1901
1917
|
color: n
|
|
1902
1918
|
}) => {
|
|
1903
1919
|
const i = n || Tt[r];
|
|
1904
|
-
return /* @__PURE__ */
|
|
1920
|
+
return /* @__PURE__ */ y(
|
|
1905
1921
|
"svg",
|
|
1906
1922
|
{
|
|
1907
1923
|
style: { width: t, height: t },
|
|
1908
1924
|
viewBox: "0 0 20 20",
|
|
1909
1925
|
fill: "none",
|
|
1910
1926
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1911
|
-
className:
|
|
1927
|
+
className: O("transition-opacity duration-200", i, e),
|
|
1912
1928
|
children: [
|
|
1913
1929
|
/* @__PURE__ */ c(
|
|
1914
1930
|
"rect",
|
|
@@ -1941,12 +1957,12 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1941
1957
|
"accent-secondary": "text-accent-secondary"
|
|
1942
1958
|
}, Rt = ({ children: e, open: t = !1, className: r, onClose: n, ...i }) => {
|
|
1943
1959
|
const { mounted: s, unmount: o } = ri({ open: t });
|
|
1944
|
-
return /* @__PURE__ */
|
|
1945
|
-
/* @__PURE__ */
|
|
1960
|
+
return /* @__PURE__ */ y(dr, { mounted: s, children: [
|
|
1961
|
+
/* @__PURE__ */ y(
|
|
1946
1962
|
"div",
|
|
1947
1963
|
{
|
|
1948
1964
|
...i,
|
|
1949
|
-
className:
|
|
1965
|
+
className: O(
|
|
1950
1966
|
"bbn-dialog-mobile",
|
|
1951
1967
|
t ? "animate-mobile-modal-in" : "animate-mobile-modal-out",
|
|
1952
1968
|
r
|
|
@@ -1968,8 +1984,8 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1968
1984
|
),
|
|
1969
1985
|
/* @__PURE__ */ c(ni, { open: t, onClick: n })
|
|
1970
1986
|
] });
|
|
1971
|
-
}, vr = ({ className: e, children: t, title: r, onClose: n }) => /* @__PURE__ */
|
|
1972
|
-
/* @__PURE__ */
|
|
1987
|
+
}, vr = ({ className: e, children: t, title: r, onClose: n }) => /* @__PURE__ */ y("div", { className: O("bbn-dialog-header", e), children: [
|
|
1988
|
+
/* @__PURE__ */ y("div", { className: "bbn-dialog-title", children: [
|
|
1973
1989
|
/* @__PURE__ */ c(Mr, { variant: "h5", children: r }),
|
|
1974
1990
|
!!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(
|
|
1975
1991
|
"path",
|
|
@@ -1980,62 +1996,62 @@ const ni = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1980
1996
|
) }) })
|
|
1981
1997
|
] }),
|
|
1982
1998
|
t
|
|
1983
|
-
] }), gr = (e) => /* @__PURE__ */ c("div", { ...e, className:
|
|
1999
|
+
] }), 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
2000
|
function Sl({ className: e, ...t }) {
|
|
1985
|
-
return /* @__PURE__ */ c("span", { ...t, className:
|
|
2001
|
+
return /* @__PURE__ */ c("span", { ...t, className: O("bbn-chip", e) });
|
|
1986
2002
|
}
|
|
1987
2003
|
function Al({ size: e = 40, className: t }) {
|
|
1988
2004
|
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" }) }) });
|
|
1989
2005
|
}
|
|
1990
|
-
var ai = "Expected a function",
|
|
2006
|
+
var ai = "Expected a function", bn = NaN, _a = "[object Symbol]", Ma = /^\s+|\s+$/g, Ta = /^[-+]0x[0-9a-f]+$/i, Ra = /^0b[01]+$/i, Ba = /^0o[0-7]+$/i, Pa = parseInt, Ia = typeof Gt == "object" && Gt && Gt.Object === Object && Gt, ja = typeof self == "object" && self && self.Object === Object && self, $a = Ia || ja || Function("return this")(), Ha = Object.prototype, Wa = Ha.toString, Ua = Math.max, za = Math.min, Nr = function() {
|
|
1991
2007
|
return $a.Date.now();
|
|
1992
2008
|
};
|
|
1993
2009
|
function qa(e, t, r) {
|
|
1994
2010
|
var n, i, s, o, a, l, f = 0, u = !1, d = !1, m = !0;
|
|
1995
2011
|
if (typeof e != "function")
|
|
1996
2012
|
throw new TypeError(ai);
|
|
1997
|
-
t =
|
|
1998
|
-
function v(
|
|
1999
|
-
var
|
|
2000
|
-
return n = i = void 0, f =
|
|
2013
|
+
t = yn(t) || 0, ir(r) && (u = !!r.leading, d = "maxWait" in r, s = d ? Ua(yn(r.maxWait) || 0, t) : s, m = "trailing" in r ? !!r.trailing : m);
|
|
2014
|
+
function v(A) {
|
|
2015
|
+
var _ = n, $ = i;
|
|
2016
|
+
return n = i = void 0, f = A, o = e.apply($, _), o;
|
|
2001
2017
|
}
|
|
2002
|
-
function
|
|
2003
|
-
return f =
|
|
2018
|
+
function N(A) {
|
|
2019
|
+
return f = A, a = setTimeout(M, t), u ? v(A) : o;
|
|
2004
2020
|
}
|
|
2005
|
-
function g(
|
|
2006
|
-
var
|
|
2007
|
-
return d ? za(
|
|
2021
|
+
function g(A) {
|
|
2022
|
+
var _ = A - l, $ = A - f, I = t - _;
|
|
2023
|
+
return d ? za(I, s - $) : I;
|
|
2008
2024
|
}
|
|
2009
|
-
function w(
|
|
2010
|
-
var
|
|
2011
|
-
return l === void 0 ||
|
|
2025
|
+
function w(A) {
|
|
2026
|
+
var _ = A - l, $ = A - f;
|
|
2027
|
+
return l === void 0 || _ >= t || _ < 0 || d && $ >= s;
|
|
2012
2028
|
}
|
|
2013
|
-
function
|
|
2014
|
-
var
|
|
2015
|
-
if (w(
|
|
2016
|
-
return
|
|
2017
|
-
a = setTimeout(
|
|
2029
|
+
function M() {
|
|
2030
|
+
var A = Nr();
|
|
2031
|
+
if (w(A))
|
|
2032
|
+
return x(A);
|
|
2033
|
+
a = setTimeout(M, g(A));
|
|
2018
2034
|
}
|
|
2019
|
-
function
|
|
2020
|
-
return a = void 0, m && n ? v(
|
|
2035
|
+
function x(A) {
|
|
2036
|
+
return a = void 0, m && n ? v(A) : (n = i = void 0, o);
|
|
2021
2037
|
}
|
|
2022
|
-
function
|
|
2038
|
+
function F() {
|
|
2023
2039
|
a !== void 0 && clearTimeout(a), f = 0, n = l = i = a = void 0;
|
|
2024
2040
|
}
|
|
2025
|
-
function
|
|
2026
|
-
return a === void 0 ? o :
|
|
2041
|
+
function k() {
|
|
2042
|
+
return a === void 0 ? o : x(Nr());
|
|
2027
2043
|
}
|
|
2028
|
-
function
|
|
2029
|
-
var
|
|
2030
|
-
if (n = arguments, i = this, l =
|
|
2044
|
+
function E() {
|
|
2045
|
+
var A = Nr(), _ = w(A);
|
|
2046
|
+
if (n = arguments, i = this, l = A, _) {
|
|
2031
2047
|
if (a === void 0)
|
|
2032
|
-
return
|
|
2048
|
+
return N(l);
|
|
2033
2049
|
if (d)
|
|
2034
|
-
return a = setTimeout(
|
|
2050
|
+
return a = setTimeout(M, t), v(l);
|
|
2035
2051
|
}
|
|
2036
|
-
return a === void 0 && (a = setTimeout(
|
|
2052
|
+
return a === void 0 && (a = setTimeout(M, t)), o;
|
|
2037
2053
|
}
|
|
2038
|
-
return
|
|
2054
|
+
return E.cancel = F, E.flush = k, E;
|
|
2039
2055
|
}
|
|
2040
2056
|
function Za(e, t, r) {
|
|
2041
2057
|
var n = !0, i = !0;
|
|
@@ -2057,11 +2073,11 @@ function Xa(e) {
|
|
|
2057
2073
|
function Ga(e) {
|
|
2058
2074
|
return typeof e == "symbol" || Xa(e) && Wa.call(e) == _a;
|
|
2059
2075
|
}
|
|
2060
|
-
function
|
|
2076
|
+
function yn(e) {
|
|
2061
2077
|
if (typeof e == "number")
|
|
2062
2078
|
return e;
|
|
2063
2079
|
if (Ga(e))
|
|
2064
|
-
return
|
|
2080
|
+
return bn;
|
|
2065
2081
|
if (ir(e)) {
|
|
2066
2082
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
2067
2083
|
e = ir(t) ? t + "" : t;
|
|
@@ -2070,7 +2086,7 @@ function bn(e) {
|
|
|
2070
2086
|
return e === 0 ? e : +e;
|
|
2071
2087
|
e = e.replace(Ma, "");
|
|
2072
2088
|
var r = Ra.test(e);
|
|
2073
|
-
return r || Ba.test(e) ? Pa(e.slice(2), r ? 2 : 8) : Ta.test(e) ?
|
|
2089
|
+
return r || Ba.test(e) ? Pa(e.slice(2), r ? 2 : 8) : Ta.test(e) ? bn : +e;
|
|
2074
2090
|
}
|
|
2075
2091
|
var Ya = Za;
|
|
2076
2092
|
const oi = /* @__PURE__ */ Jn(Ya);
|
|
@@ -2123,22 +2139,22 @@ function Qa({
|
|
|
2123
2139
|
{
|
|
2124
2140
|
variant: "caption",
|
|
2125
2141
|
as: "th",
|
|
2126
|
-
className:
|
|
2142
|
+
className: O("bbn-cell-left", n && "bbn-table-sortable", m, i && s ? "bbn-frozen-shadow" : "", t),
|
|
2127
2143
|
onClick: () => {
|
|
2128
2144
|
if (n && e) {
|
|
2129
|
-
const
|
|
2130
|
-
f == null || f(e,
|
|
2145
|
+
const N = a.find((g) => g.key === e);
|
|
2146
|
+
f == null || f(e, N == null ? void 0 : N.sorter);
|
|
2131
2147
|
}
|
|
2132
2148
|
},
|
|
2133
2149
|
"data-column": e,
|
|
2134
2150
|
...o,
|
|
2135
|
-
children: /* @__PURE__ */
|
|
2151
|
+
children: /* @__PURE__ */ y("div", { className: "flex items-center justify-between gap-1", children: [
|
|
2136
2152
|
/* @__PURE__ */ c("span", { children: r }),
|
|
2137
|
-
n && /* @__PURE__ */
|
|
2153
|
+
n && /* @__PURE__ */ y("span", { className: "bbn-table-sort-icons", children: [
|
|
2138
2154
|
/* @__PURE__ */ c(
|
|
2139
2155
|
as,
|
|
2140
2156
|
{
|
|
2141
|
-
className:
|
|
2157
|
+
className: O(
|
|
2142
2158
|
"bbn-sort-icon bbn-sort-icon-up",
|
|
2143
2159
|
d === "asc" ? "bbn-sort-icon-active" : "bbn-sort-icon-inactive"
|
|
2144
2160
|
)
|
|
@@ -2147,7 +2163,7 @@ function Qa({
|
|
|
2147
2163
|
/* @__PURE__ */ c(
|
|
2148
2164
|
is,
|
|
2149
2165
|
{
|
|
2150
|
-
className:
|
|
2166
|
+
className: O(
|
|
2151
2167
|
"bbn-sort-icon bbn-sort-icon-down",
|
|
2152
2168
|
d === "desc" ? "bbn-sort-icon-active" : "bbn-sort-icon-inactive"
|
|
2153
2169
|
)
|
|
@@ -2165,9 +2181,9 @@ function eo(e, t) {
|
|
|
2165
2181
|
const f = ((m = l[o]) == null ? void 0 : m.direction) ?? null, u = f === null ? "asc" : f === "asc" ? "desc" : null;
|
|
2166
2182
|
if (u === null)
|
|
2167
2183
|
return Object.fromEntries(
|
|
2168
|
-
Object.entries(l).filter(([v]) => v !== o).map(([v,
|
|
2184
|
+
Object.entries(l).filter(([v]) => v !== o).map(([v, N]) => [
|
|
2169
2185
|
v,
|
|
2170
|
-
{ ...
|
|
2186
|
+
{ ...N, priority: N.priority > l[o].priority ? N.priority - 1 : N.priority }
|
|
2171
2187
|
])
|
|
2172
2188
|
);
|
|
2173
2189
|
const d = Math.max(0, ...Object.values(l).map((v) => v.priority));
|
|
@@ -2176,7 +2192,7 @@ function eo(e, t) {
|
|
|
2176
2192
|
[o]: { direction: u, priority: d + 1 }
|
|
2177
2193
|
};
|
|
2178
2194
|
});
|
|
2179
|
-
}, []), s =
|
|
2195
|
+
}, []), s = _e(() => {
|
|
2180
2196
|
const o = Object.entries(r).filter(([, a]) => a.direction !== null).toSorted((a, l) => l[1].priority - a[1].priority).map(([a, l]) => ({
|
|
2181
2197
|
column: t.find((f) => f.key === a),
|
|
2182
2198
|
direction: l.direction
|
|
@@ -2206,7 +2222,7 @@ function to({
|
|
|
2206
2222
|
{
|
|
2207
2223
|
variant: "body2",
|
|
2208
2224
|
as: "td",
|
|
2209
|
-
className:
|
|
2225
|
+
className: O("bbn-cell-left", a, i && s ? "bbn-frozen-shadow" : "", e),
|
|
2210
2226
|
"data-column": n,
|
|
2211
2227
|
...o,
|
|
2212
2228
|
children: t ? t(r) : r
|
|
@@ -2225,7 +2241,7 @@ function ro({
|
|
|
2225
2241
|
return /* @__PURE__ */ c(
|
|
2226
2242
|
"tr",
|
|
2227
2243
|
{
|
|
2228
|
-
className:
|
|
2244
|
+
className: O(
|
|
2229
2245
|
r && "selected",
|
|
2230
2246
|
!!i && n && "cursor-pointer",
|
|
2231
2247
|
!n && "opacity-50"
|
|
@@ -2251,70 +2267,71 @@ function no({
|
|
|
2251
2267
|
columns: t,
|
|
2252
2268
|
className: r,
|
|
2253
2269
|
wrapperClassName: n,
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2270
|
+
fluid: i = !1,
|
|
2271
|
+
hasMore: s = !1,
|
|
2272
|
+
loading: o = !1,
|
|
2273
|
+
onLoadMore: a,
|
|
2274
|
+
onRowSelect: l,
|
|
2275
|
+
isRowSelectable: f,
|
|
2276
|
+
selectedRow: u,
|
|
2277
|
+
defaultSelectedRow: d,
|
|
2278
|
+
onSelectedRowChange: m,
|
|
2279
|
+
...v
|
|
2280
|
+
}, N) {
|
|
2281
|
+
const g = it(null);
|
|
2282
|
+
Rn(N, () => g.current, []);
|
|
2283
|
+
const { sortStates: w, handleColumnSort: M, sortedData: x } = eo(e, t), { isScrolledTop: F } = Ka(g, { onLoadMore: a, hasMore: s, loading: o }), { isLeftScrolled: k, isRightScrolled: E } = Ja(g), [A, _] = ut({
|
|
2284
|
+
value: u,
|
|
2285
|
+
defaultValue: d ?? null,
|
|
2286
|
+
onStateChange: m
|
|
2287
|
+
}), $ = oe(
|
|
2288
|
+
(V) => {
|
|
2289
|
+
if (!l || f && !f(V)) return;
|
|
2290
|
+
const T = A === V.id ? null : V.id;
|
|
2291
|
+
_(T), l(T === null ? null : V);
|
|
2275
2292
|
},
|
|
2276
|
-
[
|
|
2277
|
-
),
|
|
2293
|
+
[l, f, A, _]
|
|
2294
|
+
), I = _e(
|
|
2278
2295
|
() => ({
|
|
2279
|
-
data:
|
|
2296
|
+
data: x,
|
|
2280
2297
|
columns: t,
|
|
2281
|
-
sortStates:
|
|
2282
|
-
onColumnSort:
|
|
2283
|
-
onRowSelect:
|
|
2298
|
+
sortStates: w,
|
|
2299
|
+
onColumnSort: M,
|
|
2300
|
+
onRowSelect: $
|
|
2284
2301
|
}),
|
|
2285
|
-
[
|
|
2286
|
-
);
|
|
2287
|
-
return /* @__PURE__ */ c(li.Provider, { value:
|
|
2288
|
-
/* @__PURE__ */ c("thead", { className:
|
|
2302
|
+
[x, t, w, M, $]
|
|
2303
|
+
), H = _e(() => t.some((V) => V.header && V.header !== ""), [t]);
|
|
2304
|
+
return /* @__PURE__ */ c(li.Provider, { value: I, children: /* @__PURE__ */ c("div", { ref: g, className: O("bbn-table-wrapper", i && "bbn-table-wrapper-fluid", n), children: /* @__PURE__ */ y("table", { className: O("bbn-table", i && "bbn-table-fluid", r), ...v, children: [
|
|
2305
|
+
/* @__PURE__ */ c("thead", { className: O("bbn-table-header", F && "scrolled-top", !H && "hidden"), children: /* @__PURE__ */ c("tr", { children: t.map((V) => /* @__PURE__ */ c(
|
|
2289
2306
|
Qa,
|
|
2290
2307
|
{
|
|
2291
|
-
className:
|
|
2292
|
-
name:
|
|
2293
|
-
sorter:
|
|
2294
|
-
frozen:
|
|
2295
|
-
showFrozenShadow:
|
|
2296
|
-
children:
|
|
2308
|
+
className: V.headerClassName,
|
|
2309
|
+
name: V.key,
|
|
2310
|
+
sorter: V.sorter,
|
|
2311
|
+
frozen: V.frozen,
|
|
2312
|
+
showFrozenShadow: V.frozen === "left" && k || V.frozen === "right" && E,
|
|
2313
|
+
children: V.header
|
|
2297
2314
|
},
|
|
2298
|
-
|
|
2315
|
+
V.key
|
|
2299
2316
|
)) }) }),
|
|
2300
|
-
/* @__PURE__ */ c("tbody", { className: "bbn-table-body", children:
|
|
2317
|
+
/* @__PURE__ */ c("tbody", { className: "bbn-table-body", children: x.map((V) => /* @__PURE__ */ c(
|
|
2301
2318
|
ro,
|
|
2302
2319
|
{
|
|
2303
|
-
row:
|
|
2320
|
+
row: V,
|
|
2304
2321
|
columns: t,
|
|
2305
|
-
isSelected:
|
|
2306
|
-
isSelectable:
|
|
2307
|
-
onSelect:
|
|
2308
|
-
isLeftScrolled:
|
|
2309
|
-
isRightScrolled:
|
|
2322
|
+
isSelected: A === V.id,
|
|
2323
|
+
isSelectable: f ? f(V) : !0,
|
|
2324
|
+
onSelect: $,
|
|
2325
|
+
isLeftScrolled: k,
|
|
2326
|
+
isRightScrolled: E
|
|
2310
2327
|
},
|
|
2311
|
-
|
|
2328
|
+
V.id
|
|
2312
2329
|
)) })
|
|
2313
2330
|
] }) }) });
|
|
2314
2331
|
}
|
|
2315
|
-
const io =
|
|
2332
|
+
const io = Se(no);
|
|
2316
2333
|
function so({ as: e = "div", className: t, children: r }) {
|
|
2317
|
-
return Lr(e, { className:
|
|
2334
|
+
return Lr(e, { className: O("bbn-card", t) }, r);
|
|
2318
2335
|
}
|
|
2319
2336
|
function Ll(e) {
|
|
2320
2337
|
const [t = !1, r] = ut({
|
|
@@ -2322,9 +2339,9 @@ function Ll(e) {
|
|
|
2322
2339
|
defaultValue: e.defaultValue,
|
|
2323
2340
|
onStateChange: e.onChange
|
|
2324
2341
|
});
|
|
2325
|
-
return /* @__PURE__ */
|
|
2342
|
+
return /* @__PURE__ */ y("div", { className: "bbn-toggle", onClick: () => void r(!t), children: [
|
|
2326
2343
|
/* @__PURE__ */ c("span", { className: "bbn-toggle-bg", children: e.activeIcon }),
|
|
2327
|
-
/* @__PURE__ */ c("span", { className:
|
|
2344
|
+
/* @__PURE__ */ c("span", { className: O("bbn-toggle-control", t && "bbn-toggle-control-active") }),
|
|
2328
2345
|
/* @__PURE__ */ c("span", { className: "bbn-toggle-bg", children: e.inactiveIcon })
|
|
2329
2346
|
] });
|
|
2330
2347
|
}
|
|
@@ -2342,17 +2359,17 @@ function Vl({ className: e, orientation: t = "vertical", children: r }) {
|
|
|
2342
2359
|
) });
|
|
2343
2360
|
}
|
|
2344
2361
|
function Fl({ className: e, orientation: t = "horizontal", title: r, value: n, suffix: i }) {
|
|
2345
|
-
return /* @__PURE__ */
|
|
2362
|
+
return /* @__PURE__ */ y("div", { className: O("bbn-list-item", `bbn-list-item-${t}`, e), children: [
|
|
2346
2363
|
/* @__PURE__ */ c(
|
|
2347
2364
|
W,
|
|
2348
2365
|
{
|
|
2349
2366
|
as: "div",
|
|
2350
|
-
className:
|
|
2367
|
+
className: O("bbn-list-title", `bbn-list-title-${t}`),
|
|
2351
2368
|
variant: t === "horizontal" ? "body1" : "body2",
|
|
2352
2369
|
children: r
|
|
2353
2370
|
}
|
|
2354
2371
|
),
|
|
2355
|
-
/* @__PURE__ */
|
|
2372
|
+
/* @__PURE__ */ y(W, { as: "div", className: O("bbn-list-value", `bbn-list-value-${t}`), variant: "body1", children: [
|
|
2356
2373
|
n,
|
|
2357
2374
|
i
|
|
2358
2375
|
] })
|
|
@@ -2369,25 +2386,33 @@ function Dl({
|
|
|
2369
2386
|
contentClassName: a
|
|
2370
2387
|
}) {
|
|
2371
2388
|
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__ */
|
|
2389
|
+
return /* @__PURE__ */ y("div", { className: O("bbn-badge", s), children: [
|
|
2373
2390
|
e,
|
|
2374
|
-
l && /* @__PURE__ */ c("span", { className:
|
|
2391
|
+
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
2392
|
] });
|
|
2376
2393
|
}
|
|
2377
2394
|
const Bt = ({
|
|
2378
2395
|
children: e,
|
|
2379
2396
|
style: t,
|
|
2380
|
-
|
|
2381
|
-
|
|
2397
|
+
variant: r = "contained",
|
|
2398
|
+
className: n
|
|
2399
|
+
}) => /* @__PURE__ */ c(
|
|
2400
|
+
"div",
|
|
2401
|
+
{
|
|
2402
|
+
className: O("bbn-subsection", `bbn-subsection-${r}`, n),
|
|
2403
|
+
style: t,
|
|
2404
|
+
children: e
|
|
2405
|
+
}
|
|
2406
|
+
);
|
|
2382
2407
|
function oo(e) {
|
|
2383
2408
|
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
2409
|
}
|
|
2385
2410
|
function lo({ counter: e, max: t, onAdd: r, alwaysShowCounter: n = !1 }) {
|
|
2386
2411
|
const i = e < t, s = 0 < e || n && e === 0;
|
|
2387
|
-
return /* @__PURE__ */
|
|
2412
|
+
return /* @__PURE__ */ y(
|
|
2388
2413
|
"div",
|
|
2389
2414
|
{
|
|
2390
|
-
className:
|
|
2415
|
+
className: O(
|
|
2391
2416
|
"bg-primary-highlight flex overflow-hidden rounded-md border border-accent-primary w-fit",
|
|
2392
2417
|
i && "cursor-pointer",
|
|
2393
2418
|
!s && !i && "hidden",
|
|
@@ -2396,7 +2421,7 @@ function lo({ counter: e, max: t, onAdd: r, alwaysShowCounter: n = !1 }) {
|
|
|
2396
2421
|
onClick: i ? r : void 0,
|
|
2397
2422
|
children: [
|
|
2398
2423
|
i && /* @__PURE__ */ c("div", { className: "flex h-10 w-10 items-center justify-center", children: /* @__PURE__ */ c(oo, { size: 20 }) }),
|
|
2399
|
-
s && /* @__PURE__ */
|
|
2424
|
+
s && /* @__PURE__ */ y("div", { className: O(
|
|
2400
2425
|
"flex h-10 items-center px-2 text-sm sm:px-4 sm:text-base",
|
|
2401
2426
|
i && "border-l border-accent-primary"
|
|
2402
2427
|
), children: [
|
|
@@ -2426,10 +2451,10 @@ const ci = ur(void 0), ui = () => Dt(ci), co = ({ children: e, value: t }) => /*
|
|
|
2426
2451
|
left: "text-left",
|
|
2427
2452
|
center: "text-center",
|
|
2428
2453
|
right: "text-right"
|
|
2429
|
-
}, v = () => f || r ? /* @__PURE__ */
|
|
2454
|
+
}, v = () => f || r ? /* @__PURE__ */ y(
|
|
2430
2455
|
"div",
|
|
2431
2456
|
{
|
|
2432
|
-
className:
|
|
2457
|
+
className: O(
|
|
2433
2458
|
"flex items-center p-4",
|
|
2434
2459
|
u && "border-b border-[#38708533] dark:border-[#404040]"
|
|
2435
2460
|
),
|
|
@@ -2466,7 +2491,7 @@ const ci = ur(void 0), ui = () => Dt(ci), co = ({ children: e, value: t }) => /*
|
|
|
2466
2491
|
r && /* @__PURE__ */ c(
|
|
2467
2492
|
"h3",
|
|
2468
2493
|
{
|
|
2469
|
-
className:
|
|
2494
|
+
className: O(
|
|
2470
2495
|
"flex-1 text-sm font-medium text-accent-primary",
|
|
2471
2496
|
f ? "ml-3" : "",
|
|
2472
2497
|
m[s]
|
|
@@ -2476,15 +2501,15 @@ const ci = ur(void 0), ui = () => Dt(ci), co = ({ children: e, value: t }) => /*
|
|
|
2476
2501
|
)
|
|
2477
2502
|
]
|
|
2478
2503
|
}
|
|
2479
|
-
) : null,
|
|
2504
|
+
) : null, N = () => /* @__PURE__ */ y(ze, { children: [
|
|
2480
2505
|
v(),
|
|
2481
2506
|
/* @__PURE__ */ c("div", { className: "flex-1 overflow-y-auto", children: n })
|
|
2482
2507
|
] });
|
|
2483
|
-
return a ? /* @__PURE__ */
|
|
2508
|
+
return a ? /* @__PURE__ */ y(dr, { mounted: !0, rootClassName: "menu-drawer-portal", children: [
|
|
2484
2509
|
d && /* @__PURE__ */ c(
|
|
2485
2510
|
"div",
|
|
2486
2511
|
{
|
|
2487
|
-
className:
|
|
2512
|
+
className: O(
|
|
2488
2513
|
"fixed inset-0 z-40 bg-black/50 transition-opacity duration-300",
|
|
2489
2514
|
e ? "opacity-100" : "pointer-events-none opacity-0"
|
|
2490
2515
|
),
|
|
@@ -2494,7 +2519,7 @@ const ci = ur(void 0), ui = () => Dt(ci), co = ({ children: e, value: t }) => /*
|
|
|
2494
2519
|
/* @__PURE__ */ c(
|
|
2495
2520
|
"div",
|
|
2496
2521
|
{
|
|
2497
|
-
className:
|
|
2522
|
+
className: O(
|
|
2498
2523
|
"transform transition-transform duration-300 ease-in-out",
|
|
2499
2524
|
"bg-[#FFFFFF] dark:bg-[#252525]",
|
|
2500
2525
|
"fixed inset-y-0 right-0 z-50",
|
|
@@ -2502,20 +2527,20 @@ const ci = ur(void 0), ui = () => Dt(ci), co = ({ children: e, value: t }) => /*
|
|
|
2502
2527
|
e ? "translate-x-0" : "translate-x-full",
|
|
2503
2528
|
i
|
|
2504
2529
|
),
|
|
2505
|
-
children:
|
|
2530
|
+
children: N()
|
|
2506
2531
|
}
|
|
2507
2532
|
)
|
|
2508
2533
|
] }) : /* @__PURE__ */ c(
|
|
2509
2534
|
"div",
|
|
2510
2535
|
{
|
|
2511
|
-
className:
|
|
2536
|
+
className: O(
|
|
2512
2537
|
"transform transition-transform duration-300 ease-in-out",
|
|
2513
2538
|
"bg-[#FFFFFF] dark:bg-[#252525]",
|
|
2514
2539
|
"absolute inset-0 rounded-lg",
|
|
2515
2540
|
e ? "translate-x-0" : "translate-x-full",
|
|
2516
2541
|
i
|
|
2517
2542
|
),
|
|
2518
|
-
children:
|
|
2543
|
+
children: N()
|
|
2519
2544
|
}
|
|
2520
2545
|
);
|
|
2521
2546
|
};
|
|
@@ -2537,11 +2562,11 @@ const di = ({
|
|
|
2537
2562
|
className: o,
|
|
2538
2563
|
mobileMode: a = "dialog"
|
|
2539
2564
|
}) => {
|
|
2540
|
-
const [l, f] = ee(!1), u = it(null), d = Pt(), m = r !== void 0 ? r : l, v = (
|
|
2541
|
-
r === void 0 && f(
|
|
2542
|
-
},
|
|
2543
|
-
return /* @__PURE__ */
|
|
2544
|
-
/* @__PURE__ */ c("div", { ref: u, className: "inline-block", children:
|
|
2565
|
+
const [l, f] = ee(!1), u = it(null), d = Pt(), m = r !== void 0 ? r : l, v = (M) => {
|
|
2566
|
+
r === void 0 && f(M), n == null || n(M);
|
|
2567
|
+
}, N = () => 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" });
|
|
2568
|
+
return /* @__PURE__ */ y(co, { value: { isOpen: m, setIsOpen: v, onClose: N, isMobile: d }, children: [
|
|
2569
|
+
/* @__PURE__ */ c("div", { ref: u, className: "inline-block", children: P.isValidElement(w) && P.cloneElement(w, {
|
|
2545
2570
|
onClick: () => v(!m),
|
|
2546
2571
|
"aria-haspopup": "true",
|
|
2547
2572
|
"aria-expanded": m
|
|
@@ -2550,8 +2575,8 @@ const di = ({
|
|
|
2550
2575
|
Rt,
|
|
2551
2576
|
{
|
|
2552
2577
|
open: m,
|
|
2553
|
-
onClose:
|
|
2554
|
-
className:
|
|
2578
|
+
onClose: N,
|
|
2579
|
+
className: O(
|
|
2555
2580
|
"relative bg-[#FFFFFF] dark:bg-[#252525] text-primary-main",
|
|
2556
2581
|
o
|
|
2557
2582
|
),
|
|
@@ -2561,8 +2586,8 @@ const di = ({
|
|
|
2561
2586
|
fi,
|
|
2562
2587
|
{
|
|
2563
2588
|
isOpen: m,
|
|
2564
|
-
onClose:
|
|
2565
|
-
onBackdropClick:
|
|
2589
|
+
onClose: N,
|
|
2590
|
+
onBackdropClick: N,
|
|
2566
2591
|
fullHeight: !0,
|
|
2567
2592
|
fullWidth: !0,
|
|
2568
2593
|
showBackButton: !0,
|
|
@@ -2576,8 +2601,8 @@ const di = ({
|
|
|
2576
2601
|
open: m,
|
|
2577
2602
|
offset: s,
|
|
2578
2603
|
placement: i,
|
|
2579
|
-
onClickOutside:
|
|
2580
|
-
className:
|
|
2604
|
+
onClickOutside: N,
|
|
2605
|
+
className: O(
|
|
2581
2606
|
"rounded-lg border border-[#38708533] bg-[#FFFFFF] shadow-lg dark:border-[#404040] dark:bg-[#252525]",
|
|
2582
2607
|
"min-w-[294px]",
|
|
2583
2608
|
o
|
|
@@ -2606,15 +2631,15 @@ const di = ({
|
|
|
2606
2631
|
{
|
|
2607
2632
|
onClick: d,
|
|
2608
2633
|
disabled: i,
|
|
2609
|
-
className:
|
|
2634
|
+
className: O("w-full text-left", i && "cursor-not-allowed opacity-50", s),
|
|
2610
2635
|
children: o
|
|
2611
2636
|
}
|
|
2612
|
-
) : /* @__PURE__ */
|
|
2637
|
+
) : /* @__PURE__ */ y(
|
|
2613
2638
|
"button",
|
|
2614
2639
|
{
|
|
2615
2640
|
onClick: d,
|
|
2616
2641
|
disabled: i,
|
|
2617
|
-
className:
|
|
2642
|
+
className: O(
|
|
2618
2643
|
"flex w-full items-center justify-between p-6",
|
|
2619
2644
|
"transition-colors hover:bg-accent-secondary/5",
|
|
2620
2645
|
"text-left",
|
|
@@ -2627,9 +2652,9 @@ const di = ({
|
|
|
2627
2652
|
"aria-selected": l,
|
|
2628
2653
|
tabIndex: i ? -1 : 0,
|
|
2629
2654
|
children: [
|
|
2630
|
-
/* @__PURE__ */
|
|
2655
|
+
/* @__PURE__ */ y("div", { className: "flex items-center gap-3", children: [
|
|
2631
2656
|
e && /* @__PURE__ */ c("div", { className: "flex-shrink-0", children: e }),
|
|
2632
|
-
/* @__PURE__ */
|
|
2657
|
+
/* @__PURE__ */ y("div", { className: "flex flex-col", children: [
|
|
2633
2658
|
/* @__PURE__ */ c("div", { className: "text-sm font-medium text-accent-primary", children: t }),
|
|
2634
2659
|
r && /* @__PURE__ */ c("div", { className: "text-xs text-accent-secondary", children: r })
|
|
2635
2660
|
] })
|
|
@@ -2672,12 +2697,12 @@ const di = ({
|
|
|
2672
2697
|
children: /* @__PURE__ */ c("path", { d: "M6 4L10 8L6 12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
2673
2698
|
}
|
|
2674
2699
|
);
|
|
2675
|
-
return /* @__PURE__ */
|
|
2676
|
-
/* @__PURE__ */
|
|
2700
|
+
return /* @__PURE__ */ y(ze, { children: [
|
|
2701
|
+
/* @__PURE__ */ y(
|
|
2677
2702
|
"button",
|
|
2678
2703
|
{
|
|
2679
2704
|
onClick: () => u(!0),
|
|
2680
|
-
className:
|
|
2705
|
+
className: O(
|
|
2681
2706
|
"flex w-full items-center justify-between p-6",
|
|
2682
2707
|
"transition-colors hover:bg-accent-secondary/5",
|
|
2683
2708
|
"text-left focus:outline-none",
|
|
@@ -2685,9 +2710,9 @@ const di = ({
|
|
|
2685
2710
|
),
|
|
2686
2711
|
role: "menuitem",
|
|
2687
2712
|
children: [
|
|
2688
|
-
/* @__PURE__ */
|
|
2713
|
+
/* @__PURE__ */ y("div", { className: "flex items-center gap-3", children: [
|
|
2689
2714
|
n && /* @__PURE__ */ c("div", { className: "flex-shrink-0", children: n }),
|
|
2690
|
-
/* @__PURE__ */
|
|
2715
|
+
/* @__PURE__ */ y("div", { className: "flex flex-col", children: [
|
|
2691
2716
|
/* @__PURE__ */ c("span", { className: "text-sm font-medium text-accent-primary", children: t }),
|
|
2692
2717
|
r && /* @__PURE__ */ c("span", { className: "mt-0.5 text-xs text-accent-secondary", children: r })
|
|
2693
2718
|
] })
|
|
@@ -2707,7 +2732,7 @@ const di = ({
|
|
|
2707
2732
|
fullHeight: d == null ? void 0 : d.isMobile,
|
|
2708
2733
|
fullWidth: d == null ? void 0 : d.isMobile,
|
|
2709
2734
|
onBackdropClick: d != null && d.isMobile ? void 0 : () => u(!1),
|
|
2710
|
-
className:
|
|
2735
|
+
className: O(d != null && d.isMobile ? "z-60" : "z-50", a),
|
|
2711
2736
|
children: e
|
|
2712
2737
|
}
|
|
2713
2738
|
)
|
|
@@ -2731,13 +2756,13 @@ const di = ({
|
|
|
2731
2756
|
strokeLinejoin: "round"
|
|
2732
2757
|
}
|
|
2733
2758
|
) });
|
|
2734
|
-
return /* @__PURE__ */
|
|
2759
|
+
return /* @__PURE__ */ y(
|
|
2735
2760
|
"button",
|
|
2736
2761
|
{
|
|
2737
2762
|
role: "menuitem",
|
|
2738
2763
|
onClick: r,
|
|
2739
2764
|
disabled: o,
|
|
2740
|
-
className:
|
|
2765
|
+
className: O(
|
|
2741
2766
|
"flex w-full items-center justify-between p-4",
|
|
2742
2767
|
"transition-colors hover:bg-accent-secondary/5",
|
|
2743
2768
|
"text-left focus:outline-none",
|
|
@@ -2748,7 +2773,7 @@ const di = ({
|
|
|
2748
2773
|
"aria-selected": n,
|
|
2749
2774
|
tabIndex: o ? -1 : 0,
|
|
2750
2775
|
children: [
|
|
2751
|
-
/* @__PURE__ */
|
|
2776
|
+
/* @__PURE__ */ y("div", { className: "flex flex-col items-start", children: [
|
|
2752
2777
|
/* @__PURE__ */ c("span", { className: "font-medium text-accent-primary", children: e }),
|
|
2753
2778
|
t && /* @__PURE__ */ c("span", { className: "text-sm text-accent-secondary", children: t })
|
|
2754
2779
|
] }),
|
|
@@ -2771,9 +2796,9 @@ const di = ({
|
|
|
2771
2796
|
onKeyDown: d,
|
|
2772
2797
|
amountUsd: m,
|
|
2773
2798
|
disabled: v = !1
|
|
2774
|
-
}) => /* @__PURE__ */
|
|
2775
|
-
/* @__PURE__ */
|
|
2776
|
-
/* @__PURE__ */
|
|
2799
|
+
}) => /* @__PURE__ */ y(ze, { children: [
|
|
2800
|
+
/* @__PURE__ */ y("div", { className: "flex w-full flex-row content-center items-center justify-between font-normal", children: [
|
|
2801
|
+
/* @__PURE__ */ y("div", { className: "flex items-center gap-2", children: [
|
|
2777
2802
|
/* @__PURE__ */ c("img", { src: t, alt: r, className: "h-10 max-h-[2.5rem] w-10 max-w-[2.5rem]" }),
|
|
2778
2803
|
/* @__PURE__ */ c("div", { className: "text-lg", children: r })
|
|
2779
2804
|
] }),
|
|
@@ -2793,9 +2818,9 @@ const di = ({
|
|
|
2793
2818
|
}
|
|
2794
2819
|
)
|
|
2795
2820
|
] }),
|
|
2796
|
-
o && s ? /* @__PURE__ */
|
|
2821
|
+
o && s ? /* @__PURE__ */ y("div", { className: "flex w-full flex-row content-center justify-between text-sm", children: [
|
|
2797
2822
|
/* @__PURE__ */ c("span", { className: "cursor-default", children: i }),
|
|
2798
|
-
o.displayUSD && o.price !== void 0 && /* @__PURE__ */
|
|
2823
|
+
o.displayUSD && o.price !== void 0 && /* @__PURE__ */ y("div", { children: [
|
|
2799
2824
|
m,
|
|
2800
2825
|
" USD"
|
|
2801
2826
|
] })
|
|
@@ -2812,7 +2837,7 @@ const hi = ({
|
|
|
2812
2837
|
symbols: t = 8,
|
|
2813
2838
|
size: r = "body2",
|
|
2814
2839
|
className: n
|
|
2815
|
-
}) => e ? /* @__PURE__ */ c(W, { variant: r, className:
|
|
2840
|
+
}) => e ? /* @__PURE__ */ c(W, { variant: r, className: O("text-accent-primary", n), children: /* @__PURE__ */ c("span", { children: ho(e, t) ?? e }) }) : null;
|
|
2816
2841
|
function mi(e = {}) {
|
|
2817
2842
|
const { copiedText: t = "Copied ✓", timeout: r = 2e3 } = e, [n, i] = ee({}), [s, o] = ee({}), a = oe(
|
|
2818
2843
|
(d, m) => {
|
|
@@ -2859,7 +2884,7 @@ const Ml = ({
|
|
|
2859
2884
|
isCopied: f,
|
|
2860
2885
|
copiedText: u,
|
|
2861
2886
|
copyToClipboard: d
|
|
2862
|
-
} = mi(l), m = i !== void 0, v = m ? i : f(a),
|
|
2887
|
+
} = mi(l), m = i !== void 0, v = m ? i : f(a), N = m ? s || "Copied ✓" : u(a), g = (w) => {
|
|
2863
2888
|
w.stopPropagation(), m && n ? n(t) : d(a, t);
|
|
2864
2889
|
};
|
|
2865
2890
|
return /* @__PURE__ */ c(
|
|
@@ -2870,7 +2895,7 @@ const Ml = ({
|
|
|
2870
2895
|
r
|
|
2871
2896
|
),
|
|
2872
2897
|
onClick: g,
|
|
2873
|
-
children: /* @__PURE__ */
|
|
2898
|
+
children: /* @__PURE__ */ y("div", { className: "relative", children: [
|
|
2874
2899
|
/* @__PURE__ */ c(
|
|
2875
2900
|
"div",
|
|
2876
2901
|
{
|
|
@@ -2888,7 +2913,7 @@ const Ml = ({
|
|
|
2888
2913
|
"absolute inset-0 flex items-center transition-opacity duration-300 ease-in-out text-green-600",
|
|
2889
2914
|
"opacity-100"
|
|
2890
2915
|
),
|
|
2891
|
-
children:
|
|
2916
|
+
children: N
|
|
2892
2917
|
}
|
|
2893
2918
|
)
|
|
2894
2919
|
] })
|
|
@@ -2896,21 +2921,21 @@ const Ml = ({
|
|
|
2896
2921
|
);
|
|
2897
2922
|
};
|
|
2898
2923
|
function pi({ children: e, className: t, iconClassName: r, messageClassName: n }) {
|
|
2899
|
-
return /* @__PURE__ */
|
|
2924
|
+
return /* @__PURE__ */ y("div", { className: O("bbn-warning", t), children: [
|
|
2900
2925
|
/* @__PURE__ */ c(
|
|
2901
2926
|
Va,
|
|
2902
2927
|
{
|
|
2903
2928
|
variant: "secondary",
|
|
2904
2929
|
size: 22,
|
|
2905
|
-
className:
|
|
2930
|
+
className: O("bbn-warning-icon", r)
|
|
2906
2931
|
}
|
|
2907
2932
|
),
|
|
2908
|
-
/* @__PURE__ */ c("p", { className:
|
|
2933
|
+
/* @__PURE__ */ c("p", { className: O("bbn-warning-message", n), children: e })
|
|
2909
2934
|
] });
|
|
2910
2935
|
}
|
|
2911
2936
|
var It = (e) => e.type === "checkbox", Qe = (e) => e instanceof Date, ue = (e) => e == null;
|
|
2912
2937
|
const vi = (e) => typeof e == "object";
|
|
2913
|
-
var re = (e) => !ue(e) && !Array.isArray(e) && vi(e) && !Qe(e), gi = (e) => re(e) && e.target ? It(e.target) ? e.target.checked : e.target.value : e, mo = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e,
|
|
2938
|
+
var re = (e) => !ue(e) && !Array.isArray(e) && vi(e) && !Qe(e), gi = (e) => re(e) && e.target ? It(e.target) ? e.target.checked : e.target.value : e, mo = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, bi = (e, t) => e.has(mo(t)), po = (e) => {
|
|
2914
2939
|
const t = e.constructor && e.constructor.prototype;
|
|
2915
2940
|
return re(t) && t.hasOwnProperty("isPrototypeOf");
|
|
2916
2941
|
}, zr = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
@@ -2929,14 +2954,14 @@ function se(e) {
|
|
|
2929
2954
|
return e;
|
|
2930
2955
|
return t;
|
|
2931
2956
|
}
|
|
2932
|
-
var
|
|
2957
|
+
var br = (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
2958
|
if (!t || !re(e))
|
|
2934
2959
|
return r;
|
|
2935
|
-
const n = (
|
|
2960
|
+
const n = (br(t) ? [t] : Zr(t)).reduce((i, s) => ue(i) ? i : i[s], e);
|
|
2936
2961
|
return te(n) || n === e ? te(e[t]) ? r : e[t] : n;
|
|
2937
2962
|
}, pe = (e) => typeof e == "boolean", Z = (e, t, r) => {
|
|
2938
2963
|
let n = -1;
|
|
2939
|
-
const i =
|
|
2964
|
+
const i = br(t) ? [t] : Zr(t), s = i.length, o = s - 1;
|
|
2940
2965
|
for (; ++n < s; ) {
|
|
2941
2966
|
const a = i[n];
|
|
2942
2967
|
let l = r;
|
|
@@ -2959,7 +2984,7 @@ const sr = {
|
|
|
2959
2984
|
onSubmit: "onSubmit",
|
|
2960
2985
|
onTouched: "onTouched",
|
|
2961
2986
|
all: "all"
|
|
2962
|
-
},
|
|
2987
|
+
}, Be = {
|
|
2963
2988
|
max: "max",
|
|
2964
2989
|
min: "min",
|
|
2965
2990
|
maxLength: "maxLength",
|
|
@@ -2967,13 +2992,13 @@ const sr = {
|
|
|
2967
2992
|
pattern: "pattern",
|
|
2968
2993
|
required: "required",
|
|
2969
2994
|
validate: "validate"
|
|
2970
|
-
}, Xr =
|
|
2995
|
+
}, Xr = P.createContext(null);
|
|
2971
2996
|
Xr.displayName = "HookFormContext";
|
|
2972
|
-
const pt = () =>
|
|
2997
|
+
const pt = () => P.useContext(Xr), vo = (e) => {
|
|
2973
2998
|
const { children: t, ...r } = e;
|
|
2974
|
-
return
|
|
2999
|
+
return P.createElement(Xr.Provider, { value: r }, t);
|
|
2975
3000
|
};
|
|
2976
|
-
var
|
|
3001
|
+
var yi = (e, t, r, n = !0) => {
|
|
2977
3002
|
const i = {
|
|
2978
3003
|
defaultValues: t._defaultValues
|
|
2979
3004
|
};
|
|
@@ -2986,9 +3011,9 @@ var bi = (e, t, r, n = !0) => {
|
|
|
2986
3011
|
});
|
|
2987
3012
|
return i;
|
|
2988
3013
|
};
|
|
2989
|
-
const Gr = typeof window < "u" ?
|
|
3014
|
+
const Gr = typeof window < "u" ? P.useLayoutEffect : P.useEffect;
|
|
2990
3015
|
function wi(e) {
|
|
2991
|
-
const t = pt(), { control: r = t.control, disabled: n, name: i, exact: s } = e || {}, [o, a] =
|
|
3016
|
+
const t = pt(), { control: r = t.control, disabled: n, name: i, exact: s } = e || {}, [o, a] = P.useState(r._formState), l = P.useRef({
|
|
2992
3017
|
isDirty: !1,
|
|
2993
3018
|
isLoading: !1,
|
|
2994
3019
|
dirtyFields: !1,
|
|
@@ -3008,12 +3033,12 @@ function wi(e) {
|
|
|
3008
3033
|
...f
|
|
3009
3034
|
});
|
|
3010
3035
|
}
|
|
3011
|
-
}), [i, n, s]),
|
|
3036
|
+
}), [i, n, s]), P.useEffect(() => {
|
|
3012
3037
|
l.current.isValid && r._setValid(!0);
|
|
3013
|
-
}, [r]),
|
|
3038
|
+
}, [r]), P.useMemo(() => yi(o, r, l.current, !1), [o, r]);
|
|
3014
3039
|
}
|
|
3015
|
-
var
|
|
3016
|
-
function
|
|
3040
|
+
var Ve = (e) => typeof e == "string", xi = (e, t, r, n, i) => Ve(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);
|
|
3041
|
+
function Pe(e, t, r = /* @__PURE__ */ new WeakSet()) {
|
|
3017
3042
|
if (Sr(e) || Sr(t))
|
|
3018
3043
|
return e === t;
|
|
3019
3044
|
if (Qe(e) && Qe(t))
|
|
@@ -3030,36 +3055,36 @@ function Be(e, t, r = /* @__PURE__ */ new WeakSet()) {
|
|
|
3030
3055
|
return !1;
|
|
3031
3056
|
if (s !== "ref") {
|
|
3032
3057
|
const a = t[s];
|
|
3033
|
-
if (Qe(o) && Qe(a) || re(o) && re(a) || Array.isArray(o) && Array.isArray(a) ? !
|
|
3058
|
+
if (Qe(o) && Qe(a) || re(o) && re(a) || Array.isArray(o) && Array.isArray(a) ? !Pe(o, a, r) : o !== a)
|
|
3034
3059
|
return !1;
|
|
3035
3060
|
}
|
|
3036
3061
|
}
|
|
3037
3062
|
return !0;
|
|
3038
3063
|
}
|
|
3039
3064
|
function Ni(e) {
|
|
3040
|
-
const t = pt(), { control: r = t.control, name: n, defaultValue: i, disabled: s, exact: o, compute: a } = e || {}, l =
|
|
3065
|
+
const t = pt(), { control: r = t.control, name: n, defaultValue: i, disabled: s, exact: o, compute: a } = e || {}, l = P.useRef(i), f = P.useRef(a), u = P.useRef(void 0);
|
|
3041
3066
|
f.current = a;
|
|
3042
|
-
const d =
|
|
3067
|
+
const d = P.useMemo(() => r._getWatch(n, l.current), [r, n]), [m, v] = P.useState(f.current ? f.current(d) : d);
|
|
3043
3068
|
return Gr(() => r._subscribe({
|
|
3044
3069
|
name: n,
|
|
3045
3070
|
formState: {
|
|
3046
3071
|
values: !0
|
|
3047
3072
|
},
|
|
3048
3073
|
exact: o,
|
|
3049
|
-
callback: (
|
|
3074
|
+
callback: (N) => {
|
|
3050
3075
|
if (!s) {
|
|
3051
|
-
const g = xi(n, r._names,
|
|
3076
|
+
const g = xi(n, r._names, N.values || r._formValues, !1, l.current);
|
|
3052
3077
|
if (f.current) {
|
|
3053
3078
|
const w = f.current(g);
|
|
3054
|
-
|
|
3079
|
+
Pe(w, u.current) || (v(w), u.current = w);
|
|
3055
3080
|
} else
|
|
3056
3081
|
v(g);
|
|
3057
3082
|
}
|
|
3058
3083
|
}
|
|
3059
|
-
}), [r, s, n, o]),
|
|
3084
|
+
}), [r, s, n, o]), P.useEffect(() => r._removeUnmounted()), m;
|
|
3060
3085
|
}
|
|
3061
3086
|
function go(e) {
|
|
3062
|
-
const t = pt(), { name: r, disabled: n, control: i = t.control, shouldUnregister: s, defaultValue: o } = e, a =
|
|
3087
|
+
const t = pt(), { name: r, disabled: n, control: i = t.control, shouldUnregister: s, defaultValue: o } = e, a = bi(i._names.array, r), l = P.useMemo(() => L(i._formValues, r, L(i._defaultValues, r, o)), [i, r, o]), f = Ni({
|
|
3063
3088
|
control: i,
|
|
3064
3089
|
name: r,
|
|
3065
3090
|
defaultValue: l,
|
|
@@ -3068,88 +3093,88 @@ function go(e) {
|
|
|
3068
3093
|
control: i,
|
|
3069
3094
|
name: r,
|
|
3070
3095
|
exact: !0
|
|
3071
|
-
}), d =
|
|
3096
|
+
}), d = P.useRef(e), m = P.useRef(i.register(r, {
|
|
3072
3097
|
...e.rules,
|
|
3073
3098
|
value: f,
|
|
3074
3099
|
...pe(e.disabled) ? { disabled: e.disabled } : {}
|
|
3075
3100
|
}));
|
|
3076
3101
|
d.current = e;
|
|
3077
|
-
const v =
|
|
3102
|
+
const v = P.useMemo(() => Object.defineProperties({}, {
|
|
3078
3103
|
invalid: {
|
|
3079
3104
|
enumerable: !0,
|
|
3080
|
-
get: () => !!
|
|
3105
|
+
get: () => !!L(u.errors, r)
|
|
3081
3106
|
},
|
|
3082
3107
|
isDirty: {
|
|
3083
3108
|
enumerable: !0,
|
|
3084
|
-
get: () => !!
|
|
3109
|
+
get: () => !!L(u.dirtyFields, r)
|
|
3085
3110
|
},
|
|
3086
3111
|
isTouched: {
|
|
3087
3112
|
enumerable: !0,
|
|
3088
|
-
get: () => !!
|
|
3113
|
+
get: () => !!L(u.touchedFields, r)
|
|
3089
3114
|
},
|
|
3090
3115
|
isValidating: {
|
|
3091
3116
|
enumerable: !0,
|
|
3092
|
-
get: () => !!
|
|
3117
|
+
get: () => !!L(u.validatingFields, r)
|
|
3093
3118
|
},
|
|
3094
3119
|
error: {
|
|
3095
3120
|
enumerable: !0,
|
|
3096
|
-
get: () =>
|
|
3121
|
+
get: () => L(u.errors, r)
|
|
3097
3122
|
}
|
|
3098
|
-
}), [u, r]),
|
|
3123
|
+
}), [u, r]), N = P.useCallback((x) => m.current.onChange({
|
|
3099
3124
|
target: {
|
|
3100
|
-
value: gi(
|
|
3125
|
+
value: gi(x),
|
|
3101
3126
|
name: r
|
|
3102
3127
|
},
|
|
3103
3128
|
type: sr.CHANGE
|
|
3104
|
-
}), [r]), g =
|
|
3129
|
+
}), [r]), g = P.useCallback(() => m.current.onBlur({
|
|
3105
3130
|
target: {
|
|
3106
|
-
value:
|
|
3131
|
+
value: L(i._formValues, r),
|
|
3107
3132
|
name: r
|
|
3108
3133
|
},
|
|
3109
3134
|
type: sr.BLUR
|
|
3110
|
-
}), [r, i._formValues]), w =
|
|
3111
|
-
const
|
|
3112
|
-
|
|
3113
|
-
focus: () =>
|
|
3114
|
-
select: () =>
|
|
3115
|
-
setCustomValidity: (
|
|
3116
|
-
reportValidity: () =>
|
|
3135
|
+
}), [r, i._formValues]), w = P.useCallback((x) => {
|
|
3136
|
+
const F = L(i._fields, r);
|
|
3137
|
+
F && x && (F._f.ref = {
|
|
3138
|
+
focus: () => x.focus && x.focus(),
|
|
3139
|
+
select: () => x.select && x.select(),
|
|
3140
|
+
setCustomValidity: (k) => x.setCustomValidity(k),
|
|
3141
|
+
reportValidity: () => x.reportValidity()
|
|
3117
3142
|
});
|
|
3118
|
-
}, [i._fields, r]),
|
|
3143
|
+
}, [i._fields, r]), M = P.useMemo(() => ({
|
|
3119
3144
|
name: r,
|
|
3120
3145
|
value: f,
|
|
3121
3146
|
...pe(n) || u.disabled ? { disabled: u.disabled || n } : {},
|
|
3122
|
-
onChange:
|
|
3147
|
+
onChange: N,
|
|
3123
3148
|
onBlur: g,
|
|
3124
3149
|
ref: w
|
|
3125
|
-
}), [r, n, u.disabled,
|
|
3126
|
-
return
|
|
3127
|
-
const
|
|
3150
|
+
}), [r, n, u.disabled, N, g, w, f]);
|
|
3151
|
+
return P.useEffect(() => {
|
|
3152
|
+
const x = i._options.shouldUnregister || s;
|
|
3128
3153
|
i.register(r, {
|
|
3129
3154
|
...d.current.rules,
|
|
3130
3155
|
...pe(d.current.disabled) ? { disabled: d.current.disabled } : {}
|
|
3131
3156
|
});
|
|
3132
|
-
const
|
|
3133
|
-
const
|
|
3134
|
-
|
|
3157
|
+
const F = (k, E) => {
|
|
3158
|
+
const A = L(i._fields, k);
|
|
3159
|
+
A && A._f && (A._f.mount = E);
|
|
3135
3160
|
};
|
|
3136
|
-
if (
|
|
3137
|
-
const
|
|
3138
|
-
Z(i._defaultValues, r,
|
|
3161
|
+
if (F(r, !0), x) {
|
|
3162
|
+
const k = se(L(i._options.defaultValues, r));
|
|
3163
|
+
Z(i._defaultValues, r, k), te(L(i._formValues, r)) && Z(i._formValues, r, k);
|
|
3139
3164
|
}
|
|
3140
3165
|
return !a && i.register(r), () => {
|
|
3141
|
-
(a ?
|
|
3166
|
+
(a ? x && !i._state.action : x) ? i.unregister(r) : F(r, !1);
|
|
3142
3167
|
};
|
|
3143
|
-
}, [r, i, a, s]),
|
|
3168
|
+
}, [r, i, a, s]), P.useEffect(() => {
|
|
3144
3169
|
i._setDisabledField({
|
|
3145
3170
|
disabled: n,
|
|
3146
3171
|
name: r
|
|
3147
3172
|
});
|
|
3148
|
-
}, [n, r, i]),
|
|
3149
|
-
field:
|
|
3173
|
+
}, [n, r, i]), P.useMemo(() => ({
|
|
3174
|
+
field: M,
|
|
3150
3175
|
formState: u,
|
|
3151
3176
|
fieldState: v
|
|
3152
|
-
}), [
|
|
3177
|
+
}), [M, u, v]);
|
|
3153
3178
|
}
|
|
3154
3179
|
var Ci = (e, t, r, n, i) => t ? {
|
|
3155
3180
|
...r[e],
|
|
@@ -3181,8 +3206,8 @@ var Ci = (e, t, r, n, i) => t ? {
|
|
|
3181
3206
|
return !1;
|
|
3182
3207
|
const t = e ? e.ownerDocument : 0;
|
|
3183
3208
|
return e instanceof (t && t.defaultView ? t.defaultView.HTMLElement : HTMLElement);
|
|
3184
|
-
}, ki = (e) => e.type === "select-multiple", Kr = (e) => e.type === "radio",
|
|
3185
|
-
function
|
|
3209
|
+
}, ki = (e) => e.type === "select-multiple", Kr = (e) => e.type === "radio", bo = (e) => Kr(e) || It(e), Cr = (e) => ar(e) && e.isConnected;
|
|
3210
|
+
function yo(e, t) {
|
|
3186
3211
|
const r = t.slice(0, -1).length;
|
|
3187
3212
|
let n = 0;
|
|
3188
3213
|
for (; n < r; )
|
|
@@ -3196,7 +3221,7 @@ function wo(e) {
|
|
|
3196
3221
|
return !0;
|
|
3197
3222
|
}
|
|
3198
3223
|
function ne(e, t) {
|
|
3199
|
-
const r = Array.isArray(t) ? t :
|
|
3224
|
+
const r = Array.isArray(t) ? t : br(t) ? [t] : Zr(t), n = r.length === 1 ? e : yo(e, r), i = r.length - 1, s = r[i];
|
|
3200
3225
|
return n && delete n[s], i !== 0 && (re(n) && de(n) || Array.isArray(n) && wo(n)) && ne(e, r.slice(0, -1)), e;
|
|
3201
3226
|
}
|
|
3202
3227
|
var Oi = (e) => {
|
|
@@ -3216,7 +3241,7 @@ function Ei(e, t, r) {
|
|
|
3216
3241
|
const n = Array.isArray(e);
|
|
3217
3242
|
if (re(e) || n)
|
|
3218
3243
|
for (const i in e)
|
|
3219
|
-
Array.isArray(e[i]) || re(e[i]) && !Oi(e[i]) ? te(t) || Sr(r[i]) ? r[i] = Array.isArray(e[i]) ? or(e[i], []) : { ...or(e[i]) } : Ei(e[i], ue(t) ? {} : t[i], r[i]) : r[i] = !
|
|
3244
|
+
Array.isArray(e[i]) || re(e[i]) && !Oi(e[i]) ? te(t) || Sr(r[i]) ? r[i] = Array.isArray(e[i]) ? or(e[i], []) : { ...or(e[i]) } : Ei(e[i], ue(t) ? {} : t[i], r[i]) : r[i] = !Pe(e[i], t[i]);
|
|
3220
3245
|
return r;
|
|
3221
3246
|
}
|
|
3222
3247
|
var Nt = (e, t) => Ei(e, t, or(t));
|
|
@@ -3236,7 +3261,7 @@ var Si = (e) => {
|
|
|
3236
3261
|
) : xn;
|
|
3237
3262
|
}
|
|
3238
3263
|
return xn;
|
|
3239
|
-
}, Ai = (e, { valueAsNumber: t, valueAsDate: r, setValueAs: n }) => te(e) ? e : t ? e === "" ? NaN : e && +e : r &&
|
|
3264
|
+
}, Ai = (e, { valueAsNumber: t, valueAsDate: r, setValueAs: n }) => te(e) ? e : t ? e === "" ? NaN : e && +e : r && Ve(e) ? new Date(e) : n ? n(e) : e;
|
|
3240
3265
|
const Cn = {
|
|
3241
3266
|
isValid: !1,
|
|
3242
3267
|
value: null
|
|
@@ -3252,7 +3277,7 @@ function kn(e) {
|
|
|
3252
3277
|
var xo = (e, t, r, n) => {
|
|
3253
3278
|
const i = {};
|
|
3254
3279
|
for (const s of e) {
|
|
3255
|
-
const o =
|
|
3280
|
+
const o = L(t, s);
|
|
3256
3281
|
o && Z(i, s, o._f);
|
|
3257
3282
|
}
|
|
3258
3283
|
return {
|
|
@@ -3272,7 +3297,7 @@ const En = "AsyncFunction";
|
|
|
3272
3297
|
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
3298
|
const St = (e, t, r, n) => {
|
|
3274
3299
|
for (const i of r || Object.keys(e)) {
|
|
3275
|
-
const s =
|
|
3300
|
+
const s = L(e, i);
|
|
3276
3301
|
if (s) {
|
|
3277
3302
|
const { _f: o, ...a } = s;
|
|
3278
3303
|
if (o) {
|
|
@@ -3288,15 +3313,15 @@ const St = (e, t, r, n) => {
|
|
|
3288
3313
|
}
|
|
3289
3314
|
};
|
|
3290
3315
|
function An(e, t, r) {
|
|
3291
|
-
const n =
|
|
3292
|
-
if (n ||
|
|
3316
|
+
const n = L(e, r);
|
|
3317
|
+
if (n || br(r))
|
|
3293
3318
|
return {
|
|
3294
3319
|
error: n,
|
|
3295
3320
|
name: r
|
|
3296
3321
|
};
|
|
3297
3322
|
const i = r.split(".");
|
|
3298
3323
|
for (; i.length; ) {
|
|
3299
|
-
const s = i.join("."), o =
|
|
3324
|
+
const s = i.join("."), o = L(t, s), a = L(e, s);
|
|
3300
3325
|
if (o && !Array.isArray(o) && r !== s)
|
|
3301
3326
|
return { name: r };
|
|
3302
3327
|
if (a && a.type)
|
|
@@ -3319,10 +3344,10 @@ var ko = (e, t, r, n) => {
|
|
|
3319
3344
|
r(e);
|
|
3320
3345
|
const { name: i, ...s } = e;
|
|
3321
3346
|
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(
|
|
3347
|
+
}, 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) => {
|
|
3348
|
+
const n = Et(L(e, r));
|
|
3324
3349
|
return Z(n, "root", t[r]), Z(e, r, n), e;
|
|
3325
|
-
}, Jt = (e) =>
|
|
3350
|
+
}, Jt = (e) => Ve(e);
|
|
3326
3351
|
function Ln(e, t, r = "validate") {
|
|
3327
3352
|
if (Jt(e) || Array.isArray(e) && e.every(Jt) || pe(e) && !e)
|
|
3328
3353
|
return {
|
|
@@ -3335,85 +3360,85 @@ var lt = (e) => re(e) && !lr(e) ? e : {
|
|
|
3335
3360
|
value: e,
|
|
3336
3361
|
message: ""
|
|
3337
3362
|
}, 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:
|
|
3339
|
-
if (!
|
|
3363
|
+
const { ref: o, refs: a, required: l, maxLength: f, minLength: u, min: d, max: m, pattern: v, validate: N, name: g, valueAsNumber: w, mount: M } = e._f, x = L(r, g);
|
|
3364
|
+
if (!M || t.has(g))
|
|
3340
3365
|
return {};
|
|
3341
|
-
const
|
|
3342
|
-
i &&
|
|
3343
|
-
},
|
|
3344
|
-
const Q =
|
|
3345
|
-
|
|
3346
|
-
type:
|
|
3366
|
+
const F = a ? a[0] : o, k = (T) => {
|
|
3367
|
+
i && F.reportValidity && (F.setCustomValidity(pe(T) ? "" : T || ""), F.reportValidity());
|
|
3368
|
+
}, E = {}, A = Kr(o), _ = It(o), $ = A || _, I = (w || Yr(o)) && te(o.value) && te(x) || ar(o) && o.value === "" || x === "" || Array.isArray(x) && !x.length, H = Ci.bind(null, g, n, E), V = (T, j, z, J = Be.maxLength, X = Be.minLength) => {
|
|
3369
|
+
const Q = T ? j : z;
|
|
3370
|
+
E[g] = {
|
|
3371
|
+
type: T ? J : X,
|
|
3347
3372
|
message: Q,
|
|
3348
3373
|
ref: o,
|
|
3349
|
-
...H(
|
|
3374
|
+
...H(T ? J : X, Q)
|
|
3350
3375
|
};
|
|
3351
3376
|
};
|
|
3352
|
-
if (s ? !Array.isArray(
|
|
3353
|
-
const { value:
|
|
3354
|
-
if (
|
|
3355
|
-
type:
|
|
3377
|
+
if (s ? !Array.isArray(x) || !x.length : l && (!$ && (I || ue(x)) || pe(x) && !x || _ && !Si(a).isValid || A && !Li(a).isValid)) {
|
|
3378
|
+
const { value: T, message: j } = Jt(l) ? { value: !!l, message: l } : lt(l);
|
|
3379
|
+
if (T && (E[g] = {
|
|
3380
|
+
type: Be.required,
|
|
3356
3381
|
message: j,
|
|
3357
|
-
ref:
|
|
3358
|
-
...H(
|
|
3382
|
+
ref: F,
|
|
3383
|
+
...H(Be.required, j)
|
|
3359
3384
|
}, !n))
|
|
3360
|
-
return
|
|
3385
|
+
return k(j), E;
|
|
3361
3386
|
}
|
|
3362
|
-
if (!
|
|
3363
|
-
let
|
|
3387
|
+
if (!I && (!ue(d) || !ue(m))) {
|
|
3388
|
+
let T, j;
|
|
3364
3389
|
const z = lt(m), J = lt(d);
|
|
3365
|
-
if (!ue(
|
|
3366
|
-
const X = o.valueAsNumber ||
|
|
3367
|
-
ue(z.value) || (
|
|
3390
|
+
if (!ue(x) && !isNaN(x)) {
|
|
3391
|
+
const X = o.valueAsNumber || x && +x;
|
|
3392
|
+
ue(z.value) || (T = X > z.value), ue(J.value) || (j = X < J.value);
|
|
3368
3393
|
} else {
|
|
3369
|
-
const X = o.valueAsDate || new Date(
|
|
3370
|
-
|
|
3394
|
+
const X = o.valueAsDate || new Date(x), Q = (Re) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + Re), Ae = o.type == "time", fe = o.type == "week";
|
|
3395
|
+
Ve(z.value) && x && (T = Ae ? Q(x) > Q(z.value) : fe ? x > z.value : X > new Date(z.value)), Ve(J.value) && x && (j = Ae ? Q(x) < Q(J.value) : fe ? x < J.value : X < new Date(J.value));
|
|
3371
3396
|
}
|
|
3372
|
-
if ((
|
|
3373
|
-
return
|
|
3397
|
+
if ((T || j) && (V(!!T, z.message, J.message, Be.max, Be.min), !n))
|
|
3398
|
+
return k(E[g].message), E;
|
|
3374
3399
|
}
|
|
3375
|
-
if ((f || u) && !
|
|
3376
|
-
const
|
|
3377
|
-
if ((z || J) && (
|
|
3378
|
-
return
|
|
3400
|
+
if ((f || u) && !I && (Ve(x) || s && Array.isArray(x))) {
|
|
3401
|
+
const T = lt(f), j = lt(u), z = !ue(T.value) && x.length > +T.value, J = !ue(j.value) && x.length < +j.value;
|
|
3402
|
+
if ((z || J) && (V(z, T.message, j.message), !n))
|
|
3403
|
+
return k(E[g].message), E;
|
|
3379
3404
|
}
|
|
3380
|
-
if (v && !
|
|
3381
|
-
const { value:
|
|
3382
|
-
if (lr(
|
|
3383
|
-
type:
|
|
3405
|
+
if (v && !I && Ve(x)) {
|
|
3406
|
+
const { value: T, message: j } = lt(v);
|
|
3407
|
+
if (lr(T) && !x.match(T) && (E[g] = {
|
|
3408
|
+
type: Be.pattern,
|
|
3384
3409
|
message: j,
|
|
3385
3410
|
ref: o,
|
|
3386
|
-
...H(
|
|
3411
|
+
...H(Be.pattern, j)
|
|
3387
3412
|
}, !n))
|
|
3388
|
-
return
|
|
3413
|
+
return k(j), E;
|
|
3389
3414
|
}
|
|
3390
|
-
if (
|
|
3391
|
-
if (Ee(
|
|
3392
|
-
const
|
|
3393
|
-
if (j && (
|
|
3415
|
+
if (N) {
|
|
3416
|
+
if (Ee(N)) {
|
|
3417
|
+
const T = await N(x, r), j = Ln(T, F);
|
|
3418
|
+
if (j && (E[g] = {
|
|
3394
3419
|
...j,
|
|
3395
|
-
...H(
|
|
3420
|
+
...H(Be.validate, j.message)
|
|
3396
3421
|
}, !n))
|
|
3397
|
-
return
|
|
3398
|
-
} else if (re(
|
|
3399
|
-
let
|
|
3400
|
-
for (const j in
|
|
3401
|
-
if (!de(
|
|
3422
|
+
return k(j.message), E;
|
|
3423
|
+
} else if (re(N)) {
|
|
3424
|
+
let T = {};
|
|
3425
|
+
for (const j in N) {
|
|
3426
|
+
if (!de(T) && !n)
|
|
3402
3427
|
break;
|
|
3403
|
-
const z = Ln(await
|
|
3404
|
-
z && (
|
|
3428
|
+
const z = Ln(await N[j](x, r), F, j);
|
|
3429
|
+
z && (T = {
|
|
3405
3430
|
...z,
|
|
3406
3431
|
...H(j, z.message)
|
|
3407
|
-
},
|
|
3432
|
+
}, k(z.message), n && (E[g] = T));
|
|
3408
3433
|
}
|
|
3409
|
-
if (!de(
|
|
3410
|
-
ref:
|
|
3411
|
-
...
|
|
3434
|
+
if (!de(T) && (E[g] = {
|
|
3435
|
+
ref: F,
|
|
3436
|
+
...T
|
|
3412
3437
|
}, !n))
|
|
3413
|
-
return
|
|
3438
|
+
return E;
|
|
3414
3439
|
}
|
|
3415
3440
|
}
|
|
3416
|
-
return
|
|
3441
|
+
return k(!0), E;
|
|
3417
3442
|
};
|
|
3418
3443
|
const Lo = {
|
|
3419
3444
|
mode: Oe.onSubmit,
|
|
@@ -3465,83 +3490,83 @@ function Vo(e = {}) {
|
|
|
3465
3490
|
const m = {
|
|
3466
3491
|
array: wn(),
|
|
3467
3492
|
state: wn()
|
|
3468
|
-
}, v = t.criteriaMode === Oe.all,
|
|
3493
|
+
}, v = t.criteriaMode === Oe.all, N = (h) => (p) => {
|
|
3469
3494
|
clearTimeout(f), f = setTimeout(h, p);
|
|
3470
3495
|
}, g = async (h) => {
|
|
3471
3496
|
if (!t.disabled && (u.isValid || d.isValid || h)) {
|
|
3472
|
-
const p = t.resolver ? de((await
|
|
3497
|
+
const p = t.resolver ? de((await _()).errors) : await I(n, !0);
|
|
3473
3498
|
p !== r.isValid && m.state.next({
|
|
3474
3499
|
isValid: p
|
|
3475
3500
|
});
|
|
3476
3501
|
}
|
|
3477
3502
|
}, w = (h, p) => {
|
|
3478
|
-
!t.disabled && (u.isValidating || u.validatingFields || d.isValidating || d.validatingFields) && ((h || Array.from(a.mount)).forEach((
|
|
3479
|
-
|
|
3503
|
+
!t.disabled && (u.isValidating || u.validatingFields || d.isValidating || d.validatingFields) && ((h || Array.from(a.mount)).forEach((b) => {
|
|
3504
|
+
b && (p ? Z(r.validatingFields, b, p) : ne(r.validatingFields, b));
|
|
3480
3505
|
}), m.state.next({
|
|
3481
3506
|
validatingFields: r.validatingFields,
|
|
3482
3507
|
isValidating: !de(r.validatingFields)
|
|
3483
3508
|
}));
|
|
3484
|
-
},
|
|
3485
|
-
if (
|
|
3486
|
-
if (o.action = !0, C && Array.isArray(
|
|
3487
|
-
const B =
|
|
3488
|
-
|
|
3509
|
+
}, M = (h, p = [], b, D, S = !0, C = !0) => {
|
|
3510
|
+
if (D && b && !t.disabled) {
|
|
3511
|
+
if (o.action = !0, C && Array.isArray(L(n, h))) {
|
|
3512
|
+
const B = b(L(n, h), D.argA, D.argB);
|
|
3513
|
+
S && Z(n, h, B);
|
|
3489
3514
|
}
|
|
3490
|
-
if (C && Array.isArray(
|
|
3491
|
-
const B =
|
|
3492
|
-
|
|
3515
|
+
if (C && Array.isArray(L(r.errors, h))) {
|
|
3516
|
+
const B = b(L(r.errors, h), D.argA, D.argB);
|
|
3517
|
+
S && Z(r.errors, h, B), So(r.errors, h);
|
|
3493
3518
|
}
|
|
3494
|
-
if ((u.touchedFields || d.touchedFields) && C && Array.isArray(
|
|
3495
|
-
const B =
|
|
3496
|
-
|
|
3519
|
+
if ((u.touchedFields || d.touchedFields) && C && Array.isArray(L(r.touchedFields, h))) {
|
|
3520
|
+
const B = b(L(r.touchedFields, h), D.argA, D.argB);
|
|
3521
|
+
S && Z(r.touchedFields, h, B);
|
|
3497
3522
|
}
|
|
3498
3523
|
(u.dirtyFields || d.dirtyFields) && (r.dirtyFields = Nt(i, s)), m.state.next({
|
|
3499
3524
|
name: h,
|
|
3500
|
-
isDirty:
|
|
3525
|
+
isDirty: V(h, p),
|
|
3501
3526
|
dirtyFields: r.dirtyFields,
|
|
3502
3527
|
errors: r.errors,
|
|
3503
3528
|
isValid: r.isValid
|
|
3504
3529
|
});
|
|
3505
3530
|
} else
|
|
3506
3531
|
Z(s, h, p);
|
|
3507
|
-
},
|
|
3532
|
+
}, x = (h, p) => {
|
|
3508
3533
|
Z(r.errors, h, p), m.state.next({
|
|
3509
3534
|
errors: r.errors
|
|
3510
3535
|
});
|
|
3511
|
-
},
|
|
3536
|
+
}, F = (h) => {
|
|
3512
3537
|
r.errors = h, m.state.next({
|
|
3513
3538
|
errors: r.errors,
|
|
3514
3539
|
isValid: !1
|
|
3515
3540
|
});
|
|
3516
|
-
},
|
|
3517
|
-
const
|
|
3518
|
-
if (
|
|
3519
|
-
const C =
|
|
3520
|
-
te(C) ||
|
|
3541
|
+
}, k = (h, p, b, D) => {
|
|
3542
|
+
const S = L(n, h);
|
|
3543
|
+
if (S) {
|
|
3544
|
+
const C = L(s, h, te(b) ? L(i, h) : b);
|
|
3545
|
+
te(C) || D && D.defaultChecked || p ? Z(s, h, p ? C : kn(S._f)) : z(h, C), o.mount && g();
|
|
3521
3546
|
}
|
|
3522
|
-
},
|
|
3547
|
+
}, E = (h, p, b, D, S) => {
|
|
3523
3548
|
let C = !1, B = !1;
|
|
3524
3549
|
const U = {
|
|
3525
3550
|
name: h
|
|
3526
3551
|
};
|
|
3527
3552
|
if (!t.disabled) {
|
|
3528
|
-
if (!
|
|
3529
|
-
(u.isDirty || d.isDirty) && (B = r.isDirty, r.isDirty = U.isDirty =
|
|
3530
|
-
const q =
|
|
3531
|
-
B = !!
|
|
3553
|
+
if (!b || D) {
|
|
3554
|
+
(u.isDirty || d.isDirty) && (B = r.isDirty, r.isDirty = U.isDirty = V(), C = B !== U.isDirty);
|
|
3555
|
+
const q = Pe(L(i, h), p);
|
|
3556
|
+
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
3557
|
}
|
|
3533
|
-
if (
|
|
3534
|
-
const q =
|
|
3535
|
-
q || (Z(r.touchedFields, h,
|
|
3558
|
+
if (b) {
|
|
3559
|
+
const q = L(r.touchedFields, h);
|
|
3560
|
+
q || (Z(r.touchedFields, h, b), U.touchedFields = r.touchedFields, C = C || (u.touchedFields || d.touchedFields) && q !== b);
|
|
3536
3561
|
}
|
|
3537
|
-
C &&
|
|
3562
|
+
C && S && m.state.next(U);
|
|
3538
3563
|
}
|
|
3539
3564
|
return C ? U : {};
|
|
3540
|
-
},
|
|
3541
|
-
const
|
|
3542
|
-
if (t.delayError &&
|
|
3565
|
+
}, A = (h, p, b, D) => {
|
|
3566
|
+
const S = L(r.errors, h), C = (u.isValid || d.isValid) && pe(p) && r.isValid !== p;
|
|
3567
|
+
if (t.delayError && b ? (l = N(() => x(h, b)), l(t.delayError)) : (clearTimeout(f), l = null, b ? Z(r.errors, h, b) : ne(r.errors, h)), (b ? !Pe(S, b) : S) || !de(D) || C) {
|
|
3543
3568
|
const B = {
|
|
3544
|
-
...
|
|
3569
|
+
...D,
|
|
3545
3570
|
...C && pe(p) ? { isValid: p } : {},
|
|
3546
3571
|
errors: r.errors,
|
|
3547
3572
|
name: h
|
|
@@ -3551,155 +3576,155 @@ function Vo(e = {}) {
|
|
|
3551
3576
|
...B
|
|
3552
3577
|
}, m.state.next(B);
|
|
3553
3578
|
}
|
|
3554
|
-
},
|
|
3579
|
+
}, _ = async (h) => {
|
|
3555
3580
|
w(h, !0);
|
|
3556
3581
|
const p = await t.resolver(s, t.context, xo(h || a.mount, n, t.criteriaMode, t.shouldUseNativeValidation));
|
|
3557
3582
|
return w(h), p;
|
|
3558
3583
|
}, $ = async (h) => {
|
|
3559
|
-
const { errors: p } = await
|
|
3584
|
+
const { errors: p } = await _(h);
|
|
3560
3585
|
if (h)
|
|
3561
|
-
for (const
|
|
3562
|
-
const
|
|
3563
|
-
|
|
3586
|
+
for (const b of h) {
|
|
3587
|
+
const D = L(p, b);
|
|
3588
|
+
D ? Z(r.errors, b, D) : ne(r.errors, b);
|
|
3564
3589
|
}
|
|
3565
3590
|
else
|
|
3566
3591
|
r.errors = p;
|
|
3567
3592
|
return p;
|
|
3568
|
-
},
|
|
3593
|
+
}, I = async (h, p, b = {
|
|
3569
3594
|
valid: !0
|
|
3570
3595
|
}) => {
|
|
3571
|
-
for (const
|
|
3572
|
-
const
|
|
3573
|
-
if (
|
|
3574
|
-
const { _f: C, ...B } =
|
|
3596
|
+
for (const D in h) {
|
|
3597
|
+
const S = h[D];
|
|
3598
|
+
if (S) {
|
|
3599
|
+
const { _f: C, ...B } = S;
|
|
3575
3600
|
if (C) {
|
|
3576
|
-
const U = a.array.has(C.name), q =
|
|
3577
|
-
q && u.validatingFields && w([
|
|
3578
|
-
const
|
|
3579
|
-
if (q && u.validatingFields && w([
|
|
3601
|
+
const U = a.array.has(C.name), q = S._f && No(S._f);
|
|
3602
|
+
q && u.validatingFields && w([D], !0);
|
|
3603
|
+
const be = await Vn(S, a.disabled, s, v, t.shouldUseNativeValidation && !p, U);
|
|
3604
|
+
if (q && u.validatingFields && w([D]), be[C.name] && (b.valid = !1, p))
|
|
3580
3605
|
break;
|
|
3581
|
-
!p && (
|
|
3606
|
+
!p && (L(be, C.name) ? U ? Ao(r.errors, be, C.name) : Z(r.errors, C.name, be[C.name]) : ne(r.errors, C.name));
|
|
3582
3607
|
}
|
|
3583
|
-
!de(B) && await
|
|
3608
|
+
!de(B) && await I(B, p, b);
|
|
3584
3609
|
}
|
|
3585
3610
|
}
|
|
3586
|
-
return
|
|
3611
|
+
return b.valid;
|
|
3587
3612
|
}, H = () => {
|
|
3588
3613
|
for (const h of a.unMount) {
|
|
3589
|
-
const p =
|
|
3590
|
-
p && (p._f.refs ? p._f.refs.every((
|
|
3614
|
+
const p = L(n, h);
|
|
3615
|
+
p && (p._f.refs ? p._f.refs.every((b) => !Cr(b)) : !Cr(p._f.ref)) && He(h);
|
|
3591
3616
|
}
|
|
3592
3617
|
a.unMount = /* @__PURE__ */ new Set();
|
|
3593
|
-
},
|
|
3594
|
-
...o.mount ? s : te(p) ? i :
|
|
3595
|
-
},
|
|
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 ===
|
|
3618
|
+
}, V = (h, p) => !t.disabled && (h && p && Z(s, h, p), !Pe(Re(), i)), T = (h, p, b) => xi(h, a, {
|
|
3619
|
+
...o.mount ? s : te(p) ? i : Ve(h) ? { [h]: p } : p
|
|
3620
|
+
}, b, p), j = (h) => qr(L(o.mount ? s : i, h, t.shouldUnregister ? L(i, h, []) : [])), z = (h, p, b = {}) => {
|
|
3621
|
+
const D = L(n, h);
|
|
3622
|
+
let S = p;
|
|
3623
|
+
if (D) {
|
|
3624
|
+
const C = D._f;
|
|
3625
|
+
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) => {
|
|
3626
|
+
(!B.defaultChecked || !B.disabled) && (Array.isArray(S) ? B.checked = !!S.find((U) => U === B.value) : B.checked = S === B.value || !!S);
|
|
3627
|
+
}) : 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
3628
|
name: h,
|
|
3604
3629
|
values: se(s)
|
|
3605
3630
|
})));
|
|
3606
3631
|
}
|
|
3607
|
-
(
|
|
3608
|
-
}, J = (h, p,
|
|
3609
|
-
for (const
|
|
3610
|
-
if (!p.hasOwnProperty(
|
|
3632
|
+
(b.shouldDirty || b.shouldTouch) && E(h, S, b.shouldTouch, b.shouldDirty, !0), b.shouldValidate && fe(h);
|
|
3633
|
+
}, J = (h, p, b) => {
|
|
3634
|
+
for (const D in p) {
|
|
3635
|
+
if (!p.hasOwnProperty(D))
|
|
3611
3636
|
return;
|
|
3612
|
-
const
|
|
3613
|
-
(a.array.has(h) || re(
|
|
3637
|
+
const S = p[D], C = h + "." + D, B = L(n, C);
|
|
3638
|
+
(a.array.has(h) || re(S) || B && !B._f) && !Qe(S) ? J(C, S, b) : z(C, S, b);
|
|
3614
3639
|
}
|
|
3615
|
-
}, X = (h, p,
|
|
3616
|
-
const
|
|
3617
|
-
Z(s, h, C),
|
|
3640
|
+
}, X = (h, p, b = {}) => {
|
|
3641
|
+
const D = L(n, h), S = a.array.has(h), C = se(p);
|
|
3642
|
+
Z(s, h, C), S ? (m.array.next({
|
|
3618
3643
|
name: h,
|
|
3619
3644
|
values: se(s)
|
|
3620
|
-
}), (u.isDirty || u.dirtyFields || d.isDirty || d.dirtyFields) &&
|
|
3645
|
+
}), (u.isDirty || u.dirtyFields || d.isDirty || d.dirtyFields) && b.shouldDirty && m.state.next({
|
|
3621
3646
|
name: h,
|
|
3622
3647
|
dirtyFields: Nt(i, s),
|
|
3623
|
-
isDirty:
|
|
3624
|
-
})) :
|
|
3648
|
+
isDirty: V(h, C)
|
|
3649
|
+
})) : D && !D._f && !ue(C) ? J(h, C, b) : z(h, C, b), Sn(h, a) && m.state.next({ ...r, name: h }), m.state.next({
|
|
3625
3650
|
name: o.mount ? h : void 0,
|
|
3626
3651
|
values: se(s)
|
|
3627
3652
|
});
|
|
3628
3653
|
}, Q = async (h) => {
|
|
3629
3654
|
o.mount = !0;
|
|
3630
3655
|
const p = h.target;
|
|
3631
|
-
let
|
|
3632
|
-
const
|
|
3633
|
-
|
|
3656
|
+
let b = p.name, D = !0;
|
|
3657
|
+
const S = L(n, b), C = (q) => {
|
|
3658
|
+
D = Number.isNaN(q) || Qe(q) && isNaN(q.getTime()) || Pe(q, L(s, b, q));
|
|
3634
3659
|
}, B = On(t.mode), U = On(t.reValidateMode);
|
|
3635
|
-
if (
|
|
3636
|
-
let q,
|
|
3637
|
-
const Zt = p.type ? kn(
|
|
3638
|
-
Z(s,
|
|
3639
|
-
const xr =
|
|
3660
|
+
if (S) {
|
|
3661
|
+
let q, be;
|
|
3662
|
+
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, b) && !S._f.deps || Eo(We, L(r.touchedFields, b), r.isSubmitted, U, B), wr = Sn(b, a, We);
|
|
3663
|
+
Z(s, b, Zt), We ? (S._f.onBlur && S._f.onBlur(h), l && l(0)) : S._f.onChange && S._f.onChange(h);
|
|
3664
|
+
const xr = E(b, Zt, We), Hi = !de(xr) || wr;
|
|
3640
3665
|
if (!We && m.state.next({
|
|
3641
|
-
name:
|
|
3666
|
+
name: b,
|
|
3642
3667
|
type: h.type,
|
|
3643
3668
|
values: se(s)
|
|
3644
3669
|
}), $i)
|
|
3645
|
-
return (u.isValid || d.isValid) && (t.mode === "onBlur" ? We && g() : We || g()), Hi && m.state.next({ name:
|
|
3670
|
+
return (u.isValid || d.isValid) && (t.mode === "onBlur" ? We && g() : We || g()), Hi && m.state.next({ name: b, ...wr ? {} : xr });
|
|
3646
3671
|
if (!We && wr && m.state.next({ ...r }), t.resolver) {
|
|
3647
|
-
const { errors: rn } = await
|
|
3648
|
-
if (C(Zt),
|
|
3649
|
-
const Wi = An(r.errors, n,
|
|
3650
|
-
q = nn.error,
|
|
3672
|
+
const { errors: rn } = await _([b]);
|
|
3673
|
+
if (C(Zt), D) {
|
|
3674
|
+
const Wi = An(r.errors, n, b), nn = An(rn, n, Wi.name || b);
|
|
3675
|
+
q = nn.error, b = nn.name, be = de(rn);
|
|
3651
3676
|
}
|
|
3652
3677
|
} else
|
|
3653
|
-
w([
|
|
3654
|
-
|
|
3678
|
+
w([b], !0), q = (await Vn(S, a.disabled, s, v, t.shouldUseNativeValidation))[b], w([b]), C(Zt), D && (q ? be = !1 : (u.isValid || d.isValid) && (be = await I(n, !0)));
|
|
3679
|
+
D && (S._f.deps && fe(S._f.deps), A(b, be, q, xr));
|
|
3655
3680
|
}
|
|
3656
|
-
},
|
|
3657
|
-
if (
|
|
3681
|
+
}, Ae = (h, p) => {
|
|
3682
|
+
if (L(r.errors, p) && h.focus)
|
|
3658
3683
|
return h.focus(), 1;
|
|
3659
3684
|
}, fe = async (h, p = {}) => {
|
|
3660
|
-
let
|
|
3661
|
-
const
|
|
3685
|
+
let b, D;
|
|
3686
|
+
const S = Et(h);
|
|
3662
3687
|
if (t.resolver) {
|
|
3663
|
-
const C = await $(te(h) ? h :
|
|
3664
|
-
|
|
3665
|
-
} else h ? (
|
|
3666
|
-
const B =
|
|
3667
|
-
return await
|
|
3668
|
-
}))).every(Boolean), !(!
|
|
3688
|
+
const C = await $(te(h) ? h : S);
|
|
3689
|
+
b = de(C), D = h ? !S.some((B) => L(C, B)) : b;
|
|
3690
|
+
} else h ? (D = (await Promise.all(S.map(async (C) => {
|
|
3691
|
+
const B = L(n, C);
|
|
3692
|
+
return await I(B && B._f ? { [C]: B } : B);
|
|
3693
|
+
}))).every(Boolean), !(!D && !r.isValid) && g()) : D = b = await I(n);
|
|
3669
3694
|
return m.state.next({
|
|
3670
|
-
...!
|
|
3671
|
-
...t.resolver || !h ? { isValid:
|
|
3695
|
+
...!Ve(h) || (u.isValid || d.isValid) && b !== r.isValid ? {} : { name: h },
|
|
3696
|
+
...t.resolver || !h ? { isValid: b } : {},
|
|
3672
3697
|
errors: r.errors
|
|
3673
|
-
}), p.shouldFocus && !
|
|
3674
|
-
},
|
|
3698
|
+
}), p.shouldFocus && !D && St(n, Ae, h ? S : a.mount), D;
|
|
3699
|
+
}, Re = (h) => {
|
|
3675
3700
|
const p = {
|
|
3676
3701
|
...o.mount ? s : i
|
|
3677
3702
|
};
|
|
3678
|
-
return te(h) ? p :
|
|
3703
|
+
return te(h) ? p : Ve(h) ? L(p, h) : h.map((b) => L(p, b));
|
|
3679
3704
|
}, ot = (h, p) => ({
|
|
3680
|
-
invalid: !!
|
|
3681
|
-
isDirty: !!
|
|
3682
|
-
error:
|
|
3683
|
-
isValidating: !!
|
|
3684
|
-
isTouched: !!
|
|
3705
|
+
invalid: !!L((p || r).errors, h),
|
|
3706
|
+
isDirty: !!L((p || r).dirtyFields, h),
|
|
3707
|
+
error: L((p || r).errors, h),
|
|
3708
|
+
isValidating: !!L(r.validatingFields, h),
|
|
3709
|
+
isTouched: !!L((p || r).touchedFields, h)
|
|
3685
3710
|
}), Ze = (h) => {
|
|
3686
3711
|
h && Et(h).forEach((p) => ne(r.errors, p)), m.state.next({
|
|
3687
3712
|
errors: h ? r.errors : {}
|
|
3688
3713
|
});
|
|
3689
|
-
}, Xe = (h, p,
|
|
3690
|
-
const
|
|
3714
|
+
}, Xe = (h, p, b) => {
|
|
3715
|
+
const D = (L(n, h, { _f: {} })._f || {}).ref, S = L(r.errors, h) || {}, { ref: C, message: B, type: U, ...q } = S;
|
|
3691
3716
|
Z(r.errors, h, {
|
|
3692
3717
|
...q,
|
|
3693
3718
|
...p,
|
|
3694
|
-
ref:
|
|
3719
|
+
ref: D
|
|
3695
3720
|
}), m.state.next({
|
|
3696
3721
|
name: h,
|
|
3697
3722
|
errors: r.errors,
|
|
3698
3723
|
isValid: !1
|
|
3699
|
-
}),
|
|
3724
|
+
}), b && b.shouldFocus && D && D.focus && D.focus();
|
|
3700
3725
|
}, $e = (h, p) => Ee(h) ? m.state.subscribe({
|
|
3701
|
-
next: (
|
|
3702
|
-
}) :
|
|
3726
|
+
next: (b) => "values" in b && h(T(void 0, p), b)
|
|
3727
|
+
}) : T(h, p, !0), ke = (h) => m.state.subscribe({
|
|
3703
3728
|
next: (p) => {
|
|
3704
3729
|
Oo(h.name, p.name, h.exact) && ko(p, h.formState || u, zt, h.reRenderRoot) && h.callback({
|
|
3705
3730
|
values: { ...s },
|
|
@@ -3715,32 +3740,32 @@ function Vo(e = {}) {
|
|
|
3715
3740
|
...h,
|
|
3716
3741
|
formState: d
|
|
3717
3742
|
})), He = (h, p = {}) => {
|
|
3718
|
-
for (const
|
|
3719
|
-
a.mount.delete(
|
|
3743
|
+
for (const b of h ? Et(h) : a.mount)
|
|
3744
|
+
a.mount.delete(b), a.array.delete(b), p.keepValue || (ne(n, b), ne(s, b)), !p.keepError && ne(r.errors, b), !p.keepDirty && ne(r.dirtyFields, b), !p.keepTouched && ne(r.touchedFields, b), !p.keepIsValidating && ne(r.validatingFields, b), !t.shouldUnregister && !p.keepDefaultValue && ne(i, b);
|
|
3720
3745
|
m.state.next({
|
|
3721
3746
|
values: se(s)
|
|
3722
3747
|
}), m.state.next({
|
|
3723
3748
|
...r,
|
|
3724
|
-
...p.keepDirty ? { isDirty:
|
|
3749
|
+
...p.keepDirty ? { isDirty: V() } : {}
|
|
3725
3750
|
}), !p.keepIsValid && g();
|
|
3726
|
-
},
|
|
3751
|
+
}, Le = ({ disabled: h, name: p }) => {
|
|
3727
3752
|
(pe(h) && o.mount || h || a.disabled.has(p)) && (h ? a.disabled.add(p) : a.disabled.delete(p));
|
|
3728
3753
|
}, Ye = (h, p = {}) => {
|
|
3729
|
-
let
|
|
3730
|
-
const
|
|
3754
|
+
let b = L(n, h);
|
|
3755
|
+
const D = pe(p.disabled) || pe(t.disabled);
|
|
3731
3756
|
return Z(n, h, {
|
|
3732
|
-
...
|
|
3757
|
+
...b || {},
|
|
3733
3758
|
_f: {
|
|
3734
|
-
...
|
|
3759
|
+
...b && b._f ? b._f : { ref: { name: h } },
|
|
3735
3760
|
name: h,
|
|
3736
3761
|
mount: !0,
|
|
3737
3762
|
...p
|
|
3738
3763
|
}
|
|
3739
|
-
}), a.mount.add(h),
|
|
3764
|
+
}), a.mount.add(h), b ? Le({
|
|
3740
3765
|
disabled: pe(p.disabled) ? p.disabled : t.disabled,
|
|
3741
3766
|
name: h
|
|
3742
|
-
}) :
|
|
3743
|
-
...
|
|
3767
|
+
}) : k(h, !0, p.value), {
|
|
3768
|
+
...D ? { disabled: p.disabled || t.disabled } : {},
|
|
3744
3769
|
...t.progressive ? {
|
|
3745
3770
|
required: !!p.required,
|
|
3746
3771
|
min: Ct(p.min),
|
|
@@ -3752,91 +3777,91 @@ function Vo(e = {}) {
|
|
|
3752
3777
|
name: h,
|
|
3753
3778
|
onChange: Q,
|
|
3754
3779
|
onBlur: Q,
|
|
3755
|
-
ref: (
|
|
3756
|
-
if (
|
|
3757
|
-
Ye(h, p),
|
|
3758
|
-
const C = te(
|
|
3759
|
-
if (B ? U.find((q) => q === C) : C ===
|
|
3780
|
+
ref: (S) => {
|
|
3781
|
+
if (S) {
|
|
3782
|
+
Ye(h, p), b = L(n, h);
|
|
3783
|
+
const C = te(S.value) && S.querySelectorAll && S.querySelectorAll("input,select,textarea")[0] || S, B = bo(C), U = b._f.refs || [];
|
|
3784
|
+
if (B ? U.find((q) => q === C) : C === b._f.ref)
|
|
3760
3785
|
return;
|
|
3761
3786
|
Z(n, h, {
|
|
3762
3787
|
_f: {
|
|
3763
|
-
...
|
|
3788
|
+
...b._f,
|
|
3764
3789
|
...B ? {
|
|
3765
3790
|
refs: [
|
|
3766
3791
|
...U.filter(Cr),
|
|
3767
3792
|
C,
|
|
3768
|
-
...Array.isArray(
|
|
3793
|
+
...Array.isArray(L(i, h)) ? [{}] : []
|
|
3769
3794
|
],
|
|
3770
3795
|
ref: { type: C.type, name: h }
|
|
3771
3796
|
} : { ref: C }
|
|
3772
3797
|
}
|
|
3773
|
-
}),
|
|
3798
|
+
}), k(h, !1, void 0, C);
|
|
3774
3799
|
} else
|
|
3775
|
-
|
|
3800
|
+
b = L(n, h, {}), b._f && (b._f.mount = !1), (t.shouldUnregister || p.shouldUnregister) && !(bi(a.array, h) && o.action) && a.unMount.add(h);
|
|
3776
3801
|
}
|
|
3777
3802
|
};
|
|
3778
|
-
},
|
|
3779
|
-
pe(h) && (m.state.next({ disabled: h }), St(n, (p,
|
|
3780
|
-
const
|
|
3781
|
-
|
|
3782
|
-
|
|
3803
|
+
}, yt = () => t.shouldFocusError && St(n, Ae, a.mount), wt = (h) => {
|
|
3804
|
+
pe(h) && (m.state.next({ disabled: h }), St(n, (p, b) => {
|
|
3805
|
+
const D = L(n, b);
|
|
3806
|
+
D && (p.disabled = D._f.disabled || h, Array.isArray(D._f.refs) && D._f.refs.forEach((S) => {
|
|
3807
|
+
S.disabled = D._f.disabled || h;
|
|
3783
3808
|
}));
|
|
3784
3809
|
}, 0, !1));
|
|
3785
|
-
}, jt = (h, p) => async (
|
|
3786
|
-
let
|
|
3787
|
-
|
|
3788
|
-
let
|
|
3810
|
+
}, jt = (h, p) => async (b) => {
|
|
3811
|
+
let D;
|
|
3812
|
+
b && (b.preventDefault && b.preventDefault(), b.persist && b.persist());
|
|
3813
|
+
let S = se(s);
|
|
3789
3814
|
if (m.state.next({
|
|
3790
3815
|
isSubmitting: !0
|
|
3791
3816
|
}), t.resolver) {
|
|
3792
|
-
const { errors: C, values: B } = await
|
|
3793
|
-
r.errors = C,
|
|
3817
|
+
const { errors: C, values: B } = await _();
|
|
3818
|
+
r.errors = C, S = se(B);
|
|
3794
3819
|
} else
|
|
3795
|
-
await
|
|
3820
|
+
await I(n);
|
|
3796
3821
|
if (a.disabled.size)
|
|
3797
3822
|
for (const C of a.disabled)
|
|
3798
|
-
ne(
|
|
3823
|
+
ne(S, C);
|
|
3799
3824
|
if (ne(r.errors, "root"), de(r.errors)) {
|
|
3800
3825
|
m.state.next({
|
|
3801
3826
|
errors: {}
|
|
3802
3827
|
});
|
|
3803
3828
|
try {
|
|
3804
|
-
await h(
|
|
3829
|
+
await h(S, b);
|
|
3805
3830
|
} catch (C) {
|
|
3806
|
-
|
|
3831
|
+
D = C;
|
|
3807
3832
|
}
|
|
3808
3833
|
} else
|
|
3809
|
-
p && await p({ ...r.errors },
|
|
3834
|
+
p && await p({ ...r.errors }, b), yt(), setTimeout(yt);
|
|
3810
3835
|
if (m.state.next({
|
|
3811
3836
|
isSubmitted: !0,
|
|
3812
3837
|
isSubmitting: !1,
|
|
3813
|
-
isSubmitSuccessful: de(r.errors) && !
|
|
3838
|
+
isSubmitSuccessful: de(r.errors) && !D,
|
|
3814
3839
|
submitCount: r.submitCount + 1,
|
|
3815
3840
|
errors: r.errors
|
|
3816
|
-
}),
|
|
3817
|
-
throw
|
|
3841
|
+
}), D)
|
|
3842
|
+
throw D;
|
|
3818
3843
|
}, $t = (h, p = {}) => {
|
|
3819
|
-
|
|
3844
|
+
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 ? V(h, se(L(i, h))) : V()), p.keepError || (ne(r.errors, h), u.isValid && g()), m.state.next({ ...r }));
|
|
3820
3845
|
}, Ht = (h, p = {}) => {
|
|
3821
|
-
const
|
|
3822
|
-
if (p.keepDefaultValues || (i =
|
|
3846
|
+
const b = h ? se(h) : i, D = se(b), S = de(h), C = S ? i : D;
|
|
3847
|
+
if (p.keepDefaultValues || (i = b), !p.keepValues) {
|
|
3823
3848
|
if (p.keepDirtyValues) {
|
|
3824
3849
|
const B = /* @__PURE__ */ new Set([
|
|
3825
3850
|
...a.mount,
|
|
3826
3851
|
...Object.keys(Nt(i, s))
|
|
3827
3852
|
]);
|
|
3828
3853
|
for (const U of Array.from(B))
|
|
3829
|
-
|
|
3854
|
+
L(r.dirtyFields, U) ? Z(C, U, L(s, U)) : X(U, L(C, U));
|
|
3830
3855
|
} else {
|
|
3831
3856
|
if (zr && te(h))
|
|
3832
3857
|
for (const B of a.mount) {
|
|
3833
|
-
const U =
|
|
3858
|
+
const U = L(n, B);
|
|
3834
3859
|
if (U && U._f) {
|
|
3835
3860
|
const q = Array.isArray(U._f.refs) ? U._f.refs[0] : U._f.ref;
|
|
3836
3861
|
if (ar(q)) {
|
|
3837
|
-
const
|
|
3838
|
-
if (
|
|
3839
|
-
|
|
3862
|
+
const be = q.closest("form");
|
|
3863
|
+
if (be) {
|
|
3864
|
+
be.reset();
|
|
3840
3865
|
break;
|
|
3841
3866
|
}
|
|
3842
3867
|
}
|
|
@@ -3844,7 +3869,7 @@ function Vo(e = {}) {
|
|
|
3844
3869
|
}
|
|
3845
3870
|
if (p.keepFieldsRef)
|
|
3846
3871
|
for (const B of a.mount)
|
|
3847
|
-
X(B,
|
|
3872
|
+
X(B, L(C, B));
|
|
3848
3873
|
else
|
|
3849
3874
|
n = {};
|
|
3850
3875
|
}
|
|
@@ -3864,19 +3889,19 @@ function Vo(e = {}) {
|
|
|
3864
3889
|
focus: ""
|
|
3865
3890
|
}, o.mount = !u.isValid || !!p.keepIsValid || !!p.keepDirtyValues, o.watch = !!t.shouldUnregister, m.state.next({
|
|
3866
3891
|
submitCount: p.keepSubmitCount ? r.submitCount : 0,
|
|
3867
|
-
isDirty:
|
|
3892
|
+
isDirty: S ? !1 : p.keepDirty ? r.isDirty : !!(p.keepDefaultValues && !Pe(h, i)),
|
|
3868
3893
|
isSubmitted: p.keepIsSubmitted ? r.isSubmitted : !1,
|
|
3869
|
-
dirtyFields:
|
|
3894
|
+
dirtyFields: S ? {} : p.keepDirtyValues ? p.keepDefaultValues && s ? Nt(i, s) : r.dirtyFields : p.keepDefaultValues && h ? Nt(i, h) : p.keepDirty ? r.dirtyFields : {},
|
|
3870
3895
|
touchedFields: p.keepTouched ? r.touchedFields : {},
|
|
3871
3896
|
errors: p.keepErrors ? r.errors : {},
|
|
3872
3897
|
isSubmitSuccessful: p.keepIsSubmitSuccessful ? r.isSubmitSuccessful : !1,
|
|
3873
3898
|
isSubmitting: !1
|
|
3874
3899
|
});
|
|
3875
3900
|
}, Wt = (h, p) => Ht(Ee(h) ? h(s) : h, p), Ut = (h, p = {}) => {
|
|
3876
|
-
const
|
|
3877
|
-
if (
|
|
3878
|
-
const
|
|
3879
|
-
|
|
3901
|
+
const b = L(n, h), D = b && b._f;
|
|
3902
|
+
if (D) {
|
|
3903
|
+
const S = D.refs ? D.refs[0] : D.ref;
|
|
3904
|
+
S.focus && (S.focus(), p.shouldSelect && Ee(S.select) && S.select());
|
|
3880
3905
|
}
|
|
3881
3906
|
}, zt = (h) => {
|
|
3882
3907
|
r = {
|
|
@@ -3891,14 +3916,14 @@ function Vo(e = {}) {
|
|
|
3891
3916
|
handleSubmit: jt,
|
|
3892
3917
|
setError: Xe,
|
|
3893
3918
|
_subscribe: ke,
|
|
3894
|
-
_runSchema:
|
|
3895
|
-
_focusError:
|
|
3896
|
-
_getWatch:
|
|
3897
|
-
_getDirty:
|
|
3919
|
+
_runSchema: _,
|
|
3920
|
+
_focusError: yt,
|
|
3921
|
+
_getWatch: T,
|
|
3922
|
+
_getDirty: V,
|
|
3898
3923
|
_setValid: g,
|
|
3899
|
-
_setFieldArray:
|
|
3900
|
-
_setDisabledField:
|
|
3901
|
-
_setErrors:
|
|
3924
|
+
_setFieldArray: M,
|
|
3925
|
+
_setDisabledField: Le,
|
|
3926
|
+
_setErrors: F,
|
|
3902
3927
|
_getFieldArray: j,
|
|
3903
3928
|
_reset: Ht,
|
|
3904
3929
|
_resetDefaultValues: () => Ee(t.defaultValues) && t.defaultValues().then((h) => {
|
|
@@ -3950,7 +3975,7 @@ function Vo(e = {}) {
|
|
|
3950
3975
|
handleSubmit: jt,
|
|
3951
3976
|
watch: $e,
|
|
3952
3977
|
setValue: X,
|
|
3953
|
-
getValues:
|
|
3978
|
+
getValues: Re,
|
|
3954
3979
|
reset: Wt,
|
|
3955
3980
|
resetField: $t,
|
|
3956
3981
|
clearErrors: Ze,
|
|
@@ -3965,7 +3990,7 @@ function Vo(e = {}) {
|
|
|
3965
3990
|
};
|
|
3966
3991
|
}
|
|
3967
3992
|
function Fo(e = {}) {
|
|
3968
|
-
const t =
|
|
3993
|
+
const t = P.useRef(void 0), r = P.useRef(void 0), [n, i] = P.useState({
|
|
3969
3994
|
isDirty: !1,
|
|
3970
3995
|
isValidating: !1,
|
|
3971
3996
|
isLoading: Ee(e.defaultValues),
|
|
@@ -4006,33 +4031,33 @@ function Fo(e = {}) {
|
|
|
4006
4031
|
...a,
|
|
4007
4032
|
isReady: !0
|
|
4008
4033
|
})), s._formState.isReady = !0, o;
|
|
4009
|
-
}, [s]),
|
|
4034
|
+
}, [s]), P.useEffect(() => s._disableForm(e.disabled), [s, e.disabled]), P.useEffect(() => {
|
|
4010
4035
|
e.mode && (s._options.mode = e.mode), e.reValidateMode && (s._options.reValidateMode = e.reValidateMode);
|
|
4011
|
-
}, [s, e.mode, e.reValidateMode]),
|
|
4036
|
+
}, [s, e.mode, e.reValidateMode]), P.useEffect(() => {
|
|
4012
4037
|
e.errors && (s._setErrors(e.errors), s._focusError());
|
|
4013
|
-
}, [s, e.errors]),
|
|
4038
|
+
}, [s, e.errors]), P.useEffect(() => {
|
|
4014
4039
|
e.shouldUnregister && s._subjects.state.next({
|
|
4015
4040
|
values: s._getWatch()
|
|
4016
4041
|
});
|
|
4017
|
-
}, [s, e.shouldUnregister]),
|
|
4042
|
+
}, [s, e.shouldUnregister]), P.useEffect(() => {
|
|
4018
4043
|
if (s._proxyFormState.isDirty) {
|
|
4019
4044
|
const o = s._getDirty();
|
|
4020
4045
|
o !== n.isDirty && s._subjects.state.next({
|
|
4021
4046
|
isDirty: o
|
|
4022
4047
|
});
|
|
4023
4048
|
}
|
|
4024
|
-
}, [s, n.isDirty]),
|
|
4025
|
-
e.values && !
|
|
4049
|
+
}, [s, n.isDirty]), P.useEffect(() => {
|
|
4050
|
+
e.values && !Pe(e.values, r.current) ? (s._reset(e.values, {
|
|
4026
4051
|
keepFieldsRef: !0,
|
|
4027
4052
|
...s._options.resetOptions
|
|
4028
4053
|
}), r.current = e.values, i((o) => ({ ...o }))) : s._resetDefaultValues();
|
|
4029
|
-
}, [s, e.values]),
|
|
4054
|
+
}, [s, e.values]), P.useEffect(() => {
|
|
4030
4055
|
s._state.mount || (s._setValid(), s._state.mount = !0), s._state.watch && (s._state.watch = !1, s._subjects.state.next({ ...s._formState })), s._removeUnmounted();
|
|
4031
|
-
}), t.current.formState =
|
|
4056
|
+
}), t.current.formState = yi(n, s), t.current;
|
|
4032
4057
|
}
|
|
4033
4058
|
const Fn = (e, t, r) => {
|
|
4034
4059
|
if (e && "reportValidity" in e) {
|
|
4035
|
-
const n =
|
|
4060
|
+
const n = L(r, t);
|
|
4036
4061
|
e.setCustomValidity(n && n.message || ""), e.reportValidity();
|
|
4037
4062
|
}
|
|
4038
4063
|
}, Vi = (e, t) => {
|
|
@@ -4044,9 +4069,9 @@ const Fn = (e, t, r) => {
|
|
|
4044
4069
|
t.shouldUseNativeValidation && Vi(e, t);
|
|
4045
4070
|
const r = {};
|
|
4046
4071
|
for (const n in e) {
|
|
4047
|
-
const i =
|
|
4072
|
+
const i = L(t.fields, n), s = Object.assign(e[n] || {}, { ref: i && i.ref });
|
|
4048
4073
|
if (_o(t.names || Object.keys(e), n)) {
|
|
4049
|
-
const o = Object.assign({},
|
|
4074
|
+
const o = Object.assign({}, L(r, n));
|
|
4050
4075
|
Z(o, "root", s), Z(r, n, o);
|
|
4051
4076
|
} else Z(r, n, s);
|
|
4052
4077
|
}
|
|
@@ -4105,7 +4130,7 @@ function Tl({
|
|
|
4105
4130
|
}, [f, u.watch]), /* @__PURE__ */ c(vo, { ...u, children: /* @__PURE__ */ c(
|
|
4106
4131
|
"form",
|
|
4107
4132
|
{
|
|
4108
|
-
className:
|
|
4133
|
+
className: O("bbn-form", e),
|
|
4109
4134
|
name: t,
|
|
4110
4135
|
onSubmit: u.handleSubmit(l),
|
|
4111
4136
|
...a,
|
|
@@ -4151,24 +4176,24 @@ function Bl({
|
|
|
4151
4176
|
suffix: d,
|
|
4152
4177
|
prefix: m,
|
|
4153
4178
|
shouldUnregister: v,
|
|
4154
|
-
state:
|
|
4179
|
+
state: N,
|
|
4155
4180
|
validateOnMount: g
|
|
4156
4181
|
}) {
|
|
4157
4182
|
const {
|
|
4158
4183
|
ref: w,
|
|
4159
|
-
value:
|
|
4160
|
-
error:
|
|
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:
|
|
4184
|
+
value: M = "",
|
|
4185
|
+
error: x,
|
|
4186
|
+
invalid: F,
|
|
4187
|
+
onChange: k,
|
|
4188
|
+
onBlur: E
|
|
4189
|
+
} = vt({ name: e, defaultValue: l, autoFocus: a, shouldUnregister: v, validateOnMount: g }), A = F ? "error" : N;
|
|
4190
|
+
return /* @__PURE__ */ c(mr, { label: r, className: s, state: A, hint: F ? x : n, children: /* @__PURE__ */ c(
|
|
4166
4191
|
hr,
|
|
4167
4192
|
{
|
|
4168
4193
|
inputMode: "decimal",
|
|
4169
4194
|
pattern: "^-?\\d*\\.?\\d*$",
|
|
4170
4195
|
ref: w,
|
|
4171
|
-
value:
|
|
4196
|
+
value: M,
|
|
4172
4197
|
id: t,
|
|
4173
4198
|
name: e,
|
|
4174
4199
|
type: u,
|
|
@@ -4178,11 +4203,11 @@ function Bl({
|
|
|
4178
4203
|
placeholder: f,
|
|
4179
4204
|
suffix: d,
|
|
4180
4205
|
prefix: m,
|
|
4181
|
-
state:
|
|
4182
|
-
onChange: (
|
|
4183
|
-
To.test(
|
|
4206
|
+
state: A,
|
|
4207
|
+
onChange: (I) => {
|
|
4208
|
+
To.test(I.target.value) && k(I.target.value);
|
|
4184
4209
|
},
|
|
4185
|
-
onBlur:
|
|
4210
|
+
onBlur: E
|
|
4186
4211
|
}
|
|
4187
4212
|
) });
|
|
4188
4213
|
}
|
|
@@ -4201,22 +4226,22 @@ function Pl({
|
|
|
4201
4226
|
suffix: d,
|
|
4202
4227
|
prefix: m,
|
|
4203
4228
|
shouldUnregister: v,
|
|
4204
|
-
state:
|
|
4229
|
+
state: N,
|
|
4205
4230
|
validateOnMount: g
|
|
4206
4231
|
}) {
|
|
4207
4232
|
const {
|
|
4208
4233
|
ref: w,
|
|
4209
|
-
value:
|
|
4210
|
-
error:
|
|
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:
|
|
4234
|
+
value: M = "",
|
|
4235
|
+
error: x,
|
|
4236
|
+
invalid: F,
|
|
4237
|
+
onChange: k,
|
|
4238
|
+
onBlur: E
|
|
4239
|
+
} = vt({ name: e, defaultValue: l, autoFocus: a, shouldUnregister: v, validateOnMount: g }), A = F ? "error" : N;
|
|
4240
|
+
return /* @__PURE__ */ c(mr, { label: r, className: s, state: A, hint: F ? x : n, children: /* @__PURE__ */ c(
|
|
4216
4241
|
hr,
|
|
4217
4242
|
{
|
|
4218
4243
|
ref: w,
|
|
4219
|
-
value:
|
|
4244
|
+
value: M,
|
|
4220
4245
|
id: t,
|
|
4221
4246
|
name: e,
|
|
4222
4247
|
type: u,
|
|
@@ -4226,9 +4251,9 @@ function Pl({
|
|
|
4226
4251
|
placeholder: f,
|
|
4227
4252
|
suffix: d,
|
|
4228
4253
|
prefix: m,
|
|
4229
|
-
state:
|
|
4230
|
-
onChange:
|
|
4231
|
-
onBlur:
|
|
4254
|
+
state: A,
|
|
4255
|
+
onChange: k,
|
|
4256
|
+
onBlur: E
|
|
4232
4257
|
}
|
|
4233
4258
|
) });
|
|
4234
4259
|
}
|
|
@@ -4311,45 +4336,45 @@ function $l({
|
|
|
4311
4336
|
disabled: d,
|
|
4312
4337
|
autoFocus: m,
|
|
4313
4338
|
defaultValue: v,
|
|
4314
|
-
placeholder:
|
|
4339
|
+
placeholder: N,
|
|
4315
4340
|
shouldUnregister: g,
|
|
4316
4341
|
state: w,
|
|
4317
|
-
validateOnMount:
|
|
4318
|
-
onOpen:
|
|
4319
|
-
onClose:
|
|
4320
|
-
renderSelectedOption:
|
|
4342
|
+
validateOnMount: M,
|
|
4343
|
+
onOpen: x,
|
|
4344
|
+
onClose: F,
|
|
4345
|
+
renderSelectedOption: k
|
|
4321
4346
|
}) {
|
|
4322
4347
|
const {
|
|
4323
|
-
ref:
|
|
4324
|
-
value:
|
|
4325
|
-
error:
|
|
4348
|
+
ref: E,
|
|
4349
|
+
value: A = "",
|
|
4350
|
+
error: _,
|
|
4326
4351
|
invalid: $,
|
|
4327
|
-
onChange:
|
|
4352
|
+
onChange: I,
|
|
4328
4353
|
onBlur: H
|
|
4329
|
-
} = vt({ name: s, defaultValue: v, autoFocus: m, shouldUnregister: g, validateOnMount:
|
|
4330
|
-
return /* @__PURE__ */ c(mr, { label: a, className: u, state:
|
|
4354
|
+
} = vt({ name: s, defaultValue: v, autoFocus: m, shouldUnregister: g, validateOnMount: M }), V = $ ? "error" : w;
|
|
4355
|
+
return /* @__PURE__ */ c(mr, { label: a, className: u, state: V, hint: $ ? _ : l, children: /* @__PURE__ */ c(
|
|
4331
4356
|
ei,
|
|
4332
4357
|
{
|
|
4333
4358
|
open: e,
|
|
4334
4359
|
defaultOpen: t,
|
|
4335
4360
|
options: r,
|
|
4336
|
-
ref:
|
|
4337
|
-
value:
|
|
4361
|
+
ref: E,
|
|
4362
|
+
value: A,
|
|
4338
4363
|
id: o,
|
|
4339
4364
|
name: s,
|
|
4340
4365
|
className: f,
|
|
4341
4366
|
disabled: d,
|
|
4342
|
-
placeholder:
|
|
4343
|
-
state:
|
|
4367
|
+
placeholder: N,
|
|
4368
|
+
state: V,
|
|
4344
4369
|
optionClassName: n,
|
|
4345
4370
|
popoverClassName: i,
|
|
4346
|
-
onSelect:
|
|
4371
|
+
onSelect: I,
|
|
4347
4372
|
onBlur: H,
|
|
4348
|
-
onOpen:
|
|
4373
|
+
onOpen: x,
|
|
4349
4374
|
onClose: () => {
|
|
4350
|
-
H == null || H(),
|
|
4375
|
+
H == null || H(), F == null || F();
|
|
4351
4376
|
},
|
|
4352
|
-
renderSelectedOption:
|
|
4377
|
+
renderSelectedOption: k
|
|
4353
4378
|
}
|
|
4354
4379
|
) });
|
|
4355
4380
|
}
|
|
@@ -4404,12 +4429,12 @@ function Fi({ bsnId: e, bsnName: t, bsnLogoUrl: r, address: n, provider: i, onRe
|
|
|
4404
4429
|
children: m
|
|
4405
4430
|
}
|
|
4406
4431
|
) });
|
|
4407
|
-
}, l = (m) => !m || m.length <= 12 ? m : `${m.slice(0, 6)}...${m.slice(-6)}`, f = () => o ? n ? /* @__PURE__ */ c("div", { className: "text-xs text-accent-secondary", children: l(n) }) : /* @__PURE__ */
|
|
4432
|
+
}, l = (m) => !m || m.length <= 12 ? m : `${m.slice(0, 6)}...${m.slice(-6)}`, f = () => o ? n ? /* @__PURE__ */ c("div", { className: "text-xs text-accent-secondary", children: l(n) }) : /* @__PURE__ */ y("div", { className: "flex items-center text-xs text-accent-secondary", children: [
|
|
4408
4433
|
a(),
|
|
4409
4434
|
t
|
|
4410
4435
|
] }) : null;
|
|
4411
|
-
return /* @__PURE__ */
|
|
4412
|
-
/* @__PURE__ */
|
|
4436
|
+
return /* @__PURE__ */ y("div", { className: "flex flex-row items-center justify-between", children: [
|
|
4437
|
+
/* @__PURE__ */ y("div", { className: "flex h-10 flex-row gap-2", children: [
|
|
4413
4438
|
/* @__PURE__ */ c("div", { className: "shrink-0", children: /* @__PURE__ */ c(
|
|
4414
4439
|
Po,
|
|
4415
4440
|
{
|
|
@@ -4419,7 +4444,7 @@ function Fi({ bsnId: e, bsnName: t, bsnLogoUrl: r, address: n, provider: i, onRe
|
|
|
4419
4444
|
size: "lg"
|
|
4420
4445
|
}
|
|
4421
4446
|
) }),
|
|
4422
|
-
/* @__PURE__ */
|
|
4447
|
+
/* @__PURE__ */ y("div", { className: "flex flex-col justify-center text-accent-primary", children: [
|
|
4423
4448
|
f(),
|
|
4424
4449
|
/* @__PURE__ */ c(W, { as: "div", className: "text-base font-medium text-accent-primary", children: (d = i.description) == null ? void 0 : d.moniker })
|
|
4425
4450
|
] })
|
|
@@ -4440,10 +4465,10 @@ const Hl = ({
|
|
|
4440
4465
|
isSelected: r = !1,
|
|
4441
4466
|
isSelectable: n = !0,
|
|
4442
4467
|
onSelect: i
|
|
4443
|
-
}) => /* @__PURE__ */
|
|
4468
|
+
}) => /* @__PURE__ */ y("div", { className: "bg-secondary-highlight h-[316px] overflow-hidden p-4 flex flex-col rounded justify-between", children: [
|
|
4444
4469
|
/* @__PURE__ */ c(Fi, { ...t }),
|
|
4445
4470
|
/* @__PURE__ */ c("div", { className: "w-full h-px bg-secondary-strokeLight" }),
|
|
4446
|
-
Object.entries(e).map(([s, o]) => /* @__PURE__ */
|
|
4471
|
+
Object.entries(e).map(([s, o]) => /* @__PURE__ */ y(
|
|
4447
4472
|
"div",
|
|
4448
4473
|
{
|
|
4449
4474
|
className: "text-sm flex flex-row justify-between first:mt-0 mt-1",
|
|
@@ -4464,12 +4489,12 @@ const Hl = ({
|
|
|
4464
4489
|
children: r ? "Selected" : "Select"
|
|
4465
4490
|
}
|
|
4466
4491
|
)
|
|
4467
|
-
] }), Jr = 8, Io = 5,
|
|
4492
|
+
] }), Jr = 8, Io = 5, yr = 640, Di = 500;
|
|
4468
4493
|
function jo(e) {
|
|
4469
4494
|
return st({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z" }, child: [] }] })(e);
|
|
4470
4495
|
}
|
|
4471
4496
|
function $o({ className: e, ...t }) {
|
|
4472
|
-
const n = Pt(
|
|
4497
|
+
const n = Pt(yr) ? Rt : pr;
|
|
4473
4498
|
return /* @__PURE__ */ c(n, { ...t, className: ce("w-[41.25rem] max-w-full", e) });
|
|
4474
4499
|
}
|
|
4475
4500
|
const Wl = ({
|
|
@@ -4490,12 +4515,12 @@ const Wl = ({
|
|
|
4490
4515
|
className: "opacity-60 hover:opacity-100 transition-opacity",
|
|
4491
4516
|
children: /* @__PURE__ */ c(jo, { size: 18, className: "text-secondary-strokeDark" })
|
|
4492
4517
|
}
|
|
4493
|
-
) : /* @__PURE__ */ c("span", { className: "text-secondary-strokeDark", children: /* @__PURE__ */ c(os, { size: 20 }) }), d =
|
|
4518
|
+
) : /* @__PURE__ */ c("span", { className: "text-secondary-strokeDark", children: /* @__PURE__ */ c(os, { size: 20 }) }), d = _e(() => a.trim() ? t.filter(
|
|
4494
4519
|
(m) => m.name.toLowerCase().includes(a.toLowerCase())
|
|
4495
4520
|
) : t, [t, a]);
|
|
4496
|
-
return /* @__PURE__ */
|
|
4521
|
+
return /* @__PURE__ */ y($o, { open: e, onClose: n, children: [
|
|
4497
4522
|
/* @__PURE__ */ c(vr, { title: s, onClose: n, className: "text-accent-primary" }),
|
|
4498
|
-
/* @__PURE__ */
|
|
4523
|
+
/* @__PURE__ */ y(
|
|
4499
4524
|
gr,
|
|
4500
4525
|
{
|
|
4501
4526
|
style: { maxHeight: Di },
|
|
@@ -4565,12 +4590,12 @@ var gt = 1e9, Ho = {
|
|
|
4565
4590
|
// The natural logarithm of 10.
|
|
4566
4591
|
// 115 digits
|
|
4567
4592
|
LN10: "2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"
|
|
4568
|
-
}, en, K = !0, Ce = "[DecimalError] ", tt = Ce + "Invalid argument: ", Qr = Ce + "Exponent out of range: ",
|
|
4569
|
-
|
|
4593
|
+
}, en, K = !0, Ce = "[DecimalError] ", tt = Ce + "Invalid argument: ", Qr = Ce + "Exponent out of range: ", bt = Math.floor, Ke = Math.pow, Wo = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, ve, ae = 1e7, Y = 7, _i = 9007199254740991, cr = bt(_i / Y), R = {};
|
|
4594
|
+
R.absoluteValue = R.abs = function() {
|
|
4570
4595
|
var e = new this.constructor(this);
|
|
4571
4596
|
return e.s && (e.s = 1), e;
|
|
4572
4597
|
};
|
|
4573
|
-
|
|
4598
|
+
R.comparedTo = R.cmp = function(e) {
|
|
4574
4599
|
var t, r, n, i, s = this;
|
|
4575
4600
|
if (e = new s.constructor(e), s.s !== e.s) return s.s || -e.s;
|
|
4576
4601
|
if (s.e !== e.e) return s.e > e.e ^ s.s < 0 ? 1 : -1;
|
|
@@ -4578,80 +4603,80 @@ T.comparedTo = T.cmp = function(e) {
|
|
|
4578
4603
|
if (s.d[t] !== e.d[t]) return s.d[t] > e.d[t] ^ s.s < 0 ? 1 : -1;
|
|
4579
4604
|
return n === i ? 0 : n > i ^ s.s < 0 ? 1 : -1;
|
|
4580
4605
|
};
|
|
4581
|
-
|
|
4606
|
+
R.decimalPlaces = R.dp = function() {
|
|
4582
4607
|
var e = this, t = e.d.length - 1, r = (t - e.e) * Y;
|
|
4583
4608
|
if (t = e.d[t], t) for (; t % 10 == 0; t /= 10) r--;
|
|
4584
4609
|
return r < 0 ? 0 : r;
|
|
4585
4610
|
};
|
|
4586
|
-
|
|
4587
|
-
return
|
|
4611
|
+
R.dividedBy = R.div = function(e) {
|
|
4612
|
+
return Ie(this, new this.constructor(e));
|
|
4588
4613
|
};
|
|
4589
|
-
|
|
4614
|
+
R.dividedToIntegerBy = R.idiv = function(e) {
|
|
4590
4615
|
var t = this, r = t.constructor;
|
|
4591
|
-
return G(
|
|
4616
|
+
return G(Ie(t, new r(e), 0, 1), r.precision);
|
|
4592
4617
|
};
|
|
4593
|
-
|
|
4618
|
+
R.equals = R.eq = function(e) {
|
|
4594
4619
|
return !this.cmp(e);
|
|
4595
4620
|
};
|
|
4596
|
-
|
|
4621
|
+
R.exponent = function() {
|
|
4597
4622
|
return ie(this);
|
|
4598
4623
|
};
|
|
4599
|
-
|
|
4624
|
+
R.greaterThan = R.gt = function(e) {
|
|
4600
4625
|
return this.cmp(e) > 0;
|
|
4601
4626
|
};
|
|
4602
|
-
|
|
4627
|
+
R.greaterThanOrEqualTo = R.gte = function(e) {
|
|
4603
4628
|
return this.cmp(e) >= 0;
|
|
4604
4629
|
};
|
|
4605
|
-
|
|
4630
|
+
R.isInteger = R.isint = function() {
|
|
4606
4631
|
return this.e > this.d.length - 2;
|
|
4607
4632
|
};
|
|
4608
|
-
|
|
4633
|
+
R.isNegative = R.isneg = function() {
|
|
4609
4634
|
return this.s < 0;
|
|
4610
4635
|
};
|
|
4611
|
-
|
|
4636
|
+
R.isPositive = R.ispos = function() {
|
|
4612
4637
|
return this.s > 0;
|
|
4613
4638
|
};
|
|
4614
|
-
|
|
4639
|
+
R.isZero = function() {
|
|
4615
4640
|
return this.s === 0;
|
|
4616
4641
|
};
|
|
4617
|
-
|
|
4642
|
+
R.lessThan = R.lt = function(e) {
|
|
4618
4643
|
return this.cmp(e) < 0;
|
|
4619
4644
|
};
|
|
4620
|
-
|
|
4645
|
+
R.lessThanOrEqualTo = R.lte = function(e) {
|
|
4621
4646
|
return this.cmp(e) < 1;
|
|
4622
4647
|
};
|
|
4623
|
-
|
|
4648
|
+
R.logarithm = R.log = function(e) {
|
|
4624
4649
|
var t, r = this, n = r.constructor, i = n.precision, s = i + 5;
|
|
4625
4650
|
if (e === void 0)
|
|
4626
4651
|
e = new n(10);
|
|
4627
4652
|
else if (e = new n(e), e.s < 1 || e.eq(ve)) throw Error(Ce + "NaN");
|
|
4628
4653
|
if (r.s < 1) throw Error(Ce + (r.s ? "NaN" : "-Infinity"));
|
|
4629
|
-
return r.eq(ve) ? new n(0) : (K = !1, t =
|
|
4654
|
+
return r.eq(ve) ? new n(0) : (K = !1, t = Ie(Vt(r, s), Vt(e, s), s), K = !0, G(t, i));
|
|
4630
4655
|
};
|
|
4631
|
-
|
|
4656
|
+
R.minus = R.sub = function(e) {
|
|
4632
4657
|
var t = this;
|
|
4633
4658
|
return e = new t.constructor(e), t.s == e.s ? Ri(t, e) : Mi(t, (e.s = -e.s, e));
|
|
4634
4659
|
};
|
|
4635
|
-
|
|
4660
|
+
R.modulo = R.mod = function(e) {
|
|
4636
4661
|
var t, r = this, n = r.constructor, i = n.precision;
|
|
4637
4662
|
if (e = new n(e), !e.s) throw Error(Ce + "NaN");
|
|
4638
|
-
return r.s ? (K = !1, t =
|
|
4663
|
+
return r.s ? (K = !1, t = Ie(r, e, 0, 1).times(e), K = !0, r.minus(t)) : G(new n(r), i);
|
|
4639
4664
|
};
|
|
4640
|
-
|
|
4665
|
+
R.naturalExponential = R.exp = function() {
|
|
4641
4666
|
return Ti(this);
|
|
4642
4667
|
};
|
|
4643
|
-
|
|
4668
|
+
R.naturalLogarithm = R.ln = function() {
|
|
4644
4669
|
return Vt(this);
|
|
4645
4670
|
};
|
|
4646
|
-
|
|
4671
|
+
R.negated = R.neg = function() {
|
|
4647
4672
|
var e = new this.constructor(this);
|
|
4648
4673
|
return e.s = -e.s || 0, e;
|
|
4649
4674
|
};
|
|
4650
|
-
|
|
4675
|
+
R.plus = R.add = function(e) {
|
|
4651
4676
|
var t = this;
|
|
4652
4677
|
return e = new t.constructor(e), t.s == e.s ? Mi(t, e) : Ri(t, (e.s = -e.s, e));
|
|
4653
4678
|
};
|
|
4654
|
-
|
|
4679
|
+
R.precision = R.sd = function(e) {
|
|
4655
4680
|
var t, r, n, i = this;
|
|
4656
4681
|
if (e !== void 0 && e !== !!e && e !== 1 && e !== 0) throw Error(tt + e);
|
|
4657
4682
|
if (t = ie(i) + 1, n = i.d.length - 1, r = n * Y + 1, n = i.d[n], n) {
|
|
@@ -4660,14 +4685,14 @@ T.precision = T.sd = function(e) {
|
|
|
4660
4685
|
}
|
|
4661
4686
|
return e && t > r ? t : r;
|
|
4662
4687
|
};
|
|
4663
|
-
|
|
4688
|
+
R.squareRoot = R.sqrt = function() {
|
|
4664
4689
|
var e, t, r, n, i, s, o, a = this, l = a.constructor;
|
|
4665
4690
|
if (a.s < 1) {
|
|
4666
4691
|
if (!a.s) return new l(0);
|
|
4667
4692
|
throw Error(Ce + "NaN");
|
|
4668
4693
|
}
|
|
4669
|
-
for (e = ie(a), K = !1, i = Math.sqrt(+a), i == 0 || i == 1 / 0 ? (t =
|
|
4670
|
-
if (s = n, n = s.plus(
|
|
4694
|
+
for (e = ie(a), K = !1, i = Math.sqrt(+a), i == 0 || i == 1 / 0 ? (t = Fe(a.d), (t.length + e) % 2 == 0 && (t += "0"), i = Math.sqrt(t), e = bt((e + 1) / 2) - (e < 0 || e % 2), i == 1 / 0 ? t = "5e" + e : (t = i.toExponential(), t = t.slice(0, t.indexOf("e") + 1) + e), n = new l(t)) : n = new l(i.toString()), r = l.precision, i = o = r + 3; ; )
|
|
4695
|
+
if (s = n, n = s.plus(Ie(a, s, o + 2)).times(0.5), Fe(s.d).slice(0, o) === (t = Fe(n.d)).slice(0, o)) {
|
|
4671
4696
|
if (t = t.slice(o - 3, o + 1), i == o && t == "4999") {
|
|
4672
4697
|
if (G(s, r + 1, 0), s.times(s).eq(a)) {
|
|
4673
4698
|
n = s;
|
|
@@ -4679,7 +4704,7 @@ T.squareRoot = T.sqrt = function() {
|
|
|
4679
4704
|
}
|
|
4680
4705
|
return K = !0, G(n, r);
|
|
4681
4706
|
};
|
|
4682
|
-
|
|
4707
|
+
R.times = R.mul = function(e) {
|
|
4683
4708
|
var t, r, n, i, s, o, a, l, f, u = this, d = u.constructor, m = u.d, v = (e = new d(e)).d;
|
|
4684
4709
|
if (!u.s || !e.s) return new d(0);
|
|
4685
4710
|
for (e.s *= u.s, r = u.e + e.e, l = m.length, f = v.length, l < f && (s = m, m = v, v = s, o = l, l = f, f = o), s = [], o = l + f, n = o; n--; ) s.push(0);
|
|
@@ -4691,26 +4716,26 @@ T.times = T.mul = function(e) {
|
|
|
4691
4716
|
for (; !s[--o]; ) s.pop();
|
|
4692
4717
|
return t ? ++r : s.shift(), e.d = s, e.e = r, K ? G(e, d.precision) : e;
|
|
4693
4718
|
};
|
|
4694
|
-
|
|
4719
|
+
R.toDecimalPlaces = R.todp = function(e, t) {
|
|
4695
4720
|
var r = this, n = r.constructor;
|
|
4696
|
-
return r = new n(r), e === void 0 ? r : (
|
|
4721
|
+
return r = new n(r), e === void 0 ? r : (Te(e, 0, gt), t === void 0 ? t = n.rounding : Te(t, 0, 8), G(r, e + ie(r) + 1, t));
|
|
4697
4722
|
};
|
|
4698
|
-
|
|
4723
|
+
R.toExponential = function(e, t) {
|
|
4699
4724
|
var r, n = this, i = n.constructor;
|
|
4700
|
-
return e === void 0 ? r = nt(n, !0) : (
|
|
4725
|
+
return e === void 0 ? r = nt(n, !0) : (Te(e, 0, gt), t === void 0 ? t = i.rounding : Te(t, 0, 8), n = G(new i(n), e + 1, t), r = nt(n, !0, e + 1)), r;
|
|
4701
4726
|
};
|
|
4702
|
-
|
|
4727
|
+
R.toFixed = function(e, t) {
|
|
4703
4728
|
var r, n, i = this, s = i.constructor;
|
|
4704
|
-
return e === void 0 ? nt(i) : (
|
|
4729
|
+
return e === void 0 ? nt(i) : (Te(e, 0, gt), t === void 0 ? t = s.rounding : Te(t, 0, 8), n = G(new s(i), e + ie(i) + 1, t), r = nt(n.abs(), !1, e + ie(n) + 1), i.isneg() && !i.isZero() ? "-" + r : r);
|
|
4705
4730
|
};
|
|
4706
|
-
|
|
4731
|
+
R.toInteger = R.toint = function() {
|
|
4707
4732
|
var e = this, t = e.constructor;
|
|
4708
4733
|
return G(new t(e), ie(e) + 1, t.rounding);
|
|
4709
4734
|
};
|
|
4710
|
-
|
|
4735
|
+
R.toNumber = function() {
|
|
4711
4736
|
return +this;
|
|
4712
4737
|
};
|
|
4713
|
-
|
|
4738
|
+
R.toPower = R.pow = function(e) {
|
|
4714
4739
|
var t, r, n, i, s, o, a = this, l = a.constructor, f = 12, u = +(e = new l(e));
|
|
4715
4740
|
if (!e.s) return new l(ve);
|
|
4716
4741
|
if (a = new l(a), !a.s) {
|
|
@@ -4721,22 +4746,22 @@ T.toPower = T.pow = function(e) {
|
|
|
4721
4746
|
if (n = l.precision, e.eq(ve)) return G(a, n);
|
|
4722
4747
|
if (t = e.e, r = e.d.length - 1, o = t >= r, s = a.s, o) {
|
|
4723
4748
|
if ((r = u < 0 ? -u : u) <= _i) {
|
|
4724
|
-
for (i = new l(ve), t = Math.ceil(n / Y + 4), K = !1; r % 2 && (i = i.times(a), _n(i.d, t)), r =
|
|
4749
|
+
for (i = new l(ve), t = Math.ceil(n / Y + 4), K = !1; r % 2 && (i = i.times(a), _n(i.d, t)), r = bt(r / 2), r !== 0; )
|
|
4725
4750
|
a = a.times(a), _n(a.d, t);
|
|
4726
4751
|
return K = !0, e.s < 0 ? new l(ve).div(i) : G(i, n);
|
|
4727
4752
|
}
|
|
4728
4753
|
} else if (s < 0) throw Error(Ce + "NaN");
|
|
4729
4754
|
return s = s < 0 && e.d[Math.max(t, r)] & 1 ? -1 : 1, a.s = 1, K = !1, i = e.times(Vt(a, n + f)), K = !0, i = Ti(i), i.s = s, i;
|
|
4730
4755
|
};
|
|
4731
|
-
|
|
4756
|
+
R.toPrecision = function(e, t) {
|
|
4732
4757
|
var r, n, i = this, s = i.constructor;
|
|
4733
|
-
return e === void 0 ? (r = ie(i), n = nt(i, r <= s.toExpNeg || r >= s.toExpPos)) : (
|
|
4758
|
+
return e === void 0 ? (r = ie(i), n = nt(i, r <= s.toExpNeg || r >= s.toExpPos)) : (Te(e, 1, gt), t === void 0 ? t = s.rounding : Te(t, 0, 8), i = G(new s(i), e, t), r = ie(i), n = nt(i, e <= r || r <= s.toExpNeg, e)), n;
|
|
4734
4759
|
};
|
|
4735
|
-
|
|
4760
|
+
R.toSignificantDigits = R.tosd = function(e, t) {
|
|
4736
4761
|
var r = this, n = r.constructor;
|
|
4737
|
-
return e === void 0 ? (e = n.precision, t = n.rounding) : (
|
|
4762
|
+
return e === void 0 ? (e = n.precision, t = n.rounding) : (Te(e, 1, gt), t === void 0 ? t = n.rounding : Te(t, 0, 8)), G(new n(r), e, t);
|
|
4738
4763
|
};
|
|
4739
|
-
|
|
4764
|
+
R.toString = R.valueOf = R.val = R.toJSON = R[Symbol.for("nodejs.util.inspect.custom")] = function() {
|
|
4740
4765
|
var e = this, t = ie(e), r = e.constructor;
|
|
4741
4766
|
return nt(e, t <= r.toExpNeg || t >= r.toExpPos);
|
|
4742
4767
|
};
|
|
@@ -4753,11 +4778,11 @@ function Mi(e, t) {
|
|
|
4753
4778
|
for (r && (l.unshift(r), ++i), a = l.length; l[--a] == 0; ) l.pop();
|
|
4754
4779
|
return t.d = l, t.e = i, K ? G(t, d) : t;
|
|
4755
4780
|
}
|
|
4756
|
-
function
|
|
4781
|
+
function Te(e, t, r) {
|
|
4757
4782
|
if (e !== ~~e || e < t || e > r)
|
|
4758
4783
|
throw Error(tt + e);
|
|
4759
4784
|
}
|
|
4760
|
-
function
|
|
4785
|
+
function Fe(e) {
|
|
4761
4786
|
var t, r, n, i = e.length - 1, s = "", o = e[0];
|
|
4762
4787
|
if (i > 0) {
|
|
4763
4788
|
for (s += o, t = 1; t < i; t++)
|
|
@@ -4768,7 +4793,7 @@ function Ve(e) {
|
|
|
4768
4793
|
for (; o % 10 === 0; ) o /= 10;
|
|
4769
4794
|
return s + o;
|
|
4770
4795
|
}
|
|
4771
|
-
var
|
|
4796
|
+
var Ie = /* @__PURE__ */ function() {
|
|
4772
4797
|
function e(n, i) {
|
|
4773
4798
|
var s, o = 0, a = n.length;
|
|
4774
4799
|
for (n = n.slice(); a--; )
|
|
@@ -4793,22 +4818,22 @@ var Pe = /* @__PURE__ */ function() {
|
|
|
4793
4818
|
for (; !n[0] && n.length > 1; ) n.shift();
|
|
4794
4819
|
}
|
|
4795
4820
|
return function(n, i, s, o) {
|
|
4796
|
-
var a, l, f, u, d, m, v,
|
|
4797
|
-
if (!n.s) return new
|
|
4821
|
+
var a, l, f, u, d, m, v, N, g, w, M, x, F, k, E, A, _, $, I = n.constructor, H = n.s == i.s ? 1 : -1, V = n.d, T = i.d;
|
|
4822
|
+
if (!n.s) return new I(n);
|
|
4798
4823
|
if (!i.s) throw Error(Ce + "Division by zero");
|
|
4799
|
-
for (l = n.e - i.e,
|
|
4800
|
-
if (
|
|
4801
|
-
if (
|
|
4802
|
-
for (u = 0,
|
|
4803
|
-
|
|
4824
|
+
for (l = n.e - i.e, _ = T.length, E = V.length, v = new I(H), N = v.d = [], f = 0; T[f] == (V[f] || 0); ) ++f;
|
|
4825
|
+
if (T[f] > (V[f] || 0) && --l, s == null ? x = s = I.precision : o ? x = s + (ie(n) - ie(i)) + 1 : x = s, x < 0) return new I(0);
|
|
4826
|
+
if (x = x / Y + 2 | 0, f = 0, _ == 1)
|
|
4827
|
+
for (u = 0, T = T[0], x++; (f < E || u) && x--; f++)
|
|
4828
|
+
F = u * ae + (V[f] || 0), N[f] = F / T | 0, u = F % T | 0;
|
|
4804
4829
|
else {
|
|
4805
|
-
for (u = ae / (
|
|
4806
|
-
$ =
|
|
4830
|
+
for (u = ae / (T[0] + 1) | 0, u > 1 && (T = e(T, u), V = e(V, u), _ = T.length, E = V.length), k = _, g = V.slice(0, _), w = g.length; w < _; ) g[w++] = 0;
|
|
4831
|
+
$ = T.slice(), $.unshift(0), A = T[0], T[1] >= ae / 2 && ++A;
|
|
4807
4832
|
do
|
|
4808
|
-
u = 0, a = t(
|
|
4809
|
-
while ((
|
|
4833
|
+
u = 0, a = t(T, g, _, w), a < 0 ? (M = g[0], _ != w && (M = M * ae + (g[1] || 0)), u = M / A | 0, u > 1 ? (u >= ae && (u = ae - 1), d = e(T, u), m = d.length, w = g.length, a = t(d, g, m, w), a == 1 && (u--, r(d, _ < m ? $ : T, m))) : (u == 0 && (a = u = 1), d = T.slice()), m = d.length, m < w && d.unshift(0), r(g, d, w), a == -1 && (w = g.length, a = t(T, g, _, w), a < 1 && (u++, r(g, _ < w ? $ : T, w))), w = g.length) : a === 0 && (u++, g = [0]), N[f++] = u, a && g[0] ? g[w++] = V[k] || 0 : (g = [V[k]], w = 1);
|
|
4834
|
+
while ((k++ < E || g[0] !== void 0) && x--);
|
|
4810
4835
|
}
|
|
4811
|
-
return
|
|
4836
|
+
return N[0] || N.shift(), v.e = l, G(v, o ? s + ie(v) + 1 : s);
|
|
4812
4837
|
};
|
|
4813
4838
|
}();
|
|
4814
4839
|
function Ti(e, t) {
|
|
@@ -4818,7 +4843,7 @@ function Ti(e, t) {
|
|
|
4818
4843
|
for (K = !1, a = d, o = new u(0.03125); e.abs().gte(0.1); )
|
|
4819
4844
|
e = e.times(o), f += 5;
|
|
4820
4845
|
for (n = Math.log(Ke(2, f)) / Math.LN10 * 2 + 5 | 0, a += n, r = i = s = new u(ve), u.precision = a; ; ) {
|
|
4821
|
-
if (i = G(i.times(e), a), r = r.times(++l), o = s.plus(
|
|
4846
|
+
if (i = G(i.times(e), a), r = r.times(++l), o = s.plus(Ie(i, r, a)), Fe(o.d).slice(0, a) === Fe(s.d).slice(0, a)) {
|
|
4822
4847
|
for (; f--; ) s = G(s.times(s), a);
|
|
4823
4848
|
return u.precision = d, t == null ? (K = !0, G(s, d)) : s;
|
|
4824
4849
|
}
|
|
@@ -4839,20 +4864,20 @@ function Ue(e) {
|
|
|
4839
4864
|
return t;
|
|
4840
4865
|
}
|
|
4841
4866
|
function Vt(e, t) {
|
|
4842
|
-
var r, n, i, s, o, a, l, f, u, d = 1, m = 10, v = e,
|
|
4867
|
+
var r, n, i, s, o, a, l, f, u, d = 1, m = 10, v = e, N = v.d, g = v.constructor, w = g.precision;
|
|
4843
4868
|
if (v.s < 1) throw Error(Ce + (v.s ? "NaN" : "-Infinity"));
|
|
4844
4869
|
if (v.eq(ve)) return new g(0);
|
|
4845
4870
|
if (t == null ? (K = !1, f = w) : f = t, v.eq(10))
|
|
4846
4871
|
return t == null && (K = !0), kr(g, f);
|
|
4847
|
-
if (f += m, g.precision = f, r =
|
|
4872
|
+
if (f += m, g.precision = f, r = Fe(N), n = r.charAt(0), s = ie(v), Math.abs(s) < 15e14) {
|
|
4848
4873
|
for (; n < 7 && n != 1 || n == 1 && r.charAt(1) > 3; )
|
|
4849
|
-
v = v.times(e), r =
|
|
4874
|
+
v = v.times(e), r = Fe(v.d), n = r.charAt(0), d++;
|
|
4850
4875
|
s = ie(v), n > 1 ? (v = new g("0." + r), s++) : v = new g(n + "." + r.slice(1));
|
|
4851
4876
|
} else
|
|
4852
4877
|
return l = kr(g, f + 2, w).times(s + ""), v = Vt(new g(n + "." + r.slice(1)), f - m).plus(l), g.precision = w, t == null ? (K = !0, G(v, w)) : v;
|
|
4853
|
-
for (a = o = v =
|
|
4854
|
-
if (o = G(o.times(u), f), l = a.plus(
|
|
4855
|
-
return a = a.times(2), s !== 0 && (a = a.plus(kr(g, f + 2, w).times(s + ""))), a =
|
|
4878
|
+
for (a = o = v = Ie(v.minus(ve), v.plus(ve), f), u = G(v.times(v), f), i = 3; ; ) {
|
|
4879
|
+
if (o = G(o.times(u), f), l = a.plus(Ie(o, new g(i), f)), Fe(l.d).slice(0, f) === Fe(a.d).slice(0, f))
|
|
4880
|
+
return a = a.times(2), s !== 0 && (a = a.plus(kr(g, f + 2, w).times(s + ""))), a = Ie(a, new g(d), f), g.precision = w, t == null ? (K = !0, G(a, w)) : a;
|
|
4856
4881
|
a = l, i += 2;
|
|
4857
4882
|
}
|
|
4858
4883
|
}
|
|
@@ -4861,7 +4886,7 @@ function Dn(e, t) {
|
|
|
4861
4886
|
for ((r = t.indexOf(".")) > -1 && (t = t.replace(".", "")), (n = t.search(/e/i)) > 0 ? (r < 0 && (r = n), r += +t.slice(n + 1), t = t.substring(0, n)) : r < 0 && (r = t.length), n = 0; t.charCodeAt(n) === 48; ) ++n;
|
|
4862
4887
|
for (i = t.length; t.charCodeAt(i - 1) === 48; ) --i;
|
|
4863
4888
|
if (t = t.slice(n, i), t) {
|
|
4864
|
-
if (i -= n, r = r - n - 1, e.e =
|
|
4889
|
+
if (i -= n, r = r - n - 1, e.e = bt(r / Y), e.d = [], n = (r + 1) % Y, r < 0 && (n += Y), n < i) {
|
|
4865
4890
|
for (n && e.d.push(+t.slice(0, n)), i -= Y; n < i; ) e.d.push(+t.slice(n, n += Y));
|
|
4866
4891
|
t = t.slice(n), n = Y - t.length;
|
|
4867
4892
|
} else
|
|
@@ -4884,7 +4909,7 @@ function G(e, t, r) {
|
|
|
4884
4909
|
}
|
|
4885
4910
|
if (r !== void 0 && (s = Ke(10, o - i - 1), a = f / s % 10 | 0, l = t < 0 || d[u + 1] !== void 0 || f % s, l = r < 4 ? (a || l) && (r == 0 || r == (e.s < 0 ? 3 : 2)) : a > 5 || a == 5 && (r == 4 || l || r == 6 && // Check whether the digit to the left of the rounding digit is odd.
|
|
4886
4911
|
(n > 0 ? i > 0 ? f / Ke(10, o - i) : 0 : d[u - 1]) % 10 & 1 || r == (e.s < 0 ? 8 : 7))), t < 1 || !d[0])
|
|
4887
|
-
return l ? (s = ie(e), d.length = 1, t = t - s - 1, d[0] = Ke(10, (Y - t % Y) % Y), e.e =
|
|
4912
|
+
return l ? (s = ie(e), d.length = 1, t = t - s - 1, d[0] = Ke(10, (Y - t % Y) % Y), e.e = bt(-t / Y) || 0) : (d.length = 1, d[0] = e.e = e.s = 0), e;
|
|
4888
4913
|
if (n == 0 ? (d.length = u, s = 1, u--) : (d.length = u + 1, s = Ke(10, Y - n), d[u] = i > 0 ? (f / Ke(10, o - i) % Ke(10, i) | 0) * s : 0), l)
|
|
4889
4914
|
for (; ; )
|
|
4890
4915
|
if (u == 0) {
|
|
@@ -4927,7 +4952,7 @@ function Ri(e, t) {
|
|
|
4927
4952
|
return l[0] ? (t.d = l, t.e = n, K ? G(t, v) : t) : new m(0);
|
|
4928
4953
|
}
|
|
4929
4954
|
function nt(e, t, r) {
|
|
4930
|
-
var n, i = ie(e), s =
|
|
4955
|
+
var n, i = ie(e), s = Fe(e.d), o = s.length;
|
|
4931
4956
|
return t ? (r && (n = r - o) > 0 ? s = s.charAt(0) + "." + s.slice(1) + Ue(n) : o > 1 && (s = s.charAt(0) + "." + s.slice(1)), s = s + (i < 0 ? "e" : "e+") + i) : i < 0 ? (s = "0." + Ue(-i - 1) + s, r && (n = r - o) > 0 && (s += Ue(n))) : i >= o ? (s += Ue(i + 1 - o), r && (n = r - i - 1) > 0 && (s = s + "." + Ue(n))) : ((n = i + 1) < o && (s = s.slice(0, n) + "." + s.slice(n)), r && (n = r - o) > 0 && (i + 1 === o && (s += "."), s += Ue(n))), e.s < 0 ? "-" + s : s;
|
|
4932
4957
|
}
|
|
4933
4958
|
function _n(e, t) {
|
|
@@ -4964,7 +4989,7 @@ function Bi(e) {
|
|
|
4964
4989
|
if (s.charCodeAt(0) === 45 ? (s = s.slice(1), o.s = -1) : o.s = 1, Wo.test(s)) Dn(o, s);
|
|
4965
4990
|
else throw Error(tt + s);
|
|
4966
4991
|
}
|
|
4967
|
-
if (i.prototype =
|
|
4992
|
+
if (i.prototype = R, i.ROUND_UP = 0, i.ROUND_DOWN = 1, i.ROUND_CEIL = 2, i.ROUND_FLOOR = 3, i.ROUND_HALF_UP = 4, i.ROUND_HALF_DOWN = 5, i.ROUND_HALF_EVEN = 6, i.ROUND_HALF_CEIL = 7, i.ROUND_HALF_FLOOR = 8, i.clone = Bi, i.config = i.set = Uo, e === void 0 && (e = {}), e)
|
|
4968
4993
|
for (n = ["precision", "rounding", "toExpNeg", "toExpPos", "LN10"], t = 0; t < n.length; ) e.hasOwnProperty(r = n[t++]) || (e[r] = this[r]);
|
|
4969
4994
|
return i.config(e), i;
|
|
4970
4995
|
}
|
|
@@ -4987,7 +5012,7 @@ function Uo(e) {
|
|
|
4987
5012
|
];
|
|
4988
5013
|
for (t = 0; t < i.length; t += 3)
|
|
4989
5014
|
if ((n = e[r = i[t]]) !== void 0)
|
|
4990
|
-
if (
|
|
5015
|
+
if (bt(n) === n && n >= i[t + 1] && n <= i[t + 2]) this[r] = n;
|
|
4991
5016
|
else throw Error(tt + r + ": " + n);
|
|
4992
5017
|
if ((n = e[r = "LN10"]) !== void 0)
|
|
4993
5018
|
if (n == Math.LN10) this[r] = new this(n);
|
|
@@ -5028,26 +5053,32 @@ const Zo = (e, t, r) => new en(e).toDecimalPlaces(t, r).toNumber(), Ul = ({
|
|
|
5028
5053
|
prefix: o,
|
|
5029
5054
|
min: a = "0",
|
|
5030
5055
|
step: l = "any",
|
|
5031
|
-
autoFocus: f = !0
|
|
5056
|
+
autoFocus: f = !0,
|
|
5057
|
+
decimals: u
|
|
5032
5058
|
}) => {
|
|
5033
|
-
const
|
|
5059
|
+
const d = Ni({ name: e, defaultValue: "" }), { setValue: m } = pt(), v = parseFloat(d || "0"), N = Pi(v, (s == null ? void 0 : s.price) ?? 0, {
|
|
5034
5060
|
zeroDisplay: "$0.00"
|
|
5035
|
-
}),
|
|
5036
|
-
|
|
5061
|
+
}), g = (x) => {
|
|
5062
|
+
let F = x.target.value;
|
|
5063
|
+
if (u !== void 0 && u >= 0) {
|
|
5064
|
+
const [k, E] = F.split(".", 2);
|
|
5065
|
+
E !== void 0 && E.length > u ? F = k + "." + E.slice(0, u) : E !== void 0 ? F = k + "." + E : F.includes(".") && (F = k);
|
|
5066
|
+
}
|
|
5067
|
+
m(e, F, {
|
|
5037
5068
|
shouldValidate: !0,
|
|
5038
5069
|
shouldDirty: !0,
|
|
5039
5070
|
shouldTouch: !0
|
|
5040
5071
|
});
|
|
5041
|
-
},
|
|
5042
|
-
(
|
|
5072
|
+
}, w = (x) => {
|
|
5073
|
+
(x.key === "ArrowUp" || x.key === "ArrowDown") && x.preventDefault();
|
|
5043
5074
|
};
|
|
5044
|
-
let
|
|
5045
|
-
return s && (
|
|
5075
|
+
let M;
|
|
5076
|
+
return s && (M = `${Zo(Number(s.balance), s.decimals ?? Jr)} ${s.symbol}`, o && (M = `${o}: ${M}`)), /* @__PURE__ */ y(ze, { children: [
|
|
5046
5077
|
/* @__PURE__ */ c(Ro, { name: e, defaultValue: "" }),
|
|
5047
5078
|
/* @__PURE__ */ c(Bt, { className: "flex w-full flex-col content-center justify-between gap-4", children: /* @__PURE__ */ c(
|
|
5048
5079
|
Ur,
|
|
5049
5080
|
{
|
|
5050
|
-
amount:
|
|
5081
|
+
amount: d,
|
|
5051
5082
|
currencyIcon: t,
|
|
5052
5083
|
currencyName: r,
|
|
5053
5084
|
placeholder: i,
|
|
@@ -5056,16 +5087,16 @@ const Zo = (e, t, r) => new en(e).toDecimalPlaces(t, r).toNumber(), Ul = ({
|
|
|
5056
5087
|
min: a,
|
|
5057
5088
|
step: l,
|
|
5058
5089
|
autoFocus: f,
|
|
5059
|
-
onChange:
|
|
5060
|
-
onKeyDown:
|
|
5061
|
-
amountUsd:
|
|
5062
|
-
subtitle:
|
|
5090
|
+
onChange: g,
|
|
5091
|
+
onKeyDown: w,
|
|
5092
|
+
amountUsd: N,
|
|
5093
|
+
subtitle: M
|
|
5063
5094
|
}
|
|
5064
5095
|
) })
|
|
5065
5096
|
] });
|
|
5066
5097
|
};
|
|
5067
5098
|
function Xo({ items: e, onRemove: t, showChain: r = !0 }) {
|
|
5068
|
-
const n =
|
|
5099
|
+
const n = _e(() => e, [e]);
|
|
5069
5100
|
return n.length === 0 ? null : /* @__PURE__ */ c("div", { className: "flex flex-col gap-8", children: n.map(({ bsnId: i, bsnName: s, bsnLogoUrl: o, provider: a }) => /* @__PURE__ */ c(
|
|
5070
5101
|
Fi,
|
|
5071
5102
|
{
|
|
@@ -5080,9 +5111,9 @@ function Xo({ items: e, onRemove: t, showChain: r = !0 }) {
|
|
|
5080
5111
|
)) });
|
|
5081
5112
|
}
|
|
5082
5113
|
function zl({ max: e, items: t = [], actionText: r, onAdd: n, onRemove: i, showChain: s = !0 }) {
|
|
5083
|
-
const o =
|
|
5084
|
-
return /* @__PURE__ */ c(Bt, { children: /* @__PURE__ */
|
|
5085
|
-
/* @__PURE__ */ c("div", { className: "flex flex-row", children: /* @__PURE__ */
|
|
5114
|
+
const o = _e(() => t.length, [t]);
|
|
5115
|
+
return /* @__PURE__ */ c(Bt, { children: /* @__PURE__ */ y("div", { className: "flex w-full flex-col gap-4", children: [
|
|
5116
|
+
/* @__PURE__ */ c("div", { className: "flex flex-row", children: /* @__PURE__ */ y("div", { className: "flex w-full flex-row content-center items-center justify-between font-normal", children: [
|
|
5086
5117
|
/* @__PURE__ */ c("span", { className: "text-sm sm:text-base", children: r }),
|
|
5087
5118
|
/* @__PURE__ */ c(lo, { counter: o, max: e, onAdd: n })
|
|
5088
5119
|
] }) }),
|
|
@@ -5090,7 +5121,7 @@ function zl({ max: e, items: t = [], actionText: r, onAdd: n, onRemove: i, showC
|
|
|
5090
5121
|
] }) });
|
|
5091
5122
|
}
|
|
5092
5123
|
function ct({ title: e, children: t, className: r, hint: n }) {
|
|
5093
|
-
return /* @__PURE__ */
|
|
5124
|
+
return /* @__PURE__ */ y(
|
|
5094
5125
|
"div",
|
|
5095
5126
|
{
|
|
5096
5127
|
className: ce(
|
|
@@ -5100,7 +5131,7 @@ function ct({ title: e, children: t, className: r, hint: n }) {
|
|
|
5100
5131
|
),
|
|
5101
5132
|
children: [
|
|
5102
5133
|
/* @__PURE__ */ c(W, { as: "div", variant: "body1", children: e }),
|
|
5103
|
-
n ? /* @__PURE__ */
|
|
5134
|
+
n ? /* @__PURE__ */ y("div", { className: "flex flex-col items-end", children: [
|
|
5104
5135
|
/* @__PURE__ */ c(W, { as: "div", className: "flex items-center gap-2", children: t }),
|
|
5105
5136
|
/* @__PURE__ */ c(W, { as: "div", variant: "body2", className: "text-accent-secondary", children: n })
|
|
5106
5137
|
] }) : /* @__PURE__ */ c(W, { as: "div", className: "flex items-center gap-2", children: t })
|
|
@@ -5112,8 +5143,8 @@ function Go(e) {
|
|
|
5112
5143
|
return st({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z" }, child: [] }] })(e);
|
|
5113
5144
|
}
|
|
5114
5145
|
function Yo({ value: e, onEdit: t, title: r = "Network Fee Rate", className: n }) {
|
|
5115
|
-
return /* @__PURE__ */
|
|
5116
|
-
/* @__PURE__ */
|
|
5146
|
+
return /* @__PURE__ */ y(ct, { title: r, className: n, children: [
|
|
5147
|
+
/* @__PURE__ */ y("span", { children: [
|
|
5117
5148
|
e,
|
|
5118
5149
|
" sats/vB"
|
|
5119
5150
|
] }),
|
|
@@ -5122,7 +5153,7 @@ function Yo({ value: e, onEdit: t, title: r = "Network Fee Rate", className: n }
|
|
|
5122
5153
|
}
|
|
5123
5154
|
function Ko({ amount: e, coinSymbol: t, hint: r, title: n, className: i, decimals: s = Jr }) {
|
|
5124
5155
|
let o;
|
|
5125
|
-
return typeof e == "number" ? e === 0 ? o = "0" : o = e.toFixed(s).replace(/0+$/, "").replace(/\.$/, "") : o = e, /* @__PURE__ */
|
|
5156
|
+
return typeof e == "number" ? e === 0 ? o = "0" : o = e.toFixed(s).replace(/0+$/, "").replace(/\.$/, "") : o = e, /* @__PURE__ */ y(ct, { title: n ?? `${t} Network Fee`, hint: r, className: i, children: [
|
|
5126
5157
|
o,
|
|
5127
5158
|
" ",
|
|
5128
5159
|
t
|
|
@@ -5130,7 +5161,7 @@ function Ko({ amount: e, coinSymbol: t, hint: r, title: n, className: i, decimal
|
|
|
5130
5161
|
}
|
|
5131
5162
|
function Jo({ amount: e, coinSymbol: t, hint: r, title: n, className: i, decimals: s = Io }) {
|
|
5132
5163
|
const o = typeof e == "number" ? e.toFixed(s) : e;
|
|
5133
|
-
return /* @__PURE__ */
|
|
5164
|
+
return /* @__PURE__ */ y(ct, { title: n ?? `${t} Network Fee`, hint: r, className: i, children: [
|
|
5134
5165
|
o,
|
|
5135
5166
|
" ",
|
|
5136
5167
|
t
|
|
@@ -5138,10 +5169,10 @@ function Jo({ amount: e, coinSymbol: t, hint: r, title: n, className: i, decimal
|
|
|
5138
5169
|
}
|
|
5139
5170
|
function Qo({ total: e, coinSymbol: t, hint: r, title: n = "Total", className: i, decimals: s = Jr }) {
|
|
5140
5171
|
let o;
|
|
5141
|
-
return typeof e == "number" ? e === 0 ? o = "0" : o = e.toFixed(s).replace(/0+$/, "").replace(/\.$/, "") : o = e, /* @__PURE__ */
|
|
5172
|
+
return typeof e == "number" ? e === 0 ? o = "0" : o = e.toFixed(s).replace(/0+$/, "").replace(/\.$/, "") : o = e, /* @__PURE__ */ y("div", { className: ce("flex flex-row items-start justify-between text-accent-primary", i), children: [
|
|
5142
5173
|
/* @__PURE__ */ c(W, { variant: "body1", className: "font-bold", children: n }),
|
|
5143
|
-
/* @__PURE__ */
|
|
5144
|
-
/* @__PURE__ */
|
|
5174
|
+
/* @__PURE__ */ y("div", { className: "flex flex-col items-end justify-center", children: [
|
|
5175
|
+
/* @__PURE__ */ y(W, { variant: "body1", className: "font-bold", children: [
|
|
5145
5176
|
o,
|
|
5146
5177
|
" ",
|
|
5147
5178
|
t
|
|
@@ -5164,7 +5195,7 @@ function ql({
|
|
|
5164
5195
|
bbnFeeAmountHint: u,
|
|
5165
5196
|
bbnFeeDecimals: d
|
|
5166
5197
|
}) {
|
|
5167
|
-
return /* @__PURE__ */ c(Bt, { className: ce("flex w-full flex-col content-center justify-between gap-4", e), children: /* @__PURE__ */
|
|
5198
|
+
return /* @__PURE__ */ c(Bt, { className: ce("flex w-full flex-col content-center justify-between gap-4", e), children: /* @__PURE__ */ y("div", { className: "flex flex-col gap-6 p-4", children: [
|
|
5168
5199
|
t !== void 0 && /* @__PURE__ */ c(Yo, { value: t, onEdit: r }),
|
|
5169
5200
|
n !== void 0 && i !== void 0 && /* @__PURE__ */ c(Ko, { amount: n, coinSymbol: i, hint: s }),
|
|
5170
5201
|
l !== void 0 && f ? /* @__PURE__ */ c(
|
|
@@ -5185,7 +5216,7 @@ const el = ({ data: e }) => {
|
|
|
5185
5216
|
const t = e[0], r = e.slice(1), i = {
|
|
5186
5217
|
gridTemplateColumns: `repeat(${t.length}, minmax(0, 1fr))`
|
|
5187
5218
|
};
|
|
5188
|
-
return /* @__PURE__ */ c(so, { className: "p-6 pt-4", children: /* @__PURE__ */
|
|
5219
|
+
return /* @__PURE__ */ c(so, { className: "p-6 pt-4", children: /* @__PURE__ */ y("div", { className: "flex flex-col", children: [
|
|
5189
5220
|
/* @__PURE__ */ c(
|
|
5190
5221
|
"div",
|
|
5191
5222
|
{
|
|
@@ -5213,7 +5244,7 @@ const el = ({ data: e }) => {
|
|
|
5213
5244
|
] }) });
|
|
5214
5245
|
};
|
|
5215
5246
|
function tl({ className: e, ...t }) {
|
|
5216
|
-
const n = Pt(
|
|
5247
|
+
const n = Pt(yr) ? Rt : pr;
|
|
5217
5248
|
return /* @__PURE__ */ c(n, { ...t, className: ce("w-[41.25rem] max-w-full", e) });
|
|
5218
5249
|
}
|
|
5219
5250
|
const Zl = ({
|
|
@@ -5234,7 +5265,7 @@ const Zl = ({
|
|
|
5234
5265
|
{ label: "Transaction Fees", value: o.transactionFees },
|
|
5235
5266
|
{
|
|
5236
5267
|
label: "Term",
|
|
5237
|
-
value: /* @__PURE__ */
|
|
5268
|
+
value: /* @__PURE__ */ y(ze, { children: [
|
|
5238
5269
|
o.term.blocks,
|
|
5239
5270
|
/* @__PURE__ */ c("br", {}),
|
|
5240
5271
|
/* @__PURE__ */ c("span", { className: "text-md text-secondary", children: o.term.duration })
|
|
@@ -5242,16 +5273,16 @@ const Zl = ({
|
|
|
5242
5273
|
},
|
|
5243
5274
|
{ label: "Unbonding", value: o.unbonding },
|
|
5244
5275
|
{ label: "Unbonding Fee", value: o.unbondingFee }
|
|
5245
|
-
], d = a && a.length > 0 ? u.filter((
|
|
5276
|
+
], d = a && a.length > 0 ? u.filter((N) => a.includes(N.label)) : u, v = !s || s.length === 0 ? [
|
|
5246
5277
|
["Validator"],
|
|
5247
|
-
...i.map((
|
|
5248
|
-
/* @__PURE__ */
|
|
5278
|
+
...i.map((N, g) => [
|
|
5279
|
+
/* @__PURE__ */ y(
|
|
5249
5280
|
"div",
|
|
5250
5281
|
{
|
|
5251
5282
|
className: "flex w-full items-center gap-2 py-1",
|
|
5252
5283
|
children: [
|
|
5253
|
-
|
|
5254
|
-
/* @__PURE__ */ c(W, { variant: "body2", className: "font-medium", children:
|
|
5284
|
+
N.icon,
|
|
5285
|
+
/* @__PURE__ */ c(W, { variant: "body2", className: "font-medium", children: N.name })
|
|
5255
5286
|
]
|
|
5256
5287
|
},
|
|
5257
5288
|
`validator-${g}`
|
|
@@ -5259,21 +5290,21 @@ const Zl = ({
|
|
|
5259
5290
|
])
|
|
5260
5291
|
] : [
|
|
5261
5292
|
["BSNs", "Finality Provider"],
|
|
5262
|
-
...i.map((
|
|
5293
|
+
...i.map((N, g) => {
|
|
5263
5294
|
const w = s[g];
|
|
5264
5295
|
return [
|
|
5265
|
-
/* @__PURE__ */
|
|
5296
|
+
/* @__PURE__ */ y(
|
|
5266
5297
|
"div",
|
|
5267
5298
|
{
|
|
5268
5299
|
className: "flex w-full items-center gap-2 py-1",
|
|
5269
5300
|
children: [
|
|
5270
|
-
|
|
5271
|
-
/* @__PURE__ */ c(W, { variant: "body2", className: "font-medium", children:
|
|
5301
|
+
N.icon,
|
|
5302
|
+
/* @__PURE__ */ c(W, { variant: "body2", className: "font-medium", children: N.name })
|
|
5272
5303
|
]
|
|
5273
5304
|
},
|
|
5274
5305
|
`bsn-${g}`
|
|
5275
5306
|
),
|
|
5276
|
-
w ? /* @__PURE__ */
|
|
5307
|
+
w ? /* @__PURE__ */ y(
|
|
5277
5308
|
"div",
|
|
5278
5309
|
{
|
|
5279
5310
|
className: "flex w-full items-center gap-2 py-1",
|
|
@@ -5287,24 +5318,24 @@ const Zl = ({
|
|
|
5287
5318
|
];
|
|
5288
5319
|
})
|
|
5289
5320
|
];
|
|
5290
|
-
return /* @__PURE__ */
|
|
5321
|
+
return /* @__PURE__ */ y(tl, { open: e, onClose: r, children: [
|
|
5291
5322
|
/* @__PURE__ */ c(vr, { title: "Preview", onClose: r, className: "text-accent-primary" }),
|
|
5292
|
-
/* @__PURE__ */
|
|
5323
|
+
/* @__PURE__ */ y(gr, { className: "no-scrollbar mb-8 mt-4 flex max-h-[calc(100vh-12rem)] flex-col gap-4 overflow-y-auto text-accent-primary", children: [
|
|
5293
5324
|
/* @__PURE__ */ c(el, { data: v }),
|
|
5294
|
-
/* @__PURE__ */ c("div", { className: "flex flex-col", children: d.map((
|
|
5295
|
-
/* @__PURE__ */ c(W, { variant: "body1", className: "text-secondary font-normal", children:
|
|
5296
|
-
/* @__PURE__ */ c(W, { variant: "body1", className: "text-right font-normal", children:
|
|
5325
|
+
/* @__PURE__ */ c("div", { className: "flex flex-col", children: d.map((N, g) => /* @__PURE__ */ y("div", { className: "flex flex-row items-center justify-between py-3", children: [
|
|
5326
|
+
/* @__PURE__ */ c(W, { variant: "body1", className: "text-secondary font-normal", children: N.label }),
|
|
5327
|
+
/* @__PURE__ */ c(W, { variant: "body1", className: "text-right font-normal", children: N.value })
|
|
5297
5328
|
] }, g)) }),
|
|
5298
5329
|
/* @__PURE__ */ c("div", { className: "border-divider w-full border-t" }),
|
|
5299
|
-
/* @__PURE__ */
|
|
5330
|
+
/* @__PURE__ */ y("div", { className: "pt-2", children: [
|
|
5300
5331
|
/* @__PURE__ */ c(Mr, { variant: "h6", className: "text-primary mb-2", children: "Attention!" }),
|
|
5301
|
-
l ? /* @__PURE__ */ c(W, { variant: "body2", className: "text-secondary", children: l }) : /* @__PURE__ */
|
|
5332
|
+
l ? /* @__PURE__ */ c(W, { variant: "body2", className: "text-secondary", children: l }) : /* @__PURE__ */ y(ze, { children: [
|
|
5302
5333
|
/* @__PURE__ */ c(W, { variant: "body2", className: "text-secondary", children: "1. No third party possesses your staked BTC. You are the only one who can unbond and withdraw your stake." }),
|
|
5303
5334
|
/* @__PURE__ */ c(W, { variant: "body2", className: "text-secondary", children: "2. Your stake will first be sent to Babylon Genesis for verification (~20 seconds), then you will be prompted to submit it to the Bitcoin ledger. It will be marked as 'Pending' until it receives 10 Bitcoin confirmations." })
|
|
5304
5335
|
] })
|
|
5305
5336
|
] })
|
|
5306
5337
|
] }),
|
|
5307
|
-
/* @__PURE__ */
|
|
5338
|
+
/* @__PURE__ */ y(Wr, { className: "flex flex-col gap-4 pb-8 pt-0 sm:flex-row", children: [
|
|
5308
5339
|
/* @__PURE__ */ c(we, { variant: "contained", color: "primary", onClick: n, className: "w-full sm:flex-1 sm:order-2", disabled: t, children: t ? "Processing..." : f }),
|
|
5309
5340
|
/* @__PURE__ */ c(we, { variant: "outlined", color: "primary", onClick: r, className: "w-full sm:flex-1 sm:order-1", children: "Cancel" })
|
|
5310
5341
|
] })
|
|
@@ -5333,8 +5364,8 @@ function nl({
|
|
|
5333
5364
|
chainIcon: i,
|
|
5334
5365
|
chainIconAlt: s
|
|
5335
5366
|
}) {
|
|
5336
|
-
return /* @__PURE__ */
|
|
5337
|
-
/* @__PURE__ */
|
|
5367
|
+
return /* @__PURE__ */ y("div", { className: "flex items-center justify-between", children: [
|
|
5368
|
+
/* @__PURE__ */ y("div", { className: "flex items-center gap-2", children: [
|
|
5338
5369
|
t && (typeof t == "string" ? /* @__PURE__ */ c(
|
|
5339
5370
|
"img",
|
|
5340
5371
|
{
|
|
@@ -5345,7 +5376,7 @@ function nl({
|
|
|
5345
5376
|
) : t),
|
|
5346
5377
|
/* @__PURE__ */ c("span", { className: "text-base sm:text-lg font-medium text-accent-primary", children: e })
|
|
5347
5378
|
] }),
|
|
5348
|
-
n && /* @__PURE__ */
|
|
5379
|
+
n && /* @__PURE__ */ y("div", { className: "flex items-center gap-2", children: [
|
|
5349
5380
|
/* @__PURE__ */ c("span", { className: "text-base sm:text-lg font-medium text-accent-primary", children: n }),
|
|
5350
5381
|
i && (typeof i == "string" ? /* @__PURE__ */ c(
|
|
5351
5382
|
"img",
|
|
@@ -5359,7 +5390,7 @@ function nl({
|
|
|
5359
5390
|
] });
|
|
5360
5391
|
}
|
|
5361
5392
|
function il({ item: e, className: t }) {
|
|
5362
|
-
return /* @__PURE__ */
|
|
5393
|
+
return /* @__PURE__ */ y("div", { className: ce("flex items-center gap-2 min-w-0", t), children: [
|
|
5363
5394
|
/* @__PURE__ */ c("span", { className: "text-xs sm:text-sm text-accent-primary font-medium truncate flex items-center", children: e.name }),
|
|
5364
5395
|
e.icon && /* @__PURE__ */ c("div", { className: "flex items-center w-4 h-4 flex-shrink-0 justify-center text-xs sm:text-sm", children: typeof e.icon == "string" ? /* @__PURE__ */ c(
|
|
5365
5396
|
"img",
|
|
@@ -5375,9 +5406,9 @@ function Ar({ label: e, value: t, collapsible: r = !1, nestedDetails: n }) {
|
|
|
5375
5406
|
const [i, s] = ee(!1), o = () => {
|
|
5376
5407
|
s(!i);
|
|
5377
5408
|
};
|
|
5378
|
-
return r ? /* @__PURE__ */
|
|
5379
|
-
/* @__PURE__ */
|
|
5380
|
-
/* @__PURE__ */
|
|
5409
|
+
return r ? /* @__PURE__ */ y("div", { className: "space-y-3", children: [
|
|
5410
|
+
/* @__PURE__ */ y("div", { className: "flex items-center justify-between gap-2 min-w-0 overflow-x-auto", children: [
|
|
5411
|
+
/* @__PURE__ */ y("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
5381
5412
|
/* @__PURE__ */ c("span", { className: "text-xs sm:text-sm text-accent-secondary", children: e }),
|
|
5382
5413
|
/* @__PURE__ */ c(
|
|
5383
5414
|
"button",
|
|
@@ -5401,7 +5432,7 @@ function Ar({ label: e, value: t, collapsible: r = !1, nestedDetails: n }) {
|
|
|
5401
5432
|
},
|
|
5402
5433
|
l
|
|
5403
5434
|
)) })
|
|
5404
|
-
] }) : /* @__PURE__ */
|
|
5435
|
+
] }) : /* @__PURE__ */ y("div", { className: "flex items-center justify-between gap-2 min-w-0 overflow-x-auto", children: [
|
|
5405
5436
|
/* @__PURE__ */ c("span", { className: "text-xs sm:text-sm text-accent-secondary flex-shrink-0", children: e }),
|
|
5406
5437
|
/* @__PURE__ */ c("span", { className: "text-xs sm:text-sm text-accent-primary font-medium text-right min-w-0 overflow-x-auto whitespace-nowrap", children: t })
|
|
5407
5438
|
] });
|
|
@@ -5412,7 +5443,7 @@ function sl({
|
|
|
5412
5443
|
listItems: r
|
|
5413
5444
|
}) {
|
|
5414
5445
|
const n = t && t.length > 0, i = r && r.length > 0;
|
|
5415
|
-
return /* @__PURE__ */
|
|
5446
|
+
return /* @__PURE__ */ y("div", { className: "space-y-3 sm:space-y-4 overflow-x-auto", children: [
|
|
5416
5447
|
/* @__PURE__ */ c("div", { className: "space-y-4 sm:space-y-6", children: e.map((s, o) => /* @__PURE__ */ c(
|
|
5417
5448
|
Ar,
|
|
5418
5449
|
{
|
|
@@ -5427,7 +5458,7 @@ function sl({
|
|
|
5427
5458
|
"div",
|
|
5428
5459
|
{
|
|
5429
5460
|
className: "bg-surface p-3 sm:p-4 rounded space-y-3 sm:space-y-4 overflow-x-auto",
|
|
5430
|
-
children: /* @__PURE__ */
|
|
5461
|
+
children: /* @__PURE__ */ y("div", { className: "flex justify-between items-start gap-2", children: [
|
|
5431
5462
|
/* @__PURE__ */ c("span", { className: "text-xs sm:text-sm text-accent-secondary", children: s.label }),
|
|
5432
5463
|
/* @__PURE__ */ c("div", { className: "flex flex-wrap gap-2", children: s.items.map((a, l) => /* @__PURE__ */ c(il, { item: a }, a.id || l)) })
|
|
5433
5464
|
] })
|
|
@@ -5447,12 +5478,12 @@ function sl({
|
|
|
5447
5478
|
] });
|
|
5448
5479
|
}
|
|
5449
5480
|
function Xl({ data: e, className: t }) {
|
|
5450
|
-
return /* @__PURE__ */
|
|
5481
|
+
return /* @__PURE__ */ y(
|
|
5451
5482
|
"div",
|
|
5452
5483
|
{
|
|
5453
5484
|
className: `w-full bg-secondary-highlight p-3 sm:p-4 rounded flex flex-col justify-between ${t || ""}`,
|
|
5454
5485
|
children: [
|
|
5455
|
-
/* @__PURE__ */
|
|
5486
|
+
/* @__PURE__ */ y("div", { className: "space-y-3 sm:space-y-4", children: [
|
|
5456
5487
|
/* @__PURE__ */ c(
|
|
5457
5488
|
nl,
|
|
5458
5489
|
{
|
|
@@ -5489,7 +5520,7 @@ function Xl({ data: e, className: t }) {
|
|
|
5489
5520
|
);
|
|
5490
5521
|
}
|
|
5491
5522
|
function al({ className: e, ...t }) {
|
|
5492
|
-
const n = Pt(
|
|
5523
|
+
const n = Pt(yr) ? Rt : pr;
|
|
5493
5524
|
return /* @__PURE__ */ c(n, { ...t, className: ce("w-[41.25rem] max-w-full", e) });
|
|
5494
5525
|
}
|
|
5495
5526
|
const Gl = ({
|
|
@@ -5502,11 +5533,11 @@ const Gl = ({
|
|
|
5502
5533
|
warning: o,
|
|
5503
5534
|
amount: a,
|
|
5504
5535
|
transactionFees: l
|
|
5505
|
-
}) => /* @__PURE__ */
|
|
5536
|
+
}) => /* @__PURE__ */ y(al, { open: e, onClose: n, children: [
|
|
5506
5537
|
/* @__PURE__ */ c(vr, { title: r, className: "text-accent-primary" }),
|
|
5507
|
-
/* @__PURE__ */
|
|
5508
|
-
/* @__PURE__ */
|
|
5509
|
-
/* @__PURE__ */ c(ct, { title: "Receiving", children: /* @__PURE__ */ c("div", { className: "flex flex-col items-end gap-1", children: s.map((f, u) => /* @__PURE__ */
|
|
5538
|
+
/* @__PURE__ */ y(gr, { className: "no-scrollbar mb-[40px] mt-8 flex max-h-[calc(100vh-12rem)] flex-col gap-[40px] overflow-y-auto text-accent-primary", children: [
|
|
5539
|
+
/* @__PURE__ */ y("div", { className: "flex flex-col gap-2", children: [
|
|
5540
|
+
/* @__PURE__ */ c(ct, { title: "Receiving", children: /* @__PURE__ */ c("div", { className: "flex flex-col items-end gap-1", children: s.map((f, u) => /* @__PURE__ */ y("div", { className: "flex items-center gap-2", children: [
|
|
5510
5541
|
f.icon,
|
|
5511
5542
|
f.name
|
|
5512
5543
|
] }, `bsn-${u}`)) }) }),
|
|
@@ -5517,11 +5548,11 @@ const Gl = ({
|
|
|
5517
5548
|
] }),
|
|
5518
5549
|
/* @__PURE__ */ c(pi, { children: o })
|
|
5519
5550
|
] }),
|
|
5520
|
-
/* @__PURE__ */
|
|
5551
|
+
/* @__PURE__ */ y(Wr, { className: "flex flex-col gap-4 pt-0 sm:flex-row", children: [
|
|
5521
5552
|
/* @__PURE__ */ c(we, { variant: "contained", color: "primary", onClick: i, className: "w-full sm:flex-1 sm:order-2", disabled: t, children: t ? "Processing..." : "Proceed" }),
|
|
5522
5553
|
/* @__PURE__ */ c(we, { variant: "outlined", color: "primary", onClick: n, className: "w-full sm:flex-1 sm:order-1", children: "Cancel" })
|
|
5523
5554
|
] })
|
|
5524
|
-
] }), Yl = ({ rewards: e, onClick: t, disabled: r }) => /* @__PURE__ */
|
|
5555
|
+
] }), Yl = ({ rewards: e, onClick: t, disabled: r }) => /* @__PURE__ */ y(Bt, { className: "flex w-full flex-col content-center justify-between gap-4", children: [
|
|
5525
5556
|
e.map((n, i) => {
|
|
5526
5557
|
var a;
|
|
5527
5558
|
const s = parseFloat(String(n.amount)), o = Pi(
|
|
@@ -5563,12 +5594,12 @@ const Gl = ({
|
|
|
5563
5594
|
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
5595
|
fill: "#9E9E9E"
|
|
5565
5596
|
}
|
|
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:
|
|
5597
|
+
) }), 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
5598
|
background: e = "none",
|
|
5568
5599
|
backgroundClassName: t = "",
|
|
5569
5600
|
className: r = "",
|
|
5570
5601
|
children: n
|
|
5571
|
-
}) => /* @__PURE__ */ c("div", { className:
|
|
5602
|
+
}) => /* @__PURE__ */ c("div", { className: O((() => {
|
|
5572
5603
|
switch (e) {
|
|
5573
5604
|
case "secondary":
|
|
5574
5605
|
return "mx-[21px] rounded-lg bg-secondary-highlight md:mx-0 md:bg-transparent";
|
|
@@ -5586,10 +5617,10 @@ const Gl = ({
|
|
|
5586
5617
|
className: s = "",
|
|
5587
5618
|
children: o
|
|
5588
5619
|
}) => {
|
|
5589
|
-
const a =
|
|
5590
|
-
(m) => typeof m == "string" ||
|
|
5620
|
+
const a = P.Children.toArray(o), l = a.find(
|
|
5621
|
+
(m) => typeof m == "string" || P.isValidElement(m) && m.type !== Ft
|
|
5591
5622
|
), f = a.find(
|
|
5592
|
-
(m) =>
|
|
5623
|
+
(m) => P.isValidElement(m) && m.type === Ft
|
|
5593
5624
|
), u = typeof l == "string" ? l : "", d = r ? /* @__PURE__ */ c(Ii, {}) : void 0;
|
|
5594
5625
|
return /* @__PURE__ */ c(
|
|
5595
5626
|
uo,
|
|
@@ -5605,11 +5636,11 @@ const Gl = ({
|
|
|
5605
5636
|
}
|
|
5606
5637
|
);
|
|
5607
5638
|
}, fl = ({ icon: e, className: t = "", children: r }) => {
|
|
5608
|
-
const n =
|
|
5609
|
-
(l) => typeof l == "string" ||
|
|
5639
|
+
const n = P.Children.toArray(r), i = n.find(
|
|
5640
|
+
(l) => typeof l == "string" || P.isValidElement(l) && l.type !== Ft
|
|
5610
5641
|
), s = n.find(
|
|
5611
|
-
(l) =>
|
|
5612
|
-
), o = n.filter((l) =>
|
|
5642
|
+
(l) => P.isValidElement(l) && l.type === Ft
|
|
5643
|
+
), o = n.filter((l) => P.isValidElement(l) && l.type === ji);
|
|
5613
5644
|
return /* @__PURE__ */ c(
|
|
5614
5645
|
fo,
|
|
5615
5646
|
{
|
|
@@ -5663,10 +5694,10 @@ const Mn = ({
|
|
|
5663
5694
|
isCopied: i,
|
|
5664
5695
|
onCopy: s,
|
|
5665
5696
|
className: o
|
|
5666
|
-
}) => /* @__PURE__ */ c("div", { className:
|
|
5697
|
+
}) => /* @__PURE__ */ c("div", { className: O(
|
|
5667
5698
|
"bg-secondary-highlight dark:bg-secondary-strokeLight rounded-[4px] p-3 flex-1 md:p-4",
|
|
5668
5699
|
o
|
|
5669
|
-
), children: /* @__PURE__ */
|
|
5700
|
+
), children: /* @__PURE__ */ y("div", { className: "flex flex-col w-full", children: [
|
|
5670
5701
|
/* @__PURE__ */ c("div", { className: "flex justify-start mb-2 md:mb-3", children: /* @__PURE__ */ c(
|
|
5671
5702
|
er,
|
|
5672
5703
|
{
|
|
@@ -5676,7 +5707,7 @@ const Mn = ({
|
|
|
5676
5707
|
className: "w-8 h-8 md:w-10 md:h-10"
|
|
5677
5708
|
}
|
|
5678
5709
|
) }),
|
|
5679
|
-
/* @__PURE__ */ c("div", { className: "flex justify-start mb-[1px]", children: /* @__PURE__ */
|
|
5710
|
+
/* @__PURE__ */ c("div", { className: "flex justify-start mb-[1px]", children: /* @__PURE__ */ y(
|
|
5680
5711
|
W,
|
|
5681
5712
|
{
|
|
5682
5713
|
variant: "body1",
|
|
@@ -5687,7 +5718,7 @@ const Mn = ({
|
|
|
5687
5718
|
]
|
|
5688
5719
|
}
|
|
5689
5720
|
) }),
|
|
5690
|
-
/* @__PURE__ */
|
|
5721
|
+
/* @__PURE__ */ y("div", { className: "flex items-center justify-between w-full", children: [
|
|
5691
5722
|
/* @__PURE__ */ c("div", { className: "flex-1 min-w-0", children: i ? /* @__PURE__ */ c(W, { className: "text-accent-primary !text-sm truncate whitespace-nowrap", children: "Copied ✓" }) : /* @__PURE__ */ c(
|
|
5692
5723
|
hi,
|
|
5693
5724
|
{
|
|
@@ -5718,7 +5749,7 @@ const Mn = ({
|
|
|
5718
5749
|
n || t(!e);
|
|
5719
5750
|
},
|
|
5720
5751
|
disabled: n,
|
|
5721
|
-
className:
|
|
5752
|
+
className: O(
|
|
5722
5753
|
"relative inline-flex h-[31px] w-[55px] items-center rounded-full transition-colors duration-300 ease-in-out",
|
|
5723
5754
|
"focus:outline-none focus:ring-2 focus:ring-primary-main focus:ring-offset-2",
|
|
5724
5755
|
e ? "bg-primary-main dark:bg-primary-light" : "bg-[#78788029]",
|
|
@@ -5733,7 +5764,7 @@ const Mn = ({
|
|
|
5733
5764
|
children: /* @__PURE__ */ c(
|
|
5734
5765
|
"span",
|
|
5735
5766
|
{
|
|
5736
|
-
className:
|
|
5767
|
+
className: O(
|
|
5737
5768
|
"inline-block w-[27px] h-[27px] transform rounded-full bg-white transition-transform duration-300 ease-in-out",
|
|
5738
5769
|
"flex items-center justify-center shadow-sm",
|
|
5739
5770
|
e ? "translate-x-[26px]" : "translate-x-[2px]"
|
|
@@ -5748,13 +5779,13 @@ const Mn = ({
|
|
|
5748
5779
|
value: n,
|
|
5749
5780
|
onChange: i,
|
|
5750
5781
|
className: s
|
|
5751
|
-
}) => /* @__PURE__ */
|
|
5782
|
+
}) => /* @__PURE__ */ y("div", { className: O(
|
|
5752
5783
|
"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
5784
|
s
|
|
5754
5785
|
), children: [
|
|
5755
|
-
/* @__PURE__ */
|
|
5786
|
+
/* @__PURE__ */ y("div", { className: "flex items-center gap-4", children: [
|
|
5756
5787
|
e,
|
|
5757
|
-
/* @__PURE__ */
|
|
5788
|
+
/* @__PURE__ */ y("div", { className: "flex flex-col", children: [
|
|
5758
5789
|
/* @__PURE__ */ c(
|
|
5759
5790
|
W,
|
|
5760
5791
|
{
|
|
@@ -5780,13 +5811,13 @@ const Mn = ({
|
|
|
5780
5811
|
onCopy: n,
|
|
5781
5812
|
className: i,
|
|
5782
5813
|
icon: s
|
|
5783
|
-
}) => /* @__PURE__ */ c("div", { className:
|
|
5814
|
+
}) => /* @__PURE__ */ c("div", { className: O(
|
|
5784
5815
|
"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
5816
|
i
|
|
5786
|
-
), children: /* @__PURE__ */ c("div", { className: "flex flex-col w-full", children: /* @__PURE__ */
|
|
5817
|
+
), children: /* @__PURE__ */ c("div", { className: "flex flex-col w-full", children: /* @__PURE__ */ y("div", { className: "flex items-center gap-4 mb-3", children: [
|
|
5787
5818
|
s && /* @__PURE__ */ c("div", { className: "flex-shrink-0", children: s }),
|
|
5788
|
-
/* @__PURE__ */
|
|
5789
|
-
/* @__PURE__ */
|
|
5819
|
+
/* @__PURE__ */ y("div", { className: "flex w-full", children: [
|
|
5820
|
+
/* @__PURE__ */ y("div", { className: "flex flex-col w-full", children: [
|
|
5790
5821
|
/* @__PURE__ */ c(
|
|
5791
5822
|
W,
|
|
5792
5823
|
{
|
|
@@ -5828,10 +5859,10 @@ const Mn = ({
|
|
|
5828
5859
|
forceOpen: d = !1,
|
|
5829
5860
|
onOpenChange: m
|
|
5830
5861
|
}) => {
|
|
5831
|
-
var
|
|
5832
|
-
const { copyToClipboard: v, isCopied:
|
|
5833
|
-
w(
|
|
5834
|
-
}, [m]),
|
|
5862
|
+
var F, k, E, A;
|
|
5863
|
+
const { copyToClipboard: v, isCopied: N } = mi(), [g, w] = ee(d), M = oe((_) => {
|
|
5864
|
+
w(_), m == null || m(_);
|
|
5865
|
+
}, [m]), x = oe(() => {
|
|
5835
5866
|
w(!1), u();
|
|
5836
5867
|
}, [u]);
|
|
5837
5868
|
return /* @__PURE__ */ c(
|
|
@@ -5839,19 +5870,19 @@ const Mn = ({
|
|
|
5839
5870
|
{
|
|
5840
5871
|
trigger: e,
|
|
5841
5872
|
open: g,
|
|
5842
|
-
onOpenChange:
|
|
5873
|
+
onOpenChange: M,
|
|
5843
5874
|
mobileMode: "dialog",
|
|
5844
5875
|
className: "shadow-lg border border-[#38708533] bg-[#FFFFFF] dark:bg-[#252525] dark:border-[#404040] rounded-lg",
|
|
5845
|
-
children: /* @__PURE__ */
|
|
5846
|
-
/* @__PURE__ */
|
|
5876
|
+
children: /* @__PURE__ */ y("div", { className: "p-4 space-y-6 w-full text-primary-main", children: [
|
|
5877
|
+
/* @__PURE__ */ y("div", { className: "flex flex-row gap-2 w-full md:flex-col overflow-x-auto", children: [
|
|
5847
5878
|
/* @__PURE__ */ c(
|
|
5848
5879
|
Mn,
|
|
5849
5880
|
{
|
|
5850
5881
|
walletType: "Bitcoin",
|
|
5851
|
-
walletName: (
|
|
5852
|
-
walletIcon: (
|
|
5882
|
+
walletName: (F = n.BTC) == null ? void 0 : F.name,
|
|
5883
|
+
walletIcon: (k = n.BTC) == null ? void 0 : k.icon,
|
|
5853
5884
|
address: t,
|
|
5854
|
-
isCopied:
|
|
5885
|
+
isCopied: N("btc"),
|
|
5855
5886
|
onCopy: () => v("btc", t)
|
|
5856
5887
|
}
|
|
5857
5888
|
),
|
|
@@ -5859,15 +5890,15 @@ const Mn = ({
|
|
|
5859
5890
|
Mn,
|
|
5860
5891
|
{
|
|
5861
5892
|
walletType: "Babylon",
|
|
5862
|
-
walletName: (
|
|
5863
|
-
walletIcon: (
|
|
5893
|
+
walletName: (E = n.BBN) == null ? void 0 : E.name,
|
|
5894
|
+
walletIcon: (A = n.BBN) == null ? void 0 : A.icon,
|
|
5864
5895
|
address: r,
|
|
5865
|
-
isCopied:
|
|
5896
|
+
isCopied: N("bbn"),
|
|
5866
5897
|
onCopy: () => v("bbn", r)
|
|
5867
5898
|
}
|
|
5868
5899
|
)
|
|
5869
5900
|
] }),
|
|
5870
|
-
/* @__PURE__ */
|
|
5901
|
+
/* @__PURE__ */ y("div", { className: "flex flex-col gap-8 w-full", children: [
|
|
5871
5902
|
/* @__PURE__ */ c(
|
|
5872
5903
|
Tn,
|
|
5873
5904
|
{
|
|
@@ -5875,7 +5906,7 @@ const Mn = ({
|
|
|
5875
5906
|
title: "Using Inscriptions",
|
|
5876
5907
|
status: i ? "Off" : "On",
|
|
5877
5908
|
value: !i,
|
|
5878
|
-
onChange: (
|
|
5909
|
+
onChange: (_) => _ ? o() : a()
|
|
5879
5910
|
}
|
|
5880
5911
|
),
|
|
5881
5912
|
/* @__PURE__ */ c(
|
|
@@ -5893,7 +5924,7 @@ const Mn = ({
|
|
|
5893
5924
|
{
|
|
5894
5925
|
title: "Bitcoin Public Key",
|
|
5895
5926
|
value: f,
|
|
5896
|
-
isCopied:
|
|
5927
|
+
isCopied: N("publicKey"),
|
|
5897
5928
|
onCopy: () => v("publicKey", f),
|
|
5898
5929
|
icon: /* @__PURE__ */ c(Sa, {})
|
|
5899
5930
|
}
|
|
@@ -5902,7 +5933,7 @@ const Mn = ({
|
|
|
5902
5933
|
/* @__PURE__ */ c("div", { className: "pt-2", children: /* @__PURE__ */ c(
|
|
5903
5934
|
In,
|
|
5904
5935
|
{
|
|
5905
|
-
onClick:
|
|
5936
|
+
onClick: x,
|
|
5906
5937
|
fluid: !0,
|
|
5907
5938
|
children: "Disconnect Wallets"
|
|
5908
5939
|
}
|
|
@@ -5912,7 +5943,7 @@ const Mn = ({
|
|
|
5912
5943
|
);
|
|
5913
5944
|
};
|
|
5914
5945
|
function vl({ className: e, ...t }) {
|
|
5915
|
-
const n = Pt(
|
|
5946
|
+
const n = Pt(yr) ? Rt : pr;
|
|
5916
5947
|
return /* @__PURE__ */ c(n, { ...t, className: ce("w-[41.25rem] max-w-full", e) });
|
|
5917
5948
|
}
|
|
5918
5949
|
const Jl = ({
|
|
@@ -5930,9 +5961,9 @@ const Jl = ({
|
|
|
5930
5961
|
warningText: f,
|
|
5931
5962
|
actionButtonText: u = "Unbond",
|
|
5932
5963
|
onActionClick: d
|
|
5933
|
-
}) => /* @__PURE__ */
|
|
5964
|
+
}) => /* @__PURE__ */ y(vl, { open: e, onClose: t, children: [
|
|
5934
5965
|
/* @__PURE__ */ c(vr, { title: r, onClose: t, className: "text-accent-primary" }),
|
|
5935
|
-
/* @__PURE__ */
|
|
5966
|
+
/* @__PURE__ */ y(
|
|
5936
5967
|
gr,
|
|
5937
5968
|
{
|
|
5938
5969
|
style: { maxHeight: Di },
|
|
@@ -5983,21 +6014,21 @@ function Ql({ className: e, orientation: t = "vertical", children: r }) {
|
|
|
5983
6014
|
) });
|
|
5984
6015
|
}
|
|
5985
6016
|
function ec({ className: e, orientation: t = "horizontal", title: r, value: n, suffix: i }) {
|
|
5986
|
-
return /* @__PURE__ */
|
|
6017
|
+
return /* @__PURE__ */ y("div", { className: O("bbn-list-item-legacy", `bbn-list-item-legacy-${t}`, e), children: [
|
|
5987
6018
|
/* @__PURE__ */ c(
|
|
5988
6019
|
W,
|
|
5989
6020
|
{
|
|
5990
6021
|
as: "div",
|
|
5991
|
-
className:
|
|
6022
|
+
className: O("bbn-list-title-legacy", `bbn-list-title-legacy-${t}`),
|
|
5992
6023
|
variant: t === "horizontal" ? "body1" : "body2",
|
|
5993
6024
|
children: r
|
|
5994
6025
|
}
|
|
5995
6026
|
),
|
|
5996
|
-
/* @__PURE__ */
|
|
6027
|
+
/* @__PURE__ */ y(
|
|
5997
6028
|
W,
|
|
5998
6029
|
{
|
|
5999
6030
|
as: "div",
|
|
6000
|
-
className:
|
|
6031
|
+
className: O("bbn-list-value-legacy", `bbn-list-value-legacy-${t}`),
|
|
6001
6032
|
variant: "body1",
|
|
6002
6033
|
children: [
|
|
6003
6034
|
n,
|