@edgex-web/components 0.1.0-beta.24 → 0.1.0-beta.25
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/Deposit/src/evm/index.d.ts.map +1 -1
- package/dist/hooks/useTranslation.d.ts +2 -0
- package/dist/hooks/useTranslation.d.ts.map +1 -1
- package/dist/index.esm.js +391 -387
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +25 -25
- package/dist/index.umd.js.map +1 -1
- package/dist/locales/en-US.d.ts +1 -0
- package/dist/locales/en-US.d.ts.map +1 -1
- package/dist/locales/ja-JP.d.ts +1 -0
- package/dist/locales/ja-JP.d.ts.map +1 -1
- package/dist/locales/ru-RU.d.ts +1 -0
- package/dist/locales/ru-RU.d.ts.map +1 -1
- package/dist/locales/zh-CN.d.ts +1 -0
- package/dist/locales/zh-CN.d.ts.map +1 -1
- package/dist/locales/zh-TW.d.ts +1 -0
- package/dist/locales/zh-TW.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var Ta = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var _e = (e, t, n) =>
|
|
2
|
+
var Ca = (e, t, n) => t in e ? Ta(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var _e = (e, t, n) => Ca(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import * as j from "react";
|
|
5
|
-
import z, { createContext as Se, useContext as he, useMemo as re, useCallback as X, forwardRef as io, createElement as An, useRef as ee, useEffect as ye, useState as te, useLayoutEffect as Bn, Fragment as ke, isValidElement as
|
|
5
|
+
import z, { createContext as Se, useContext as he, useMemo as re, useCallback as X, forwardRef as io, createElement as An, useRef as ee, useEffect as ye, useState as te, useLayoutEffect as Bn, Fragment as ke, isValidElement as Na, cloneElement as Aa, useId as Mt, useReducer as Pa, useSyncExternalStore as $a, useImperativeHandle as rs } from "react";
|
|
6
6
|
import * as on from "react-dom";
|
|
7
7
|
import os, { createPortal as is, flushSync as tn } from "react-dom";
|
|
8
8
|
function La(e) {
|
|
@@ -89,7 +89,7 @@ function Ia() {
|
|
|
89
89
|
function A($) {
|
|
90
90
|
return $.displayName || "Context";
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function C($) {
|
|
93
93
|
if ($ == null)
|
|
94
94
|
return null;
|
|
95
95
|
if (typeof $.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof $ == "function")
|
|
@@ -122,11 +122,11 @@ function Ia() {
|
|
|
122
122
|
return P($, $.render, "ForwardRef");
|
|
123
123
|
case d:
|
|
124
124
|
var Q = $.displayName || null;
|
|
125
|
-
return Q !== null ? Q :
|
|
125
|
+
return Q !== null ? Q : C($.type) || "Memo";
|
|
126
126
|
case p: {
|
|
127
127
|
var ae = $, ue = ae._payload, se = ae._init;
|
|
128
128
|
try {
|
|
129
|
-
return
|
|
129
|
+
return C(se(ue));
|
|
130
130
|
} catch {
|
|
131
131
|
return null;
|
|
132
132
|
}
|
|
@@ -134,14 +134,14 @@ function Ia() {
|
|
|
134
134
|
}
|
|
135
135
|
return null;
|
|
136
136
|
}
|
|
137
|
-
var E = Object.assign, S = 0, O,
|
|
137
|
+
var E = Object.assign, S = 0, O, N, x, D, _, U, V;
|
|
138
138
|
function G() {
|
|
139
139
|
}
|
|
140
140
|
G.__reactDisabledLog = !0;
|
|
141
141
|
function q() {
|
|
142
142
|
{
|
|
143
143
|
if (S === 0) {
|
|
144
|
-
O = console.log,
|
|
144
|
+
O = console.log, N = console.info, x = console.warn, D = console.error, _ = console.group, U = console.groupCollapsed, V = console.groupEnd;
|
|
145
145
|
var $ = {
|
|
146
146
|
configurable: !0,
|
|
147
147
|
enumerable: !0,
|
|
@@ -174,7 +174,7 @@ function Ia() {
|
|
|
174
174
|
value: O
|
|
175
175
|
}),
|
|
176
176
|
info: E({}, $, {
|
|
177
|
-
value:
|
|
177
|
+
value: N
|
|
178
178
|
}),
|
|
179
179
|
warn: E({}, $, {
|
|
180
180
|
value: x
|
|
@@ -264,14 +264,14 @@ function Ia() {
|
|
|
264
264
|
} catch ($e) {
|
|
265
265
|
if ($e && Q && typeof $e.stack == "string") {
|
|
266
266
|
for (var oe = $e.stack.split(`
|
|
267
|
-
`),
|
|
268
|
-
`), ve = oe.length - 1, be =
|
|
267
|
+
`), Ce = Q.stack.split(`
|
|
268
|
+
`), ve = oe.length - 1, be = Ce.length - 1; ve >= 1 && be >= 0 && oe[ve] !== Ce[be]; )
|
|
269
269
|
be--;
|
|
270
270
|
for (; ve >= 1 && be >= 0; ve--, be--)
|
|
271
|
-
if (oe[ve] !==
|
|
271
|
+
if (oe[ve] !== Ce[be]) {
|
|
272
272
|
if (ve !== 1 || be !== 1)
|
|
273
273
|
do
|
|
274
|
-
if (ve--, be--, be < 0 || oe[ve] !==
|
|
274
|
+
if (ve--, be--, be < 0 || oe[ve] !== Ce[be]) {
|
|
275
275
|
var Be = `
|
|
276
276
|
` + oe[ve].replace(" at new ", " at ");
|
|
277
277
|
return $.displayName && Be.includes("<anonymous>") && (Be = Be.replace("<anonymous>", $.displayName)), typeof $ == "function" && Ae.set($, Be), Be;
|
|
@@ -283,8 +283,8 @@ function Ia() {
|
|
|
283
283
|
} finally {
|
|
284
284
|
fe = !1, K.current = ue, W(), Error.prepareStackTrace = ae;
|
|
285
285
|
}
|
|
286
|
-
var kt = $ ? $.displayName || $.name : "",
|
|
287
|
-
return typeof $ == "function" && Ae.set($,
|
|
286
|
+
var kt = $ ? $.displayName || $.name : "", Nt = kt ? Z(kt) : "";
|
|
287
|
+
return typeof $ == "function" && Ae.set($, Nt), Nt;
|
|
288
288
|
}
|
|
289
289
|
function Oe($, B, Y) {
|
|
290
290
|
return rt($, !1);
|
|
@@ -338,8 +338,8 @@ function Ia() {
|
|
|
338
338
|
var oe = void 0;
|
|
339
339
|
try {
|
|
340
340
|
if (typeof $[se] != "function") {
|
|
341
|
-
var
|
|
342
|
-
throw
|
|
341
|
+
var Ce = Error((Q || "React class") + ": " + Y + " type `" + se + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof $[se] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
342
|
+
throw Ce.name = "Invariant Violation", Ce;
|
|
343
343
|
}
|
|
344
344
|
oe = $[se](B, se, Q, Y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
345
345
|
} catch (ve) {
|
|
@@ -451,8 +451,8 @@ function Ia() {
|
|
|
451
451
|
};
|
|
452
452
|
function ha($, B, Y, Q, ae) {
|
|
453
453
|
{
|
|
454
|
-
var ue, se = {}, oe = null,
|
|
455
|
-
Y !== void 0 && (Uo(Y), oe = "" + Y), ua(B) && (Uo(B.key), oe = "" + B.key), ca(B) && (
|
|
454
|
+
var ue, se = {}, oe = null, Ce = null;
|
|
455
|
+
Y !== void 0 && (Uo(Y), oe = "" + Y), ua(B) && (Uo(B.key), oe = "" + B.key), ca(B) && (Ce = B.ref, fa(B, ae));
|
|
456
456
|
for (ue in B)
|
|
457
457
|
Xt.call(B, ue) && !aa.hasOwnProperty(ue) && (se[ue] = B[ue]);
|
|
458
458
|
if ($ && $.defaultProps) {
|
|
@@ -460,11 +460,11 @@ function Ia() {
|
|
|
460
460
|
for (ue in ve)
|
|
461
461
|
se[ue] === void 0 && (se[ue] = ve[ue]);
|
|
462
462
|
}
|
|
463
|
-
if (oe ||
|
|
463
|
+
if (oe || Ce) {
|
|
464
464
|
var be = typeof $ == "function" ? $.displayName || $.name || "Unknown" : $;
|
|
465
|
-
oe && da(se, be),
|
|
465
|
+
oe && da(se, be), Ce && pa(se, be);
|
|
466
466
|
}
|
|
467
|
-
return ma($, oe,
|
|
467
|
+
return ma($, oe, Ce, ae, Q, Vo.current, se);
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
var rr = L.ReactCurrentOwner, Go = L.ReactDebugCurrentFrame;
|
|
@@ -483,7 +483,7 @@ function Ia() {
|
|
|
483
483
|
function Yo() {
|
|
484
484
|
{
|
|
485
485
|
if (rr.current) {
|
|
486
|
-
var $ =
|
|
486
|
+
var $ = C(rr.current.type);
|
|
487
487
|
if ($)
|
|
488
488
|
return `
|
|
489
489
|
|
|
@@ -518,7 +518,7 @@ Check the top-level render call using <` + Y + ">.");
|
|
|
518
518
|
return;
|
|
519
519
|
Ko[Y] = !0;
|
|
520
520
|
var Q = "";
|
|
521
|
-
$ && $._owner && $._owner !== rr.current && (Q = " It was passed a child from " +
|
|
521
|
+
$ && $._owner && $._owner !== rr.current && (Q = " It was passed a child from " + C($._owner.type) + "."), _t($), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', Y, Q), _t(null);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
function Xo($, B) {
|
|
@@ -555,11 +555,11 @@ Check the top-level render call using <` + Y + ">.");
|
|
|
555
555
|
else
|
|
556
556
|
return;
|
|
557
557
|
if (Y) {
|
|
558
|
-
var Q =
|
|
558
|
+
var Q = C(B);
|
|
559
559
|
oa(Y, $.props, "prop", Q, $);
|
|
560
560
|
} else if (B.PropTypes !== void 0 && !or) {
|
|
561
561
|
or = !0;
|
|
562
|
-
var ae =
|
|
562
|
+
var ae = C(B);
|
|
563
563
|
y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", ae || "Unknown");
|
|
564
564
|
}
|
|
565
565
|
typeof B.getDefaultProps == "function" && !B.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -584,10 +584,10 @@ Check the top-level render call using <` + Y + ">.");
|
|
|
584
584
|
if (!se) {
|
|
585
585
|
var oe = "";
|
|
586
586
|
($ === void 0 || typeof $ == "object" && $ !== null && Object.keys($).length === 0) && (oe += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
587
|
-
var
|
|
588
|
-
|
|
587
|
+
var Ce = ga();
|
|
588
|
+
Ce ? oe += Ce : oe += Yo();
|
|
589
589
|
var ve;
|
|
590
|
-
$ === null ? ve = "null" : nr($) ? ve = "array" : $ !== void 0 && $.$$typeof === t ? (ve = "<" + (
|
|
590
|
+
$ === null ? ve = "null" : nr($) ? ve = "array" : $ !== void 0 && $.$$typeof === t ? (ve = "<" + (C($.type) || "Unknown") + " />", oe = " Did you accidentally export a JSX literal instead of a component?") : ve = typeof $, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ve, oe);
|
|
591
591
|
}
|
|
592
592
|
var be = ha($, B, Y, ae, ue);
|
|
593
593
|
if (be == null)
|
|
@@ -606,17 +606,17 @@ Check the top-level render call using <` + Y + ">.");
|
|
|
606
606
|
Xo(Be, $);
|
|
607
607
|
}
|
|
608
608
|
if (Xt.call(B, "key")) {
|
|
609
|
-
var
|
|
609
|
+
var Nt = C($), $e = Object.keys(B).filter(function(Oa) {
|
|
610
610
|
return Oa !== "key";
|
|
611
611
|
}), sr = $e.length > 0 ? "{key: someKey, " + $e.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
612
|
-
if (!Qo[
|
|
612
|
+
if (!Qo[Nt + sr]) {
|
|
613
613
|
var Sa = $e.length > 0 ? "{" + $e.join(": ..., ") + ": ...}" : "{}";
|
|
614
614
|
y(`A props object containing a "key" prop is being spread into JSX:
|
|
615
615
|
let props = %s;
|
|
616
616
|
<%s {...props} />
|
|
617
617
|
React keys must be passed directly to JSX without using spread:
|
|
618
618
|
let props = %s;
|
|
619
|
-
<%s key={someKey} {...props} />`, sr,
|
|
619
|
+
<%s key={someKey} {...props} />`, sr, Nt, Sa, Nt), Qo[Nt + sr] = !0;
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
622
|
return $ === r ? xa(be) : ba(be), be;
|
|
@@ -648,6 +648,7 @@ const Ma = {
|
|
|
648
648
|
max: "最大",
|
|
649
649
|
arrivalTime: "到账时间",
|
|
650
650
|
minDeposit: "最小充值金额",
|
|
651
|
+
minDepositParsed: "最少充值 {{amount}} {{token}}",
|
|
651
652
|
maxDeposit: "最大充值金额",
|
|
652
653
|
depositTipFor25w: "单笔充值金额上限为 250,000。若充值金额大于250,000,请使用Ethereum链充值。",
|
|
653
654
|
depositAllTip: `仅支持发送 {{coin}} ({{v}}) 资产到此地址。
|
|
@@ -692,6 +693,7 @@ const Ma = {
|
|
|
692
693
|
max: "Max",
|
|
693
694
|
arrivalTime: "Arrival Time",
|
|
694
695
|
minDeposit: "Minimum Deposit Amount",
|
|
696
|
+
minDepositParsed: "Min. Deposit {{amount}} {{token}}",
|
|
695
697
|
maxDeposit: "Maximum Deposit Amount",
|
|
696
698
|
depositTipFor25w: "The maximum amount per deposit is 250,000. If your deposit exceeds 250,000, please use the Ethereum chain.",
|
|
697
699
|
depositAllTip: `Only {{coin}} ({{v}}) is supported for deposits to this address.
|
|
@@ -736,6 +738,7 @@ const Ma = {
|
|
|
736
738
|
max: "最大",
|
|
737
739
|
arrivalTime: "着金予定時間",
|
|
738
740
|
minDeposit: "最低入金額",
|
|
741
|
+
minDepositParsed: "最低入金額 {{amount}} {{token}}",
|
|
739
742
|
maxDeposit: "最大入金額",
|
|
740
743
|
depositTipFor25w: "1回の入金上限額は250,000です。250,000を超える場合は、Ethereumチェーンでの入金をご利用ください。",
|
|
741
744
|
depositAllTip: `このアドレスは{{coin}}({{v}})専用です。他通貨は送金しないでください。
|
|
@@ -780,6 +783,7 @@ const Ma = {
|
|
|
780
783
|
max: "Максимум",
|
|
781
784
|
arrivalTime: "Время поступления",
|
|
782
785
|
minDeposit: "Минимальная сумма депозита",
|
|
786
|
+
minDepositParsed: "Мин. депозит {{amount}} {{token}}",
|
|
783
787
|
maxDeposit: "Максимальная сумма депозита",
|
|
784
788
|
depositTipFor25w: "Максимальная сумма одного пополнения — 250 000. Если сумма превышает 250 000, пожалуйста, используйте сеть Ethereum для пополнения.",
|
|
785
789
|
depositAllTip: `На этот адрес можно внести только {{coin}} ({{v}}).
|
|
@@ -824,6 +828,7 @@ const Ma = {
|
|
|
824
828
|
max: "最大",
|
|
825
829
|
arrivalTime: "到帳時間",
|
|
826
830
|
minDeposit: "最小儲值金額",
|
|
831
|
+
minDepositParsed: "最少充值 {{amount}} {{token}}",
|
|
827
832
|
maxDeposit: "最大儲值金額",
|
|
828
833
|
depositTipFor25w: "單筆充值金額上限為 250,000。若充值金額大於 250,000,請使用 Ethereum 鏈充值。",
|
|
829
834
|
depositAllTip: `僅支援發送 {{coin}} ({{v}}) 資產到此位址。
|
|
@@ -905,7 +910,7 @@ function as(e) {
|
|
|
905
910
|
suffix: ""
|
|
906
911
|
}, w = "0123456789abcdefghijklmnopqrstuvwxyz", L = !0;
|
|
907
912
|
function y(m, v) {
|
|
908
|
-
var b, P, A,
|
|
913
|
+
var b, P, A, C, E, S, O, N, x = this;
|
|
909
914
|
if (!(x instanceof y)) return new y(m, v);
|
|
910
915
|
if (v == null) {
|
|
911
916
|
if (m && m._isBigNumber === !0) {
|
|
@@ -914,58 +919,58 @@ function as(e) {
|
|
|
914
919
|
}
|
|
915
920
|
if ((S = typeof m == "number") && m * 0 == 0) {
|
|
916
921
|
if (x.s = 1 / m < 0 ? (m = -m, -1) : 1, m === ~~m) {
|
|
917
|
-
for (
|
|
918
|
-
|
|
922
|
+
for (C = 0, E = m; E >= 10; E /= 10, C++) ;
|
|
923
|
+
C > d ? x.c = x.e = null : (x.e = C, x.c = [m]);
|
|
919
924
|
return;
|
|
920
925
|
}
|
|
921
|
-
|
|
926
|
+
N = String(m);
|
|
922
927
|
} else {
|
|
923
|
-
if (!Va.test(
|
|
924
|
-
x.s =
|
|
928
|
+
if (!Va.test(N = String(m))) return r(x, N, S);
|
|
929
|
+
x.s = N.charCodeAt(0) == 45 ? (N = N.slice(1), -1) : 1;
|
|
925
930
|
}
|
|
926
|
-
(
|
|
931
|
+
(C = N.indexOf(".")) > -1 && (N = N.replace(".", "")), (E = N.search(/e/i)) > 0 ? (C < 0 && (C = E), C += +N.slice(E + 1), N = N.substring(0, E)) : C < 0 && (C = N.length);
|
|
927
932
|
} else {
|
|
928
933
|
if (pe(v, 2, w.length, "Base"), v == 10 && L)
|
|
929
934
|
return x = new y(m), F(x, l + x.e + 1, c);
|
|
930
|
-
if (
|
|
931
|
-
if (m * 0 != 0) return r(x,
|
|
932
|
-
if (x.s = 1 / m < 0 ? (
|
|
935
|
+
if (N = String(m), S = typeof m == "number") {
|
|
936
|
+
if (m * 0 != 0) return r(x, N, S, v);
|
|
937
|
+
if (x.s = 1 / m < 0 ? (N = N.slice(1), -1) : 1, y.DEBUG && N.replace(/^0\.0*|\./, "").length > 15)
|
|
933
938
|
throw Error(ni + m);
|
|
934
939
|
} else
|
|
935
|
-
x.s =
|
|
936
|
-
for (b = w.slice(0, v),
|
|
937
|
-
if (b.indexOf(P =
|
|
940
|
+
x.s = N.charCodeAt(0) === 45 ? (N = N.slice(1), -1) : 1;
|
|
941
|
+
for (b = w.slice(0, v), C = E = 0, O = N.length; E < O; E++)
|
|
942
|
+
if (b.indexOf(P = N.charAt(E)) < 0) {
|
|
938
943
|
if (P == ".") {
|
|
939
|
-
if (E >
|
|
940
|
-
|
|
944
|
+
if (E > C) {
|
|
945
|
+
C = O;
|
|
941
946
|
continue;
|
|
942
947
|
}
|
|
943
|
-
} else if (!A && (
|
|
944
|
-
A = !0, E = -1,
|
|
948
|
+
} else if (!A && (N == N.toUpperCase() && (N = N.toLowerCase()) || N == N.toLowerCase() && (N = N.toUpperCase()))) {
|
|
949
|
+
A = !0, E = -1, C = 0;
|
|
945
950
|
continue;
|
|
946
951
|
}
|
|
947
952
|
return r(x, String(m), S, v);
|
|
948
953
|
}
|
|
949
|
-
S = !1,
|
|
954
|
+
S = !1, N = n(N, v, 10, x.s), (C = N.indexOf(".")) > -1 ? N = N.replace(".", "") : C = N.length;
|
|
950
955
|
}
|
|
951
|
-
for (E = 0;
|
|
952
|
-
for (O =
|
|
953
|
-
if (
|
|
956
|
+
for (E = 0; N.charCodeAt(E) === 48; E++) ;
|
|
957
|
+
for (O = N.length; N.charCodeAt(--O) === 48; ) ;
|
|
958
|
+
if (N = N.slice(E, ++O)) {
|
|
954
959
|
if (O -= E, S && y.DEBUG && O > 15 && (m > ar || m !== ze(m)))
|
|
955
960
|
throw Error(ni + x.s * m);
|
|
956
|
-
if ((
|
|
961
|
+
if ((C = C - E - 1) > d)
|
|
957
962
|
x.c = x.e = null;
|
|
958
|
-
else if (
|
|
963
|
+
else if (C < u)
|
|
959
964
|
x.c = [x.e = 0];
|
|
960
965
|
else {
|
|
961
|
-
if (x.e =
|
|
962
|
-
for (E && x.c.push(+
|
|
963
|
-
x.c.push(+
|
|
964
|
-
E = J - (
|
|
966
|
+
if (x.e = C, x.c = [], E = (C + 1) % J, C < 0 && (E += J), E < O) {
|
|
967
|
+
for (E && x.c.push(+N.slice(0, E)), O -= J; E < O; )
|
|
968
|
+
x.c.push(+N.slice(E, E += J));
|
|
969
|
+
E = J - (N = N.slice(E)).length;
|
|
965
970
|
} else
|
|
966
971
|
E -= O;
|
|
967
|
-
for (; E--;
|
|
968
|
-
x.c.push(+
|
|
972
|
+
for (; E--; N += "0") ;
|
|
973
|
+
x.c.push(+N);
|
|
969
974
|
}
|
|
970
975
|
} else
|
|
971
976
|
x.c = [x.e = 0];
|
|
@@ -1016,9 +1021,9 @@ function as(e) {
|
|
|
1016
1021
|
}, y.isBigNumber = function(m) {
|
|
1017
1022
|
if (!m || m._isBigNumber !== !0) return !1;
|
|
1018
1023
|
if (!y.DEBUG) return !0;
|
|
1019
|
-
var v, b, P = m.c, A = m.e,
|
|
1024
|
+
var v, b, P = m.c, A = m.e, C = m.s;
|
|
1020
1025
|
e: if ({}.toString.call(P) == "[object Array]") {
|
|
1021
|
-
if ((
|
|
1026
|
+
if ((C === 1 || C === -1) && A >= -we && A <= we && A === ze(A)) {
|
|
1022
1027
|
if (P[0] === 0) {
|
|
1023
1028
|
if (A === 0 && P.length === 1) return !0;
|
|
1024
1029
|
break e;
|
|
@@ -1029,7 +1034,7 @@ function as(e) {
|
|
|
1029
1034
|
if (b !== 0) return !0;
|
|
1030
1035
|
}
|
|
1031
1036
|
}
|
|
1032
|
-
} else if (P === null && A === null && (
|
|
1037
|
+
} else if (P === null && A === null && (C === null || C === 1 || C === -1))
|
|
1033
1038
|
return !0;
|
|
1034
1039
|
throw Error(Le + "Invalid BigNumber: " + m);
|
|
1035
1040
|
}, y.maximum = y.max = function() {
|
|
@@ -1043,91 +1048,91 @@ function as(e) {
|
|
|
1043
1048
|
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
|
|
1044
1049
|
};
|
|
1045
1050
|
return function(b) {
|
|
1046
|
-
var P, A,
|
|
1051
|
+
var P, A, C, E, S, O = 0, N = [], x = new y(i);
|
|
1047
1052
|
if (b == null ? b = l : pe(b, 0, we), E = lr(b / J), p)
|
|
1048
1053
|
if (crypto.getRandomValues) {
|
|
1049
1054
|
for (P = crypto.getRandomValues(new Uint32Array(E *= 2)); O < E; )
|
|
1050
|
-
S = P[O] * 131072 + (P[O + 1] >>> 11), S >= 9e15 ? (A = crypto.getRandomValues(new Uint32Array(2)), P[O] = A[0], P[O + 1] = A[1]) : (
|
|
1055
|
+
S = P[O] * 131072 + (P[O + 1] >>> 11), S >= 9e15 ? (A = crypto.getRandomValues(new Uint32Array(2)), P[O] = A[0], P[O + 1] = A[1]) : (N.push(S % 1e14), O += 2);
|
|
1051
1056
|
O = E / 2;
|
|
1052
1057
|
} else if (crypto.randomBytes) {
|
|
1053
1058
|
for (P = crypto.randomBytes(E *= 7); O < E; )
|
|
1054
|
-
S = (P[O] & 31) * 281474976710656 + P[O + 1] * 1099511627776 + P[O + 2] * 4294967296 + P[O + 3] * 16777216 + (P[O + 4] << 16) + (P[O + 5] << 8) + P[O + 6], S >= 9e15 ? crypto.randomBytes(7).copy(P, O) : (
|
|
1059
|
+
S = (P[O] & 31) * 281474976710656 + P[O + 1] * 1099511627776 + P[O + 2] * 4294967296 + P[O + 3] * 16777216 + (P[O + 4] << 16) + (P[O + 5] << 8) + P[O + 6], S >= 9e15 ? crypto.randomBytes(7).copy(P, O) : (N.push(S % 1e14), O += 7);
|
|
1055
1060
|
O = E / 7;
|
|
1056
1061
|
} else
|
|
1057
1062
|
throw p = !1, Error(Le + "crypto unavailable");
|
|
1058
1063
|
if (!p)
|
|
1059
1064
|
for (; O < E; )
|
|
1060
|
-
S = v(), S < 9e15 && (
|
|
1061
|
-
for (E =
|
|
1065
|
+
S = v(), S < 9e15 && (N[O++] = S % 1e14);
|
|
1066
|
+
for (E = N[--O], b %= J, E && b && (S = cr[J - b], N[O] = ze(E / S) * S); N[O] === 0; N.pop(), O--) ;
|
|
1062
1067
|
if (O < 0)
|
|
1063
|
-
|
|
1068
|
+
N = [C = 0];
|
|
1064
1069
|
else {
|
|
1065
|
-
for (
|
|
1066
|
-
for (O = 1, S =
|
|
1067
|
-
O < J && (
|
|
1070
|
+
for (C = -1; N[0] === 0; N.splice(0, 1), C -= J) ;
|
|
1071
|
+
for (O = 1, S = N[0]; S >= 10; S /= 10, O++) ;
|
|
1072
|
+
O < J && (C -= J - O);
|
|
1068
1073
|
}
|
|
1069
|
-
return x.e =
|
|
1074
|
+
return x.e = C, x.c = N, x;
|
|
1070
1075
|
};
|
|
1071
1076
|
}(), y.sum = function() {
|
|
1072
1077
|
for (var m = 1, v = arguments, b = new y(v[0]); m < v.length; ) b = b.plus(v[m++]);
|
|
1073
1078
|
return b;
|
|
1074
1079
|
}, n = /* @__PURE__ */ function() {
|
|
1075
1080
|
var m = "0123456789";
|
|
1076
|
-
function v(b, P, A,
|
|
1077
|
-
for (var E, S = [0], O,
|
|
1081
|
+
function v(b, P, A, C) {
|
|
1082
|
+
for (var E, S = [0], O, N = 0, x = b.length; N < x; ) {
|
|
1078
1083
|
for (O = S.length; O--; S[O] *= P) ;
|
|
1079
|
-
for (S[0] +=
|
|
1084
|
+
for (S[0] += C.indexOf(b.charAt(N++)), E = 0; E < S.length; E++)
|
|
1080
1085
|
S[E] > A - 1 && (S[E + 1] == null && (S[E + 1] = 0), S[E + 1] += S[E] / A | 0, S[E] %= A);
|
|
1081
1086
|
}
|
|
1082
1087
|
return S.reverse();
|
|
1083
1088
|
}
|
|
1084
|
-
return function(b, P, A,
|
|
1085
|
-
var S, O,
|
|
1089
|
+
return function(b, P, A, C, E) {
|
|
1090
|
+
var S, O, N, x, D, _, U, V, G = b.indexOf("."), q = l, W = c;
|
|
1086
1091
|
for (G >= 0 && (x = h, h = 0, b = b.replace(".", ""), V = new y(P), _ = V.pow(b.length - G), h = x, V.c = v(
|
|
1087
1092
|
pt(Ue(_.c), _.e, "0"),
|
|
1088
1093
|
10,
|
|
1089
1094
|
A,
|
|
1090
1095
|
m
|
|
1091
|
-
), V.e = V.c.length), U = v(b, P, A, E ? (S = w, m) : (S = m, w)),
|
|
1096
|
+
), V.e = V.c.length), U = v(b, P, A, E ? (S = w, m) : (S = m, w)), N = x = U.length; U[--x] == 0; U.pop()) ;
|
|
1092
1097
|
if (!U[0]) return S.charAt(0);
|
|
1093
|
-
if (G < 0 ? --
|
|
1098
|
+
if (G < 0 ? --N : (_.c = U, _.e = N, _.s = C, _ = t(_, V, q, W, A), U = _.c, D = _.r, N = _.e), O = N + q + 1, G = U[O], x = A / 2, D = D || O < 0 || U[O + 1] != null, D = W < 4 ? (G != null || D) && (W == 0 || W == (_.s < 0 ? 3 : 2)) : G > x || G == x && (W == 4 || D || W == 6 && U[O - 1] & 1 || W == (_.s < 0 ? 8 : 7)), O < 1 || !U[0])
|
|
1094
1099
|
b = D ? pt(S.charAt(1), -q, S.charAt(0)) : S.charAt(0);
|
|
1095
1100
|
else {
|
|
1096
1101
|
if (U.length = O, D)
|
|
1097
1102
|
for (--A; ++U[--O] > A; )
|
|
1098
|
-
U[O] = 0, O || (++
|
|
1103
|
+
U[O] = 0, O || (++N, U = [1].concat(U));
|
|
1099
1104
|
for (x = U.length; !U[--x]; ) ;
|
|
1100
1105
|
for (G = 0, b = ""; G <= x; b += S.charAt(U[G++])) ;
|
|
1101
|
-
b = pt(b,
|
|
1106
|
+
b = pt(b, N, S.charAt(0));
|
|
1102
1107
|
}
|
|
1103
1108
|
return b;
|
|
1104
1109
|
};
|
|
1105
1110
|
}(), t = /* @__PURE__ */ function() {
|
|
1106
|
-
function m(P, A,
|
|
1107
|
-
var E, S, O,
|
|
1111
|
+
function m(P, A, C) {
|
|
1112
|
+
var E, S, O, N, x = 0, D = P.length, _ = A % wt, U = A / wt | 0;
|
|
1108
1113
|
for (P = P.slice(); D--; )
|
|
1109
|
-
O = P[D] % wt,
|
|
1114
|
+
O = P[D] % wt, N = P[D] / wt | 0, E = U * O + N * _, S = _ * O + E % wt * wt + x, x = (S / C | 0) + (E / wt | 0) + U * N, P[D] = S % C;
|
|
1110
1115
|
return x && (P = [x].concat(P)), P;
|
|
1111
1116
|
}
|
|
1112
|
-
function v(P, A,
|
|
1117
|
+
function v(P, A, C, E) {
|
|
1113
1118
|
var S, O;
|
|
1114
|
-
if (
|
|
1115
|
-
O =
|
|
1119
|
+
if (C != E)
|
|
1120
|
+
O = C > E ? 1 : -1;
|
|
1116
1121
|
else
|
|
1117
|
-
for (S = O = 0; S <
|
|
1122
|
+
for (S = O = 0; S < C; S++)
|
|
1118
1123
|
if (P[S] != A[S]) {
|
|
1119
1124
|
O = P[S] > A[S] ? 1 : -1;
|
|
1120
1125
|
break;
|
|
1121
1126
|
}
|
|
1122
1127
|
return O;
|
|
1123
1128
|
}
|
|
1124
|
-
function b(P, A,
|
|
1125
|
-
for (var S = 0;
|
|
1126
|
-
P[
|
|
1129
|
+
function b(P, A, C, E) {
|
|
1130
|
+
for (var S = 0; C--; )
|
|
1131
|
+
P[C] -= S, S = P[C] < A[C] ? 1 : 0, P[C] = S * E + P[C] - A[C];
|
|
1127
1132
|
for (; !P[0] && P.length > 1; P.splice(0, 1)) ;
|
|
1128
1133
|
}
|
|
1129
|
-
return function(P, A,
|
|
1130
|
-
var O,
|
|
1134
|
+
return function(P, A, C, E, S) {
|
|
1135
|
+
var O, N, x, D, _, U, V, G, q, W, K, H, Z, fe, Ae, Pe, rt, Oe = P.s == A.s ? 1 : -1, xe = P.c, ce = A.c;
|
|
1131
1136
|
if (!xe || !xe[0] || !ce || !ce[0])
|
|
1132
1137
|
return new y(
|
|
1133
1138
|
// Return NaN if either NaN, or both Infinity or 0.
|
|
@@ -1136,8 +1141,8 @@ function as(e) {
|
|
|
1136
1141
|
xe && xe[0] == 0 || !ce ? Oe * 0 : Oe / 0
|
|
1137
1142
|
)
|
|
1138
1143
|
);
|
|
1139
|
-
for (G = new y(Oe), q = G.c = [],
|
|
1140
|
-
if (ce[x] > (xe[x] || 0) &&
|
|
1144
|
+
for (G = new y(Oe), q = G.c = [], N = P.e - A.e, Oe = C + N + 1, S || (S = Ze, N = He(P.e / J) - He(A.e / J), Oe = Oe / J | 0), x = 0; ce[x] == (xe[x] || 0); x++) ;
|
|
1145
|
+
if (ce[x] > (xe[x] || 0) && N--, Oe < 0)
|
|
1141
1146
|
q.push(1), D = !0;
|
|
1142
1147
|
else {
|
|
1143
1148
|
for (fe = xe.length, Pe = ce.length, x = 0, Oe += 2, _ = ze(S / (ce[0] + 1)), _ > 1 && (ce = m(ce, _, S), xe = m(xe, _, S), Pe = ce.length, fe = xe.length), Z = Pe, W = xe.slice(0, Pe), K = W.length; K < Pe; W[K++] = 0) ;
|
|
@@ -1159,30 +1164,30 @@ function as(e) {
|
|
|
1159
1164
|
}
|
|
1160
1165
|
if (S == Ze) {
|
|
1161
1166
|
for (x = 1, Oe = q[0]; Oe >= 10; Oe /= 10, x++) ;
|
|
1162
|
-
F(G,
|
|
1167
|
+
F(G, C + (G.e = x + N * J - 1) + 1, E, D);
|
|
1163
1168
|
} else
|
|
1164
|
-
G.e =
|
|
1169
|
+
G.e = N, G.r = +D;
|
|
1165
1170
|
return G;
|
|
1166
1171
|
};
|
|
1167
1172
|
}();
|
|
1168
1173
|
function T(m, v, b, P) {
|
|
1169
|
-
var A,
|
|
1174
|
+
var A, C, E, S, O;
|
|
1170
1175
|
if (b == null ? b = c : pe(b, 0, 8), !m.c) return m.toString();
|
|
1171
1176
|
if (A = m.c[0], E = m.e, v == null)
|
|
1172
1177
|
O = Ue(m.c), O = P == 1 || P == 2 && (E <= s || E >= a) ? vn(O, E) : pt(O, E, "0");
|
|
1173
|
-
else if (m = F(new y(m), v, b),
|
|
1178
|
+
else if (m = F(new y(m), v, b), C = m.e, O = Ue(m.c), S = O.length, P == 1 || P == 2 && (v <= C || C <= s)) {
|
|
1174
1179
|
for (; S < v; O += "0", S++) ;
|
|
1175
|
-
O = vn(O,
|
|
1176
|
-
} else if (v -= E + (P === 2 &&
|
|
1180
|
+
O = vn(O, C);
|
|
1181
|
+
} else if (v -= E + (P === 2 && C > E), O = pt(O, C, "0"), C + 1 > S) {
|
|
1177
1182
|
if (--v > 0) for (O += "."; v--; O += "0") ;
|
|
1178
|
-
} else if (v +=
|
|
1179
|
-
for (
|
|
1183
|
+
} else if (v += C - S, v > 0)
|
|
1184
|
+
for (C + 1 == S && (O += "."); v--; O += "0") ;
|
|
1180
1185
|
return m.s < 0 && A ? "-" + O : O;
|
|
1181
1186
|
}
|
|
1182
1187
|
function I(m, v) {
|
|
1183
|
-
for (var b, P, A = 1,
|
|
1184
|
-
P = new y(m[A]), (!P.s || (b = At(
|
|
1185
|
-
return
|
|
1188
|
+
for (var b, P, A = 1, C = new y(m[0]); A < m.length; A++)
|
|
1189
|
+
P = new y(m[A]), (!P.s || (b = At(C, P)) === v || b === 0 && C.s === v) && (C = P);
|
|
1190
|
+
return C;
|
|
1186
1191
|
}
|
|
1187
1192
|
function M(m, v, b) {
|
|
1188
1193
|
for (var P = 1, A = v.length; !v[--A]; v.pop()) ;
|
|
@@ -1191,57 +1196,57 @@ function as(e) {
|
|
|
1191
1196
|
}
|
|
1192
1197
|
r = /* @__PURE__ */ function() {
|
|
1193
1198
|
var m = /^(-?)0([xbo])(?=\w[\w.]*$)/i, v = /^([^.]+)\.$/, b = /^\.([^.]+)$/, P = /^-?(Infinity|NaN)$/, A = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
|
|
1194
|
-
return function(
|
|
1195
|
-
var
|
|
1199
|
+
return function(C, E, S, O) {
|
|
1200
|
+
var N, x = S ? E : E.replace(A, "");
|
|
1196
1201
|
if (P.test(x))
|
|
1197
|
-
|
|
1202
|
+
C.s = isNaN(x) ? null : x < 0 ? -1 : 1;
|
|
1198
1203
|
else {
|
|
1199
1204
|
if (!S && (x = x.replace(m, function(D, _, U) {
|
|
1200
|
-
return
|
|
1201
|
-
}), O && (
|
|
1202
|
-
return new y(x,
|
|
1205
|
+
return N = (U = U.toLowerCase()) == "x" ? 16 : U == "b" ? 2 : 8, !O || O == N ? _ : D;
|
|
1206
|
+
}), O && (N = O, x = x.replace(v, "$1").replace(b, "0.$1")), E != x))
|
|
1207
|
+
return new y(x, N);
|
|
1203
1208
|
if (y.DEBUG)
|
|
1204
1209
|
throw Error(Le + "Not a" + (O ? " base " + O : "") + " number: " + E);
|
|
1205
|
-
|
|
1210
|
+
C.s = null;
|
|
1206
1211
|
}
|
|
1207
|
-
|
|
1212
|
+
C.c = C.e = null;
|
|
1208
1213
|
};
|
|
1209
1214
|
}();
|
|
1210
1215
|
function F(m, v, b, P) {
|
|
1211
|
-
var A,
|
|
1216
|
+
var A, C, E, S, O, N, x, D = m.c, _ = cr;
|
|
1212
1217
|
if (D) {
|
|
1213
1218
|
e: {
|
|
1214
1219
|
for (A = 1, S = D[0]; S >= 10; S /= 10, A++) ;
|
|
1215
|
-
if (
|
|
1216
|
-
|
|
1217
|
-
else if (
|
|
1220
|
+
if (C = v - A, C < 0)
|
|
1221
|
+
C += J, E = v, O = D[N = 0], x = ze(O / _[A - E - 1] % 10);
|
|
1222
|
+
else if (N = lr((C + 1) / J), N >= D.length)
|
|
1218
1223
|
if (P) {
|
|
1219
|
-
for (; D.length <=
|
|
1220
|
-
O = x = 0, A = 1,
|
|
1224
|
+
for (; D.length <= N; D.push(0)) ;
|
|
1225
|
+
O = x = 0, A = 1, C %= J, E = C - J + 1;
|
|
1221
1226
|
} else
|
|
1222
1227
|
break e;
|
|
1223
1228
|
else {
|
|
1224
|
-
for (O = S = D[
|
|
1225
|
-
|
|
1229
|
+
for (O = S = D[N], A = 1; S >= 10; S /= 10, A++) ;
|
|
1230
|
+
C %= J, E = C - J + A, x = E < 0 ? 0 : ze(O / _[A - E - 1] % 10);
|
|
1226
1231
|
}
|
|
1227
1232
|
if (P = P || v < 0 || // Are there any non-zero digits after the rounding digit?
|
|
1228
1233
|
// The expression n % pows10[d - j - 1] returns all digits of n to the right
|
|
1229
1234
|
// of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
|
|
1230
|
-
D[
|
|
1231
|
-
(
|
|
1235
|
+
D[N + 1] != null || (E < 0 ? O : O % _[A - E - 1]), P = b < 4 ? (x || P) && (b == 0 || b == (m.s < 0 ? 3 : 2)) : x > 5 || x == 5 && (b == 4 || P || b == 6 && // Check whether the digit to the left of the rounding digit is odd.
|
|
1236
|
+
(C > 0 ? E > 0 ? O / _[A - E] : 0 : D[N - 1]) % 10 & 1 || b == (m.s < 0 ? 8 : 7)), v < 1 || !D[0])
|
|
1232
1237
|
return D.length = 0, P ? (v -= m.e + 1, D[0] = _[(J - v % J) % J], m.e = -v || 0) : D[0] = m.e = 0, m;
|
|
1233
|
-
if (
|
|
1238
|
+
if (C == 0 ? (D.length = N, S = 1, N--) : (D.length = N + 1, S = _[J - C], D[N] = E > 0 ? ze(O / _[A - E] % _[E]) * S : 0), P)
|
|
1234
1239
|
for (; ; )
|
|
1235
|
-
if (
|
|
1236
|
-
for (
|
|
1240
|
+
if (N == 0) {
|
|
1241
|
+
for (C = 1, E = D[0]; E >= 10; E /= 10, C++) ;
|
|
1237
1242
|
for (E = D[0] += S, S = 1; E >= 10; E /= 10, S++) ;
|
|
1238
|
-
|
|
1243
|
+
C != S && (m.e++, D[0] == Ze && (D[0] = 1));
|
|
1239
1244
|
break;
|
|
1240
1245
|
} else {
|
|
1241
|
-
if (D[
|
|
1242
|
-
D[
|
|
1246
|
+
if (D[N] += S, D[N] != Ze) break;
|
|
1247
|
+
D[N--] = 0, S = 1;
|
|
1243
1248
|
}
|
|
1244
|
-
for (
|
|
1249
|
+
for (C = D.length; D[--C] === 0; D.pop()) ;
|
|
1245
1250
|
}
|
|
1246
1251
|
m.e > d ? m.c = m.e = null : m.e < u && (m.c = [m.e = 0]);
|
|
1247
1252
|
}
|
|
@@ -1257,10 +1262,10 @@ function as(e) {
|
|
|
1257
1262
|
}, o.comparedTo = function(m, v) {
|
|
1258
1263
|
return At(this, new y(m, v));
|
|
1259
1264
|
}, o.decimalPlaces = o.dp = function(m, v) {
|
|
1260
|
-
var b, P, A,
|
|
1265
|
+
var b, P, A, C = this;
|
|
1261
1266
|
if (m != null)
|
|
1262
|
-
return pe(m, 0, we), v == null ? v = c : pe(v, 0, 8), F(new y(
|
|
1263
|
-
if (!(b =
|
|
1267
|
+
return pe(m, 0, we), v == null ? v = c : pe(v, 0, 8), F(new y(C), m + C.e + 1, v);
|
|
1268
|
+
if (!(b = C.c)) return null;
|
|
1264
1269
|
if (P = ((A = b.length - 1) - He(this.e / J)) * J, A = b[A]) for (; A % 10 == 0; A /= 10, P--) ;
|
|
1265
1270
|
return P < 0 && (P = 0), P;
|
|
1266
1271
|
}, o.dividedBy = o.div = function(m, v) {
|
|
@@ -1268,7 +1273,7 @@ function as(e) {
|
|
|
1268
1273
|
}, o.dividedToIntegerBy = o.idiv = function(m, v) {
|
|
1269
1274
|
return t(this, new y(m, v), 0, 1);
|
|
1270
1275
|
}, o.exponentiatedBy = o.pow = function(m, v) {
|
|
1271
|
-
var b, P, A,
|
|
1276
|
+
var b, P, A, C, E, S, O, N, x, D = this;
|
|
1272
1277
|
if (m = new y(m), m.c && !m.isInteger())
|
|
1273
1278
|
throw Error(Le + "Exponent not an integer: " + k(m));
|
|
1274
1279
|
if (v != null && (v = new y(v)), S = m.e > 14, !D.c || !D.c[0] || D.c[0] == 1 && !D.e && D.c.length == 1 || !m.c || !m.c[0])
|
|
@@ -1278,26 +1283,26 @@ function as(e) {
|
|
|
1278
1283
|
P = !O && D.isInteger() && v.isInteger(), P && (D = D.mod(v));
|
|
1279
1284
|
} else {
|
|
1280
1285
|
if (m.e > 9 && (D.e > 0 || D.e < -1 || (D.e == 0 ? D.c[0] > 1 || S && D.c[1] >= 24e7 : D.c[0] < 8e13 || S && D.c[0] <= 9999975e7)))
|
|
1281
|
-
return
|
|
1282
|
-
h && (
|
|
1286
|
+
return C = D.s < 0 && gn(m) ? -0 : 0, D.e > -1 && (C = 1 / C), new y(O ? 1 / C : C);
|
|
1287
|
+
h && (C = lr(h / J + 2));
|
|
1283
1288
|
}
|
|
1284
|
-
for (S ? (b = new y(0.5), O && (m.s = 1),
|
|
1285
|
-
if (
|
|
1289
|
+
for (S ? (b = new y(0.5), O && (m.s = 1), N = gn(m)) : (A = Math.abs(+k(m)), N = A % 2), x = new y(i); ; ) {
|
|
1290
|
+
if (N) {
|
|
1286
1291
|
if (x = x.times(D), !x.c) break;
|
|
1287
|
-
|
|
1292
|
+
C ? x.c.length > C && (x.c.length = C) : P && (x = x.mod(v));
|
|
1288
1293
|
}
|
|
1289
1294
|
if (A) {
|
|
1290
1295
|
if (A = ze(A / 2), A === 0) break;
|
|
1291
|
-
|
|
1296
|
+
N = A % 2;
|
|
1292
1297
|
} else if (m = m.times(b), F(m, m.e + 1, 1), m.e > 14)
|
|
1293
|
-
|
|
1298
|
+
N = gn(m);
|
|
1294
1299
|
else {
|
|
1295
1300
|
if (A = +k(m), A === 0) break;
|
|
1296
|
-
|
|
1301
|
+
N = A % 2;
|
|
1297
1302
|
}
|
|
1298
|
-
D = D.times(D),
|
|
1303
|
+
D = D.times(D), C ? D.c && D.c.length > C && (D.c.length = C) : P && (D = D.mod(v));
|
|
1299
1304
|
}
|
|
1300
|
-
return P ? x : (O && (x = i.div(x)), v ? x.mod(v) :
|
|
1305
|
+
return P ? x : (O && (x = i.div(x)), v ? x.mod(v) : C ? F(x, h, c, E) : x);
|
|
1301
1306
|
}, o.integerValue = function(m) {
|
|
1302
1307
|
var v = new y(this);
|
|
1303
1308
|
return m == null ? m = c : pe(m, 0, 8), F(v, v.e + 1, m);
|
|
@@ -1324,12 +1329,12 @@ function as(e) {
|
|
|
1324
1329
|
}, o.isZero = function() {
|
|
1325
1330
|
return !!this.c && this.c[0] == 0;
|
|
1326
1331
|
}, o.minus = function(m, v) {
|
|
1327
|
-
var b, P, A,
|
|
1332
|
+
var b, P, A, C, E = this, S = E.s;
|
|
1328
1333
|
if (m = new y(m, v), v = m.s, !S || !v) return new y(NaN);
|
|
1329
1334
|
if (S != v)
|
|
1330
1335
|
return m.s = -v, E.plus(m);
|
|
1331
|
-
var O = E.e / J,
|
|
1332
|
-
if (!O || !
|
|
1336
|
+
var O = E.e / J, N = m.e / J, x = E.c, D = m.c;
|
|
1337
|
+
if (!O || !N) {
|
|
1333
1338
|
if (!x || !D) return x ? (m.s = -v, m) : new y(D ? E : NaN);
|
|
1334
1339
|
if (!x[0] || !D[0])
|
|
1335
1340
|
return D[0] ? (m.s = -v, m) : new y(x[0] ? E : (
|
|
@@ -1337,16 +1342,16 @@ function as(e) {
|
|
|
1337
1342
|
c == 3 ? -0 : 0
|
|
1338
1343
|
));
|
|
1339
1344
|
}
|
|
1340
|
-
if (O = He(O),
|
|
1341
|
-
for ((
|
|
1345
|
+
if (O = He(O), N = He(N), x = x.slice(), S = O - N) {
|
|
1346
|
+
for ((C = S < 0) ? (S = -S, A = x) : (N = O, A = D), A.reverse(), v = S; v--; A.push(0)) ;
|
|
1342
1347
|
A.reverse();
|
|
1343
1348
|
} else
|
|
1344
|
-
for (P = (
|
|
1349
|
+
for (P = (C = (S = x.length) < (v = D.length)) ? S : v, S = v = 0; v < P; v++)
|
|
1345
1350
|
if (x[v] != D[v]) {
|
|
1346
|
-
|
|
1351
|
+
C = x[v] < D[v];
|
|
1347
1352
|
break;
|
|
1348
1353
|
}
|
|
1349
|
-
if (
|
|
1354
|
+
if (C && (A = x, x = D, D = A, m.s = -m.s), v = (P = D.length) - (b = x.length), v > 0) for (; v--; x[b++] = 0) ;
|
|
1350
1355
|
for (v = Ze - 1; P > S; ) {
|
|
1351
1356
|
if (x[--P] < D[P]) {
|
|
1352
1357
|
for (b = P; b && !x[--b]; x[b] = v) ;
|
|
@@ -1354,20 +1359,20 @@ function as(e) {
|
|
|
1354
1359
|
}
|
|
1355
1360
|
x[P] -= D[P];
|
|
1356
1361
|
}
|
|
1357
|
-
for (; x[0] == 0; x.splice(0, 1), --
|
|
1358
|
-
return x[0] ? M(m, x,
|
|
1362
|
+
for (; x[0] == 0; x.splice(0, 1), --N) ;
|
|
1363
|
+
return x[0] ? M(m, x, N) : (m.s = c == 3 ? -1 : 1, m.c = [m.e = 0], m);
|
|
1359
1364
|
}, o.modulo = o.mod = function(m, v) {
|
|
1360
1365
|
var b, P, A = this;
|
|
1361
1366
|
return m = new y(m, v), !A.c || !m.s || m.c && !m.c[0] ? new y(NaN) : !m.c || A.c && !A.c[0] ? new y(A) : (f == 9 ? (P = m.s, m.s = 1, b = t(A, m, 0, 3), m.s = P, b.s *= P) : b = t(A, m, 0, f), m = A.minus(b.times(m)), !m.c[0] && f == 1 && (m.s = A.s), m);
|
|
1362
1367
|
}, o.multipliedBy = o.times = function(m, v) {
|
|
1363
|
-
var b, P, A,
|
|
1368
|
+
var b, P, A, C, E, S, O, N, x, D, _, U, V, G, q, W = this, K = W.c, H = (m = new y(m, v)).c;
|
|
1364
1369
|
if (!K || !H || !K[0] || !H[0])
|
|
1365
1370
|
return !W.s || !m.s || K && !K[0] && !H || H && !H[0] && !K ? m.c = m.e = m.s = null : (m.s *= W.s, !K || !H ? m.c = m.e = null : (m.c = [0], m.e = 0)), m;
|
|
1366
1371
|
for (P = He(W.e / J) + He(m.e / J), m.s *= W.s, O = K.length, D = H.length, O < D && (V = K, K = H, H = V, A = O, O = D, D = A), A = O + D, V = []; A--; V.push(0)) ;
|
|
1367
1372
|
for (G = Ze, q = wt, A = D; --A >= 0; ) {
|
|
1368
|
-
for (b = 0, _ = H[A] % q, U = H[A] / q | 0, E = O,
|
|
1369
|
-
|
|
1370
|
-
V[
|
|
1373
|
+
for (b = 0, _ = H[A] % q, U = H[A] / q | 0, E = O, C = A + E; C > A; )
|
|
1374
|
+
N = K[--E] % q, x = K[E] / q | 0, S = U * N + x * _, N = _ * N + S % q * q + V[C] + b, b = (N / G | 0) + (S / q | 0) + U * x, V[C--] = N % G;
|
|
1375
|
+
V[C] = b;
|
|
1371
1376
|
}
|
|
1372
1377
|
return b ? ++P : V.splice(0, 1), M(m, V, P);
|
|
1373
1378
|
}, o.negated = function() {
|
|
@@ -1378,45 +1383,45 @@ function as(e) {
|
|
|
1378
1383
|
if (m = new y(m, v), v = m.s, !A || !v) return new y(NaN);
|
|
1379
1384
|
if (A != v)
|
|
1380
1385
|
return m.s = -v, P.minus(m);
|
|
1381
|
-
var
|
|
1382
|
-
if (!
|
|
1386
|
+
var C = P.e / J, E = m.e / J, S = P.c, O = m.c;
|
|
1387
|
+
if (!C || !E) {
|
|
1383
1388
|
if (!S || !O) return new y(A / 0);
|
|
1384
1389
|
if (!S[0] || !O[0]) return O[0] ? m : new y(S[0] ? P : A * 0);
|
|
1385
1390
|
}
|
|
1386
|
-
if (
|
|
1387
|
-
for (A > 0 ? (E =
|
|
1391
|
+
if (C = He(C), E = He(E), S = S.slice(), A = C - E) {
|
|
1392
|
+
for (A > 0 ? (E = C, b = O) : (A = -A, b = S), b.reverse(); A--; b.push(0)) ;
|
|
1388
1393
|
b.reverse();
|
|
1389
1394
|
}
|
|
1390
1395
|
for (A = S.length, v = O.length, A - v < 0 && (b = O, O = S, S = b, v = A), A = 0; v; )
|
|
1391
1396
|
A = (S[--v] = S[v] + O[v] + A) / Ze | 0, S[v] = Ze === S[v] ? 0 : S[v] % Ze;
|
|
1392
1397
|
return A && (S = [A].concat(S), ++E), M(m, S, E);
|
|
1393
1398
|
}, o.precision = o.sd = function(m, v) {
|
|
1394
|
-
var b, P, A,
|
|
1399
|
+
var b, P, A, C = this;
|
|
1395
1400
|
if (m != null && m !== !!m)
|
|
1396
|
-
return pe(m, 1, we), v == null ? v = c : pe(v, 0, 8), F(new y(
|
|
1397
|
-
if (!(b =
|
|
1401
|
+
return pe(m, 1, we), v == null ? v = c : pe(v, 0, 8), F(new y(C), m, v);
|
|
1402
|
+
if (!(b = C.c)) return null;
|
|
1398
1403
|
if (A = b.length - 1, P = A * J + 1, A = b[A]) {
|
|
1399
1404
|
for (; A % 10 == 0; A /= 10, P--) ;
|
|
1400
1405
|
for (A = b[0]; A >= 10; A /= 10, P++) ;
|
|
1401
1406
|
}
|
|
1402
|
-
return m &&
|
|
1407
|
+
return m && C.e + 1 > P && (P = C.e + 1), P;
|
|
1403
1408
|
}, o.shiftedBy = function(m) {
|
|
1404
1409
|
return pe(m, -ar, ar), this.times("1e" + m);
|
|
1405
1410
|
}, o.squareRoot = o.sqrt = function() {
|
|
1406
|
-
var m, v, b, P, A,
|
|
1411
|
+
var m, v, b, P, A, C = this, E = C.c, S = C.s, O = C.e, N = l + 4, x = new y("0.5");
|
|
1407
1412
|
if (S !== 1 || !E || !E[0])
|
|
1408
|
-
return new y(!S || S < 0 && (!E || E[0]) ? NaN : E ?
|
|
1409
|
-
if (S = Math.sqrt(+k(
|
|
1410
|
-
for (O = b.e, S = O +
|
|
1411
|
-
if (A = b, b = x.times(A.plus(t(
|
|
1413
|
+
return new y(!S || S < 0 && (!E || E[0]) ? NaN : E ? C : 1 / 0);
|
|
1414
|
+
if (S = Math.sqrt(+k(C)), S == 0 || S == 1 / 0 ? (v = Ue(E), (v.length + O) % 2 == 0 && (v += "0"), S = Math.sqrt(+v), O = He((O + 1) / 2) - (O < 0 || O % 2), S == 1 / 0 ? v = "5e" + O : (v = S.toExponential(), v = v.slice(0, v.indexOf("e") + 1) + O), b = new y(v)) : b = new y(S + ""), b.c[0]) {
|
|
1415
|
+
for (O = b.e, S = O + N, S < 3 && (S = 0); ; )
|
|
1416
|
+
if (A = b, b = x.times(A.plus(t(C, A, N, 1))), Ue(A.c).slice(0, S) === (v = Ue(b.c)).slice(0, S))
|
|
1412
1417
|
if (b.e < O && --S, v = v.slice(S - 3, S + 1), v == "9999" || !P && v == "4999") {
|
|
1413
|
-
if (!P && (F(A, A.e + l + 2, 0), A.times(A).eq(
|
|
1418
|
+
if (!P && (F(A, A.e + l + 2, 0), A.times(A).eq(C))) {
|
|
1414
1419
|
b = A;
|
|
1415
1420
|
break;
|
|
1416
1421
|
}
|
|
1417
|
-
|
|
1422
|
+
N += 4, S += 4, P = 1;
|
|
1418
1423
|
} else {
|
|
1419
|
-
(!+v || !+v.slice(1) && v.charAt(0) == "5") && (F(b, b.e + l + 2, 1), m = !b.times(b).eq(
|
|
1424
|
+
(!+v || !+v.slice(1) && v.charAt(0) == "5") && (F(b, b.e + l + 2, 1), m = !b.times(b).eq(C));
|
|
1420
1425
|
break;
|
|
1421
1426
|
}
|
|
1422
1427
|
}
|
|
@@ -1432,10 +1437,10 @@ function as(e) {
|
|
|
1432
1437
|
else if (typeof b != "object")
|
|
1433
1438
|
throw Error(Le + "Argument not an object: " + b);
|
|
1434
1439
|
if (P = A.toFixed(m, v), A.c) {
|
|
1435
|
-
var
|
|
1436
|
-
if (O && (
|
|
1437
|
-
for (
|
|
1438
|
-
O > 0 && (x +=
|
|
1440
|
+
var C, E = P.split("."), S = +b.groupSize, O = +b.secondaryGroupSize, N = b.groupSeparator || "", x = E[0], D = E[1], _ = A.s < 0, U = _ ? x.slice(1) : x, V = U.length;
|
|
1441
|
+
if (O && (C = S, S = O, O = C, V -= C), S > 0 && V > 0) {
|
|
1442
|
+
for (C = V % S || S, x = U.substr(0, C); C < V; C += S) x += N + U.substr(C, S);
|
|
1443
|
+
O > 0 && (x += N + U.slice(C)), _ && (x = "-" + x);
|
|
1439
1444
|
}
|
|
1440
1445
|
P = D ? x + (b.decimalSeparator || "") + ((O = +b.fractionGroupSize) ? D.replace(
|
|
1441
1446
|
new RegExp("\\d{" + O + "}\\B", "g"),
|
|
@@ -1444,15 +1449,15 @@ function as(e) {
|
|
|
1444
1449
|
}
|
|
1445
1450
|
return (b.prefix || "") + P + (b.suffix || "");
|
|
1446
1451
|
}, o.toFraction = function(m) {
|
|
1447
|
-
var v, b, P, A,
|
|
1452
|
+
var v, b, P, A, C, E, S, O, N, x, D, _, U = this, V = U.c;
|
|
1448
1453
|
if (m != null && (S = new y(m), !S.isInteger() && (S.c || S.s !== 1) || S.lt(i)))
|
|
1449
1454
|
throw Error(Le + "Argument " + (S.isInteger() ? "out of range: " : "not an integer: ") + k(S));
|
|
1450
1455
|
if (!V) return new y(U);
|
|
1451
|
-
for (v = new y(i),
|
|
1452
|
-
b = P, P = A,
|
|
1453
|
-
return A = t(m.minus(b), P, 0, 1), O = O.plus(A.times(
|
|
1454
|
-
t(O, b,
|
|
1455
|
-
) < 1 ? [
|
|
1456
|
+
for (v = new y(i), N = b = new y(i), P = O = new y(i), _ = Ue(V), C = v.e = _.length - U.e - 1, v.c[0] = cr[(E = C % J) < 0 ? J + E : E], m = !m || S.comparedTo(v) > 0 ? C > 0 ? v : N : S, E = d, d = 1 / 0, S = new y(_), O.c[0] = 0; x = t(S, v, 0, 1), A = b.plus(x.times(P)), A.comparedTo(m) != 1; )
|
|
1457
|
+
b = P, P = A, N = O.plus(x.times(A = N)), O = A, v = S.minus(x.times(A = v)), S = A;
|
|
1458
|
+
return A = t(m.minus(b), P, 0, 1), O = O.plus(A.times(N)), b = b.plus(A.times(P)), O.s = N.s = U.s, C = C * 2, D = t(N, P, C, c).minus(U).abs().comparedTo(
|
|
1459
|
+
t(O, b, C, c).minus(U).abs()
|
|
1460
|
+
) < 1 ? [N, P] : [O, b], d = E, D;
|
|
1456
1461
|
}, o.toNumber = function() {
|
|
1457
1462
|
return +k(this);
|
|
1458
1463
|
}, o.toPrecision = function(m, v) {
|
|
@@ -1878,10 +1883,10 @@ function ec(e) {
|
|
|
1878
1883
|
return r == null ? void 0 : r(...n);
|
|
1879
1884
|
}, []);
|
|
1880
1885
|
}
|
|
1881
|
-
const
|
|
1886
|
+
const Ct = (e) => {
|
|
1882
1887
|
var t;
|
|
1883
1888
|
return (t = e == null ? void 0 : e.ownerDocument) !== null && t !== void 0 ? t : document;
|
|
1884
|
-
}, Pt = (e) => e && "window" in e && e.window === e ? e :
|
|
1889
|
+
}, Pt = (e) => e && "window" in e && e.window === e ? e : Ct(e).defaultView || window;
|
|
1885
1890
|
function tc(e) {
|
|
1886
1891
|
return e !== null && typeof e == "object" && "nodeType" in e && typeof e.nodeType == "number";
|
|
1887
1892
|
}
|
|
@@ -2073,7 +2078,7 @@ function ws() {
|
|
|
2073
2078
|
}
|
|
2074
2079
|
function Ir(e) {
|
|
2075
2080
|
if (typeof window > "u" || typeof document > "u" || nn.get(Pt(e))) return;
|
|
2076
|
-
const t = Pt(e), n =
|
|
2081
|
+
const t = Pt(e), n = Ct(e);
|
|
2077
2082
|
let r = t.HTMLElement.prototype.focus;
|
|
2078
2083
|
t.HTMLElement.prototype.focus = function() {
|
|
2079
2084
|
Lt = !0, r.apply(this, arguments);
|
|
@@ -2086,11 +2091,11 @@ function Ir(e) {
|
|
|
2086
2091
|
});
|
|
2087
2092
|
}
|
|
2088
2093
|
const Es = (e, t) => {
|
|
2089
|
-
const n = Pt(e), r =
|
|
2094
|
+
const n = Pt(e), r = Ct(e);
|
|
2090
2095
|
t && r.removeEventListener("DOMContentLoaded", t), nn.has(n) && (n.HTMLElement.prototype.focus = nn.get(n).focus, r.removeEventListener("keydown", Pn, !0), r.removeEventListener("keyup", Pn, !0), r.removeEventListener("click", xs, !0), n.removeEventListener("focus", ys, !0), n.removeEventListener("blur", ws, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", Ye, !0), r.removeEventListener("pointermove", Ye, !0), r.removeEventListener("pointerup", Ye, !0)) : process.env.NODE_ENV === "test" && (r.removeEventListener("mousedown", Ye, !0), r.removeEventListener("mousemove", Ye, !0), r.removeEventListener("mouseup", Ye, !0)), nn.delete(n));
|
|
2091
2096
|
};
|
|
2092
2097
|
function mc(e) {
|
|
2093
|
-
const t =
|
|
2098
|
+
const t = Ct(e);
|
|
2094
2099
|
let n;
|
|
2095
2100
|
return t.readyState !== "loading" ? Ir(e) : (n = () => {
|
|
2096
2101
|
Ir(e);
|
|
@@ -2112,7 +2117,7 @@ const hc = /* @__PURE__ */ new Set([
|
|
|
2112
2117
|
"reset"
|
|
2113
2118
|
]);
|
|
2114
2119
|
function gc(e, t, n) {
|
|
2115
|
-
let r =
|
|
2120
|
+
let r = Ct(n == null ? void 0 : n.target);
|
|
2116
2121
|
const o = typeof window < "u" ? Pt(n == null ? void 0 : n.target).HTMLInputElement : HTMLInputElement, i = typeof window < "u" ? Pt(n == null ? void 0 : n.target).HTMLTextAreaElement : HTMLTextAreaElement, l = typeof window < "u" ? Pt(n == null ? void 0 : n.target).HTMLElement : HTMLElement, c = typeof window < "u" ? Pt(n == null ? void 0 : n.target).KeyboardEvent : KeyboardEvent;
|
|
2117
2122
|
return e = e || r.activeElement instanceof o && !hc.has(r.activeElement.type) || r.activeElement instanceof i || r.activeElement instanceof l && r.activeElement.isContentEditable, !(e && t === "keyboard" && n instanceof c && !dc[n.key]);
|
|
2118
2123
|
}
|
|
@@ -2135,7 +2140,7 @@ function bc(e) {
|
|
|
2135
2140
|
r,
|
|
2136
2141
|
o
|
|
2137
2142
|
]), l = bs(i), c = X((s) => {
|
|
2138
|
-
const a =
|
|
2143
|
+
const a = Ct(s.target), u = a ? $r(a) : $r();
|
|
2139
2144
|
s.target === s.currentTarget && u === hs(s.nativeEvent) && (n && n(s), o && o(!0), l(s));
|
|
2140
2145
|
}, [
|
|
2141
2146
|
o,
|
|
@@ -2161,7 +2166,7 @@ function xc(e) {
|
|
|
2161
2166
|
c
|
|
2162
2167
|
]), a = bs(s), u = X((d) => {
|
|
2163
2168
|
if (!d.currentTarget.contains(d.target)) return;
|
|
2164
|
-
const p =
|
|
2169
|
+
const p = Ct(d.target), f = $r(p);
|
|
2165
2170
|
if (!i.current.isFocusWithin && f === hs(d.nativeEvent)) {
|
|
2166
2171
|
r && r(d), o && o(!0), i.current.isFocusWithin = !0, a(d);
|
|
2167
2172
|
let h = d.currentTarget;
|
|
@@ -2226,7 +2231,7 @@ function wc(e) {
|
|
|
2226
2231
|
if (c.pointerType = w, o || w === "touch" || c.isHovered || !g.currentTarget.contains(g.target)) return;
|
|
2227
2232
|
c.isHovered = !0;
|
|
2228
2233
|
let L = g.currentTarget;
|
|
2229
|
-
c.target = L, s(
|
|
2234
|
+
c.target = L, s(Ct(g.target), "pointerover", (y) => {
|
|
2230
2235
|
c.isHovered && c.target && !ms(c.target, y.target) && f(y, y.pointerType);
|
|
2231
2236
|
}, {
|
|
2232
2237
|
capture: !0
|
|
@@ -2400,10 +2405,10 @@ function Tc(e) {
|
|
|
2400
2405
|
let t = e.width / 2, n = e.height / 2;
|
|
2401
2406
|
return { top: e.clientY - n, right: e.clientX + t, bottom: e.clientY + n, left: e.clientX - t };
|
|
2402
2407
|
}
|
|
2403
|
-
function
|
|
2408
|
+
function Cc(e, t) {
|
|
2404
2409
|
return !(!e || !t || e.right < t.left || e.left > t.right || e.bottom < t.top || e.top > t.bottom);
|
|
2405
2410
|
}
|
|
2406
|
-
function
|
|
2411
|
+
function Nc({ disabled: e = !1 } = {}) {
|
|
2407
2412
|
let t = ee(null), [n, r] = te(!1), o = Gt(), i = ie(() => {
|
|
2408
2413
|
t.current = null, r(!1), o.dispose();
|
|
2409
2414
|
}), l = ie((c) => {
|
|
@@ -2414,7 +2419,7 @@ function Cc({ disabled: e = !1 } = {}) {
|
|
|
2414
2419
|
o.addEventListener(s, "pointerup", i, !1), o.addEventListener(s, "pointermove", (a) => {
|
|
2415
2420
|
if (t.current) {
|
|
2416
2421
|
let u = Tc(a);
|
|
2417
|
-
r(
|
|
2422
|
+
r(Cc(u, t.current.getBoundingClientRect()));
|
|
2418
2423
|
}
|
|
2419
2424
|
}, !1), o.addEventListener(s, "pointercancel", i, !1);
|
|
2420
2425
|
}
|
|
@@ -2473,7 +2478,7 @@ function xn(e, t = {}, n, r, o) {
|
|
|
2473
2478
|
for (let h of f) d[`data-${h}`] = "";
|
|
2474
2479
|
}
|
|
2475
2480
|
}
|
|
2476
|
-
if (i === ke && (Object.keys(Et(s)).length > 0 || Object.keys(Et(d)).length > 0)) if (!
|
|
2481
|
+
if (i === ke && (Object.keys(Et(s)).length > 0 || Object.keys(Et(d)).length > 0)) if (!Na(u) || Array.isArray(u) && u.length > 1) {
|
|
2477
2482
|
if (Object.keys(Et(s)).length > 0) throw new Error(['Passing props on "Fragment"!', "", `The current component <${r} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(Et(s)).concat(Object.keys(Et(d))).map((p) => ` - ${p}`).join(`
|
|
2478
2483
|
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".', "Render a single element as the child so that we can forward the props onto that element."].map((p) => ` - ${p}`).join(`
|
|
2479
2484
|
`)].join(`
|
|
@@ -2552,16 +2557,16 @@ function Mc(e) {
|
|
|
2552
2557
|
let [t] = te(e);
|
|
2553
2558
|
return t;
|
|
2554
2559
|
}
|
|
2555
|
-
function
|
|
2556
|
-
for (let [r, o] of Object.entries(e)) As(n,
|
|
2560
|
+
function Cs(e = {}, t = null, n = []) {
|
|
2561
|
+
for (let [r, o] of Object.entries(e)) As(n, Ns(t, r), o);
|
|
2557
2562
|
return n;
|
|
2558
2563
|
}
|
|
2559
|
-
function
|
|
2564
|
+
function Ns(e, t) {
|
|
2560
2565
|
return e ? e + "[" + t + "]" : t;
|
|
2561
2566
|
}
|
|
2562
2567
|
function As(e, t, n) {
|
|
2563
|
-
if (Array.isArray(n)) for (let [r, o] of n.entries()) As(e,
|
|
2564
|
-
else n instanceof Date ? e.push([t, n.toISOString()]) : typeof n == "boolean" ? e.push([t, n ? "1" : "0"]) : typeof n == "string" ? e.push([t, n]) : typeof n == "number" ? e.push([t, `${n}`]) : n == null ? e.push([t, ""]) :
|
|
2568
|
+
if (Array.isArray(n)) for (let [r, o] of n.entries()) As(e, Ns(t, r.toString()), o);
|
|
2569
|
+
else n instanceof Date ? e.push([t, n.toISOString()]) : typeof n == "boolean" ? e.push([t, n ? "1" : "0"]) : typeof n == "string" ? e.push([t, n]) : typeof n == "number" ? e.push([t, `${n}`]) : n == null ? e.push([t, ""]) : Cs(n, t, e);
|
|
2565
2570
|
}
|
|
2566
2571
|
function jc(e) {
|
|
2567
2572
|
var t, n;
|
|
@@ -2592,7 +2597,7 @@ function Bc({ data: e, form: t, disabled: n, onReset: r, overrides: o }) {
|
|
|
2592
2597
|
let [i, l] = te(null), c = Gt();
|
|
2593
2598
|
return ye(() => {
|
|
2594
2599
|
if (r && i) return c.addEventListener(i, "reset", r);
|
|
2595
|
-
}, [i, t, r]), z.createElement(Wc, null, z.createElement(Uc, { setForm: l, formId: t }),
|
|
2600
|
+
}, [i, t, r]), z.createElement(Wc, null, z.createElement(Uc, { setForm: l, formId: t }), Cs(e).map(([s, a]) => z.createElement(Ps, { features: fo.Hidden, ...Et({ key: s, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: t, disabled: n, name: s, value: a, ...o }) })));
|
|
2596
2601
|
}
|
|
2597
2602
|
function Uc({ setForm: e, formId: t }) {
|
|
2598
2603
|
return ye(() => {
|
|
@@ -3083,16 +3088,16 @@ function Gs(e, t = 0) {
|
|
|
3083
3088
|
return !1;
|
|
3084
3089
|
} });
|
|
3085
3090
|
}
|
|
3086
|
-
var
|
|
3091
|
+
var Cu = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(Cu || {});
|
|
3087
3092
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
|
|
3088
3093
|
e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
3089
3094
|
}, !0), document.addEventListener("click", (e) => {
|
|
3090
3095
|
e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
3091
3096
|
}, !0));
|
|
3092
|
-
let
|
|
3097
|
+
let Nu = ["textarea", "input"].join(",");
|
|
3093
3098
|
function Au(e) {
|
|
3094
3099
|
var t, n;
|
|
3095
|
-
return (n = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e,
|
|
3100
|
+
return (n = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, Nu)) != null ? n : !1;
|
|
3096
3101
|
}
|
|
3097
3102
|
function Ys(e, t = (n) => n) {
|
|
3098
3103
|
return e.slice().sort((n, r) => {
|
|
@@ -3434,7 +3439,7 @@ function vo(e) {
|
|
|
3434
3439
|
function le(e) {
|
|
3435
3440
|
return Hn() ? e instanceof Element || e instanceof Ie(e).Element : !1;
|
|
3436
3441
|
}
|
|
3437
|
-
function
|
|
3442
|
+
function Ne(e) {
|
|
3438
3443
|
return Hn() ? e instanceof HTMLElement || e instanceof Ie(e).HTMLElement : !1;
|
|
3439
3444
|
}
|
|
3440
3445
|
function Ur(e) {
|
|
@@ -3471,7 +3476,7 @@ function bo(e) {
|
|
|
3471
3476
|
}
|
|
3472
3477
|
function lf(e) {
|
|
3473
3478
|
let t = vt(e);
|
|
3474
|
-
for (;
|
|
3479
|
+
for (; Ne(t) && !gt(t); ) {
|
|
3475
3480
|
if (bo(t))
|
|
3476
3481
|
return t;
|
|
3477
3482
|
if (Gn(t))
|
|
@@ -3513,7 +3518,7 @@ function vt(e) {
|
|
|
3513
3518
|
}
|
|
3514
3519
|
function Qs(e) {
|
|
3515
3520
|
const t = vt(e);
|
|
3516
|
-
return gt(t) ? e.ownerDocument ? e.ownerDocument.body : e.body :
|
|
3521
|
+
return gt(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Ne(t) && dn(t) ? t : Qs(t);
|
|
3517
3522
|
}
|
|
3518
3523
|
function Ot(e, t, n) {
|
|
3519
3524
|
var r;
|
|
@@ -3708,12 +3713,12 @@ var yf = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
3708
3713
|
return t.tagName === "INPUT";
|
|
3709
3714
|
}, Tf = function(t) {
|
|
3710
3715
|
return rl(t) && t.type === "hidden";
|
|
3711
|
-
},
|
|
3716
|
+
}, Cf = function(t) {
|
|
3712
3717
|
var n = t.tagName === "DETAILS" && Array.prototype.slice.apply(t.children).some(function(r) {
|
|
3713
3718
|
return r.tagName === "SUMMARY";
|
|
3714
3719
|
});
|
|
3715
3720
|
return n;
|
|
3716
|
-
},
|
|
3721
|
+
}, Nf = function(t, n) {
|
|
3717
3722
|
for (var r = 0; r < t.length; r++)
|
|
3718
3723
|
if (t[r].checked && t[r].form === n)
|
|
3719
3724
|
return t[r];
|
|
@@ -3731,7 +3736,7 @@ var yf = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
3731
3736
|
} catch (l) {
|
|
3732
3737
|
return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", l.message), !1;
|
|
3733
3738
|
}
|
|
3734
|
-
var i =
|
|
3739
|
+
var i = Nf(o, t.form);
|
|
3735
3740
|
return !i || i === t;
|
|
3736
3741
|
}, Pf = function(t) {
|
|
3737
3742
|
return rl(t) && t.type === "radio";
|
|
@@ -3793,7 +3798,7 @@ var yf = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
3793
3798
|
// because we're limited in the type of selectors we can use in JSDom (see related
|
|
3794
3799
|
// note related to `candidateSelectors`)
|
|
3795
3800
|
jn(n) || Tf(n) || Df(n, t) || // For a details element with a summary, the summary element gets the focus
|
|
3796
|
-
|
|
3801
|
+
Cf(n) || If(n));
|
|
3797
3802
|
}, Ei = function(t, n) {
|
|
3798
3803
|
return !($f(n) || nl(n) < 0 || !Mf(t, n));
|
|
3799
3804
|
}, jf = function(t) {
|
|
@@ -4001,14 +4006,14 @@ const kf = (e) => ({
|
|
|
4001
4006
|
}, f = yo(o), h = xo(f), g = await l.getDimensions(a), w = f === "y", L = w ? "top" : "left", y = w ? "bottom" : "right", T = w ? "clientHeight" : "clientWidth", I = i.reference[h] + i.reference[f] - p[f] - i.floating[h], M = p[f] - i.reference[f], F = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(a));
|
|
4002
4007
|
let k = F ? F[T] : 0;
|
|
4003
4008
|
(!k || !await (l.isElement == null ? void 0 : l.isElement(F))) && (k = c.floating[T] || i.floating[h]);
|
|
4004
|
-
const m = I / 2 - M / 2, v = k / 2 - g[h] / 2 - 1, b = bt(d[L], v), P = bt(d[y], v), A = b,
|
|
4009
|
+
const m = I / 2 - M / 2, v = k / 2 - g[h] / 2 - 1, b = bt(d[L], v), P = bt(d[y], v), A = b, C = k - g[h] - P, E = k / 2 - g[h] / 2 + m, S = zr(A, E, C), O = !s.arrow && Kt(o) != null && E !== S && i.reference[h] / 2 - (E < A ? b : P) - g[h] / 2 < 0, N = O ? E < A ? E - A : E - C : 0;
|
|
4005
4010
|
return {
|
|
4006
|
-
[f]: p[f] +
|
|
4011
|
+
[f]: p[f] + N,
|
|
4007
4012
|
data: {
|
|
4008
4013
|
[f]: S,
|
|
4009
|
-
centerOffset: E - S -
|
|
4014
|
+
centerOffset: E - S - N,
|
|
4010
4015
|
...O && {
|
|
4011
|
-
alignmentOffset:
|
|
4016
|
+
alignmentOffset: N
|
|
4012
4017
|
}
|
|
4013
4018
|
},
|
|
4014
4019
|
reset: O
|
|
@@ -4064,12 +4069,12 @@ const kf = (e) => ({
|
|
|
4064
4069
|
placement: S
|
|
4065
4070
|
}
|
|
4066
4071
|
};
|
|
4067
|
-
let O = (A = b.filter((
|
|
4072
|
+
let O = (A = b.filter((N) => N.overflows[0] <= 0).sort((N, x) => N.overflows[1] - x.overflows[1])[0]) == null ? void 0 : A.placement;
|
|
4068
4073
|
if (!O)
|
|
4069
4074
|
switch (f) {
|
|
4070
4075
|
case "bestFit": {
|
|
4071
|
-
var
|
|
4072
|
-
const
|
|
4076
|
+
var C;
|
|
4077
|
+
const N = (C = b.filter((x) => {
|
|
4073
4078
|
if (F) {
|
|
4074
4079
|
const D = ht(x.placement);
|
|
4075
4080
|
return D === y || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -4077,8 +4082,8 @@ const kf = (e) => ({
|
|
|
4077
4082
|
D === "y";
|
|
4078
4083
|
}
|
|
4079
4084
|
return !0;
|
|
4080
|
-
}).map((x) => [x.placement, x.overflows.filter((D) => D > 0).reduce((D, _) => D + _, 0)]).sort((x, D) => x[1] - D[1])[0]) == null ? void 0 :
|
|
4081
|
-
|
|
4085
|
+
}).map((x) => [x.placement, x.overflows.filter((D) => D > 0).reduce((D, _) => D + _, 0)]).sort((x, D) => x[1] - D[1])[0]) == null ? void 0 : C[0];
|
|
4086
|
+
N && (O = N);
|
|
4082
4087
|
break;
|
|
4083
4088
|
}
|
|
4084
4089
|
case "initialPlacement":
|
|
@@ -4225,8 +4230,8 @@ const Vf = function(e) {
|
|
|
4225
4230
|
const y = g - u.top - u.bottom, T = h - u.left - u.right, I = bt(g - u[w], y), M = bt(h - u[L], T), F = !t.middlewareData.shift;
|
|
4226
4231
|
let k = I, m = M;
|
|
4227
4232
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (m = T), (r = t.middlewareData.shift) != null && r.enabled.y && (k = y), F && !p) {
|
|
4228
|
-
const b = Te(u.left, 0), P = Te(u.right, 0), A = Te(u.top, 0),
|
|
4229
|
-
f ? m = h - 2 * (b !== 0 || P !== 0 ? b + P : Te(u.left, u.right)) : k = g - 2 * (A !== 0 ||
|
|
4233
|
+
const b = Te(u.left, 0), P = Te(u.right, 0), A = Te(u.top, 0), C = Te(u.bottom, 0);
|
|
4234
|
+
f ? m = h - 2 * (b !== 0 || P !== 0 ? b + P : Te(u.left, u.right)) : k = g - 2 * (A !== 0 || C !== 0 ? A + C : Te(u.top, u.bottom));
|
|
4230
4235
|
}
|
|
4231
4236
|
await s({
|
|
4232
4237
|
...t,
|
|
@@ -4245,7 +4250,7 @@ const Vf = function(e) {
|
|
|
4245
4250
|
function il(e) {
|
|
4246
4251
|
const t = Qe(e);
|
|
4247
4252
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
4248
|
-
const o =
|
|
4253
|
+
const o = Ne(e), i = o ? e.offsetWidth : n, l = o ? e.offsetHeight : r, c = sn(n) !== i || sn(r) !== l;
|
|
4249
4254
|
return c && (n = i, r = l), {
|
|
4250
4255
|
width: n,
|
|
4251
4256
|
height: r,
|
|
@@ -4257,7 +4262,7 @@ function wo(e) {
|
|
|
4257
4262
|
}
|
|
4258
4263
|
function zt(e) {
|
|
4259
4264
|
const t = wo(e);
|
|
4260
|
-
if (!
|
|
4265
|
+
if (!Ne(t))
|
|
4261
4266
|
return ct(1);
|
|
4262
4267
|
const n = t.getBoundingClientRect(), {
|
|
4263
4268
|
width: r,
|
|
@@ -4328,8 +4333,8 @@ function Kf(e) {
|
|
|
4328
4333
|
scrollLeft: 0,
|
|
4329
4334
|
scrollTop: 0
|
|
4330
4335
|
}, a = ct(1);
|
|
4331
|
-
const u = ct(0), d =
|
|
4332
|
-
if ((d || !d && !i) && ((Yt(r) !== "body" || dn(l)) && (s = Kn(r)),
|
|
4336
|
+
const u = ct(0), d = Ne(r);
|
|
4337
|
+
if ((d || !d && !i) && ((Yt(r) !== "body" || dn(l)) && (s = Kn(r)), Ne(r))) {
|
|
4333
4338
|
const f = Dt(r);
|
|
4334
4339
|
a = zt(r), u.x = f.x + r.clientLeft, u.y = f.y + r.clientTop;
|
|
4335
4340
|
}
|
|
@@ -4378,7 +4383,7 @@ function Qf(e, t) {
|
|
|
4378
4383
|
}
|
|
4379
4384
|
const Jf = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
4380
4385
|
function Zf(e, t) {
|
|
4381
|
-
const n = Dt(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i =
|
|
4386
|
+
const n = Dt(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = Ne(e) ? zt(e) : ct(1), l = e.clientWidth * i.x, c = e.clientHeight * i.y, s = o * i.x, a = r * i.y;
|
|
4382
4387
|
return {
|
|
4383
4388
|
width: l,
|
|
4384
4389
|
height: c,
|
|
@@ -4451,7 +4456,7 @@ function nd(e) {
|
|
|
4451
4456
|
};
|
|
4452
4457
|
}
|
|
4453
4458
|
function rd(e, t, n) {
|
|
4454
|
-
const r =
|
|
4459
|
+
const r = Ne(t), o = dt(t), i = n === "fixed", l = Dt(e, !0, i, t);
|
|
4455
4460
|
let c = {
|
|
4456
4461
|
scrollLeft: 0,
|
|
4457
4462
|
scrollTop: 0
|
|
@@ -4478,7 +4483,7 @@ function br(e) {
|
|
|
4478
4483
|
return Qe(e).position === "static";
|
|
4479
4484
|
}
|
|
4480
4485
|
function Ti(e, t) {
|
|
4481
|
-
if (!
|
|
4486
|
+
if (!Ne(e) || Qe(e).position === "fixed")
|
|
4482
4487
|
return null;
|
|
4483
4488
|
if (t)
|
|
4484
4489
|
return t(e);
|
|
@@ -4489,7 +4494,7 @@ function cl(e, t) {
|
|
|
4489
4494
|
const n = Ie(e);
|
|
4490
4495
|
if (Gn(e))
|
|
4491
4496
|
return n;
|
|
4492
|
-
if (!
|
|
4497
|
+
if (!Ne(e)) {
|
|
4493
4498
|
let o = vt(e);
|
|
4494
4499
|
for (; o && !gt(o); ) {
|
|
4495
4500
|
if (le(o) && !br(o))
|
|
@@ -4615,7 +4620,7 @@ function fl(e, t, n, r) {
|
|
|
4615
4620
|
}), d == null || d(), (L = f) == null || L.disconnect(), f = null, s && cancelAnimationFrame(h);
|
|
4616
4621
|
};
|
|
4617
4622
|
}
|
|
4618
|
-
const xr = qn, ad = Vf, cd = zf, ud = Wf, fd = Hf,
|
|
4623
|
+
const xr = qn, ad = Vf, cd = zf, ud = Wf, fd = Hf, Ci = kf, dd = (e, t, n) => {
|
|
4619
4624
|
const r = /* @__PURE__ */ new Map(), o = {
|
|
4620
4625
|
platform: sd,
|
|
4621
4626
|
...n
|
|
@@ -4663,7 +4668,7 @@ function Fn(e, t) {
|
|
|
4663
4668
|
function dl(e) {
|
|
4664
4669
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
4665
4670
|
}
|
|
4666
|
-
function
|
|
4671
|
+
function Ni(e, t) {
|
|
4667
4672
|
const n = dl(e);
|
|
4668
4673
|
return Math.round(t * n) / n;
|
|
4669
4674
|
}
|
|
@@ -4700,7 +4705,7 @@ function pl(e) {
|
|
|
4700
4705
|
x !== F.current && (F.current = x, g(x));
|
|
4701
4706
|
}, []), T = j.useCallback((x) => {
|
|
4702
4707
|
x !== k.current && (k.current = x, L(x));
|
|
4703
|
-
}, []), I = i || h, M = l || w, F = j.useRef(null), k = j.useRef(null), m = j.useRef(u), v = s != null, b = yr(s), P = yr(o), A = yr(a),
|
|
4708
|
+
}, []), I = i || h, M = l || w, F = j.useRef(null), k = j.useRef(null), m = j.useRef(u), v = s != null, b = yr(s), P = yr(o), A = yr(a), C = j.useCallback(() => {
|
|
4704
4709
|
if (!F.current || !k.current)
|
|
4705
4710
|
return;
|
|
4706
4711
|
const x = {
|
|
@@ -4734,10 +4739,10 @@ function pl(e) {
|
|
|
4734
4739
|
}), []), Tn(() => {
|
|
4735
4740
|
if (I && (F.current = I), M && (k.current = M), I && M) {
|
|
4736
4741
|
if (b.current)
|
|
4737
|
-
return b.current(I, M,
|
|
4738
|
-
|
|
4742
|
+
return b.current(I, M, C);
|
|
4743
|
+
C();
|
|
4739
4744
|
}
|
|
4740
|
-
}, [I, M,
|
|
4745
|
+
}, [I, M, C, b, v]);
|
|
4741
4746
|
const S = j.useMemo(() => ({
|
|
4742
4747
|
reference: F,
|
|
4743
4748
|
floating: k,
|
|
@@ -4746,7 +4751,7 @@ function pl(e) {
|
|
|
4746
4751
|
}), [y, T]), O = j.useMemo(() => ({
|
|
4747
4752
|
reference: I,
|
|
4748
4753
|
floating: M
|
|
4749
|
-
}), [I, M]),
|
|
4754
|
+
}), [I, M]), N = j.useMemo(() => {
|
|
4750
4755
|
const x = {
|
|
4751
4756
|
position: n,
|
|
4752
4757
|
left: 0,
|
|
@@ -4754,7 +4759,7 @@ function pl(e) {
|
|
|
4754
4759
|
};
|
|
4755
4760
|
if (!O.floating)
|
|
4756
4761
|
return x;
|
|
4757
|
-
const D =
|
|
4762
|
+
const D = Ni(O.floating, u.x), _ = Ni(O.floating, u.y);
|
|
4758
4763
|
return c ? {
|
|
4759
4764
|
...x,
|
|
4760
4765
|
transform: "translate(" + D + "px, " + _ + "px)",
|
|
@@ -4769,11 +4774,11 @@ function pl(e) {
|
|
|
4769
4774
|
}, [n, c, O.floating, u.x, u.y]);
|
|
4770
4775
|
return j.useMemo(() => ({
|
|
4771
4776
|
...u,
|
|
4772
|
-
update:
|
|
4777
|
+
update: C,
|
|
4773
4778
|
refs: S,
|
|
4774
4779
|
elements: O,
|
|
4775
|
-
floatingStyles:
|
|
4776
|
-
}), [u,
|
|
4780
|
+
floatingStyles: N
|
|
4781
|
+
}), [u, C, S, O, N]);
|
|
4777
4782
|
}
|
|
4778
4783
|
const hd = (e) => {
|
|
4779
4784
|
function t(n) {
|
|
@@ -4787,10 +4792,10 @@ const hd = (e) => {
|
|
|
4787
4792
|
element: r,
|
|
4788
4793
|
padding: o
|
|
4789
4794
|
} = typeof e == "function" ? e(n) : e;
|
|
4790
|
-
return r && t(r) ? r.current != null ?
|
|
4795
|
+
return r && t(r) ? r.current != null ? Ci({
|
|
4791
4796
|
element: r.current,
|
|
4792
4797
|
padding: o
|
|
4793
|
-
}).fn(n) : {} : r ?
|
|
4798
|
+
}).fn(n) : {} : r ? Ci({
|
|
4794
4799
|
element: r,
|
|
4795
4800
|
padding: o
|
|
4796
4801
|
}).fn(n) : {};
|
|
@@ -4879,10 +4884,10 @@ function Td() {
|
|
|
4879
4884
|
}
|
|
4880
4885
|
};
|
|
4881
4886
|
}
|
|
4882
|
-
const
|
|
4887
|
+
const Cd = /* @__PURE__ */ j.createContext(null), Nd = /* @__PURE__ */ j.createContext(null), Ad = () => {
|
|
4883
4888
|
var e;
|
|
4884
|
-
return ((e = j.useContext(
|
|
4885
|
-
}, Pd = () => j.useContext(
|
|
4889
|
+
return ((e = j.useContext(Cd)) == null ? void 0 : e.id) || null;
|
|
4890
|
+
}, Pd = () => j.useContext(Nd), $d = "data-floating-ui-focusable";
|
|
4886
4891
|
function Ld(e) {
|
|
4887
4892
|
const {
|
|
4888
4893
|
open: t = !1,
|
|
@@ -5186,25 +5191,25 @@ function Ud({ children: e, enabled: t = !0 }) {
|
|
|
5186
5191
|
a && i(0);
|
|
5187
5192
|
}, [a]);
|
|
5188
5193
|
let { refs: L, floatingStyles: y, context: T } = Dd({ open: a, placement: g === "selection" ? w === "center" ? "bottom" : `bottom-${w}` : w === "center" ? `${g}` : `${g}-${w}`, strategy: "absolute", transform: !1, middleware: [Eo({ mainAxis: g === "selection" ? 0 : d, crossAxis: p }), ml({ padding: f }), g !== "selection" && hl({ padding: f }), g === "selection" && h ? Md({ ...h, padding: f, overflowRef: l, offset: o, minItemsVisible: Ii, referenceOverflowThreshold: f, onFallbackChange(P) {
|
|
5189
|
-
var A,
|
|
5194
|
+
var A, C;
|
|
5190
5195
|
if (!P) return;
|
|
5191
5196
|
let E = T.elements.floating;
|
|
5192
5197
|
if (!E) return;
|
|
5193
|
-
let S = parseFloat(getComputedStyle(E).scrollPaddingBottom) || 0, O = Math.min(Ii, E.childElementCount),
|
|
5194
|
-
for (let D of (
|
|
5198
|
+
let S = parseFloat(getComputedStyle(E).scrollPaddingBottom) || 0, O = Math.min(Ii, E.childElementCount), N = 0, x = 0;
|
|
5199
|
+
for (let D of (C = (A = T.elements.floating) == null ? void 0 : A.childNodes) != null ? C : []) if (yt(D)) {
|
|
5195
5200
|
let _ = D.offsetTop, U = _ + D.clientHeight + S, V = E.scrollTop, G = V + E.clientHeight;
|
|
5196
5201
|
if (_ >= V && U <= G) O--;
|
|
5197
5202
|
else {
|
|
5198
|
-
x = Math.max(0, Math.min(U, G) - Math.max(_, V)),
|
|
5203
|
+
x = Math.max(0, Math.min(U, G) - Math.max(_, V)), N = D.clientHeight;
|
|
5199
5204
|
break;
|
|
5200
5205
|
}
|
|
5201
5206
|
}
|
|
5202
5207
|
O >= 1 && i((D) => {
|
|
5203
|
-
let _ =
|
|
5208
|
+
let _ = N * O - x + S;
|
|
5204
5209
|
return D >= _ ? D : _;
|
|
5205
5210
|
});
|
|
5206
|
-
} }) : null, gd({ padding: f, apply({ availableWidth: P, availableHeight: A, elements:
|
|
5207
|
-
Object.assign(
|
|
5211
|
+
} }) : null, gd({ padding: f, apply({ availableWidth: P, availableHeight: A, elements: C }) {
|
|
5212
|
+
Object.assign(C.floating.style, { overflow: "auto", maxWidth: `${P}px`, maxHeight: `min(var(--anchor-max-height, 100vh), ${A}px)` });
|
|
5208
5213
|
} })].filter(Boolean), whileElementsMounted: fl }), [I = g, M = w] = T.placement.split("-");
|
|
5209
5214
|
g === "selection" && (I = "selection");
|
|
5210
5215
|
let F = re(() => ({ anchor: [I, M].filter(Boolean).join(" ") }), [I, M]), k = jd(T, { overflowRef: l, onChange: i }), { getReferenceProps: m, getFloatingProps: v } = Id([k]), b = ie((P) => {
|
|
@@ -5457,24 +5462,24 @@ function Ol(e, t) {
|
|
|
5457
5462
|
});
|
|
5458
5463
|
return re(() => ({ children: r, register: c, unregister: l, onStart: d, onStop: p, wait: a, chains: u }), [c, l, r, d, p, u, a]);
|
|
5459
5464
|
}
|
|
5460
|
-
let Tl = ke,
|
|
5465
|
+
let Tl = ke, Cl = Ln.RenderStrategy;
|
|
5461
5466
|
function cp(e, t) {
|
|
5462
5467
|
var n, r;
|
|
5463
|
-
let { transition: o = !0, beforeEnter: i, afterEnter: l, beforeLeave: c, afterLeave: s, enter: a, enterFrom: u, enterTo: d, entered: p, leave: f, leaveFrom: h, leaveTo: g, ...w } = e, [L, y] = te(null), T = ee(null), I = Sl(e), M = Je(...I ? [T, t, y] : t === null ? [] : [t]), F = (n = w.unmount) == null || n ? Rt.Unmount : Rt.Hidden, { show: k, appear: m, initial: v } = lp(), [b, P] = te(k ? "visible" : "hidden"), A = ap(), { register:
|
|
5464
|
-
de(() =>
|
|
5468
|
+
let { transition: o = !0, beforeEnter: i, afterEnter: l, beforeLeave: c, afterLeave: s, enter: a, enterFrom: u, enterTo: d, entered: p, leave: f, leaveFrom: h, leaveTo: g, ...w } = e, [L, y] = te(null), T = ee(null), I = Sl(e), M = Je(...I ? [T, t, y] : t === null ? [] : [t]), F = (n = w.unmount) == null || n ? Rt.Unmount : Rt.Hidden, { show: k, appear: m, initial: v } = lp(), [b, P] = te(k ? "visible" : "hidden"), A = ap(), { register: C, unregister: E } = A;
|
|
5469
|
+
de(() => C(T), [C, T]), de(() => {
|
|
5465
5470
|
if (F === Rt.Hidden && T.current) {
|
|
5466
5471
|
if (k && b !== "visible") {
|
|
5467
5472
|
P("visible");
|
|
5468
5473
|
return;
|
|
5469
5474
|
}
|
|
5470
|
-
return Xe(b, { hidden: () => E(T), visible: () =>
|
|
5475
|
+
return Xe(b, { hidden: () => E(T), visible: () => C(T) });
|
|
5471
5476
|
}
|
|
5472
|
-
}, [b, T,
|
|
5477
|
+
}, [b, T, C, E, k, F]);
|
|
5473
5478
|
let S = To();
|
|
5474
5479
|
de(() => {
|
|
5475
5480
|
if (I && S && b === "visible" && T.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
5476
5481
|
}, [T, b, S, I]);
|
|
5477
|
-
let O = v && !m,
|
|
5482
|
+
let O = v && !m, N = m && k && v, x = ee(!1), D = Ol(() => {
|
|
5478
5483
|
x.current || (P("hidden"), E(T));
|
|
5479
5484
|
}, A), _ = ie((H) => {
|
|
5480
5485
|
x.current = !0;
|
|
@@ -5491,10 +5496,10 @@ function cp(e, t) {
|
|
|
5491
5496
|
ye(() => {
|
|
5492
5497
|
I && o || (_(k), U(k));
|
|
5493
5498
|
}, [k, I, o]);
|
|
5494
|
-
let V = !(!o || !I || !S || O), [, G] = Xs(V, L, k, { start: _, end: U }), q = Et({ ref: M, className: ((r = jr(w.className,
|
|
5499
|
+
let V = !(!o || !I || !S || O), [, G] = Xs(V, L, k, { start: _, end: U }), q = Et({ ref: M, className: ((r = jr(w.className, N && a, N && u, G.enter && a, G.enter && G.closed && u, G.enter && !G.closed && d, G.leave && f, G.leave && !G.closed && h, G.leave && G.closed && g, !G.transition && k && p)) == null ? void 0 : r.trim()) || void 0, ...qs(G) }), W = 0;
|
|
5495
5500
|
b === "visible" && (W |= tt.Open), b === "hidden" && (W |= tt.Closed), k && b === "hidden" && (W |= tt.Opening), !k && b === "visible" && (W |= tt.Closing);
|
|
5496
5501
|
let K = We();
|
|
5497
|
-
return z.createElement(Jn.Provider, { value: D }, z.createElement(xl, { value: W }, K({ ourProps: q, theirProps: w, defaultTag: Tl, features:
|
|
5502
|
+
return z.createElement(Jn.Provider, { value: D }, z.createElement(xl, { value: W }, K({ ourProps: q, theirProps: w, defaultTag: Tl, features: Cl, visible: b === "visible", name: "Transition.Child" })));
|
|
5498
5503
|
}
|
|
5499
5504
|
function up(e, t) {
|
|
5500
5505
|
let { show: n, appear: r = !1, unmount: o = !0, ...i } = e, l = ee(null), c = Sl(e), s = Je(...c ? [l, t] : t === null ? [] : [t]);
|
|
@@ -5518,13 +5523,13 @@ function up(e, t) {
|
|
|
5518
5523
|
var M;
|
|
5519
5524
|
f && h(!1), (M = e.beforeLeave) == null || M.call(e);
|
|
5520
5525
|
}), I = We();
|
|
5521
|
-
return z.createElement(Jn.Provider, { value: p }, z.createElement(Qn.Provider, { value: w }, I({ ourProps: { ...L, as: ke, children: z.createElement(
|
|
5526
|
+
return z.createElement(Jn.Provider, { value: p }, z.createElement(Qn.Provider, { value: w }, I({ ourProps: { ...L, as: ke, children: z.createElement(Nl, { ref: s, ...L, ...i, beforeEnter: y, beforeLeave: T }) }, theirProps: {}, defaultTag: ke, features: Cl, visible: u === "visible", name: "Transition" })));
|
|
5522
5527
|
}
|
|
5523
5528
|
function fp(e, t) {
|
|
5524
5529
|
let n = he(Qn) !== null, r = Oo() !== null;
|
|
5525
|
-
return z.createElement(z.Fragment, null, !n && r ? z.createElement(Kr, { ref: t, ...e }) : z.createElement(
|
|
5530
|
+
return z.createElement(z.Fragment, null, !n && r ? z.createElement(Kr, { ref: t, ...e }) : z.createElement(Nl, { ref: t, ...e }));
|
|
5526
5531
|
}
|
|
5527
|
-
let Kr = Fe(up),
|
|
5532
|
+
let Kr = Fe(up), Nl = Fe(cp), dp = Fe(fp), Al = Object.assign(Kr, { Child: dp, Root: Kr });
|
|
5528
5533
|
function pp(e, t) {
|
|
5529
5534
|
let n = ee({ left: 0, top: 0 });
|
|
5530
5535
|
if (de(() => {
|
|
@@ -5573,7 +5578,7 @@ function hp(e) {
|
|
|
5573
5578
|
return t.current = o, n.current = i, i;
|
|
5574
5579
|
});
|
|
5575
5580
|
}
|
|
5576
|
-
var gp = Object.defineProperty, vp = (e, t, n) => t in e ? gp(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, _i = (e, t, n) => (vp(e, typeof t != "symbol" ? t + "" : t, n), n), Re = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Re || {}), st = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(st || {}),
|
|
5581
|
+
var gp = Object.defineProperty, vp = (e, t, n) => t in e ? gp(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, _i = (e, t, n) => (vp(e, typeof t != "symbol" ? t + "" : t, n), n), Re = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Re || {}), st = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(st || {}), Cn = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(Cn || {}), Pl = ((e) => (e[e.OpenListbox = 0] = "OpenListbox", e[e.CloseListbox = 1] = "CloseListbox", e[e.GoToOption = 2] = "GoToOption", e[e.Search = 3] = "Search", e[e.ClearSearch = 4] = "ClearSearch", e[e.RegisterOptions = 5] = "RegisterOptions", e[e.UnregisterOptions = 6] = "UnregisterOptions", e[e.SetButtonElement = 7] = "SetButtonElement", e[e.SetOptionsElement = 8] = "SetOptionsElement", e[e.SortOptions = 9] = "SortOptions", e))(Pl || {});
|
|
5577
5582
|
function ki(e, t = (n) => n) {
|
|
5578
5583
|
let n = e.activeOptionIndex !== null ? e.options[e.activeOptionIndex] : null, r = Ys(t(e.options.slice()), (i) => i.dataRef.current.domRef.current), o = n ? r.indexOf(n) : null;
|
|
5579
5584
|
return o === -1 && (o = null), { options: r, activeOptionIndex: o };
|
|
@@ -5639,7 +5644,7 @@ let bp = { 1(e) {
|
|
|
5639
5644
|
}
|
|
5640
5645
|
return { ...e, options: n, activationTrigger: 1 };
|
|
5641
5646
|
}, 7: (e, t) => e.buttonElement === t.element ? e : { ...e, buttonElement: t.element }, 8: (e, t) => e.optionsElement === t.element ? e : { ...e, optionsElement: t.element }, 9: (e) => e.pendingShouldSort ? { ...e, ...ki(e), pendingShouldSort: !1 } : e };
|
|
5642
|
-
class
|
|
5647
|
+
class Co extends Ws {
|
|
5643
5648
|
constructor(t) {
|
|
5644
5649
|
super(t), _i(this, "actions", { onChange: (n) => {
|
|
5645
5650
|
let { onChange: r, compare: o, mode: i, value: l } = this.state.dataRef.current;
|
|
@@ -5705,14 +5710,14 @@ class No extends Ws {
|
|
|
5705
5710
|
}
|
|
5706
5711
|
}
|
|
5707
5712
|
static new({ id: t, __demoMode: n = !1 }) {
|
|
5708
|
-
return new
|
|
5713
|
+
return new Co({ id: t, dataRef: { current: {} }, listboxState: n ? 0 : 1, options: [], searchQuery: "", activeOptionIndex: null, activationTrigger: 1, buttonElement: null, optionsElement: null, pendingShouldSort: !1, pendingFocus: { focus: me.Nothing }, __demoMode: n });
|
|
5709
5714
|
}
|
|
5710
5715
|
reduce(t, n) {
|
|
5711
5716
|
return Xe(n.type, bp, t, n);
|
|
5712
5717
|
}
|
|
5713
5718
|
}
|
|
5714
5719
|
const $l = Se(null);
|
|
5715
|
-
function
|
|
5720
|
+
function No(e) {
|
|
5716
5721
|
let t = he($l);
|
|
5717
5722
|
if (t === null) {
|
|
5718
5723
|
let n = new Error(`<${e} /> is missing a parent <Listbox /> component.`);
|
|
@@ -5721,7 +5726,7 @@ function Co(e) {
|
|
|
5721
5726
|
return t;
|
|
5722
5727
|
}
|
|
5723
5728
|
function Ll({ id: e, __demoMode: t = !1 }) {
|
|
5724
|
-
let n = re(() =>
|
|
5729
|
+
let n = re(() => Co.new({ id: e, __demoMode: t }), []);
|
|
5725
5730
|
return wl(() => n.dispose()), n;
|
|
5726
5731
|
}
|
|
5727
5732
|
let er = Se(null);
|
|
@@ -5742,18 +5747,18 @@ function yp(e, t) {
|
|
|
5742
5747
|
de(() => {
|
|
5743
5748
|
M.state.dataRef.current = b;
|
|
5744
5749
|
}, [b]);
|
|
5745
|
-
let P = qe(M, (V) => V.listboxState), A = ho.get(null),
|
|
5746
|
-
Iu(
|
|
5750
|
+
let P = qe(M, (V) => V.listboxState), A = ho.get(null), C = qe(A, X((V) => A.selectors.isTop(V, n), [A, n])), [E, S] = qe(M, (V) => [V.buttonElement, V.optionsElement]);
|
|
5751
|
+
Iu(C, [E, S], (V, G) => {
|
|
5747
5752
|
M.send({ type: Pl.CloseListbox }), Gs(G, go.Loose) || (V.preventDefault(), E == null || E.focus());
|
|
5748
5753
|
});
|
|
5749
|
-
let O = re(() => ({ open: P === Re.Open, disabled: d, invalid: u, value: T }), [P, d, u, T]), [
|
|
5754
|
+
let O = re(() => ({ open: P === Re.Open, disabled: d, invalid: u, value: T }), [P, d, u, T]), [N, x] = tu({ inherit: !0 }), D = { ref: L }, _ = X(() => {
|
|
5750
5755
|
if (y !== void 0) return I == null ? void 0 : I(y);
|
|
5751
5756
|
}, [I, y]), U = We();
|
|
5752
|
-
return z.createElement(x, { value:
|
|
5757
|
+
return z.createElement(x, { value: N, props: { htmlFor: E == null ? void 0 : E.id }, slot: { open: P === Re.Open, disabled: d } }, z.createElement(Ud, null, z.createElement($l.Provider, { value: M }, z.createElement(er.Provider, { value: b }, z.createElement(xl, { value: Xe(P, { [Re.Open]: tt.Open, [Re.Closed]: tt.Closed }) }, c != null && T != null && z.createElement(Bc, { disabled: d, data: { [c]: T }, form: l, onReset: _ }), U({ ourProps: D, theirProps: g, slot: O, defaultTag: xp, name: "Listbox" }))))));
|
|
5753
5758
|
}
|
|
5754
5759
|
let wp = "button";
|
|
5755
5760
|
function Ep(e, t) {
|
|
5756
|
-
let n = Mt(), r = $s(), o = pn("Listbox.Button"), i =
|
|
5761
|
+
let n = Mt(), r = $s(), o = pn("Listbox.Button"), i = No("Listbox.Button"), { id: l = r || `headlessui-listbox-button-${n}`, disabled: c = o.disabled || !1, autoFocus: s = !1, ...a } = e, u = Je(t, _d(), i.actions.setButtonElement), d = kd(), [p, f, h] = qe(i, (x) => [x.listboxState, x.buttonElement, x.optionsElement]), g = p === Re.Open;
|
|
5757
5762
|
Fu(g, { trigger: f, action: X((x) => {
|
|
5758
5763
|
if (f != null && f.contains(x.target)) return yn.Ignore;
|
|
5759
5764
|
let D = x.target.closest('[role="option"]:not([data-disabled])');
|
|
@@ -5788,30 +5793,30 @@ function Ep(e, t) {
|
|
|
5788
5793
|
T.current = x.pointerType, x.pointerType === "mouse" && y(x);
|
|
5789
5794
|
}), M = ie((x) => {
|
|
5790
5795
|
T.current !== "mouse" && y(x);
|
|
5791
|
-
}), F = ie((x) => x.preventDefault()), k = Fs([l]), m = Qc(), { isFocusVisible: v, focusProps: b } = Ec({ autoFocus: s }), { isHovered: P, hoverProps: A } = wc({ isDisabled: c }), { pressed:
|
|
5792
|
-
return We()({ ourProps:
|
|
5796
|
+
}), F = ie((x) => x.preventDefault()), k = Fs([l]), m = Qc(), { isFocusVisible: v, focusProps: b } = Ec({ autoFocus: s }), { isHovered: P, hoverProps: A } = wc({ isDisabled: c }), { pressed: C, pressProps: E } = Nc({ disabled: c }), S = re(() => ({ open: p === Re.Open, active: C || p === Re.Open, disabled: c, invalid: o.invalid, value: o.value, hover: P, focus: v, autofocus: s }), [p, o.value, c, P, v, C, o.invalid, s]), O = qe(i, (x) => x.listboxState === Re.Open), N = Ts(d(), { ref: u, id: l, type: _u(e, f), "aria-haspopup": "listbox", "aria-controls": h == null ? void 0 : h.id, "aria-expanded": O, "aria-labelledby": k, "aria-describedby": m, disabled: c || void 0, autoFocus: s, onKeyDown: w, onKeyUp: L, onKeyPress: F, onPointerDown: I, onClick: M }, b, A, E);
|
|
5797
|
+
return We()({ ourProps: N, theirProps: a, slot: S, defaultTag: wp, name: "Listbox.Button" });
|
|
5793
5798
|
}
|
|
5794
5799
|
let Dl = Se(!1), Rp = "div", Sp = Ln.RenderStrategy | Ln.Static;
|
|
5795
5800
|
function Op(e, t) {
|
|
5796
5801
|
let n = Mt(), { id: r = `headlessui-listbox-options-${n}`, anchor: o, portal: i = !1, modal: l = !0, transition: c = !1, ...s } = e, a = Fd(o), [u, d] = te(null);
|
|
5797
5802
|
a && (i = !0);
|
|
5798
|
-
let p = pn("Listbox.Options"), f =
|
|
5803
|
+
let p = pn("Listbox.Options"), f = No("Listbox.Options"), [h, g, w, L] = qe(f, (H) => [H.listboxState, H.buttonElement, H.optionsElement, H.__demoMode]), y = Br(g), T = Br(w), I = Oo(), [M, F] = Xs(c, u, I !== null ? (I & tt.Open) === tt.Open : h === Re.Open);
|
|
5799
5804
|
Eu(M, g, f.actions.closeListbox);
|
|
5800
5805
|
let k = L ? !1 : l && h === Re.Open;
|
|
5801
5806
|
Gu(k, T);
|
|
5802
5807
|
let m = L ? !1 : l && h === Re.Open;
|
|
5803
5808
|
wu(m, { allowed: X(() => [g, w], [g, w]) });
|
|
5804
|
-
let v = h !== Re.Open, b = pp(v, g) ? !1 : M, P = M && h === Re.Closed, A = Hd(P, p.value),
|
|
5809
|
+
let v = h !== Re.Open, b = pp(v, g) ? !1 : M, P = M && h === Re.Closed, A = Hd(P, p.value), C = ie((H) => p.compare(A, H)), E = qe(f, (H) => {
|
|
5805
5810
|
var Z;
|
|
5806
5811
|
if (a == null || !((Z = a == null ? void 0 : a.to) != null && Z.includes("selection"))) return null;
|
|
5807
|
-
let fe = H.options.findIndex((Ae) =>
|
|
5812
|
+
let fe = H.options.findIndex((Ae) => C(Ae.dataRef.current.value));
|
|
5808
5813
|
return fe === -1 && (fe = 0), fe;
|
|
5809
5814
|
}), S = (() => {
|
|
5810
5815
|
if (a == null) return;
|
|
5811
5816
|
if (E === null) return { ...a, inner: void 0 };
|
|
5812
5817
|
let H = Array.from(p.listRef.current.values());
|
|
5813
5818
|
return { ...a, inner: { listRef: { current: H }, index: E } };
|
|
5814
|
-
})(), [O,
|
|
5819
|
+
})(), [O, N] = Bd(S), x = Wd(), D = Je(t, a ? O : null, f.actions.setOptionsElement, d), _ = Gt();
|
|
5815
5820
|
ye(() => {
|
|
5816
5821
|
var H;
|
|
5817
5822
|
let Z = w;
|
|
@@ -5852,12 +5857,12 @@ function Op(e, t) {
|
|
|
5852
5857
|
}), V = qe(f, (H) => {
|
|
5853
5858
|
var Z;
|
|
5854
5859
|
return (Z = H.buttonElement) == null ? void 0 : Z.id;
|
|
5855
|
-
}), G = re(() => ({ open: h === Re.Open }), [h]), q = Ts(a ? x() : {}, { id: r, ref: D, "aria-activedescendant": qe(f, f.selectors.activeDescendantId), "aria-multiselectable": p.mode === st.Multi ? !0 : void 0, "aria-labelledby": V, "aria-orientation": p.orientation, onKeyDown: U, role: "listbox", tabIndex: h === Re.Open ? 0 : void 0, style: { ...s.style, ...
|
|
5860
|
+
}), G = re(() => ({ open: h === Re.Open }), [h]), q = Ts(a ? x() : {}, { id: r, ref: D, "aria-activedescendant": qe(f, f.selectors.activeDescendantId), "aria-multiselectable": p.mode === st.Multi ? !0 : void 0, "aria-labelledby": V, "aria-orientation": p.orientation, onKeyDown: U, role: "listbox", tabIndex: h === Re.Open ? 0 : void 0, style: { ...s.style, ...N, "--button-width": cu(g, !0).width }, ...qs(F) }), W = We(), K = re(() => p.mode === st.Multi ? p : { ...p, isSelected: C }, [p, C]);
|
|
5856
5861
|
return z.createElement(op, { enabled: i ? e.static || M : !1, ownerDocument: y }, z.createElement(er.Provider, { value: K }, W({ ourProps: q, theirProps: s, slot: G, defaultTag: Rp, features: Sp, visible: b, name: "Listbox.Options" })));
|
|
5857
5862
|
}
|
|
5858
5863
|
let Tp = "div";
|
|
5859
|
-
function
|
|
5860
|
-
let n = Mt(), { id: r = `headlessui-listbox-option-${n}`, disabled: o = !1, value: i, ...l } = e, c = he(Dl) === !0, s = pn("Listbox.Option"), a =
|
|
5864
|
+
function Cp(e, t) {
|
|
5865
|
+
let n = Mt(), { id: r = `headlessui-listbox-option-${n}`, disabled: o = !1, value: i, ...l } = e, c = he(Dl) === !0, s = pn("Listbox.Option"), a = No("Listbox.Option"), u = qe(a, (b) => a.selectors.isActive(b, r)), d = s.isSelected(i), p = ee(null), f = hp(p), h = jt({ disabled: o, value: i, domRef: p, get textValue() {
|
|
5861
5866
|
return f();
|
|
5862
5867
|
} }), g = Je(t, p, (b) => {
|
|
5863
5868
|
b ? s.listRef.current.set(r, b) : s.listRef.current.delete(r);
|
|
@@ -5878,18 +5883,18 @@ function Np(e, t) {
|
|
|
5878
5883
|
if (o) return a.actions.goToOption({ focus: me.Nothing });
|
|
5879
5884
|
a.actions.goToOption({ focus: me.Specific, id: r });
|
|
5880
5885
|
}), T = Yu(), I = ie((b) => T.update(b)), M = ie((b) => {
|
|
5881
|
-
T.wasMoved(b) && (o || u && a.state.activationTrigger ===
|
|
5886
|
+
T.wasMoved(b) && (o || u && a.state.activationTrigger === Cn.Pointer || a.actions.goToOption({ focus: me.Specific, id: r }, Cn.Pointer));
|
|
5882
5887
|
}), F = ie((b) => {
|
|
5883
|
-
T.wasMoved(b) && (o || u && a.state.activationTrigger ===
|
|
5888
|
+
T.wasMoved(b) && (o || u && a.state.activationTrigger === Cn.Pointer && a.actions.goToOption({ focus: me.Nothing }));
|
|
5884
5889
|
}), k = re(() => ({ active: u, focus: u, selected: d, disabled: o, selectedOption: d && c }), [u, d, o, c]), m = c ? {} : { id: r, ref: g, role: "option", tabIndex: o === !0 ? void 0 : -1, "aria-disabled": o === !0 ? !0 : void 0, "aria-selected": d, disabled: void 0, onClick: L, onFocus: y, onPointerEnter: I, onMouseEnter: I, onPointerMove: M, onMouseMove: M, onPointerLeave: F, onMouseLeave: F }, v = We();
|
|
5885
5890
|
return !d && c ? null : v({ ourProps: m, theirProps: l, slot: k, defaultTag: Tp, name: "Listbox.Option" });
|
|
5886
5891
|
}
|
|
5887
|
-
let
|
|
5892
|
+
let Np = ke;
|
|
5888
5893
|
function Ap(e, t) {
|
|
5889
5894
|
let { options: n, placeholder: r, ...o } = e, i = { ref: Je(t) }, l = pn("ListboxSelectedOption"), c = re(() => ({}), []), s = l.value === void 0 || l.value === null || l.mode === st.Multi && Array.isArray(l.value) && l.value.length === 0, a = We();
|
|
5890
|
-
return z.createElement(Dl.Provider, { value: !0 }, a({ ourProps: i, theirProps: { ...o, children: z.createElement(z.Fragment, null, r && s ? r : n) }, slot: c, defaultTag:
|
|
5895
|
+
return z.createElement(Dl.Provider, { value: !0 }, a({ ourProps: i, theirProps: { ...o, children: z.createElement(z.Fragment, null, r && s ? r : n) }, slot: c, defaultTag: Np, name: "ListboxSelectedOption" }));
|
|
5891
5896
|
}
|
|
5892
|
-
let Pp = Fe(yp), $p = Fe(Ep), Lp = iu, Dp = Fe(Op), Ip = Fe(
|
|
5897
|
+
let Pp = Fe(yp), $p = Fe(Ep), Lp = iu, Dp = Fe(Op), Ip = Fe(Cp), Mp = Fe(Ap), St = Object.assign(Pp, { Button: $p, Label: Lp, Options: Dp, Option: Ip, SelectedOption: Mp });
|
|
5893
5898
|
function jp({
|
|
5894
5899
|
title: e,
|
|
5895
5900
|
titleId: t,
|
|
@@ -7225,7 +7230,7 @@ var vm = function() {
|
|
|
7225
7230
|
if (!S)
|
|
7226
7231
|
return;
|
|
7227
7232
|
let O = v;
|
|
7228
|
-
const
|
|
7233
|
+
const N = I.current, x = P != null && N !== null && N.complete && N.naturalHeight !== 0 && N.naturalWidth !== 0;
|
|
7229
7234
|
x && P.excavation != null && (O = Yl(
|
|
7230
7235
|
v,
|
|
7231
7236
|
P.excavation
|
|
@@ -7238,7 +7243,7 @@ var vm = function() {
|
|
|
7238
7243
|
G && S.fillRect(q + m, V + m, 1, 1);
|
|
7239
7244
|
});
|
|
7240
7245
|
}), P && (S.globalAlpha = P.opacity), x && S.drawImage(
|
|
7241
|
-
|
|
7246
|
+
N,
|
|
7242
7247
|
P.x + m,
|
|
7243
7248
|
P.y + m,
|
|
7244
7249
|
P.w,
|
|
@@ -7249,8 +7254,8 @@ var vm = function() {
|
|
|
7249
7254
|
k(!1);
|
|
7250
7255
|
}, [y]);
|
|
7251
7256
|
const A = Jr({ height: i, width: i }, w);
|
|
7252
|
-
let
|
|
7253
|
-
return y != null && (
|
|
7257
|
+
let C = null;
|
|
7258
|
+
return y != null && (C = /* @__PURE__ */ z.createElement(
|
|
7254
7259
|
"img",
|
|
7255
7260
|
{
|
|
7256
7261
|
src: y,
|
|
@@ -7271,7 +7276,7 @@ var vm = function() {
|
|
|
7271
7276
|
ref: M,
|
|
7272
7277
|
role: "img"
|
|
7273
7278
|
}, L)
|
|
7274
|
-
),
|
|
7279
|
+
), C);
|
|
7275
7280
|
}
|
|
7276
7281
|
);
|
|
7277
7282
|
bm.displayName = "QRCodeCanvas";
|
|
@@ -7419,7 +7424,7 @@ function lt(e) {
|
|
|
7419
7424
|
return (e == null ? void 0 : e.ownerDocument) || document;
|
|
7420
7425
|
}
|
|
7421
7426
|
function Ql(e) {
|
|
7422
|
-
return
|
|
7427
|
+
return Ne(e) && e.matches(Rm);
|
|
7423
7428
|
}
|
|
7424
7429
|
function Om(e) {
|
|
7425
7430
|
if (!e || Em()) return !0;
|
|
@@ -7432,21 +7437,21 @@ function Om(e) {
|
|
|
7432
7437
|
function Tm(e) {
|
|
7433
7438
|
return e ? e.hasAttribute(Hi) ? e : e.querySelector("[" + Hi + "]") || e : null;
|
|
7434
7439
|
}
|
|
7435
|
-
function
|
|
7440
|
+
function Nn(e, t, n) {
|
|
7436
7441
|
return n === void 0 && (n = !0), e.filter((o) => {
|
|
7437
7442
|
var i;
|
|
7438
7443
|
return o.parentId === t && (!n || ((i = o.context) == null ? void 0 : i.open));
|
|
7439
|
-
}).flatMap((o) => [o, ...
|
|
7444
|
+
}).flatMap((o) => [o, ...Nn(e, o.id, n)]);
|
|
7440
7445
|
}
|
|
7441
|
-
function
|
|
7446
|
+
function Cm(e) {
|
|
7442
7447
|
return "nativeEvent" in e;
|
|
7443
7448
|
}
|
|
7444
7449
|
function cn(e, t) {
|
|
7445
7450
|
const n = ["mouse", "pen"];
|
|
7446
7451
|
return t || n.push("", void 0), n.includes(e);
|
|
7447
7452
|
}
|
|
7448
|
-
var
|
|
7449
|
-
}, ut =
|
|
7453
|
+
var Nm = typeof document < "u", Am = function() {
|
|
7454
|
+
}, ut = Nm ? Bn : Am;
|
|
7450
7455
|
const Pm = {
|
|
7451
7456
|
...j
|
|
7452
7457
|
};
|
|
@@ -7593,46 +7598,46 @@ function Hm(e, t) {
|
|
|
7593
7598
|
move: p = !0
|
|
7594
7599
|
} = t, f = Fo(), h = jo(), g = Sn(a), w = Sn(s), L = Sn(n), y = Sn(d), T = j.useRef(), I = j.useRef(-1), M = j.useRef(), F = j.useRef(-1), k = j.useRef(!0), m = j.useRef(!1), v = j.useRef(() => {
|
|
7595
7600
|
}), b = j.useRef(!1), P = it(() => {
|
|
7596
|
-
var
|
|
7597
|
-
const x = (
|
|
7601
|
+
var N;
|
|
7602
|
+
const x = (N = o.current.openEvent) == null ? void 0 : N.type;
|
|
7598
7603
|
return (x == null ? void 0 : x.includes("mouse")) && x !== "mousedown";
|
|
7599
7604
|
});
|
|
7600
7605
|
j.useEffect(() => {
|
|
7601
7606
|
if (!c) return;
|
|
7602
|
-
function
|
|
7607
|
+
function N(x) {
|
|
7603
7608
|
let {
|
|
7604
7609
|
open: D
|
|
7605
7610
|
} = x;
|
|
7606
7611
|
D || (Ge(I), Ge(F), k.current = !0, b.current = !1);
|
|
7607
7612
|
}
|
|
7608
|
-
return i.on("openchange",
|
|
7609
|
-
i.off("openchange",
|
|
7613
|
+
return i.on("openchange", N), () => {
|
|
7614
|
+
i.off("openchange", N);
|
|
7610
7615
|
};
|
|
7611
7616
|
}, [c, i]), j.useEffect(() => {
|
|
7612
7617
|
if (!c || !g.current || !n) return;
|
|
7613
|
-
function
|
|
7618
|
+
function N(D) {
|
|
7614
7619
|
P() && r(!1, D, "hover");
|
|
7615
7620
|
}
|
|
7616
7621
|
const x = lt(l.floating).documentElement;
|
|
7617
|
-
return x.addEventListener("mouseleave",
|
|
7618
|
-
x.removeEventListener("mouseleave",
|
|
7622
|
+
return x.addEventListener("mouseleave", N), () => {
|
|
7623
|
+
x.removeEventListener("mouseleave", N);
|
|
7619
7624
|
};
|
|
7620
7625
|
}, [l.floating, n, r, c, g, P]);
|
|
7621
|
-
const A = j.useCallback(function(
|
|
7626
|
+
const A = j.useCallback(function(N, x, D) {
|
|
7622
7627
|
x === void 0 && (x = !0), D === void 0 && (D = "hover");
|
|
7623
7628
|
const _ = Or(w.current, "close", T.current);
|
|
7624
|
-
_ && !M.current ? (Ge(I), I.current = window.setTimeout(() => r(!1,
|
|
7625
|
-
}, [w, r]),
|
|
7629
|
+
_ && !M.current ? (Ge(I), I.current = window.setTimeout(() => r(!1, N, D), _)) : x && (Ge(I), r(!1, N, D));
|
|
7630
|
+
}, [w, r]), C = it(() => {
|
|
7626
7631
|
v.current(), M.current = void 0;
|
|
7627
7632
|
}), E = it(() => {
|
|
7628
7633
|
if (m.current) {
|
|
7629
|
-
const
|
|
7630
|
-
|
|
7634
|
+
const N = lt(l.floating).body;
|
|
7635
|
+
N.style.pointerEvents = "", N.removeAttribute(Qi), m.current = !1;
|
|
7631
7636
|
}
|
|
7632
7637
|
}), S = it(() => o.current.openEvent ? ["click", "mousedown"].includes(o.current.openEvent.type) : !1);
|
|
7633
7638
|
j.useEffect(() => {
|
|
7634
7639
|
if (!c) return;
|
|
7635
|
-
function
|
|
7640
|
+
function N(V) {
|
|
7636
7641
|
if (Ge(I), k.current = !1, u && !cn(T.current) || Tr(y.current) > 0 && !Or(w.current, "open"))
|
|
7637
7642
|
return;
|
|
7638
7643
|
const G = Or(w.current, "open", T.current);
|
|
@@ -7654,7 +7659,7 @@ function Hm(e, t) {
|
|
|
7654
7659
|
x: V.clientX,
|
|
7655
7660
|
y: V.clientY,
|
|
7656
7661
|
onClose() {
|
|
7657
|
-
E(),
|
|
7662
|
+
E(), C(), S() || A(V, !0, "safe-polygon");
|
|
7658
7663
|
}
|
|
7659
7664
|
});
|
|
7660
7665
|
const W = M.current;
|
|
@@ -7672,7 +7677,7 @@ function Hm(e, t) {
|
|
|
7672
7677
|
x: V.clientX,
|
|
7673
7678
|
y: V.clientY,
|
|
7674
7679
|
onClose() {
|
|
7675
|
-
E(),
|
|
7680
|
+
E(), C(), S() || A(V);
|
|
7676
7681
|
}
|
|
7677
7682
|
})(V));
|
|
7678
7683
|
}
|
|
@@ -7684,15 +7689,15 @@ function Hm(e, t) {
|
|
|
7684
7689
|
}
|
|
7685
7690
|
if (le(l.domReference)) {
|
|
7686
7691
|
const V = l.domReference, G = l.floating;
|
|
7687
|
-
return n && V.addEventListener("mouseleave", D), p && V.addEventListener("mousemove",
|
|
7692
|
+
return n && V.addEventListener("mouseleave", D), p && V.addEventListener("mousemove", N, {
|
|
7688
7693
|
once: !0
|
|
7689
|
-
}), V.addEventListener("mouseenter",
|
|
7690
|
-
n && V.removeEventListener("mouseleave", D), p && V.removeEventListener("mousemove",
|
|
7694
|
+
}), V.addEventListener("mouseenter", N), V.addEventListener("mouseleave", x), G && (G.addEventListener("mouseleave", D), G.addEventListener("mouseenter", _), G.addEventListener("mouseleave", U)), () => {
|
|
7695
|
+
n && V.removeEventListener("mouseleave", D), p && V.removeEventListener("mousemove", N), V.removeEventListener("mouseenter", N), V.removeEventListener("mouseleave", x), G && (G.removeEventListener("mouseleave", D), G.removeEventListener("mouseenter", _), G.removeEventListener("mouseleave", U));
|
|
7691
7696
|
};
|
|
7692
7697
|
}
|
|
7693
|
-
}, [l, c, e, u, p, A,
|
|
7694
|
-
var
|
|
7695
|
-
if (c && n && (
|
|
7698
|
+
}, [l, c, e, u, p, A, C, E, r, n, L, f, w, g, o, S, y]), ut(() => {
|
|
7699
|
+
var N;
|
|
7700
|
+
if (c && n && (N = g.current) != null && (N = N.__options) != null && N.blockPointerEvents && P()) {
|
|
7696
7701
|
m.current = !0;
|
|
7697
7702
|
const D = l.floating;
|
|
7698
7703
|
if (le(l.domReference) && D) {
|
|
@@ -7706,17 +7711,17 @@ function Hm(e, t) {
|
|
|
7706
7711
|
}
|
|
7707
7712
|
}
|
|
7708
7713
|
}, [c, n, h, l, f, g, P]), ut(() => {
|
|
7709
|
-
n || (T.current = void 0, b.current = !1,
|
|
7710
|
-
}, [n,
|
|
7711
|
-
|
|
7712
|
-
}, [c, l.domReference,
|
|
7714
|
+
n || (T.current = void 0, b.current = !1, C(), E());
|
|
7715
|
+
}, [n, C, E]), j.useEffect(() => () => {
|
|
7716
|
+
C(), Ge(I), Ge(F), E();
|
|
7717
|
+
}, [c, l.domReference, C, E]);
|
|
7713
7718
|
const O = j.useMemo(() => {
|
|
7714
|
-
function
|
|
7719
|
+
function N(x) {
|
|
7715
7720
|
T.current = x.pointerType;
|
|
7716
7721
|
}
|
|
7717
7722
|
return {
|
|
7718
|
-
onPointerDown:
|
|
7719
|
-
onPointerEnter:
|
|
7723
|
+
onPointerDown: N,
|
|
7724
|
+
onPointerEnter: N,
|
|
7720
7725
|
onMouseMove(x) {
|
|
7721
7726
|
const {
|
|
7722
7727
|
nativeEvent: D
|
|
@@ -7858,10 +7863,10 @@ function Ym(e) {
|
|
|
7858
7863
|
}
|
|
7859
7864
|
const Km = () => j.useContext(ta);
|
|
7860
7865
|
function es(e) {
|
|
7861
|
-
return
|
|
7866
|
+
return Ne(e.target) && e.target.tagName === "BUTTON";
|
|
7862
7867
|
}
|
|
7863
7868
|
function qm(e) {
|
|
7864
|
-
return
|
|
7869
|
+
return Ne(e.target) && e.target.tagName === "A";
|
|
7865
7870
|
}
|
|
7866
7871
|
function ts(e) {
|
|
7867
7872
|
return Ql(e);
|
|
@@ -7951,10 +7956,10 @@ function Zm(e, t) {
|
|
|
7951
7956
|
var S;
|
|
7952
7957
|
if (!n || !l || !c || E.key !== "Escape" || k.current)
|
|
7953
7958
|
return;
|
|
7954
|
-
const O = (S = i.current.floatingContext) == null ? void 0 : S.nodeId,
|
|
7955
|
-
if (!T && (E.stopPropagation(),
|
|
7959
|
+
const O = (S = i.current.floatingContext) == null ? void 0 : S.nodeId, N = g ? Nn(g.nodesRef.current, O) : [];
|
|
7960
|
+
if (!T && (E.stopPropagation(), N.length > 0)) {
|
|
7956
7961
|
let x = !0;
|
|
7957
|
-
if (
|
|
7962
|
+
if (N.forEach((D) => {
|
|
7958
7963
|
var _;
|
|
7959
7964
|
if ((_ = D.context) != null && _.open && !D.context.dataRef.current.__escapeKeyBubbles) {
|
|
7960
7965
|
x = !1;
|
|
@@ -7963,20 +7968,20 @@ function Zm(e, t) {
|
|
|
7963
7968
|
}), !x)
|
|
7964
7969
|
return;
|
|
7965
7970
|
}
|
|
7966
|
-
r(!1,
|
|
7971
|
+
r(!1, Cm(E) ? E.nativeEvent : E, "escape-key");
|
|
7967
7972
|
}), v = it((E) => {
|
|
7968
7973
|
var S;
|
|
7969
7974
|
const O = () => {
|
|
7970
|
-
var
|
|
7971
|
-
m(E), (
|
|
7975
|
+
var N;
|
|
7976
|
+
m(E), (N = Wt(E)) == null || N.removeEventListener("keydown", O);
|
|
7972
7977
|
};
|
|
7973
7978
|
(S = Wt(E)) == null || S.addEventListener("keydown", O);
|
|
7974
7979
|
}), b = it((E) => {
|
|
7975
7980
|
var S;
|
|
7976
7981
|
const O = i.current.insideReactTree;
|
|
7977
7982
|
i.current.insideReactTree = !1;
|
|
7978
|
-
const
|
|
7979
|
-
if (y.current = !1, a === "click" &&
|
|
7983
|
+
const N = y.current;
|
|
7984
|
+
if (y.current = !1, a === "click" && N || O || typeof L == "function" && !L(E))
|
|
7980
7985
|
return;
|
|
7981
7986
|
const x = Wt(E), D = "[" + mn("inert") + "]", _ = lt(o.floating).querySelectorAll(D);
|
|
7982
7987
|
let U = le(x) ? x : null;
|
|
@@ -7991,18 +7996,18 @@ function Zm(e, t) {
|
|
|
7991
7996
|
// element was injected after the floating element rendered.
|
|
7992
7997
|
Array.from(_).every((W) => !Ht(U, W)))
|
|
7993
7998
|
return;
|
|
7994
|
-
if (
|
|
7999
|
+
if (Ne(x) && C) {
|
|
7995
8000
|
const W = gt(x), K = Qe(x), H = /auto|scroll/, Z = W || H.test(K.overflowX), fe = W || H.test(K.overflowY), Ae = Z && x.clientWidth > 0 && x.scrollWidth > x.clientWidth, Pe = fe && x.clientHeight > 0 && x.scrollHeight > x.clientHeight, rt = K.direction === "rtl", Oe = Pe && (rt ? E.offsetX <= x.offsetWidth - x.clientWidth : E.offsetX > x.clientWidth), xe = Ae && E.offsetY > x.clientHeight;
|
|
7996
8001
|
if (Oe || xe)
|
|
7997
8002
|
return;
|
|
7998
8003
|
}
|
|
7999
|
-
const V = (S = i.current.floatingContext) == null ? void 0 : S.nodeId, G = g &&
|
|
8004
|
+
const V = (S = i.current.floatingContext) == null ? void 0 : S.nodeId, G = g && Nn(g.nodesRef.current, V).some((W) => {
|
|
8000
8005
|
var K;
|
|
8001
8006
|
return Rr(E, (K = W.context) == null ? void 0 : K.elements.floating);
|
|
8002
8007
|
});
|
|
8003
8008
|
if (Rr(E, o.floating) || Rr(E, o.domReference) || G)
|
|
8004
8009
|
return;
|
|
8005
|
-
const q = g ?
|
|
8010
|
+
const q = g ? Nn(g.nodesRef.current, V) : [];
|
|
8006
8011
|
if (q.length > 0) {
|
|
8007
8012
|
let W = !0;
|
|
8008
8013
|
if (q.forEach((K) => {
|
|
@@ -8018,8 +8023,8 @@ function Zm(e, t) {
|
|
|
8018
8023
|
}), P = it((E) => {
|
|
8019
8024
|
var S;
|
|
8020
8025
|
const O = () => {
|
|
8021
|
-
var
|
|
8022
|
-
b(E), (
|
|
8026
|
+
var N;
|
|
8027
|
+
b(E), (N = Wt(E)) == null || N.removeEventListener(a, O);
|
|
8023
8028
|
};
|
|
8024
8029
|
(S = Wt(E)) == null || S.addEventListener(a, O);
|
|
8025
8030
|
});
|
|
@@ -8034,7 +8039,7 @@ function Zm(e, t) {
|
|
|
8034
8039
|
function O() {
|
|
8035
8040
|
window.clearTimeout(E), k.current = !0;
|
|
8036
8041
|
}
|
|
8037
|
-
function
|
|
8042
|
+
function N() {
|
|
8038
8043
|
E = window.setTimeout(
|
|
8039
8044
|
() => {
|
|
8040
8045
|
k.current = !1;
|
|
@@ -8045,7 +8050,7 @@ function Zm(e, t) {
|
|
|
8045
8050
|
);
|
|
8046
8051
|
}
|
|
8047
8052
|
const x = lt(o.floating);
|
|
8048
|
-
c && (x.addEventListener("keydown", M ? v : m, M), x.addEventListener("compositionstart", O), x.addEventListener("compositionend",
|
|
8053
|
+
c && (x.addEventListener("keydown", M ? v : m, M), x.addEventListener("compositionstart", O), x.addEventListener("compositionend", N)), L && x.addEventListener(a, F ? P : b, F);
|
|
8049
8054
|
let D = [];
|
|
8050
8055
|
return p && (le(o.domReference) && (D = Ot(o.domReference)), le(o.floating) && (D = D.concat(Ot(o.floating))), !le(o.reference) && o.reference && o.reference.contextElement && (D = D.concat(Ot(o.reference.contextElement)))), D = D.filter((_) => {
|
|
8051
8056
|
var U;
|
|
@@ -8055,7 +8060,7 @@ function Zm(e, t) {
|
|
|
8055
8060
|
passive: !0
|
|
8056
8061
|
});
|
|
8057
8062
|
}), () => {
|
|
8058
|
-
c && (x.removeEventListener("keydown", M ? v : m, M), x.removeEventListener("compositionstart", O), x.removeEventListener("compositionend",
|
|
8063
|
+
c && (x.removeEventListener("keydown", M ? v : m, M), x.removeEventListener("compositionstart", O), x.removeEventListener("compositionend", N)), L && x.removeEventListener(a, F ? P : b, F), D.forEach((_) => {
|
|
8059
8064
|
_.removeEventListener("scroll", S);
|
|
8060
8065
|
}), window.clearTimeout(E);
|
|
8061
8066
|
};
|
|
@@ -8074,7 +8079,7 @@ function Zm(e, t) {
|
|
|
8074
8079
|
}
|
|
8075
8080
|
}
|
|
8076
8081
|
}
|
|
8077
|
-
}), [m, r, u, d]),
|
|
8082
|
+
}), [m, r, u, d]), C = j.useMemo(() => ({
|
|
8078
8083
|
onKeyDown: m,
|
|
8079
8084
|
onMouseDown() {
|
|
8080
8085
|
y.current = !0;
|
|
@@ -8088,8 +8093,8 @@ function Zm(e, t) {
|
|
|
8088
8093
|
}), [m, a, i]);
|
|
8089
8094
|
return j.useMemo(() => l ? {
|
|
8090
8095
|
reference: A,
|
|
8091
|
-
floating:
|
|
8092
|
-
} : {}, [l, A,
|
|
8096
|
+
floating: C
|
|
8097
|
+
} : {}, [l, A, C]);
|
|
8093
8098
|
}
|
|
8094
8099
|
function eh(e) {
|
|
8095
8100
|
const {
|
|
@@ -8186,7 +8191,7 @@ function th(e) {
|
|
|
8186
8191
|
elements: L
|
|
8187
8192
|
}), [f, w, L, y]);
|
|
8188
8193
|
}
|
|
8189
|
-
function
|
|
8194
|
+
function Cr() {
|
|
8190
8195
|
return wm() && Xl();
|
|
8191
8196
|
}
|
|
8192
8197
|
function nh(e, t) {
|
|
@@ -8205,7 +8210,7 @@ function nh(e, t) {
|
|
|
8205
8210
|
if (!c) return;
|
|
8206
8211
|
const f = Ie(l.domReference);
|
|
8207
8212
|
function h() {
|
|
8208
|
-
!n &&
|
|
8213
|
+
!n && Ne(l.domReference) && l.domReference === eo(lt(l.domReference)) && (a.current = !0);
|
|
8209
8214
|
}
|
|
8210
8215
|
function g() {
|
|
8211
8216
|
d.current = !0;
|
|
@@ -8213,8 +8218,8 @@ function nh(e, t) {
|
|
|
8213
8218
|
function w() {
|
|
8214
8219
|
d.current = !1;
|
|
8215
8220
|
}
|
|
8216
|
-
return f.addEventListener("blur", h),
|
|
8217
|
-
f.removeEventListener("blur", h),
|
|
8221
|
+
return f.addEventListener("blur", h), Cr() && (f.addEventListener("keydown", g, !0), f.addEventListener("pointerdown", w, !0)), () => {
|
|
8222
|
+
f.removeEventListener("blur", h), Cr() && (f.removeEventListener("keydown", g, !0), f.removeEventListener("pointerdown", w, !0));
|
|
8218
8223
|
};
|
|
8219
8224
|
}, [l.domReference, n, c]), j.useEffect(() => {
|
|
8220
8225
|
if (!c) return;
|
|
@@ -8238,7 +8243,7 @@ function nh(e, t) {
|
|
|
8238
8243
|
if (a.current) return;
|
|
8239
8244
|
const h = Wt(f.nativeEvent);
|
|
8240
8245
|
if (s && le(h)) {
|
|
8241
|
-
if (
|
|
8246
|
+
if (Cr() && !f.relatedTarget) {
|
|
8242
8247
|
if (!d.current && !Ql(h))
|
|
8243
8248
|
return;
|
|
8244
8249
|
} else if (!Om(h))
|
|
@@ -8260,7 +8265,7 @@ function nh(e, t) {
|
|
|
8260
8265
|
reference: p
|
|
8261
8266
|
} : {}, [c, p]);
|
|
8262
8267
|
}
|
|
8263
|
-
function
|
|
8268
|
+
function Nr(e, t, n) {
|
|
8264
8269
|
const r = /* @__PURE__ */ new Map(), o = n === "item";
|
|
8265
8270
|
let i = e;
|
|
8266
8271
|
if (o && e) {
|
|
@@ -8300,15 +8305,15 @@ function Cr(e, t, n) {
|
|
|
8300
8305
|
function rh(e) {
|
|
8301
8306
|
e === void 0 && (e = []);
|
|
8302
8307
|
const t = e.map((c) => c == null ? void 0 : c.reference), n = e.map((c) => c == null ? void 0 : c.floating), r = e.map((c) => c == null ? void 0 : c.item), o = j.useCallback(
|
|
8303
|
-
(c) =>
|
|
8308
|
+
(c) => Nr(c, e, "reference"),
|
|
8304
8309
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8305
8310
|
t
|
|
8306
8311
|
), i = j.useCallback(
|
|
8307
|
-
(c) =>
|
|
8312
|
+
(c) => Nr(c, e, "floating"),
|
|
8308
8313
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8309
8314
|
n
|
|
8310
8315
|
), l = j.useCallback(
|
|
8311
|
-
(c) =>
|
|
8316
|
+
(c) => Nr(c, e, "item"),
|
|
8312
8317
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8313
8318
|
r
|
|
8314
8319
|
);
|
|
@@ -9195,14 +9200,14 @@ const mh = (e) => {
|
|
|
9195
9200
|
}
|
|
9196
9201
|
(P.current !== I || A.current !== y) && (k(""), P.current = I, A.current = y);
|
|
9197
9202
|
}, [I, y]);
|
|
9198
|
-
const
|
|
9203
|
+
const C = e && e.length > 0 ? e.find((W) => W.chainId === y) || e[0] : null, E = (q = C == null ? void 0 : C.tokenList) == null ? void 0 : q.find(
|
|
9199
9204
|
(W) => W.token === I
|
|
9200
|
-
), S = o == null ? void 0 : o.getDisplayAddress(), { multicallResult: O, queryComponents:
|
|
9205
|
+
), S = o == null ? void 0 : o.getDisplayAddress(), { multicallResult: O, queryComponents: N } = ra({
|
|
9201
9206
|
account: S,
|
|
9202
9207
|
chainId: y,
|
|
9203
9208
|
contractAddress: void 0,
|
|
9204
9209
|
// 暂时不传入合约地址
|
|
9205
|
-
tokens: (
|
|
9210
|
+
tokens: (C == null ? void 0 : C.tokenList) || [],
|
|
9206
9211
|
wagmiHooks: a
|
|
9207
9212
|
}), x = re(() => {
|
|
9208
9213
|
var K;
|
|
@@ -9218,17 +9223,16 @@ const mh = (e) => {
|
|
|
9218
9223
|
disabled: !1,
|
|
9219
9224
|
isNetworkSwitch: !0
|
|
9220
9225
|
};
|
|
9221
|
-
const W = parseFloat(F || "0"), K = 10,
|
|
9226
|
+
const W = parseFloat(F || "0"), K = 10, Z = Wp(F, x || "0", D);
|
|
9222
9227
|
return !F || W === 0 || !D ? {
|
|
9223
9228
|
text: w("deposit.confirmDeposit"),
|
|
9224
9229
|
disabled: !0,
|
|
9225
9230
|
isNetworkSwitch: !1
|
|
9226
|
-
} : W > parseFloat(H) ? {
|
|
9227
|
-
text: "Insufficient Balance",
|
|
9228
|
-
disabled: !0,
|
|
9229
|
-
isNetworkSwitch: !1
|
|
9230
9231
|
} : W < K ? {
|
|
9231
|
-
text:
|
|
9232
|
+
text: w("deposit.minDepositParsed", {
|
|
9233
|
+
amount: K,
|
|
9234
|
+
token: I
|
|
9235
|
+
}),
|
|
9232
9236
|
disabled: !0,
|
|
9233
9237
|
isNetworkSwitch: !1
|
|
9234
9238
|
} : {
|
|
@@ -9267,12 +9271,12 @@ const mh = (e) => {
|
|
|
9267
9271
|
return !(a != null && a.useBalance) || !(a != null && a.useReadContract) || !(a != null && a.useAccount) ? /* @__PURE__ */ R.jsxs("div", { className: "p-6 text-center", children: [
|
|
9268
9272
|
/* @__PURE__ */ R.jsx("p", { className: "text-red-500", children: "缺少必要的 wagmi hooks" }),
|
|
9269
9273
|
/* @__PURE__ */ R.jsx("p", { className: "text-sm text-gray-500 mt-2", children: "请确保传入了 useBalance, useReadContract, useAccount" })
|
|
9270
|
-
] }) : !e || e.length === 0 ? /* @__PURE__ */ R.jsx("div", { className: "text-center py-8", children: /* @__PURE__ */ R.jsx("p", { className: "text-gray-400", children: "No chains available" }) }) :
|
|
9271
|
-
|
|
9274
|
+
] }) : !e || e.length === 0 ? /* @__PURE__ */ R.jsx("div", { className: "text-center py-8", children: /* @__PURE__ */ R.jsx("p", { className: "text-gray-400", children: "No chains available" }) }) : C ? /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
|
|
9275
|
+
N,
|
|
9272
9276
|
/* @__PURE__ */ R.jsx(
|
|
9273
9277
|
Ao,
|
|
9274
9278
|
{
|
|
9275
|
-
currentActiveChain:
|
|
9279
|
+
currentActiveChain: C,
|
|
9276
9280
|
chainList: e,
|
|
9277
9281
|
onChainChange: m,
|
|
9278
9282
|
curSelectToken: I,
|
|
@@ -9290,7 +9294,7 @@ const mh = (e) => {
|
|
|
9290
9294
|
allowance: E == null ? void 0 : E.allowance
|
|
9291
9295
|
},
|
|
9292
9296
|
approved: D,
|
|
9293
|
-
currentActiveChain:
|
|
9297
|
+
currentActiveChain: C,
|
|
9294
9298
|
currentEquity: l || 0,
|
|
9295
9299
|
amount: F,
|
|
9296
9300
|
decimals: (E == null ? void 0 : E.decimals) || 6,
|
|
@@ -9725,7 +9729,7 @@ const Th = z.forwardRef((e, t) => {
|
|
|
9725
9729
|
);
|
|
9726
9730
|
});
|
|
9727
9731
|
Th.displayName = "WithdrawManager";
|
|
9728
|
-
const
|
|
9732
|
+
const Ch = (e) => {
|
|
9729
9733
|
if (!je) {
|
|
9730
9734
|
console.error(
|
|
9731
9735
|
"WithdrawManager not initialized. Make sure to render <WithdrawManager /> in your app."
|
|
@@ -9733,7 +9737,7 @@ const Nh = (e) => {
|
|
|
9733
9737
|
return;
|
|
9734
9738
|
}
|
|
9735
9739
|
je.openWithdraw(e || { chains: [] });
|
|
9736
|
-
},
|
|
9740
|
+
}, Nh = () => {
|
|
9737
9741
|
if (!je) {
|
|
9738
9742
|
console.error(
|
|
9739
9743
|
"WithdrawManager not initialized. Make sure to render <WithdrawManager /> in your app."
|
|
@@ -9758,8 +9762,8 @@ const Nh = (e) => {
|
|
|
9758
9762
|
}
|
|
9759
9763
|
je.setWithdrawLoading(e);
|
|
9760
9764
|
}, Ph = () => je ? je.isOpen() : !1, $h = () => je ? je.isLoading() : !1, Kh = () => ({
|
|
9761
|
-
openWithdraw:
|
|
9762
|
-
closeWithdraw:
|
|
9765
|
+
openWithdraw: Ch,
|
|
9766
|
+
closeWithdraw: Nh,
|
|
9763
9767
|
updateWithdrawOptions: Ah,
|
|
9764
9768
|
setWithdrawLoading: oo,
|
|
9765
9769
|
isOpen: Ph,
|
|
@@ -9806,18 +9810,18 @@ const Nh = (e) => {
|
|
|
9806
9810
|
I(q), h == null || h(q);
|
|
9807
9811
|
},
|
|
9808
9812
|
[h]
|
|
9809
|
-
), A = z.useRef(!0),
|
|
9813
|
+
), A = z.useRef(!0), C = z.useRef(T), E = z.useRef(L);
|
|
9810
9814
|
z.useEffect(() => {
|
|
9811
9815
|
if (A.current) {
|
|
9812
|
-
A.current = !1,
|
|
9816
|
+
A.current = !1, C.current = T, E.current = L;
|
|
9813
9817
|
return;
|
|
9814
9818
|
}
|
|
9815
|
-
(
|
|
9819
|
+
(C.current !== T || E.current !== L) && (F(""), C.current = T, E.current = L);
|
|
9816
9820
|
}, [T, L]);
|
|
9817
9821
|
const S = e && e.length > 0 ? e.find((q) => q.chainId === L) || e[0] : null, O = (G = S == null ? void 0 : S.tokenList) == null ? void 0 : G.find(
|
|
9818
9822
|
(q) => q.token === T
|
|
9819
|
-
),
|
|
9820
|
-
account:
|
|
9823
|
+
), N = o == null ? void 0 : o.getDisplayAddress(), { multicallResult: x, queryComponents: D } = ra({
|
|
9824
|
+
account: N,
|
|
9821
9825
|
chainId: L,
|
|
9822
9826
|
contractAddress: void 0,
|
|
9823
9827
|
// 暂时不传入合约地址
|
|
@@ -10036,12 +10040,12 @@ export {
|
|
|
10036
10040
|
Dh as Withdraw,
|
|
10037
10041
|
Th as WithdrawManager,
|
|
10038
10042
|
hh as closeDeposit,
|
|
10039
|
-
|
|
10043
|
+
Nh as closeWithdraw,
|
|
10040
10044
|
kh as formatThousands,
|
|
10041
10045
|
bh as isDepositLoading,
|
|
10042
10046
|
$h as isWithdrawLoading,
|
|
10043
10047
|
mh as openDeposit,
|
|
10044
|
-
|
|
10048
|
+
Ch as openWithdraw,
|
|
10045
10049
|
ro as setDepositLoading,
|
|
10046
10050
|
oo as setWithdrawLoading,
|
|
10047
10051
|
gh as updateDepositOptions,
|