@edgex-web/components 0.1.0-beta.56 → 0.1.0-beta.57
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/{ccip-Bav2dys6.mjs → ccip-DNME7Ary.mjs} +2 -2
- package/dist/{ccip-Bav2dys6.mjs.map → ccip-DNME7Ary.mjs.map} +1 -1
- package/dist/components/Deposit/src/constants/index.d.ts.map +1 -1
- package/dist/components/Deposit/src/index.d.ts.map +1 -1
- package/dist/components/Deposit/types/index.d.ts +8 -2
- package/dist/components/Deposit/types/index.d.ts.map +1 -1
- package/dist/{index-CIUp8g9c.mjs → index-D_NpDIqC.mjs} +1063 -1055
- package/dist/{index-CIUp8g9c.mjs.map → index-D_NpDIqC.mjs.map} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +35 -35
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -70,23 +70,23 @@ function Im() {
|
|
|
70
70
|
we.unshift("Warning: " + G), Function.prototype.apply.call(console[M], console, we);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
var B = !1, L = !1, F = !1,
|
|
73
|
+
var B = !1, L = !1, F = !1, D = !1, g = !1, w;
|
|
74
74
|
w = Symbol.for("react.module.reference");
|
|
75
75
|
function P(M) {
|
|
76
|
-
return !!(typeof M == "string" || typeof M == "function" || M === r || M === s || g || M === o || M === l || M === u ||
|
|
76
|
+
return !!(typeof M == "string" || typeof M == "function" || M === r || M === s || g || M === o || M === l || M === u || D || M === p || B || L || F || typeof M == "object" && M !== null && (M.$$typeof === f || M.$$typeof === d || M.$$typeof === i || M.$$typeof === c || M.$$typeof === a || // This needs to include all possible module reference object
|
|
77
77
|
// types supported by any Flight configuration anywhere since
|
|
78
78
|
// we don't know which Flight build this will end up being used
|
|
79
79
|
// with.
|
|
80
80
|
M.$$typeof === w || M.getModuleId !== void 0));
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function I(M, G, X) {
|
|
83
83
|
var ie = M.displayName;
|
|
84
84
|
if (ie)
|
|
85
85
|
return ie;
|
|
86
86
|
var be = G.displayName || G.name || "";
|
|
87
87
|
return be !== "" ? X + "(" + be + ")" : X;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function T(M) {
|
|
90
90
|
return M.displayName || "Context";
|
|
91
91
|
}
|
|
92
92
|
function S(M) {
|
|
@@ -114,12 +114,12 @@ function Im() {
|
|
|
114
114
|
switch (M.$$typeof) {
|
|
115
115
|
case c:
|
|
116
116
|
var G = M;
|
|
117
|
-
return
|
|
117
|
+
return T(G) + ".Consumer";
|
|
118
118
|
case i:
|
|
119
119
|
var X = M;
|
|
120
|
-
return
|
|
120
|
+
return T(X._context) + ".Provider";
|
|
121
121
|
case a:
|
|
122
|
-
return
|
|
122
|
+
return I(M, M.render, "ForwardRef");
|
|
123
123
|
case d:
|
|
124
124
|
var ie = M.displayName || null;
|
|
125
125
|
return ie !== null ? ie : S(M.type) || "Memo";
|
|
@@ -134,18 +134,18 @@ function Im() {
|
|
|
134
134
|
}
|
|
135
135
|
return null;
|
|
136
136
|
}
|
|
137
|
-
var E = Object.assign, x = 0,
|
|
138
|
-
function
|
|
137
|
+
var E = Object.assign, x = 0, R, N, b, C, k, j, _;
|
|
138
|
+
function z() {
|
|
139
139
|
}
|
|
140
|
-
|
|
140
|
+
z.__reactDisabledLog = !0;
|
|
141
141
|
function K() {
|
|
142
142
|
{
|
|
143
143
|
if (x === 0) {
|
|
144
|
-
|
|
144
|
+
R = console.log, N = console.info, b = console.warn, C = console.error, k = console.group, j = console.groupCollapsed, _ = console.groupEnd;
|
|
145
145
|
var M = {
|
|
146
146
|
configurable: !0,
|
|
147
147
|
enumerable: !0,
|
|
148
|
-
value:
|
|
148
|
+
value: z,
|
|
149
149
|
writable: !0
|
|
150
150
|
};
|
|
151
151
|
Object.defineProperties(console, {
|
|
@@ -161,7 +161,7 @@ function Im() {
|
|
|
161
161
|
x++;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function H() {
|
|
165
165
|
{
|
|
166
166
|
if (x--, x === 0) {
|
|
167
167
|
var M = {
|
|
@@ -171,10 +171,10 @@ function Im() {
|
|
|
171
171
|
};
|
|
172
172
|
Object.defineProperties(console, {
|
|
173
173
|
log: E({}, M, {
|
|
174
|
-
value:
|
|
174
|
+
value: R
|
|
175
175
|
}),
|
|
176
176
|
info: E({}, M, {
|
|
177
|
-
value:
|
|
177
|
+
value: N
|
|
178
178
|
}),
|
|
179
179
|
warn: E({}, M, {
|
|
180
180
|
value: b
|
|
@@ -186,10 +186,10 @@ function Im() {
|
|
|
186
186
|
value: k
|
|
187
187
|
}),
|
|
188
188
|
groupCollapsed: E({}, M, {
|
|
189
|
-
value:
|
|
189
|
+
value: j
|
|
190
190
|
}),
|
|
191
191
|
groupEnd: E({}, M, {
|
|
192
|
-
value:
|
|
192
|
+
value: _
|
|
193
193
|
})
|
|
194
194
|
});
|
|
195
195
|
}
|
|
@@ -281,7 +281,7 @@ function Im() {
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
} finally {
|
|
284
|
-
te = !1, q.current = we,
|
|
284
|
+
te = !1, q.current = we, H(), Error.prepareStackTrace = be;
|
|
285
285
|
}
|
|
286
286
|
var rr = M ? M.displayName || M.name : "", In = rr ? re(rr) : "";
|
|
287
287
|
return typeof M == "function" && de.set(M, In), In;
|
|
@@ -633,7 +633,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
633
633
|
}()), jr;
|
|
634
634
|
}
|
|
635
635
|
process.env.NODE_ENV === "production" ? Xi.exports = Om() : Xi.exports = Im();
|
|
636
|
-
var
|
|
636
|
+
var O = Xi.exports;
|
|
637
637
|
const Cm = {
|
|
638
638
|
// 充值相关
|
|
639
639
|
deposit: {
|
|
@@ -964,7 +964,7 @@ const Cm = {
|
|
|
964
964
|
translations: s
|
|
965
965
|
};
|
|
966
966
|
}, [e]);
|
|
967
|
-
return /* @__PURE__ */
|
|
967
|
+
return /* @__PURE__ */ O.jsx(Ff.Provider, { value: n, children: t });
|
|
968
968
|
}, jm = () => {
|
|
969
969
|
const e = Pe(Ff);
|
|
970
970
|
if (!e)
|
|
@@ -985,7 +985,7 @@ function Df(e) {
|
|
|
985
985
|
suffix: ""
|
|
986
986
|
}, v = "0123456789abcdefghijklmnopqrstuvwxyz", $ = !0;
|
|
987
987
|
function y(g, w) {
|
|
988
|
-
var P,
|
|
988
|
+
var P, I, T, S, E, x, R, N, b = this;
|
|
989
989
|
if (!(b instanceof y)) return new y(g, w);
|
|
990
990
|
if (w == null) {
|
|
991
991
|
if (g && g._isBigNumber === !0) {
|
|
@@ -998,54 +998,54 @@ function Df(e) {
|
|
|
998
998
|
S > d ? b.c = b.e = null : (b.e = S, b.c = [g]);
|
|
999
999
|
return;
|
|
1000
1000
|
}
|
|
1001
|
-
|
|
1001
|
+
N = String(g);
|
|
1002
1002
|
} else {
|
|
1003
|
-
if (!_m.test(
|
|
1004
|
-
b.s =
|
|
1003
|
+
if (!_m.test(N = String(g))) return r(b, N, x);
|
|
1004
|
+
b.s = N.charCodeAt(0) == 45 ? (N = N.slice(1), -1) : 1;
|
|
1005
1005
|
}
|
|
1006
|
-
(S =
|
|
1006
|
+
(S = N.indexOf(".")) > -1 && (N = N.replace(".", "")), (E = N.search(/e/i)) > 0 ? (S < 0 && (S = E), S += +N.slice(E + 1), N = N.substring(0, E)) : S < 0 && (S = N.length);
|
|
1007
1007
|
} else {
|
|
1008
1008
|
if (Ee(w, 2, v.length, "Base"), w == 10 && $)
|
|
1009
1009
|
return b = new y(g), F(b, i + b.e + 1, c);
|
|
1010
|
-
if (
|
|
1011
|
-
if (g * 0 != 0) return r(b,
|
|
1012
|
-
if (b.s = 1 / g < 0 ? (
|
|
1010
|
+
if (N = String(g), x = typeof g == "number") {
|
|
1011
|
+
if (g * 0 != 0) return r(b, N, x, w);
|
|
1012
|
+
if (b.s = 1 / g < 0 ? (N = N.slice(1), -1) : 1, y.DEBUG && N.replace(/^0\.0*|\./, "").length > 15)
|
|
1013
1013
|
throw Error(Dl + g);
|
|
1014
1014
|
} else
|
|
1015
|
-
b.s =
|
|
1016
|
-
for (P = v.slice(0, w), S = E = 0,
|
|
1017
|
-
if (P.indexOf(
|
|
1018
|
-
if (
|
|
1015
|
+
b.s = N.charCodeAt(0) === 45 ? (N = N.slice(1), -1) : 1;
|
|
1016
|
+
for (P = v.slice(0, w), S = E = 0, R = N.length; E < R; E++)
|
|
1017
|
+
if (P.indexOf(I = N.charAt(E)) < 0) {
|
|
1018
|
+
if (I == ".") {
|
|
1019
1019
|
if (E > S) {
|
|
1020
|
-
S =
|
|
1020
|
+
S = R;
|
|
1021
1021
|
continue;
|
|
1022
1022
|
}
|
|
1023
|
-
} else if (!
|
|
1024
|
-
|
|
1023
|
+
} else if (!T && (N == N.toUpperCase() && (N = N.toLowerCase()) || N == N.toLowerCase() && (N = N.toUpperCase()))) {
|
|
1024
|
+
T = !0, E = -1, S = 0;
|
|
1025
1025
|
continue;
|
|
1026
1026
|
}
|
|
1027
1027
|
return r(b, String(g), x, w);
|
|
1028
1028
|
}
|
|
1029
|
-
x = !1,
|
|
1029
|
+
x = !1, N = n(N, w, 10, b.s), (S = N.indexOf(".")) > -1 ? N = N.replace(".", "") : S = N.length;
|
|
1030
1030
|
}
|
|
1031
|
-
for (E = 0;
|
|
1032
|
-
for (
|
|
1033
|
-
if (
|
|
1034
|
-
if (
|
|
1031
|
+
for (E = 0; N.charCodeAt(E) === 48; E++) ;
|
|
1032
|
+
for (R = N.length; N.charCodeAt(--R) === 48; ) ;
|
|
1033
|
+
if (N = N.slice(E, ++R)) {
|
|
1034
|
+
if (R -= E, x && y.DEBUG && R > 15 && (g > pi || g !== ut(g)))
|
|
1035
1035
|
throw Error(Dl + b.s * g);
|
|
1036
1036
|
if ((S = S - E - 1) > d)
|
|
1037
1037
|
b.c = b.e = null;
|
|
1038
1038
|
else if (S < u)
|
|
1039
1039
|
b.c = [b.e = 0];
|
|
1040
1040
|
else {
|
|
1041
|
-
if (b.e = S, b.c = [], E = (S + 1) % ae, S < 0 && (E += ae), E <
|
|
1042
|
-
for (E && b.c.push(+
|
|
1043
|
-
b.c.push(+
|
|
1044
|
-
E = ae - (
|
|
1041
|
+
if (b.e = S, b.c = [], E = (S + 1) % ae, S < 0 && (E += ae), E < R) {
|
|
1042
|
+
for (E && b.c.push(+N.slice(0, E)), R -= ae; E < R; )
|
|
1043
|
+
b.c.push(+N.slice(E, E += ae));
|
|
1044
|
+
E = ae - (N = N.slice(E)).length;
|
|
1045
1045
|
} else
|
|
1046
|
-
E -=
|
|
1047
|
-
for (; E--;
|
|
1048
|
-
b.c.push(+
|
|
1046
|
+
E -= R;
|
|
1047
|
+
for (; E--; N += "0") ;
|
|
1048
|
+
b.c.push(+N);
|
|
1049
1049
|
}
|
|
1050
1050
|
} else
|
|
1051
1051
|
b.c = [b.e = 0];
|
|
@@ -1096,20 +1096,20 @@ function Df(e) {
|
|
|
1096
1096
|
}, y.isBigNumber = function(g) {
|
|
1097
1097
|
if (!g || g._isBigNumber !== !0) return !1;
|
|
1098
1098
|
if (!y.DEBUG) return !0;
|
|
1099
|
-
var w, P,
|
|
1100
|
-
e: if ({}.toString.call(
|
|
1101
|
-
if ((S === 1 || S === -1) &&
|
|
1102
|
-
if (
|
|
1103
|
-
if (
|
|
1099
|
+
var w, P, I = g.c, T = g.e, S = g.s;
|
|
1100
|
+
e: if ({}.toString.call(I) == "[object Array]") {
|
|
1101
|
+
if ((S === 1 || S === -1) && T >= -Be && T <= Be && T === ut(T)) {
|
|
1102
|
+
if (I[0] === 0) {
|
|
1103
|
+
if (T === 0 && I.length === 1) return !0;
|
|
1104
1104
|
break e;
|
|
1105
1105
|
}
|
|
1106
|
-
if (w = (
|
|
1107
|
-
for (w = 0; w <
|
|
1108
|
-
if (P =
|
|
1106
|
+
if (w = (T + 1) % ae, w < 1 && (w += ae), String(I[0]).length == w) {
|
|
1107
|
+
for (w = 0; w < I.length; w++)
|
|
1108
|
+
if (P = I[w], P < 0 || P >= xt || P !== ut(P)) break e;
|
|
1109
1109
|
if (P !== 0) return !0;
|
|
1110
1110
|
}
|
|
1111
1111
|
}
|
|
1112
|
-
} else if (
|
|
1112
|
+
} else if (I === null && T === null && (S === null || S === 1 || S === -1))
|
|
1113
1113
|
return !0;
|
|
1114
1114
|
throw Error(Ge + "Invalid BigNumber: " + g);
|
|
1115
1115
|
}, y.maximum = y.max = function() {
|
|
@@ -1123,203 +1123,203 @@ function Df(e) {
|
|
|
1123
1123
|
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
|
|
1124
1124
|
};
|
|
1125
1125
|
return function(P) {
|
|
1126
|
-
var
|
|
1126
|
+
var I, T, S, E, x, R = 0, N = [], b = new y(s);
|
|
1127
1127
|
if (P == null ? P = i : Ee(P, 0, Be), E = di(P / ae), f)
|
|
1128
1128
|
if (crypto.getRandomValues) {
|
|
1129
|
-
for (
|
|
1130
|
-
x =
|
|
1131
|
-
|
|
1129
|
+
for (I = crypto.getRandomValues(new Uint32Array(E *= 2)); R < E; )
|
|
1130
|
+
x = I[R] * 131072 + (I[R + 1] >>> 11), x >= 9e15 ? (T = crypto.getRandomValues(new Uint32Array(2)), I[R] = T[0], I[R + 1] = T[1]) : (N.push(x % 1e14), R += 2);
|
|
1131
|
+
R = E / 2;
|
|
1132
1132
|
} else if (crypto.randomBytes) {
|
|
1133
|
-
for (
|
|
1134
|
-
x = (
|
|
1135
|
-
|
|
1133
|
+
for (I = crypto.randomBytes(E *= 7); R < E; )
|
|
1134
|
+
x = (I[R] & 31) * 281474976710656 + I[R + 1] * 1099511627776 + I[R + 2] * 4294967296 + I[R + 3] * 16777216 + (I[R + 4] << 16) + (I[R + 5] << 8) + I[R + 6], x >= 9e15 ? crypto.randomBytes(7).copy(I, R) : (N.push(x % 1e14), R += 7);
|
|
1135
|
+
R = E / 7;
|
|
1136
1136
|
} else
|
|
1137
1137
|
throw f = !1, Error(Ge + "crypto unavailable");
|
|
1138
1138
|
if (!f)
|
|
1139
|
-
for (;
|
|
1140
|
-
x = w(), x < 9e15 && (R
|
|
1141
|
-
for (E =
|
|
1142
|
-
if (
|
|
1143
|
-
|
|
1139
|
+
for (; R < E; )
|
|
1140
|
+
x = w(), x < 9e15 && (N[R++] = x % 1e14);
|
|
1141
|
+
for (E = N[--R], P %= ae, E && P && (x = hi[ae - P], N[R] = ut(E / x) * x); N[R] === 0; N.pop(), R--) ;
|
|
1142
|
+
if (R < 0)
|
|
1143
|
+
N = [S = 0];
|
|
1144
1144
|
else {
|
|
1145
|
-
for (S = -1;
|
|
1146
|
-
for (
|
|
1147
|
-
|
|
1145
|
+
for (S = -1; N[0] === 0; N.splice(0, 1), S -= ae) ;
|
|
1146
|
+
for (R = 1, x = N[0]; x >= 10; x /= 10, R++) ;
|
|
1147
|
+
R < ae && (S -= ae - R);
|
|
1148
1148
|
}
|
|
1149
|
-
return b.e = S, b.c =
|
|
1149
|
+
return b.e = S, b.c = N, b;
|
|
1150
1150
|
};
|
|
1151
1151
|
}(), y.sum = function() {
|
|
1152
1152
|
for (var g = 1, w = arguments, P = new y(w[0]); g < w.length; ) P = P.plus(w[g++]);
|
|
1153
1153
|
return P;
|
|
1154
1154
|
}, n = /* @__PURE__ */ function() {
|
|
1155
1155
|
var g = "0123456789";
|
|
1156
|
-
function w(P,
|
|
1157
|
-
for (var E, x = [0],
|
|
1158
|
-
for (
|
|
1159
|
-
for (x[0] += S.indexOf(P.charAt(
|
|
1160
|
-
x[E] >
|
|
1156
|
+
function w(P, I, T, S) {
|
|
1157
|
+
for (var E, x = [0], R, N = 0, b = P.length; N < b; ) {
|
|
1158
|
+
for (R = x.length; R--; x[R] *= I) ;
|
|
1159
|
+
for (x[0] += S.indexOf(P.charAt(N++)), E = 0; E < x.length; E++)
|
|
1160
|
+
x[E] > T - 1 && (x[E + 1] == null && (x[E + 1] = 0), x[E + 1] += x[E] / T | 0, x[E] %= T);
|
|
1161
1161
|
}
|
|
1162
1162
|
return x.reverse();
|
|
1163
1163
|
}
|
|
1164
|
-
return function(P,
|
|
1165
|
-
var x,
|
|
1166
|
-
for (
|
|
1164
|
+
return function(P, I, T, S, E) {
|
|
1165
|
+
var x, R, N, b, C, k, j, _, z = P.indexOf("."), K = i, H = c;
|
|
1166
|
+
for (z >= 0 && (b = h, h = 0, P = P.replace(".", ""), _ = new y(I), k = _.pow(P.length - z), h = b, _.c = w(
|
|
1167
1167
|
Yt(at(k.c), k.e, "0"),
|
|
1168
1168
|
10,
|
|
1169
|
-
|
|
1169
|
+
T,
|
|
1170
1170
|
g
|
|
1171
|
-
),
|
|
1172
|
-
if (!
|
|
1173
|
-
if (
|
|
1171
|
+
), _.e = _.c.length), j = w(P, I, T, E ? (x = v, g) : (x = g, v)), N = b = j.length; j[--b] == 0; j.pop()) ;
|
|
1172
|
+
if (!j[0]) return x.charAt(0);
|
|
1173
|
+
if (z < 0 ? --N : (k.c = j, k.e = N, k.s = S, k = t(k, _, K, H, T), j = k.c, C = k.r, N = k.e), R = N + K + 1, z = j[R], b = T / 2, C = C || R < 0 || j[R + 1] != null, C = H < 4 ? (z != null || C) && (H == 0 || H == (k.s < 0 ? 3 : 2)) : z > b || z == b && (H == 4 || C || H == 6 && j[R - 1] & 1 || H == (k.s < 0 ? 8 : 7)), R < 1 || !j[0])
|
|
1174
1174
|
P = C ? Yt(x.charAt(1), -K, x.charAt(0)) : x.charAt(0);
|
|
1175
1175
|
else {
|
|
1176
|
-
if (
|
|
1177
|
-
for (--
|
|
1178
|
-
|
|
1179
|
-
for (b =
|
|
1180
|
-
for (
|
|
1181
|
-
P = Yt(P,
|
|
1176
|
+
if (j.length = R, C)
|
|
1177
|
+
for (--T; ++j[--R] > T; )
|
|
1178
|
+
j[R] = 0, R || (++N, j = [1].concat(j));
|
|
1179
|
+
for (b = j.length; !j[--b]; ) ;
|
|
1180
|
+
for (z = 0, P = ""; z <= b; P += x.charAt(j[z++])) ;
|
|
1181
|
+
P = Yt(P, N, x.charAt(0));
|
|
1182
1182
|
}
|
|
1183
1183
|
return P;
|
|
1184
1184
|
};
|
|
1185
1185
|
}(), t = /* @__PURE__ */ function() {
|
|
1186
|
-
function g(
|
|
1187
|
-
var E, x,
|
|
1188
|
-
for (
|
|
1189
|
-
|
|
1190
|
-
return b && (
|
|
1191
|
-
}
|
|
1192
|
-
function w(
|
|
1193
|
-
var x,
|
|
1186
|
+
function g(I, T, S) {
|
|
1187
|
+
var E, x, R, N, b = 0, C = I.length, k = T % gn, j = T / gn | 0;
|
|
1188
|
+
for (I = I.slice(); C--; )
|
|
1189
|
+
R = I[C] % gn, N = I[C] / gn | 0, E = j * R + N * k, x = k * R + E % gn * gn + b, b = (x / S | 0) + (E / gn | 0) + j * N, I[C] = x % S;
|
|
1190
|
+
return b && (I = [b].concat(I)), I;
|
|
1191
|
+
}
|
|
1192
|
+
function w(I, T, S, E) {
|
|
1193
|
+
var x, R;
|
|
1194
1194
|
if (S != E)
|
|
1195
|
-
|
|
1195
|
+
R = S > E ? 1 : -1;
|
|
1196
1196
|
else
|
|
1197
|
-
for (x =
|
|
1198
|
-
if (
|
|
1199
|
-
|
|
1197
|
+
for (x = R = 0; x < S; x++)
|
|
1198
|
+
if (I[x] != T[x]) {
|
|
1199
|
+
R = I[x] > T[x] ? 1 : -1;
|
|
1200
1200
|
break;
|
|
1201
1201
|
}
|
|
1202
|
-
return
|
|
1202
|
+
return R;
|
|
1203
1203
|
}
|
|
1204
|
-
function P(
|
|
1204
|
+
function P(I, T, S, E) {
|
|
1205
1205
|
for (var x = 0; S--; )
|
|
1206
|
-
|
|
1207
|
-
for (; !
|
|
1206
|
+
I[S] -= x, x = I[S] < T[S] ? 1 : 0, I[S] = x * E + I[S] - T[S];
|
|
1207
|
+
for (; !I[0] && I.length > 1; I.splice(0, 1)) ;
|
|
1208
1208
|
}
|
|
1209
|
-
return function(
|
|
1210
|
-
var
|
|
1209
|
+
return function(I, T, S, E, x) {
|
|
1210
|
+
var R, N, b, C, k, j, _, z, K, H, q, V, re, te, de, Re, je, Y = I.s == T.s ? 1 : -1, ne = I.c, Q = T.c;
|
|
1211
1211
|
if (!ne || !ne[0] || !Q || !Q[0])
|
|
1212
1212
|
return new y(
|
|
1213
1213
|
// Return NaN if either NaN, or both Infinity or 0.
|
|
1214
|
-
!
|
|
1214
|
+
!I.s || !T.s || (ne ? Q && ne[0] == Q[0] : !Q) ? NaN : (
|
|
1215
1215
|
// Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
|
|
1216
1216
|
ne && ne[0] == 0 || !Q ? Y * 0 : Y / 0
|
|
1217
1217
|
)
|
|
1218
1218
|
);
|
|
1219
|
-
for (
|
|
1220
|
-
if (Q[b] > (ne[b] || 0) &&
|
|
1219
|
+
for (z = new y(Y), K = z.c = [], N = I.e - T.e, Y = S + N + 1, x || (x = xt, N = ft(I.e / ae) - ft(T.e / ae), Y = Y / ae | 0), b = 0; Q[b] == (ne[b] || 0); b++) ;
|
|
1220
|
+
if (Q[b] > (ne[b] || 0) && N--, Y < 0)
|
|
1221
1221
|
K.push(1), C = !0;
|
|
1222
1222
|
else {
|
|
1223
|
-
for (te = ne.length, Re = Q.length, b = 0, Y += 2, k = ut(x / (Q[0] + 1)), k > 1 && (Q = g(Q, k, x), ne = g(ne, k, x), Re = Q.length, te = ne.length), re = Re,
|
|
1223
|
+
for (te = ne.length, Re = Q.length, b = 0, Y += 2, k = ut(x / (Q[0] + 1)), k > 1 && (Q = g(Q, k, x), ne = g(ne, k, x), Re = Q.length, te = ne.length), re = Re, H = ne.slice(0, Re), q = H.length; q < Re; H[q++] = 0) ;
|
|
1224
1224
|
je = Q.slice(), je = [0].concat(je), de = Q[0], Q[1] >= x / 2 && de++;
|
|
1225
1225
|
do {
|
|
1226
|
-
if (k = 0,
|
|
1227
|
-
if (V =
|
|
1228
|
-
for (k >= x && (k = x - 1),
|
|
1229
|
-
k--, P(
|
|
1226
|
+
if (k = 0, R = w(Q, H, Re, q), R < 0) {
|
|
1227
|
+
if (V = H[0], Re != q && (V = V * x + (H[1] || 0)), k = ut(V / de), k > 1)
|
|
1228
|
+
for (k >= x && (k = x - 1), j = g(Q, k, x), _ = j.length, q = H.length; w(j, H, _, q) == 1; )
|
|
1229
|
+
k--, P(j, Re < _ ? je : Q, _, x), _ = j.length, R = 1;
|
|
1230
1230
|
else
|
|
1231
|
-
k == 0 && (
|
|
1232
|
-
if (
|
|
1233
|
-
for (; w(Q,
|
|
1234
|
-
k++, P(
|
|
1235
|
-
} else
|
|
1236
|
-
K[b++] = k,
|
|
1237
|
-
} while ((re++ < te ||
|
|
1238
|
-
C =
|
|
1231
|
+
k == 0 && (R = k = 1), j = Q.slice(), _ = j.length;
|
|
1232
|
+
if (_ < q && (j = [0].concat(j)), P(H, j, q, x), q = H.length, R == -1)
|
|
1233
|
+
for (; w(Q, H, Re, q) < 1; )
|
|
1234
|
+
k++, P(H, Re < q ? je : Q, q, x), q = H.length;
|
|
1235
|
+
} else R === 0 && (k++, H = [0]);
|
|
1236
|
+
K[b++] = k, H[0] ? H[q++] = ne[re] || 0 : (H = [ne[re]], q = 1);
|
|
1237
|
+
} while ((re++ < te || H[0] != null) && Y--);
|
|
1238
|
+
C = H[0] != null, K[0] || K.splice(0, 1);
|
|
1239
1239
|
}
|
|
1240
1240
|
if (x == xt) {
|
|
1241
1241
|
for (b = 1, Y = K[0]; Y >= 10; Y /= 10, b++) ;
|
|
1242
|
-
F(
|
|
1242
|
+
F(z, S + (z.e = b + N * ae - 1) + 1, E, C);
|
|
1243
1243
|
} else
|
|
1244
|
-
|
|
1245
|
-
return
|
|
1244
|
+
z.e = N, z.r = +C;
|
|
1245
|
+
return z;
|
|
1246
1246
|
};
|
|
1247
1247
|
}();
|
|
1248
|
-
function A(g, w, P,
|
|
1249
|
-
var
|
|
1248
|
+
function A(g, w, P, I) {
|
|
1249
|
+
var T, S, E, x, R;
|
|
1250
1250
|
if (P == null ? P = c : Ee(P, 0, 8), !g.c) return g.toString();
|
|
1251
|
-
if (
|
|
1252
|
-
|
|
1253
|
-
else if (g = F(new y(g), w, P), S = g.e,
|
|
1254
|
-
for (; x < w;
|
|
1255
|
-
|
|
1256
|
-
} else if (w -= E + (
|
|
1257
|
-
if (--w > 0) for (
|
|
1251
|
+
if (T = g.c[0], E = g.e, w == null)
|
|
1252
|
+
R = at(g.c), R = I == 1 || I == 2 && (E <= a || E >= l) ? Wo(R, E) : Yt(R, E, "0");
|
|
1253
|
+
else if (g = F(new y(g), w, P), S = g.e, R = at(g.c), x = R.length, I == 1 || I == 2 && (w <= S || S <= a)) {
|
|
1254
|
+
for (; x < w; R += "0", x++) ;
|
|
1255
|
+
R = Wo(R, S);
|
|
1256
|
+
} else if (w -= E + (I === 2 && S > E), R = Yt(R, S, "0"), S + 1 > x) {
|
|
1257
|
+
if (--w > 0) for (R += "."; w--; R += "0") ;
|
|
1258
1258
|
} else if (w += S - x, w > 0)
|
|
1259
|
-
for (S + 1 == x && (
|
|
1260
|
-
return g.s < 0 &&
|
|
1259
|
+
for (S + 1 == x && (R += "."); w--; R += "0") ;
|
|
1260
|
+
return g.s < 0 && T ? "-" + R : R;
|
|
1261
1261
|
}
|
|
1262
1262
|
function B(g, w) {
|
|
1263
|
-
for (var P,
|
|
1264
|
-
|
|
1263
|
+
for (var P, I, T = 1, S = new y(g[0]); T < g.length; T++)
|
|
1264
|
+
I = new y(g[T]), (!I.s || (P = Cn(S, I)) === w || P === 0 && S.s === w) && (S = I);
|
|
1265
1265
|
return S;
|
|
1266
1266
|
}
|
|
1267
1267
|
function L(g, w, P) {
|
|
1268
|
-
for (var
|
|
1269
|
-
for (
|
|
1270
|
-
return (P =
|
|
1268
|
+
for (var I = 1, T = w.length; !w[--T]; w.pop()) ;
|
|
1269
|
+
for (T = w[0]; T >= 10; T /= 10, I++) ;
|
|
1270
|
+
return (P = I + P * ae - 1) > d ? g.c = g.e = null : P < u ? g.c = [g.e = 0] : (g.e = P, g.c = w), g;
|
|
1271
1271
|
}
|
|
1272
1272
|
r = /* @__PURE__ */ function() {
|
|
1273
|
-
var g = /^(-?)0([xbo])(?=\w[\w.]*$)/i, w = /^([^.]+)\.$/, P = /^\.([^.]+)$/,
|
|
1274
|
-
return function(S, E, x,
|
|
1275
|
-
var
|
|
1276
|
-
if (
|
|
1273
|
+
var g = /^(-?)0([xbo])(?=\w[\w.]*$)/i, w = /^([^.]+)\.$/, P = /^\.([^.]+)$/, I = /^-?(Infinity|NaN)$/, T = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
|
|
1274
|
+
return function(S, E, x, R) {
|
|
1275
|
+
var N, b = x ? E : E.replace(T, "");
|
|
1276
|
+
if (I.test(b))
|
|
1277
1277
|
S.s = isNaN(b) ? null : b < 0 ? -1 : 1;
|
|
1278
1278
|
else {
|
|
1279
|
-
if (!x && (b = b.replace(g, function(C, k,
|
|
1280
|
-
return
|
|
1281
|
-
}),
|
|
1282
|
-
return new y(b,
|
|
1279
|
+
if (!x && (b = b.replace(g, function(C, k, j) {
|
|
1280
|
+
return N = (j = j.toLowerCase()) == "x" ? 16 : j == "b" ? 2 : 8, !R || R == N ? k : C;
|
|
1281
|
+
}), R && (N = R, b = b.replace(w, "$1").replace(P, "0.$1")), E != b))
|
|
1282
|
+
return new y(b, N);
|
|
1283
1283
|
if (y.DEBUG)
|
|
1284
|
-
throw Error(Ge + "Not a" + (
|
|
1284
|
+
throw Error(Ge + "Not a" + (R ? " base " + R : "") + " number: " + E);
|
|
1285
1285
|
S.s = null;
|
|
1286
1286
|
}
|
|
1287
1287
|
S.c = S.e = null;
|
|
1288
1288
|
};
|
|
1289
1289
|
}();
|
|
1290
|
-
function F(g, w, P,
|
|
1291
|
-
var
|
|
1290
|
+
function F(g, w, P, I) {
|
|
1291
|
+
var T, S, E, x, R, N, b, C = g.c, k = hi;
|
|
1292
1292
|
if (C) {
|
|
1293
1293
|
e: {
|
|
1294
|
-
for (
|
|
1295
|
-
if (S = w -
|
|
1296
|
-
S += ae, E = w,
|
|
1297
|
-
else if (
|
|
1298
|
-
if (
|
|
1299
|
-
for (; C.length <=
|
|
1300
|
-
|
|
1294
|
+
for (T = 1, x = C[0]; x >= 10; x /= 10, T++) ;
|
|
1295
|
+
if (S = w - T, S < 0)
|
|
1296
|
+
S += ae, E = w, R = C[N = 0], b = ut(R / k[T - E - 1] % 10);
|
|
1297
|
+
else if (N = di((S + 1) / ae), N >= C.length)
|
|
1298
|
+
if (I) {
|
|
1299
|
+
for (; C.length <= N; C.push(0)) ;
|
|
1300
|
+
R = b = 0, T = 1, S %= ae, E = S - ae + 1;
|
|
1301
1301
|
} else
|
|
1302
1302
|
break e;
|
|
1303
1303
|
else {
|
|
1304
|
-
for (
|
|
1305
|
-
S %= ae, E = S - ae +
|
|
1304
|
+
for (R = x = C[N], T = 1; x >= 10; x /= 10, T++) ;
|
|
1305
|
+
S %= ae, E = S - ae + T, b = E < 0 ? 0 : ut(R / k[T - E - 1] % 10);
|
|
1306
1306
|
}
|
|
1307
|
-
if (
|
|
1307
|
+
if (I = I || w < 0 || // Are there any non-zero digits after the rounding digit?
|
|
1308
1308
|
// The expression n % pows10[d - j - 1] returns all digits of n to the right
|
|
1309
1309
|
// of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
|
|
1310
|
-
C[
|
|
1311
|
-
(S > 0 ? E > 0 ?
|
|
1312
|
-
return C.length = 0,
|
|
1313
|
-
if (S == 0 ? (C.length =
|
|
1310
|
+
C[N + 1] != null || (E < 0 ? R : R % k[T - E - 1]), I = P < 4 ? (b || I) && (P == 0 || P == (g.s < 0 ? 3 : 2)) : b > 5 || b == 5 && (P == 4 || I || P == 6 && // Check whether the digit to the left of the rounding digit is odd.
|
|
1311
|
+
(S > 0 ? E > 0 ? R / k[T - E] : 0 : C[N - 1]) % 10 & 1 || P == (g.s < 0 ? 8 : 7)), w < 1 || !C[0])
|
|
1312
|
+
return C.length = 0, I ? (w -= g.e + 1, C[0] = k[(ae - w % ae) % ae], g.e = -w || 0) : C[0] = g.e = 0, g;
|
|
1313
|
+
if (S == 0 ? (C.length = N, x = 1, N--) : (C.length = N + 1, x = k[ae - S], C[N] = E > 0 ? ut(R / k[T - E] % k[E]) * x : 0), I)
|
|
1314
1314
|
for (; ; )
|
|
1315
|
-
if (
|
|
1315
|
+
if (N == 0) {
|
|
1316
1316
|
for (S = 1, E = C[0]; E >= 10; E /= 10, S++) ;
|
|
1317
1317
|
for (E = C[0] += x, x = 1; E >= 10; E /= 10, x++) ;
|
|
1318
1318
|
S != x && (g.e++, C[0] == xt && (C[0] = 1));
|
|
1319
1319
|
break;
|
|
1320
1320
|
} else {
|
|
1321
|
-
if (C[
|
|
1322
|
-
C[
|
|
1321
|
+
if (C[N] += x, C[N] != xt) break;
|
|
1322
|
+
C[N--] = 0, x = 1;
|
|
1323
1323
|
}
|
|
1324
1324
|
for (S = C.length; C[--S] === 0; C.pop()) ;
|
|
1325
1325
|
}
|
|
@@ -1327,7 +1327,7 @@ function Df(e) {
|
|
|
1327
1327
|
}
|
|
1328
1328
|
return g;
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function D(g) {
|
|
1331
1331
|
var w, P = g.e;
|
|
1332
1332
|
return P === null ? g.toString() : (w = at(g.c), w = P <= a || P >= l ? Wo(w, P) : Yt(w, P, "0"), g.s < 0 ? "-" + w : w);
|
|
1333
1333
|
}
|
|
@@ -1337,47 +1337,47 @@ function Df(e) {
|
|
|
1337
1337
|
}, o.comparedTo = function(g, w) {
|
|
1338
1338
|
return Cn(this, new y(g, w));
|
|
1339
1339
|
}, o.decimalPlaces = o.dp = function(g, w) {
|
|
1340
|
-
var P,
|
|
1340
|
+
var P, I, T, S = this;
|
|
1341
1341
|
if (g != null)
|
|
1342
1342
|
return Ee(g, 0, Be), w == null ? w = c : Ee(w, 0, 8), F(new y(S), g + S.e + 1, w);
|
|
1343
1343
|
if (!(P = S.c)) return null;
|
|
1344
|
-
if (
|
|
1345
|
-
return
|
|
1344
|
+
if (I = ((T = P.length - 1) - ft(this.e / ae)) * ae, T = P[T]) for (; T % 10 == 0; T /= 10, I--) ;
|
|
1345
|
+
return I < 0 && (I = 0), I;
|
|
1346
1346
|
}, o.dividedBy = o.div = function(g, w) {
|
|
1347
1347
|
return t(this, new y(g, w), i, c);
|
|
1348
1348
|
}, o.dividedToIntegerBy = o.idiv = function(g, w) {
|
|
1349
1349
|
return t(this, new y(g, w), 0, 1);
|
|
1350
1350
|
}, o.exponentiatedBy = o.pow = function(g, w) {
|
|
1351
|
-
var P,
|
|
1351
|
+
var P, I, T, S, E, x, R, N, b, C = this;
|
|
1352
1352
|
if (g = new y(g), g.c && !g.isInteger())
|
|
1353
|
-
throw Error(Ge + "Exponent not an integer: " +
|
|
1353
|
+
throw Error(Ge + "Exponent not an integer: " + D(g));
|
|
1354
1354
|
if (w != null && (w = new y(w)), x = g.e > 14, !C.c || !C.c[0] || C.c[0] == 1 && !C.e && C.c.length == 1 || !g.c || !g.c[0])
|
|
1355
|
-
return b = new y(Math.pow(+
|
|
1356
|
-
if (
|
|
1355
|
+
return b = new y(Math.pow(+D(C), x ? g.s * (2 - Ho(g)) : +D(g))), w ? b.mod(w) : b;
|
|
1356
|
+
if (R = g.s < 0, w) {
|
|
1357
1357
|
if (w.c ? !w.c[0] : !w.s) return new y(NaN);
|
|
1358
|
-
|
|
1358
|
+
I = !R && C.isInteger() && w.isInteger(), I && (C = C.mod(w));
|
|
1359
1359
|
} else {
|
|
1360
1360
|
if (g.e > 9 && (C.e > 0 || C.e < -1 || (C.e == 0 ? C.c[0] > 1 || x && C.c[1] >= 24e7 : C.c[0] < 8e13 || x && C.c[0] <= 9999975e7)))
|
|
1361
|
-
return S = C.s < 0 && Ho(g) ? -0 : 0, C.e > -1 && (S = 1 / S), new y(
|
|
1361
|
+
return S = C.s < 0 && Ho(g) ? -0 : 0, C.e > -1 && (S = 1 / S), new y(R ? 1 / S : S);
|
|
1362
1362
|
h && (S = di(h / ae + 2));
|
|
1363
1363
|
}
|
|
1364
|
-
for (x ? (P = new y(0.5),
|
|
1365
|
-
if (
|
|
1364
|
+
for (x ? (P = new y(0.5), R && (g.s = 1), N = Ho(g)) : (T = Math.abs(+D(g)), N = T % 2), b = new y(s); ; ) {
|
|
1365
|
+
if (N) {
|
|
1366
1366
|
if (b = b.times(C), !b.c) break;
|
|
1367
|
-
S ? b.c.length > S && (b.c.length = S) :
|
|
1367
|
+
S ? b.c.length > S && (b.c.length = S) : I && (b = b.mod(w));
|
|
1368
1368
|
}
|
|
1369
|
-
if (
|
|
1370
|
-
if (
|
|
1371
|
-
|
|
1369
|
+
if (T) {
|
|
1370
|
+
if (T = ut(T / 2), T === 0) break;
|
|
1371
|
+
N = T % 2;
|
|
1372
1372
|
} else if (g = g.times(P), F(g, g.e + 1, 1), g.e > 14)
|
|
1373
|
-
|
|
1373
|
+
N = Ho(g);
|
|
1374
1374
|
else {
|
|
1375
|
-
if (
|
|
1376
|
-
|
|
1375
|
+
if (T = +D(g), T === 0) break;
|
|
1376
|
+
N = T % 2;
|
|
1377
1377
|
}
|
|
1378
|
-
C = C.times(C), S ? C.c && C.c.length > S && (C.c.length = S) :
|
|
1378
|
+
C = C.times(C), S ? C.c && C.c.length > S && (C.c.length = S) : I && (C = C.mod(w));
|
|
1379
1379
|
}
|
|
1380
|
-
return
|
|
1380
|
+
return I ? b : (R && (b = s.div(b)), w ? b.mod(w) : S ? F(b, h, c, E) : b);
|
|
1381
1381
|
}, o.integerValue = function(g) {
|
|
1382
1382
|
var w = new y(this);
|
|
1383
1383
|
return g == null ? g = c : Ee(g, 0, 8), F(w, w.e + 1, g);
|
|
@@ -1404,12 +1404,12 @@ function Df(e) {
|
|
|
1404
1404
|
}, o.isZero = function() {
|
|
1405
1405
|
return !!this.c && this.c[0] == 0;
|
|
1406
1406
|
}, o.minus = function(g, w) {
|
|
1407
|
-
var P,
|
|
1407
|
+
var P, I, T, S, E = this, x = E.s;
|
|
1408
1408
|
if (g = new y(g, w), w = g.s, !x || !w) return new y(NaN);
|
|
1409
1409
|
if (x != w)
|
|
1410
1410
|
return g.s = -w, E.plus(g);
|
|
1411
|
-
var
|
|
1412
|
-
if (!
|
|
1411
|
+
var R = E.e / ae, N = g.e / ae, b = E.c, C = g.c;
|
|
1412
|
+
if (!R || !N) {
|
|
1413
1413
|
if (!b || !C) return b ? (g.s = -w, g) : new y(C ? E : NaN);
|
|
1414
1414
|
if (!b[0] || !C[0])
|
|
1415
1415
|
return C[0] ? (g.s = -w, g) : new y(b[0] ? E : (
|
|
@@ -1417,84 +1417,84 @@ function Df(e) {
|
|
|
1417
1417
|
c == 3 ? -0 : 0
|
|
1418
1418
|
));
|
|
1419
1419
|
}
|
|
1420
|
-
if (
|
|
1421
|
-
for ((S = x < 0) ? (x = -x,
|
|
1422
|
-
|
|
1420
|
+
if (R = ft(R), N = ft(N), b = b.slice(), x = R - N) {
|
|
1421
|
+
for ((S = x < 0) ? (x = -x, T = b) : (N = R, T = C), T.reverse(), w = x; w--; T.push(0)) ;
|
|
1422
|
+
T.reverse();
|
|
1423
1423
|
} else
|
|
1424
|
-
for (
|
|
1424
|
+
for (I = (S = (x = b.length) < (w = C.length)) ? x : w, x = w = 0; w < I; w++)
|
|
1425
1425
|
if (b[w] != C[w]) {
|
|
1426
1426
|
S = b[w] < C[w];
|
|
1427
1427
|
break;
|
|
1428
1428
|
}
|
|
1429
|
-
if (S && (
|
|
1430
|
-
for (w = xt - 1;
|
|
1431
|
-
if (b[--
|
|
1432
|
-
for (P =
|
|
1433
|
-
--b[P], b[
|
|
1429
|
+
if (S && (T = b, b = C, C = T, g.s = -g.s), w = (I = C.length) - (P = b.length), w > 0) for (; w--; b[P++] = 0) ;
|
|
1430
|
+
for (w = xt - 1; I > x; ) {
|
|
1431
|
+
if (b[--I] < C[I]) {
|
|
1432
|
+
for (P = I; P && !b[--P]; b[P] = w) ;
|
|
1433
|
+
--b[P], b[I] += xt;
|
|
1434
1434
|
}
|
|
1435
|
-
b[
|
|
1435
|
+
b[I] -= C[I];
|
|
1436
1436
|
}
|
|
1437
|
-
for (; b[0] == 0; b.splice(0, 1), --
|
|
1438
|
-
return b[0] ? L(g, b,
|
|
1437
|
+
for (; b[0] == 0; b.splice(0, 1), --N) ;
|
|
1438
|
+
return b[0] ? L(g, b, N) : (g.s = c == 3 ? -1 : 1, g.c = [g.e = 0], g);
|
|
1439
1439
|
}, o.modulo = o.mod = function(g, w) {
|
|
1440
|
-
var P,
|
|
1441
|
-
return g = new y(g, w), !
|
|
1440
|
+
var P, I, T = this;
|
|
1441
|
+
return g = new y(g, w), !T.c || !g.s || g.c && !g.c[0] ? new y(NaN) : !g.c || T.c && !T.c[0] ? new y(T) : (p == 9 ? (I = g.s, g.s = 1, P = t(T, g, 0, 3), g.s = I, P.s *= I) : P = t(T, g, 0, p), g = T.minus(P.times(g)), !g.c[0] && p == 1 && (g.s = T.s), g);
|
|
1442
1442
|
}, o.multipliedBy = o.times = function(g, w) {
|
|
1443
|
-
var P,
|
|
1443
|
+
var P, I, T, S, E, x, R, N, b, C, k, j, _, z, K, H = this, q = H.c, V = (g = new y(g, w)).c;
|
|
1444
1444
|
if (!q || !V || !q[0] || !V[0])
|
|
1445
|
-
return !
|
|
1446
|
-
for (
|
|
1447
|
-
for (
|
|
1448
|
-
for (P = 0, k = V[
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
}
|
|
1452
|
-
return P ? ++
|
|
1445
|
+
return !H.s || !g.s || q && !q[0] && !V || V && !V[0] && !q ? g.c = g.e = g.s = null : (g.s *= H.s, !q || !V ? g.c = g.e = null : (g.c = [0], g.e = 0)), g;
|
|
1446
|
+
for (I = ft(H.e / ae) + ft(g.e / ae), g.s *= H.s, R = q.length, C = V.length, R < C && (_ = q, q = V, V = _, T = R, R = C, C = T), T = R + C, _ = []; T--; _.push(0)) ;
|
|
1447
|
+
for (z = xt, K = gn, T = C; --T >= 0; ) {
|
|
1448
|
+
for (P = 0, k = V[T] % K, j = V[T] / K | 0, E = R, S = T + E; S > T; )
|
|
1449
|
+
N = q[--E] % K, b = q[E] / K | 0, x = j * N + b * k, N = k * N + x % K * K + _[S] + P, P = (N / z | 0) + (x / K | 0) + j * b, _[S--] = N % z;
|
|
1450
|
+
_[S] = P;
|
|
1451
|
+
}
|
|
1452
|
+
return P ? ++I : _.splice(0, 1), L(g, _, I);
|
|
1453
1453
|
}, o.negated = function() {
|
|
1454
1454
|
var g = new y(this);
|
|
1455
1455
|
return g.s = -g.s || null, g;
|
|
1456
1456
|
}, o.plus = function(g, w) {
|
|
1457
|
-
var P,
|
|
1458
|
-
if (g = new y(g, w), w = g.s, !
|
|
1459
|
-
if (
|
|
1460
|
-
return g.s = -w,
|
|
1461
|
-
var S =
|
|
1457
|
+
var P, I = this, T = I.s;
|
|
1458
|
+
if (g = new y(g, w), w = g.s, !T || !w) return new y(NaN);
|
|
1459
|
+
if (T != w)
|
|
1460
|
+
return g.s = -w, I.minus(g);
|
|
1461
|
+
var S = I.e / ae, E = g.e / ae, x = I.c, R = g.c;
|
|
1462
1462
|
if (!S || !E) {
|
|
1463
|
-
if (!x || !
|
|
1464
|
-
if (!x[0] || !
|
|
1463
|
+
if (!x || !R) return new y(T / 0);
|
|
1464
|
+
if (!x[0] || !R[0]) return R[0] ? g : new y(x[0] ? I : T * 0);
|
|
1465
1465
|
}
|
|
1466
|
-
if (S = ft(S), E = ft(E), x = x.slice(),
|
|
1467
|
-
for (
|
|
1466
|
+
if (S = ft(S), E = ft(E), x = x.slice(), T = S - E) {
|
|
1467
|
+
for (T > 0 ? (E = S, P = R) : (T = -T, P = x), P.reverse(); T--; P.push(0)) ;
|
|
1468
1468
|
P.reverse();
|
|
1469
1469
|
}
|
|
1470
|
-
for (
|
|
1471
|
-
|
|
1472
|
-
return
|
|
1470
|
+
for (T = x.length, w = R.length, T - w < 0 && (P = R, R = x, x = P, w = T), T = 0; w; )
|
|
1471
|
+
T = (x[--w] = x[w] + R[w] + T) / xt | 0, x[w] = xt === x[w] ? 0 : x[w] % xt;
|
|
1472
|
+
return T && (x = [T].concat(x), ++E), L(g, x, E);
|
|
1473
1473
|
}, o.precision = o.sd = function(g, w) {
|
|
1474
|
-
var P,
|
|
1474
|
+
var P, I, T, S = this;
|
|
1475
1475
|
if (g != null && g !== !!g)
|
|
1476
1476
|
return Ee(g, 1, Be), w == null ? w = c : Ee(w, 0, 8), F(new y(S), g, w);
|
|
1477
1477
|
if (!(P = S.c)) return null;
|
|
1478
|
-
if (
|
|
1479
|
-
for (;
|
|
1480
|
-
for (
|
|
1478
|
+
if (T = P.length - 1, I = T * ae + 1, T = P[T]) {
|
|
1479
|
+
for (; T % 10 == 0; T /= 10, I--) ;
|
|
1480
|
+
for (T = P[0]; T >= 10; T /= 10, I++) ;
|
|
1481
1481
|
}
|
|
1482
|
-
return g && S.e + 1 >
|
|
1482
|
+
return g && S.e + 1 > I && (I = S.e + 1), I;
|
|
1483
1483
|
}, o.shiftedBy = function(g) {
|
|
1484
1484
|
return Ee(g, -pi, pi), this.times("1e" + g);
|
|
1485
1485
|
}, o.squareRoot = o.sqrt = function() {
|
|
1486
|
-
var g, w, P,
|
|
1486
|
+
var g, w, P, I, T, S = this, E = S.c, x = S.s, R = S.e, N = i + 4, b = new y("0.5");
|
|
1487
1487
|
if (x !== 1 || !E || !E[0])
|
|
1488
1488
|
return new y(!x || x < 0 && (!E || E[0]) ? NaN : E ? S : 1 / 0);
|
|
1489
|
-
if (x = Math.sqrt(+
|
|
1490
|
-
for (
|
|
1491
|
-
if (
|
|
1492
|
-
if (P.e <
|
|
1493
|
-
if (!
|
|
1494
|
-
P =
|
|
1489
|
+
if (x = Math.sqrt(+D(S)), x == 0 || x == 1 / 0 ? (w = at(E), (w.length + R) % 2 == 0 && (w += "0"), x = Math.sqrt(+w), R = ft((R + 1) / 2) - (R < 0 || R % 2), x == 1 / 0 ? w = "5e" + R : (w = x.toExponential(), w = w.slice(0, w.indexOf("e") + 1) + R), P = new y(w)) : P = new y(x + ""), P.c[0]) {
|
|
1490
|
+
for (R = P.e, x = R + N, x < 3 && (x = 0); ; )
|
|
1491
|
+
if (T = P, P = b.times(T.plus(t(S, T, N, 1))), at(T.c).slice(0, x) === (w = at(P.c)).slice(0, x))
|
|
1492
|
+
if (P.e < R && --x, w = w.slice(x - 3, x + 1), w == "9999" || !I && w == "4999") {
|
|
1493
|
+
if (!I && (F(T, T.e + i + 2, 0), T.times(T).eq(S))) {
|
|
1494
|
+
P = T;
|
|
1495
1495
|
break;
|
|
1496
1496
|
}
|
|
1497
|
-
|
|
1497
|
+
N += 4, x += 4, I = 1;
|
|
1498
1498
|
} else {
|
|
1499
1499
|
(!+w || !+w.slice(1) && w.charAt(0) == "5") && (F(P, P.e + i + 2, 1), g = !P.times(P).eq(S));
|
|
1500
1500
|
break;
|
|
@@ -1506,42 +1506,42 @@ function Df(e) {
|
|
|
1506
1506
|
}, o.toFixed = function(g, w) {
|
|
1507
1507
|
return g != null && (Ee(g, 0, Be), g = g + this.e + 1), A(this, g, w);
|
|
1508
1508
|
}, o.toFormat = function(g, w, P) {
|
|
1509
|
-
var
|
|
1509
|
+
var I, T = this;
|
|
1510
1510
|
if (P == null)
|
|
1511
1511
|
g != null && w && typeof w == "object" ? (P = w, w = null) : g && typeof g == "object" ? (P = g, g = w = null) : P = m;
|
|
1512
1512
|
else if (typeof P != "object")
|
|
1513
1513
|
throw Error(Ge + "Argument not an object: " + P);
|
|
1514
|
-
if (
|
|
1515
|
-
var S, E =
|
|
1516
|
-
if (
|
|
1517
|
-
for (S =
|
|
1518
|
-
|
|
1514
|
+
if (I = T.toFixed(g, w), T.c) {
|
|
1515
|
+
var S, E = I.split("."), x = +P.groupSize, R = +P.secondaryGroupSize, N = P.groupSeparator || "", b = E[0], C = E[1], k = T.s < 0, j = k ? b.slice(1) : b, _ = j.length;
|
|
1516
|
+
if (R && (S = x, x = R, R = S, _ -= S), x > 0 && _ > 0) {
|
|
1517
|
+
for (S = _ % x || x, b = j.substr(0, S); S < _; S += x) b += N + j.substr(S, x);
|
|
1518
|
+
R > 0 && (b += N + j.slice(S)), k && (b = "-" + b);
|
|
1519
1519
|
}
|
|
1520
|
-
|
|
1521
|
-
new RegExp("\\d{" +
|
|
1520
|
+
I = C ? b + (P.decimalSeparator || "") + ((R = +P.fractionGroupSize) ? C.replace(
|
|
1521
|
+
new RegExp("\\d{" + R + "}\\B", "g"),
|
|
1522
1522
|
"$&" + (P.fractionGroupSeparator || "")
|
|
1523
1523
|
) : C) : b;
|
|
1524
1524
|
}
|
|
1525
|
-
return (P.prefix || "") +
|
|
1525
|
+
return (P.prefix || "") + I + (P.suffix || "");
|
|
1526
1526
|
}, o.toFraction = function(g) {
|
|
1527
|
-
var w, P,
|
|
1527
|
+
var w, P, I, T, S, E, x, R, N, b, C, k, j = this, _ = j.c;
|
|
1528
1528
|
if (g != null && (x = new y(g), !x.isInteger() && (x.c || x.s !== 1) || x.lt(s)))
|
|
1529
|
-
throw Error(Ge + "Argument " + (x.isInteger() ? "out of range: " : "not an integer: ") +
|
|
1530
|
-
if (!
|
|
1531
|
-
for (w = new y(s),
|
|
1532
|
-
P =
|
|
1533
|
-
return
|
|
1534
|
-
t(
|
|
1535
|
-
) < 1 ? [
|
|
1529
|
+
throw Error(Ge + "Argument " + (x.isInteger() ? "out of range: " : "not an integer: ") + D(x));
|
|
1530
|
+
if (!_) return new y(j);
|
|
1531
|
+
for (w = new y(s), N = P = new y(s), I = R = new y(s), k = at(_), S = w.e = k.length - j.e - 1, w.c[0] = hi[(E = S % ae) < 0 ? ae + E : E], g = !g || x.comparedTo(w) > 0 ? S > 0 ? w : N : x, E = d, d = 1 / 0, x = new y(k), R.c[0] = 0; b = t(x, w, 0, 1), T = P.plus(b.times(I)), T.comparedTo(g) != 1; )
|
|
1532
|
+
P = I, I = T, N = R.plus(b.times(T = N)), R = T, w = x.minus(b.times(T = w)), x = T;
|
|
1533
|
+
return T = t(g.minus(P), I, 0, 1), R = R.plus(T.times(N)), P = P.plus(T.times(I)), R.s = N.s = j.s, S = S * 2, C = t(N, I, S, c).minus(j).abs().comparedTo(
|
|
1534
|
+
t(R, P, S, c).minus(j).abs()
|
|
1535
|
+
) < 1 ? [N, I] : [R, P], d = E, C;
|
|
1536
1536
|
}, o.toNumber = function() {
|
|
1537
|
-
return +
|
|
1537
|
+
return +D(this);
|
|
1538
1538
|
}, o.toPrecision = function(g, w) {
|
|
1539
1539
|
return g != null && Ee(g, 1, Be), A(this, g, w, 2);
|
|
1540
1540
|
}, o.toString = function(g) {
|
|
1541
|
-
var w, P = this,
|
|
1542
|
-
return
|
|
1541
|
+
var w, P = this, I = P.s, T = P.e;
|
|
1542
|
+
return T === null ? I ? (w = "Infinity", I < 0 && (w = "-" + w)) : w = "NaN" : (g == null ? w = T <= a || T >= l ? Wo(at(P.c), T) : Yt(at(P.c), T, "0") : g === 10 && $ ? (P = F(new y(P), i + T + 1, c), w = Yt(at(P.c), P.e, "0")) : (Ee(g, 2, v.length, "Base"), w = n(Yt(at(P.c), T, "0"), 10, g, I, !0)), I < 0 && P.c[0] && (w = "-" + w)), w;
|
|
1543
1543
|
}, o.valueOf = o.toJSON = function() {
|
|
1544
|
-
return
|
|
1544
|
+
return D(this);
|
|
1545
1545
|
}, o._isBigNumber = !0, o[Symbol.toStringTag] = "BigNumber", o[Symbol.for("nodejs.util.inspect.custom")] = o.valueOf, e != null && y.set(e), y;
|
|
1546
1546
|
}
|
|
1547
1547
|
function ft(e) {
|
|
@@ -5748,15 +5748,15 @@ async function $c(e, t) {
|
|
|
5748
5748
|
var o, s, i;
|
|
5749
5749
|
const { account: n = e.account } = t, r = n ? It(n) : void 0;
|
|
5750
5750
|
try {
|
|
5751
|
-
let E = function(
|
|
5752
|
-
const { block:
|
|
5751
|
+
let E = function(R) {
|
|
5752
|
+
const { block: N, request: b, rpcStateOverride: C } = R;
|
|
5753
5753
|
return e.request({
|
|
5754
5754
|
method: "eth_estimateGas",
|
|
5755
5755
|
params: C ? [
|
|
5756
5756
|
b,
|
|
5757
|
-
|
|
5757
|
+
N ?? e.experimental_blockTag ?? "latest",
|
|
5758
5758
|
C
|
|
5759
|
-
] :
|
|
5759
|
+
] : N ? [b, N] : [b]
|
|
5760
5760
|
});
|
|
5761
5761
|
};
|
|
5762
5762
|
const { accessList: c, authorizationList: a, blobs: l, blobVersionedHashes: u, blockNumber: d, blockTag: f, data: p, gas: h, gasPrice: m, maxFeePerBlobGas: v, maxFeePerGas: $, maxPriorityFeePerGas: y, nonce: A, value: B, stateOverride: L, ...F } = await Xd(e, {
|
|
@@ -5777,9 +5777,9 @@ async function $c(e, t) {
|
|
|
5777
5777
|
});
|
|
5778
5778
|
})();
|
|
5779
5779
|
Co(t);
|
|
5780
|
-
const
|
|
5780
|
+
const I = (i = (s = (o = e.chain) == null ? void 0 : o.formatters) == null ? void 0 : s.transactionRequest) == null ? void 0 : i.format, S = (I || _s)({
|
|
5781
5781
|
// Pick out extra data that might exist on the chain's transaction request type.
|
|
5782
|
-
...xc(F, { format:
|
|
5782
|
+
...xc(F, { format: I }),
|
|
5783
5783
|
from: r == null ? void 0 : r.address,
|
|
5784
5784
|
accessList: c,
|
|
5785
5785
|
authorizationList: a,
|
|
@@ -5797,7 +5797,7 @@ async function $c(e, t) {
|
|
|
5797
5797
|
});
|
|
5798
5798
|
let x = BigInt(await E({ block: g, request: S, rpcStateOverride: w }));
|
|
5799
5799
|
if (a) {
|
|
5800
|
-
const
|
|
5800
|
+
const R = await Qd(e, { address: S.from }), N = await Promise.all(a.map(async (b) => {
|
|
5801
5801
|
const { address: C } = b, k = await E({
|
|
5802
5802
|
block: g,
|
|
5803
5803
|
request: {
|
|
@@ -5805,13 +5805,13 @@ async function $c(e, t) {
|
|
|
5805
5805
|
data: p,
|
|
5806
5806
|
from: r == null ? void 0 : r.address,
|
|
5807
5807
|
to: C,
|
|
5808
|
-
value: oe(
|
|
5808
|
+
value: oe(R)
|
|
5809
5809
|
},
|
|
5810
5810
|
rpcStateOverride: w
|
|
5811
5811
|
}).catch(() => 100000n);
|
|
5812
5812
|
return 2n * BigInt(k);
|
|
5813
5813
|
}));
|
|
5814
|
-
x +=
|
|
5814
|
+
x += N.reduce((b, C) => b + C, 0n);
|
|
5815
5815
|
}
|
|
5816
5816
|
return x;
|
|
5817
5817
|
} catch (c) {
|
|
@@ -7098,13 +7098,13 @@ function bp({ fn: e, id: t, shouldSplitBatch: n, wait: r = 0, sort: o }) {
|
|
|
7098
7098
|
};
|
|
7099
7099
|
}
|
|
7100
7100
|
async function zs(e, t) {
|
|
7101
|
-
var S, E, x,
|
|
7102
|
-
const { account: n = e.account, authorizationList: r, batch: o = !!((S = e.batch) != null && S.multicall), blockNumber: s, blockTag: i = e.experimental_blockTag ?? "latest", accessList: c, blobs: a, blockOverrides: l, code: u, data: d, factory: f, factoryData: p, gas: h, gasPrice: m, maxFeePerBlobGas: v, maxFeePerGas: $, maxPriorityFeePerGas: y, nonce: A, to: B, value: L, stateOverride: F, ...
|
|
7101
|
+
var S, E, x, R;
|
|
7102
|
+
const { account: n = e.account, authorizationList: r, batch: o = !!((S = e.batch) != null && S.multicall), blockNumber: s, blockTag: i = e.experimental_blockTag ?? "latest", accessList: c, blobs: a, blockOverrides: l, code: u, data: d, factory: f, factoryData: p, gas: h, gasPrice: m, maxFeePerBlobGas: v, maxFeePerGas: $, maxPriorityFeePerGas: y, nonce: A, to: B, value: L, stateOverride: F, ...D } = t, g = n ? It(n) : void 0;
|
|
7103
7103
|
if (u && (f || p))
|
|
7104
7104
|
throw new W("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
|
|
7105
7105
|
if (u && B)
|
|
7106
7106
|
throw new W("Cannot provide both `code` & `to` as parameters.");
|
|
7107
|
-
const w = u && d, P = f && p && B && d,
|
|
7107
|
+
const w = u && d, P = f && p && B && d, I = w || P, T = w ? S1({
|
|
7108
7108
|
code: u,
|
|
7109
7109
|
data: d
|
|
7110
7110
|
}) : P ? P1({
|
|
@@ -7115,27 +7115,27 @@ async function zs(e, t) {
|
|
|
7115
7115
|
}) : d;
|
|
7116
7116
|
try {
|
|
7117
7117
|
Co(t);
|
|
7118
|
-
const b = (typeof s == "bigint" ? oe(s) : void 0) || i, C = l ? up(l) : void 0, k = Ec(F),
|
|
7118
|
+
const b = (typeof s == "bigint" ? oe(s) : void 0) || i, C = l ? up(l) : void 0, k = Ec(F), j = (R = (x = (E = e.chain) == null ? void 0 : E.formatters) == null ? void 0 : x.transactionRequest) == null ? void 0 : R.format, z = (j || _s)({
|
|
7119
7119
|
// Pick out extra data that might exist on the chain's transaction request type.
|
|
7120
|
-
...xc(
|
|
7120
|
+
...xc(D, { format: j }),
|
|
7121
7121
|
from: g == null ? void 0 : g.address,
|
|
7122
7122
|
accessList: c,
|
|
7123
7123
|
authorizationList: r,
|
|
7124
7124
|
blobs: a,
|
|
7125
|
-
data:
|
|
7125
|
+
data: T,
|
|
7126
7126
|
gas: h,
|
|
7127
7127
|
gasPrice: m,
|
|
7128
7128
|
maxFeePerBlobGas: v,
|
|
7129
7129
|
maxFeePerGas: $,
|
|
7130
7130
|
maxPriorityFeePerGas: y,
|
|
7131
7131
|
nonce: A,
|
|
7132
|
-
to:
|
|
7132
|
+
to: I ? void 0 : B,
|
|
7133
7133
|
value: L
|
|
7134
7134
|
});
|
|
7135
|
-
if (o && x1({ request:
|
|
7135
|
+
if (o && x1({ request: z }) && !k && !C)
|
|
7136
7136
|
try {
|
|
7137
7137
|
return await E1(e, {
|
|
7138
|
-
...
|
|
7138
|
+
...z,
|
|
7139
7139
|
blockNumber: s,
|
|
7140
7140
|
blockTag: i
|
|
7141
7141
|
});
|
|
@@ -7145,20 +7145,20 @@ async function zs(e, t) {
|
|
|
7145
7145
|
}
|
|
7146
7146
|
const K = (() => {
|
|
7147
7147
|
const q = [
|
|
7148
|
-
|
|
7148
|
+
z,
|
|
7149
7149
|
b
|
|
7150
7150
|
];
|
|
7151
7151
|
return k && C ? [...q, k, C] : k ? [...q, k] : C ? [...q, {}, C] : q;
|
|
7152
|
-
})(),
|
|
7152
|
+
})(), H = await e.request({
|
|
7153
7153
|
method: "eth_call",
|
|
7154
7154
|
params: K
|
|
7155
7155
|
});
|
|
7156
|
-
return
|
|
7157
|
-
} catch (
|
|
7158
|
-
const b = A1(
|
|
7156
|
+
return H === "0x" ? { data: void 0 } : { data: H };
|
|
7157
|
+
} catch (N) {
|
|
7158
|
+
const b = A1(N), { offchainLookup: C, offchainLookupSignature: k } = await import("./ccip-DNME7Ary.mjs");
|
|
7159
7159
|
if (e.ccipRead !== !1 && (b == null ? void 0 : b.slice(0, 10)) === k && B)
|
|
7160
7160
|
return { data: await C(e, { data: b, to: B }) };
|
|
7161
|
-
throw
|
|
7161
|
+
throw I && (b == null ? void 0 : b.slice(0, 10)) === "0x101bb98d" ? new sy({ factory: f }) : mp(N, {
|
|
7162
7162
|
...t,
|
|
7163
7163
|
account: g,
|
|
7164
7164
|
chain: e.chain
|
|
@@ -7434,7 +7434,7 @@ function B1(e, t) {
|
|
|
7434
7434
|
c !== void 0 && (A = c - 1n);
|
|
7435
7435
|
let B, L = !1;
|
|
7436
7436
|
const F = Lo(async () => {
|
|
7437
|
-
var
|
|
7437
|
+
var D;
|
|
7438
7438
|
if (!L) {
|
|
7439
7439
|
try {
|
|
7440
7440
|
B = await se(e, $d, "createContractEventFilter")({
|
|
@@ -7474,7 +7474,7 @@ function B1(e, t) {
|
|
|
7474
7474
|
for (const w of g)
|
|
7475
7475
|
y.onLogs([w]);
|
|
7476
7476
|
} catch (g) {
|
|
7477
|
-
B && g instanceof Vn && (L = !1), (
|
|
7477
|
+
B && g instanceof Vn && (L = !1), (D = y.onError) == null || D.call(y, g);
|
|
7478
7478
|
}
|
|
7479
7479
|
}, {
|
|
7480
7480
|
emitOnBegin: !0,
|
|
@@ -7508,7 +7508,7 @@ function B1(e, t) {
|
|
|
7508
7508
|
abi: n,
|
|
7509
7509
|
eventName: i,
|
|
7510
7510
|
args: o
|
|
7511
|
-
}) : [], { unsubscribe:
|
|
7511
|
+
}) : [], { unsubscribe: D } = await L.subscribe({
|
|
7512
7512
|
params: ["logs", { address: r, topics: F }],
|
|
7513
7513
|
onData(g) {
|
|
7514
7514
|
var P;
|
|
@@ -7516,26 +7516,26 @@ function B1(e, t) {
|
|
|
7516
7516
|
return;
|
|
7517
7517
|
const w = g.result;
|
|
7518
7518
|
try {
|
|
7519
|
-
const { eventName:
|
|
7519
|
+
const { eventName: I, args: T } = Rc({
|
|
7520
7520
|
abi: n,
|
|
7521
7521
|
data: w.data,
|
|
7522
7522
|
topics: w.topics,
|
|
7523
7523
|
strict: f
|
|
7524
7524
|
}), S = ln(w, {
|
|
7525
|
-
args:
|
|
7526
|
-
eventName:
|
|
7525
|
+
args: T,
|
|
7526
|
+
eventName: I
|
|
7527
7527
|
});
|
|
7528
7528
|
B.onLogs([S]);
|
|
7529
|
-
} catch (
|
|
7530
|
-
let
|
|
7531
|
-
if (
|
|
7529
|
+
} catch (I) {
|
|
7530
|
+
let T, S;
|
|
7531
|
+
if (I instanceof Jr || I instanceof Is) {
|
|
7532
7532
|
if (f)
|
|
7533
7533
|
return;
|
|
7534
|
-
|
|
7534
|
+
T = I.abiItem.name, S = (P = I.abiItem.inputs) == null ? void 0 : P.some((x) => !("name" in x && x.name));
|
|
7535
7535
|
}
|
|
7536
7536
|
const E = ln(w, {
|
|
7537
7537
|
args: S ? [] : {},
|
|
7538
|
-
eventName:
|
|
7538
|
+
eventName: T
|
|
7539
7539
|
});
|
|
7540
7540
|
B.onLogs([E]);
|
|
7541
7541
|
}
|
|
@@ -7545,7 +7545,7 @@ function B1(e, t) {
|
|
|
7545
7545
|
(w = B.onError) == null || w.call(B, g);
|
|
7546
7546
|
}
|
|
7547
7547
|
});
|
|
7548
|
-
A =
|
|
7548
|
+
A = D, y || A();
|
|
7549
7549
|
} catch (L) {
|
|
7550
7550
|
a == null || a(L);
|
|
7551
7551
|
}
|
|
@@ -7629,8 +7629,8 @@ function F1(e) {
|
|
|
7629
7629
|
function y(A) {
|
|
7630
7630
|
return (B) => {
|
|
7631
7631
|
const L = B(A);
|
|
7632
|
-
for (const
|
|
7633
|
-
delete L[
|
|
7632
|
+
for (const D in $)
|
|
7633
|
+
delete L[D];
|
|
7634
7634
|
const F = { ...A, ...L };
|
|
7635
7635
|
return Object.assign(F, { extend: y(F) });
|
|
7636
7636
|
};
|
|
@@ -7882,19 +7882,19 @@ function Sa(e, t = {}) {
|
|
|
7882
7882
|
methods: s,
|
|
7883
7883
|
name: i,
|
|
7884
7884
|
async request({ method: B, params: L }) {
|
|
7885
|
-
const F = { method: B, params: L }, { schedule:
|
|
7885
|
+
const F = { method: B, params: L }, { schedule: D } = bp({
|
|
7886
7886
|
id: y,
|
|
7887
7887
|
wait: m,
|
|
7888
|
-
shouldSplitBatch(
|
|
7889
|
-
return
|
|
7888
|
+
shouldSplitBatch(I) {
|
|
7889
|
+
return I.length > h;
|
|
7890
7890
|
},
|
|
7891
|
-
fn: (
|
|
7892
|
-
body:
|
|
7891
|
+
fn: (I) => A.request({
|
|
7892
|
+
body: I
|
|
7893
7893
|
}),
|
|
7894
|
-
sort: (
|
|
7895
|
-
}), g = async (
|
|
7894
|
+
sort: (I, T) => I.id - T.id
|
|
7895
|
+
}), g = async (I) => n ? D(I) : [
|
|
7896
7896
|
await A.request({
|
|
7897
|
-
body:
|
|
7897
|
+
body: I
|
|
7898
7898
|
})
|
|
7899
7899
|
], [{ error: w, result: P }] = await g(F);
|
|
7900
7900
|
if (u)
|
|
@@ -8411,7 +8411,7 @@ async function Sp(e, t) {
|
|
|
8411
8411
|
const { account: n = e.account, blockNumber: r, blockTag: o = "latest", blobs: s, data: i, gas: c, gasPrice: a, maxFeePerBlobGas: l, maxFeePerGas: u, maxPriorityFeePerGas: d, to: f, value: p, ...h } = t, m = n ? It(n) : void 0;
|
|
8412
8412
|
try {
|
|
8413
8413
|
Co(t);
|
|
8414
|
-
const B = (typeof r == "bigint" ? oe(r) : void 0) || o, L = (y = ($ = (v = e.chain) == null ? void 0 : v.formatters) == null ? void 0 : $.transactionRequest) == null ? void 0 : y.format,
|
|
8414
|
+
const B = (typeof r == "bigint" ? oe(r) : void 0) || o, L = (y = ($ = (v = e.chain) == null ? void 0 : v.formatters) == null ? void 0 : $.transactionRequest) == null ? void 0 : y.format, D = (L || _s)({
|
|
8415
8415
|
// Pick out extra data that might exist on the chain's transaction request type.
|
|
8416
8416
|
...xc(h, { format: L }),
|
|
8417
8417
|
from: m == null ? void 0 : m.address,
|
|
@@ -8426,7 +8426,7 @@ async function Sp(e, t) {
|
|
|
8426
8426
|
value: p
|
|
8427
8427
|
}), g = await e.request({
|
|
8428
8428
|
method: "eth_createAccessList",
|
|
8429
|
-
params: [
|
|
8429
|
+
params: [D, B]
|
|
8430
8430
|
});
|
|
8431
8431
|
return {
|
|
8432
8432
|
accessList: g.accessList,
|
|
@@ -8914,20 +8914,20 @@ async function Ww(e, t) {
|
|
|
8914
8914
|
for (let y = 0; y < l.length; y++) {
|
|
8915
8915
|
const { abi: A, address: B, args: L, functionName: F } = l[y];
|
|
8916
8916
|
try {
|
|
8917
|
-
const
|
|
8918
|
-
h += (
|
|
8917
|
+
const D = Zt({ abi: A, args: L, functionName: F });
|
|
8918
|
+
h += (D.length - 2) / 2, // Check if batching is enabled.
|
|
8919
8919
|
u > 0 && // Check if the current size of the batch exceeds the size limit.
|
|
8920
8920
|
h > u && // Check if the current chunk is not already empty.
|
|
8921
|
-
f[p].length > 0 && (p++, h = (
|
|
8921
|
+
f[p].length > 0 && (p++, h = (D.length - 2) / 2, f[p] = []), f[p] = [
|
|
8922
8922
|
...f[p],
|
|
8923
8923
|
{
|
|
8924
8924
|
allowFailure: !0,
|
|
8925
|
-
callData:
|
|
8925
|
+
callData: D,
|
|
8926
8926
|
target: B
|
|
8927
8927
|
}
|
|
8928
8928
|
];
|
|
8929
|
-
} catch (
|
|
8930
|
-
const g = Ar(
|
|
8929
|
+
} catch (D) {
|
|
8930
|
+
const g = Ar(D, {
|
|
8931
8931
|
abi: A,
|
|
8932
8932
|
address: B,
|
|
8933
8933
|
args: L,
|
|
@@ -8972,26 +8972,26 @@ async function Ww(e, t) {
|
|
|
8972
8972
|
}
|
|
8973
8973
|
const B = A.value;
|
|
8974
8974
|
for (let L = 0; L < B.length; L++) {
|
|
8975
|
-
const { returnData: F, success:
|
|
8975
|
+
const { returnData: F, success: D } = B[L], { callData: g } = f[y][L], { abi: w, address: P, functionName: I, args: T } = l[v.length];
|
|
8976
8976
|
try {
|
|
8977
8977
|
if (g === "0x")
|
|
8978
8978
|
throw new Ro();
|
|
8979
|
-
if (!
|
|
8979
|
+
if (!D)
|
|
8980
8980
|
throw new Ds({ data: F });
|
|
8981
8981
|
const S = Jn({
|
|
8982
8982
|
abi: w,
|
|
8983
|
-
args:
|
|
8983
|
+
args: T,
|
|
8984
8984
|
data: F,
|
|
8985
|
-
functionName:
|
|
8985
|
+
functionName: I
|
|
8986
8986
|
});
|
|
8987
8987
|
v.push(r ? { result: S, status: "success" } : S);
|
|
8988
8988
|
} catch (S) {
|
|
8989
8989
|
const E = Ar(S, {
|
|
8990
8990
|
abi: w,
|
|
8991
8991
|
address: P,
|
|
8992
|
-
args:
|
|
8992
|
+
args: T,
|
|
8993
8993
|
docsPath: "/docs/contract/multicall",
|
|
8994
|
-
functionName:
|
|
8994
|
+
functionName: I
|
|
8995
8995
|
});
|
|
8996
8996
|
if (!r)
|
|
8997
8997
|
throw E;
|
|
@@ -9032,18 +9032,18 @@ async function Pa(e, t) {
|
|
|
9032
9032
|
})).map((f, p) => ({
|
|
9033
9033
|
...zd(f),
|
|
9034
9034
|
calls: f.calls.map((h, m) => {
|
|
9035
|
-
var P,
|
|
9036
|
-
const { abi: v, args: $, functionName: y, to: A } = o[p].calls[m], B = ((P = h.error) == null ? void 0 : P.data) ?? h.returnData, L = BigInt(h.gasUsed), F = (
|
|
9035
|
+
var P, I;
|
|
9036
|
+
const { abi: v, args: $, functionName: y, to: A } = o[p].calls[m], B = ((P = h.error) == null ? void 0 : P.data) ?? h.returnData, L = BigInt(h.gasUsed), F = (I = h.logs) == null ? void 0 : I.map((T) => ln(T)), D = h.status === "0x1" ? "success" : "failure", g = v && D === "success" && B !== "0x" ? Jn({
|
|
9037
9037
|
abi: v,
|
|
9038
9038
|
data: B,
|
|
9039
9039
|
functionName: y
|
|
9040
9040
|
}) : null, w = (() => {
|
|
9041
9041
|
var S;
|
|
9042
|
-
if (
|
|
9042
|
+
if (D === "success")
|
|
9043
9043
|
return;
|
|
9044
|
-
let
|
|
9045
|
-
if (((S = h.error) == null ? void 0 : S.data) === "0x" ?
|
|
9046
|
-
return Ar(
|
|
9044
|
+
let T;
|
|
9045
|
+
if (((S = h.error) == null ? void 0 : S.data) === "0x" ? T = new Ro() : h.error && (T = new Ds(h.error)), !!T)
|
|
9046
|
+
return Ar(T, {
|
|
9047
9047
|
abi: v ?? [],
|
|
9048
9048
|
address: A ?? "0x",
|
|
9049
9049
|
args: $,
|
|
@@ -9054,8 +9054,8 @@ async function Pa(e, t) {
|
|
|
9054
9054
|
data: B,
|
|
9055
9055
|
gasUsed: L,
|
|
9056
9056
|
logs: F,
|
|
9057
|
-
status:
|
|
9058
|
-
...
|
|
9057
|
+
status: D,
|
|
9058
|
+
...D === "success" ? {
|
|
9059
9059
|
result: g
|
|
9060
9060
|
} : {
|
|
9061
9061
|
error: w
|
|
@@ -9670,7 +9670,7 @@ async function vv(e, t) {
|
|
|
9670
9670
|
...b,
|
|
9671
9671
|
data: b.abi ? Zt(b) : b.data
|
|
9672
9672
|
});
|
|
9673
|
-
return C.map(({ address: k, storageKeys:
|
|
9673
|
+
return C.map(({ address: k, storageKeys: j }) => j.length > 0 ? k : null);
|
|
9674
9674
|
})).then((b) => b.flat().filter(Boolean)) : [], f = await Pa(e, {
|
|
9675
9675
|
blockNumber: n,
|
|
9676
9676
|
blockTag: r,
|
|
@@ -9789,21 +9789,21 @@ async function vv(e, t) {
|
|
|
9789
9789
|
],
|
|
9790
9790
|
traceTransfers: c,
|
|
9791
9791
|
validation: a
|
|
9792
|
-
}), p = i ? f[2] : f[0], [h, m, , v, $, y, A, B] = i ? f : [], { calls: L, ...F } = p,
|
|
9792
|
+
}), p = i ? f[2] : f[0], [h, m, , v, $, y, A, B] = i ? f : [], { calls: L, ...F } = p, D = L.slice(0, -1) ?? [], g = (h == null ? void 0 : h.calls) ?? [], w = (m == null ? void 0 : m.calls) ?? [], P = [...g, ...w].map((b) => b.status === "success" ? Wt(b.data) : null), I = (v == null ? void 0 : v.calls) ?? [], T = ($ == null ? void 0 : $.calls) ?? [], S = [...I, ...T].map((b) => b.status === "success" ? Wt(b.data) : null), E = ((y == null ? void 0 : y.calls) ?? []).map((b) => b.status === "success" ? b.result : null), x = ((B == null ? void 0 : B.calls) ?? []).map((b) => b.status === "success" ? b.result : null), R = ((A == null ? void 0 : A.calls) ?? []).map((b) => b.status === "success" ? b.result : null), N = [];
|
|
9793
9793
|
for (const [b, C] of S.entries()) {
|
|
9794
9794
|
const k = P[b];
|
|
9795
9795
|
if (typeof C != "bigint" || typeof k != "bigint")
|
|
9796
9796
|
continue;
|
|
9797
|
-
const
|
|
9797
|
+
const j = E[b - 1], _ = x[b - 1], z = R[b - 1], K = b === 0 ? {
|
|
9798
9798
|
address: yv,
|
|
9799
9799
|
decimals: 18,
|
|
9800
9800
|
symbol: "ETH"
|
|
9801
9801
|
} : {
|
|
9802
9802
|
address: d[b - 1],
|
|
9803
|
-
decimals:
|
|
9804
|
-
symbol:
|
|
9803
|
+
decimals: z || j ? Number(j ?? 1) : void 0,
|
|
9804
|
+
symbol: _ ?? void 0
|
|
9805
9805
|
};
|
|
9806
|
-
|
|
9806
|
+
N.some((H) => H.token.address === K.address) || N.push({
|
|
9807
9807
|
token: K,
|
|
9808
9808
|
value: {
|
|
9809
9809
|
pre: k,
|
|
@@ -9813,9 +9813,9 @@ async function vv(e, t) {
|
|
|
9813
9813
|
});
|
|
9814
9814
|
}
|
|
9815
9815
|
return {
|
|
9816
|
-
assetChanges:
|
|
9816
|
+
assetChanges: N,
|
|
9817
9817
|
block: F,
|
|
9818
|
-
results:
|
|
9818
|
+
results: D
|
|
9819
9819
|
};
|
|
9820
9820
|
}
|
|
9821
9821
|
class zp extends uc {
|
|
@@ -10434,35 +10434,35 @@ function jv(e, t = {}) {
|
|
|
10434
10434
|
if (!r.isOdd)
|
|
10435
10435
|
throw new Error("compression is not supported: Field does not have .isOdd()");
|
|
10436
10436
|
}
|
|
10437
|
-
function d(
|
|
10438
|
-
const { x, y:
|
|
10437
|
+
function d(T, S, E) {
|
|
10438
|
+
const { x, y: R } = S.toAffine(), N = r.toBytes(x);
|
|
10439
10439
|
if (gs(E, "isCompressed"), E) {
|
|
10440
10440
|
u();
|
|
10441
|
-
const b = !r.isOdd(
|
|
10442
|
-
return vn(oh(b),
|
|
10441
|
+
const b = !r.isOdd(R);
|
|
10442
|
+
return vn(oh(b), N);
|
|
10443
10443
|
} else
|
|
10444
|
-
return vn(Uint8Array.of(4),
|
|
10444
|
+
return vn(Uint8Array.of(4), N, r.toBytes(R));
|
|
10445
10445
|
}
|
|
10446
|
-
function f(
|
|
10447
|
-
Ln(
|
|
10448
|
-
const { publicKey: S, publicKeyUncompressed: E } = l, x =
|
|
10449
|
-
if (x === S && (
|
|
10450
|
-
const b = r.fromBytes(
|
|
10446
|
+
function f(T) {
|
|
10447
|
+
Ln(T, void 0, "Point");
|
|
10448
|
+
const { publicKey: S, publicKeyUncompressed: E } = l, x = T.length, R = T[0], N = T.subarray(1);
|
|
10449
|
+
if (x === S && (R === 2 || R === 3)) {
|
|
10450
|
+
const b = r.fromBytes(N);
|
|
10451
10451
|
if (!r.isValid(b))
|
|
10452
10452
|
throw new Error("bad point: is not on curve, wrong x");
|
|
10453
10453
|
const C = m(b);
|
|
10454
10454
|
let k;
|
|
10455
10455
|
try {
|
|
10456
10456
|
k = r.sqrt(C);
|
|
10457
|
-
} catch (
|
|
10458
|
-
const K =
|
|
10457
|
+
} catch (z) {
|
|
10458
|
+
const K = z instanceof Error ? ": " + z.message : "";
|
|
10459
10459
|
throw new Error("bad point: is not on curve, sqrt error" + K);
|
|
10460
10460
|
}
|
|
10461
10461
|
u();
|
|
10462
|
-
const
|
|
10463
|
-
return (
|
|
10464
|
-
} else if (x === E &&
|
|
10465
|
-
const b = r.BYTES, C = r.fromBytes(
|
|
10462
|
+
const j = r.isOdd(k);
|
|
10463
|
+
return (R & 1) === 1 !== j && (k = r.neg(k)), { x: b, y: k };
|
|
10464
|
+
} else if (x === E && R === 4) {
|
|
10465
|
+
const b = r.BYTES, C = r.fromBytes(N.subarray(0, b)), k = r.fromBytes(N.subarray(b, b * 2));
|
|
10466
10466
|
if (!v(C, k))
|
|
10467
10467
|
throw new Error("bad point: is not on curve");
|
|
10468
10468
|
return { x: C, y: k };
|
|
@@ -10470,12 +10470,12 @@ function jv(e, t = {}) {
|
|
|
10470
10470
|
throw new Error(`bad point: got length ${x}, expected compressed=${S} or uncompressed=${E}`);
|
|
10471
10471
|
}
|
|
10472
10472
|
const p = t.toBytes || d, h = t.fromBytes || f;
|
|
10473
|
-
function m(
|
|
10474
|
-
const S = r.sqr(
|
|
10475
|
-
return r.add(r.add(E, r.mul(
|
|
10473
|
+
function m(T) {
|
|
10474
|
+
const S = r.sqr(T), E = r.mul(S, T);
|
|
10475
|
+
return r.add(r.add(E, r.mul(T, s.a)), s.b);
|
|
10476
10476
|
}
|
|
10477
|
-
function v(
|
|
10478
|
-
const E = r.sqr(S), x = m(
|
|
10477
|
+
function v(T, S) {
|
|
10478
|
+
const E = r.sqr(S), x = m(T);
|
|
10479
10479
|
return r.eql(E, x);
|
|
10480
10480
|
}
|
|
10481
10481
|
if (!v(s.Gx, s.Gy))
|
|
@@ -10483,49 +10483,49 @@ function jv(e, t = {}) {
|
|
|
10483
10483
|
const $ = r.mul(r.pow(s.a, Yo), Dv), y = r.mul(r.sqr(s.b), BigInt(27));
|
|
10484
10484
|
if (r.is0(r.add($, y)))
|
|
10485
10485
|
throw new Error("bad curve params: a or b");
|
|
10486
|
-
function A(
|
|
10486
|
+
function A(T, S, E = !1) {
|
|
10487
10487
|
if (!r.isValid(S) || E && r.is0(S))
|
|
10488
|
-
throw new Error(`bad point coordinate ${
|
|
10488
|
+
throw new Error(`bad point coordinate ${T}`);
|
|
10489
10489
|
return S;
|
|
10490
10490
|
}
|
|
10491
|
-
function B(
|
|
10492
|
-
if (!(
|
|
10491
|
+
function B(T) {
|
|
10492
|
+
if (!(T instanceof w))
|
|
10493
10493
|
throw new Error("ProjectivePoint expected");
|
|
10494
10494
|
}
|
|
10495
|
-
function L(
|
|
10495
|
+
function L(T) {
|
|
10496
10496
|
if (!a || !a.basises)
|
|
10497
10497
|
throw new Error("no endo");
|
|
10498
|
-
return kv(
|
|
10498
|
+
return kv(T, a.basises, o.ORDER);
|
|
10499
10499
|
}
|
|
10500
|
-
const F = uu((
|
|
10501
|
-
const { X: E, Y: x, Z:
|
|
10502
|
-
if (r.eql(
|
|
10500
|
+
const F = uu((T, S) => {
|
|
10501
|
+
const { X: E, Y: x, Z: R } = T;
|
|
10502
|
+
if (r.eql(R, r.ONE))
|
|
10503
10503
|
return { x: E, y: x };
|
|
10504
|
-
const
|
|
10505
|
-
S == null && (S =
|
|
10506
|
-
const b = r.mul(E, S), C = r.mul(x, S), k = r.mul(
|
|
10507
|
-
if (
|
|
10504
|
+
const N = T.is0();
|
|
10505
|
+
S == null && (S = N ? r.ONE : r.inv(R));
|
|
10506
|
+
const b = r.mul(E, S), C = r.mul(x, S), k = r.mul(R, S);
|
|
10507
|
+
if (N)
|
|
10508
10508
|
return { x: r.ZERO, y: r.ZERO };
|
|
10509
10509
|
if (!r.eql(k, r.ONE))
|
|
10510
10510
|
throw new Error("invZ was invalid");
|
|
10511
10511
|
return { x: b, y: C };
|
|
10512
|
-
}),
|
|
10513
|
-
if (
|
|
10514
|
-
if (t.allowInfinityPoint && !r.is0(
|
|
10512
|
+
}), D = uu((T) => {
|
|
10513
|
+
if (T.is0()) {
|
|
10514
|
+
if (t.allowInfinityPoint && !r.is0(T.Y))
|
|
10515
10515
|
return;
|
|
10516
10516
|
throw new Error("bad point: ZERO");
|
|
10517
10517
|
}
|
|
10518
|
-
const { x: S, y: E } =
|
|
10518
|
+
const { x: S, y: E } = T.toAffine();
|
|
10519
10519
|
if (!r.isValid(S) || !r.isValid(E))
|
|
10520
10520
|
throw new Error("bad point: x or y not field elements");
|
|
10521
10521
|
if (!v(S, E))
|
|
10522
10522
|
throw new Error("bad point: equation left != right");
|
|
10523
|
-
if (!
|
|
10523
|
+
if (!T.isTorsionFree())
|
|
10524
10524
|
throw new Error("bad point: not in prime-order subgroup");
|
|
10525
10525
|
return !0;
|
|
10526
10526
|
});
|
|
10527
|
-
function g(
|
|
10528
|
-
return E = new w(r.mul(E.X,
|
|
10527
|
+
function g(T, S, E, x, R) {
|
|
10528
|
+
return E = new w(r.mul(E.X, T), E.Y, E.Z), S = bs(x, S), E = bs(R, E), S.add(E);
|
|
10529
10529
|
}
|
|
10530
10530
|
class w {
|
|
10531
10531
|
/** Does NOT validate if the point is valid. Use `.assertValidity()`. */
|
|
@@ -10564,12 +10564,12 @@ function jv(e, t = {}) {
|
|
|
10564
10564
|
* @returns
|
|
10565
10565
|
*/
|
|
10566
10566
|
precompute(S = 8, E = !0) {
|
|
10567
|
-
return
|
|
10567
|
+
return I.createCache(this, S), E || this.multiply(Yo), this;
|
|
10568
10568
|
}
|
|
10569
10569
|
// TODO: return `this`
|
|
10570
10570
|
/** A point on curve is valid if it conforms to equation. */
|
|
10571
10571
|
assertValidity() {
|
|
10572
|
-
|
|
10572
|
+
D(this);
|
|
10573
10573
|
}
|
|
10574
10574
|
hasEvenY() {
|
|
10575
10575
|
const { y: S } = this.toAffine();
|
|
@@ -10580,8 +10580,8 @@ function jv(e, t = {}) {
|
|
|
10580
10580
|
/** Compare one point to another. */
|
|
10581
10581
|
equals(S) {
|
|
10582
10582
|
B(S);
|
|
10583
|
-
const { X: E, Y: x, Z:
|
|
10584
|
-
return k &&
|
|
10583
|
+
const { X: E, Y: x, Z: R } = this, { X: N, Y: b, Z: C } = S, k = r.eql(r.mul(E, C), r.mul(N, R)), j = r.eql(r.mul(x, C), r.mul(b, R));
|
|
10584
|
+
return k && j;
|
|
10585
10585
|
}
|
|
10586
10586
|
/** Flips point to one corresponding to (x, -y) in Affine coordinates. */
|
|
10587
10587
|
negate() {
|
|
@@ -10592,9 +10592,9 @@ function jv(e, t = {}) {
|
|
|
10592
10592
|
// https://eprint.iacr.org/2015/1060, algorithm 3
|
|
10593
10593
|
// Cost: 8M + 3S + 3*a + 2*b3 + 15add.
|
|
10594
10594
|
double() {
|
|
10595
|
-
const { a: S, b: E } = s, x = r.mul(E, Yo), { X:
|
|
10596
|
-
let C = r.ZERO, k = r.ZERO,
|
|
10597
|
-
return
|
|
10595
|
+
const { a: S, b: E } = s, x = r.mul(E, Yo), { X: R, Y: N, Z: b } = this;
|
|
10596
|
+
let C = r.ZERO, k = r.ZERO, j = r.ZERO, _ = r.mul(R, R), z = r.mul(N, N), K = r.mul(b, b), H = r.mul(R, N);
|
|
10597
|
+
return H = r.add(H, H), j = r.mul(R, b), j = r.add(j, j), C = r.mul(S, j), k = r.mul(x, K), k = r.add(C, k), C = r.sub(z, k), k = r.add(z, k), k = r.mul(C, k), C = r.mul(H, C), j = r.mul(x, j), K = r.mul(S, K), H = r.sub(_, K), H = r.mul(S, H), H = r.add(H, j), j = r.add(_, _), _ = r.add(j, _), _ = r.add(_, K), _ = r.mul(_, H), k = r.add(k, _), K = r.mul(N, b), K = r.add(K, K), _ = r.mul(K, H), C = r.sub(C, _), j = r.mul(K, z), j = r.add(j, j), j = r.add(j, j), new w(C, k, j);
|
|
10598
10598
|
}
|
|
10599
10599
|
// Renes-Costello-Batina exception-free addition formula.
|
|
10600
10600
|
// There is 30% faster Jacobian formula, but it is not complete.
|
|
@@ -10602,13 +10602,13 @@ function jv(e, t = {}) {
|
|
|
10602
10602
|
// Cost: 12M + 0S + 3*a + 3*b3 + 23add.
|
|
10603
10603
|
add(S) {
|
|
10604
10604
|
B(S);
|
|
10605
|
-
const { X: E, Y: x, Z:
|
|
10606
|
-
let k = r.ZERO,
|
|
10607
|
-
const
|
|
10608
|
-
let
|
|
10609
|
-
re = r.mul(re, te), te = r.add(
|
|
10610
|
-
let de = r.add(
|
|
10611
|
-
return te = r.mul(te, de), de = r.add(
|
|
10605
|
+
const { X: E, Y: x, Z: R } = this, { X: N, Y: b, Z: C } = S;
|
|
10606
|
+
let k = r.ZERO, j = r.ZERO, _ = r.ZERO;
|
|
10607
|
+
const z = s.a, K = r.mul(s.b, Yo);
|
|
10608
|
+
let H = r.mul(E, N), q = r.mul(x, b), V = r.mul(R, C), re = r.add(E, x), te = r.add(N, b);
|
|
10609
|
+
re = r.mul(re, te), te = r.add(H, q), re = r.sub(re, te), te = r.add(E, R);
|
|
10610
|
+
let de = r.add(N, C);
|
|
10611
|
+
return te = r.mul(te, de), de = r.add(H, V), te = r.sub(te, de), de = r.add(x, R), k = r.add(b, C), de = r.mul(de, k), k = r.add(q, V), de = r.sub(de, k), _ = r.mul(z, te), k = r.mul(K, V), _ = r.add(k, _), k = r.sub(q, _), _ = r.add(q, _), j = r.mul(k, _), q = r.add(H, H), q = r.add(q, H), V = r.mul(z, V), te = r.mul(K, te), q = r.add(q, V), V = r.sub(H, V), V = r.mul(z, V), te = r.add(te, V), H = r.mul(q, te), j = r.add(j, H), H = r.mul(de, te), k = r.mul(re, k), k = r.sub(k, H), H = r.mul(re, q), _ = r.mul(de, _), _ = r.add(_, H), new w(k, j, _);
|
|
10612
10612
|
}
|
|
10613
10613
|
subtract(S) {
|
|
10614
10614
|
return this.add(S.negate());
|
|
@@ -10629,16 +10629,16 @@ function jv(e, t = {}) {
|
|
|
10629
10629
|
const { endo: E } = t;
|
|
10630
10630
|
if (!o.isValidNot0(S))
|
|
10631
10631
|
throw new Error("invalid scalar: out of range");
|
|
10632
|
-
let x,
|
|
10633
|
-
const
|
|
10632
|
+
let x, R;
|
|
10633
|
+
const N = (b) => I.cached(this, b, (C) => Ti(w, C));
|
|
10634
10634
|
if (E) {
|
|
10635
|
-
const { k1neg: b, k1: C, k2neg: k, k2:
|
|
10636
|
-
|
|
10635
|
+
const { k1neg: b, k1: C, k2neg: k, k2: j } = L(S), { p: _, f: z } = N(C), { p: K, f: H } = N(j);
|
|
10636
|
+
R = z.add(H), x = g(E.beta, _, K, b, k);
|
|
10637
10637
|
} else {
|
|
10638
|
-
const { p: b, f: C } =
|
|
10639
|
-
x = b,
|
|
10638
|
+
const { p: b, f: C } = N(S);
|
|
10639
|
+
x = b, R = C;
|
|
10640
10640
|
}
|
|
10641
|
-
return Ti(w, [x,
|
|
10641
|
+
return Ti(w, [x, R])[0];
|
|
10642
10642
|
}
|
|
10643
10643
|
/**
|
|
10644
10644
|
* Non-constant-time multiplication. Uses double-and-add algorithm.
|
|
@@ -10653,17 +10653,17 @@ function jv(e, t = {}) {
|
|
|
10653
10653
|
return w.ZERO;
|
|
10654
10654
|
if (S === br)
|
|
10655
10655
|
return x;
|
|
10656
|
-
if (
|
|
10656
|
+
if (I.hasCache(this))
|
|
10657
10657
|
return this.multiply(S);
|
|
10658
10658
|
if (E) {
|
|
10659
|
-
const { k1neg:
|
|
10660
|
-
return g(E.beta, k,
|
|
10659
|
+
const { k1neg: R, k1: N, k2neg: b, k2: C } = L(S), { p1: k, p2: j } = Bv(w, x, N, C);
|
|
10660
|
+
return g(E.beta, k, j, R, b);
|
|
10661
10661
|
} else
|
|
10662
|
-
return
|
|
10662
|
+
return I.unsafe(x, S);
|
|
10663
10663
|
}
|
|
10664
10664
|
multiplyAndAddUnsafe(S, E, x) {
|
|
10665
|
-
const
|
|
10666
|
-
return
|
|
10665
|
+
const R = this.multiplyUnsafe(E).add(S.multiplyUnsafe(x));
|
|
10666
|
+
return R.is0() ? void 0 : R;
|
|
10667
10667
|
}
|
|
10668
10668
|
/**
|
|
10669
10669
|
* Converts Projective point to affine (x, y) coordinates.
|
|
@@ -10678,7 +10678,7 @@ function jv(e, t = {}) {
|
|
|
10678
10678
|
*/
|
|
10679
10679
|
isTorsionFree() {
|
|
10680
10680
|
const { isTorsionFree: S } = t;
|
|
10681
|
-
return i === br ? !0 : S ? S(w, this) :
|
|
10681
|
+
return i === br ? !0 : S ? S(w, this) : I.unsafe(this, c).is0();
|
|
10682
10682
|
}
|
|
10683
10683
|
clearCofactor() {
|
|
10684
10684
|
const { clearCofactor: S } = t;
|
|
@@ -10723,7 +10723,7 @@ function jv(e, t = {}) {
|
|
|
10723
10723
|
}
|
|
10724
10724
|
}
|
|
10725
10725
|
w.BASE = new w(s.Gx, s.Gy, r.ONE), w.ZERO = new w(r.ZERO, r.ONE, r.ZERO), w.Fp = r, w.Fn = o;
|
|
10726
|
-
const P = o.BITS,
|
|
10726
|
+
const P = o.BITS, I = new Cv(w, t.endo ? Math.ceil(P / 2) : P);
|
|
10727
10727
|
return w.BASE.precompute(8), w;
|
|
10728
10728
|
}
|
|
10729
10729
|
function oh(e) {
|
|
@@ -10824,40 +10824,40 @@ function Uv(e, t, n = {}) {
|
|
|
10824
10824
|
}
|
|
10825
10825
|
function y(E, x) {
|
|
10826
10826
|
Oa(x);
|
|
10827
|
-
const
|
|
10828
|
-
return Ln(E,
|
|
10827
|
+
const R = p.signature, N = x === "compact" ? R : x === "recovered" ? R + 1 : void 0;
|
|
10828
|
+
return Ln(E, N, `${x} signature`);
|
|
10829
10829
|
}
|
|
10830
10830
|
class A {
|
|
10831
|
-
constructor(x,
|
|
10832
|
-
this.r = $("r", x), this.s = $("s",
|
|
10833
|
-
}
|
|
10834
|
-
static fromBytes(x,
|
|
10835
|
-
y(x,
|
|
10836
|
-
let
|
|
10837
|
-
if (
|
|
10838
|
-
const { r:
|
|
10839
|
-
return new A(
|
|
10831
|
+
constructor(x, R, N) {
|
|
10832
|
+
this.r = $("r", x), this.s = $("s", R), N != null && (this.recovery = N), Object.freeze(this);
|
|
10833
|
+
}
|
|
10834
|
+
static fromBytes(x, R = m) {
|
|
10835
|
+
y(x, R);
|
|
10836
|
+
let N;
|
|
10837
|
+
if (R === "der") {
|
|
10838
|
+
const { r: j, s: _ } = en.toSig(Ln(x));
|
|
10839
|
+
return new A(j, _);
|
|
10840
10840
|
}
|
|
10841
|
-
|
|
10841
|
+
R === "recovered" && (N = x[0], R = "compact", x = x.subarray(1));
|
|
10842
10842
|
const b = i.BYTES, C = x.subarray(0, b), k = x.subarray(b, b * 2);
|
|
10843
|
-
return new A(i.fromBytes(C), i.fromBytes(k),
|
|
10843
|
+
return new A(i.fromBytes(C), i.fromBytes(k), N);
|
|
10844
10844
|
}
|
|
10845
|
-
static fromHex(x,
|
|
10846
|
-
return this.fromBytes(ps(x),
|
|
10845
|
+
static fromHex(x, R) {
|
|
10846
|
+
return this.fromBytes(ps(x), R);
|
|
10847
10847
|
}
|
|
10848
10848
|
addRecoveryBit(x) {
|
|
10849
10849
|
return new A(this.r, this.s, x);
|
|
10850
10850
|
}
|
|
10851
10851
|
recoverPublicKey(x) {
|
|
10852
|
-
const
|
|
10852
|
+
const R = s.ORDER, { r: N, s: b, recovery: C } = this;
|
|
10853
10853
|
if (C == null || ![0, 1, 2, 3].includes(C))
|
|
10854
10854
|
throw new Error("recovery id invalid");
|
|
10855
|
-
if (c * rh <
|
|
10855
|
+
if (c * rh < R && C > 1)
|
|
10856
10856
|
throw new Error("recovery id is ambiguous for h>1 curve");
|
|
10857
|
-
const
|
|
10858
|
-
if (!s.isValid(
|
|
10857
|
+
const j = C === 2 || C === 3 ? N + c : N;
|
|
10858
|
+
if (!s.isValid(j))
|
|
10859
10859
|
throw new Error("recovery id 2 or 3 invalid");
|
|
10860
|
-
const
|
|
10860
|
+
const _ = s.toBytes(j), z = e.fromBytes(vn(oh((C & 1) === 0), _)), K = i.inv(j), H = L(qe("msgHash", x)), q = i.create(-H * K), V = i.create(b * K), re = e.BASE.multiplyUnsafe(q).add(z.multiplyUnsafe(V));
|
|
10861
10861
|
if (re.is0())
|
|
10862
10862
|
throw new Error("point at infinify");
|
|
10863
10863
|
return re.assertValidity(), re;
|
|
@@ -10869,13 +10869,13 @@ function Uv(e, t, n = {}) {
|
|
|
10869
10869
|
toBytes(x = m) {
|
|
10870
10870
|
if (Oa(x), x === "der")
|
|
10871
10871
|
return ps(en.hexFromSig(this));
|
|
10872
|
-
const
|
|
10872
|
+
const R = i.toBytes(this.r), N = i.toBytes(this.s);
|
|
10873
10873
|
if (x === "recovered") {
|
|
10874
10874
|
if (this.recovery == null)
|
|
10875
10875
|
throw new Error("recovery bit must be present");
|
|
10876
|
-
return vn(Uint8Array.of(this.recovery),
|
|
10876
|
+
return vn(Uint8Array.of(this.recovery), R, N);
|
|
10877
10877
|
}
|
|
10878
|
-
return vn(
|
|
10878
|
+
return vn(R, N);
|
|
10879
10879
|
}
|
|
10880
10880
|
toHex(x) {
|
|
10881
10881
|
return pr(this.toBytes(x));
|
|
@@ -10908,56 +10908,56 @@ function Uv(e, t, n = {}) {
|
|
|
10908
10908
|
const B = n.bits2int || function(x) {
|
|
10909
10909
|
if (x.length > 8192)
|
|
10910
10910
|
throw new Error("input is too large");
|
|
10911
|
-
const
|
|
10912
|
-
return
|
|
10911
|
+
const R = Us(x), N = x.length * 8 - a;
|
|
10912
|
+
return N > 0 ? R >> BigInt(N) : R;
|
|
10913
10913
|
}, L = n.bits2int_modN || function(x) {
|
|
10914
10914
|
return i.create(B(x));
|
|
10915
10915
|
}, F = Bo(a);
|
|
10916
|
-
function
|
|
10916
|
+
function D(E) {
|
|
10917
10917
|
return Gy("num < 2^" + a, E, tn, F), i.toBytes(E);
|
|
10918
10918
|
}
|
|
10919
10919
|
function g(E, x) {
|
|
10920
10920
|
return Ln(E, void 0, "message"), x ? Ln(t(E), void 0, "prehashed message") : E;
|
|
10921
10921
|
}
|
|
10922
|
-
function w(E, x,
|
|
10923
|
-
if (["recovered", "canonical"].some((q) => q in
|
|
10922
|
+
function w(E, x, R) {
|
|
10923
|
+
if (["recovered", "canonical"].some((q) => q in R))
|
|
10924
10924
|
throw new Error("sign() legacy options not supported");
|
|
10925
|
-
const { lowS:
|
|
10925
|
+
const { lowS: N, prehash: b, extraEntropy: C } = Ii(R, h);
|
|
10926
10926
|
E = g(E, b);
|
|
10927
|
-
const k = L(E),
|
|
10927
|
+
const k = L(E), j = lr(i, x), _ = [D(j), D(k)];
|
|
10928
10928
|
if (C != null && C !== !1) {
|
|
10929
10929
|
const q = C === !0 ? r(p.secretKey) : C;
|
|
10930
|
-
|
|
10930
|
+
_.push(qe("extraEntropy", q));
|
|
10931
10931
|
}
|
|
10932
|
-
const
|
|
10933
|
-
function
|
|
10932
|
+
const z = vn(..._), K = k;
|
|
10933
|
+
function H(q) {
|
|
10934
10934
|
const V = B(q);
|
|
10935
10935
|
if (!i.isValidNot0(V))
|
|
10936
10936
|
return;
|
|
10937
10937
|
const re = i.inv(V), te = e.BASE.multiply(V).toAffine(), de = i.create(te.x);
|
|
10938
10938
|
if (de === tn)
|
|
10939
10939
|
return;
|
|
10940
|
-
const Re = i.create(re * i.create(K + de *
|
|
10940
|
+
const Re = i.create(re * i.create(K + de * j));
|
|
10941
10941
|
if (Re === tn)
|
|
10942
10942
|
return;
|
|
10943
10943
|
let je = (te.x === de ? 0 : 2) | Number(te.y & br), Y = Re;
|
|
10944
|
-
return
|
|
10944
|
+
return N && v(Re) && (Y = i.neg(Re), je ^= 1), new A(de, Y, je);
|
|
10945
10945
|
}
|
|
10946
|
-
return { seed:
|
|
10946
|
+
return { seed: z, k2sig: H };
|
|
10947
10947
|
}
|
|
10948
|
-
function P(E, x,
|
|
10948
|
+
function P(E, x, R = {}) {
|
|
10949
10949
|
E = qe("message", E);
|
|
10950
|
-
const { seed:
|
|
10951
|
-
return qy(t.outputLen, i.BYTES, o)(
|
|
10950
|
+
const { seed: N, k2sig: b } = w(E, x, R);
|
|
10951
|
+
return qy(t.outputLen, i.BYTES, o)(N, b);
|
|
10952
10952
|
}
|
|
10953
|
-
function
|
|
10953
|
+
function I(E) {
|
|
10954
10954
|
let x;
|
|
10955
|
-
const
|
|
10956
|
-
if (!
|
|
10955
|
+
const R = typeof E == "string" || Cs(E), N = !R && E !== null && typeof E == "object" && typeof E.r == "bigint" && typeof E.s == "bigint";
|
|
10956
|
+
if (!R && !N)
|
|
10957
10957
|
throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");
|
|
10958
|
-
if (
|
|
10958
|
+
if (N)
|
|
10959
10959
|
x = new A(E.r, E.s);
|
|
10960
|
-
else if (
|
|
10960
|
+
else if (R) {
|
|
10961
10961
|
try {
|
|
10962
10962
|
x = A.fromBytes(qe("sig", E), "der");
|
|
10963
10963
|
} catch (b) {
|
|
@@ -10973,26 +10973,26 @@ function Uv(e, t, n = {}) {
|
|
|
10973
10973
|
}
|
|
10974
10974
|
return x || !1;
|
|
10975
10975
|
}
|
|
10976
|
-
function
|
|
10977
|
-
const { lowS: b, prehash: C, format: k } = Ii(
|
|
10978
|
-
if (
|
|
10976
|
+
function T(E, x, R, N = {}) {
|
|
10977
|
+
const { lowS: b, prehash: C, format: k } = Ii(N, h);
|
|
10978
|
+
if (R = qe("publicKey", R), x = g(qe("message", x), C), "strict" in N)
|
|
10979
10979
|
throw new Error("options.strict was renamed to lowS");
|
|
10980
|
-
const
|
|
10981
|
-
if (
|
|
10980
|
+
const j = k === void 0 ? I(E) : A.fromBytes(qe("sig", E), k);
|
|
10981
|
+
if (j === !1)
|
|
10982
10982
|
return !1;
|
|
10983
10983
|
try {
|
|
10984
|
-
const
|
|
10985
|
-
if (b &&
|
|
10984
|
+
const _ = e.fromBytes(R);
|
|
10985
|
+
if (b && j.hasHighS())
|
|
10986
10986
|
return !1;
|
|
10987
|
-
const { r:
|
|
10988
|
-
return te.is0() ? !1 : i.create(te.x) ===
|
|
10987
|
+
const { r: z, s: K } = j, H = L(x), q = i.inv(K), V = i.create(H * q), re = i.create(z * q), te = e.BASE.multiplyUnsafe(V).add(_.multiplyUnsafe(re));
|
|
10988
|
+
return te.is0() ? !1 : i.create(te.x) === z;
|
|
10989
10989
|
} catch {
|
|
10990
10990
|
return !1;
|
|
10991
10991
|
}
|
|
10992
10992
|
}
|
|
10993
|
-
function S(E, x,
|
|
10994
|
-
const { prehash:
|
|
10995
|
-
return x = g(x,
|
|
10993
|
+
function S(E, x, R = {}) {
|
|
10994
|
+
const { prehash: N } = Ii(R, h);
|
|
10995
|
+
return x = g(x, N), A.fromBytes(E, "recovered").recoverPublicKey(x).toBytes();
|
|
10996
10996
|
}
|
|
10997
10997
|
return Object.freeze({
|
|
10998
10998
|
keygen: l,
|
|
@@ -11002,7 +11002,7 @@ function Uv(e, t, n = {}) {
|
|
|
11002
11002
|
lengths: p,
|
|
11003
11003
|
Point: e,
|
|
11004
11004
|
sign: P,
|
|
11005
|
-
verify:
|
|
11005
|
+
verify: T,
|
|
11006
11006
|
recoverPublicKey: S,
|
|
11007
11007
|
Signature: A,
|
|
11008
11008
|
hash: t
|
|
@@ -11254,7 +11254,7 @@ async function Jv(e, t) {
|
|
|
11254
11254
|
poll: !0,
|
|
11255
11255
|
pollingInterval: u,
|
|
11256
11256
|
async onBlockNumber(F) {
|
|
11257
|
-
const
|
|
11257
|
+
const D = (w) => {
|
|
11258
11258
|
clearTimeout(B), v(), w(), m();
|
|
11259
11259
|
};
|
|
11260
11260
|
let g = F;
|
|
@@ -11263,7 +11263,7 @@ async function Jv(e, t) {
|
|
|
11263
11263
|
if (p) {
|
|
11264
11264
|
if (r > 1 && (!p.blockNumber || g - p.blockNumber + 1n < r))
|
|
11265
11265
|
return;
|
|
11266
|
-
|
|
11266
|
+
D(() => L.resolve(p));
|
|
11267
11267
|
return;
|
|
11268
11268
|
}
|
|
11269
11269
|
if (n && !d && (h = !0, await xa(async () => {
|
|
@@ -11273,7 +11273,7 @@ async function Jv(e, t) {
|
|
|
11273
11273
|
retryCount: i
|
|
11274
11274
|
}), h = !1), p = await se(e, is, "getTransactionReceipt")({ hash: o }), r > 1 && (!p.blockNumber || g - p.blockNumber + 1n < r))
|
|
11275
11275
|
return;
|
|
11276
|
-
|
|
11276
|
+
D(() => L.resolve(p));
|
|
11277
11277
|
} catch (w) {
|
|
11278
11278
|
if (w instanceof Cd || w instanceof Bd) {
|
|
11279
11279
|
if (!d) {
|
|
@@ -11291,26 +11291,26 @@ async function Jv(e, t) {
|
|
|
11291
11291
|
shouldRetry: ({ error: S }) => S instanceof jd
|
|
11292
11292
|
});
|
|
11293
11293
|
h = !1;
|
|
11294
|
-
const
|
|
11295
|
-
if (!
|
|
11296
|
-
hash:
|
|
11294
|
+
const I = P.transactions.find(({ from: S, nonce: E }) => S === f.from && E === f.nonce);
|
|
11295
|
+
if (!I || (p = await se(e, is, "getTransactionReceipt")({
|
|
11296
|
+
hash: I.hash
|
|
11297
11297
|
}), r > 1 && (!p.blockNumber || g - p.blockNumber + 1n < r)))
|
|
11298
11298
|
return;
|
|
11299
|
-
let
|
|
11300
|
-
|
|
11299
|
+
let T = "replaced";
|
|
11300
|
+
I.to === f.to && I.value === f.value && I.input === f.input ? T = "repriced" : I.from === I.to && I.value === 0n && (T = "cancelled"), D(() => {
|
|
11301
11301
|
var S;
|
|
11302
11302
|
(S = L.onReplaced) == null || S.call(L, {
|
|
11303
|
-
reason:
|
|
11303
|
+
reason: T,
|
|
11304
11304
|
replacedTransaction: f,
|
|
11305
|
-
transaction:
|
|
11305
|
+
transaction: I,
|
|
11306
11306
|
transactionReceipt: p
|
|
11307
11307
|
}), L.resolve(p);
|
|
11308
11308
|
});
|
|
11309
11309
|
} catch (P) {
|
|
11310
|
-
|
|
11310
|
+
D(() => L.reject(P));
|
|
11311
11311
|
}
|
|
11312
11312
|
} else
|
|
11313
|
-
|
|
11313
|
+
D(() => L.reject(w));
|
|
11314
11314
|
}
|
|
11315
11315
|
}
|
|
11316
11316
|
});
|
|
@@ -11435,29 +11435,29 @@ function tx(e, { address: t, args: n, batch: r = !0, event: o, events: s, fromBl
|
|
|
11435
11435
|
return;
|
|
11436
11436
|
}
|
|
11437
11437
|
try {
|
|
11438
|
-
let
|
|
11438
|
+
let D;
|
|
11439
11439
|
if (A)
|
|
11440
|
-
|
|
11440
|
+
D = await se(e, Hs, "getFilterChanges")({ filter: A });
|
|
11441
11441
|
else {
|
|
11442
11442
|
const g = await se(e, Mo, "getBlockNumber")({});
|
|
11443
|
-
y && y !== g ?
|
|
11443
|
+
y && y !== g ? D = await se(e, Oc, "getLogs")({
|
|
11444
11444
|
address: t,
|
|
11445
11445
|
args: n,
|
|
11446
11446
|
event: o,
|
|
11447
11447
|
events: s,
|
|
11448
11448
|
fromBlock: y + 1n,
|
|
11449
11449
|
toBlock: g
|
|
11450
|
-
}) :
|
|
11450
|
+
}) : D = [], y = g;
|
|
11451
11451
|
}
|
|
11452
|
-
if (
|
|
11452
|
+
if (D.length === 0)
|
|
11453
11453
|
return;
|
|
11454
11454
|
if (r)
|
|
11455
|
-
$.onLogs(
|
|
11455
|
+
$.onLogs(D);
|
|
11456
11456
|
else
|
|
11457
|
-
for (const g of
|
|
11457
|
+
for (const g of D)
|
|
11458
11458
|
$.onLogs([g]);
|
|
11459
|
-
} catch (
|
|
11460
|
-
A &&
|
|
11459
|
+
} catch (D) {
|
|
11460
|
+
A && D instanceof Vn && (B = !1), (F = $.onError) == null || F.call($, D);
|
|
11461
11461
|
}
|
|
11462
11462
|
}, {
|
|
11463
11463
|
emitOnBegin: !0,
|
|
@@ -11473,15 +11473,15 @@ function tx(e, { address: t, args: n, batch: r = !0, event: o, events: s, fromBl
|
|
|
11473
11473
|
try {
|
|
11474
11474
|
const y = (() => {
|
|
11475
11475
|
if (e.transport.type === "fallback") {
|
|
11476
|
-
const F = e.transport.transports.find((
|
|
11476
|
+
const F = e.transport.transports.find((D) => D.config.type === "webSocket" || D.config.type === "ipc");
|
|
11477
11477
|
return F ? F.value : e.transport;
|
|
11478
11478
|
}
|
|
11479
11479
|
return e.transport;
|
|
11480
11480
|
})(), A = s ?? (o ? [o] : void 0);
|
|
11481
11481
|
let B = [];
|
|
11482
|
-
A && (B = [A.flatMap((
|
|
11483
|
-
abi: [
|
|
11484
|
-
eventName:
|
|
11482
|
+
A && (B = [A.flatMap((D) => Oo({
|
|
11483
|
+
abi: [D],
|
|
11484
|
+
eventName: D.name,
|
|
11485
11485
|
args: n
|
|
11486
11486
|
}))], o && (B = B[0]));
|
|
11487
11487
|
const { unsubscribe: L } = await y.subscribe({
|
|
@@ -11490,27 +11490,27 @@ function tx(e, { address: t, args: n, batch: r = !0, event: o, events: s, fromBl
|
|
|
11490
11490
|
var g;
|
|
11491
11491
|
if (!v)
|
|
11492
11492
|
return;
|
|
11493
|
-
const
|
|
11493
|
+
const D = F.result;
|
|
11494
11494
|
try {
|
|
11495
11495
|
const { eventName: w, args: P } = Rc({
|
|
11496
11496
|
abi: A ?? [],
|
|
11497
|
-
data:
|
|
11498
|
-
topics:
|
|
11497
|
+
data: D.data,
|
|
11498
|
+
topics: D.topics,
|
|
11499
11499
|
strict: p
|
|
11500
|
-
}),
|
|
11501
|
-
a([
|
|
11500
|
+
}), I = ln(D, { args: P, eventName: w });
|
|
11501
|
+
a([I]);
|
|
11502
11502
|
} catch (w) {
|
|
11503
|
-
let P,
|
|
11503
|
+
let P, I;
|
|
11504
11504
|
if (w instanceof Jr || w instanceof Is) {
|
|
11505
11505
|
if (d)
|
|
11506
11506
|
return;
|
|
11507
|
-
P = w.abiItem.name,
|
|
11507
|
+
P = w.abiItem.name, I = (g = w.abiItem.inputs) == null ? void 0 : g.some((S) => !("name" in S && S.name));
|
|
11508
11508
|
}
|
|
11509
|
-
const
|
|
11510
|
-
args:
|
|
11509
|
+
const T = ln(D, {
|
|
11510
|
+
args: I ? [] : {},
|
|
11511
11511
|
eventName: P
|
|
11512
11512
|
});
|
|
11513
|
-
a([
|
|
11513
|
+
a([T]);
|
|
11514
11514
|
}
|
|
11515
11515
|
},
|
|
11516
11516
|
onError(F) {
|
|
@@ -13029,8 +13029,8 @@ function UE() {
|
|
|
13029
13029
|
return A = L;
|
|
13030
13030
|
}
|
|
13031
13031
|
if (F = A, n(y, L)) return F;
|
|
13032
|
-
var
|
|
13033
|
-
return f !== void 0 && f(F,
|
|
13032
|
+
var D = d(L);
|
|
13033
|
+
return f !== void 0 && f(F, D) ? (y = L, F) : (y = L, A = D);
|
|
13034
13034
|
}
|
|
13035
13035
|
var $ = !1, y, A, B = u === void 0 ? null : u;
|
|
13036
13036
|
return [
|
|
@@ -13090,8 +13090,8 @@ function zE() {
|
|
|
13090
13090
|
}
|
|
13091
13091
|
if (F = A, n(y, L))
|
|
13092
13092
|
return F;
|
|
13093
|
-
var
|
|
13094
|
-
return f !== void 0 && f(F,
|
|
13093
|
+
var D = d(L);
|
|
13094
|
+
return f !== void 0 && f(F, D) ? (y = L, F) : (y = L, A = D);
|
|
13095
13095
|
}
|
|
13096
13096
|
var $ = !1, y, A, B = u === void 0 ? null : u;
|
|
13097
13097
|
return [
|
|
@@ -14122,19 +14122,19 @@ const c6 = (e) => ({
|
|
|
14122
14122
|
x: n,
|
|
14123
14123
|
y: r
|
|
14124
14124
|
}, p = cl(o), h = al(p), m = await i.getDimensions(l), v = p === "y", $ = v ? "top" : "left", y = v ? "bottom" : "right", A = v ? "clientHeight" : "clientWidth", B = s.reference[h] + s.reference[p] - f[p] - s.floating[h], L = f[p] - s.reference[p], F = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l));
|
|
14125
|
-
let
|
|
14126
|
-
(!
|
|
14127
|
-
const g = B / 2 - L / 2, w =
|
|
14125
|
+
let D = F ? F[A] : 0;
|
|
14126
|
+
(!D || !await (i.isElement == null ? void 0 : i.isElement(F))) && (D = c.floating[A] || s.floating[h]);
|
|
14127
|
+
const g = B / 2 - L / 2, w = D / 2 - m[h] / 2 - 1, P = dn(d[$], w), I = dn(d[y], w), T = P, S = D - m[h] - I, E = D / 2 - m[h] / 2 + g, x = qa(T, E, S), R = !a.arrow && Mr(o) != null && E !== x && s.reference[h] / 2 - (E < T ? P : I) - m[h] / 2 < 0, N = R ? E < T ? E - T : E - S : 0;
|
|
14128
14128
|
return {
|
|
14129
|
-
[p]: f[p] +
|
|
14129
|
+
[p]: f[p] + N,
|
|
14130
14130
|
data: {
|
|
14131
14131
|
[p]: x,
|
|
14132
|
-
centerOffset: E - x -
|
|
14133
|
-
...
|
|
14134
|
-
alignmentOffset:
|
|
14132
|
+
centerOffset: E - x - N,
|
|
14133
|
+
...R && {
|
|
14134
|
+
alignmentOffset: N
|
|
14135
14135
|
}
|
|
14136
14136
|
},
|
|
14137
|
-
reset:
|
|
14137
|
+
reset: R
|
|
14138
14138
|
};
|
|
14139
14139
|
}
|
|
14140
14140
|
}), l6 = function(e) {
|
|
@@ -14163,7 +14163,7 @@ const c6 = (e) => ({
|
|
|
14163
14163
|
return {};
|
|
14164
14164
|
const $ = $n(o), y = nn(c), A = $n(c) === c, B = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), L = f || (A || !m ? [xs(c)] : F2(c)), F = h !== "none";
|
|
14165
14165
|
!f && F && L.push(...U2(c, m, h, B));
|
|
14166
|
-
const
|
|
14166
|
+
const D = [c, ...L], g = await ei(t, v), w = [];
|
|
14167
14167
|
let P = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
14168
14168
|
if (u && w.push(g[$]), d) {
|
|
14169
14169
|
const E = k2(o, i, B);
|
|
@@ -14173,8 +14173,8 @@ const c6 = (e) => ({
|
|
|
14173
14173
|
placement: o,
|
|
14174
14174
|
overflows: w
|
|
14175
14175
|
}], !w.every((E) => E <= 0)) {
|
|
14176
|
-
var
|
|
14177
|
-
const E = (((
|
|
14176
|
+
var I, T;
|
|
14177
|
+
const E = (((I = s.flip) == null ? void 0 : I.index) || 0) + 1, x = D[E];
|
|
14178
14178
|
if (x && (!(d === "alignment" ? y !== nn(x) : !1) || // We leave the current main axis only if every placement on that axis
|
|
14179
14179
|
// overflows the main axis.
|
|
14180
14180
|
P.every((b) => nn(b.placement) === y ? b.overflows[0] > 0 : !0)))
|
|
@@ -14187,12 +14187,12 @@ const c6 = (e) => ({
|
|
|
14187
14187
|
placement: x
|
|
14188
14188
|
}
|
|
14189
14189
|
};
|
|
14190
|
-
let
|
|
14191
|
-
if (!
|
|
14190
|
+
let R = (T = P.filter((N) => N.overflows[0] <= 0).sort((N, b) => N.overflows[1] - b.overflows[1])[0]) == null ? void 0 : T.placement;
|
|
14191
|
+
if (!R)
|
|
14192
14192
|
switch (p) {
|
|
14193
14193
|
case "bestFit": {
|
|
14194
14194
|
var S;
|
|
14195
|
-
const
|
|
14195
|
+
const N = (S = P.filter((b) => {
|
|
14196
14196
|
if (F) {
|
|
14197
14197
|
const C = nn(b.placement);
|
|
14198
14198
|
return C === y || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -14201,17 +14201,17 @@ const c6 = (e) => ({
|
|
|
14201
14201
|
}
|
|
14202
14202
|
return !0;
|
|
14203
14203
|
}).map((b) => [b.placement, b.overflows.filter((C) => C > 0).reduce((C, k) => C + k, 0)]).sort((b, C) => b[1] - C[1])[0]) == null ? void 0 : S[0];
|
|
14204
|
-
|
|
14204
|
+
N && (R = N);
|
|
14205
14205
|
break;
|
|
14206
14206
|
}
|
|
14207
14207
|
case "initialPlacement":
|
|
14208
|
-
|
|
14208
|
+
R = c;
|
|
14209
14209
|
break;
|
|
14210
14210
|
}
|
|
14211
|
-
if (o !==
|
|
14211
|
+
if (o !== R)
|
|
14212
14212
|
return {
|
|
14213
14213
|
reset: {
|
|
14214
|
-
placement:
|
|
14214
|
+
placement: R
|
|
14215
14215
|
}
|
|
14216
14216
|
};
|
|
14217
14217
|
}
|
|
@@ -14346,15 +14346,15 @@ const d6 = function(e) {
|
|
|
14346
14346
|
let v, $;
|
|
14347
14347
|
d === "top" || d === "bottom" ? (v = d, $ = f === (await (i.isRTL == null ? void 0 : i.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : ($ = d, v = f === "end" ? "top" : "bottom");
|
|
14348
14348
|
const y = m - u.top - u.bottom, A = h - u.left - u.right, B = dn(m - u[v], y), L = dn(h - u[$], A), F = !t.middlewareData.shift;
|
|
14349
|
-
let
|
|
14350
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (g = A), (r = t.middlewareData.shift) != null && r.enabled.y && (
|
|
14351
|
-
const P = _e(u.left, 0),
|
|
14352
|
-
p ? g = h - 2 * (P !== 0 ||
|
|
14349
|
+
let D = B, g = L;
|
|
14350
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (g = A), (r = t.middlewareData.shift) != null && r.enabled.y && (D = y), F && !f) {
|
|
14351
|
+
const P = _e(u.left, 0), I = _e(u.right, 0), T = _e(u.top, 0), S = _e(u.bottom, 0);
|
|
14352
|
+
p ? g = h - 2 * (P !== 0 || I !== 0 ? P + I : _e(u.left, u.right)) : D = m - 2 * (T !== 0 || S !== 0 ? T + S : _e(u.top, u.bottom));
|
|
14353
14353
|
}
|
|
14354
14354
|
await a({
|
|
14355
14355
|
...t,
|
|
14356
14356
|
availableWidth: g,
|
|
14357
|
-
availableHeight:
|
|
14357
|
+
availableHeight: D
|
|
14358
14358
|
});
|
|
14359
14359
|
const w = await i.getDimensions(c.floating);
|
|
14360
14360
|
return h !== w.width || m !== w.height ? {
|
|
@@ -14679,15 +14679,15 @@ function O6(e, t) {
|
|
|
14679
14679
|
};
|
|
14680
14680
|
let B = !0;
|
|
14681
14681
|
function L(F) {
|
|
14682
|
-
const
|
|
14683
|
-
if (
|
|
14682
|
+
const D = F[0].intersectionRatio;
|
|
14683
|
+
if (D !== a) {
|
|
14684
14684
|
if (!B)
|
|
14685
14685
|
return i();
|
|
14686
|
-
|
|
14686
|
+
D ? i(!1, D) : r = setTimeout(() => {
|
|
14687
14687
|
i(!1, 1e-7);
|
|
14688
14688
|
}, 1e3);
|
|
14689
14689
|
}
|
|
14690
|
-
|
|
14690
|
+
D === 1 && !a0(l, e.getBoundingClientRect()) && i(), B = !1;
|
|
14691
14691
|
}
|
|
14692
14692
|
try {
|
|
14693
14693
|
n = new IntersectionObserver(L, {
|
|
@@ -14822,29 +14822,29 @@ function u0(e) {
|
|
|
14822
14822
|
const [h, m] = U.useState(null), [v, $] = U.useState(null), y = U.useCallback((b) => {
|
|
14823
14823
|
b !== F.current && (F.current = b, m(b));
|
|
14824
14824
|
}, []), A = U.useCallback((b) => {
|
|
14825
|
-
b !==
|
|
14826
|
-
}, []), B = s || h, L = i || v, F = U.useRef(null),
|
|
14827
|
-
if (!F.current || !
|
|
14825
|
+
b !== D.current && (D.current = b, $(b));
|
|
14826
|
+
}, []), B = s || h, L = i || v, F = U.useRef(null), D = U.useRef(null), g = U.useRef(u), w = a != null, P = zi(a), I = zi(o), T = zi(l), S = U.useCallback(() => {
|
|
14827
|
+
if (!F.current || !D.current)
|
|
14828
14828
|
return;
|
|
14829
14829
|
const b = {
|
|
14830
14830
|
placement: t,
|
|
14831
14831
|
strategy: n,
|
|
14832
14832
|
middleware: f
|
|
14833
14833
|
};
|
|
14834
|
-
|
|
14834
|
+
I.current && (b.platform = I.current), M6(F.current, D.current, b).then((C) => {
|
|
14835
14835
|
const k = {
|
|
14836
14836
|
...C,
|
|
14837
14837
|
// The floating element's position may be recomputed while it's closed
|
|
14838
14838
|
// but still mounted (such as when transitioning out). To ensure
|
|
14839
14839
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
14840
14840
|
// setting it to `true` when `open === false` (must be specified).
|
|
14841
|
-
isPositioned:
|
|
14841
|
+
isPositioned: T.current !== !1
|
|
14842
14842
|
};
|
|
14843
14843
|
E.current && !As(g.current, k) && (g.current = k, Qr.flushSync(() => {
|
|
14844
14844
|
d(k);
|
|
14845
14845
|
}));
|
|
14846
14846
|
});
|
|
14847
|
-
}, [f, t, n,
|
|
14847
|
+
}, [f, t, n, I, T]);
|
|
14848
14848
|
cs(() => {
|
|
14849
14849
|
l === !1 && g.current.isPositioned && (g.current.isPositioned = !1, d((b) => ({
|
|
14850
14850
|
...b,
|
|
@@ -14855,7 +14855,7 @@ function u0(e) {
|
|
|
14855
14855
|
cs(() => (E.current = !0, () => {
|
|
14856
14856
|
E.current = !1;
|
|
14857
14857
|
}), []), cs(() => {
|
|
14858
|
-
if (B && (F.current = B), L && (
|
|
14858
|
+
if (B && (F.current = B), L && (D.current = L), B && L) {
|
|
14859
14859
|
if (P.current)
|
|
14860
14860
|
return P.current(B, L, S);
|
|
14861
14861
|
S();
|
|
@@ -14863,25 +14863,25 @@ function u0(e) {
|
|
|
14863
14863
|
}, [B, L, S, P, w]);
|
|
14864
14864
|
const x = U.useMemo(() => ({
|
|
14865
14865
|
reference: F,
|
|
14866
|
-
floating:
|
|
14866
|
+
floating: D,
|
|
14867
14867
|
setReference: y,
|
|
14868
14868
|
setFloating: A
|
|
14869
|
-
}), [y, A]),
|
|
14869
|
+
}), [y, A]), R = U.useMemo(() => ({
|
|
14870
14870
|
reference: B,
|
|
14871
14871
|
floating: L
|
|
14872
|
-
}), [B, L]),
|
|
14872
|
+
}), [B, L]), N = U.useMemo(() => {
|
|
14873
14873
|
const b = {
|
|
14874
14874
|
position: n,
|
|
14875
14875
|
left: 0,
|
|
14876
14876
|
top: 0
|
|
14877
14877
|
};
|
|
14878
|
-
if (!
|
|
14878
|
+
if (!R.floating)
|
|
14879
14879
|
return b;
|
|
14880
|
-
const C = of(
|
|
14880
|
+
const C = of(R.floating, u.x), k = of(R.floating, u.y);
|
|
14881
14881
|
return c ? {
|
|
14882
14882
|
...b,
|
|
14883
14883
|
transform: "translate(" + C + "px, " + k + "px)",
|
|
14884
|
-
...l0(
|
|
14884
|
+
...l0(R.floating) >= 1.5 && {
|
|
14885
14885
|
willChange: "transform"
|
|
14886
14886
|
}
|
|
14887
14887
|
} : {
|
|
@@ -14889,14 +14889,14 @@ function u0(e) {
|
|
|
14889
14889
|
left: C,
|
|
14890
14890
|
top: k
|
|
14891
14891
|
};
|
|
14892
|
-
}, [n, c,
|
|
14892
|
+
}, [n, c, R.floating, u.x, u.y]);
|
|
14893
14893
|
return U.useMemo(() => ({
|
|
14894
14894
|
...u,
|
|
14895
14895
|
update: S,
|
|
14896
14896
|
refs: x,
|
|
14897
|
-
elements:
|
|
14898
|
-
floatingStyles:
|
|
14899
|
-
}), [u, S, x,
|
|
14897
|
+
elements: R,
|
|
14898
|
+
floatingStyles: N
|
|
14899
|
+
}), [u, S, x, R, N]);
|
|
14900
14900
|
}
|
|
14901
14901
|
const D6 = (e) => {
|
|
14902
14902
|
function t(n) {
|
|
@@ -15199,16 +15199,16 @@ const o5 = (e) => ({
|
|
|
15199
15199
|
}, B = await Ui(uf(A, h.scrollHeight + m + f.clientTop), u), L = await Ui(A, {
|
|
15200
15200
|
...u,
|
|
15201
15201
|
elementContext: "reference"
|
|
15202
|
-
}), F = _e(0, B.top),
|
|
15202
|
+
}), F = _e(0, B.top), D = A.y + F, P = (h.scrollHeight > h.clientHeight ? (I) => I : Po)(_e(0, h.scrollHeight + (v && y || $ ? m * 2 : 0) - F - _e(0, B.bottom)));
|
|
15203
15203
|
if (h.style.maxHeight = P + "px", h.scrollTop = F, o) {
|
|
15204
|
-
const
|
|
15205
|
-
Qr.flushSync(() => o(
|
|
15204
|
+
const I = h.offsetHeight < p.offsetHeight * dn(c, n.current.length) - 1 || L.top >= -a || L.bottom >= -a;
|
|
15205
|
+
Qr.flushSync(() => o(I));
|
|
15206
15206
|
}
|
|
15207
15207
|
return r && (r.current = await Ui(uf({
|
|
15208
15208
|
...A,
|
|
15209
|
-
y:
|
|
15209
|
+
y: D
|
|
15210
15210
|
}, h.offsetHeight + m + f.clientTop), u)), {
|
|
15211
|
-
y:
|
|
15211
|
+
y: D
|
|
15212
15212
|
};
|
|
15213
15213
|
}
|
|
15214
15214
|
});
|
|
@@ -15308,30 +15308,30 @@ function f5({ children: e, enabled: t = !0 }) {
|
|
|
15308
15308
|
ve(() => {
|
|
15309
15309
|
l && s(0);
|
|
15310
15310
|
}, [l]);
|
|
15311
|
-
let { refs: $, floatingStyles: y, context: A } = n5({ open: l, placement: m === "selection" ? v === "center" ? "bottom" : `bottom-${v}` : v === "center" ? `${m}` : `${m}-${v}`, strategy: "absolute", transform: !1, middleware: [ul({ mainAxis: m === "selection" ? 0 : d, crossAxis: f }), f0({ padding: p }), m !== "selection" && d0({ padding: p }), m === "selection" && h ? o5({ ...h, padding: p, overflowRef: i, offset: o, minItemsVisible: ff, referenceOverflowThreshold: p, onFallbackChange(
|
|
15312
|
-
var
|
|
15313
|
-
if (!
|
|
15311
|
+
let { refs: $, floatingStyles: y, context: A } = n5({ open: l, placement: m === "selection" ? v === "center" ? "bottom" : `bottom-${v}` : v === "center" ? `${m}` : `${m}-${v}`, strategy: "absolute", transform: !1, middleware: [ul({ mainAxis: m === "selection" ? 0 : d, crossAxis: f }), f0({ padding: p }), m !== "selection" && d0({ padding: p }), m === "selection" && h ? o5({ ...h, padding: p, overflowRef: i, offset: o, minItemsVisible: ff, referenceOverflowThreshold: p, onFallbackChange(I) {
|
|
15312
|
+
var T, S;
|
|
15313
|
+
if (!I) return;
|
|
15314
15314
|
let E = A.elements.floating;
|
|
15315
15315
|
if (!E) return;
|
|
15316
|
-
let x = parseFloat(getComputedStyle(E).scrollPaddingBottom) || 0,
|
|
15317
|
-
for (let C of (S = (
|
|
15318
|
-
let k = C.offsetTop,
|
|
15319
|
-
if (k >=
|
|
15316
|
+
let x = parseFloat(getComputedStyle(E).scrollPaddingBottom) || 0, R = Math.min(ff, E.childElementCount), N = 0, b = 0;
|
|
15317
|
+
for (let C of (S = (T = A.elements.floating) == null ? void 0 : T.childNodes) != null ? S : []) if (mn(C)) {
|
|
15318
|
+
let k = C.offsetTop, j = k + C.clientHeight + x, _ = E.scrollTop, z = _ + E.clientHeight;
|
|
15319
|
+
if (k >= _ && j <= z) R--;
|
|
15320
15320
|
else {
|
|
15321
|
-
b = Math.max(0, Math.min(
|
|
15321
|
+
b = Math.max(0, Math.min(j, z) - Math.max(k, _)), N = C.clientHeight;
|
|
15322
15322
|
break;
|
|
15323
15323
|
}
|
|
15324
15324
|
}
|
|
15325
|
-
|
|
15326
|
-
let k =
|
|
15325
|
+
R >= 1 && s((C) => {
|
|
15326
|
+
let k = N * R - b + x;
|
|
15327
15327
|
return C >= k ? C : k;
|
|
15328
15328
|
});
|
|
15329
|
-
} }) : null, j6({ padding: p, apply({ availableWidth:
|
|
15330
|
-
Object.assign(S.floating.style, { overflow: "auto", maxWidth: `${
|
|
15329
|
+
} }) : null, j6({ padding: p, apply({ availableWidth: I, availableHeight: T, elements: S }) {
|
|
15330
|
+
Object.assign(S.floating.style, { overflow: "auto", maxWidth: `${I}px`, maxHeight: `min(var(--anchor-max-height, 100vh), ${T}px)` });
|
|
15331
15331
|
} })].filter(Boolean), whileElementsMounted: c0 }), [B = m, L = v] = A.placement.split("-");
|
|
15332
15332
|
m === "selection" && (B = "selection");
|
|
15333
|
-
let F = J(() => ({ anchor: [B, L].filter(Boolean).join(" ") }), [B, L]),
|
|
15334
|
-
a(
|
|
15333
|
+
let F = J(() => ({ anchor: [B, L].filter(Boolean).join(" ") }), [B, L]), D = s5(A, { overflowRef: i, onChange: s }), { getReferenceProps: g, getFloatingProps: w } = r5([D]), P = pe((I) => {
|
|
15334
|
+
a(I), $.setFloating(I);
|
|
15335
15335
|
});
|
|
15336
15336
|
return U.createElement(fl.Provider, { value: r }, U.createElement(kr.Provider, { value: { setFloating: P, setReference: $.setReference, styles: y, getReferenceProps: g, getFloatingProps: w, slot: F } }, e));
|
|
15337
15337
|
}
|
|
@@ -15583,41 +15583,41 @@ function E0(e, t) {
|
|
|
15583
15583
|
let S0 = Ke, P0 = vs.RenderStrategy;
|
|
15584
15584
|
function C5(e, t) {
|
|
15585
15585
|
var n, r;
|
|
15586
|
-
let { transition: o = !0, beforeEnter: s, afterEnter: i, beforeLeave: c, afterLeave: a, enter: l, enterFrom: u, enterTo: d, entered: f, leave: p, leaveFrom: h, leaveTo: m, ...v } = e, [$, y] = ce(null), A = le(null), B = x0(e), L = vt(...B ? [A, t, y] : t === null ? [] : [t]), F = (n = v.unmount) == null || n ? xn.Unmount : xn.Hidden, { show:
|
|
15586
|
+
let { transition: o = !0, beforeEnter: s, afterEnter: i, beforeLeave: c, afterLeave: a, enter: l, enterFrom: u, enterTo: d, entered: f, leave: p, leaveFrom: h, leaveTo: m, ...v } = e, [$, y] = ce(null), A = le(null), B = x0(e), L = vt(...B ? [A, t, y] : t === null ? [] : [t]), F = (n = v.unmount) == null || n ? xn.Unmount : xn.Hidden, { show: D, appear: g, initial: w } = O5(), [P, I] = ce(D ? "visible" : "hidden"), T = I5(), { register: S, unregister: E } = T;
|
|
15587
15587
|
ve(() => S(A), [S, A]), ve(() => {
|
|
15588
15588
|
if (F === xn.Hidden && A.current) {
|
|
15589
|
-
if (
|
|
15590
|
-
|
|
15589
|
+
if (D && P !== "visible") {
|
|
15590
|
+
I("visible");
|
|
15591
15591
|
return;
|
|
15592
15592
|
}
|
|
15593
15593
|
return yt(P, { hidden: () => E(A), visible: () => S(A) });
|
|
15594
15594
|
}
|
|
15595
|
-
}, [P, A, S, E,
|
|
15595
|
+
}, [P, A, S, E, D, F]);
|
|
15596
15596
|
let x = hl();
|
|
15597
15597
|
ve(() => {
|
|
15598
15598
|
if (B && x && P === "visible" && A.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
15599
15599
|
}, [A, P, x, B]);
|
|
15600
|
-
let
|
|
15601
|
-
b.current || (
|
|
15602
|
-
},
|
|
15600
|
+
let R = w && !g, N = g && D && w, b = le(!1), C = E0(() => {
|
|
15601
|
+
b.current || (I("hidden"), E(A));
|
|
15602
|
+
}, T), k = pe((V) => {
|
|
15603
15603
|
b.current = !0;
|
|
15604
15604
|
let re = V ? "enter" : "leave";
|
|
15605
15605
|
C.onStart(A, re, (te) => {
|
|
15606
15606
|
te === "enter" ? s == null || s() : te === "leave" && (c == null || c());
|
|
15607
15607
|
});
|
|
15608
|
-
}),
|
|
15608
|
+
}), j = pe((V) => {
|
|
15609
15609
|
let re = V ? "enter" : "leave";
|
|
15610
15610
|
b.current = !1, C.onStop(A, re, (te) => {
|
|
15611
15611
|
te === "enter" ? i == null || i() : te === "leave" && (a == null || a());
|
|
15612
|
-
}), re === "leave" && !oi(C) && (
|
|
15612
|
+
}), re === "leave" && !oi(C) && (I("hidden"), E(A));
|
|
15613
15613
|
});
|
|
15614
15614
|
Ae(() => {
|
|
15615
|
-
B && o || (k(
|
|
15616
|
-
}, [
|
|
15617
|
-
let
|
|
15618
|
-
P === "visible" && (
|
|
15615
|
+
B && o || (k(D), j(D));
|
|
15616
|
+
}, [D, B, o]);
|
|
15617
|
+
let _ = !(!o || !B || !x || R), [, z] = qh(_, $, D, { start: k, end: j }), K = wn({ ref: L, className: ((r = ja(v.className, N && l, N && u, z.enter && l, z.enter && z.closed && u, z.enter && !z.closed && d, z.leave && p, z.leave && !z.closed && h, z.leave && z.closed && m, !z.transition && D && f)) == null ? void 0 : r.trim()) || void 0, ...Gh(z) }), H = 0;
|
|
15618
|
+
P === "visible" && (H |= At.Open), P === "hidden" && (H |= At.Closed), D && P === "hidden" && (H |= At.Opening), !D && P === "visible" && (H |= At.Closing);
|
|
15619
15619
|
let q = st();
|
|
15620
|
-
return Z.createElement(ri.Provider, { value: C }, Z.createElement(g0, { value:
|
|
15620
|
+
return Z.createElement(ri.Provider, { value: C }, Z.createElement(g0, { value: H }, q({ ourProps: K, theirProps: v, defaultTag: S0, features: P0, visible: P === "visible", name: "Transition.Child" })));
|
|
15621
15621
|
}
|
|
15622
15622
|
function B5(e, t) {
|
|
15623
15623
|
let { show: n, appear: r = !1, unmount: o = !0, ...s } = e, i = le(null), c = x0(e), a = vt(...c ? [i, t] : t === null ? [] : [t]);
|
|
@@ -15861,18 +15861,18 @@ let z5 = Ke;
|
|
|
15861
15861
|
function H5(e, t) {
|
|
15862
15862
|
let n = Xn(), r = Jc(), { value: o, defaultValue: s, form: i, name: c, onChange: a, by: l, invalid: u = !1, disabled: d = r || !1, horizontal: f = !1, multiple: p = !1, __demoMode: h = !1, ...m } = e;
|
|
15863
15863
|
const v = f ? "horizontal" : "vertical";
|
|
15864
|
-
let $ = vt(t), y = sE(s), [A = p ? [] : void 0, B] = oE(o, a, y), L = R0({ id: n, __demoMode: h }), F = le({ static: !1, hold: !1 }),
|
|
15864
|
+
let $ = vt(t), y = sE(s), [A = p ? [] : void 0, B] = oE(o, a, y), L = R0({ id: n, __demoMode: h }), F = le({ static: !1, hold: !1 }), D = le(/* @__PURE__ */ new Map()), g = IE(l), w = ee((_) => yt(P.mode, { [Dt.Multi]: () => A.some((z) => g(z, _)), [Dt.Single]: () => g(A, _) }), [A]), P = J(() => ({ value: A, disabled: d, invalid: u, mode: p ? Dt.Multi : Dt.Single, orientation: v, onChange: B, compare: g, isSelected: w, optionsPropsRef: F, listRef: D }), [A, d, u, p, v, B, g, w, F, D]);
|
|
15865
15865
|
ve(() => {
|
|
15866
15866
|
L.state.dataRef.current = P;
|
|
15867
15867
|
}, [P]);
|
|
15868
|
-
let
|
|
15869
|
-
o2(S, [E, x], (
|
|
15870
|
-
L.send({ type: $0.CloseListbox }), Hh(
|
|
15868
|
+
let I = ht(L, (_) => _.listboxState), T = rl.get(null), S = ht(T, ee((_) => T.selectors.isTop(_, n), [T, n])), [E, x] = ht(L, (_) => [_.buttonElement, _.optionsElement]);
|
|
15869
|
+
o2(S, [E, x], (_, z) => {
|
|
15870
|
+
L.send({ type: $0.CloseListbox }), Hh(z, ol.Loose) || (_.preventDefault(), E == null || E.focus());
|
|
15871
15871
|
});
|
|
15872
|
-
let
|
|
15872
|
+
let R = J(() => ({ open: I === Me.Open, disabled: d, invalid: u, value: A }), [I, d, u, A]), [N, b] = AE({ inherit: !0 }), C = { ref: $ }, k = ee(() => {
|
|
15873
15873
|
if (y !== void 0) return B == null ? void 0 : B(y);
|
|
15874
|
-
}, [B, y]),
|
|
15875
|
-
return Z.createElement(b, { value:
|
|
15874
|
+
}, [B, y]), j = st();
|
|
15875
|
+
return Z.createElement(b, { value: N, props: { htmlFor: E == null ? void 0 : E.id }, slot: { open: I === Me.Open, disabled: d } }, Z.createElement(f5, null, Z.createElement(T0.Provider, { value: L }, Z.createElement(si.Provider, { value: P }, Z.createElement(g0, { value: yt(I, { [Me.Open]: At.Open, [Me.Closed]: At.Closed }) }, c != null && A != null && Z.createElement(fE, { disabled: d, data: { [c]: A }, form: i, onReset: k }), j({ ourProps: C, theirProps: m, slot: R, defaultTag: z5, name: "Listbox" }))))));
|
|
15876
15876
|
}
|
|
15877
15877
|
let W5 = "button";
|
|
15878
15878
|
function V5(e, t) {
|
|
@@ -15911,8 +15911,8 @@ function V5(e, t) {
|
|
|
15911
15911
|
A.current = b.pointerType, b.pointerType === "mouse" && y(b);
|
|
15912
15912
|
}), L = pe((b) => {
|
|
15913
15913
|
A.current !== "mouse" && y(b);
|
|
15914
|
-
}), F = pe((b) => b.preventDefault()),
|
|
15915
|
-
return st()({ ourProps:
|
|
15914
|
+
}), F = pe((b) => b.preventDefault()), D = Lh([i]), g = xE(), { isFocusVisible: w, focusProps: P } = Gx({ autoFocus: a }), { isHovered: I, hoverProps: T } = Vx({ isDisabled: c }), { pressed: S, pressProps: E } = Qx({ disabled: c }), x = J(() => ({ open: f === Me.Open, active: S || f === Me.Open, disabled: c, invalid: o.invalid, value: o.value, hover: I, focus: w, autofocus: a }), [f, o.value, c, I, w, S, o.invalid, a]), R = ht(s, (b) => b.listboxState === Me.Open), N = Sh(d(), { ref: u, id: i, type: c2(e, p), "aria-haspopup": "listbox", "aria-controls": h == null ? void 0 : h.id, "aria-expanded": R, "aria-labelledby": D, "aria-describedby": g, disabled: c || void 0, autoFocus: a, onKeyDown: v, onKeyUp: $, onKeyPress: F, onPointerDown: B, onClick: L }, P, T, E);
|
|
15915
|
+
return st()({ ourProps: N, theirProps: l, slot: x, defaultTag: W5, name: "Listbox.Button" });
|
|
15916
15916
|
}
|
|
15917
15917
|
let N0 = De(!1), G5 = "div", q5 = vs.RenderStrategy | vs.Static;
|
|
15918
15918
|
function Z5(e, t) {
|
|
@@ -15920,11 +15920,11 @@ function Z5(e, t) {
|
|
|
15920
15920
|
l && (s = !0);
|
|
15921
15921
|
let f = _o("Listbox.Options"), p = bl("Listbox.Options"), [h, m, v, $] = ht(p, (V) => [V.listboxState, V.buttonElement, V.optionsElement, V.__demoMode]), y = Wa(m), A = Wa(v), B = pl(), [L, F] = qh(c, u, B !== null ? (B & At.Open) === At.Open : h === Me.Open);
|
|
15922
15922
|
GE(L, m, p.actions.closeListbox);
|
|
15923
|
-
let
|
|
15924
|
-
g2(
|
|
15923
|
+
let D = $ ? !1 : i && h === Me.Open;
|
|
15924
|
+
g2(D, A);
|
|
15925
15925
|
let g = $ ? !1 : i && h === Me.Open;
|
|
15926
15926
|
VE(g, { allowed: ee(() => [m, v], [m, v]) });
|
|
15927
|
-
let w = h !== Me.Open, P = k5(w, m) ? !1 : L,
|
|
15927
|
+
let w = h !== Me.Open, P = k5(w, m) ? !1 : L, I = L && h === Me.Closed, T = h5(I, f.value), S = pe((V) => f.compare(T, V)), E = ht(p, (V) => {
|
|
15928
15928
|
var re;
|
|
15929
15929
|
if (l == null || !((re = l == null ? void 0 : l.to) != null && re.includes("selection"))) return null;
|
|
15930
15930
|
let te = V.options.findIndex((de) => S(de.dataRef.current.value));
|
|
@@ -15934,13 +15934,13 @@ function Z5(e, t) {
|
|
|
15934
15934
|
if (E === null) return { ...l, inner: void 0 };
|
|
15935
15935
|
let V = Array.from(f.listRef.current.values());
|
|
15936
15936
|
return { ...l, inner: { listRef: { current: V }, index: E } };
|
|
15937
|
-
})(), [
|
|
15937
|
+
})(), [R, N] = u5(x), b = l5(), C = vt(t, l ? R : null, p.actions.setOptionsElement, d), k = Br();
|
|
15938
15938
|
Ae(() => {
|
|
15939
15939
|
var V;
|
|
15940
15940
|
let re = v;
|
|
15941
15941
|
re && h === Me.Open && re !== ((V = Do(re)) == null ? void 0 : V.activeElement) && (re == null || re.focus({ preventScroll: !0 }));
|
|
15942
15942
|
}, [h, v]);
|
|
15943
|
-
let
|
|
15943
|
+
let j = pe((V) => {
|
|
15944
15944
|
var re, te;
|
|
15945
15945
|
switch (k.dispose(), V.key) {
|
|
15946
15946
|
case Le.Space:
|
|
@@ -15972,11 +15972,11 @@ function Z5(e, t) {
|
|
|
15972
15972
|
V.key.length === 1 && (p.actions.search(V.key), k.setTimeout(() => p.actions.clearSearch(), 350));
|
|
15973
15973
|
break;
|
|
15974
15974
|
}
|
|
15975
|
-
}),
|
|
15975
|
+
}), _ = ht(p, (V) => {
|
|
15976
15976
|
var re;
|
|
15977
15977
|
return (re = V.buttonElement) == null ? void 0 : re.id;
|
|
15978
|
-
}),
|
|
15979
|
-
return Z.createElement(T5, { enabled: s ? e.static || L : !1, ownerDocument: y }, Z.createElement(si.Provider, { value: q },
|
|
15978
|
+
}), z = J(() => ({ open: h === Me.Open }), [h]), K = Sh(l ? b() : {}, { id: r, ref: C, "aria-activedescendant": ht(p, p.selectors.activeDescendantId), "aria-multiselectable": f.mode === Dt.Multi ? !0 : void 0, "aria-labelledby": _, "aria-orientation": f.orientation, onKeyDown: j, role: "listbox", tabIndex: h === Me.Open ? 0 : void 0, style: { ...a.style, ...N, "--button-width": BE(m, !0).width }, ...Gh(F) }), H = st(), q = J(() => f.mode === Dt.Multi ? f : { ...f, isSelected: S }, [f, S]);
|
|
15979
|
+
return Z.createElement(T5, { enabled: s ? e.static || L : !1, ownerDocument: y }, Z.createElement(si.Provider, { value: q }, H({ ourProps: K, theirProps: a, slot: z, defaultTag: G5, features: q5, visible: P, name: "Listbox.Options" })));
|
|
15980
15980
|
}
|
|
15981
15981
|
let K5 = "div";
|
|
15982
15982
|
function Y5(e, t) {
|
|
@@ -15987,16 +15987,16 @@ function Y5(e, t) {
|
|
|
15987
15987
|
}), v = ht(l, (P) => l.selectors.shouldScrollIntoView(P, r));
|
|
15988
15988
|
ve(() => {
|
|
15989
15989
|
if (v) return Ct().requestAnimationFrame(() => {
|
|
15990
|
-
var P,
|
|
15991
|
-
(
|
|
15990
|
+
var P, I;
|
|
15991
|
+
(I = (P = f.current) == null ? void 0 : P.scrollIntoView) == null || I.call(P, { block: "nearest" });
|
|
15992
15992
|
});
|
|
15993
15993
|
}, [v, f]), ve(() => {
|
|
15994
15994
|
if (!c) return l.actions.registerOption(r, h), () => l.actions.unregisterOption(r);
|
|
15995
15995
|
}, [h, r, c]);
|
|
15996
15996
|
let $ = pe((P) => {
|
|
15997
|
-
var
|
|
15997
|
+
var I;
|
|
15998
15998
|
if (o) return P.preventDefault();
|
|
15999
|
-
l.actions.onChange(s), a.mode === Dt.Single && (qr(() => l.actions.closeListbox()), (
|
|
15999
|
+
l.actions.onChange(s), a.mode === Dt.Single && (qr(() => l.actions.closeListbox()), (I = l.state.buttonElement) == null || I.focus({ preventScroll: !0 }));
|
|
16000
16000
|
}), y = pe(() => {
|
|
16001
16001
|
if (o) return l.actions.goToOption({ focus: Se.Nothing });
|
|
16002
16002
|
l.actions.goToOption({ focus: Se.Specific, id: r });
|
|
@@ -16004,8 +16004,8 @@ function Y5(e, t) {
|
|
|
16004
16004
|
A.wasMoved(P) && (o || u && l.state.activationTrigger === ls.Pointer || l.actions.goToOption({ focus: Se.Specific, id: r }, ls.Pointer));
|
|
16005
16005
|
}), F = pe((P) => {
|
|
16006
16006
|
A.wasMoved(P) && (o || u && l.state.activationTrigger === ls.Pointer && l.actions.goToOption({ focus: Se.Nothing }));
|
|
16007
|
-
}),
|
|
16008
|
-
return !d && c ? null : w({ ourProps: g, theirProps: i, slot:
|
|
16007
|
+
}), D = J(() => ({ active: u, focus: u, selected: d, disabled: o, selectedOption: d && c }), [u, d, o, c]), g = c ? {} : { id: r, ref: m, role: "option", tabIndex: o === !0 ? void 0 : -1, "aria-disabled": o === !0 ? !0 : void 0, "aria-selected": d, disabled: void 0, onClick: $, onFocus: y, onPointerEnter: B, onMouseEnter: B, onPointerMove: L, onMouseMove: L, onPointerLeave: F, onMouseLeave: F }, w = st();
|
|
16008
|
+
return !d && c ? null : w({ ourProps: g, theirProps: i, slot: D, defaultTag: K5, name: "Listbox.Option" });
|
|
16009
16009
|
}
|
|
16010
16010
|
let X5 = Ke;
|
|
16011
16011
|
function Q5(e, t) {
|
|
@@ -16013,7 +16013,7 @@ function Q5(e, t) {
|
|
|
16013
16013
|
return Z.createElement(N0.Provider, { value: !0 }, l({ ourProps: s, theirProps: { ...o, children: Z.createElement(Z.Fragment, null, r && a ? r : n) }, slot: c, defaultTag: X5, name: "ListboxSelectedOption" }));
|
|
16014
16014
|
}
|
|
16015
16015
|
let J5 = et(H5), eS = et(V5), tS = NE, nS = et(Z5), rS = et(Y5), oS = et(Q5), mt = Object.assign(J5, { Button: eS, Label: tS, Options: nS, Option: rS, SelectedOption: oS });
|
|
16016
|
-
const sS = () => /* @__PURE__ */
|
|
16016
|
+
const sS = () => /* @__PURE__ */ O.jsxs(
|
|
16017
16017
|
"svg",
|
|
16018
16018
|
{
|
|
16019
16019
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -16022,14 +16022,14 @@ const sS = () => /* @__PURE__ */ I.jsxs(
|
|
|
16022
16022
|
viewBox: "0 0 12 12",
|
|
16023
16023
|
fill: "none",
|
|
16024
16024
|
children: [
|
|
16025
|
-
/* @__PURE__ */
|
|
16025
|
+
/* @__PURE__ */ O.jsx("g", { clipPath: "url(#clip0_active)", children: /* @__PURE__ */ O.jsx(
|
|
16026
16026
|
"path",
|
|
16027
16027
|
{
|
|
16028
16028
|
d: "M4.63791 6.91929H2.62541C2.36266 6.91929 2.18141 6.65629 2.27491 6.41091L4.27466 1.16191C4.30172 1.0909 4.34971 1.02978 4.41228 0.986649C4.47485 0.943521 4.54905 0.920422 4.62504 0.92041H7.99954C8.26579 0.92041 8.44729 1.19016 8.34679 1.43679L7.18241 4.29479H9.37441C9.69679 4.29479 9.86879 4.67479 9.65616 4.91704L4.28191 11.0408C4.02066 11.3385 3.53629 11.0805 3.63766 10.6977L4.63791 6.91929Z",
|
|
16029
16029
|
fill: "#22FD73"
|
|
16030
16030
|
}
|
|
16031
16031
|
) }),
|
|
16032
|
-
/* @__PURE__ */
|
|
16032
|
+
/* @__PURE__ */ O.jsx("defs", { children: /* @__PURE__ */ O.jsx("clipPath", { id: "clip0_active", children: /* @__PURE__ */ O.jsx(
|
|
16033
16033
|
"rect",
|
|
16034
16034
|
{
|
|
16035
16035
|
width: "12",
|
|
@@ -16040,7 +16040,7 @@ const sS = () => /* @__PURE__ */ I.jsxs(
|
|
|
16040
16040
|
) }) })
|
|
16041
16041
|
]
|
|
16042
16042
|
}
|
|
16043
|
-
), iS = () => /* @__PURE__ */
|
|
16043
|
+
), iS = () => /* @__PURE__ */ O.jsxs(
|
|
16044
16044
|
"svg",
|
|
16045
16045
|
{
|
|
16046
16046
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -16049,14 +16049,14 @@ const sS = () => /* @__PURE__ */ I.jsxs(
|
|
|
16049
16049
|
viewBox: "0 0 12 12",
|
|
16050
16050
|
fill: "none",
|
|
16051
16051
|
children: [
|
|
16052
|
-
/* @__PURE__ */
|
|
16052
|
+
/* @__PURE__ */ O.jsx("g", { clipPath: "url(#clip0_inactive)", children: /* @__PURE__ */ O.jsx(
|
|
16053
16053
|
"path",
|
|
16054
16054
|
{
|
|
16055
16055
|
d: "M4.63791 6.91929H2.62541C2.36266 6.91929 2.18141 6.65629 2.27491 6.41091L4.27466 1.16191C4.30172 1.0909 4.34971 1.02978 4.41228 0.986649C4.47485 0.943521 4.54905 0.920422 4.62504 0.92041H7.99954C8.26579 0.92041 8.44729 1.19016 8.34679 1.43679L7.18241 4.29479H9.37441C9.69679 4.29479 9.86879 4.67479 9.65616 4.91704L4.28191 11.0408C4.02066 11.3385 3.53629 11.0805 3.63766 10.6977L4.63791 6.91929Z",
|
|
16056
16056
|
fill: "#F9F9F9"
|
|
16057
16057
|
}
|
|
16058
16058
|
) }),
|
|
16059
|
-
/* @__PURE__ */
|
|
16059
|
+
/* @__PURE__ */ O.jsx("defs", { children: /* @__PURE__ */ O.jsx("clipPath", { id: "clip0_inactive", children: /* @__PURE__ */ O.jsx(
|
|
16060
16060
|
"rect",
|
|
16061
16061
|
{
|
|
16062
16062
|
width: "12",
|
|
@@ -16073,7 +16073,7 @@ const sS = () => /* @__PURE__ */ I.jsxs(
|
|
|
16073
16073
|
className: n = ""
|
|
16074
16074
|
}) => {
|
|
16075
16075
|
const r = Array.from({ length: t }, (o, s) => s + 1);
|
|
16076
|
-
return /* @__PURE__ */
|
|
16076
|
+
return /* @__PURE__ */ O.jsx("div", { className: `flex items-center ${n}`, children: r.map((o) => /* @__PURE__ */ O.jsx("div", { className: "flex items-center justify-center", children: o > t - e ? /* @__PURE__ */ O.jsx(sS, {}) : /* @__PURE__ */ O.jsx(iS, {}) }, o)) });
|
|
16077
16077
|
};
|
|
16078
16078
|
class Pt {
|
|
16079
16079
|
}
|
|
@@ -16104,14 +16104,14 @@ const aS = {
|
|
|
16104
16104
|
walletType: s = "mpc"
|
|
16105
16105
|
}) => {
|
|
16106
16106
|
const { t: i } = qt();
|
|
16107
|
-
return /* @__PURE__ */
|
|
16107
|
+
return /* @__PURE__ */ O.jsx("div", { className: `relative ${o}`, children: /* @__PURE__ */ O.jsx(
|
|
16108
16108
|
mt,
|
|
16109
16109
|
{
|
|
16110
16110
|
value: t,
|
|
16111
16111
|
onChange: n,
|
|
16112
16112
|
disabled: r,
|
|
16113
|
-
children: ({ open: c }) => /* @__PURE__ */
|
|
16114
|
-
/* @__PURE__ */
|
|
16113
|
+
children: ({ open: c }) => /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
|
|
16114
|
+
/* @__PURE__ */ O.jsxs(
|
|
16115
16115
|
mt.Button,
|
|
16116
16116
|
{
|
|
16117
16117
|
className: `
|
|
@@ -16122,18 +16122,18 @@ const aS = {
|
|
|
16122
16122
|
${c ? "ring-1 ring-white" : ""}
|
|
16123
16123
|
`,
|
|
16124
16124
|
children: [
|
|
16125
|
-
/* @__PURE__ */
|
|
16126
|
-
/* @__PURE__ */
|
|
16127
|
-
t.chainIconUrl ? /* @__PURE__ */
|
|
16125
|
+
/* @__PURE__ */ O.jsx("span", { className: "text-sm leading-[18px] font-medium", children: i("deposit.chain") }),
|
|
16126
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
16127
|
+
t.chainIconUrl ? /* @__PURE__ */ O.jsx(
|
|
16128
16128
|
"img",
|
|
16129
16129
|
{
|
|
16130
16130
|
src: t.chainIconUrl,
|
|
16131
16131
|
alt: t.chain,
|
|
16132
16132
|
className: "w-4 h-4 rounded-full"
|
|
16133
16133
|
}
|
|
16134
|
-
) : /* @__PURE__ */
|
|
16135
|
-
/* @__PURE__ */
|
|
16136
|
-
/* @__PURE__ */
|
|
16134
|
+
) : /* @__PURE__ */ O.jsx("div", { className: "w-4 h-4 rounded-full bg-blue-500 flex items-center justify-center", children: /* @__PURE__ */ O.jsx("span", { className: "text-xs text-white font-bold", children: t.chain.charAt(0) }) }),
|
|
16135
|
+
/* @__PURE__ */ O.jsx("span", { className: "text-sm text-white ml-1", children: t.chain }),
|
|
16136
|
+
/* @__PURE__ */ O.jsxs(
|
|
16137
16137
|
"svg",
|
|
16138
16138
|
{
|
|
16139
16139
|
className: `w-3 h-3 ml-2 transition-transform duration-200 ${c ? "rotate-180" : ""}`,
|
|
@@ -16143,14 +16143,14 @@ const aS = {
|
|
|
16143
16143
|
viewBox: "0 0 10 11",
|
|
16144
16144
|
fill: "none",
|
|
16145
16145
|
children: [
|
|
16146
|
-
/* @__PURE__ */
|
|
16146
|
+
/* @__PURE__ */ O.jsx("g", { clipPath: "url(#clip0_12919_27745)", children: /* @__PURE__ */ O.jsx(
|
|
16147
16147
|
"path",
|
|
16148
16148
|
{
|
|
16149
16149
|
d: "M5.32733 7.6716C5.13944 7.83432 4.86056 7.83432 4.67267 7.6716L1.68366 5.08304C1.33371 4.77997 1.54804 4.20508 2.01099 4.20508L7.98901 4.20508C8.45196 4.20508 8.66629 4.77998 8.31634 5.08304L5.32733 7.6716Z",
|
|
16150
16150
|
fill: "#F9F9F9"
|
|
16151
16151
|
}
|
|
16152
16152
|
) }),
|
|
16153
|
-
/* @__PURE__ */
|
|
16153
|
+
/* @__PURE__ */ O.jsx("defs", { children: /* @__PURE__ */ O.jsx("clipPath", { id: "clip0_12919_27745", children: /* @__PURE__ */ O.jsx(
|
|
16154
16154
|
"rect",
|
|
16155
16155
|
{
|
|
16156
16156
|
width: "10",
|
|
@@ -16166,7 +16166,7 @@ const aS = {
|
|
|
16166
16166
|
]
|
|
16167
16167
|
}
|
|
16168
16168
|
),
|
|
16169
|
-
/* @__PURE__ */
|
|
16169
|
+
/* @__PURE__ */ O.jsx(
|
|
16170
16170
|
ml,
|
|
16171
16171
|
{
|
|
16172
16172
|
as: Ke,
|
|
@@ -16176,7 +16176,7 @@ const aS = {
|
|
|
16176
16176
|
leave: "transition ease-in duration-75",
|
|
16177
16177
|
leaveFrom: "transform opacity-100 scale-100",
|
|
16178
16178
|
leaveTo: "transform opacity-0 scale-95",
|
|
16179
|
-
children: /* @__PURE__ */
|
|
16179
|
+
children: /* @__PURE__ */ O.jsx(
|
|
16180
16180
|
mt.Options,
|
|
16181
16181
|
{
|
|
16182
16182
|
className: `
|
|
@@ -16184,22 +16184,22 @@ const aS = {
|
|
|
16184
16184
|
bg-fill-input-primary border border-line-divider-secondary shadow-lg
|
|
16185
16185
|
focus:outline-none
|
|
16186
16186
|
`,
|
|
16187
|
-
children: e.filter((a) => a[s === "mpc" ? "allowAaDeposit" : "allowDeposit"] !== !1).map((a) => /* @__PURE__ */
|
|
16187
|
+
children: e.filter((a) => a[s === "mpc" ? "allowAaDeposit" : "allowDeposit"] !== !1).map((a) => /* @__PURE__ */ O.jsx(
|
|
16188
16188
|
mt.Option,
|
|
16189
16189
|
{
|
|
16190
16190
|
value: a,
|
|
16191
16191
|
className: ({ active: l, selected: u }) => `relative cursor-pointer select-none py-3 px-3 ${u ? "bg-fill-btn-secondary" : l ? "bg-fill-input-secondary" : ""}`,
|
|
16192
|
-
children: ({ selected: l, active: u }) => /* @__PURE__ */
|
|
16193
|
-
/* @__PURE__ */
|
|
16194
|
-
a.chainIconUrl ? /* @__PURE__ */
|
|
16192
|
+
children: ({ selected: l, active: u }) => /* @__PURE__ */ O.jsx(O.Fragment, { children: /* @__PURE__ */ O.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
16193
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex items-center space-x-3", children: [
|
|
16194
|
+
a.chainIconUrl ? /* @__PURE__ */ O.jsx(
|
|
16195
16195
|
"img",
|
|
16196
16196
|
{
|
|
16197
16197
|
src: a.chainIconUrl,
|
|
16198
16198
|
alt: a.chain,
|
|
16199
16199
|
className: "w-5 h-5 rounded-full"
|
|
16200
16200
|
}
|
|
16201
|
-
) : /* @__PURE__ */
|
|
16202
|
-
/* @__PURE__ */
|
|
16201
|
+
) : /* @__PURE__ */ O.jsx("div", { className: "w-5 h-5 rounded-full bg-blue-500 flex items-center justify-center", children: /* @__PURE__ */ O.jsx("span", { className: "text-xs text-white font-bold", children: a.chain.charAt(0) }) }),
|
|
16202
|
+
/* @__PURE__ */ O.jsx("div", { className: "flex flex-col", children: /* @__PURE__ */ O.jsx(
|
|
16203
16203
|
"span",
|
|
16204
16204
|
{
|
|
16205
16205
|
className: `text-sm font-medium ${l || u ? "text-text-primary" : "text-text-tertiary"}`,
|
|
@@ -16207,7 +16207,7 @@ const aS = {
|
|
|
16207
16207
|
}
|
|
16208
16208
|
) })
|
|
16209
16209
|
] }),
|
|
16210
|
-
/* @__PURE__ */
|
|
16210
|
+
/* @__PURE__ */ O.jsx("div", { className: "w-12 bg-fill-page-secondary p-1 h-5 flex rounded", children: /* @__PURE__ */ O.jsx(
|
|
16211
16211
|
Gr,
|
|
16212
16212
|
{
|
|
16213
16213
|
className: "w-full justify-between",
|
|
@@ -16234,14 +16234,14 @@ const aS = {
|
|
|
16234
16234
|
className: o = ""
|
|
16235
16235
|
}) => {
|
|
16236
16236
|
const { t: s } = qt(), i = (c) => c.token || c.symbol;
|
|
16237
|
-
return /* @__PURE__ */
|
|
16237
|
+
return /* @__PURE__ */ O.jsx("div", { className: `relative ${o}`, children: /* @__PURE__ */ O.jsx(
|
|
16238
16238
|
mt,
|
|
16239
16239
|
{
|
|
16240
16240
|
value: t,
|
|
16241
16241
|
onChange: n,
|
|
16242
16242
|
disabled: r,
|
|
16243
|
-
children: ({ open: c }) => /* @__PURE__ */
|
|
16244
|
-
/* @__PURE__ */
|
|
16243
|
+
children: ({ open: c }) => /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
|
|
16244
|
+
/* @__PURE__ */ O.jsxs(
|
|
16245
16245
|
mt.Button,
|
|
16246
16246
|
{
|
|
16247
16247
|
className: `
|
|
@@ -16252,9 +16252,9 @@ const aS = {
|
|
|
16252
16252
|
${c ? "ring-1 ring-white" : ""}
|
|
16253
16253
|
`,
|
|
16254
16254
|
children: [
|
|
16255
|
-
/* @__PURE__ */
|
|
16256
|
-
/* @__PURE__ */
|
|
16257
|
-
/* @__PURE__ */
|
|
16255
|
+
/* @__PURE__ */ O.jsx("span", { className: "text-sm leading-[18px] font-medium", children: s("deposit.asset") }),
|
|
16256
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
16257
|
+
/* @__PURE__ */ O.jsx(
|
|
16258
16258
|
"img",
|
|
16259
16259
|
{
|
|
16260
16260
|
src: t.iconUrl,
|
|
@@ -16262,8 +16262,8 @@ const aS = {
|
|
|
16262
16262
|
className: "w-4 h-4 rounded-full"
|
|
16263
16263
|
}
|
|
16264
16264
|
),
|
|
16265
|
-
/* @__PURE__ */
|
|
16266
|
-
/* @__PURE__ */
|
|
16265
|
+
/* @__PURE__ */ O.jsx("span", { className: "text-sm text-white ml-1", children: i(t) }),
|
|
16266
|
+
/* @__PURE__ */ O.jsxs(
|
|
16267
16267
|
"svg",
|
|
16268
16268
|
{
|
|
16269
16269
|
className: `w-3 h-3 ml-2 transition-transform duration-200 ${c ? "rotate-180" : ""}`,
|
|
@@ -16273,14 +16273,14 @@ const aS = {
|
|
|
16273
16273
|
viewBox: "0 0 10 11",
|
|
16274
16274
|
fill: "none",
|
|
16275
16275
|
children: [
|
|
16276
|
-
/* @__PURE__ */
|
|
16276
|
+
/* @__PURE__ */ O.jsx("g", { clipPath: "url(#clip0_asset_selector)", children: /* @__PURE__ */ O.jsx(
|
|
16277
16277
|
"path",
|
|
16278
16278
|
{
|
|
16279
16279
|
d: "M5.32733 7.6716C5.13944 7.83432 4.86056 7.83432 4.67267 7.6716L1.68366 5.08304C1.33371 4.77997 1.54804 4.20508 2.01099 4.20508L7.98901 4.20508C8.45196 4.20508 8.66629 4.77998 8.31634 5.08304L5.32733 7.6716Z",
|
|
16280
16280
|
fill: "#F9F9F9"
|
|
16281
16281
|
}
|
|
16282
16282
|
) }),
|
|
16283
|
-
/* @__PURE__ */
|
|
16283
|
+
/* @__PURE__ */ O.jsx("defs", { children: /* @__PURE__ */ O.jsx("clipPath", { id: "clip0_asset_selector", children: /* @__PURE__ */ O.jsx(
|
|
16284
16284
|
"rect",
|
|
16285
16285
|
{
|
|
16286
16286
|
width: "10",
|
|
@@ -16296,7 +16296,7 @@ const aS = {
|
|
|
16296
16296
|
]
|
|
16297
16297
|
}
|
|
16298
16298
|
),
|
|
16299
|
-
/* @__PURE__ */
|
|
16299
|
+
/* @__PURE__ */ O.jsx(
|
|
16300
16300
|
ml,
|
|
16301
16301
|
{
|
|
16302
16302
|
as: Ke,
|
|
@@ -16306,7 +16306,7 @@ const aS = {
|
|
|
16306
16306
|
leave: "transition ease-in duration-75",
|
|
16307
16307
|
leaveFrom: "transform opacity-100 scale-100",
|
|
16308
16308
|
leaveTo: "transform opacity-0 scale-95",
|
|
16309
|
-
children: /* @__PURE__ */
|
|
16309
|
+
children: /* @__PURE__ */ O.jsx(
|
|
16310
16310
|
mt.Options,
|
|
16311
16311
|
{
|
|
16312
16312
|
className: `
|
|
@@ -16314,13 +16314,13 @@ const aS = {
|
|
|
16314
16314
|
bg-fill-input-primary border border-line-divider-secondary shadow-lg
|
|
16315
16315
|
focus:outline-none
|
|
16316
16316
|
`,
|
|
16317
|
-
children: e.map((a) => /* @__PURE__ */
|
|
16317
|
+
children: e.map((a) => /* @__PURE__ */ O.jsx(
|
|
16318
16318
|
mt.Option,
|
|
16319
16319
|
{
|
|
16320
16320
|
value: a,
|
|
16321
16321
|
className: ({ active: l, selected: u }) => `relative cursor-pointer select-none py-3 px-3 ${u ? "bg-fill-btn-secondary" : l ? "bg-fill-input-secondary" : ""}`,
|
|
16322
|
-
children: ({ selected: l, active: u }) => /* @__PURE__ */
|
|
16323
|
-
/* @__PURE__ */
|
|
16322
|
+
children: ({ selected: l, active: u }) => /* @__PURE__ */ O.jsx("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ O.jsxs("div", { className: "flex items-center space-x-3", children: [
|
|
16323
|
+
/* @__PURE__ */ O.jsx(
|
|
16324
16324
|
"img",
|
|
16325
16325
|
{
|
|
16326
16326
|
src: a.iconUrl,
|
|
@@ -16328,7 +16328,7 @@ const aS = {
|
|
|
16328
16328
|
className: "w-5 h-5 rounded-full"
|
|
16329
16329
|
}
|
|
16330
16330
|
),
|
|
16331
|
-
/* @__PURE__ */
|
|
16331
|
+
/* @__PURE__ */ O.jsx("div", { className: "flex flex-col", children: /* @__PURE__ */ O.jsx(
|
|
16332
16332
|
"span",
|
|
16333
16333
|
{
|
|
16334
16334
|
className: `text-sm font-medium ${l || u ? "text-text-primary" : "text-text-tertiary"}`,
|
|
@@ -16435,8 +16435,8 @@ const aS = {
|
|
|
16435
16435
|
f.some(
|
|
16436
16436
|
($) => $.chainId === e.chainId
|
|
16437
16437
|
) || n(f[0].chainId);
|
|
16438
|
-
}, [f, e.chainId, n]), /* @__PURE__ */
|
|
16439
|
-
h.length > 0 && m && /* @__PURE__ */
|
|
16438
|
+
}, [f, e.chainId, n]), /* @__PURE__ */ O.jsxs("div", { className: "space-y-4", children: [
|
|
16439
|
+
h.length > 0 && m && /* @__PURE__ */ O.jsx(
|
|
16440
16440
|
fS,
|
|
16441
16441
|
{
|
|
16442
16442
|
tokens: h,
|
|
@@ -16444,7 +16444,7 @@ const aS = {
|
|
|
16444
16444
|
onTokenChange: d
|
|
16445
16445
|
}
|
|
16446
16446
|
),
|
|
16447
|
-
/* @__PURE__ */
|
|
16447
|
+
/* @__PURE__ */ O.jsx(
|
|
16448
16448
|
uS,
|
|
16449
16449
|
{
|
|
16450
16450
|
chains: f,
|
|
@@ -16459,12 +16459,12 @@ const aS = {
|
|
|
16459
16459
|
}
|
|
16460
16460
|
)
|
|
16461
16461
|
] });
|
|
16462
|
-
}, dS = ({ options: e }) => /* @__PURE__ */
|
|
16462
|
+
}, dS = ({ options: e }) => /* @__PURE__ */ O.jsx(O.Fragment, { children: e.map((t) => /* @__PURE__ */ O.jsx(
|
|
16463
16463
|
mt.Option,
|
|
16464
16464
|
{
|
|
16465
16465
|
value: t.value,
|
|
16466
16466
|
className: ({ active: n, selected: r }) => `relative cursor-pointer select-none py-3 px-3 ${r ? "bg-fill-btn-secondary" : n ? "bg-fill-input-secondary" : ""}`,
|
|
16467
|
-
children: ({ selected: n, active: r }) => /* @__PURE__ */
|
|
16467
|
+
children: ({ selected: n, active: r }) => /* @__PURE__ */ O.jsx("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ O.jsx("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ O.jsx("div", { className: "flex flex-col", children: /* @__PURE__ */ O.jsx(
|
|
16468
16468
|
"span",
|
|
16469
16469
|
{
|
|
16470
16470
|
className: `text-sm font-medium ${n || r ? "text-text-primary" : "text-text-tertiary"}`,
|
|
@@ -16491,8 +16491,8 @@ const aS = {
|
|
|
16491
16491
|
), l = e ?? c, u = (f) => {
|
|
16492
16492
|
t == null || t(f), e || a(f);
|
|
16493
16493
|
};
|
|
16494
|
-
return /* @__PURE__ */
|
|
16495
|
-
/* @__PURE__ */
|
|
16494
|
+
return /* @__PURE__ */ O.jsx("div", { className: `relative mb-4 ${r}`, children: /* @__PURE__ */ O.jsx(mt, { value: l, onChange: u, disabled: n, children: ({ open: f }) => /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
|
|
16495
|
+
/* @__PURE__ */ O.jsxs(
|
|
16496
16496
|
mt.Button,
|
|
16497
16497
|
{
|
|
16498
16498
|
className: `
|
|
@@ -16503,10 +16503,10 @@ const aS = {
|
|
|
16503
16503
|
${f ? "ring-1 ring-white" : ""}
|
|
16504
16504
|
`,
|
|
16505
16505
|
children: [
|
|
16506
|
-
/* @__PURE__ */
|
|
16507
|
-
/* @__PURE__ */
|
|
16508
|
-
/* @__PURE__ */
|
|
16509
|
-
/* @__PURE__ */
|
|
16506
|
+
/* @__PURE__ */ O.jsx("span", { className: "text-sm leading-[18px] font-medium", children: o("account.title") }),
|
|
16507
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
16508
|
+
/* @__PURE__ */ O.jsx("span", { className: "text-sm text-white ml-1", children: i }),
|
|
16509
|
+
/* @__PURE__ */ O.jsxs(
|
|
16510
16510
|
"svg",
|
|
16511
16511
|
{
|
|
16512
16512
|
className: `w-3 h-3 ml-2 transition-transform duration-200 ${f ? "rotate-180" : ""}`,
|
|
@@ -16516,14 +16516,14 @@ const aS = {
|
|
|
16516
16516
|
viewBox: "0 0 10 11",
|
|
16517
16517
|
fill: "none",
|
|
16518
16518
|
children: [
|
|
16519
|
-
/* @__PURE__ */
|
|
16519
|
+
/* @__PURE__ */ O.jsx("g", { clipPath: "url(#clip0_asset_selector)", children: /* @__PURE__ */ O.jsx(
|
|
16520
16520
|
"path",
|
|
16521
16521
|
{
|
|
16522
16522
|
d: "M5.32733 7.6716C5.13944 7.83432 4.86056 7.83432 4.67267 7.6716L1.68366 5.08304C1.33371 4.77997 1.54804 4.20508 2.01099 4.20508L7.98901 4.20508C8.45196 4.20508 8.66629 4.77998 8.31634 5.08304L5.32733 7.6716Z",
|
|
16523
16523
|
fill: "#F9F9F9"
|
|
16524
16524
|
}
|
|
16525
16525
|
) }),
|
|
16526
|
-
/* @__PURE__ */
|
|
16526
|
+
/* @__PURE__ */ O.jsx("defs", { children: /* @__PURE__ */ O.jsx("clipPath", { id: "clip0_asset_selector", children: /* @__PURE__ */ O.jsx(
|
|
16527
16527
|
"rect",
|
|
16528
16528
|
{
|
|
16529
16529
|
width: "10",
|
|
@@ -16539,7 +16539,7 @@ const aS = {
|
|
|
16539
16539
|
]
|
|
16540
16540
|
}
|
|
16541
16541
|
),
|
|
16542
|
-
/* @__PURE__ */
|
|
16542
|
+
/* @__PURE__ */ O.jsx(
|
|
16543
16543
|
ml,
|
|
16544
16544
|
{
|
|
16545
16545
|
as: Ke,
|
|
@@ -16549,7 +16549,7 @@ const aS = {
|
|
|
16549
16549
|
leave: "transition ease-in duration-75",
|
|
16550
16550
|
leaveFrom: "transform opacity-100 scale-100",
|
|
16551
16551
|
leaveTo: "transform opacity-0 scale-95",
|
|
16552
|
-
children: /* @__PURE__ */
|
|
16552
|
+
children: /* @__PURE__ */ O.jsx(
|
|
16553
16553
|
mt.Options,
|
|
16554
16554
|
{
|
|
16555
16555
|
className: `
|
|
@@ -16557,7 +16557,7 @@ const aS = {
|
|
|
16557
16557
|
bg-fill-input-primary border border-line-divider-secondary shadow-lg
|
|
16558
16558
|
focus:outline-none
|
|
16559
16559
|
`,
|
|
16560
|
-
children: /* @__PURE__ */
|
|
16560
|
+
children: /* @__PURE__ */ O.jsx(dS, { options: s })
|
|
16561
16561
|
}
|
|
16562
16562
|
)
|
|
16563
16563
|
}
|
|
@@ -17467,7 +17467,7 @@ var US = function() {
|
|
|
17467
17467
|
A.current = E, typeof n == "function" ? n(E) : n && (n.current = E);
|
|
17468
17468
|
},
|
|
17469
17469
|
[n]
|
|
17470
|
-
), [F,
|
|
17470
|
+
), [F, D] = Z.useState(!1), { margin: g, cells: w, numCells: P, calculatedImageSettings: I } = V0({
|
|
17471
17471
|
value: o,
|
|
17472
17472
|
level: i,
|
|
17473
17473
|
minVersion: u,
|
|
@@ -17482,31 +17482,31 @@ var US = function() {
|
|
|
17482
17482
|
const E = A.current, x = E.getContext("2d");
|
|
17483
17483
|
if (!x)
|
|
17484
17484
|
return;
|
|
17485
|
-
let
|
|
17486
|
-
const
|
|
17487
|
-
b &&
|
|
17485
|
+
let R = w;
|
|
17486
|
+
const N = B.current, b = I != null && N !== null && N.complete && N.naturalHeight !== 0 && N.naturalWidth !== 0;
|
|
17487
|
+
b && I.excavation != null && (R = W0(
|
|
17488
17488
|
w,
|
|
17489
|
-
|
|
17489
|
+
I.excavation
|
|
17490
17490
|
));
|
|
17491
17491
|
const C = window.devicePixelRatio || 1;
|
|
17492
17492
|
E.height = E.width = s * C;
|
|
17493
17493
|
const k = s / P * C;
|
|
17494
|
-
x.scale(k, k), x.fillStyle = c, x.fillRect(0, 0, P, P), x.fillStyle = a, US ? x.fill(new Path2D(H0(
|
|
17495
|
-
|
|
17496
|
-
|
|
17494
|
+
x.scale(k, k), x.fillStyle = c, x.fillRect(0, 0, P, P), x.fillStyle = a, US ? x.fill(new Path2D(H0(R, g))) : w.forEach(function(j, _) {
|
|
17495
|
+
j.forEach(function(z, K) {
|
|
17496
|
+
z && x.fillRect(K + g, _ + g, 1, 1);
|
|
17497
17497
|
});
|
|
17498
|
-
}),
|
|
17499
|
-
|
|
17500
|
-
|
|
17501
|
-
|
|
17502
|
-
|
|
17503
|
-
|
|
17498
|
+
}), I && (x.globalAlpha = I.opacity), b && x.drawImage(
|
|
17499
|
+
N,
|
|
17500
|
+
I.x + g,
|
|
17501
|
+
I.y + g,
|
|
17502
|
+
I.w,
|
|
17503
|
+
I.h
|
|
17504
17504
|
);
|
|
17505
17505
|
}
|
|
17506
17506
|
}), Z.useEffect(() => {
|
|
17507
|
-
|
|
17507
|
+
D(!1);
|
|
17508
17508
|
}, [y]);
|
|
17509
|
-
const
|
|
17509
|
+
const T = tc({ height: s, width: s }, v);
|
|
17510
17510
|
let S = null;
|
|
17511
17511
|
return y != null && (S = /* @__PURE__ */ Z.createElement(
|
|
17512
17512
|
"img",
|
|
@@ -17515,15 +17515,15 @@ var US = function() {
|
|
|
17515
17515
|
key: y,
|
|
17516
17516
|
style: { display: "none" },
|
|
17517
17517
|
onLoad: () => {
|
|
17518
|
-
|
|
17518
|
+
D(!0);
|
|
17519
17519
|
},
|
|
17520
17520
|
ref: B,
|
|
17521
|
-
crossOrigin:
|
|
17521
|
+
crossOrigin: I == null ? void 0 : I.crossOrigin
|
|
17522
17522
|
}
|
|
17523
17523
|
)), /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement(
|
|
17524
17524
|
"canvas",
|
|
17525
17525
|
tc({
|
|
17526
|
-
style:
|
|
17526
|
+
style: T,
|
|
17527
17527
|
height: s,
|
|
17528
17528
|
width: s,
|
|
17529
17529
|
ref: L,
|
|
@@ -17849,146 +17849,146 @@ function mP(e, t) {
|
|
|
17849
17849
|
mouseOnly: u = !1,
|
|
17850
17850
|
restMs: d = 0,
|
|
17851
17851
|
move: f = !0
|
|
17852
|
-
} = t, p = xl(), h = vl(), m = rs(l), v = rs(a), $ = rs(n), y = rs(d), A = U.useRef(), B = U.useRef(-1), L = U.useRef(), F = U.useRef(-1),
|
|
17853
|
-
}), P = U.useRef(!1),
|
|
17854
|
-
var
|
|
17855
|
-
const b = (
|
|
17852
|
+
} = t, p = xl(), h = vl(), m = rs(l), v = rs(a), $ = rs(n), y = rs(d), A = U.useRef(), B = U.useRef(-1), L = U.useRef(), F = U.useRef(-1), D = U.useRef(!0), g = U.useRef(!1), w = U.useRef(() => {
|
|
17853
|
+
}), P = U.useRef(!1), I = kt(() => {
|
|
17854
|
+
var N;
|
|
17855
|
+
const b = (N = o.current.openEvent) == null ? void 0 : N.type;
|
|
17856
17856
|
return (b == null ? void 0 : b.includes("mouse")) && b !== "mousedown";
|
|
17857
17857
|
});
|
|
17858
17858
|
U.useEffect(() => {
|
|
17859
17859
|
if (!c) return;
|
|
17860
|
-
function
|
|
17860
|
+
function N(b) {
|
|
17861
17861
|
let {
|
|
17862
17862
|
open: C
|
|
17863
17863
|
} = b;
|
|
17864
|
-
C || (dt(B), dt(F),
|
|
17864
|
+
C || (dt(B), dt(F), D.current = !0, P.current = !1);
|
|
17865
17865
|
}
|
|
17866
|
-
return s.on("openchange",
|
|
17867
|
-
s.off("openchange",
|
|
17866
|
+
return s.on("openchange", N), () => {
|
|
17867
|
+
s.off("openchange", N);
|
|
17868
17868
|
};
|
|
17869
17869
|
}, [c, s]), U.useEffect(() => {
|
|
17870
17870
|
if (!c || !m.current || !n) return;
|
|
17871
|
-
function
|
|
17872
|
-
|
|
17871
|
+
function N(C) {
|
|
17872
|
+
I() && r(!1, C, "hover");
|
|
17873
17873
|
}
|
|
17874
17874
|
const b = jt(i.floating).documentElement;
|
|
17875
|
-
return b.addEventListener("mouseleave",
|
|
17876
|
-
b.removeEventListener("mouseleave",
|
|
17875
|
+
return b.addEventListener("mouseleave", N), () => {
|
|
17876
|
+
b.removeEventListener("mouseleave", N);
|
|
17877
17877
|
};
|
|
17878
|
-
}, [i.floating, n, r, c, m,
|
|
17879
|
-
const
|
|
17878
|
+
}, [i.floating, n, r, c, m, I]);
|
|
17879
|
+
const T = U.useCallback(function(N, b, C) {
|
|
17880
17880
|
b === void 0 && (b = !0), C === void 0 && (C = "hover");
|
|
17881
17881
|
const k = qi(v.current, "close", A.current);
|
|
17882
|
-
k && !L.current ? (dt(B), B.current = window.setTimeout(() => r(!1,
|
|
17882
|
+
k && !L.current ? (dt(B), B.current = window.setTimeout(() => r(!1, N, C), k)) : b && (dt(B), r(!1, N, C));
|
|
17883
17883
|
}, [v, r]), S = kt(() => {
|
|
17884
17884
|
w.current(), L.current = void 0;
|
|
17885
17885
|
}), E = kt(() => {
|
|
17886
17886
|
if (g.current) {
|
|
17887
|
-
const
|
|
17888
|
-
|
|
17887
|
+
const N = jt(i.floating).body;
|
|
17888
|
+
N.style.pointerEvents = "", N.removeAttribute(Tf), g.current = !1;
|
|
17889
17889
|
}
|
|
17890
17890
|
}), x = kt(() => o.current.openEvent ? ["click", "mousedown"].includes(o.current.openEvent.type) : !1);
|
|
17891
17891
|
U.useEffect(() => {
|
|
17892
17892
|
if (!c) return;
|
|
17893
|
-
function
|
|
17894
|
-
if (dt(B),
|
|
17893
|
+
function N(_) {
|
|
17894
|
+
if (dt(B), D.current = !1, u && !To(A.current) || Zi(y.current) > 0 && !qi(v.current, "open"))
|
|
17895
17895
|
return;
|
|
17896
|
-
const
|
|
17897
|
-
|
|
17898
|
-
$.current || r(!0,
|
|
17899
|
-
},
|
|
17896
|
+
const z = qi(v.current, "open", A.current);
|
|
17897
|
+
z ? B.current = window.setTimeout(() => {
|
|
17898
|
+
$.current || r(!0, _, "hover");
|
|
17899
|
+
}, z) : n || r(!0, _, "hover");
|
|
17900
17900
|
}
|
|
17901
|
-
function b(
|
|
17901
|
+
function b(_) {
|
|
17902
17902
|
if (x()) {
|
|
17903
17903
|
E();
|
|
17904
17904
|
return;
|
|
17905
17905
|
}
|
|
17906
17906
|
w.current();
|
|
17907
|
-
const
|
|
17907
|
+
const z = jt(i.floating);
|
|
17908
17908
|
if (dt(F), P.current = !1, m.current && o.current.floatingContext) {
|
|
17909
17909
|
n || dt(B), L.current = m.current({
|
|
17910
17910
|
...o.current.floatingContext,
|
|
17911
17911
|
tree: p,
|
|
17912
|
-
x:
|
|
17913
|
-
y:
|
|
17912
|
+
x: _.clientX,
|
|
17913
|
+
y: _.clientY,
|
|
17914
17914
|
onClose() {
|
|
17915
|
-
E(), S(), x() ||
|
|
17915
|
+
E(), S(), x() || T(_, !0, "safe-polygon");
|
|
17916
17916
|
}
|
|
17917
17917
|
});
|
|
17918
|
-
const
|
|
17919
|
-
|
|
17920
|
-
|
|
17918
|
+
const H = L.current;
|
|
17919
|
+
z.addEventListener("mousemove", H), w.current = () => {
|
|
17920
|
+
z.removeEventListener("mousemove", H);
|
|
17921
17921
|
};
|
|
17922
17922
|
return;
|
|
17923
17923
|
}
|
|
17924
|
-
(A.current === "touch" ? !Tr(i.floating,
|
|
17924
|
+
(A.current === "touch" ? !Tr(i.floating, _.relatedTarget) : !0) && T(_);
|
|
17925
17925
|
}
|
|
17926
|
-
function C(
|
|
17926
|
+
function C(_) {
|
|
17927
17927
|
x() || o.current.floatingContext && (m.current == null || m.current({
|
|
17928
17928
|
...o.current.floatingContext,
|
|
17929
17929
|
tree: p,
|
|
17930
|
-
x:
|
|
17931
|
-
y:
|
|
17930
|
+
x: _.clientX,
|
|
17931
|
+
y: _.clientY,
|
|
17932
17932
|
onClose() {
|
|
17933
|
-
E(), S(), x() ||
|
|
17933
|
+
E(), S(), x() || T(_);
|
|
17934
17934
|
}
|
|
17935
|
-
})(
|
|
17935
|
+
})(_));
|
|
17936
17936
|
}
|
|
17937
17937
|
function k() {
|
|
17938
17938
|
dt(B);
|
|
17939
17939
|
}
|
|
17940
|
-
function
|
|
17941
|
-
x() ||
|
|
17940
|
+
function j(_) {
|
|
17941
|
+
x() || T(_, !1);
|
|
17942
17942
|
}
|
|
17943
17943
|
if (ge(i.domReference)) {
|
|
17944
|
-
const
|
|
17945
|
-
return n &&
|
|
17944
|
+
const _ = i.domReference, z = i.floating;
|
|
17945
|
+
return n && _.addEventListener("mouseleave", C), f && _.addEventListener("mousemove", N, {
|
|
17946
17946
|
once: !0
|
|
17947
|
-
}),
|
|
17948
|
-
n &&
|
|
17947
|
+
}), _.addEventListener("mouseenter", N), _.addEventListener("mouseleave", b), z && (z.addEventListener("mouseleave", C), z.addEventListener("mouseenter", k), z.addEventListener("mouseleave", j)), () => {
|
|
17948
|
+
n && _.removeEventListener("mouseleave", C), f && _.removeEventListener("mousemove", N), _.removeEventListener("mouseenter", N), _.removeEventListener("mouseleave", b), z && (z.removeEventListener("mouseleave", C), z.removeEventListener("mouseenter", k), z.removeEventListener("mouseleave", j));
|
|
17949
17949
|
};
|
|
17950
17950
|
}
|
|
17951
|
-
}, [i, c, e, u, f,
|
|
17952
|
-
var
|
|
17953
|
-
if (c && n && (
|
|
17951
|
+
}, [i, c, e, u, f, T, S, E, r, n, $, p, v, m, o, x, y]), zt(() => {
|
|
17952
|
+
var N;
|
|
17953
|
+
if (c && n && (N = m.current) != null && (N = N.__options) != null && N.blockPointerEvents && I()) {
|
|
17954
17954
|
g.current = !0;
|
|
17955
17955
|
const C = i.floating;
|
|
17956
17956
|
if (ge(i.domReference) && C) {
|
|
17957
17957
|
var b;
|
|
17958
17958
|
const k = jt(i.floating).body;
|
|
17959
17959
|
k.setAttribute(Tf, "");
|
|
17960
|
-
const
|
|
17961
|
-
return
|
|
17962
|
-
k.style.pointerEvents = "",
|
|
17960
|
+
const j = i.domReference, _ = p == null || (b = p.nodesRef.current.find((z) => z.id === h)) == null || (b = b.context) == null ? void 0 : b.elements.floating;
|
|
17961
|
+
return _ && (_.style.pointerEvents = ""), k.style.pointerEvents = "none", j.style.pointerEvents = "auto", C.style.pointerEvents = "auto", () => {
|
|
17962
|
+
k.style.pointerEvents = "", j.style.pointerEvents = "", C.style.pointerEvents = "";
|
|
17963
17963
|
};
|
|
17964
17964
|
}
|
|
17965
17965
|
}
|
|
17966
|
-
}, [c, n, h, i, p, m,
|
|
17966
|
+
}, [c, n, h, i, p, m, I]), zt(() => {
|
|
17967
17967
|
n || (A.current = void 0, P.current = !1, S(), E());
|
|
17968
17968
|
}, [n, S, E]), U.useEffect(() => () => {
|
|
17969
17969
|
S(), dt(B), dt(F), E();
|
|
17970
17970
|
}, [c, i.domReference, S, E]);
|
|
17971
|
-
const
|
|
17972
|
-
function
|
|
17971
|
+
const R = U.useMemo(() => {
|
|
17972
|
+
function N(b) {
|
|
17973
17973
|
A.current = b.pointerType;
|
|
17974
17974
|
}
|
|
17975
17975
|
return {
|
|
17976
|
-
onPointerDown:
|
|
17977
|
-
onPointerEnter:
|
|
17976
|
+
onPointerDown: N,
|
|
17977
|
+
onPointerEnter: N,
|
|
17978
17978
|
onMouseMove(b) {
|
|
17979
17979
|
const {
|
|
17980
17980
|
nativeEvent: C
|
|
17981
17981
|
} = b;
|
|
17982
17982
|
function k() {
|
|
17983
|
-
!
|
|
17983
|
+
!D.current && !$.current && r(!0, C, "hover");
|
|
17984
17984
|
}
|
|
17985
17985
|
u && !To(A.current) || n || Zi(y.current) === 0 || P.current && b.movementX ** 2 + b.movementY ** 2 < 2 || (dt(F), A.current === "touch" ? k() : (P.current = !0, F.current = window.setTimeout(k, Zi(y.current))));
|
|
17986
17986
|
}
|
|
17987
17987
|
};
|
|
17988
17988
|
}, [u, r, n, $, y]);
|
|
17989
17989
|
return U.useMemo(() => c ? {
|
|
17990
|
-
reference:
|
|
17991
|
-
} : {}, [c,
|
|
17990
|
+
reference: R
|
|
17991
|
+
} : {}, [c, R]);
|
|
17992
17992
|
}
|
|
17993
17993
|
const X0 = {
|
|
17994
17994
|
border: 0,
|
|
@@ -18016,7 +18016,7 @@ const X0 = {
|
|
|
18016
18016
|
[Uo("focus-guard")]: "",
|
|
18017
18017
|
style: X0
|
|
18018
18018
|
};
|
|
18019
|
-
return /* @__PURE__ */
|
|
18019
|
+
return /* @__PURE__ */ O.jsx("span", {
|
|
18020
18020
|
...t,
|
|
18021
18021
|
...s
|
|
18022
18022
|
});
|
|
@@ -18074,7 +18074,7 @@ function bP(e) {
|
|
|
18074
18074
|
};
|
|
18075
18075
|
}, [s, o, f]), U.useEffect(() => {
|
|
18076
18076
|
s && (p || Ef(s));
|
|
18077
|
-
}, [p, s]), /* @__PURE__ */
|
|
18077
|
+
}, [p, s]), /* @__PURE__ */ O.jsxs(Q0.Provider, {
|
|
18078
18078
|
value: U.useMemo(() => ({
|
|
18079
18079
|
preserveTabOrder: o,
|
|
18080
18080
|
beforeOutsideRef: a,
|
|
@@ -18084,7 +18084,7 @@ function bP(e) {
|
|
|
18084
18084
|
portalNode: s,
|
|
18085
18085
|
setFocusManagerState: c
|
|
18086
18086
|
}), [o, s]),
|
|
18087
|
-
children: [h && s && /* @__PURE__ */
|
|
18087
|
+
children: [h && s && /* @__PURE__ */ O.jsx(Rf, {
|
|
18088
18088
|
"data-type": "outside",
|
|
18089
18089
|
ref: a,
|
|
18090
18090
|
onFocus: (m) => {
|
|
@@ -18096,10 +18096,10 @@ function bP(e) {
|
|
|
18096
18096
|
y == null || y.focus();
|
|
18097
18097
|
}
|
|
18098
18098
|
}
|
|
18099
|
-
}), h && s && /* @__PURE__ */
|
|
18099
|
+
}), h && s && /* @__PURE__ */ O.jsx("span", {
|
|
18100
18100
|
"aria-owns": s.id,
|
|
18101
18101
|
style: X0
|
|
18102
|
-
}), s && /* @__PURE__ */ Qr.createPortal(t, s), h && s && /* @__PURE__ */
|
|
18102
|
+
}), s && /* @__PURE__ */ Qr.createPortal(t, s), h && s && /* @__PURE__ */ O.jsx(Rf, {
|
|
18103
18103
|
"data-type": "outside",
|
|
18104
18104
|
ref: l,
|
|
18105
18105
|
onFocus: (m) => {
|
|
@@ -18205,14 +18205,14 @@ function SP(e, t) {
|
|
|
18205
18205
|
} = Cf(p), {
|
|
18206
18206
|
escapeKey: L,
|
|
18207
18207
|
outsidePress: F
|
|
18208
|
-
} = Cf(h),
|
|
18208
|
+
} = Cf(h), D = U.useRef(!1), g = kt((E) => {
|
|
18209
18209
|
var x;
|
|
18210
|
-
if (!n || !i || !c || E.key !== "Escape" ||
|
|
18210
|
+
if (!n || !i || !c || E.key !== "Escape" || D.current)
|
|
18211
18211
|
return;
|
|
18212
|
-
const
|
|
18213
|
-
if (!A && (E.stopPropagation(),
|
|
18212
|
+
const R = (x = s.current.floatingContext) == null ? void 0 : x.nodeId, N = m ? us(m.nodesRef.current, R) : [];
|
|
18213
|
+
if (!A && (E.stopPropagation(), N.length > 0)) {
|
|
18214
18214
|
let b = !0;
|
|
18215
|
-
if (
|
|
18215
|
+
if (N.forEach((C) => {
|
|
18216
18216
|
var k;
|
|
18217
18217
|
if ((k = C.context) != null && k.open && !C.context.dataRef.current.__escapeKeyBubbles) {
|
|
18218
18218
|
b = !1;
|
|
@@ -18224,62 +18224,62 @@ function SP(e, t) {
|
|
|
18224
18224
|
r(!1, XS(E) ? E.nativeEvent : E, "escape-key");
|
|
18225
18225
|
}), w = kt((E) => {
|
|
18226
18226
|
var x;
|
|
18227
|
-
const
|
|
18228
|
-
var
|
|
18229
|
-
g(E), (
|
|
18227
|
+
const R = () => {
|
|
18228
|
+
var N;
|
|
18229
|
+
g(E), (N = ir(E)) == null || N.removeEventListener("keydown", R);
|
|
18230
18230
|
};
|
|
18231
|
-
(x = ir(E)) == null || x.addEventListener("keydown",
|
|
18231
|
+
(x = ir(E)) == null || x.addEventListener("keydown", R);
|
|
18232
18232
|
}), P = kt((E) => {
|
|
18233
18233
|
var x;
|
|
18234
|
-
const
|
|
18234
|
+
const R = s.current.insideReactTree;
|
|
18235
18235
|
s.current.insideReactTree = !1;
|
|
18236
|
-
const
|
|
18237
|
-
if (y.current = !1, l === "click" &&
|
|
18236
|
+
const N = y.current;
|
|
18237
|
+
if (y.current = !1, l === "click" && N || R || typeof $ == "function" && !$(E))
|
|
18238
18238
|
return;
|
|
18239
18239
|
const b = ir(E), C = "[" + Uo("inert") + "]", k = jt(o.floating).querySelectorAll(C);
|
|
18240
|
-
let
|
|
18241
|
-
for (;
|
|
18242
|
-
const
|
|
18243
|
-
if (on(
|
|
18240
|
+
let j = ge(b) ? b : null;
|
|
18241
|
+
for (; j && !on(j); ) {
|
|
18242
|
+
const H = fn(j);
|
|
18243
|
+
if (on(H) || !ge(H))
|
|
18244
18244
|
break;
|
|
18245
|
-
|
|
18245
|
+
j = H;
|
|
18246
18246
|
}
|
|
18247
18247
|
if (k.length && ge(b) && !ZS(b) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
|
|
18248
18248
|
!Tr(b, o.floating) && // If the target root element contains none of the markers, then the
|
|
18249
18249
|
// element was injected after the floating element rendered.
|
|
18250
|
-
Array.from(k).every((
|
|
18250
|
+
Array.from(k).every((H) => !Tr(j, H)))
|
|
18251
18251
|
return;
|
|
18252
18252
|
if (We(b) && S) {
|
|
18253
|
-
const
|
|
18253
|
+
const H = on(b), q = wt(b), V = /auto|scroll/, re = H || V.test(q.overflowX), te = H || V.test(q.overflowY), de = re && b.clientWidth > 0 && b.scrollWidth > b.clientWidth, Re = te && b.clientHeight > 0 && b.scrollHeight > b.clientHeight, je = q.direction === "rtl", Y = Re && (je ? E.offsetX <= b.offsetWidth - b.clientWidth : E.offsetX > b.clientWidth), ne = de && E.offsetY > b.clientHeight;
|
|
18254
18254
|
if (Y || ne)
|
|
18255
18255
|
return;
|
|
18256
18256
|
}
|
|
18257
|
-
const
|
|
18257
|
+
const _ = (x = s.current.floatingContext) == null ? void 0 : x.nodeId, z = m && us(m.nodesRef.current, _).some((H) => {
|
|
18258
18258
|
var q;
|
|
18259
|
-
return Vi(E, (q =
|
|
18259
|
+
return Vi(E, (q = H.context) == null ? void 0 : q.elements.floating);
|
|
18260
18260
|
});
|
|
18261
|
-
if (Vi(E, o.floating) || Vi(E, o.domReference) ||
|
|
18261
|
+
if (Vi(E, o.floating) || Vi(E, o.domReference) || z)
|
|
18262
18262
|
return;
|
|
18263
|
-
const K = m ? us(m.nodesRef.current,
|
|
18263
|
+
const K = m ? us(m.nodesRef.current, _) : [];
|
|
18264
18264
|
if (K.length > 0) {
|
|
18265
|
-
let
|
|
18265
|
+
let H = !0;
|
|
18266
18266
|
if (K.forEach((q) => {
|
|
18267
18267
|
var V;
|
|
18268
18268
|
if ((V = q.context) != null && V.open && !q.context.dataRef.current.__outsidePressBubbles) {
|
|
18269
|
-
|
|
18269
|
+
H = !1;
|
|
18270
18270
|
return;
|
|
18271
18271
|
}
|
|
18272
|
-
}), !
|
|
18272
|
+
}), !H)
|
|
18273
18273
|
return;
|
|
18274
18274
|
}
|
|
18275
18275
|
r(!1, E, "outside-press");
|
|
18276
|
-
}),
|
|
18276
|
+
}), I = kt((E) => {
|
|
18277
18277
|
var x;
|
|
18278
|
-
const
|
|
18279
|
-
var
|
|
18280
|
-
P(E), (
|
|
18278
|
+
const R = () => {
|
|
18279
|
+
var N;
|
|
18280
|
+
P(E), (N = ir(E)) == null || N.removeEventListener(l, R);
|
|
18281
18281
|
};
|
|
18282
|
-
(x = ir(E)) == null || x.addEventListener(l,
|
|
18282
|
+
(x = ir(E)) == null || x.addEventListener(l, R);
|
|
18283
18283
|
});
|
|
18284
18284
|
U.useEffect(() => {
|
|
18285
18285
|
if (!n || !i)
|
|
@@ -18289,13 +18289,13 @@ function SP(e, t) {
|
|
|
18289
18289
|
function x(k) {
|
|
18290
18290
|
r(!1, k, "ancestor-scroll");
|
|
18291
18291
|
}
|
|
18292
|
-
function T() {
|
|
18293
|
-
window.clearTimeout(E), _.current = !0;
|
|
18294
|
-
}
|
|
18295
18292
|
function R() {
|
|
18293
|
+
window.clearTimeout(E), D.current = !0;
|
|
18294
|
+
}
|
|
18295
|
+
function N() {
|
|
18296
18296
|
E = window.setTimeout(
|
|
18297
18297
|
() => {
|
|
18298
|
-
|
|
18298
|
+
D.current = !1;
|
|
18299
18299
|
},
|
|
18300
18300
|
// 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
|
|
18301
18301
|
// Only apply to WebKit for the test to remain 0ms.
|
|
@@ -18303,24 +18303,24 @@ function SP(e, t) {
|
|
|
18303
18303
|
);
|
|
18304
18304
|
}
|
|
18305
18305
|
const b = jt(o.floating);
|
|
18306
|
-
c && (b.addEventListener("keydown", L ? w : g, L), b.addEventListener("compositionstart",
|
|
18306
|
+
c && (b.addEventListener("keydown", L ? w : g, L), b.addEventListener("compositionstart", R), b.addEventListener("compositionend", N)), $ && b.addEventListener(l, F ? I : P, F);
|
|
18307
18307
|
let C = [];
|
|
18308
18308
|
return f && (ge(o.domReference) && (C = Sn(o.domReference)), ge(o.floating) && (C = C.concat(Sn(o.floating))), !ge(o.reference) && o.reference && o.reference.contextElement && (C = C.concat(Sn(o.reference.contextElement)))), C = C.filter((k) => {
|
|
18309
|
-
var
|
|
18310
|
-
return k !== ((
|
|
18309
|
+
var j;
|
|
18310
|
+
return k !== ((j = b.defaultView) == null ? void 0 : j.visualViewport);
|
|
18311
18311
|
}), C.forEach((k) => {
|
|
18312
18312
|
k.addEventListener("scroll", x, {
|
|
18313
18313
|
passive: !0
|
|
18314
18314
|
});
|
|
18315
18315
|
}), () => {
|
|
18316
|
-
c && (b.removeEventListener("keydown", L ? w : g, L), b.removeEventListener("compositionstart",
|
|
18316
|
+
c && (b.removeEventListener("keydown", L ? w : g, L), b.removeEventListener("compositionstart", R), b.removeEventListener("compositionend", N)), $ && b.removeEventListener(l, F ? I : P, F), C.forEach((k) => {
|
|
18317
18317
|
k.removeEventListener("scroll", x);
|
|
18318
18318
|
}), window.clearTimeout(E);
|
|
18319
18319
|
};
|
|
18320
|
-
}, [s, o, c, $, l, n, r, f, i, A, B, g, L, w, P, F,
|
|
18320
|
+
}, [s, o, c, $, l, n, r, f, i, A, B, g, L, w, P, F, I]), U.useEffect(() => {
|
|
18321
18321
|
s.current.insideReactTree = !1;
|
|
18322
18322
|
}, [s, $, l]);
|
|
18323
|
-
const
|
|
18323
|
+
const T = U.useMemo(() => ({
|
|
18324
18324
|
onKeyDown: g,
|
|
18325
18325
|
...u && {
|
|
18326
18326
|
[xP[d]]: (E) => {
|
|
@@ -18345,9 +18345,9 @@ function SP(e, t) {
|
|
|
18345
18345
|
}
|
|
18346
18346
|
}), [g, l, s]);
|
|
18347
18347
|
return U.useMemo(() => i ? {
|
|
18348
|
-
reference:
|
|
18348
|
+
reference: T,
|
|
18349
18349
|
floating: S
|
|
18350
|
-
} : {}, [i,
|
|
18350
|
+
} : {}, [i, T, S]);
|
|
18351
18351
|
}
|
|
18352
18352
|
function PP(e) {
|
|
18353
18353
|
const {
|
|
@@ -18696,7 +18696,7 @@ const J0 = Z.forwardRef(
|
|
|
18696
18696
|
return {};
|
|
18697
18697
|
}
|
|
18698
18698
|
})(e);
|
|
18699
|
-
return /* @__PURE__ */
|
|
18699
|
+
return /* @__PURE__ */ O.jsx(
|
|
18700
18700
|
"div",
|
|
18701
18701
|
{
|
|
18702
18702
|
ref: n,
|
|
@@ -18747,9 +18747,9 @@ const wr = ({
|
|
|
18747
18747
|
y,
|
|
18748
18748
|
A
|
|
18749
18749
|
]);
|
|
18750
|
-
return i ? /* @__PURE__ */
|
|
18751
|
-
/* @__PURE__ */
|
|
18752
|
-
l && /* @__PURE__ */
|
|
18750
|
+
return i ? /* @__PURE__ */ O.jsx(O.Fragment, { children: e }) : /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
|
|
18751
|
+
/* @__PURE__ */ O.jsx("div", { ref: f.setReference, ...B(), className: "cursor-help", children: e }),
|
|
18752
|
+
l && /* @__PURE__ */ O.jsx(bP, { children: /* @__PURE__ */ O.jsxs(
|
|
18753
18753
|
"div",
|
|
18754
18754
|
{
|
|
18755
18755
|
ref: f.setFloating,
|
|
@@ -18766,7 +18766,7 @@ const wr = ({
|
|
|
18766
18766
|
`,
|
|
18767
18767
|
children: [
|
|
18768
18768
|
t,
|
|
18769
|
-
o && /* @__PURE__ */
|
|
18769
|
+
o && /* @__PURE__ */ O.jsx(
|
|
18770
18770
|
J0,
|
|
18771
18771
|
{
|
|
18772
18772
|
ref: d,
|
|
@@ -18850,8 +18850,8 @@ const wr = ({
|
|
|
18850
18850
|
onClose: s
|
|
18851
18851
|
}) => {
|
|
18852
18852
|
const { t: i } = qt(), c = J(() => CP(e || {}), [e]);
|
|
18853
|
-
return /* @__PURE__ */
|
|
18854
|
-
/* @__PURE__ */
|
|
18853
|
+
return /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
|
|
18854
|
+
/* @__PURE__ */ O.jsx("div", { className: "flex justify-center mt-4 mb-3", children: n && /* @__PURE__ */ O.jsx("div", { className: "bg-white rounded-lg", children: /* @__PURE__ */ O.jsx(
|
|
18855
18855
|
G0,
|
|
18856
18856
|
{
|
|
18857
18857
|
value: n,
|
|
@@ -18862,16 +18862,16 @@ const wr = ({
|
|
|
18862
18862
|
marginSize: 0
|
|
18863
18863
|
}
|
|
18864
18864
|
) }) }),
|
|
18865
|
-
n && /* @__PURE__ */
|
|
18866
|
-
/* @__PURE__ */
|
|
18867
|
-
/* @__PURE__ */
|
|
18865
|
+
n && /* @__PURE__ */ O.jsxs("div", { className: "flex items-center justify-between bg-fill-input-primary rounded-lg py-2 px-3 mb-3", children: [
|
|
18866
|
+
/* @__PURE__ */ O.jsx("span", { className: "flex-1 text-text-primary text-sm font-medium break-all mr-3", children: n }),
|
|
18867
|
+
/* @__PURE__ */ O.jsx(
|
|
18868
18868
|
BS,
|
|
18869
18869
|
{
|
|
18870
18870
|
onCopy: () => {
|
|
18871
18871
|
o && o(n);
|
|
18872
18872
|
},
|
|
18873
18873
|
text: n,
|
|
18874
|
-
children: /* @__PURE__ */
|
|
18874
|
+
children: /* @__PURE__ */ O.jsxs(
|
|
18875
18875
|
"svg",
|
|
18876
18876
|
{
|
|
18877
18877
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -18880,7 +18880,7 @@ const wr = ({
|
|
|
18880
18880
|
viewBox: "0 0 16 16",
|
|
18881
18881
|
fill: "none",
|
|
18882
18882
|
children: [
|
|
18883
|
-
/* @__PURE__ */
|
|
18883
|
+
/* @__PURE__ */ O.jsx(
|
|
18884
18884
|
"rect",
|
|
18885
18885
|
{
|
|
18886
18886
|
x: "2.08496",
|
|
@@ -18891,7 +18891,7 @@ const wr = ({
|
|
|
18891
18891
|
stroke: "#F9F9F9"
|
|
18892
18892
|
}
|
|
18893
18893
|
),
|
|
18894
|
-
/* @__PURE__ */
|
|
18894
|
+
/* @__PURE__ */ O.jsx(
|
|
18895
18895
|
"path",
|
|
18896
18896
|
{
|
|
18897
18897
|
d: "M5.85547 2.07861H11.415C12.7957 2.07861 13.915 3.1979 13.915 4.57861V10.0786",
|
|
@@ -18906,55 +18906,55 @@ const wr = ({
|
|
|
18906
18906
|
"copy"
|
|
18907
18907
|
)
|
|
18908
18908
|
] }),
|
|
18909
|
-
/* @__PURE__ */
|
|
18910
|
-
/* @__PURE__ */
|
|
18911
|
-
/* @__PURE__ */
|
|
18912
|
-
/* @__PURE__ */
|
|
18909
|
+
/* @__PURE__ */ O.jsxs("div", { className: "border-b border-dashed border-line-divider-secondary pb-4", children: [
|
|
18910
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex items-start", children: [
|
|
18911
|
+
/* @__PURE__ */ O.jsx("div", { className: "w-5", children: /* @__PURE__ */ O.jsx("img", { src: Xr, className: "w-4 h-4", alt: "Warning" }) }),
|
|
18912
|
+
/* @__PURE__ */ O.jsx("div", { className: "flex-1", children: /* @__PURE__ */ O.jsx("p", { className: "text-xs text-functional-orange-1", children: i("deposit.depositAllTip", {
|
|
18913
18913
|
coin: t,
|
|
18914
18914
|
v: e == null ? void 0 : e.chain
|
|
18915
18915
|
}) }) })
|
|
18916
18916
|
] }),
|
|
18917
|
-
c && /* @__PURE__ */
|
|
18918
|
-
/* @__PURE__ */
|
|
18919
|
-
/* @__PURE__ */
|
|
18917
|
+
c && /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
|
|
18918
|
+
/* @__PURE__ */ O.jsx("div", { className: "my-2 ml-5 h-[1px] border-b border-dashed border-line-divider-secondary" }),
|
|
18919
|
+
/* @__PURE__ */ O.jsx("div", { className: "flex items-start pl-5 text-functional-orange-1 text-xs", children: i("deposit.depositTipFor25w") })
|
|
18920
18920
|
] })
|
|
18921
18921
|
] }),
|
|
18922
|
-
/* @__PURE__ */
|
|
18923
|
-
/* @__PURE__ */
|
|
18924
|
-
/* @__PURE__ */
|
|
18925
|
-
/* @__PURE__ */
|
|
18922
|
+
/* @__PURE__ */ O.jsxs("div", { className: "text-sm", children: [
|
|
18923
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex justify-between items-center h-[18px] mt-4", children: [
|
|
18924
|
+
/* @__PURE__ */ O.jsx("span", { className: "text-text-tertiary", children: i("deposit.arrivalTime") }),
|
|
18925
|
+
/* @__PURE__ */ O.jsx(
|
|
18926
18926
|
wr,
|
|
18927
18927
|
{
|
|
18928
|
-
content: /* @__PURE__ */
|
|
18929
|
-
/* @__PURE__ */
|
|
18928
|
+
content: /* @__PURE__ */ O.jsxs("div", { className: "grid flex-grow max-w-[300px] min-w-[80px] rounded-2xl flex-col gap-[10px]", children: [
|
|
18929
|
+
/* @__PURE__ */ O.jsx("p", { children: i("deposit.arrivaltimeTooltip1", {
|
|
18930
18930
|
v: (e == null ? void 0 : e.blockTime) * e.txConfirm / 60,
|
|
18931
18931
|
v1: e == null ? void 0 : e.txConfirm
|
|
18932
18932
|
}) }),
|
|
18933
|
-
/* @__PURE__ */
|
|
18933
|
+
/* @__PURE__ */ O.jsx("p", { children: i("deposit.arrivaltimeTooltip2") })
|
|
18934
18934
|
] }),
|
|
18935
18935
|
placement: "top",
|
|
18936
|
-
children: /* @__PURE__ */
|
|
18936
|
+
children: /* @__PURE__ */ O.jsx("span", { className: "text-text-primary font-medium text-right border-b-[2px] border-dashed border-line-divider-primary decoration-dashed", children: i("deposit.arrivalEstimated", {
|
|
18937
18937
|
v: (e == null ? void 0 : e.blockTime) * e.txConfirm / 60
|
|
18938
18938
|
}) })
|
|
18939
18939
|
}
|
|
18940
18940
|
)
|
|
18941
18941
|
] }),
|
|
18942
|
-
/* @__PURE__ */
|
|
18943
|
-
/* @__PURE__ */
|
|
18944
|
-
/* @__PURE__ */
|
|
18942
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex justify-between items-center h-[18px] mt-1", children: [
|
|
18943
|
+
/* @__PURE__ */ O.jsx("span", { className: "text-text-tertiary", children: i("deposit.minDeposit") }),
|
|
18944
|
+
/* @__PURE__ */ O.jsxs("span", { className: "text-text-primary font-medium text-right", children: [
|
|
18945
18945
|
"10 ",
|
|
18946
18946
|
t
|
|
18947
18947
|
] })
|
|
18948
18948
|
] }),
|
|
18949
|
-
/* @__PURE__ */
|
|
18950
|
-
/* @__PURE__ */
|
|
18951
|
-
/* @__PURE__ */
|
|
18949
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex justify-between items-center h-[18px] mt-1", children: [
|
|
18950
|
+
/* @__PURE__ */ O.jsx("span", { className: "text-text-tertiary", children: i("deposit.maxDeposit") }),
|
|
18951
|
+
/* @__PURE__ */ O.jsxs("span", { className: "text-text-primary font-medium text-right", children: [
|
|
18952
18952
|
"200,000 ",
|
|
18953
18953
|
t
|
|
18954
18954
|
] })
|
|
18955
18955
|
] })
|
|
18956
18956
|
] }),
|
|
18957
|
-
/* @__PURE__ */
|
|
18957
|
+
/* @__PURE__ */ O.jsx(
|
|
18958
18958
|
"button",
|
|
18959
18959
|
{
|
|
18960
18960
|
className: "w-full h-[38px] bg-fill-btn-primary rounded-xl text-sm font-medium text-text-on-sec-btn mt-4",
|
|
@@ -18978,7 +18978,7 @@ const wr = ({
|
|
|
18978
18978
|
inline: o = !1
|
|
18979
18979
|
}) => {
|
|
18980
18980
|
const s = t ? `loading-${t}` : "", i = o ? "loading-inline" : "";
|
|
18981
|
-
return /* @__PURE__ */
|
|
18981
|
+
return /* @__PURE__ */ O.jsx(
|
|
18982
18982
|
"span",
|
|
18983
18983
|
{
|
|
18984
18984
|
className: `loading loading-${e} loading-spinner ${s} ${i} ${n}`.trim(),
|
|
@@ -18993,9 +18993,9 @@ const wr = ({
|
|
|
18993
18993
|
const s = r - o, i = $t(
|
|
18994
18994
|
Math.max(0, s).toString()
|
|
18995
18995
|
);
|
|
18996
|
-
return /* @__PURE__ */
|
|
18996
|
+
return /* @__PURE__ */ O.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
18997
18997
|
$t(e),
|
|
18998
|
-
/* @__PURE__ */
|
|
18998
|
+
/* @__PURE__ */ O.jsx("span", { className: "text-sm font-edgex-harmony text-functional-green-1 leading-[18px] font-medium", children: "→" }),
|
|
18999
18999
|
i,
|
|
19000
19000
|
" ",
|
|
19001
19001
|
n
|
|
@@ -19037,7 +19037,10 @@ const wr = ({
|
|
|
19037
19037
|
},
|
|
19038
19038
|
defaultChainId: 1,
|
|
19039
19039
|
defaultAccountType: "perpetual",
|
|
19040
|
-
|
|
19040
|
+
balances: {
|
|
19041
|
+
spot: {},
|
|
19042
|
+
perpetual: {}
|
|
19043
|
+
}
|
|
19041
19044
|
};
|
|
19042
19045
|
let Xe = null;
|
|
19043
19046
|
const DP = Z.forwardRef((e, t) => {
|
|
@@ -19087,7 +19090,7 @@ const DP = Z.forwardRef((e, t) => {
|
|
|
19087
19090
|
d,
|
|
19088
19091
|
f,
|
|
19089
19092
|
p
|
|
19090
|
-
]), n ? /* @__PURE__ */
|
|
19093
|
+
]), n ? /* @__PURE__ */ O.jsx(
|
|
19091
19094
|
KP,
|
|
19092
19095
|
{
|
|
19093
19096
|
isOpen: n,
|
|
@@ -19098,7 +19101,7 @@ const DP = Z.forwardRef((e, t) => {
|
|
|
19098
19101
|
spotChains: i.spotChains,
|
|
19099
19102
|
defaultChainId: i.defaultChainId,
|
|
19100
19103
|
defaultAccountType: i.defaultAccountType,
|
|
19101
|
-
|
|
19104
|
+
balances: i.balances,
|
|
19102
19105
|
wagmiHooks: i.wagmiHooks,
|
|
19103
19106
|
onDeposit: i.onDeposit,
|
|
19104
19107
|
onCopy: i.onCopy,
|
|
@@ -19225,13 +19228,13 @@ function VP(e) {
|
|
|
19225
19228
|
try {
|
|
19226
19229
|
if (r && n && +n != +r && await h({ chainId: +r }), !m || !v || !u || !f)
|
|
19227
19230
|
return;
|
|
19228
|
-
const F = Un(u),
|
|
19231
|
+
const F = Un(u), D = Un(f);
|
|
19229
19232
|
if ((y || 0n) > 0n) {
|
|
19230
19233
|
const P = await m({
|
|
19231
19234
|
abi: gr,
|
|
19232
19235
|
address: F,
|
|
19233
19236
|
functionName: "approve",
|
|
19234
|
-
args: [
|
|
19237
|
+
args: [D, 0n]
|
|
19235
19238
|
});
|
|
19236
19239
|
await v.waitForTransactionReceipt({ hash: P });
|
|
19237
19240
|
}
|
|
@@ -19239,7 +19242,7 @@ function VP(e) {
|
|
|
19239
19242
|
abi: gr,
|
|
19240
19243
|
address: F,
|
|
19241
19244
|
functionName: "approve",
|
|
19242
|
-
args: [
|
|
19245
|
+
args: [D, Dd]
|
|
19243
19246
|
});
|
|
19244
19247
|
await v.waitForTransactionReceipt({ hash: w }), $ != null && $.refetch && await $.refetch();
|
|
19245
19248
|
} catch (L) {
|
|
@@ -19290,8 +19293,8 @@ const GP = ({
|
|
|
19290
19293
|
return r.filter((L) => {
|
|
19291
19294
|
const F = L.tokenAddress;
|
|
19292
19295
|
if (!F) return !1;
|
|
19293
|
-
const
|
|
19294
|
-
return !(F === A ||
|
|
19296
|
+
const D = F.toLowerCase();
|
|
19297
|
+
return !(F === A || D === B);
|
|
19295
19298
|
});
|
|
19296
19299
|
}, [r]), [c, a] = ce({}), l = ee(
|
|
19297
19300
|
(A, B) => {
|
|
@@ -19337,7 +19340,7 @@ const GP = ({
|
|
|
19337
19340
|
decimals: 18,
|
|
19338
19341
|
symbol: "ETH"
|
|
19339
19342
|
}, B = i.map((F) => {
|
|
19340
|
-
const
|
|
19343
|
+
const D = c[Un(F.tokenAddress)], g = D == null ? void 0 : D.balance, w = g == null ? void 0 : g.data;
|
|
19341
19344
|
return {
|
|
19342
19345
|
address: Un(F.tokenAddress),
|
|
19343
19346
|
value: (w == null ? void 0 : w.value) || BigInt(0),
|
|
@@ -19345,10 +19348,10 @@ const GP = ({
|
|
|
19345
19348
|
decimals: (w == null ? void 0 : w.decimals) || F.decimals
|
|
19346
19349
|
};
|
|
19347
19350
|
}).filter((F) => F.address), L = B.reduce(
|
|
19348
|
-
(F,
|
|
19351
|
+
(F, D) => ({
|
|
19349
19352
|
...F,
|
|
19350
|
-
[
|
|
19351
|
-
balance:
|
|
19353
|
+
[D.address]: {
|
|
19354
|
+
balance: D
|
|
19352
19355
|
}
|
|
19353
19356
|
}),
|
|
19354
19357
|
{}
|
|
@@ -19388,7 +19391,7 @@ const GP = ({
|
|
|
19388
19391
|
onDeposit: a
|
|
19389
19392
|
}) => {
|
|
19390
19393
|
const { t: l } = qt(), u = i.useAccount(), d = t.tokenList.find(
|
|
19391
|
-
(
|
|
19394
|
+
(j) => j.token === n || j.symbol === n
|
|
19392
19395
|
), f = t.chainId, [p, h] = ce("");
|
|
19393
19396
|
Ae(() => {
|
|
19394
19397
|
h("");
|
|
@@ -19400,19 +19403,19 @@ const GP = ({
|
|
|
19400
19403
|
tokens: (t == null ? void 0 : t.tokenList) || [],
|
|
19401
19404
|
wagmiHooks: i
|
|
19402
19405
|
}), $ = J(() => {
|
|
19403
|
-
var
|
|
19406
|
+
var _;
|
|
19404
19407
|
if (!d) return "0";
|
|
19405
19408
|
if (!d.tokenAddress || d.tokenAddress.toLowerCase() === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee")
|
|
19406
19409
|
return m.baseTokenBalance.formatted;
|
|
19407
|
-
const
|
|
19408
|
-
return ((
|
|
19410
|
+
const j = m.combinedData[d.tokenAddress];
|
|
19411
|
+
return ((_ = j == null ? void 0 : j.balance) == null ? void 0 : _.formatted) || "0";
|
|
19409
19412
|
}, [d, m]), y = "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9", A = "0xceeed84620e5eb9ab1d6dfc316867d2cda332e41", B = J(
|
|
19410
19413
|
() => {
|
|
19411
|
-
var
|
|
19414
|
+
var j, _;
|
|
19412
19415
|
return Ca({
|
|
19413
19416
|
chain: Ba,
|
|
19414
19417
|
transport: Sa(
|
|
19415
|
-
t.rpcUrl || ((
|
|
19418
|
+
t.rpcUrl || ((j = window == null ? void 0 : window.ENV) == null ? void 0 : j.CHAIN_RPC_URL_42161) || ((_ = window == null ? void 0 : window.ENV) == null ? void 0 : _.CHAIN_RPC_URL_421614)
|
|
19416
19419
|
)
|
|
19417
19420
|
});
|
|
19418
19421
|
},
|
|
@@ -19424,65 +19427,65 @@ const GP = ({
|
|
|
19424
19427
|
decimals: 6,
|
|
19425
19428
|
fallbackFormatted: L,
|
|
19426
19429
|
pollingInterval: 12e3
|
|
19427
|
-
}), [
|
|
19430
|
+
}), [D, g] = ce(!1), { approve: w, onApprove: P } = VP({
|
|
19428
19431
|
account: e,
|
|
19429
19432
|
accountChainId: u.chainId,
|
|
19430
19433
|
targetChainId: +t.chainId,
|
|
19431
19434
|
tokenInfo: d,
|
|
19432
19435
|
amount: p,
|
|
19433
19436
|
wagmiHooks: i
|
|
19434
|
-
}),
|
|
19435
|
-
if (!
|
|
19437
|
+
}), I = ee(async () => {
|
|
19438
|
+
if (!D)
|
|
19436
19439
|
try {
|
|
19437
19440
|
g(!0), await P();
|
|
19438
|
-
} catch (
|
|
19439
|
-
console.error("Approve failed:",
|
|
19441
|
+
} catch (j) {
|
|
19442
|
+
console.error("Approve failed:", j);
|
|
19440
19443
|
} finally {
|
|
19441
19444
|
g(!1);
|
|
19442
19445
|
}
|
|
19443
|
-
}, [
|
|
19446
|
+
}, [D, P]), T = J(() => +u.chainId != +t.chainId, [u.chainId, t.chainId]), S = ee(async () => {
|
|
19444
19447
|
c && c(f);
|
|
19445
19448
|
}, [c, f]);
|
|
19446
19449
|
Ae(() => {
|
|
19447
|
-
|
|
19448
|
-
}, [
|
|
19450
|
+
T && S();
|
|
19451
|
+
}, [T, S]);
|
|
19449
19452
|
const { showLayerZeroTip: E, layerZeroTipKey: x } = J(() => {
|
|
19450
|
-
const
|
|
19451
|
-
let
|
|
19452
|
-
if (
|
|
19453
|
-
if (
|
|
19454
|
-
|
|
19453
|
+
const j = +t.chainId == 42161 || +t.chainId == 421614, _ = (n == null ? void 0 : n.toUpperCase()) === "USDT", z = new Ie(p || "0"), K = new Ie("200000");
|
|
19454
|
+
let H = !1, q;
|
|
19455
|
+
if (j && _ && p)
|
|
19456
|
+
if (z.gte(K))
|
|
19457
|
+
H = !0, q = "deposit.layerZeroDepositTipGte200k";
|
|
19455
19458
|
else {
|
|
19456
19459
|
const V = F;
|
|
19457
19460
|
if (typeof V == "string" && V.length > 0) {
|
|
19458
19461
|
const te = new Ie(V);
|
|
19459
|
-
!te.isNaN() &&
|
|
19462
|
+
!te.isNaN() && z.gte(te) && (H = !0, q = "deposit.layerZeroDepositTipExceedPool");
|
|
19460
19463
|
}
|
|
19461
19464
|
}
|
|
19462
|
-
return { showLayerZeroTip:
|
|
19465
|
+
return { showLayerZeroTip: H, layerZeroTipKey: q };
|
|
19463
19466
|
}, [
|
|
19464
19467
|
t.chainId,
|
|
19465
19468
|
n,
|
|
19466
19469
|
p,
|
|
19467
19470
|
F
|
|
19468
|
-
]),
|
|
19471
|
+
]), R = ee(() => FP(
|
|
19469
19472
|
+t.chainId,
|
|
19470
19473
|
$ || "0",
|
|
19471
19474
|
n
|
|
19472
|
-
), [$, t == null ? void 0 : t.chainId, n]),
|
|
19475
|
+
), [$, t == null ? void 0 : t.chainId, n]), N = J(() => kP(
|
|
19473
19476
|
+t.chainId,
|
|
19474
19477
|
p,
|
|
19475
19478
|
n
|
|
19476
19479
|
), [t == null ? void 0 : t.chainId, p, n]), b = WP({
|
|
19477
|
-
isNetworkMismatch:
|
|
19480
|
+
isNetworkMismatch: T,
|
|
19478
19481
|
depositAmount: p,
|
|
19479
19482
|
approved: w,
|
|
19480
19483
|
currentTokenBalance: $,
|
|
19481
19484
|
selectedToken: n,
|
|
19482
19485
|
showLayerZeroTip: E,
|
|
19483
19486
|
minDeposit: 10
|
|
19484
|
-
}), C = (
|
|
19485
|
-
const
|
|
19487
|
+
}), C = (j) => {
|
|
19488
|
+
const _ = j.target.value, z = R(), K = El(_, z);
|
|
19486
19489
|
if (K.isValid)
|
|
19487
19490
|
h(K.formattedValue), K.errorType;
|
|
19488
19491
|
else
|
|
@@ -19498,8 +19501,8 @@ const GP = ({
|
|
|
19498
19501
|
// 透传父组件的账户类型,便于上层业务区分
|
|
19499
19502
|
accountType: r
|
|
19500
19503
|
});
|
|
19501
|
-
} catch (
|
|
19502
|
-
console.error("Deposit error:",
|
|
19504
|
+
} catch (j) {
|
|
19505
|
+
console.error("Deposit error:", j), ic(!1);
|
|
19503
19506
|
}
|
|
19504
19507
|
}, [
|
|
19505
19508
|
a,
|
|
@@ -19509,11 +19512,11 @@ const GP = ({
|
|
|
19509
19512
|
r,
|
|
19510
19513
|
n
|
|
19511
19514
|
]);
|
|
19512
|
-
return /* @__PURE__ */
|
|
19515
|
+
return /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
|
|
19513
19516
|
v,
|
|
19514
|
-
/* @__PURE__ */
|
|
19515
|
-
/* @__PURE__ */
|
|
19516
|
-
/* @__PURE__ */
|
|
19517
|
+
/* @__PURE__ */ O.jsxs("div", { className: "bg-fill-input-primary rounded-lg px-3 py-3 my-4", children: [
|
|
19518
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex justify-between items-center h-[18px] mb-3", children: [
|
|
19519
|
+
/* @__PURE__ */ O.jsx(
|
|
19517
19520
|
"input",
|
|
19518
19521
|
{
|
|
19519
19522
|
type: "text",
|
|
@@ -19523,90 +19526,90 @@ const GP = ({
|
|
|
19523
19526
|
className: "flex-1 bg-transparent text-text-primary text-sm font-medium placeholder-text-tertiary placeholder:font-normal focus:outline-none border-none p-0 h-full"
|
|
19524
19527
|
}
|
|
19525
19528
|
),
|
|
19526
|
-
/* @__PURE__ */
|
|
19529
|
+
/* @__PURE__ */ O.jsx(
|
|
19527
19530
|
"button",
|
|
19528
19531
|
{
|
|
19529
19532
|
onClick: () => {
|
|
19530
|
-
const
|
|
19531
|
-
h(
|
|
19533
|
+
const j = R();
|
|
19534
|
+
h(j);
|
|
19532
19535
|
},
|
|
19533
19536
|
className: "text-theme-normal text-xs font-medium cursor-pointer hover:opacity-80 transition-opacity h-full flex items-center",
|
|
19534
19537
|
children: l("deposit.max")
|
|
19535
19538
|
}
|
|
19536
19539
|
)
|
|
19537
19540
|
] }),
|
|
19538
|
-
/* @__PURE__ */
|
|
19539
|
-
/* @__PURE__ */
|
|
19540
|
-
/* @__PURE__ */
|
|
19541
|
-
/* @__PURE__ */
|
|
19541
|
+
/* @__PURE__ */ O.jsx("div", { className: "h-[1px] bg-line-divider-secondary mb-2" }),
|
|
19542
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
19543
|
+
/* @__PURE__ */ O.jsx(wr, { content: l("deposit.availableDesc"), children: /* @__PURE__ */ O.jsx("span", { className: "text-text-tertiary text-xs leading-[14px] border-b border-dashed border-line-divider-primary", children: l("deposit.available") }) }),
|
|
19544
|
+
/* @__PURE__ */ O.jsx("span", { className: "text-text-primary text-xs leading-[14px]", children: LP(
|
|
19542
19545
|
$ || "0",
|
|
19543
19546
|
p,
|
|
19544
19547
|
n
|
|
19545
19548
|
) })
|
|
19546
19549
|
] })
|
|
19547
19550
|
] }),
|
|
19548
|
-
!w && OP(p || "0", 0) && /* @__PURE__ */
|
|
19549
|
-
/* @__PURE__ */
|
|
19551
|
+
!w && OP(p || "0", 0) && /* @__PURE__ */ O.jsxs("div", { className: "flex justify-center flex-col items-center", children: [
|
|
19552
|
+
/* @__PURE__ */ O.jsx("h3", { className: "text-text-primary text-sm leading-4 font-medium", children: l("deposit.enableSystemProWithToken", {
|
|
19550
19553
|
token: n,
|
|
19551
19554
|
network: t == null ? void 0 : t.chain
|
|
19552
19555
|
}) }),
|
|
19553
|
-
/* @__PURE__ */
|
|
19556
|
+
/* @__PURE__ */ O.jsx("p", { className: "text-text-secondary text-xs leading-3 mt-4", children: l("deposit.enableTokenDesc", {
|
|
19554
19557
|
token: n,
|
|
19555
19558
|
network: t == null ? void 0 : t.chain
|
|
19556
19559
|
}) }),
|
|
19557
|
-
/* @__PURE__ */
|
|
19560
|
+
/* @__PURE__ */ O.jsx(
|
|
19558
19561
|
"button",
|
|
19559
19562
|
{
|
|
19560
19563
|
className: "w-[180px] h-8 bg-fill-btn-primary hover:bg-fill-btn-primary-hover text-text-on-sec-btn rounded-xl text-sm font-medium transition-colors my-4 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center",
|
|
19561
|
-
onClick:
|
|
19562
|
-
disabled:
|
|
19563
|
-
children:
|
|
19564
|
+
onClick: I,
|
|
19565
|
+
disabled: D,
|
|
19566
|
+
children: D ? /* @__PURE__ */ O.jsx(sc, { size: "xs", inline: !0 }) : l("deposit.enableWithToken", {
|
|
19564
19567
|
token: n
|
|
19565
19568
|
})
|
|
19566
19569
|
}
|
|
19567
19570
|
)
|
|
19568
19571
|
] }),
|
|
19569
|
-
E && /* @__PURE__ */
|
|
19570
|
-
/* @__PURE__ */
|
|
19571
|
-
/* @__PURE__ */
|
|
19572
|
-
/* @__PURE__ */
|
|
19572
|
+
E && /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
|
|
19573
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex mb-4", children: [
|
|
19574
|
+
/* @__PURE__ */ O.jsx("div", { className: "w-5", children: /* @__PURE__ */ O.jsx("img", { src: Xr, className: "w-4 h-4", alt: "Warning" }) }),
|
|
19575
|
+
/* @__PURE__ */ O.jsx("div", { className: "flex-1 text-xs text-functional-orange-1", children: l(x || "deposit.layerZeroDepositTip") })
|
|
19573
19576
|
] }),
|
|
19574
|
-
/* @__PURE__ */
|
|
19577
|
+
/* @__PURE__ */ O.jsx("div", { className: "my-2 ml-5 h-[1px] border-b border-dashed border-line-divider-secondary" })
|
|
19575
19578
|
] }),
|
|
19576
|
-
|
|
19577
|
-
/* @__PURE__ */
|
|
19578
|
-
/* @__PURE__ */
|
|
19579
|
+
N && /* @__PURE__ */ O.jsxs("div", { className: "flex mb-4", children: [
|
|
19580
|
+
/* @__PURE__ */ O.jsx("div", { className: "w-5", children: /* @__PURE__ */ O.jsx("img", { src: Xr, className: "w-4 h-4", alt: "Warning" }) }),
|
|
19581
|
+
/* @__PURE__ */ O.jsx("div", { className: "flex-1 text-xs text-functional-orange-1", children: l("deposit.depositTipFor25w") })
|
|
19579
19582
|
] }),
|
|
19580
|
-
|
|
19581
|
-
/* @__PURE__ */
|
|
19582
|
-
/* @__PURE__ */
|
|
19583
|
-
/* @__PURE__ */
|
|
19583
|
+
N && /* @__PURE__ */ O.jsx("div", { className: "my-2 ml-5 h-[1px] border-b border-dashed border-line-divider-secondary" }),
|
|
19584
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex mb-4", children: [
|
|
19585
|
+
/* @__PURE__ */ O.jsx("div", { className: "w-5", children: !(N || E) && /* @__PURE__ */ O.jsx("img", { src: Xr, className: "w-4 h-4", alt: "Warning" }) }),
|
|
19586
|
+
/* @__PURE__ */ O.jsx("div", { className: "flex-1 text-xs text-functional-orange-1", children: l("deposit.noPrivateKeyWalletWarning") })
|
|
19584
19587
|
] }),
|
|
19585
|
-
/* @__PURE__ */
|
|
19586
|
-
/* @__PURE__ */
|
|
19587
|
-
/* @__PURE__ */
|
|
19588
|
-
/* @__PURE__ */
|
|
19588
|
+
/* @__PURE__ */ O.jsxs("div", { className: "border-t border-line-divider-secondary border-dashed py-4", children: [
|
|
19589
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex justify-between items-center h-[18px] leading-4", children: [
|
|
19590
|
+
/* @__PURE__ */ O.jsx("span", { className: "text-sm text-text-tertiary", children: l("deposit.arrivalTime") }),
|
|
19591
|
+
/* @__PURE__ */ O.jsx(
|
|
19589
19592
|
wr,
|
|
19590
19593
|
{
|
|
19591
|
-
content: /* @__PURE__ */
|
|
19592
|
-
/* @__PURE__ */
|
|
19594
|
+
content: /* @__PURE__ */ O.jsxs("div", { className: "grid flex-grow max-w-[300px] min-w-[80px] rounded-2xl flex-col gap-[10px]", children: [
|
|
19595
|
+
/* @__PURE__ */ O.jsx("p", { children: l("deposit.arrivaltimeTooltip1", {
|
|
19593
19596
|
v: (t == null ? void 0 : t.blockTime) * t.txConfirm / 60,
|
|
19594
19597
|
v1: t == null ? void 0 : t.txConfirm
|
|
19595
19598
|
}) }),
|
|
19596
|
-
/* @__PURE__ */
|
|
19599
|
+
/* @__PURE__ */ O.jsx("p", { children: l("deposit.arrivaltimeTooltip2") })
|
|
19597
19600
|
] }),
|
|
19598
19601
|
placement: "top",
|
|
19599
|
-
children: /* @__PURE__ */
|
|
19602
|
+
children: /* @__PURE__ */ O.jsx("span", { className: "text-text-primary font-medium text-right border-b-[2px] border-dashed border-line-divider-primary decoration-dashed text-sm", children: l("deposit.arrivalEstimated", {
|
|
19600
19603
|
v: (t == null ? void 0 : t.blockTime) * t.txConfirm / 60
|
|
19601
19604
|
}) })
|
|
19602
19605
|
}
|
|
19603
19606
|
)
|
|
19604
19607
|
] }),
|
|
19605
|
-
/* @__PURE__ */
|
|
19606
|
-
/* @__PURE__ */
|
|
19607
|
-
/* @__PURE__ */
|
|
19608
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex justify-between items-center h-[18px] leading-4 mt-2", children: [
|
|
19609
|
+
/* @__PURE__ */ O.jsx("span", { className: "text-sm text-text-tertiary", children: l("deposit.equity") }),
|
|
19610
|
+
/* @__PURE__ */ O.jsx("span", { className: "text-sm text-text-primary font-medium", children: p ? /* @__PURE__ */ O.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
19608
19611
|
$t(o),
|
|
19609
|
-
/* @__PURE__ */
|
|
19612
|
+
/* @__PURE__ */ O.jsx("span", { className: "text-sm font-edgex-harmony text-functional-green-1 leading-[18px] font-medium", children: "→" }),
|
|
19610
19613
|
$t(
|
|
19611
19614
|
(parseFloat(o) + parseFloat(p)).toString()
|
|
19612
19615
|
),
|
|
@@ -19615,14 +19618,14 @@ const GP = ({
|
|
|
19615
19618
|
] }) : `${$t(o)} ${n}` })
|
|
19616
19619
|
] })
|
|
19617
19620
|
] }),
|
|
19618
|
-
/* @__PURE__ */
|
|
19621
|
+
/* @__PURE__ */ O.jsxs(
|
|
19619
19622
|
"button",
|
|
19620
19623
|
{
|
|
19621
19624
|
className: `w-full h-[38px] text-sm rounded-xl font-medium transition-colors flex items-center justify-center gap-2 ${b.disabled || s ? "bg-text-disabled text-text-secondary cursor-not-allowed" : "bg-fill-btn-primary text-text-on-sec-btn"}`,
|
|
19622
19625
|
onClick: k,
|
|
19623
19626
|
disabled: b.disabled || s,
|
|
19624
19627
|
children: [
|
|
19625
|
-
(s ||
|
|
19628
|
+
(s || T) && /* @__PURE__ */ O.jsx(sc, { size: "xs" }),
|
|
19626
19629
|
b.text
|
|
19627
19630
|
]
|
|
19628
19631
|
}
|
|
@@ -19637,7 +19640,7 @@ const GP = ({
|
|
|
19637
19640
|
spotChains: s = [],
|
|
19638
19641
|
defaultChainId: i,
|
|
19639
19642
|
defaultAccountType: c = "perpetual",
|
|
19640
|
-
|
|
19643
|
+
balances: a,
|
|
19641
19644
|
wagmiHooks: l,
|
|
19642
19645
|
onDeposit: u,
|
|
19643
19646
|
onCopy: d,
|
|
@@ -19647,39 +19650,44 @@ const GP = ({
|
|
|
19647
19650
|
const { t: h } = qt(), [m, v] = ce(
|
|
19648
19651
|
c
|
|
19649
19652
|
), $ = ee(
|
|
19650
|
-
(
|
|
19653
|
+
(T) => T === "spot" && s && s.length > 0 ? s : o,
|
|
19651
19654
|
[o, s]
|
|
19652
19655
|
), y = $(c), [A, B] = ce(() => {
|
|
19653
|
-
var
|
|
19654
|
-
return !y || y.length === 0 ? 1 : i || ((
|
|
19656
|
+
var T;
|
|
19657
|
+
return !y || y.length === 0 ? 1 : i || ((T = y[0]) == null ? void 0 : T.chainId) || 1;
|
|
19655
19658
|
}), L = J(
|
|
19656
19659
|
() => $(m),
|
|
19657
19660
|
[m, $]
|
|
19658
|
-
), F = L.find((
|
|
19659
|
-
var
|
|
19661
|
+
), F = L.find((T) => T.chainId === A) || L[0], [D, g] = ce(() => {
|
|
19662
|
+
var R, N;
|
|
19660
19663
|
if (!y || y.length === 0) return "";
|
|
19661
|
-
const
|
|
19662
|
-
return (
|
|
19664
|
+
const T = i || ((R = y[0]) == null ? void 0 : R.chainId), S = y.find((b) => b.chainId === T) || y[0], E = ((S == null ? void 0 : S.tokenList) || []).length > 0 ? S : y.find((b) => (b.tokenList || []).length > 0), x = (N = E == null ? void 0 : E.tokenList) == null ? void 0 : N[0];
|
|
19665
|
+
return (x == null ? void 0 : x.token) || (x == null ? void 0 : x.symbol) || "";
|
|
19663
19666
|
}), w = ee(
|
|
19664
|
-
(
|
|
19665
|
-
B(
|
|
19667
|
+
(T) => {
|
|
19668
|
+
B(T), f == null || f(T);
|
|
19666
19669
|
},
|
|
19667
19670
|
[f]
|
|
19668
19671
|
), P = ee(
|
|
19669
|
-
(
|
|
19670
|
-
g(
|
|
19672
|
+
(T) => {
|
|
19673
|
+
g(T), p == null || p(T);
|
|
19671
19674
|
},
|
|
19672
19675
|
[p]
|
|
19673
|
-
)
|
|
19676
|
+
), I = J(() => {
|
|
19677
|
+
const T = (D || "").toLowerCase();
|
|
19678
|
+
if (console.log("key:", T), !T) return "0";
|
|
19679
|
+
const S = m === "spot" ? a == null ? void 0 : a.spot : a == null ? void 0 : a.perpetual, E = S == null ? void 0 : S[T];
|
|
19680
|
+
return typeof E == "string" && E.length > 0 ? E : "0";
|
|
19681
|
+
}, [a, m, D]);
|
|
19674
19682
|
return e ? Lf.createPortal(
|
|
19675
|
-
/* @__PURE__ */
|
|
19683
|
+
/* @__PURE__ */ O.jsx(
|
|
19676
19684
|
"div",
|
|
19677
19685
|
{
|
|
19678
19686
|
className: "fixed top-0 left-0 right-0 bottom-0 w-screen h-screen",
|
|
19679
19687
|
style: {
|
|
19680
19688
|
zIndex: 98
|
|
19681
19689
|
},
|
|
19682
|
-
children: /* @__PURE__ */
|
|
19690
|
+
children: /* @__PURE__ */ O.jsx(
|
|
19683
19691
|
"div",
|
|
19684
19692
|
{
|
|
19685
19693
|
className: "fixed top-0 left-0 right-0 bottom-0 z-[99] flex items-center justify-center",
|
|
@@ -19692,80 +19700,80 @@ const GP = ({
|
|
|
19692
19700
|
n();
|
|
19693
19701
|
},
|
|
19694
19702
|
"aria-hidden": "true",
|
|
19695
|
-
children: /* @__PURE__ */
|
|
19703
|
+
children: /* @__PURE__ */ O.jsxs(
|
|
19696
19704
|
"div",
|
|
19697
19705
|
{
|
|
19698
19706
|
className: "relative w-[420px] max-h-[85vh] bg-fill-page-secondary overflow-auto rounded-lg p-6 shadow-xl border-[2px] border-solid border-line-divider-secondary",
|
|
19699
|
-
onClick: (
|
|
19700
|
-
|
|
19707
|
+
onClick: (T) => {
|
|
19708
|
+
T.stopPropagation();
|
|
19701
19709
|
},
|
|
19702
19710
|
children: [
|
|
19703
|
-
/* @__PURE__ */
|
|
19704
|
-
/* @__PURE__ */
|
|
19705
|
-
/* @__PURE__ */
|
|
19711
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex items-center justify-between mb-4", children: [
|
|
19712
|
+
/* @__PURE__ */ O.jsx("h2", { className: "text-lg font-semibold text-white", children: h("deposit.title") }),
|
|
19713
|
+
/* @__PURE__ */ O.jsx(
|
|
19706
19714
|
"button",
|
|
19707
19715
|
{
|
|
19708
19716
|
className: "text-gray-400 hover:text-gray-200 transition-colors",
|
|
19709
19717
|
onClick: n,
|
|
19710
19718
|
"aria-label": "Close",
|
|
19711
|
-
children: /* @__PURE__ */
|
|
19719
|
+
children: /* @__PURE__ */ O.jsx(lh, { className: "h-4 w-4" })
|
|
19712
19720
|
}
|
|
19713
19721
|
)
|
|
19714
19722
|
] }),
|
|
19715
|
-
/* @__PURE__ */
|
|
19723
|
+
/* @__PURE__ */ O.jsx(
|
|
19716
19724
|
pS,
|
|
19717
19725
|
{
|
|
19718
19726
|
selectedAccount: m,
|
|
19719
|
-
onAccountChange: (
|
|
19720
|
-
var
|
|
19721
|
-
const
|
|
19722
|
-
v(
|
|
19723
|
-
const
|
|
19724
|
-
if (!
|
|
19725
|
-
const
|
|
19726
|
-
(
|
|
19727
|
-
),
|
|
19728
|
-
B(
|
|
19729
|
-
const
|
|
19730
|
-
(
|
|
19731
|
-
),
|
|
19732
|
-
(
|
|
19733
|
-
) ?
|
|
19734
|
-
|
|
19727
|
+
onAccountChange: (T) => {
|
|
19728
|
+
var j, _;
|
|
19729
|
+
const S = T || "perpetual";
|
|
19730
|
+
v(S);
|
|
19731
|
+
const E = $(S);
|
|
19732
|
+
if (!E || E.length === 0) return;
|
|
19733
|
+
const x = E.find(
|
|
19734
|
+
(z) => z.chainId === A
|
|
19735
|
+
), R = x ? x.chainId : E[0].chainId;
|
|
19736
|
+
B(R), f == null || f(R);
|
|
19737
|
+
const N = E.find(
|
|
19738
|
+
(z) => z.chainId === R
|
|
19739
|
+
), b = (N == null ? void 0 : N.tokenList) || [], k = b.some(
|
|
19740
|
+
(z) => (z.symbol || z.token) === D
|
|
19741
|
+
) ? D : ((j = b[0]) == null ? void 0 : j.symbol) || ((_ = b[0]) == null ? void 0 : _.token) || "";
|
|
19742
|
+
k && (g(k), p == null || p(k));
|
|
19735
19743
|
},
|
|
19736
19744
|
className: "w-full"
|
|
19737
19745
|
}
|
|
19738
19746
|
),
|
|
19739
|
-
/* @__PURE__ */
|
|
19747
|
+
/* @__PURE__ */ O.jsx(
|
|
19740
19748
|
I0,
|
|
19741
19749
|
{
|
|
19742
19750
|
currentActiveChain: F,
|
|
19743
19751
|
chainList: L,
|
|
19744
19752
|
onChainChange: w,
|
|
19745
|
-
curSelectToken:
|
|
19753
|
+
curSelectToken: D,
|
|
19746
19754
|
onTokenChange: P,
|
|
19747
19755
|
walletType: Rs(r) ? zn : Zc
|
|
19748
19756
|
}
|
|
19749
19757
|
),
|
|
19750
|
-
Rs(r) && /* @__PURE__ */
|
|
19758
|
+
Rs(r) && /* @__PURE__ */ O.jsx(
|
|
19751
19759
|
BP,
|
|
19752
19760
|
{
|
|
19753
19761
|
address: r.smartWalletAddress,
|
|
19754
19762
|
currentActiveChain: F,
|
|
19755
|
-
selectedToken:
|
|
19763
|
+
selectedToken: D,
|
|
19756
19764
|
onDeposit: u,
|
|
19757
19765
|
onCopy: d,
|
|
19758
19766
|
onClose: n
|
|
19759
19767
|
}
|
|
19760
19768
|
),
|
|
19761
|
-
ZP(r) && /* @__PURE__ */
|
|
19769
|
+
ZP(r) && /* @__PURE__ */ O.jsx(
|
|
19762
19770
|
qP,
|
|
19763
19771
|
{
|
|
19764
19772
|
address: r.ethAddress,
|
|
19765
19773
|
currentActiveChain: F,
|
|
19766
|
-
selectedToken:
|
|
19774
|
+
selectedToken: D,
|
|
19767
19775
|
accountType: m,
|
|
19768
|
-
platformBalance:
|
|
19776
|
+
platformBalance: I,
|
|
19769
19777
|
isLoading: t,
|
|
19770
19778
|
wagmiHooks: l,
|
|
19771
19779
|
onChainChange: w,
|
|
@@ -19829,9 +19837,9 @@ const GP = ({
|
|
|
19829
19837
|
const L = A - B, F = $t(
|
|
19830
19838
|
Math.max(0, L).toString()
|
|
19831
19839
|
);
|
|
19832
|
-
return /* @__PURE__ */
|
|
19840
|
+
return /* @__PURE__ */ O.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
19833
19841
|
$t(o || "0"),
|
|
19834
|
-
/* @__PURE__ */
|
|
19842
|
+
/* @__PURE__ */ O.jsx("span", { className: "text-sm font-edgex-harmony text-functional-green-1 leading-[18px] font-medium", children: "→" }),
|
|
19835
19843
|
F,
|
|
19836
19844
|
" ",
|
|
19837
19845
|
t
|
|
@@ -19839,10 +19847,10 @@ const GP = ({
|
|
|
19839
19847
|
}
|
|
19840
19848
|
return `${$t(o || "0")} ${t}`;
|
|
19841
19849
|
};
|
|
19842
|
-
return /* @__PURE__ */
|
|
19843
|
-
/* @__PURE__ */
|
|
19844
|
-
/* @__PURE__ */
|
|
19845
|
-
/* @__PURE__ */
|
|
19850
|
+
return /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
|
|
19851
|
+
/* @__PURE__ */ O.jsxs("div", { className: "bg-fill-input-primary rounded-lg px-3 py-3 my-4", children: [
|
|
19852
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex justify-between items-center h-[18px] mb-3", children: [
|
|
19853
|
+
/* @__PURE__ */ O.jsx(
|
|
19846
19854
|
"input",
|
|
19847
19855
|
{
|
|
19848
19856
|
type: "text",
|
|
@@ -19852,7 +19860,7 @@ const GP = ({
|
|
|
19852
19860
|
className: "flex-1 bg-transparent text-text-primary text-sm font-medium placeholder-text-tertiary placeholder:font-normal focus:outline-none border-none p-0 h-full"
|
|
19853
19861
|
}
|
|
19854
19862
|
),
|
|
19855
|
-
/* @__PURE__ */
|
|
19863
|
+
/* @__PURE__ */ O.jsx(
|
|
19856
19864
|
"button",
|
|
19857
19865
|
{
|
|
19858
19866
|
onClick: $,
|
|
@@ -19861,13 +19869,13 @@ const GP = ({
|
|
|
19861
19869
|
}
|
|
19862
19870
|
)
|
|
19863
19871
|
] }),
|
|
19864
|
-
/* @__PURE__ */
|
|
19865
|
-
/* @__PURE__ */
|
|
19866
|
-
/* @__PURE__ */
|
|
19867
|
-
/* @__PURE__ */
|
|
19872
|
+
/* @__PURE__ */ O.jsx("div", { className: "h-[1px] bg-line-divider-secondary mb-2" }),
|
|
19873
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
19874
|
+
/* @__PURE__ */ O.jsx(wr, { content: f("withdraw.availableDesc"), children: /* @__PURE__ */ O.jsx("span", { className: "text-text-tertiary text-xs leading-[14px] border-b border-dashed border-line-divider-primary", children: f("deposit.available") }) }),
|
|
19875
|
+
/* @__PURE__ */ O.jsx("span", { className: "text-text-primary text-xs leading-[14px]", children: y() })
|
|
19868
19876
|
] })
|
|
19869
19877
|
] }),
|
|
19870
|
-
i === "mpc" && !nt(r == null ? void 0 : r.chainId) && /* @__PURE__ */
|
|
19878
|
+
i === "mpc" && !nt(r == null ? void 0 : r.chainId) && /* @__PURE__ */ O.jsx("div", { className: "bg-fill-input-primary rounded-lg my-4 h-9 flex items-center px-3", children: /* @__PURE__ */ O.jsx(
|
|
19871
19879
|
"input",
|
|
19872
19880
|
{
|
|
19873
19881
|
type: "text",
|
|
@@ -19877,9 +19885,9 @@ const GP = ({
|
|
|
19877
19885
|
className: "flex-1 bg-transparent text-text-primary text-sm font-medium placeholder-text-tertiary placeholder:font-normal focus:outline-none border-none p-0 h-full"
|
|
19878
19886
|
}
|
|
19879
19887
|
) }),
|
|
19880
|
-
/* @__PURE__ */
|
|
19881
|
-
/* @__PURE__ */
|
|
19882
|
-
/* @__PURE__ */
|
|
19888
|
+
/* @__PURE__ */ O.jsx("div", { className: "bg-fill-page-secondary rounded-lg mb-4", children: nt(r == null ? void 0 : r.chainId) ? /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
|
|
19889
|
+
/* @__PURE__ */ O.jsx("p", { className: "text-text-tertiary text-xs leading-[18px]", children: f("withdraw.noticeDesc") }),
|
|
19890
|
+
/* @__PURE__ */ O.jsx(
|
|
19883
19891
|
"a",
|
|
19884
19892
|
{
|
|
19885
19893
|
className: "block text-xs leading-[18px] mt-1 text-theme-normal",
|
|
@@ -19889,35 +19897,35 @@ const GP = ({
|
|
|
19889
19897
|
children: f("withdraw.commonWithdraw")
|
|
19890
19898
|
}
|
|
19891
19899
|
)
|
|
19892
|
-
] }) : /* @__PURE__ */
|
|
19893
|
-
d && /* @__PURE__ */
|
|
19894
|
-
/* @__PURE__ */
|
|
19895
|
-
/* @__PURE__ */
|
|
19900
|
+
] }) : /* @__PURE__ */ O.jsx("p", { className: "text-text-tertiary text-xs leading-[18px]", children: f("withdraw.crossChainTips") }) }),
|
|
19901
|
+
d && /* @__PURE__ */ O.jsxs("div", { className: "flex mb-4", children: [
|
|
19902
|
+
/* @__PURE__ */ O.jsx("div", { className: "w-5", children: /* @__PURE__ */ O.jsx("img", { src: Xr, className: "w-4 h-4", alt: "Warning" }) }),
|
|
19903
|
+
/* @__PURE__ */ O.jsx("div", { className: "flex-1 text-xs text-functional-orange-1", children: f("withdraw.poolBalanceInsufficientTip") })
|
|
19896
19904
|
] }),
|
|
19897
|
-
/* @__PURE__ */
|
|
19898
|
-
/* @__PURE__ */
|
|
19899
|
-
/* @__PURE__ */
|
|
19905
|
+
/* @__PURE__ */ O.jsxs("div", { className: "py-4 border-t border-line-divider-secondary border-dashed", children: [
|
|
19906
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex items-center justify-between h-[18px] leading-[18px]", children: [
|
|
19907
|
+
/* @__PURE__ */ O.jsx(
|
|
19900
19908
|
wr,
|
|
19901
19909
|
{
|
|
19902
|
-
content: /* @__PURE__ */
|
|
19903
|
-
/* @__PURE__ */
|
|
19904
|
-
/* @__PURE__ */
|
|
19905
|
-
/* @__PURE__ */
|
|
19906
|
-
/* @__PURE__ */
|
|
19910
|
+
content: /* @__PURE__ */ O.jsxs("div", { children: [
|
|
19911
|
+
/* @__PURE__ */ O.jsx("div", { children: f("withdraw.speedNote") }),
|
|
19912
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex gap-1 items-center mt-1", children: [
|
|
19913
|
+
/* @__PURE__ */ O.jsx(Gr, { selectedLevel: Pt.FAST, maxLevel: 3 }),
|
|
19914
|
+
/* @__PURE__ */ O.jsx("span", { children: f("withdraw.speedNoteSpeed1") })
|
|
19907
19915
|
] }),
|
|
19908
|
-
/* @__PURE__ */
|
|
19909
|
-
/* @__PURE__ */
|
|
19910
|
-
/* @__PURE__ */
|
|
19916
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex gap-1 items-center mt-1", children: [
|
|
19917
|
+
/* @__PURE__ */ O.jsx(Gr, { selectedLevel: Pt.Medium, maxLevel: 3 }),
|
|
19918
|
+
/* @__PURE__ */ O.jsx("span", { children: f("withdraw.speedNoteSpeed2") })
|
|
19911
19919
|
] }),
|
|
19912
|
-
/* @__PURE__ */
|
|
19913
|
-
/* @__PURE__ */
|
|
19914
|
-
/* @__PURE__ */
|
|
19920
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex gap-1 items-center mt-1", children: [
|
|
19921
|
+
/* @__PURE__ */ O.jsx(Gr, { selectedLevel: Pt.SLOW, maxLevel: 3 }),
|
|
19922
|
+
/* @__PURE__ */ O.jsx("span", { children: f("withdraw.speedNoteSpeed3") })
|
|
19915
19923
|
] })
|
|
19916
19924
|
] }),
|
|
19917
|
-
children: /* @__PURE__ */
|
|
19925
|
+
children: /* @__PURE__ */ O.jsx("span", { className: "text-text-tertiary text-sm leading-4 border-b border-dashed border-line-divider-primary", children: f("withdraw.speed") })
|
|
19918
19926
|
}
|
|
19919
19927
|
),
|
|
19920
|
-
/* @__PURE__ */
|
|
19928
|
+
/* @__PURE__ */ O.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ O.jsx(
|
|
19921
19929
|
Gr,
|
|
19922
19930
|
{
|
|
19923
19931
|
selectedLevel: nt(r == null ? void 0 : r.chainId) ? Pt.SLOW : Pt.FAST,
|
|
@@ -19925,13 +19933,13 @@ const GP = ({
|
|
|
19925
19933
|
}
|
|
19926
19934
|
) })
|
|
19927
19935
|
] }),
|
|
19928
|
-
!nt(r == null ? void 0 : r.chainId) && /* @__PURE__ */
|
|
19929
|
-
/* @__PURE__ */
|
|
19936
|
+
!nt(r == null ? void 0 : r.chainId) && /* @__PURE__ */ O.jsxs("div", { className: "flex items-center justify-between mt-2 h-[18px]", children: [
|
|
19937
|
+
/* @__PURE__ */ O.jsx(wr, { content: f("withdraw.feeCalculationTip"), children: /* @__PURE__ */ O.jsxs("span", { className: "text-text-tertiary text-sm leading-4 border-b border-dashed border-line-divider-primary", children: [
|
|
19930
19938
|
f("withdraw.fee"),
|
|
19931
19939
|
"/",
|
|
19932
19940
|
f("withdraw.feeRate")
|
|
19933
19941
|
] }) }),
|
|
19934
|
-
/* @__PURE__ */
|
|
19942
|
+
/* @__PURE__ */ O.jsxs("span", { className: "text-text-primary text-sm leading-4 font-medium", children: [
|
|
19935
19943
|
s,
|
|
19936
19944
|
" ",
|
|
19937
19945
|
t,
|
|
@@ -19940,11 +19948,11 @@ const GP = ({
|
|
|
19940
19948
|
"%"
|
|
19941
19949
|
] })
|
|
19942
19950
|
] }),
|
|
19943
|
-
/* @__PURE__ */
|
|
19944
|
-
/* @__PURE__ */
|
|
19951
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex items-center justify-between mt-2 h-[18px]", children: [
|
|
19952
|
+
/* @__PURE__ */ O.jsx("span", { className: "text-text-tertiary text-sm leading-4", children: f(
|
|
19945
19953
|
nt(r == null ? void 0 : r.chainId) ? "withdraw.withdrawlAmount" : "withdraw.amountToReceive"
|
|
19946
19954
|
) }),
|
|
19947
|
-
/* @__PURE__ */
|
|
19955
|
+
/* @__PURE__ */ O.jsxs("span", { className: "text-text-primary text-sm leading-4 font-medium", children: [
|
|
19948
19956
|
$t(p),
|
|
19949
19957
|
" ",
|
|
19950
19958
|
t
|
|
@@ -20019,7 +20027,7 @@ const JP = Z.forwardRef((e, t) => {
|
|
|
20019
20027
|
d,
|
|
20020
20028
|
f,
|
|
20021
20029
|
p
|
|
20022
|
-
]), n ? /* @__PURE__ */
|
|
20030
|
+
]), n ? /* @__PURE__ */ O.jsx(
|
|
20023
20031
|
iA,
|
|
20024
20032
|
{
|
|
20025
20033
|
isOpen: n,
|
|
@@ -20135,18 +20143,18 @@ const eA = (e) => {
|
|
|
20135
20143
|
(On) => (On.token || On.symbol || "").toUpperCase() === Y
|
|
20136
20144
|
), me = (ye == null ? void 0 : ye.token) || (ye == null ? void 0 : ye.symbol) || ((Nn = Q.tokenList[0]) == null ? void 0 : Nn.token) || ((tt = Q.tokenList[0]) == null ? void 0 : tt.symbol) || "";
|
|
20137
20145
|
return { chainId: Q.chainId, tokenSymbol: me };
|
|
20138
|
-
}, [n]), { ARB_USDC_BALANCE: L, ARB_USDT_BALANCE: F, BNB_USDT_BALANCE:
|
|
20146
|
+
}, [n]), { ARB_USDC_BALANCE: L, ARB_USDT_BALANCE: F, BNB_USDT_BALANCE: D } = mx({ bscRpcUrl: y, arbitrumRpcUrl: A }), [g, w] = ce(
|
|
20139
20147
|
() => B.chainId
|
|
20140
|
-
), [P,
|
|
20148
|
+
), [P, I] = ce(
|
|
20141
20149
|
() => B.tokenSymbol
|
|
20142
|
-
), [
|
|
20150
|
+
), [T, S] = ce(s), [E, x] = ce(""), R = ee(
|
|
20143
20151
|
(Y) => {
|
|
20144
20152
|
w(Y), h == null || h(Y);
|
|
20145
20153
|
},
|
|
20146
20154
|
[h]
|
|
20147
|
-
),
|
|
20155
|
+
), N = ee(
|
|
20148
20156
|
(Y) => {
|
|
20149
|
-
|
|
20157
|
+
I(Y), m == null || m(Y);
|
|
20150
20158
|
},
|
|
20151
20159
|
[m]
|
|
20152
20160
|
), b = Z.useRef(!0), C = Z.useRef(P), k = Z.useRef(g);
|
|
@@ -20157,23 +20165,23 @@ const eA = (e) => {
|
|
|
20157
20165
|
}
|
|
20158
20166
|
(C.current !== P || k.current !== g) && (S(""), C.current = P, k.current = g);
|
|
20159
20167
|
}, [P, g]);
|
|
20160
|
-
const
|
|
20168
|
+
const j = n && n.length > 0 ? n.find((Y) => Y.chainId === g) || n[0] : null, _ = (je = j == null ? void 0 : j.tokenList) == null ? void 0 : je.find(
|
|
20161
20169
|
(Y) => Y.token === P
|
|
20162
|
-
), { multicallResult:
|
|
20170
|
+
), { multicallResult: z, queryComponents: K } = tm({
|
|
20163
20171
|
account: e,
|
|
20164
20172
|
chainId: g,
|
|
20165
20173
|
contractAddress: void 0,
|
|
20166
20174
|
// 暂时不传入合约地址
|
|
20167
|
-
tokens: (
|
|
20175
|
+
tokens: (j == null ? void 0 : j.tokenList) || [],
|
|
20168
20176
|
wagmiHooks: d
|
|
20169
|
-
}),
|
|
20177
|
+
}), H = J(() => {
|
|
20170
20178
|
var ne;
|
|
20171
|
-
if (!
|
|
20172
|
-
if (!
|
|
20173
|
-
return
|
|
20174
|
-
const Y =
|
|
20179
|
+
if (!_) return;
|
|
20180
|
+
if (!_.tokenAddress || _.tokenAddress.toLowerCase() === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee")
|
|
20181
|
+
return z.baseTokenBalance.formatted;
|
|
20182
|
+
const Y = z.combinedData[_.tokenAddress];
|
|
20175
20183
|
return ((ne = Y == null ? void 0 : Y.balance) == null ? void 0 : ne.formatted) || "0";
|
|
20176
|
-
}, [
|
|
20184
|
+
}, [_, z]), q = (Y) => {
|
|
20177
20185
|
if (!Y) return "0";
|
|
20178
20186
|
const ne = Y.indexOf(".");
|
|
20179
20187
|
return ne >= 0 ? Y.slice(0, ne) : Y;
|
|
@@ -20192,22 +20200,22 @@ const eA = (e) => {
|
|
|
20192
20200
|
if (Y === "USDT") return Q(F);
|
|
20193
20201
|
if (Y === "USDC") return Q(L);
|
|
20194
20202
|
}
|
|
20195
|
-
return (ne === 56 || ne === 97) && Y === "USDT" ? Q(
|
|
20203
|
+
return (ne === 56 || ne === 97) && Y === "USDT" ? Q(D) : "0";
|
|
20196
20204
|
}, [
|
|
20197
20205
|
g,
|
|
20198
20206
|
P,
|
|
20199
20207
|
L,
|
|
20200
20208
|
F,
|
|
20201
|
-
|
|
20209
|
+
D
|
|
20202
20210
|
]), re = J(() => {
|
|
20203
20211
|
if (nt(g)) return !1;
|
|
20204
20212
|
try {
|
|
20205
|
-
const Y = new Ie(
|
|
20213
|
+
const Y = new Ie(T || "0"), ne = new Ie((V || "0").toString());
|
|
20206
20214
|
return Y.isGreaterThan(ne);
|
|
20207
20215
|
} catch {
|
|
20208
20216
|
return !1;
|
|
20209
20217
|
}
|
|
20210
|
-
}, [g,
|
|
20218
|
+
}, [g, T, V]), te = J(() => {
|
|
20211
20219
|
const Y = {}, ne = (P || "").toUpperCase(), Q = (ye) => {
|
|
20212
20220
|
const me = q(ye);
|
|
20213
20221
|
try {
|
|
@@ -20229,7 +20237,7 @@ const eA = (e) => {
|
|
|
20229
20237
|
return;
|
|
20230
20238
|
}
|
|
20231
20239
|
if (me === 56 || me === 97) {
|
|
20232
|
-
ne === "USDT" ? Y[me] = Q(
|
|
20240
|
+
ne === "USDT" ? Y[me] = Q(D) : Y[me] = "0";
|
|
20233
20241
|
return;
|
|
20234
20242
|
}
|
|
20235
20243
|
Y[me] = "0";
|
|
@@ -20240,9 +20248,9 @@ const eA = (e) => {
|
|
|
20240
20248
|
P,
|
|
20241
20249
|
L,
|
|
20242
20250
|
F,
|
|
20243
|
-
|
|
20251
|
+
D
|
|
20244
20252
|
]), de = J(() => {
|
|
20245
|
-
const Y = new Ie(
|
|
20253
|
+
const Y = new Ie(T || "0"), ne = new Ie(l || "0"), Q = nt(g);
|
|
20246
20254
|
let ye = !1;
|
|
20247
20255
|
if (!Q)
|
|
20248
20256
|
try {
|
|
@@ -20253,7 +20261,7 @@ const eA = (e) => {
|
|
|
20253
20261
|
} catch {
|
|
20254
20262
|
ye = !1;
|
|
20255
20263
|
}
|
|
20256
|
-
return !
|
|
20264
|
+
return !T || Y.isZero() || !Q && Y.isLessThan(ne) || !Q && ye ? {
|
|
20257
20265
|
text: $("withdraw.confirmWithdraw"),
|
|
20258
20266
|
disabled: !0
|
|
20259
20267
|
} : t === "mpc" && !Q && !E.trim() ? {
|
|
@@ -20266,7 +20274,7 @@ const eA = (e) => {
|
|
|
20266
20274
|
}, [
|
|
20267
20275
|
$,
|
|
20268
20276
|
g,
|
|
20269
|
-
|
|
20277
|
+
T,
|
|
20270
20278
|
t,
|
|
20271
20279
|
E,
|
|
20272
20280
|
l,
|
|
@@ -20276,9 +20284,9 @@ const eA = (e) => {
|
|
|
20276
20284
|
try {
|
|
20277
20285
|
if (f) {
|
|
20278
20286
|
const ne = {
|
|
20279
|
-
amount: new Ie(
|
|
20287
|
+
amount: new Ie(T || "0").toString(),
|
|
20280
20288
|
chainId: g,
|
|
20281
|
-
tokenAddress: (
|
|
20289
|
+
tokenAddress: (_ == null ? void 0 : _.tokenAddress) || "",
|
|
20282
20290
|
tokenSymbol: P
|
|
20283
20291
|
};
|
|
20284
20292
|
t === "mpc" && !nt(g) && (ne.receiverAddress = E), f(ne);
|
|
@@ -20288,51 +20296,51 @@ const eA = (e) => {
|
|
|
20288
20296
|
}
|
|
20289
20297
|
}, [
|
|
20290
20298
|
f,
|
|
20291
|
-
|
|
20299
|
+
T,
|
|
20292
20300
|
g,
|
|
20293
|
-
|
|
20301
|
+
_ == null ? void 0 : _.tokenAddress,
|
|
20294
20302
|
P,
|
|
20295
20303
|
t,
|
|
20296
20304
|
E
|
|
20297
20305
|
]);
|
|
20298
|
-
return !n || n.length === 0 ? /* @__PURE__ */
|
|
20306
|
+
return !n || n.length === 0 ? /* @__PURE__ */ O.jsx("div", { className: "text-center py-8", children: /* @__PURE__ */ O.jsx("p", { className: "text-gray-400", children: "No chains available" }) }) : j ? /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
|
|
20299
20307
|
K,
|
|
20300
|
-
/* @__PURE__ */
|
|
20308
|
+
/* @__PURE__ */ O.jsx(
|
|
20301
20309
|
I0,
|
|
20302
20310
|
{
|
|
20303
|
-
currentActiveChain:
|
|
20311
|
+
currentActiveChain: j,
|
|
20304
20312
|
chainList: n,
|
|
20305
20313
|
chainPoolBalances: te,
|
|
20306
|
-
onChainChange:
|
|
20314
|
+
onChainChange: R,
|
|
20307
20315
|
curSelectToken: P,
|
|
20308
|
-
onTokenChange:
|
|
20316
|
+
onTokenChange: N,
|
|
20309
20317
|
walletType: "EVM",
|
|
20310
20318
|
txType: "withdraw"
|
|
20311
20319
|
}
|
|
20312
20320
|
),
|
|
20313
|
-
/* @__PURE__ */
|
|
20314
|
-
/* @__PURE__ */
|
|
20315
|
-
/* @__PURE__ */
|
|
20321
|
+
/* @__PURE__ */ O.jsxs("div", { className: "p-3 my-4 bg-fill-input-primary rounded-lg flex items-center justify-between h-[38px]", children: [
|
|
20322
|
+
/* @__PURE__ */ O.jsx("div", { className: "text-text-secondary text-sm", children: nt(g) ? $("withdraw.poolBalance") : $("withdraw.crossChainPoolBalance") }),
|
|
20323
|
+
/* @__PURE__ */ O.jsxs("div", { className: "text-text-primary text-sm font-medium", children: [
|
|
20316
20324
|
V,
|
|
20317
20325
|
" ",
|
|
20318
20326
|
P
|
|
20319
20327
|
] })
|
|
20320
20328
|
] }),
|
|
20321
|
-
/* @__PURE__ */
|
|
20329
|
+
/* @__PURE__ */ O.jsx(
|
|
20322
20330
|
YP,
|
|
20323
20331
|
{
|
|
20324
|
-
withdrawAmount:
|
|
20332
|
+
withdrawAmount: T,
|
|
20325
20333
|
curSelectToken: P,
|
|
20326
|
-
tokenInfo:
|
|
20334
|
+
tokenInfo: _,
|
|
20327
20335
|
curSelectTokenData: {
|
|
20328
|
-
balance:
|
|
20329
|
-
allowance:
|
|
20336
|
+
balance: _ == null ? void 0 : _.balance,
|
|
20337
|
+
allowance: _ == null ? void 0 : _.allowance
|
|
20330
20338
|
},
|
|
20331
|
-
currentActiveChain:
|
|
20339
|
+
currentActiveChain: j,
|
|
20332
20340
|
currentEquity: c || 0,
|
|
20333
|
-
amount:
|
|
20334
|
-
decimals: (
|
|
20335
|
-
tokenBalance:
|
|
20341
|
+
amount: T,
|
|
20342
|
+
decimals: (_ == null ? void 0 : _.decimals) || 6,
|
|
20343
|
+
tokenBalance: H,
|
|
20336
20344
|
platformBalance: a,
|
|
20337
20345
|
fee: l,
|
|
20338
20346
|
walletType: t,
|
|
@@ -20344,19 +20352,19 @@ const eA = (e) => {
|
|
|
20344
20352
|
poolBalanceMap: te
|
|
20345
20353
|
}
|
|
20346
20354
|
),
|
|
20347
|
-
/* @__PURE__ */
|
|
20355
|
+
/* @__PURE__ */ O.jsxs(
|
|
20348
20356
|
"button",
|
|
20349
20357
|
{
|
|
20350
20358
|
className: `w-full h-[38px] text-sm rounded-xl font-medium transition-colors flex items-center justify-center gap-2 ${de.disabled || u ? "bg-text-disabled text-text-secondary cursor-not-allowed" : "bg-fill-btn-primary text-text-on-sec-btn"}`,
|
|
20351
20359
|
onClick: Re,
|
|
20352
20360
|
disabled: de.disabled || u,
|
|
20353
20361
|
children: [
|
|
20354
|
-
u && /* @__PURE__ */
|
|
20362
|
+
u && /* @__PURE__ */ O.jsx(sc, { size: "xs" }),
|
|
20355
20363
|
de.text
|
|
20356
20364
|
]
|
|
20357
20365
|
}
|
|
20358
20366
|
)
|
|
20359
|
-
] }) : /* @__PURE__ */
|
|
20367
|
+
] }) : /* @__PURE__ */ O.jsx("div", { className: "text-center py-8", children: /* @__PURE__ */ O.jsx("p", { className: "text-gray-400", children: "Loading..." }) });
|
|
20360
20368
|
}, iA = ({
|
|
20361
20369
|
isOpen: e,
|
|
20362
20370
|
isLoading: t = !1,
|
|
@@ -20380,14 +20388,14 @@ const eA = (e) => {
|
|
|
20380
20388
|
}) => {
|
|
20381
20389
|
const { t: y } = qt();
|
|
20382
20390
|
return e ? Lf.createPortal(
|
|
20383
|
-
/* @__PURE__ */
|
|
20391
|
+
/* @__PURE__ */ O.jsx(
|
|
20384
20392
|
"div",
|
|
20385
20393
|
{
|
|
20386
20394
|
className: "fixed top-0 left-0 right-0 bottom-0 w-screen h-screen",
|
|
20387
20395
|
style: {
|
|
20388
20396
|
zIndex: 98
|
|
20389
20397
|
},
|
|
20390
|
-
children: /* @__PURE__ */
|
|
20398
|
+
children: /* @__PURE__ */ O.jsx(
|
|
20391
20399
|
"div",
|
|
20392
20400
|
{
|
|
20393
20401
|
className: "fixed top-0 left-0 right-0 bottom-0 z-[99] flex items-center justify-center",
|
|
@@ -20400,7 +20408,7 @@ const eA = (e) => {
|
|
|
20400
20408
|
n();
|
|
20401
20409
|
},
|
|
20402
20410
|
"aria-hidden": "true",
|
|
20403
|
-
children: /* @__PURE__ */
|
|
20411
|
+
children: /* @__PURE__ */ O.jsxs(
|
|
20404
20412
|
"div",
|
|
20405
20413
|
{
|
|
20406
20414
|
className: "relative w-[420px] max-h-[85vh] bg-fill-page-secondary overflow-auto rounded-lg p-6 shadow-xl",
|
|
@@ -20408,19 +20416,19 @@ const eA = (e) => {
|
|
|
20408
20416
|
A.stopPropagation();
|
|
20409
20417
|
},
|
|
20410
20418
|
children: [
|
|
20411
|
-
/* @__PURE__ */
|
|
20412
|
-
/* @__PURE__ */
|
|
20413
|
-
/* @__PURE__ */
|
|
20419
|
+
/* @__PURE__ */ O.jsxs("div", { className: "flex items-center justify-between mb-4", children: [
|
|
20420
|
+
/* @__PURE__ */ O.jsx("h2", { className: "text-lg font-semibold text-white", children: y("withdraw.withdraw") }),
|
|
20421
|
+
/* @__PURE__ */ O.jsx(
|
|
20414
20422
|
"button",
|
|
20415
20423
|
{
|
|
20416
20424
|
className: "text-gray-400 hover:text-gray-200 transition-colors",
|
|
20417
20425
|
onClick: n,
|
|
20418
20426
|
"aria-label": "Close",
|
|
20419
|
-
children: /* @__PURE__ */
|
|
20427
|
+
children: /* @__PURE__ */ O.jsx(lh, { className: "h-4 w-4" })
|
|
20420
20428
|
}
|
|
20421
20429
|
)
|
|
20422
20430
|
] }),
|
|
20423
|
-
/* @__PURE__ */
|
|
20431
|
+
/* @__PURE__ */ O.jsx(
|
|
20424
20432
|
sA,
|
|
20425
20433
|
{
|
|
20426
20434
|
chains: s,
|
|
@@ -20493,4 +20501,4 @@ export {
|
|
|
20493
20501
|
JP as y,
|
|
20494
20502
|
eA as z
|
|
20495
20503
|
};
|
|
20496
|
-
//# sourceMappingURL=index-
|
|
20504
|
+
//# sourceMappingURL=index-D_NpDIqC.mjs.map
|