@blockend/widget 1.0.55-beta.1 → 1.0.55-beta.2
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/{AllRoutes-D6S-NFxZ.js → AllRoutes-DIde2MHr.js} +910 -929
- package/dist/{Box-DESo1bHm.js → Box-DQB1ZyEK.js} +15 -15
- package/dist/EstGas-C7sLxEX_.js +1523 -0
- package/dist/{Grow-DzEr7XrA.js → Grow-CxaAxl6-.js} +300 -303
- package/dist/InputComp-CDuJJKaD.js +105 -0
- package/dist/LoadRoute-CVas28CM.js +123 -0
- package/dist/QuotesProgress-DaL4L4Db.js +27 -0
- package/dist/{SwapAsset-MBXcdeBf.js → SwapAsset-DSV6l90O.js} +13 -14
- package/dist/{Tooltip-DSAJT2x7.js → Tooltip-PAQ9gquY.js} +35 -35
- package/dist/TxnButton-BiO4vJ-y.js +207 -0
- package/dist/ccip-B6-4PQvj.js +226 -0
- package/dist/core-SB441dD5.js +13166 -0
- package/dist/{down-BFx-Bg5Q.js → down-DJH_apvy.js} +267 -270
- package/dist/{getChainIds-CeLEUxe0.js → getChainIds-CBclVfs9.js} +221 -223
- package/dist/getCosmosAddress-CI7CTn-0.js +57 -0
- package/dist/{hamburger-BzMrQx9y.js → hamburger-Dp-PI6Yn.js} +153 -153
- package/dist/{index-DpHhW0_2.js → index-5WTwgH9q.js} +3 -3
- package/dist/index-B-FRPlBv.js +3240 -0
- package/dist/index-B158Vaz9.js +146 -0
- package/dist/{index-BK0BZT6j.js → index-B9PIELoY.js} +5118 -5241
- package/dist/{index-DHYWnqST.js → index-BGt3GtoG.js} +1 -1
- package/dist/index-BuGCRLd5.js +198 -0
- package/dist/index-CRhXLwtt.js +7445 -0
- package/dist/{index-A8ClQmZo.js → index-Dmf6i8k4.js} +3 -4
- package/dist/{index-SkYFFVLL.js → index-PxQusjX0.js} +3368 -3415
- package/dist/{index-C5bv1F_u.js → index-UFdEurQ_.js} +12086 -12350
- package/dist/{index.es-DB9y_DEM.js → index.es-AaEds8Wm.js} +81 -83
- package/dist/{index.es-vIyUKt0W.js → index.es-Df0KTgu4.js} +4523 -4628
- package/dist/index.es.js +1 -1
- package/dist/{unsupportedProp-BLzY2-w_.js → unsupportedProp-BlS305Lt.js} +1 -1
- package/dist/{useRegisterError-Cf6oylnR.js → useRegisterError-BvjIv1Yc.js} +1668 -1701
- package/dist/widget.css +1 -1
- package/package.json +4 -5
- package/dist/EstGas-Dy3XfCzY.js +0 -1496
- package/dist/InputComp-GcnDqx_s.js +0 -105
- package/dist/LoadRoute-BmUgvDid.js +0 -125
- package/dist/QuotesProgress-E5JnUMS0.js +0 -28
- package/dist/TxnButton-Br8R19rF.js +0 -215
- package/dist/add-BryKCrpI.js +0 -19
- package/dist/all-wallets-BMVOK2Ci.js +0 -10
- package/dist/app-store-3WurbJdI.js +0 -21
- package/dist/apple-eM872Ubz.js +0 -22
- package/dist/arrow-bottom-HMc73fJ8.js +0 -12
- package/dist/arrow-bottom-circle-B1N_R8Ux.js +0 -15
- package/dist/arrow-left-Q7GAZkD7.js +0 -12
- package/dist/arrow-right-ft3TcIM3.js +0 -12
- package/dist/arrow-top-C2xmF6tK.js +0 -12
- package/dist/bank-Bk-2ZR5E.js +0 -18
- package/dist/basic-CWrKgDAB.js +0 -5783
- package/dist/browser-BFB3TFfv.js +0 -18
- package/dist/card-DCx59si8.js +0 -18
- package/dist/ccip-CXr08uP1.js +0 -228
- package/dist/checkmark-BGsuJuhE.js +0 -15
- package/dist/checkmark-bold-DvjIl-51.js +0 -12
- package/dist/chevron-bottom-DAEnG7QP.js +0 -12
- package/dist/chevron-left-D33h2ppx.js +0 -12
- package/dist/chevron-right-C8Z_feNK.js +0 -12
- package/dist/chevron-top-DwDMd3p9.js +0 -12
- package/dist/chrome-store-B7ZDs2Fj.js +0 -65
- package/dist/clock-DnELUxSR.js +0 -12
- package/dist/close-Dnt29Pss.js +0 -12
- package/dist/coinPlaceholder-C09pzuXv.js +0 -12
- package/dist/compass-D8ZY16nH.js +0 -12
- package/dist/copy-DEh4RBKI.js +0 -19
- package/dist/core-CgIQaiRa.js +0 -14966
- package/dist/cursor-BtzkAOER.js +0 -7
- package/dist/cursor-transparent-B0nCflmb.js +0 -16
- package/dist/desktop-toTG92uH.js +0 -13
- package/dist/disconnect-C97lbAtY.js +0 -12
- package/dist/discord-BNJ3JePY.js +0 -21
- package/dist/etherscan-CK87TQMS.js +0 -10
- package/dist/exclamation-triangle-LWnOk0uz.js +0 -8
- package/dist/extension-5eIZU28A.js +0 -12
- package/dist/external-link-DDlCfigP.js +0 -12
- package/dist/facebook-1lTMXKeH.js +0 -30
- package/dist/farcaster-Di2TUKlZ.js +0 -16
- package/dist/filters-B_THnHaX.js +0 -12
- package/dist/getCosmosAddress-B8s9Ycj4.js +0 -6075
- package/dist/github-D5B1FE4K.js +0 -22
- package/dist/google-C8_WSUfw.js +0 -22
- package/dist/help-circle-C-ZOzjAP.js +0 -16
- package/dist/id-BynpKmej.js +0 -16
- package/dist/image-BRYUh760.js +0 -8
- package/dist/index-BFUVWgoD.js +0 -992
- package/dist/index-CN6pVc2G.js +0 -1483
- package/dist/index-CZwuzz6v.js +0 -6712
- package/dist/index-Dnyeih-W.js +0 -3261
- package/dist/index-krrwn6Pi.js +0 -206
- package/dist/info-DSQyHS8b.js +0 -7
- package/dist/info-circle-BfpWcI4c.js +0 -16
- package/dist/lightbulb-DEMYYsZd.js +0 -7
- package/dist/mail-DNZ2to_6.js +0 -12
- package/dist/mobile-qsyS8oMK.js +0 -13
- package/dist/more-CnBuKwll.js +0 -15
- package/dist/network-placeholder-DhJITakA.js +0 -18
- package/dist/nftPlaceholder-DD3-Cc9U.js +0 -12
- package/dist/off-CBApAdDk.js +0 -12
- package/dist/play-store-DDoeRc-b.js +0 -36
- package/dist/plus-C3J-XWCn.js +0 -17
- package/dist/qr-code-CEoOYtHk.js +0 -10
- package/dist/recycle-horizontal-BHJ_s9Yx.js +0 -13
- package/dist/refresh-CtzOoHls.js +0 -12
- package/dist/reown-logo-BOj4YDUQ.js +0 -16
- package/dist/search--Miza3A_.js +0 -12
- package/dist/send-Bhl1lz4j.js +0 -19
- package/dist/swapHorizontal-CCvKCngz.js +0 -12
- package/dist/swapHorizontalBold-B90V-dXL.js +0 -12
- package/dist/swapHorizontalMedium-CYjeHjnI.js +0 -20
- package/dist/swapHorizontalRoundedBold-DSMWeXdW.js +0 -12
- package/dist/swapVertical-DOJUNIvk.js +0 -12
- package/dist/telegram-CufEY_4d.js +0 -20
- package/dist/three-dots-J2ngva7G.js +0 -9
- package/dist/twitch-B4vTKVf5.js +0 -22
- package/dist/twitterIcon-DLrxpAGg.js +0 -10
- package/dist/verify-CbHqPQKs.js +0 -12
- package/dist/verify-filled-CzKx9Cph.js +0 -12
- package/dist/w3m-modal-DhpjK4cG.js +0 -1471
- package/dist/wallet-CvIeO6On.js +0 -12
- package/dist/wallet-placeholder-BqELXTBj.js +0 -18
- package/dist/walletconnect-BN4c4XQ5.js +0 -36
- package/dist/warning-circle--dqxXujk.js +0 -16
- package/dist/x-CkCp5gtL.js +0 -16
@@ -1,71 +1,71 @@
|
|
1
|
-
import { jsxs as l, jsx as e, Fragment as
|
2
|
-
import * as
|
3
|
-
import
|
4
|
-
import { S as
|
5
|
-
import { t as
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import { S as
|
9
|
-
import { T as Pt } from "./Tooltip-
|
10
|
-
import { O as
|
11
|
-
import { B as _t } from "./Box-
|
12
|
-
import { c as
|
13
|
-
import {
|
14
|
-
import { B as
|
15
|
-
import { u as
|
16
|
-
let
|
17
|
-
function
|
18
|
-
if (
|
19
|
-
return
|
20
|
-
const
|
21
|
-
return
|
1
|
+
import { jsxs as l, jsx as e, Fragment as V } from "react/jsx-runtime";
|
2
|
+
import * as y from "react";
|
3
|
+
import ke, { useState as U, useEffect as Ue } from "react";
|
4
|
+
import { S as De, a as Re } from "./sortDown-CjBaDQTU.js";
|
5
|
+
import { t as E } from "./truncate-D9t92mVX.js";
|
6
|
+
import { y as kt, x as xe, d as Ut, g as Me, p as Dt, r as Rt, i as ge, a as te, f as me } from "./useRegisterError-BvjIv1Yc.js";
|
7
|
+
import { a as ve, c as ye, d as Fe, _ as ne, e as B, f as A, s as X, h as rt, i as Se, p as k, P as r, a1 as Ft, u as H } from "./index-UFdEurQ_.js";
|
8
|
+
import { S as Pe, C as _e, G as Ae } from "./clockIcon-C2W5xvyt.js";
|
9
|
+
import { T as Pt } from "./Tooltip-PAQ9gquY.js";
|
10
|
+
import { O as oe } from "./index-Dmf6i8k4.js";
|
11
|
+
import { B as _t } from "./Box-DQB1ZyEK.js";
|
12
|
+
import { c as lt, d as at, r as At } from "./index-BGt3GtoG.js";
|
13
|
+
import { u as st } from "./Grow-CxaAxl6-.js";
|
14
|
+
import { B as it, o as ct } from "./getChainIds-CBclVfs9.js";
|
15
|
+
import { u as Vt } from "./unsupportedProp-BlS305Lt.js";
|
16
|
+
let ee;
|
17
|
+
function dt() {
|
18
|
+
if (ee)
|
19
|
+
return ee;
|
20
|
+
const t = document.createElement("div"), o = document.createElement("div");
|
21
|
+
return o.style.width = "10px", o.style.height = "1px", t.appendChild(o), t.dir = "rtl", t.style.fontSize = "14px", t.style.width = "4px", t.style.height = "1px", t.style.position = "absolute", t.style.top = "-1000px", t.style.overflow = "scroll", document.body.appendChild(t), ee = "reverse", t.scrollLeft > 0 ? ee = "default" : (t.scrollLeft = 1, t.scrollLeft === 0 && (ee = "negative")), document.body.removeChild(t), ee;
|
22
22
|
}
|
23
|
-
function
|
24
|
-
const
|
25
|
-
if (
|
26
|
-
return
|
27
|
-
switch (
|
23
|
+
function Wt(t, o) {
|
24
|
+
const a = t.scrollLeft;
|
25
|
+
if (o !== "rtl")
|
26
|
+
return a;
|
27
|
+
switch (dt()) {
|
28
28
|
case "negative":
|
29
|
-
return
|
29
|
+
return t.scrollWidth - t.clientWidth + a;
|
30
30
|
case "reverse":
|
31
|
-
return
|
31
|
+
return t.scrollWidth - t.clientWidth - a;
|
32
32
|
default:
|
33
|
-
return
|
33
|
+
return a;
|
34
34
|
}
|
35
35
|
}
|
36
|
-
function
|
37
|
-
return
|
36
|
+
function jt(t) {
|
37
|
+
return ye("MuiTab", t);
|
38
38
|
}
|
39
|
-
const
|
39
|
+
const z = ve("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrimary", "textColorSecondary", "selected", "disabled", "fullWidth", "wrapped", "iconWrapper"]), zt = ["className", "disabled", "disableFocusRipple", "fullWidth", "icon", "iconPosition", "indicator", "label", "onChange", "onClick", "onFocus", "selected", "selectionFollowsFocus", "textColor", "value", "wrapped"], Ht = (t) => {
|
40
40
|
const {
|
41
|
-
classes:
|
42
|
-
textColor:
|
43
|
-
fullWidth:
|
44
|
-
wrapped:
|
45
|
-
icon:
|
46
|
-
label:
|
47
|
-
selected:
|
48
|
-
disabled:
|
49
|
-
} =
|
50
|
-
root: ["root",
|
41
|
+
classes: o,
|
42
|
+
textColor: a,
|
43
|
+
fullWidth: c,
|
44
|
+
wrapped: w,
|
45
|
+
icon: s,
|
46
|
+
label: i,
|
47
|
+
selected: S,
|
48
|
+
disabled: x
|
49
|
+
} = t, C = {
|
50
|
+
root: ["root", s && i && "labelIcon", `textColor${rt(a)}`, c && "fullWidth", w && "wrapped", S && "selected", x && "disabled"],
|
51
51
|
iconWrapper: ["iconWrapper"]
|
52
52
|
};
|
53
|
-
return
|
54
|
-
}, Gt =
|
53
|
+
return Se(C, jt, o);
|
54
|
+
}, Gt = X(it, {
|
55
55
|
name: "MuiTab",
|
56
56
|
slot: "Root",
|
57
|
-
overridesResolver: (
|
57
|
+
overridesResolver: (t, o) => {
|
58
58
|
const {
|
59
|
-
ownerState:
|
60
|
-
} =
|
61
|
-
return [
|
62
|
-
[`& .${
|
59
|
+
ownerState: a
|
60
|
+
} = t;
|
61
|
+
return [o.root, a.label && a.icon && o.labelIcon, o[`textColor${rt(a.textColor)}`], a.fullWidth && o.fullWidth, a.wrapped && o.wrapped, {
|
62
|
+
[`& .${z.iconWrapper}`]: o.iconWrapper
|
63
63
|
}];
|
64
64
|
}
|
65
65
|
})(({
|
66
|
-
theme:
|
67
|
-
ownerState:
|
68
|
-
}) =>
|
66
|
+
theme: t,
|
67
|
+
ownerState: o
|
68
|
+
}) => B({}, t.typography.button, {
|
69
69
|
maxWidth: 360,
|
70
70
|
minWidth: 90,
|
71
71
|
position: "relative",
|
@@ -75,119 +75,119 @@ const le = Te("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrim
|
|
75
75
|
overflow: "hidden",
|
76
76
|
whiteSpace: "normal",
|
77
77
|
textAlign: "center"
|
78
|
-
},
|
79
|
-
flexDirection:
|
78
|
+
}, o.label && {
|
79
|
+
flexDirection: o.iconPosition === "top" || o.iconPosition === "bottom" ? "column" : "row"
|
80
80
|
}, {
|
81
81
|
lineHeight: 1.25
|
82
|
-
},
|
82
|
+
}, o.icon && o.label && {
|
83
83
|
minHeight: 72,
|
84
84
|
paddingTop: 9,
|
85
85
|
paddingBottom: 9,
|
86
|
-
[`& > .${
|
86
|
+
[`& > .${z.iconWrapper}`]: B({}, o.iconPosition === "top" && {
|
87
87
|
marginBottom: 6
|
88
|
-
},
|
88
|
+
}, o.iconPosition === "bottom" && {
|
89
89
|
marginTop: 6
|
90
|
-
},
|
91
|
-
marginRight:
|
92
|
-
},
|
93
|
-
marginLeft:
|
90
|
+
}, o.iconPosition === "start" && {
|
91
|
+
marginRight: t.spacing(1)
|
92
|
+
}, o.iconPosition === "end" && {
|
93
|
+
marginLeft: t.spacing(1)
|
94
94
|
})
|
95
|
-
},
|
95
|
+
}, o.textColor === "inherit" && {
|
96
96
|
color: "inherit",
|
97
97
|
opacity: 0.6,
|
98
98
|
// same opacity as theme.palette.text.secondary
|
99
|
-
[`&.${
|
99
|
+
[`&.${z.selected}`]: {
|
100
100
|
opacity: 1
|
101
101
|
},
|
102
|
-
[`&.${
|
103
|
-
opacity: (
|
102
|
+
[`&.${z.disabled}`]: {
|
103
|
+
opacity: (t.vars || t).palette.action.disabledOpacity
|
104
104
|
}
|
105
|
-
},
|
106
|
-
color: (
|
107
|
-
[`&.${
|
108
|
-
color: (
|
105
|
+
}, o.textColor === "primary" && {
|
106
|
+
color: (t.vars || t).palette.text.secondary,
|
107
|
+
[`&.${z.selected}`]: {
|
108
|
+
color: (t.vars || t).palette.primary.main
|
109
109
|
},
|
110
|
-
[`&.${
|
111
|
-
color: (
|
110
|
+
[`&.${z.disabled}`]: {
|
111
|
+
color: (t.vars || t).palette.text.disabled
|
112
112
|
}
|
113
|
-
},
|
114
|
-
color: (
|
115
|
-
[`&.${
|
116
|
-
color: (
|
113
|
+
}, o.textColor === "secondary" && {
|
114
|
+
color: (t.vars || t).palette.text.secondary,
|
115
|
+
[`&.${z.selected}`]: {
|
116
|
+
color: (t.vars || t).palette.secondary.main
|
117
117
|
},
|
118
|
-
[`&.${
|
119
|
-
color: (
|
118
|
+
[`&.${z.disabled}`]: {
|
119
|
+
color: (t.vars || t).palette.text.disabled
|
120
120
|
}
|
121
|
-
},
|
121
|
+
}, o.fullWidth && {
|
122
122
|
flexShrink: 1,
|
123
123
|
flexGrow: 1,
|
124
124
|
flexBasis: 0,
|
125
125
|
maxWidth: "none"
|
126
|
-
},
|
127
|
-
fontSize:
|
128
|
-
})),
|
129
|
-
const
|
130
|
-
props:
|
126
|
+
}, o.wrapped && {
|
127
|
+
fontSize: t.typography.pxToRem(12)
|
128
|
+
})), fe = /* @__PURE__ */ y.forwardRef(function(o, a) {
|
129
|
+
const c = Fe({
|
130
|
+
props: o,
|
131
131
|
name: "MuiTab"
|
132
132
|
}), {
|
133
|
-
className:
|
134
|
-
disabled:
|
135
|
-
disableFocusRipple:
|
133
|
+
className: w,
|
134
|
+
disabled: s = !1,
|
135
|
+
disableFocusRipple: i = !1,
|
136
136
|
// eslint-disable-next-line react/prop-types
|
137
|
-
fullWidth:
|
138
|
-
icon:
|
139
|
-
iconPosition:
|
137
|
+
fullWidth: S,
|
138
|
+
icon: x,
|
139
|
+
iconPosition: C = "top",
|
140
140
|
// eslint-disable-next-line react/prop-types
|
141
|
-
indicator:
|
142
|
-
label:
|
143
|
-
onChange:
|
144
|
-
onClick:
|
145
|
-
onFocus:
|
141
|
+
indicator: O,
|
142
|
+
label: n,
|
143
|
+
onChange: u,
|
144
|
+
onClick: f,
|
145
|
+
onFocus: v,
|
146
146
|
// eslint-disable-next-line react/prop-types
|
147
|
-
selected:
|
147
|
+
selected: h,
|
148
148
|
// eslint-disable-next-line react/prop-types
|
149
|
-
selectionFollowsFocus:
|
149
|
+
selectionFollowsFocus: b,
|
150
150
|
// eslint-disable-next-line react/prop-types
|
151
|
-
textColor:
|
152
|
-
value:
|
153
|
-
wrapped:
|
154
|
-
} =
|
155
|
-
disabled:
|
156
|
-
disableFocusRipple:
|
157
|
-
selected:
|
158
|
-
icon: !!
|
159
|
-
iconPosition:
|
160
|
-
label: !!
|
161
|
-
fullWidth:
|
162
|
-
textColor:
|
163
|
-
wrapped:
|
164
|
-
}),
|
165
|
-
className:
|
166
|
-
}) :
|
167
|
-
!
|
168
|
-
},
|
169
|
-
|
151
|
+
textColor: g = "inherit",
|
152
|
+
value: m,
|
153
|
+
wrapped: T = !1
|
154
|
+
} = c, M = ne(c, zt), re = B({}, c, {
|
155
|
+
disabled: s,
|
156
|
+
disableFocusRipple: i,
|
157
|
+
selected: h,
|
158
|
+
icon: !!x,
|
159
|
+
iconPosition: C,
|
160
|
+
label: !!n,
|
161
|
+
fullWidth: S,
|
162
|
+
textColor: g,
|
163
|
+
wrapped: T
|
164
|
+
}), J = Ht(re), q = x && n && /* @__PURE__ */ y.isValidElement(x) ? /* @__PURE__ */ y.cloneElement(x, {
|
165
|
+
className: A(J.iconWrapper, x.props.className)
|
166
|
+
}) : x, ce = (P) => {
|
167
|
+
!h && u && u(P, m), f && f(P);
|
168
|
+
}, Q = (P) => {
|
169
|
+
b && !h && u && u(P, m), v && v(P);
|
170
170
|
};
|
171
|
-
return /* @__PURE__ */ l(Gt,
|
172
|
-
focusRipple: !
|
173
|
-
className:
|
174
|
-
ref:
|
171
|
+
return /* @__PURE__ */ l(Gt, B({
|
172
|
+
focusRipple: !i,
|
173
|
+
className: A(J.root, w),
|
174
|
+
ref: a,
|
175
175
|
role: "tab",
|
176
|
-
"aria-selected":
|
177
|
-
disabled:
|
178
|
-
onClick:
|
179
|
-
onFocus:
|
180
|
-
ownerState:
|
181
|
-
tabIndex:
|
182
|
-
},
|
183
|
-
children: [
|
184
|
-
children: [
|
185
|
-
}) : /* @__PURE__ */ l(
|
186
|
-
children: [
|
187
|
-
}),
|
176
|
+
"aria-selected": h,
|
177
|
+
disabled: s,
|
178
|
+
onClick: ce,
|
179
|
+
onFocus: Q,
|
180
|
+
ownerState: re,
|
181
|
+
tabIndex: h ? 0 : -1
|
182
|
+
}, M, {
|
183
|
+
children: [C === "top" || C === "start" ? /* @__PURE__ */ l(y.Fragment, {
|
184
|
+
children: [q, n]
|
185
|
+
}) : /* @__PURE__ */ l(y.Fragment, {
|
186
|
+
children: [n, q]
|
187
|
+
}), O]
|
188
188
|
}));
|
189
189
|
});
|
190
|
-
|
190
|
+
k.env.NODE_ENV !== "production" && (fe.propTypes = {
|
191
191
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
192
192
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
193
193
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
@@ -196,7 +196,7 @@ Z.env.NODE_ENV !== "production" && (ye.propTypes = {
|
|
196
196
|
* This prop isn't supported.
|
197
197
|
* Use the `component` prop if you need to change the children structure.
|
198
198
|
*/
|
199
|
-
children:
|
199
|
+
children: Vt,
|
200
200
|
/**
|
201
201
|
* Override or extend the styles applied to the component.
|
202
202
|
*/
|
@@ -263,42 +263,42 @@ Z.env.NODE_ENV !== "production" && (ye.propTypes = {
|
|
263
263
|
*/
|
264
264
|
wrapped: r.bool
|
265
265
|
});
|
266
|
-
const Xt =
|
266
|
+
const Xt = lt(/* @__PURE__ */ e("path", {
|
267
267
|
d: "M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"
|
268
|
-
}), "KeyboardArrowLeft"), qt =
|
268
|
+
}), "KeyboardArrowLeft"), qt = lt(/* @__PURE__ */ e("path", {
|
269
269
|
d: "M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"
|
270
270
|
}), "KeyboardArrowRight");
|
271
|
-
function Yt(
|
272
|
-
return (1 + Math.sin(Math.PI *
|
271
|
+
function Yt(t) {
|
272
|
+
return (1 + Math.sin(Math.PI * t - Math.PI / 2)) / 2;
|
273
273
|
}
|
274
|
-
function Kt(
|
274
|
+
function Kt(t, o, a, c = {}, w = () => {
|
275
275
|
}) {
|
276
276
|
const {
|
277
|
-
ease:
|
278
|
-
duration:
|
277
|
+
ease: s = Yt,
|
278
|
+
duration: i = 300
|
279
279
|
// standard
|
280
|
-
} =
|
281
|
-
let
|
282
|
-
const
|
283
|
-
let
|
284
|
-
const
|
285
|
-
|
286
|
-
},
|
287
|
-
if (
|
288
|
-
|
280
|
+
} = c;
|
281
|
+
let S = null;
|
282
|
+
const x = o[t];
|
283
|
+
let C = !1;
|
284
|
+
const O = () => {
|
285
|
+
C = !0;
|
286
|
+
}, n = (u) => {
|
287
|
+
if (C) {
|
288
|
+
w(new Error("Animation cancelled"));
|
289
289
|
return;
|
290
290
|
}
|
291
|
-
|
292
|
-
const
|
293
|
-
if (
|
291
|
+
S === null && (S = u);
|
292
|
+
const f = Math.min(1, (u - S) / i);
|
293
|
+
if (o[t] = s(f) * (a - x) + x, f >= 1) {
|
294
294
|
requestAnimationFrame(() => {
|
295
|
-
|
295
|
+
w(null);
|
296
296
|
});
|
297
297
|
return;
|
298
298
|
}
|
299
|
-
requestAnimationFrame(
|
299
|
+
requestAnimationFrame(n);
|
300
300
|
};
|
301
|
-
return
|
301
|
+
return x === a ? (w(new Error("Element already at target position")), O) : (requestAnimationFrame(n), O);
|
302
302
|
}
|
303
303
|
const Zt = ["onChange"], Jt = {
|
304
304
|
width: 99,
|
@@ -307,106 +307,106 @@ const Zt = ["onChange"], Jt = {
|
|
307
307
|
top: -9999,
|
308
308
|
overflow: "scroll"
|
309
309
|
};
|
310
|
-
function
|
310
|
+
function bt(t) {
|
311
311
|
const {
|
312
|
-
onChange:
|
313
|
-
} =
|
314
|
-
|
312
|
+
onChange: o
|
313
|
+
} = t, a = ne(t, Zt), c = y.useRef(), w = y.useRef(null), s = () => {
|
314
|
+
c.current = w.current.offsetHeight - w.current.clientHeight;
|
315
315
|
};
|
316
316
|
return kt(() => {
|
317
|
-
const
|
318
|
-
const
|
319
|
-
|
320
|
-
}),
|
321
|
-
return
|
322
|
-
|
317
|
+
const i = at(() => {
|
318
|
+
const x = c.current;
|
319
|
+
s(), x !== c.current && o(c.current);
|
320
|
+
}), S = ct(w.current);
|
321
|
+
return S.addEventListener("resize", i), () => {
|
322
|
+
i.clear(), S.removeEventListener("resize", i);
|
323
323
|
};
|
324
|
-
}, [
|
325
|
-
|
326
|
-
}, [
|
324
|
+
}, [o]), y.useEffect(() => {
|
325
|
+
s(), o(c.current);
|
326
|
+
}, [o]), /* @__PURE__ */ e("div", B({
|
327
327
|
style: Jt
|
328
|
-
},
|
329
|
-
ref:
|
328
|
+
}, a, {
|
329
|
+
ref: w
|
330
330
|
}));
|
331
331
|
}
|
332
|
-
|
332
|
+
k.env.NODE_ENV !== "production" && (bt.propTypes = {
|
333
333
|
onChange: r.func.isRequired
|
334
334
|
});
|
335
|
-
function Qt(
|
336
|
-
return
|
335
|
+
function Qt(t) {
|
336
|
+
return ye("MuiTabScrollButton", t);
|
337
337
|
}
|
338
|
-
const eo =
|
338
|
+
const eo = ve("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled"]), to = ["className", "slots", "slotProps", "direction", "orientation", "disabled"], oo = (t) => {
|
339
339
|
const {
|
340
|
-
classes:
|
341
|
-
orientation:
|
342
|
-
disabled:
|
343
|
-
} =
|
344
|
-
return
|
345
|
-
root: ["root",
|
346
|
-
}, Qt,
|
347
|
-
}, no =
|
340
|
+
classes: o,
|
341
|
+
orientation: a,
|
342
|
+
disabled: c
|
343
|
+
} = t;
|
344
|
+
return Se({
|
345
|
+
root: ["root", a, c && "disabled"]
|
346
|
+
}, Qt, o);
|
347
|
+
}, no = X(it, {
|
348
348
|
name: "MuiTabScrollButton",
|
349
349
|
slot: "Root",
|
350
|
-
overridesResolver: (
|
350
|
+
overridesResolver: (t, o) => {
|
351
351
|
const {
|
352
|
-
ownerState:
|
353
|
-
} =
|
354
|
-
return [
|
352
|
+
ownerState: a
|
353
|
+
} = t;
|
354
|
+
return [o.root, a.orientation && o[a.orientation]];
|
355
355
|
}
|
356
356
|
})(({
|
357
|
-
ownerState:
|
358
|
-
}) =>
|
357
|
+
ownerState: t
|
358
|
+
}) => B({
|
359
359
|
width: 40,
|
360
360
|
flexShrink: 0,
|
361
361
|
opacity: 0.8,
|
362
362
|
[`&.${eo.disabled}`]: {
|
363
363
|
opacity: 0
|
364
364
|
}
|
365
|
-
},
|
365
|
+
}, t.orientation === "vertical" && {
|
366
366
|
width: "100%",
|
367
367
|
height: 40,
|
368
368
|
"& svg": {
|
369
|
-
transform: `rotate(${
|
369
|
+
transform: `rotate(${t.isRtl ? -90 : 90}deg)`
|
370
370
|
}
|
371
|
-
})),
|
372
|
-
var
|
373
|
-
const
|
374
|
-
props:
|
371
|
+
})), ut = /* @__PURE__ */ y.forwardRef(function(o, a) {
|
372
|
+
var c, w;
|
373
|
+
const s = Fe({
|
374
|
+
props: o,
|
375
375
|
name: "MuiTabScrollButton"
|
376
376
|
}), {
|
377
|
-
className:
|
378
|
-
slots:
|
379
|
-
slotProps:
|
380
|
-
direction:
|
381
|
-
} =
|
382
|
-
isRtl:
|
383
|
-
},
|
384
|
-
elementType:
|
385
|
-
externalSlotProps:
|
377
|
+
className: i,
|
378
|
+
slots: S = {},
|
379
|
+
slotProps: x = {},
|
380
|
+
direction: C
|
381
|
+
} = s, O = ne(s, to), n = st(), u = B({
|
382
|
+
isRtl: n
|
383
|
+
}, s), f = oo(u), v = (c = S.StartScrollButtonIcon) != null ? c : Xt, h = (w = S.EndScrollButtonIcon) != null ? w : qt, b = xe({
|
384
|
+
elementType: v,
|
385
|
+
externalSlotProps: x.startScrollButtonIcon,
|
386
386
|
additionalProps: {
|
387
387
|
fontSize: "small"
|
388
388
|
},
|
389
|
-
ownerState:
|
390
|
-
}),
|
391
|
-
elementType:
|
392
|
-
externalSlotProps:
|
389
|
+
ownerState: u
|
390
|
+
}), g = xe({
|
391
|
+
elementType: h,
|
392
|
+
externalSlotProps: x.endScrollButtonIcon,
|
393
393
|
additionalProps: {
|
394
394
|
fontSize: "small"
|
395
395
|
},
|
396
|
-
ownerState:
|
396
|
+
ownerState: u
|
397
397
|
});
|
398
|
-
return /* @__PURE__ */ e(no,
|
398
|
+
return /* @__PURE__ */ e(no, B({
|
399
399
|
component: "div",
|
400
|
-
className:
|
401
|
-
ref:
|
400
|
+
className: A(f.root, i),
|
401
|
+
ref: a,
|
402
402
|
role: null,
|
403
|
-
ownerState:
|
403
|
+
ownerState: u,
|
404
404
|
tabIndex: null
|
405
|
-
},
|
406
|
-
children:
|
405
|
+
}, O, {
|
406
|
+
children: C === "left" ? /* @__PURE__ */ e(v, B({}, b)) : /* @__PURE__ */ e(h, B({}, g))
|
407
407
|
}));
|
408
408
|
});
|
409
|
-
|
409
|
+
k.env.NODE_ENV !== "production" && (ut.propTypes = {
|
410
410
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
411
411
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
412
412
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
@@ -458,95 +458,95 @@ Z.env.NODE_ENV !== "production" && (ft.propTypes = {
|
|
458
458
|
*/
|
459
459
|
sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object])
|
460
460
|
});
|
461
|
-
function ro(
|
462
|
-
return
|
461
|
+
function ro(t) {
|
462
|
+
return ye("MuiTabs", t);
|
463
463
|
}
|
464
|
-
const
|
465
|
-
let
|
466
|
-
for (;
|
467
|
-
if (
|
468
|
-
if (
|
464
|
+
const $e = ve("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVertical", "centered", "scroller", "fixed", "scrollableX", "scrollableY", "hideScrollbar", "scrollButtons", "scrollButtonsHideMobile", "indicator"]), lo = ["aria-label", "aria-labelledby", "action", "centered", "children", "className", "component", "allowScrollButtonsMobile", "indicatorColor", "onChange", "orientation", "ScrollButtonComponent", "scrollButtons", "selectionFollowsFocus", "slots", "slotProps", "TabIndicatorProps", "TabScrollButtonProps", "textColor", "value", "variant", "visibleScrollbar"], et = (t, o) => t === o ? t.firstChild : o && o.nextElementSibling ? o.nextElementSibling : t.firstChild, tt = (t, o) => t === o ? t.lastChild : o && o.previousElementSibling ? o.previousElementSibling : t.lastChild, pe = (t, o, a) => {
|
465
|
+
let c = !1, w = a(t, o);
|
466
|
+
for (; w; ) {
|
467
|
+
if (w === t.firstChild) {
|
468
|
+
if (c)
|
469
469
|
return;
|
470
|
-
|
470
|
+
c = !0;
|
471
471
|
}
|
472
|
-
const
|
473
|
-
if (!
|
474
|
-
|
472
|
+
const s = w.disabled || w.getAttribute("aria-disabled") === "true";
|
473
|
+
if (!w.hasAttribute("tabindex") || s)
|
474
|
+
w = a(t, w);
|
475
475
|
else {
|
476
|
-
|
476
|
+
w.focus();
|
477
477
|
return;
|
478
478
|
}
|
479
479
|
}
|
480
|
-
},
|
480
|
+
}, ao = (t) => {
|
481
481
|
const {
|
482
|
-
vertical:
|
483
|
-
fixed:
|
484
|
-
hideScrollbar:
|
485
|
-
scrollableX:
|
486
|
-
scrollableY:
|
487
|
-
centered:
|
488
|
-
scrollButtonsHideMobile:
|
489
|
-
classes:
|
490
|
-
} =
|
491
|
-
return
|
492
|
-
root: ["root",
|
493
|
-
scroller: ["scroller",
|
494
|
-
flexContainer: ["flexContainer",
|
482
|
+
vertical: o,
|
483
|
+
fixed: a,
|
484
|
+
hideScrollbar: c,
|
485
|
+
scrollableX: w,
|
486
|
+
scrollableY: s,
|
487
|
+
centered: i,
|
488
|
+
scrollButtonsHideMobile: S,
|
489
|
+
classes: x
|
490
|
+
} = t;
|
491
|
+
return Se({
|
492
|
+
root: ["root", o && "vertical"],
|
493
|
+
scroller: ["scroller", a && "fixed", c && "hideScrollbar", w && "scrollableX", s && "scrollableY"],
|
494
|
+
flexContainer: ["flexContainer", o && "flexContainerVertical", i && "centered"],
|
495
495
|
indicator: ["indicator"],
|
496
|
-
scrollButtons: ["scrollButtons",
|
497
|
-
scrollableX: [
|
498
|
-
hideScrollbar: [
|
499
|
-
}, ro,
|
500
|
-
},
|
496
|
+
scrollButtons: ["scrollButtons", S && "scrollButtonsHideMobile"],
|
497
|
+
scrollableX: [w && "scrollableX"],
|
498
|
+
hideScrollbar: [c && "hideScrollbar"]
|
499
|
+
}, ro, x);
|
500
|
+
}, so = X("div", {
|
501
501
|
name: "MuiTabs",
|
502
502
|
slot: "Root",
|
503
|
-
overridesResolver: (
|
503
|
+
overridesResolver: (t, o) => {
|
504
504
|
const {
|
505
|
-
ownerState:
|
506
|
-
} =
|
505
|
+
ownerState: a
|
506
|
+
} = t;
|
507
507
|
return [{
|
508
|
-
[`& .${
|
508
|
+
[`& .${$e.scrollButtons}`]: o.scrollButtons
|
509
509
|
}, {
|
510
|
-
[`& .${
|
511
|
-
},
|
510
|
+
[`& .${$e.scrollButtons}`]: a.scrollButtonsHideMobile && o.scrollButtonsHideMobile
|
511
|
+
}, o.root, a.vertical && o.vertical];
|
512
512
|
}
|
513
513
|
})(({
|
514
|
-
ownerState:
|
515
|
-
theme:
|
516
|
-
}) =>
|
514
|
+
ownerState: t,
|
515
|
+
theme: o
|
516
|
+
}) => B({
|
517
517
|
overflow: "hidden",
|
518
518
|
minHeight: 48,
|
519
519
|
// Add iOS momentum scrolling for iOS < 13.0
|
520
520
|
WebkitOverflowScrolling: "touch",
|
521
521
|
display: "flex"
|
522
|
-
},
|
522
|
+
}, t.vertical && {
|
523
523
|
flexDirection: "column"
|
524
|
-
},
|
525
|
-
[`& .${
|
526
|
-
[
|
524
|
+
}, t.scrollButtonsHideMobile && {
|
525
|
+
[`& .${$e.scrollButtons}`]: {
|
526
|
+
[o.breakpoints.down("sm")]: {
|
527
527
|
display: "none"
|
528
528
|
}
|
529
529
|
}
|
530
|
-
})),
|
530
|
+
})), io = X("div", {
|
531
531
|
name: "MuiTabs",
|
532
532
|
slot: "Scroller",
|
533
|
-
overridesResolver: (
|
533
|
+
overridesResolver: (t, o) => {
|
534
534
|
const {
|
535
|
-
ownerState:
|
536
|
-
} =
|
537
|
-
return [
|
535
|
+
ownerState: a
|
536
|
+
} = t;
|
537
|
+
return [o.scroller, a.fixed && o.fixed, a.hideScrollbar && o.hideScrollbar, a.scrollableX && o.scrollableX, a.scrollableY && o.scrollableY];
|
538
538
|
}
|
539
539
|
})(({
|
540
|
-
ownerState:
|
541
|
-
}) =>
|
540
|
+
ownerState: t
|
541
|
+
}) => B({
|
542
542
|
position: "relative",
|
543
543
|
display: "inline-block",
|
544
544
|
flex: "1 1 auto",
|
545
545
|
whiteSpace: "nowrap"
|
546
|
-
},
|
546
|
+
}, t.fixed && {
|
547
547
|
overflowX: "hidden",
|
548
548
|
width: "100%"
|
549
|
-
},
|
549
|
+
}, t.hideScrollbar && {
|
550
550
|
// Hide dimensionless scrollbar on macOS
|
551
551
|
scrollbarWidth: "none",
|
552
552
|
// Firefox
|
@@ -554,51 +554,51 @@ const Re = Te("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVer
|
|
554
554
|
display: "none"
|
555
555
|
// Safari + Chrome
|
556
556
|
}
|
557
|
-
},
|
557
|
+
}, t.scrollableX && {
|
558
558
|
overflowX: "auto",
|
559
559
|
overflowY: "hidden"
|
560
|
-
},
|
560
|
+
}, t.scrollableY && {
|
561
561
|
overflowY: "auto",
|
562
562
|
overflowX: "hidden"
|
563
|
-
})),
|
563
|
+
})), co = X("div", {
|
564
564
|
name: "MuiTabs",
|
565
565
|
slot: "FlexContainer",
|
566
|
-
overridesResolver: (
|
566
|
+
overridesResolver: (t, o) => {
|
567
567
|
const {
|
568
|
-
ownerState:
|
569
|
-
} =
|
570
|
-
return [
|
568
|
+
ownerState: a
|
569
|
+
} = t;
|
570
|
+
return [o.flexContainer, a.vertical && o.flexContainerVertical, a.centered && o.centered];
|
571
571
|
}
|
572
572
|
})(({
|
573
|
-
ownerState:
|
574
|
-
}) =>
|
573
|
+
ownerState: t
|
574
|
+
}) => B({
|
575
575
|
display: "flex"
|
576
|
-
},
|
576
|
+
}, t.vertical && {
|
577
577
|
flexDirection: "column"
|
578
|
-
},
|
578
|
+
}, t.centered && {
|
579
579
|
justifyContent: "center"
|
580
|
-
})), bo =
|
580
|
+
})), bo = X("span", {
|
581
581
|
name: "MuiTabs",
|
582
582
|
slot: "Indicator",
|
583
|
-
overridesResolver: (
|
583
|
+
overridesResolver: (t, o) => o.indicator
|
584
584
|
})(({
|
585
|
-
ownerState:
|
586
|
-
theme:
|
587
|
-
}) =>
|
585
|
+
ownerState: t,
|
586
|
+
theme: o
|
587
|
+
}) => B({
|
588
588
|
position: "absolute",
|
589
589
|
height: 2,
|
590
590
|
bottom: 0,
|
591
591
|
width: "100%",
|
592
|
-
transition:
|
593
|
-
},
|
594
|
-
backgroundColor: (
|
595
|
-
},
|
596
|
-
backgroundColor: (
|
597
|
-
},
|
592
|
+
transition: o.transitions.create()
|
593
|
+
}, t.indicatorColor === "primary" && {
|
594
|
+
backgroundColor: (o.vars || o).palette.primary.main
|
595
|
+
}, t.indicatorColor === "secondary" && {
|
596
|
+
backgroundColor: (o.vars || o).palette.secondary.main
|
597
|
+
}, t.vertical && {
|
598
598
|
height: "100%",
|
599
599
|
width: 2,
|
600
600
|
right: 0
|
601
|
-
})), uo =
|
601
|
+
})), uo = X(bt)({
|
602
602
|
overflowX: "auto",
|
603
603
|
overflowY: "hidden",
|
604
604
|
// Hide dimensionless scrollbar on macOS
|
@@ -608,144 +608,144 @@ const Re = Te("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVer
|
|
608
608
|
display: "none"
|
609
609
|
// Safari + Chrome
|
610
610
|
}
|
611
|
-
}),
|
612
|
-
let
|
613
|
-
const
|
614
|
-
const
|
615
|
-
props:
|
611
|
+
}), ot = {};
|
612
|
+
let nt = !1;
|
613
|
+
const wt = /* @__PURE__ */ y.forwardRef(function(o, a) {
|
614
|
+
const c = Fe({
|
615
|
+
props: o,
|
616
616
|
name: "MuiTabs"
|
617
|
-
}),
|
618
|
-
"aria-label":
|
619
|
-
"aria-labelledby":
|
620
|
-
action:
|
621
|
-
centered:
|
622
|
-
children:
|
623
|
-
className:
|
624
|
-
component:
|
625
|
-
allowScrollButtonsMobile:
|
626
|
-
indicatorColor:
|
627
|
-
onChange:
|
628
|
-
orientation:
|
629
|
-
ScrollButtonComponent:
|
630
|
-
scrollButtons:
|
631
|
-
selectionFollowsFocus:
|
632
|
-
slots:
|
633
|
-
slotProps:
|
634
|
-
TabIndicatorProps:
|
635
|
-
TabScrollButtonProps:
|
636
|
-
textColor:
|
637
|
-
value:
|
638
|
-
variant:
|
639
|
-
visibleScrollbar:
|
640
|
-
} =
|
641
|
-
component:
|
642
|
-
allowScrollButtonsMobile:
|
643
|
-
indicatorColor:
|
644
|
-
orientation:
|
645
|
-
vertical:
|
646
|
-
scrollButtons:
|
647
|
-
textColor:
|
648
|
-
variant:
|
649
|
-
visibleScrollbar:
|
617
|
+
}), w = Ut(), s = st(), {
|
618
|
+
"aria-label": i,
|
619
|
+
"aria-labelledby": S,
|
620
|
+
action: x,
|
621
|
+
centered: C = !1,
|
622
|
+
children: O,
|
623
|
+
className: n,
|
624
|
+
component: u = "div",
|
625
|
+
allowScrollButtonsMobile: f = !1,
|
626
|
+
indicatorColor: v = "primary",
|
627
|
+
onChange: h,
|
628
|
+
orientation: b = "horizontal",
|
629
|
+
ScrollButtonComponent: g = ut,
|
630
|
+
scrollButtons: m = "auto",
|
631
|
+
selectionFollowsFocus: T,
|
632
|
+
slots: M = {},
|
633
|
+
slotProps: re = {},
|
634
|
+
TabIndicatorProps: J = {},
|
635
|
+
TabScrollButtonProps: q = {},
|
636
|
+
textColor: ce = "primary",
|
637
|
+
value: Q,
|
638
|
+
variant: P = "standard",
|
639
|
+
visibleScrollbar: Ie = !1
|
640
|
+
} = c, gt = ne(c, lo), D = P === "scrollable", R = b === "vertical", le = R ? "scrollTop" : "scrollLeft", de = R ? "top" : "left", be = R ? "bottom" : "right", Ee = R ? "clientHeight" : "clientWidth", ae = R ? "height" : "width", Y = B({}, c, {
|
641
|
+
component: u,
|
642
|
+
allowScrollButtonsMobile: f,
|
643
|
+
indicatorColor: v,
|
644
|
+
orientation: b,
|
645
|
+
vertical: R,
|
646
|
+
scrollButtons: m,
|
647
|
+
textColor: ce,
|
648
|
+
variant: P,
|
649
|
+
visibleScrollbar: Ie,
|
650
650
|
fixed: !D,
|
651
|
-
hideScrollbar: D && !
|
652
|
-
scrollableX: D && !
|
653
|
-
scrollableY: D &&
|
654
|
-
centered:
|
655
|
-
scrollButtonsHideMobile: !
|
656
|
-
}),
|
657
|
-
elementType:
|
658
|
-
externalSlotProps:
|
659
|
-
ownerState:
|
660
|
-
}),
|
661
|
-
elementType:
|
662
|
-
externalSlotProps:
|
663
|
-
ownerState:
|
651
|
+
hideScrollbar: D && !Ie,
|
652
|
+
scrollableX: D && !R,
|
653
|
+
scrollableY: D && R,
|
654
|
+
centered: C && !D,
|
655
|
+
scrollButtonsHideMobile: !f
|
656
|
+
}), W = ao(Y), vt = xe({
|
657
|
+
elementType: M.StartScrollButtonIcon,
|
658
|
+
externalSlotProps: re.startScrollButtonIcon,
|
659
|
+
ownerState: Y
|
660
|
+
}), yt = xe({
|
661
|
+
elementType: M.EndScrollButtonIcon,
|
662
|
+
externalSlotProps: re.endScrollButtonIcon,
|
663
|
+
ownerState: Y
|
664
664
|
});
|
665
|
-
|
666
|
-
const [
|
665
|
+
k.env.NODE_ENV;
|
666
|
+
const [We, St] = y.useState(!1), [K, je] = y.useState(ot), [ze, Ct] = y.useState(!1), [He, Nt] = y.useState(!1), [Ge, Tt] = y.useState(!1), [Xe, It] = y.useState({
|
667
667
|
overflow: "hidden",
|
668
668
|
scrollbarWidth: 0
|
669
|
-
}),
|
670
|
-
const d =
|
671
|
-
let
|
669
|
+
}), qe = /* @__PURE__ */ new Map(), _ = y.useRef(null), Z = y.useRef(null), Ye = () => {
|
670
|
+
const d = _.current;
|
671
|
+
let p;
|
672
672
|
if (d) {
|
673
|
-
const
|
674
|
-
|
673
|
+
const I = d.getBoundingClientRect();
|
674
|
+
p = {
|
675
675
|
clientWidth: d.clientWidth,
|
676
676
|
scrollLeft: d.scrollLeft,
|
677
677
|
scrollTop: d.scrollTop,
|
678
|
-
scrollLeftNormalized:
|
678
|
+
scrollLeftNormalized: Wt(d, s ? "rtl" : "ltr"),
|
679
679
|
scrollWidth: d.scrollWidth,
|
680
|
-
top:
|
681
|
-
bottom:
|
682
|
-
left:
|
683
|
-
right:
|
680
|
+
top: I.top,
|
681
|
+
bottom: I.bottom,
|
682
|
+
left: I.left,
|
683
|
+
right: I.right
|
684
684
|
};
|
685
685
|
}
|
686
686
|
let N;
|
687
|
-
if (d &&
|
688
|
-
const
|
689
|
-
if (
|
690
|
-
const
|
691
|
-
|
692
|
-
|
687
|
+
if (d && Q !== !1) {
|
688
|
+
const I = Z.current.children;
|
689
|
+
if (I.length > 0) {
|
690
|
+
const L = I[qe.get(Q)];
|
691
|
+
k.env.NODE_ENV, N = L ? L.getBoundingClientRect() : null, k.env.NODE_ENV !== "production" && k.env.NODE_ENV !== "test" && !nt && N && N.width === 0 && N.height === 0 && // if the whole Tabs component is hidden, don't warn
|
692
|
+
p.clientWidth !== 0 && (p = null, nt = !0);
|
693
693
|
}
|
694
694
|
}
|
695
695
|
return {
|
696
|
-
tabsMeta:
|
696
|
+
tabsMeta: p,
|
697
697
|
tabMeta: N
|
698
698
|
};
|
699
|
-
},
|
699
|
+
}, se = Me(() => {
|
700
700
|
const {
|
701
701
|
tabsMeta: d,
|
702
|
-
tabMeta:
|
703
|
-
} =
|
704
|
-
let N = 0,
|
705
|
-
if (
|
706
|
-
|
707
|
-
else if (
|
708
|
-
const
|
709
|
-
N = (
|
702
|
+
tabMeta: p
|
703
|
+
} = Ye();
|
704
|
+
let N = 0, I;
|
705
|
+
if (R)
|
706
|
+
I = "top", p && d && (N = p.top - d.top + d.scrollTop);
|
707
|
+
else if (I = s ? "right" : "left", p && d) {
|
708
|
+
const $ = s ? d.scrollLeftNormalized + d.clientWidth - d.scrollWidth : d.scrollLeft;
|
709
|
+
N = (s ? -1 : 1) * (p[I] - d[I] + $);
|
710
710
|
}
|
711
|
-
const
|
712
|
-
[
|
711
|
+
const L = {
|
712
|
+
[I]: N,
|
713
713
|
// May be wrong until the font is loaded.
|
714
|
-
[
|
714
|
+
[ae]: p ? p[ae] : 0
|
715
715
|
};
|
716
|
-
if (isNaN(
|
717
|
-
|
716
|
+
if (isNaN(K[I]) || isNaN(K[ae]))
|
717
|
+
je(L);
|
718
718
|
else {
|
719
|
-
const
|
720
|
-
(
|
719
|
+
const $ = Math.abs(K[I] - L[I]), F = Math.abs(K[ae] - L[ae]);
|
720
|
+
($ >= 1 || F >= 1) && je(L);
|
721
721
|
}
|
722
|
-
}),
|
723
|
-
animation:
|
722
|
+
}), Oe = (d, {
|
723
|
+
animation: p = !0
|
724
724
|
} = {}) => {
|
725
|
-
|
726
|
-
duration:
|
727
|
-
}) :
|
728
|
-
},
|
729
|
-
let
|
730
|
-
|
731
|
-
},
|
732
|
-
const d =
|
733
|
-
let
|
734
|
-
const N = Array.from(
|
735
|
-
for (let
|
736
|
-
const
|
737
|
-
if (
|
738
|
-
|
725
|
+
p ? Kt(le, _.current, d, {
|
726
|
+
duration: w.transitions.duration.standard
|
727
|
+
}) : _.current[le] = d;
|
728
|
+
}, Ke = (d) => {
|
729
|
+
let p = _.current[le];
|
730
|
+
R ? p += d : (p += d * (s ? -1 : 1), p *= s && dt() === "reverse" ? -1 : 1), Oe(p);
|
731
|
+
}, Ze = () => {
|
732
|
+
const d = _.current[Ee];
|
733
|
+
let p = 0;
|
734
|
+
const N = Array.from(Z.current.children);
|
735
|
+
for (let I = 0; I < N.length; I += 1) {
|
736
|
+
const L = N[I];
|
737
|
+
if (p + L[Ee] > d) {
|
738
|
+
I === 0 && (p = d);
|
739
739
|
break;
|
740
740
|
}
|
741
|
-
|
741
|
+
p += L[Ee];
|
742
742
|
}
|
743
|
-
return
|
743
|
+
return p;
|
744
744
|
}, Et = () => {
|
745
|
-
|
745
|
+
Ke(-1 * Ze());
|
746
746
|
}, Ot = () => {
|
747
|
-
|
748
|
-
}, Bt =
|
747
|
+
Ke(Ze());
|
748
|
+
}, Bt = y.useCallback((d) => {
|
749
749
|
It({
|
750
750
|
overflow: null,
|
751
751
|
scrollbarWidth: d
|
@@ -754,183 +754,183 @@ const xt = /* @__PURE__ */ v.forwardRef(function(n, s) {
|
|
754
754
|
const d = {};
|
755
755
|
d.scrollbarSizeListener = D ? /* @__PURE__ */ e(uo, {
|
756
756
|
onChange: Bt,
|
757
|
-
className:
|
757
|
+
className: A(W.scrollableX, W.hideScrollbar)
|
758
758
|
}) : null;
|
759
|
-
const N = D && (
|
760
|
-
return d.scrollButtonStart = N ? /* @__PURE__ */ e(
|
759
|
+
const N = D && (m === "auto" && (ze || He) || m === !0);
|
760
|
+
return d.scrollButtonStart = N ? /* @__PURE__ */ e(g, B({
|
761
761
|
slots: {
|
762
|
-
StartScrollButtonIcon:
|
762
|
+
StartScrollButtonIcon: M.StartScrollButtonIcon
|
763
763
|
},
|
764
764
|
slotProps: {
|
765
|
-
startScrollButtonIcon:
|
765
|
+
startScrollButtonIcon: vt
|
766
766
|
},
|
767
|
-
orientation:
|
768
|
-
direction:
|
767
|
+
orientation: b,
|
768
|
+
direction: s ? "right" : "left",
|
769
769
|
onClick: Et,
|
770
|
-
disabled: !
|
771
|
-
},
|
772
|
-
className:
|
773
|
-
})) : null, d.scrollButtonEnd = N ? /* @__PURE__ */ e(
|
770
|
+
disabled: !ze
|
771
|
+
}, q, {
|
772
|
+
className: A(W.scrollButtons, q.className)
|
773
|
+
})) : null, d.scrollButtonEnd = N ? /* @__PURE__ */ e(g, B({
|
774
774
|
slots: {
|
775
|
-
EndScrollButtonIcon:
|
775
|
+
EndScrollButtonIcon: M.EndScrollButtonIcon
|
776
776
|
},
|
777
777
|
slotProps: {
|
778
|
-
endScrollButtonIcon:
|
778
|
+
endScrollButtonIcon: yt
|
779
779
|
},
|
780
|
-
orientation:
|
781
|
-
direction:
|
780
|
+
orientation: b,
|
781
|
+
direction: s ? "left" : "right",
|
782
782
|
onClick: Ot,
|
783
|
-
disabled: !
|
784
|
-
},
|
785
|
-
className:
|
783
|
+
disabled: !He
|
784
|
+
}, q, {
|
785
|
+
className: A(W.scrollButtons, q.className)
|
786
786
|
})) : null, d;
|
787
|
-
},
|
787
|
+
}, Je = Me((d) => {
|
788
788
|
const {
|
789
|
-
tabsMeta:
|
789
|
+
tabsMeta: p,
|
790
790
|
tabMeta: N
|
791
|
-
} =
|
792
|
-
if (!(!N || !
|
793
|
-
if (N[
|
794
|
-
const
|
795
|
-
|
791
|
+
} = Ye();
|
792
|
+
if (!(!N || !p)) {
|
793
|
+
if (N[de] < p[de]) {
|
794
|
+
const I = p[le] + (N[de] - p[de]);
|
795
|
+
Oe(I, {
|
796
796
|
animation: d
|
797
797
|
});
|
798
|
-
} else if (N[
|
799
|
-
const
|
800
|
-
|
798
|
+
} else if (N[be] > p[be]) {
|
799
|
+
const I = p[le] + (N[be] - p[be]);
|
800
|
+
Oe(I, {
|
801
801
|
animation: d
|
802
802
|
});
|
803
803
|
}
|
804
804
|
}
|
805
|
-
}),
|
806
|
-
D &&
|
805
|
+
}), ue = Me(() => {
|
806
|
+
D && m !== !1 && Tt(!Ge);
|
807
807
|
});
|
808
|
-
|
809
|
-
const d =
|
810
|
-
|
808
|
+
y.useEffect(() => {
|
809
|
+
const d = at(() => {
|
810
|
+
_.current && se();
|
811
811
|
});
|
812
|
-
let
|
813
|
-
const N = (
|
814
|
-
|
815
|
-
|
816
|
-
var
|
817
|
-
(
|
818
|
-
}),
|
819
|
-
var
|
820
|
-
(
|
812
|
+
let p;
|
813
|
+
const N = ($) => {
|
814
|
+
$.forEach((F) => {
|
815
|
+
F.removedNodes.forEach((ie) => {
|
816
|
+
var j;
|
817
|
+
(j = p) == null || j.unobserve(ie);
|
818
|
+
}), F.addedNodes.forEach((ie) => {
|
819
|
+
var j;
|
820
|
+
(j = p) == null || j.observe(ie);
|
821
821
|
});
|
822
|
-
}), d(),
|
823
|
-
},
|
824
|
-
|
825
|
-
let
|
826
|
-
return typeof ResizeObserver < "u" && (
|
827
|
-
|
828
|
-
})), typeof MutationObserver < "u" && (
|
822
|
+
}), d(), ue();
|
823
|
+
}, I = ct(_.current);
|
824
|
+
I.addEventListener("resize", d);
|
825
|
+
let L;
|
826
|
+
return typeof ResizeObserver < "u" && (p = new ResizeObserver(d), Array.from(Z.current.children).forEach(($) => {
|
827
|
+
p.observe($);
|
828
|
+
})), typeof MutationObserver < "u" && (L = new MutationObserver(N), L.observe(Z.current, {
|
829
829
|
childList: !0
|
830
830
|
})), () => {
|
831
|
-
var
|
832
|
-
d.clear(),
|
831
|
+
var $, F;
|
832
|
+
d.clear(), I.removeEventListener("resize", d), ($ = L) == null || $.disconnect(), (F = p) == null || F.disconnect();
|
833
833
|
};
|
834
|
-
}, [
|
835
|
-
const d = Array.from(
|
836
|
-
if (typeof IntersectionObserver < "u" &&
|
837
|
-
const N = d[0],
|
838
|
-
root:
|
834
|
+
}, [se, ue]), y.useEffect(() => {
|
835
|
+
const d = Array.from(Z.current.children), p = d.length;
|
836
|
+
if (typeof IntersectionObserver < "u" && p > 0 && D && m !== !1) {
|
837
|
+
const N = d[0], I = d[p - 1], L = {
|
838
|
+
root: _.current,
|
839
839
|
threshold: 0.99
|
840
|
-
},
|
841
|
-
|
842
|
-
},
|
843
|
-
|
844
|
-
const
|
845
|
-
|
846
|
-
},
|
847
|
-
return
|
848
|
-
|
840
|
+
}, $ = (Le) => {
|
841
|
+
Ct(!Le[0].isIntersecting);
|
842
|
+
}, F = new IntersectionObserver($, L);
|
843
|
+
F.observe(N);
|
844
|
+
const ie = (Le) => {
|
845
|
+
Nt(!Le[0].isIntersecting);
|
846
|
+
}, j = new IntersectionObserver(ie, L);
|
847
|
+
return j.observe(I), () => {
|
848
|
+
F.disconnect(), j.disconnect();
|
849
849
|
};
|
850
850
|
}
|
851
|
-
}, [D,
|
851
|
+
}, [D, m, Ge, O?.length]), y.useEffect(() => {
|
852
852
|
St(!0);
|
853
|
-
}, []),
|
854
|
-
|
855
|
-
}),
|
856
|
-
|
857
|
-
}, [
|
858
|
-
updateIndicator:
|
859
|
-
updateScrollButtons:
|
860
|
-
}), [
|
861
|
-
const
|
862
|
-
className:
|
863
|
-
ownerState:
|
864
|
-
style:
|
853
|
+
}, []), y.useEffect(() => {
|
854
|
+
se();
|
855
|
+
}), y.useEffect(() => {
|
856
|
+
Je(ot !== K);
|
857
|
+
}, [Je, K]), y.useImperativeHandle(x, () => ({
|
858
|
+
updateIndicator: se,
|
859
|
+
updateScrollButtons: ue
|
860
|
+
}), [se, ue]);
|
861
|
+
const Qe = /* @__PURE__ */ e(bo, B({}, J, {
|
862
|
+
className: A(W.indicator, J.className),
|
863
|
+
ownerState: Y,
|
864
|
+
style: B({}, K, J.style)
|
865
865
|
}));
|
866
|
-
let
|
867
|
-
const Mt =
|
868
|
-
if (!/* @__PURE__ */
|
866
|
+
let we = 0;
|
867
|
+
const Mt = y.Children.map(O, (d) => {
|
868
|
+
if (!/* @__PURE__ */ y.isValidElement(d))
|
869
869
|
return null;
|
870
|
-
|
871
|
-
const
|
872
|
-
|
873
|
-
const N =
|
874
|
-
return
|
875
|
-
fullWidth:
|
876
|
-
indicator: N && !
|
870
|
+
k.env.NODE_ENV !== "production" && At.isFragment(d);
|
871
|
+
const p = d.props.value === void 0 ? we : d.props.value;
|
872
|
+
qe.set(p, we);
|
873
|
+
const N = p === Q;
|
874
|
+
return we += 1, /* @__PURE__ */ y.cloneElement(d, B({
|
875
|
+
fullWidth: P === "fullWidth",
|
876
|
+
indicator: N && !We && Qe,
|
877
877
|
selected: N,
|
878
|
-
selectionFollowsFocus:
|
879
|
-
onChange:
|
880
|
-
textColor:
|
881
|
-
value:
|
882
|
-
},
|
878
|
+
selectionFollowsFocus: T,
|
879
|
+
onChange: h,
|
880
|
+
textColor: ce,
|
881
|
+
value: p
|
882
|
+
}, we === 1 && Q === !1 && !d.props.tabIndex ? {
|
883
883
|
tabIndex: 0
|
884
884
|
} : {}));
|
885
885
|
}), $t = (d) => {
|
886
|
-
const
|
886
|
+
const p = Z.current, N = Dt(p).activeElement;
|
887
887
|
if (N.getAttribute("role") !== "tab")
|
888
888
|
return;
|
889
|
-
let
|
890
|
-
switch (
|
891
|
-
case
|
892
|
-
d.preventDefault(),
|
889
|
+
let L = b === "horizontal" ? "ArrowLeft" : "ArrowUp", $ = b === "horizontal" ? "ArrowRight" : "ArrowDown";
|
890
|
+
switch (b === "horizontal" && s && (L = "ArrowRight", $ = "ArrowLeft"), d.key) {
|
891
|
+
case L:
|
892
|
+
d.preventDefault(), pe(p, N, tt);
|
893
893
|
break;
|
894
|
-
case
|
895
|
-
d.preventDefault(),
|
894
|
+
case $:
|
895
|
+
d.preventDefault(), pe(p, N, et);
|
896
896
|
break;
|
897
897
|
case "Home":
|
898
|
-
d.preventDefault(),
|
898
|
+
d.preventDefault(), pe(p, null, et);
|
899
899
|
break;
|
900
900
|
case "End":
|
901
|
-
d.preventDefault(),
|
901
|
+
d.preventDefault(), pe(p, null, tt);
|
902
902
|
break;
|
903
903
|
}
|
904
|
-
},
|
905
|
-
return /* @__PURE__ */ l(
|
906
|
-
className:
|
907
|
-
ownerState:
|
908
|
-
ref:
|
909
|
-
as:
|
910
|
-
},
|
911
|
-
children: [
|
912
|
-
className:
|
913
|
-
ownerState:
|
904
|
+
}, Be = Lt();
|
905
|
+
return /* @__PURE__ */ l(so, B({
|
906
|
+
className: A(W.root, n),
|
907
|
+
ownerState: Y,
|
908
|
+
ref: a,
|
909
|
+
as: u
|
910
|
+
}, gt, {
|
911
|
+
children: [Be.scrollButtonStart, Be.scrollbarSizeListener, /* @__PURE__ */ l(io, {
|
912
|
+
className: W.scroller,
|
913
|
+
ownerState: Y,
|
914
914
|
style: {
|
915
|
-
overflow:
|
916
|
-
[
|
915
|
+
overflow: Xe.overflow,
|
916
|
+
[R ? `margin${s ? "Left" : "Right"}` : "marginBottom"]: Ie ? void 0 : -Xe.scrollbarWidth
|
917
917
|
},
|
918
|
-
ref:
|
919
|
-
children: [/* @__PURE__ */ e(
|
920
|
-
"aria-label":
|
921
|
-
"aria-labelledby":
|
922
|
-
"aria-orientation":
|
923
|
-
className:
|
924
|
-
ownerState:
|
918
|
+
ref: _,
|
919
|
+
children: [/* @__PURE__ */ e(co, {
|
920
|
+
"aria-label": i,
|
921
|
+
"aria-labelledby": S,
|
922
|
+
"aria-orientation": b === "vertical" ? "vertical" : null,
|
923
|
+
className: W.flexContainer,
|
924
|
+
ownerState: Y,
|
925
925
|
onKeyDown: $t,
|
926
|
-
ref:
|
926
|
+
ref: Z,
|
927
927
|
role: "tablist",
|
928
928
|
children: Mt
|
929
|
-
}),
|
930
|
-
}),
|
929
|
+
}), We && Qe]
|
930
|
+
}), Be.scrollButtonEnd]
|
931
931
|
}));
|
932
932
|
});
|
933
|
-
|
933
|
+
k.env.NODE_ENV !== "production" && (wt.propTypes = {
|
934
934
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
935
935
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
936
936
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
@@ -943,7 +943,7 @@ Z.env.NODE_ENV !== "production" && (xt.propTypes = {
|
|
943
943
|
* @param {object} actions This object contains all possible actions
|
944
944
|
* that can be triggered programmatically.
|
945
945
|
*/
|
946
|
-
action:
|
946
|
+
action: Rt,
|
947
947
|
/**
|
948
948
|
* If `true`, the scroll buttons aren't forced hidden on mobile.
|
949
949
|
* By default the scroll buttons are hidden on mobile and takes precedence over `scrollButtons`.
|
@@ -1079,28 +1079,28 @@ Z.env.NODE_ENV !== "production" && (xt.propTypes = {
|
|
1079
1079
|
*/
|
1080
1080
|
visibleScrollbar: r.bool
|
1081
1081
|
});
|
1082
|
-
const
|
1083
|
-
|
1082
|
+
const Ve = /* @__PURE__ */ y.createContext(null);
|
1083
|
+
k.env.NODE_ENV !== "production" && (Ve.displayName = "TabContext");
|
1084
1084
|
function wo() {
|
1085
|
-
const [
|
1086
|
-
return
|
1087
|
-
|
1088
|
-
}, []),
|
1085
|
+
const [t, o] = y.useState(null);
|
1086
|
+
return y.useEffect(() => {
|
1087
|
+
o(`mui-p-${Math.round(Math.random() * 1e5)}`);
|
1088
|
+
}, []), t;
|
1089
1089
|
}
|
1090
|
-
function
|
1090
|
+
function pt(t) {
|
1091
1091
|
const {
|
1092
|
-
children:
|
1093
|
-
value:
|
1094
|
-
} =
|
1095
|
-
idPrefix:
|
1096
|
-
value:
|
1097
|
-
}), [
|
1098
|
-
return /* @__PURE__ */ e(
|
1099
|
-
value:
|
1100
|
-
children:
|
1092
|
+
children: o,
|
1093
|
+
value: a
|
1094
|
+
} = t, c = wo(), w = y.useMemo(() => ({
|
1095
|
+
idPrefix: c,
|
1096
|
+
value: a
|
1097
|
+
}), [c, a]);
|
1098
|
+
return /* @__PURE__ */ e(Ve.Provider, {
|
1099
|
+
value: w,
|
1100
|
+
children: o
|
1101
1101
|
});
|
1102
1102
|
}
|
1103
|
-
|
1103
|
+
k.env.NODE_ENV !== "production" && (pt.propTypes = {
|
1104
1104
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
1105
1105
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
1106
1106
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
@@ -1115,38 +1115,38 @@ Z.env.NODE_ENV !== "production" && (ht.propTypes = {
|
|
1115
1115
|
value: r.oneOfType([r.number, r.string]).isRequired
|
1116
1116
|
});
|
1117
1117
|
function mt() {
|
1118
|
-
return
|
1118
|
+
return y.useContext(Ve);
|
1119
1119
|
}
|
1120
|
-
function
|
1120
|
+
function ft(t, o) {
|
1121
1121
|
const {
|
1122
|
-
idPrefix:
|
1123
|
-
} =
|
1124
|
-
return
|
1122
|
+
idPrefix: a
|
1123
|
+
} = t;
|
1124
|
+
return a === null ? null : `${t.idPrefix}-P-${o}`;
|
1125
1125
|
}
|
1126
|
-
function
|
1126
|
+
function ht(t, o) {
|
1127
1127
|
const {
|
1128
|
-
idPrefix:
|
1129
|
-
} =
|
1130
|
-
return
|
1128
|
+
idPrefix: a
|
1129
|
+
} = t;
|
1130
|
+
return a === null ? null : `${t.idPrefix}-T-${o}`;
|
1131
1131
|
}
|
1132
|
-
const po = ["children"],
|
1132
|
+
const po = ["children"], xt = /* @__PURE__ */ y.forwardRef(function(o, a) {
|
1133
1133
|
const {
|
1134
|
-
children:
|
1135
|
-
} =
|
1136
|
-
if (
|
1134
|
+
children: c
|
1135
|
+
} = o, w = ne(o, po), s = mt();
|
1136
|
+
if (s === null)
|
1137
1137
|
throw new TypeError("No TabContext provided");
|
1138
|
-
const
|
1138
|
+
const i = y.Children.map(c, (S) => /* @__PURE__ */ y.isValidElement(S) ? /* @__PURE__ */ y.cloneElement(S, {
|
1139
1139
|
// SOMEDAY: `Tabs` will set those themselves
|
1140
|
-
"aria-controls":
|
1141
|
-
id:
|
1140
|
+
"aria-controls": ft(s, S.props.value),
|
1141
|
+
id: ht(s, S.props.value)
|
1142
1142
|
}) : null);
|
1143
|
-
return /* @__PURE__ */ e(
|
1144
|
-
ref:
|
1145
|
-
value:
|
1146
|
-
children:
|
1143
|
+
return /* @__PURE__ */ e(wt, B({}, w, {
|
1144
|
+
ref: a,
|
1145
|
+
value: s.value,
|
1146
|
+
children: i
|
1147
1147
|
}));
|
1148
1148
|
});
|
1149
|
-
|
1149
|
+
k.env.NODE_ENV !== "production" && (xt.propTypes = {
|
1150
1150
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
1151
1151
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
1152
1152
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
@@ -1156,50 +1156,50 @@ Z.env.NODE_ENV !== "production" && (yt.propTypes = {
|
|
1156
1156
|
*/
|
1157
1157
|
children: r.node
|
1158
1158
|
});
|
1159
|
-
function
|
1160
|
-
return
|
1159
|
+
function mo(t) {
|
1160
|
+
return ye("MuiTabPanel", t);
|
1161
1161
|
}
|
1162
|
-
|
1163
|
-
const
|
1162
|
+
ve("MuiTabPanel", ["root"]);
|
1163
|
+
const fo = ["children", "className", "value"], ho = (t) => {
|
1164
1164
|
const {
|
1165
|
-
classes:
|
1166
|
-
} =
|
1167
|
-
return
|
1165
|
+
classes: o
|
1166
|
+
} = t;
|
1167
|
+
return Se({
|
1168
1168
|
root: ["root"]
|
1169
|
-
},
|
1170
|
-
},
|
1169
|
+
}, mo, o);
|
1170
|
+
}, xo = X("div", {
|
1171
1171
|
name: "MuiTabPanel",
|
1172
1172
|
slot: "Root",
|
1173
|
-
overridesResolver: (
|
1173
|
+
overridesResolver: (t, o) => o.root
|
1174
1174
|
})(({
|
1175
|
-
theme:
|
1175
|
+
theme: t
|
1176
1176
|
}) => ({
|
1177
|
-
padding:
|
1178
|
-
})),
|
1179
|
-
const
|
1180
|
-
props:
|
1177
|
+
padding: t.spacing(3)
|
1178
|
+
})), he = /* @__PURE__ */ y.forwardRef(function(o, a) {
|
1179
|
+
const c = Ft({
|
1180
|
+
props: o,
|
1181
1181
|
name: "MuiTabPanel"
|
1182
1182
|
}), {
|
1183
|
-
children:
|
1184
|
-
className:
|
1185
|
-
value:
|
1186
|
-
} =
|
1187
|
-
if (
|
1183
|
+
children: w,
|
1184
|
+
className: s,
|
1185
|
+
value: i
|
1186
|
+
} = c, S = ne(c, fo), x = B({}, c), C = ho(x), O = mt();
|
1187
|
+
if (O === null)
|
1188
1188
|
throw new TypeError("No TabContext provided");
|
1189
|
-
const
|
1190
|
-
return /* @__PURE__ */ e(
|
1191
|
-
"aria-labelledby":
|
1192
|
-
className:
|
1193
|
-
hidden:
|
1194
|
-
id:
|
1195
|
-
ref:
|
1189
|
+
const n = ft(O, i), u = ht(O, i);
|
1190
|
+
return /* @__PURE__ */ e(xo, B({
|
1191
|
+
"aria-labelledby": u,
|
1192
|
+
className: A(C.root, s),
|
1193
|
+
hidden: i !== O.value,
|
1194
|
+
id: n,
|
1195
|
+
ref: a,
|
1196
1196
|
role: "tabpanel",
|
1197
|
-
ownerState:
|
1198
|
-
},
|
1199
|
-
children:
|
1197
|
+
ownerState: x
|
1198
|
+
}, S, {
|
1199
|
+
children: i === O.value && w
|
1200
1200
|
}));
|
1201
1201
|
});
|
1202
|
-
|
1202
|
+
k.env.NODE_ENV !== "production" && (he.propTypes = {
|
1203
1203
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
1204
1204
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
1205
1205
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
@@ -1226,7 +1226,7 @@ Z.env.NODE_ENV !== "production" && (Se.propTypes = {
|
|
1226
1226
|
*/
|
1227
1227
|
value: r.string.isRequired
|
1228
1228
|
});
|
1229
|
-
function
|
1229
|
+
function G({ name: t, children: o }) {
|
1230
1230
|
return /* @__PURE__ */ e(
|
1231
1231
|
Pt,
|
1232
1232
|
{
|
@@ -1256,13 +1256,13 @@ function ae({ name: o, children: n }) {
|
|
1256
1256
|
}
|
1257
1257
|
},
|
1258
1258
|
className: "bw-text-text-button",
|
1259
|
-
title:
|
1259
|
+
title: t,
|
1260
1260
|
placement: "top",
|
1261
|
-
children:
|
1261
|
+
children: o
|
1262
1262
|
}
|
1263
1263
|
);
|
1264
1264
|
}
|
1265
|
-
function
|
1265
|
+
function Ce({ fill: t, spinnerColor: o, stopColor: a }) {
|
1266
1266
|
return /* @__PURE__ */ l(
|
1267
1267
|
"svg",
|
1268
1268
|
{
|
@@ -1280,7 +1280,7 @@ function Oe({ fill: o, spinnerColor: n, stopColor: s }) {
|
|
1280
1280
|
width: "14",
|
1281
1281
|
height: "14",
|
1282
1282
|
rx: "7",
|
1283
|
-
fill:
|
1283
|
+
fill: t,
|
1284
1284
|
stroke: "url(#paint0_linear_739_20205)"
|
1285
1285
|
}
|
1286
1286
|
),
|
@@ -1317,8 +1317,8 @@ function Oe({ fill: o, spinnerColor: n, stopColor: s }) {
|
|
1317
1317
|
y2: "6.2369",
|
1318
1318
|
gradientUnits: "userSpaceOnUse",
|
1319
1319
|
children: [
|
1320
|
-
/* @__PURE__ */ e("stop", { "stop-color":
|
1321
|
-
/* @__PURE__ */ e("stop", { offset: "1", "stop-color":
|
1320
|
+
/* @__PURE__ */ e("stop", { "stop-color": o || "#2CFFE4" }),
|
1321
|
+
/* @__PURE__ */ e("stop", { offset: "1", "stop-color": a || "#A45EFF" })
|
1322
1322
|
]
|
1323
1323
|
}
|
1324
1324
|
),
|
@@ -1332,8 +1332,8 @@ function Oe({ fill: o, spinnerColor: n, stopColor: s }) {
|
|
1332
1332
|
y2: "2.87371",
|
1333
1333
|
gradientUnits: "userSpaceOnUse",
|
1334
1334
|
children: [
|
1335
|
-
/* @__PURE__ */ e("stop", { "stop-color":
|
1336
|
-
/* @__PURE__ */ e("stop", { offset: "1", "stop-color":
|
1335
|
+
/* @__PURE__ */ e("stop", { "stop-color": o || "#2CFFE4" }),
|
1336
|
+
/* @__PURE__ */ e("stop", { offset: "1", "stop-color": a || "#A45EFF" })
|
1337
1337
|
]
|
1338
1338
|
}
|
1339
1339
|
)
|
@@ -1342,7 +1342,7 @@ function Oe({ fill: o, spinnerColor: n, stopColor: s }) {
|
|
1342
1342
|
}
|
1343
1343
|
);
|
1344
1344
|
}
|
1345
|
-
function
|
1345
|
+
function Ne({ fill: t }) {
|
1346
1346
|
return /* @__PURE__ */ l(
|
1347
1347
|
"svg",
|
1348
1348
|
{
|
@@ -1360,7 +1360,7 @@ function Be({ fill: o }) {
|
|
1360
1360
|
width: "14",
|
1361
1361
|
height: "14",
|
1362
1362
|
rx: "7",
|
1363
|
-
fill:
|
1363
|
+
fill: t
|
1364
1364
|
}
|
1365
1365
|
),
|
1366
1366
|
/* @__PURE__ */ e(
|
@@ -1371,7 +1371,7 @@ function Be({ fill: o }) {
|
|
1371
1371
|
width: "14",
|
1372
1372
|
height: "14",
|
1373
1373
|
rx: "7",
|
1374
|
-
fill:
|
1374
|
+
fill: t
|
1375
1375
|
}
|
1376
1376
|
),
|
1377
1377
|
/* @__PURE__ */ e(
|
@@ -1398,7 +1398,7 @@ function Be({ fill: o }) {
|
|
1398
1398
|
}
|
1399
1399
|
);
|
1400
1400
|
}
|
1401
|
-
function
|
1401
|
+
function Te({ fill: t }) {
|
1402
1402
|
return /* @__PURE__ */ l(
|
1403
1403
|
"svg",
|
1404
1404
|
{
|
@@ -1416,7 +1416,7 @@ function Le({ fill: o }) {
|
|
1416
1416
|
width: "14",
|
1417
1417
|
height: "14",
|
1418
1418
|
rx: "7",
|
1419
|
-
fill:
|
1419
|
+
fill: t
|
1420
1420
|
}
|
1421
1421
|
),
|
1422
1422
|
/* @__PURE__ */ e(
|
@@ -1427,7 +1427,7 @@ function Le({ fill: o }) {
|
|
1427
1427
|
width: "14",
|
1428
1428
|
height: "14",
|
1429
1429
|
rx: "7",
|
1430
|
-
fill:
|
1430
|
+
fill: t
|
1431
1431
|
}
|
1432
1432
|
),
|
1433
1433
|
/* @__PURE__ */ e(
|
@@ -1452,640 +1452,622 @@ function Le({ fill: o }) {
|
|
1452
1452
|
}
|
1453
1453
|
);
|
1454
1454
|
}
|
1455
|
-
function go({ gasImg:
|
1456
|
-
const [
|
1457
|
-
return
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
/* @__PURE__ */ e(Ve, { fill: "var(--tw-text-secondary)" }),
|
1455
|
+
function go({ gasImg: t, item: o, fromChain: a }) {
|
1456
|
+
const [c, w] = U({});
|
1457
|
+
return Ue(() => {
|
1458
|
+
let s = { amountInUSD: 0 };
|
1459
|
+
o?.fee?.forEach((i) => {
|
1460
|
+
i.source == "FROM_SOURCE_WALLET" && (s.amountInUSD += Number(i.amountInUSD));
|
1461
|
+
}), w(s);
|
1462
|
+
}, [o]), /* @__PURE__ */ l("div", { className: "bw-flex bw-text-sm bw-items-center bw-gap-x-1", children: [
|
1463
|
+
/* @__PURE__ */ e(Ae, { fill: "var(--tw-text-secondary)" }),
|
1465
1464
|
/* @__PURE__ */ l("p", { children: [
|
1466
1465
|
"$",
|
1467
|
-
|
1466
|
+
te(c?.amountInUSD || 0, 6) || 0
|
1468
1467
|
] })
|
1469
1468
|
] });
|
1470
1469
|
}
|
1471
|
-
function vo({ routes:
|
1472
|
-
|
1473
|
-
|
1474
|
-
function
|
1475
|
-
|
1476
|
-
|
1477
|
-
let S = t.outputAmountDisplay * (i || 0) || 0, T = (x[x.length - 1].outputAmountDisplay || "") * i, R = (x[0].outputAmountDisplay || "") * i, f = c == "asc" ? T : R, m = c == "asc" ? R : T;
|
1478
|
-
return y == 0 && c !== "asc" || y == x.length - 1 && c == "asc" ? {
|
1470
|
+
function vo({ routes: t, handleShowAllRoutes: o, handleRoutesData: a, convertVal: c, fromChain: w, toChain: s, sort: i }) {
|
1471
|
+
const S = H((n) => n.configuration), { gasnew: x, defaultCoin: C } = ge;
|
1472
|
+
U({}), U({});
|
1473
|
+
function O(n, u, f) {
|
1474
|
+
let h = n.outputAmountDisplay * (c || 0) || 0, b = (u[u.length - 1].outputAmountDisplay || "") * c, g = (u[0].outputAmountDisplay || "") * c, m = i == "asc" ? b : g, T = i == "asc" ? g : b;
|
1475
|
+
return f == 0 && i !== "asc" || f == u.length - 1 && i == "asc" ? {
|
1479
1476
|
val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
|
1480
|
-
/* @__PURE__ */ e("span", { className: "bw-text-text-greentext", children: `+$${
|
1477
|
+
/* @__PURE__ */ e("span", { className: "bw-text-text-greentext", children: `+$${te(me(m - T), 12)}` }),
|
1481
1478
|
" Higher Output"
|
1482
1479
|
] }),
|
1483
1480
|
isMax: !0
|
1484
|
-
} :
|
1481
|
+
} : f == u.length - 1 && i !== "asc" || f === 0 && i == "asc" ? {
|
1485
1482
|
val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
|
1486
|
-
/* @__PURE__ */ e("span", { className: `${
|
1483
|
+
/* @__PURE__ */ e("span", { className: `${m - T === 0 ? "bw-text-text-greentext" : "bw-bg-background-container"}`, children: `-$${te(me(m - T), 12)}` }),
|
1487
1484
|
" ",
|
1488
|
-
|
1485
|
+
m - T === 0 ? "Higher Output" : "Less Output"
|
1489
1486
|
] }),
|
1490
|
-
isMax:
|
1487
|
+
isMax: m - T === 0
|
1491
1488
|
} : {
|
1492
1489
|
val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
|
1493
|
-
/* @__PURE__ */ e("span", { className: `${
|
1490
|
+
/* @__PURE__ */ e("span", { className: `${m - h === 0 ? "bw-text-text-greentext" : "bw-bg-background-container"}`, children: `-$${te(me(m - h), 12)}` }),
|
1494
1491
|
" ",
|
1495
|
-
|
1492
|
+
m - h === 0 ? "Higher Output" : "Less Output"
|
1496
1493
|
] }),
|
1497
|
-
isMax:
|
1494
|
+
isMax: m - h === 0
|
1498
1495
|
};
|
1499
1496
|
}
|
1500
|
-
return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: "bw-h-[410px] bw-pt-2 bw-overflow-y-auto", children:
|
1501
|
-
let
|
1502
|
-
return
|
1503
|
-
}).map((
|
1504
|
-
|
1505
|
-
|
1506
|
-
let S = (t == null ? void 0 : t.outputAmountDisplay) || "", T = (f = (R = t == null ? void 0 : t.providerDetails) == null ? void 0 : R.logoUrl) != null && f.length ? (m = t == null ? void 0 : t.providerDetails) == null ? void 0 : m.logoUrl : O;
|
1497
|
+
return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: "bw-h-[410px] bw-pt-2 bw-overflow-y-auto", children: t.data?.data?.quotes?.sort((n, u) => {
|
1498
|
+
let f = Number(n.outputAmountDisplay || 0), v = Number(u.outputAmountDisplay || 0);
|
1499
|
+
return i === "asc" ? f - v : v - f;
|
1500
|
+
}).map((n, u, f) => {
|
1501
|
+
const v = O(n, f, u);
|
1502
|
+
let h = n?.outputAmountDisplay || "", b = n?.providerDetails?.logoUrl?.length ? n?.providerDetails?.logoUrl : C;
|
1507
1503
|
return /* @__PURE__ */ e(
|
1508
1504
|
"div",
|
1509
1505
|
{
|
1510
1506
|
onClick: () => {
|
1511
|
-
|
1507
|
+
a(n), o();
|
1512
1508
|
},
|
1513
1509
|
className: "bw-mb-4",
|
1514
1510
|
children: /* @__PURE__ */ l(
|
1515
1511
|
"div",
|
1516
1512
|
{
|
1517
1513
|
style: {
|
1518
|
-
boxShadow:
|
1514
|
+
boxShadow: S && S.customTheme && S.customTheme?.shadow?.boxShadow || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
1519
1515
|
},
|
1520
1516
|
className: " bw-w-[93%] bw-mt-3 bw-cursor-pointer bw-ml-auto bw-mr-2 bw-flex bw-mb-8 bw-items-center bw-px-2 bw-relative bw-rounded-lg bw-pt-3 bw-pb-3 bw-border bw-border-border-primary",
|
1521
1517
|
children: [
|
1522
1518
|
/* @__PURE__ */ l("div", { className: "bw-absolute bw-flex bw-items-center bw-gap-x-1 bw-bottom-[-10%] bw-self-center bw-right-[47%]", children: [
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1519
|
+
n.tags?.includes("BEST_OUTPUT") ? /* @__PURE__ */ e(G, { name: "Max Output", children: /* @__PURE__ */ e("div", { className: "bw-w-[20px] bw-h-[20px]", children: /* @__PURE__ */ e(Ce, { fill: "var(--tw-background-container)" }) }) }) : /* @__PURE__ */ e(V, {}),
|
1520
|
+
n.tags?.includes("CHEAP") ? /* @__PURE__ */ e(G, { name: "Lowest Gas", children: /* @__PURE__ */ e("div", { className: "bw-w-[20px] bw-h-[20px]", children: /* @__PURE__ */ e(Ne, { fill: "var(--tw-background-container)" }) }) }) : /* @__PURE__ */ e(V, {}),
|
1521
|
+
n.tags?.includes("FAST") ? /* @__PURE__ */ e("div", { className: "bw-w-[20px] bw-h-[20px]", children: /* @__PURE__ */ e(Te, { fill: "var(--tw-background-container)" }) }) : /* @__PURE__ */ e(V, {})
|
1526
1522
|
] }),
|
1527
|
-
/* @__PURE__ */ e("div", { className: "bw-w-[35px] bw-h-[35px] bw-absolute bw-z-50 bw-left-[-5%] bw-top-[-16%]", children: /* @__PURE__ */ e("img", { src:
|
1523
|
+
/* @__PURE__ */ e("div", { className: "bw-w-[35px] bw-h-[35px] bw-absolute bw-z-50 bw-left-[-5%] bw-top-[-16%]", children: /* @__PURE__ */ e("img", { src: b, className: "bw-rounded-lg ", width: 35, height: 35 }) }),
|
1528
1524
|
/* @__PURE__ */ l("div", { className: "bw-absolute bw-text-[10px] bw-text-text-primary bw-font-normal bw-left-5 bw-top-1", children: [
|
1529
|
-
/* @__PURE__ */ e("span", { className: `${
|
1525
|
+
/* @__PURE__ */ e("span", { className: `${v.color}`, children: v?.val }),
|
1530
1526
|
" "
|
1531
1527
|
] }),
|
1532
1528
|
/* @__PURE__ */ e("div", { className: "bw-flex bw-w-full bw-mt-4 bw-justify-between bw-items-center", children: /* @__PURE__ */ l("div", { children: [
|
1533
|
-
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-semibold bw-text-text-primary", children:
|
1529
|
+
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-semibold bw-text-text-primary", children: n?.providerDetails?.name || "" }),
|
1534
1530
|
/* @__PURE__ */ l("p", { className: "bw-text-xs bw-font-normal bw-my-1 bw-text-text-secondary", children: [
|
1535
1531
|
"via",
|
1536
1532
|
" ",
|
1537
|
-
|
1533
|
+
n?.protocolsUsed?.length > 2 ? n?.protocolsUsed.slice(0, 2).map((g, m, T) => m == T.length - 1 ? g : `${g + " >> "}`) + `+${n?.protocolsUsed?.length - 2}` : n?.protocolsUsed.map((g, m, T) => m == T.length - 1 ? g : `${g + " >> "}`),
|
1538
1534
|
" "
|
1539
1535
|
] }),
|
1540
1536
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
|
1541
1537
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
|
1542
|
-
/* @__PURE__ */ e(
|
1538
|
+
/* @__PURE__ */ e(Pe, { fill: "var(--tw-text-secondary)" }),
|
1543
1539
|
/* @__PURE__ */ l("p", { className: "bw-text-xs bw-font-normal bw-text-text-secondary", children: [
|
1544
|
-
|
1540
|
+
n.steps.length,
|
1545
1541
|
" Step"
|
1546
1542
|
] })
|
1547
1543
|
] }),
|
1548
1544
|
/* @__PURE__ */ l("div", { className: "bw-text-xs bw-font-normal bw-text-text-secondary", children: [
|
1549
1545
|
" Slippage ",
|
1550
|
-
|
1546
|
+
n.slippage / 100,
|
1551
1547
|
"%"
|
1552
1548
|
] })
|
1553
1549
|
] })
|
1554
1550
|
] }) }),
|
1555
1551
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-flex-col bw-justify-between bw-w-full bw-items-end", children: [
|
1556
1552
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-2", children: [
|
1557
|
-
/* @__PURE__ */ l("div", { className: ` bw-relative bw-rounded-[50%] bw-w-[21px] bw-h-[21px] bw-border bw-border-border-primary ${
|
1558
|
-
|
1559
|
-
/* @__PURE__ */ l("div", { className: `bw-bg-background-secondary bw-absolute bw-bottom-[-30%] bw-right-[-15%] bw-rounded-[50%] bw-w-[12px] bw-h-[12px] bw-border bw-border-border-primary ${
|
1553
|
+
/* @__PURE__ */ l("div", { className: ` bw-relative bw-rounded-[50%] bw-w-[21px] bw-h-[21px] bw-border bw-border-border-primary ${n.to?.image ? "bw-bg-background-secondary" : ""}`, children: [
|
1554
|
+
n.to?.image ? /* @__PURE__ */ e("img", { src: n.to.image, width: 20, height: 20, alt: "img", className: "bw-rounded-[50%] bw-max-w-[20px] bw-max-h-[20px] bw-object-contain" }) : /* @__PURE__ */ e("img", { src: C, width: 20, height: 20, alt: "img", className: "bw-rounded-[50%]" }),
|
1555
|
+
/* @__PURE__ */ l("div", { className: `bw-bg-background-secondary bw-absolute bw-bottom-[-30%] bw-right-[-15%] bw-rounded-[50%] bw-w-[12px] bw-h-[12px] bw-border bw-border-border-primary ${s?.image ? "bw-bg-background-secondary" : ""}`, children: [
|
1560
1556
|
" ",
|
1561
|
-
|
1557
|
+
s?.image ? /* @__PURE__ */ e("img", { src: s.image, width: 11, height: 11, className: "bw-rounded-[50%]", alt: "img" }) : /* @__PURE__ */ e("img", { src: C, width: 11, height: 11, className: "bw-rounded-[50%]", alt: "img" })
|
1562
1558
|
] })
|
1563
1559
|
] }),
|
1564
|
-
/* @__PURE__ */ e("p", { className: "bw-text-lg bw-break-words bw-font-medium bw-text-text-primary", children: /* @__PURE__ */ e(
|
1560
|
+
/* @__PURE__ */ e("p", { className: "bw-text-lg bw-break-words bw-font-medium bw-text-text-primary", children: /* @__PURE__ */ e(oe, { value: h, decimal: 12 }) })
|
1565
1561
|
] }),
|
1566
1562
|
/* @__PURE__ */ e("div", { className: "bw-flex bw-text-xs bw-font-normal bw-mb-2 bw-items-center bw-gap-x-1", children: /* @__PURE__ */ l("p", { className: "bw-text-text-secondary", children: [
|
1567
1563
|
"$",
|
1568
|
-
/* @__PURE__ */ e(
|
1564
|
+
/* @__PURE__ */ e(oe, { value: (n.outputAmountDisplay * c).toString() || "", decimal: 10 })
|
1569
1565
|
] }) }),
|
1570
1566
|
/* @__PURE__ */ l("div", { className: "bw-text-sm bw-flex bw-items-center bw-gap-x-2 bw-font-medium bw-text-text-secondary", children: [
|
1571
1567
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-text-sm bw-items-center bw-gap-x-1", children: [
|
1572
|
-
/* @__PURE__ */ e(
|
1568
|
+
/* @__PURE__ */ e(_e, { fill: "var(--tw-text-secondary)" }),
|
1573
1569
|
/* @__PURE__ */ l("p", { children: [
|
1574
1570
|
" ",
|
1575
|
-
|
1571
|
+
n.estimatedTimeInSeconds >= 90 ? `${Math.round(E((n.estimatedTimeInSeconds || 60) / 60, 2) || 0)}min` : `${n?.estimatedTimeInSeconds || 60} secs`
|
1576
1572
|
] })
|
1577
1573
|
] }),
|
1578
|
-
/* @__PURE__ */ e(go, { item:
|
1574
|
+
/* @__PURE__ */ e(go, { item: n, gasImg: x, fromChain: w })
|
1579
1575
|
] })
|
1580
1576
|
] })
|
1581
1577
|
]
|
1582
1578
|
}
|
1583
1579
|
)
|
1584
1580
|
},
|
1585
|
-
|
1581
|
+
u
|
1586
1582
|
);
|
1587
1583
|
}) }) });
|
1588
1584
|
}
|
1589
|
-
function yo({ gasImg:
|
1590
|
-
const [
|
1591
|
-
return
|
1592
|
-
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1598
|
-
/* @__PURE__ */ e(Ve, { fill: "var(--tw-text-secondary)" }),
|
1585
|
+
function yo({ gasImg: t, item: o, fromChain: a }) {
|
1586
|
+
const [c, w] = U({});
|
1587
|
+
return Ue(() => {
|
1588
|
+
let s = { amountInUSD: 0 };
|
1589
|
+
o?.fee?.forEach((i) => {
|
1590
|
+
i.source == "FROM_SOURCE_WALLET" && (s.amountInUSD += Number(i.amountInUSD));
|
1591
|
+
}), w(s);
|
1592
|
+
}, [o]), /* @__PURE__ */ l("div", { className: "bw-flex bw-text-sm bw-items-center bw-gap-x-1", children: [
|
1593
|
+
/* @__PURE__ */ e(Ae, { fill: "var(--tw-text-secondary)" }),
|
1599
1594
|
/* @__PURE__ */ l("p", { children: [
|
1600
1595
|
"$",
|
1601
|
-
|
1596
|
+
te(c?.amountInUSD || 0, 6) || 0
|
1602
1597
|
] })
|
1603
1598
|
] });
|
1604
1599
|
}
|
1605
|
-
function So({ routes:
|
1606
|
-
|
1607
|
-
|
1608
|
-
|
1609
|
-
|
1610
|
-
let
|
1611
|
-
|
1612
|
-
|
1600
|
+
function So({ routes: t, handleShowAllRoutes: o, handleRoutesData: a, convertVal: c, fromChain: w, sort: s, toChain: i }) {
|
1601
|
+
const { gasnew: S, defaultCoin: x } = ge;
|
1602
|
+
U({}), U({});
|
1603
|
+
const C = H((n) => n.configuration);
|
1604
|
+
function O(n, u, f) {
|
1605
|
+
let v = { amountInUSD: 0 };
|
1606
|
+
n?.fee?.forEach((M) => {
|
1607
|
+
M.source == "FROM_SOURCE_WALLET" && (v.amountInUSD += Number(M.amountInUSD));
|
1613
1608
|
});
|
1614
|
-
let
|
1615
|
-
|
1616
|
-
|
1609
|
+
let h = v.amountInUSD, b = { amountInUSD: 0 };
|
1610
|
+
u[0].fee?.forEach((M) => {
|
1611
|
+
M.source == "FROM_SOURCE_WALLET" && (b.amountInUSD += Number(M.amountInUSD));
|
1617
1612
|
});
|
1618
|
-
let
|
1619
|
-
|
1620
|
-
|
1613
|
+
let g = { amountInUSD: 0 };
|
1614
|
+
u[u.length - 1].fee?.forEach((M) => {
|
1615
|
+
M.source == "FROM_SOURCE_WALLET" && (g.amountInUSD += Number(M.amountInUSD));
|
1621
1616
|
});
|
1622
|
-
let
|
1623
|
-
return
|
1617
|
+
let m = s === "desc" ? g.amountInUSD : b.amountInUSD, T = s === "desc" ? b.amountInUSD : g.amountInUSD;
|
1618
|
+
return f == 0 && s !== "desc" || f == u.length - 1 && s == "desc" ? {
|
1624
1619
|
val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
|
1625
|
-
/* @__PURE__ */ e("span", { className: "bw-text-text-greentext", children: `$${
|
1620
|
+
/* @__PURE__ */ e("span", { className: "bw-text-text-greentext", children: `$${E(T - m, 4)}` }),
|
1626
1621
|
" Cheaper"
|
1627
1622
|
] }),
|
1628
1623
|
isMax: !0
|
1629
|
-
} :
|
1624
|
+
} : f === 0 && s !== "desc" ? {
|
1630
1625
|
val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
|
1631
|
-
/* @__PURE__ */ e("span", { className: `${
|
1626
|
+
/* @__PURE__ */ e("span", { className: `${E(m - T, 4) === 0 ? "bw-text-text-greentext" : "bw-bg-background-container"}`, children: `$${E(m - T, 4)}` }),
|
1632
1627
|
" ",
|
1633
|
-
|
1628
|
+
E(m - T, 4) === 0 ? "Cheaper" : "Higher"
|
1634
1629
|
] }),
|
1635
|
-
isMax:
|
1636
|
-
} :
|
1630
|
+
isMax: E(m - T, 4) === 0
|
1631
|
+
} : f == u.length - 1 && s == "desc" ? {
|
1637
1632
|
val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
|
1638
|
-
/* @__PURE__ */ e("span", { className: `${
|
1633
|
+
/* @__PURE__ */ e("span", { className: `${E(T - m, 4) === 0 ? "bw-text-text-greentext" : "bw-bg-background-container"}`, children: `$${E(T - m, 4)}` }),
|
1639
1634
|
" ",
|
1640
|
-
|
1635
|
+
E(T - m, 4) ? "Cheaper" : "Higher"
|
1641
1636
|
] }),
|
1642
|
-
isMax:
|
1637
|
+
isMax: E(T - m, 4) === 0
|
1643
1638
|
} : {
|
1644
1639
|
val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
|
1645
|
-
/* @__PURE__ */ e("span", { className: `${
|
1640
|
+
/* @__PURE__ */ e("span", { className: `${E(h - m, 4) === 0 ? "bw-text-text-greentext" : "bw-bg-background-container"}`, children: `$${E(h - m, 4)}` }),
|
1646
1641
|
" ",
|
1647
|
-
|
1642
|
+
E(h - m, 4) ? "Cheaper" : "Higher"
|
1648
1643
|
] }),
|
1649
|
-
isMax:
|
1644
|
+
isMax: E(h - m, 4) === 0
|
1650
1645
|
};
|
1651
1646
|
}
|
1652
|
-
return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: "bw-h-[410px] bw-pt-2 bw-overflow-y-auto", children:
|
1653
|
-
|
1654
|
-
|
1655
|
-
|
1656
|
-
m.source == "FROM_SOURCE_WALLET" && (y.amountInUSD += Number(m.amountInUSD));
|
1647
|
+
return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: "bw-h-[410px] bw-pt-2 bw-overflow-y-auto", children: t?.data?.data?.quotes?.sort((n, u) => {
|
1648
|
+
let f = { amountInUSD: 0 };
|
1649
|
+
n?.fee?.forEach((g) => {
|
1650
|
+
g.source == "FROM_SOURCE_WALLET" && (f.amountInUSD += Number(g.amountInUSD));
|
1657
1651
|
});
|
1658
|
-
let
|
1659
|
-
|
1660
|
-
|
1652
|
+
let v = { amountInUSD: 0 };
|
1653
|
+
u?.fee?.forEach((g) => {
|
1654
|
+
g.source == "FROM_SOURCE_WALLET" && (v.amountInUSD += Number(g.amountInUSD));
|
1661
1655
|
});
|
1662
|
-
let
|
1663
|
-
return
|
1664
|
-
}).map((
|
1665
|
-
|
1666
|
-
|
1667
|
-
let S = (t == null ? void 0 : t.outputAmountDisplay) || "", T = (f = (R = t == null ? void 0 : t.providerDetails) == null ? void 0 : R.logoUrl) != null && f.length ? (m = t == null ? void 0 : t.providerDetails) == null ? void 0 : m.logoUrl : h;
|
1656
|
+
let h = f.amountInUSD, b = v.amountInUSD;
|
1657
|
+
return s === "asc" || s === "none" ? h - b : b - h;
|
1658
|
+
}).map((n, u, f) => {
|
1659
|
+
const v = O(n, f, u);
|
1660
|
+
let h = n?.outputAmountDisplay || "", b = n?.providerDetails?.logoUrl?.length ? n?.providerDetails?.logoUrl : x;
|
1668
1661
|
return /* @__PURE__ */ e(
|
1669
1662
|
"div",
|
1670
1663
|
{
|
1671
1664
|
onClick: () => {
|
1672
|
-
|
1665
|
+
a(n), o();
|
1673
1666
|
},
|
1674
1667
|
className: "bw-mb-4",
|
1675
1668
|
children: /* @__PURE__ */ l(
|
1676
1669
|
"div",
|
1677
1670
|
{
|
1678
1671
|
style: {
|
1679
|
-
boxShadow:
|
1672
|
+
boxShadow: C && C.customTheme && C.customTheme?.shadow?.boxShadow || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
1680
1673
|
},
|
1681
1674
|
className: " bw-w-[93%] bw-mt-3 bw-cursor-pointer bw-ml-auto bw-mr-2 bw-flex bw-mb-8 bw-items-center bw-px-2 bw-relative bw-rounded-lg bw-pt-3 bw-pb-3 bw-border bw-border-border-primary",
|
1682
1675
|
children: [
|
1683
1676
|
/* @__PURE__ */ l("div", { className: "bw-absolute bw-flex bw-items-center bw-gap-x-1 bw-bottom-[-10%] bw-self-center bw-right-[47%]", children: [
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1677
|
+
n.tags?.includes("CHEAP") ? /* @__PURE__ */ e(G, { name: "Lowest Gas", children: /* @__PURE__ */ e("div", { className: "bw-w-[20px] bw-h-[20px]", children: /* @__PURE__ */ e(Ne, { fill: "var(--tw-background-container)" }) }) }) : /* @__PURE__ */ e(V, {}),
|
1678
|
+
n.tags?.includes("BEST_OUTPUT") ? /* @__PURE__ */ e(G, { name: "Max Output", children: /* @__PURE__ */ e("div", { className: "bw-w-[20px] bw-h-[20px]", children: /* @__PURE__ */ e(Ce, { fill: "var(--tw-background-container)" }) }) }) : /* @__PURE__ */ e(V, {}),
|
1679
|
+
n.tags?.includes("FAST") ? /* @__PURE__ */ e(G, { name: "Fastest", children: /* @__PURE__ */ e("div", { className: "bw-w-[20px] bw-h-[20px]", children: /* @__PURE__ */ e(Te, { fill: "var(--tw-background-container)" }) }) }) : /* @__PURE__ */ e(V, {})
|
1687
1680
|
] }),
|
1688
|
-
/* @__PURE__ */ e("div", { className: "bw-w-[35px] bw-h-[35px] bw-absolute bw-z-50 bw-left-[-5%] bw-top-[-16%]", children: /* @__PURE__ */ e("img", { src:
|
1681
|
+
/* @__PURE__ */ e("div", { className: "bw-w-[35px] bw-h-[35px] bw-absolute bw-z-50 bw-left-[-5%] bw-top-[-16%]", children: /* @__PURE__ */ e("img", { src: b, className: "bw-rounded-lg ", width: 35, height: 35 }) }),
|
1689
1682
|
/* @__PURE__ */ l("div", { className: "bw-absolute bw-text-[10px] bw-text-text-primary bw-font-normal bw-left-5 bw-top-1", children: [
|
1690
|
-
/* @__PURE__ */ e("span", { className: `${
|
1683
|
+
/* @__PURE__ */ e("span", { className: `${v.color}`, children: v?.val }),
|
1691
1684
|
" "
|
1692
1685
|
] }),
|
1693
1686
|
/* @__PURE__ */ e("div", { className: "bw-flex bw-w-full bw-mt-4 bw-justify-between bw-items-center", children: /* @__PURE__ */ l("div", { children: [
|
1694
|
-
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-semibold bw-text-text-primary", children:
|
1687
|
+
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-semibold bw-text-text-primary", children: n?.providerDetails?.name || "" }),
|
1695
1688
|
/* @__PURE__ */ l("p", { className: "bw-text-xs bw-font-normal bw-my-1 bw-text-text-secondary", children: [
|
1696
1689
|
"via",
|
1697
1690
|
" ",
|
1698
|
-
|
1691
|
+
n?.protocolsUsed?.length > 2 ? n?.protocolsUsed.slice(0, 2).map((g, m, T) => m == T.length - 1 ? g : `${g + " >> "}`) + `+${n?.protocolsUsed?.length - 2}` : n?.protocolsUsed.map((g, m, T) => m == T.length - 1 ? g : `${g + " >> "}`),
|
1699
1692
|
" "
|
1700
1693
|
] }),
|
1701
1694
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
|
1702
1695
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
|
1703
|
-
/* @__PURE__ */ e(
|
1696
|
+
/* @__PURE__ */ e(Pe, { fill: "var(--tw-text-secondary)" }),
|
1704
1697
|
/* @__PURE__ */ l("p", { className: "bw-text-xs bw-font-normal bw-text-text-secondary", children: [
|
1705
|
-
|
1698
|
+
n.steps.length,
|
1706
1699
|
" Step"
|
1707
1700
|
] })
|
1708
1701
|
] }),
|
1709
1702
|
/* @__PURE__ */ l("div", { className: "bw-text-xs bw-font-normal bw-text-text-secondary", children: [
|
1710
1703
|
" Slippage ",
|
1711
|
-
|
1704
|
+
n.slippage / 100,
|
1712
1705
|
"%"
|
1713
1706
|
] })
|
1714
1707
|
] })
|
1715
1708
|
] }) }),
|
1716
1709
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-flex-col bw-justify-between bw-w-full bw-items-end", children: [
|
1717
1710
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-2", children: [
|
1718
|
-
/* @__PURE__ */ l("div", { className: ` bw-relative bw-rounded-[50%] bw-w-[21px] bw-h-[21px] bw-border bw-border-border-primary ${
|
1719
|
-
|
1720
|
-
/* @__PURE__ */ l("div", { className: ` bw-absolute bw-bottom-[-30%] bw-right-[-15%] bw-rounded-[50%] bw-w-[12px] bw-h-[12px] bw-border bw-border-border-primary ${
|
1711
|
+
/* @__PURE__ */ l("div", { className: ` bw-relative bw-rounded-[50%] bw-w-[21px] bw-h-[21px] bw-border bw-border-border-primary ${n.to?.image ? "bw-bg-background-secondary" : ""}`, children: [
|
1712
|
+
n.to?.image ? /* @__PURE__ */ e("img", { src: n.to.image, width: 20, height: 20, alt: "img", className: "bw-rounded-[50%] bw-max-w-[20px] bw-max-h-[20px] bw-object-contain" }) : /* @__PURE__ */ e("img", { src: x, width: 20, height: 20, alt: "img", className: "bw-rounded-[50%]" }),
|
1713
|
+
/* @__PURE__ */ l("div", { className: ` bw-absolute bw-bottom-[-30%] bw-right-[-15%] bw-rounded-[50%] bw-w-[12px] bw-h-[12px] bw-border bw-border-border-primary ${i?.image ? "bw-bg-background-secondary" : ""}`, children: [
|
1721
1714
|
" ",
|
1722
|
-
|
1715
|
+
i?.image ? /* @__PURE__ */ e("img", { src: i.image, width: 11, height: 11, className: "bw-rounded-[50%]", alt: "img" }) : /* @__PURE__ */ e("img", { src: x, width: 11, height: 11, className: "bw-rounded-[50%]", alt: "img" })
|
1723
1716
|
] })
|
1724
1717
|
] }),
|
1725
|
-
/* @__PURE__ */ e("p", { className: "bw-text-lg bw-break-words bw-font-medium bw-text-text-primary", children: /* @__PURE__ */ e(
|
1718
|
+
/* @__PURE__ */ e("p", { className: "bw-text-lg bw-break-words bw-font-medium bw-text-text-primary", children: /* @__PURE__ */ e(oe, { value: h, decimal: 12 }) })
|
1726
1719
|
] }),
|
1727
1720
|
/* @__PURE__ */ e("div", { className: "bw-flex bw-text-xs bw-font-normal bw-mb-2 bw-items-center bw-gap-x-1", children: /* @__PURE__ */ l("p", { className: "bw-text-text-secondary", children: [
|
1728
1721
|
"$",
|
1729
|
-
/* @__PURE__ */ e(
|
1722
|
+
/* @__PURE__ */ e(oe, { value: ((n.outputAmountDisplay || "") * c).toString() || "", decimal: 10 })
|
1730
1723
|
] }) }),
|
1731
1724
|
/* @__PURE__ */ l("div", { className: "bw-text-sm bw-flex bw-items-center bw-gap-x-2 bw-font-medium bw-text-text-secondary", children: [
|
1732
1725
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-text-sm bw-items-center bw-gap-x-1", children: [
|
1733
|
-
/* @__PURE__ */ e(
|
1726
|
+
/* @__PURE__ */ e(_e, { fill: "var(--tw-text-secondary)" }),
|
1734
1727
|
/* @__PURE__ */ l("p", { children: [
|
1735
1728
|
" ",
|
1736
|
-
|
1729
|
+
n.estimatedTimeInSeconds >= 90 ? `${Math.round(E((n.estimatedTimeInSeconds || 60) / 60, 2) || 0)}min` : `${n?.estimatedTimeInSeconds || 60} secs`
|
1737
1730
|
] })
|
1738
1731
|
] }),
|
1739
|
-
/* @__PURE__ */ e(yo, { item:
|
1732
|
+
/* @__PURE__ */ e(yo, { item: n, gasImg: S, fromChain: w })
|
1740
1733
|
] })
|
1741
1734
|
] })
|
1742
1735
|
]
|
1743
1736
|
}
|
1744
1737
|
)
|
1745
1738
|
},
|
1746
|
-
|
1739
|
+
u
|
1747
1740
|
);
|
1748
1741
|
}) }) });
|
1749
1742
|
}
|
1750
|
-
function
|
1751
|
-
const [
|
1752
|
-
return
|
1753
|
-
|
1754
|
-
|
1755
|
-
|
1756
|
-
|
1757
|
-
|
1758
|
-
|
1759
|
-
/* @__PURE__ */ e(Ve, { fill: "var(--tw-text-secondary)" }),
|
1743
|
+
function Co({ gasImg: t, item: o, fromChain: a }) {
|
1744
|
+
const [c, w] = U({});
|
1745
|
+
return Ue(() => {
|
1746
|
+
let s = { amountInUSD: 0 };
|
1747
|
+
o?.fee?.forEach((i) => {
|
1748
|
+
i.source == "FROM_SOURCE_WALLET" && (s.amountInUSD += Number(i.amountInUSD));
|
1749
|
+
}), w(s);
|
1750
|
+
}, [o]), /* @__PURE__ */ l("div", { className: "bw-flex bw-text-sm bw-items-center bw-gap-x-1", children: [
|
1751
|
+
/* @__PURE__ */ e(Ae, { fill: "var(--tw-text-secondary)" }),
|
1760
1752
|
/* @__PURE__ */ l("p", { children: [
|
1761
1753
|
"$",
|
1762
|
-
|
1754
|
+
te(c?.amountInUSD || 0, 6) || 0
|
1763
1755
|
] })
|
1764
1756
|
] });
|
1765
1757
|
}
|
1766
|
-
function
|
1767
|
-
|
1768
|
-
|
1769
|
-
|
1770
|
-
|
1771
|
-
|
1758
|
+
function No({ routes: t, handleShowAllRoutes: o, handleRoutesData: a, convertVal: c, fromChain: w, sort: s, toChain: i }) {
|
1759
|
+
const { gasnew: S, defaultCoin: x } = ge;
|
1760
|
+
U({}), U({});
|
1761
|
+
const C = H((n) => n.configuration);
|
1762
|
+
function O(n, u, f) {
|
1763
|
+
let v = E((n.estimatedTimeInSeconds || 60) / 60, 2) || 0, h = s == "asc" ? E((u[u.length - 1].estimatedTimeInSeconds || 60) / 60, 2) || 0 : E((u[0].estimatedTimeInSeconds || 60) / 60, 2) || 0, b = s == "asc" ? E((u[0].estimatedTimeInSeconds || 60) / 60, 2) || 0 : E((u[u.length - 1].estimatedTimeInSeconds || 60) / 60, 2) || 0;
|
1764
|
+
return f == 0 && s !== "asc" || f == u.length - 1 && s == "asc" ? {
|
1772
1765
|
val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
|
1773
|
-
/* @__PURE__ */ e("span", { className: "bw-text-text-greentext", children: `+${
|
1766
|
+
/* @__PURE__ */ e("span", { className: "bw-text-text-greentext", children: `+${E(b - h || 0, 2)} Mins` }),
|
1774
1767
|
" Faster"
|
1775
1768
|
] }),
|
1776
1769
|
isMax: !0
|
1777
|
-
} :
|
1770
|
+
} : f == u.length - 1 && s !== "asc" || f === 0 && s == "asc" ? {
|
1778
1771
|
val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
|
1779
|
-
/* @__PURE__ */ e("span", { className: `${
|
1772
|
+
/* @__PURE__ */ e("span", { className: `${h - b === 0 ? "bw-text-text-greentext" : "bw-bg-background-container"}`, children: `${E(b - h, 2)} Mins` }),
|
1780
1773
|
" ",
|
1781
|
-
|
1774
|
+
h - b === 0 ? "Faster" : "Slower"
|
1782
1775
|
] }),
|
1783
|
-
isMax:
|
1776
|
+
isMax: h - b === 0
|
1784
1777
|
} : {
|
1785
1778
|
val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
|
1786
|
-
/* @__PURE__ */ e("span", { className: `${
|
1779
|
+
/* @__PURE__ */ e("span", { className: `${h - v === 0 ? "bw-text-text-greentext" : "bw-bg-background-container"}`, children: `${E(v - h, 2)} Mins` }),
|
1787
1780
|
" ",
|
1788
|
-
|
1781
|
+
h - v === 0 ? "Faster" : "Slower"
|
1789
1782
|
] }),
|
1790
|
-
isMax:
|
1783
|
+
isMax: h - v === 0
|
1791
1784
|
};
|
1792
1785
|
}
|
1793
|
-
return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: "bw-h-[410px] bw-pt-2 bw-overflow-y-auto", children:
|
1794
|
-
let
|
1795
|
-
return
|
1796
|
-
}).map((
|
1797
|
-
|
1798
|
-
|
1799
|
-
let S = (t == null ? void 0 : t.outputAmountDisplay) || "", T = (f = (R = t == null ? void 0 : t.providerDetails) == null ? void 0 : R.logoUrl) != null && f.length ? (m = t == null ? void 0 : t.providerDetails) == null ? void 0 : m.logoUrl : h;
|
1786
|
+
return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: "bw-h-[410px] bw-pt-2 bw-overflow-y-auto", children: t.data?.data?.quotes?.sort((n, u) => {
|
1787
|
+
let f = E((n.estimatedTimeInSeconds || 60) / 60, 2) || 0, v = E((u.estimatedTimeInSeconds || 60) / 60, 2) || 0;
|
1788
|
+
return s === "asc" ? v - f : f - v;
|
1789
|
+
}).map((n, u, f) => {
|
1790
|
+
const v = O(n, f, u);
|
1791
|
+
let h = n?.outputAmountDisplay || "", b = n?.providerDetails?.logoUrl?.length ? n?.providerDetails?.logoUrl : x;
|
1800
1792
|
return /* @__PURE__ */ e(
|
1801
1793
|
"div",
|
1802
1794
|
{
|
1803
1795
|
onClick: () => {
|
1804
|
-
|
1796
|
+
a(n), o();
|
1805
1797
|
},
|
1806
1798
|
className: "bw-mb-4",
|
1807
1799
|
children: /* @__PURE__ */ l(
|
1808
1800
|
"div",
|
1809
1801
|
{
|
1810
1802
|
style: {
|
1811
|
-
boxShadow:
|
1803
|
+
boxShadow: C && C.customTheme && C.customTheme?.shadow?.boxShadow || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
1812
1804
|
},
|
1813
1805
|
className: " bw-w-[93%] bw-mt-3 bw-cursor-pointer bw-ml-auto bw-mr-2 bw-flex bw-mb-8 bw-items-center bw-px-2 bw-relative bw-rounded-lg bw-pt-3 bw-pb-3 bw-border bw-border-border-primary",
|
1814
1806
|
children: [
|
1815
1807
|
/* @__PURE__ */ l("div", { className: "bw-absolute bw-flex bw-items-center bw-gap-x-1 bw-bottom-[-10%] bw-self-center bw-right-[47%]", children: [
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1808
|
+
n.tags?.includes("FAST") ? /* @__PURE__ */ e(G, { name: "Fastest", children: /* @__PURE__ */ e("div", { className: "bw-w-[20px] bw-h-[20px]", children: /* @__PURE__ */ e(Te, { fill: "var(--tw-background-container)" }) }) }) : /* @__PURE__ */ e(V, {}),
|
1809
|
+
n.tags?.includes("CHEAP") ? /* @__PURE__ */ e(G, { name: "Lowest Gas", children: /* @__PURE__ */ e("div", { className: "bw-w-[20px] bw-h-[20px]", children: /* @__PURE__ */ e(Ne, { fill: "var(--tw-background-container)" }) }) }) : /* @__PURE__ */ e(V, {}),
|
1810
|
+
n.tags?.includes("BEST_OUTPUT") ? /* @__PURE__ */ e(G, { name: "Max Output", children: /* @__PURE__ */ e("div", { className: "bw-w-[20px] bw-h-[20px]", children: /* @__PURE__ */ e(Ce, { fill: "var(--tw-background-container)" }) }) }) : /* @__PURE__ */ e(V, {})
|
1819
1811
|
] }),
|
1820
|
-
/* @__PURE__ */ e("div", { className: "bw-w-[35px] bw-h-[35px] bw-absolute bw-z-50 bw-left-[-5%] bw-top-[-16%]", children: /* @__PURE__ */ e("img", { src:
|
1812
|
+
/* @__PURE__ */ e("div", { className: "bw-w-[35px] bw-h-[35px] bw-absolute bw-z-50 bw-left-[-5%] bw-top-[-16%]", children: /* @__PURE__ */ e("img", { src: b, className: "bw-rounded-lg ", width: 35, height: 35 }) }),
|
1821
1813
|
/* @__PURE__ */ l("div", { className: "bw-absolute bw-text-[10px] bw-text-text-primary bw-font-normal bw-left-5 bw-top-1", children: [
|
1822
|
-
/* @__PURE__ */ e("span", { className: `${
|
1814
|
+
/* @__PURE__ */ e("span", { className: `${v.color}`, children: v?.val }),
|
1823
1815
|
" "
|
1824
1816
|
] }),
|
1825
1817
|
/* @__PURE__ */ e("div", { className: "bw-flex bw-w-full bw-mt-4 bw-justify-between bw-items-center", children: /* @__PURE__ */ l("div", { children: [
|
1826
|
-
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-semibold bw-text-text-primary", children:
|
1818
|
+
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-semibold bw-text-text-primary", children: n?.providerDetails?.name || "" }),
|
1827
1819
|
/* @__PURE__ */ l("p", { className: "bw-text-xs bw-font-normal bw-my-1 bw-text-text-secondary", children: [
|
1828
1820
|
"via",
|
1829
1821
|
" ",
|
1830
|
-
|
1822
|
+
n?.protocolsUsed?.length > 2 ? n?.protocolsUsed.slice(0, 2).map((g, m, T) => m == T.length - 1 ? g : `${g + " >> "}`) + `+${n?.protocolsUsed?.length - 2}` : n?.protocolsUsed.map((g, m, T) => m == T.length - 1 ? g : `${g + " >> "}`),
|
1831
1823
|
" "
|
1832
1824
|
] }),
|
1833
1825
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
|
1834
1826
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
|
1835
|
-
/* @__PURE__ */ e(
|
1827
|
+
/* @__PURE__ */ e(Pe, { fill: "var(--tw-text-secondary)" }),
|
1836
1828
|
/* @__PURE__ */ l("p", { className: "bw-text-xs bw-font-normal bw-text-text-secondary", children: [
|
1837
|
-
|
1829
|
+
n.steps.length,
|
1838
1830
|
" Step"
|
1839
1831
|
] })
|
1840
1832
|
] }),
|
1841
1833
|
/* @__PURE__ */ l("div", { className: "bw-text-xs bw-font-normal bw-text-text-secondary", children: [
|
1842
1834
|
" Slippage ",
|
1843
|
-
|
1835
|
+
n.slippage / 100,
|
1844
1836
|
"%"
|
1845
1837
|
] })
|
1846
1838
|
] })
|
1847
1839
|
] }) }),
|
1848
1840
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-flex-col bw-justify-between bw-w-full bw-items-end", children: [
|
1849
1841
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-2", children: [
|
1850
|
-
/* @__PURE__ */ l("div", { className: ` bw-relative bw-rounded-[50%] bw-w-[21px] bw-h-[21px] bw-border bw-border-border-primary ${
|
1851
|
-
|
1852
|
-
/* @__PURE__ */ l("div", { className: ` bw-absolute bw-bottom-[-30%] bw-right-[-15%] bw-rounded-[50%] bw-w-[12px] bw-h-[12px] bw-border bw-border-border-primary ${
|
1842
|
+
/* @__PURE__ */ l("div", { className: ` bw-relative bw-rounded-[50%] bw-w-[21px] bw-h-[21px] bw-border bw-border-border-primary ${n?.to?.image ? "bw-bg-background-secondary" : ""}`, children: [
|
1843
|
+
n.to?.image ? /* @__PURE__ */ e("img", { src: n.to.image, width: 20, height: 20, alt: "img", className: "bw-rounded-[50%] bw-max-w-[20px] bw-max-h-[20px] bw-object-contain" }) : /* @__PURE__ */ e("img", { src: x, width: 20, height: 20, alt: "img", className: "bw-rounded-[50%]" }),
|
1844
|
+
/* @__PURE__ */ l("div", { className: ` bw-absolute bw-bottom-[-30%] bw-right-[-15%] bw-rounded-[50%] bw-w-[12px] bw-h-[12px] bw-border bw-border-border-primary ${i?.image ? "bw-bg-background-secondary" : ""}`, children: [
|
1853
1845
|
" ",
|
1854
|
-
|
1846
|
+
i?.image ? /* @__PURE__ */ e("img", { src: i.image, width: 11, height: 11, className: "bw-rounded-[50%]", alt: "img" }) : /* @__PURE__ */ e("img", { src: x, width: 11, height: 11, className: "bw-rounded-[50%]", alt: "img" })
|
1855
1847
|
] })
|
1856
1848
|
] }),
|
1857
|
-
/* @__PURE__ */ e("p", { className: "bw-text-lg bw-break-words bw-font-medium bw-text-text-primary", children: /* @__PURE__ */ e(
|
1849
|
+
/* @__PURE__ */ e("p", { className: "bw-text-lg bw-break-words bw-font-medium bw-text-text-primary", children: /* @__PURE__ */ e(oe, { value: h, decimal: 12 }) })
|
1858
1850
|
] }),
|
1859
1851
|
/* @__PURE__ */ e("div", { className: "bw-flex bw-text-xs bw-font-normal bw-mb-2 bw-items-center bw-gap-x-1", children: /* @__PURE__ */ l("p", { className: "bw-text-text-secondary", children: [
|
1860
1852
|
"$",
|
1861
|
-
/* @__PURE__ */ e(
|
1853
|
+
/* @__PURE__ */ e(oe, { value: ((n.outputAmountDisplay || "") * c).toString() || "", decimal: 10 })
|
1862
1854
|
] }) }),
|
1863
1855
|
/* @__PURE__ */ l("div", { className: "bw-text-sm bw-flex bw-items-center bw-gap-x-2 bw-font-medium bw-text-text-secondary", children: [
|
1864
1856
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-text-sm bw-items-center bw-gap-x-1", children: [
|
1865
|
-
/* @__PURE__ */ e(
|
1866
|
-
/* @__PURE__ */ e("p", { children:
|
1857
|
+
/* @__PURE__ */ e(_e, { fill: "var(--tw-text-secondary)" }),
|
1858
|
+
/* @__PURE__ */ e("p", { children: n.estimatedTimeInSeconds >= 90 ? `${Math.round(E((n.estimatedTimeInSeconds || 60) / 60, 2)) || 0}min` : `${n?.estimatedTimeInSeconds || 60} secs` })
|
1867
1859
|
] }),
|
1868
|
-
/* @__PURE__ */ e(
|
1860
|
+
/* @__PURE__ */ e(Co, { item: n, gasImg: S, fromChain: w })
|
1869
1861
|
] })
|
1870
1862
|
] })
|
1871
1863
|
]
|
1872
1864
|
}
|
1873
1865
|
)
|
1874
1866
|
},
|
1875
|
-
|
1867
|
+
u
|
1876
1868
|
);
|
1877
1869
|
}) }) });
|
1878
1870
|
}
|
1879
|
-
const To =
|
1880
|
-
|
1881
|
-
const s = se((a) => a.configuration);
|
1871
|
+
const To = ke.memo(function({ maxOpSort: t, value: o }) {
|
1872
|
+
const a = H((c) => c.configuration);
|
1882
1873
|
return /* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-2", children: [
|
1883
1874
|
/* @__PURE__ */ e("div", { className: "bw-w-[16px] bw-h-[16px]", children: /* @__PURE__ */ e(
|
1884
|
-
|
1875
|
+
Ce,
|
1885
1876
|
{
|
1886
1877
|
fill: "var(--tw-background-container)",
|
1887
|
-
spinnerColor:
|
1888
|
-
stopColor:
|
1878
|
+
spinnerColor: a?.gradientStyle?.spinnerColor,
|
1879
|
+
stopColor: a?.gradientStyle?.stopColor
|
1889
1880
|
}
|
1890
1881
|
) }),
|
1891
1882
|
/* @__PURE__ */ e(
|
1892
1883
|
"span",
|
1893
1884
|
{
|
1894
|
-
className: `bw-text-xs ${
|
1885
|
+
className: `bw-text-xs ${o == 1 ? "bw-text-text-primary bw-font-medium" : "bw-text-text-secondary bw-font-medium"}`,
|
1895
1886
|
children: "Max Output"
|
1896
1887
|
}
|
1897
1888
|
),
|
1898
1889
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-gap-y-[2px] bw-items-center bw-flex-col bw-justify-center", children: [
|
1899
1890
|
/* @__PURE__ */ e(
|
1900
|
-
|
1891
|
+
De,
|
1901
1892
|
{
|
1902
|
-
isSelected:
|
1893
|
+
isSelected: t == "asc",
|
1903
1894
|
fill: "var(--tw-text-primary)"
|
1904
1895
|
}
|
1905
1896
|
),
|
1906
1897
|
/* @__PURE__ */ e(
|
1907
|
-
|
1898
|
+
Re,
|
1908
1899
|
{
|
1909
1900
|
fill: "var(--tw-text-primary)",
|
1910
|
-
isSelected:
|
1901
|
+
isSelected: t == "desc"
|
1911
1902
|
}
|
1912
1903
|
)
|
1913
1904
|
] })
|
1914
1905
|
] });
|
1915
|
-
}), Io =
|
1906
|
+
}), Io = ke.memo(function({ lowestGasSort: t, value: o }) {
|
1916
1907
|
return /* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-2", children: [
|
1917
|
-
/* @__PURE__ */ e("div", { className: "bw-w-[16px] bw-h-[16px]", children: /* @__PURE__ */ e(
|
1908
|
+
/* @__PURE__ */ e("div", { className: "bw-w-[16px] bw-h-[16px]", children: /* @__PURE__ */ e(Ne, { fill: "var(--tw-background-container)" }) }),
|
1918
1909
|
/* @__PURE__ */ e(
|
1919
1910
|
"span",
|
1920
1911
|
{
|
1921
|
-
className: `bw-text-xs ${
|
1912
|
+
className: `bw-text-xs ${o == 2 ? "bw-text-text-primary bw-font-medium" : "bw-text-text-secondary bw-font-medium"}`,
|
1922
1913
|
children: "Lowest Gas"
|
1923
1914
|
}
|
1924
1915
|
),
|
1925
1916
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-gap-y-[2px] bw-items-center bw-flex-col bw-justify-center", children: [
|
1926
1917
|
/* @__PURE__ */ e(
|
1927
|
-
|
1918
|
+
De,
|
1928
1919
|
{
|
1929
1920
|
fill: "var(--tw-text-primary)",
|
1930
|
-
isSelected:
|
1921
|
+
isSelected: t === "asc"
|
1931
1922
|
}
|
1932
1923
|
),
|
1933
1924
|
/* @__PURE__ */ e(
|
1934
|
-
|
1925
|
+
Re,
|
1935
1926
|
{
|
1936
1927
|
fill: "var(--tw-text-primary)",
|
1937
|
-
isSelected:
|
1928
|
+
isSelected: t === "desc"
|
1938
1929
|
}
|
1939
1930
|
)
|
1940
1931
|
] })
|
1941
1932
|
] });
|
1942
|
-
}), Eo =
|
1933
|
+
}), Eo = ke.memo(function({ fastestSort: t, value: o }) {
|
1943
1934
|
return /* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-2", children: [
|
1944
|
-
/* @__PURE__ */ e("div", { className: "bw-w-[16px] bw-h-[16px]", children: /* @__PURE__ */ e(
|
1935
|
+
/* @__PURE__ */ e("div", { className: "bw-w-[16px] bw-h-[16px]", children: /* @__PURE__ */ e(Te, { fill: "var(--tw-background-container)" }) }),
|
1945
1936
|
/* @__PURE__ */ e(
|
1946
1937
|
"span",
|
1947
1938
|
{
|
1948
|
-
className: `bw-text-xs ${
|
1939
|
+
className: `bw-text-xs ${o == 3 ? "bw-text-text-primary bw-font-medium" : "bw-text-text-secondary bw-font-medium"}`,
|
1949
1940
|
children: "Fastest"
|
1950
1941
|
}
|
1951
1942
|
),
|
1952
1943
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-gap-y-[2px] bw-items-center bw-flex-col bw-justify-center", children: [
|
1953
1944
|
/* @__PURE__ */ e(
|
1954
|
-
|
1945
|
+
De,
|
1955
1946
|
{
|
1956
1947
|
fill: "var(--tw-text-primary)",
|
1957
|
-
isSelected:
|
1948
|
+
isSelected: t === "asc"
|
1958
1949
|
}
|
1959
1950
|
),
|
1960
1951
|
/* @__PURE__ */ e(
|
1961
|
-
|
1952
|
+
Re,
|
1962
1953
|
{
|
1963
1954
|
fill: "var(--tw-text-primary)",
|
1964
|
-
isSelected:
|
1955
|
+
isSelected: t === "desc"
|
1965
1956
|
}
|
1966
1957
|
)
|
1967
1958
|
] })
|
1968
1959
|
] });
|
1969
1960
|
});
|
1970
1961
|
function Oo({
|
1971
|
-
routes:
|
1972
|
-
handleShowAllRoutes:
|
1973
|
-
handleRoutesData:
|
1974
|
-
convertVal:
|
1975
|
-
fromChain:
|
1976
|
-
toChain:
|
1962
|
+
routes: t,
|
1963
|
+
handleShowAllRoutes: o,
|
1964
|
+
handleRoutesData: a,
|
1965
|
+
convertVal: c,
|
1966
|
+
fromChain: w,
|
1967
|
+
toChain: s
|
1977
1968
|
}) {
|
1978
|
-
const [
|
1979
|
-
function
|
1980
|
-
|
1969
|
+
const [i, S] = U("1"), [x, C] = U("none"), [O, n] = U("none"), [u, f] = U("none"), v = H((b) => b.configuration);
|
1970
|
+
function h(b, g) {
|
1971
|
+
S(g);
|
1981
1972
|
}
|
1982
|
-
return /* @__PURE__ */ l(
|
1973
|
+
return /* @__PURE__ */ l(pt, { value: i, children: [
|
1983
1974
|
/* @__PURE__ */ e(
|
1984
1975
|
_t,
|
1985
1976
|
{
|
1986
|
-
sx: (
|
1977
|
+
sx: (b) => ({
|
1987
1978
|
borderBottom: 1,
|
1988
1979
|
borderColor: "var(--tw-border-primary)",
|
1989
1980
|
width: "max-content",
|
1990
|
-
[
|
1981
|
+
[b.breakpoints.down("sm")]: { width: "100%", overflowX: "auto" },
|
1991
1982
|
marginX: "auto"
|
1992
1983
|
}),
|
1993
1984
|
children: /* @__PURE__ */ l(
|
1994
|
-
|
1985
|
+
xt,
|
1995
1986
|
{
|
1996
1987
|
TabIndicatorProps: {
|
1997
1988
|
style: { background: "var(--tw-text-secondary)" }
|
1998
1989
|
},
|
1999
|
-
sx: (
|
1990
|
+
sx: (b) => ({
|
2000
1991
|
width: "max-content",
|
2001
|
-
[
|
1992
|
+
[b.breakpoints.down("sm")]: {
|
2002
1993
|
width: "100%",
|
2003
1994
|
overflowX: "auto"
|
2004
1995
|
}
|
2005
1996
|
}),
|
2006
|
-
onChange:
|
1997
|
+
onChange: h,
|
2007
1998
|
"aria-label": "lab API tabs example",
|
2008
1999
|
children: [
|
2009
2000
|
/* @__PURE__ */ e(
|
2010
|
-
|
2001
|
+
fe,
|
2011
2002
|
{
|
2012
2003
|
onClick: () => {
|
2013
|
-
if (
|
2014
|
-
|
2004
|
+
if (i == "1")
|
2005
|
+
C((b) => b == "none" ? "asc" : b === "asc" ? "desc" : "none");
|
2015
2006
|
else return !0;
|
2016
2007
|
},
|
2017
2008
|
disableRipple: !0,
|
2018
|
-
sx: (
|
2019
|
-
|
2020
|
-
|
2021
|
-
|
2022
|
-
|
2023
|
-
|
2024
|
-
|
2025
|
-
|
2026
|
-
|
2027
|
-
|
2028
|
-
|
2029
|
-
|
2030
|
-
};
|
2031
|
-
},
|
2032
|
-
label: /* @__PURE__ */ e(To, { maxOpSort: h, value: c }),
|
2009
|
+
sx: (b) => ({
|
2010
|
+
textTransform: "none",
|
2011
|
+
paddingBottom: "0px",
|
2012
|
+
fontFamily: v?.customTheme?.fontFamily || "lato",
|
2013
|
+
width: "120px",
|
2014
|
+
paddingX: "5px",
|
2015
|
+
[b.breakpoints.down("sm")]: {
|
2016
|
+
minWidth: "33%",
|
2017
|
+
paddingX: "auto"
|
2018
|
+
}
|
2019
|
+
}),
|
2020
|
+
label: /* @__PURE__ */ e(To, { maxOpSort: x, value: i }),
|
2033
2021
|
value: "1"
|
2034
2022
|
}
|
2035
2023
|
),
|
2036
2024
|
/* @__PURE__ */ e(
|
2037
|
-
|
2025
|
+
fe,
|
2038
2026
|
{
|
2039
2027
|
onClick: () => {
|
2040
|
-
if (
|
2041
|
-
|
2028
|
+
if (i == "2")
|
2029
|
+
n((b) => b == "none" ? "asc" : b === "asc" ? "desc" : "none");
|
2042
2030
|
else return !0;
|
2043
2031
|
},
|
2044
2032
|
disableRipple: !0,
|
2045
|
-
sx: (
|
2046
|
-
|
2047
|
-
|
2048
|
-
|
2049
|
-
|
2050
|
-
|
2051
|
-
|
2052
|
-
|
2053
|
-
|
2054
|
-
|
2055
|
-
|
2056
|
-
|
2057
|
-
|
2058
|
-
|
2059
|
-
};
|
2060
|
-
},
|
2061
|
-
label: /* @__PURE__ */ e(Io, { lowestGasSort: $, value: c }),
|
2033
|
+
sx: (b) => ({
|
2034
|
+
textTransform: "none",
|
2035
|
+
paddingBottom: "0px",
|
2036
|
+
fontFamily: v?.customTheme?.fontFamily || "lato",
|
2037
|
+
width: "120px",
|
2038
|
+
paddingX: "5px",
|
2039
|
+
paddingLeft: "10px",
|
2040
|
+
[b.breakpoints.down("sm")]: {
|
2041
|
+
minWidth: "33%",
|
2042
|
+
paddingX: "auto",
|
2043
|
+
paddingLeft: "auto"
|
2044
|
+
}
|
2045
|
+
}),
|
2046
|
+
label: /* @__PURE__ */ e(Io, { lowestGasSort: O, value: i }),
|
2062
2047
|
value: "2"
|
2063
2048
|
}
|
2064
2049
|
),
|
2065
2050
|
/* @__PURE__ */ e(
|
2066
|
-
|
2051
|
+
fe,
|
2067
2052
|
{
|
2068
2053
|
onClick: () => {
|
2069
|
-
if (
|
2070
|
-
|
2054
|
+
if (i == "3")
|
2055
|
+
f((b) => b == "none" ? "asc" : b === "asc" ? "desc" : "none");
|
2071
2056
|
else return !0;
|
2072
2057
|
},
|
2073
2058
|
disableRipple: !0,
|
2074
|
-
sx: (
|
2075
|
-
|
2076
|
-
|
2077
|
-
|
2078
|
-
|
2079
|
-
|
2080
|
-
|
2081
|
-
|
2082
|
-
|
2083
|
-
|
2084
|
-
|
2085
|
-
|
2086
|
-
};
|
2087
|
-
},
|
2088
|
-
label: /* @__PURE__ */ e(Eo, { fastestSort: I, value: c }),
|
2059
|
+
sx: (b) => ({
|
2060
|
+
textTransform: "none",
|
2061
|
+
paddingBottom: "0px",
|
2062
|
+
fontFamily: v?.customTheme?.fontFamily || "lato",
|
2063
|
+
width: "110px",
|
2064
|
+
paddingX: "5px",
|
2065
|
+
[b.breakpoints.down("sm")]: {
|
2066
|
+
minWidth: "33%",
|
2067
|
+
paddingX: "auto"
|
2068
|
+
}
|
2069
|
+
}),
|
2070
|
+
label: /* @__PURE__ */ e(Eo, { fastestSort: u, value: i }),
|
2089
2071
|
value: "3"
|
2090
2072
|
}
|
2091
2073
|
)
|
@@ -2095,73 +2077,72 @@ function Oo({
|
|
2095
2077
|
}
|
2096
2078
|
),
|
2097
2079
|
/* @__PURE__ */ e(
|
2098
|
-
|
2080
|
+
he,
|
2099
2081
|
{
|
2100
2082
|
sx: { paddingLeft: "0px", paddingRight: "0px", paddingTop: "10px" },
|
2101
2083
|
value: "1",
|
2102
2084
|
children: /* @__PURE__ */ e(
|
2103
2085
|
vo,
|
2104
2086
|
{
|
2105
|
-
routes:
|
2106
|
-
handleRoutesData:
|
2107
|
-
handleShowAllRoutes:
|
2108
|
-
convertVal:
|
2109
|
-
fromChain:
|
2110
|
-
sort:
|
2111
|
-
toChain:
|
2087
|
+
routes: t,
|
2088
|
+
handleRoutesData: a,
|
2089
|
+
handleShowAllRoutes: o,
|
2090
|
+
convertVal: c,
|
2091
|
+
fromChain: w,
|
2092
|
+
sort: x,
|
2093
|
+
toChain: s
|
2112
2094
|
}
|
2113
2095
|
)
|
2114
2096
|
}
|
2115
2097
|
),
|
2116
2098
|
/* @__PURE__ */ e(
|
2117
|
-
|
2099
|
+
he,
|
2118
2100
|
{
|
2119
2101
|
sx: { paddingLeft: "0px", paddingRight: "0px", paddingTop: "10px" },
|
2120
2102
|
value: "2",
|
2121
2103
|
children: /* @__PURE__ */ e(
|
2122
2104
|
So,
|
2123
2105
|
{
|
2124
|
-
routes:
|
2125
|
-
handleRoutesData:
|
2126
|
-
handleShowAllRoutes:
|
2127
|
-
convertVal:
|
2128
|
-
fromChain:
|
2129
|
-
sort:
|
2130
|
-
toChain:
|
2106
|
+
routes: t,
|
2107
|
+
handleRoutesData: a,
|
2108
|
+
handleShowAllRoutes: o,
|
2109
|
+
convertVal: c,
|
2110
|
+
fromChain: w,
|
2111
|
+
sort: O,
|
2112
|
+
toChain: s
|
2131
2113
|
}
|
2132
2114
|
)
|
2133
2115
|
}
|
2134
2116
|
),
|
2135
2117
|
/* @__PURE__ */ e(
|
2136
|
-
|
2118
|
+
he,
|
2137
2119
|
{
|
2138
2120
|
sx: { paddingLeft: "0px", paddingRight: "0px", paddingTop: "10px" },
|
2139
2121
|
value: "3",
|
2140
2122
|
children: /* @__PURE__ */ e(
|
2141
|
-
|
2123
|
+
No,
|
2142
2124
|
{
|
2143
|
-
routes:
|
2144
|
-
handleRoutesData:
|
2145
|
-
handleShowAllRoutes:
|
2146
|
-
convertVal:
|
2147
|
-
fromChain:
|
2148
|
-
sort:
|
2149
|
-
toChain:
|
2125
|
+
routes: t,
|
2126
|
+
handleRoutesData: a,
|
2127
|
+
handleShowAllRoutes: o,
|
2128
|
+
convertVal: c,
|
2129
|
+
fromChain: w,
|
2130
|
+
sort: u,
|
2131
|
+
toChain: s
|
2150
2132
|
}
|
2151
2133
|
)
|
2152
2134
|
}
|
2153
2135
|
)
|
2154
2136
|
] });
|
2155
2137
|
}
|
2156
|
-
function Bo({ fill1:
|
2138
|
+
function Bo({ fill1: t, fill2: o }) {
|
2157
2139
|
return /* @__PURE__ */ l("svg", { width: "25", height: "25", viewBox: "0 0 25 25", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
2158
|
-
/* @__PURE__ */ e("circle", { cx: "12.4758", cy: "12.4774", r: "11.9774", transform: "rotate(90 12.4758 12.4774)", stroke:
|
2159
|
-
/* @__PURE__ */ e("path", { d: "M14.4375 6.27832L8.45786 12.258L14.4122 18.2121", stroke:
|
2140
|
+
/* @__PURE__ */ e("circle", { cx: "12.4758", cy: "12.4774", r: "11.9774", transform: "rotate(90 12.4758 12.4774)", stroke: t }),
|
2141
|
+
/* @__PURE__ */ e("path", { d: "M14.4375 6.27832L8.45786 12.258L14.4122 18.2121", stroke: o, "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })
|
2160
2142
|
] });
|
2161
2143
|
}
|
2162
|
-
function zo({ routes:
|
2163
|
-
|
2164
|
-
const a = se((I) => I.fromChain), c = se((I) => I.fromCoin), w = se((I) => I.toChain), { defaultCoin: h } = Ce;
|
2144
|
+
function zo({ routes: t, handleShowAllRoutes: o, handleRoutesData: a, convertVal: c, amount: w }) {
|
2145
|
+
const s = H((C) => C.fromChain), i = H((C) => C.fromCoin), S = H((C) => C.toChain), { defaultCoin: x } = ge;
|
2165
2146
|
return /* @__PURE__ */ l("div", { children: [
|
2166
2147
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-w-full bw-relative bw-justify-between bw-mb-2", children: [
|
2167
2148
|
/* @__PURE__ */ l("div", { className: "bw-flex bw-items-start bw-gap-x-3", children: [
|
@@ -2169,7 +2150,7 @@ function zo({ routes: o, handleShowAllRoutes: n, handleRoutesData: s, convertVal
|
|
2169
2150
|
"button",
|
2170
2151
|
{
|
2171
2152
|
onClick: () => {
|
2172
|
-
|
2153
|
+
o();
|
2173
2154
|
},
|
2174
2155
|
className: "bw-mt-1",
|
2175
2156
|
children: /* @__PURE__ */ e(Bo, { fill1: "var(--tw-background-secondary)", fill2: "var(--tw-text-secondary)" })
|
@@ -2177,31 +2158,31 @@ function zo({ routes: o, handleShowAllRoutes: n, handleRoutesData: s, convertVal
|
|
2177
2158
|
),
|
2178
2159
|
/* @__PURE__ */ l("div", { className: "bw-text-lg bw-font-normal bw-text-text-secondary", children: [
|
2179
2160
|
/* @__PURE__ */ l("div", { className: "", children: [
|
2180
|
-
/* @__PURE__ */ e("span", { className: "", children:
|
2161
|
+
/* @__PURE__ */ e("span", { className: "", children: t.data?.data?.quotes?.length || 0 }),
|
2181
2162
|
" Routes For"
|
2182
2163
|
] }),
|
2183
2164
|
" ",
|
2184
|
-
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-bold bw-mt-2", children: `${
|
2165
|
+
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-bold bw-mt-2", children: `${i?.coin} on ${s?.chain}` })
|
2185
2166
|
] })
|
2186
2167
|
] }),
|
2187
2168
|
/* @__PURE__ */ l("div", { className: " bw-flex bw-items-center bw-gap-x-2", children: [
|
2188
2169
|
/* @__PURE__ */ l("div", { children: [
|
2189
|
-
/* @__PURE__ */ e("p", { className: "bw-text-2xl bw-font-bold bw-mb-2 bw-leading-none bw-text-right bw-text-text-primary", children:
|
2170
|
+
/* @__PURE__ */ e("p", { className: "bw-text-2xl bw-font-bold bw-mb-2 bw-leading-none bw-text-right bw-text-text-primary", children: w }),
|
2190
2171
|
/* @__PURE__ */ l("p", { className: "bw-text-sm bw-font-bold bw-text-right bw-text-text-secondary", children: [
|
2191
2172
|
"$",
|
2192
|
-
|
2173
|
+
me(w * i?.lastPrice || 0, 10)
|
2193
2174
|
] })
|
2194
2175
|
] }),
|
2195
2176
|
/* @__PURE__ */ l("div", { className: " bw-bg-background-secondary bw-flex bw-justify-center bw-items-center bw-mb-2 bw-relative bw-rounded-[50%] bw-w-[35px] bw-h-[35px] bw-border bw-border-border-primary", children: [
|
2196
|
-
|
2177
|
+
i?.image ? /* @__PURE__ */ e("img", { src: i.image, width: 34, height: 34, alt: "img", className: "bw-rounded-[50%] bw-max-w-[34px] bw-max-h-[34px] bw-object-contain bw-min-w-[34px] bw-h-[34px]" }) : /* @__PURE__ */ e("img", { src: x, width: 34, height: 34, alt: "img", className: "bw-rounded-[50%] bw-min-w-[34px] bw-h-[34px]" }),
|
2197
2178
|
/* @__PURE__ */ l("div", { className: "bw-bg-background-secondary bw-absolute bw-bottom-[-30%] bw-right-4 bw-rounded-[50%] bw-w-[19px] bw-h-[19px] bw-border bw-border-border-primary", children: [
|
2198
2179
|
" ",
|
2199
|
-
|
2180
|
+
i?.image ? /* @__PURE__ */ e("img", { src: s.image, width: 18, height: 18, className: "bw-rounded-[50%]", alt: "img" }) : /* @__PURE__ */ e("img", { src: x, width: 18, height: 18, className: "bw-rounded-[50%]", alt: "img" })
|
2200
2181
|
] })
|
2201
2182
|
] })
|
2202
2183
|
] })
|
2203
2184
|
] }),
|
2204
|
-
/* @__PURE__ */ e(Oo, { routes:
|
2185
|
+
/* @__PURE__ */ e(Oo, { routes: t, handleShowAllRoutes: o, handleRoutesData: a, convertVal: c, fromChain: s, toChain: S })
|
2205
2186
|
] });
|
2206
2187
|
}
|
2207
2188
|
export {
|