@edgex-web/components 0.1.0-beta.33 → 0.1.0-beta.34
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-DT9WL8XY.mjs → ccip-CzJY05H7.mjs} +2 -2
- package/dist/{ccip-DT9WL8XY.mjs.map → ccip-CzJY05H7.mjs.map} +1 -1
- package/dist/components/Deposit/src/evm/index.d.ts +5 -0
- package/dist/components/Deposit/src/evm/index.d.ts.map +1 -1
- package/dist/{index-Bwv7UT8G.mjs → index-DvVzNKgE.mjs} +803 -810
- package/dist/index-DvVzNKgE.mjs.map +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +18 -18
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/index-Bwv7UT8G.mjs.map +0 -1
|
@@ -53,7 +53,7 @@ function Sm() {
|
|
|
53
53
|
return typeof G == "function" ? G : null;
|
|
54
54
|
}
|
|
55
55
|
var T = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
56
|
-
function
|
|
56
|
+
function y(M) {
|
|
57
57
|
{
|
|
58
58
|
for (var G = arguments.length, Y = new Array(G > 1 ? G - 1 : 0), ne = 1; ne < G; ne++)
|
|
59
59
|
Y[ne - 1] = arguments[ne];
|
|
@@ -92,7 +92,7 @@ function Sm() {
|
|
|
92
92
|
function S(M) {
|
|
93
93
|
if (M == null)
|
|
94
94
|
return null;
|
|
95
|
-
if (typeof M.tag == "number" &&
|
|
95
|
+
if (typeof M.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof M == "function")
|
|
96
96
|
return M.displayName || M.name || null;
|
|
97
97
|
if (typeof M == "string")
|
|
98
98
|
return M;
|
|
@@ -134,14 +134,14 @@ function Sm() {
|
|
|
134
134
|
}
|
|
135
135
|
return null;
|
|
136
136
|
}
|
|
137
|
-
var E = Object.assign, x = 0, A, R,
|
|
137
|
+
var E = Object.assign, x = 0, A, R, b, C, D, _, U;
|
|
138
138
|
function W() {
|
|
139
139
|
}
|
|
140
140
|
W.__reactDisabledLog = !0;
|
|
141
141
|
function q() {
|
|
142
142
|
{
|
|
143
143
|
if (x === 0) {
|
|
144
|
-
A = console.log, R = console.info,
|
|
144
|
+
A = console.log, R = console.info, b = console.warn, C = console.error, D = console.group, _ = console.groupCollapsed, U = console.groupEnd;
|
|
145
145
|
var M = {
|
|
146
146
|
configurable: !0,
|
|
147
147
|
enumerable: !0,
|
|
@@ -177,7 +177,7 @@ function Sm() {
|
|
|
177
177
|
value: R
|
|
178
178
|
}),
|
|
179
179
|
warn: E({}, M, {
|
|
180
|
-
value:
|
|
180
|
+
value: b
|
|
181
181
|
}),
|
|
182
182
|
error: E({}, M, {
|
|
183
183
|
value: C
|
|
@@ -193,7 +193,7 @@ function Sm() {
|
|
|
193
193
|
})
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
|
-
x < 0 &&
|
|
196
|
+
x < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
var Z = T.ReactCurrentDispatcher, V;
|
|
@@ -345,7 +345,7 @@ function Sm() {
|
|
|
345
345
|
} catch (Te) {
|
|
346
346
|
ue = Te;
|
|
347
347
|
}
|
|
348
|
-
ue && !(ue instanceof Error) && (Cr(ge),
|
|
348
|
+
ue && !(ue instanceof Error) && (Cr(ge), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", ne || "React class", Y, de, typeof ue), Cr(null)), ue instanceof Error && !(ue.message in Xn) && (Xn[ue.message] = !0, Cr(ge), y("Failed %s type: %s", Y, ue.message), Cr(null));
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
}
|
|
@@ -371,7 +371,7 @@ function Sm() {
|
|
|
371
371
|
}
|
|
372
372
|
function yu(M) {
|
|
373
373
|
if (Y0(M))
|
|
374
|
-
return
|
|
374
|
+
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", K0(M)), bu(M);
|
|
375
375
|
}
|
|
376
376
|
var vu = T.ReactCurrentOwner, X0 = {
|
|
377
377
|
key: !0,
|
|
@@ -401,7 +401,7 @@ function Sm() {
|
|
|
401
401
|
function tm(M, G) {
|
|
402
402
|
{
|
|
403
403
|
var Y = function() {
|
|
404
|
-
wu || (wu = !0,
|
|
404
|
+
wu || (wu = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", G));
|
|
405
405
|
};
|
|
406
406
|
Y.isReactWarning = !0, Object.defineProperty(M, "key", {
|
|
407
407
|
get: Y,
|
|
@@ -412,7 +412,7 @@ function Sm() {
|
|
|
412
412
|
function nm(M, G) {
|
|
413
413
|
{
|
|
414
414
|
var Y = function() {
|
|
415
|
-
xu || (xu = !0,
|
|
415
|
+
xu || (xu = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", G));
|
|
416
416
|
};
|
|
417
417
|
Y.isReactWarning = !0, Object.defineProperty(M, "ref", {
|
|
418
418
|
get: Y,
|
|
@@ -518,7 +518,7 @@ Check the top-level render call using <` + Y + ">.");
|
|
|
518
518
|
return;
|
|
519
519
|
Pu[Y] = !0;
|
|
520
520
|
var ne = "";
|
|
521
|
-
M && M._owner && M._owner !== ni.current && (ne = " It was passed a child from " + S(M._owner.type) + "."), Jn(M),
|
|
521
|
+
M && M._owner && M._owner !== ni.current && (ne = " It was passed a child from " + S(M._owner.type) + "."), Jn(M), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', Y, ne), Jn(null);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
function Au(M, G) {
|
|
@@ -560,9 +560,9 @@ Check the top-level render call using <` + Y + ">.");
|
|
|
560
560
|
} else if (G.PropTypes !== void 0 && !ri) {
|
|
561
561
|
ri = !0;
|
|
562
562
|
var ge = S(G);
|
|
563
|
-
|
|
563
|
+
y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", ge || "Unknown");
|
|
564
564
|
}
|
|
565
|
-
typeof G.getDefaultProps == "function" && !G.getDefaultProps.isReactClassApproved &&
|
|
565
|
+
typeof G.getDefaultProps == "function" && !G.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
568
|
function cm(M) {
|
|
@@ -570,11 +570,11 @@ Check the top-level render call using <` + Y + ">.");
|
|
|
570
570
|
for (var G = Object.keys(M.props), Y = 0; Y < G.length; Y++) {
|
|
571
571
|
var ne = G[Y];
|
|
572
572
|
if (ne !== "children" && ne !== "key") {
|
|
573
|
-
Jn(M),
|
|
573
|
+
Jn(M), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", ne), Jn(null);
|
|
574
574
|
break;
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
|
-
M.ref !== null && (Jn(M),
|
|
577
|
+
M.ref !== null && (Jn(M), y("Invalid attribute `ref` supplied to `React.Fragment`."), Jn(null));
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
580
|
var Tu = {};
|
|
@@ -587,7 +587,7 @@ Check the top-level render call using <` + Y + ">.");
|
|
|
587
587
|
var ke = sm();
|
|
588
588
|
ke ? ue += ke : ue += Su();
|
|
589
589
|
var Te;
|
|
590
|
-
M === null ? Te = "null" : ti(M) ? Te = "array" : M !== void 0 && M.$$typeof === t ? (Te = "<" + (S(M.type) || "Unknown") + " />", ue = " Did you accidentally export a JSX literal instead of a component?") : Te = typeof M,
|
|
590
|
+
M === null ? Te = "null" : ti(M) ? Te = "array" : M !== void 0 && M.$$typeof === t ? (Te = "<" + (S(M.type) || "Unknown") + " />", ue = " Did you accidentally export a JSX literal instead of a component?") : Te = typeof M, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Te, ue);
|
|
591
591
|
}
|
|
592
592
|
var Re = om(M, G, Y, ge, ye);
|
|
593
593
|
if (Re == null)
|
|
@@ -601,7 +601,7 @@ Check the top-level render call using <` + Y + ">.");
|
|
|
601
601
|
Au(ot[er], M);
|
|
602
602
|
Object.freeze && Object.freeze(ot);
|
|
603
603
|
} else
|
|
604
|
-
|
|
604
|
+
y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
605
605
|
else
|
|
606
606
|
Au(ot, M);
|
|
607
607
|
}
|
|
@@ -611,7 +611,7 @@ Check the top-level render call using <` + Y + ">.");
|
|
|
611
611
|
}), si = He.length > 0 ? "{key: someKey, " + He.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
612
612
|
if (!Tu[Rn + si]) {
|
|
613
613
|
var pm = He.length > 0 ? "{" + He.join(": ..., ") + ": ...}" : "{}";
|
|
614
|
-
|
|
614
|
+
y(`A props object containing a "key" prop is being spread into JSX:
|
|
615
615
|
let props = %s;
|
|
616
616
|
<%s {...props} />
|
|
617
617
|
React keys must be passed directly to JSX without using spread:
|
|
@@ -918,7 +918,7 @@ const Pm = {
|
|
|
918
918
|
};
|
|
919
919
|
var Cm = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, ii = Math.ceil, ct = Math.floor, Ve = "[BigNumber Error] ", Cu = Ve + "Number primitive has more than 15 significant digits: ", yt = 1e14, re = 14, ai = 9007199254740991, ci = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], hn = 1e7, Ie = 1e9;
|
|
920
920
|
function If(e) {
|
|
921
|
-
var t, n, r, o =
|
|
921
|
+
var t, n, r, o = y.prototype = { constructor: y, toString: null, valueOf: null }, s = new y(1), i = 20, c = 4, a = -7, u = 21, l = -1e7, d = 1e7, p = !1, f = 1, h = 0, m = {
|
|
922
922
|
prefix: "",
|
|
923
923
|
groupSize: 3,
|
|
924
924
|
secondaryGroupSize: 0,
|
|
@@ -929,35 +929,35 @@ function If(e) {
|
|
|
929
929
|
// non-breaking space
|
|
930
930
|
suffix: ""
|
|
931
931
|
}, v = "0123456789abcdefghijklmnopqrstuvwxyz", T = !0;
|
|
932
|
-
function
|
|
933
|
-
var $, N, O, S, E, x, A, R,
|
|
934
|
-
if (!(
|
|
932
|
+
function y(g, w) {
|
|
933
|
+
var $, N, O, S, E, x, A, R, b = this;
|
|
934
|
+
if (!(b instanceof y)) return new y(g, w);
|
|
935
935
|
if (w == null) {
|
|
936
936
|
if (g && g._isBigNumber === !0) {
|
|
937
|
-
|
|
937
|
+
b.s = g.s, !g.c || g.e > d ? b.c = b.e = null : g.e < l ? b.c = [b.e = 0] : (b.e = g.e, b.c = g.c.slice());
|
|
938
938
|
return;
|
|
939
939
|
}
|
|
940
940
|
if ((x = typeof g == "number") && g * 0 == 0) {
|
|
941
|
-
if (
|
|
941
|
+
if (b.s = 1 / g < 0 ? (g = -g, -1) : 1, g === ~~g) {
|
|
942
942
|
for (S = 0, E = g; E >= 10; E /= 10, S++) ;
|
|
943
|
-
S > d ?
|
|
943
|
+
S > d ? b.c = b.e = null : (b.e = S, b.c = [g]);
|
|
944
944
|
return;
|
|
945
945
|
}
|
|
946
946
|
R = String(g);
|
|
947
947
|
} else {
|
|
948
|
-
if (!Cm.test(R = String(g))) return r(
|
|
949
|
-
|
|
948
|
+
if (!Cm.test(R = String(g))) return r(b, R, x);
|
|
949
|
+
b.s = R.charCodeAt(0) == 45 ? (R = R.slice(1), -1) : 1;
|
|
950
950
|
}
|
|
951
951
|
(S = R.indexOf(".")) > -1 && (R = R.replace(".", "")), (E = R.search(/e/i)) > 0 ? (S < 0 && (S = E), S += +R.slice(E + 1), R = R.substring(0, E)) : S < 0 && (S = R.length);
|
|
952
952
|
} else {
|
|
953
953
|
if (xe(w, 2, v.length, "Base"), w == 10 && T)
|
|
954
|
-
return
|
|
954
|
+
return b = new y(g), F(b, i + b.e + 1, c);
|
|
955
955
|
if (R = String(g), x = typeof g == "number") {
|
|
956
|
-
if (g * 0 != 0) return r(
|
|
957
|
-
if (
|
|
956
|
+
if (g * 0 != 0) return r(b, R, x, w);
|
|
957
|
+
if (b.s = 1 / g < 0 ? (R = R.slice(1), -1) : 1, y.DEBUG && R.replace(/^0\.0*|\./, "").length > 15)
|
|
958
958
|
throw Error(Cu + g);
|
|
959
959
|
} else
|
|
960
|
-
|
|
960
|
+
b.s = R.charCodeAt(0) === 45 ? (R = R.slice(1), -1) : 1;
|
|
961
961
|
for ($ = v.slice(0, w), S = E = 0, A = R.length; E < A; E++)
|
|
962
962
|
if ($.indexOf(N = R.charAt(E)) < 0) {
|
|
963
963
|
if (N == ".") {
|
|
@@ -969,33 +969,33 @@ function If(e) {
|
|
|
969
969
|
O = !0, E = -1, S = 0;
|
|
970
970
|
continue;
|
|
971
971
|
}
|
|
972
|
-
return r(
|
|
972
|
+
return r(b, String(g), x, w);
|
|
973
973
|
}
|
|
974
|
-
x = !1, R = n(R, w, 10,
|
|
974
|
+
x = !1, R = n(R, w, 10, b.s), (S = R.indexOf(".")) > -1 ? R = R.replace(".", "") : S = R.length;
|
|
975
975
|
}
|
|
976
976
|
for (E = 0; R.charCodeAt(E) === 48; E++) ;
|
|
977
977
|
for (A = R.length; R.charCodeAt(--A) === 48; ) ;
|
|
978
978
|
if (R = R.slice(E, ++A)) {
|
|
979
|
-
if (A -= E, x &&
|
|
980
|
-
throw Error(Cu +
|
|
979
|
+
if (A -= E, x && y.DEBUG && A > 15 && (g > ai || g !== ct(g)))
|
|
980
|
+
throw Error(Cu + b.s * g);
|
|
981
981
|
if ((S = S - E - 1) > d)
|
|
982
|
-
|
|
982
|
+
b.c = b.e = null;
|
|
983
983
|
else if (S < l)
|
|
984
|
-
|
|
984
|
+
b.c = [b.e = 0];
|
|
985
985
|
else {
|
|
986
|
-
if (
|
|
987
|
-
for (E &&
|
|
988
|
-
|
|
986
|
+
if (b.e = S, b.c = [], E = (S + 1) % re, S < 0 && (E += re), E < A) {
|
|
987
|
+
for (E && b.c.push(+R.slice(0, E)), A -= re; E < A; )
|
|
988
|
+
b.c.push(+R.slice(E, E += re));
|
|
989
989
|
E = re - (R = R.slice(E)).length;
|
|
990
990
|
} else
|
|
991
991
|
E -= A;
|
|
992
992
|
for (; E--; R += "0") ;
|
|
993
|
-
|
|
993
|
+
b.c.push(+R);
|
|
994
994
|
}
|
|
995
995
|
} else
|
|
996
|
-
|
|
996
|
+
b.c = [b.e = 0];
|
|
997
997
|
}
|
|
998
|
-
|
|
998
|
+
y.clone = If, y.ROUND_UP = 0, y.ROUND_DOWN = 1, y.ROUND_CEIL = 2, y.ROUND_FLOOR = 3, y.ROUND_HALF_UP = 4, y.ROUND_HALF_DOWN = 5, y.ROUND_HALF_EVEN = 6, y.ROUND_HALF_CEIL = 7, y.ROUND_HALF_FLOOR = 8, y.EUCLID = 9, y.config = y.set = function(g) {
|
|
999
999
|
var w, $;
|
|
1000
1000
|
if (g != null)
|
|
1001
1001
|
if (typeof g == "object") {
|
|
@@ -1038,9 +1038,9 @@ function If(e) {
|
|
|
1038
1038
|
FORMAT: m,
|
|
1039
1039
|
ALPHABET: v
|
|
1040
1040
|
};
|
|
1041
|
-
},
|
|
1041
|
+
}, y.isBigNumber = function(g) {
|
|
1042
1042
|
if (!g || g._isBigNumber !== !0) return !1;
|
|
1043
|
-
if (!
|
|
1043
|
+
if (!y.DEBUG) return !0;
|
|
1044
1044
|
var w, $, N = g.c, O = g.e, S = g.s;
|
|
1045
1045
|
e: if ({}.toString.call(N) == "[object Array]") {
|
|
1046
1046
|
if ((S === 1 || S === -1) && O >= -Ie && O <= Ie && O === ct(O)) {
|
|
@@ -1057,18 +1057,18 @@ function If(e) {
|
|
|
1057
1057
|
} else if (N === null && O === null && (S === null || S === 1 || S === -1))
|
|
1058
1058
|
return !0;
|
|
1059
1059
|
throw Error(Ve + "Invalid BigNumber: " + g);
|
|
1060
|
-
},
|
|
1060
|
+
}, y.maximum = y.max = function() {
|
|
1061
1061
|
return B(arguments, -1);
|
|
1062
|
-
},
|
|
1062
|
+
}, y.minimum = y.min = function() {
|
|
1063
1063
|
return B(arguments, 1);
|
|
1064
|
-
},
|
|
1064
|
+
}, y.random = function() {
|
|
1065
1065
|
var g = 9007199254740992, w = Math.random() * g & 2097151 ? function() {
|
|
1066
1066
|
return ct(Math.random() * g);
|
|
1067
1067
|
} : function() {
|
|
1068
1068
|
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
|
|
1069
1069
|
};
|
|
1070
1070
|
return function($) {
|
|
1071
|
-
var N, O, S, E, x, A = 0, R = [],
|
|
1071
|
+
var N, O, S, E, x, A = 0, R = [], b = new y(s);
|
|
1072
1072
|
if ($ == null ? $ = i : xe($, 0, Ie), E = ii($ / re), p)
|
|
1073
1073
|
if (crypto.getRandomValues) {
|
|
1074
1074
|
for (N = crypto.getRandomValues(new Uint32Array(E *= 2)); A < E; )
|
|
@@ -1091,15 +1091,15 @@ function If(e) {
|
|
|
1091
1091
|
for (A = 1, x = R[0]; x >= 10; x /= 10, A++) ;
|
|
1092
1092
|
A < re && (S -= re - A);
|
|
1093
1093
|
}
|
|
1094
|
-
return
|
|
1094
|
+
return b.e = S, b.c = R, b;
|
|
1095
1095
|
};
|
|
1096
|
-
}(),
|
|
1097
|
-
for (var g = 1, w = arguments, $ = new
|
|
1096
|
+
}(), y.sum = function() {
|
|
1097
|
+
for (var g = 1, w = arguments, $ = new y(w[0]); g < w.length; ) $ = $.plus(w[g++]);
|
|
1098
1098
|
return $;
|
|
1099
1099
|
}, n = /* @__PURE__ */ function() {
|
|
1100
1100
|
var g = "0123456789";
|
|
1101
1101
|
function w($, N, O, S) {
|
|
1102
|
-
for (var E, x = [0], A, R = 0,
|
|
1102
|
+
for (var E, x = [0], A, R = 0, b = $.length; R < b; ) {
|
|
1103
1103
|
for (A = x.length; A--; x[A] *= N) ;
|
|
1104
1104
|
for (x[0] += S.indexOf($.charAt(R++)), E = 0; E < x.length; E++)
|
|
1105
1105
|
x[E] > O - 1 && (x[E + 1] == null && (x[E + 1] = 0), x[E + 1] += x[E] / O | 0, x[E] %= O);
|
|
@@ -1107,32 +1107,32 @@ function If(e) {
|
|
|
1107
1107
|
return x.reverse();
|
|
1108
1108
|
}
|
|
1109
1109
|
return function($, N, O, S, E) {
|
|
1110
|
-
var x, A, R,
|
|
1111
|
-
for (W >= 0 && (
|
|
1110
|
+
var x, A, R, b, C, D, _, U, W = $.indexOf("."), q = i, z = c;
|
|
1111
|
+
for (W >= 0 && (b = h, h = 0, $ = $.replace(".", ""), U = new y(N), D = U.pow($.length - W), h = b, U.c = w(
|
|
1112
1112
|
Gt(st(D.c), D.e, "0"),
|
|
1113
1113
|
10,
|
|
1114
1114
|
O,
|
|
1115
1115
|
g
|
|
1116
|
-
), U.e = U.c.length), _ = w($, N, O, E ? (x = v, g) : (x = g, v)), R =
|
|
1116
|
+
), U.e = U.c.length), _ = w($, N, O, E ? (x = v, g) : (x = g, v)), R = b = _.length; _[--b] == 0; _.pop()) ;
|
|
1117
1117
|
if (!_[0]) return x.charAt(0);
|
|
1118
|
-
if (W < 0 ? --R : (D.c = _, D.e = R, D.s = S, D = t(D, U, q, z, O), _ = D.c, C = D.r, R = D.e), A = R + q + 1, W = _[A],
|
|
1118
|
+
if (W < 0 ? --R : (D.c = _, D.e = R, D.s = S, D = t(D, U, q, z, O), _ = D.c, C = D.r, R = D.e), A = R + q + 1, W = _[A], b = O / 2, C = C || A < 0 || _[A + 1] != null, C = z < 4 ? (W != null || C) && (z == 0 || z == (D.s < 0 ? 3 : 2)) : W > b || W == b && (z == 4 || C || z == 6 && _[A - 1] & 1 || z == (D.s < 0 ? 8 : 7)), A < 1 || !_[0])
|
|
1119
1119
|
$ = C ? Gt(x.charAt(1), -q, x.charAt(0)) : x.charAt(0);
|
|
1120
1120
|
else {
|
|
1121
1121
|
if (_.length = A, C)
|
|
1122
1122
|
for (--O; ++_[--A] > O; )
|
|
1123
1123
|
_[A] = 0, A || (++R, _ = [1].concat(_));
|
|
1124
|
-
for (
|
|
1125
|
-
for (W = 0, $ = ""; W <=
|
|
1124
|
+
for (b = _.length; !_[--b]; ) ;
|
|
1125
|
+
for (W = 0, $ = ""; W <= b; $ += x.charAt(_[W++])) ;
|
|
1126
1126
|
$ = Gt($, R, x.charAt(0));
|
|
1127
1127
|
}
|
|
1128
1128
|
return $;
|
|
1129
1129
|
};
|
|
1130
1130
|
}(), t = /* @__PURE__ */ function() {
|
|
1131
1131
|
function g(N, O, S) {
|
|
1132
|
-
var E, x, A, R,
|
|
1132
|
+
var E, x, A, R, b = 0, C = N.length, D = O % hn, _ = O / hn | 0;
|
|
1133
1133
|
for (N = N.slice(); C--; )
|
|
1134
|
-
A = N[C] % hn, R = N[C] / hn | 0, E = _ * A + R * D, x = D * A + E % hn * hn +
|
|
1135
|
-
return
|
|
1134
|
+
A = N[C] % hn, R = N[C] / hn | 0, E = _ * A + R * D, x = D * A + E % hn * hn + b, b = (x / S | 0) + (E / hn | 0) + _ * R, N[C] = x % S;
|
|
1135
|
+
return b && (N = [b].concat(N)), N;
|
|
1136
1136
|
}
|
|
1137
1137
|
function w(N, O, S, E) {
|
|
1138
1138
|
var x, A;
|
|
@@ -1152,20 +1152,20 @@ function If(e) {
|
|
|
1152
1152
|
for (; !N[0] && N.length > 1; N.splice(0, 1)) ;
|
|
1153
1153
|
}
|
|
1154
1154
|
return function(N, O, S, E, x) {
|
|
1155
|
-
var A, R,
|
|
1155
|
+
var A, R, b, C, D, _, U, W, q, z, Z, V, X, ee, pe, Pe, ie, he = N.s == O.s ? 1 : -1, be = N.c, fe = O.c;
|
|
1156
1156
|
if (!be || !be[0] || !fe || !fe[0])
|
|
1157
|
-
return new
|
|
1157
|
+
return new y(
|
|
1158
1158
|
// Return NaN if either NaN, or both Infinity or 0.
|
|
1159
1159
|
!N.s || !O.s || (be ? fe && be[0] == fe[0] : !fe) ? NaN : (
|
|
1160
1160
|
// Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
|
|
1161
1161
|
be && be[0] == 0 || !fe ? he * 0 : he / 0
|
|
1162
1162
|
)
|
|
1163
1163
|
);
|
|
1164
|
-
for (W = new
|
|
1165
|
-
if (fe[
|
|
1164
|
+
for (W = new y(he), q = W.c = [], R = N.e - O.e, he = S + R + 1, x || (x = yt, R = ut(N.e / re) - ut(O.e / re), he = he / re | 0), b = 0; fe[b] == (be[b] || 0); b++) ;
|
|
1165
|
+
if (fe[b] > (be[b] || 0) && R--, he < 0)
|
|
1166
1166
|
q.push(1), C = !0;
|
|
1167
1167
|
else {
|
|
1168
|
-
for (ee = be.length, Pe = fe.length,
|
|
1168
|
+
for (ee = be.length, Pe = fe.length, b = 0, he += 2, D = ct(x / (fe[0] + 1)), D > 1 && (fe = g(fe, D, x), be = g(be, D, x), Pe = fe.length, ee = be.length), X = Pe, z = be.slice(0, Pe), Z = z.length; Z < Pe; z[Z++] = 0) ;
|
|
1169
1169
|
ie = fe.slice(), ie = [0].concat(ie), pe = fe[0], fe[1] >= x / 2 && pe++;
|
|
1170
1170
|
do {
|
|
1171
1171
|
if (D = 0, A = w(fe, z, Pe, Z), A < 0) {
|
|
@@ -1178,13 +1178,13 @@ function If(e) {
|
|
|
1178
1178
|
for (; w(fe, z, Pe, Z) < 1; )
|
|
1179
1179
|
D++, $(z, Pe < Z ? ie : fe, Z, x), Z = z.length;
|
|
1180
1180
|
} else A === 0 && (D++, z = [0]);
|
|
1181
|
-
q[
|
|
1181
|
+
q[b++] = D, z[0] ? z[Z++] = be[X] || 0 : (z = [be[X]], Z = 1);
|
|
1182
1182
|
} while ((X++ < ee || z[0] != null) && he--);
|
|
1183
1183
|
C = z[0] != null, q[0] || q.splice(0, 1);
|
|
1184
1184
|
}
|
|
1185
1185
|
if (x == yt) {
|
|
1186
|
-
for (
|
|
1187
|
-
F(W, S + (W.e =
|
|
1186
|
+
for (b = 1, he = q[0]; he >= 10; he /= 10, b++) ;
|
|
1187
|
+
F(W, S + (W.e = b + R * re - 1) + 1, E, C);
|
|
1188
1188
|
} else
|
|
1189
1189
|
W.e = R, W.r = +C;
|
|
1190
1190
|
return W;
|
|
@@ -1195,7 +1195,7 @@ function If(e) {
|
|
|
1195
1195
|
if ($ == null ? $ = c : xe($, 0, 8), !g.c) return g.toString();
|
|
1196
1196
|
if (O = g.c[0], E = g.e, w == null)
|
|
1197
1197
|
A = st(g.c), A = N == 1 || N == 2 && (E <= a || E >= u) ? Fo(A, E) : Gt(A, E, "0");
|
|
1198
|
-
else if (g = F(new
|
|
1198
|
+
else if (g = F(new y(g), w, $), S = g.e, A = st(g.c), x = A.length, N == 1 || N == 2 && (w <= S || S <= a)) {
|
|
1199
1199
|
for (; x < w; A += "0", x++) ;
|
|
1200
1200
|
A = Fo(A, S);
|
|
1201
1201
|
} else if (w -= E + (N === 2 && S > E), A = Gt(A, S, "0"), S + 1 > x) {
|
|
@@ -1205,8 +1205,8 @@ function If(e) {
|
|
|
1205
1205
|
return g.s < 0 && O ? "-" + A : A;
|
|
1206
1206
|
}
|
|
1207
1207
|
function B(g, w) {
|
|
1208
|
-
for (var $, N, O = 1, S = new
|
|
1209
|
-
N = new
|
|
1208
|
+
for (var $, N, O = 1, S = new y(g[0]); O < g.length; O++)
|
|
1209
|
+
N = new y(g[O]), (!N.s || ($ = On(S, N)) === w || $ === 0 && S.s === w) && (S = N);
|
|
1210
1210
|
return S;
|
|
1211
1211
|
}
|
|
1212
1212
|
function L(g, w, $) {
|
|
@@ -1217,15 +1217,15 @@ function If(e) {
|
|
|
1217
1217
|
r = /* @__PURE__ */ function() {
|
|
1218
1218
|
var g = /^(-?)0([xbo])(?=\w[\w.]*$)/i, w = /^([^.]+)\.$/, $ = /^\.([^.]+)$/, N = /^-?(Infinity|NaN)$/, O = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
|
|
1219
1219
|
return function(S, E, x, A) {
|
|
1220
|
-
var R,
|
|
1221
|
-
if (N.test(
|
|
1222
|
-
S.s = isNaN(
|
|
1220
|
+
var R, b = x ? E : E.replace(O, "");
|
|
1221
|
+
if (N.test(b))
|
|
1222
|
+
S.s = isNaN(b) ? null : b < 0 ? -1 : 1;
|
|
1223
1223
|
else {
|
|
1224
|
-
if (!x && (
|
|
1224
|
+
if (!x && (b = b.replace(g, function(C, D, _) {
|
|
1225
1225
|
return R = (_ = _.toLowerCase()) == "x" ? 16 : _ == "b" ? 2 : 8, !A || A == R ? D : C;
|
|
1226
|
-
}), A && (R = A,
|
|
1227
|
-
return new b
|
|
1228
|
-
if (
|
|
1226
|
+
}), A && (R = A, b = b.replace(w, "$1").replace($, "0.$1")), E != b))
|
|
1227
|
+
return new y(b, R);
|
|
1228
|
+
if (y.DEBUG)
|
|
1229
1229
|
throw Error(Ve + "Not a" + (A ? " base " + A : "") + " number: " + E);
|
|
1230
1230
|
S.s = null;
|
|
1231
1231
|
}
|
|
@@ -1233,26 +1233,26 @@ function If(e) {
|
|
|
1233
1233
|
};
|
|
1234
1234
|
}();
|
|
1235
1235
|
function F(g, w, $, N) {
|
|
1236
|
-
var O, S, E, x, A, R,
|
|
1236
|
+
var O, S, E, x, A, R, b, C = g.c, D = ci;
|
|
1237
1237
|
if (C) {
|
|
1238
1238
|
e: {
|
|
1239
1239
|
for (O = 1, x = C[0]; x >= 10; x /= 10, O++) ;
|
|
1240
1240
|
if (S = w - O, S < 0)
|
|
1241
|
-
S += re, E = w, A = C[R = 0],
|
|
1241
|
+
S += re, E = w, A = C[R = 0], b = ct(A / D[O - E - 1] % 10);
|
|
1242
1242
|
else if (R = ii((S + 1) / re), R >= C.length)
|
|
1243
1243
|
if (N) {
|
|
1244
1244
|
for (; C.length <= R; C.push(0)) ;
|
|
1245
|
-
A =
|
|
1245
|
+
A = b = 0, O = 1, S %= re, E = S - re + 1;
|
|
1246
1246
|
} else
|
|
1247
1247
|
break e;
|
|
1248
1248
|
else {
|
|
1249
1249
|
for (A = x = C[R], O = 1; x >= 10; x /= 10, O++) ;
|
|
1250
|
-
S %= re, E = S - re + O,
|
|
1250
|
+
S %= re, E = S - re + O, b = E < 0 ? 0 : ct(A / D[O - E - 1] % 10);
|
|
1251
1251
|
}
|
|
1252
1252
|
if (N = N || w < 0 || // Are there any non-zero digits after the rounding digit?
|
|
1253
1253
|
// The expression n % pows10[d - j - 1] returns all digits of n to the right
|
|
1254
1254
|
// of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
|
|
1255
|
-
C[R + 1] != null || (E < 0 ? A : A % D[O - E - 1]), N = $ < 4 ? (
|
|
1255
|
+
C[R + 1] != null || (E < 0 ? A : A % D[O - E - 1]), N = $ < 4 ? (b || N) && ($ == 0 || $ == (g.s < 0 ? 3 : 2)) : b > 5 || b == 5 && ($ == 4 || N || $ == 6 && // Check whether the digit to the left of the rounding digit is odd.
|
|
1256
1256
|
(S > 0 ? E > 0 ? A / D[O - E] : 0 : C[R - 1]) % 10 & 1 || $ == (g.s < 0 ? 8 : 7)), w < 1 || !C[0])
|
|
1257
1257
|
return C.length = 0, N ? (w -= g.e + 1, C[0] = D[(re - w % re) % re], g.e = -w || 0) : C[0] = g.e = 0, g;
|
|
1258
1258
|
if (S == 0 ? (C.length = R, x = 1, R--) : (C.length = R + 1, x = D[re - S], C[R] = E > 0 ? ct(A / D[O - E] % D[E]) * x : 0), N)
|
|
@@ -1277,39 +1277,39 @@ function If(e) {
|
|
|
1277
1277
|
return $ === null ? g.toString() : (w = st(g.c), w = $ <= a || $ >= u ? Fo(w, $) : Gt(w, $, "0"), g.s < 0 ? "-" + w : w);
|
|
1278
1278
|
}
|
|
1279
1279
|
return o.absoluteValue = o.abs = function() {
|
|
1280
|
-
var g = new
|
|
1280
|
+
var g = new y(this);
|
|
1281
1281
|
return g.s < 0 && (g.s = 1), g;
|
|
1282
1282
|
}, o.comparedTo = function(g, w) {
|
|
1283
|
-
return On(this, new
|
|
1283
|
+
return On(this, new y(g, w));
|
|
1284
1284
|
}, o.decimalPlaces = o.dp = function(g, w) {
|
|
1285
1285
|
var $, N, O, S = this;
|
|
1286
1286
|
if (g != null)
|
|
1287
|
-
return xe(g, 0, Ie), w == null ? w = c : xe(w, 0, 8), F(new
|
|
1287
|
+
return xe(g, 0, Ie), w == null ? w = c : xe(w, 0, 8), F(new y(S), g + S.e + 1, w);
|
|
1288
1288
|
if (!($ = S.c)) return null;
|
|
1289
1289
|
if (N = ((O = $.length - 1) - ut(this.e / re)) * re, O = $[O]) for (; O % 10 == 0; O /= 10, N--) ;
|
|
1290
1290
|
return N < 0 && (N = 0), N;
|
|
1291
1291
|
}, o.dividedBy = o.div = function(g, w) {
|
|
1292
|
-
return t(this, new
|
|
1292
|
+
return t(this, new y(g, w), i, c);
|
|
1293
1293
|
}, o.dividedToIntegerBy = o.idiv = function(g, w) {
|
|
1294
|
-
return t(this, new
|
|
1294
|
+
return t(this, new y(g, w), 0, 1);
|
|
1295
1295
|
}, o.exponentiatedBy = o.pow = function(g, w) {
|
|
1296
|
-
var $, N, O, S, E, x, A, R,
|
|
1297
|
-
if (g = new
|
|
1296
|
+
var $, N, O, S, E, x, A, R, b, C = this;
|
|
1297
|
+
if (g = new y(g), g.c && !g.isInteger())
|
|
1298
1298
|
throw Error(Ve + "Exponent not an integer: " + k(g));
|
|
1299
|
-
if (w != null && (w = new
|
|
1300
|
-
return
|
|
1299
|
+
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])
|
|
1300
|
+
return b = new y(Math.pow(+k(C), x ? g.s * (2 - Do(g)) : +k(g))), w ? b.mod(w) : b;
|
|
1301
1301
|
if (A = g.s < 0, w) {
|
|
1302
|
-
if (w.c ? !w.c[0] : !w.s) return new
|
|
1302
|
+
if (w.c ? !w.c[0] : !w.s) return new y(NaN);
|
|
1303
1303
|
N = !A && C.isInteger() && w.isInteger(), N && (C = C.mod(w));
|
|
1304
1304
|
} else {
|
|
1305
1305
|
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)))
|
|
1306
|
-
return S = C.s < 0 && Do(g) ? -0 : 0, C.e > -1 && (S = 1 / S), new
|
|
1306
|
+
return S = C.s < 0 && Do(g) ? -0 : 0, C.e > -1 && (S = 1 / S), new y(A ? 1 / S : S);
|
|
1307
1307
|
h && (S = ii(h / re + 2));
|
|
1308
1308
|
}
|
|
1309
|
-
for (x ? ($ = new
|
|
1309
|
+
for (x ? ($ = new y(0.5), A && (g.s = 1), R = Do(g)) : (O = Math.abs(+k(g)), R = O % 2), b = new y(s); ; ) {
|
|
1310
1310
|
if (R) {
|
|
1311
|
-
if (
|
|
1312
|
-
S ?
|
|
1311
|
+
if (b = b.times(C), !b.c) break;
|
|
1312
|
+
S ? b.c.length > S && (b.c.length = S) : N && (b = b.mod(w));
|
|
1313
1313
|
}
|
|
1314
1314
|
if (O) {
|
|
1315
1315
|
if (O = ct(O / 2), O === 0) break;
|
|
@@ -1322,24 +1322,24 @@ function If(e) {
|
|
|
1322
1322
|
}
|
|
1323
1323
|
C = C.times(C), S ? C.c && C.c.length > S && (C.c.length = S) : N && (C = C.mod(w));
|
|
1324
1324
|
}
|
|
1325
|
-
return N ?
|
|
1325
|
+
return N ? b : (A && (b = s.div(b)), w ? b.mod(w) : S ? F(b, h, c, E) : b);
|
|
1326
1326
|
}, o.integerValue = function(g) {
|
|
1327
|
-
var w = new
|
|
1327
|
+
var w = new y(this);
|
|
1328
1328
|
return g == null ? g = c : xe(g, 0, 8), F(w, w.e + 1, g);
|
|
1329
1329
|
}, o.isEqualTo = o.eq = function(g, w) {
|
|
1330
|
-
return On(this, new
|
|
1330
|
+
return On(this, new y(g, w)) === 0;
|
|
1331
1331
|
}, o.isFinite = function() {
|
|
1332
1332
|
return !!this.c;
|
|
1333
1333
|
}, o.isGreaterThan = o.gt = function(g, w) {
|
|
1334
|
-
return On(this, new
|
|
1334
|
+
return On(this, new y(g, w)) > 0;
|
|
1335
1335
|
}, o.isGreaterThanOrEqualTo = o.gte = function(g, w) {
|
|
1336
|
-
return (w = On(this, new
|
|
1336
|
+
return (w = On(this, new y(g, w))) === 1 || w === 0;
|
|
1337
1337
|
}, o.isInteger = function() {
|
|
1338
1338
|
return !!this.c && ut(this.e / re) > this.c.length - 2;
|
|
1339
1339
|
}, o.isLessThan = o.lt = function(g, w) {
|
|
1340
|
-
return On(this, new
|
|
1340
|
+
return On(this, new y(g, w)) < 0;
|
|
1341
1341
|
}, o.isLessThanOrEqualTo = o.lte = function(g, w) {
|
|
1342
|
-
return (w = On(this, new
|
|
1342
|
+
return (w = On(this, new y(g, w))) === -1 || w === 0;
|
|
1343
1343
|
}, o.isNaN = function() {
|
|
1344
1344
|
return !this.s;
|
|
1345
1345
|
}, o.isNegative = function() {
|
|
@@ -1350,63 +1350,63 @@ function If(e) {
|
|
|
1350
1350
|
return !!this.c && this.c[0] == 0;
|
|
1351
1351
|
}, o.minus = function(g, w) {
|
|
1352
1352
|
var $, N, O, S, E = this, x = E.s;
|
|
1353
|
-
if (g = new
|
|
1353
|
+
if (g = new y(g, w), w = g.s, !x || !w) return new y(NaN);
|
|
1354
1354
|
if (x != w)
|
|
1355
1355
|
return g.s = -w, E.plus(g);
|
|
1356
|
-
var A = E.e / re, R = g.e / re,
|
|
1356
|
+
var A = E.e / re, R = g.e / re, b = E.c, C = g.c;
|
|
1357
1357
|
if (!A || !R) {
|
|
1358
|
-
if (!
|
|
1359
|
-
if (!
|
|
1360
|
-
return C[0] ? (g.s = -w, g) : new b
|
|
1358
|
+
if (!b || !C) return b ? (g.s = -w, g) : new y(C ? E : NaN);
|
|
1359
|
+
if (!b[0] || !C[0])
|
|
1360
|
+
return C[0] ? (g.s = -w, g) : new y(b[0] ? E : (
|
|
1361
1361
|
// IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
|
|
1362
1362
|
c == 3 ? -0 : 0
|
|
1363
1363
|
));
|
|
1364
1364
|
}
|
|
1365
|
-
if (A = ut(A), R = ut(R),
|
|
1366
|
-
for ((S = x < 0) ? (x = -x, O =
|
|
1365
|
+
if (A = ut(A), R = ut(R), b = b.slice(), x = A - R) {
|
|
1366
|
+
for ((S = x < 0) ? (x = -x, O = b) : (R = A, O = C), O.reverse(), w = x; w--; O.push(0)) ;
|
|
1367
1367
|
O.reverse();
|
|
1368
1368
|
} else
|
|
1369
|
-
for (N = (S = (x =
|
|
1370
|
-
if (
|
|
1371
|
-
S =
|
|
1369
|
+
for (N = (S = (x = b.length) < (w = C.length)) ? x : w, x = w = 0; w < N; w++)
|
|
1370
|
+
if (b[w] != C[w]) {
|
|
1371
|
+
S = b[w] < C[w];
|
|
1372
1372
|
break;
|
|
1373
1373
|
}
|
|
1374
|
-
if (S && (O =
|
|
1374
|
+
if (S && (O = b, b = C, C = O, g.s = -g.s), w = (N = C.length) - ($ = b.length), w > 0) for (; w--; b[$++] = 0) ;
|
|
1375
1375
|
for (w = yt - 1; N > x; ) {
|
|
1376
|
-
if (
|
|
1377
|
-
for ($ = N; $ && !
|
|
1378
|
-
--
|
|
1376
|
+
if (b[--N] < C[N]) {
|
|
1377
|
+
for ($ = N; $ && !b[--$]; b[$] = w) ;
|
|
1378
|
+
--b[$], b[N] += yt;
|
|
1379
1379
|
}
|
|
1380
|
-
|
|
1380
|
+
b[N] -= C[N];
|
|
1381
1381
|
}
|
|
1382
|
-
for (;
|
|
1383
|
-
return
|
|
1382
|
+
for (; b[0] == 0; b.splice(0, 1), --R) ;
|
|
1383
|
+
return b[0] ? L(g, b, R) : (g.s = c == 3 ? -1 : 1, g.c = [g.e = 0], g);
|
|
1384
1384
|
}, o.modulo = o.mod = function(g, w) {
|
|
1385
1385
|
var $, N, O = this;
|
|
1386
|
-
return g = new
|
|
1386
|
+
return g = new y(g, w), !O.c || !g.s || g.c && !g.c[0] ? new y(NaN) : !g.c || O.c && !O.c[0] ? new y(O) : (f == 9 ? (N = g.s, g.s = 1, $ = t(O, g, 0, 3), g.s = N, $.s *= N) : $ = t(O, g, 0, f), g = O.minus($.times(g)), !g.c[0] && f == 1 && (g.s = O.s), g);
|
|
1387
1387
|
}, o.multipliedBy = o.times = function(g, w) {
|
|
1388
|
-
var $, N, O, S, E, x, A, R,
|
|
1388
|
+
var $, N, O, S, E, x, A, R, b, C, D, _, U, W, q, z = this, Z = z.c, V = (g = new y(g, w)).c;
|
|
1389
1389
|
if (!Z || !V || !Z[0] || !V[0])
|
|
1390
1390
|
return !z.s || !g.s || Z && !Z[0] && !V || V && !V[0] && !Z ? g.c = g.e = g.s = null : (g.s *= z.s, !Z || !V ? g.c = g.e = null : (g.c = [0], g.e = 0)), g;
|
|
1391
1391
|
for (N = ut(z.e / re) + ut(g.e / re), g.s *= z.s, A = Z.length, C = V.length, A < C && (U = Z, Z = V, V = U, O = A, A = C, C = O), O = A + C, U = []; O--; U.push(0)) ;
|
|
1392
1392
|
for (W = yt, q = hn, O = C; --O >= 0; ) {
|
|
1393
1393
|
for ($ = 0, D = V[O] % q, _ = V[O] / q | 0, E = A, S = O + E; S > O; )
|
|
1394
|
-
R = Z[--E] % q,
|
|
1394
|
+
R = Z[--E] % q, b = Z[E] / q | 0, x = _ * R + b * D, R = D * R + x % q * q + U[S] + $, $ = (R / W | 0) + (x / q | 0) + _ * b, U[S--] = R % W;
|
|
1395
1395
|
U[S] = $;
|
|
1396
1396
|
}
|
|
1397
1397
|
return $ ? ++N : U.splice(0, 1), L(g, U, N);
|
|
1398
1398
|
}, o.negated = function() {
|
|
1399
|
-
var g = new
|
|
1399
|
+
var g = new y(this);
|
|
1400
1400
|
return g.s = -g.s || null, g;
|
|
1401
1401
|
}, o.plus = function(g, w) {
|
|
1402
1402
|
var $, N = this, O = N.s;
|
|
1403
|
-
if (g = new
|
|
1403
|
+
if (g = new y(g, w), w = g.s, !O || !w) return new y(NaN);
|
|
1404
1404
|
if (O != w)
|
|
1405
1405
|
return g.s = -w, N.minus(g);
|
|
1406
1406
|
var S = N.e / re, E = g.e / re, x = N.c, A = g.c;
|
|
1407
1407
|
if (!S || !E) {
|
|
1408
|
-
if (!x || !A) return new
|
|
1409
|
-
if (!x[0] || !A[0]) return A[0] ? g : new
|
|
1408
|
+
if (!x || !A) return new y(O / 0);
|
|
1409
|
+
if (!x[0] || !A[0]) return A[0] ? g : new y(x[0] ? N : O * 0);
|
|
1410
1410
|
}
|
|
1411
1411
|
if (S = ut(S), E = ut(E), x = x.slice(), O = S - E) {
|
|
1412
1412
|
for (O > 0 ? (E = S, $ = A) : (O = -O, $ = x), $.reverse(); O--; $.push(0)) ;
|
|
@@ -1418,7 +1418,7 @@ function If(e) {
|
|
|
1418
1418
|
}, o.precision = o.sd = function(g, w) {
|
|
1419
1419
|
var $, N, O, S = this;
|
|
1420
1420
|
if (g != null && g !== !!g)
|
|
1421
|
-
return xe(g, 1, Ie), w == null ? w = c : xe(w, 0, 8), F(new
|
|
1421
|
+
return xe(g, 1, Ie), w == null ? w = c : xe(w, 0, 8), F(new y(S), g, w);
|
|
1422
1422
|
if (!($ = S.c)) return null;
|
|
1423
1423
|
if (O = $.length - 1, N = O * re + 1, O = $[O]) {
|
|
1424
1424
|
for (; O % 10 == 0; O /= 10, N--) ;
|
|
@@ -1428,12 +1428,12 @@ function If(e) {
|
|
|
1428
1428
|
}, o.shiftedBy = function(g) {
|
|
1429
1429
|
return xe(g, -ai, ai), this.times("1e" + g);
|
|
1430
1430
|
}, o.squareRoot = o.sqrt = function() {
|
|
1431
|
-
var g, w, $, N, O, S = this, E = S.c, x = S.s, A = S.e, R = i + 4,
|
|
1431
|
+
var g, w, $, N, O, S = this, E = S.c, x = S.s, A = S.e, R = i + 4, b = new y("0.5");
|
|
1432
1432
|
if (x !== 1 || !E || !E[0])
|
|
1433
|
-
return new
|
|
1434
|
-
if (x = Math.sqrt(+k(S)), x == 0 || x == 1 / 0 ? (w = st(E), (w.length + A) % 2 == 0 && (w += "0"), x = Math.sqrt(+w), A = ut((A + 1) / 2) - (A < 0 || A % 2), x == 1 / 0 ? w = "5e" + A : (w = x.toExponential(), w = w.slice(0, w.indexOf("e") + 1) + A), $ = new
|
|
1433
|
+
return new y(!x || x < 0 && (!E || E[0]) ? NaN : E ? S : 1 / 0);
|
|
1434
|
+
if (x = Math.sqrt(+k(S)), x == 0 || x == 1 / 0 ? (w = st(E), (w.length + A) % 2 == 0 && (w += "0"), x = Math.sqrt(+w), A = ut((A + 1) / 2) - (A < 0 || A % 2), x == 1 / 0 ? w = "5e" + A : (w = x.toExponential(), w = w.slice(0, w.indexOf("e") + 1) + A), $ = new y(w)) : $ = new y(x + ""), $.c[0]) {
|
|
1435
1435
|
for (A = $.e, x = A + R, x < 3 && (x = 0); ; )
|
|
1436
|
-
if (O = $, $ =
|
|
1436
|
+
if (O = $, $ = b.times(O.plus(t(S, O, R, 1))), st(O.c).slice(0, x) === (w = st($.c)).slice(0, x))
|
|
1437
1437
|
if ($.e < A && --x, w = w.slice(x - 3, x + 1), w == "9999" || !N && w == "4999") {
|
|
1438
1438
|
if (!N && (F(O, O.e + i + 2, 0), O.times(O).eq(S))) {
|
|
1439
1439
|
$ = O;
|
|
@@ -1457,24 +1457,24 @@ function If(e) {
|
|
|
1457
1457
|
else if (typeof $ != "object")
|
|
1458
1458
|
throw Error(Ve + "Argument not an object: " + $);
|
|
1459
1459
|
if (N = O.toFixed(g, w), O.c) {
|
|
1460
|
-
var S, E = N.split("."), x = +$.groupSize, A = +$.secondaryGroupSize, R = $.groupSeparator || "",
|
|
1460
|
+
var S, E = N.split("."), x = +$.groupSize, A = +$.secondaryGroupSize, R = $.groupSeparator || "", b = E[0], C = E[1], D = O.s < 0, _ = D ? b.slice(1) : b, U = _.length;
|
|
1461
1461
|
if (A && (S = x, x = A, A = S, U -= S), x > 0 && U > 0) {
|
|
1462
|
-
for (S = U % x || x,
|
|
1463
|
-
A > 0 && (
|
|
1462
|
+
for (S = U % x || x, b = _.substr(0, S); S < U; S += x) b += R + _.substr(S, x);
|
|
1463
|
+
A > 0 && (b += R + _.slice(S)), D && (b = "-" + b);
|
|
1464
1464
|
}
|
|
1465
|
-
N = C ?
|
|
1465
|
+
N = C ? b + ($.decimalSeparator || "") + ((A = +$.fractionGroupSize) ? C.replace(
|
|
1466
1466
|
new RegExp("\\d{" + A + "}\\B", "g"),
|
|
1467
1467
|
"$&" + ($.fractionGroupSeparator || "")
|
|
1468
|
-
) : C) :
|
|
1468
|
+
) : C) : b;
|
|
1469
1469
|
}
|
|
1470
1470
|
return ($.prefix || "") + N + ($.suffix || "");
|
|
1471
1471
|
}, o.toFraction = function(g) {
|
|
1472
|
-
var w, $, N, O, S, E, x, A, R,
|
|
1473
|
-
if (g != null && (x = new
|
|
1472
|
+
var w, $, N, O, S, E, x, A, R, b, C, D, _ = this, U = _.c;
|
|
1473
|
+
if (g != null && (x = new y(g), !x.isInteger() && (x.c || x.s !== 1) || x.lt(s)))
|
|
1474
1474
|
throw Error(Ve + "Argument " + (x.isInteger() ? "out of range: " : "not an integer: ") + k(x));
|
|
1475
|
-
if (!U) return new
|
|
1476
|
-
for (w = new
|
|
1477
|
-
$ = N, N = O, R = A.plus(
|
|
1475
|
+
if (!U) return new y(_);
|
|
1476
|
+
for (w = new y(s), R = $ = new y(s), N = A = new y(s), D = st(U), S = w.e = D.length - _.e - 1, w.c[0] = ci[(E = S % re) < 0 ? re + E : E], g = !g || x.comparedTo(w) > 0 ? S > 0 ? w : R : x, E = d, d = 1 / 0, x = new y(D), A.c[0] = 0; b = t(x, w, 0, 1), O = $.plus(b.times(N)), O.comparedTo(g) != 1; )
|
|
1477
|
+
$ = N, N = O, R = A.plus(b.times(O = R)), A = O, w = x.minus(b.times(O = w)), x = O;
|
|
1478
1478
|
return O = t(g.minus($), N, 0, 1), A = A.plus(O.times(R)), $ = $.plus(O.times(N)), A.s = R.s = _.s, S = S * 2, C = t(R, N, S, c).minus(_).abs().comparedTo(
|
|
1479
1479
|
t(A, $, S, c).minus(_).abs()
|
|
1480
1480
|
) < 1 ? [R, N] : [A, $], d = E, C;
|
|
@@ -1484,10 +1484,10 @@ function If(e) {
|
|
|
1484
1484
|
return g != null && xe(g, 1, Ie), P(this, g, w, 2);
|
|
1485
1485
|
}, o.toString = function(g) {
|
|
1486
1486
|
var w, $ = this, N = $.s, O = $.e;
|
|
1487
|
-
return O === null ? N ? (w = "Infinity", N < 0 && (w = "-" + w)) : w = "NaN" : (g == null ? w = O <= a || O >= u ? Fo(st($.c), O) : Gt(st($.c), O, "0") : g === 10 && T ? ($ = F(new
|
|
1487
|
+
return O === null ? N ? (w = "Infinity", N < 0 && (w = "-" + w)) : w = "NaN" : (g == null ? w = O <= a || O >= u ? Fo(st($.c), O) : Gt(st($.c), O, "0") : g === 10 && T ? ($ = F(new y($), i + O + 1, c), w = Gt(st($.c), $.e, "0")) : (xe(g, 2, v.length, "Base"), w = n(Gt(st($.c), O, "0"), 10, g, N, !0)), N < 0 && $.c[0] && (w = "-" + w)), w;
|
|
1488
1488
|
}, o.valueOf = o.toJSON = function() {
|
|
1489
1489
|
return k(this);
|
|
1490
|
-
}, o._isBigNumber = !0, o[Symbol.toStringTag] = "BigNumber", o[Symbol.for("nodejs.util.inspect.custom")] = o.valueOf, e != null &&
|
|
1490
|
+
}, o._isBigNumber = !0, o[Symbol.toStringTag] = "BigNumber", o[Symbol.for("nodejs.util.inspect.custom")] = o.valueOf, e != null && y.set(e), y;
|
|
1491
1491
|
}
|
|
1492
1492
|
function ut(e) {
|
|
1493
1493
|
var t = e | 0;
|
|
@@ -2251,8 +2251,8 @@ function lg(e) {
|
|
|
2251
2251
|
if (c.pointerType = v, o || v === "touch" || c.isHovered || !m.currentTarget.contains(m.target)) return;
|
|
2252
2252
|
c.isHovered = !0;
|
|
2253
2253
|
let T = m.currentTarget;
|
|
2254
|
-
c.target = T, a(An(m.target), "pointerover", (
|
|
2255
|
-
c.isHovered && c.target && !Ff(c.target,
|
|
2254
|
+
c.target = T, a(An(m.target), "pointerover", (y) => {
|
|
2255
|
+
c.isHovered && c.target && !Ff(c.target, y.target) && f(y, y.pointerType);
|
|
2256
2256
|
}, {
|
|
2257
2257
|
capture: !0
|
|
2258
2258
|
}), t && t({
|
|
@@ -2754,13 +2754,13 @@ function Gg(e, t) {
|
|
|
2754
2754
|
let p = le((v) => {
|
|
2755
2755
|
let T = v.currentTarget;
|
|
2756
2756
|
if (!(v.target !== v.currentTarget && Dg(v.target)) && (Mu(T) && v.preventDefault(), o.props && "onClick" in o.props && typeof o.props.onClick == "function" && o.props.onClick(v), Mu(T))) {
|
|
2757
|
-
let
|
|
2758
|
-
if (
|
|
2759
|
-
let P =
|
|
2757
|
+
let y = document.getElementById(T.htmlFor);
|
|
2758
|
+
if (y) {
|
|
2759
|
+
let P = y.getAttribute("disabled");
|
|
2760
2760
|
if (P === "true" || P === "") return;
|
|
2761
|
-
let B =
|
|
2761
|
+
let B = y.getAttribute("aria-disabled");
|
|
2762
2762
|
if (B === "true" || B === "") return;
|
|
2763
|
-
(td(
|
|
2763
|
+
(td(y) && (y.type === "file" || y.type === "radio" || y.type === "checkbox") || y.role === "radio" || y.role === "checkbox" || y.role === "switch") && y.click(), y.focus({ preventScroll: !0 });
|
|
2764
2764
|
}
|
|
2765
2765
|
}
|
|
2766
2766
|
}), f = i || !1, h = ae(() => ({ ...o.slot, disabled: f }), [o.slot, f]), m = { ref: d, ...o.props, id: c, htmlFor: a, onClick: p };
|
|
@@ -2923,18 +2923,18 @@ function ib() {
|
|
|
2923
2923
|
function() {
|
|
2924
2924
|
function v(L) {
|
|
2925
2925
|
if (!T) {
|
|
2926
|
-
if (T = !0,
|
|
2926
|
+
if (T = !0, y = L, L = d(L), p !== void 0 && h.hasValue) {
|
|
2927
2927
|
var F = h.value;
|
|
2928
2928
|
if (p(F, L))
|
|
2929
2929
|
return P = F;
|
|
2930
2930
|
}
|
|
2931
2931
|
return P = L;
|
|
2932
2932
|
}
|
|
2933
|
-
if (F = P, n(
|
|
2933
|
+
if (F = P, n(y, L)) return F;
|
|
2934
2934
|
var k = d(L);
|
|
2935
|
-
return p !== void 0 && p(F, k) ? (
|
|
2935
|
+
return p !== void 0 && p(F, k) ? (y = L, F) : (y = L, P = k);
|
|
2936
2936
|
}
|
|
2937
|
-
var T = !1,
|
|
2937
|
+
var T = !1, y, P, B = l === void 0 ? null : l;
|
|
2938
2938
|
return [
|
|
2939
2939
|
function() {
|
|
2940
2940
|
return v(u());
|
|
@@ -2983,19 +2983,19 @@ function ab() {
|
|
|
2983
2983
|
function() {
|
|
2984
2984
|
function v(L) {
|
|
2985
2985
|
if (!T) {
|
|
2986
|
-
if (T = !0,
|
|
2986
|
+
if (T = !0, y = L, L = d(L), p !== void 0 && h.hasValue) {
|
|
2987
2987
|
var F = h.value;
|
|
2988
2988
|
if (p(F, L))
|
|
2989
2989
|
return P = F;
|
|
2990
2990
|
}
|
|
2991
2991
|
return P = L;
|
|
2992
2992
|
}
|
|
2993
|
-
if (F = P, n(
|
|
2993
|
+
if (F = P, n(y, L))
|
|
2994
2994
|
return F;
|
|
2995
2995
|
var k = d(L);
|
|
2996
|
-
return p !== void 0 && p(F, k) ? (
|
|
2996
|
+
return p !== void 0 && p(F, k) ? (y = L, F) : (y = L, P = k);
|
|
2997
2997
|
}
|
|
2998
|
-
var T = !1,
|
|
2998
|
+
var T = !1, y, P, B = l === void 0 ? null : l;
|
|
2999
2999
|
return [
|
|
3000
3000
|
function() {
|
|
3001
3001
|
return v(u());
|
|
@@ -3916,7 +3916,7 @@ const Ay = async (e, t, n) => {
|
|
|
3916
3916
|
name: v,
|
|
3917
3917
|
fn: T
|
|
3918
3918
|
} = c[m], {
|
|
3919
|
-
x:
|
|
3919
|
+
x: y,
|
|
3920
3920
|
y: P,
|
|
3921
3921
|
data: B,
|
|
3922
3922
|
reset: L
|
|
@@ -3934,7 +3934,7 @@ const Ay = async (e, t, n) => {
|
|
|
3934
3934
|
floating: t
|
|
3935
3935
|
}
|
|
3936
3936
|
});
|
|
3937
|
-
l =
|
|
3937
|
+
l = y ?? l, d = P ?? d, f = {
|
|
3938
3938
|
...f,
|
|
3939
3939
|
[v]: {
|
|
3940
3940
|
...f[v],
|
|
@@ -3978,7 +3978,7 @@ async function Is(e, t) {
|
|
|
3978
3978
|
boundary: u,
|
|
3979
3979
|
rootBoundary: l,
|
|
3980
3980
|
strategy: a
|
|
3981
|
-
})),
|
|
3981
|
+
})), y = d === "floating" ? {
|
|
3982
3982
|
x: r,
|
|
3983
3983
|
y: o,
|
|
3984
3984
|
width: i.floating.width,
|
|
@@ -3991,10 +3991,10 @@ async function Is(e, t) {
|
|
|
3991
3991
|
y: 1
|
|
3992
3992
|
}, L = ls(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
3993
3993
|
elements: c,
|
|
3994
|
-
rect:
|
|
3994
|
+
rect: y,
|
|
3995
3995
|
offsetParent: P,
|
|
3996
3996
|
strategy: a
|
|
3997
|
-
}) :
|
|
3997
|
+
}) : y);
|
|
3998
3998
|
return {
|
|
3999
3999
|
top: (T.top - L.top + h.top) / B.y,
|
|
4000
4000
|
bottom: (L.bottom - T.bottom + h.bottom) / B.y,
|
|
@@ -4023,10 +4023,10 @@ const Ty = (e) => ({
|
|
|
4023
4023
|
const d = Ed(l), p = {
|
|
4024
4024
|
x: n,
|
|
4025
4025
|
y: r
|
|
4026
|
-
}, f = pc(o), h = dc(f), m = await i.getDimensions(u), v = f === "y", T = v ? "top" : "left",
|
|
4026
|
+
}, f = pc(o), h = dc(f), m = await i.getDimensions(u), v = f === "y", T = v ? "top" : "left", y = v ? "bottom" : "right", P = v ? "clientHeight" : "clientWidth", B = s.reference[h] + s.reference[f] - p[f] - s.floating[h], L = p[f] - s.reference[f], F = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
|
|
4027
4027
|
let k = F ? F[P] : 0;
|
|
4028
4028
|
(!k || !await (i.isElement == null ? void 0 : i.isElement(F))) && (k = c.floating[P] || s.floating[h]);
|
|
4029
|
-
const g = B / 2 - L / 2, w = k / 2 - m[h] / 2 - 1, $ = on(d[T], w), N = on(d[
|
|
4029
|
+
const g = B / 2 - L / 2, w = k / 2 - m[h] / 2 - 1, $ = on(d[T], w), N = on(d[y], w), O = $, S = k - m[h] - N, E = k / 2 - m[h] / 2 + g, x = aa(O, E, S), A = !a.arrow && $r(o) != null && E !== x && s.reference[h] / 2 - (E < O ? $ : N) - m[h] / 2 < 0, R = A ? E < O ? E - O : E - S : 0;
|
|
4030
4030
|
return {
|
|
4031
4031
|
[f]: p[f] + R,
|
|
4032
4032
|
data: {
|
|
@@ -4063,7 +4063,7 @@ const Ty = (e) => ({
|
|
|
4063
4063
|
} = Zn(e, t);
|
|
4064
4064
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
4065
4065
|
return {};
|
|
4066
|
-
const T = Sn(o),
|
|
4066
|
+
const T = Sn(o), y = Jt(c), P = Sn(c) === c, B = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), L = p || (P || !m ? [us(c)] : ny(c)), F = h !== "none";
|
|
4067
4067
|
!p && F && L.push(...iy(c, m, h, B));
|
|
4068
4068
|
const k = [c, ...L], g = await Is(t, v), w = [];
|
|
4069
4069
|
let $ = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
@@ -4077,9 +4077,9 @@ const Ty = (e) => ({
|
|
|
4077
4077
|
}], !w.every((E) => E <= 0)) {
|
|
4078
4078
|
var N, O;
|
|
4079
4079
|
const E = (((N = s.flip) == null ? void 0 : N.index) || 0) + 1, x = k[E];
|
|
4080
|
-
if (x && (!(d === "alignment" ?
|
|
4080
|
+
if (x && (!(d === "alignment" ? y !== Jt(x) : !1) || // We leave the current main axis only if every placement on that axis
|
|
4081
4081
|
// overflows the main axis.
|
|
4082
|
-
$.every((
|
|
4082
|
+
$.every((b) => Jt(b.placement) === y ? b.overflows[0] > 0 : !0)))
|
|
4083
4083
|
return {
|
|
4084
4084
|
data: {
|
|
4085
4085
|
index: E,
|
|
@@ -4089,20 +4089,20 @@ const Ty = (e) => ({
|
|
|
4089
4089
|
placement: x
|
|
4090
4090
|
}
|
|
4091
4091
|
};
|
|
4092
|
-
let A = (O = $.filter((R) => R.overflows[0] <= 0).sort((R,
|
|
4092
|
+
let A = (O = $.filter((R) => R.overflows[0] <= 0).sort((R, b) => R.overflows[1] - b.overflows[1])[0]) == null ? void 0 : O.placement;
|
|
4093
4093
|
if (!A)
|
|
4094
4094
|
switch (f) {
|
|
4095
4095
|
case "bestFit": {
|
|
4096
4096
|
var S;
|
|
4097
|
-
const R = (S = $.filter((
|
|
4097
|
+
const R = (S = $.filter((b) => {
|
|
4098
4098
|
if (F) {
|
|
4099
|
-
const C = Jt(
|
|
4100
|
-
return C ===
|
|
4099
|
+
const C = Jt(b.placement);
|
|
4100
|
+
return C === y || // Create a bias to the `y` side axis due to horizontal
|
|
4101
4101
|
// reading directions favoring greater width.
|
|
4102
4102
|
C === "y";
|
|
4103
4103
|
}
|
|
4104
4104
|
return !0;
|
|
4105
|
-
}).map((
|
|
4105
|
+
}).map((b) => [b.placement, b.overflows.filter((C) => C > 0).reduce((C, D) => C + D, 0)]).sort((b, C) => b[1] - C[1])[0]) == null ? void 0 : S[0];
|
|
4106
4106
|
R && (A = R);
|
|
4107
4107
|
break;
|
|
4108
4108
|
}
|
|
@@ -4186,11 +4186,11 @@ const Iy = function(e) {
|
|
|
4186
4186
|
fn: (v) => {
|
|
4187
4187
|
let {
|
|
4188
4188
|
x: T,
|
|
4189
|
-
y
|
|
4189
|
+
y
|
|
4190
4190
|
} = v;
|
|
4191
4191
|
return {
|
|
4192
4192
|
x: T,
|
|
4193
|
-
y
|
|
4193
|
+
y
|
|
4194
4194
|
};
|
|
4195
4195
|
}
|
|
4196
4196
|
},
|
|
@@ -4201,12 +4201,12 @@ const Iy = function(e) {
|
|
|
4201
4201
|
}, l = await Is(t, a), d = Jt(Sn(o)), p = xd(d);
|
|
4202
4202
|
let f = u[p], h = u[d];
|
|
4203
4203
|
if (s) {
|
|
4204
|
-
const v = p === "y" ? "top" : "left", T = p === "y" ? "bottom" : "right",
|
|
4205
|
-
f = aa(
|
|
4204
|
+
const v = p === "y" ? "top" : "left", T = p === "y" ? "bottom" : "right", y = f + l[v], P = f - l[T];
|
|
4205
|
+
f = aa(y, f, P);
|
|
4206
4206
|
}
|
|
4207
4207
|
if (i) {
|
|
4208
|
-
const v = d === "y" ? "top" : "left", T = d === "y" ? "bottom" : "right",
|
|
4209
|
-
h = aa(
|
|
4208
|
+
const v = d === "y" ? "top" : "left", T = d === "y" ? "bottom" : "right", y = h + l[v], P = h - l[T];
|
|
4209
|
+
h = aa(y, h, P);
|
|
4210
4210
|
}
|
|
4211
4211
|
const m = c.fn({
|
|
4212
4212
|
...t,
|
|
@@ -4247,9 +4247,9 @@ const Iy = function(e) {
|
|
|
4247
4247
|
} = s.floating;
|
|
4248
4248
|
let v, T;
|
|
4249
4249
|
d === "top" || d === "bottom" ? (v = d, T = p === (await (i.isRTL == null ? void 0 : i.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (T = d, v = p === "end" ? "top" : "bottom");
|
|
4250
|
-
const
|
|
4250
|
+
const y = m - l.top - l.bottom, P = h - l.left - l.right, B = on(m - l[v], y), L = on(h - l[T], P), F = !t.middlewareData.shift;
|
|
4251
4251
|
let k = B, g = L;
|
|
4252
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (g = P), (r = t.middlewareData.shift) != null && r.enabled.y && (k =
|
|
4252
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (g = P), (r = t.middlewareData.shift) != null && r.enabled.y && (k = y), F && !p) {
|
|
4253
4253
|
const $ = Fe(l.left, 0), N = Fe(l.right, 0), O = Fe(l.top, 0), S = Fe(l.bottom, 0);
|
|
4254
4254
|
f ? g = h - 2 * ($ !== 0 || N !== 0 ? $ + N : Fe(l.left, l.right)) : k = m - 2 * (O !== 0 || S !== 0 ? O + S : Fe(l.top, l.bottom));
|
|
4255
4255
|
}
|
|
@@ -4317,7 +4317,7 @@ function jn(e, t, n, r) {
|
|
|
4317
4317
|
const p = Ze(s), f = r && me(r) ? Ze(r) : r;
|
|
4318
4318
|
let h = p, m = ia(h);
|
|
4319
4319
|
for (; m && r && f !== h; ) {
|
|
4320
|
-
const v = lr(m), T = m.getBoundingClientRect(),
|
|
4320
|
+
const v = lr(m), T = m.getBoundingClientRect(), y = ht(m), P = T.left + (m.clientLeft + parseFloat(y.paddingLeft)) * v.x, B = T.top + (m.clientTop + parseFloat(y.paddingTop)) * v.y;
|
|
4321
4321
|
a *= v.x, u *= v.y, l *= v.x, d *= v.y, a += P, u += B, h = Ze(m), m = ia(h);
|
|
4322
4322
|
}
|
|
4323
4323
|
}
|
|
@@ -4621,8 +4621,8 @@ function Ld(e, t, n, r) {
|
|
|
4621
4621
|
const d = u && c ? Ky(u, n) : null;
|
|
4622
4622
|
let p = -1, f = null;
|
|
4623
4623
|
i && (f = new ResizeObserver((T) => {
|
|
4624
|
-
let [
|
|
4625
|
-
|
|
4624
|
+
let [y] = T;
|
|
4625
|
+
y && y.target === u && f && (f.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
4626
4626
|
var P;
|
|
4627
4627
|
(P = f) == null || P.observe(t);
|
|
4628
4628
|
})), n();
|
|
@@ -4635,8 +4635,8 @@ function Ld(e, t, n, r) {
|
|
|
4635
4635
|
}
|
|
4636
4636
|
return n(), () => {
|
|
4637
4637
|
var T;
|
|
4638
|
-
l.forEach((
|
|
4639
|
-
o &&
|
|
4638
|
+
l.forEach((y) => {
|
|
4639
|
+
o && y.removeEventListener("scroll", n), s && y.removeEventListener("resize", n);
|
|
4640
4640
|
}), d == null || d(), (T = f) == null || T.disconnect(), f = null, a && cancelAnimationFrame(h);
|
|
4641
4641
|
};
|
|
4642
4642
|
}
|
|
@@ -4721,19 +4721,19 @@ function Dd(e) {
|
|
|
4721
4721
|
isPositioned: !1
|
|
4722
4722
|
}), [p, f] = j.useState(r);
|
|
4723
4723
|
ps(p, r) || f(r);
|
|
4724
|
-
const [h, m] = j.useState(null), [v, T] = j.useState(null),
|
|
4725
|
-
|
|
4726
|
-
}, []), P = j.useCallback((
|
|
4727
|
-
|
|
4724
|
+
const [h, m] = j.useState(null), [v, T] = j.useState(null), y = j.useCallback((b) => {
|
|
4725
|
+
b !== F.current && (F.current = b, m(b));
|
|
4726
|
+
}, []), P = j.useCallback((b) => {
|
|
4727
|
+
b !== k.current && (k.current = b, T(b));
|
|
4728
4728
|
}, []), B = s || h, L = i || v, F = j.useRef(null), k = j.useRef(null), g = j.useRef(l), w = a != null, $ = vi(a), N = vi(o), O = vi(u), S = j.useCallback(() => {
|
|
4729
4729
|
if (!F.current || !k.current)
|
|
4730
4730
|
return;
|
|
4731
|
-
const
|
|
4731
|
+
const b = {
|
|
4732
4732
|
placement: t,
|
|
4733
4733
|
strategy: n,
|
|
4734
4734
|
middleware: p
|
|
4735
4735
|
};
|
|
4736
|
-
N.current && (
|
|
4736
|
+
N.current && (b.platform = N.current), ev(F.current, k.current, b).then((C) => {
|
|
4737
4737
|
const D = {
|
|
4738
4738
|
...C,
|
|
4739
4739
|
// The floating element's position may be recomputed while it's closed
|
|
@@ -4748,8 +4748,8 @@ function Dd(e) {
|
|
|
4748
4748
|
});
|
|
4749
4749
|
}, [p, t, n, N, O]);
|
|
4750
4750
|
Jo(() => {
|
|
4751
|
-
u === !1 && g.current.isPositioned && (g.current.isPositioned = !1, d((
|
|
4752
|
-
...
|
|
4751
|
+
u === !1 && g.current.isPositioned && (g.current.isPositioned = !1, d((b) => ({
|
|
4752
|
+
...b,
|
|
4753
4753
|
isPositioned: !1
|
|
4754
4754
|
})));
|
|
4755
4755
|
}, [u]);
|
|
@@ -4766,22 +4766,22 @@ function Dd(e) {
|
|
|
4766
4766
|
const x = j.useMemo(() => ({
|
|
4767
4767
|
reference: F,
|
|
4768
4768
|
floating: k,
|
|
4769
|
-
setReference:
|
|
4769
|
+
setReference: y,
|
|
4770
4770
|
setFloating: P
|
|
4771
|
-
}), [
|
|
4771
|
+
}), [y, P]), A = j.useMemo(() => ({
|
|
4772
4772
|
reference: B,
|
|
4773
4773
|
floating: L
|
|
4774
4774
|
}), [B, L]), R = j.useMemo(() => {
|
|
4775
|
-
const
|
|
4775
|
+
const b = {
|
|
4776
4776
|
position: n,
|
|
4777
4777
|
left: 0,
|
|
4778
4778
|
top: 0
|
|
4779
4779
|
};
|
|
4780
4780
|
if (!A.floating)
|
|
4781
|
-
return
|
|
4781
|
+
return b;
|
|
4782
4782
|
const C = ol(A.floating, l.x), D = ol(A.floating, l.y);
|
|
4783
4783
|
return c ? {
|
|
4784
|
-
...
|
|
4784
|
+
...b,
|
|
4785
4785
|
transform: "translate(" + C + "px, " + D + "px)",
|
|
4786
4786
|
...Md(A.floating) >= 1.5 && {
|
|
4787
4787
|
willChange: "transform"
|
|
@@ -4984,7 +4984,7 @@ function xv(e) {
|
|
|
4984
4984
|
}), [f.refs, m, h]), T = j.useMemo(() => ({
|
|
4985
4985
|
...f.elements,
|
|
4986
4986
|
domReference: l
|
|
4987
|
-
}), [f.elements, l]),
|
|
4987
|
+
}), [f.elements, l]), y = j.useMemo(() => ({
|
|
4988
4988
|
...f,
|
|
4989
4989
|
...r,
|
|
4990
4990
|
refs: v,
|
|
@@ -4992,15 +4992,15 @@ function xv(e) {
|
|
|
4992
4992
|
nodeId: t
|
|
4993
4993
|
}), [f, v, T, t, r]);
|
|
4994
4994
|
return la(() => {
|
|
4995
|
-
r.dataRef.current.floatingContext =
|
|
4995
|
+
r.dataRef.current.floatingContext = y;
|
|
4996
4996
|
const P = p == null ? void 0 : p.nodesRef.current.find((B) => B.id === t);
|
|
4997
|
-
P && (P.context =
|
|
4997
|
+
P && (P.context = y);
|
|
4998
4998
|
}), j.useMemo(() => ({
|
|
4999
4999
|
...f,
|
|
5000
|
-
context:
|
|
5000
|
+
context: y,
|
|
5001
5001
|
refs: v,
|
|
5002
5002
|
elements: T
|
|
5003
|
-
}), [f, v, T,
|
|
5003
|
+
}), [f, v, T, y]);
|
|
5004
5004
|
}
|
|
5005
5005
|
const al = "active", cl = "selected";
|
|
5006
5006
|
function wi(e, t, n) {
|
|
@@ -5092,7 +5092,7 @@ const Sv = (e) => ({
|
|
|
5092
5092
|
elements: {
|
|
5093
5093
|
floating: p
|
|
5094
5094
|
}
|
|
5095
|
-
} = t, f = n.current[i], h = (u == null ? void 0 : u.current) || p, m = p.clientTop || h.clientTop, v = p.clientTop !== 0, T = h.clientTop !== 0,
|
|
5095
|
+
} = t, f = n.current[i], h = (u == null ? void 0 : u.current) || p, m = p.clientTop || h.clientTop, v = p.clientTop !== 0, T = h.clientTop !== 0, y = p === h;
|
|
5096
5096
|
if (process.env.NODE_ENV !== "production" && (t.placement.startsWith("bottom") || dv('`placement` side must be "bottom" when using the `inner`', "middleware.")), !f)
|
|
5097
5097
|
return {};
|
|
5098
5098
|
const P = {
|
|
@@ -5101,7 +5101,7 @@ const Sv = (e) => ({
|
|
|
5101
5101
|
}, B = await yi(ul(P, h.scrollHeight + m + p.clientTop), l), L = await yi(P, {
|
|
5102
5102
|
...l,
|
|
5103
5103
|
elementContext: "reference"
|
|
5104
|
-
}), F = Fe(0, B.top), k = P.y + F, $ = (h.scrollHeight > h.clientHeight ? (N) => N : Gr)(Fe(0, h.scrollHeight + (v &&
|
|
5104
|
+
}), F = Fe(0, B.top), k = P.y + F, $ = (h.scrollHeight > h.clientHeight ? (N) => N : Gr)(Fe(0, h.scrollHeight + (v && y || T ? m * 2 : 0) - F - Fe(0, B.bottom)));
|
|
5105
5105
|
if (h.style.maxHeight = $ + "px", h.scrollTop = F, o) {
|
|
5106
5106
|
const N = h.offsetHeight < f.offsetHeight * on(c, n.current.length) - 1 || L.top >= -a || L.bottom >= -a;
|
|
5107
5107
|
Vr.flushSync(() => o(N));
|
|
@@ -5129,8 +5129,8 @@ function Pv(e, t) {
|
|
|
5129
5129
|
function f(m) {
|
|
5130
5130
|
if (m.ctrlKey || !h || s.current == null)
|
|
5131
5131
|
return;
|
|
5132
|
-
const v = m.deltaY, T = s.current.top >= -0.5,
|
|
5133
|
-
h.scrollHeight <= h.clientHeight || (!T && v > 0 || !
|
|
5132
|
+
const v = m.deltaY, T = s.current.top >= -0.5, y = s.current.bottom >= -0.5, P = h.scrollHeight - h.clientHeight, B = v < 0 ? -1 : 1, L = v < 0 ? "max" : "min";
|
|
5133
|
+
h.scrollHeight <= h.clientHeight || (!T && v > 0 || !y && v < 0 ? (m.preventDefault(), Vr.flushSync(() => {
|
|
5134
5134
|
a((F) => F + Math[L](v, P * B));
|
|
5135
5135
|
})) : /firefox/i.test(Xb()) && (h.scrollTop += v));
|
|
5136
5136
|
}
|
|
@@ -5210,22 +5210,22 @@ function Nv({ children: e, enabled: t = !0 }) {
|
|
|
5210
5210
|
ve(() => {
|
|
5211
5211
|
u && s(0);
|
|
5212
5212
|
}, [u]);
|
|
5213
|
-
let { refs: T, floatingStyles:
|
|
5213
|
+
let { refs: T, floatingStyles: y, context: P } = xv({ open: u, placement: m === "selection" ? v === "center" ? "bottom" : `bottom-${v}` : v === "center" ? `${m}` : `${m}-${v}`, strategy: "absolute", transform: !1, middleware: [mc({ mainAxis: m === "selection" ? 0 : d, crossAxis: p }), Fd({ padding: f }), m !== "selection" && kd({ padding: f }), m === "selection" && h ? Sv({ ...h, padding: f, overflowRef: i, offset: o, minItemsVisible: ll, referenceOverflowThreshold: f, onFallbackChange(N) {
|
|
5214
5214
|
var O, S;
|
|
5215
5215
|
if (!N) return;
|
|
5216
5216
|
let E = P.elements.floating;
|
|
5217
5217
|
if (!E) return;
|
|
5218
|
-
let x = parseFloat(getComputedStyle(E).scrollPaddingBottom) || 0, A = Math.min(ll, E.childElementCount), R = 0,
|
|
5218
|
+
let x = parseFloat(getComputedStyle(E).scrollPaddingBottom) || 0, A = Math.min(ll, E.childElementCount), R = 0, b = 0;
|
|
5219
5219
|
for (let C of (S = (O = P.elements.floating) == null ? void 0 : O.childNodes) != null ? S : []) if (dn(C)) {
|
|
5220
5220
|
let D = C.offsetTop, _ = D + C.clientHeight + x, U = E.scrollTop, W = U + E.clientHeight;
|
|
5221
5221
|
if (D >= U && _ <= W) A--;
|
|
5222
5222
|
else {
|
|
5223
|
-
|
|
5223
|
+
b = Math.max(0, Math.min(_, W) - Math.max(D, U)), R = C.clientHeight;
|
|
5224
5224
|
break;
|
|
5225
5225
|
}
|
|
5226
5226
|
}
|
|
5227
5227
|
A >= 1 && s((C) => {
|
|
5228
|
-
let D = R * A -
|
|
5228
|
+
let D = R * A - b + x;
|
|
5229
5229
|
return C >= D ? C : D;
|
|
5230
5230
|
});
|
|
5231
5231
|
} }) : null, ov({ padding: f, apply({ availableWidth: N, availableHeight: O, elements: S }) {
|
|
@@ -5235,7 +5235,7 @@ function Nv({ children: e, enabled: t = !0 }) {
|
|
|
5235
5235
|
let F = ae(() => ({ anchor: [B, L].filter(Boolean).join(" ") }), [B, L]), k = Pv(P, { overflowRef: i, onChange: s }), { getReferenceProps: g, getFloatingProps: w } = Ev([k]), $ = le((N) => {
|
|
5236
5236
|
a(N), T.setFloating(N);
|
|
5237
5237
|
});
|
|
5238
|
-
return j.createElement(gc.Provider, { value: r }, j.createElement(Ar.Provider, { value: { setFloating: $, setReference: T.setReference, styles:
|
|
5238
|
+
return j.createElement(gc.Provider, { value: r }, j.createElement(Ar.Provider, { value: { setFloating: $, setReference: T.setReference, styles: y, getReferenceProps: g, getFloatingProps: w, slot: F } }, e));
|
|
5239
5239
|
}
|
|
5240
5240
|
function Iv(e) {
|
|
5241
5241
|
ve(() => {
|
|
@@ -5270,8 +5270,8 @@ function xi(e, t, n = void 0) {
|
|
|
5270
5270
|
r.requestAnimationFrame(function h() {
|
|
5271
5271
|
r.nextFrame(h);
|
|
5272
5272
|
let m = !1;
|
|
5273
|
-
for (let [T,
|
|
5274
|
-
let P = window.getComputedStyle(u).getPropertyValue(
|
|
5273
|
+
for (let [T, y] of p.entries()) {
|
|
5274
|
+
let P = window.getComputedStyle(u).getPropertyValue(y);
|
|
5275
5275
|
if (f[T] !== P) {
|
|
5276
5276
|
f[T] = P, m = !0;
|
|
5277
5277
|
break;
|
|
@@ -5472,7 +5472,7 @@ function Zd(e, t) {
|
|
|
5472
5472
|
a.current.splice(0), t && (t.chains.current[h] = t.chains.current[h].filter(([v]) => v !== f)), t == null || t.chains.current[h].push([f, new Promise((v) => {
|
|
5473
5473
|
a.current.push(v);
|
|
5474
5474
|
})]), t == null || t.chains.current[h].push([f, new Promise((v) => {
|
|
5475
|
-
Promise.all(l.current[h].map(([T,
|
|
5475
|
+
Promise.all(l.current[h].map(([T, y]) => y)).then(() => v());
|
|
5476
5476
|
})]), h === "enter" ? u.current = u.current.then(() => t == null ? void 0 : t.wait.current).then(() => m(h)) : m(h);
|
|
5477
5477
|
}), p = le((f, h, m) => {
|
|
5478
5478
|
Promise.all(l.current[h].splice(0).map(([v, T]) => T)).then(() => {
|
|
@@ -5485,7 +5485,7 @@ function Zd(e, t) {
|
|
|
5485
5485
|
let Kd = et, Yd = cs.RenderStrategy;
|
|
5486
5486
|
function Xv(e, t) {
|
|
5487
5487
|
var n, r;
|
|
5488
|
-
let { transition: o = !0, beforeEnter: s, afterEnter: i, beforeLeave: c, afterLeave: a, enter: u, enterFrom: l, enterTo: d, entered: p, leave: f, leaveFrom: h, leaveTo: m, ...v } = e, [T,
|
|
5488
|
+
let { transition: o = !0, beforeEnter: s, afterEnter: i, beforeLeave: c, afterLeave: a, enter: u, enterFrom: l, enterTo: d, entered: p, leave: f, leaveFrom: h, leaveTo: m, ...v } = e, [T, y] = se(null), P = oe(null), B = qd(e), L = bt(...B ? [P, t, y] : t === null ? [] : [t]), F = (n = v.unmount) == null || n ? vn.Unmount : vn.Hidden, { show: k, appear: g, initial: w } = Kv(), [$, N] = se(k ? "visible" : "hidden"), O = Yv(), { register: S, unregister: E } = O;
|
|
5489
5489
|
ve(() => S(P), [S, P]), ve(() => {
|
|
5490
5490
|
if (F === vn.Hidden && P.current) {
|
|
5491
5491
|
if (k && $ !== "visible") {
|
|
@@ -5499,17 +5499,17 @@ function Xv(e, t) {
|
|
|
5499
5499
|
ve(() => {
|
|
5500
5500
|
if (B && x && $ === "visible" && P.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
5501
5501
|
}, [P, $, x, B]);
|
|
5502
|
-
let A = w && !g, R = g && k && w,
|
|
5503
|
-
|
|
5502
|
+
let A = w && !g, R = g && k && w, b = oe(!1), C = Zd(() => {
|
|
5503
|
+
b.current || (N("hidden"), E(P));
|
|
5504
5504
|
}, O), D = le((V) => {
|
|
5505
|
-
|
|
5505
|
+
b.current = !0;
|
|
5506
5506
|
let X = V ? "enter" : "leave";
|
|
5507
5507
|
C.onStart(P, X, (ee) => {
|
|
5508
5508
|
ee === "enter" ? s == null || s() : ee === "leave" && (c == null || c());
|
|
5509
5509
|
});
|
|
5510
5510
|
}), _ = le((V) => {
|
|
5511
5511
|
let X = V ? "enter" : "leave";
|
|
5512
|
-
|
|
5512
|
+
b.current = !1, C.onStop(P, X, (ee) => {
|
|
5513
5513
|
ee === "enter" ? i == null || i() : ee === "leave" && (a == null || a());
|
|
5514
5514
|
}), X === "leave" && !Ms(C) && (N("hidden"), E(P));
|
|
5515
5515
|
});
|
|
@@ -5536,14 +5536,14 @@ function Qv(e, t) {
|
|
|
5536
5536
|
ve(() => {
|
|
5537
5537
|
n ? d("visible") : !Ms(p) && i.current !== null && d("hidden");
|
|
5538
5538
|
}, [n, p]);
|
|
5539
|
-
let T = { unmount: o },
|
|
5539
|
+
let T = { unmount: o }, y = le(() => {
|
|
5540
5540
|
var L;
|
|
5541
5541
|
f && h(!1), (L = e.beforeEnter) == null || L.call(e);
|
|
5542
5542
|
}), P = le(() => {
|
|
5543
5543
|
var L;
|
|
5544
5544
|
f && h(!1), (L = e.beforeLeave) == null || L.call(e);
|
|
5545
5545
|
}), B = tt();
|
|
5546
|
-
return K.createElement(Ls.Provider, { value: p }, K.createElement(Bs.Provider, { value: v }, B({ ourProps: { ...T, as: et, children: K.createElement(Xd, { ref: a, ...T, ...s, beforeEnter:
|
|
5546
|
+
return K.createElement(Ls.Provider, { value: p }, K.createElement(Bs.Provider, { value: v }, B({ ourProps: { ...T, as: et, children: K.createElement(Xd, { ref: a, ...T, ...s, beforeEnter: y, beforeLeave: P }) }, theirProps: {}, defaultTag: et, features: Yd, visible: l === "visible", name: "Transition" })));
|
|
5547
5547
|
}
|
|
5548
5548
|
function Jv(e, t) {
|
|
5549
5549
|
let n = Se(Bs) !== null, r = yc() !== null;
|
|
@@ -5763,7 +5763,7 @@ let a1 = et;
|
|
|
5763
5763
|
function c1(e, t) {
|
|
5764
5764
|
let n = Gn(), r = oc(), { value: o, defaultValue: s, form: i, name: c, onChange: a, by: u, invalid: l = !1, disabled: d = r || !1, horizontal: p = !1, multiple: f = !1, __demoMode: h = !1, ...m } = e;
|
|
5765
5765
|
const v = p ? "horizontal" : "vertical";
|
|
5766
|
-
let T = bt(t),
|
|
5766
|
+
let T = bt(t), y = Pg(s), [P = f ? [] : void 0, B] = Sg(o, a, y), L = tp({ id: n, __demoMode: h }), F = oe({ static: !1, hold: !1 }), k = oe(/* @__PURE__ */ new Map()), g = Yg(u), w = Q((U) => pt($.mode, { [Bt.Multi]: () => P.some((W) => g(W, U)), [Bt.Single]: () => g(P, U) }), [P]), $ = ae(() => ({ value: P, disabled: d, invalid: l, mode: f ? Bt.Multi : Bt.Single, orientation: v, onChange: B, compare: g, isSelected: w, optionsPropsRef: F, listRef: k }), [P, d, l, f, v, B, g, w, F, k]);
|
|
5767
5767
|
ve(() => {
|
|
5768
5768
|
L.state.dataRef.current = $;
|
|
5769
5769
|
}, [$]);
|
|
@@ -5771,56 +5771,56 @@ function c1(e, t) {
|
|
|
5771
5771
|
Sb(S, [E, x], (U, W) => {
|
|
5772
5772
|
L.send({ type: Jd.CloseListbox }), md(W, uc.Loose) || (U.preventDefault(), E == null || E.focus());
|
|
5773
5773
|
});
|
|
5774
|
-
let A = ae(() => ({ open: N === Be.Open, disabled: d, invalid: l, value: P }), [N, d, l, P]), [R,
|
|
5775
|
-
if (
|
|
5776
|
-
}, [B,
|
|
5777
|
-
return K.createElement(
|
|
5774
|
+
let A = ae(() => ({ open: N === Be.Open, disabled: d, invalid: l, value: P }), [N, d, l, P]), [R, b] = Hg({ inherit: !0 }), C = { ref: T }, D = Q(() => {
|
|
5775
|
+
if (y !== void 0) return B == null ? void 0 : B(y);
|
|
5776
|
+
}, [B, y]), _ = tt();
|
|
5777
|
+
return K.createElement(b, { value: R, props: { htmlFor: E == null ? void 0 : E.id }, slot: { open: N === Be.Open, disabled: d } }, K.createElement(Nv, null, K.createElement(ep.Provider, { value: L }, K.createElement(Ds.Provider, { value: $ }, K.createElement(zd, { value: pt(N, { [Be.Open]: Et.Open, [Be.Closed]: Et.Closed }) }, c != null && P != null && K.createElement(Ng, { disabled: d, data: { [c]: P }, form: i, onReset: D }), _({ ourProps: C, theirProps: m, slot: A, defaultTag: a1, name: "Listbox" }))))));
|
|
5778
5778
|
}
|
|
5779
5779
|
let u1 = "button";
|
|
5780
5780
|
function l1(e, t) {
|
|
5781
|
-
let n = Gn(), r = ed(), o = Po("Listbox.Button"), s = xc("Listbox.Button"), { id: i = r || `headlessui-listbox-button-${n}`, disabled: c = o.disabled || !1, autoFocus: a = !1, ...u } = e, l = bt(t, Av(), s.actions.setButtonElement), d = Tv(), [p, f, h] = dt(s, (
|
|
5782
|
-
Ab(m, { trigger: f, action: Q((
|
|
5783
|
-
if (f != null && f.contains(
|
|
5784
|
-
let C =
|
|
5785
|
-
return dn(C) ? _o.Select(C) : h != null && h.contains(
|
|
5781
|
+
let n = Gn(), r = ed(), o = Po("Listbox.Button"), s = xc("Listbox.Button"), { id: i = r || `headlessui-listbox-button-${n}`, disabled: c = o.disabled || !1, autoFocus: a = !1, ...u } = e, l = bt(t, Av(), s.actions.setButtonElement), d = Tv(), [p, f, h] = dt(s, (b) => [b.listboxState, b.buttonElement, b.optionsElement]), m = p === Be.Open;
|
|
5782
|
+
Ab(m, { trigger: f, action: Q((b) => {
|
|
5783
|
+
if (f != null && f.contains(b.target)) return _o.Ignore;
|
|
5784
|
+
let C = b.target.closest('[role="option"]:not([data-disabled])');
|
|
5785
|
+
return dn(C) ? _o.Select(C) : h != null && h.contains(b.target) ? _o.Ignore : _o.Close;
|
|
5786
5786
|
}, [f, h]), close: s.actions.closeListbox, select: s.actions.selectActiveOption });
|
|
5787
|
-
let v = le((
|
|
5788
|
-
switch (
|
|
5787
|
+
let v = le((b) => {
|
|
5788
|
+
switch (b.key) {
|
|
5789
5789
|
case Ce.Enter:
|
|
5790
|
-
$g(
|
|
5790
|
+
$g(b.currentTarget);
|
|
5791
5791
|
break;
|
|
5792
5792
|
case Ce.Space:
|
|
5793
5793
|
case Ce.ArrowDown:
|
|
5794
|
-
|
|
5794
|
+
b.preventDefault(), s.actions.openListbox({ focus: o.value ? Ee.Nothing : Ee.First });
|
|
5795
5795
|
break;
|
|
5796
5796
|
case Ce.ArrowUp:
|
|
5797
|
-
|
|
5797
|
+
b.preventDefault(), s.actions.openListbox({ focus: o.value ? Ee.Nothing : Ee.Last });
|
|
5798
5798
|
break;
|
|
5799
5799
|
}
|
|
5800
|
-
}), T = le((
|
|
5801
|
-
switch (
|
|
5800
|
+
}), T = le((b) => {
|
|
5801
|
+
switch (b.key) {
|
|
5802
5802
|
case Ce.Space:
|
|
5803
|
-
|
|
5803
|
+
b.preventDefault();
|
|
5804
5804
|
break;
|
|
5805
5805
|
}
|
|
5806
|
-
}),
|
|
5806
|
+
}), y = le((b) => {
|
|
5807
5807
|
var C;
|
|
5808
|
-
if (
|
|
5809
|
-
if (Fg(
|
|
5810
|
-
s.state.listboxState === Be.Open ? (Ur(() => s.actions.closeListbox()), (C = s.state.buttonElement) == null || C.focus({ preventScroll: !0 })) : (
|
|
5811
|
-
}
|
|
5812
|
-
}), P = oe(null), B = le((
|
|
5813
|
-
P.current =
|
|
5814
|
-
}), L = le((
|
|
5815
|
-
P.current !== "mouse" && b
|
|
5816
|
-
}), F = le((
|
|
5808
|
+
if (b.button === Wd.Left) {
|
|
5809
|
+
if (Fg(b.currentTarget)) return b.preventDefault();
|
|
5810
|
+
s.state.listboxState === Be.Open ? (Ur(() => s.actions.closeListbox()), (C = s.state.buttonElement) == null || C.focus({ preventScroll: !0 })) : (b.preventDefault(), s.actions.openListbox({ focus: Ee.Nothing }));
|
|
5811
|
+
}
|
|
5812
|
+
}), P = oe(null), B = le((b) => {
|
|
5813
|
+
P.current = b.pointerType, b.pointerType === "mouse" && y(b);
|
|
5814
|
+
}), L = le((b) => {
|
|
5815
|
+
P.current !== "mouse" && y(b);
|
|
5816
|
+
}), F = le((b) => b.preventDefault()), k = id([i]), g = _g(), { isFocusVisible: w, focusProps: $ } = fg({ autoFocus: a }), { isHovered: N, hoverProps: O } = lg({ isDisabled: c }), { pressed: S, pressProps: E } = bg({ disabled: c }), x = ae(() => ({ open: p === Be.Open, active: S || p === Be.Open, disabled: c, invalid: o.invalid, value: o.value, hover: N, focus: w, autofocus: a }), [p, o.value, c, N, w, S, o.invalid, a]), A = dt(s, (b) => b.listboxState === Be.Open), R = Kf(d(), { ref: l, id: i, type: Tb(e, f), "aria-haspopup": "listbox", "aria-controls": h == null ? void 0 : h.id, "aria-expanded": A, "aria-labelledby": k, "aria-describedby": g, disabled: c || void 0, autoFocus: a, onKeyDown: v, onKeyUp: T, onKeyPress: F, onPointerDown: B, onClick: L }, $, O, E);
|
|
5817
5817
|
return tt()({ ourProps: R, theirProps: u, slot: x, defaultTag: u1, name: "Listbox.Button" });
|
|
5818
5818
|
}
|
|
5819
5819
|
let np = Le(!1), f1 = "div", d1 = cs.RenderStrategy | cs.Static;
|
|
5820
5820
|
function p1(e, t) {
|
|
5821
5821
|
let n = Gn(), { id: r = `headlessui-listbox-options-${n}`, anchor: o, portal: s = !1, modal: i = !0, transition: c = !1, ...a } = e, u = $v(o), [l, d] = se(null);
|
|
5822
5822
|
u && (s = !0);
|
|
5823
|
-
let p = Po("Listbox.Options"), f = xc("Listbox.Options"), [h, m, v, T] = dt(f, (V) => [V.listboxState, V.buttonElement, V.optionsElement, V.__demoMode]),
|
|
5823
|
+
let p = Po("Listbox.Options"), f = xc("Listbox.Options"), [h, m, v, T] = dt(f, (V) => [V.listboxState, V.buttonElement, V.optionsElement, V.__demoMode]), y = oa(m), P = oa(v), B = yc(), [L, F] = vd(c, l, B !== null ? (B & Et.Open) === Et.Open : h === Be.Open);
|
|
5824
5824
|
fb(L, m, f.actions.closeListbox);
|
|
5825
5825
|
let k = T ? !1 : i && h === Be.Open;
|
|
5826
5826
|
Mb(k, P);
|
|
@@ -5836,7 +5836,7 @@ function p1(e, t) {
|
|
|
5836
5836
|
if (E === null) return { ...u, inner: void 0 };
|
|
5837
5837
|
let V = Array.from(p.listRef.current.values());
|
|
5838
5838
|
return { ...u, inner: { listRef: { current: V }, index: E } };
|
|
5839
|
-
})(), [A, R] = Ov(x),
|
|
5839
|
+
})(), [A, R] = Ov(x), b = Rv(), C = bt(t, u ? A : null, f.actions.setOptionsElement, d), D = Sr();
|
|
5840
5840
|
Oe(() => {
|
|
5841
5841
|
var V;
|
|
5842
5842
|
let X = v;
|
|
@@ -5877,8 +5877,8 @@ function p1(e, t) {
|
|
|
5877
5877
|
}), U = dt(f, (V) => {
|
|
5878
5878
|
var X;
|
|
5879
5879
|
return (X = V.buttonElement) == null ? void 0 : X.id;
|
|
5880
|
-
}), W = ae(() => ({ open: h === Be.Open }), [h]), q = Kf(u ?
|
|
5881
|
-
return K.createElement(Gv, { enabled: s ? e.static || L : !1, ownerDocument:
|
|
5880
|
+
}), W = ae(() => ({ open: h === Be.Open }), [h]), q = Kf(u ? b() : {}, { id: r, ref: C, "aria-activedescendant": dt(f, f.selectors.activeDescendantId), "aria-multiselectable": p.mode === Bt.Multi ? !0 : void 0, "aria-labelledby": U, "aria-orientation": p.orientation, onKeyDown: _, role: "listbox", tabIndex: h === Be.Open ? 0 : void 0, style: { ...a.style, ...R, "--button-width": Qg(m, !0).width }, ...yd(F) }), z = tt(), Z = ae(() => p.mode === Bt.Multi ? p : { ...p, isSelected: S }, [p, S]);
|
|
5881
|
+
return K.createElement(Gv, { enabled: s ? e.static || L : !1, ownerDocument: y }, K.createElement(Ds.Provider, { value: Z }, z({ ourProps: q, theirProps: a, slot: W, defaultTag: f1, features: d1, visible: $, name: "Listbox.Options" })));
|
|
5882
5882
|
}
|
|
5883
5883
|
let h1 = "div";
|
|
5884
5884
|
function m1(e, t) {
|
|
@@ -5899,14 +5899,14 @@ function m1(e, t) {
|
|
|
5899
5899
|
var N;
|
|
5900
5900
|
if (o) return $.preventDefault();
|
|
5901
5901
|
u.actions.onChange(s), a.mode === Bt.Single && (Ur(() => u.actions.closeListbox()), (N = u.state.buttonElement) == null || N.focus({ preventScroll: !0 }));
|
|
5902
|
-
}),
|
|
5902
|
+
}), y = le(() => {
|
|
5903
5903
|
if (o) return u.actions.goToOption({ focus: Ee.Nothing });
|
|
5904
5904
|
u.actions.goToOption({ focus: Ee.Specific, id: r });
|
|
5905
5905
|
}), P = Db(), B = le(($) => P.update($)), L = le(($) => {
|
|
5906
5906
|
P.wasMoved($) && (o || l && u.state.activationTrigger === es.Pointer || u.actions.goToOption({ focus: Ee.Specific, id: r }, es.Pointer));
|
|
5907
5907
|
}), F = le(($) => {
|
|
5908
5908
|
P.wasMoved($) && (o || l && u.state.activationTrigger === es.Pointer && u.actions.goToOption({ focus: Ee.Nothing }));
|
|
5909
|
-
}), k = ae(() => ({ active: l, focus: l, selected: d, disabled: o, selectedOption: d && c }), [l, 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: T, onFocus:
|
|
5909
|
+
}), k = ae(() => ({ active: l, focus: l, selected: d, disabled: o, selectedOption: d && c }), [l, 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: T, onFocus: y, onPointerEnter: B, onMouseEnter: B, onPointerMove: L, onMouseMove: L, onPointerLeave: F, onMouseLeave: F }, w = tt();
|
|
5910
5910
|
return !d && c ? null : w({ ourProps: g, theirProps: i, slot: k, defaultTag: h1, name: "Listbox.Option" });
|
|
5911
5911
|
}
|
|
5912
5912
|
let g1 = et;
|
|
@@ -6655,10 +6655,10 @@ var _n;
|
|
|
6655
6655
|
o(v.length <= T), n(0, Math.min(4, T - v.length), v), n(0, (8 - v.length % 8) % 8, v), o(v.length % 8 == 0);
|
|
6656
6656
|
for (let P = 236; v.length < T; P ^= 253)
|
|
6657
6657
|
n(P, 8, v);
|
|
6658
|
-
let
|
|
6659
|
-
for (;
|
|
6660
|
-
|
|
6661
|
-
return v.forEach((P, B) =>
|
|
6658
|
+
let y = [];
|
|
6659
|
+
for (; y.length * 8 < v.length; )
|
|
6660
|
+
y.push(0);
|
|
6661
|
+
return v.forEach((P, B) => y[B >>> 3] |= P << 7 - (B & 7)), new ce(h, u, y, p);
|
|
6662
6662
|
}
|
|
6663
6663
|
/*-- Accessor methods --*/
|
|
6664
6664
|
// Returns the color of the module (pixel) at the given coordinates, which is false
|
|
@@ -6755,12 +6755,12 @@ var _n;
|
|
|
6755
6755
|
const F = ce.reedSolomonComputeRemainder(L, T);
|
|
6756
6756
|
P < h && L.push(0), v.push(L.concat(F));
|
|
6757
6757
|
}
|
|
6758
|
-
let
|
|
6758
|
+
let y = [];
|
|
6759
6759
|
for (let P = 0; P < v[0].length; P++)
|
|
6760
6760
|
v.forEach((B, L) => {
|
|
6761
|
-
(P != m - p || L >= h) &&
|
|
6761
|
+
(P != m - p || L >= h) && y.push(B[P]);
|
|
6762
6762
|
});
|
|
6763
|
-
return o(
|
|
6763
|
+
return o(y.length == f), y;
|
|
6764
6764
|
}
|
|
6765
6765
|
// Draws the given sequence of 8-bit codewords (data and error correction) onto the entire
|
|
6766
6766
|
// data area of this QR Code. Function modules need to be marked off before this is called.
|
|
@@ -7233,7 +7233,7 @@ var sw = function() {
|
|
|
7233
7233
|
"boostLevel",
|
|
7234
7234
|
"marginSize",
|
|
7235
7235
|
"imageSettings"
|
|
7236
|
-
]), { style: v } = m, T = ga(m, ["style"]),
|
|
7236
|
+
]), { style: v } = m, T = ga(m, ["style"]), y = f == null ? void 0 : f.src, P = K.useRef(null), B = K.useRef(null), L = K.useCallback(
|
|
7237
7237
|
(E) => {
|
|
7238
7238
|
P.current = E, typeof n == "function" ? n(E) : n && (n.current = E);
|
|
7239
7239
|
},
|
|
@@ -7254,8 +7254,8 @@ var sw = function() {
|
|
|
7254
7254
|
if (!x)
|
|
7255
7255
|
return;
|
|
7256
7256
|
let A = w;
|
|
7257
|
-
const R = B.current,
|
|
7258
|
-
|
|
7257
|
+
const R = B.current, b = N != null && R !== null && R.complete && R.naturalHeight !== 0 && R.naturalWidth !== 0;
|
|
7258
|
+
b && N.excavation != null && (A = gp(
|
|
7259
7259
|
w,
|
|
7260
7260
|
N.excavation
|
|
7261
7261
|
));
|
|
@@ -7266,7 +7266,7 @@ var sw = function() {
|
|
|
7266
7266
|
_.forEach(function(W, q) {
|
|
7267
7267
|
W && x.fillRect(q + g, U + g, 1, 1);
|
|
7268
7268
|
});
|
|
7269
|
-
}), N && (x.globalAlpha = N.opacity),
|
|
7269
|
+
}), N && (x.globalAlpha = N.opacity), b && x.drawImage(
|
|
7270
7270
|
R,
|
|
7271
7271
|
N.x + g,
|
|
7272
7272
|
N.y + g,
|
|
@@ -7276,14 +7276,14 @@ var sw = function() {
|
|
|
7276
7276
|
}
|
|
7277
7277
|
}), K.useEffect(() => {
|
|
7278
7278
|
k(!1);
|
|
7279
|
-
}, [
|
|
7279
|
+
}, [y]);
|
|
7280
7280
|
const O = ma({ height: s, width: s }, v);
|
|
7281
7281
|
let S = null;
|
|
7282
|
-
return
|
|
7282
|
+
return y != null && (S = /* @__PURE__ */ K.createElement(
|
|
7283
7283
|
"img",
|
|
7284
7284
|
{
|
|
7285
|
-
src:
|
|
7286
|
-
key:
|
|
7285
|
+
src: y,
|
|
7286
|
+
key: y,
|
|
7287
7287
|
style: { display: "none" },
|
|
7288
7288
|
onLoad: () => {
|
|
7289
7289
|
k(!0);
|
|
@@ -7330,7 +7330,7 @@ var yp = K.forwardRef(
|
|
|
7330
7330
|
"title",
|
|
7331
7331
|
"marginSize",
|
|
7332
7332
|
"imageSettings"
|
|
7333
|
-
]), { margin: v, cells: T, numCells:
|
|
7333
|
+
]), { margin: v, cells: T, numCells: y, calculatedImageSettings: P } = bp({
|
|
7334
7334
|
value: o,
|
|
7335
7335
|
level: i,
|
|
7336
7336
|
minVersion: l,
|
|
@@ -7363,7 +7363,7 @@ var yp = K.forwardRef(
|
|
|
7363
7363
|
ma({
|
|
7364
7364
|
height: s,
|
|
7365
7365
|
width: s,
|
|
7366
|
-
viewBox: `0 0 ${
|
|
7366
|
+
viewBox: `0 0 ${y} ${y}`,
|
|
7367
7367
|
ref: n,
|
|
7368
7368
|
role: "img"
|
|
7369
7369
|
}, m),
|
|
@@ -7372,7 +7372,7 @@ var yp = K.forwardRef(
|
|
|
7372
7372
|
"path",
|
|
7373
7373
|
{
|
|
7374
7374
|
fill: c,
|
|
7375
|
-
d: `M0,0 h${
|
|
7375
|
+
d: `M0,0 h${y}v${y}H0z`,
|
|
7376
7376
|
shapeRendering: "crispEdges"
|
|
7377
7377
|
}
|
|
7378
7378
|
),
|
|
@@ -7620,18 +7620,18 @@ function Bw(e, t) {
|
|
|
7620
7620
|
mouseOnly: l = !1,
|
|
7621
7621
|
restMs: d = 0,
|
|
7622
7622
|
move: p = !0
|
|
7623
|
-
} = t, f = Nc(), h = Oc(), m = Vo(u), v = Vo(a), T = Vo(n),
|
|
7623
|
+
} = t, f = Nc(), h = Oc(), m = Vo(u), v = Vo(a), T = Vo(n), y = Vo(d), P = j.useRef(), B = j.useRef(-1), L = j.useRef(), F = j.useRef(-1), k = j.useRef(!0), g = j.useRef(!1), w = j.useRef(() => {
|
|
7624
7624
|
}), $ = j.useRef(!1), N = Ct(() => {
|
|
7625
7625
|
var R;
|
|
7626
|
-
const
|
|
7627
|
-
return (
|
|
7626
|
+
const b = (R = o.current.openEvent) == null ? void 0 : R.type;
|
|
7627
|
+
return (b == null ? void 0 : b.includes("mouse")) && b !== "mousedown";
|
|
7628
7628
|
});
|
|
7629
7629
|
j.useEffect(() => {
|
|
7630
7630
|
if (!c) return;
|
|
7631
|
-
function R(
|
|
7631
|
+
function R(b) {
|
|
7632
7632
|
let {
|
|
7633
7633
|
open: C
|
|
7634
|
-
} =
|
|
7634
|
+
} = b;
|
|
7635
7635
|
C || (lt(B), lt(F), k.current = !0, $.current = !1);
|
|
7636
7636
|
}
|
|
7637
7637
|
return s.on("openchange", R), () => {
|
|
@@ -7642,15 +7642,15 @@ function Bw(e, t) {
|
|
|
7642
7642
|
function R(C) {
|
|
7643
7643
|
N() && r(!1, C, "hover");
|
|
7644
7644
|
}
|
|
7645
|
-
const
|
|
7646
|
-
return
|
|
7647
|
-
|
|
7645
|
+
const b = Lt(i.floating).documentElement;
|
|
7646
|
+
return b.addEventListener("mouseleave", R), () => {
|
|
7647
|
+
b.removeEventListener("mouseleave", R);
|
|
7648
7648
|
};
|
|
7649
7649
|
}, [i.floating, n, r, c, m, N]);
|
|
7650
|
-
const O = j.useCallback(function(R,
|
|
7651
|
-
|
|
7650
|
+
const O = j.useCallback(function(R, b, C) {
|
|
7651
|
+
b === void 0 && (b = !0), C === void 0 && (C = "hover");
|
|
7652
7652
|
const D = Pi(v.current, "close", P.current);
|
|
7653
|
-
D && !L.current ? (lt(B), B.current = window.setTimeout(() => r(!1, R, C), D)) :
|
|
7653
|
+
D && !L.current ? (lt(B), B.current = window.setTimeout(() => r(!1, R, C), D)) : b && (lt(B), r(!1, R, C));
|
|
7654
7654
|
}, [v, r]), S = Ct(() => {
|
|
7655
7655
|
w.current(), L.current = void 0;
|
|
7656
7656
|
}), E = Ct(() => {
|
|
@@ -7662,14 +7662,14 @@ function Bw(e, t) {
|
|
|
7662
7662
|
j.useEffect(() => {
|
|
7663
7663
|
if (!c) return;
|
|
7664
7664
|
function R(U) {
|
|
7665
|
-
if (lt(B), k.current = !1, l && !Kr(P.current) || $i(
|
|
7665
|
+
if (lt(B), k.current = !1, l && !Kr(P.current) || $i(y.current) > 0 && !Pi(v.current, "open"))
|
|
7666
7666
|
return;
|
|
7667
7667
|
const W = Pi(v.current, "open", P.current);
|
|
7668
7668
|
W ? B.current = window.setTimeout(() => {
|
|
7669
7669
|
T.current || r(!0, U, "hover");
|
|
7670
7670
|
}, W) : n || r(!0, U, "hover");
|
|
7671
7671
|
}
|
|
7672
|
-
function
|
|
7672
|
+
function b(U) {
|
|
7673
7673
|
if (x()) {
|
|
7674
7674
|
E();
|
|
7675
7675
|
return;
|
|
@@ -7715,20 +7715,20 @@ function Bw(e, t) {
|
|
|
7715
7715
|
const U = i.domReference, W = i.floating;
|
|
7716
7716
|
return n && U.addEventListener("mouseleave", C), p && U.addEventListener("mousemove", R, {
|
|
7717
7717
|
once: !0
|
|
7718
|
-
}), U.addEventListener("mouseenter", R), U.addEventListener("mouseleave",
|
|
7719
|
-
n && U.removeEventListener("mouseleave", C), p && U.removeEventListener("mousemove", R), U.removeEventListener("mouseenter", R), U.removeEventListener("mouseleave",
|
|
7718
|
+
}), U.addEventListener("mouseenter", R), U.addEventListener("mouseleave", b), W && (W.addEventListener("mouseleave", C), W.addEventListener("mouseenter", D), W.addEventListener("mouseleave", _)), () => {
|
|
7719
|
+
n && U.removeEventListener("mouseleave", C), p && U.removeEventListener("mousemove", R), U.removeEventListener("mouseenter", R), U.removeEventListener("mouseleave", b), W && (W.removeEventListener("mouseleave", C), W.removeEventListener("mouseenter", D), W.removeEventListener("mouseleave", _));
|
|
7720
7720
|
};
|
|
7721
7721
|
}
|
|
7722
|
-
}, [i, c, e, l, p, O, S, E, r, n, T, f, v, m, o, x,
|
|
7722
|
+
}, [i, c, e, l, p, O, S, E, r, n, T, f, v, m, o, x, y]), kt(() => {
|
|
7723
7723
|
var R;
|
|
7724
7724
|
if (c && n && (R = m.current) != null && (R = R.__options) != null && R.blockPointerEvents && N()) {
|
|
7725
7725
|
g.current = !0;
|
|
7726
7726
|
const C = i.floating;
|
|
7727
7727
|
if (me(i.domReference) && C) {
|
|
7728
|
-
var
|
|
7728
|
+
var b;
|
|
7729
7729
|
const D = Lt(i.floating).body;
|
|
7730
7730
|
D.setAttribute(Al, "");
|
|
7731
|
-
const _ = i.domReference, U = f == null || (
|
|
7731
|
+
const _ = i.domReference, U = f == null || (b = f.nodesRef.current.find((W) => W.id === h)) == null || (b = b.context) == null ? void 0 : b.elements.floating;
|
|
7732
7732
|
return U && (U.style.pointerEvents = ""), D.style.pointerEvents = "none", _.style.pointerEvents = "auto", C.style.pointerEvents = "auto", () => {
|
|
7733
7733
|
D.style.pointerEvents = "", _.style.pointerEvents = "", C.style.pointerEvents = "";
|
|
7734
7734
|
};
|
|
@@ -7740,23 +7740,23 @@ function Bw(e, t) {
|
|
|
7740
7740
|
S(), lt(B), lt(F), E();
|
|
7741
7741
|
}, [c, i.domReference, S, E]);
|
|
7742
7742
|
const A = j.useMemo(() => {
|
|
7743
|
-
function R(
|
|
7744
|
-
P.current =
|
|
7743
|
+
function R(b) {
|
|
7744
|
+
P.current = b.pointerType;
|
|
7745
7745
|
}
|
|
7746
7746
|
return {
|
|
7747
7747
|
onPointerDown: R,
|
|
7748
7748
|
onPointerEnter: R,
|
|
7749
|
-
onMouseMove(
|
|
7749
|
+
onMouseMove(b) {
|
|
7750
7750
|
const {
|
|
7751
7751
|
nativeEvent: C
|
|
7752
|
-
} =
|
|
7752
|
+
} = b;
|
|
7753
7753
|
function D() {
|
|
7754
7754
|
!k.current && !T.current && r(!0, C, "hover");
|
|
7755
7755
|
}
|
|
7756
|
-
l && !Kr(P.current) || n || $i(
|
|
7756
|
+
l && !Kr(P.current) || n || $i(y.current) === 0 || $.current && b.movementX ** 2 + b.movementY ** 2 < 2 || (lt(F), P.current === "touch" ? D() : ($.current = !0, F.current = window.setTimeout(D, $i(y.current))));
|
|
7757
7757
|
}
|
|
7758
7758
|
};
|
|
7759
|
-
}, [l, r, n, T,
|
|
7759
|
+
}, [l, r, n, T, y]);
|
|
7760
7760
|
return j.useMemo(() => c ? {
|
|
7761
7761
|
reference: A
|
|
7762
7762
|
} : {}, [c, A]);
|
|
@@ -7863,8 +7863,8 @@ function Mw(e) {
|
|
|
7863
7863
|
var v;
|
|
7864
7864
|
(v = l.current) == null || v.focus();
|
|
7865
7865
|
} else {
|
|
7866
|
-
const T = i ? i.domReference : null,
|
|
7867
|
-
|
|
7866
|
+
const T = i ? i.domReference : null, y = Ew(T);
|
|
7867
|
+
y == null || y.focus();
|
|
7868
7868
|
}
|
|
7869
7869
|
}
|
|
7870
7870
|
}), h && s && /* @__PURE__ */ I.jsx("span", {
|
|
@@ -7878,8 +7878,8 @@ function Mw(e) {
|
|
|
7878
7878
|
var v;
|
|
7879
7879
|
(v = d.current) == null || v.focus();
|
|
7880
7880
|
} else {
|
|
7881
|
-
const T = i ? i.domReference : null,
|
|
7882
|
-
|
|
7881
|
+
const T = i ? i.domReference : null, y = xw(T);
|
|
7882
|
+
y == null || y.focus(), i != null && i.closeOnFocusOut && (i == null || i.onOpenChange(!1, m.nativeEvent, "focus-out"));
|
|
7883
7883
|
}
|
|
7884
7884
|
}
|
|
7885
7885
|
})]
|
|
@@ -7970,7 +7970,7 @@ function Uw(e, t) {
|
|
|
7970
7970
|
ancestorScroll: p = !1,
|
|
7971
7971
|
bubbles: f,
|
|
7972
7972
|
capture: h
|
|
7973
|
-
} = t, m = Nc(), v = Ct(typeof a == "function" ? a : () => !1), T = typeof a == "function" ? v : a,
|
|
7973
|
+
} = t, m = Nc(), v = Ct(typeof a == "function" ? a : () => !1), T = typeof a == "function" ? v : a, y = j.useRef(!1), {
|
|
7974
7974
|
escapeKey: P,
|
|
7975
7975
|
outsidePress: B
|
|
7976
7976
|
} = Il(f), {
|
|
@@ -7982,14 +7982,14 @@ function Uw(e, t) {
|
|
|
7982
7982
|
return;
|
|
7983
7983
|
const A = (x = s.current.floatingContext) == null ? void 0 : x.nodeId, R = m ? ts(m.nodesRef.current, A) : [];
|
|
7984
7984
|
if (!P && (E.stopPropagation(), R.length > 0)) {
|
|
7985
|
-
let
|
|
7985
|
+
let b = !0;
|
|
7986
7986
|
if (R.forEach((C) => {
|
|
7987
7987
|
var D;
|
|
7988
7988
|
if ((D = C.context) != null && D.open && !C.context.dataRef.current.__escapeKeyBubbles) {
|
|
7989
|
-
|
|
7989
|
+
b = !1;
|
|
7990
7990
|
return;
|
|
7991
7991
|
}
|
|
7992
|
-
}), !
|
|
7992
|
+
}), !b)
|
|
7993
7993
|
return;
|
|
7994
7994
|
}
|
|
7995
7995
|
r(!1, mw(E) ? E.nativeEvent : E, "escape-key");
|
|
@@ -8004,24 +8004,24 @@ function Uw(e, t) {
|
|
|
8004
8004
|
var x;
|
|
8005
8005
|
const A = s.current.insideReactTree;
|
|
8006
8006
|
s.current.insideReactTree = !1;
|
|
8007
|
-
const R =
|
|
8008
|
-
if (
|
|
8007
|
+
const R = y.current;
|
|
8008
|
+
if (y.current = !1, u === "click" && R || A || typeof T == "function" && !T(E))
|
|
8009
8009
|
return;
|
|
8010
|
-
const
|
|
8011
|
-
let _ = me(
|
|
8010
|
+
const b = rr(E), C = "[" + $o("inert") + "]", D = Lt(o.floating).querySelectorAll(C);
|
|
8011
|
+
let _ = me(b) ? b : null;
|
|
8012
8012
|
for (; _ && !tn(_); ) {
|
|
8013
8013
|
const z = rn(_);
|
|
8014
8014
|
if (tn(z) || !me(z))
|
|
8015
8015
|
break;
|
|
8016
8016
|
_ = z;
|
|
8017
8017
|
}
|
|
8018
|
-
if (D.length && me(
|
|
8019
|
-
!mr(
|
|
8018
|
+
if (D.length && me(b) && !dw(b) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
|
|
8019
|
+
!mr(b, o.floating) && // If the target root element contains none of the markers, then the
|
|
8020
8020
|
// element was injected after the floating element rendered.
|
|
8021
8021
|
Array.from(D).every((z) => !mr(_, z)))
|
|
8022
8022
|
return;
|
|
8023
|
-
if (ze(
|
|
8024
|
-
const z = tn(
|
|
8023
|
+
if (ze(b) && S) {
|
|
8024
|
+
const z = tn(b), Z = ht(b), V = /auto|scroll/, X = z || V.test(Z.overflowX), ee = z || V.test(Z.overflowY), pe = X && b.clientWidth > 0 && b.scrollWidth > b.clientWidth, Pe = ee && b.clientHeight > 0 && b.scrollHeight > b.clientHeight, ie = Z.direction === "rtl", he = Pe && (ie ? E.offsetX <= b.offsetWidth - b.clientWidth : E.offsetX > b.clientWidth), be = pe && E.offsetY > b.clientHeight;
|
|
8025
8025
|
if (he || be)
|
|
8026
8026
|
return;
|
|
8027
8027
|
}
|
|
@@ -8073,18 +8073,18 @@ function Uw(e, t) {
|
|
|
8073
8073
|
Os() ? 5 : 0
|
|
8074
8074
|
);
|
|
8075
8075
|
}
|
|
8076
|
-
const
|
|
8077
|
-
c && (
|
|
8076
|
+
const b = Lt(o.floating);
|
|
8077
|
+
c && (b.addEventListener("keydown", L ? w : g, L), b.addEventListener("compositionstart", A), b.addEventListener("compositionend", R)), T && b.addEventListener(u, F ? N : $, F);
|
|
8078
8078
|
let C = [];
|
|
8079
8079
|
return p && (me(o.domReference) && (C = xn(o.domReference)), me(o.floating) && (C = C.concat(xn(o.floating))), !me(o.reference) && o.reference && o.reference.contextElement && (C = C.concat(xn(o.reference.contextElement)))), C = C.filter((D) => {
|
|
8080
8080
|
var _;
|
|
8081
|
-
return D !== ((_ =
|
|
8081
|
+
return D !== ((_ = b.defaultView) == null ? void 0 : _.visualViewport);
|
|
8082
8082
|
}), C.forEach((D) => {
|
|
8083
8083
|
D.addEventListener("scroll", x, {
|
|
8084
8084
|
passive: !0
|
|
8085
8085
|
});
|
|
8086
8086
|
}), () => {
|
|
8087
|
-
c && (
|
|
8087
|
+
c && (b.removeEventListener("keydown", L ? w : g, L), b.removeEventListener("compositionstart", A), b.removeEventListener("compositionend", R)), T && b.removeEventListener(u, F ? N : $, F), C.forEach((D) => {
|
|
8088
8088
|
D.removeEventListener("scroll", x);
|
|
8089
8089
|
}), window.clearTimeout(E);
|
|
8090
8090
|
};
|
|
@@ -8106,10 +8106,10 @@ function Uw(e, t) {
|
|
|
8106
8106
|
}), [g, r, l, d]), S = j.useMemo(() => ({
|
|
8107
8107
|
onKeyDown: g,
|
|
8108
8108
|
onMouseDown() {
|
|
8109
|
-
|
|
8109
|
+
y.current = !0;
|
|
8110
8110
|
},
|
|
8111
8111
|
onMouseUp() {
|
|
8112
|
-
|
|
8112
|
+
y.current = !0;
|
|
8113
8113
|
},
|
|
8114
8114
|
[_w[u]]: () => {
|
|
8115
8115
|
s.current.insideReactTree = !0;
|
|
@@ -8197,7 +8197,7 @@ function Ww(e) {
|
|
|
8197
8197
|
}), [f.refs, m, h]), T = j.useMemo(() => ({
|
|
8198
8198
|
...f.elements,
|
|
8199
8199
|
domReference: l
|
|
8200
|
-
}), [f.elements, l]),
|
|
8200
|
+
}), [f.elements, l]), y = j.useMemo(() => ({
|
|
8201
8201
|
...f,
|
|
8202
8202
|
...r,
|
|
8203
8203
|
refs: v,
|
|
@@ -8205,15 +8205,15 @@ function Ww(e) {
|
|
|
8205
8205
|
nodeId: t
|
|
8206
8206
|
}), [f, v, T, t, r]);
|
|
8207
8207
|
return kt(() => {
|
|
8208
|
-
r.dataRef.current.floatingContext =
|
|
8208
|
+
r.dataRef.current.floatingContext = y;
|
|
8209
8209
|
const P = p == null ? void 0 : p.nodesRef.current.find((B) => B.id === t);
|
|
8210
|
-
P && (P.context =
|
|
8210
|
+
P && (P.context = y);
|
|
8211
8211
|
}), j.useMemo(() => ({
|
|
8212
8212
|
...f,
|
|
8213
|
-
context:
|
|
8213
|
+
context: y,
|
|
8214
8214
|
refs: v,
|
|
8215
8215
|
elements: T
|
|
8216
|
-
}), [f, v, T,
|
|
8216
|
+
}), [f, v, T, y]);
|
|
8217
8217
|
}
|
|
8218
8218
|
function Ai() {
|
|
8219
8219
|
return uw() && vp();
|
|
@@ -8280,8 +8280,8 @@ function Hw(e, t) {
|
|
|
8280
8280
|
const h = f.relatedTarget, m = f.nativeEvent, v = me(h) && h.hasAttribute($o("focus-guard")) && h.getAttribute("data-type") === "outside";
|
|
8281
8281
|
l.current = window.setTimeout(() => {
|
|
8282
8282
|
var T;
|
|
8283
|
-
const
|
|
8284
|
-
!h &&
|
|
8283
|
+
const y = ba(i.domReference ? i.domReference.ownerDocument : document);
|
|
8284
|
+
!h && y === i.domReference || mr((T = s.current.floatingContext) == null ? void 0 : T.refs.floating.current, y) || mr(i.domReference, y) || v || r(!1, m, "focus");
|
|
8285
8285
|
});
|
|
8286
8286
|
}
|
|
8287
8287
|
}), [s, i.domReference, r, a]);
|
|
@@ -8359,8 +8359,8 @@ function qw(e, t) {
|
|
|
8359
8359
|
enabled: c = !0,
|
|
8360
8360
|
role: a = "dialog"
|
|
8361
8361
|
} = t, u = Rc(), l = ((n = s.domReference) == null ? void 0 : n.id) || u, d = j.useMemo(() => {
|
|
8362
|
-
var
|
|
8363
|
-
return ((
|
|
8362
|
+
var y;
|
|
8363
|
+
return ((y = hw(s.floating)) == null ? void 0 : y.id) || i;
|
|
8364
8364
|
}, [s.floating, i]), p = (r = Gw.get(a)) != null ? r : a, h = Oc() != null, m = j.useMemo(() => p === "tooltip" || a === "label" ? {
|
|
8365
8365
|
["aria-" + (a === "label" ? "labelledby" : "describedby")]: o ? d : void 0
|
|
8366
8366
|
} : {
|
|
@@ -8383,23 +8383,23 @@ function qw(e, t) {
|
|
|
8383
8383
|
"aria-autocomplete": "list"
|
|
8384
8384
|
}
|
|
8385
8385
|
}, [p, d, h, o, l, a]), v = j.useMemo(() => {
|
|
8386
|
-
const
|
|
8386
|
+
const y = {
|
|
8387
8387
|
id: d,
|
|
8388
8388
|
...p && {
|
|
8389
8389
|
role: p
|
|
8390
8390
|
}
|
|
8391
8391
|
};
|
|
8392
|
-
return p === "tooltip" || a === "label" ?
|
|
8393
|
-
...
|
|
8392
|
+
return p === "tooltip" || a === "label" ? y : {
|
|
8393
|
+
...y,
|
|
8394
8394
|
...p === "menu" && {
|
|
8395
8395
|
"aria-labelledby": l
|
|
8396
8396
|
}
|
|
8397
8397
|
};
|
|
8398
|
-
}, [p, d, l, a]), T = j.useCallback((
|
|
8398
|
+
}, [p, d, l, a]), T = j.useCallback((y) => {
|
|
8399
8399
|
let {
|
|
8400
8400
|
active: P,
|
|
8401
8401
|
selected: B
|
|
8402
|
-
} =
|
|
8402
|
+
} = y;
|
|
8403
8403
|
const L = {
|
|
8404
8404
|
role: "option",
|
|
8405
8405
|
...P && {
|
|
@@ -8511,11 +8511,11 @@ const gs = ({
|
|
|
8511
8511
|
enabled: a.includes("focus")
|
|
8512
8512
|
}), T = kw(h, {
|
|
8513
8513
|
enabled: a.includes("click")
|
|
8514
|
-
}),
|
|
8514
|
+
}), y = Uw(h), P = qw(h, { role: "tooltip" }), { getReferenceProps: B, getFloatingProps: L } = Vw([
|
|
8515
8515
|
m,
|
|
8516
8516
|
v,
|
|
8517
8517
|
T,
|
|
8518
|
-
|
|
8518
|
+
y,
|
|
8519
8519
|
P
|
|
8520
8520
|
]);
|
|
8521
8521
|
return i ? /* @__PURE__ */ I.jsx(I.Fragment, { children: e }) : /* @__PURE__ */ I.jsxs(I.Fragment, { children: [
|
|
@@ -8683,8 +8683,8 @@ const gs = ({
|
|
|
8683
8683
|
if (!e || e.length === 0) return "";
|
|
8684
8684
|
const v = t || ((P = e[0]) == null ? void 0 : P.chainId), T = e.find((B) => B.chainId === v);
|
|
8685
8685
|
if (!T || !T.tokenList || T.tokenList.length === 0) return "";
|
|
8686
|
-
const
|
|
8687
|
-
return (
|
|
8686
|
+
const y = T.tokenList.find((B) => B.tokenAddress === n) || T.tokenList[0];
|
|
8687
|
+
return (y == null ? void 0 : y.token) || "";
|
|
8688
8688
|
}), f = e && e.length > 0 ? e.find((v) => v.chainId === u) || e[0] : null, h = (m = f == null ? void 0 : f.tokenList) == null ? void 0 : m.find(
|
|
8689
8689
|
(v) => v.token === d
|
|
8690
8690
|
);
|
|
@@ -11820,7 +11820,7 @@ function v2(e) {
|
|
|
11820
11820
|
return Ws(`0x${t}`);
|
|
11821
11821
|
}
|
|
11822
11822
|
async function w2({ hash: e, signature: t }) {
|
|
11823
|
-
const n = jt(e) ? e : an(e), { secp256k1: r } = await Promise.resolve().then(() =>
|
|
11823
|
+
const n = jt(e) ? e : an(e), { secp256k1: r } = await Promise.resolve().then(() => sP);
|
|
11824
11824
|
return `0x${(() => {
|
|
11825
11825
|
if (typeof t == "object" && "r" in t && "s" in t) {
|
|
11826
11826
|
const { r: u, s: l, v: d, yParity: p } = t, f = Number(p ?? d), h = Xl(f);
|
|
@@ -12746,17 +12746,17 @@ async function Fh(e, t) {
|
|
|
12746
12746
|
if ((u.includes("blobVersionedHashes") || u.includes("sidecars")) && r && i) {
|
|
12747
12747
|
const T = Ih({ blobs: r, kzg: i });
|
|
12748
12748
|
if (u.includes("blobVersionedHashes")) {
|
|
12749
|
-
const
|
|
12749
|
+
const y = G2({
|
|
12750
12750
|
commitments: T,
|
|
12751
12751
|
to: "hex"
|
|
12752
12752
|
});
|
|
12753
|
-
p.blobVersionedHashes =
|
|
12753
|
+
p.blobVersionedHashes = y;
|
|
12754
12754
|
}
|
|
12755
12755
|
if (u.includes("sidecars")) {
|
|
12756
|
-
const
|
|
12756
|
+
const y = Ch({ blobs: r, commitments: T, kzg: i }), P = Y2({
|
|
12757
12757
|
blobs: r,
|
|
12758
12758
|
commitments: T,
|
|
12759
|
-
proofs:
|
|
12759
|
+
proofs: y,
|
|
12760
12760
|
to: "hex"
|
|
12761
12761
|
});
|
|
12762
12762
|
p.sidecars = P;
|
|
@@ -12768,15 +12768,15 @@ async function Fh(e, t) {
|
|
|
12768
12768
|
} catch {
|
|
12769
12769
|
let T = tf.get(e.uid);
|
|
12770
12770
|
if (typeof T > "u") {
|
|
12771
|
-
const
|
|
12772
|
-
T = typeof (
|
|
12771
|
+
const y = await h();
|
|
12772
|
+
T = typeof (y == null ? void 0 : y.baseFeePerGas) == "bigint", tf.set(e.uid, T);
|
|
12773
12773
|
}
|
|
12774
12774
|
p.type = T ? "eip1559" : "legacy";
|
|
12775
12775
|
}
|
|
12776
12776
|
if (u.includes("fees"))
|
|
12777
12777
|
if (p.type !== "legacy" && p.type !== "eip2930") {
|
|
12778
12778
|
if (typeof p.maxFeePerGas > "u" || typeof p.maxPriorityFeePerGas > "u") {
|
|
12779
|
-
const T = await h(), { maxFeePerGas:
|
|
12779
|
+
const T = await h(), { maxFeePerGas: y, maxPriorityFeePerGas: P } = await Ma(e, {
|
|
12780
12780
|
block: T,
|
|
12781
12781
|
chain: o,
|
|
12782
12782
|
request: p
|
|
@@ -12785,19 +12785,19 @@ async function Fh(e, t) {
|
|
|
12785
12785
|
throw new B2({
|
|
12786
12786
|
maxPriorityFeePerGas: P
|
|
12787
12787
|
});
|
|
12788
|
-
p.maxPriorityFeePerGas = P, p.maxFeePerGas =
|
|
12788
|
+
p.maxPriorityFeePerGas = P, p.maxFeePerGas = y;
|
|
12789
12789
|
}
|
|
12790
12790
|
} else {
|
|
12791
12791
|
if (typeof t.maxFeePerGas < "u" || typeof t.maxPriorityFeePerGas < "u")
|
|
12792
12792
|
throw new Vc();
|
|
12793
12793
|
if (typeof t.gasPrice > "u") {
|
|
12794
|
-
const T = await h(), { gasPrice:
|
|
12794
|
+
const T = await h(), { gasPrice: y } = await Ma(e, {
|
|
12795
12795
|
block: T,
|
|
12796
12796
|
chain: o,
|
|
12797
12797
|
request: p,
|
|
12798
12798
|
type: "legacy"
|
|
12799
12799
|
});
|
|
12800
|
-
p.gasPrice =
|
|
12800
|
+
p.gasPrice = y;
|
|
12801
12801
|
}
|
|
12802
12802
|
}
|
|
12803
12803
|
return u.includes("gas") && typeof s > "u" && (p.gas = await te(e, Zc, "estimateGas")({
|
|
@@ -12817,17 +12817,17 @@ async function Zc(e, t) {
|
|
|
12817
12817
|
const { account: n = e.account } = t, r = n ? Rt(n) : void 0;
|
|
12818
12818
|
try {
|
|
12819
12819
|
let E = function(A) {
|
|
12820
|
-
const { block: R, request:
|
|
12820
|
+
const { block: R, request: b, rpcStateOverride: C } = A;
|
|
12821
12821
|
return e.request({
|
|
12822
12822
|
method: "eth_estimateGas",
|
|
12823
12823
|
params: C ? [
|
|
12824
|
-
|
|
12824
|
+
b,
|
|
12825
12825
|
R ?? e.experimental_blockTag ?? "latest",
|
|
12826
12826
|
C
|
|
12827
|
-
] : R ? [
|
|
12827
|
+
] : R ? [b, R] : [b]
|
|
12828
12828
|
});
|
|
12829
12829
|
};
|
|
12830
|
-
const { accessList: c, authorizationList: a, blobs: u, blobVersionedHashes: l, blockNumber: d, blockTag: p, data: f, gas: h, gasPrice: m, maxFeePerBlobGas: v, maxFeePerGas: T, maxPriorityFeePerGas:
|
|
12830
|
+
const { accessList: c, authorizationList: a, blobs: u, blobVersionedHashes: l, blockNumber: d, blockTag: p, data: f, gas: h, gasPrice: m, maxFeePerBlobGas: v, maxFeePerGas: T, maxPriorityFeePerGas: y, nonce: P, value: B, stateOverride: L, ...F } = await Fh(e, {
|
|
12831
12831
|
...t,
|
|
12832
12832
|
parameters: (
|
|
12833
12833
|
// Some RPC Providers do not compute versioned hashes from blobs. We will need
|
|
@@ -12858,15 +12858,15 @@ async function Zc(e, t) {
|
|
|
12858
12858
|
gasPrice: m,
|
|
12859
12859
|
maxFeePerBlobGas: v,
|
|
12860
12860
|
maxFeePerGas: T,
|
|
12861
|
-
maxPriorityFeePerGas:
|
|
12861
|
+
maxPriorityFeePerGas: y,
|
|
12862
12862
|
nonce: P,
|
|
12863
12863
|
to: $,
|
|
12864
12864
|
value: B
|
|
12865
12865
|
});
|
|
12866
12866
|
let x = BigInt(await E({ block: g, request: S, rpcStateOverride: w }));
|
|
12867
12867
|
if (a) {
|
|
12868
|
-
const A = await kh(e, { address: S.from }), R = await Promise.all(a.map(async (
|
|
12869
|
-
const { address: C } =
|
|
12868
|
+
const A = await kh(e, { address: S.from }), R = await Promise.all(a.map(async (b) => {
|
|
12869
|
+
const { address: C } = b, D = await E({
|
|
12870
12870
|
block: g,
|
|
12871
12871
|
request: {
|
|
12872
12872
|
authorizationList: void 0,
|
|
@@ -12879,7 +12879,7 @@ async function Zc(e, t) {
|
|
|
12879
12879
|
}).catch(() => 100000n);
|
|
12880
12880
|
return 2n * BigInt(D);
|
|
12881
12881
|
}));
|
|
12882
|
-
x += R.reduce((
|
|
12882
|
+
x += R.reduce((b, C) => b + C, 0n);
|
|
12883
12883
|
}
|
|
12884
12884
|
return x;
|
|
12885
12885
|
} catch (c) {
|
|
@@ -12931,15 +12931,15 @@ function Yc(e) {
|
|
|
12931
12931
|
throw new Wp(i, { docsPath: nf });
|
|
12932
12932
|
const { name: u, inputs: l } = a, d = l == null ? void 0 : l.some((m) => !("name" in m && m.name)), p = d ? [] : {}, f = l.map((m, v) => [m, v]).filter(([m]) => "indexed" in m && m.indexed);
|
|
12933
12933
|
for (let m = 0; m < f.length; m++) {
|
|
12934
|
-
const [v, T] = f[m],
|
|
12935
|
-
if (!
|
|
12934
|
+
const [v, T] = f[m], y = c[m];
|
|
12935
|
+
if (!y)
|
|
12936
12936
|
throw new js({
|
|
12937
12937
|
abiItem: a,
|
|
12938
12938
|
param: v
|
|
12939
12939
|
});
|
|
12940
12940
|
p[d ? T : v.name || T] = e6({
|
|
12941
12941
|
param: v,
|
|
12942
|
-
value:
|
|
12942
|
+
value: y
|
|
12943
12943
|
});
|
|
12944
12944
|
}
|
|
12945
12945
|
const h = l.filter((m) => !("indexed" in m && m.indexed));
|
|
@@ -14167,7 +14167,7 @@ function r0({ fn: e, id: t, shouldSplitBatch: n, wait: r = 0, sort: o }) {
|
|
|
14167
14167
|
}
|
|
14168
14168
|
async function Ys(e, t) {
|
|
14169
14169
|
var S, E, x, A;
|
|
14170
|
-
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: u, code: l, data: d, factory: p, factoryData: f, gas: h, gasPrice: m, maxFeePerBlobGas: v, maxFeePerGas: T, maxPriorityFeePerGas:
|
|
14170
|
+
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: u, code: l, data: d, factory: p, factoryData: f, gas: h, gasPrice: m, maxFeePerBlobGas: v, maxFeePerGas: T, maxPriorityFeePerGas: y, nonce: P, to: B, value: L, stateOverride: F, ...k } = t, g = n ? Rt(n) : void 0;
|
|
14171
14171
|
if (l && (p || f))
|
|
14172
14172
|
throw new H("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
|
|
14173
14173
|
if (l && B)
|
|
@@ -14183,7 +14183,7 @@ async function Ys(e, t) {
|
|
|
14183
14183
|
}) : d;
|
|
14184
14184
|
try {
|
|
14185
14185
|
No(t);
|
|
14186
|
-
const
|
|
14186
|
+
const b = (typeof s == "bigint" ? J(s) : void 0) || i, C = u ? Yh(u) : void 0, D = Hc(F), _ = (A = (x = (E = e.chain) == null ? void 0 : E.formatters) == null ? void 0 : x.transactionRequest) == null ? void 0 : A.format, W = (_ || Zs)({
|
|
14187
14187
|
// Pick out extra data that might exist on the chain's transaction request type.
|
|
14188
14188
|
...Wc(k, { format: _ }),
|
|
14189
14189
|
from: g == null ? void 0 : g.address,
|
|
@@ -14195,7 +14195,7 @@ async function Ys(e, t) {
|
|
|
14195
14195
|
gasPrice: m,
|
|
14196
14196
|
maxFeePerBlobGas: v,
|
|
14197
14197
|
maxFeePerGas: T,
|
|
14198
|
-
maxPriorityFeePerGas:
|
|
14198
|
+
maxPriorityFeePerGas: y,
|
|
14199
14199
|
nonce: P,
|
|
14200
14200
|
to: N ? void 0 : B,
|
|
14201
14201
|
value: L
|
|
@@ -14214,7 +14214,7 @@ async function Ys(e, t) {
|
|
|
14214
14214
|
const q = (() => {
|
|
14215
14215
|
const Z = [
|
|
14216
14216
|
W,
|
|
14217
|
-
|
|
14217
|
+
b
|
|
14218
14218
|
];
|
|
14219
14219
|
return D && C ? [...Z, D, C] : D ? [...Z, D] : C ? [...Z, {}, C] : Z;
|
|
14220
14220
|
})(), z = await e.request({
|
|
@@ -14223,10 +14223,10 @@ async function Ys(e, t) {
|
|
|
14223
14223
|
});
|
|
14224
14224
|
return z === "0x" ? { data: void 0 } : { data: z };
|
|
14225
14225
|
} catch (R) {
|
|
14226
|
-
const
|
|
14227
|
-
if (e.ccipRead !== !1 && (
|
|
14228
|
-
return { data: await C(e, { data:
|
|
14229
|
-
throw N && (
|
|
14226
|
+
const b = D6(R), { offchainLookup: C, offchainLookupSignature: D } = await import("./ccip-CzJY05H7.mjs");
|
|
14227
|
+
if (e.ccipRead !== !1 && (b == null ? void 0 : b.slice(0, 10)) === D && B)
|
|
14228
|
+
return { data: await C(e, { data: b, to: B }) };
|
|
14229
|
+
throw N && (b == null ? void 0 : b.slice(0, 10)) === "0x101bb98d" ? new m2({ factory: p }) : t0(R, {
|
|
14230
14230
|
...t,
|
|
14231
14231
|
account: g,
|
|
14232
14232
|
chain: e.chain
|
|
@@ -14254,14 +14254,14 @@ async function B6(e, t) {
|
|
|
14254
14254
|
id: `${e.uid}.${d}`,
|
|
14255
14255
|
wait: r,
|
|
14256
14256
|
shouldSplitBatch(v) {
|
|
14257
|
-
return v.reduce((
|
|
14257
|
+
return v.reduce((y, { data: P }) => y + (P.length - 2), 0) > n * 2;
|
|
14258
14258
|
},
|
|
14259
14259
|
fn: async (v) => {
|
|
14260
14260
|
const T = v.map((B) => ({
|
|
14261
14261
|
allowFailure: !0,
|
|
14262
14262
|
callData: B.data,
|
|
14263
14263
|
target: B.to
|
|
14264
|
-
})),
|
|
14264
|
+
})), y = Vt({
|
|
14265
14265
|
abi: Fa,
|
|
14266
14266
|
args: [T],
|
|
14267
14267
|
functionName: "aggregate3"
|
|
@@ -14269,7 +14269,7 @@ async function B6(e, t) {
|
|
|
14269
14269
|
method: "eth_call",
|
|
14270
14270
|
params: [
|
|
14271
14271
|
{
|
|
14272
|
-
data:
|
|
14272
|
+
data: y,
|
|
14273
14273
|
to: u
|
|
14274
14274
|
},
|
|
14275
14275
|
d
|
|
@@ -14497,7 +14497,7 @@ function H6(e, t) {
|
|
|
14497
14497
|
v,
|
|
14498
14498
|
c
|
|
14499
14499
|
]);
|
|
14500
|
-
return $n(T, { onLogs: u, onError: a }, (
|
|
14500
|
+
return $n(T, { onLogs: u, onError: a }, (y) => {
|
|
14501
14501
|
let P;
|
|
14502
14502
|
c !== void 0 && (P = c - 1n);
|
|
14503
14503
|
let B, L = !1;
|
|
@@ -14537,12 +14537,12 @@ function H6(e, t) {
|
|
|
14537
14537
|
if (g.length === 0)
|
|
14538
14538
|
return;
|
|
14539
14539
|
if (s)
|
|
14540
|
-
|
|
14540
|
+
y.onLogs(g);
|
|
14541
14541
|
else
|
|
14542
14542
|
for (const w of g)
|
|
14543
|
-
|
|
14543
|
+
y.onLogs([w]);
|
|
14544
14544
|
} catch (g) {
|
|
14545
|
-
B && g instanceof Wn && (L = !1), (k =
|
|
14545
|
+
B && g instanceof Wn && (L = !1), (k = y.onError) == null || k.call(y, g);
|
|
14546
14546
|
}
|
|
14547
14547
|
}, {
|
|
14548
14548
|
emitOnBegin: !0,
|
|
@@ -14563,7 +14563,7 @@ function H6(e, t) {
|
|
|
14563
14563
|
d,
|
|
14564
14564
|
v
|
|
14565
14565
|
]);
|
|
14566
|
-
let
|
|
14566
|
+
let y = !0, P = () => y = !1;
|
|
14567
14567
|
return $n(T, { onLogs: u, onError: a }, (B) => ((async () => {
|
|
14568
14568
|
try {
|
|
14569
14569
|
const L = (() => {
|
|
@@ -14580,7 +14580,7 @@ function H6(e, t) {
|
|
|
14580
14580
|
params: ["logs", { address: r, topics: F }],
|
|
14581
14581
|
onData(g) {
|
|
14582
14582
|
var $;
|
|
14583
|
-
if (!
|
|
14583
|
+
if (!y)
|
|
14584
14584
|
return;
|
|
14585
14585
|
const w = g.result;
|
|
14586
14586
|
try {
|
|
@@ -14613,7 +14613,7 @@ function H6(e, t) {
|
|
|
14613
14613
|
(w = B.onError) == null || w.call(B, g);
|
|
14614
14614
|
}
|
|
14615
14615
|
});
|
|
14616
|
-
P = k,
|
|
14616
|
+
P = k, y || P();
|
|
14617
14617
|
} catch (L) {
|
|
14618
14618
|
a == null || a(L);
|
|
14619
14619
|
}
|
|
@@ -14694,16 +14694,16 @@ function Z6(e) {
|
|
|
14694
14694
|
uid: o0(),
|
|
14695
14695
|
...c ? { experimental_blockTag: c } : {}
|
|
14696
14696
|
};
|
|
14697
|
-
function
|
|
14697
|
+
function y(P) {
|
|
14698
14698
|
return (B) => {
|
|
14699
14699
|
const L = B(P);
|
|
14700
14700
|
for (const k in T)
|
|
14701
14701
|
delete L[k];
|
|
14702
14702
|
const F = { ...P, ...L };
|
|
14703
|
-
return Object.assign(F, { extend:
|
|
14703
|
+
return Object.assign(F, { extend: y(F) });
|
|
14704
14704
|
};
|
|
14705
14705
|
}
|
|
14706
|
-
return Object.assign(T, { extend:
|
|
14706
|
+
return Object.assign(T, { extend: y(T) });
|
|
14707
14707
|
}
|
|
14708
14708
|
const Yo = /* @__PURE__ */ new Lc(8192);
|
|
14709
14709
|
function K6(e, { enabled: t = !0, id: n }) {
|
|
@@ -14829,15 +14829,7 @@ function Q6({ key: e, methods: t, name: n, request: r, retryCount: o = 3, retryD
|
|
|
14829
14829
|
value: a
|
|
14830
14830
|
};
|
|
14831
14831
|
}
|
|
14832
|
-
|
|
14833
|
-
constructor() {
|
|
14834
|
-
super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.", {
|
|
14835
|
-
docsPath: "/docs/clients/intro",
|
|
14836
|
-
name: "UrlRequiredError"
|
|
14837
|
-
});
|
|
14838
|
-
}
|
|
14839
|
-
}
|
|
14840
|
-
function e5(e, { errorInstance: t = new Error("timed out"), timeout: n, signal: r }) {
|
|
14832
|
+
function J6(e, { errorInstance: t = new Error("timed out"), timeout: n, signal: r }) {
|
|
14841
14833
|
return new Promise((o, s) => {
|
|
14842
14834
|
(async () => {
|
|
14843
14835
|
let i;
|
|
@@ -14854,7 +14846,7 @@ function e5(e, { errorInstance: t = new Error("timed out"), timeout: n, signal:
|
|
|
14854
14846
|
})();
|
|
14855
14847
|
});
|
|
14856
14848
|
}
|
|
14857
|
-
function
|
|
14849
|
+
function e5() {
|
|
14858
14850
|
return {
|
|
14859
14851
|
current: 0,
|
|
14860
14852
|
take() {
|
|
@@ -14865,8 +14857,8 @@ function t5() {
|
|
|
14865
14857
|
}
|
|
14866
14858
|
};
|
|
14867
14859
|
}
|
|
14868
|
-
const pf = /* @__PURE__ */
|
|
14869
|
-
function
|
|
14860
|
+
const pf = /* @__PURE__ */ e5();
|
|
14861
|
+
function t5(e, t = {}) {
|
|
14870
14862
|
return {
|
|
14871
14863
|
async request(n) {
|
|
14872
14864
|
var d;
|
|
@@ -14875,7 +14867,7 @@ function n5(e, t = {}) {
|
|
|
14875
14867
|
...n.fetchOptions ?? {}
|
|
14876
14868
|
}, { headers: a, method: u, signal: l } = c;
|
|
14877
14869
|
try {
|
|
14878
|
-
const p = await
|
|
14870
|
+
const p = await J6(async ({ signal: h }) => {
|
|
14879
14871
|
const m = {
|
|
14880
14872
|
...c,
|
|
14881
14873
|
body: Array.isArray(r) ? De(r.map((P) => ({
|
|
@@ -14933,13 +14925,10 @@ function n5(e, t = {}) {
|
|
|
14933
14925
|
}
|
|
14934
14926
|
};
|
|
14935
14927
|
}
|
|
14936
|
-
function
|
|
14928
|
+
function n5(e, t = {}) {
|
|
14937
14929
|
const { batch: n, fetchOptions: r, key: o = "http", methods: s, name: i = "HTTP JSON-RPC", onFetchRequest: c, onFetchResponse: a, retryDelay: u, raw: l } = t;
|
|
14938
14930
|
return ({ chain: d, retryCount: p, timeout: f }) => {
|
|
14939
|
-
const { batchSize: h = 1e3, wait: m = 0 } = typeof n == "object" ? n : {}, v = t.retryCount ?? p, T = f ?? t.timeout ?? 1e4,
|
|
14940
|
-
if (!b)
|
|
14941
|
-
throw new J6();
|
|
14942
|
-
const P = n5(b, {
|
|
14931
|
+
const { batchSize: h = 1e3, wait: m = 0 } = typeof n == "object" ? n : {}, v = t.retryCount ?? p, T = f ?? t.timeout ?? 1e4, y = e, P = t5(y, {
|
|
14943
14932
|
fetchOptions: r,
|
|
14944
14933
|
onRequest: c,
|
|
14945
14934
|
onResponse: a,
|
|
@@ -14951,7 +14940,7 @@ function r5(e, t = {}) {
|
|
|
14951
14940
|
name: i,
|
|
14952
14941
|
async request({ method: B, params: L }) {
|
|
14953
14942
|
const F = { method: B, params: L }, { schedule: k } = r0({
|
|
14954
|
-
id:
|
|
14943
|
+
id: y,
|
|
14955
14944
|
wait: m,
|
|
14956
14945
|
shouldSplitBatch(N) {
|
|
14957
14946
|
return N.length > h;
|
|
@@ -14971,7 +14960,7 @@ function r5(e, t = {}) {
|
|
|
14971
14960
|
throw new Uc({
|
|
14972
14961
|
body: F,
|
|
14973
14962
|
error: w,
|
|
14974
|
-
url:
|
|
14963
|
+
url: y
|
|
14975
14964
|
});
|
|
14976
14965
|
return $;
|
|
14977
14966
|
},
|
|
@@ -14981,7 +14970,7 @@ function r5(e, t = {}) {
|
|
|
14981
14970
|
type: "http"
|
|
14982
14971
|
}, {
|
|
14983
14972
|
fetchOptions: r,
|
|
14984
|
-
url:
|
|
14973
|
+
url: y
|
|
14985
14974
|
});
|
|
14986
14975
|
};
|
|
14987
14976
|
}
|
|
@@ -14992,7 +14981,7 @@ function iu(e, t) {
|
|
|
14992
14981
|
const n = e.walk((u) => u instanceof Aa);
|
|
14993
14982
|
return n instanceof Aa ? !!(((r = n.data) == null ? void 0 : r.errorName) === "ResolverNotFound" || ((o = n.data) == null ? void 0 : o.errorName) === "ResolverWildcardNotSupported" || ((s = n.data) == null ? void 0 : s.errorName) === "ResolverNotContract" || ((i = n.data) == null ? void 0 : i.errorName) === "ResolverError" || ((c = n.data) == null ? void 0 : c.errorName) === "HttpError" || (a = n.reason) != null && a.includes("Wildcard on non-extended resolvers is not supported") || t === "reverse" && n.reason === hh[50]) : !1;
|
|
14994
14983
|
}
|
|
14995
|
-
function
|
|
14984
|
+
function r5(e) {
|
|
14996
14985
|
const { abi: t, data: n } = e, r = vr(n, 0, 4), o = t.find((s) => s.type === "function" && r === To(Pt(s)));
|
|
14997
14986
|
if (!o)
|
|
14998
14987
|
throw new Wx(r, {
|
|
@@ -15025,7 +15014,7 @@ function hf(e) {
|
|
|
15025
15014
|
return Nr([i, c]);
|
|
15026
15015
|
}
|
|
15027
15016
|
const ji = "/docs/contract/encodeFunctionResult";
|
|
15028
|
-
function
|
|
15017
|
+
function o5(e) {
|
|
15029
15018
|
const { abi: t, functionName: n, result: r } = e;
|
|
15030
15019
|
let o = t[0];
|
|
15031
15020
|
if (n) {
|
|
@@ -15050,21 +15039,21 @@ function s5(e) {
|
|
|
15050
15039
|
return Tn(o.outputs, s);
|
|
15051
15040
|
}
|
|
15052
15041
|
const au = "x-batch-gateway:true";
|
|
15053
|
-
async function
|
|
15054
|
-
const { data: t, ccipRequest: n } = e, { args: [r] } =
|
|
15042
|
+
async function s5(e) {
|
|
15043
|
+
const { data: t, ccipRequest: n } = e, { args: [r] } = r5({ abi: ka, data: t }), o = [], s = [];
|
|
15055
15044
|
return await Promise.all(r.map(async (i, c) => {
|
|
15056
15045
|
try {
|
|
15057
|
-
s[c] = i.urls.includes(au) ? await
|
|
15046
|
+
s[c] = i.urls.includes(au) ? await s5({ data: i.data, ccipRequest: n }) : await n(i), o[c] = !1;
|
|
15058
15047
|
} catch (a) {
|
|
15059
|
-
o[c] = !0, s[c] =
|
|
15048
|
+
o[c] = !0, s[c] = i5(a);
|
|
15060
15049
|
}
|
|
15061
|
-
})),
|
|
15050
|
+
})), o5({
|
|
15062
15051
|
abi: ka,
|
|
15063
15052
|
functionName: "query",
|
|
15064
15053
|
result: [o, s]
|
|
15065
15054
|
});
|
|
15066
15055
|
}
|
|
15067
|
-
function
|
|
15056
|
+
function i5(e) {
|
|
15068
15057
|
return e.name === "HttpRequestError" && e.status ? hf({
|
|
15069
15058
|
abi: ka,
|
|
15070
15059
|
errorName: "HttpError",
|
|
@@ -15092,10 +15081,10 @@ function rs(e) {
|
|
|
15092
15081
|
}
|
|
15093
15082
|
return Ne(t);
|
|
15094
15083
|
}
|
|
15095
|
-
function
|
|
15084
|
+
function a5(e) {
|
|
15096
15085
|
return `[${e.slice(2)}]`;
|
|
15097
15086
|
}
|
|
15098
|
-
function
|
|
15087
|
+
function c5(e) {
|
|
15099
15088
|
const t = new Uint8Array(32).fill(0);
|
|
15100
15089
|
return e ? s0(e) || Me(Fn(e)) : Ne(t);
|
|
15101
15090
|
}
|
|
@@ -15108,11 +15097,11 @@ function Js(e) {
|
|
|
15108
15097
|
const o = t.split(".");
|
|
15109
15098
|
for (let s = 0; s < o.length; s++) {
|
|
15110
15099
|
let i = Fn(o[s]);
|
|
15111
|
-
i.byteLength > 255 && (i = Fn(c5(
|
|
15100
|
+
i.byteLength > 255 && (i = Fn(a5(c5(o[s])))), n[r] = i.length, n.set(i, r + 1), r += i.length + 1;
|
|
15112
15101
|
}
|
|
15113
15102
|
return n.byteLength !== r + 1 ? n.slice(0, r + 1) : n;
|
|
15114
15103
|
}
|
|
15115
|
-
async function
|
|
15104
|
+
async function u5(e, t) {
|
|
15116
15105
|
const { blockNumber: n, blockTag: r, coinType: o, name: s, gatewayUrls: i, strict: c } = t, { chain: a } = e, u = (() => {
|
|
15117
15106
|
if (t.universalResolverAddress)
|
|
15118
15107
|
return t.universalResolverAddress;
|
|
@@ -15160,7 +15149,7 @@ async function l5(e, t) {
|
|
|
15160
15149
|
throw d;
|
|
15161
15150
|
}
|
|
15162
15151
|
}
|
|
15163
|
-
class
|
|
15152
|
+
class l5 extends H {
|
|
15164
15153
|
constructor({ data: t }) {
|
|
15165
15154
|
super("Unable to extract image from metadata. The metadata may be malformed or invalid.", {
|
|
15166
15155
|
metaMessages: [
|
|
@@ -15184,13 +15173,13 @@ class cu extends H {
|
|
|
15184
15173
|
super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`, { name: "EnsAvatarUriResolutionError" });
|
|
15185
15174
|
}
|
|
15186
15175
|
}
|
|
15187
|
-
class
|
|
15176
|
+
class f5 extends H {
|
|
15188
15177
|
constructor({ namespace: t }) {
|
|
15189
15178
|
super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`, { name: "EnsAvatarUnsupportedNamespaceError" });
|
|
15190
15179
|
}
|
|
15191
15180
|
}
|
|
15192
|
-
const
|
|
15193
|
-
async function
|
|
15181
|
+
const d5 = /(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/, p5 = /^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/, h5 = /^data:([a-zA-Z\-/+]*);base64,([^"].*)/, m5 = /^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;
|
|
15182
|
+
async function g5(e) {
|
|
15194
15183
|
try {
|
|
15195
15184
|
const t = await fetch(e, { method: "HEAD" });
|
|
15196
15185
|
if (t.status === 200) {
|
|
@@ -15213,10 +15202,10 @@ function mf(e, t) {
|
|
|
15213
15202
|
return e ? e.endsWith("/") ? e.slice(0, -1) : e : t;
|
|
15214
15203
|
}
|
|
15215
15204
|
function i0({ uri: e, gatewayUrls: t }) {
|
|
15216
|
-
const n =
|
|
15205
|
+
const n = h5.test(e);
|
|
15217
15206
|
if (n)
|
|
15218
15207
|
return { uri: e, isOnChain: !0, isEncoded: n };
|
|
15219
|
-
const r = mf(t == null ? void 0 : t.ipfs, "https://ipfs.io"), o = mf(t == null ? void 0 : t.arweave, "https://arweave.net"), s = e.match(
|
|
15208
|
+
const r = mf(t == null ? void 0 : t.ipfs, "https://ipfs.io"), o = mf(t == null ? void 0 : t.arweave, "https://arweave.net"), s = e.match(d5), { protocol: i, subpath: c, target: a, subtarget: u = "" } = (s == null ? void 0 : s.groups) || {}, l = i === "ipns:/" || c === "ipns/", d = i === "ipfs:/" || c === "ipfs/" || p5.test(e);
|
|
15220
15209
|
if (e.startsWith("http") && !l && !d) {
|
|
15221
15210
|
let f = e;
|
|
15222
15211
|
return t != null && t.arweave && (f = e.replace(/https:\/\/arweave.net/g, t == null ? void 0 : t.arweave)), { uri: f, isOnChain: !1, isEncoded: !1 };
|
|
@@ -15233,7 +15222,7 @@ function i0({ uri: e, gatewayUrls: t }) {
|
|
|
15233
15222
|
isOnChain: !1,
|
|
15234
15223
|
isEncoded: !1
|
|
15235
15224
|
};
|
|
15236
|
-
let p = e.replace(
|
|
15225
|
+
let p = e.replace(m5, "");
|
|
15237
15226
|
if (p.startsWith("<svg") && (p = `data:image/svg+xml;base64,${btoa(p)}`), p.startsWith("data:") || p.startsWith("{"))
|
|
15238
15227
|
return {
|
|
15239
15228
|
uri: p,
|
|
@@ -15244,10 +15233,10 @@ function i0({ uri: e, gatewayUrls: t }) {
|
|
|
15244
15233
|
}
|
|
15245
15234
|
function a0(e) {
|
|
15246
15235
|
if (typeof e != "object" || !("image" in e) && !("image_url" in e) && !("image_data" in e))
|
|
15247
|
-
throw new
|
|
15236
|
+
throw new l5({ data: e });
|
|
15248
15237
|
return e.image || e.image_url || e.image_data;
|
|
15249
15238
|
}
|
|
15250
|
-
async function
|
|
15239
|
+
async function b5({ gatewayUrls: e, uri: t }) {
|
|
15251
15240
|
try {
|
|
15252
15241
|
const n = await fetch(t).then((o) => o.json());
|
|
15253
15242
|
return await uu({
|
|
@@ -15260,11 +15249,11 @@ async function y5({ gatewayUrls: e, uri: t }) {
|
|
|
15260
15249
|
}
|
|
15261
15250
|
async function uu({ gatewayUrls: e, uri: t }) {
|
|
15262
15251
|
const { uri: n, isOnChain: r } = i0({ uri: t, gatewayUrls: e });
|
|
15263
|
-
if (r || await
|
|
15252
|
+
if (r || await g5(n))
|
|
15264
15253
|
return n;
|
|
15265
15254
|
throw new cu({ uri: t });
|
|
15266
15255
|
}
|
|
15267
|
-
function
|
|
15256
|
+
function y5(e) {
|
|
15268
15257
|
let t = e;
|
|
15269
15258
|
t.startsWith("did:nft:") && (t = t.replace("did:nft:", "").replace(/_/g, "/"));
|
|
15270
15259
|
const [n, r, o] = t.split("/"), [s, i] = n.split(":"), [c, a] = r.split(":");
|
|
@@ -15287,7 +15276,7 @@ function v5(e) {
|
|
|
15287
15276
|
tokenID: o
|
|
15288
15277
|
};
|
|
15289
15278
|
}
|
|
15290
|
-
async function
|
|
15279
|
+
async function v5(e, { nft: t }) {
|
|
15291
15280
|
if (t.namespace === "erc721")
|
|
15292
15281
|
return ln(e, {
|
|
15293
15282
|
address: t.contractAddress,
|
|
@@ -15318,13 +15307,13 @@ async function w5(e, { nft: t }) {
|
|
|
15318
15307
|
functionName: "uri",
|
|
15319
15308
|
args: [BigInt(t.tokenID)]
|
|
15320
15309
|
});
|
|
15321
|
-
throw new
|
|
15310
|
+
throw new f5({ namespace: t.namespace });
|
|
15322
15311
|
}
|
|
15323
|
-
async function
|
|
15324
|
-
return /eip155:/i.test(n) ?
|
|
15312
|
+
async function w5(e, { gatewayUrls: t, record: n }) {
|
|
15313
|
+
return /eip155:/i.test(n) ? x5(e, { gatewayUrls: t, record: n }) : uu({ uri: n, gatewayUrls: t });
|
|
15325
15314
|
}
|
|
15326
|
-
async function
|
|
15327
|
-
const r =
|
|
15315
|
+
async function x5(e, { gatewayUrls: t, record: n }) {
|
|
15316
|
+
const r = y5(n), o = await v5(e, { nft: r }), { uri: s, isOnChain: i, isEncoded: c } = i0({ uri: o, gatewayUrls: t });
|
|
15328
15317
|
if (i && (s.includes("data:application/json;base64,") || s.startsWith("{"))) {
|
|
15329
15318
|
const u = c ? (
|
|
15330
15319
|
// if it is encoded, decode it
|
|
@@ -15336,7 +15325,7 @@ async function E5(e, { gatewayUrls: t, record: n }) {
|
|
|
15336
15325
|
return uu({ uri: a0(l), gatewayUrls: t });
|
|
15337
15326
|
}
|
|
15338
15327
|
let a = r.tokenID;
|
|
15339
|
-
return r.namespace === "erc1155" && (a = a.replace("0x", "").padStart(64, "0")),
|
|
15328
|
+
return r.namespace === "erc1155" && (a = a.replace("0x", "").padStart(64, "0")), b5({
|
|
15340
15329
|
gatewayUrls: t,
|
|
15341
15330
|
uri: s.replace(/(?:0x)?{id}/, a)
|
|
15342
15331
|
});
|
|
@@ -15388,7 +15377,7 @@ async function c0(e, t) {
|
|
|
15388
15377
|
throw d;
|
|
15389
15378
|
}
|
|
15390
15379
|
}
|
|
15391
|
-
async function
|
|
15380
|
+
async function E5(e, { blockNumber: t, blockTag: n, assetGatewayUrls: r, name: o, gatewayUrls: s, strict: i, universalResolverAddress: c }) {
|
|
15392
15381
|
const a = await te(e, c0, "getEnsText")({
|
|
15393
15382
|
blockNumber: t,
|
|
15394
15383
|
blockTag: n,
|
|
@@ -15401,7 +15390,7 @@ async function S5(e, { blockNumber: t, blockTag: n, assetGatewayUrls: r, name: o
|
|
|
15401
15390
|
if (!a)
|
|
15402
15391
|
return null;
|
|
15403
15392
|
try {
|
|
15404
|
-
return await
|
|
15393
|
+
return await w5(e, {
|
|
15405
15394
|
record: a,
|
|
15406
15395
|
gatewayUrls: r
|
|
15407
15396
|
});
|
|
@@ -15409,7 +15398,7 @@ async function S5(e, { blockNumber: t, blockTag: n, assetGatewayUrls: r, name: o
|
|
|
15409
15398
|
return null;
|
|
15410
15399
|
}
|
|
15411
15400
|
}
|
|
15412
|
-
async function
|
|
15401
|
+
async function S5(e, { address: t, blockNumber: n, blockTag: r, gatewayUrls: o, strict: s, universalResolverAddress: i }) {
|
|
15413
15402
|
let c = i;
|
|
15414
15403
|
if (!c) {
|
|
15415
15404
|
if (!e.chain)
|
|
@@ -15442,7 +15431,7 @@ async function P5(e, { address: t, blockNumber: n, blockTag: r, gatewayUrls: o,
|
|
|
15442
15431
|
throw u;
|
|
15443
15432
|
}
|
|
15444
15433
|
}
|
|
15445
|
-
async function
|
|
15434
|
+
async function P5(e, t) {
|
|
15446
15435
|
const { blockNumber: n, blockTag: r, name: o } = t, { chain: s } = e, i = (() => {
|
|
15447
15436
|
if (t.universalResolverAddress)
|
|
15448
15437
|
return t.universalResolverAddress;
|
|
@@ -15475,11 +15464,11 @@ async function $5(e, t) {
|
|
|
15475
15464
|
return a;
|
|
15476
15465
|
}
|
|
15477
15466
|
async function u0(e, t) {
|
|
15478
|
-
var v, T,
|
|
15467
|
+
var v, T, y;
|
|
15479
15468
|
const { account: n = e.account, blockNumber: r, blockTag: o = "latest", blobs: s, data: i, gas: c, gasPrice: a, maxFeePerBlobGas: u, maxFeePerGas: l, maxPriorityFeePerGas: d, to: p, value: f, ...h } = t, m = n ? Rt(n) : void 0;
|
|
15480
15469
|
try {
|
|
15481
15470
|
No(t);
|
|
15482
|
-
const B = (typeof r == "bigint" ? J(r) : void 0) || o, L = (
|
|
15471
|
+
const B = (typeof r == "bigint" ? J(r) : void 0) || o, L = (y = (T = (v = e.chain) == null ? void 0 : v.formatters) == null ? void 0 : T.transactionRequest) == null ? void 0 : y.format, k = (L || Zs)({
|
|
15483
15472
|
// Pick out extra data that might exist on the chain's transaction request type.
|
|
15484
15473
|
...Wc(h, { format: L }),
|
|
15485
15474
|
from: m == null ? void 0 : m.address,
|
|
@@ -15508,7 +15497,7 @@ async function u0(e, t) {
|
|
|
15508
15497
|
});
|
|
15509
15498
|
}
|
|
15510
15499
|
}
|
|
15511
|
-
async function
|
|
15500
|
+
async function $5(e) {
|
|
15512
15501
|
const t = Hs(e, {
|
|
15513
15502
|
method: "eth_newBlockFilter"
|
|
15514
15503
|
}), n = await e.request({
|
|
@@ -15557,13 +15546,13 @@ async function f0(e) {
|
|
|
15557
15546
|
});
|
|
15558
15547
|
return { id: n, request: t(n), type: "transaction" };
|
|
15559
15548
|
}
|
|
15560
|
-
async function
|
|
15549
|
+
async function A5(e) {
|
|
15561
15550
|
const t = await e.request({
|
|
15562
15551
|
method: "eth_blobBaseFee"
|
|
15563
15552
|
});
|
|
15564
15553
|
return BigInt(t);
|
|
15565
15554
|
}
|
|
15566
|
-
async function
|
|
15555
|
+
async function T5(e, { blockHash: t, blockNumber: n, blockTag: r = "latest" } = {}) {
|
|
15567
15556
|
const o = n !== void 0 ? J(n) : void 0;
|
|
15568
15557
|
let s;
|
|
15569
15558
|
return t ? s = await e.request({
|
|
@@ -15582,7 +15571,7 @@ async function gf(e, { address: t, blockNumber: n, blockTag: r = "latest" }) {
|
|
|
15582
15571
|
if (s !== "0x")
|
|
15583
15572
|
return s;
|
|
15584
15573
|
}
|
|
15585
|
-
class
|
|
15574
|
+
class R5 extends H {
|
|
15586
15575
|
constructor({ address: t }) {
|
|
15587
15576
|
super(`No EIP-712 domain found on contract "${t}".`, {
|
|
15588
15577
|
metaMessages: [
|
|
@@ -15595,11 +15584,11 @@ class O5 extends H {
|
|
|
15595
15584
|
});
|
|
15596
15585
|
}
|
|
15597
15586
|
}
|
|
15598
|
-
async function
|
|
15587
|
+
async function O5(e, t) {
|
|
15599
15588
|
const { address: n, factory: r, factoryData: o } = t;
|
|
15600
15589
|
try {
|
|
15601
15590
|
const [s, i, c, a, u, l, d] = await te(e, ln, "readContract")({
|
|
15602
|
-
abi:
|
|
15591
|
+
abi: N5,
|
|
15603
15592
|
address: n,
|
|
15604
15593
|
functionName: "eip712Domain",
|
|
15605
15594
|
factory: r,
|
|
@@ -15618,10 +15607,10 @@ async function N5(e, t) {
|
|
|
15618
15607
|
};
|
|
15619
15608
|
} catch (s) {
|
|
15620
15609
|
const i = s;
|
|
15621
|
-
throw i.name === "ContractFunctionExecutionError" && i.cause.name === "ContractFunctionZeroDataError" ? new
|
|
15610
|
+
throw i.name === "ContractFunctionExecutionError" && i.cause.name === "ContractFunctionZeroDataError" ? new R5({ address: n }) : i;
|
|
15622
15611
|
}
|
|
15623
15612
|
}
|
|
15624
|
-
const
|
|
15613
|
+
const N5 = [
|
|
15625
15614
|
{
|
|
15626
15615
|
inputs: [],
|
|
15627
15616
|
name: "eip712Domain",
|
|
@@ -15638,7 +15627,7 @@ const I5 = [
|
|
|
15638
15627
|
type: "function"
|
|
15639
15628
|
}
|
|
15640
15629
|
];
|
|
15641
|
-
function
|
|
15630
|
+
function I5(e) {
|
|
15642
15631
|
var t;
|
|
15643
15632
|
return {
|
|
15644
15633
|
baseFeePerGas: e.baseFeePerGas.map((n) => BigInt(n)),
|
|
@@ -15647,7 +15636,7 @@ function C5(e) {
|
|
|
15647
15636
|
reward: (t = e.reward) == null ? void 0 : t.map((n) => n.map((r) => BigInt(r)))
|
|
15648
15637
|
};
|
|
15649
15638
|
}
|
|
15650
|
-
async function
|
|
15639
|
+
async function C5(e, { blockCount: t, blockNumber: n, blockTag: r = "latest", rewardPercentiles: o }) {
|
|
15651
15640
|
const s = typeof n == "bigint" ? J(n) : void 0, i = await e.request({
|
|
15652
15641
|
method: "eth_feeHistory",
|
|
15653
15642
|
params: [
|
|
@@ -15656,9 +15645,9 @@ async function B5(e, { blockCount: t, blockNumber: n, blockTag: r = "latest", re
|
|
|
15656
15645
|
o
|
|
15657
15646
|
]
|
|
15658
15647
|
}, { dedupe: !!s });
|
|
15659
|
-
return
|
|
15648
|
+
return I5(i);
|
|
15660
15649
|
}
|
|
15661
|
-
async function
|
|
15650
|
+
async function B5(e, { filter: t }) {
|
|
15662
15651
|
const n = t.strict ?? !1, o = (await t.request({
|
|
15663
15652
|
method: "eth_getFilterLogs",
|
|
15664
15653
|
params: [t.id]
|
|
@@ -15669,7 +15658,7 @@ async function L5(e, { filter: t }) {
|
|
|
15669
15658
|
strict: n
|
|
15670
15659
|
}) : o;
|
|
15671
15660
|
}
|
|
15672
|
-
function
|
|
15661
|
+
function L5(e) {
|
|
15673
15662
|
return {
|
|
15674
15663
|
formatters: void 0,
|
|
15675
15664
|
fees: void 0,
|
|
@@ -15677,14 +15666,14 @@ function M5(e) {
|
|
|
15677
15666
|
...e
|
|
15678
15667
|
};
|
|
15679
15668
|
}
|
|
15680
|
-
class
|
|
15669
|
+
class M5 extends H {
|
|
15681
15670
|
constructor({ domain: t }) {
|
|
15682
15671
|
super(`Invalid domain "${De(t)}".`, {
|
|
15683
15672
|
metaMessages: ["Must be a valid EIP-712 domain."]
|
|
15684
15673
|
});
|
|
15685
15674
|
}
|
|
15686
15675
|
}
|
|
15687
|
-
class
|
|
15676
|
+
class D5 extends H {
|
|
15688
15677
|
constructor({ primaryType: t, types: n }) {
|
|
15689
15678
|
super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(n))}\`.`, {
|
|
15690
15679
|
docsPath: "/api/glossary/Errors#typeddatainvalidprimarytypeerror",
|
|
@@ -15692,7 +15681,7 @@ class F5 extends H {
|
|
|
15692
15681
|
});
|
|
15693
15682
|
}
|
|
15694
15683
|
}
|
|
15695
|
-
class
|
|
15684
|
+
class F5 extends H {
|
|
15696
15685
|
constructor({ type: t }) {
|
|
15697
15686
|
super(`Struct type "${t}" is invalid.`, {
|
|
15698
15687
|
metaMessages: ["Struct type must not be a Solidity type."],
|
|
@@ -15700,19 +15689,19 @@ class k5 extends H {
|
|
|
15700
15689
|
});
|
|
15701
15690
|
}
|
|
15702
15691
|
}
|
|
15703
|
-
function
|
|
15692
|
+
function k5(e) {
|
|
15704
15693
|
const { domain: t = {}, message: n, primaryType: r } = e, o = {
|
|
15705
|
-
EIP712Domain:
|
|
15694
|
+
EIP712Domain: W5({ domain: t }),
|
|
15706
15695
|
...e.types
|
|
15707
15696
|
};
|
|
15708
|
-
|
|
15697
|
+
z5({
|
|
15709
15698
|
domain: t,
|
|
15710
15699
|
message: n,
|
|
15711
15700
|
primaryType: r,
|
|
15712
15701
|
types: o
|
|
15713
15702
|
});
|
|
15714
15703
|
const s = ["0x1901"];
|
|
15715
|
-
return t && s.push(
|
|
15704
|
+
return t && s.push(j5({
|
|
15716
15705
|
domain: t,
|
|
15717
15706
|
types: o
|
|
15718
15707
|
})), r !== "EIP712Domain" && s.push(d0({
|
|
@@ -15721,7 +15710,7 @@ function j5(e) {
|
|
|
15721
15710
|
types: o
|
|
15722
15711
|
})), Me(Ut(s));
|
|
15723
15712
|
}
|
|
15724
|
-
function
|
|
15713
|
+
function j5({ domain: e, types: t }) {
|
|
15725
15714
|
return d0({
|
|
15726
15715
|
data: e,
|
|
15727
15716
|
primaryType: "EIP712Domain",
|
|
@@ -15737,7 +15726,7 @@ function d0({ data: e, primaryType: t, types: n }) {
|
|
|
15737
15726
|
return Me(r);
|
|
15738
15727
|
}
|
|
15739
15728
|
function p0({ data: e, primaryType: t, types: n }) {
|
|
15740
|
-
const r = [{ type: "bytes32" }], o = [
|
|
15729
|
+
const r = [{ type: "bytes32" }], o = [_5({ primaryType: t, types: n })];
|
|
15741
15730
|
for (const s of n[t]) {
|
|
15742
15731
|
const [i, c] = m0({
|
|
15743
15732
|
types: n,
|
|
@@ -15749,11 +15738,11 @@ function p0({ data: e, primaryType: t, types: n }) {
|
|
|
15749
15738
|
}
|
|
15750
15739
|
return Tn(r, o);
|
|
15751
15740
|
}
|
|
15752
|
-
function
|
|
15753
|
-
const n = an(
|
|
15741
|
+
function _5({ primaryType: e, types: t }) {
|
|
15742
|
+
const n = an(U5({ primaryType: e, types: t }));
|
|
15754
15743
|
return Me(n);
|
|
15755
15744
|
}
|
|
15756
|
-
function
|
|
15745
|
+
function U5({ primaryType: e, types: t }) {
|
|
15757
15746
|
let n = "";
|
|
15758
15747
|
const r = h0({ primaryType: e, types: t });
|
|
15759
15748
|
r.delete(e);
|
|
@@ -15795,7 +15784,7 @@ function m0({ types: e, name: t, type: n, value: r }) {
|
|
|
15795
15784
|
}
|
|
15796
15785
|
return [{ type: n }, r];
|
|
15797
15786
|
}
|
|
15798
|
-
function
|
|
15787
|
+
function z5(e) {
|
|
15799
15788
|
const { domain: t, message: n, primaryType: r, types: o } = e, s = (i, c) => {
|
|
15800
15789
|
for (const a of i) {
|
|
15801
15790
|
const { name: u, type: l } = a, d = c[u], p = l.match(fh);
|
|
@@ -15818,21 +15807,21 @@ function W5(e) {
|
|
|
15818
15807
|
});
|
|
15819
15808
|
}
|
|
15820
15809
|
const h = o[l];
|
|
15821
|
-
h && (
|
|
15810
|
+
h && (H5(l), s(h, d));
|
|
15822
15811
|
}
|
|
15823
15812
|
};
|
|
15824
15813
|
if (o.EIP712Domain && t) {
|
|
15825
15814
|
if (typeof t != "object")
|
|
15826
|
-
throw new
|
|
15815
|
+
throw new M5({ domain: t });
|
|
15827
15816
|
s(o.EIP712Domain, t);
|
|
15828
15817
|
}
|
|
15829
15818
|
if (r !== "EIP712Domain")
|
|
15830
15819
|
if (o[r])
|
|
15831
15820
|
s(o[r], n);
|
|
15832
15821
|
else
|
|
15833
|
-
throw new
|
|
15822
|
+
throw new D5({ primaryType: r, types: o });
|
|
15834
15823
|
}
|
|
15835
|
-
function
|
|
15824
|
+
function W5({ domain: e }) {
|
|
15836
15825
|
return [
|
|
15837
15826
|
typeof (e == null ? void 0 : e.name) == "string" && { name: "name", type: "string" },
|
|
15838
15827
|
(e == null ? void 0 : e.version) && { name: "version", type: "string" },
|
|
@@ -15847,52 +15836,52 @@ function H5({ domain: e }) {
|
|
|
15847
15836
|
(e == null ? void 0 : e.salt) && { name: "salt", type: "bytes32" }
|
|
15848
15837
|
].filter(Boolean);
|
|
15849
15838
|
}
|
|
15850
|
-
function
|
|
15839
|
+
function H5(e) {
|
|
15851
15840
|
if (e === "address" || e === "bool" || e === "string" || e.startsWith("bytes") || e.startsWith("uint") || e.startsWith("int"))
|
|
15852
|
-
throw new
|
|
15841
|
+
throw new F5({ type: e });
|
|
15853
15842
|
}
|
|
15854
|
-
const
|
|
15843
|
+
const V5 = `Ethereum Signed Message:
|
|
15855
15844
|
`;
|
|
15856
|
-
function
|
|
15857
|
-
const t = typeof e == "string" ? Xr(e) : typeof e.raw == "string" ? e.raw : Ne(e.raw), n = Xr(`${
|
|
15845
|
+
function G5(e) {
|
|
15846
|
+
const t = typeof e == "string" ? Xr(e) : typeof e.raw == "string" ? e.raw : Ne(e.raw), n = Xr(`${V5}${Ae(t)}`);
|
|
15858
15847
|
return Ut([n, t]);
|
|
15859
15848
|
}
|
|
15860
15849
|
function g0(e, t) {
|
|
15861
|
-
return Me(
|
|
15850
|
+
return Me(G5(e), t);
|
|
15862
15851
|
}
|
|
15863
15852
|
const b0 = "0x6492649264926492649264926492649264926492649264926492649264926492";
|
|
15864
|
-
function
|
|
15853
|
+
function q5(e) {
|
|
15865
15854
|
return lh(e, -32) === b0;
|
|
15866
15855
|
}
|
|
15867
|
-
function
|
|
15856
|
+
function Z5(e) {
|
|
15868
15857
|
const { address: t, data: n, signature: r, to: o = "hex" } = e, s = Nr([
|
|
15869
15858
|
Tn([{ type: "address" }, { type: "bytes" }, { type: "bytes" }], [t, n, r]),
|
|
15870
15859
|
b0
|
|
15871
15860
|
]);
|
|
15872
15861
|
return o === "hex" ? s : $t(s);
|
|
15873
15862
|
}
|
|
15874
|
-
function
|
|
15863
|
+
function K5(e) {
|
|
15875
15864
|
return e.map((t) => ({
|
|
15876
15865
|
...t,
|
|
15877
15866
|
value: BigInt(t.value)
|
|
15878
15867
|
}));
|
|
15879
15868
|
}
|
|
15880
|
-
function
|
|
15869
|
+
function Y5(e) {
|
|
15881
15870
|
return {
|
|
15882
15871
|
...e,
|
|
15883
15872
|
balance: e.balance ? BigInt(e.balance) : void 0,
|
|
15884
15873
|
nonce: e.nonce ? sn(e.nonce) : void 0,
|
|
15885
|
-
storageProof: e.storageProof ?
|
|
15874
|
+
storageProof: e.storageProof ? K5(e.storageProof) : void 0
|
|
15886
15875
|
};
|
|
15887
15876
|
}
|
|
15888
|
-
async function
|
|
15877
|
+
async function X5(e, { address: t, blockNumber: n, blockTag: r, storageKeys: o }) {
|
|
15889
15878
|
const s = r ?? "latest", i = n !== void 0 ? J(n) : void 0, c = await e.request({
|
|
15890
15879
|
method: "eth_getProof",
|
|
15891
15880
|
params: [t, o, i || s]
|
|
15892
15881
|
});
|
|
15893
|
-
return
|
|
15882
|
+
return Y5(c);
|
|
15894
15883
|
}
|
|
15895
|
-
async function
|
|
15884
|
+
async function Q5(e, { address: t, blockNumber: n, blockTag: r = "latest", slot: o }) {
|
|
15896
15885
|
const s = n !== void 0 ? J(n) : void 0;
|
|
15897
15886
|
return await e.request({
|
|
15898
15887
|
method: "eth_getStorageAt",
|
|
@@ -15922,7 +15911,7 @@ async function lu(e, { blockHash: t, blockNumber: n, blockTag: r, hash: o, index
|
|
|
15922
15911
|
});
|
|
15923
15912
|
return (((p = (d = (l = e.chain) == null ? void 0 : l.formatters) == null ? void 0 : d.transaction) == null ? void 0 : p.format) || Th)(a);
|
|
15924
15913
|
}
|
|
15925
|
-
async function
|
|
15914
|
+
async function J5(e, { hash: t, transactionReceipt: n }) {
|
|
15926
15915
|
const [r, o] = await Promise.all([
|
|
15927
15916
|
te(e, Bo, "getBlockNumber")({}),
|
|
15928
15917
|
t ? te(e, lu, "getTransaction")({ hash: t }) : void 0
|
|
@@ -15939,7 +15928,7 @@ async function os(e, { hash: t }) {
|
|
|
15939
15928
|
throw new wh({ hash: t });
|
|
15940
15929
|
return (((i = (s = (o = e.chain) == null ? void 0 : o.formatters) == null ? void 0 : s.transactionReceipt) == null ? void 0 : i.format) || q6)(n);
|
|
15941
15930
|
}
|
|
15942
|
-
async function
|
|
15931
|
+
async function eS(e, t) {
|
|
15943
15932
|
var T;
|
|
15944
15933
|
const { account: n, allowFailure: r = !0, batchSize: o, blockNumber: s, blockTag: i, multicallAddress: c, stateOverride: a } = t, u = t.contracts, l = o ?? (typeof ((T = e.batch) == null ? void 0 : T.multicall) == "object" && e.batch.multicall.batchSize || 1024);
|
|
15945
15934
|
let d = c;
|
|
@@ -15954,8 +15943,8 @@ async function tS(e, t) {
|
|
|
15954
15943
|
}
|
|
15955
15944
|
const p = [[]];
|
|
15956
15945
|
let f = 0, h = 0;
|
|
15957
|
-
for (let
|
|
15958
|
-
const { abi: P, address: B, args: L, functionName: F } = u[
|
|
15946
|
+
for (let y = 0; y < u.length; y++) {
|
|
15947
|
+
const { abi: P, address: B, args: L, functionName: F } = u[y];
|
|
15959
15948
|
try {
|
|
15960
15949
|
const k = Vt({ abi: P, args: L, functionName: F });
|
|
15961
15950
|
h += (k.length - 2) / 2, // Check if batching is enabled.
|
|
@@ -15990,22 +15979,22 @@ async function tS(e, t) {
|
|
|
15990
15979
|
];
|
|
15991
15980
|
}
|
|
15992
15981
|
}
|
|
15993
|
-
const m = await Promise.allSettled(p.map((
|
|
15982
|
+
const m = await Promise.allSettled(p.map((y) => te(e, ln, "readContract")({
|
|
15994
15983
|
abi: Fa,
|
|
15995
15984
|
account: n,
|
|
15996
15985
|
address: d,
|
|
15997
|
-
args: [
|
|
15986
|
+
args: [y],
|
|
15998
15987
|
blockNumber: s,
|
|
15999
15988
|
blockTag: i,
|
|
16000
15989
|
functionName: "aggregate3",
|
|
16001
15990
|
stateOverride: a
|
|
16002
15991
|
}))), v = [];
|
|
16003
|
-
for (let
|
|
16004
|
-
const P = m[
|
|
15992
|
+
for (let y = 0; y < m.length; y++) {
|
|
15993
|
+
const P = m[y];
|
|
16005
15994
|
if (P.status === "rejected") {
|
|
16006
15995
|
if (!r)
|
|
16007
15996
|
throw P.reason;
|
|
16008
|
-
for (let L = 0; L < p[
|
|
15997
|
+
for (let L = 0; L < p[y].length; L++)
|
|
16009
15998
|
v.push({
|
|
16010
15999
|
status: "failure",
|
|
16011
16000
|
error: P.reason,
|
|
@@ -16015,7 +16004,7 @@ async function tS(e, t) {
|
|
|
16015
16004
|
}
|
|
16016
16005
|
const B = P.value;
|
|
16017
16006
|
for (let L = 0; L < B.length; L++) {
|
|
16018
|
-
const { returnData: F, success: k } = B[L], { callData: g } = p[
|
|
16007
|
+
const { returnData: F, success: k } = B[L], { callData: g } = p[y][L], { abi: w, address: $, functionName: N, args: O } = u[v.length];
|
|
16019
16008
|
try {
|
|
16020
16009
|
if (g === "0x")
|
|
16021
16010
|
throw new Ao();
|
|
@@ -16052,10 +16041,10 @@ async function Wa(e, t) {
|
|
|
16052
16041
|
const a = [];
|
|
16053
16042
|
for (const p of o) {
|
|
16054
16043
|
const f = p.blockOverrides ? Yh(p.blockOverrides) : void 0, h = p.calls.map((v) => {
|
|
16055
|
-
const T = v,
|
|
16044
|
+
const T = v, y = T.account ? Rt(T.account) : void 0, P = T.abi ? Vt(T) : T.data, B = {
|
|
16056
16045
|
...T,
|
|
16057
16046
|
data: T.dataSuffix ? Ut([P || "0x", T.dataSuffix]) : P,
|
|
16058
|
-
from: T.from ?? (
|
|
16047
|
+
from: T.from ?? (y == null ? void 0 : y.address)
|
|
16059
16048
|
};
|
|
16060
16049
|
return No(B), Zs(B);
|
|
16061
16050
|
}), m = p.stateOverrides ? Hc(p.stateOverrides) : void 0;
|
|
@@ -16076,10 +16065,10 @@ async function Wa(e, t) {
|
|
|
16076
16065
|
...Rh(p),
|
|
16077
16066
|
calls: p.calls.map((h, m) => {
|
|
16078
16067
|
var $, N;
|
|
16079
|
-
const { abi: v, args: T, functionName:
|
|
16068
|
+
const { abi: v, args: T, functionName: y, to: P } = o[f].calls[m], B = (($ = h.error) == null ? void 0 : $.data) ?? h.returnData, L = BigInt(h.gasUsed), F = (N = h.logs) == null ? void 0 : N.map((O) => un(O)), k = h.status === "0x1" ? "success" : "failure", g = v && k === "success" && B !== "0x" ? Yn({
|
|
16080
16069
|
abi: v,
|
|
16081
16070
|
data: B,
|
|
16082
|
-
functionName:
|
|
16071
|
+
functionName: y
|
|
16083
16072
|
}) : null, w = (() => {
|
|
16084
16073
|
var S;
|
|
16085
16074
|
if (k === "success")
|
|
@@ -16090,7 +16079,7 @@ async function Wa(e, t) {
|
|
|
16090
16079
|
abi: v ?? [],
|
|
16091
16080
|
address: P ?? "0x",
|
|
16092
16081
|
args: T,
|
|
16093
|
-
functionName:
|
|
16082
|
+
functionName: y ?? "<unknown>"
|
|
16094
16083
|
});
|
|
16095
16084
|
})();
|
|
16096
16085
|
return {
|
|
@@ -16115,7 +16104,7 @@ function y0(e, t = {}) {
|
|
|
16115
16104
|
const { as: n = typeof e == "string" ? "Hex" : "Bytes" } = t, r = sh(h6(e));
|
|
16116
16105
|
return n === "Bytes" ? r : qh(r);
|
|
16117
16106
|
}
|
|
16118
|
-
class
|
|
16107
|
+
class tS extends Map {
|
|
16119
16108
|
constructor(t) {
|
|
16120
16109
|
super(), Object.defineProperty(this, "maxSize", {
|
|
16121
16110
|
enumerable: !0,
|
|
@@ -16136,27 +16125,27 @@ class nS extends Map {
|
|
|
16136
16125
|
return this;
|
|
16137
16126
|
}
|
|
16138
16127
|
}
|
|
16139
|
-
const
|
|
16140
|
-
checksum: /* @__PURE__ */ new
|
|
16141
|
-
}, _i =
|
|
16128
|
+
const nS = {
|
|
16129
|
+
checksum: /* @__PURE__ */ new tS(8192)
|
|
16130
|
+
}, _i = nS.checksum, rS = /^0x[a-fA-F0-9]{40}$/;
|
|
16142
16131
|
function ei(e, t = {}) {
|
|
16143
16132
|
const { strict: n = !0 } = t;
|
|
16144
|
-
if (!
|
|
16133
|
+
if (!rS.test(e))
|
|
16145
16134
|
throw new bf({
|
|
16146
16135
|
address: e,
|
|
16147
|
-
cause: new
|
|
16136
|
+
cause: new sS()
|
|
16148
16137
|
});
|
|
16149
16138
|
if (n) {
|
|
16150
16139
|
if (e.toLowerCase() === e)
|
|
16151
16140
|
return;
|
|
16152
|
-
if (
|
|
16141
|
+
if (oS(e) !== e)
|
|
16153
16142
|
throw new bf({
|
|
16154
16143
|
address: e,
|
|
16155
|
-
cause: new
|
|
16144
|
+
cause: new iS()
|
|
16156
16145
|
});
|
|
16157
16146
|
}
|
|
16158
16147
|
}
|
|
16159
|
-
function
|
|
16148
|
+
function oS(e) {
|
|
16160
16149
|
if (_i.has(e))
|
|
16161
16150
|
return _i.get(e);
|
|
16162
16151
|
ei(e, { strict: !1 });
|
|
@@ -16186,7 +16175,7 @@ class bf extends we {
|
|
|
16186
16175
|
});
|
|
16187
16176
|
}
|
|
16188
16177
|
}
|
|
16189
|
-
class
|
|
16178
|
+
class sS extends we {
|
|
16190
16179
|
constructor() {
|
|
16191
16180
|
super("Address is not a 20 byte (40 hexadecimal character) value."), Object.defineProperty(this, "name", {
|
|
16192
16181
|
enumerable: !0,
|
|
@@ -16196,7 +16185,7 @@ class iS extends we {
|
|
|
16196
16185
|
});
|
|
16197
16186
|
}
|
|
16198
16187
|
}
|
|
16199
|
-
class
|
|
16188
|
+
class iS extends we {
|
|
16200
16189
|
constructor() {
|
|
16201
16190
|
super("Address does not match its checksum counterpart."), Object.defineProperty(this, "name", {
|
|
16202
16191
|
enumerable: !0,
|
|
@@ -16271,7 +16260,7 @@ function w0(e, t = {}) {
|
|
|
16271
16260
|
...n ? { hash: cr(r) } : {}
|
|
16272
16261
|
};
|
|
16273
16262
|
}
|
|
16274
|
-
function
|
|
16263
|
+
function aS(e, t, n) {
|
|
16275
16264
|
const { args: r = [], prepare: o = !0 } = n ?? {}, s = P6(t, { strict: !1 }), i = e.filter((u) => s ? u.type === "function" || u.type === "error" ? x0(u) === ou(t, 0, 4) : u.type === "event" ? cr(u) === t : !1 : "name" in u && u.name === t);
|
|
16276
16265
|
if (i.length === 0)
|
|
16277
16266
|
throw new qa({ name: t });
|
|
@@ -16301,7 +16290,7 @@ function cS(e, t, n) {
|
|
|
16301
16290
|
if (c && "inputs" in c && c.inputs) {
|
|
16302
16291
|
const d = v0(u.inputs, c.inputs, r);
|
|
16303
16292
|
if (d)
|
|
16304
|
-
throw new
|
|
16293
|
+
throw new uS({
|
|
16305
16294
|
abiItem: u,
|
|
16306
16295
|
type: d[0]
|
|
16307
16296
|
}, {
|
|
@@ -16328,14 +16317,14 @@ function cS(e, t, n) {
|
|
|
16328
16317
|
function x0(e) {
|
|
16329
16318
|
return ou(cr(e), 0, 4);
|
|
16330
16319
|
}
|
|
16331
|
-
function
|
|
16320
|
+
function cS(e) {
|
|
16332
16321
|
const t = typeof e == "string" ? e : bs(e);
|
|
16333
16322
|
return Va(t);
|
|
16334
16323
|
}
|
|
16335
16324
|
function cr(e) {
|
|
16336
|
-
return typeof e != "string" && "hash" in e && e.hash ? e.hash : y0(ru(
|
|
16325
|
+
return typeof e != "string" && "hash" in e && e.hash ? e.hash : y0(ru(cS(e)));
|
|
16337
16326
|
}
|
|
16338
|
-
class
|
|
16327
|
+
class uS extends we {
|
|
16339
16328
|
constructor(t, n) {
|
|
16340
16329
|
super("Found ambiguous types in overloaded ABI Items.", {
|
|
16341
16330
|
metaMessages: [
|
|
@@ -16365,8 +16354,8 @@ class qa extends we {
|
|
|
16365
16354
|
});
|
|
16366
16355
|
}
|
|
16367
16356
|
}
|
|
16368
|
-
const
|
|
16369
|
-
function
|
|
16357
|
+
const lS = /^(.*)\[([0-9]*)\]$/, fS = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, E0 = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
|
|
16358
|
+
function dS({ checksumAddress: e, parameters: t, values: n }) {
|
|
16370
16359
|
const r = [];
|
|
16371
16360
|
for (let o = 0; o < t.length; o++)
|
|
16372
16361
|
r.push(fu({
|
|
@@ -16377,10 +16366,10 @@ function pS({ checksumAddress: e, parameters: t, values: n }) {
|
|
|
16377
16366
|
return r;
|
|
16378
16367
|
}
|
|
16379
16368
|
function fu({ checksumAddress: e = !1, parameter: t, value: n }) {
|
|
16380
|
-
const r = t, o =
|
|
16369
|
+
const r = t, o = wS(r.type);
|
|
16381
16370
|
if (o) {
|
|
16382
16371
|
const [s, i] = o;
|
|
16383
|
-
return
|
|
16372
|
+
return hS(n, {
|
|
16384
16373
|
checksumAddress: e,
|
|
16385
16374
|
length: s,
|
|
16386
16375
|
parameter: {
|
|
@@ -16390,27 +16379,27 @@ function fu({ checksumAddress: e = !1, parameter: t, value: n }) {
|
|
|
16390
16379
|
});
|
|
16391
16380
|
}
|
|
16392
16381
|
if (r.type === "tuple")
|
|
16393
|
-
return
|
|
16382
|
+
return vS(n, {
|
|
16394
16383
|
checksumAddress: e,
|
|
16395
16384
|
parameter: r
|
|
16396
16385
|
});
|
|
16397
16386
|
if (r.type === "address")
|
|
16398
|
-
return
|
|
16387
|
+
return pS(n, {
|
|
16399
16388
|
checksum: e
|
|
16400
16389
|
});
|
|
16401
16390
|
if (r.type === "bool")
|
|
16402
|
-
return
|
|
16391
|
+
return gS(n);
|
|
16403
16392
|
if (r.type.startsWith("uint") || r.type.startsWith("int")) {
|
|
16404
16393
|
const s = r.type.startsWith("int"), [, , i = "256"] = E0.exec(r.type) ?? [];
|
|
16405
|
-
return
|
|
16394
|
+
return bS(n, {
|
|
16406
16395
|
signed: s,
|
|
16407
16396
|
size: Number(i)
|
|
16408
16397
|
});
|
|
16409
16398
|
}
|
|
16410
16399
|
if (r.type.startsWith("bytes"))
|
|
16411
|
-
return
|
|
16400
|
+
return mS(n, { type: r.type });
|
|
16412
16401
|
if (r.type === "string")
|
|
16413
|
-
return
|
|
16402
|
+
return yS(n);
|
|
16414
16403
|
throw new A0(r.type);
|
|
16415
16404
|
}
|
|
16416
16405
|
function du(e) {
|
|
@@ -16427,19 +16416,19 @@ function du(e) {
|
|
|
16427
16416
|
}
|
|
16428
16417
|
return zt(...n, ...r);
|
|
16429
16418
|
}
|
|
16430
|
-
function
|
|
16419
|
+
function pS(e, t) {
|
|
16431
16420
|
const { checksum: n = !1 } = t;
|
|
16432
16421
|
return ei(e, { strict: n }), {
|
|
16433
16422
|
dynamic: !1,
|
|
16434
16423
|
encoded: Hn(e.toLowerCase())
|
|
16435
16424
|
};
|
|
16436
16425
|
}
|
|
16437
|
-
function
|
|
16426
|
+
function hS(e, t) {
|
|
16438
16427
|
const { checksumAddress: n, length: r, parameter: o } = t, s = r === null;
|
|
16439
16428
|
if (!Array.isArray(e))
|
|
16440
|
-
throw new
|
|
16429
|
+
throw new ES(e);
|
|
16441
16430
|
if (!s && e.length !== r)
|
|
16442
|
-
throw new
|
|
16431
|
+
throw new xS({
|
|
16443
16432
|
expectedLength: r,
|
|
16444
16433
|
givenLength: e.length,
|
|
16445
16434
|
type: `${o.type}[${r}]`
|
|
@@ -16471,7 +16460,7 @@ function mS(e, t) {
|
|
|
16471
16460
|
encoded: zt(...c.map(({ encoded: a }) => a))
|
|
16472
16461
|
};
|
|
16473
16462
|
}
|
|
16474
|
-
function
|
|
16463
|
+
function mS(e, { type: t }) {
|
|
16475
16464
|
const [, n] = t.split("bytes"), r = gt(e);
|
|
16476
16465
|
if (!n) {
|
|
16477
16466
|
let o = e;
|
|
@@ -16487,12 +16476,12 @@ function gS(e, { type: t }) {
|
|
|
16487
16476
|
});
|
|
16488
16477
|
return { dynamic: !1, encoded: Vn(e) };
|
|
16489
16478
|
}
|
|
16490
|
-
function
|
|
16479
|
+
function gS(e) {
|
|
16491
16480
|
if (typeof e != "boolean")
|
|
16492
16481
|
throw new we(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);
|
|
16493
16482
|
return { dynamic: !1, encoded: Hn(Gh(e)) };
|
|
16494
16483
|
}
|
|
16495
|
-
function
|
|
16484
|
+
function bS(e, { signed: t, size: n }) {
|
|
16496
16485
|
if (typeof n == "number") {
|
|
16497
16486
|
const r = 2n ** (BigInt(n) - (t ? 1n : 0n)) - 1n, o = t ? -r - 1n : 0n;
|
|
16498
16487
|
if (e > r || e < o)
|
|
@@ -16512,7 +16501,7 @@ function yS(e, { signed: t, size: n }) {
|
|
|
16512
16501
|
})
|
|
16513
16502
|
};
|
|
16514
16503
|
}
|
|
16515
|
-
function
|
|
16504
|
+
function yS(e) {
|
|
16516
16505
|
const t = ru(e), n = Math.ceil(gt(t) / 32), r = [];
|
|
16517
16506
|
for (let o = 0; o < n; o++)
|
|
16518
16507
|
r.push(Vn(ou(t, o * 32, (o + 1) * 32)));
|
|
@@ -16521,7 +16510,7 @@ function vS(e) {
|
|
|
16521
16510
|
encoded: zt(Vn(je(gt(t), { size: 32 })), ...r)
|
|
16522
16511
|
};
|
|
16523
16512
|
}
|
|
16524
|
-
function
|
|
16513
|
+
function vS(e, t) {
|
|
16525
16514
|
const { checksumAddress: n, parameter: r } = t;
|
|
16526
16515
|
let o = !1;
|
|
16527
16516
|
const s = [];
|
|
@@ -16538,7 +16527,7 @@ function wS(e, t) {
|
|
|
16538
16527
|
encoded: o ? du(s) : zt(...s.map(({ encoded: i }) => i))
|
|
16539
16528
|
};
|
|
16540
16529
|
}
|
|
16541
|
-
function
|
|
16530
|
+
function wS(e) {
|
|
16542
16531
|
const t = e.match(/^(.*)\[(\d+)?\]$/);
|
|
16543
16532
|
return t ? (
|
|
16544
16533
|
// Return `null` if the array is dynamic.
|
|
@@ -16552,7 +16541,7 @@ function S0(e, t, n) {
|
|
|
16552
16541
|
expectedLength: e.length,
|
|
16553
16542
|
givenLength: t.length
|
|
16554
16543
|
});
|
|
16555
|
-
const o =
|
|
16544
|
+
const o = dS({
|
|
16556
16545
|
checksumAddress: r,
|
|
16557
16546
|
parameters: e,
|
|
16558
16547
|
values: t
|
|
@@ -16592,7 +16581,7 @@ function Za(e, t) {
|
|
|
16592
16581
|
signed: u === "int"
|
|
16593
16582
|
});
|
|
16594
16583
|
}
|
|
16595
|
-
const i = n.match(
|
|
16584
|
+
const i = n.match(fS);
|
|
16596
16585
|
if (i) {
|
|
16597
16586
|
const [a, u] = i;
|
|
16598
16587
|
if (Number.parseInt(u) !== (r.length - 2) / 2)
|
|
@@ -16602,7 +16591,7 @@ function Za(e, t) {
|
|
|
16602
16591
|
});
|
|
16603
16592
|
return Vn(r, o ? 32 : 0);
|
|
16604
16593
|
}
|
|
16605
|
-
const c = n.match(
|
|
16594
|
+
const c = n.match(lS);
|
|
16606
16595
|
if (c && Array.isArray(r)) {
|
|
16607
16596
|
const [a, u] = c, l = [];
|
|
16608
16597
|
for (let d = 0; d < r.length; d++)
|
|
@@ -16613,7 +16602,7 @@ function Za(e, t) {
|
|
|
16613
16602
|
}
|
|
16614
16603
|
e.encode = t;
|
|
16615
16604
|
})(Za || (Za = {}));
|
|
16616
|
-
class
|
|
16605
|
+
class xS extends we {
|
|
16617
16606
|
constructor({ expectedLength: t, givenLength: n, type: r }) {
|
|
16618
16607
|
super(`Array length mismatch for type \`${r}\`. Expected: \`${t}\`. Given: \`${n}\`.`), Object.defineProperty(this, "name", {
|
|
16619
16608
|
enumerable: !0,
|
|
@@ -16648,7 +16637,7 @@ class $0 extends we {
|
|
|
16648
16637
|
});
|
|
16649
16638
|
}
|
|
16650
16639
|
}
|
|
16651
|
-
class
|
|
16640
|
+
class ES extends we {
|
|
16652
16641
|
constructor(t) {
|
|
16653
16642
|
super(`Value \`${t}\` is not a valid array.`), Object.defineProperty(this, "name", {
|
|
16654
16643
|
enumerable: !0,
|
|
@@ -16668,53 +16657,53 @@ class A0 extends we {
|
|
|
16668
16657
|
});
|
|
16669
16658
|
}
|
|
16670
16659
|
}
|
|
16671
|
-
function
|
|
16660
|
+
function SS(e, t) {
|
|
16672
16661
|
var o;
|
|
16673
16662
|
const { bytecode: n, args: r } = t;
|
|
16674
16663
|
return zt(n, (o = e.inputs) != null && o.length && (r != null && r.length) ? S0(e.inputs, r) : "0x");
|
|
16675
16664
|
}
|
|
16676
|
-
function
|
|
16665
|
+
function PS(e) {
|
|
16677
16666
|
return w0(e);
|
|
16678
16667
|
}
|
|
16679
|
-
function
|
|
16680
|
-
const { overloads: n } = e, r = n ?
|
|
16668
|
+
function $S(e, ...t) {
|
|
16669
|
+
const { overloads: n } = e, r = n ? AS([e, ...n], e.name, {
|
|
16681
16670
|
args: t[0]
|
|
16682
|
-
}) : e, o =
|
|
16671
|
+
}) : e, o = TS(r), s = t.length > 0 ? S0(r.inputs, t[0]) : void 0;
|
|
16683
16672
|
return s ? zt(o, s) : o;
|
|
16684
16673
|
}
|
|
16685
16674
|
function nr(e, t = {}) {
|
|
16686
16675
|
return w0(e, t);
|
|
16687
16676
|
}
|
|
16688
|
-
function
|
|
16689
|
-
const r =
|
|
16677
|
+
function AS(e, t, n) {
|
|
16678
|
+
const r = aS(e, t, n);
|
|
16690
16679
|
if (r.type !== "function")
|
|
16691
16680
|
throw new qa({ name: t, type: "function" });
|
|
16692
16681
|
return r;
|
|
16693
16682
|
}
|
|
16694
|
-
function
|
|
16683
|
+
function TS(e) {
|
|
16695
16684
|
return x0(e);
|
|
16696
16685
|
}
|
|
16697
|
-
const
|
|
16698
|
-
async function
|
|
16686
|
+
const RS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", Nt = "0x0000000000000000000000000000000000000000", OS = "0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";
|
|
16687
|
+
async function NS(e, t) {
|
|
16699
16688
|
const { blockNumber: n, blockTag: r, calls: o, stateOverrides: s, traceAssetChanges: i, traceTransfers: c, validation: a } = t, u = t.account ? Rt(t.account) : void 0;
|
|
16700
16689
|
if (i && !u)
|
|
16701
16690
|
throw new H("`account` is required when `traceAssetChanges` is true");
|
|
16702
|
-
const l = u ? PS(
|
|
16691
|
+
const l = u ? SS(PS("constructor(bytes, bytes)"), {
|
|
16703
16692
|
bytecode: Jh,
|
|
16704
16693
|
args: [
|
|
16705
|
-
|
|
16706
|
-
|
|
16694
|
+
OS,
|
|
16695
|
+
$S(nr("function getBalance(address)"), [u.address])
|
|
16707
16696
|
]
|
|
16708
|
-
}) : void 0, d = i ? await Promise.all(t.calls.map(async (
|
|
16709
|
-
if (!
|
|
16697
|
+
}) : void 0, d = i ? await Promise.all(t.calls.map(async (b) => {
|
|
16698
|
+
if (!b.data && !b.abi)
|
|
16710
16699
|
return;
|
|
16711
16700
|
const { accessList: C } = await u0(e, {
|
|
16712
16701
|
account: u.address,
|
|
16713
|
-
...
|
|
16714
|
-
data:
|
|
16702
|
+
...b,
|
|
16703
|
+
data: b.abi ? Vt(b) : b.data
|
|
16715
16704
|
});
|
|
16716
16705
|
return C.map(({ address: D, storageKeys: _ }) => _.length > 0 ? D : null);
|
|
16717
|
-
})).then((
|
|
16706
|
+
})).then((b) => b.flat().filter(Boolean)) : [], p = await Wa(e, {
|
|
16718
16707
|
blockNumber: n,
|
|
16719
16708
|
blockTag: r,
|
|
16720
16709
|
blocks: [
|
|
@@ -16726,13 +16715,13 @@ async function IS(e, t) {
|
|
|
16726
16715
|
},
|
|
16727
16716
|
// Asset pre balances
|
|
16728
16717
|
{
|
|
16729
|
-
calls: d.map((
|
|
16718
|
+
calls: d.map((b, C) => ({
|
|
16730
16719
|
abi: [
|
|
16731
16720
|
nr("function balanceOf(address) returns (uint256)")
|
|
16732
16721
|
],
|
|
16733
16722
|
functionName: "balanceOf",
|
|
16734
16723
|
args: [u.address],
|
|
16735
|
-
to:
|
|
16724
|
+
to: b,
|
|
16736
16725
|
from: Nt,
|
|
16737
16726
|
nonce: C
|
|
16738
16727
|
})),
|
|
@@ -16745,8 +16734,8 @@ async function IS(e, t) {
|
|
|
16745
16734
|
}
|
|
16746
16735
|
] : [],
|
|
16747
16736
|
{
|
|
16748
|
-
calls: [...o, {}].map((
|
|
16749
|
-
...
|
|
16737
|
+
calls: [...o, {}].map((b) => ({
|
|
16738
|
+
...b,
|
|
16750
16739
|
from: u == null ? void 0 : u.address
|
|
16751
16740
|
})),
|
|
16752
16741
|
stateOverrides: s
|
|
@@ -16758,13 +16747,13 @@ async function IS(e, t) {
|
|
|
16758
16747
|
},
|
|
16759
16748
|
// Asset post balances
|
|
16760
16749
|
{
|
|
16761
|
-
calls: d.map((
|
|
16750
|
+
calls: d.map((b, C) => ({
|
|
16762
16751
|
abi: [
|
|
16763
16752
|
nr("function balanceOf(address) returns (uint256)")
|
|
16764
16753
|
],
|
|
16765
16754
|
functionName: "balanceOf",
|
|
16766
16755
|
args: [u.address],
|
|
16767
|
-
to:
|
|
16756
|
+
to: b,
|
|
16768
16757
|
from: Nt,
|
|
16769
16758
|
nonce: C
|
|
16770
16759
|
})),
|
|
@@ -16777,8 +16766,8 @@ async function IS(e, t) {
|
|
|
16777
16766
|
},
|
|
16778
16767
|
// Decimals
|
|
16779
16768
|
{
|
|
16780
|
-
calls: d.map((
|
|
16781
|
-
to:
|
|
16769
|
+
calls: d.map((b, C) => ({
|
|
16770
|
+
to: b,
|
|
16782
16771
|
abi: [
|
|
16783
16772
|
nr("function decimals() returns (uint256)")
|
|
16784
16773
|
],
|
|
@@ -16795,8 +16784,8 @@ async function IS(e, t) {
|
|
|
16795
16784
|
},
|
|
16796
16785
|
// Token URI
|
|
16797
16786
|
{
|
|
16798
|
-
calls: d.map((
|
|
16799
|
-
to:
|
|
16787
|
+
calls: d.map((b, C) => ({
|
|
16788
|
+
to: b,
|
|
16800
16789
|
abi: [
|
|
16801
16790
|
nr("function tokenURI(uint256) returns (string)")
|
|
16802
16791
|
],
|
|
@@ -16814,8 +16803,8 @@ async function IS(e, t) {
|
|
|
16814
16803
|
},
|
|
16815
16804
|
// Symbols
|
|
16816
16805
|
{
|
|
16817
|
-
calls: d.map((
|
|
16818
|
-
to:
|
|
16806
|
+
calls: d.map((b, C) => ({
|
|
16807
|
+
to: b,
|
|
16819
16808
|
abi: [nr("function symbol() returns (string)")],
|
|
16820
16809
|
functionName: "symbol",
|
|
16821
16810
|
from: Nt,
|
|
@@ -16832,17 +16821,17 @@ async function IS(e, t) {
|
|
|
16832
16821
|
],
|
|
16833
16822
|
traceTransfers: c,
|
|
16834
16823
|
validation: a
|
|
16835
|
-
}), f = i ? p[2] : p[0], [h, m, , v, T,
|
|
16836
|
-
for (const [
|
|
16837
|
-
const D = $[
|
|
16824
|
+
}), f = i ? p[2] : p[0], [h, m, , v, T, y, P, B] = i ? p : [], { calls: L, ...F } = f, k = L.slice(0, -1) ?? [], g = (h == null ? void 0 : h.calls) ?? [], w = (m == null ? void 0 : m.calls) ?? [], $ = [...g, ...w].map((b) => b.status === "success" ? _t(b.data) : null), N = (v == null ? void 0 : v.calls) ?? [], O = (T == null ? void 0 : T.calls) ?? [], S = [...N, ...O].map((b) => b.status === "success" ? _t(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), A = ((P == null ? void 0 : P.calls) ?? []).map((b) => b.status === "success" ? b.result : null), R = [];
|
|
16825
|
+
for (const [b, C] of S.entries()) {
|
|
16826
|
+
const D = $[b];
|
|
16838
16827
|
if (typeof C != "bigint" || typeof D != "bigint")
|
|
16839
16828
|
continue;
|
|
16840
|
-
const _ = E[
|
|
16841
|
-
address:
|
|
16829
|
+
const _ = E[b - 1], U = x[b - 1], W = A[b - 1], q = b === 0 ? {
|
|
16830
|
+
address: RS,
|
|
16842
16831
|
decimals: 18,
|
|
16843
16832
|
symbol: "ETH"
|
|
16844
16833
|
} : {
|
|
16845
|
-
address: d[
|
|
16834
|
+
address: d[b - 1],
|
|
16846
16835
|
decimals: W || _ ? Number(_ ?? 1) : void 0,
|
|
16847
16836
|
symbol: U ?? void 0
|
|
16848
16837
|
};
|
|
@@ -16902,7 +16891,7 @@ class T0 extends Cc {
|
|
|
16902
16891
|
const R0 = (e, t, n) => new T0(e, t).update(n).digest();
|
|
16903
16892
|
R0.create = (e, t) => new T0(e, t);
|
|
16904
16893
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
16905
|
-
const qe = BigInt(0), Ue = BigInt(1), Ln = /* @__PURE__ */ BigInt(2), O0 = /* @__PURE__ */ BigInt(3), N0 = /* @__PURE__ */ BigInt(4), I0 = /* @__PURE__ */ BigInt(5),
|
|
16894
|
+
const qe = BigInt(0), Ue = BigInt(1), Ln = /* @__PURE__ */ BigInt(2), O0 = /* @__PURE__ */ BigInt(3), N0 = /* @__PURE__ */ BigInt(4), I0 = /* @__PURE__ */ BigInt(5), IS = /* @__PURE__ */ BigInt(7), C0 = /* @__PURE__ */ BigInt(8), CS = /* @__PURE__ */ BigInt(9), B0 = /* @__PURE__ */ BigInt(16);
|
|
16906
16895
|
function vt(e, t) {
|
|
16907
16896
|
const n = e % t;
|
|
16908
16897
|
return n >= qe ? n : t + n;
|
|
@@ -16935,12 +16924,12 @@ function L0(e, t) {
|
|
|
16935
16924
|
const n = (e.ORDER + Ue) / N0, r = e.pow(t, n);
|
|
16936
16925
|
return pu(e, r, t), r;
|
|
16937
16926
|
}
|
|
16938
|
-
function
|
|
16927
|
+
function BS(e, t) {
|
|
16939
16928
|
const n = (e.ORDER - I0) / C0, r = e.mul(t, Ln), o = e.pow(r, n), s = e.mul(t, o), i = e.mul(e.mul(s, Ln), o), c = e.mul(s, e.sub(i, e.ONE));
|
|
16940
16929
|
return pu(e, c, t), c;
|
|
16941
16930
|
}
|
|
16942
|
-
function
|
|
16943
|
-
const t = Lo(e), n = M0(e), r = n(t, t.neg(t.ONE)), o = n(t, r), s = n(t, t.neg(r)), i = (e +
|
|
16931
|
+
function LS(e) {
|
|
16932
|
+
const t = Lo(e), n = M0(e), r = n(t, t.neg(t.ONE)), o = n(t, r), s = n(t, t.neg(r)), i = (e + IS) / B0;
|
|
16944
16933
|
return (c, a) => {
|
|
16945
16934
|
let u = c.pow(a, i), l = c.mul(u, r);
|
|
16946
16935
|
const d = c.mul(u, o), p = c.mul(u, s), f = c.eql(c.sqr(l), a), h = c.eql(c.sqr(d), a);
|
|
@@ -16983,10 +16972,10 @@ function M0(e) {
|
|
|
16983
16972
|
return f;
|
|
16984
16973
|
};
|
|
16985
16974
|
}
|
|
16986
|
-
function
|
|
16987
|
-
return e % N0 === O0 ? L0 : e % C0 === I0 ?
|
|
16975
|
+
function MS(e) {
|
|
16976
|
+
return e % N0 === O0 ? L0 : e % C0 === I0 ? BS : e % B0 === CS ? LS(e) : M0(e);
|
|
16988
16977
|
}
|
|
16989
|
-
const
|
|
16978
|
+
const DS = [
|
|
16990
16979
|
"create",
|
|
16991
16980
|
"isValid",
|
|
16992
16981
|
"is0",
|
|
@@ -17005,16 +16994,16 @@ const FS = [
|
|
|
17005
16994
|
"mulN",
|
|
17006
16995
|
"sqrN"
|
|
17007
16996
|
];
|
|
17008
|
-
function
|
|
16997
|
+
function FS(e) {
|
|
17009
16998
|
const t = {
|
|
17010
16999
|
ORDER: "bigint",
|
|
17011
17000
|
MASK: "bigint",
|
|
17012
17001
|
BYTES: "number",
|
|
17013
17002
|
BITS: "number"
|
|
17014
|
-
}, n =
|
|
17003
|
+
}, n = DS.reduce((r, o) => (r[o] = "function", r), t);
|
|
17015
17004
|
return tu(e, n), e;
|
|
17016
17005
|
}
|
|
17017
|
-
function
|
|
17006
|
+
function kS(e, t, n) {
|
|
17018
17007
|
if (n < qe)
|
|
17019
17008
|
throw new Error("invalid exponent, negatives unsupported");
|
|
17020
17009
|
if (n === qe)
|
|
@@ -17081,7 +17070,7 @@ function Lo(e, t, n = !1, r = {}) {
|
|
|
17081
17070
|
add: (p, f) => vt(p + f, e),
|
|
17082
17071
|
sub: (p, f) => vt(p - f, e),
|
|
17083
17072
|
mul: (p, f) => vt(p * f, e),
|
|
17084
|
-
pow: (p, f) =>
|
|
17073
|
+
pow: (p, f) => kS(d, p, f),
|
|
17085
17074
|
div: (p, f) => vt(p * yf(f, e), e),
|
|
17086
17075
|
// Same as above, but doesn't normalize
|
|
17087
17076
|
sqrN: (p) => p * p,
|
|
@@ -17089,7 +17078,7 @@ function Lo(e, t, n = !1, r = {}) {
|
|
|
17089
17078
|
subN: (p, f) => p - f,
|
|
17090
17079
|
mulN: (p, f) => p * f,
|
|
17091
17080
|
inv: (p) => yf(p, e),
|
|
17092
|
-
sqrt: s || ((p) => (l || (l =
|
|
17081
|
+
sqrt: s || ((p) => (l || (l = MS(e)), l(d, p))),
|
|
17093
17082
|
toBytes: (p) => n ? zh(p, u) : eu(p, u),
|
|
17094
17083
|
fromBytes: (p, f = !0) => {
|
|
17095
17084
|
if (c) {
|
|
@@ -17123,7 +17112,7 @@ function j0(e) {
|
|
|
17123
17112
|
const t = k0(e);
|
|
17124
17113
|
return t + Math.ceil(t / 2);
|
|
17125
17114
|
}
|
|
17126
|
-
function
|
|
17115
|
+
function jS(e, t, n = !1) {
|
|
17127
17116
|
const r = e.length, o = k0(t), s = j0(t);
|
|
17128
17117
|
if (r < 16 || r < s || r > 1024)
|
|
17129
17118
|
throw new Error("expected " + s + "-1024 bytes of input, got " + r);
|
|
@@ -17156,7 +17145,7 @@ function wf(e, t, n) {
|
|
|
17156
17145
|
const u = t * r, l = u + Math.abs(c) - 1, d = c === 0, p = c < 0, f = t % 2 !== 0;
|
|
17157
17146
|
return { nextN: a, offset: l, isZero: d, isNeg: p, isNegF: f, offsetF: u };
|
|
17158
17147
|
}
|
|
17159
|
-
function
|
|
17148
|
+
function _S(e, t) {
|
|
17160
17149
|
if (!Array.isArray(e))
|
|
17161
17150
|
throw new Error("array expected");
|
|
17162
17151
|
e.forEach((n, r) => {
|
|
@@ -17164,7 +17153,7 @@ function US(e, t) {
|
|
|
17164
17153
|
throw new Error("invalid point at index " + r);
|
|
17165
17154
|
});
|
|
17166
17155
|
}
|
|
17167
|
-
function
|
|
17156
|
+
function US(e, t) {
|
|
17168
17157
|
if (!Array.isArray(e))
|
|
17169
17158
|
throw new Error("array of scalars expected");
|
|
17170
17159
|
e.forEach((n, r) => {
|
|
@@ -17180,7 +17169,7 @@ function xf(e) {
|
|
|
17180
17169
|
if (e !== Er)
|
|
17181
17170
|
throw new Error("invalid wNAF");
|
|
17182
17171
|
}
|
|
17183
|
-
class
|
|
17172
|
+
class zS {
|
|
17184
17173
|
// Parametrized with a given Point class (not individual point)
|
|
17185
17174
|
constructor(t, n) {
|
|
17186
17175
|
this.BASE = t.BASE, this.ZERO = t.ZERO, this.Fn = t.Fn, this.bits = n;
|
|
@@ -17270,14 +17259,14 @@ class WS {
|
|
|
17270
17259
|
return Hi(t) !== 1;
|
|
17271
17260
|
}
|
|
17272
17261
|
}
|
|
17273
|
-
function
|
|
17262
|
+
function WS(e, t, n, r) {
|
|
17274
17263
|
let o = t, s = e.ZERO, i = e.ZERO;
|
|
17275
17264
|
for (; n > Er || r > Er; )
|
|
17276
17265
|
n & Mn && (s = s.add(o)), r & Mn && (i = i.add(o)), o = o.double(), n >>= Mn, r >>= Mn;
|
|
17277
17266
|
return { p1: s, p2: i };
|
|
17278
17267
|
}
|
|
17279
|
-
function
|
|
17280
|
-
|
|
17268
|
+
function HS(e, t, n, r) {
|
|
17269
|
+
_S(n, e), US(r, t);
|
|
17281
17270
|
const o = n.length, s = r.length;
|
|
17282
17271
|
if (o !== s)
|
|
17283
17272
|
throw new Error("arrays of points and scalars must have equal length");
|
|
@@ -17305,11 +17294,11 @@ function Ef(e, t, n) {
|
|
|
17305
17294
|
if (t) {
|
|
17306
17295
|
if (t.ORDER !== e)
|
|
17307
17296
|
throw new Error("Field.ORDER must match order: Fp == p, Fn == n");
|
|
17308
|
-
return
|
|
17297
|
+
return FS(t), t;
|
|
17309
17298
|
} else
|
|
17310
17299
|
return Lo(e, { isLE: n });
|
|
17311
17300
|
}
|
|
17312
|
-
function
|
|
17301
|
+
function VS(e, t, n = {}, r) {
|
|
17313
17302
|
if (r === void 0 && (r = e === "edwards"), !t || typeof t != "object")
|
|
17314
17303
|
throw new Error(`expected valid ${e} CURVE object`);
|
|
17315
17304
|
for (const a of ["p", "n", "h"]) {
|
|
@@ -17325,7 +17314,7 @@ function GS(e, t, n = {}, r) {
|
|
|
17325
17314
|
}
|
|
17326
17315
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
17327
17316
|
const Sf = (e, t) => (e + (e >= 0 ? t : -t) / z0) / t;
|
|
17328
|
-
function
|
|
17317
|
+
function GS(e, t, n) {
|
|
17329
17318
|
const [[r, o], [s, i]] = t, c = Sf(i * e, n), a = Sf(-o * e, n);
|
|
17330
17319
|
let u = e - c * r - a * s, l = -c * o - a * i;
|
|
17331
17320
|
const d = u < en, p = l < en;
|
|
@@ -17346,14 +17335,14 @@ function Vi(e, t) {
|
|
|
17346
17335
|
n[r] = e[r] === void 0 ? t[r] : e[r];
|
|
17347
17336
|
return xs(n.lowS, "lowS"), xs(n.prehash, "prehash"), n.format !== void 0 && Ka(n.format), n;
|
|
17348
17337
|
}
|
|
17349
|
-
class
|
|
17338
|
+
class qS extends Error {
|
|
17350
17339
|
constructor(t = "") {
|
|
17351
17340
|
super(t);
|
|
17352
17341
|
}
|
|
17353
17342
|
}
|
|
17354
17343
|
const Yt = {
|
|
17355
17344
|
// asn.1 DER encoding utils
|
|
17356
|
-
Err:
|
|
17345
|
+
Err: qS,
|
|
17357
17346
|
// Basic building block is TLV (Tag-Length-Value)
|
|
17358
17347
|
_tlv: {
|
|
17359
17348
|
encode: (e, t) => {
|
|
@@ -17438,7 +17427,7 @@ const Yt = {
|
|
|
17438
17427
|
const { _tlv: t, _int: n } = Yt, r = t.encode(2, n.encode(e.r)), o = t.encode(2, n.encode(e.s)), s = r + o;
|
|
17439
17428
|
return t.encode(48, s);
|
|
17440
17429
|
}
|
|
17441
|
-
}, en = BigInt(0), hr = BigInt(1), z0 = BigInt(2), Xo = BigInt(3),
|
|
17430
|
+
}, en = BigInt(0), hr = BigInt(1), z0 = BigInt(2), Xo = BigInt(3), ZS = BigInt(4);
|
|
17442
17431
|
function ur(e, t) {
|
|
17443
17432
|
const { BYTES: n } = e;
|
|
17444
17433
|
let r;
|
|
@@ -17456,8 +17445,8 @@ function ur(e, t) {
|
|
|
17456
17445
|
throw new Error("invalid private key: out of range [1..N-1]");
|
|
17457
17446
|
return r;
|
|
17458
17447
|
}
|
|
17459
|
-
function
|
|
17460
|
-
const n =
|
|
17448
|
+
function KS(e, t = {}) {
|
|
17449
|
+
const n = VS("weierstrass", e, t), { Fp: r, Fn: o } = n;
|
|
17461
17450
|
let s = n.CURVE;
|
|
17462
17451
|
const { h: i, n: c } = s;
|
|
17463
17452
|
tu(t, {}, {
|
|
@@ -17481,8 +17470,8 @@ function YS(e, t = {}) {
|
|
|
17481
17470
|
const { x, y: A } = S.toAffine(), R = r.toBytes(x);
|
|
17482
17471
|
if (xs(E, "isCompressed"), E) {
|
|
17483
17472
|
l();
|
|
17484
|
-
const
|
|
17485
|
-
return yn(W0(
|
|
17473
|
+
const b = !r.isOdd(A);
|
|
17474
|
+
return yn(W0(b), R);
|
|
17486
17475
|
} else
|
|
17487
17476
|
return yn(Uint8Array.of(4), R, r.toBytes(A));
|
|
17488
17477
|
}
|
|
@@ -17490,10 +17479,10 @@ function YS(e, t = {}) {
|
|
|
17490
17479
|
Bn(O, void 0, "Point");
|
|
17491
17480
|
const { publicKey: S, publicKeyUncompressed: E } = u, x = O.length, A = O[0], R = O.subarray(1);
|
|
17492
17481
|
if (x === S && (A === 2 || A === 3)) {
|
|
17493
|
-
const
|
|
17494
|
-
if (!r.isValid(
|
|
17482
|
+
const b = r.fromBytes(R);
|
|
17483
|
+
if (!r.isValid(b))
|
|
17495
17484
|
throw new Error("bad point: is not on curve, wrong x");
|
|
17496
|
-
const C = m(
|
|
17485
|
+
const C = m(b);
|
|
17497
17486
|
let D;
|
|
17498
17487
|
try {
|
|
17499
17488
|
D = r.sqrt(C);
|
|
@@ -17503,9 +17492,9 @@ function YS(e, t = {}) {
|
|
|
17503
17492
|
}
|
|
17504
17493
|
l();
|
|
17505
17494
|
const _ = r.isOdd(D);
|
|
17506
|
-
return (A & 1) === 1 !== _ && (D = r.neg(D)), { x:
|
|
17495
|
+
return (A & 1) === 1 !== _ && (D = r.neg(D)), { x: b, y: D };
|
|
17507
17496
|
} else if (x === E && A === 4) {
|
|
17508
|
-
const
|
|
17497
|
+
const b = r.BYTES, C = r.fromBytes(R.subarray(0, b)), D = r.fromBytes(R.subarray(b, b * 2));
|
|
17509
17498
|
if (!v(C, D))
|
|
17510
17499
|
throw new Error("bad point: is not on curve");
|
|
17511
17500
|
return { x: C, y: D };
|
|
@@ -17523,8 +17512,8 @@ function YS(e, t = {}) {
|
|
|
17523
17512
|
}
|
|
17524
17513
|
if (!v(s.Gx, s.Gy))
|
|
17525
17514
|
throw new Error("bad curve params: generator point");
|
|
17526
|
-
const T = r.mul(r.pow(s.a, Xo),
|
|
17527
|
-
if (r.is0(r.add(T,
|
|
17515
|
+
const T = r.mul(r.pow(s.a, Xo), ZS), y = r.mul(r.sqr(s.b), BigInt(27));
|
|
17516
|
+
if (r.is0(r.add(T, y)))
|
|
17528
17517
|
throw new Error("bad curve params: a or b");
|
|
17529
17518
|
function P(O, S, E = !1) {
|
|
17530
17519
|
if (!r.isValid(S) || E && r.is0(S))
|
|
@@ -17538,7 +17527,7 @@ function YS(e, t = {}) {
|
|
|
17538
17527
|
function L(O) {
|
|
17539
17528
|
if (!a || !a.basises)
|
|
17540
17529
|
throw new Error("no endo");
|
|
17541
|
-
return
|
|
17530
|
+
return GS(O, a.basises, o.ORDER);
|
|
17542
17531
|
}
|
|
17543
17532
|
const F = rf((O, S) => {
|
|
17544
17533
|
const { X: E, Y: x, Z: A } = O;
|
|
@@ -17546,12 +17535,12 @@ function YS(e, t = {}) {
|
|
|
17546
17535
|
return { x: E, y: x };
|
|
17547
17536
|
const R = O.is0();
|
|
17548
17537
|
S == null && (S = R ? r.ONE : r.inv(A));
|
|
17549
|
-
const
|
|
17538
|
+
const b = r.mul(E, S), C = r.mul(x, S), D = r.mul(A, S);
|
|
17550
17539
|
if (R)
|
|
17551
17540
|
return { x: r.ZERO, y: r.ZERO };
|
|
17552
17541
|
if (!r.eql(D, r.ONE))
|
|
17553
17542
|
throw new Error("invZ was invalid");
|
|
17554
|
-
return { x:
|
|
17543
|
+
return { x: b, y: C };
|
|
17555
17544
|
}), k = rf((O) => {
|
|
17556
17545
|
if (O.is0()) {
|
|
17557
17546
|
if (t.allowInfinityPoint && !r.is0(O.Y))
|
|
@@ -17623,7 +17612,7 @@ function YS(e, t = {}) {
|
|
|
17623
17612
|
/** Compare one point to another. */
|
|
17624
17613
|
equals(S) {
|
|
17625
17614
|
B(S);
|
|
17626
|
-
const { X: E, Y: x, Z: A } = this, { X: R, Y:
|
|
17615
|
+
const { X: E, Y: x, Z: A } = this, { X: R, Y: b, Z: C } = S, D = r.eql(r.mul(E, C), r.mul(R, A)), _ = r.eql(r.mul(x, C), r.mul(b, A));
|
|
17627
17616
|
return D && _;
|
|
17628
17617
|
}
|
|
17629
17618
|
/** Flips point to one corresponding to (x, -y) in Affine coordinates. */
|
|
@@ -17635,9 +17624,9 @@ function YS(e, t = {}) {
|
|
|
17635
17624
|
// https://eprint.iacr.org/2015/1060, algorithm 3
|
|
17636
17625
|
// Cost: 8M + 3S + 3*a + 2*b3 + 15add.
|
|
17637
17626
|
double() {
|
|
17638
|
-
const { a: S, b: E } = s, x = r.mul(E, Xo), { X: A, Y: R, Z:
|
|
17639
|
-
let C = r.ZERO, D = r.ZERO, _ = r.ZERO, U = r.mul(A, A), W = r.mul(R, R), q = r.mul(
|
|
17640
|
-
return z = r.add(z, z), _ = r.mul(A,
|
|
17627
|
+
const { a: S, b: E } = s, x = r.mul(E, Xo), { X: A, Y: R, Z: b } = this;
|
|
17628
|
+
let C = r.ZERO, D = r.ZERO, _ = r.ZERO, U = r.mul(A, A), W = r.mul(R, R), q = r.mul(b, b), z = r.mul(A, R);
|
|
17629
|
+
return z = r.add(z, z), _ = r.mul(A, b), _ = r.add(_, _), C = r.mul(S, _), D = r.mul(x, q), D = r.add(C, D), C = r.sub(W, D), D = r.add(W, D), D = r.mul(C, D), C = r.mul(z, C), _ = r.mul(x, _), q = r.mul(S, q), z = r.sub(U, q), z = r.mul(S, z), z = r.add(z, _), _ = r.add(U, U), U = r.add(_, U), U = r.add(U, q), U = r.mul(U, z), D = r.add(D, U), q = r.mul(R, b), q = r.add(q, q), U = r.mul(q, z), C = r.sub(C, U), _ = r.mul(q, W), _ = r.add(_, _), _ = r.add(_, _), new w(C, D, _);
|
|
17641
17630
|
}
|
|
17642
17631
|
// Renes-Costello-Batina exception-free addition formula.
|
|
17643
17632
|
// There is 30% faster Jacobian formula, but it is not complete.
|
|
@@ -17645,13 +17634,13 @@ function YS(e, t = {}) {
|
|
|
17645
17634
|
// Cost: 12M + 0S + 3*a + 3*b3 + 23add.
|
|
17646
17635
|
add(S) {
|
|
17647
17636
|
B(S);
|
|
17648
|
-
const { X: E, Y: x, Z: A } = this, { X: R, Y:
|
|
17637
|
+
const { X: E, Y: x, Z: A } = this, { X: R, Y: b, Z: C } = S;
|
|
17649
17638
|
let D = r.ZERO, _ = r.ZERO, U = r.ZERO;
|
|
17650
17639
|
const W = s.a, q = r.mul(s.b, Xo);
|
|
17651
|
-
let z = r.mul(E, R), Z = r.mul(x,
|
|
17640
|
+
let z = r.mul(E, R), Z = r.mul(x, b), V = r.mul(A, C), X = r.add(E, x), ee = r.add(R, b);
|
|
17652
17641
|
X = r.mul(X, ee), ee = r.add(z, Z), X = r.sub(X, ee), ee = r.add(E, A);
|
|
17653
17642
|
let pe = r.add(R, C);
|
|
17654
|
-
return ee = r.mul(ee, pe), pe = r.add(z, V), ee = r.sub(ee, pe), pe = r.add(x, A), D = r.add(
|
|
17643
|
+
return ee = r.mul(ee, pe), pe = r.add(z, V), ee = r.sub(ee, pe), pe = r.add(x, A), D = r.add(b, C), pe = r.mul(pe, D), D = r.add(Z, V), pe = r.sub(pe, D), U = r.mul(W, ee), D = r.mul(q, V), U = r.add(D, U), D = r.sub(Z, U), U = r.add(Z, U), _ = r.mul(D, U), Z = r.add(z, z), Z = r.add(Z, z), V = r.mul(W, V), ee = r.mul(q, ee), Z = r.add(Z, V), V = r.sub(z, V), V = r.mul(W, V), ee = r.add(ee, V), z = r.mul(Z, ee), _ = r.add(_, z), z = r.mul(pe, ee), D = r.mul(X, D), D = r.sub(D, z), z = r.mul(X, Z), U = r.mul(pe, U), U = r.add(U, z), new w(D, _, U);
|
|
17655
17644
|
}
|
|
17656
17645
|
subtract(S) {
|
|
17657
17646
|
return this.add(S.negate());
|
|
@@ -17673,13 +17662,13 @@ function YS(e, t = {}) {
|
|
|
17673
17662
|
if (!o.isValidNot0(S))
|
|
17674
17663
|
throw new Error("invalid scalar: out of range");
|
|
17675
17664
|
let x, A;
|
|
17676
|
-
const R = (
|
|
17665
|
+
const R = (b) => N.cached(this, b, (C) => Ui(w, C));
|
|
17677
17666
|
if (E) {
|
|
17678
|
-
const { k1neg:
|
|
17679
|
-
A = W.add(z), x = g(E.beta, U, q,
|
|
17667
|
+
const { k1neg: b, k1: C, k2neg: D, k2: _ } = L(S), { p: U, f: W } = R(C), { p: q, f: z } = R(_);
|
|
17668
|
+
A = W.add(z), x = g(E.beta, U, q, b, D);
|
|
17680
17669
|
} else {
|
|
17681
|
-
const { p:
|
|
17682
|
-
x =
|
|
17670
|
+
const { p: b, f: C } = R(S);
|
|
17671
|
+
x = b, A = C;
|
|
17683
17672
|
}
|
|
17684
17673
|
return Ui(w, [x, A])[0];
|
|
17685
17674
|
}
|
|
@@ -17699,8 +17688,8 @@ function YS(e, t = {}) {
|
|
|
17699
17688
|
if (N.hasCache(this))
|
|
17700
17689
|
return this.multiply(S);
|
|
17701
17690
|
if (E) {
|
|
17702
|
-
const { k1neg: A, k1: R, k2neg:
|
|
17703
|
-
return g(E.beta, D, _, A,
|
|
17691
|
+
const { k1neg: A, k1: R, k2neg: b, k2: C } = L(S), { p1: D, p2: _ } = WS(w, x, R, C);
|
|
17692
|
+
return g(E.beta, D, _, A, b);
|
|
17704
17693
|
} else
|
|
17705
17694
|
return N.unsafe(x, S);
|
|
17706
17695
|
}
|
|
@@ -17759,14 +17748,14 @@ function YS(e, t = {}) {
|
|
|
17759
17748
|
return Ui(w, S);
|
|
17760
17749
|
}
|
|
17761
17750
|
static msm(S, E) {
|
|
17762
|
-
return
|
|
17751
|
+
return HS(w, o, S, E);
|
|
17763
17752
|
}
|
|
17764
17753
|
static fromPrivateKey(S) {
|
|
17765
17754
|
return w.BASE.multiply(ur(o, S));
|
|
17766
17755
|
}
|
|
17767
17756
|
}
|
|
17768
17757
|
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;
|
|
17769
|
-
const $ = o.BITS, N = new
|
|
17758
|
+
const $ = o.BITS, N = new zS(w, t.endo ? Math.ceil($ / 2) : $);
|
|
17770
17759
|
return w.BASE.precompute(8), w;
|
|
17771
17760
|
}
|
|
17772
17761
|
function W0(e) {
|
|
@@ -17781,7 +17770,7 @@ function H0(e, t) {
|
|
|
17781
17770
|
signature: 2 * t.BYTES
|
|
17782
17771
|
};
|
|
17783
17772
|
}
|
|
17784
|
-
function
|
|
17773
|
+
function YS(e, t = {}) {
|
|
17785
17774
|
const { Fn: n } = e, r = t.randomBytes || eh, o = Object.assign(H0(e.Fp, n), { seed: j0(n.ORDER) });
|
|
17786
17775
|
function s(f) {
|
|
17787
17776
|
try {
|
|
@@ -17800,7 +17789,7 @@ function XS(e, t = {}) {
|
|
|
17800
17789
|
}
|
|
17801
17790
|
}
|
|
17802
17791
|
function c(f = r(o.seed)) {
|
|
17803
|
-
return
|
|
17792
|
+
return jS(Bn(f, o.seed, "seed"), n.ORDER);
|
|
17804
17793
|
}
|
|
17805
17794
|
function a(f, h = !0) {
|
|
17806
17795
|
return e.BASE.multiply(ur(n, f)).toBytes(h);
|
|
@@ -17841,7 +17830,7 @@ function XS(e, t = {}) {
|
|
|
17841
17830
|
}
|
|
17842
17831
|
}, lengths: o });
|
|
17843
17832
|
}
|
|
17844
|
-
function
|
|
17833
|
+
function XS(e, t, n = {}) {
|
|
17845
17834
|
Yp(t), tu(n, {}, {
|
|
17846
17835
|
hmac: "function",
|
|
17847
17836
|
lowS: "boolean",
|
|
@@ -17849,7 +17838,7 @@ function QS(e, t, n = {}) {
|
|
|
17849
17838
|
bits2int: "function",
|
|
17850
17839
|
bits2int_modN: "function"
|
|
17851
17840
|
});
|
|
17852
|
-
const r = n.randomBytes || eh, o = n.hmac || ((E, ...x) => R0(t, E, yn(...x))), { Fp: s, Fn: i } = e, { ORDER: c, BITS: a } = i, { keygen: u, getPublicKey: l, getSharedSecret: d, utils: p, lengths: f } =
|
|
17841
|
+
const r = n.randomBytes || eh, o = n.hmac || ((E, ...x) => R0(t, E, yn(...x))), { Fp: s, Fn: i } = e, { ORDER: c, BITS: a } = i, { keygen: u, getPublicKey: l, getSharedSecret: d, utils: p, lengths: f } = YS(e, n), h = {
|
|
17853
17842
|
prehash: !1,
|
|
17854
17843
|
lowS: typeof n.lowS == "boolean" ? n.lowS : !1,
|
|
17855
17844
|
format: void 0,
|
|
@@ -17865,7 +17854,7 @@ function QS(e, t, n = {}) {
|
|
|
17865
17854
|
throw new Error(`invalid signature ${E}: out of range 1..Point.Fn.ORDER`);
|
|
17866
17855
|
return x;
|
|
17867
17856
|
}
|
|
17868
|
-
function
|
|
17857
|
+
function y(E, x) {
|
|
17869
17858
|
Ka(x);
|
|
17870
17859
|
const A = f.signature, R = x === "compact" ? A : x === "recovered" ? A + 1 : void 0;
|
|
17871
17860
|
return Bn(E, R, `${x} signature`);
|
|
@@ -17875,14 +17864,14 @@ function QS(e, t, n = {}) {
|
|
|
17875
17864
|
this.r = T("r", x), this.s = T("s", A), R != null && (this.recovery = R), Object.freeze(this);
|
|
17876
17865
|
}
|
|
17877
17866
|
static fromBytes(x, A = m) {
|
|
17878
|
-
|
|
17867
|
+
y(x, A);
|
|
17879
17868
|
let R;
|
|
17880
17869
|
if (A === "der") {
|
|
17881
17870
|
const { r: _, s: U } = Yt.toSig(Bn(x));
|
|
17882
17871
|
return new P(_, U);
|
|
17883
17872
|
}
|
|
17884
17873
|
A === "recovered" && (R = x[0], A = "compact", x = x.subarray(1));
|
|
17885
|
-
const
|
|
17874
|
+
const b = i.BYTES, C = x.subarray(0, b), D = x.subarray(b, b * 2);
|
|
17886
17875
|
return new P(i.fromBytes(C), i.fromBytes(D), R);
|
|
17887
17876
|
}
|
|
17888
17877
|
static fromHex(x, A) {
|
|
@@ -17892,7 +17881,7 @@ function QS(e, t, n = {}) {
|
|
|
17892
17881
|
return new P(this.r, this.s, x);
|
|
17893
17882
|
}
|
|
17894
17883
|
recoverPublicKey(x) {
|
|
17895
|
-
const A = s.ORDER, { r: R, s:
|
|
17884
|
+
const A = s.ORDER, { r: R, s: b, recovery: C } = this;
|
|
17896
17885
|
if (C == null || ![0, 1, 2, 3].includes(C))
|
|
17897
17886
|
throw new Error("recovery id invalid");
|
|
17898
17887
|
if (c * z0 < A && C > 1)
|
|
@@ -17900,7 +17889,7 @@ function QS(e, t, n = {}) {
|
|
|
17900
17889
|
const _ = C === 2 || C === 3 ? R + c : R;
|
|
17901
17890
|
if (!s.isValid(_))
|
|
17902
17891
|
throw new Error("recovery id 2 or 3 invalid");
|
|
17903
|
-
const U = s.toBytes(_), W = e.fromBytes(yn(W0((C & 1) === 0), U)), q = i.inv(_), z = L(Ge("msgHash", x)), Z = i.create(-z * q), V = i.create(
|
|
17892
|
+
const U = s.toBytes(_), W = e.fromBytes(yn(W0((C & 1) === 0), U)), q = i.inv(_), z = L(Ge("msgHash", x)), Z = i.create(-z * q), V = i.create(b * q), X = e.BASE.multiplyUnsafe(Z).add(W.multiplyUnsafe(V));
|
|
17904
17893
|
if (X.is0())
|
|
17905
17894
|
throw new Error("point at infinify");
|
|
17906
17895
|
return X.assertValidity(), X;
|
|
@@ -17965,8 +17954,8 @@ function QS(e, t, n = {}) {
|
|
|
17965
17954
|
function w(E, x, A) {
|
|
17966
17955
|
if (["recovered", "canonical"].some((Z) => Z in A))
|
|
17967
17956
|
throw new Error("sign() legacy options not supported");
|
|
17968
|
-
const { lowS: R, prehash:
|
|
17969
|
-
E = g(E,
|
|
17957
|
+
const { lowS: R, prehash: b, extraEntropy: C } = Vi(A, h);
|
|
17958
|
+
E = g(E, b);
|
|
17970
17959
|
const D = L(E), _ = ur(i, x), U = [k(_), k(D)];
|
|
17971
17960
|
if (C != null && C !== !1) {
|
|
17972
17961
|
const Z = C === !0 ? r(f.secretKey) : C;
|
|
@@ -17990,8 +17979,8 @@ function QS(e, t, n = {}) {
|
|
|
17990
17979
|
}
|
|
17991
17980
|
function $(E, x, A = {}) {
|
|
17992
17981
|
E = Ge("message", E);
|
|
17993
|
-
const { seed: R, k2sig:
|
|
17994
|
-
return o6(t.outputLen, i.BYTES, o)(R,
|
|
17982
|
+
const { seed: R, k2sig: b } = w(E, x, A);
|
|
17983
|
+
return o6(t.outputLen, i.BYTES, o)(R, b);
|
|
17995
17984
|
}
|
|
17996
17985
|
function N(E) {
|
|
17997
17986
|
let x;
|
|
@@ -18003,9 +17992,9 @@ function QS(e, t, n = {}) {
|
|
|
18003
17992
|
else if (A) {
|
|
18004
17993
|
try {
|
|
18005
17994
|
x = P.fromBytes(Ge("sig", E), "der");
|
|
18006
|
-
} catch (
|
|
18007
|
-
if (!(
|
|
18008
|
-
throw
|
|
17995
|
+
} catch (b) {
|
|
17996
|
+
if (!(b instanceof Yt.Err))
|
|
17997
|
+
throw b;
|
|
18009
17998
|
}
|
|
18010
17999
|
if (!x)
|
|
18011
18000
|
try {
|
|
@@ -18017,7 +18006,7 @@ function QS(e, t, n = {}) {
|
|
|
18017
18006
|
return x || !1;
|
|
18018
18007
|
}
|
|
18019
18008
|
function O(E, x, A, R = {}) {
|
|
18020
|
-
const { lowS:
|
|
18009
|
+
const { lowS: b, prehash: C, format: D } = Vi(R, h);
|
|
18021
18010
|
if (A = Ge("publicKey", A), x = g(Ge("message", x), C), "strict" in R)
|
|
18022
18011
|
throw new Error("options.strict was renamed to lowS");
|
|
18023
18012
|
const _ = D === void 0 ? N(E) : P.fromBytes(Ge("sig", E), D);
|
|
@@ -18025,7 +18014,7 @@ function QS(e, t, n = {}) {
|
|
|
18025
18014
|
return !1;
|
|
18026
18015
|
try {
|
|
18027
18016
|
const U = e.fromBytes(A);
|
|
18028
|
-
if (
|
|
18017
|
+
if (b && _.hasHighS())
|
|
18029
18018
|
return !1;
|
|
18030
18019
|
const { r: W, s: q } = _, z = L(x), Z = i.inv(q), V = i.create(z * Z), X = i.create(W * Z), ee = e.BASE.multiplyUnsafe(V).add(U.multiplyUnsafe(X));
|
|
18031
18020
|
return ee.is0() ? !1 : i.create(ee.x) === W;
|
|
@@ -18051,7 +18040,7 @@ function QS(e, t, n = {}) {
|
|
|
18051
18040
|
hash: t
|
|
18052
18041
|
});
|
|
18053
18042
|
}
|
|
18054
|
-
function
|
|
18043
|
+
function QS(e) {
|
|
18055
18044
|
const t = {
|
|
18056
18045
|
a: e.a,
|
|
18057
18046
|
b: e.b,
|
|
@@ -18078,8 +18067,8 @@ function JS(e) {
|
|
|
18078
18067
|
};
|
|
18079
18068
|
return { CURVE: t, curveOpts: s };
|
|
18080
18069
|
}
|
|
18081
|
-
function
|
|
18082
|
-
const { CURVE: t, curveOpts: n } =
|
|
18070
|
+
function JS(e) {
|
|
18071
|
+
const { CURVE: t, curveOpts: n } = QS(e), r = {
|
|
18083
18072
|
hmac: e.hmac,
|
|
18084
18073
|
randomBytes: e.randomBytes,
|
|
18085
18074
|
lowS: e.lowS,
|
|
@@ -18088,20 +18077,20 @@ function eP(e) {
|
|
|
18088
18077
|
};
|
|
18089
18078
|
return { CURVE: t, curveOpts: n, hash: e.hash, ecdsaOpts: r };
|
|
18090
18079
|
}
|
|
18091
|
-
function
|
|
18080
|
+
function eP(e, t) {
|
|
18092
18081
|
const n = t.Point;
|
|
18093
18082
|
return Object.assign({}, t, {
|
|
18094
18083
|
ProjectivePoint: n,
|
|
18095
18084
|
CURVE: Object.assign({}, e, F0(n.Fn.ORDER, n.Fn.BITS))
|
|
18096
18085
|
});
|
|
18097
18086
|
}
|
|
18098
|
-
function
|
|
18099
|
-
const { CURVE: t, curveOpts: n, hash: r, ecdsaOpts: o } =
|
|
18100
|
-
return
|
|
18087
|
+
function tP(e) {
|
|
18088
|
+
const { CURVE: t, curveOpts: n, hash: r, ecdsaOpts: o } = JS(e), s = KS(t, n), i = XS(s, r, o);
|
|
18089
|
+
return eP(e, i);
|
|
18101
18090
|
}
|
|
18102
18091
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
18103
|
-
function
|
|
18104
|
-
const n = (r) =>
|
|
18092
|
+
function nP(e, t) {
|
|
18093
|
+
const n = (r) => tP({ ...e, hash: r });
|
|
18105
18094
|
return { ...n(t), create: n };
|
|
18106
18095
|
}
|
|
18107
18096
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
@@ -18113,24 +18102,24 @@ const hu = {
|
|
|
18113
18102
|
b: BigInt(7),
|
|
18114
18103
|
Gx: BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),
|
|
18115
18104
|
Gy: BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")
|
|
18116
|
-
},
|
|
18105
|
+
}, rP = {
|
|
18117
18106
|
beta: BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),
|
|
18118
18107
|
basises: [
|
|
18119
18108
|
[BigInt("0x3086d221a7d46bcde86c90e49284eb15"), -BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],
|
|
18120
18109
|
[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"), BigInt("0x3086d221a7d46bcde86c90e49284eb15")]
|
|
18121
18110
|
]
|
|
18122
18111
|
}, Pf = /* @__PURE__ */ BigInt(2);
|
|
18123
|
-
function
|
|
18124
|
-
const t = hu.p, n = BigInt(3), r = BigInt(6), o = BigInt(11), s = BigInt(22), i = BigInt(23), c = BigInt(44), a = BigInt(88), u = e * e * e % t, l = u * u * e % t, d = at(l, n, t) * l % t, p = at(d, n, t) * l % t, f = at(p, Pf, t) * u % t, h = at(f, o, t) * f % t, m = at(h, s, t) * h % t, v = at(m, c, t) * m % t, T = at(v, a, t) * v % t,
|
|
18112
|
+
function oP(e) {
|
|
18113
|
+
const t = hu.p, n = BigInt(3), r = BigInt(6), o = BigInt(11), s = BigInt(22), i = BigInt(23), c = BigInt(44), a = BigInt(88), u = e * e * e % t, l = u * u * e % t, d = at(l, n, t) * l % t, p = at(d, n, t) * l % t, f = at(p, Pf, t) * u % t, h = at(f, o, t) * f % t, m = at(h, s, t) * h % t, v = at(m, c, t) * m % t, T = at(v, a, t) * v % t, y = at(T, c, t) * m % t, P = at(y, n, t) * l % t, B = at(P, i, t) * h % t, L = at(B, r, t) * u % t, F = at(L, Pf, t);
|
|
18125
18114
|
if (!Ya.eql(Ya.sqr(F), e))
|
|
18126
18115
|
throw new Error("Cannot find square root");
|
|
18127
18116
|
return F;
|
|
18128
18117
|
}
|
|
18129
|
-
const Ya = Lo(hu.p, { sqrt:
|
|
18118
|
+
const Ya = Lo(hu.p, { sqrt: oP }), V0 = nP({ ...hu, Fp: Ya, lowS: !0, endo: rP }, Bh), sP = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
18130
18119
|
__proto__: null,
|
|
18131
18120
|
secp256k1: V0
|
|
18132
18121
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
18133
|
-
function
|
|
18122
|
+
function iP({ r: e, s: t, to: n = "hex", v: r, yParity: o }) {
|
|
18134
18123
|
const s = (() => {
|
|
18135
18124
|
if (o === 0 || o === 1)
|
|
18136
18125
|
return o;
|
|
@@ -18142,7 +18131,7 @@ function aP({ r: e, s: t, to: n = "hex", v: r, yParity: o }) {
|
|
|
18142
18131
|
}
|
|
18143
18132
|
async function mu(e, t) {
|
|
18144
18133
|
var d, p, f;
|
|
18145
|
-
const { address: n, factory: r, factoryData: o, hash: s, signature: i, universalSignatureVerifierAddress: c = (f = (p = (d = e.chain) == null ? void 0 : d.contracts) == null ? void 0 : p.universalSignatureVerifier) == null ? void 0 : f.address, ...a } = t, u = jt(i) ? i : typeof i == "object" && "r" in i && "s" in i ?
|
|
18134
|
+
const { address: n, factory: r, factoryData: o, hash: s, signature: i, universalSignatureVerifierAddress: c = (f = (p = (d = e.chain) == null ? void 0 : d.contracts) == null ? void 0 : p.universalSignatureVerifier) == null ? void 0 : f.address, ...a } = t, u = jt(i) ? i : typeof i == "object" && "r" in i && "s" in i ? iP(i) : Ne(i), l = await (async () => !r && !o || q5(u) ? u : Z5({
|
|
18146
18135
|
address: r,
|
|
18147
18136
|
data: o,
|
|
18148
18137
|
signature: u
|
|
@@ -18176,7 +18165,7 @@ async function mu(e, t) {
|
|
|
18176
18165
|
throw h;
|
|
18177
18166
|
}
|
|
18178
18167
|
}
|
|
18179
|
-
async function
|
|
18168
|
+
async function aP(e, { address: t, message: n, factory: r, factoryData: o, signature: s, ...i }) {
|
|
18180
18169
|
const c = g0(n);
|
|
18181
18170
|
return mu(e, {
|
|
18182
18171
|
address: t,
|
|
@@ -18187,8 +18176,8 @@ async function cP(e, { address: t, message: n, factory: r, factoryData: o, signa
|
|
|
18187
18176
|
...i
|
|
18188
18177
|
});
|
|
18189
18178
|
}
|
|
18190
|
-
async function
|
|
18191
|
-
const { address: n, factory: r, factoryData: o, signature: s, message: i, primaryType: c, types: a, domain: u, ...l } = t, d =
|
|
18179
|
+
async function cP(e, t) {
|
|
18180
|
+
const { address: n, factory: r, factoryData: o, signature: s, message: i, primaryType: c, types: a, domain: u, ...l } = t, d = k5({ message: i, primaryType: c, types: a, domain: u });
|
|
18192
18181
|
return mu(e, {
|
|
18193
18182
|
address: n,
|
|
18194
18183
|
factory: r,
|
|
@@ -18241,7 +18230,7 @@ function G0(e, { emitOnBegin: t = !1, emitMissed: n = !1, onBlockNumber: r, onEr
|
|
|
18241
18230
|
try {
|
|
18242
18231
|
const m = (() => {
|
|
18243
18232
|
if (e.transport.type === "fallback") {
|
|
18244
|
-
const T = e.transport.transports.find((
|
|
18233
|
+
const T = e.transport.transports.find((y) => y.config.type === "webSocket" || y.config.type === "ipc");
|
|
18245
18234
|
return T ? T.value : e.transport;
|
|
18246
18235
|
}
|
|
18247
18236
|
return e.transport;
|
|
@@ -18251,12 +18240,12 @@ function G0(e, { emitOnBegin: t = !1, emitMissed: n = !1, onBlockNumber: r, onEr
|
|
|
18251
18240
|
var P;
|
|
18252
18241
|
if (!f)
|
|
18253
18242
|
return;
|
|
18254
|
-
const
|
|
18255
|
-
p.onBlockNumber(
|
|
18243
|
+
const y = _t((P = T.result) == null ? void 0 : P.number);
|
|
18244
|
+
p.onBlockNumber(y, a), a = y;
|
|
18256
18245
|
},
|
|
18257
18246
|
onError(T) {
|
|
18258
|
-
var
|
|
18259
|
-
(
|
|
18247
|
+
var y;
|
|
18248
|
+
(y = p.onError) == null || y.call(p, T);
|
|
18260
18249
|
}
|
|
18261
18250
|
});
|
|
18262
18251
|
h = v, f || h();
|
|
@@ -18267,7 +18256,7 @@ function G0(e, { emitOnBegin: t = !1, emitMissed: n = !1, onBlockNumber: r, onEr
|
|
|
18267
18256
|
});
|
|
18268
18257
|
})();
|
|
18269
18258
|
}
|
|
18270
|
-
async function
|
|
18259
|
+
async function uP(e, t) {
|
|
18271
18260
|
const {
|
|
18272
18261
|
checkReplacement: n = !0,
|
|
18273
18262
|
confirmations: r = 1,
|
|
@@ -18282,10 +18271,10 @@ async function lP(e, t) {
|
|
|
18282
18271
|
return t.pollingInterval ? t.pollingInterval : (L = e.chain) != null && L.experimental_preconfirmationTime ? e.chain.experimental_preconfirmationTime : e.pollingInterval;
|
|
18283
18272
|
})();
|
|
18284
18273
|
let d, p, f, h = !1, m, v;
|
|
18285
|
-
const { promise: T, resolve:
|
|
18274
|
+
const { promise: T, resolve: y, reject: P } = n0(), B = a ? setTimeout(() => {
|
|
18286
18275
|
v(), m(), P(new f2({ hash: o }));
|
|
18287
18276
|
}, a) : void 0;
|
|
18288
|
-
return m = $n(u, { onReplaced: s, resolve:
|
|
18277
|
+
return m = $n(u, { onReplaced: s, resolve: y, reject: P }, async (L) => {
|
|
18289
18278
|
if (f = await te(e, os, "getTransactionReceipt")({ hash: o }).catch(() => {
|
|
18290
18279
|
}), f && r <= 1) {
|
|
18291
18280
|
clearTimeout(B), L.resolve(f), m();
|
|
@@ -18359,7 +18348,7 @@ async function lP(e, t) {
|
|
|
18359
18348
|
});
|
|
18360
18349
|
}), T;
|
|
18361
18350
|
}
|
|
18362
|
-
function
|
|
18351
|
+
function lP(e, { blockTag: t = e.experimental_blockTag ?? "latest", emitMissed: n = !1, emitOnBegin: r = !1, onBlock: o, onError: s, includeTransactions: i, poll: c, pollingInterval: a = e.pollingInterval }) {
|
|
18363
18352
|
const u = typeof c < "u" ? c : !(e.transport.type === "webSocket" || e.transport.type === "ipc" || e.transport.type === "fallback" && (e.transport.transports[0].config.type === "webSocket" || e.transport.transports[0].config.type === "ipc")), l = i ?? !1;
|
|
18364
18353
|
let d;
|
|
18365
18354
|
return u ? (() => {
|
|
@@ -18383,9 +18372,9 @@ function fP(e, { blockTag: t = e.experimental_blockTag ?? "latest", emitMissed:
|
|
|
18383
18372
|
if (T.number === d.number)
|
|
18384
18373
|
return;
|
|
18385
18374
|
if (T.number - d.number > 1 && n)
|
|
18386
|
-
for (let
|
|
18375
|
+
for (let y = (d == null ? void 0 : d.number) + 1n; y < T.number; y++) {
|
|
18387
18376
|
const P = await te(e, Mt, "getBlock")({
|
|
18388
|
-
blockNumber:
|
|
18377
|
+
blockNumber: y,
|
|
18389
18378
|
includeTransactions: l
|
|
18390
18379
|
});
|
|
18391
18380
|
m.onBlock(P, d), d = P;
|
|
@@ -18419,7 +18408,7 @@ function fP(e, { blockTag: t = e.experimental_blockTag ?? "latest", emitMissed:
|
|
|
18419
18408
|
return P ? P.value : e.transport;
|
|
18420
18409
|
}
|
|
18421
18410
|
return e.transport;
|
|
18422
|
-
})(), { unsubscribe:
|
|
18411
|
+
})(), { unsubscribe: y } = await T.subscribe({
|
|
18423
18412
|
params: ["newHeads"],
|
|
18424
18413
|
async onData(P) {
|
|
18425
18414
|
var L;
|
|
@@ -18436,14 +18425,14 @@ function fP(e, { blockTag: t = e.experimental_blockTag ?? "latest", emitMissed:
|
|
|
18436
18425
|
s == null || s(P);
|
|
18437
18426
|
}
|
|
18438
18427
|
});
|
|
18439
|
-
v =
|
|
18428
|
+
v = y, h || v();
|
|
18440
18429
|
} catch (T) {
|
|
18441
18430
|
s == null || s(T);
|
|
18442
18431
|
}
|
|
18443
18432
|
})(), () => v();
|
|
18444
18433
|
})();
|
|
18445
18434
|
}
|
|
18446
|
-
function
|
|
18435
|
+
function fP(e, { address: t, args: n, batch: r = !0, event: o, events: s, fromBlock: i, onError: c, onLogs: a, poll: u, pollingInterval: l = e.pollingInterval, strict: d }) {
|
|
18447
18436
|
const p = typeof u < "u" ? u : typeof i == "bigint" ? !0 : !(e.transport.type === "webSocket" || e.transport.type === "ipc" || e.transport.type === "fallback" && (e.transport.transports[0].config.type === "webSocket" || e.transport.transports[0].config.type === "ipc")), f = d ?? !1;
|
|
18448
18437
|
return p ? (() => {
|
|
18449
18438
|
const v = De([
|
|
@@ -18457,8 +18446,8 @@ function dP(e, { address: t, args: n, batch: r = !0, event: o, events: s, fromBl
|
|
|
18457
18446
|
i
|
|
18458
18447
|
]);
|
|
18459
18448
|
return $n(v, { onLogs: a, onError: c }, (T) => {
|
|
18460
|
-
let
|
|
18461
|
-
i !== void 0 && (
|
|
18449
|
+
let y;
|
|
18450
|
+
i !== void 0 && (y = i - 1n);
|
|
18462
18451
|
let P, B = !1;
|
|
18463
18452
|
const L = Co(async () => {
|
|
18464
18453
|
var F;
|
|
@@ -18483,14 +18472,14 @@ function dP(e, { address: t, args: n, batch: r = !0, event: o, events: s, fromBl
|
|
|
18483
18472
|
k = await te(e, Xs, "getFilterChanges")({ filter: P });
|
|
18484
18473
|
else {
|
|
18485
18474
|
const g = await te(e, Bo, "getBlockNumber")({});
|
|
18486
|
-
|
|
18475
|
+
y && y !== g ? k = await te(e, Qc, "getLogs")({
|
|
18487
18476
|
address: t,
|
|
18488
18477
|
args: n,
|
|
18489
18478
|
event: o,
|
|
18490
18479
|
events: s,
|
|
18491
|
-
fromBlock:
|
|
18480
|
+
fromBlock: y + 1n,
|
|
18492
18481
|
toBlock: g
|
|
18493
|
-
}) : k = [],
|
|
18482
|
+
}) : k = [], y = g;
|
|
18494
18483
|
}
|
|
18495
18484
|
if (k.length === 0)
|
|
18496
18485
|
return;
|
|
@@ -18514,7 +18503,7 @@ function dP(e, { address: t, args: n, batch: r = !0, event: o, events: s, fromBl
|
|
|
18514
18503
|
let v = !0, T = () => v = !1;
|
|
18515
18504
|
return (async () => {
|
|
18516
18505
|
try {
|
|
18517
|
-
const
|
|
18506
|
+
const y = (() => {
|
|
18518
18507
|
if (e.transport.type === "fallback") {
|
|
18519
18508
|
const F = e.transport.transports.find((k) => k.config.type === "webSocket" || k.config.type === "ipc");
|
|
18520
18509
|
return F ? F.value : e.transport;
|
|
@@ -18527,7 +18516,7 @@ function dP(e, { address: t, args: n, batch: r = !0, event: o, events: s, fromBl
|
|
|
18527
18516
|
eventName: k.name,
|
|
18528
18517
|
args: n
|
|
18529
18518
|
}))], o && (B = B[0]));
|
|
18530
|
-
const { unsubscribe: L } = await
|
|
18519
|
+
const { unsubscribe: L } = await y.subscribe({
|
|
18531
18520
|
params: ["logs", { address: t, topics: B }],
|
|
18532
18521
|
onData(F) {
|
|
18533
18522
|
var g;
|
|
@@ -18561,13 +18550,13 @@ function dP(e, { address: t, args: n, batch: r = !0, event: o, events: s, fromBl
|
|
|
18561
18550
|
}
|
|
18562
18551
|
});
|
|
18563
18552
|
T = L, v || T();
|
|
18564
|
-
} catch (
|
|
18565
|
-
c == null || c(
|
|
18553
|
+
} catch (y) {
|
|
18554
|
+
c == null || c(y);
|
|
18566
18555
|
}
|
|
18567
18556
|
})(), () => T();
|
|
18568
18557
|
})();
|
|
18569
18558
|
}
|
|
18570
|
-
function
|
|
18559
|
+
function dP(e, { batch: t = !0, onError: n, onTransactions: r, poll: o, pollingInterval: s = e.pollingInterval }) {
|
|
18571
18560
|
return (typeof o < "u" ? o : e.transport.type !== "webSocket" && e.transport.type !== "ipc") ? (() => {
|
|
18572
18561
|
const u = De([
|
|
18573
18562
|
"watchPendingTransactions",
|
|
@@ -18629,9 +18618,9 @@ function pP(e, { batch: t = !0, onError: n, onTransactions: r, poll: o, pollingI
|
|
|
18629
18618
|
})(), () => l();
|
|
18630
18619
|
})();
|
|
18631
18620
|
}
|
|
18632
|
-
function
|
|
18621
|
+
function pP(e) {
|
|
18633
18622
|
var d, p, f;
|
|
18634
|
-
const { scheme: t, statement: n, ...r } = ((d = e.match(
|
|
18623
|
+
const { scheme: t, statement: n, ...r } = ((d = e.match(hP)) == null ? void 0 : d.groups) ?? {}, { chainId: o, expirationTime: s, issuedAt: i, notBefore: c, requestId: a, ...u } = ((p = e.match(mP)) == null ? void 0 : p.groups) ?? {}, l = (f = e.split("Resources:")[1]) == null ? void 0 : f.split(`
|
|
18635
18624
|
- `).slice(1);
|
|
18636
18625
|
return {
|
|
18637
18626
|
...r,
|
|
@@ -18646,8 +18635,8 @@ function hP(e) {
|
|
|
18646
18635
|
...n ? { statement: n } : {}
|
|
18647
18636
|
};
|
|
18648
18637
|
}
|
|
18649
|
-
const
|
|
18650
|
-
function
|
|
18638
|
+
const hP = /^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/, mP = /(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;
|
|
18639
|
+
function gP(e) {
|
|
18651
18640
|
const { address: t, domain: n, message: r, nonce: o, scheme: s, time: i = /* @__PURE__ */ new Date() } = e;
|
|
18652
18641
|
if (n && r.domain !== n || o && r.nonce !== o || s && r.scheme !== s || r.expirationTime && i >= r.expirationTime || r.notBefore && i < r.notBefore)
|
|
18653
18642
|
return !1;
|
|
@@ -18659,9 +18648,9 @@ function bP(e) {
|
|
|
18659
18648
|
}
|
|
18660
18649
|
return !0;
|
|
18661
18650
|
}
|
|
18662
|
-
async function
|
|
18663
|
-
const { address: n, domain: r, message: o, nonce: s, scheme: i, signature: c, time: a = /* @__PURE__ */ new Date(), ...u } = t, l =
|
|
18664
|
-
if (!l.address || !
|
|
18651
|
+
async function bP(e, t) {
|
|
18652
|
+
const { address: n, domain: r, message: o, nonce: s, scheme: i, signature: c, time: a = /* @__PURE__ */ new Date(), ...u } = t, l = pP(o);
|
|
18653
|
+
if (!l.address || !gP({
|
|
18665
18654
|
address: n,
|
|
18666
18655
|
domain: r,
|
|
18667
18656
|
message: l,
|
|
@@ -18678,74 +18667,74 @@ async function yP(e, t) {
|
|
|
18678
18667
|
...u
|
|
18679
18668
|
});
|
|
18680
18669
|
}
|
|
18681
|
-
function
|
|
18670
|
+
function yP(e) {
|
|
18682
18671
|
return {
|
|
18683
18672
|
call: (t) => Ys(e, t),
|
|
18684
18673
|
createAccessList: (t) => u0(e, t),
|
|
18685
|
-
createBlockFilter: () =>
|
|
18674
|
+
createBlockFilter: () => $5(e),
|
|
18686
18675
|
createContractEventFilter: (t) => ph(e, t),
|
|
18687
18676
|
createEventFilter: (t) => l0(e, t),
|
|
18688
18677
|
createPendingTransactionFilter: () => f0(e),
|
|
18689
18678
|
estimateContractGas: (t) => J2(e, t),
|
|
18690
18679
|
estimateGas: (t) => Zc(e, t),
|
|
18691
18680
|
getBalance: (t) => kh(e, t),
|
|
18692
|
-
getBlobBaseFee: () =>
|
|
18681
|
+
getBlobBaseFee: () => A5(e),
|
|
18693
18682
|
getBlock: (t) => Mt(e, t),
|
|
18694
18683
|
getBlockNumber: (t) => Bo(e, t),
|
|
18695
|
-
getBlockTransactionCount: (t) =>
|
|
18684
|
+
getBlockTransactionCount: (t) => T5(e, t),
|
|
18696
18685
|
getBytecode: (t) => gf(e, t),
|
|
18697
18686
|
getChainId: () => Dh(e),
|
|
18698
18687
|
getCode: (t) => gf(e, t),
|
|
18699
18688
|
getContractEvents: (t) => jh(e, t),
|
|
18700
|
-
getEip712Domain: (t) =>
|
|
18701
|
-
getEnsAddress: (t) =>
|
|
18702
|
-
getEnsAvatar: (t) =>
|
|
18703
|
-
getEnsName: (t) =>
|
|
18704
|
-
getEnsResolver: (t) =>
|
|
18689
|
+
getEip712Domain: (t) => O5(e, t),
|
|
18690
|
+
getEnsAddress: (t) => u5(e, t),
|
|
18691
|
+
getEnsAvatar: (t) => E5(e, t),
|
|
18692
|
+
getEnsName: (t) => S5(e, t),
|
|
18693
|
+
getEnsResolver: (t) => P5(e, t),
|
|
18705
18694
|
getEnsText: (t) => c0(e, t),
|
|
18706
|
-
getFeeHistory: (t) =>
|
|
18695
|
+
getFeeHistory: (t) => C5(e, t),
|
|
18707
18696
|
estimateFeesPerGas: (t) => D2(e, t),
|
|
18708
18697
|
getFilterChanges: (t) => Xs(e, t),
|
|
18709
|
-
getFilterLogs: (t) =>
|
|
18698
|
+
getFilterLogs: (t) => B5(e, t),
|
|
18710
18699
|
getGasPrice: () => Gc(e),
|
|
18711
18700
|
getLogs: (t) => Qc(e, t),
|
|
18712
|
-
getProof: (t) =>
|
|
18701
|
+
getProof: (t) => X5(e, t),
|
|
18713
18702
|
estimateMaxPriorityFeePerGas: (t) => M2(e, t),
|
|
18714
|
-
getStorageAt: (t) =>
|
|
18703
|
+
getStorageAt: (t) => Q5(e, t),
|
|
18715
18704
|
getTransaction: (t) => lu(e, t),
|
|
18716
|
-
getTransactionConfirmations: (t) =>
|
|
18705
|
+
getTransactionConfirmations: (t) => J5(e, t),
|
|
18717
18706
|
getTransactionCount: (t) => Nh(e, t),
|
|
18718
18707
|
getTransactionReceipt: (t) => os(e, t),
|
|
18719
|
-
multicall: (t) =>
|
|
18708
|
+
multicall: (t) => eS(e, t),
|
|
18720
18709
|
prepareTransactionRequest: (t) => Fh(e, t),
|
|
18721
18710
|
readContract: (t) => ln(e, t),
|
|
18722
18711
|
sendRawTransaction: (t) => V6(e, t),
|
|
18723
18712
|
simulate: (t) => Wa(e, t),
|
|
18724
18713
|
simulateBlocks: (t) => Wa(e, t),
|
|
18725
|
-
simulateCalls: (t) =>
|
|
18714
|
+
simulateCalls: (t) => NS(e, t),
|
|
18726
18715
|
simulateContract: (t) => F6(e, t),
|
|
18727
|
-
verifyMessage: (t) =>
|
|
18728
|
-
verifySiweMessage: (t) =>
|
|
18729
|
-
verifyTypedData: (t) =>
|
|
18716
|
+
verifyMessage: (t) => aP(e, t),
|
|
18717
|
+
verifySiweMessage: (t) => bP(e, t),
|
|
18718
|
+
verifyTypedData: (t) => cP(e, t),
|
|
18730
18719
|
uninstallFilter: (t) => Qs(e, t),
|
|
18731
|
-
waitForTransactionReceipt: (t) =>
|
|
18732
|
-
watchBlocks: (t) =>
|
|
18720
|
+
waitForTransactionReceipt: (t) => uP(e, t),
|
|
18721
|
+
watchBlocks: (t) => lP(e, t),
|
|
18733
18722
|
watchBlockNumber: (t) => G0(e, t),
|
|
18734
18723
|
watchContractEvent: (t) => H6(e, t),
|
|
18735
|
-
watchEvent: (t) =>
|
|
18736
|
-
watchPendingTransactions: (t) =>
|
|
18724
|
+
watchEvent: (t) => fP(e, t),
|
|
18725
|
+
watchPendingTransactions: (t) => dP(e, t)
|
|
18737
18726
|
};
|
|
18738
18727
|
}
|
|
18739
|
-
function
|
|
18728
|
+
function vP(e) {
|
|
18740
18729
|
const { key: t = "public", name: n = "Public Client" } = e;
|
|
18741
18730
|
return Z6({
|
|
18742
18731
|
...e,
|
|
18743
18732
|
key: t,
|
|
18744
18733
|
name: n,
|
|
18745
18734
|
type: "publicClient"
|
|
18746
|
-
}).extend(
|
|
18735
|
+
}).extend(yP);
|
|
18747
18736
|
}
|
|
18748
|
-
const
|
|
18737
|
+
const wP = /* @__PURE__ */ L5({
|
|
18749
18738
|
id: 42161,
|
|
18750
18739
|
name: "Arbitrum One",
|
|
18751
18740
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -18768,23 +18757,23 @@ const xP = /* @__PURE__ */ M5({
|
|
|
18768
18757
|
blockCreated: 7654707
|
|
18769
18758
|
}
|
|
18770
18759
|
}
|
|
18771
|
-
}),
|
|
18760
|
+
}), xP = {
|
|
18772
18761
|
MAINNET: 1,
|
|
18773
18762
|
// ETH 主网
|
|
18774
18763
|
SEPOLIA: 11155111
|
|
18775
18764
|
// Sepolia 测试网
|
|
18776
|
-
},
|
|
18765
|
+
}, EP = Object.values(xP), Xt = (e) => {
|
|
18777
18766
|
const t = typeof e == "string" ? parseInt(e, 10) : e;
|
|
18778
|
-
return
|
|
18767
|
+
return EP.includes(
|
|
18779
18768
|
t
|
|
18780
18769
|
);
|
|
18781
|
-
},
|
|
18770
|
+
}, SP = {
|
|
18782
18771
|
USDT: !0
|
|
18783
18772
|
// 如果需要添加其他代币,在这里添加
|
|
18784
18773
|
// USDC: true,
|
|
18785
18774
|
}, $f = (e, t) => {
|
|
18786
18775
|
const n = typeof e == "string" ? parseInt(e, 10) : e;
|
|
18787
|
-
return n === 1 || n === 11155111 ? !1 : (n === 42161 || n === 421614) && t ? t.toUpperCase() === "ETH" ? !1 : !
|
|
18776
|
+
return n === 1 || n === 11155111 ? !1 : (n === 42161 || n === 421614) && t ? t.toUpperCase() === "ETH" ? !1 : !SP[t.toUpperCase()] : !0;
|
|
18788
18777
|
}, gu = ({
|
|
18789
18778
|
size: e = "xs",
|
|
18790
18779
|
color: t,
|
|
@@ -18802,7 +18791,7 @@ const xP = /* @__PURE__ */ M5({
|
|
|
18802
18791
|
"aria-live": "polite"
|
|
18803
18792
|
}
|
|
18804
18793
|
);
|
|
18805
|
-
},
|
|
18794
|
+
}, PP = ({
|
|
18806
18795
|
depositAmount: e,
|
|
18807
18796
|
curSelectToken: t,
|
|
18808
18797
|
approved: n,
|
|
@@ -18823,38 +18812,38 @@ const xP = /* @__PURE__ */ M5({
|
|
|
18823
18812
|
if (!d)
|
|
18824
18813
|
try {
|
|
18825
18814
|
p(!0), await u();
|
|
18826
|
-
} catch (
|
|
18827
|
-
p(!1), console.error("Approve failed:",
|
|
18815
|
+
} catch (y) {
|
|
18816
|
+
p(!1), console.error("Approve failed:", y);
|
|
18828
18817
|
}
|
|
18829
18818
|
}, [u, d]), h = K.useCallback(() => {
|
|
18830
|
-
let
|
|
18819
|
+
let y = o || "0";
|
|
18831
18820
|
if ($f(r == null ? void 0 : r.chainId, t))
|
|
18832
18821
|
try {
|
|
18833
|
-
const P = new _e(
|
|
18834
|
-
P.gt(B) && (
|
|
18822
|
+
const P = new _e(y), B = new _e("200000");
|
|
18823
|
+
P.gt(B) && (y = "200000");
|
|
18835
18824
|
} catch (P) {
|
|
18836
18825
|
console.warn("Error calculating max amount limit:", P);
|
|
18837
18826
|
}
|
|
18838
|
-
return
|
|
18827
|
+
return y;
|
|
18839
18828
|
}, [o, r == null ? void 0 : r.chainId, t]), m = K.useMemo(() => {
|
|
18840
18829
|
if (!$f(r == null ? void 0 : r.chainId, t))
|
|
18841
18830
|
return !1;
|
|
18842
18831
|
try {
|
|
18843
|
-
const
|
|
18844
|
-
return
|
|
18832
|
+
const y = new _e(e || "0"), P = new _e("200000");
|
|
18833
|
+
return y.isNaN() || P.isNaN() ? !1 : y.gte(P);
|
|
18845
18834
|
} catch {
|
|
18846
18835
|
return !1;
|
|
18847
18836
|
}
|
|
18848
|
-
}, [r, e, t]), v = (
|
|
18849
|
-
const P =
|
|
18837
|
+
}, [r, e, t]), v = (y) => {
|
|
18838
|
+
const P = y.target.value, B = h(), L = Sc(P, B);
|
|
18850
18839
|
if (L.isValid)
|
|
18851
18840
|
a(L.formattedValue), L.errorType;
|
|
18852
18841
|
else
|
|
18853
18842
|
return L.errorType === "exceed_balance", void 0;
|
|
18854
18843
|
}, T = () => {
|
|
18855
|
-
const
|
|
18844
|
+
const y = parseFloat(o || "0"), P = parseFloat(e || "0");
|
|
18856
18845
|
if (P > 0) {
|
|
18857
|
-
const B =
|
|
18846
|
+
const B = y - P, L = wt(
|
|
18858
18847
|
Math.max(0, B).toString()
|
|
18859
18848
|
);
|
|
18860
18849
|
return /* @__PURE__ */ I.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
@@ -18884,8 +18873,8 @@ const xP = /* @__PURE__ */ M5({
|
|
|
18884
18873
|
"button",
|
|
18885
18874
|
{
|
|
18886
18875
|
onClick: () => {
|
|
18887
|
-
const
|
|
18888
|
-
a(
|
|
18876
|
+
const y = h();
|
|
18877
|
+
a(y);
|
|
18889
18878
|
},
|
|
18890
18879
|
className: "text-theme-normal text-xs font-medium cursor-pointer hover:opacity-80 transition-opacity h-full flex items-center",
|
|
18891
18880
|
children: l("deposit.max")
|
|
@@ -18948,7 +18937,7 @@ const xP = /* @__PURE__ */ M5({
|
|
|
18948
18937
|
] }) : `${wt(s)} ${t}` })
|
|
18949
18938
|
] }) })
|
|
18950
18939
|
] });
|
|
18951
|
-
},
|
|
18940
|
+
}, $P = ({
|
|
18952
18941
|
token: e,
|
|
18953
18942
|
account: t,
|
|
18954
18943
|
chainId: n,
|
|
@@ -19016,7 +19005,7 @@ const xP = /* @__PURE__ */ M5({
|
|
|
19016
19005
|
enabled: !!e && !!t && !!(o != null && o.useBalance)
|
|
19017
19006
|
}
|
|
19018
19007
|
}), l = ae(() => s.map(
|
|
19019
|
-
(m) => K.createElement(
|
|
19008
|
+
(m) => K.createElement($P, {
|
|
19020
19009
|
key: m.tokenAddress,
|
|
19021
19010
|
token: m,
|
|
19022
19011
|
account: e,
|
|
@@ -19071,7 +19060,7 @@ const xP = /* @__PURE__ */ M5({
|
|
|
19071
19060
|
formatted: (k / BigInt(10) ** BigInt(P.decimals)).toString(),
|
|
19072
19061
|
decimals: P.decimals
|
|
19073
19062
|
};
|
|
19074
|
-
}).filter((P) => P.address),
|
|
19063
|
+
}).filter((P) => P.address), y = v.reduce(
|
|
19075
19064
|
(P, B) => {
|
|
19076
19065
|
const L = T.find((F) => F.address === B.address);
|
|
19077
19066
|
return {
|
|
@@ -19093,13 +19082,13 @@ const xP = /* @__PURE__ */ M5({
|
|
|
19093
19082
|
balanceList: v,
|
|
19094
19083
|
allowanceList: T,
|
|
19095
19084
|
baseTokenBalance: m,
|
|
19096
|
-
combinedData:
|
|
19085
|
+
combinedData: y
|
|
19097
19086
|
};
|
|
19098
19087
|
}, [u, i, s, o == null ? void 0 : o.useBalance]), p = Q(async () => d, [d]), f = ae(() => {
|
|
19099
19088
|
const m = (u == null ? void 0 : u.isLoading) || !1, v = Object.values(i).some(
|
|
19100
19089
|
(T) => {
|
|
19101
|
-
var
|
|
19102
|
-
return ((
|
|
19090
|
+
var y, P;
|
|
19091
|
+
return ((y = T.balance) == null ? void 0 : y.isLoading) || ((P = T.allowance) == null ? void 0 : P.isLoading);
|
|
19103
19092
|
}
|
|
19104
19093
|
);
|
|
19105
19094
|
return m || v;
|
|
@@ -19113,7 +19102,7 @@ const xP = /* @__PURE__ */ M5({
|
|
|
19113
19102
|
queryComponents: l
|
|
19114
19103
|
};
|
|
19115
19104
|
};
|
|
19116
|
-
function
|
|
19105
|
+
function AP({
|
|
19117
19106
|
client: e,
|
|
19118
19107
|
tokenAddress: t,
|
|
19119
19108
|
holder: n,
|
|
@@ -19175,9 +19164,9 @@ function TP({
|
|
|
19175
19164
|
]), { value: i, formatted: a };
|
|
19176
19165
|
}
|
|
19177
19166
|
let Ke = null;
|
|
19178
|
-
const
|
|
19167
|
+
const TP = {
|
|
19179
19168
|
symbol: "USDT"
|
|
19180
|
-
},
|
|
19169
|
+
}, RP = K.forwardRef((e, t) => {
|
|
19181
19170
|
const [n, r] = se(!1), [o, s] = se(!1), [i, c] = se({ chains: [] }), a = Q((h) => {
|
|
19182
19171
|
c(h), r(!0);
|
|
19183
19172
|
}, []), u = Q(
|
|
@@ -19230,7 +19219,7 @@ const RP = {
|
|
|
19230
19219
|
isOpen: n,
|
|
19231
19220
|
isLoading: o,
|
|
19232
19221
|
onClose: l,
|
|
19233
|
-
config: i.config ||
|
|
19222
|
+
config: i.config || TP,
|
|
19234
19223
|
currentActiveAccount: i.currentActiveAccount || Pc,
|
|
19235
19224
|
smartWallet: i.smartWallet || $c,
|
|
19236
19225
|
chains: i.chains || I1,
|
|
@@ -19250,8 +19239,8 @@ const RP = {
|
|
|
19250
19239
|
}
|
|
19251
19240
|
);
|
|
19252
19241
|
});
|
|
19253
|
-
|
|
19254
|
-
const
|
|
19242
|
+
RP.displayName = "DepositManager";
|
|
19243
|
+
const OP = (e) => {
|
|
19255
19244
|
if (!Ke) {
|
|
19256
19245
|
console.error(
|
|
19257
19246
|
"DepositManager not initialized. Make sure to render <DepositManager /> in your app."
|
|
@@ -19259,7 +19248,7 @@ const NP = (e) => {
|
|
|
19259
19248
|
return;
|
|
19260
19249
|
}
|
|
19261
19250
|
Ke.openDeposit(e || { chains: [] });
|
|
19262
|
-
},
|
|
19251
|
+
}, NP = () => {
|
|
19263
19252
|
if (!Ke) {
|
|
19264
19253
|
console.error(
|
|
19265
19254
|
"DepositManager not initialized. Make sure to render <DepositManager /> in your app."
|
|
@@ -19267,7 +19256,7 @@ const NP = (e) => {
|
|
|
19267
19256
|
return;
|
|
19268
19257
|
}
|
|
19269
19258
|
Ke.closeDeposit();
|
|
19270
|
-
},
|
|
19259
|
+
}, IP = (e) => {
|
|
19271
19260
|
Ke && Ke.updateDepositOptions(e);
|
|
19272
19261
|
}, Xa = (e) => {
|
|
19273
19262
|
if (!Ke) {
|
|
@@ -19277,14 +19266,19 @@ const NP = (e) => {
|
|
|
19277
19266
|
return;
|
|
19278
19267
|
}
|
|
19279
19268
|
Ke.setDepositLoading(e);
|
|
19280
|
-
},
|
|
19281
|
-
openDeposit:
|
|
19282
|
-
closeDeposit:
|
|
19283
|
-
updateDepositOptions:
|
|
19269
|
+
}, CP = () => Ke ? Ke.isOpen() : !1, BP = () => Ke ? Ke.isLoading() : !1, v$ = () => ({
|
|
19270
|
+
openDeposit: OP,
|
|
19271
|
+
closeDeposit: NP,
|
|
19272
|
+
updateDepositOptions: IP,
|
|
19284
19273
|
setDepositLoading: Xa,
|
|
19285
|
-
isOpen:
|
|
19286
|
-
isLoading:
|
|
19287
|
-
})
|
|
19274
|
+
isOpen: CP,
|
|
19275
|
+
isLoading: BP
|
|
19276
|
+
});
|
|
19277
|
+
function LP() {
|
|
19278
|
+
var e;
|
|
19279
|
+
return typeof window < "u" && ((e = window == null ? void 0 : window.ENV) == null ? void 0 : e.CHAIN_RPC_URL_42161) || "https://arb1.arbitrum.io/rpc";
|
|
19280
|
+
}
|
|
19281
|
+
const MP = ({
|
|
19288
19282
|
chains: e,
|
|
19289
19283
|
defaultChainId: t,
|
|
19290
19284
|
defaultTokenAddress: n,
|
|
@@ -19305,7 +19299,7 @@ const NP = (e) => {
|
|
|
19305
19299
|
onTokenChange: m
|
|
19306
19300
|
}) => {
|
|
19307
19301
|
var Pe;
|
|
19308
|
-
const { t: v } = Wt(), T = u == null ? void 0 : u.useAccount(), [
|
|
19302
|
+
const { t: v } = Wt(), T = u == null ? void 0 : u.useAccount(), [y, P] = se(() => {
|
|
19309
19303
|
var ie;
|
|
19310
19304
|
return !e || e.length === 0 ? 1 : t || ((ie = e[0]) == null ? void 0 : ie.chainId) || 1;
|
|
19311
19305
|
}), [B, L] = se(() => {
|
|
@@ -19325,24 +19319,24 @@ const NP = (e) => {
|
|
|
19325
19319
|
L(ie), m == null || m(ie);
|
|
19326
19320
|
},
|
|
19327
19321
|
[m]
|
|
19328
|
-
), $ = K.useRef(!0), N = K.useRef(B), O = K.useRef(
|
|
19322
|
+
), $ = K.useRef(!0), N = K.useRef(B), O = K.useRef(y);
|
|
19329
19323
|
K.useEffect(() => {
|
|
19330
19324
|
if ($.current) {
|
|
19331
|
-
$.current = !1, N.current = B, O.current =
|
|
19325
|
+
$.current = !1, N.current = B, O.current = y;
|
|
19332
19326
|
return;
|
|
19333
19327
|
}
|
|
19334
|
-
(N.current !== B || O.current !==
|
|
19335
|
-
}, [B,
|
|
19336
|
-
const S = e && e.length > 0 ? e.find((ie) => ie.chainId ===
|
|
19328
|
+
(N.current !== B || O.current !== y) && (k(""), N.current = B, O.current = y);
|
|
19329
|
+
}, [B, y]);
|
|
19330
|
+
const S = e && e.length > 0 ? e.find((ie) => ie.chainId === y) || e[0] : null, E = (Pe = S == null ? void 0 : S.tokenList) == null ? void 0 : Pe.find(
|
|
19337
19331
|
(ie) => ie.token === B
|
|
19338
19332
|
), x = o == null ? void 0 : o.getDisplayAddress(), { multicallResult: A, queryComponents: R } = q0({
|
|
19339
19333
|
account: x,
|
|
19340
|
-
chainId:
|
|
19334
|
+
chainId: y,
|
|
19341
19335
|
contractAddress: void 0,
|
|
19342
19336
|
// 暂时不传入合约地址
|
|
19343
19337
|
tokens: (S == null ? void 0 : S.tokenList) || [],
|
|
19344
19338
|
wagmiHooks: u
|
|
19345
|
-
}),
|
|
19339
|
+
}), b = ae(() => {
|
|
19346
19340
|
var he;
|
|
19347
19341
|
if (!E) return;
|
|
19348
19342
|
if (!E.tokenAddress || E.tokenAddress.toLowerCase() === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee")
|
|
@@ -19350,17 +19344,17 @@ const NP = (e) => {
|
|
|
19350
19344
|
const ie = A.combinedData[E.tokenAddress];
|
|
19351
19345
|
return ((he = ie == null ? void 0 : ie.balance) == null ? void 0 : he.formatted) || "0";
|
|
19352
19346
|
}, [E, A]), C = "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9", D = "0xceeed84620e5eb9ab1d6dfc316867d2cda332e41", _ = ae(
|
|
19353
|
-
() =>
|
|
19347
|
+
() => vP({ chain: wP, transport: n5(LP()) }),
|
|
19354
19348
|
[]
|
|
19355
|
-
), U = "1000000000000", { formatted: W } =
|
|
19349
|
+
), U = "1000000000000", { formatted: W } = AP({
|
|
19356
19350
|
client: _,
|
|
19357
19351
|
tokenAddress: C,
|
|
19358
19352
|
holder: D,
|
|
19359
19353
|
decimals: 6,
|
|
19360
19354
|
fallbackFormatted: U,
|
|
19361
19355
|
pollingInterval: 12e3
|
|
19362
|
-
}), q = l ?? !1, z = ae(() => +T.chainId != +
|
|
19363
|
-
const ie = +
|
|
19356
|
+
}), q = l ?? !1, z = ae(() => +T.chainId != +y, [T.chainId, y]), { showLayerZeroTip: Z, layerZeroTipKey: V } = ae(() => {
|
|
19357
|
+
const ie = +y == 42161 || +y == 421614, he = (B == null ? void 0 : B.toUpperCase()) === "USDT", be = new _e(F || "0"), fe = new _e("200000");
|
|
19364
19358
|
let We = !1, Xn;
|
|
19365
19359
|
if (ie && he && F)
|
|
19366
19360
|
if (be.gte(fe))
|
|
@@ -19374,7 +19368,7 @@ const NP = (e) => {
|
|
|
19374
19368
|
}
|
|
19375
19369
|
return { showLayerZeroTip: We, layerZeroTipKey: Xn };
|
|
19376
19370
|
}, [
|
|
19377
|
-
|
|
19371
|
+
y,
|
|
19378
19372
|
B,
|
|
19379
19373
|
F,
|
|
19380
19374
|
W
|
|
@@ -19385,7 +19379,7 @@ const NP = (e) => {
|
|
|
19385
19379
|
disabled: !1,
|
|
19386
19380
|
isNetworkSwitch: !0
|
|
19387
19381
|
};
|
|
19388
|
-
const ie = parseFloat(F || "0"), he = 10, fe = R1(F,
|
|
19382
|
+
const ie = parseFloat(F || "0"), he = 10, fe = R1(F, b || "0", q);
|
|
19389
19383
|
return !F || ie === 0 || !q ? {
|
|
19390
19384
|
text: v(Z ? "deposit.layerZeroDepositButton" : "deposit.confirmDeposit"),
|
|
19391
19385
|
disabled: !0,
|
|
@@ -19405,19 +19399,19 @@ const NP = (e) => {
|
|
|
19405
19399
|
}, [
|
|
19406
19400
|
F,
|
|
19407
19401
|
B,
|
|
19408
|
-
|
|
19402
|
+
b,
|
|
19409
19403
|
q,
|
|
19410
19404
|
z,
|
|
19411
19405
|
Z,
|
|
19412
19406
|
v
|
|
19413
19407
|
]), ee = Q(async () => {
|
|
19414
|
-
g && g(
|
|
19415
|
-
}, [g,
|
|
19408
|
+
g && g(y);
|
|
19409
|
+
}, [g, y]), pe = Q(async () => {
|
|
19416
19410
|
Xa(!0);
|
|
19417
19411
|
try {
|
|
19418
19412
|
p && p({
|
|
19419
19413
|
amount: F,
|
|
19420
|
-
chainId:
|
|
19414
|
+
chainId: y,
|
|
19421
19415
|
tokenAddress: (E == null ? void 0 : E.tokenAddress) || "",
|
|
19422
19416
|
tokenSymbol: B
|
|
19423
19417
|
});
|
|
@@ -19427,7 +19421,7 @@ const NP = (e) => {
|
|
|
19427
19421
|
}, [
|
|
19428
19422
|
p,
|
|
19429
19423
|
F,
|
|
19430
|
-
|
|
19424
|
+
y,
|
|
19431
19425
|
E == null ? void 0 : E.tokenAddress,
|
|
19432
19426
|
B
|
|
19433
19427
|
]);
|
|
@@ -19448,7 +19442,7 @@ const NP = (e) => {
|
|
|
19448
19442
|
}
|
|
19449
19443
|
),
|
|
19450
19444
|
/* @__PURE__ */ I.jsx(
|
|
19451
|
-
|
|
19445
|
+
PP,
|
|
19452
19446
|
{
|
|
19453
19447
|
depositAmount: F,
|
|
19454
19448
|
curSelectToken: B,
|
|
@@ -19458,7 +19452,7 @@ const NP = (e) => {
|
|
|
19458
19452
|
},
|
|
19459
19453
|
approved: q,
|
|
19460
19454
|
currentActiveChain: S,
|
|
19461
|
-
tokenBalance:
|
|
19455
|
+
tokenBalance: b,
|
|
19462
19456
|
platformBalance: c,
|
|
19463
19457
|
showLayerZeroTip: Z,
|
|
19464
19458
|
layerZeroTipKey: V,
|
|
@@ -19476,8 +19470,7 @@ const NP = (e) => {
|
|
|
19476
19470
|
disabled: X.disabled || a,
|
|
19477
19471
|
children: [
|
|
19478
19472
|
a && /* @__PURE__ */ I.jsx(gu, { size: "xs" }),
|
|
19479
|
-
X.text
|
|
19480
|
-
W
|
|
19473
|
+
X.text
|
|
19481
19474
|
]
|
|
19482
19475
|
}
|
|
19483
19476
|
)
|
|
@@ -19502,7 +19495,7 @@ const NP = (e) => {
|
|
|
19502
19495
|
onApproved: m,
|
|
19503
19496
|
onDeposit: v,
|
|
19504
19497
|
onCopy: T,
|
|
19505
|
-
onChainChange:
|
|
19498
|
+
onChainChange: y,
|
|
19506
19499
|
onTokenChange: P
|
|
19507
19500
|
}) => {
|
|
19508
19501
|
const { t: B } = Wt(), L = ae(() => {
|
|
@@ -19587,7 +19580,7 @@ const NP = (e) => {
|
|
|
19587
19580
|
onApproved: m,
|
|
19588
19581
|
onDeposit: v,
|
|
19589
19582
|
onClose: n,
|
|
19590
|
-
onChainChange:
|
|
19583
|
+
onChainChange: y,
|
|
19591
19584
|
onTokenChange: P
|
|
19592
19585
|
}
|
|
19593
19586
|
)
|
|
@@ -19702,8 +19695,8 @@ const jP = ({
|
|
|
19702
19695
|
}, m = () => {
|
|
19703
19696
|
const v = parseFloat(r || "0"), T = parseFloat(e || "0");
|
|
19704
19697
|
if (T > 0) {
|
|
19705
|
-
const
|
|
19706
|
-
Math.max(0,
|
|
19698
|
+
const y = v - T, P = wt(
|
|
19699
|
+
Math.max(0, y).toString()
|
|
19707
19700
|
);
|
|
19708
19701
|
return /* @__PURE__ */ I.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
19709
19702
|
wt(r || "0"),
|
|
@@ -19953,7 +19946,7 @@ const WP = (e) => {
|
|
|
19953
19946
|
onAmountChanged: m
|
|
19954
19947
|
}) => {
|
|
19955
19948
|
var W;
|
|
19956
|
-
const { t: v } = Wt(), [T,
|
|
19949
|
+
const { t: v } = Wt(), [T, y] = se(() => {
|
|
19957
19950
|
var q;
|
|
19958
19951
|
return !e || e.length === 0 ? 1 : t || ((q = e[0]) == null ? void 0 : q.chainId) || 1;
|
|
19959
19952
|
}), [P, B] = se(() => {
|
|
@@ -19965,7 +19958,7 @@ const WP = (e) => {
|
|
|
19965
19958
|
return (Z == null ? void 0 : Z.token) || "";
|
|
19966
19959
|
}), [L, F] = se(r), [k, g] = se(""), w = (o == null ? void 0 : o.getWalletType()) || "evm", $ = Q(
|
|
19967
19960
|
(q) => {
|
|
19968
|
-
|
|
19961
|
+
y(q), f == null || f(q);
|
|
19969
19962
|
},
|
|
19970
19963
|
[f]
|
|
19971
19964
|
), N = Q(
|
|
@@ -19983,7 +19976,7 @@ const WP = (e) => {
|
|
|
19983
19976
|
}, [P, T]);
|
|
19984
19977
|
const x = e && e.length > 0 ? e.find((q) => q.chainId === T) || e[0] : null, A = (W = x == null ? void 0 : x.tokenList) == null ? void 0 : W.find(
|
|
19985
19978
|
(q) => q.token === P
|
|
19986
|
-
), R = o == null ? void 0 : o.getDisplayAddress(), { multicallResult:
|
|
19979
|
+
), R = o == null ? void 0 : o.getDisplayAddress(), { multicallResult: b, queryComponents: C } = q0({
|
|
19987
19980
|
account: R,
|
|
19988
19981
|
chainId: T,
|
|
19989
19982
|
contractAddress: void 0,
|
|
@@ -19994,10 +19987,10 @@ const WP = (e) => {
|
|
|
19994
19987
|
var z;
|
|
19995
19988
|
if (!A) return;
|
|
19996
19989
|
if (!A.tokenAddress || A.tokenAddress.toLowerCase() === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee")
|
|
19997
|
-
return
|
|
19998
|
-
const q =
|
|
19990
|
+
return b.baseTokenBalance.formatted;
|
|
19991
|
+
const q = b.combinedData[A.tokenAddress];
|
|
19999
19992
|
return ((z = q == null ? void 0 : q.balance) == null ? void 0 : z.formatted) || "0";
|
|
20000
|
-
}, [A,
|
|
19993
|
+
}, [A, b]), _ = ae(() => {
|
|
20001
19994
|
const q = new _e(L || "0"), z = new _e(a || "0"), Z = Xt(T);
|
|
20002
19995
|
return !L || q.isZero() || !Z && q.isLessThan(z) ? {
|
|
20003
19996
|
text: v("withdraw.confirmWithdraw"),
|
|
@@ -20106,7 +20099,7 @@ const WP = (e) => {
|
|
|
20106
20099
|
onWithdraw: m,
|
|
20107
20100
|
onChainChange: v,
|
|
20108
20101
|
onTokenChange: T,
|
|
20109
|
-
onAmountChanged:
|
|
20102
|
+
onAmountChanged: y
|
|
20110
20103
|
}) => {
|
|
20111
20104
|
const { t: P } = Wt(), B = ae(() => {
|
|
20112
20105
|
var L;
|
|
@@ -20177,7 +20170,7 @@ const WP = (e) => {
|
|
|
20177
20170
|
onClose: n,
|
|
20178
20171
|
onChainChange: v,
|
|
20179
20172
|
onTokenChange: T,
|
|
20180
|
-
onAmountChanged:
|
|
20173
|
+
onAmountChanged: y
|
|
20181
20174
|
}
|
|
20182
20175
|
)
|
|
20183
20176
|
]
|
|
@@ -20204,7 +20197,7 @@ export {
|
|
|
20204
20197
|
Of as S,
|
|
20205
20198
|
gs as T,
|
|
20206
20199
|
KP as W,
|
|
20207
|
-
|
|
20200
|
+
s5 as a,
|
|
20208
20201
|
Ut as b,
|
|
20209
20202
|
Ys as c,
|
|
20210
20203
|
r2 as d,
|
|
@@ -20219,16 +20212,16 @@ export {
|
|
|
20219
20212
|
Wt as m,
|
|
20220
20213
|
DP as n,
|
|
20221
20214
|
gu as o,
|
|
20222
|
-
|
|
20223
|
-
|
|
20224
|
-
|
|
20215
|
+
RP as p,
|
|
20216
|
+
OP as q,
|
|
20217
|
+
NP as r,
|
|
20225
20218
|
De as s,
|
|
20226
|
-
|
|
20219
|
+
IP as t,
|
|
20227
20220
|
Im as u,
|
|
20228
20221
|
Xa as v,
|
|
20229
|
-
|
|
20222
|
+
BP as w,
|
|
20230
20223
|
v$ as x,
|
|
20231
20224
|
zP as y,
|
|
20232
20225
|
WP as z
|
|
20233
20226
|
};
|
|
20234
|
-
//# sourceMappingURL=index-
|
|
20227
|
+
//# sourceMappingURL=index-DvVzNKgE.mjs.map
|