@xswap-link/sdk 0.15.1 → 0.15.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/.eslintrc.json +1 -0
- package/CHANGELOG.md +10 -0
- package/README.md +22 -4
- package/dist/index.d.mts +47 -1
- package/dist/index.d.ts +47 -1
- package/dist/index.global.js +89 -89
- package/dist/index.js +1018 -766
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +911 -659
- package/dist/index.mjs.map +1 -1
- package/example/index.html +12 -0
- package/example/package.json +24 -0
- package/example/pnpm-lock.yaml +1164 -0
- package/example/src/App.tsx +421 -0
- package/example/src/main.tsx +8 -0
- package/example/vite.config.ts +9 -0
- package/package.json +1 -1
- package/src/components/Swap/SwapView/ConfirmationView/TxOverview/index.tsx +12 -7
- package/src/components/Swap/SwapView/ConfirmationView/TxProgress/index.tsx +136 -0
- package/src/components/Swap/SwapView/ConfirmationView/TxResult/index.tsx +89 -8
- package/src/components/Swap/SwapView/ConfirmationView/index.tsx +19 -4
- package/src/components/Swap/SwapView/FeesPanel/Fees/index.tsx +11 -5
- package/src/context/SwapProvider.tsx +22 -7
- package/src/context/TxUIWrapper.tsx +34 -3
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useCrossChainDelivery.ts +143 -0
- package/src/models/Route.ts +13 -0
- package/src/models/TransactionDelivery.ts +40 -0
- package/src/models/index.ts +1 -0
- package/src/services/api.ts +23 -0
package/dist/index.mjs
CHANGED
|
@@ -17402,7 +17402,7 @@ var sortChains = (chains, disabledChainIds) => [...chains].map((chain) => ({
|
|
|
17402
17402
|
import { createRoot } from "react-dom/client";
|
|
17403
17403
|
|
|
17404
17404
|
// src/components/global.css
|
|
17405
|
-
var global_default = `/* ! tailwindcss v3.4.4 | MIT License | https://tailwindcss.com */*,::before,::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}::before,::after{--tw-content:''}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--font-family,'Satoshi',Tahoma,Verdana,ui-sans-serif);font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type='button']),input:where([type='reset']),input:where([type='submit']){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type='search']{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder, textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role="button"]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::before,::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x:;--tw-pan-y:;--tw-pinch-zoom:;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position:;--tw-gradient-via-position:;--tw-gradient-to-position:;--tw-ordinal:;--tw-slashed-zero:;--tw-numeric-figure:;--tw-numeric-spacing:;--tw-numeric-fraction:;--tw-ring-inset:;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur:;--tw-brightness:;--tw-contrast:;--tw-grayscale:;--tw-hue-rotate:;--tw-invert:;--tw-saturate:;--tw-sepia:;--tw-drop-shadow:;--tw-backdrop-blur:;--tw-backdrop-brightness:;--tw-backdrop-contrast:;--tw-backdrop-grayscale:;--tw-backdrop-hue-rotate:;--tw-backdrop-invert:;--tw-backdrop-opacity:;--tw-backdrop-saturate:;--tw-backdrop-sepia:;--tw-contain-size:;--tw-contain-layout:;--tw-contain-paint:;--tw-contain-style:}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x:;--tw-pan-y:;--tw-pinch-zoom:;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position:;--tw-gradient-via-position:;--tw-gradient-to-position:;--tw-ordinal:;--tw-slashed-zero:;--tw-numeric-figure:;--tw-numeric-spacing:;--tw-numeric-fraction:;--tw-ring-inset:;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur:;--tw-brightness:;--tw-contrast:;--tw-grayscale:;--tw-hue-rotate:;--tw-invert:;--tw-saturate:;--tw-sepia:;--tw-drop-shadow:;--tw-backdrop-blur:;--tw-backdrop-brightness:;--tw-backdrop-contrast:;--tw-backdrop-grayscale:;--tw-backdrop-hue-rotate:;--tw-backdrop-invert:;--tw-backdrop-opacity:;--tw-backdrop-saturate:;--tw-backdrop-sepia:;--tw-contain-size:;--tw-contain-layout:;--tw-contain-paint:;--tw-contain-style:}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.gradient-sections-separator-container{background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from:transparent var(--tw-gradient-from-position);--tw-gradient-to:rgb(0 0 0/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),color-mix(in srgb,var(--bg-tertiary) calc(0.1 * 100%),transparent) var(--tw-gradient-via-position),var(--tw-gradient-to);--tw-gradient-to:transparent var(--tw-gradient-to-position)}.x-border{border-width:1px;border-style:solid;border-color:color-mix(in srgb,var(--text-primary) calc(var(--tw-border-opacity) * 100%),transparent);--tw-border-opacity:0.1}.swap-panel-gradient-border{position:relative}.swap-panel-gradient-border::before,.swap-panel-gradient-border::after{content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none}.swap-panel-gradient-border::before{background:linear-gradient(90deg,color-mix(in srgb,var(--text-primary) 2.5%,transparent),color-mix(in srgb,var(--text-primary) 5%,transparent))}.swap-panel-gradient-border::after{background:linear-gradient(90deg,color-mix(in srgb,var(--text-primary) 5%,transparent),color-mix(in srgb,var(--text-primary) 7.5%,transparent));opacity:0;transition:opacity 0.15s ease}.swap-panel-gradient-border:hover::after{opacity:1}.network-dropdown-surface{background:linear-gradient(90deg,color-mix(in srgb,var(--bg-primary) 20%,transparent) 0%,color-mix(in srgb,var(--bg-primary) 20%,transparent) 100%),linear-gradient(180deg,color-mix(in srgb,var(--bg-tertiary) 4%,transparent) 0%,color-mix(in srgb,var(--bg-tertiary) 2%,transparent) 49.5%,color-mix(in srgb,var(--bg-tertiary) 4%,transparent) 100%),var(--bg-secondary)}.network-dropdown-row:hover,.network-dropdown-row-active{background:linear-gradient(90deg,transparent 0%,color-mix(in srgb,var(--bg-tertiary) 0.5%,transparent) 15%,color-mix(in srgb,var(--bg-tertiary) 2.5%,transparent) 50%,color-mix(in srgb,var(--bg-tertiary) 0.5%,transparent) 85%,transparent 100%)}.tx-modal-glow-success{background:radial-gradient(120% 60% at 0% 0%,rgba(76,175,80,0.25) 0%,transparent 45%)}.tx-modal-glow-error{background:radial-gradient(120% 60% at 0% 0%,rgba(244,67,54,0.25) 0%,transparent 45%)}.btn{position:relative;z-index:1;margin:0px;-webkit-appearance:none;-moz-appearance:none;appearance:none;white-space:nowrap;border-style:none;background-color:transparent;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.btn:hover{cursor:pointer}.btn-disabled{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity));opacity:0.5}.btn-disabled:hover{cursor:not-allowed}.btn--full-width{width:100%}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0px}.inset-x-0{left:0px;right:0px}.-right-2{right:-0.5rem}.bottom-0{bottom:0px}.bottom-5{bottom:1.25rem}.left-0{left:0px}.left-1\\/2{left:50%}.right-0{right:0px}.right-2{right:0.5rem}.top-0{top:0px}.top-\\[calc\\(100\\%\\+8px\\)\\]{top:calc(100% + 8px)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.m-0{margin:0px}.mx-0{margin-left:0px;margin-right:0px}.mx-1{margin-left:0.25rem;margin-right:0.25rem}.mx-1\\.5{margin-left:0.375rem;margin-right:0.375rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:0.25rem;margin-bottom:0.25rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.-mr-1{margin-right:-0.25rem}.-mr-1\\.5{margin-right:-0.375rem}.-mr-2{margin-right:-0.5rem}.mb-1{margin-bottom:0.25rem}.mb-2{margin-bottom:0.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:0.25rem}.ml-1\\.5{margin-left:0.375rem}.mr-1{margin-right:0.25rem}.mr-2{margin-right:0.5rem}.mt-2{margin-top:0.5rem}.box-border{box-sizing:border-box}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-0{height:0px}.h-0\\.5{height:0.125rem}.h-1{height:0.25rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-3{height:0.75rem}.h-3\\.5{height:0.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\\[11px\\]{height:11px}.h-\\[12px\\]{height:12px}.h-\\[14px\\]{height:14px}.h-\\[16px\\]{height:16px}.h-\\[18px\\]{height:18px}.h-\\[20px\\]{height:20px}.h-\\[214px\\]{height:214px}.h-\\[32px\\]{height:32px}.h-\\[34px\\]{height:34px}.h-\\[72px\\]{height:72px}.h-\\[85vh\\]{height:85vh}.h-full{height:100%}.h-px{height:1px}.max-h-full{max-height:100%}.min-h-0{min-height:0px}.min-h-11{min-height:2.75rem}.min-h-6{min-height:1.5rem}.min-h-\\[320px\\]{min-height:320px}.min-h-\\[43px\\]{min-height:43px}.min-h-\\[532px\\]{min-height:532px}.w-0{width:0px}.w-0\\.5{width:0.125rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-20{width:5rem}.w-3{width:0.75rem}.w-3\\.5{width:0.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\\[100px\\]{width:100px}.w-\\[11px\\]{width:11px}.w-\\[14px\\]{width:14px}.w-\\[150px\\]{width:150px}.w-\\[18px\\]{width:18px}.w-\\[296px\\]{width:296px}.w-\\[34px\\]{width:34px}.w-\\[48px\\]{width:48px}.w-\\[60px\\]{width:60px}.w-\\[80px\\]{width:80px}.w-full{width:100%}.w-x_modal{width:var(--modal-width)}.min-w-0{min-width:0px}.min-w-10{min-width:2.5rem}.min-w-9{min-width:2.25rem}.min-w-\\[108px\\]{min-width:108px}.min-w-\\[340px\\]{min-width:340px}.min-w-x_modal{min-width:var(--modal-width,340px)}.max-w-80{max-width:20rem}.max-w-\\[120px\\]{max-width:120px}.max-w-\\[500px\\]{max-width:500px}.max-w-\\[var\\(--modal-width\\2c 588px\\)\\]{max-width:var(--modal-width,588px)}.max-w-x_modal{max-width:var(--modal-width,620px)}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x:-100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y:-100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x:1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(0.4,0,0.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin-slow{animation:spin 3s linear infinite}.\\!cursor-not-allowed{cursor:not-allowed !important}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\\.5{gap:0.125rem}.gap-1{gap:0.25rem}.gap-1\\.5{gap:0.375rem}.gap-2{gap:0.5rem}.gap-2\\.5{gap:0.625rem}.gap-3{gap:0.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-x-1{-moz-column-gap:0.25rem;column-gap:0.25rem}.gap-y-2{row-gap:0.5rem}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-nowrap{text-wrap:nowrap}.\\!rounded-\\[10px\\]{border-radius:10px !important}.rounded{border-radius:0.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[32px\\]{border-radius:32px}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:0.5rem}.rounded-md{border-radius:0.375rem}.rounded-xl{border-radius:0.75rem}.rounded-b-none{border-bottom-right-radius:0px;border-bottom-left-radius:0px}.rounded-t-\\[24px\\]{border-top-left-radius:24px;border-top-right-radius:24px}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-none{border-style:none}.border-t_bg_secondary{--tw-border-opacity:1;border-color:color-mix(in srgb,var(--bg-secondary) calc(var(--tw-border-opacity) * 100%),transparent)}.border-t_error_dark{--tw-border-opacity:1;border-color:color-mix(in srgb,var(--error-dark) calc(var(--tw-border-opacity) * 100%),transparent)}.border-t_main_accent_dark{--tw-border-opacity:1;border-color:color-mix(in srgb,var(--main-accent-dark) calc(var(--tw-border-opacity) * 100%),transparent)}.border-t_main_accent_light{--tw-border-opacity:1;border-color:color-mix(in srgb,var(--main-accent-light) calc(var(--tw-border-opacity) * 100%),transparent)}.border-t_main_accent_light\\/60{border-color:color-mix(in srgb,var(--main-accent-light) calc(0.6 * 100%),transparent)}.border-t_success_dark{--tw-border-opacity:1;border-color:color-mix(in srgb,var(--success-dark) calc(var(--tw-border-opacity) * 100%),transparent)}.border-t_text_primary{--tw-border-opacity:1;border-color:color-mix(in srgb,var(--text-primary) calc(var(--tw-border-opacity) * 100%),transparent)}.border-t_warning_dark{--tw-border-opacity:1;border-color:color-mix(in srgb,var(--warning-dark) calc(var(--tw-border-opacity) * 100%),transparent)}.border-x_alert{--tw-border-opacity:1;border-color:rgb(255 183 77/var(--tw-border-opacity))}.border-opacity-10{--tw-border-opacity:0.1}.border-opacity-20{--tw-border-opacity:0.2}.border-opacity-5{--tw-border-opacity:0.05}.border-opacity-50{--tw-border-opacity:0.5}.\\!bg-t_bg_tertiary{--tw-bg-opacity:1 !important;background-color:color-mix(in srgb,var(--bg-tertiary) calc(var(--tw-bg-opacity) * 100%),transparent) !important}.bg-\\[rgba\\(0\\2c 0\\2c 0\\2c 0\\.8\\)\\]{background-color:rgba(0,0,0,0.8)}.bg-\\[rgba\\(2\\2c 2\\2c 2\\2c 0\\.8\\)\\]{background-color:rgba(2,2,2,0.8)}.bg-\\[rgba\\(40\\2c 40\\2c 40\\2c 0\\.15\\)\\]{background-color:rgba(40,40,40,0.15)}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-t_bg_primary{--tw-bg-opacity:1;background-color:color-mix(in srgb,var(--bg-primary) calc(var(--tw-bg-opacity) * 100%),transparent)}.bg-t_bg_secondary{--tw-bg-opacity:1;background-color:color-mix(in srgb,var(--bg-secondary) calc(var(--tw-bg-opacity) * 100%),transparent)}.bg-t_bg_tertiary{--tw-bg-opacity:1;background-color:color-mix(in srgb,var(--bg-tertiary) calc(var(--tw-bg-opacity) * 100%),transparent)}.bg-t_button_pr_off_bg{--tw-bg-opacity:1;background-color:color-mix(in srgb,var(--button-pr-off-bg) calc(var(--tw-bg-opacity) * 100%),transparent)}.bg-t_text_green{--tw-bg-opacity:1;background-color:color-mix(in srgb,var(--text-green) calc(var(--tw-bg-opacity) * 100%),transparent)}.bg-t_text_orange{--tw-bg-opacity:1;background-color:color-mix(in srgb,var(--text-orange) calc(var(--tw-bg-opacity) * 100%),transparent)}.bg-t_text_primary{--tw-bg-opacity:1;background-color:color-mix(in srgb,var(--text-primary) calc(var(--tw-bg-opacity) * 100%),transparent)}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.\\!bg-opacity-10{--tw-bg-opacity:0.1 !important}.bg-opacity-10{--tw-bg-opacity:0.1}.bg-opacity-15{--tw-bg-opacity:0.15}.bg-opacity-5{--tw-bg-opacity:0.05}.bg-opacity-50{--tw-bg-opacity:0.5}.bg-opacity-75{--tw-bg-opacity:0.75}.bg-opacity-80{--tw-bg-opacity:0.8}.bg-opacity-\\[0\\.02\\]{--tw-bg-opacity:0.02}.bg-opacity-\\[0\\.03\\]{--tw-bg-opacity:0.03}.bg-opacity-\\[0\\.04\\]{--tw-bg-opacity:0.04}.bg-opacity-\\[0\\.07\\]{--tw-bg-opacity:0.07}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-t_bg_primary\\/\\[0\\.65\\]{--tw-gradient-from:color-mix(in srgb,var(--bg-primary) calc(0.65 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_bg_secondary\\/50{--tw-gradient-from:color-mix(in srgb,var(--bg-secondary) calc(0.5 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_bg_secondary\\/65{--tw-gradient-from:color-mix(in srgb,var(--bg-secondary) calc(0.65 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_bg_tertiary\\/0{--tw-gradient-from:color-mix(in srgb,var(--bg-tertiary) calc(0 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_bg_tertiary\\/10{--tw-gradient-from:color-mix(in srgb,var(--bg-tertiary) calc(0.1 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_bg_tertiary\\/5{--tw-gradient-from:color-mix(in srgb,var(--bg-tertiary) calc(0.05 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_bg_tertiary\\/\\[0\\.01\\]{--tw-gradient-from:color-mix(in srgb,var(--bg-tertiary) calc(0.01 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_bg_tertiary\\/\\[0\\.02\\]{--tw-gradient-from:color-mix(in srgb,var(--bg-tertiary) calc(0.02 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_bg_tertiary\\/\\[0\\.03\\]{--tw-gradient-from:color-mix(in srgb,var(--bg-tertiary) calc(0.03 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_error_dark\\/15{--tw-gradient-from:color-mix(in srgb,var(--error-dark) calc(0.15 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_main_accent_light{--tw-gradient-from:color-mix(in srgb,var(--main-accent-light) calc(1 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:color-mix(in srgb,var(--main-accent-light) calc(0 * 100%),transparent) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_main_accent_light\\/10{--tw-gradient-from:color-mix(in srgb,var(--main-accent-light) calc(0.1 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_main_accent_light\\/20{--tw-gradient-from:color-mix(in srgb,var(--main-accent-light) calc(0.2 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_main_accent_light\\/25{--tw-gradient-from:color-mix(in srgb,var(--main-accent-light) calc(0.25 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_success_light\\/20{--tw-gradient-from:color-mix(in srgb,var(--success-light) calc(0.2 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_warning_dark\\/15{--tw-gradient-from:color-mix(in srgb,var(--warning-dark) calc(0.15 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-transparent{--tw-gradient-from:transparent var(--tw-gradient-from-position);--tw-gradient-to:rgb(0 0 0/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-x_blue_light{--tw-gradient-from:rgba(54,129,198,1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(54,129,198,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-x_blue_light\\/25{--tw-gradient-from:rgba(54,129,198,0.25) var(--tw-gradient-from-position);--tw-gradient-to:rgba(54,129,198,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-50\\%{--tw-gradient-from-position:50%}.via-t_bg_tertiary\\/5{--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),color-mix(in srgb,var(--bg-tertiary) calc(0.05 * 100%),transparent) var(--tw-gradient-via-position),var(--tw-gradient-to)}.to-t_bg_secondary\\/0{--tw-gradient-to:color-mix(in srgb,var(--bg-secondary) calc(0 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_bg_secondary\\/15{--tw-gradient-to:color-mix(in srgb,var(--bg-secondary) calc(0.15 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_bg_secondary\\/50{--tw-gradient-to:color-mix(in srgb,var(--bg-secondary) calc(0.5 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_bg_tertiary\\/0{--tw-gradient-to:color-mix(in srgb,var(--bg-tertiary) calc(0 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_bg_tertiary\\/5{--tw-gradient-to:color-mix(in srgb,var(--bg-tertiary) calc(0.05 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_bg_tertiary\\/\\[0\\.01\\]{--tw-gradient-to:color-mix(in srgb,var(--bg-tertiary) calc(0.01 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_bg_tertiary\\/\\[0\\.02\\]{--tw-gradient-to:color-mix(in srgb,var(--bg-tertiary) calc(0.02 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_bg_tertiary\\/\\[0\\.03\\]{--tw-gradient-to:color-mix(in srgb,var(--bg-tertiary) calc(0.03 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_bg_tertiary\\/\\[0\\.08\\]{--tw-gradient-to:color-mix(in srgb,var(--bg-tertiary) calc(0.08 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_main_accent_dark{--tw-gradient-to:color-mix(in srgb,var(--main-accent-dark) calc(1 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_main_accent_dark\\/10{--tw-gradient-to:color-mix(in srgb,var(--main-accent-dark) calc(0.1 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_main_accent_dark\\/20{--tw-gradient-to:color-mix(in srgb,var(--main-accent-dark) calc(0.2 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_main_accent_dark\\/25{--tw-gradient-to:color-mix(in srgb,var(--main-accent-dark) calc(0.25 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_success_dark\\/20{--tw-gradient-to:color-mix(in srgb,var(--success-dark) calc(0.2 * 100%),transparent) var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.to-x_blue_dark{--tw-gradient-to:rgba(43,74,157,1) var(--tw-gradient-to-position)}.to-x_blue_dark\\/25{--tw-gradient-to:rgba(43,74,157,0.25) var(--tw-gradient-to-position)}.fill-t_success_dark{fill:color-mix(in srgb,var(--success-dark) calc(1 * 100%),transparent)}.fill-t_text_primary{fill:color-mix(in srgb,var(--text-primary) calc(1 * 100%),transparent)}.fill-white{fill:#fff}.p-0{padding:0px}.p-0\\.5{padding:0.125rem}.p-1{padding:0.25rem}.p-2{padding:0.5rem}.p-3{padding:0.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\\[14px\\]{padding:14px}.p-\\[15px\\]{padding:15px}.\\!py-3{padding-top:0.75rem !important;padding-bottom:0.75rem !important}.px-0{padding-left:0px;padding-right:0px}.px-2{padding-left:0.5rem;padding-right:0.5rem}.px-2\\.5{padding-left:0.625rem;padding-right:0.625rem}.px-3{padding-left:0.75rem;padding-right:0.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-top:0px;padding-bottom:0px}.py-0\\.5{padding-top:0.125rem;padding-bottom:0.125rem}.py-1{padding-top:0.25rem;padding-bottom:0.25rem}.py-2{padding-top:0.5rem;padding-bottom:0.5rem}.py-3{padding-top:0.75rem;padding-bottom:0.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-1{padding-bottom:0.25rem}.pb-2{padding-bottom:0.5rem}.pb-3{padding-bottom:0.75rem}.pb-4{padding-bottom:1rem}.pl-4{padding-left:1rem}.pl-9{padding-left:2.25rem}.pr-1{padding-right:0.25rem}.pt-2{padding-top:0.5rem}.pt-2\\.5{padding-top:0.625rem}.pt-3{padding-top:0.75rem}.pt-\\[10px\\]{padding-top:10px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.\\!text-sm{font-size:0.875rem !important;line-height:1.25rem !important}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[10px\\]{font-size:10px}.text-\\[12px\\]{font-size:12px}.text-\\[15px\\]{font-size:15px}.text-\\[16px\\]{font-size:16px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.text-xs{font-size:0.75rem;line-height:1rem}.\\!font-medium{font-weight:500 !important}.font-medium{font-weight:500}.leading-10{line-height:2.5rem}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-8{line-height:2rem}.leading-\\[0px\\]{line-height:0px}.leading-\\[14px\\]{line-height:14px}.leading-\\[18px\\]{line-height:18px}.tracking-\\[0\\.015em\\]{letter-spacing:0.015em}.tracking-\\[0\\.01em\\]{letter-spacing:0.01em}.tracking-\\[0\\.032em\\]{letter-spacing:0.032em}.tracking-\\[0\\.08em\\]{letter-spacing:0.08em}.\\!text-t_button_pr_text{--tw-text-opacity:1 !important;color:color-mix(in srgb,var(--button-pr-text) calc(var(--tw-text-opacity) * 100%),transparent) !important}.text-\\[\\#6AE89B\\]{--tw-text-opacity:1;color:rgb(106 232 155/var(--tw-text-opacity))}.text-\\[\\#D77F02\\]{--tw-text-opacity:1;color:rgb(215 127 2/var(--tw-text-opacity))}.text-\\[\\#F44336\\]{--tw-text-opacity:1;color:rgb(244 67 54/var(--tw-text-opacity))}.text-\\[\\#F46F28\\]{--tw-text-opacity:1;color:rgb(244 111 40/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-t_button_pr_off_text{--tw-text-opacity:1;color:color-mix(in srgb,var(--button-pr-off-text) calc(var(--tw-text-opacity) * 100%),transparent)}.text-t_button_pr_text{--tw-text-opacity:1;color:color-mix(in srgb,var(--button-pr-text) calc(var(--tw-text-opacity) * 100%),transparent)}.text-t_success_light{--tw-text-opacity:1;color:color-mix(in srgb,var(--success-light) calc(var(--tw-text-opacity) * 100%),transparent)}.text-t_text_green{--tw-text-opacity:1;color:color-mix(in srgb,var(--text-green) calc(var(--tw-text-opacity) * 100%),transparent)}.text-t_text_orange{--tw-text-opacity:1;color:color-mix(in srgb,var(--text-orange) calc(var(--tw-text-opacity) * 100%),transparent)}.text-t_text_primary{--tw-text-opacity:1;color:color-mix(in srgb,var(--text-primary) calc(var(--tw-text-opacity) * 100%),transparent)}.text-t_text_red{--tw-text-opacity:1;color:color-mix(in srgb,var(--text-red) calc(var(--tw-text-opacity) * 100%),transparent)}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-x_alert_light{--tw-text-opacity:1;color:rgb(255 226 183/var(--tw-text-opacity))}.\\!text-opacity-50{--tw-text-opacity:0.5 !important}.text-opacity-10{--tw-text-opacity:0.1}.text-opacity-25{--tw-text-opacity:0.25}.text-opacity-30{--tw-text-opacity:0.3}.text-opacity-40{--tw-text-opacity:0.4}.text-opacity-50{--tw-text-opacity:0.5}.text-opacity-60{--tw-text-opacity:0.6}.text-opacity-70{--tw-text-opacity:0.7}.text-opacity-75{--tw-text-opacity:0.75}.text-opacity-80{--tw-text-opacity:0.8}.no-underline{text-decoration-line:none}.opacity-25{opacity:0.25}.opacity-40{opacity:0.4}.opacity-50{opacity:0.5}.opacity-60{opacity:0.6}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0/0.1),0 1px 2px -1px rgb(0 0 0/0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\\[0_0_6px_rgba\\(255\\2c 0\\2c 0\\2c 0\\.5\\)\\]{--tw-shadow:0 0 6px rgba(255,0,0,0.5);--tw-shadow-colored:0 0 6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\\[0_0_6px_rgba\\(255\\2c 165\\2c 0\\2c 0\\.5\\)\\]{--tw-shadow:0 0 6px rgba(255,165,0,0.5);--tw-shadow-colored:0 0 6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0/0.1),0 4px 6px -4px rgb(0 0 0/0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgb(0 0 0/0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-\\[12px\\]{--tw-backdrop-blur:blur(12px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-\\[24px\\]{--tw-backdrop-blur:blur(24px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-\\[32px\\]{--tw-backdrop-blur:blur(32px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-\\[48px\\]{--tw-backdrop-blur:blur(48px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-\\[filter\\]{transition-property:filter;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:150ms}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:150ms}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:150ms}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:150ms}:host{color:white;line-height:1.5rem;font-size:1rem;*{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--bg-tertiary) 15%,transparent) var(--bg-primary)}*::-webkit-scrollbar{width:4px}*::-webkit-scrollbar-track{background:var(--bg-primary);border-radius:4px}*::-webkit-scrollbar-thumb{background-color:color-mix(in srgb,var(--bg-tertiary) 15%,transparent);border-radius:4px}}.SnackbarContainer-top,.notistack-SnackbarContainer{top:100px !important}.placeholder\\:text-t_text_primary::-moz-placeholder{--tw-text-opacity:1;color:color-mix(in srgb,var(--text-primary) calc(var(--tw-text-opacity) * 100%),transparent)}.placeholder\\:text-t_text_primary::placeholder{--tw-text-opacity:1;color:color-mix(in srgb,var(--text-primary) calc(var(--tw-text-opacity) * 100%),transparent)}.placeholder\\:text-opacity-40::-moz-placeholder{--tw-text-opacity:0.4}.placeholder\\:text-opacity-40::placeholder{--tw-text-opacity:0.4}.placeholder\\:text-opacity-50::-moz-placeholder{--tw-text-opacity:0.5}.placeholder\\:text-opacity-50::placeholder{--tw-text-opacity:0.5}.hover\\:bg-t_bg_tertiary:hover{--tw-bg-opacity:1;background-color:color-mix(in srgb,var(--bg-tertiary) calc(var(--tw-bg-opacity) * 100%),transparent)}.hover\\:bg-opacity-10:hover{--tw-bg-opacity:0.1}.hover\\:from-t_bg_tertiary\\/10:hover{--tw-gradient-from:color-mix(in srgb,var(--bg-tertiary) calc(0.1 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.hover\\:from-t_main_accent_light\\/40:hover{--tw-gradient-from:color-mix(in srgb,var(--main-accent-light) calc(0.4 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.hover\\:to-t_bg_tertiary\\/10:hover{--tw-gradient-to:color-mix(in srgb,var(--bg-tertiary) calc(0.1 * 100%),transparent) var(--tw-gradient-to-position)}.hover\\:to-t_main_accent_dark\\/40:hover{--tw-gradient-to:color-mix(in srgb,var(--main-accent-dark) calc(0.4 * 100%),transparent) var(--tw-gradient-to-position)}.hover\\:fill-t_main_accent_light:hover{fill:color-mix(in srgb,var(--main-accent-light) calc(1 * 100%),transparent)}.hover\\:text-opacity-50:hover{--tw-text-opacity:0.5}.hover\\:opacity-80:hover{opacity:0.8}.hover\\:brightness-105:hover{--tw-brightness:brightness(1.05);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.group:hover .group-hover\\:flex{display:flex}.group:hover .group-hover\\:hidden{display:none}@media (min-width:640px){.sm\\:invisible{visibility:hidden}.sm\\:absolute{position:absolute}.sm\\:z-\\[1\\]{z-index:1}.sm\\:z-\\[2\\]{z-index:2}.sm\\:block{display:block}.sm\\:inline{display:inline}.sm\\:hidden{display:none}.sm\\:h-\\[600px\\]{height:600px}.sm\\:h-full{height:100%}.sm\\:w-\\[72px\\]{width:72px}.sm\\:max-w-\\[636px\\]{max-width:636px}.sm\\:justify-start{justify-content:flex-start}.sm\\:justify-center{justify-content:center}.sm\\:rounded-\\[32px\\]{border-radius:32px}.sm\\:rounded-none{border-radius:0px}.sm\\:border{border-width:1px}.sm\\:border-0{border-width:0px}.sm\\:bg-transparent{background-color:transparent}.sm\\:bg-none{background-image:none}.sm\\:p-0{padding:0px}.sm\\:p-4{padding:1rem}.sm\\:p-8{padding:2rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}}.\\[\\&_svg\\]\\:h-4 svg{height:1rem}.\\[\\&_svg\\]\\:h-5 svg{height:1.25rem}.\\[\\&_svg\\]\\:w-4 svg{width:1rem}.\\[\\&_svg\\]\\:w-auto svg{width:auto}
|
|
17405
|
+
var global_default = `/* ! tailwindcss v3.4.4 | MIT License | https://tailwindcss.com */*,::before,::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}::before,::after{--tw-content:''}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--font-family,'Satoshi',Tahoma,Verdana,ui-sans-serif);font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type='button']),input:where([type='reset']),input:where([type='submit']){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type='search']{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder, textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role="button"]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::before,::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x:;--tw-pan-y:;--tw-pinch-zoom:;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position:;--tw-gradient-via-position:;--tw-gradient-to-position:;--tw-ordinal:;--tw-slashed-zero:;--tw-numeric-figure:;--tw-numeric-spacing:;--tw-numeric-fraction:;--tw-ring-inset:;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur:;--tw-brightness:;--tw-contrast:;--tw-grayscale:;--tw-hue-rotate:;--tw-invert:;--tw-saturate:;--tw-sepia:;--tw-drop-shadow:;--tw-backdrop-blur:;--tw-backdrop-brightness:;--tw-backdrop-contrast:;--tw-backdrop-grayscale:;--tw-backdrop-hue-rotate:;--tw-backdrop-invert:;--tw-backdrop-opacity:;--tw-backdrop-saturate:;--tw-backdrop-sepia:;--tw-contain-size:;--tw-contain-layout:;--tw-contain-paint:;--tw-contain-style:}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x:;--tw-pan-y:;--tw-pinch-zoom:;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position:;--tw-gradient-via-position:;--tw-gradient-to-position:;--tw-ordinal:;--tw-slashed-zero:;--tw-numeric-figure:;--tw-numeric-spacing:;--tw-numeric-fraction:;--tw-ring-inset:;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur:;--tw-brightness:;--tw-contrast:;--tw-grayscale:;--tw-hue-rotate:;--tw-invert:;--tw-saturate:;--tw-sepia:;--tw-drop-shadow:;--tw-backdrop-blur:;--tw-backdrop-brightness:;--tw-backdrop-contrast:;--tw-backdrop-grayscale:;--tw-backdrop-hue-rotate:;--tw-backdrop-invert:;--tw-backdrop-opacity:;--tw-backdrop-saturate:;--tw-backdrop-sepia:;--tw-contain-size:;--tw-contain-layout:;--tw-contain-paint:;--tw-contain-style:}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.gradient-sections-separator-container{background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from:transparent var(--tw-gradient-from-position);--tw-gradient-to:rgb(0 0 0/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),color-mix(in srgb,var(--bg-tertiary) calc(0.1 * 100%),transparent) var(--tw-gradient-via-position),var(--tw-gradient-to);--tw-gradient-to:transparent var(--tw-gradient-to-position)}.x-border{border-width:1px;border-style:solid;border-color:color-mix(in srgb,var(--text-primary) calc(var(--tw-border-opacity) * 100%),transparent);--tw-border-opacity:0.1}.swap-panel-gradient-border{position:relative}.swap-panel-gradient-border::before,.swap-panel-gradient-border::after{content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none}.swap-panel-gradient-border::before{background:linear-gradient(90deg,color-mix(in srgb,var(--text-primary) 2.5%,transparent),color-mix(in srgb,var(--text-primary) 5%,transparent))}.swap-panel-gradient-border::after{background:linear-gradient(90deg,color-mix(in srgb,var(--text-primary) 5%,transparent),color-mix(in srgb,var(--text-primary) 7.5%,transparent));opacity:0;transition:opacity 0.15s ease}.swap-panel-gradient-border:hover::after{opacity:1}.network-dropdown-surface{background:linear-gradient(90deg,color-mix(in srgb,var(--bg-primary) 20%,transparent) 0%,color-mix(in srgb,var(--bg-primary) 20%,transparent) 100%),linear-gradient(180deg,color-mix(in srgb,var(--bg-tertiary) 4%,transparent) 0%,color-mix(in srgb,var(--bg-tertiary) 2%,transparent) 49.5%,color-mix(in srgb,var(--bg-tertiary) 4%,transparent) 100%),var(--bg-secondary)}.network-dropdown-row:hover,.network-dropdown-row-active{background:linear-gradient(90deg,transparent 0%,color-mix(in srgb,var(--bg-tertiary) 0.5%,transparent) 15%,color-mix(in srgb,var(--bg-tertiary) 2.5%,transparent) 50%,color-mix(in srgb,var(--bg-tertiary) 0.5%,transparent) 85%,transparent 100%)}.tx-modal-glow-success{background:radial-gradient(120% 60% at 0% 0%,rgba(76,175,80,0.25) 0%,transparent 45%)}.tx-modal-glow-error{background:radial-gradient(120% 60% at 0% 0%,rgba(244,67,54,0.25) 0%,transparent 45%)}.btn{position:relative;z-index:1;margin:0px;-webkit-appearance:none;-moz-appearance:none;appearance:none;white-space:nowrap;border-style:none;background-color:transparent;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.btn:hover{cursor:pointer}.btn-disabled{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity));opacity:0.5}.btn-disabled:hover{cursor:not-allowed}.btn--full-width{width:100%}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0px}.inset-x-0{left:0px;right:0px}.-right-2{right:-0.5rem}.bottom-0{bottom:0px}.bottom-5{bottom:1.25rem}.left-0{left:0px}.left-1\\/2{left:50%}.right-0{right:0px}.right-2{right:0.5rem}.top-0{top:0px}.top-\\[calc\\(100\\%\\+8px\\)\\]{top:calc(100% + 8px)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.m-0{margin:0px}.mx-0{margin-left:0px;margin-right:0px}.mx-1{margin-left:0.25rem;margin-right:0.25rem}.mx-1\\.5{margin-left:0.375rem;margin-right:0.375rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:0.25rem;margin-bottom:0.25rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.-mr-1{margin-right:-0.25rem}.-mr-1\\.5{margin-right:-0.375rem}.-mr-2{margin-right:-0.5rem}.mb-1{margin-bottom:0.25rem}.mb-2{margin-bottom:0.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:0.25rem}.ml-1\\.5{margin-left:0.375rem}.mr-1{margin-right:0.25rem}.mr-2{margin-right:0.5rem}.mt-2{margin-top:0.5rem}.box-border{box-sizing:border-box}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-0{height:0px}.h-0\\.5{height:0.125rem}.h-1{height:0.25rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-3{height:0.75rem}.h-3\\.5{height:0.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\\[11px\\]{height:11px}.h-\\[12px\\]{height:12px}.h-\\[14px\\]{height:14px}.h-\\[16px\\]{height:16px}.h-\\[18px\\]{height:18px}.h-\\[20px\\]{height:20px}.h-\\[214px\\]{height:214px}.h-\\[32px\\]{height:32px}.h-\\[34px\\]{height:34px}.h-\\[72px\\]{height:72px}.h-\\[85vh\\]{height:85vh}.h-full{height:100%}.h-px{height:1px}.max-h-full{max-height:100%}.min-h-0{min-height:0px}.min-h-11{min-height:2.75rem}.min-h-6{min-height:1.5rem}.min-h-\\[320px\\]{min-height:320px}.min-h-\\[43px\\]{min-height:43px}.min-h-\\[532px\\]{min-height:532px}.w-0{width:0px}.w-0\\.5{width:0.125rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-20{width:5rem}.w-3{width:0.75rem}.w-3\\.5{width:0.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\\[100px\\]{width:100px}.w-\\[11px\\]{width:11px}.w-\\[14px\\]{width:14px}.w-\\[150px\\]{width:150px}.w-\\[18px\\]{width:18px}.w-\\[296px\\]{width:296px}.w-\\[34px\\]{width:34px}.w-\\[48px\\]{width:48px}.w-\\[60px\\]{width:60px}.w-\\[80px\\]{width:80px}.w-full{width:100%}.w-x_modal{width:var(--modal-width)}.min-w-0{min-width:0px}.min-w-10{min-width:2.5rem}.min-w-9{min-width:2.25rem}.min-w-\\[108px\\]{min-width:108px}.min-w-\\[340px\\]{min-width:340px}.min-w-x_modal{min-width:var(--modal-width,340px)}.max-w-80{max-width:20rem}.max-w-\\[120px\\]{max-width:120px}.max-w-\\[500px\\]{max-width:500px}.max-w-\\[var\\(--modal-width\\2c 588px\\)\\]{max-width:var(--modal-width,588px)}.max-w-x_modal{max-width:var(--modal-width,620px)}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x:-100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y:-100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x:1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(0.4,0,0.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin-slow{animation:spin 3s linear infinite}.\\!cursor-not-allowed{cursor:not-allowed !important}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\\.5{gap:0.125rem}.gap-1{gap:0.25rem}.gap-1\\.5{gap:0.375rem}.gap-2{gap:0.5rem}.gap-2\\.5{gap:0.625rem}.gap-3{gap:0.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-x-1{-moz-column-gap:0.25rem;column-gap:0.25rem}.gap-y-2{row-gap:0.5rem}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-nowrap{text-wrap:nowrap}.\\!rounded-\\[10px\\]{border-radius:10px !important}.rounded{border-radius:0.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[32px\\]{border-radius:32px}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:0.5rem}.rounded-md{border-radius:0.375rem}.rounded-xl{border-radius:0.75rem}.rounded-b-none{border-bottom-right-radius:0px;border-bottom-left-radius:0px}.rounded-t-\\[24px\\]{border-top-left-radius:24px;border-top-right-radius:24px}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-none{border-style:none}.border-t_bg_secondary{--tw-border-opacity:1;border-color:color-mix(in srgb,var(--bg-secondary) calc(var(--tw-border-opacity) * 100%),transparent)}.border-t_error_dark{--tw-border-opacity:1;border-color:color-mix(in srgb,var(--error-dark) calc(var(--tw-border-opacity) * 100%),transparent)}.border-t_main_accent_dark{--tw-border-opacity:1;border-color:color-mix(in srgb,var(--main-accent-dark) calc(var(--tw-border-opacity) * 100%),transparent)}.border-t_main_accent_light{--tw-border-opacity:1;border-color:color-mix(in srgb,var(--main-accent-light) calc(var(--tw-border-opacity) * 100%),transparent)}.border-t_main_accent_light\\/60{border-color:color-mix(in srgb,var(--main-accent-light) calc(0.6 * 100%),transparent)}.border-t_success_dark{--tw-border-opacity:1;border-color:color-mix(in srgb,var(--success-dark) calc(var(--tw-border-opacity) * 100%),transparent)}.border-t_text_primary{--tw-border-opacity:1;border-color:color-mix(in srgb,var(--text-primary) calc(var(--tw-border-opacity) * 100%),transparent)}.border-t_warning_dark{--tw-border-opacity:1;border-color:color-mix(in srgb,var(--warning-dark) calc(var(--tw-border-opacity) * 100%),transparent)}.border-x_alert{--tw-border-opacity:1;border-color:rgb(255 183 77/var(--tw-border-opacity))}.border-opacity-10{--tw-border-opacity:0.1}.border-opacity-20{--tw-border-opacity:0.2}.border-opacity-5{--tw-border-opacity:0.05}.border-opacity-50{--tw-border-opacity:0.5}.\\!bg-t_bg_tertiary{--tw-bg-opacity:1 !important;background-color:color-mix(in srgb,var(--bg-tertiary) calc(var(--tw-bg-opacity) * 100%),transparent) !important}.bg-\\[rgba\\(0\\2c 0\\2c 0\\2c 0\\.8\\)\\]{background-color:rgba(0,0,0,0.8)}.bg-\\[rgba\\(2\\2c 2\\2c 2\\2c 0\\.8\\)\\]{background-color:rgba(2,2,2,0.8)}.bg-\\[rgba\\(40\\2c 40\\2c 40\\2c 0\\.15\\)\\]{background-color:rgba(40,40,40,0.15)}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-t_bg_primary{--tw-bg-opacity:1;background-color:color-mix(in srgb,var(--bg-primary) calc(var(--tw-bg-opacity) * 100%),transparent)}.bg-t_bg_secondary{--tw-bg-opacity:1;background-color:color-mix(in srgb,var(--bg-secondary) calc(var(--tw-bg-opacity) * 100%),transparent)}.bg-t_bg_tertiary{--tw-bg-opacity:1;background-color:color-mix(in srgb,var(--bg-tertiary) calc(var(--tw-bg-opacity) * 100%),transparent)}.bg-t_button_pr_off_bg{--tw-bg-opacity:1;background-color:color-mix(in srgb,var(--button-pr-off-bg) calc(var(--tw-bg-opacity) * 100%),transparent)}.bg-t_text_green{--tw-bg-opacity:1;background-color:color-mix(in srgb,var(--text-green) calc(var(--tw-bg-opacity) * 100%),transparent)}.bg-t_text_orange{--tw-bg-opacity:1;background-color:color-mix(in srgb,var(--text-orange) calc(var(--tw-bg-opacity) * 100%),transparent)}.bg-t_text_primary{--tw-bg-opacity:1;background-color:color-mix(in srgb,var(--text-primary) calc(var(--tw-bg-opacity) * 100%),transparent)}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.\\!bg-opacity-10{--tw-bg-opacity:0.1 !important}.bg-opacity-10{--tw-bg-opacity:0.1}.bg-opacity-15{--tw-bg-opacity:0.15}.bg-opacity-5{--tw-bg-opacity:0.05}.bg-opacity-50{--tw-bg-opacity:0.5}.bg-opacity-75{--tw-bg-opacity:0.75}.bg-opacity-80{--tw-bg-opacity:0.8}.bg-opacity-\\[0\\.02\\]{--tw-bg-opacity:0.02}.bg-opacity-\\[0\\.03\\]{--tw-bg-opacity:0.03}.bg-opacity-\\[0\\.04\\]{--tw-bg-opacity:0.04}.bg-opacity-\\[0\\.07\\]{--tw-bg-opacity:0.07}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-t_bg_primary\\/\\[0\\.65\\]{--tw-gradient-from:color-mix(in srgb,var(--bg-primary) calc(0.65 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_bg_secondary\\/50{--tw-gradient-from:color-mix(in srgb,var(--bg-secondary) calc(0.5 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_bg_secondary\\/65{--tw-gradient-from:color-mix(in srgb,var(--bg-secondary) calc(0.65 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_bg_tertiary\\/0{--tw-gradient-from:color-mix(in srgb,var(--bg-tertiary) calc(0 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_bg_tertiary\\/10{--tw-gradient-from:color-mix(in srgb,var(--bg-tertiary) calc(0.1 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_bg_tertiary\\/5{--tw-gradient-from:color-mix(in srgb,var(--bg-tertiary) calc(0.05 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_bg_tertiary\\/\\[0\\.01\\]{--tw-gradient-from:color-mix(in srgb,var(--bg-tertiary) calc(0.01 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_bg_tertiary\\/\\[0\\.02\\]{--tw-gradient-from:color-mix(in srgb,var(--bg-tertiary) calc(0.02 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_bg_tertiary\\/\\[0\\.03\\]{--tw-gradient-from:color-mix(in srgb,var(--bg-tertiary) calc(0.03 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_error_dark\\/15{--tw-gradient-from:color-mix(in srgb,var(--error-dark) calc(0.15 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_main_accent_light{--tw-gradient-from:color-mix(in srgb,var(--main-accent-light) calc(1 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:color-mix(in srgb,var(--main-accent-light) calc(0 * 100%),transparent) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_main_accent_light\\/10{--tw-gradient-from:color-mix(in srgb,var(--main-accent-light) calc(0.1 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_main_accent_light\\/20{--tw-gradient-from:color-mix(in srgb,var(--main-accent-light) calc(0.2 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_main_accent_light\\/25{--tw-gradient-from:color-mix(in srgb,var(--main-accent-light) calc(0.25 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_success_light\\/20{--tw-gradient-from:color-mix(in srgb,var(--success-light) calc(0.2 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-t_warning_dark\\/15{--tw-gradient-from:color-mix(in srgb,var(--warning-dark) calc(0.15 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-transparent{--tw-gradient-from:transparent var(--tw-gradient-from-position);--tw-gradient-to:rgb(0 0 0/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-x_blue_light{--tw-gradient-from:rgba(54,129,198,1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(54,129,198,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-x_blue_light\\/25{--tw-gradient-from:rgba(54,129,198,0.25) var(--tw-gradient-from-position);--tw-gradient-to:rgba(54,129,198,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-50\\%{--tw-gradient-from-position:50%}.via-t_bg_tertiary\\/5{--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),color-mix(in srgb,var(--bg-tertiary) calc(0.05 * 100%),transparent) var(--tw-gradient-via-position),var(--tw-gradient-to)}.to-t_bg_secondary\\/0{--tw-gradient-to:color-mix(in srgb,var(--bg-secondary) calc(0 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_bg_secondary\\/15{--tw-gradient-to:color-mix(in srgb,var(--bg-secondary) calc(0.15 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_bg_secondary\\/50{--tw-gradient-to:color-mix(in srgb,var(--bg-secondary) calc(0.5 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_bg_tertiary\\/0{--tw-gradient-to:color-mix(in srgb,var(--bg-tertiary) calc(0 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_bg_tertiary\\/5{--tw-gradient-to:color-mix(in srgb,var(--bg-tertiary) calc(0.05 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_bg_tertiary\\/\\[0\\.01\\]{--tw-gradient-to:color-mix(in srgb,var(--bg-tertiary) calc(0.01 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_bg_tertiary\\/\\[0\\.02\\]{--tw-gradient-to:color-mix(in srgb,var(--bg-tertiary) calc(0.02 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_bg_tertiary\\/\\[0\\.03\\]{--tw-gradient-to:color-mix(in srgb,var(--bg-tertiary) calc(0.03 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_bg_tertiary\\/\\[0\\.08\\]{--tw-gradient-to:color-mix(in srgb,var(--bg-tertiary) calc(0.08 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_main_accent_dark{--tw-gradient-to:color-mix(in srgb,var(--main-accent-dark) calc(1 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_main_accent_dark\\/10{--tw-gradient-to:color-mix(in srgb,var(--main-accent-dark) calc(0.1 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_main_accent_dark\\/20{--tw-gradient-to:color-mix(in srgb,var(--main-accent-dark) calc(0.2 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_main_accent_dark\\/25{--tw-gradient-to:color-mix(in srgb,var(--main-accent-dark) calc(0.25 * 100%),transparent) var(--tw-gradient-to-position)}.to-t_success_dark\\/20{--tw-gradient-to:color-mix(in srgb,var(--success-dark) calc(0.2 * 100%),transparent) var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.to-x_blue_dark{--tw-gradient-to:rgba(43,74,157,1) var(--tw-gradient-to-position)}.to-x_blue_dark\\/25{--tw-gradient-to:rgba(43,74,157,0.25) var(--tw-gradient-to-position)}.fill-t_success_dark{fill:color-mix(in srgb,var(--success-dark) calc(1 * 100%),transparent)}.fill-t_text_primary{fill:color-mix(in srgb,var(--text-primary) calc(1 * 100%),transparent)}.fill-white{fill:#fff}.p-0{padding:0px}.p-0\\.5{padding:0.125rem}.p-1{padding:0.25rem}.p-2{padding:0.5rem}.p-3{padding:0.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\\[14px\\]{padding:14px}.p-\\[15px\\]{padding:15px}.\\!py-3{padding-top:0.75rem !important;padding-bottom:0.75rem !important}.px-0{padding-left:0px;padding-right:0px}.px-2{padding-left:0.5rem;padding-right:0.5rem}.px-2\\.5{padding-left:0.625rem;padding-right:0.625rem}.px-3{padding-left:0.75rem;padding-right:0.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-top:0px;padding-bottom:0px}.py-0\\.5{padding-top:0.125rem;padding-bottom:0.125rem}.py-1{padding-top:0.25rem;padding-bottom:0.25rem}.py-2{padding-top:0.5rem;padding-bottom:0.5rem}.py-3{padding-top:0.75rem;padding-bottom:0.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-1{padding-bottom:0.25rem}.pb-2{padding-bottom:0.5rem}.pb-3{padding-bottom:0.75rem}.pb-4{padding-bottom:1rem}.pl-4{padding-left:1rem}.pl-9{padding-left:2.25rem}.pr-1{padding-right:0.25rem}.pt-2{padding-top:0.5rem}.pt-2\\.5{padding-top:0.625rem}.pt-3{padding-top:0.75rem}.pt-\\[10px\\]{padding-top:10px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.\\!text-sm{font-size:0.875rem !important;line-height:1.25rem !important}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[10px\\]{font-size:10px}.text-\\[12px\\]{font-size:12px}.text-\\[15px\\]{font-size:15px}.text-\\[16px\\]{font-size:16px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.text-xs{font-size:0.75rem;line-height:1rem}.\\!font-medium{font-weight:500 !important}.font-medium{font-weight:500}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-10{line-height:2.5rem}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-8{line-height:2rem}.leading-\\[0px\\]{line-height:0px}.leading-\\[14px\\]{line-height:14px}.leading-\\[18px\\]{line-height:18px}.tracking-\\[0\\.015em\\]{letter-spacing:0.015em}.tracking-\\[0\\.01em\\]{letter-spacing:0.01em}.tracking-\\[0\\.032em\\]{letter-spacing:0.032em}.tracking-\\[0\\.08em\\]{letter-spacing:0.08em}.\\!text-t_button_pr_text{--tw-text-opacity:1 !important;color:color-mix(in srgb,var(--button-pr-text) calc(var(--tw-text-opacity) * 100%),transparent) !important}.text-\\[\\#6AE89B\\]{--tw-text-opacity:1;color:rgb(106 232 155/var(--tw-text-opacity))}.text-\\[\\#D77F02\\]{--tw-text-opacity:1;color:rgb(215 127 2/var(--tw-text-opacity))}.text-\\[\\#F44336\\]{--tw-text-opacity:1;color:rgb(244 67 54/var(--tw-text-opacity))}.text-\\[\\#F46F28\\]{--tw-text-opacity:1;color:rgb(244 111 40/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-t_button_pr_off_text{--tw-text-opacity:1;color:color-mix(in srgb,var(--button-pr-off-text) calc(var(--tw-text-opacity) * 100%),transparent)}.text-t_button_pr_text{--tw-text-opacity:1;color:color-mix(in srgb,var(--button-pr-text) calc(var(--tw-text-opacity) * 100%),transparent)}.text-t_success_light{--tw-text-opacity:1;color:color-mix(in srgb,var(--success-light) calc(var(--tw-text-opacity) * 100%),transparent)}.text-t_text_green{--tw-text-opacity:1;color:color-mix(in srgb,var(--text-green) calc(var(--tw-text-opacity) * 100%),transparent)}.text-t_text_orange{--tw-text-opacity:1;color:color-mix(in srgb,var(--text-orange) calc(var(--tw-text-opacity) * 100%),transparent)}.text-t_text_primary{--tw-text-opacity:1;color:color-mix(in srgb,var(--text-primary) calc(var(--tw-text-opacity) * 100%),transparent)}.text-t_text_red{--tw-text-opacity:1;color:color-mix(in srgb,var(--text-red) calc(var(--tw-text-opacity) * 100%),transparent)}.text-t_warning_light{--tw-text-opacity:1;color:color-mix(in srgb,var(--warning-light) calc(var(--tw-text-opacity) * 100%),transparent)}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-x_alert_light{--tw-text-opacity:1;color:rgb(255 226 183/var(--tw-text-opacity))}.\\!text-opacity-50{--tw-text-opacity:0.5 !important}.text-opacity-10{--tw-text-opacity:0.1}.text-opacity-25{--tw-text-opacity:0.25}.text-opacity-30{--tw-text-opacity:0.3}.text-opacity-40{--tw-text-opacity:0.4}.text-opacity-50{--tw-text-opacity:0.5}.text-opacity-60{--tw-text-opacity:0.6}.text-opacity-70{--tw-text-opacity:0.7}.text-opacity-75{--tw-text-opacity:0.75}.text-opacity-80{--tw-text-opacity:0.8}.no-underline{text-decoration-line:none}.opacity-25{opacity:0.25}.opacity-40{opacity:0.4}.opacity-50{opacity:0.5}.opacity-60{opacity:0.6}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0/0.1),0 1px 2px -1px rgb(0 0 0/0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\\[0_0_6px_rgba\\(255\\2c 0\\2c 0\\2c 0\\.5\\)\\]{--tw-shadow:0 0 6px rgba(255,0,0,0.5);--tw-shadow-colored:0 0 6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\\[0_0_6px_rgba\\(255\\2c 165\\2c 0\\2c 0\\.5\\)\\]{--tw-shadow:0 0 6px rgba(255,165,0,0.5);--tw-shadow-colored:0 0 6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0/0.1),0 4px 6px -4px rgb(0 0 0/0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgb(0 0 0/0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-\\[12px\\]{--tw-backdrop-blur:blur(12px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-\\[24px\\]{--tw-backdrop-blur:blur(24px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-\\[32px\\]{--tw-backdrop-blur:blur(32px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-\\[48px\\]{--tw-backdrop-blur:blur(48px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-\\[filter\\]{transition-property:filter;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:150ms}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:150ms}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:150ms}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:150ms}:host{color:white;line-height:1.5rem;font-size:1rem;*{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--bg-tertiary) 15%,transparent) var(--bg-primary)}*::-webkit-scrollbar{width:4px}*::-webkit-scrollbar-track{background:var(--bg-primary);border-radius:4px}*::-webkit-scrollbar-thumb{background-color:color-mix(in srgb,var(--bg-tertiary) 15%,transparent);border-radius:4px}}.SnackbarContainer-top,.notistack-SnackbarContainer{top:100px !important}.placeholder\\:text-t_text_primary::-moz-placeholder{--tw-text-opacity:1;color:color-mix(in srgb,var(--text-primary) calc(var(--tw-text-opacity) * 100%),transparent)}.placeholder\\:text-t_text_primary::placeholder{--tw-text-opacity:1;color:color-mix(in srgb,var(--text-primary) calc(var(--tw-text-opacity) * 100%),transparent)}.placeholder\\:text-opacity-40::-moz-placeholder{--tw-text-opacity:0.4}.placeholder\\:text-opacity-40::placeholder{--tw-text-opacity:0.4}.placeholder\\:text-opacity-50::-moz-placeholder{--tw-text-opacity:0.5}.placeholder\\:text-opacity-50::placeholder{--tw-text-opacity:0.5}.hover\\:bg-t_bg_tertiary:hover{--tw-bg-opacity:1;background-color:color-mix(in srgb,var(--bg-tertiary) calc(var(--tw-bg-opacity) * 100%),transparent)}.hover\\:bg-opacity-10:hover{--tw-bg-opacity:0.1}.hover\\:from-t_bg_tertiary\\/10:hover{--tw-gradient-from:color-mix(in srgb,var(--bg-tertiary) calc(0.1 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.hover\\:from-t_main_accent_light\\/40:hover{--tw-gradient-from:color-mix(in srgb,var(--main-accent-light) calc(0.4 * 100%),transparent) var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.hover\\:to-t_bg_tertiary\\/10:hover{--tw-gradient-to:color-mix(in srgb,var(--bg-tertiary) calc(0.1 * 100%),transparent) var(--tw-gradient-to-position)}.hover\\:to-t_main_accent_dark\\/40:hover{--tw-gradient-to:color-mix(in srgb,var(--main-accent-dark) calc(0.4 * 100%),transparent) var(--tw-gradient-to-position)}.hover\\:fill-t_main_accent_light:hover{fill:color-mix(in srgb,var(--main-accent-light) calc(1 * 100%),transparent)}.hover\\:text-opacity-50:hover{--tw-text-opacity:0.5}.hover\\:opacity-80:hover{opacity:0.8}.hover\\:brightness-105:hover{--tw-brightness:brightness(1.05);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.group:hover .group-hover\\:flex{display:flex}.group:hover .group-hover\\:hidden{display:none}@media (min-width:640px){.sm\\:invisible{visibility:hidden}.sm\\:absolute{position:absolute}.sm\\:z-\\[1\\]{z-index:1}.sm\\:z-\\[2\\]{z-index:2}.sm\\:block{display:block}.sm\\:inline{display:inline}.sm\\:hidden{display:none}.sm\\:h-\\[600px\\]{height:600px}.sm\\:h-full{height:100%}.sm\\:w-\\[72px\\]{width:72px}.sm\\:max-w-\\[636px\\]{max-width:636px}.sm\\:justify-start{justify-content:flex-start}.sm\\:justify-center{justify-content:center}.sm\\:rounded-\\[32px\\]{border-radius:32px}.sm\\:rounded-none{border-radius:0px}.sm\\:border{border-width:1px}.sm\\:border-0{border-width:0px}.sm\\:bg-transparent{background-color:transparent}.sm\\:bg-none{background-image:none}.sm\\:p-0{padding:0px}.sm\\:p-4{padding:1rem}.sm\\:p-8{padding:2rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}}.\\[\\&_svg\\]\\:h-4 svg{height:1rem}.\\[\\&_svg\\]\\:h-5 svg{height:1.25rem}.\\[\\&_svg\\]\\:w-4 svg{width:1rem}.\\[\\&_svg\\]\\:w-auto svg{width:auto}
|
|
17406
17406
|
`;
|
|
17407
17407
|
|
|
17408
17408
|
// src/fonts/Satoshi-Regular.woff2
|
|
@@ -17564,6 +17564,14 @@ async function getBalances(payload) {
|
|
|
17564
17564
|
})}`
|
|
17565
17565
|
);
|
|
17566
17566
|
}
|
|
17567
|
+
async function getTransactionStatus(payload, abortSignal) {
|
|
17568
|
+
return _sendRequest(
|
|
17569
|
+
`/getTransactionStatus?${new URLSearchParams({
|
|
17570
|
+
data: JSON.stringify(payload)
|
|
17571
|
+
})}`,
|
|
17572
|
+
{ signal: abortSignal }
|
|
17573
|
+
);
|
|
17574
|
+
}
|
|
17567
17575
|
async function getTxStatus(payload) {
|
|
17568
17576
|
return await _sendRequest(
|
|
17569
17577
|
`/getTxStatus?${new URLSearchParams({
|
|
@@ -18684,6 +18692,88 @@ var useEvmContractApi_default = useEvmContractApi;
|
|
|
18684
18692
|
// src/hooks/useBatchQuery.ts
|
|
18685
18693
|
import { useCallback as useCallback2 } from "react";
|
|
18686
18694
|
|
|
18695
|
+
// src/hooks/useCrossChainDelivery.ts
|
|
18696
|
+
import { useEffect, useState as useState2 } from "react";
|
|
18697
|
+
var TERMINAL_STATUSES = [
|
|
18698
|
+
"DONE",
|
|
18699
|
+
"PARTIALLY_FAILED",
|
|
18700
|
+
"FAILED"
|
|
18701
|
+
];
|
|
18702
|
+
var POLL_INTERVAL_MS = 4e3;
|
|
18703
|
+
var SLOW_POLL_INTERVAL_MS = 15e3;
|
|
18704
|
+
var SLOW_POLL_AFTER_MS = 3 * 60 * 1e3;
|
|
18705
|
+
var useCrossChainDelivery = ({
|
|
18706
|
+
enabled,
|
|
18707
|
+
chainId,
|
|
18708
|
+
txHash,
|
|
18709
|
+
walletAddress
|
|
18710
|
+
}) => {
|
|
18711
|
+
const [response, setResponse] = useState2();
|
|
18712
|
+
const [startedAt, setStartedAt] = useState2();
|
|
18713
|
+
const active = enabled && !!chainId && !!txHash;
|
|
18714
|
+
useEffect(() => {
|
|
18715
|
+
if (!active) {
|
|
18716
|
+
setResponse(void 0);
|
|
18717
|
+
setStartedAt(void 0);
|
|
18718
|
+
return;
|
|
18719
|
+
}
|
|
18720
|
+
let cancelled = false;
|
|
18721
|
+
let timer;
|
|
18722
|
+
const controller = new AbortController();
|
|
18723
|
+
const startTime = Date.now();
|
|
18724
|
+
setResponse(void 0);
|
|
18725
|
+
setStartedAt(startTime);
|
|
18726
|
+
const poll2 = async () => {
|
|
18727
|
+
try {
|
|
18728
|
+
const next = await getTransactionStatus(
|
|
18729
|
+
{
|
|
18730
|
+
chainId,
|
|
18731
|
+
txHash,
|
|
18732
|
+
walletAddress
|
|
18733
|
+
},
|
|
18734
|
+
controller.signal
|
|
18735
|
+
);
|
|
18736
|
+
if (cancelled) {
|
|
18737
|
+
return;
|
|
18738
|
+
}
|
|
18739
|
+
setResponse(next);
|
|
18740
|
+
if (TERMINAL_STATUSES.includes(next.status)) {
|
|
18741
|
+
return;
|
|
18742
|
+
}
|
|
18743
|
+
} catch (err) {
|
|
18744
|
+
if (cancelled) {
|
|
18745
|
+
return;
|
|
18746
|
+
}
|
|
18747
|
+
console.warn("Failed to read cross-chain delivery status:", err);
|
|
18748
|
+
}
|
|
18749
|
+
timer = setTimeout(
|
|
18750
|
+
poll2,
|
|
18751
|
+
Date.now() - startTime > SLOW_POLL_AFTER_MS ? SLOW_POLL_INTERVAL_MS : POLL_INTERVAL_MS
|
|
18752
|
+
);
|
|
18753
|
+
};
|
|
18754
|
+
poll2();
|
|
18755
|
+
return () => {
|
|
18756
|
+
cancelled = true;
|
|
18757
|
+
if (timer) {
|
|
18758
|
+
clearTimeout(timer);
|
|
18759
|
+
}
|
|
18760
|
+
controller.abort();
|
|
18761
|
+
};
|
|
18762
|
+
}, [active, chainId, txHash, walletAddress]);
|
|
18763
|
+
const status = response?.status;
|
|
18764
|
+
const isSettled = !!status && TERMINAL_STATUSES.includes(status);
|
|
18765
|
+
return {
|
|
18766
|
+
status,
|
|
18767
|
+
response,
|
|
18768
|
+
isPolling: active && !isSettled,
|
|
18769
|
+
isSettled,
|
|
18770
|
+
isDelivered: status === "DONE",
|
|
18771
|
+
isPartiallyFailed: status === "PARTIALLY_FAILED",
|
|
18772
|
+
isFailed: status === "FAILED",
|
|
18773
|
+
startedAt
|
|
18774
|
+
};
|
|
18775
|
+
};
|
|
18776
|
+
|
|
18687
18777
|
// src/hooks/useDebounce.tsx
|
|
18688
18778
|
import { useCallback as useCallback3, useRef } from "react";
|
|
18689
18779
|
var useDebounce = ({
|
|
@@ -20482,9 +20572,9 @@ import {
|
|
|
20482
20572
|
createContext as createContext2,
|
|
20483
20573
|
useCallback as useCallback5,
|
|
20484
20574
|
useContext as useContext2,
|
|
20485
|
-
useEffect,
|
|
20575
|
+
useEffect as useEffect2,
|
|
20486
20576
|
useMemo as useMemo4,
|
|
20487
|
-
useState as
|
|
20577
|
+
useState as useState3
|
|
20488
20578
|
} from "react";
|
|
20489
20579
|
import { jsx as jsx73, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
20490
20580
|
var HistoryContext = createContext2(
|
|
@@ -20531,15 +20621,15 @@ var HistoryProvider = ({ children }) => {
|
|
|
20531
20621
|
const { evm, solana } = useWallet();
|
|
20532
20622
|
const { address } = evm;
|
|
20533
20623
|
const { address: solanaAddress } = solana;
|
|
20534
|
-
const [solanaHistory, setSolanaHistory] =
|
|
20535
|
-
const [history, setHistory] =
|
|
20536
|
-
const [historyLoadedOnce, setHistoryLoadedOnce] =
|
|
20537
|
-
const [solanaHistoryLoadedOnce, setSolanaHistoryLoadedOnce] =
|
|
20624
|
+
const [solanaHistory, setSolanaHistory] = useState3([]);
|
|
20625
|
+
const [history, setHistory] = useState3([]);
|
|
20626
|
+
const [historyLoadedOnce, setHistoryLoadedOnce] = useState3(false);
|
|
20627
|
+
const [solanaHistoryLoadedOnce, setSolanaHistoryLoadedOnce] = useState3(false);
|
|
20538
20628
|
const { enqueueSnackbar, closeSnackbar } = useSnackbar();
|
|
20539
20629
|
const { debounce: getHistoryDebounce } = useDebounce({
|
|
20540
20630
|
delayMs: 600
|
|
20541
20631
|
});
|
|
20542
|
-
|
|
20632
|
+
useEffect2(() => {
|
|
20543
20633
|
if (!isServer) {
|
|
20544
20634
|
localStorage.removeItem("transactions-history");
|
|
20545
20635
|
}
|
|
@@ -20579,7 +20669,7 @@ var HistoryProvider = ({ children }) => {
|
|
|
20579
20669
|
setSolanaHistoryLoadedOnce(true);
|
|
20580
20670
|
}
|
|
20581
20671
|
};
|
|
20582
|
-
|
|
20672
|
+
useEffect2(() => {
|
|
20583
20673
|
if (solanaAddress) {
|
|
20584
20674
|
fetchSolanaHistory();
|
|
20585
20675
|
} else {
|
|
@@ -20684,7 +20774,7 @@ var HistoryProvider = ({ children }) => {
|
|
|
20684
20774
|
setHistoryLoadedOnce(true);
|
|
20685
20775
|
}
|
|
20686
20776
|
}, [address, enqueueSnackbar]);
|
|
20687
|
-
|
|
20777
|
+
useEffect2(() => {
|
|
20688
20778
|
if (!historyLoadedOnce) {
|
|
20689
20779
|
getHistoryDebounce(fetchHistory);
|
|
20690
20780
|
}
|
|
@@ -20771,7 +20861,7 @@ var HistoryProvider = ({ children }) => {
|
|
|
20771
20861
|
},
|
|
20772
20862
|
[showSnackbarForDoneTx]
|
|
20773
20863
|
);
|
|
20774
|
-
|
|
20864
|
+
useEffect2(() => {
|
|
20775
20865
|
setHistoryLoadedOnce(false);
|
|
20776
20866
|
setSolanaHistoryLoadedOnce(false);
|
|
20777
20867
|
setHistory([]);
|
|
@@ -20848,10 +20938,10 @@ import {
|
|
|
20848
20938
|
createContext as createContext3,
|
|
20849
20939
|
useCallback as useCallback6,
|
|
20850
20940
|
useContext as useContext3,
|
|
20851
|
-
useEffect as
|
|
20941
|
+
useEffect as useEffect3,
|
|
20852
20942
|
useMemo as useMemo5,
|
|
20853
20943
|
useRef as useRef2,
|
|
20854
|
-
useState as
|
|
20944
|
+
useState as useState4
|
|
20855
20945
|
} from "react";
|
|
20856
20946
|
|
|
20857
20947
|
// src/utils/validation.ts
|
|
@@ -21222,50 +21312,50 @@ var SwapProvider = ({
|
|
|
21222
21312
|
const { evm, solana } = useWallet();
|
|
21223
21313
|
const { address: evmAddress, chainId: walletChainId } = evm;
|
|
21224
21314
|
const { address: solanaAddress } = solana;
|
|
21225
|
-
const [isInitialStateSet, setIsInitialStateSet] =
|
|
21226
|
-
const [tab, setTab] =
|
|
21227
|
-
const [error, setError] =
|
|
21228
|
-
const [activePicker, setActivePicker] =
|
|
21229
|
-
const [expressDelivery, setExpressDelivery] =
|
|
21230
|
-
const [slippage, setSlippage] =
|
|
21231
|
-
const [infiniteApproval, setInfiniteApproval] =
|
|
21315
|
+
const [isInitialStateSet, setIsInitialStateSet] = useState4(false);
|
|
21316
|
+
const [tab, setTab] = useState4(init2.tab);
|
|
21317
|
+
const [error, setError] = useState4(init2.error);
|
|
21318
|
+
const [activePicker, setActivePicker] = useState4(init2.activePicker);
|
|
21319
|
+
const [expressDelivery, setExpressDelivery] = useState4(init2.expressDelivery);
|
|
21320
|
+
const [slippage, setSlippage] = useState4(init2.slippage);
|
|
21321
|
+
const [infiniteApproval, setInfiniteApproval] = useState4(
|
|
21232
21322
|
init2.infiniteApproval
|
|
21233
21323
|
);
|
|
21234
|
-
const [srcChain, setSrcChain] =
|
|
21235
|
-
const [dstChain, setDstChain] =
|
|
21236
|
-
const [feeToken, setFeeToken] =
|
|
21237
|
-
const [srcToken, setSrcToken] =
|
|
21238
|
-
const [dstToken, setDstToken] =
|
|
21239
|
-
const [tokenPrices, setTokenPrices] =
|
|
21240
|
-
const [tokenBalances, setTokenBalances] =
|
|
21241
|
-
const [customTokensVersion, setCustomTokensVersion] =
|
|
21242
|
-
const [bridgeTokens, setBridgeTokens] =
|
|
21243
|
-
const [srcValue, setSrcValue] =
|
|
21244
|
-
const [srcTokenBalanceWei, setSrcTokenBalanceWei] =
|
|
21324
|
+
const [srcChain, setSrcChain] = useState4(init2.srcChain);
|
|
21325
|
+
const [dstChain, setDstChain] = useState4(init2.dstChain);
|
|
21326
|
+
const [feeToken, setFeeToken] = useState4(init2.feeToken);
|
|
21327
|
+
const [srcToken, setSrcToken] = useState4(init2.srcToken);
|
|
21328
|
+
const [dstToken, setDstToken] = useState4(init2.dstToken);
|
|
21329
|
+
const [tokenPrices, setTokenPrices] = useState4(init2.tokenPrices);
|
|
21330
|
+
const [tokenBalances, setTokenBalances] = useState4({});
|
|
21331
|
+
const [customTokensVersion, setCustomTokensVersion] = useState4(0);
|
|
21332
|
+
const [bridgeTokens, setBridgeTokens] = useState4([]);
|
|
21333
|
+
const [srcValue, setSrcValue] = useState4(init2.srcValue);
|
|
21334
|
+
const [srcTokenBalanceWei, setSrcTokenBalanceWei] = useState4(
|
|
21245
21335
|
init2.srcTokenBalanceWei
|
|
21246
21336
|
);
|
|
21247
|
-
const [srcChainTokensOptions, setSrcChainTokensOptions] =
|
|
21337
|
+
const [srcChainTokensOptions, setSrcChainTokensOptions] = useState4(
|
|
21248
21338
|
init2.srcChainTokensOptions
|
|
21249
21339
|
);
|
|
21250
|
-
const [dstChainTokensOptions, setDstChainTokensOptions] =
|
|
21340
|
+
const [dstChainTokensOptions, setDstChainTokensOptions] = useState4(
|
|
21251
21341
|
init2.dstChainTokensOptions
|
|
21252
21342
|
);
|
|
21253
|
-
const [srcChainOtherTokensOptions, setSrcChainOtherTokensOptions] =
|
|
21343
|
+
const [srcChainOtherTokensOptions, setSrcChainOtherTokensOptions] = useState4(
|
|
21254
21344
|
init2.srcChainOtherTokensOptions
|
|
21255
21345
|
);
|
|
21256
|
-
const [dstChainOtherTokensOptions, setDstChainOtherTokensOptions] =
|
|
21346
|
+
const [dstChainOtherTokensOptions, setDstChainOtherTokensOptions] = useState4(
|
|
21257
21347
|
init2.dstChainOtherTokensOptions
|
|
21258
21348
|
);
|
|
21259
|
-
const [srcChainOptions, setSrcChainOptions] =
|
|
21260
|
-
const [dstChainOptions, setDstChainOptions] =
|
|
21261
|
-
const [isFetchingBalance, setIsFetchingBalance] =
|
|
21349
|
+
const [srcChainOptions, setSrcChainOptions] = useState4([]);
|
|
21350
|
+
const [dstChainOptions, setDstChainOptions] = useState4([]);
|
|
21351
|
+
const [isFetchingBalance, setIsFetchingBalance] = useState4(
|
|
21262
21352
|
init2.isFetchingBalance
|
|
21263
21353
|
);
|
|
21264
|
-
const [isFetchingBalances, setIsFetchingBalances] =
|
|
21354
|
+
const [isFetchingBalances, setIsFetchingBalances] = useState4(
|
|
21265
21355
|
init2.isFetchingBalances
|
|
21266
21356
|
);
|
|
21267
|
-
const [isFetchingRoute, setFetchingRoute] =
|
|
21268
|
-
const [route, setRoute] =
|
|
21357
|
+
const [isFetchingRoute, setFetchingRoute] = useState4(init2.isFetchingRoute);
|
|
21358
|
+
const [route, setRoute] = useState4(init2.route);
|
|
21269
21359
|
const routeAbortController = useRef2(null);
|
|
21270
21360
|
const refreshSelectedTokenBalanceNonce = useRef2(crypto.randomUUID());
|
|
21271
21361
|
const prevWalletAddresses = useRef2(void 0);
|
|
@@ -21391,10 +21481,15 @@ var SwapProvider = ({
|
|
|
21391
21481
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
21392
21482
|
[route]
|
|
21393
21483
|
);
|
|
21394
|
-
const isExpressDeliveryActive = useMemo5(
|
|
21395
|
-
|
|
21396
|
-
|
|
21397
|
-
|
|
21484
|
+
const isExpressDeliveryActive = useMemo5(() => {
|
|
21485
|
+
if (!route) {
|
|
21486
|
+
return false;
|
|
21487
|
+
}
|
|
21488
|
+
if (typeof route.expressDelivery === "boolean") {
|
|
21489
|
+
return route.expressDelivery;
|
|
21490
|
+
}
|
|
21491
|
+
return expressDelivery && BigNumber.from(route.xSwapFees?.expressDeliveryFee || "0").gt("0");
|
|
21492
|
+
}, [expressDelivery, route]);
|
|
21398
21493
|
const isAsyncDataLoaded = useMemo5(
|
|
21399
21494
|
() => supportedChains.length > 0 && bridgeTokens.length > 0,
|
|
21400
21495
|
[supportedChains, bridgeTokens]
|
|
@@ -21632,7 +21727,7 @@ var SwapProvider = ({
|
|
|
21632
21727
|
},
|
|
21633
21728
|
[supportedChains]
|
|
21634
21729
|
);
|
|
21635
|
-
|
|
21730
|
+
useEffect3(() => {
|
|
21636
21731
|
if (supportedChains.length > 0) {
|
|
21637
21732
|
const chainIds = supportedChains.map((chain) => chain.chainId);
|
|
21638
21733
|
getPrices({ chainId: chainIds }).then((prices) => {
|
|
@@ -21640,22 +21735,22 @@ var SwapProvider = ({
|
|
|
21640
21735
|
});
|
|
21641
21736
|
}
|
|
21642
21737
|
}, [supportedChains]);
|
|
21643
|
-
|
|
21738
|
+
useEffect3(() => {
|
|
21644
21739
|
(async () => {
|
|
21645
21740
|
const data = await getBridgeTokens();
|
|
21646
21741
|
setBridgeTokens(data);
|
|
21647
21742
|
})();
|
|
21648
21743
|
}, []);
|
|
21649
|
-
|
|
21744
|
+
useEffect3(() => {
|
|
21650
21745
|
quoteRoute();
|
|
21651
21746
|
}, [quoteRoute]);
|
|
21652
|
-
|
|
21747
|
+
useEffect3(() => {
|
|
21653
21748
|
const walletAddresses = `${evmAddress ?? ""}:${solanaAddress ?? ""}`;
|
|
21654
21749
|
const walletChanged = prevWalletAddresses.current !== void 0 && prevWalletAddresses.current !== walletAddresses;
|
|
21655
21750
|
prevWalletAddresses.current = walletAddresses;
|
|
21656
21751
|
refreshBalance(walletChanged ? { forceRpc: true } : void 0);
|
|
21657
21752
|
}, [refreshBalance, evmAddress, solanaAddress]);
|
|
21658
|
-
|
|
21753
|
+
useEffect3(() => {
|
|
21659
21754
|
let isCancelled = false;
|
|
21660
21755
|
if ((evmAddress || solanaAddress) && supportedChains.length > 0) {
|
|
21661
21756
|
setIsFetchingBalances(true);
|
|
@@ -21674,7 +21769,7 @@ var SwapProvider = ({
|
|
|
21674
21769
|
isCancelled = true;
|
|
21675
21770
|
};
|
|
21676
21771
|
}, [evmAddress, solanaAddress, supportedChains.length, customTokensVersion]);
|
|
21677
|
-
|
|
21772
|
+
useEffect3(() => {
|
|
21678
21773
|
if (srcChain?.chainId === "mainnet-beta") {
|
|
21679
21774
|
setFeeToken(
|
|
21680
21775
|
srcChain?.tokens.find(
|
|
@@ -21689,7 +21784,7 @@ var SwapProvider = ({
|
|
|
21689
21784
|
);
|
|
21690
21785
|
}
|
|
21691
21786
|
}, [srcChain]);
|
|
21692
|
-
|
|
21787
|
+
useEffect3(() => {
|
|
21693
21788
|
(async () => {
|
|
21694
21789
|
const isSingleChainSelected = dstChain?.chainId === srcChain?.chainId;
|
|
21695
21790
|
const srcTokenOptions = getTokenOptions(
|
|
@@ -21758,7 +21853,7 @@ var SwapProvider = ({
|
|
|
21758
21853
|
dstToken?.symbol,
|
|
21759
21854
|
tokenBalances
|
|
21760
21855
|
]);
|
|
21761
|
-
|
|
21856
|
+
useEffect3(() => {
|
|
21762
21857
|
const baseChains = supportedChains.filter(
|
|
21763
21858
|
({ web3Environment, swapSupported, bridgeSupported }) => web3Environment === "mainnet" /* MAINNET */ && (bridgeUI && bridgeSupported || !bridgeUI && swapSupported)
|
|
21764
21859
|
);
|
|
@@ -21813,7 +21908,7 @@ var SwapProvider = ({
|
|
|
21813
21908
|
dstToken,
|
|
21814
21909
|
bridgeTokensDictionary
|
|
21815
21910
|
]);
|
|
21816
|
-
|
|
21911
|
+
useEffect3(() => {
|
|
21817
21912
|
const prevWalletChainId = prevFollowedWalletChainId.current;
|
|
21818
21913
|
prevFollowedWalletChainId.current = walletChainId;
|
|
21819
21914
|
if (!walletChainId || !prevWalletChainId || prevWalletChainId === walletChainId || !isInitialStateSet || integrationConfig?.srcChainId || bridgeUI) {
|
|
@@ -21832,7 +21927,7 @@ var SwapProvider = ({
|
|
|
21832
21927
|
integrationConfig?.srcChainId,
|
|
21833
21928
|
bridgeUI
|
|
21834
21929
|
]);
|
|
21835
|
-
|
|
21930
|
+
useEffect3(() => {
|
|
21836
21931
|
if (!isInitialStateSet) {
|
|
21837
21932
|
return;
|
|
21838
21933
|
}
|
|
@@ -21848,7 +21943,7 @@ var SwapProvider = ({
|
|
|
21848
21943
|
setDstChain(void 0);
|
|
21849
21944
|
setIsInitialStateSet(false);
|
|
21850
21945
|
}, [bridgeUI]);
|
|
21851
|
-
|
|
21946
|
+
useEffect3(() => {
|
|
21852
21947
|
if (isInitialStateSet || !supportedChains || supportedChains.length === 0 || !bridgeTokensDictionary) {
|
|
21853
21948
|
return;
|
|
21854
21949
|
}
|
|
@@ -21913,7 +22008,7 @@ var SwapProvider = ({
|
|
|
21913
22008
|
isInitialStateSet,
|
|
21914
22009
|
bridgeTokensDictionary
|
|
21915
22010
|
]);
|
|
21916
|
-
|
|
22011
|
+
useEffect3(() => {
|
|
21917
22012
|
if (!bridgeTokensDictionary || supportedChains.length === 0 || !isInitialStateSet || // A bridgeUI-change reset is in flight: this closure still holds the
|
|
21918
22013
|
// previous mode's route, so mapping it against the new mode would
|
|
21919
22014
|
// resurrect it. The re-init applies the new mode's defaults instead.
|
|
@@ -21949,7 +22044,7 @@ var SwapProvider = ({
|
|
|
21949
22044
|
bridgeTokensDictionary,
|
|
21950
22045
|
isInitialStateSet
|
|
21951
22046
|
]);
|
|
21952
|
-
|
|
22047
|
+
useEffect3(() => {
|
|
21953
22048
|
if (!isInitialStateSet || initPending.current) {
|
|
21954
22049
|
return;
|
|
21955
22050
|
}
|
|
@@ -21959,7 +22054,7 @@ var SwapProvider = ({
|
|
|
21959
22054
|
window.xPayOnDstChainChange(dstChain?.chainId);
|
|
21960
22055
|
}
|
|
21961
22056
|
}, [integrationConfig.onDstChainChange, dstChain]);
|
|
21962
|
-
|
|
22057
|
+
useEffect3(() => {
|
|
21963
22058
|
if (!isInitialStateSet || initPending.current) {
|
|
21964
22059
|
return;
|
|
21965
22060
|
}
|
|
@@ -21970,7 +22065,7 @@ var SwapProvider = ({
|
|
|
21970
22065
|
window.xPayOnDstTokenChange(token);
|
|
21971
22066
|
}
|
|
21972
22067
|
}, [integrationConfig.onDstTokenChange, dstToken]);
|
|
21973
|
-
|
|
22068
|
+
useEffect3(() => {
|
|
21974
22069
|
if (!isInitialStateSet || initPending.current) {
|
|
21975
22070
|
return;
|
|
21976
22071
|
}
|
|
@@ -21980,7 +22075,7 @@ var SwapProvider = ({
|
|
|
21980
22075
|
window.xPayOnSrcChainChange(srcChain?.chainId);
|
|
21981
22076
|
}
|
|
21982
22077
|
}, [integrationConfig.onSrcChainChange, srcChain]);
|
|
21983
|
-
|
|
22078
|
+
useEffect3(() => {
|
|
21984
22079
|
if (!isInitialStateSet || initPending.current) {
|
|
21985
22080
|
return;
|
|
21986
22081
|
}
|
|
@@ -22171,7 +22266,7 @@ function useTransaction() {
|
|
|
22171
22266
|
}
|
|
22172
22267
|
|
|
22173
22268
|
// src/hooks/networkManagement/useNetworks.ts
|
|
22174
|
-
import { useEffect as
|
|
22269
|
+
import { useEffect as useEffect4, useMemo as useMemo8, useState as useState5 } from "react";
|
|
22175
22270
|
import { useAccount as useAccount2 } from "wagmi";
|
|
22176
22271
|
|
|
22177
22272
|
// src/hooks/networkManagement/clientToSigner.tsx
|
|
@@ -22190,9 +22285,9 @@ async function useEthersSigner({ chainId } = {}) {
|
|
|
22190
22285
|
|
|
22191
22286
|
// src/hooks/networkManagement/useNetworks.ts
|
|
22192
22287
|
var useNetworks = () => {
|
|
22193
|
-
const [signer, setSigner] =
|
|
22288
|
+
const [signer, setSigner] = useState5();
|
|
22194
22289
|
const ethersSigner = useEthersSigner();
|
|
22195
|
-
|
|
22290
|
+
useEffect4(() => {
|
|
22196
22291
|
ethersSigner.then((signer2) => setSigner(signer2));
|
|
22197
22292
|
}, [ethersSigner]);
|
|
22198
22293
|
const account = useAccount2();
|
|
@@ -22216,7 +22311,7 @@ var useNetworks_default = useNetworks;
|
|
|
22216
22311
|
import { useCallback as useCallback8 } from "react";
|
|
22217
22312
|
|
|
22218
22313
|
// src/components/Swap/SwapView/FeesPanel/index.tsx
|
|
22219
|
-
import { useEffect as
|
|
22314
|
+
import { useEffect as useEffect5, useMemo as useMemo9, useState as useState6 } from "react";
|
|
22220
22315
|
|
|
22221
22316
|
// src/components/Swap/SwapView/FeesPanel/DeliveryInfo/index.tsx
|
|
22222
22317
|
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
@@ -22246,7 +22341,10 @@ import { jsx as jsx78 } from "react/jsx-runtime";
|
|
|
22246
22341
|
var Fees = ({
|
|
22247
22342
|
solanaBridgeFee
|
|
22248
22343
|
}) => {
|
|
22249
|
-
const { route, slippage, feeToken, dstToken
|
|
22344
|
+
const { route, slippage, feeToken, dstToken } = useSwapContext();
|
|
22345
|
+
const expressDeliveryFee = safeBigNumberFrom(
|
|
22346
|
+
route?.xSwapFees.expressDeliveryFee || "0"
|
|
22347
|
+
);
|
|
22250
22348
|
const fees = [
|
|
22251
22349
|
{
|
|
22252
22350
|
name: "CCIP Fee: ",
|
|
@@ -22264,11 +22362,11 @@ var Fees = ({
|
|
|
22264
22362
|
precisionFractionalPlaces: 5
|
|
22265
22363
|
}) || 0} ${feeToken?.symbol || ""}`
|
|
22266
22364
|
},
|
|
22267
|
-
...
|
|
22365
|
+
...expressDeliveryFee.gt(0) ? [
|
|
22268
22366
|
{
|
|
22269
22367
|
name: "Express delivery Fee: ",
|
|
22270
22368
|
value: `${weiToHumanReadable({
|
|
22271
|
-
amount:
|
|
22369
|
+
amount: expressDeliveryFee.toString(),
|
|
22272
22370
|
decimals: feeToken?.decimals || 18,
|
|
22273
22371
|
precisionFractionalPlaces: 5
|
|
22274
22372
|
}) || 0} ${feeToken?.symbol || ""}`
|
|
@@ -24410,9 +24508,9 @@ import { BN as BN15 } from "@coral-xyz/anchor";
|
|
|
24410
24508
|
import { useWallet as useWallet2 } from "@solana/wallet-adapter-react";
|
|
24411
24509
|
import { Fragment as Fragment2, jsx as jsx79, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
24412
24510
|
var FeesPanel = () => {
|
|
24413
|
-
const [expanded, setExpanded] =
|
|
24414
|
-
const [isFetchingSolanaFee, setIsFetchingSolanaFee] =
|
|
24415
|
-
const [solanaBridgeFee, setSolanaBridgeFee] =
|
|
24511
|
+
const [expanded, setExpanded] = useState6(false);
|
|
24512
|
+
const [isFetchingSolanaFee, setIsFetchingSolanaFee] = useState6(false);
|
|
24513
|
+
const [solanaBridgeFee, setSolanaBridgeFee] = useState6(null);
|
|
24416
24514
|
const {
|
|
24417
24515
|
route,
|
|
24418
24516
|
feeToken,
|
|
@@ -24429,7 +24527,7 @@ var FeesPanel = () => {
|
|
|
24429
24527
|
evm: { address: evmAddress }
|
|
24430
24528
|
}
|
|
24431
24529
|
} = useNetworks_default();
|
|
24432
|
-
|
|
24530
|
+
useEffect5(() => {
|
|
24433
24531
|
const fetchSolanaBridgeFee = async () => {
|
|
24434
24532
|
if (bridgeUI && srcChain?.ecosystem === "solana" /* SOLANA */ && dstChain?.ccipChainId && srcToken && srcValueWei && publicKey9 && evmAddress) {
|
|
24435
24533
|
try {
|
|
@@ -24703,7 +24801,8 @@ var TxOverview = ({ onCloseClick }) => {
|
|
|
24703
24801
|
dstValueWei,
|
|
24704
24802
|
route,
|
|
24705
24803
|
refreshBalance,
|
|
24706
|
-
bridgeUI
|
|
24804
|
+
bridgeUI,
|
|
24805
|
+
isExpressDeliveryActive
|
|
24707
24806
|
} = useSwapContext();
|
|
24708
24807
|
const {
|
|
24709
24808
|
txStatus,
|
|
@@ -24734,7 +24833,10 @@ var TxOverview = ({ onCloseClick }) => {
|
|
|
24734
24833
|
tokenAddress: srcToken.address,
|
|
24735
24834
|
tokenOutAddress: dstToken?.address,
|
|
24736
24835
|
tokenOutAmount: dstValueWei,
|
|
24737
|
-
|
|
24836
|
+
// Read the speed off the quote, never off the express-delivery fee: a fast
|
|
24837
|
+
// CCTP transfer pays Circle out of the bridged USDC and charges no express
|
|
24838
|
+
// fee, so the fee test used to promise 30 minutes for a 30-second transfer.
|
|
24839
|
+
estimatedDeliveryTimestamp: isExpressDeliveryActive ? Date.now() + EXPRESS_DELIVERY_TIME : Date.now() + (crosschainEstimationTimes?.[srcChain?.chainId]?.[dstChain?.chainId] || FALLBACK_CROSSCHAIN_ESTIMATION_TIME),
|
|
24738
24840
|
status: "IN_PROGRESS"
|
|
24739
24841
|
};
|
|
24740
24842
|
if (srcChain.chainId === dstChain.chainId) {
|
|
@@ -24801,7 +24903,8 @@ var TxOverview = ({ onCloseClick }) => {
|
|
|
24801
24903
|
srcValueWei,
|
|
24802
24904
|
dstValueWei,
|
|
24803
24905
|
supportedChains,
|
|
24804
|
-
route
|
|
24906
|
+
route,
|
|
24907
|
+
isExpressDeliveryActive
|
|
24805
24908
|
]
|
|
24806
24909
|
);
|
|
24807
24910
|
const enqueueSwapTx = useCallback8(async () => {
|
|
@@ -25132,20 +25235,54 @@ async function checkAndDelegateTokenAuthority(connection, publicKey9, tokenMint,
|
|
|
25132
25235
|
}
|
|
25133
25236
|
}
|
|
25134
25237
|
|
|
25135
|
-
// src/components/Swap/SwapView/ConfirmationView/
|
|
25238
|
+
// src/components/Swap/SwapView/ConfirmationView/TxProgress/index.tsx
|
|
25239
|
+
import { useEffect as useEffect6, useMemo as useMemo12, useState as useState7 } from "react";
|
|
25136
25240
|
import { jsx as jsx84, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
25137
|
-
var
|
|
25138
|
-
|
|
25139
|
-
const
|
|
25241
|
+
var FAST_DELIVERY_GRACE_MS = 2 * 60 * 1e3;
|
|
25242
|
+
var formatElapsed = (ms) => {
|
|
25243
|
+
const totalSeconds = Math.floor(ms / 1e3);
|
|
25244
|
+
const minutes = Math.floor(totalSeconds / 60);
|
|
25245
|
+
const seconds = totalSeconds % 60;
|
|
25246
|
+
return `${minutes}:${seconds.toString().padStart(2, "0")}`;
|
|
25247
|
+
};
|
|
25248
|
+
var TxProgress = ({ onCloseClick, delivery }) => {
|
|
25249
|
+
const { srcChain, dstChain, isExpressDeliveryActive } = useSwapContext();
|
|
25250
|
+
const { txExplorerUrl } = useTxUIWrapper();
|
|
25251
|
+
const [now, setNow] = useState7(() => Date.now());
|
|
25252
|
+
useEffect6(() => {
|
|
25253
|
+
const ticker = setInterval(() => setNow(Date.now()), 1e3);
|
|
25254
|
+
return () => clearInterval(ticker);
|
|
25255
|
+
}, []);
|
|
25256
|
+
const elapsedMs = delivery.startedAt ? Math.max(0, now - delivery.startedAt) : 0;
|
|
25257
|
+
const isExpress = delivery.response?.expressDelivery ?? isExpressDeliveryActive;
|
|
25258
|
+
const estimatedMs = useMemo12(
|
|
25259
|
+
() => srcChain && dstChain && crosschainEstimationTimes?.[srcChain.chainId]?.[dstChain.chainId] || FALLBACK_CROSSCHAIN_ESTIMATION_TIME,
|
|
25260
|
+
[srcChain, dstChain]
|
|
25261
|
+
);
|
|
25262
|
+
const isSlow = elapsedMs > (isExpress ? FAST_DELIVERY_GRACE_MS : estimatedMs);
|
|
25263
|
+
const note = isSlow ? "This is taking longer than usual. Nothing is lost \u2014 the transfer is still on its way." : isExpress ? "Fast delivery is on: funds usually arrive within a minute." : `Funds can take up to ${Math.round(
|
|
25264
|
+
estimatedMs / 6e4
|
|
25265
|
+
)} minutes to arrive on ${dstChain?.displayName || "the destination chain"}.`;
|
|
25140
25266
|
return /* @__PURE__ */ jsxs34("div", { className: "flex flex-col gap-8 text-t_text_primary", children: [
|
|
25141
25267
|
/* @__PURE__ */ jsxs34("div", { className: "flex flex-col gap-2", children: [
|
|
25142
|
-
/* @__PURE__ */
|
|
25143
|
-
|
|
25144
|
-
|
|
25268
|
+
/* @__PURE__ */ jsx84("div", { className: "text-2xl font-medium leading-8 tracking-[0.01em]", children: "Delivering Funds" }),
|
|
25269
|
+
/* @__PURE__ */ jsx84("div", { className: "text-sm leading-5 tracking-[0.01em] text-t_text_primary text-opacity-50", children: note }),
|
|
25270
|
+
/* @__PURE__ */ jsx84("div", { className: "text-sm leading-5 tracking-[0.01em] text-t_text_primary text-opacity-25", children: "You can close this window \u2014 the transfer completes on its own." })
|
|
25271
|
+
] }),
|
|
25272
|
+
/* @__PURE__ */ jsx84(TokenTiles, {}),
|
|
25273
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex flex-col rounded-xl bg-t_bg_tertiary bg-opacity-[0.02]", children: [
|
|
25274
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-between gap-4 px-4 sm:px-6 py-4 rounded-lg", children: [
|
|
25275
|
+
/* @__PURE__ */ jsx84("div", { className: "text-sm leading-5 tracking-[0.01em] text-t_text_primary text-opacity-50", children: `Swap confirmed on ${srcChain?.displayName || "the source chain"}` }),
|
|
25276
|
+
/* @__PURE__ */ jsx84(CheckCircleThinIcon, { className: "w-6 h-6 shrink-0 text-[#6AE89B]" })
|
|
25145
25277
|
] }),
|
|
25146
|
-
|
|
25278
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-between gap-4 px-4 sm:px-6 py-4 rounded-lg bg-gradient-to-r from-transparent via-t_bg_tertiary/5 to-transparent", children: [
|
|
25279
|
+
/* @__PURE__ */ jsx84("div", { className: "text-sm leading-5 tracking-[0.01em] text-t_text_primary text-opacity-75", children: `Waiting for funds on ${dstChain?.displayName || "the destination chain"}` }),
|
|
25280
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-3 shrink-0", children: [
|
|
25281
|
+
/* @__PURE__ */ jsx84("span", { className: "text-sm leading-5 tracking-[0.01em] tabular-nums text-t_text_primary text-opacity-50", children: formatElapsed(elapsedMs) }),
|
|
25282
|
+
/* @__PURE__ */ jsx84(ProgressRingThinIcon, { className: "w-6 h-6 shrink-0 animate-spin-slow text-t_text_primary" })
|
|
25283
|
+
] })
|
|
25284
|
+
] })
|
|
25147
25285
|
] }),
|
|
25148
|
-
!txMsg && /* @__PURE__ */ jsx84(TokenTiles, {}),
|
|
25149
25286
|
/* @__PURE__ */ jsx84("div", { className: "h-px w-full gradient-sections-separator-container" }),
|
|
25150
25287
|
/* @__PURE__ */ jsx84(
|
|
25151
25288
|
"button",
|
|
@@ -25153,10 +25290,10 @@ var TxResult = ({ onCloseClick }) => {
|
|
|
25153
25290
|
type: "button",
|
|
25154
25291
|
onClick: onCloseClick,
|
|
25155
25292
|
className: "w-full px-6 py-3 rounded-lg border-none cursor-pointer bg-t_bg_tertiary bg-opacity-5 text-sm font-medium leading-6 tracking-[0.01em] text-t_text_primary text-opacity-80 hover:bg-opacity-10 transition-colors",
|
|
25156
|
-
children: "
|
|
25293
|
+
children: "Close"
|
|
25157
25294
|
}
|
|
25158
25295
|
),
|
|
25159
|
-
|
|
25296
|
+
/* @__PURE__ */ jsxs34("div", { className: "w-full flex gap-3 items-center", children: [
|
|
25160
25297
|
/* @__PURE__ */ jsxs34(
|
|
25161
25298
|
"a",
|
|
25162
25299
|
{
|
|
@@ -25176,11 +25313,112 @@ var TxResult = ({ onCloseClick }) => {
|
|
|
25176
25313
|
] });
|
|
25177
25314
|
};
|
|
25178
25315
|
|
|
25316
|
+
// src/components/Swap/SwapView/ConfirmationView/TxResult/index.tsx
|
|
25317
|
+
import { useMemo as useMemo13 } from "react";
|
|
25318
|
+
import { jsx as jsx85, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
25319
|
+
var TxResult = ({ onCloseClick, delivery }) => {
|
|
25320
|
+
const { txError, txExplorerUrl, txMsg } = useTxUIWrapper();
|
|
25321
|
+
const { isExpressDeliveryActive, srcChain, dstChain, supportedChains } = useSwapContext();
|
|
25322
|
+
const isCrossChain = !!srcChain && !!dstChain && srcChain.chainId !== dstChain.chainId;
|
|
25323
|
+
const failed = !!txError || !!delivery?.isFailed;
|
|
25324
|
+
const partiallyFailed = !!delivery?.isPartiallyFailed;
|
|
25325
|
+
const targetTx = delivery?.response?.targetTx;
|
|
25326
|
+
const targetExplorerUrl = useMemo13(() => {
|
|
25327
|
+
if (!targetTx) {
|
|
25328
|
+
return void 0;
|
|
25329
|
+
}
|
|
25330
|
+
const explorer = supportedChains.find(
|
|
25331
|
+
(chain) => chain.chainId === targetTx.chainId && chain.ecosystem === "evm" /* EVM */
|
|
25332
|
+
)?.transactionExplorer;
|
|
25333
|
+
return explorer ? `${explorer}/${targetTx.hash}` : void 0;
|
|
25334
|
+
}, [supportedChains, targetTx]);
|
|
25335
|
+
const note = useMemo13(() => {
|
|
25336
|
+
if (delivery?.isFailed) {
|
|
25337
|
+
return `The transaction failed on ${srcChain?.displayName || "the source chain"}.`;
|
|
25338
|
+
}
|
|
25339
|
+
if (partiallyFailed) {
|
|
25340
|
+
return `The swap on ${dstChain?.displayName || "the destination chain"} could not be completed, so the bridged tokens were sent to your wallet instead.`;
|
|
25341
|
+
}
|
|
25342
|
+
if (delivery?.isDelivered) {
|
|
25343
|
+
return `Funds delivered on ${dstChain?.displayName || "the destination chain"}.`;
|
|
25344
|
+
}
|
|
25345
|
+
if (isCrossChain) {
|
|
25346
|
+
return `Approximated time of delivery: ${isExpressDeliveryActive ? "30 sec" : "30 min"}`;
|
|
25347
|
+
}
|
|
25348
|
+
return void 0;
|
|
25349
|
+
}, [
|
|
25350
|
+
delivery?.isDelivered,
|
|
25351
|
+
delivery?.isFailed,
|
|
25352
|
+
partiallyFailed,
|
|
25353
|
+
isCrossChain,
|
|
25354
|
+
isExpressDeliveryActive,
|
|
25355
|
+
srcChain?.displayName,
|
|
25356
|
+
dstChain?.displayName
|
|
25357
|
+
]);
|
|
25358
|
+
return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-8 text-t_text_primary", children: [
|
|
25359
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-2", children: [
|
|
25360
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-3", children: [
|
|
25361
|
+
/* @__PURE__ */ jsx85("div", { className: "text-2xl font-medium leading-8 tracking-[0.01em]", children: failed ? "Transaction Error" : partiallyFailed ? "Partially Completed" : "Transaction Success" }),
|
|
25362
|
+
failed ? /* @__PURE__ */ jsx85(ErrorCircleThinIcon, { className: "w-6 h-6 shrink-0 text-[#F44336]" }) : partiallyFailed ? /* @__PURE__ */ jsx85(ErrorCircleThinIcon, { className: "w-6 h-6 shrink-0 text-t_warning_light" }) : /* @__PURE__ */ jsx85(CheckCircleThinIcon, { className: "w-6 h-6 shrink-0 text-[#6AE89B]" })
|
|
25363
|
+
] }),
|
|
25364
|
+
txError ? /* @__PURE__ */ jsx85("div", { className: "text-sm leading-5 tracking-[0.01em] text-t_text_primary text-opacity-50", children: txError }) : !txMsg && !!note && /* @__PURE__ */ jsx85("div", { className: "text-sm leading-5 tracking-[0.01em] text-t_text_primary text-opacity-50", children: note })
|
|
25365
|
+
] }),
|
|
25366
|
+
!txMsg && /* @__PURE__ */ jsx85(TokenTiles, {}),
|
|
25367
|
+
/* @__PURE__ */ jsx85("div", { className: "h-px w-full gradient-sections-separator-container" }),
|
|
25368
|
+
/* @__PURE__ */ jsx85(
|
|
25369
|
+
"button",
|
|
25370
|
+
{
|
|
25371
|
+
type: "button",
|
|
25372
|
+
onClick: onCloseClick,
|
|
25373
|
+
className: "w-full px-6 py-3 rounded-lg border-none cursor-pointer bg-t_bg_tertiary bg-opacity-5 text-sm font-medium leading-6 tracking-[0.01em] text-t_text_primary text-opacity-80 hover:bg-opacity-10 transition-colors",
|
|
25374
|
+
children: "Continue"
|
|
25375
|
+
}
|
|
25376
|
+
),
|
|
25377
|
+
!txMsg && !txError && /* @__PURE__ */ jsxs35("div", { className: "w-full flex gap-3 items-center", children: [
|
|
25378
|
+
/* @__PURE__ */ jsxs35(
|
|
25379
|
+
"a",
|
|
25380
|
+
{
|
|
25381
|
+
href: txExplorerUrl,
|
|
25382
|
+
target: "_blank",
|
|
25383
|
+
rel: "noreferrer",
|
|
25384
|
+
className: "flex items-center gap-1.5 text-sm text-t_text_primary text-opacity-25 hover:text-opacity-50 transition-colors",
|
|
25385
|
+
children: [
|
|
25386
|
+
"View On Explorer",
|
|
25387
|
+
" ",
|
|
25388
|
+
/* @__PURE__ */ jsx85("div", { className: "w-6 h-6 bg-t_bg_tertiary bg-opacity-5 rounded-[4px] flex items-center justify-center", children: /* @__PURE__ */ jsx85(RedirectThinIcon, { className: "w-3 h-3" }) })
|
|
25389
|
+
]
|
|
25390
|
+
}
|
|
25391
|
+
),
|
|
25392
|
+
targetExplorerUrl && /* @__PURE__ */ jsxs35(
|
|
25393
|
+
"a",
|
|
25394
|
+
{
|
|
25395
|
+
href: targetExplorerUrl,
|
|
25396
|
+
target: "_blank",
|
|
25397
|
+
rel: "noreferrer",
|
|
25398
|
+
className: "flex items-center gap-1.5 text-sm text-t_text_primary text-opacity-25 hover:text-opacity-50 transition-colors",
|
|
25399
|
+
children: [
|
|
25400
|
+
"View Delivery",
|
|
25401
|
+
" ",
|
|
25402
|
+
/* @__PURE__ */ jsx85("div", { className: "w-6 h-6 bg-t_bg_tertiary bg-opacity-5 rounded-[4px] flex items-center justify-center", children: /* @__PURE__ */ jsx85(RedirectThinIcon, { className: "w-3 h-3" }) })
|
|
25403
|
+
]
|
|
25404
|
+
}
|
|
25405
|
+
),
|
|
25406
|
+
/* @__PURE__ */ jsx85("div", { className: "flex-1 h-px bg-t_text_primary bg-opacity-10" })
|
|
25407
|
+
] })
|
|
25408
|
+
] });
|
|
25409
|
+
};
|
|
25410
|
+
|
|
25179
25411
|
// src/components/Swap/SwapView/ConfirmationView/index.tsx
|
|
25180
|
-
import { jsx as
|
|
25181
|
-
var ConfirmationView = ({ onCloseClick }) => {
|
|
25412
|
+
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
25413
|
+
var ConfirmationView = ({ onCloseClick, delivery }) => {
|
|
25182
25414
|
const { txStatus, txError } = useTxUIWrapper();
|
|
25183
|
-
|
|
25415
|
+
if (txError) {
|
|
25416
|
+
return /* @__PURE__ */ jsx86(TxResult, { onCloseClick, delivery });
|
|
25417
|
+
}
|
|
25418
|
+
if (txStatus !== 5 /* COMPLETED */) {
|
|
25419
|
+
return /* @__PURE__ */ jsx86(TxOverview, { onCloseClick });
|
|
25420
|
+
}
|
|
25421
|
+
return delivery.isPolling ? /* @__PURE__ */ jsx86(TxProgress, { onCloseClick, delivery }) : /* @__PURE__ */ jsx86(TxResult, { onCloseClick, delivery });
|
|
25184
25422
|
};
|
|
25185
25423
|
|
|
25186
25424
|
// src/context/TxUIWrapper.tsx
|
|
@@ -25189,12 +25427,12 @@ import {
|
|
|
25189
25427
|
createContext as createContext5,
|
|
25190
25428
|
useCallback as useCallback9,
|
|
25191
25429
|
useContext as useContext5,
|
|
25192
|
-
useEffect as
|
|
25193
|
-
useMemo as
|
|
25430
|
+
useEffect as useEffect7,
|
|
25431
|
+
useMemo as useMemo14,
|
|
25194
25432
|
useRef as useRef3,
|
|
25195
|
-
useState as
|
|
25433
|
+
useState as useState8
|
|
25196
25434
|
} from "react";
|
|
25197
|
-
import { jsx as
|
|
25435
|
+
import { jsx as jsx87, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
25198
25436
|
var TxUIWrapperContext = createContext5({});
|
|
25199
25437
|
var TxUIWrapper = ({ children }) => {
|
|
25200
25438
|
const { evm, solana } = useWallet();
|
|
@@ -25202,31 +25440,45 @@ var TxUIWrapper = ({ children }) => {
|
|
|
25202
25440
|
const { chainId: solanaChainId } = solana;
|
|
25203
25441
|
const { enqueueTransaction: nativeEnqueueTransaction } = useTransaction();
|
|
25204
25442
|
const { enqueueSnackbar, closeSnackbar } = useSnackbar2();
|
|
25205
|
-
const [currentNetwork, setCurrentNetwork] =
|
|
25443
|
+
const [currentNetwork, setCurrentNetwork] = useState8("evm" /* EVM */);
|
|
25206
25444
|
const isTxModalOpenRef = useRef3(false);
|
|
25207
|
-
const [isTxModalOpen, setTxModalOpen] =
|
|
25208
|
-
const [txHash, setTxHash] =
|
|
25445
|
+
const [isTxModalOpen, setTxModalOpen] = useState8(false);
|
|
25446
|
+
const [txHash, setTxHash] = useState8("");
|
|
25209
25447
|
const txKey = useRef3();
|
|
25210
|
-
const [txError, setTxError] =
|
|
25211
|
-
const [txMsg, setTxMsg] =
|
|
25212
|
-
const [txReceipt, setTxReceipt] =
|
|
25448
|
+
const [txError, setTxError] = useState8("");
|
|
25449
|
+
const [txMsg, setTxMsg] = useState8("");
|
|
25450
|
+
const [txReceipt, setTxReceipt] = useState8(
|
|
25213
25451
|
void 0
|
|
25214
25452
|
);
|
|
25215
|
-
const [loading, setLoading] =
|
|
25216
|
-
const [txNeedsApproval, setTxNeedsApproval] =
|
|
25217
|
-
const [txStatus, setTxStatus] =
|
|
25218
|
-
const { supportedChains, setSrcValue } = useSwapContext();
|
|
25453
|
+
const [loading, setLoading] = useState8(false);
|
|
25454
|
+
const [txNeedsApproval, setTxNeedsApproval] = useState8(false);
|
|
25455
|
+
const [txStatus, setTxStatus] = useState8(0 /* SWAP_INIT */);
|
|
25456
|
+
const { supportedChains, setSrcValue, srcChain, dstChain } = useSwapContext();
|
|
25457
|
+
const isCrossChainSwap = !!srcChain && !!dstChain && srcChain.chainId !== dstChain.chainId;
|
|
25458
|
+
const delivery = useCrossChainDelivery({
|
|
25459
|
+
enabled: txStatus === 5 /* COMPLETED */ && !txError && // Only while the modal is up: the chains below are the ones currently
|
|
25460
|
+
// selected, and the user is free to pick different ones the moment they close
|
|
25461
|
+
// it. An unclaimed CCTP transfer is the executor's and the sweep's job from
|
|
25462
|
+
// there on, not this poll's.
|
|
25463
|
+
isTxModalOpen && // A custom message means the modal is running a standalone transaction
|
|
25464
|
+
// (an approval reset, say), not a swap with a destination leg.
|
|
25465
|
+
!txMsg && isCrossChainSwap && // The status endpoint reads an EVM receipt; a Solana source has none.
|
|
25466
|
+
srcChain?.ecosystem === "evm" /* EVM */,
|
|
25467
|
+
chainId: srcChain?.chainId,
|
|
25468
|
+
txHash,
|
|
25469
|
+
walletAddress: evm.address
|
|
25470
|
+
});
|
|
25219
25471
|
const closeTransactionModal = (transactionKey) => {
|
|
25220
25472
|
if (txKey.current === transactionKey) {
|
|
25221
25473
|
isTxModalOpenRef.current = false;
|
|
25222
25474
|
setTxModalOpen(false);
|
|
25223
25475
|
}
|
|
25224
25476
|
};
|
|
25225
|
-
|
|
25477
|
+
useEffect7(() => {
|
|
25226
25478
|
if (!isTxModalOpen) {
|
|
25227
25479
|
if (txError) {
|
|
25228
25480
|
enqueueSnackbar(
|
|
25229
|
-
/* @__PURE__ */
|
|
25481
|
+
/* @__PURE__ */ jsx87(
|
|
25230
25482
|
SnackMessage,
|
|
25231
25483
|
{
|
|
25232
25484
|
message: {
|
|
@@ -25242,14 +25494,14 @@ var TxUIWrapper = ({ children }) => {
|
|
|
25242
25494
|
if (txHash) {
|
|
25243
25495
|
const snackbarKey = txHash;
|
|
25244
25496
|
enqueueSnackbar(
|
|
25245
|
-
/* @__PURE__ */
|
|
25497
|
+
/* @__PURE__ */ jsx87(
|
|
25246
25498
|
SnackMessage,
|
|
25247
25499
|
{
|
|
25248
25500
|
message: {
|
|
25249
25501
|
text: `Transaction ${trimTxHash(txHash)} is about to be mined!`,
|
|
25250
25502
|
variant: "warning",
|
|
25251
|
-
action: () => /* @__PURE__ */
|
|
25252
|
-
/* @__PURE__ */
|
|
25503
|
+
action: () => /* @__PURE__ */ jsxs36("div", { className: "flex items-center flex-nowrap", children: [
|
|
25504
|
+
/* @__PURE__ */ jsx87(
|
|
25253
25505
|
Button,
|
|
25254
25506
|
{
|
|
25255
25507
|
type: "button",
|
|
@@ -25263,16 +25515,16 @@ var TxUIWrapper = ({ children }) => {
|
|
|
25263
25515
|
children: "Check"
|
|
25264
25516
|
}
|
|
25265
25517
|
),
|
|
25266
|
-
/* @__PURE__ */
|
|
25518
|
+
/* @__PURE__ */ jsx87(
|
|
25267
25519
|
"div",
|
|
25268
25520
|
{
|
|
25269
25521
|
className: "fill-t_text_primary text-t_text_primary w-[14px] h-[14px] cursor-pointer p-[14px] leading-[0px]",
|
|
25270
25522
|
onClick: () => closeSnackbar(snackbarKey),
|
|
25271
|
-
children: /* @__PURE__ */
|
|
25523
|
+
children: /* @__PURE__ */ jsx87(CloseIcon, {})
|
|
25272
25524
|
}
|
|
25273
25525
|
)
|
|
25274
25526
|
] }),
|
|
25275
|
-
animation: () => /* @__PURE__ */
|
|
25527
|
+
animation: () => /* @__PURE__ */ jsx87(Spinner, { className: "w-4 h-4" })
|
|
25276
25528
|
}
|
|
25277
25529
|
}
|
|
25278
25530
|
),
|
|
@@ -25340,14 +25592,14 @@ var TxUIWrapper = ({ children }) => {
|
|
|
25340
25592
|
}
|
|
25341
25593
|
const snackbarKey = `${txHash}-success`;
|
|
25342
25594
|
enqueueSnackbar(
|
|
25343
|
-
/* @__PURE__ */
|
|
25595
|
+
/* @__PURE__ */ jsx87(
|
|
25344
25596
|
SnackMessage,
|
|
25345
25597
|
{
|
|
25346
25598
|
message: {
|
|
25347
25599
|
text: `Transaction mined successfully!`,
|
|
25348
25600
|
variant: "success",
|
|
25349
|
-
action: () => /* @__PURE__ */
|
|
25350
|
-
/* @__PURE__ */
|
|
25601
|
+
action: () => /* @__PURE__ */ jsxs36("div", { className: "flex items-center flex-nowrap", children: [
|
|
25602
|
+
/* @__PURE__ */ jsx87(
|
|
25351
25603
|
Button,
|
|
25352
25604
|
{
|
|
25353
25605
|
type: "button",
|
|
@@ -25365,12 +25617,12 @@ var TxUIWrapper = ({ children }) => {
|
|
|
25365
25617
|
children: "View"
|
|
25366
25618
|
}
|
|
25367
25619
|
),
|
|
25368
|
-
/* @__PURE__ */
|
|
25620
|
+
/* @__PURE__ */ jsx87(
|
|
25369
25621
|
"div",
|
|
25370
25622
|
{
|
|
25371
25623
|
className: "fill-t_text_primary text-t_text_primary w-[14px] h-[14px] cursor-pointer p-[14px] leading-[0px]",
|
|
25372
25624
|
onClick: () => closeSnackbar(snackbarKey),
|
|
25373
|
-
children: /* @__PURE__ */
|
|
25625
|
+
children: /* @__PURE__ */ jsx87(CloseIcon, {})
|
|
25374
25626
|
}
|
|
25375
25627
|
)
|
|
25376
25628
|
] })
|
|
@@ -25426,14 +25678,14 @@ var TxUIWrapper = ({ children }) => {
|
|
|
25426
25678
|
}
|
|
25427
25679
|
const snackbarKey = `${txHash}-success`;
|
|
25428
25680
|
enqueueSnackbar(
|
|
25429
|
-
/* @__PURE__ */
|
|
25681
|
+
/* @__PURE__ */ jsx87(
|
|
25430
25682
|
SnackMessage,
|
|
25431
25683
|
{
|
|
25432
25684
|
message: {
|
|
25433
25685
|
text: `Transaction mined successfully!`,
|
|
25434
25686
|
variant: "success",
|
|
25435
|
-
action: () => /* @__PURE__ */
|
|
25436
|
-
/* @__PURE__ */
|
|
25687
|
+
action: () => /* @__PURE__ */ jsxs36("div", { className: "flex items-center flex-nowrap", children: [
|
|
25688
|
+
/* @__PURE__ */ jsx87(
|
|
25437
25689
|
Button,
|
|
25438
25690
|
{
|
|
25439
25691
|
type: "button",
|
|
@@ -25450,12 +25702,12 @@ var TxUIWrapper = ({ children }) => {
|
|
|
25450
25702
|
children: "View"
|
|
25451
25703
|
}
|
|
25452
25704
|
),
|
|
25453
|
-
/* @__PURE__ */
|
|
25705
|
+
/* @__PURE__ */ jsx87(
|
|
25454
25706
|
"div",
|
|
25455
25707
|
{
|
|
25456
25708
|
className: "fill-t_text_primary text-t_text_primary w-[14px] h-[14px] cursor-pointer p-[14px] leading-[0px]",
|
|
25457
25709
|
onClick: () => closeSnackbar(snackbarKey),
|
|
25458
|
-
children: /* @__PURE__ */
|
|
25710
|
+
children: /* @__PURE__ */ jsx87(CloseIcon, {})
|
|
25459
25711
|
}
|
|
25460
25712
|
)
|
|
25461
25713
|
] })
|
|
@@ -25532,7 +25784,7 @@ var TxUIWrapper = ({ children }) => {
|
|
|
25532
25784
|
nativeEnqueueTransaction
|
|
25533
25785
|
]
|
|
25534
25786
|
);
|
|
25535
|
-
const txExplorerUrl =
|
|
25787
|
+
const txExplorerUrl = useMemo14(() => {
|
|
25536
25788
|
return getTxExplorerUrl(
|
|
25537
25789
|
txHash,
|
|
25538
25790
|
supportedChains.find(
|
|
@@ -25553,11 +25805,11 @@ var TxUIWrapper = ({ children }) => {
|
|
|
25553
25805
|
setTxModalOpen(flag);
|
|
25554
25806
|
isTxModalOpenRef.current = flag;
|
|
25555
25807
|
}, []);
|
|
25556
|
-
const modalType =
|
|
25557
|
-
() => txError ? "error" : txStatus === 5 /* COMPLETED */ ? "success" : "neutral",
|
|
25558
|
-
[txError, txStatus]
|
|
25808
|
+
const modalType = useMemo14(
|
|
25809
|
+
() => txError ? "error" : delivery.isPolling ? "waiting" : txStatus === 5 /* COMPLETED */ ? "success" : "neutral",
|
|
25810
|
+
[txError, txStatus, delivery.isPolling]
|
|
25559
25811
|
);
|
|
25560
|
-
const state =
|
|
25812
|
+
const state = useMemo14(
|
|
25561
25813
|
() => ({
|
|
25562
25814
|
enqueueTransaction,
|
|
25563
25815
|
closeTransactionModal,
|
|
@@ -25592,14 +25844,14 @@ var TxUIWrapper = ({ children }) => {
|
|
|
25592
25844
|
setSrcValue("");
|
|
25593
25845
|
setModalOpen(false);
|
|
25594
25846
|
}, [setTxError, setSrcValue, setModalOpen]);
|
|
25595
|
-
return /* @__PURE__ */
|
|
25596
|
-
isTxModalOpen && /* @__PURE__ */
|
|
25847
|
+
return /* @__PURE__ */ jsxs36(TxUIWrapperContext.Provider, { value: state, children: [
|
|
25848
|
+
isTxModalOpen && /* @__PURE__ */ jsx87(
|
|
25597
25849
|
TxModal,
|
|
25598
25850
|
{
|
|
25599
25851
|
id: "tx_modal",
|
|
25600
25852
|
type: modalType,
|
|
25601
25853
|
onCloseClick: closeTxModal,
|
|
25602
|
-
children: /* @__PURE__ */
|
|
25854
|
+
children: /* @__PURE__ */ jsx87(ConfirmationView, { onCloseClick: closeTxModal, delivery })
|
|
25603
25855
|
}
|
|
25604
25856
|
),
|
|
25605
25857
|
children
|
|
@@ -25610,25 +25862,25 @@ function useTxUIWrapper() {
|
|
|
25610
25862
|
}
|
|
25611
25863
|
|
|
25612
25864
|
// src/components/Modal/index.tsx
|
|
25613
|
-
import { jsx as
|
|
25865
|
+
import { jsx as jsx88, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
25614
25866
|
|
|
25615
25867
|
// src/components/PoweredBy/index.tsx
|
|
25616
|
-
import { jsx as
|
|
25868
|
+
import { jsx as jsx89, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
25617
25869
|
var PoweredBy = () => {
|
|
25618
|
-
return /* @__PURE__ */
|
|
25619
|
-
/* @__PURE__ */
|
|
25620
|
-
/* @__PURE__ */
|
|
25621
|
-
/* @__PURE__ */
|
|
25622
|
-
/* @__PURE__ */
|
|
25870
|
+
return /* @__PURE__ */ jsx89("div", { className: "flex justify-end items-center", children: /* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-2.5 px-3 py-2 rounded-lg bg-gradient-to-r from-t_bg_tertiary/0 to-t_bg_tertiary/5", children: [
|
|
25871
|
+
/* @__PURE__ */ jsx89("div", { className: "flex items-center [&_svg]:h-5 [&_svg]:w-auto", children: /* @__PURE__ */ jsx89(ChainlinkMarkIcon, {}) }),
|
|
25872
|
+
/* @__PURE__ */ jsxs38("p", { className: "text-xs whitespace-nowrap leading-5 tracking-[0.015em]", children: [
|
|
25873
|
+
/* @__PURE__ */ jsx89("span", { className: "text-t_text_primary text-opacity-70", children: `POWERED BY ` }),
|
|
25874
|
+
/* @__PURE__ */ jsx89("span", { className: "text-t_text_primary", children: "CCIP." })
|
|
25623
25875
|
] })
|
|
25624
25876
|
] }) });
|
|
25625
25877
|
};
|
|
25626
25878
|
|
|
25627
25879
|
// src/components/SafeInput/index.tsx
|
|
25628
|
-
import { forwardRef as forwardRef5, useCallback as useCallback10, useMemo as
|
|
25629
|
-
import { jsx as
|
|
25880
|
+
import { forwardRef as forwardRef5, useCallback as useCallback10, useMemo as useMemo15 } from "react";
|
|
25881
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
25630
25882
|
var SafeInput = forwardRef5(({ value, onChange, id: id2, placeholder, regex, className, disabled }, ref) => {
|
|
25631
|
-
const size =
|
|
25883
|
+
const size = useMemo15(() => value.length < 2 ? 2 : value.length, [value]);
|
|
25632
25884
|
const handleChange = useCallback10(
|
|
25633
25885
|
(e) => {
|
|
25634
25886
|
if (e.target.value === ".") {
|
|
@@ -25640,7 +25892,7 @@ var SafeInput = forwardRef5(({ value, onChange, id: id2, placeholder, regex, cla
|
|
|
25640
25892
|
},
|
|
25641
25893
|
[onChange, regex, id2]
|
|
25642
25894
|
);
|
|
25643
|
-
return /* @__PURE__ */
|
|
25895
|
+
return /* @__PURE__ */ jsx90(
|
|
25644
25896
|
"input",
|
|
25645
25897
|
{
|
|
25646
25898
|
ref,
|
|
@@ -25663,9 +25915,9 @@ var SafeInput = forwardRef5(({ value, onChange, id: id2, placeholder, regex, cla
|
|
|
25663
25915
|
SafeInput.displayName = "SafeInput";
|
|
25664
25916
|
|
|
25665
25917
|
// src/components/Skeleton/index.tsx
|
|
25666
|
-
import { jsx as
|
|
25918
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
25667
25919
|
var Skeleton = ({ className }) => {
|
|
25668
|
-
return /* @__PURE__ */
|
|
25920
|
+
return /* @__PURE__ */ jsx91(
|
|
25669
25921
|
"div",
|
|
25670
25922
|
{
|
|
25671
25923
|
className: `bg-t_bg_tertiary bg-opacity-15 rounded animate-pulse ${className || ""}`
|
|
@@ -25674,9 +25926,9 @@ var Skeleton = ({ className }) => {
|
|
|
25674
25926
|
};
|
|
25675
25927
|
|
|
25676
25928
|
// src/components/Spinner/index.tsx
|
|
25677
|
-
import { jsx as
|
|
25929
|
+
import { jsx as jsx92, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
25678
25930
|
var Spinner = ({ className }) => {
|
|
25679
|
-
return /* @__PURE__ */
|
|
25931
|
+
return /* @__PURE__ */ jsx92("div", { role: "status", className: className || "", children: /* @__PURE__ */ jsxs39(
|
|
25680
25932
|
"svg",
|
|
25681
25933
|
{
|
|
25682
25934
|
"aria-hidden": "true",
|
|
@@ -25685,14 +25937,14 @@ var Spinner = ({ className }) => {
|
|
|
25685
25937
|
fill: "none",
|
|
25686
25938
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25687
25939
|
children: [
|
|
25688
|
-
/* @__PURE__ */
|
|
25940
|
+
/* @__PURE__ */ jsx92(
|
|
25689
25941
|
"path",
|
|
25690
25942
|
{
|
|
25691
25943
|
d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
|
|
25692
25944
|
fill: "currentColor"
|
|
25693
25945
|
}
|
|
25694
25946
|
),
|
|
25695
|
-
/* @__PURE__ */
|
|
25947
|
+
/* @__PURE__ */ jsx92(
|
|
25696
25948
|
"path",
|
|
25697
25949
|
{
|
|
25698
25950
|
d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
|
|
@@ -25705,11 +25957,11 @@ var Spinner = ({ className }) => {
|
|
|
25705
25957
|
};
|
|
25706
25958
|
|
|
25707
25959
|
// src/components/Swap/index.tsx
|
|
25708
|
-
import { useMemo as
|
|
25960
|
+
import { useMemo as useMemo30 } from "react";
|
|
25709
25961
|
|
|
25710
25962
|
// src/components/Swap/Header/Controls/index.tsx
|
|
25711
|
-
import { Fragment as Fragment4, jsx as
|
|
25712
|
-
var HeaderIconButton = ({ onClick, label, children }) => /* @__PURE__ */
|
|
25963
|
+
import { Fragment as Fragment4, jsx as jsx93, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
25964
|
+
var HeaderIconButton = ({ onClick, label, children }) => /* @__PURE__ */ jsx93(
|
|
25713
25965
|
"button",
|
|
25714
25966
|
{
|
|
25715
25967
|
type: "button",
|
|
@@ -25721,63 +25973,63 @@ var HeaderIconButton = ({ onClick, label, children }) => /* @__PURE__ */ jsx92(
|
|
|
25721
25973
|
);
|
|
25722
25974
|
var Controls = ({ onClose }) => {
|
|
25723
25975
|
const { tab, setTab, overlay } = useSwapContext();
|
|
25724
|
-
return /* @__PURE__ */
|
|
25725
|
-
/* @__PURE__ */
|
|
25976
|
+
return /* @__PURE__ */ jsx93("div", { className: "flex gap-2 items-center", children: tab === "Swap" ? /* @__PURE__ */ jsxs40(Fragment4, { children: [
|
|
25977
|
+
/* @__PURE__ */ jsx93(
|
|
25726
25978
|
HeaderIconButton,
|
|
25727
25979
|
{
|
|
25728
25980
|
onClick: () => setTab("Settings"),
|
|
25729
25981
|
label: "Open preferences",
|
|
25730
|
-
children: /* @__PURE__ */
|
|
25982
|
+
children: /* @__PURE__ */ jsx93(AdjustmentsIcon, { className: "w-4 h-4 opacity-50" })
|
|
25731
25983
|
}
|
|
25732
25984
|
),
|
|
25733
|
-
/* @__PURE__ */
|
|
25985
|
+
/* @__PURE__ */ jsx93(
|
|
25734
25986
|
HeaderIconButton,
|
|
25735
25987
|
{
|
|
25736
25988
|
onClick: () => setTab("History"),
|
|
25737
25989
|
label: "Open activity",
|
|
25738
|
-
children: /* @__PURE__ */
|
|
25990
|
+
children: /* @__PURE__ */ jsx93(ClockIcon, { className: "w-4 h-4 opacity-50" })
|
|
25739
25991
|
}
|
|
25740
25992
|
),
|
|
25741
|
-
overlay && /* @__PURE__ */
|
|
25742
|
-
] }) : /* @__PURE__ */
|
|
25743
|
-
tab === "Settings" && /* @__PURE__ */
|
|
25993
|
+
overlay && /* @__PURE__ */ jsx93(HeaderIconButton, { onClick: onClose, label: "Close", children: /* @__PURE__ */ jsx93("div", { className: "w-4 h-4 opacity-50 fill-t_text_primary flex items-center justify-center", children: /* @__PURE__ */ jsx93(CloseIcon, {}) }) })
|
|
25994
|
+
] }) : /* @__PURE__ */ jsxs40(Fragment4, { children: [
|
|
25995
|
+
tab === "Settings" && /* @__PURE__ */ jsx93(
|
|
25744
25996
|
HeaderIconButton,
|
|
25745
25997
|
{
|
|
25746
25998
|
onClick: () => setTab("Settings"),
|
|
25747
25999
|
label: "Preferences",
|
|
25748
|
-
children: /* @__PURE__ */
|
|
26000
|
+
children: /* @__PURE__ */ jsx93(AdjustmentsIcon, { className: "w-4 h-4 opacity-50" })
|
|
25749
26001
|
}
|
|
25750
26002
|
),
|
|
25751
|
-
/* @__PURE__ */
|
|
26003
|
+
/* @__PURE__ */ jsx93(
|
|
25752
26004
|
HeaderIconButton,
|
|
25753
26005
|
{
|
|
25754
26006
|
onClick: () => setTab("Swap"),
|
|
25755
26007
|
label: "Back to swap",
|
|
25756
|
-
children: /* @__PURE__ */
|
|
26008
|
+
children: /* @__PURE__ */ jsx93("div", { className: "w-4 h-4 opacity-50 fill-t_text_primary flex items-center justify-center", children: /* @__PURE__ */ jsx93(CloseIcon, {}) })
|
|
25757
26009
|
}
|
|
25758
26010
|
)
|
|
25759
26011
|
] }) });
|
|
25760
26012
|
};
|
|
25761
26013
|
|
|
25762
26014
|
// src/components/Swap/Header/index.tsx
|
|
25763
|
-
import { jsx as
|
|
26015
|
+
import { jsx as jsx94, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
25764
26016
|
var Header2 = ({ onClose }) => {
|
|
25765
26017
|
const { tab, integrationConfig, bridgeUI } = useSwapContext();
|
|
25766
26018
|
const title = tab === "Settings" ? "Preferences" : tab === "History" ? "My Activity" : integrationConfig.widgetTitle || (bridgeUI ? "Bridge" : "Swap");
|
|
25767
|
-
return /* @__PURE__ */
|
|
25768
|
-
/* @__PURE__ */
|
|
25769
|
-
/* @__PURE__ */
|
|
26019
|
+
return /* @__PURE__ */ jsxs41("div", { className: "flex justify-between items-center", children: [
|
|
26020
|
+
/* @__PURE__ */ jsx94("div", { className: "text-2xl font-medium leading-8 tracking-[0.01em]", children: title }),
|
|
26021
|
+
/* @__PURE__ */ jsx94(Controls, { onClose })
|
|
25770
26022
|
] });
|
|
25771
26023
|
};
|
|
25772
26024
|
|
|
25773
26025
|
// src/components/Swap/HistoryView/index.tsx
|
|
25774
|
-
import { useMemo as
|
|
26026
|
+
import { useMemo as useMemo17 } from "react";
|
|
25775
26027
|
import { Virtuoso } from "react-virtuoso";
|
|
25776
26028
|
|
|
25777
26029
|
// src/components/Swap/HistoryView/ActivityCard/index.tsx
|
|
25778
26030
|
import { format as format2 } from "date-fns";
|
|
25779
|
-
import { useMemo as
|
|
25780
|
-
import { Fragment as Fragment5, jsx as
|
|
26031
|
+
import { useMemo as useMemo16 } from "react";
|
|
26032
|
+
import { Fragment as Fragment5, jsx as jsx95, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
25781
26033
|
var ActivityCard = ({ transaction }) => {
|
|
25782
26034
|
const { supportedChains, findTokenDataByAddressAndChain, tokenPrices } = useSwapContext();
|
|
25783
26035
|
const { evm, solana } = useWallet();
|
|
@@ -25800,7 +26052,7 @@ var ActivityCard = ({ transaction }) => {
|
|
|
25800
26052
|
const date = format2(txDate, "dd.MM.yyyy");
|
|
25801
26053
|
const time = format2(txDate, "hh.mmaa");
|
|
25802
26054
|
const receivedToken = dstToken || srcToken;
|
|
25803
|
-
const amount =
|
|
26055
|
+
const amount = useMemo16(() => {
|
|
25804
26056
|
if (transaction.tokenOutAmount && dstToken) {
|
|
25805
26057
|
return weiToHumanReadable({
|
|
25806
26058
|
amount: transaction.tokenOutAmount,
|
|
@@ -25814,7 +26066,7 @@ var ActivityCard = ({ transaction }) => {
|
|
|
25814
26066
|
precisionFractionalPlaces: 4
|
|
25815
26067
|
});
|
|
25816
26068
|
}, [transaction, srcToken, dstToken]);
|
|
25817
|
-
const amountUsd =
|
|
26069
|
+
const amountUsd = useMemo16(() => {
|
|
25818
26070
|
const token = dstToken || srcToken;
|
|
25819
26071
|
const chainId = dstToken ? transaction.targetChainId : transaction.sourceChainId;
|
|
25820
26072
|
if (!token) return null;
|
|
@@ -25826,19 +26078,19 @@ var ActivityCard = ({ transaction }) => {
|
|
|
25826
26078
|
(chain) => chain.chainId === transaction.sourceChainId
|
|
25827
26079
|
)?.transactionExplorer}/${transaction.hash}`;
|
|
25828
26080
|
const destinationChain = dstChain || srcChain;
|
|
25829
|
-
return /* @__PURE__ */
|
|
25830
|
-
/* @__PURE__ */
|
|
25831
|
-
/* @__PURE__ */
|
|
25832
|
-
/* @__PURE__ */
|
|
25833
|
-
/* @__PURE__ */
|
|
25834
|
-
/* @__PURE__ */
|
|
26081
|
+
return /* @__PURE__ */ jsx95("div", { className: "pb-2", children: /* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-4 p-4 rounded-2xl bg-t_bg_tertiary bg-opacity-[0.03]", children: [
|
|
26082
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-center justify-between gap-2", children: [
|
|
26083
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-t_bg_tertiary bg-opacity-[0.03]", children: [
|
|
26084
|
+
/* @__PURE__ */ jsx95("span", { className: "text-xs leading-[18px] tracking-[0.01em] text-t_text_primary text-opacity-50 whitespace-nowrap", children: date }),
|
|
26085
|
+
/* @__PURE__ */ jsx95("span", { className: "w-0.5 h-0.5 shrink-0 bg-t_text_primary opacity-25" }),
|
|
26086
|
+
/* @__PURE__ */ jsx95("span", { className: "text-xs leading-[18px] tracking-[0.01em] text-t_text_primary text-opacity-50 whitespace-nowrap", children: time })
|
|
25835
26087
|
] }),
|
|
25836
|
-
/* @__PURE__ */
|
|
25837
|
-
transaction.status === "IN_PROGRESS" ? /* @__PURE__ */
|
|
25838
|
-
/* @__PURE__ */
|
|
25839
|
-
/* @__PURE__ */
|
|
26088
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-2", children: [
|
|
26089
|
+
transaction.status === "IN_PROGRESS" ? /* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-t_text_orange bg-opacity-[0.07] text-t_text_orange", children: [
|
|
26090
|
+
/* @__PURE__ */ jsx95(LoadingRingIcon, { className: "w-4 h-4 shrink-0 animate-spin" }),
|
|
26091
|
+
/* @__PURE__ */ jsxs42("p", { className: "text-xs leading-[18px] whitespace-nowrap", children: [
|
|
25840
26092
|
`Est. Time `,
|
|
25841
|
-
/* @__PURE__ */
|
|
26093
|
+
/* @__PURE__ */ jsx95(
|
|
25842
26094
|
Timer,
|
|
25843
26095
|
{
|
|
25844
26096
|
displayFormat: 0 /* Minutes */,
|
|
@@ -25847,8 +26099,8 @@ var ActivityCard = ({ transaction }) => {
|
|
|
25847
26099
|
}
|
|
25848
26100
|
)
|
|
25849
26101
|
] })
|
|
25850
|
-
] }) : transaction.status === "DONE" ? /* @__PURE__ */
|
|
25851
|
-
/* @__PURE__ */
|
|
26102
|
+
] }) : transaction.status === "DONE" ? /* @__PURE__ */ jsx95("div", { className: "flex items-center px-3 py-2 rounded-md bg-t_text_green bg-opacity-5", children: /* @__PURE__ */ jsx95("p", { className: "text-xs leading-[18px] whitespace-nowrap text-t_text_green text-opacity-80", children: "Done" }) }) : transaction.status === "REVERTED" ? /* @__PURE__ */ jsx95("div", { className: "flex items-center px-3 py-2 rounded-md bg-t_bg_tertiary bg-opacity-[0.03]", children: /* @__PURE__ */ jsx95("p", { className: "text-xs leading-[18px] whitespace-nowrap text-t_text_primary text-opacity-50", children: "Reverted" }) }) : null,
|
|
26103
|
+
/* @__PURE__ */ jsx95(
|
|
25852
26104
|
"a",
|
|
25853
26105
|
{
|
|
25854
26106
|
href: explorerUrl,
|
|
@@ -25856,14 +26108,14 @@ var ActivityCard = ({ transaction }) => {
|
|
|
25856
26108
|
rel: "noreferrer",
|
|
25857
26109
|
className: "flex items-center justify-center w-[34px] h-[34px] shrink-0 rounded-md bg-t_bg_tertiary bg-opacity-5 no-underline text-t_text_primary hover:bg-opacity-10 transition-colors",
|
|
25858
26110
|
"aria-label": "Show the transaction in the chain explorer",
|
|
25859
|
-
children: /* @__PURE__ */
|
|
26111
|
+
children: /* @__PURE__ */ jsx95(LinkExternalThinIcon, { className: "w-3 h-3 opacity-50" })
|
|
25860
26112
|
}
|
|
25861
26113
|
)
|
|
25862
26114
|
] })
|
|
25863
26115
|
] }),
|
|
25864
|
-
/* @__PURE__ */
|
|
25865
|
-
/* @__PURE__ */
|
|
25866
|
-
dstToken && /* @__PURE__ */
|
|
26116
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-3", children: [
|
|
26117
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-center shrink-0", children: [
|
|
26118
|
+
dstToken && /* @__PURE__ */ jsx95("div", { className: "-mr-2", children: /* @__PURE__ */ jsx95(
|
|
25867
26119
|
TokenLogoWithChain,
|
|
25868
26120
|
{
|
|
25869
26121
|
token: srcToken,
|
|
@@ -25873,7 +26125,7 @@ var ActivityCard = ({ transaction }) => {
|
|
|
25873
26125
|
chainLogoClassName: "w-[18px]"
|
|
25874
26126
|
}
|
|
25875
26127
|
) }),
|
|
25876
|
-
/* @__PURE__ */
|
|
26128
|
+
/* @__PURE__ */ jsx95(
|
|
25877
26129
|
TokenLogoWithChain,
|
|
25878
26130
|
{
|
|
25879
26131
|
token: receivedToken,
|
|
@@ -25884,26 +26136,26 @@ var ActivityCard = ({ transaction }) => {
|
|
|
25884
26136
|
}
|
|
25885
26137
|
)
|
|
25886
26138
|
] }),
|
|
25887
|
-
/* @__PURE__ */
|
|
25888
|
-
/* @__PURE__ */
|
|
25889
|
-
/* @__PURE__ */
|
|
25890
|
-
/* @__PURE__ */
|
|
25891
|
-
dstToken && /* @__PURE__ */
|
|
25892
|
-
/* @__PURE__ */
|
|
25893
|
-
/* @__PURE__ */
|
|
26139
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex justify-between items-center gap-2 w-full min-w-0", children: [
|
|
26140
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-0.5 text-left min-w-0", children: [
|
|
26141
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-2 text-sm font-medium leading-5 tracking-[0.01em] text-t_text_primary", children: [
|
|
26142
|
+
/* @__PURE__ */ jsx95("span", { children: srcToken?.symbol || "?" }),
|
|
26143
|
+
dstToken && /* @__PURE__ */ jsxs42(Fragment5, { children: [
|
|
26144
|
+
/* @__PURE__ */ jsx95(ChevronRightThinIcon, { className: "shrink-0 opacity-50" }),
|
|
26145
|
+
/* @__PURE__ */ jsx95("span", { className: "truncate", children: dstToken.symbol })
|
|
25894
26146
|
] })
|
|
25895
26147
|
] }),
|
|
25896
|
-
/* @__PURE__ */
|
|
25897
|
-
destinationChain && /* @__PURE__ */
|
|
25898
|
-
/* @__PURE__ */
|
|
25899
|
-
/* @__PURE__ */
|
|
26148
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-2 text-xs leading-[18px] tracking-[0.01em] text-t_text_primary text-opacity-50 min-w-0", children: [
|
|
26149
|
+
destinationChain && /* @__PURE__ */ jsxs42(Fragment5, { children: [
|
|
26150
|
+
/* @__PURE__ */ jsx95("span", { className: "whitespace-nowrap truncate", children: `Destination ${destinationChain.displayName || destinationChain.name}` }),
|
|
26151
|
+
/* @__PURE__ */ jsx95("span", { className: "w-0.5 h-0.5 shrink-0 bg-t_text_primary opacity-25" })
|
|
25900
26152
|
] }),
|
|
25901
|
-
/* @__PURE__ */
|
|
26153
|
+
/* @__PURE__ */ jsx95("span", { className: "whitespace-nowrap", children: receiverAddress ? shortAddress(receiverAddress) : "-" })
|
|
25902
26154
|
] })
|
|
25903
26155
|
] }),
|
|
25904
|
-
/* @__PURE__ */
|
|
25905
|
-
/* @__PURE__ */
|
|
25906
|
-
amountUsd && /* @__PURE__ */
|
|
26156
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-0.5 text-right shrink-0", children: [
|
|
26157
|
+
/* @__PURE__ */ jsx95("div", { className: "text-sm font-medium leading-5 tracking-[0.01em] text-t_text_primary", children: amount }),
|
|
26158
|
+
amountUsd && /* @__PURE__ */ jsx95("div", { className: "text-xs leading-[18px] tracking-[0.01em] text-t_text_primary text-opacity-50", children: `${amountUsd} USD` })
|
|
25907
26159
|
] })
|
|
25908
26160
|
] })
|
|
25909
26161
|
] })
|
|
@@ -25911,13 +26163,13 @@ var ActivityCard = ({ transaction }) => {
|
|
|
25911
26163
|
};
|
|
25912
26164
|
|
|
25913
26165
|
// src/components/Swap/HistoryView/index.tsx
|
|
25914
|
-
import { jsx as
|
|
26166
|
+
import { jsx as jsx96, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
25915
26167
|
var HistoryView = () => {
|
|
25916
26168
|
const { history, historyLoadedOnce, solanaHistory, solanaHistoryLoadedOnce } = useHistory();
|
|
25917
26169
|
const {
|
|
25918
26170
|
solana: { address: solanaAddress }
|
|
25919
26171
|
} = useWallet();
|
|
25920
|
-
const unifiedHistory =
|
|
26172
|
+
const unifiedHistory = useMemo17(() => {
|
|
25921
26173
|
const combinedHistory = [
|
|
25922
26174
|
...history,
|
|
25923
26175
|
...solanaAddress ? solanaHistory : []
|
|
@@ -25926,40 +26178,40 @@ var HistoryView = () => {
|
|
|
25926
26178
|
return b.timestamp - a.timestamp;
|
|
25927
26179
|
});
|
|
25928
26180
|
}, [history, solanaHistory, solanaAddress]);
|
|
25929
|
-
const view =
|
|
26181
|
+
const view = useMemo17(() => {
|
|
25930
26182
|
if (!unifiedHistory || unifiedHistory.length === 0) {
|
|
25931
26183
|
const isHistoryLoaded = historyLoadedOnce && (solanaAddress ? solanaHistoryLoadedOnce : true);
|
|
25932
|
-
return isHistoryLoaded ? /* @__PURE__ */
|
|
25933
|
-
/* @__PURE__ */
|
|
25934
|
-
/* @__PURE__ */
|
|
26184
|
+
return isHistoryLoaded ? /* @__PURE__ */ jsxs43("div", { className: "flex flex-col items-center justify-center gap-2 h-full min-h-[320px] text-center", children: [
|
|
26185
|
+
/* @__PURE__ */ jsx96("p", { className: "text-sm font-medium text-t_text_primary", children: "Nothing here yet..." }),
|
|
26186
|
+
/* @__PURE__ */ jsxs43("p", { className: "text-xs leading-[18px] text-t_text_primary text-opacity-50", children: [
|
|
25935
26187
|
"Your swaps will show up here",
|
|
25936
|
-
/* @__PURE__ */
|
|
26188
|
+
/* @__PURE__ */ jsx96("br", {}),
|
|
25937
26189
|
"once you make the first one."
|
|
25938
26190
|
] })
|
|
25939
|
-
] }) : /* @__PURE__ */
|
|
25940
|
-
/* @__PURE__ */
|
|
25941
|
-
/* @__PURE__ */
|
|
25942
|
-
/* @__PURE__ */
|
|
25943
|
-
/* @__PURE__ */
|
|
26191
|
+
] }) : /* @__PURE__ */ jsxs43("div", { className: "flex flex-col items-center justify-center gap-4 h-full min-h-[320px] text-center", children: [
|
|
26192
|
+
/* @__PURE__ */ jsx96(Spinner, { className: "w-8 h-8" }),
|
|
26193
|
+
/* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-1", children: [
|
|
26194
|
+
/* @__PURE__ */ jsx96("p", { className: "text-sm font-medium text-t_text_primary", children: "Where's it..." }),
|
|
26195
|
+
/* @__PURE__ */ jsxs43("p", { className: "text-xs leading-[18px] text-t_text_primary text-opacity-50", children: [
|
|
25944
26196
|
"We crunch data for your view.",
|
|
25945
|
-
/* @__PURE__ */
|
|
26197
|
+
/* @__PURE__ */ jsx96("br", {}),
|
|
25946
26198
|
"Please wait a moment."
|
|
25947
26199
|
] })
|
|
25948
26200
|
] })
|
|
25949
26201
|
] });
|
|
25950
26202
|
}
|
|
25951
|
-
return /* @__PURE__ */
|
|
25952
|
-
/* @__PURE__ */
|
|
26203
|
+
return /* @__PURE__ */ jsxs43("div", { className: "relative h-full", children: [
|
|
26204
|
+
/* @__PURE__ */ jsx96(
|
|
25953
26205
|
Virtuoso,
|
|
25954
26206
|
{
|
|
25955
26207
|
data: unifiedHistory,
|
|
25956
26208
|
style: { height: "100%" },
|
|
25957
26209
|
itemContent: (_, transaction) => {
|
|
25958
|
-
return /* @__PURE__ */
|
|
26210
|
+
return /* @__PURE__ */ jsx96(ActivityCard, { transaction });
|
|
25959
26211
|
}
|
|
25960
26212
|
}
|
|
25961
26213
|
),
|
|
25962
|
-
/* @__PURE__ */
|
|
26214
|
+
/* @__PURE__ */ jsx96("div", { className: "pointer-events-none absolute bottom-0 inset-x-0 h-16 bg-gradient-to-t from-t_bg_primary/[0.65] to-transparent" })
|
|
25963
26215
|
] });
|
|
25964
26216
|
}, [
|
|
25965
26217
|
historyLoadedOnce,
|
|
@@ -25967,13 +26219,13 @@ var HistoryView = () => {
|
|
|
25967
26219
|
unifiedHistory,
|
|
25968
26220
|
solanaAddress
|
|
25969
26221
|
]);
|
|
25970
|
-
return /* @__PURE__ */
|
|
26222
|
+
return /* @__PURE__ */ jsx96("div", { className: "flex-1 overflow-hidden", children: view });
|
|
25971
26223
|
};
|
|
25972
26224
|
|
|
25973
26225
|
// src/components/Swap/SwapView/SwapPanel/TokenPanel/ChainPicker/index.tsx
|
|
25974
|
-
import { useEffect as
|
|
26226
|
+
import { useEffect as useEffect8, useMemo as useMemo18, useRef as useRef4, useState as useState9 } from "react";
|
|
25975
26227
|
import { Virtuoso as Virtuoso2 } from "react-virtuoso";
|
|
25976
|
-
import { Fragment as Fragment6, jsx as
|
|
26228
|
+
import { Fragment as Fragment6, jsx as jsx97, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
25977
26229
|
var ChainPicker = ({
|
|
25978
26230
|
chains,
|
|
25979
26231
|
selectedChainId,
|
|
@@ -25981,14 +26233,14 @@ var ChainPicker = ({
|
|
|
25981
26233
|
onSelect,
|
|
25982
26234
|
onClose
|
|
25983
26235
|
}) => {
|
|
25984
|
-
const [searchValue, setSearchValue] =
|
|
26236
|
+
const [searchValue, setSearchValue] = useState9("");
|
|
25985
26237
|
const chainSearchRef = useRef4(null);
|
|
25986
|
-
|
|
26238
|
+
useEffect8(() => {
|
|
25987
26239
|
setTimeout(() => {
|
|
25988
26240
|
chainSearchRef.current?.focus();
|
|
25989
26241
|
}, 10);
|
|
25990
26242
|
}, []);
|
|
25991
|
-
const filteredChains =
|
|
26243
|
+
const filteredChains = useMemo18(() => {
|
|
25992
26244
|
if (!searchValue) return chains;
|
|
25993
26245
|
const searchLower = searchValue.toLowerCase();
|
|
25994
26246
|
return chains.filter(
|
|
@@ -25996,23 +26248,23 @@ var ChainPicker = ({
|
|
|
25996
26248
|
);
|
|
25997
26249
|
}, [chains, searchValue]);
|
|
25998
26250
|
const requiresSourceReset = (chain) => !!chain.disabled || chain.chainId === sameChainId;
|
|
25999
|
-
return /* @__PURE__ */
|
|
26000
|
-
/* @__PURE__ */
|
|
26001
|
-
/* @__PURE__ */
|
|
26002
|
-
/* @__PURE__ */
|
|
26251
|
+
return /* @__PURE__ */ jsxs44(Fragment6, { children: [
|
|
26252
|
+
/* @__PURE__ */ jsxs44("div", { className: "flex justify-between items-center mb-6", children: [
|
|
26253
|
+
/* @__PURE__ */ jsx97("div", { className: "text-2xl font-medium leading-8 tracking-[0.01em] text-t_text_primary", children: "Select Network" }),
|
|
26254
|
+
/* @__PURE__ */ jsx97(
|
|
26003
26255
|
"button",
|
|
26004
26256
|
{
|
|
26005
26257
|
type: "button",
|
|
26006
26258
|
"aria-label": "Close",
|
|
26007
26259
|
className: "flex items-center justify-center w-8 h-8 rounded-md bg-t_bg_tertiary bg-opacity-5 hover:bg-opacity-10 transition-colors",
|
|
26008
26260
|
onClick: onClose,
|
|
26009
|
-
children: /* @__PURE__ */
|
|
26261
|
+
children: /* @__PURE__ */ jsx97("div", { className: "w-4 h-4 opacity-50 fill-t_text_primary flex items-center justify-center", children: /* @__PURE__ */ jsx97(CloseIcon, {}) })
|
|
26010
26262
|
}
|
|
26011
26263
|
)
|
|
26012
26264
|
] }),
|
|
26013
|
-
/* @__PURE__ */
|
|
26014
|
-
/* @__PURE__ */
|
|
26015
|
-
/* @__PURE__ */
|
|
26265
|
+
/* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-2 h-14 px-4 rounded-xl bg-t_bg_tertiary bg-opacity-[0.03] border border-solid border-t_text_primary border-opacity-5 mb-6", children: [
|
|
26266
|
+
/* @__PURE__ */ jsx97("div", { className: "text-t_text_primary opacity-60 flex items-center shrink-0", children: /* @__PURE__ */ jsx97(SearchThinIcon, {}) }),
|
|
26267
|
+
/* @__PURE__ */ jsx97(
|
|
26016
26268
|
"input",
|
|
26017
26269
|
{
|
|
26018
26270
|
ref: chainSearchRef,
|
|
@@ -26023,7 +26275,7 @@ var ChainPicker = ({
|
|
|
26023
26275
|
}
|
|
26024
26276
|
)
|
|
26025
26277
|
] }),
|
|
26026
|
-
/* @__PURE__ */
|
|
26278
|
+
/* @__PURE__ */ jsx97("div", { className: "flex flex-col mx-0 h-full min-h-0 flex-1", children: filteredChains.length ? /* @__PURE__ */ jsx97(
|
|
26027
26279
|
Virtuoso2,
|
|
26028
26280
|
{
|
|
26029
26281
|
style: { maxHeight: "700px", height: "100%" },
|
|
@@ -26031,13 +26283,13 @@ var ChainPicker = ({
|
|
|
26031
26283
|
itemContent: (_, chain) => {
|
|
26032
26284
|
const resetWarning = requiresSourceReset(chain);
|
|
26033
26285
|
const isSelected = chain.chainId === selectedChainId;
|
|
26034
|
-
return /* @__PURE__ */
|
|
26286
|
+
return /* @__PURE__ */ jsx97("div", { className: "pb-2", children: /* @__PURE__ */ jsxs44(
|
|
26035
26287
|
"div",
|
|
26036
26288
|
{
|
|
26037
26289
|
onClick: () => onSelect(chain),
|
|
26038
26290
|
className: `flex gap-3 items-center p-3 sm:p-4 rounded-xl cursor-pointer bg-gradient-to-r from-t_bg_tertiary/[0.02] to-t_bg_tertiary/[0.02] bg-[rgba(40,40,40,0.15)] hover:bg-t_bg_tertiary hover:bg-opacity-10 transition-colors ${isSelected ? "!bg-t_bg_tertiary !bg-opacity-10" : ""}`,
|
|
26039
26291
|
children: [
|
|
26040
|
-
/* @__PURE__ */
|
|
26292
|
+
/* @__PURE__ */ jsx97(
|
|
26041
26293
|
"img",
|
|
26042
26294
|
{
|
|
26043
26295
|
src: chain.image,
|
|
@@ -26045,19 +26297,19 @@ var ChainPicker = ({
|
|
|
26045
26297
|
className: `w-10 h-10 rounded-full shrink-0 ${resetWarning ? "opacity-40" : ""}`
|
|
26046
26298
|
}
|
|
26047
26299
|
),
|
|
26048
|
-
/* @__PURE__ */
|
|
26049
|
-
/* @__PURE__ */
|
|
26300
|
+
/* @__PURE__ */ jsxs44("div", { className: "flex justify-between items-center gap-2 w-full min-w-0", children: [
|
|
26301
|
+
/* @__PURE__ */ jsx97(
|
|
26050
26302
|
"p",
|
|
26051
26303
|
{
|
|
26052
26304
|
className: `text-sm font-medium leading-5 tracking-[0.01em] text-t_text_primary ${resetWarning ? "opacity-40" : ""}`,
|
|
26053
26305
|
children: chain.displayName
|
|
26054
26306
|
}
|
|
26055
26307
|
),
|
|
26056
|
-
resetWarning && /* @__PURE__ */
|
|
26057
|
-
/* @__PURE__ */
|
|
26058
|
-
/* @__PURE__ */
|
|
26059
|
-
/* @__PURE__ */
|
|
26060
|
-
/* @__PURE__ */
|
|
26308
|
+
resetWarning && /* @__PURE__ */ jsxs44("div", { className: "flex items-center justify-end gap-1.5 text-[#D77F02]", children: [
|
|
26309
|
+
/* @__PURE__ */ jsx97(WarningIcon, { className: "w-3.5 h-3.5 shrink-0" }),
|
|
26310
|
+
/* @__PURE__ */ jsxs44("span", { className: "text-xs leading-[18px] tracking-[0.01em] whitespace-nowrap", children: [
|
|
26311
|
+
/* @__PURE__ */ jsx97("span", { className: "sm:hidden", children: "Source will reset." }),
|
|
26312
|
+
/* @__PURE__ */ jsx97("span", { className: "hidden sm:inline", children: "Source will reset after selection." })
|
|
26061
26313
|
] })
|
|
26062
26314
|
] })
|
|
26063
26315
|
] })
|
|
@@ -26066,42 +26318,42 @@ var ChainPicker = ({
|
|
|
26066
26318
|
) });
|
|
26067
26319
|
}
|
|
26068
26320
|
}
|
|
26069
|
-
) : /* @__PURE__ */
|
|
26321
|
+
) : /* @__PURE__ */ jsx97("div", { className: "text-center py-1 text-sm text-t_text_primary text-opacity-50", children: "No network found" }) })
|
|
26070
26322
|
] });
|
|
26071
26323
|
};
|
|
26072
26324
|
|
|
26073
26325
|
// src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/index.tsx
|
|
26074
26326
|
import { faCheck } from "@fortawesome/free-solid-svg-icons";
|
|
26075
26327
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
26076
|
-
import { useCallback as useCallback11, useEffect as
|
|
26328
|
+
import { useCallback as useCallback11, useEffect as useEffect10, useMemo as useMemo21, useRef as useRef6, useState as useState11 } from "react";
|
|
26077
26329
|
import { Virtuoso as Virtuoso4 } from "react-virtuoso";
|
|
26078
26330
|
|
|
26079
26331
|
// src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/NetworkFilter/index.tsx
|
|
26080
|
-
import { useEffect as
|
|
26332
|
+
import { useEffect as useEffect9, useMemo as useMemo19, useRef as useRef5, useState as useState10 } from "react";
|
|
26081
26333
|
import { Virtuoso as Virtuoso3 } from "react-virtuoso";
|
|
26082
|
-
import { jsx as
|
|
26334
|
+
import { jsx as jsx98, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
26083
26335
|
var NetworkFilter = ({ type, selectedChain, onSelect }) => {
|
|
26084
26336
|
const { srcChainOptions, dstChainOptions } = useSwapContext();
|
|
26085
|
-
const [open, setOpen] =
|
|
26086
|
-
const [searchValue, setSearchValue] =
|
|
26337
|
+
const [open, setOpen] = useState10(false);
|
|
26338
|
+
const [searchValue, setSearchValue] = useState10("");
|
|
26087
26339
|
const containerRef = useRef5(null);
|
|
26088
|
-
const chains =
|
|
26340
|
+
const chains = useMemo19(
|
|
26089
26341
|
() => type === "source" ? srcChainOptions : dstChainOptions,
|
|
26090
26342
|
[type, srcChainOptions, dstChainOptions]
|
|
26091
26343
|
);
|
|
26092
|
-
const filteredChains =
|
|
26344
|
+
const filteredChains = useMemo19(() => {
|
|
26093
26345
|
if (!searchValue) return chains;
|
|
26094
26346
|
const searchLower = searchValue.toLowerCase();
|
|
26095
26347
|
return chains.filter(
|
|
26096
26348
|
(chain) => chain.displayName.toLowerCase().includes(searchLower) || chain.chainId.toLowerCase().includes(searchLower)
|
|
26097
26349
|
);
|
|
26098
26350
|
}, [chains, searchValue]);
|
|
26099
|
-
|
|
26351
|
+
useEffect9(() => {
|
|
26100
26352
|
if (!open) {
|
|
26101
26353
|
setSearchValue("");
|
|
26102
26354
|
}
|
|
26103
26355
|
}, [open]);
|
|
26104
|
-
|
|
26356
|
+
useEffect9(() => {
|
|
26105
26357
|
const onPointerDown = (e) => {
|
|
26106
26358
|
if (containerRef.current && !e.composedPath().includes(containerRef.current)) {
|
|
26107
26359
|
setOpen(false);
|
|
@@ -26111,22 +26363,22 @@ var NetworkFilter = ({ type, selectedChain, onSelect }) => {
|
|
|
26111
26363
|
return () => document.removeEventListener("mousedown", onPointerDown);
|
|
26112
26364
|
}, []);
|
|
26113
26365
|
const clusterChains = chains.slice(0, 4);
|
|
26114
|
-
return /* @__PURE__ */
|
|
26115
|
-
/* @__PURE__ */
|
|
26366
|
+
return /* @__PURE__ */ jsxs45("div", { className: "relative", ref: containerRef, children: [
|
|
26367
|
+
/* @__PURE__ */ jsxs45(
|
|
26116
26368
|
"button",
|
|
26117
26369
|
{
|
|
26118
26370
|
type: "button",
|
|
26119
26371
|
onClick: () => setOpen((state) => !state),
|
|
26120
26372
|
className: "flex items-center gap-2.5 h-12 px-3 py-2 rounded-lg bg-t_bg_tertiary bg-opacity-[0.04] hover:bg-opacity-10 transition-colors",
|
|
26121
26373
|
children: [
|
|
26122
|
-
selectedChain ? /* @__PURE__ */
|
|
26374
|
+
selectedChain ? /* @__PURE__ */ jsx98(
|
|
26123
26375
|
"img",
|
|
26124
26376
|
{
|
|
26125
26377
|
src: selectedChain.image,
|
|
26126
26378
|
alt: selectedChain.displayName,
|
|
26127
26379
|
className: "w-5 h-5 rounded-full"
|
|
26128
26380
|
}
|
|
26129
|
-
) : /* @__PURE__ */
|
|
26381
|
+
) : /* @__PURE__ */ jsx98("div", { className: "grid grid-cols-2 gap-0.5 shrink-0", children: clusterChains.map((chain) => /* @__PURE__ */ jsx98(
|
|
26130
26382
|
"img",
|
|
26131
26383
|
{
|
|
26132
26384
|
src: chain.image,
|
|
@@ -26135,21 +26387,21 @@ var NetworkFilter = ({ type, selectedChain, onSelect }) => {
|
|
|
26135
26387
|
},
|
|
26136
26388
|
chain.chainId
|
|
26137
26389
|
)) }),
|
|
26138
|
-
/* @__PURE__ */
|
|
26139
|
-
/* @__PURE__ */
|
|
26390
|
+
/* @__PURE__ */ jsx98("p", { className: "text-sm leading-6 tracking-[0.01em] text-t_text_primary whitespace-nowrap max-w-[120px] truncate", children: selectedChain ? selectedChain.displayName : `${chains.length} Networks` }),
|
|
26391
|
+
/* @__PURE__ */ jsx98(
|
|
26140
26392
|
"div",
|
|
26141
26393
|
{
|
|
26142
26394
|
className: `flex items-center justify-center w-6 h-6 text-t_text_primary opacity-50 transition-transform ${open ? "rotate-180" : ""}`,
|
|
26143
|
-
children: /* @__PURE__ */
|
|
26395
|
+
children: /* @__PURE__ */ jsx98(ChevronDownThinIcon, {})
|
|
26144
26396
|
}
|
|
26145
26397
|
)
|
|
26146
26398
|
]
|
|
26147
26399
|
}
|
|
26148
26400
|
),
|
|
26149
|
-
open && /* @__PURE__ */
|
|
26150
|
-
/* @__PURE__ */
|
|
26151
|
-
/* @__PURE__ */
|
|
26152
|
-
/* @__PURE__ */
|
|
26401
|
+
open && /* @__PURE__ */ jsxs45("div", { className: "absolute -right-2 top-[calc(100%+8px)] z-20 flex flex-col w-[296px] py-5 px-2.5 rounded-xl network-dropdown-surface border border-solid border-t_text_primary border-opacity-5 overflow-hidden", children: [
|
|
26402
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-2 px-2.5 pb-4", children: [
|
|
26403
|
+
/* @__PURE__ */ jsx98("div", { className: "text-t_text_primary opacity-60 [&_svg]:w-4 [&_svg]:h-4 flex items-center", children: /* @__PURE__ */ jsx98(SearchThinIcon, {}) }),
|
|
26404
|
+
/* @__PURE__ */ jsx98(
|
|
26153
26405
|
"input",
|
|
26154
26406
|
{
|
|
26155
26407
|
value: searchValue,
|
|
@@ -26159,15 +26411,15 @@ var NetworkFilter = ({ type, selectedChain, onSelect }) => {
|
|
|
26159
26411
|
}
|
|
26160
26412
|
)
|
|
26161
26413
|
] }),
|
|
26162
|
-
/* @__PURE__ */
|
|
26163
|
-
/* @__PURE__ */
|
|
26414
|
+
/* @__PURE__ */ jsx98("div", { className: "h-px w-full bg-t_bg_tertiary bg-opacity-5 mb-2" }),
|
|
26415
|
+
/* @__PURE__ */ jsx98("div", { className: "h-[214px]", children: /* @__PURE__ */ jsx98(
|
|
26164
26416
|
Virtuoso3,
|
|
26165
26417
|
{
|
|
26166
26418
|
style: { height: "214px" },
|
|
26167
26419
|
data: [void 0, ...filteredChains],
|
|
26168
26420
|
itemContent: (_, chain) => {
|
|
26169
26421
|
const isSelected = (chain?.chainId || "") === (selectedChain?.chainId || "");
|
|
26170
|
-
return /* @__PURE__ */
|
|
26422
|
+
return /* @__PURE__ */ jsxs45(
|
|
26171
26423
|
"button",
|
|
26172
26424
|
{
|
|
26173
26425
|
type: "button",
|
|
@@ -26177,14 +26429,14 @@ var NetworkFilter = ({ type, selectedChain, onSelect }) => {
|
|
|
26177
26429
|
},
|
|
26178
26430
|
className: `network-dropdown-row flex items-center gap-2.5 w-full h-10 px-2.5 rounded-lg text-left ${isSelected ? "network-dropdown-row-active" : ""}`,
|
|
26179
26431
|
children: [
|
|
26180
|
-
chain ? /* @__PURE__ */
|
|
26432
|
+
chain ? /* @__PURE__ */ jsx98(
|
|
26181
26433
|
"img",
|
|
26182
26434
|
{
|
|
26183
26435
|
src: chain.image,
|
|
26184
26436
|
alt: chain.displayName,
|
|
26185
26437
|
className: "w-6 h-6 rounded-full"
|
|
26186
26438
|
}
|
|
26187
|
-
) : /* @__PURE__ */
|
|
26439
|
+
) : /* @__PURE__ */ jsx98("div", { className: "grid grid-cols-2 gap-0.5 shrink-0", children: clusterChains.map((clusterChain) => /* @__PURE__ */ jsx98(
|
|
26188
26440
|
"img",
|
|
26189
26441
|
{
|
|
26190
26442
|
src: clusterChain.image,
|
|
@@ -26193,7 +26445,7 @@ var NetworkFilter = ({ type, selectedChain, onSelect }) => {
|
|
|
26193
26445
|
},
|
|
26194
26446
|
clusterChain.chainId
|
|
26195
26447
|
)) }),
|
|
26196
|
-
/* @__PURE__ */
|
|
26448
|
+
/* @__PURE__ */ jsx98(
|
|
26197
26449
|
"p",
|
|
26198
26450
|
{
|
|
26199
26451
|
className: `text-sm leading-[18px] tracking-[0.01em] text-t_text_primary truncate ${isSelected ? "" : "text-opacity-80"}`,
|
|
@@ -26211,9 +26463,9 @@ var NetworkFilter = ({ type, selectedChain, onSelect }) => {
|
|
|
26211
26463
|
};
|
|
26212
26464
|
|
|
26213
26465
|
// src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/TokenItem/index.tsx
|
|
26214
|
-
import { useMemo as
|
|
26466
|
+
import { useMemo as useMemo20 } from "react";
|
|
26215
26467
|
import { useAccount as useAccount3 } from "wagmi";
|
|
26216
|
-
import { Fragment as Fragment7, jsx as
|
|
26468
|
+
import { Fragment as Fragment7, jsx as jsx99, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
26217
26469
|
var TokenItem = ({
|
|
26218
26470
|
token,
|
|
26219
26471
|
selectedTokenAddress,
|
|
@@ -26229,34 +26481,34 @@ var TokenItem = ({
|
|
|
26229
26481
|
integrationConfig
|
|
26230
26482
|
} = useSwapContext();
|
|
26231
26483
|
const { address } = useAccount3();
|
|
26232
|
-
const chain =
|
|
26484
|
+
const chain = useMemo20(
|
|
26233
26485
|
() => supportedChains.find(({ chainId }) => chainId === token.chainId),
|
|
26234
26486
|
[supportedChains, token]
|
|
26235
26487
|
);
|
|
26236
|
-
const tokenPrice =
|
|
26488
|
+
const tokenPrice = useMemo20(() => {
|
|
26237
26489
|
const prices = tokenPrices[token.chainId];
|
|
26238
26490
|
return prices?.[token.address];
|
|
26239
26491
|
}, [token, tokenPrices]);
|
|
26240
|
-
const tokenBalance =
|
|
26492
|
+
const tokenBalance = useMemo20(() => {
|
|
26241
26493
|
if (!token.balance || !token.decimals) return null;
|
|
26242
26494
|
return Number(ethers_exports.utils.formatUnits(token.balance, token.decimals));
|
|
26243
26495
|
}, [token.balance, token.decimals]);
|
|
26244
|
-
const hasBalance =
|
|
26496
|
+
const hasBalance = useMemo20(
|
|
26245
26497
|
() => token.balance && !token.balance.eq(0),
|
|
26246
26498
|
[token.balance]
|
|
26247
26499
|
);
|
|
26248
|
-
const tokenValueUsd =
|
|
26500
|
+
const tokenValueUsd = useMemo20(() => {
|
|
26249
26501
|
if (!tokenBalance || !tokenPrice || !hasBalance) return null;
|
|
26250
26502
|
return tokenBalance * +tokenPrice;
|
|
26251
26503
|
}, [tokenBalance, tokenPrice, hasBalance]);
|
|
26252
26504
|
const isSelected = token.address.toLowerCase() === selectedTokenAddress?.toLowerCase() && selectedChainId && token.chainId === selectedChainId;
|
|
26253
|
-
return /* @__PURE__ */
|
|
26505
|
+
return /* @__PURE__ */ jsx99("div", { className: "pb-2", children: /* @__PURE__ */ jsxs46(
|
|
26254
26506
|
"div",
|
|
26255
26507
|
{
|
|
26256
26508
|
className: `flex gap-3 items-center p-3 sm:p-4 rounded-xl cursor-pointer bg-gradient-to-r from-t_bg_tertiary/[0.02] to-t_bg_tertiary/[0.02] bg-[rgba(40,40,40,0.15)] hover:bg-t_bg_tertiary hover:bg-opacity-10 transition-colors ${isSelected ? "!bg-t_bg_tertiary !bg-opacity-10" : ""}`,
|
|
26257
26509
|
onClick,
|
|
26258
26510
|
children: [
|
|
26259
|
-
/* @__PURE__ */
|
|
26511
|
+
/* @__PURE__ */ jsx99("div", { className: `shrink-0 ${resetWarning ? "opacity-40" : ""}`, children: /* @__PURE__ */ jsx99(
|
|
26260
26512
|
TokenLogoWithChain,
|
|
26261
26513
|
{
|
|
26262
26514
|
token,
|
|
@@ -26266,37 +26518,37 @@ var TokenItem = ({
|
|
|
26266
26518
|
chainLogoClassName: "w-[18px]"
|
|
26267
26519
|
}
|
|
26268
26520
|
) }),
|
|
26269
|
-
/* @__PURE__ */
|
|
26270
|
-
/* @__PURE__ */
|
|
26521
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex justify-between items-center gap-2 w-full min-w-0", children: [
|
|
26522
|
+
/* @__PURE__ */ jsxs46(
|
|
26271
26523
|
"div",
|
|
26272
26524
|
{
|
|
26273
26525
|
className: `text-left min-w-0 ${resetWarning ? "opacity-40" : ""}`,
|
|
26274
26526
|
children: [
|
|
26275
|
-
/* @__PURE__ */
|
|
26527
|
+
/* @__PURE__ */ jsxs46("div", { className: "text-sm font-medium leading-5 tracking-[0.01em] text-t_text_primary flex items-center gap-1", children: [
|
|
26276
26528
|
token.symbol,
|
|
26277
26529
|
integrationConfig?.highlightedDstTokens?.includes(
|
|
26278
26530
|
token.symbol
|
|
26279
|
-
) && panelType === "destination" && /* @__PURE__ */
|
|
26531
|
+
) && panelType === "destination" && /* @__PURE__ */ jsx99(
|
|
26280
26532
|
"div",
|
|
26281
26533
|
{
|
|
26282
26534
|
className: "flex items-center justify-center text-t_text_primary rounded-full w-3.5 h-3.5 text-xs",
|
|
26283
26535
|
title: "AI-powered token",
|
|
26284
|
-
children: /* @__PURE__ */
|
|
26536
|
+
children: /* @__PURE__ */ jsx99(StarsIcon, {})
|
|
26285
26537
|
}
|
|
26286
26538
|
)
|
|
26287
26539
|
] }),
|
|
26288
|
-
/* @__PURE__ */
|
|
26289
|
-
/* @__PURE__ */
|
|
26290
|
-
!resetWarning && /* @__PURE__ */
|
|
26291
|
-
/* @__PURE__ */
|
|
26292
|
-
/* @__PURE__ */
|
|
26540
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex gap-2 items-center text-xs leading-[18px] tracking-[0.01em] text-t_text_primary text-opacity-50", children: [
|
|
26541
|
+
/* @__PURE__ */ jsx99("span", { className: "whitespace-nowrap", children: chain?.displayName || token.name }),
|
|
26542
|
+
!resetWarning && /* @__PURE__ */ jsxs46(Fragment7, { children: [
|
|
26543
|
+
/* @__PURE__ */ jsx99("span", { className: "w-0.5 h-0.5 bg-t_text_primary opacity-25 shrink-0" }),
|
|
26544
|
+
/* @__PURE__ */ jsx99("span", { className: "whitespace-nowrap hidden sm:block", children: shortAddress(token.address) })
|
|
26293
26545
|
] })
|
|
26294
26546
|
] })
|
|
26295
26547
|
]
|
|
26296
26548
|
}
|
|
26297
26549
|
),
|
|
26298
|
-
/* @__PURE__ */
|
|
26299
|
-
address && isFetchingBalances ? /* @__PURE__ */
|
|
26550
|
+
/* @__PURE__ */ jsxs46("div", { className: "text-right shrink-0", children: [
|
|
26551
|
+
address && isFetchingBalances ? /* @__PURE__ */ jsx99(Skeleton, { className: "w-[48px] h-[12px]" }) : token.balance && token.decimals && address && /* @__PURE__ */ jsx99(
|
|
26300
26552
|
"div",
|
|
26301
26553
|
{
|
|
26302
26554
|
className: `text-sm font-medium leading-5 tracking-[0.01em] text-t_text_primary ${resetWarning ? "opacity-40" : ""}`,
|
|
@@ -26307,13 +26559,13 @@ var TokenItem = ({
|
|
|
26307
26559
|
}) : "<0.0001"
|
|
26308
26560
|
}
|
|
26309
26561
|
),
|
|
26310
|
-
resetWarning ? /* @__PURE__ */
|
|
26311
|
-
/* @__PURE__ */
|
|
26312
|
-
/* @__PURE__ */
|
|
26313
|
-
/* @__PURE__ */
|
|
26314
|
-
/* @__PURE__ */
|
|
26562
|
+
resetWarning ? /* @__PURE__ */ jsxs46("div", { className: "flex items-center justify-end gap-1.5 text-[#F46F28]", children: [
|
|
26563
|
+
/* @__PURE__ */ jsx99(WarningIcon, { className: "w-3.5 h-3.5 shrink-0" }),
|
|
26564
|
+
/* @__PURE__ */ jsxs46("span", { className: "text-xs leading-[18px] tracking-[0.01em] whitespace-nowrap", children: [
|
|
26565
|
+
/* @__PURE__ */ jsx99("span", { className: "sm:hidden", children: resetWarning === "source" ? "Source will reset." : "Destination will reset." }),
|
|
26566
|
+
/* @__PURE__ */ jsx99("span", { className: "hidden sm:inline", children: resetWarning === "source" ? "Source will reset after selection." : "Destination will reset after selection." })
|
|
26315
26567
|
] })
|
|
26316
|
-
] }) : !isFetchingBalances && hasBalance && address && /* @__PURE__ */
|
|
26568
|
+
] }) : !isFetchingBalances && hasBalance && address && /* @__PURE__ */ jsx99("div", { className: "text-xs leading-[18px] tracking-[0.01em] text-t_text_primary text-opacity-50", children: tokenValueUsd ? `${tokenValueUsd.toFixed(2)} USD` : "-" })
|
|
26317
26569
|
] })
|
|
26318
26570
|
] })
|
|
26319
26571
|
]
|
|
@@ -26324,7 +26576,7 @@ var TokenItem = ({
|
|
|
26324
26576
|
// src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/index.tsx
|
|
26325
26577
|
import { useAccount as useAccount4 } from "wagmi";
|
|
26326
26578
|
import { Connection as Connection9, PublicKey as PublicKey25 } from "@solana/web3.js";
|
|
26327
|
-
import { Fragment as Fragment8, jsx as
|
|
26579
|
+
import { Fragment as Fragment8, jsx as jsx100, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
26328
26580
|
var TokenPicker = ({
|
|
26329
26581
|
chain,
|
|
26330
26582
|
tokens,
|
|
@@ -26335,12 +26587,12 @@ var TokenPicker = ({
|
|
|
26335
26587
|
setModalOpen,
|
|
26336
26588
|
type
|
|
26337
26589
|
}) => {
|
|
26338
|
-
const [searchValue, setSearchValue] =
|
|
26339
|
-
const [acceptRisks, setAcceptRisks] =
|
|
26340
|
-
const [showImportWarning, setShowImportWarning] =
|
|
26341
|
-
const [loadingCustomTokenData, setLoadingCustomTokenData] =
|
|
26342
|
-
const [customTokenData, setCustomTokenData] =
|
|
26343
|
-
const [networkFilter, setNetworkFilter] =
|
|
26590
|
+
const [searchValue, setSearchValue] = useState11("");
|
|
26591
|
+
const [acceptRisks, setAcceptRisks] = useState11(false);
|
|
26592
|
+
const [showImportWarning, setShowImportWarning] = useState11(false);
|
|
26593
|
+
const [loadingCustomTokenData, setLoadingCustomTokenData] = useState11(false);
|
|
26594
|
+
const [customTokenData, setCustomTokenData] = useState11(null);
|
|
26595
|
+
const [networkFilter, setNetworkFilter] = useState11(
|
|
26344
26596
|
void 0
|
|
26345
26597
|
);
|
|
26346
26598
|
const currentRouteRequestNonce = useRef6(0);
|
|
@@ -26359,7 +26611,7 @@ var TokenPicker = ({
|
|
|
26359
26611
|
const {
|
|
26360
26612
|
solana: { address: solanaAddress }
|
|
26361
26613
|
} = useWallet();
|
|
26362
|
-
|
|
26614
|
+
useEffect10(() => {
|
|
26363
26615
|
setShowImportWarning(false);
|
|
26364
26616
|
setAcceptRisks(false);
|
|
26365
26617
|
}, [isOpen]);
|
|
@@ -26489,7 +26741,7 @@ var TokenPicker = ({
|
|
|
26489
26741
|
}
|
|
26490
26742
|
}
|
|
26491
26743
|
}, [importChain, searchValue, supportedChains]);
|
|
26492
|
-
|
|
26744
|
+
useEffect10(() => {
|
|
26493
26745
|
if (!bridgeUI && importChain && !findTokenDataByAddressAndChain(
|
|
26494
26746
|
importChain.ecosystem === "evm" /* EVM */ ? searchValue.toLowerCase() : searchValue,
|
|
26495
26747
|
importChain.chainId
|
|
@@ -26514,12 +26766,12 @@ var TokenPicker = ({
|
|
|
26514
26766
|
findTokenDataByAddressAndChain,
|
|
26515
26767
|
importChain
|
|
26516
26768
|
]);
|
|
26517
|
-
|
|
26769
|
+
useEffect10(() => {
|
|
26518
26770
|
setSearchValue("");
|
|
26519
26771
|
setNetworkFilter(void 0);
|
|
26520
26772
|
}, [isOpen]);
|
|
26521
26773
|
const isMatch = (value, searchValue2) => value.toLowerCase().indexOf(searchValue2.toLowerCase()) > -1;
|
|
26522
|
-
const visibleTokens =
|
|
26774
|
+
const visibleTokens = useMemo21(() => {
|
|
26523
26775
|
const all = [...tokens || [], ...otherTokens || []];
|
|
26524
26776
|
return all.filter((token) => {
|
|
26525
26777
|
if (networkFilter && token.chainId !== networkFilter.chainId) {
|
|
@@ -26566,7 +26818,7 @@ var TokenPicker = ({
|
|
|
26566
26818
|
(tokenA, tokenB) => Number(!!getResetWarning(tokenA)) - Number(!!getResetWarning(tokenB)),
|
|
26567
26819
|
[getResetWarning]
|
|
26568
26820
|
);
|
|
26569
|
-
const ownedTokens =
|
|
26821
|
+
const ownedTokens = useMemo21(() => {
|
|
26570
26822
|
if (!address && !solanaAddress) {
|
|
26571
26823
|
return [];
|
|
26572
26824
|
}
|
|
@@ -26589,7 +26841,7 @@ var TokenPicker = ({
|
|
|
26589
26841
|
calculateTokenValue,
|
|
26590
26842
|
compareByResetWarning
|
|
26591
26843
|
]);
|
|
26592
|
-
const recommendedTokens =
|
|
26844
|
+
const recommendedTokens = useMemo21(
|
|
26593
26845
|
() => visibleTokens.filter(
|
|
26594
26846
|
(token) => !(address || solanaAddress) || BigNumber.from(token?.balance || "0").eq(0)
|
|
26595
26847
|
).sort(
|
|
@@ -26597,13 +26849,13 @@ var TokenPicker = ({
|
|
|
26597
26849
|
),
|
|
26598
26850
|
[visibleTokens, address, solanaAddress, compareByResetWarning]
|
|
26599
26851
|
);
|
|
26600
|
-
const tokenGroups =
|
|
26852
|
+
const tokenGroups = useMemo21(() => {
|
|
26601
26853
|
return ownedTokens.length ? [
|
|
26602
26854
|
{ label: "MY TOKENS.", tokens: ownedTokens },
|
|
26603
26855
|
{ label: "RECOMMENDED.", tokens: recommendedTokens }
|
|
26604
26856
|
] : [{ label: "RECOMMENDED.", tokens: recommendedTokens }];
|
|
26605
26857
|
}, [ownedTokens, recommendedTokens]);
|
|
26606
|
-
const listRows =
|
|
26858
|
+
const listRows = useMemo21(
|
|
26607
26859
|
() => tokenGroups.flatMap((group, groupIndex) => {
|
|
26608
26860
|
const rows = groupIndex === 0 ? [] : [
|
|
26609
26861
|
{
|
|
@@ -26627,49 +26879,49 @@ var TokenPicker = ({
|
|
|
26627
26879
|
}),
|
|
26628
26880
|
[tokenGroups]
|
|
26629
26881
|
);
|
|
26630
|
-
const [topRowIndex, setTopRowIndex] =
|
|
26882
|
+
const [topRowIndex, setTopRowIndex] = useState11(0);
|
|
26631
26883
|
const pinnedGroupLabel = listRows[Math.min(topRowIndex, listRows.length - 1)]?.groupLabel ?? tokenGroups[0]?.label ?? "";
|
|
26632
|
-
|
|
26884
|
+
useEffect10(() => {
|
|
26633
26885
|
if (isOpen && tokenSearchRef.current) {
|
|
26634
26886
|
setTimeout(() => {
|
|
26635
26887
|
tokenSearchRef.current?.focus();
|
|
26636
26888
|
}, 10);
|
|
26637
26889
|
}
|
|
26638
26890
|
}, [isOpen]);
|
|
26639
|
-
return showImportWarning ? /* @__PURE__ */
|
|
26640
|
-
/* @__PURE__ */
|
|
26641
|
-
/* @__PURE__ */
|
|
26642
|
-
/* @__PURE__ */
|
|
26891
|
+
return showImportWarning ? /* @__PURE__ */ jsxs47(Fragment8, { children: [
|
|
26892
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex justify-between items-center mb-6", children: [
|
|
26893
|
+
/* @__PURE__ */ jsx100("div", { className: "text-2xl font-medium leading-8 tracking-[0.01em]", children: "Import token" }),
|
|
26894
|
+
/* @__PURE__ */ jsx100(
|
|
26643
26895
|
"button",
|
|
26644
26896
|
{
|
|
26645
26897
|
type: "button",
|
|
26646
26898
|
"aria-label": "Close",
|
|
26647
26899
|
className: "flex items-center justify-center w-8 h-8 rounded-md bg-t_bg_tertiary bg-opacity-5 hover:bg-opacity-10 transition-colors",
|
|
26648
26900
|
onClick: () => setModalOpen(false),
|
|
26649
|
-
children: /* @__PURE__ */
|
|
26901
|
+
children: /* @__PURE__ */ jsx100("div", { className: "w-4 h-4 opacity-50 fill-t_text_primary flex items-center justify-center", children: /* @__PURE__ */ jsx100(CloseIcon, {}) })
|
|
26650
26902
|
}
|
|
26651
26903
|
)
|
|
26652
26904
|
] }),
|
|
26653
|
-
/* @__PURE__ */
|
|
26654
|
-
customTokenData && /* @__PURE__ */
|
|
26905
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex flex-col h-full gap-2", children: [
|
|
26906
|
+
customTokenData && /* @__PURE__ */ jsxs47(
|
|
26655
26907
|
"div",
|
|
26656
26908
|
{
|
|
26657
26909
|
className: `flex gap-3 py-3 px-4 items-center grow-0 bg-t_bg_tertiary bg-opacity-[0.03] border border-solid border-t_text_primary border-opacity-10 rounded-xl`,
|
|
26658
26910
|
children: [
|
|
26659
|
-
/* @__PURE__ */
|
|
26911
|
+
/* @__PURE__ */ jsx100(
|
|
26660
26912
|
UnknownTokenLogo,
|
|
26661
26913
|
{
|
|
26662
26914
|
tokenName: customTokenData.name,
|
|
26663
26915
|
className: "w-9 h-9 text-[15px]"
|
|
26664
26916
|
}
|
|
26665
26917
|
),
|
|
26666
|
-
/* @__PURE__ */
|
|
26667
|
-
/* @__PURE__ */
|
|
26668
|
-
/* @__PURE__ */
|
|
26918
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex justify-between items-center gap-1 overflow-hidden grow", children: [
|
|
26919
|
+
/* @__PURE__ */ jsx100("div", { className: "overflow-hidden whitespace-nowrap text-ellipsis text-sm font-medium", children: customTokenData.name }),
|
|
26920
|
+
/* @__PURE__ */ jsx100("div", { className: "text-sm text-t_text_primary text-opacity-50", children: customTokenData.symbol })
|
|
26669
26921
|
] }),
|
|
26670
|
-
/* @__PURE__ */
|
|
26922
|
+
/* @__PURE__ */ jsxs47("div", { className: "text-sm flex items-center", children: [
|
|
26671
26923
|
shortAddress(searchValue.toLowerCase()),
|
|
26672
|
-
/* @__PURE__ */
|
|
26924
|
+
/* @__PURE__ */ jsx100(
|
|
26673
26925
|
"button",
|
|
26674
26926
|
{
|
|
26675
26927
|
type: "button",
|
|
@@ -26678,30 +26930,30 @@ var TokenPicker = ({
|
|
|
26678
26930
|
),
|
|
26679
26931
|
"aria-label": `Copy ${customTokenData.symbol} token address`,
|
|
26680
26932
|
className: "flex items-center p-2 fill-t_text_primary cursor-pointer hover:fill-t_main_accent_light",
|
|
26681
|
-
children: /* @__PURE__ */
|
|
26933
|
+
children: /* @__PURE__ */ jsx100(CopyIcon, { className: "w-5 h-5" })
|
|
26682
26934
|
}
|
|
26683
26935
|
)
|
|
26684
26936
|
] })
|
|
26685
26937
|
]
|
|
26686
26938
|
}
|
|
26687
26939
|
),
|
|
26688
|
-
/* @__PURE__ */
|
|
26689
|
-
/* @__PURE__ */
|
|
26690
|
-
/* @__PURE__ */
|
|
26691
|
-
/* @__PURE__ */
|
|
26940
|
+
/* @__PURE__ */ jsx100("div", { className: "px-4 py-4 rounded-xl border border-solid border-t_warning_dark text-sm text-t_text_primary text-opacity-80", children: "Ensure that you have verified the token address and confirmed its correctness" }),
|
|
26941
|
+
/* @__PURE__ */ jsxs47("div", { className: "bg-t_bg_tertiary bg-opacity-[0.03] border border-solid border-t_text_primary border-opacity-10 rounded-xl p-4", children: [
|
|
26942
|
+
/* @__PURE__ */ jsx100("div", { className: "text-sm mb-2 text-t_text_primary text-opacity-80", children: "Be mindful that anyone can create tokens, even counterfeit versions of existing ones. Certain tokens and their technical specifications might not be compatible with XSwap services. By importing such custom tokens, you acknowledge and consent to the associated risks." }),
|
|
26943
|
+
/* @__PURE__ */ jsxs47(
|
|
26692
26944
|
"button",
|
|
26693
26945
|
{
|
|
26694
26946
|
type: "button",
|
|
26695
26947
|
onClick: () => setAcceptRisks((state) => !state),
|
|
26696
26948
|
className: "flex items-center",
|
|
26697
26949
|
children: [
|
|
26698
|
-
/* @__PURE__ */
|
|
26699
|
-
/* @__PURE__ */
|
|
26950
|
+
/* @__PURE__ */ jsx100("div", { className: "flex justify-center items-center p-1 w-6 h-6 border-2 border-solid border-t_text_primary border-opacity-50 rounded-md mr-2", children: acceptRisks && /* @__PURE__ */ jsx100(FontAwesomeIcon, { icon: faCheck, className: "w-4 h-4" }) }),
|
|
26951
|
+
/* @__PURE__ */ jsx100("div", { className: "font-medium", children: "Accept" })
|
|
26700
26952
|
]
|
|
26701
26953
|
}
|
|
26702
26954
|
)
|
|
26703
26955
|
] }),
|
|
26704
|
-
/* @__PURE__ */
|
|
26956
|
+
/* @__PURE__ */ jsx100("div", { className: "flex grow items-end justify-center", children: /* @__PURE__ */ jsx100(
|
|
26705
26957
|
Button,
|
|
26706
26958
|
{
|
|
26707
26959
|
type: "button",
|
|
@@ -26712,24 +26964,24 @@ var TokenPicker = ({
|
|
|
26712
26964
|
}
|
|
26713
26965
|
) })
|
|
26714
26966
|
] })
|
|
26715
|
-
] }) : /* @__PURE__ */
|
|
26716
|
-
/* @__PURE__ */
|
|
26717
|
-
/* @__PURE__ */
|
|
26718
|
-
/* @__PURE__ */
|
|
26967
|
+
] }) : /* @__PURE__ */ jsxs47(Fragment8, { children: [
|
|
26968
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex justify-between items-center mb-6", children: [
|
|
26969
|
+
/* @__PURE__ */ jsx100("div", { className: "text-2xl font-medium leading-8 tracking-[0.01em] text-t_text_primary", children: "Select Token" }),
|
|
26970
|
+
/* @__PURE__ */ jsx100(
|
|
26719
26971
|
"button",
|
|
26720
26972
|
{
|
|
26721
26973
|
type: "button",
|
|
26722
26974
|
"aria-label": "Close",
|
|
26723
26975
|
className: "flex items-center justify-center w-8 h-8 rounded-md bg-t_bg_tertiary bg-opacity-5 hover:bg-opacity-10 transition-colors",
|
|
26724
26976
|
onClick: () => setModalOpen(false),
|
|
26725
|
-
children: /* @__PURE__ */
|
|
26977
|
+
children: /* @__PURE__ */ jsx100("div", { className: "w-4 h-4 opacity-50 fill-t_text_primary flex items-center justify-center", children: /* @__PURE__ */ jsx100(CloseIcon, {}) })
|
|
26726
26978
|
}
|
|
26727
26979
|
)
|
|
26728
26980
|
] }),
|
|
26729
|
-
/* @__PURE__ */
|
|
26730
|
-
/* @__PURE__ */
|
|
26731
|
-
/* @__PURE__ */
|
|
26732
|
-
/* @__PURE__ */
|
|
26981
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex items-center justify-between gap-2 h-14 pl-4 pr-1 rounded-xl bg-t_bg_tertiary bg-opacity-[0.03] border border-solid border-t_text_primary border-opacity-5 mb-6", children: [
|
|
26982
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
|
|
26983
|
+
/* @__PURE__ */ jsx100("div", { className: "text-t_text_primary opacity-60 flex items-center shrink-0", children: /* @__PURE__ */ jsx100(SearchThinIcon, {}) }),
|
|
26984
|
+
/* @__PURE__ */ jsx100(
|
|
26733
26985
|
"input",
|
|
26734
26986
|
{
|
|
26735
26987
|
ref: tokenSearchRef,
|
|
@@ -26740,7 +26992,7 @@ var TokenPicker = ({
|
|
|
26740
26992
|
}
|
|
26741
26993
|
)
|
|
26742
26994
|
] }),
|
|
26743
|
-
/* @__PURE__ */
|
|
26995
|
+
/* @__PURE__ */ jsx100(
|
|
26744
26996
|
NetworkFilter,
|
|
26745
26997
|
{
|
|
26746
26998
|
type,
|
|
@@ -26749,8 +27001,8 @@ var TokenPicker = ({
|
|
|
26749
27001
|
}
|
|
26750
27002
|
)
|
|
26751
27003
|
] }),
|
|
26752
|
-
/* @__PURE__ */
|
|
26753
|
-
/* @__PURE__ */
|
|
27004
|
+
/* @__PURE__ */ jsx100("div", { className: "flex flex-col mx-0 h-full min-h-0 flex-1", children: loadingCustomTokenData ? /* @__PURE__ */ jsx100("div", { className: "flex justify-center w-full py-4 px-0", children: /* @__PURE__ */ jsx100(Spinner, { className: "w-9 h-9" }) }) : /* @__PURE__ */ jsx100(Fragment8, { children: customTokenData ? /* @__PURE__ */ jsxs47("div", { className: "flex gap-3 py-3 px-4 items-center rounded-xl bg-t_bg_tertiary bg-opacity-[0.03]", children: [
|
|
27005
|
+
/* @__PURE__ */ jsx100(
|
|
26754
27006
|
TokenLogoWithChain,
|
|
26755
27007
|
{
|
|
26756
27008
|
token: customTokenData,
|
|
@@ -26760,14 +27012,14 @@ var TokenPicker = ({
|
|
|
26760
27012
|
chainLogoClassName: "w-5"
|
|
26761
27013
|
}
|
|
26762
27014
|
),
|
|
26763
|
-
/* @__PURE__ */
|
|
26764
|
-
/* @__PURE__ */
|
|
26765
|
-
/* @__PURE__ */
|
|
26766
|
-
/* @__PURE__ */
|
|
27015
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex justify-between items-center gap-1 overflow-hidden grow", children: [
|
|
27016
|
+
/* @__PURE__ */ jsxs47("div", { children: [
|
|
27017
|
+
/* @__PURE__ */ jsx100("div", { className: "text-sm font-medium text-ellipsis", children: customTokenData.name }),
|
|
27018
|
+
/* @__PURE__ */ jsx100("div", { className: "text-xs text-t_text_primary !text-opacity-50", children: importChain?.displayName })
|
|
26767
27019
|
] }),
|
|
26768
|
-
/* @__PURE__ */
|
|
27020
|
+
/* @__PURE__ */ jsx100("div", { className: "text-sm text-t_text_primary text-opacity-50", children: customTokenData.symbol })
|
|
26769
27021
|
] }),
|
|
26770
|
-
/* @__PURE__ */
|
|
27022
|
+
/* @__PURE__ */ jsx100("div", { children: /* @__PURE__ */ jsx100(
|
|
26771
27023
|
Button,
|
|
26772
27024
|
{
|
|
26773
27025
|
type: "button",
|
|
@@ -26776,10 +27028,10 @@ var TokenPicker = ({
|
|
|
26776
27028
|
children: "Import"
|
|
26777
27029
|
}
|
|
26778
27030
|
) })
|
|
26779
|
-
] }) : /* @__PURE__ */
|
|
26780
|
-
/* @__PURE__ */
|
|
26781
|
-
/* @__PURE__ */
|
|
26782
|
-
/* @__PURE__ */
|
|
27031
|
+
] }) : /* @__PURE__ */ jsxs47("div", { className: "flex flex-col h-full min-h-0", children: [
|
|
27032
|
+
/* @__PURE__ */ jsx100("p", { className: "pb-3 text-[10px] leading-4 tracking-[0.015em] text-t_text_primary text-opacity-30 text-left shrink-0", children: pinnedGroupLabel }),
|
|
27033
|
+
/* @__PURE__ */ jsxs47("div", { className: "relative flex flex-col flex-1 min-h-0", children: [
|
|
27034
|
+
/* @__PURE__ */ jsx100(
|
|
26783
27035
|
Virtuoso4,
|
|
26784
27036
|
{
|
|
26785
27037
|
style: { maxHeight: "700px", height: "100%" },
|
|
@@ -26791,12 +27043,12 @@ var TokenPicker = ({
|
|
|
26791
27043
|
return null;
|
|
26792
27044
|
}
|
|
26793
27045
|
if (row.kind === "label") {
|
|
26794
|
-
return /* @__PURE__ */
|
|
27046
|
+
return /* @__PURE__ */ jsx100("p", { className: "pt-2 pb-3 text-[10px] leading-4 tracking-[0.015em] text-t_text_primary text-opacity-30 text-left", children: row.label });
|
|
26795
27047
|
}
|
|
26796
27048
|
if (row.kind === "empty") {
|
|
26797
|
-
return /* @__PURE__ */
|
|
27049
|
+
return /* @__PURE__ */ jsx100("div", { className: "text-center py-1 pb-3 text-sm text-t_text_primary text-opacity-50", children: "No token found" });
|
|
26798
27050
|
}
|
|
26799
|
-
return /* @__PURE__ */
|
|
27051
|
+
return /* @__PURE__ */ jsx100(
|
|
26800
27052
|
TokenItem,
|
|
26801
27053
|
{
|
|
26802
27054
|
panelType: type,
|
|
@@ -26813,14 +27065,14 @@ var TokenPicker = ({
|
|
|
26813
27065
|
}
|
|
26814
27066
|
}
|
|
26815
27067
|
),
|
|
26816
|
-
/* @__PURE__ */
|
|
27068
|
+
/* @__PURE__ */ jsx100("div", { className: "pointer-events-none absolute bottom-0 left-0 right-0 h-16 bg-gradient-to-t from-t_bg_secondary/65 to-t_bg_secondary/0" })
|
|
26817
27069
|
] })
|
|
26818
27070
|
] }) }) })
|
|
26819
27071
|
] });
|
|
26820
27072
|
};
|
|
26821
27073
|
|
|
26822
27074
|
// src/components/Swap/PickerView/index.tsx
|
|
26823
|
-
import { jsx as
|
|
27075
|
+
import { jsx as jsx101, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
26824
27076
|
var PickerView = () => {
|
|
26825
27077
|
const {
|
|
26826
27078
|
activePicker,
|
|
@@ -26887,7 +27139,7 @@ var PickerView = () => {
|
|
|
26887
27139
|
if (!activePicker) {
|
|
26888
27140
|
return null;
|
|
26889
27141
|
}
|
|
26890
|
-
return /* @__PURE__ */
|
|
27142
|
+
return /* @__PURE__ */ jsx101(
|
|
26891
27143
|
"div",
|
|
26892
27144
|
{
|
|
26893
27145
|
className: "fixed top-0 left-0 right-0 bottom-0 z-10 flex flex-col justify-end bg-[rgba(2,2,2,0.8)] sm:absolute sm:z-[1] sm:justify-start sm:bg-transparent",
|
|
@@ -26899,9 +27151,9 @@ var PickerView = () => {
|
|
|
26899
27151
|
close();
|
|
26900
27152
|
}
|
|
26901
27153
|
},
|
|
26902
|
-
children: /* @__PURE__ */
|
|
26903
|
-
/* @__PURE__ */
|
|
26904
|
-
bridgeDestination ? /* @__PURE__ */
|
|
27154
|
+
children: /* @__PURE__ */ jsxs48("div", { className: "flex flex-col w-full h-[85vh] max-h-full overflow-hidden p-4 pt-2.5 rounded-t-[24px] border-t border-solid border-t_text_primary border-opacity-10 bg-gradient-to-r from-t_bg_secondary/50 to-t_bg_secondary/50 bg-t_bg_primary sm:h-full sm:p-0 sm:rounded-none sm:border-0 sm:bg-none sm:bg-transparent", children: [
|
|
27155
|
+
/* @__PURE__ */ jsx101("div", { className: "sm:hidden mx-auto mb-4 h-1 w-8 rounded-full bg-t_bg_tertiary bg-opacity-10 shrink-0" }),
|
|
27156
|
+
bridgeDestination ? /* @__PURE__ */ jsx101(
|
|
26905
27157
|
ChainPicker,
|
|
26906
27158
|
{
|
|
26907
27159
|
chains: dstChainOptions,
|
|
@@ -26910,7 +27162,7 @@ var PickerView = () => {
|
|
|
26910
27162
|
onSelect: onDstChainSelect,
|
|
26911
27163
|
onClose: close
|
|
26912
27164
|
}
|
|
26913
|
-
) : /* @__PURE__ */
|
|
27165
|
+
) : /* @__PURE__ */ jsx101(
|
|
26914
27166
|
TokenPicker,
|
|
26915
27167
|
{
|
|
26916
27168
|
type,
|
|
@@ -26933,9 +27185,9 @@ var PickerView = () => {
|
|
|
26933
27185
|
};
|
|
26934
27186
|
|
|
26935
27187
|
// src/components/ToggleButton/index.tsx
|
|
26936
|
-
import { jsx as
|
|
27188
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
26937
27189
|
var ToggleButton = ({ checked, onClick }) => {
|
|
26938
|
-
return /* @__PURE__ */
|
|
27190
|
+
return /* @__PURE__ */ jsx102(
|
|
26939
27191
|
"button",
|
|
26940
27192
|
{
|
|
26941
27193
|
type: "button",
|
|
@@ -26943,7 +27195,7 @@ var ToggleButton = ({ checked, onClick }) => {
|
|
|
26943
27195
|
"aria-checked": checked,
|
|
26944
27196
|
onClick,
|
|
26945
27197
|
className: `relative inline-flex items-center w-10 h-5 p-0.5 rounded-full cursor-pointer transition-opacity border-none bg-gradient-to-r ${checked ? "from-x_blue_light/25 to-x_blue_dark/25" : "from-t_main_accent_light/20 to-t_main_accent_dark/20 opacity-50"}`,
|
|
26946
|
-
children: /* @__PURE__ */
|
|
27198
|
+
children: /* @__PURE__ */ jsx102(
|
|
26947
27199
|
"span",
|
|
26948
27200
|
{
|
|
26949
27201
|
className: `w-4 h-4 rounded-full transition-transform bg-gradient-to-r ${checked ? "translate-x-5 from-x_blue_light to-x_blue_dark" : "translate-x-0 from-t_main_accent_light to-t_main_accent_dark"}`
|
|
@@ -27030,9 +27282,9 @@ var mapTransports = (chains) => {
|
|
|
27030
27282
|
};
|
|
27031
27283
|
|
|
27032
27284
|
// src/components/Tooltip/index.tsx
|
|
27033
|
-
import { useEffect as
|
|
27285
|
+
import { useEffect as useEffect11, useState as useState12 } from "react";
|
|
27034
27286
|
import { createPortal } from "react-dom";
|
|
27035
|
-
import { jsx as
|
|
27287
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
27036
27288
|
var positionToClass = {
|
|
27037
27289
|
TOP: "-translate-x-1/2 -translate-y-full",
|
|
27038
27290
|
BOTTOM: "-translate-x-1/2",
|
|
@@ -27040,9 +27292,9 @@ var positionToClass = {
|
|
|
27040
27292
|
RIGHT: "-translate-y-1/2"
|
|
27041
27293
|
};
|
|
27042
27294
|
var Tooltip = ({ id: id2, position, text, triggerRef }) => {
|
|
27043
|
-
const [positionPx, setPositionPx] =
|
|
27044
|
-
const [visible, setVisible] =
|
|
27045
|
-
|
|
27295
|
+
const [positionPx, setPositionPx] = useState12({ top: 0, left: 0 });
|
|
27296
|
+
const [visible, setVisible] = useState12(false);
|
|
27297
|
+
useEffect11(() => {
|
|
27046
27298
|
const trigger = triggerRef.current;
|
|
27047
27299
|
const updatePosition = () => {
|
|
27048
27300
|
if (!trigger) {
|
|
@@ -27103,7 +27355,7 @@ var Tooltip = ({ id: id2, position, text, triggerRef }) => {
|
|
|
27103
27355
|
};
|
|
27104
27356
|
}, [triggerRef, position]);
|
|
27105
27357
|
return createPortal(
|
|
27106
|
-
visible && /* @__PURE__ */
|
|
27358
|
+
visible && /* @__PURE__ */ jsx103(
|
|
27107
27359
|
"div",
|
|
27108
27360
|
{
|
|
27109
27361
|
id: id2,
|
|
@@ -27122,17 +27374,17 @@ var Tooltip = ({ id: id2, position, text, triggerRef }) => {
|
|
|
27122
27374
|
|
|
27123
27375
|
// src/components/Swap/SettingsView/InfiniteApproval/index.tsx
|
|
27124
27376
|
import { useRef as useRef7 } from "react";
|
|
27125
|
-
import { jsx as
|
|
27377
|
+
import { jsx as jsx104, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
27126
27378
|
var InfiniteApproval = () => {
|
|
27127
27379
|
const tooltipTriggerRef = useRef7(null);
|
|
27128
27380
|
const { infiniteApproval, setInfiniteApproval } = useSwapContext();
|
|
27129
|
-
return /* @__PURE__ */
|
|
27130
|
-
/* @__PURE__ */
|
|
27131
|
-
/* @__PURE__ */
|
|
27132
|
-
/* @__PURE__ */
|
|
27133
|
-
/* @__PURE__ */
|
|
27134
|
-
/* @__PURE__ */
|
|
27135
|
-
/* @__PURE__ */
|
|
27381
|
+
return /* @__PURE__ */ jsxs49("div", { className: "flex gap-2 items-center justify-between py-4 px-6 rounded-xl bg-gradient-to-r from-t_bg_tertiary/[0.03] to-t_bg_tertiary/[0.01]", children: [
|
|
27382
|
+
/* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
27383
|
+
/* @__PURE__ */ jsx104("h2", { className: "text-sm leading-6 tracking-[0.01em] text-t_text_primary whitespace-nowrap", children: "Persistent Access" }),
|
|
27384
|
+
/* @__PURE__ */ jsx104("div", { className: "w-0.5 h-0.5 bg-t_text_primary opacity-25 shrink-0" }),
|
|
27385
|
+
/* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-1.5 min-w-0", children: [
|
|
27386
|
+
/* @__PURE__ */ jsx104("p", { className: "text-sm leading-6 tracking-[0.01em] text-t_text_primary text-opacity-50 whitespace-nowrap truncate", children: "Don't Ask Every Tx." }),
|
|
27387
|
+
/* @__PURE__ */ jsx104(
|
|
27136
27388
|
Tooltip,
|
|
27137
27389
|
{
|
|
27138
27390
|
text: "Enabling persistent access (infinite approval) allows to access your tokens without requiring repeated approvals for each transaction. This streamlines multiple transactions but may pose a security risk if the spender's address is compromised.",
|
|
@@ -27141,7 +27393,7 @@ var InfiniteApproval = () => {
|
|
|
27141
27393
|
id: "infinite-approval-tooltip"
|
|
27142
27394
|
}
|
|
27143
27395
|
),
|
|
27144
|
-
/* @__PURE__ */
|
|
27396
|
+
/* @__PURE__ */ jsx104(
|
|
27145
27397
|
InfoThinIcon,
|
|
27146
27398
|
{
|
|
27147
27399
|
ref: tooltipTriggerRef,
|
|
@@ -27150,7 +27402,7 @@ var InfiniteApproval = () => {
|
|
|
27150
27402
|
)
|
|
27151
27403
|
] })
|
|
27152
27404
|
] }),
|
|
27153
|
-
/* @__PURE__ */
|
|
27405
|
+
/* @__PURE__ */ jsx104(
|
|
27154
27406
|
ToggleButton,
|
|
27155
27407
|
{
|
|
27156
27408
|
checked: infiniteApproval,
|
|
@@ -27164,17 +27416,17 @@ var InfiniteApproval = () => {
|
|
|
27164
27416
|
|
|
27165
27417
|
// src/components/Swap/SettingsView/Delivery/index.tsx
|
|
27166
27418
|
import { useRef as useRef8 } from "react";
|
|
27167
|
-
import { jsx as
|
|
27419
|
+
import { jsx as jsx105, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
27168
27420
|
var Delivery = () => {
|
|
27169
27421
|
const tooltipTriggerRef = useRef8(null);
|
|
27170
27422
|
const { expressDelivery, setExpressDelivery } = useSwapContext();
|
|
27171
|
-
return /* @__PURE__ */
|
|
27172
|
-
/* @__PURE__ */
|
|
27173
|
-
/* @__PURE__ */
|
|
27174
|
-
/* @__PURE__ */
|
|
27175
|
-
/* @__PURE__ */
|
|
27176
|
-
/* @__PURE__ */
|
|
27177
|
-
/* @__PURE__ */
|
|
27423
|
+
return /* @__PURE__ */ jsxs50("div", { className: "flex gap-2 items-center justify-between py-4 px-6 rounded-xl bg-gradient-to-r from-t_bg_tertiary/[0.03] to-t_bg_tertiary/[0.01]", children: [
|
|
27424
|
+
/* @__PURE__ */ jsxs50("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
27425
|
+
/* @__PURE__ */ jsx105("h2", { className: "text-sm leading-6 tracking-[0.01em] text-t_text_primary whitespace-nowrap", children: "Fast Delivery" }),
|
|
27426
|
+
/* @__PURE__ */ jsx105("div", { className: "w-0.5 h-0.5 bg-t_text_primary opacity-25 shrink-0" }),
|
|
27427
|
+
/* @__PURE__ */ jsxs50("div", { className: "flex items-center gap-1.5 min-w-0", children: [
|
|
27428
|
+
/* @__PURE__ */ jsx105("p", { className: "text-sm leading-6 tracking-[0.01em] text-t_text_primary text-opacity-50 whitespace-nowrap truncate", children: expressDelivery ? "Est. Time 30 Sec." : "Est. Time 30 Min." }),
|
|
27429
|
+
/* @__PURE__ */ jsx105(
|
|
27178
27430
|
Tooltip,
|
|
27179
27431
|
{
|
|
27180
27432
|
text: "Fast Delivery is a special feature of XSwap that reduces transaction time across chains to around 30 seconds. It is currently available for swaps below a value of $1000 USD.",
|
|
@@ -27183,7 +27435,7 @@ var Delivery = () => {
|
|
|
27183
27435
|
id: "express-delivery-tooltip"
|
|
27184
27436
|
}
|
|
27185
27437
|
),
|
|
27186
|
-
/* @__PURE__ */
|
|
27438
|
+
/* @__PURE__ */ jsx105(
|
|
27187
27439
|
InfoThinIcon,
|
|
27188
27440
|
{
|
|
27189
27441
|
ref: tooltipTriggerRef,
|
|
@@ -27192,7 +27444,7 @@ var Delivery = () => {
|
|
|
27192
27444
|
)
|
|
27193
27445
|
] })
|
|
27194
27446
|
] }),
|
|
27195
|
-
/* @__PURE__ */
|
|
27447
|
+
/* @__PURE__ */ jsx105(
|
|
27196
27448
|
ToggleButton,
|
|
27197
27449
|
{
|
|
27198
27450
|
checked: expressDelivery,
|
|
@@ -27205,13 +27457,13 @@ var Delivery = () => {
|
|
|
27205
27457
|
};
|
|
27206
27458
|
|
|
27207
27459
|
// src/components/Swap/SettingsView/Slippage/index.tsx
|
|
27208
|
-
import { useState as
|
|
27209
|
-
import { jsx as
|
|
27460
|
+
import { useState as useState13 } from "react";
|
|
27461
|
+
import { jsx as jsx106, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
27210
27462
|
var defaultPreset = "1.5";
|
|
27211
27463
|
var presets = ["1", "2", "6"];
|
|
27212
27464
|
var Slippage = () => {
|
|
27213
27465
|
const { slippage, setSlippage } = useSwapContext();
|
|
27214
|
-
const [customSlippage, setCustomSlippage] =
|
|
27466
|
+
const [customSlippage, setCustomSlippage] = useState13(slippage);
|
|
27215
27467
|
const onInputChange = (value) => {
|
|
27216
27468
|
if (value.length === 0) {
|
|
27217
27469
|
setCustomSlippage("");
|
|
@@ -27226,18 +27478,18 @@ var Slippage = () => {
|
|
|
27226
27478
|
}
|
|
27227
27479
|
}
|
|
27228
27480
|
};
|
|
27229
|
-
return /* @__PURE__ */
|
|
27230
|
-
/* @__PURE__ */
|
|
27231
|
-
/* @__PURE__ */
|
|
27232
|
-
/* @__PURE__ */
|
|
27233
|
-
/* @__PURE__ */
|
|
27234
|
-
/* @__PURE__ */
|
|
27481
|
+
return /* @__PURE__ */ jsxs51("div", { className: "flex flex-col gap-6 py-4 px-6 rounded-xl bg-gradient-to-r from-t_bg_tertiary/[0.03] to-t_bg_tertiary/[0.01]", children: [
|
|
27482
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex flex-col gap-4", children: [
|
|
27483
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-2", children: [
|
|
27484
|
+
/* @__PURE__ */ jsx106("h2", { className: "text-sm leading-6 tracking-[0.01em] text-t_text_primary", children: "Slippage" }),
|
|
27485
|
+
/* @__PURE__ */ jsx106("div", { className: "w-0.5 h-0.5 bg-t_text_primary opacity-25 shrink-0" }),
|
|
27486
|
+
/* @__PURE__ */ jsx106("p", { className: "text-sm leading-6 tracking-[0.01em] text-t_text_primary text-opacity-50", children: `${Number(slippage).toFixed(2)}%` })
|
|
27235
27487
|
] }),
|
|
27236
|
-
/* @__PURE__ */
|
|
27237
|
-
/* @__PURE__ */
|
|
27238
|
-
/* @__PURE__ */
|
|
27239
|
-
/* @__PURE__ */
|
|
27240
|
-
/* @__PURE__ */
|
|
27488
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-4 w-full", children: [
|
|
27489
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex items-center justify-between flex-1 h-12 gap-3 p-3 rounded-[10px] bg-gradient-to-r from-t_bg_tertiary/[0.02] to-t_bg_tertiary/[0.02] bg-[rgba(40,40,40,0.15)] border border-solid border-t_text_primary border-opacity-5", children: [
|
|
27490
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-3 min-w-0 flex-1", children: [
|
|
27491
|
+
/* @__PURE__ */ jsx106("div", { className: "flex items-center justify-center w-6 h-6 rounded bg-t_bg_tertiary bg-opacity-5 shrink-0", children: /* @__PURE__ */ jsx106(AdjustmentsIcon, { className: "w-3.5 h-3.5 text-t_text_primary" }) }),
|
|
27492
|
+
/* @__PURE__ */ jsx106(
|
|
27241
27493
|
SafeInput,
|
|
27242
27494
|
{
|
|
27243
27495
|
id: "slippage-input",
|
|
@@ -27249,10 +27501,10 @@ var Slippage = () => {
|
|
|
27249
27501
|
}
|
|
27250
27502
|
)
|
|
27251
27503
|
] }),
|
|
27252
|
-
/* @__PURE__ */
|
|
27504
|
+
/* @__PURE__ */ jsx106("span", { className: "text-sm leading-6 text-t_text_primary text-opacity-50 shrink-0", children: "%" })
|
|
27253
27505
|
] }),
|
|
27254
|
-
/* @__PURE__ */
|
|
27255
|
-
/* @__PURE__ */
|
|
27506
|
+
/* @__PURE__ */ jsx106("div", { className: "w-0.5 h-0.5 bg-t_text_primary opacity-25 shrink-0 hidden sm:block" }),
|
|
27507
|
+
/* @__PURE__ */ jsx106("div", { className: "flex items-center gap-2", children: presets.map((preset) => /* @__PURE__ */ jsx106(
|
|
27256
27508
|
"button",
|
|
27257
27509
|
{
|
|
27258
27510
|
type: "button",
|
|
@@ -27264,10 +27516,10 @@ var Slippage = () => {
|
|
|
27264
27516
|
)) })
|
|
27265
27517
|
] })
|
|
27266
27518
|
] }),
|
|
27267
|
-
/* @__PURE__ */
|
|
27268
|
-
/* @__PURE__ */
|
|
27269
|
-
/* @__PURE__ */
|
|
27270
|
-
/* @__PURE__ */
|
|
27519
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex flex-col gap-3", children: [
|
|
27520
|
+
/* @__PURE__ */ jsx106("p", { className: "text-[10px] leading-4 tracking-[0.015em] text-t_text_primary text-opacity-30", children: "NOTE." }),
|
|
27521
|
+
/* @__PURE__ */ jsxs51("p", { className: "text-sm leading-[18px] tracking-[0.01em] text-t_text_primary text-opacity-40", children: [
|
|
27522
|
+
/* @__PURE__ */ jsx106("span", { className: "font-medium", children: "Slippage" }),
|
|
27271
27523
|
` defines how much a price can change before your
|
|
27272
27524
|
transfer falls back to USDC. If the price moves more than your
|
|
27273
27525
|
tolerance allows, you'll receive USDC on your destination chain.`
|
|
@@ -27277,17 +27529,17 @@ var Slippage = () => {
|
|
|
27277
27529
|
};
|
|
27278
27530
|
|
|
27279
27531
|
// src/components/Swap/SettingsView/index.tsx
|
|
27280
|
-
import { jsx as
|
|
27532
|
+
import { jsx as jsx107, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
27281
27533
|
var SettingsView = () => {
|
|
27282
|
-
return /* @__PURE__ */
|
|
27283
|
-
/* @__PURE__ */
|
|
27284
|
-
/* @__PURE__ */
|
|
27285
|
-
/* @__PURE__ */
|
|
27534
|
+
return /* @__PURE__ */ jsxs52("div", { className: "flex flex-col gap-2", children: [
|
|
27535
|
+
/* @__PURE__ */ jsx107(Delivery, {}),
|
|
27536
|
+
/* @__PURE__ */ jsx107(InfiniteApproval, {}),
|
|
27537
|
+
/* @__PURE__ */ jsx107(Slippage, {})
|
|
27286
27538
|
] });
|
|
27287
27539
|
};
|
|
27288
27540
|
|
|
27289
27541
|
// src/components/Swap/ReorderButton/ReorderButton.tsx
|
|
27290
|
-
import { jsx as
|
|
27542
|
+
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
27291
27543
|
var ReorderButton = () => {
|
|
27292
27544
|
const {
|
|
27293
27545
|
dstChain,
|
|
@@ -27305,13 +27557,13 @@ var ReorderButton = () => {
|
|
|
27305
27557
|
setDstToken(srcToken);
|
|
27306
27558
|
setSrcToken(dstToken);
|
|
27307
27559
|
};
|
|
27308
|
-
return /* @__PURE__ */
|
|
27560
|
+
return /* @__PURE__ */ jsx108("div", { className: "h-0 w-full relative z-[1]", children: /* @__PURE__ */ jsx108(
|
|
27309
27561
|
"button",
|
|
27310
27562
|
{
|
|
27311
27563
|
onClick: onReorderClick,
|
|
27312
27564
|
"aria-label": "Switch target token with the source token",
|
|
27313
27565
|
className: "absolute left-1/2 -translate-x-1/2 -translate-y-1/2 flex items-center justify-center w-8 h-8 rounded-md backdrop-blur-[24px] bg-t_bg_secondary bg-gradient-to-r from-t_bg_tertiary/5 to-t_bg_tertiary/5 hover:from-t_bg_tertiary/10 hover:to-t_bg_tertiary/10 transition-colors",
|
|
27314
|
-
children: /* @__PURE__ */
|
|
27566
|
+
children: /* @__PURE__ */ jsx108("div", { className: "flex text-t_text_primary opacity-50", children: /* @__PURE__ */ jsx108(ChevronsUpDownThinIcon, {}) })
|
|
27315
27567
|
}
|
|
27316
27568
|
) });
|
|
27317
27569
|
};
|
|
@@ -27322,7 +27574,7 @@ var specialApprovalTokens = {
|
|
|
27322
27574
|
};
|
|
27323
27575
|
|
|
27324
27576
|
// src/hooks/useERC20Token.ts
|
|
27325
|
-
import { useCallback as useCallback12, useMemo as
|
|
27577
|
+
import { useCallback as useCallback12, useMemo as useMemo22 } from "react";
|
|
27326
27578
|
var useERC20Token = ({
|
|
27327
27579
|
rpcChainId,
|
|
27328
27580
|
currentChainId,
|
|
@@ -27331,7 +27583,7 @@ var useERC20Token = ({
|
|
|
27331
27583
|
}) => {
|
|
27332
27584
|
const evmContractApi = useEvmContractApi_default();
|
|
27333
27585
|
const { supportedChains } = useSwapContext();
|
|
27334
|
-
const contract =
|
|
27586
|
+
const contract = useMemo22(() => {
|
|
27335
27587
|
const rpcUrl = supportedChains.find(
|
|
27336
27588
|
(chain) => chain.ecosystem === "evm" /* EVM */ && chain.chainId === rpcChainId
|
|
27337
27589
|
)?.publicRpcUrls[0];
|
|
@@ -27373,9 +27625,9 @@ var useERC20Token = ({
|
|
|
27373
27625
|
};
|
|
27374
27626
|
|
|
27375
27627
|
// src/components/Swap/SwapView/SwapButton/index.tsx
|
|
27376
|
-
import { useCallback as useCallback13, useEffect as
|
|
27628
|
+
import { useCallback as useCallback13, useEffect as useEffect12, useMemo as useMemo23, useState as useState14 } from "react";
|
|
27377
27629
|
import { useAccount as useAccount5, useSwitchChain } from "wagmi";
|
|
27378
|
-
import { Fragment as Fragment9, jsx as
|
|
27630
|
+
import { Fragment as Fragment9, jsx as jsx109 } from "react/jsx-runtime";
|
|
27379
27631
|
var SwapButton = () => {
|
|
27380
27632
|
const { address, chainId } = useAccount5();
|
|
27381
27633
|
const { switchChainAsync } = useSwitchChain();
|
|
@@ -27395,11 +27647,11 @@ var SwapButton = () => {
|
|
|
27395
27647
|
onConnectWallet
|
|
27396
27648
|
} = useSwapContext();
|
|
27397
27649
|
const { setTxStatus, setTxMsg, setTxModalOpen, enqueueTransaction } = useTxUIWrapper();
|
|
27398
|
-
const srcChainId =
|
|
27399
|
-
const dstChainId =
|
|
27400
|
-
const srcTokenAddress =
|
|
27401
|
-
const dstTokenAddress =
|
|
27402
|
-
const [currentTokenAllowance, setCurrentTokenAllowance] =
|
|
27650
|
+
const srcChainId = useMemo23(() => srcChain?.chainId, [srcChain?.chainId]);
|
|
27651
|
+
const dstChainId = useMemo23(() => dstChain?.chainId, [dstChain?.chainId]);
|
|
27652
|
+
const srcTokenAddress = useMemo23(() => srcToken?.address, [srcToken?.address]);
|
|
27653
|
+
const dstTokenAddress = useMemo23(() => dstToken?.address, [dstToken?.address]);
|
|
27654
|
+
const [currentTokenAllowance, setCurrentTokenAllowance] = useState14("0");
|
|
27403
27655
|
const {
|
|
27404
27656
|
networks: { evm }
|
|
27405
27657
|
} = useNetworks_default();
|
|
@@ -27416,7 +27668,7 @@ var SwapButton = () => {
|
|
|
27416
27668
|
signer: evm.signer,
|
|
27417
27669
|
tokenAddress: srcTokenAddress
|
|
27418
27670
|
});
|
|
27419
|
-
const routerAddress =
|
|
27671
|
+
const routerAddress = useMemo23(() => {
|
|
27420
27672
|
if (!srcChainId) return "";
|
|
27421
27673
|
return srcChainId === dstChainId ? ADDRESSES[srcChainId]?.XSwapRouterSingleChain || "" : ADDRESSES[srcChainId]?.XSwapRouter || "";
|
|
27422
27674
|
}, [srcChainId, dstChainId]);
|
|
@@ -27432,7 +27684,7 @@ var SwapButton = () => {
|
|
|
27432
27684
|
setCurrentTokenAllowance("0");
|
|
27433
27685
|
}
|
|
27434
27686
|
}, [allowance, evm.address, routerAddress]);
|
|
27435
|
-
|
|
27687
|
+
useEffect12(() => {
|
|
27436
27688
|
if (srcChainId && specialApprovalTokens[srcChainId]?.includes(srcTokenAddress)) {
|
|
27437
27689
|
getAllowance();
|
|
27438
27690
|
}
|
|
@@ -27442,7 +27694,7 @@ var SwapButton = () => {
|
|
|
27442
27694
|
setTxMsg("");
|
|
27443
27695
|
setTxModalOpen(true);
|
|
27444
27696
|
}, [setTxModalOpen, setTxMsg, setTxStatus]);
|
|
27445
|
-
const button =
|
|
27697
|
+
const button = useMemo23(() => {
|
|
27446
27698
|
if (!isAsyncDataLoaded) {
|
|
27447
27699
|
return {
|
|
27448
27700
|
text: "Loading XPay...",
|
|
@@ -27613,7 +27865,7 @@ var SwapButton = () => {
|
|
|
27613
27865
|
setTxStatus,
|
|
27614
27866
|
showSwapConfirmationView
|
|
27615
27867
|
]);
|
|
27616
|
-
return /* @__PURE__ */
|
|
27868
|
+
return /* @__PURE__ */ jsx109(Fragment9, { children: /* @__PURE__ */ jsx109(
|
|
27617
27869
|
"button",
|
|
27618
27870
|
{
|
|
27619
27871
|
type: "button",
|
|
@@ -27626,11 +27878,11 @@ var SwapButton = () => {
|
|
|
27626
27878
|
};
|
|
27627
27879
|
|
|
27628
27880
|
// src/components/Swap/SwapView/SwapPanel/index.tsx
|
|
27629
|
-
import { useMemo as
|
|
27881
|
+
import { useMemo as useMemo29 } from "react";
|
|
27630
27882
|
|
|
27631
27883
|
// src/components/Swap/SwapView/SwapPanel/AmountPanel/index.tsx
|
|
27632
|
-
import { useMemo as
|
|
27633
|
-
import { Fragment as Fragment10, jsx as
|
|
27884
|
+
import { useMemo as useMemo24 } from "react";
|
|
27885
|
+
import { Fragment as Fragment10, jsx as jsx110, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
27634
27886
|
var AmountPanel = ({ type }) => {
|
|
27635
27887
|
const {
|
|
27636
27888
|
srcChain,
|
|
@@ -27657,7 +27909,7 @@ var AmountPanel = ({ type }) => {
|
|
|
27657
27909
|
})
|
|
27658
27910
|
);
|
|
27659
27911
|
};
|
|
27660
|
-
const value =
|
|
27912
|
+
const value = useMemo24(() => {
|
|
27661
27913
|
if (type === "destination" && dstToken && dstChain && bridgeUI && srcChain?.ecosystem === "solana" /* SOLANA */) {
|
|
27662
27914
|
return srcValue;
|
|
27663
27915
|
}
|
|
@@ -27672,10 +27924,10 @@ var AmountPanel = ({ type }) => {
|
|
|
27672
27924
|
dstChain
|
|
27673
27925
|
]);
|
|
27674
27926
|
if (!isAsyncDataLoaded) {
|
|
27675
|
-
return /* @__PURE__ */
|
|
27927
|
+
return /* @__PURE__ */ jsx110("div", { className: "flex items-center flex-1 min-w-0", children: /* @__PURE__ */ jsx110(Skeleton, { className: "w-[100px] h-8" }) });
|
|
27676
27928
|
}
|
|
27677
|
-
return /* @__PURE__ */
|
|
27678
|
-
/* @__PURE__ */
|
|
27929
|
+
return /* @__PURE__ */ jsx110("div", { className: "flex items-center gap-3 flex-1 min-w-0 overflow-hidden text-left", children: type === "source" ? /* @__PURE__ */ jsxs53(Fragment10, { children: [
|
|
27930
|
+
/* @__PURE__ */ jsx110(
|
|
27679
27931
|
SafeInput,
|
|
27680
27932
|
{
|
|
27681
27933
|
id: "swap-amount-input",
|
|
@@ -27685,7 +27937,7 @@ var AmountPanel = ({ type }) => {
|
|
|
27685
27937
|
onChange: (value2) => setSrcValue(value2)
|
|
27686
27938
|
}
|
|
27687
27939
|
),
|
|
27688
|
-
!!srcToken && !!srcTokenBalanceWei && /* @__PURE__ */
|
|
27940
|
+
!!srcToken && !!srcTokenBalanceWei && /* @__PURE__ */ jsx110(
|
|
27689
27941
|
"button",
|
|
27690
27942
|
{
|
|
27691
27943
|
type: "button",
|
|
@@ -27694,12 +27946,12 @@ var AmountPanel = ({ type }) => {
|
|
|
27694
27946
|
children: "MAX"
|
|
27695
27947
|
}
|
|
27696
27948
|
)
|
|
27697
|
-
] }) : isFetchingRoute ? /* @__PURE__ */
|
|
27949
|
+
] }) : isFetchingRoute ? /* @__PURE__ */ jsx110(Skeleton, { className: "w-[150px] h-[32px]" }) : /* @__PURE__ */ jsx110("div", { className: "text-2xl leading-8 text-t_text_primary opacity-60 truncate", children: value || 0 }) });
|
|
27698
27950
|
};
|
|
27699
27951
|
|
|
27700
27952
|
// src/components/Swap/SwapView/SwapPanel/AmountPanel/Balance/index.tsx
|
|
27701
|
-
import { useMemo as
|
|
27702
|
-
import { jsx as
|
|
27953
|
+
import { useMemo as useMemo25 } from "react";
|
|
27954
|
+
import { jsx as jsx111, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
27703
27955
|
var Balance = ({ type }) => {
|
|
27704
27956
|
const {
|
|
27705
27957
|
srcToken,
|
|
@@ -27710,7 +27962,7 @@ var Balance = ({ type }) => {
|
|
|
27710
27962
|
dstChain,
|
|
27711
27963
|
dstChainTokensOptions
|
|
27712
27964
|
} = useSwapContext();
|
|
27713
|
-
const dstTokenBalanceInfo =
|
|
27965
|
+
const dstTokenBalanceInfo = useMemo25(() => {
|
|
27714
27966
|
if (!dstToken || !dstChain) {
|
|
27715
27967
|
return "";
|
|
27716
27968
|
}
|
|
@@ -27732,15 +27984,15 @@ var Balance = ({ type }) => {
|
|
|
27732
27984
|
if (!token || !balanceInfo && !isLoading) {
|
|
27733
27985
|
return null;
|
|
27734
27986
|
}
|
|
27735
|
-
return /* @__PURE__ */
|
|
27736
|
-
/* @__PURE__ */
|
|
27737
|
-
/* @__PURE__ */
|
|
27987
|
+
return /* @__PURE__ */ jsx111("div", { className: "flex items-center justify-end py-1", children: isLoading ? /* @__PURE__ */ jsx111(Skeleton, { className: "w-[80px] h-[16px]" }) : /* @__PURE__ */ jsxs54("p", { className: "text-[10px] leading-4 text-right whitespace-nowrap", children: [
|
|
27988
|
+
/* @__PURE__ */ jsx111("span", { className: "text-t_text_primary text-opacity-50", children: `Balance. ` }),
|
|
27989
|
+
/* @__PURE__ */ jsx111("span", { className: "text-t_text_primary text-opacity-75 tracking-[0.032em]", children: `${balanceInfo} ${token.symbol}` })
|
|
27738
27990
|
] }) });
|
|
27739
27991
|
};
|
|
27740
27992
|
|
|
27741
27993
|
// src/components/Swap/SwapView/SwapPanel/TokenPanel/index.tsx
|
|
27742
|
-
import { useMemo as
|
|
27743
|
-
import { jsx as
|
|
27994
|
+
import { useMemo as useMemo26 } from "react";
|
|
27995
|
+
import { jsx as jsx112, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
27744
27996
|
var TokenPanel = ({ chain, token, type, className }) => {
|
|
27745
27997
|
const {
|
|
27746
27998
|
bridgeUI,
|
|
@@ -27750,36 +28002,36 @@ var TokenPanel = ({ chain, token, type, className }) => {
|
|
|
27750
28002
|
setActivePicker,
|
|
27751
28003
|
isAsyncDataLoaded
|
|
27752
28004
|
} = useSwapContext();
|
|
27753
|
-
const integratorLockedDestinationToken =
|
|
28005
|
+
const integratorLockedDestinationToken = useMemo26(
|
|
27754
28006
|
() => type === "destination" && dstTokenLocked,
|
|
27755
28007
|
[type, dstTokenLocked]
|
|
27756
28008
|
);
|
|
27757
|
-
const integratorLockedSourceToken =
|
|
28009
|
+
const integratorLockedSourceToken = useMemo26(
|
|
27758
28010
|
() => type === "source" && srcTokenLocked,
|
|
27759
28011
|
[type, srcTokenLocked]
|
|
27760
28012
|
);
|
|
27761
|
-
const bridgeDestination =
|
|
28013
|
+
const bridgeDestination = useMemo26(
|
|
27762
28014
|
() => type === "destination" && bridgeUI,
|
|
27763
28015
|
[bridgeUI, type]
|
|
27764
28016
|
);
|
|
27765
28017
|
const locked = bridgeDestination && dstChainLocked || integratorLockedDestinationToken || integratorLockedSourceToken;
|
|
27766
28018
|
if (!isAsyncDataLoaded) {
|
|
27767
|
-
return /* @__PURE__ */
|
|
28019
|
+
return /* @__PURE__ */ jsx112(
|
|
27768
28020
|
"div",
|
|
27769
28021
|
{
|
|
27770
28022
|
className: `flex items-center shrink-0 min-h-11 ${className || ""}`,
|
|
27771
28023
|
"aria-hidden": true,
|
|
27772
|
-
children: /* @__PURE__ */
|
|
27773
|
-
/* @__PURE__ */
|
|
27774
|
-
/* @__PURE__ */
|
|
27775
|
-
/* @__PURE__ */
|
|
27776
|
-
/* @__PURE__ */
|
|
28024
|
+
children: /* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-3", children: [
|
|
28025
|
+
/* @__PURE__ */ jsx112(Skeleton, { className: "w-12 h-4" }),
|
|
28026
|
+
/* @__PURE__ */ jsxs55("div", { className: "relative flex items-end pr-1 pb-1", children: [
|
|
28027
|
+
/* @__PURE__ */ jsx112(Skeleton, { className: "w-10 h-10 rounded-full" }),
|
|
28028
|
+
/* @__PURE__ */ jsx112(Skeleton, { className: "absolute bottom-0 right-0 w-[18px] h-[18px] rounded-full border border-solid border-t_bg_secondary" })
|
|
27777
28029
|
] })
|
|
27778
28030
|
] })
|
|
27779
28031
|
}
|
|
27780
28032
|
);
|
|
27781
28033
|
}
|
|
27782
|
-
return /* @__PURE__ */
|
|
28034
|
+
return /* @__PURE__ */ jsxs55(
|
|
27783
28035
|
"button",
|
|
27784
28036
|
{
|
|
27785
28037
|
type: "button",
|
|
@@ -27789,15 +28041,15 @@ var TokenPanel = ({ chain, token, type, className }) => {
|
|
|
27789
28041
|
},
|
|
27790
28042
|
className: `flex items-center shrink-0 min-h-11 rounded-lg ${locked ? "" : "hover:opacity-80 transition-opacity"} ${className || ""}`,
|
|
27791
28043
|
children: [
|
|
27792
|
-
/* @__PURE__ */
|
|
27793
|
-
/* @__PURE__ */
|
|
28044
|
+
/* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-3", children: [
|
|
28045
|
+
/* @__PURE__ */ jsx112(
|
|
27794
28046
|
"p",
|
|
27795
28047
|
{
|
|
27796
28048
|
className: `text-sm font-medium leading-6 tracking-[0.01em] text-t_text_primary ${token ? "" : "opacity-60"}`,
|
|
27797
28049
|
children: token ? token.symbol : bridgeDestination && chain ? chain.displayName : "Select"
|
|
27798
28050
|
}
|
|
27799
28051
|
),
|
|
27800
|
-
token ? /* @__PURE__ */
|
|
28052
|
+
token ? /* @__PURE__ */ jsx112(
|
|
27801
28053
|
TokenLogoWithChain,
|
|
27802
28054
|
{
|
|
27803
28055
|
token,
|
|
@@ -27806,7 +28058,7 @@ var TokenPanel = ({ chain, token, type, className }) => {
|
|
|
27806
28058
|
generatedLogoClassName: "w-10 h-10 text-[16px]",
|
|
27807
28059
|
chainLogoClassName: "w-[18px]"
|
|
27808
28060
|
}
|
|
27809
|
-
) : bridgeDestination && chain && /* @__PURE__ */
|
|
28061
|
+
) : bridgeDestination && chain && /* @__PURE__ */ jsx112(
|
|
27810
28062
|
"img",
|
|
27811
28063
|
{
|
|
27812
28064
|
src: chain.image,
|
|
@@ -27817,30 +28069,30 @@ var TokenPanel = ({ chain, token, type, className }) => {
|
|
|
27817
28069
|
] }),
|
|
27818
28070
|
!locked && // The 24px glyph has 8px of built-in whitespace on each side; pull the
|
|
27819
28071
|
// right side back so the chevron sits flush with the panel edge.
|
|
27820
|
-
/* @__PURE__ */
|
|
28072
|
+
/* @__PURE__ */ jsx112("div", { className: "flex items-center justify-center w-6 h-6 ml-1 -mr-2 text-t_text_primary opacity-50", children: /* @__PURE__ */ jsx112(ChevronDownThinIcon, {}) })
|
|
27821
28073
|
]
|
|
27822
28074
|
}
|
|
27823
28075
|
);
|
|
27824
28076
|
};
|
|
27825
28077
|
|
|
27826
28078
|
// src/components/Swap/SwapView/SwapPanel/UsdValue/index.tsx
|
|
27827
|
-
import { useMemo as
|
|
27828
|
-
import { jsx as
|
|
28079
|
+
import { useMemo as useMemo27 } from "react";
|
|
28080
|
+
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
27829
28081
|
var UsdValue = ({ type }) => {
|
|
27830
28082
|
const { srcValueUsd, dstValueUsd, isFetchingRoute } = useSwapContext();
|
|
27831
|
-
const valueUsd =
|
|
28083
|
+
const valueUsd = useMemo27(
|
|
27832
28084
|
() => type === "source" ? srcValueUsd : dstValueUsd,
|
|
27833
28085
|
[dstValueUsd, srcValueUsd, type]
|
|
27834
28086
|
);
|
|
27835
28087
|
if (type === "destination" && isFetchingRoute) {
|
|
27836
|
-
return /* @__PURE__ */
|
|
28088
|
+
return /* @__PURE__ */ jsx113(Skeleton, { className: "w-[80px] h-[16px] my-1" });
|
|
27837
28089
|
}
|
|
27838
|
-
return /* @__PURE__ */
|
|
28090
|
+
return /* @__PURE__ */ jsx113("p", { className: "py-1 text-[10px] leading-4 tracking-[0.01em] text-t_text_primary text-opacity-50 whitespace-nowrap", children: valueUsd ? `${valueUsd} USD` : "" });
|
|
27839
28091
|
};
|
|
27840
28092
|
|
|
27841
28093
|
// src/components/Swap/SwapView/SwapPanel/WalletPanel/index.tsx
|
|
27842
|
-
import { useCallback as useCallback14, useMemo as
|
|
27843
|
-
import { jsx as
|
|
28094
|
+
import { useCallback as useCallback14, useMemo as useMemo28 } from "react";
|
|
28095
|
+
import { jsx as jsx114, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
27844
28096
|
var WalletPanel = ({ chain, className }) => {
|
|
27845
28097
|
const {
|
|
27846
28098
|
setOpenEVMWalletModal,
|
|
@@ -27880,7 +28132,7 @@ var WalletPanel = ({ chain, className }) => {
|
|
|
27880
28132
|
setOpenSuiWalletModal(true);
|
|
27881
28133
|
}
|
|
27882
28134
|
}, [chain, openEvmWalletModal, setOpenSolanaWalletModal, setOpenSuiWalletModal]);
|
|
27883
|
-
const address =
|
|
28135
|
+
const address = useMemo28(() => {
|
|
27884
28136
|
if (!chain) {
|
|
27885
28137
|
return "";
|
|
27886
28138
|
}
|
|
@@ -27894,34 +28146,34 @@ var WalletPanel = ({ chain, className }) => {
|
|
|
27894
28146
|
return "";
|
|
27895
28147
|
}, [chain, evm, solana, sui]);
|
|
27896
28148
|
if (!isAsyncDataLoaded) {
|
|
27897
|
-
return /* @__PURE__ */
|
|
28149
|
+
return /* @__PURE__ */ jsx114(Skeleton, { className: "w-16 h-6" });
|
|
27898
28150
|
}
|
|
27899
28151
|
if (!chain) {
|
|
27900
|
-
return /* @__PURE__ */
|
|
28152
|
+
return /* @__PURE__ */ jsx114("div", { className: "h-6", "aria-hidden": true });
|
|
27901
28153
|
}
|
|
27902
|
-
return /* @__PURE__ */
|
|
28154
|
+
return /* @__PURE__ */ jsxs56(
|
|
27903
28155
|
"button",
|
|
27904
28156
|
{
|
|
27905
28157
|
type: "button",
|
|
27906
28158
|
onClick: openWalletModal,
|
|
27907
28159
|
className: `flex items-center justify-center px-2 py-1 rounded bg-t_bg_tertiary bg-opacity-5 hover:bg-opacity-10 transition-colors ${className || ""}`,
|
|
27908
28160
|
children: [
|
|
27909
|
-
/* @__PURE__ */
|
|
27910
|
-
/* @__PURE__ */
|
|
28161
|
+
/* @__PURE__ */ jsx114("p", { className: "text-[10px] leading-4 tracking-[0.01em] text-t_text_primary whitespace-nowrap", children: address ? shortAddress(address) : "Connect" }),
|
|
28162
|
+
/* @__PURE__ */ jsx114("div", { className: "flex items-center justify-center w-4 h-4 -mr-1.5 text-t_text_primary opacity-50", children: /* @__PURE__ */ jsx114(ChevronDownThinSmallIcon, {}) })
|
|
27911
28163
|
]
|
|
27912
28164
|
}
|
|
27913
28165
|
);
|
|
27914
28166
|
};
|
|
27915
28167
|
|
|
27916
28168
|
// src/components/Swap/SwapView/SwapPanel/index.tsx
|
|
27917
|
-
import { jsx as
|
|
28169
|
+
import { jsx as jsx115, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
27918
28170
|
var SwapPanel = ({ type }) => {
|
|
27919
28171
|
const { srcChain, srcToken, dstChain, dstToken } = useSwapContext();
|
|
27920
|
-
const token =
|
|
28172
|
+
const token = useMemo29(
|
|
27921
28173
|
() => type === "source" ? srcToken : dstToken,
|
|
27922
28174
|
[type, srcToken, dstToken]
|
|
27923
28175
|
);
|
|
27924
|
-
const chain =
|
|
28176
|
+
const chain = useMemo29(
|
|
27925
28177
|
() => type === "source" ? srcChain : dstChain,
|
|
27926
28178
|
[type, srcChain, dstChain]
|
|
27927
28179
|
);
|
|
@@ -27931,23 +28183,23 @@ var SwapPanel = ({ type }) => {
|
|
|
27931
28183
|
}
|
|
27932
28184
|
event.currentTarget.querySelector("#swap-amount-input")?.focus();
|
|
27933
28185
|
};
|
|
27934
|
-
return /* @__PURE__ */
|
|
28186
|
+
return /* @__PURE__ */ jsxs57(
|
|
27935
28187
|
"div",
|
|
27936
28188
|
{
|
|
27937
28189
|
onClick: focusAmountInput,
|
|
27938
28190
|
className: `flex flex-col gap-2 px-4 sm:px-6 py-4 rounded-2xl backdrop-blur-[12px] ${type === "source" ? "bg-gradient-to-r from-t_bg_tertiary/5 to-t_bg_tertiary/5 swap-panel-gradient-border cursor-text" : "bg-gradient-to-r from-t_bg_tertiary/[0.03] to-t_bg_tertiary/[0.03]"}`,
|
|
27939
28191
|
children: [
|
|
27940
|
-
/* @__PURE__ */
|
|
27941
|
-
/* @__PURE__ */
|
|
27942
|
-
/* @__PURE__ */
|
|
28192
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex gap-2 items-center w-full min-h-6", children: [
|
|
28193
|
+
/* @__PURE__ */ jsx115("p", { className: "text-[10px] leading-4 tracking-[0.01em] text-t_text_primary text-opacity-50", children: type === "source" ? "Source" : "Destination" }),
|
|
28194
|
+
/* @__PURE__ */ jsx115(WalletPanel, { chain, type })
|
|
27943
28195
|
] }),
|
|
27944
|
-
/* @__PURE__ */
|
|
27945
|
-
/* @__PURE__ */
|
|
27946
|
-
/* @__PURE__ */
|
|
28196
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex items-center justify-between w-full gap-4", children: [
|
|
28197
|
+
/* @__PURE__ */ jsx115(AmountPanel, { type }),
|
|
28198
|
+
/* @__PURE__ */ jsx115(TokenPanel, { chain, token, type })
|
|
27947
28199
|
] }),
|
|
27948
|
-
/* @__PURE__ */
|
|
27949
|
-
/* @__PURE__ */
|
|
27950
|
-
/* @__PURE__ */
|
|
28200
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex items-center justify-between w-full gap-4 min-h-6", children: [
|
|
28201
|
+
/* @__PURE__ */ jsx115(UsdValue, { type }),
|
|
28202
|
+
/* @__PURE__ */ jsx115(Balance, { type })
|
|
27951
28203
|
] })
|
|
27952
28204
|
]
|
|
27953
28205
|
}
|
|
@@ -27955,19 +28207,19 @@ var SwapPanel = ({ type }) => {
|
|
|
27955
28207
|
};
|
|
27956
28208
|
|
|
27957
28209
|
// src/components/Swap/SwapView/index.tsx
|
|
27958
|
-
import { jsx as
|
|
28210
|
+
import { jsx as jsx116, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
27959
28211
|
var SwapView = () => {
|
|
27960
|
-
return /* @__PURE__ */
|
|
27961
|
-
/* @__PURE__ */
|
|
27962
|
-
/* @__PURE__ */
|
|
27963
|
-
/* @__PURE__ */
|
|
27964
|
-
/* @__PURE__ */
|
|
27965
|
-
/* @__PURE__ */
|
|
28212
|
+
return /* @__PURE__ */ jsxs58("div", { className: "flex flex-col gap-8 fill-t_text_primary", children: [
|
|
28213
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex flex-col gap-6", children: [
|
|
28214
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex flex-col gap-1.5", children: [
|
|
28215
|
+
/* @__PURE__ */ jsx116(SwapPanel, { type: "source" }),
|
|
28216
|
+
/* @__PURE__ */ jsx116(ReorderButton, {}),
|
|
28217
|
+
/* @__PURE__ */ jsx116(SwapPanel, { type: "destination" })
|
|
27966
28218
|
] }),
|
|
27967
|
-
/* @__PURE__ */
|
|
27968
|
-
/* @__PURE__ */
|
|
28219
|
+
/* @__PURE__ */ jsx116("div", { className: "h-px w-full gradient-sections-separator-container" }),
|
|
28220
|
+
/* @__PURE__ */ jsx116(FeesPanel, {})
|
|
27969
28221
|
] }),
|
|
27970
|
-
/* @__PURE__ */
|
|
28222
|
+
/* @__PURE__ */ jsx116(SwapButton, {})
|
|
27971
28223
|
] });
|
|
27972
28224
|
};
|
|
27973
28225
|
|
|
@@ -27982,14 +28234,14 @@ import {
|
|
|
27982
28234
|
useConnectWallet as useSuiConnectWallet,
|
|
27983
28235
|
useDisconnectWallet as useSuiDisconnectWallet
|
|
27984
28236
|
} from "@mysten/dapp-kit";
|
|
27985
|
-
import { jsx as
|
|
28237
|
+
import { jsx as jsx117, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
27986
28238
|
var ConnectorIcon = ({
|
|
27987
28239
|
connector,
|
|
27988
28240
|
className
|
|
27989
28241
|
}) => {
|
|
27990
28242
|
switch (connector.name) {
|
|
27991
28243
|
case "WalletConnect": {
|
|
27992
|
-
return /* @__PURE__ */
|
|
28244
|
+
return /* @__PURE__ */ jsx117(
|
|
27993
28245
|
WalletConnectIcon,
|
|
27994
28246
|
{
|
|
27995
28247
|
className: `w-10 h-10 rounded-lg shrink-0 ${className || ""}`
|
|
@@ -27997,7 +28249,7 @@ var ConnectorIcon = ({
|
|
|
27997
28249
|
);
|
|
27998
28250
|
}
|
|
27999
28251
|
default: {
|
|
28000
|
-
return /* @__PURE__ */
|
|
28252
|
+
return /* @__PURE__ */ jsx117(
|
|
28001
28253
|
"img",
|
|
28002
28254
|
{
|
|
28003
28255
|
src: connector.icon,
|
|
@@ -28008,7 +28260,7 @@ var ConnectorIcon = ({
|
|
|
28008
28260
|
}
|
|
28009
28261
|
}
|
|
28010
28262
|
};
|
|
28011
|
-
var WalletRow = ({ icon, name, isConnected, onClick }) => /* @__PURE__ */
|
|
28263
|
+
var WalletRow = ({ icon, name, isConnected, onClick }) => /* @__PURE__ */ jsx117("div", { className: "pb-2", children: /* @__PURE__ */ jsxs59(
|
|
28012
28264
|
"button",
|
|
28013
28265
|
{
|
|
28014
28266
|
type: "button",
|
|
@@ -28016,15 +28268,15 @@ var WalletRow = ({ icon, name, isConnected, onClick }) => /* @__PURE__ */ jsx116
|
|
|
28016
28268
|
className: `group flex gap-3 items-center w-full p-3 sm:p-4 rounded-xl cursor-pointer bg-gradient-to-r from-t_bg_tertiary/[0.02] to-t_bg_tertiary/[0.02] bg-[rgba(40,40,40,0.15)] hover:bg-t_bg_tertiary hover:bg-opacity-10 transition-colors ${isConnected ? "!bg-t_bg_tertiary !bg-opacity-10" : ""}`,
|
|
28017
28269
|
children: [
|
|
28018
28270
|
icon,
|
|
28019
|
-
/* @__PURE__ */
|
|
28020
|
-
/* @__PURE__ */
|
|
28021
|
-
isConnected && /* @__PURE__ */
|
|
28022
|
-
/* @__PURE__ */
|
|
28023
|
-
/* @__PURE__ */
|
|
28271
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex justify-between items-center gap-2 w-full min-w-0", children: [
|
|
28272
|
+
/* @__PURE__ */ jsx117("p", { className: "text-sm font-medium leading-5 tracking-[0.01em] text-t_text_primary text-left", children: name }),
|
|
28273
|
+
isConnected && /* @__PURE__ */ jsxs59("span", { className: "flex items-center gap-1.5 text-xs leading-[18px] tracking-[0.01em] whitespace-nowrap", children: [
|
|
28274
|
+
/* @__PURE__ */ jsxs59("span", { className: "group-hover:hidden flex items-center gap-1.5 text-t_text_green", children: [
|
|
28275
|
+
/* @__PURE__ */ jsx117(DotGreenIcon, {}),
|
|
28024
28276
|
"Connected"
|
|
28025
28277
|
] }),
|
|
28026
|
-
/* @__PURE__ */
|
|
28027
|
-
/* @__PURE__ */
|
|
28278
|
+
/* @__PURE__ */ jsxs59("span", { className: "hidden group-hover:flex items-center gap-1.5 text-t_text_red", children: [
|
|
28279
|
+
/* @__PURE__ */ jsx117(DotRedIcon, {}),
|
|
28028
28280
|
"Disconnect"
|
|
28029
28281
|
] })
|
|
28030
28282
|
] })
|
|
@@ -28099,27 +28351,27 @@ var WalletPicker = ({ ecosystem, className, onClose }) => {
|
|
|
28099
28351
|
(connector, index) => connectors.findIndex(({ name }) => name === connector.name) === index
|
|
28100
28352
|
);
|
|
28101
28353
|
const visibleSolanaWallets = wallets.filter((wallet) => !/metamask/i.test(wallet.adapter.name));
|
|
28102
|
-
return /* @__PURE__ */
|
|
28103
|
-
/* @__PURE__ */
|
|
28104
|
-
/* @__PURE__ */
|
|
28105
|
-
/* @__PURE__ */
|
|
28354
|
+
return /* @__PURE__ */ jsxs59("div", { className: `flex flex-col h-full min-h-0 ${className || ""}`, children: [
|
|
28355
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex justify-between items-center mb-6", children: [
|
|
28356
|
+
/* @__PURE__ */ jsx117("div", { className: "text-2xl font-medium leading-8 tracking-[0.01em] text-t_text_primary", children: "Select Wallet" }),
|
|
28357
|
+
/* @__PURE__ */ jsx117(
|
|
28106
28358
|
"button",
|
|
28107
28359
|
{
|
|
28108
28360
|
type: "button",
|
|
28109
28361
|
"aria-label": "Close",
|
|
28110
28362
|
className: "flex items-center justify-center w-8 h-8 rounded-md bg-t_bg_tertiary bg-opacity-5 hover:bg-opacity-10 transition-colors",
|
|
28111
28363
|
onClick: onClose,
|
|
28112
|
-
children: /* @__PURE__ */
|
|
28364
|
+
children: /* @__PURE__ */ jsx117("div", { className: "w-4 h-4 opacity-50 fill-t_text_primary flex items-center justify-center", children: /* @__PURE__ */ jsx117(CloseIcon, {}) })
|
|
28113
28365
|
}
|
|
28114
28366
|
)
|
|
28115
28367
|
] }),
|
|
28116
|
-
/* @__PURE__ */
|
|
28368
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex flex-col flex-1 min-h-0 overflow-y-auto", children: [
|
|
28117
28369
|
ecosystem === "evm" /* EVM */ && visibleConnectors.map((connector) => {
|
|
28118
28370
|
const isConnected = activeConnector?.id === connector.id;
|
|
28119
|
-
return /* @__PURE__ */
|
|
28371
|
+
return /* @__PURE__ */ jsx117(
|
|
28120
28372
|
WalletRow,
|
|
28121
28373
|
{
|
|
28122
|
-
icon: /* @__PURE__ */
|
|
28374
|
+
icon: /* @__PURE__ */ jsx117(ConnectorIcon, { connector }),
|
|
28123
28375
|
name: connector.name,
|
|
28124
28376
|
isConnected,
|
|
28125
28377
|
onClick: async () => {
|
|
@@ -28132,10 +28384,10 @@ var WalletPicker = ({ ecosystem, className, onClose }) => {
|
|
|
28132
28384
|
}),
|
|
28133
28385
|
ecosystem === "solana" /* SOLANA */ && (visibleSolanaWallets.length ? visibleSolanaWallets.map((wallet) => {
|
|
28134
28386
|
const isConnected = !!publicKey9 && activeWallet?.adapter.name === wallet.adapter.name;
|
|
28135
|
-
return /* @__PURE__ */
|
|
28387
|
+
return /* @__PURE__ */ jsx117(
|
|
28136
28388
|
WalletRow,
|
|
28137
28389
|
{
|
|
28138
|
-
icon: /* @__PURE__ */
|
|
28390
|
+
icon: /* @__PURE__ */ jsx117(
|
|
28139
28391
|
"img",
|
|
28140
28392
|
{
|
|
28141
28393
|
src: wallet.adapter.icon,
|
|
@@ -28152,20 +28404,20 @@ var WalletPicker = ({ ecosystem, className, onClose }) => {
|
|
|
28152
28404
|
},
|
|
28153
28405
|
wallet.adapter.name
|
|
28154
28406
|
);
|
|
28155
|
-
}) : /* @__PURE__ */
|
|
28407
|
+
}) : /* @__PURE__ */ jsx117("div", { className: "text-center py-1 text-sm text-t_text_primary text-opacity-50", children: "No wallet found" })),
|
|
28156
28408
|
ecosystem === "sui" /* SUI */ && (suiWallets.length ? suiWallets.map((wallet) => {
|
|
28157
28409
|
const isConnected = !!suiAccount?.address && suiCurrentWallet?.currentWallet?.name === wallet.name;
|
|
28158
|
-
return /* @__PURE__ */
|
|
28410
|
+
return /* @__PURE__ */ jsx117(
|
|
28159
28411
|
WalletRow,
|
|
28160
28412
|
{
|
|
28161
|
-
icon: wallet.icon ? /* @__PURE__ */
|
|
28413
|
+
icon: wallet.icon ? /* @__PURE__ */ jsx117(
|
|
28162
28414
|
"img",
|
|
28163
28415
|
{
|
|
28164
28416
|
src: wallet.icon,
|
|
28165
28417
|
alt: wallet.name,
|
|
28166
28418
|
className: "w-10 h-10 rounded-lg shrink-0"
|
|
28167
28419
|
}
|
|
28168
|
-
) : /* @__PURE__ */
|
|
28420
|
+
) : /* @__PURE__ */ jsx117("div", { className: "w-10 h-10 rounded-lg shrink-0 bg-t_bg_tertiary bg-opacity-10" }),
|
|
28169
28421
|
name: wallet.name,
|
|
28170
28422
|
isConnected,
|
|
28171
28423
|
onClick: async () => {
|
|
@@ -28174,13 +28426,13 @@ var WalletPicker = ({ ecosystem, className, onClose }) => {
|
|
|
28174
28426
|
},
|
|
28175
28427
|
wallet.name
|
|
28176
28428
|
);
|
|
28177
|
-
}) : /* @__PURE__ */
|
|
28429
|
+
}) : /* @__PURE__ */ jsx117("div", { className: "text-center py-1 text-sm text-t_text_primary text-opacity-50", children: "No wallet found" }))
|
|
28178
28430
|
] })
|
|
28179
28431
|
] });
|
|
28180
28432
|
};
|
|
28181
28433
|
|
|
28182
28434
|
// src/components/Swap/WalletPickerView/index.tsx
|
|
28183
|
-
import { jsx as
|
|
28435
|
+
import { jsx as jsx118, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
28184
28436
|
var WalletPickerView = () => {
|
|
28185
28437
|
const {
|
|
28186
28438
|
openEVMWalletModal,
|
|
@@ -28199,7 +28451,7 @@ var WalletPickerView = () => {
|
|
|
28199
28451
|
if (!ecosystem) {
|
|
28200
28452
|
return null;
|
|
28201
28453
|
}
|
|
28202
|
-
return /* @__PURE__ */
|
|
28454
|
+
return /* @__PURE__ */ jsx118(
|
|
28203
28455
|
"div",
|
|
28204
28456
|
{
|
|
28205
28457
|
className: "fixed top-0 left-0 right-0 bottom-0 z-10 flex flex-col justify-end bg-[rgba(2,2,2,0.8)] sm:absolute sm:z-[2] sm:justify-start sm:bg-transparent",
|
|
@@ -28211,9 +28463,9 @@ var WalletPickerView = () => {
|
|
|
28211
28463
|
close();
|
|
28212
28464
|
}
|
|
28213
28465
|
},
|
|
28214
|
-
children: /* @__PURE__ */
|
|
28215
|
-
/* @__PURE__ */
|
|
28216
|
-
/* @__PURE__ */
|
|
28466
|
+
children: /* @__PURE__ */ jsxs60("div", { className: "flex flex-col w-full h-[85vh] max-h-full overflow-hidden p-4 pt-2.5 rounded-t-[24px] border-t border-solid border-t_text_primary border-opacity-10 bg-gradient-to-r from-t_bg_secondary/50 to-t_bg_secondary/50 bg-t_bg_primary sm:h-full sm:p-0 sm:rounded-none sm:border-0 sm:bg-none sm:bg-transparent", children: [
|
|
28467
|
+
/* @__PURE__ */ jsx118("div", { className: "sm:hidden mx-auto mb-4 h-1 w-8 rounded-full bg-t_bg_tertiary bg-opacity-10 shrink-0" }),
|
|
28468
|
+
/* @__PURE__ */ jsx118(WalletPicker, { ecosystem, onClose: close })
|
|
28217
28469
|
] })
|
|
28218
28470
|
}
|
|
28219
28471
|
);
|
|
@@ -28224,42 +28476,42 @@ var useWalletPickerOpen = () => {
|
|
|
28224
28476
|
};
|
|
28225
28477
|
|
|
28226
28478
|
// src/components/Swap/index.tsx
|
|
28227
|
-
import { jsx as
|
|
28479
|
+
import { jsx as jsx119, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
28228
28480
|
var Swap = ({ onClose }) => {
|
|
28229
28481
|
const { tab, activePicker } = useSwapContext();
|
|
28230
28482
|
const walletPickerOpen = useWalletPickerOpen();
|
|
28231
|
-
const overlayView =
|
|
28232
|
-
return tab === "Settings" ? /* @__PURE__ */
|
|
28483
|
+
const overlayView = useMemo30(() => {
|
|
28484
|
+
return tab === "Settings" ? /* @__PURE__ */ jsx119(SettingsView, {}) : tab === "History" ? /* @__PURE__ */ jsx119(HistoryView, {}) : null;
|
|
28233
28485
|
}, [tab]);
|
|
28234
|
-
return /* @__PURE__ */
|
|
28486
|
+
return /* @__PURE__ */ jsxs61(
|
|
28235
28487
|
"div",
|
|
28236
28488
|
{
|
|
28237
28489
|
className: `relative flex flex-col gap-6 p-4 sm:p-8 text-t_text_primary bg-gradient-to-r from-t_bg_tertiary/[0.01] to-t_bg_tertiary/[0.01] bg-t_bg_secondary bg-opacity-50 backdrop-blur-[48px] rounded-[32px] border border-solid border-t_text_primary border-opacity-10 flex-1`,
|
|
28238
28490
|
children: [
|
|
28239
|
-
/* @__PURE__ */
|
|
28240
|
-
activePicker && /* @__PURE__ */
|
|
28241
|
-
/* @__PURE__ */
|
|
28242
|
-
/* @__PURE__ */
|
|
28491
|
+
/* @__PURE__ */ jsxs61("div", { className: "relative flex flex-col flex-1 min-h-0", children: [
|
|
28492
|
+
activePicker && /* @__PURE__ */ jsx119(PickerView, {}),
|
|
28493
|
+
/* @__PURE__ */ jsx119(WalletPickerView, {}),
|
|
28494
|
+
/* @__PURE__ */ jsxs61(
|
|
28243
28495
|
"div",
|
|
28244
28496
|
{
|
|
28245
28497
|
className: `flex flex-col gap-6 flex-1 min-h-0 ${activePicker || walletPickerOpen ? "sm:invisible" : ""}`,
|
|
28246
28498
|
children: [
|
|
28247
|
-
/* @__PURE__ */
|
|
28248
|
-
/* @__PURE__ */
|
|
28249
|
-
/* @__PURE__ */
|
|
28499
|
+
/* @__PURE__ */ jsx119(Header2, { onClose }),
|
|
28500
|
+
/* @__PURE__ */ jsxs61("div", { className: "relative flex flex-col flex-1 min-h-0", children: [
|
|
28501
|
+
/* @__PURE__ */ jsx119(
|
|
28250
28502
|
"div",
|
|
28251
28503
|
{
|
|
28252
28504
|
className: `flex flex-col flex-1 min-h-0 ${overlayView ? "invisible" : ""}`,
|
|
28253
|
-
children: /* @__PURE__ */
|
|
28505
|
+
children: /* @__PURE__ */ jsx119(SwapView, {})
|
|
28254
28506
|
}
|
|
28255
28507
|
),
|
|
28256
|
-
overlayView && /* @__PURE__ */
|
|
28508
|
+
overlayView && /* @__PURE__ */ jsx119("div", { className: "absolute inset-0 flex flex-col min-h-0", children: overlayView })
|
|
28257
28509
|
] })
|
|
28258
28510
|
]
|
|
28259
28511
|
}
|
|
28260
28512
|
)
|
|
28261
28513
|
] }),
|
|
28262
|
-
/* @__PURE__ */
|
|
28514
|
+
/* @__PURE__ */ jsx119(PoweredBy, {})
|
|
28263
28515
|
]
|
|
28264
28516
|
}
|
|
28265
28517
|
);
|
|
@@ -28267,7 +28519,7 @@ var Swap = ({ onClose }) => {
|
|
|
28267
28519
|
|
|
28268
28520
|
// src/components/TextInput/index.tsx
|
|
28269
28521
|
import { forwardRef as forwardRef6 } from "react";
|
|
28270
|
-
import { Fragment as Fragment11, jsx as
|
|
28522
|
+
import { Fragment as Fragment11, jsx as jsx120, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
28271
28523
|
var TextInput = forwardRef6((props, ref) => {
|
|
28272
28524
|
const {
|
|
28273
28525
|
inputIcon,
|
|
@@ -28282,10 +28534,10 @@ var TextInput = forwardRef6((props, ref) => {
|
|
|
28282
28534
|
disabled = false,
|
|
28283
28535
|
className = ""
|
|
28284
28536
|
} = props;
|
|
28285
|
-
return /* @__PURE__ */
|
|
28286
|
-
/* @__PURE__ */
|
|
28537
|
+
return /* @__PURE__ */ jsxs62(Fragment11, { children: [
|
|
28538
|
+
/* @__PURE__ */ jsxs62("div", { className: "flex items-center border border-solid border-t_text_primary border-opacity-10 rounded-lg py-0 px-3 gap-2 bg-t_bg_secondary ", children: [
|
|
28287
28539
|
inputIcon,
|
|
28288
|
-
/* @__PURE__ */
|
|
28540
|
+
/* @__PURE__ */ jsx120(
|
|
28289
28541
|
"input",
|
|
28290
28542
|
{
|
|
28291
28543
|
ref,
|
|
@@ -28300,13 +28552,13 @@ var TextInput = forwardRef6((props, ref) => {
|
|
|
28300
28552
|
}
|
|
28301
28553
|
)
|
|
28302
28554
|
] }),
|
|
28303
|
-
error && /* @__PURE__ */
|
|
28304
|
-
warning && /* @__PURE__ */
|
|
28555
|
+
error && /* @__PURE__ */ jsx120("div", { className: "flex justify-between pt-[10px]", children: /* @__PURE__ */ jsx120("div", { className: "px-5 text-t_text_red", children: error }) }),
|
|
28556
|
+
warning && /* @__PURE__ */ jsx120("div", { className: "flex justify-between pt-[10px]", children: /* @__PURE__ */ jsx120("div", { className: "px-5 text-t_text_orange", children: warning }) })
|
|
28305
28557
|
] });
|
|
28306
28558
|
});
|
|
28307
28559
|
|
|
28308
28560
|
// src/hooks/useTimer.ts
|
|
28309
|
-
import { useState as
|
|
28561
|
+
import { useState as useState15, useEffect as useEffect13, useCallback as useCallback16 } from "react";
|
|
28310
28562
|
var TimeUtils = class {
|
|
28311
28563
|
static getTimeFromSeconds(seconds) {
|
|
28312
28564
|
const days = Math.floor(seconds / (60 * 60 * 24));
|
|
@@ -28326,8 +28578,8 @@ var useTimer = ({
|
|
|
28326
28578
|
onExpire,
|
|
28327
28579
|
autoStart = true
|
|
28328
28580
|
}) => {
|
|
28329
|
-
const [isRunning, setIsRunning] =
|
|
28330
|
-
const [seconds, setSeconds] =
|
|
28581
|
+
const [isRunning, setIsRunning] = useState15(autoStart);
|
|
28582
|
+
const [seconds, setSeconds] = useState15(
|
|
28331
28583
|
TimeUtils.getSecondsFromExpiry(expiryTimestamp)
|
|
28332
28584
|
);
|
|
28333
28585
|
const tick = useCallback16(() => {
|
|
@@ -28338,7 +28590,7 @@ var useTimer = ({
|
|
|
28338
28590
|
}
|
|
28339
28591
|
setSeconds(newSeconds);
|
|
28340
28592
|
}, [expiryTimestamp, onExpire]);
|
|
28341
|
-
|
|
28593
|
+
useEffect13(() => {
|
|
28342
28594
|
if (!isRunning) return;
|
|
28343
28595
|
const intervalId = setInterval(tick, 1e3);
|
|
28344
28596
|
return () => clearInterval(intervalId);
|
|
@@ -28360,37 +28612,37 @@ var useTimer = ({
|
|
|
28360
28612
|
var useTimer_default = useTimer;
|
|
28361
28613
|
|
|
28362
28614
|
// src/components/Timer/index.tsx
|
|
28363
|
-
import { useEffect as
|
|
28364
|
-
import { Fragment as Fragment12, jsx as
|
|
28615
|
+
import { useEffect as useEffect14, useState as useState16 } from "react";
|
|
28616
|
+
import { Fragment as Fragment12, jsx as jsx121, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
28365
28617
|
var Timer = ({
|
|
28366
28618
|
expiryTimestamp,
|
|
28367
28619
|
displayFormat = 2 /* Days */,
|
|
28368
28620
|
customTextOnExpire
|
|
28369
28621
|
}) => {
|
|
28370
|
-
const [expired, setExpired] =
|
|
28622
|
+
const [expired, setExpired] = useState16(
|
|
28371
28623
|
expiryTimestamp.getTime() < Date.now()
|
|
28372
28624
|
);
|
|
28373
28625
|
const { seconds, minutes, hours, days, restart } = useTimer_default({
|
|
28374
28626
|
expiryTimestamp,
|
|
28375
28627
|
onExpire: () => setExpired(true)
|
|
28376
28628
|
});
|
|
28377
|
-
|
|
28629
|
+
useEffect14(() => {
|
|
28378
28630
|
restart(expiryTimestamp);
|
|
28379
28631
|
}, [expiryTimestamp]);
|
|
28380
|
-
return /* @__PURE__ */
|
|
28381
|
-
displayFormat === 0 /* Minutes */ && /* @__PURE__ */
|
|
28382
|
-
displayFormat === 1 /* Hours */ && /* @__PURE__ */
|
|
28383
|
-
displayFormat === 2 /* Days */ && /* @__PURE__ */
|
|
28632
|
+
return /* @__PURE__ */ jsx121(Fragment12, { children: expired && customTextOnExpire ? /* @__PURE__ */ jsx121(Fragment12, { children: customTextOnExpire }) : /* @__PURE__ */ jsxs63(Fragment12, { children: [
|
|
28633
|
+
displayFormat === 0 /* Minutes */ && /* @__PURE__ */ jsx121("span", { children: `${(days * 24 + hours) * 60 + minutes}:${seconds.toString().padStart(2, "0")}` }),
|
|
28634
|
+
displayFormat === 1 /* Hours */ && /* @__PURE__ */ jsx121("span", { children: `${days * 24 + hours}:${minutes.toString().padStart(2, "0")}:${seconds.toString().padStart(2, "0")}` }),
|
|
28635
|
+
displayFormat === 2 /* Days */ && /* @__PURE__ */ jsx121("span", { children: `${days}:${hours.toString().padStart(2, "0")}:${minutes.toString().padStart(2, "0")}:${seconds.toString().padStart(2, "0")}` })
|
|
28384
28636
|
] }) });
|
|
28385
28637
|
};
|
|
28386
28638
|
|
|
28387
28639
|
// src/components/TokenLogo/index.tsx
|
|
28388
|
-
import { useEffect as
|
|
28640
|
+
import { useEffect as useEffect15, useState as useState17 } from "react";
|
|
28389
28641
|
|
|
28390
28642
|
// src/components/TokenLogo/Unknown/index.tsx
|
|
28391
|
-
import { jsx as
|
|
28643
|
+
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
28392
28644
|
var UnknownTokenLogo = ({ tokenName, className }) => {
|
|
28393
|
-
return /* @__PURE__ */
|
|
28645
|
+
return /* @__PURE__ */ jsx122(
|
|
28394
28646
|
"div",
|
|
28395
28647
|
{
|
|
28396
28648
|
className: `rounded-full bg-white shadow-sm flex items-center justify-center text-black ${className}`,
|
|
@@ -28400,21 +28652,21 @@ var UnknownTokenLogo = ({ tokenName, className }) => {
|
|
|
28400
28652
|
};
|
|
28401
28653
|
|
|
28402
28654
|
// src/components/TokenLogo/index.tsx
|
|
28403
|
-
import { jsx as
|
|
28655
|
+
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
28404
28656
|
var TokenLogo = ({
|
|
28405
28657
|
token,
|
|
28406
28658
|
className,
|
|
28407
28659
|
generatedLogoClassName
|
|
28408
28660
|
}) => {
|
|
28409
|
-
const [errorOcurred, setErrorOccured] =
|
|
28410
|
-
|
|
28661
|
+
const [errorOcurred, setErrorOccured] = useState17(false);
|
|
28662
|
+
useEffect15(() => {
|
|
28411
28663
|
setErrorOccured(false);
|
|
28412
28664
|
}, [token?.address]);
|
|
28413
28665
|
if (!token) {
|
|
28414
28666
|
return null;
|
|
28415
28667
|
}
|
|
28416
28668
|
if (errorOcurred) {
|
|
28417
|
-
return /* @__PURE__ */
|
|
28669
|
+
return /* @__PURE__ */ jsx123(
|
|
28418
28670
|
UnknownTokenLogo,
|
|
28419
28671
|
{
|
|
28420
28672
|
tokenName: token.name,
|
|
@@ -28422,7 +28674,7 @@ var TokenLogo = ({
|
|
|
28422
28674
|
}
|
|
28423
28675
|
);
|
|
28424
28676
|
}
|
|
28425
|
-
return token?.image ? /* @__PURE__ */
|
|
28677
|
+
return token?.image ? /* @__PURE__ */ jsx123(
|
|
28426
28678
|
"img",
|
|
28427
28679
|
{
|
|
28428
28680
|
src: token.image,
|
|
@@ -28430,7 +28682,7 @@ var TokenLogo = ({
|
|
|
28430
28682
|
className: `rounded-full ${className}`,
|
|
28431
28683
|
onError: () => setErrorOccured(true)
|
|
28432
28684
|
}
|
|
28433
|
-
) : /* @__PURE__ */
|
|
28685
|
+
) : /* @__PURE__ */ jsx123(
|
|
28434
28686
|
UnknownTokenLogo,
|
|
28435
28687
|
{
|
|
28436
28688
|
tokenName: token.name,
|
|
@@ -28440,7 +28692,7 @@ var TokenLogo = ({
|
|
|
28440
28692
|
};
|
|
28441
28693
|
|
|
28442
28694
|
// src/components/TokenLogo/WithChain/index.tsx
|
|
28443
|
-
import { jsx as
|
|
28695
|
+
import { jsx as jsx124, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
28444
28696
|
var TokenLogoWithChain = ({
|
|
28445
28697
|
token,
|
|
28446
28698
|
chain,
|
|
@@ -28448,8 +28700,8 @@ var TokenLogoWithChain = ({
|
|
|
28448
28700
|
generatedLogoClassName,
|
|
28449
28701
|
chainLogoClassName
|
|
28450
28702
|
}) => {
|
|
28451
|
-
return /* @__PURE__ */
|
|
28452
|
-
/* @__PURE__ */
|
|
28703
|
+
return /* @__PURE__ */ jsxs64("div", { className: "relative flex items-end pr-1 pb-1", children: [
|
|
28704
|
+
/* @__PURE__ */ jsx124(
|
|
28453
28705
|
TokenLogo,
|
|
28454
28706
|
{
|
|
28455
28707
|
token,
|
|
@@ -28457,7 +28709,7 @@ var TokenLogoWithChain = ({
|
|
|
28457
28709
|
generatedLogoClassName
|
|
28458
28710
|
}
|
|
28459
28711
|
),
|
|
28460
|
-
chain && /* @__PURE__ */
|
|
28712
|
+
chain && /* @__PURE__ */ jsx124(
|
|
28461
28713
|
"img",
|
|
28462
28714
|
{
|
|
28463
28715
|
src: chain.image,
|
|
@@ -28469,7 +28721,7 @@ var TokenLogoWithChain = ({
|
|
|
28469
28721
|
};
|
|
28470
28722
|
|
|
28471
28723
|
// src/components/TxConfigForm/index.tsx
|
|
28472
|
-
import { useEffect as
|
|
28724
|
+
import { useEffect as useEffect16, useMemo as useMemo31 } from "react";
|
|
28473
28725
|
import { ErrorBoundary } from "react-error-boundary";
|
|
28474
28726
|
|
|
28475
28727
|
// localTheme.ts
|
|
@@ -28592,7 +28844,7 @@ function changeHostVariableColor(isLightMode, customStyles) {
|
|
|
28592
28844
|
}
|
|
28593
28845
|
|
|
28594
28846
|
// src/components/TxConfigForm/index.tsx
|
|
28595
|
-
import { Fragment as Fragment13, jsx as
|
|
28847
|
+
import { Fragment as Fragment13, jsx as jsx125, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
28596
28848
|
var normalizeTxConfigFormProps = (props) => {
|
|
28597
28849
|
return {
|
|
28598
28850
|
...props,
|
|
@@ -28602,21 +28854,21 @@ var normalizeTxConfigFormProps = (props) => {
|
|
|
28602
28854
|
};
|
|
28603
28855
|
var PendingTransactionsEmitter = ({ onPendingTransactionsChange }) => {
|
|
28604
28856
|
const { history } = useHistory();
|
|
28605
|
-
const pendingTransactions =
|
|
28857
|
+
const pendingTransactions = useMemo31(
|
|
28606
28858
|
() => history.filter((entry) => entry.status === "IN_PROGRESS"),
|
|
28607
28859
|
[history]
|
|
28608
28860
|
);
|
|
28609
|
-
|
|
28861
|
+
useEffect16(() => {
|
|
28610
28862
|
if (onPendingTransactionsChange) {
|
|
28611
28863
|
onPendingTransactionsChange(pendingTransactions);
|
|
28612
28864
|
} else if (window.xPayOnPendingTransactionsChange) {
|
|
28613
28865
|
window.xPayOnPendingTransactionsChange(pendingTransactions);
|
|
28614
28866
|
}
|
|
28615
28867
|
}, [onPendingTransactionsChange, pendingTransactions]);
|
|
28616
|
-
return /* @__PURE__ */
|
|
28868
|
+
return /* @__PURE__ */ jsx125(Fragment13, {});
|
|
28617
28869
|
};
|
|
28618
28870
|
var TxConfigForm = (props) => {
|
|
28619
|
-
const normalizedProps =
|
|
28871
|
+
const normalizedProps = useMemo31(
|
|
28620
28872
|
() => normalizeTxConfigFormProps(props),
|
|
28621
28873
|
[props]
|
|
28622
28874
|
);
|
|
@@ -28661,30 +28913,30 @@ var TxConfigForm = (props) => {
|
|
|
28661
28913
|
onClose();
|
|
28662
28914
|
}
|
|
28663
28915
|
};
|
|
28664
|
-
const wagmiConfig =
|
|
28916
|
+
const wagmiConfig = useMemo31(
|
|
28665
28917
|
() => providedWagmiConfig ?? window.xPayWagmiConfig ?? getWagmiConfig(supportedChains),
|
|
28666
28918
|
[providedWagmiConfig, supportedChains]
|
|
28667
28919
|
);
|
|
28668
|
-
|
|
28920
|
+
useEffect16(() => {
|
|
28669
28921
|
changeHostVariableColor(lightTheme, styles);
|
|
28670
28922
|
}, [lightTheme, styles]);
|
|
28671
|
-
|
|
28923
|
+
useEffect16(() => {
|
|
28672
28924
|
if (override?.apiUrl) {
|
|
28673
28925
|
setApiUrl(override?.apiUrl);
|
|
28674
28926
|
}
|
|
28675
28927
|
}, [override?.apiUrl]);
|
|
28676
|
-
return /* @__PURE__ */
|
|
28928
|
+
return /* @__PURE__ */ jsx125(
|
|
28677
28929
|
ErrorBoundary,
|
|
28678
28930
|
{
|
|
28679
|
-
FallbackComponent: () => /* @__PURE__ */
|
|
28680
|
-
children: /* @__PURE__ */
|
|
28681
|
-
/* @__PURE__ */
|
|
28931
|
+
FallbackComponent: () => /* @__PURE__ */ jsx125("div", { children: "Something went wrong, please contact XSwap." }),
|
|
28932
|
+
children: /* @__PURE__ */ jsx125(AllWalletsConfig, { wagmiConfig, children: /* @__PURE__ */ jsx125(WalletProvider, { children: /* @__PURE__ */ jsxs65(HistoryProvider, { children: [
|
|
28933
|
+
/* @__PURE__ */ jsx125(
|
|
28682
28934
|
PendingTransactionsEmitter,
|
|
28683
28935
|
{
|
|
28684
28936
|
onPendingTransactionsChange
|
|
28685
28937
|
}
|
|
28686
28938
|
),
|
|
28687
|
-
/* @__PURE__ */
|
|
28939
|
+
/* @__PURE__ */ jsx125(
|
|
28688
28940
|
SwapProvider,
|
|
28689
28941
|
{
|
|
28690
28942
|
integrationConfig: {
|
|
@@ -28714,14 +28966,14 @@ var TxConfigForm = (props) => {
|
|
|
28714
28966
|
},
|
|
28715
28967
|
supportedChains,
|
|
28716
28968
|
overlay,
|
|
28717
|
-
children: /* @__PURE__ */
|
|
28969
|
+
children: /* @__PURE__ */ jsx125(TransactionProvider, { children: /* @__PURE__ */ jsx125(TxUIWrapper, { children: overlay ? /* @__PURE__ */ jsx125(
|
|
28718
28970
|
"div",
|
|
28719
28971
|
{
|
|
28720
28972
|
className: "top-0 left-0 right-0 bottom-0 bg-[rgba(0,0,0,0.8)] fixed flex flex-col items-center justify-center z-10",
|
|
28721
28973
|
onMouseDown: onBackdropClick,
|
|
28722
|
-
children: /* @__PURE__ */
|
|
28974
|
+
children: /* @__PURE__ */ jsx125("div", { className: "relative rounded-[32px] overflow-auto text-t_text_primary w-x_modal min-w-x_modal max-w-x_modal min-h-[532px] flex flex-col", children: /* @__PURE__ */ jsx125(Swap, { onSubmit, onClose }) })
|
|
28723
28975
|
}
|
|
28724
|
-
) : /* @__PURE__ */
|
|
28976
|
+
) : /* @__PURE__ */ jsx125("div", { className: "rounded-[32px] overflow-auto text-t_text_primary min-h-[532px] w-x_modal min-w-x_modal max-w-x_modal flex flex-col", children: /* @__PURE__ */ jsx125(Swap, { onSubmit: () => {
|
|
28725
28977
|
}, onClose: () => {
|
|
28726
28978
|
} }) }) }) })
|
|
28727
28979
|
}
|
|
@@ -28761,7 +29013,7 @@ var openTxConfigForm = async ({
|
|
|
28761
29013
|
throw new Error("XPay was incorrectly initialized");
|
|
28762
29014
|
}
|
|
28763
29015
|
xpayRoot.render(
|
|
28764
|
-
/* @__PURE__ */
|
|
29016
|
+
/* @__PURE__ */ jsx125(
|
|
28765
29017
|
TxConfigForm,
|
|
28766
29018
|
{
|
|
28767
29019
|
integratorId,
|
|
@@ -28814,10 +29066,10 @@ import { format as format3 } from "date-fns";
|
|
|
28814
29066
|
import { useCallback as useCallback17 } from "react";
|
|
28815
29067
|
|
|
28816
29068
|
// src/components/TxDataCard/TokenDetails/index.tsx
|
|
28817
|
-
import { jsx as
|
|
29069
|
+
import { jsx as jsx126, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
28818
29070
|
var TokenDetails = ({ chain, token, amount }) => {
|
|
28819
|
-
return /* @__PURE__ */
|
|
28820
|
-
/* @__PURE__ */
|
|
29071
|
+
return /* @__PURE__ */ jsxs66("div", { className: "flex gap-2", children: [
|
|
29072
|
+
/* @__PURE__ */ jsx126(
|
|
28821
29073
|
TokenLogoWithChain,
|
|
28822
29074
|
{
|
|
28823
29075
|
token,
|
|
@@ -28827,15 +29079,15 @@ var TokenDetails = ({ chain, token, amount }) => {
|
|
|
28827
29079
|
chainLogoClassName: "w-5"
|
|
28828
29080
|
}
|
|
28829
29081
|
),
|
|
28830
|
-
/* @__PURE__ */
|
|
28831
|
-
/* @__PURE__ */
|
|
28832
|
-
/* @__PURE__ */
|
|
29082
|
+
/* @__PURE__ */ jsxs66("div", { className: "flex flex-col text-[12px]", children: [
|
|
29083
|
+
/* @__PURE__ */ jsx126("div", { className: "text-t_text_primary text-nowrap", children: `${Number(amount) < 1e-4 ? "<0.0001" : amount} ${token?.symbol ? token?.symbol : "unknown"}` }),
|
|
29084
|
+
/* @__PURE__ */ jsx126("div", { className: "text-xs text-t_text_primary text-opacity-50", children: chain?.displayName })
|
|
28833
29085
|
] })
|
|
28834
29086
|
] });
|
|
28835
29087
|
};
|
|
28836
29088
|
|
|
28837
29089
|
// src/components/TxDataCard/TxDataCardUI/index.tsx
|
|
28838
|
-
import { Fragment as Fragment14, jsx as
|
|
29090
|
+
import { Fragment as Fragment14, jsx as jsx127, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
28839
29091
|
var TxDataCardUI = ({
|
|
28840
29092
|
transaction,
|
|
28841
29093
|
supportedChains,
|
|
@@ -28862,21 +29114,21 @@ var TxDataCardUI = ({
|
|
|
28862
29114
|
const dstChain = supportedChains.find(
|
|
28863
29115
|
(chain) => chain.chainId === transaction.targetChainId
|
|
28864
29116
|
);
|
|
28865
|
-
return /* @__PURE__ */
|
|
28866
|
-
/* @__PURE__ */
|
|
28867
|
-
/* @__PURE__ */
|
|
28868
|
-
/* @__PURE__ */
|
|
28869
|
-
transaction.status === "IN_PROGRESS" ? /* @__PURE__ */
|
|
28870
|
-
/* @__PURE__ */
|
|
29117
|
+
return /* @__PURE__ */ jsxs67("div", { className: "flex flex-col border border-t_text_primary border-opacity-10 rounded-lg bg-t_bg_primary p-4 gap-4 mb-2", children: [
|
|
29118
|
+
/* @__PURE__ */ jsxs67("div", { className: "flex items-center gap-2 border-b border-solid border-t_text_primary border-opacity-10 pb-1", children: [
|
|
29119
|
+
/* @__PURE__ */ jsx127("div", { className: "text-xs text-t_text_primary text-opacity-50", children: date }),
|
|
29120
|
+
/* @__PURE__ */ jsxs67("div", { className: "flex grow justify-end items-center h-6", children: [
|
|
29121
|
+
transaction.status === "IN_PROGRESS" ? /* @__PURE__ */ jsxs67("div", { className: "flex items-center grow justify-end text-xs", children: [
|
|
29122
|
+
/* @__PURE__ */ jsx127(
|
|
28871
29123
|
FontAwesomeIcon2,
|
|
28872
29124
|
{
|
|
28873
29125
|
icon: faHourglassHalf,
|
|
28874
29126
|
className: "w-4 h-4 mr-1 text-t_text_orange"
|
|
28875
29127
|
}
|
|
28876
29128
|
),
|
|
28877
|
-
/* @__PURE__ */
|
|
29129
|
+
/* @__PURE__ */ jsxs67("div", { className: "text-xs text-t_text_orange min-w-[108px]", children: [
|
|
28878
29130
|
"In progress (",
|
|
28879
|
-
/* @__PURE__ */
|
|
29131
|
+
/* @__PURE__ */ jsx127(
|
|
28880
29132
|
Timer,
|
|
28881
29133
|
{
|
|
28882
29134
|
displayFormat: 0 /* Minutes */,
|
|
@@ -28886,8 +29138,8 @@ var TxDataCardUI = ({
|
|
|
28886
29138
|
),
|
|
28887
29139
|
")"
|
|
28888
29140
|
] })
|
|
28889
|
-
] }) : transaction.status === "DONE" ? /* @__PURE__ */
|
|
28890
|
-
/* @__PURE__ */
|
|
29141
|
+
] }) : transaction.status === "DONE" ? /* @__PURE__ */ jsx127("div", { className: "flex items-center grow justify-end text-xs", children: /* @__PURE__ */ jsx127("div", { className: "mr-1 text-t_text_green", children: "Done" }) }) : transaction.status === "REVERTED" ? /* @__PURE__ */ jsx127("div", { className: "flex items-center grow justify-end text-xs", children: /* @__PURE__ */ jsx127("div", { className: "mr-1 text-t_text_red", children: "Reverted" }) }) : null,
|
|
29142
|
+
/* @__PURE__ */ jsx127(
|
|
28891
29143
|
"a",
|
|
28892
29144
|
{
|
|
28893
29145
|
href: `${transaction.messageId ? `${CCIP_EXPLORER}${transaction.messageId}` : `${supportedChains.find(
|
|
@@ -28897,7 +29149,7 @@ var TxDataCardUI = ({
|
|
|
28897
29149
|
rel: "noreferrer",
|
|
28898
29150
|
className: "no-underline ml-1.5 text-t_text_primary",
|
|
28899
29151
|
"aria-label": "Show the transaction in the chain explorer",
|
|
28900
|
-
children: /* @__PURE__ */
|
|
29152
|
+
children: /* @__PURE__ */ jsx127(
|
|
28901
29153
|
FontAwesomeIcon2,
|
|
28902
29154
|
{
|
|
28903
29155
|
icon: faArrowUpRightFromSquare,
|
|
@@ -28908,8 +29160,8 @@ var TxDataCardUI = ({
|
|
|
28908
29160
|
)
|
|
28909
29161
|
] })
|
|
28910
29162
|
] }),
|
|
28911
|
-
/* @__PURE__ */
|
|
28912
|
-
/* @__PURE__ */
|
|
29163
|
+
/* @__PURE__ */ jsx127("div", { className: "flex flex-wrap gap-8", children: /* @__PURE__ */ jsxs67("div", { className: "flex items-center gap-2", children: [
|
|
29164
|
+
/* @__PURE__ */ jsx127(
|
|
28913
29165
|
TokenDetails,
|
|
28914
29166
|
{
|
|
28915
29167
|
chain: srcChain,
|
|
@@ -28917,15 +29169,15 @@ var TxDataCardUI = ({
|
|
|
28917
29169
|
amount: transferredAmount
|
|
28918
29170
|
}
|
|
28919
29171
|
),
|
|
28920
|
-
transaction.tokenOutAddress && /* @__PURE__ */
|
|
28921
|
-
/* @__PURE__ */
|
|
29172
|
+
transaction.tokenOutAddress && /* @__PURE__ */ jsxs67(Fragment14, { children: [
|
|
29173
|
+
/* @__PURE__ */ jsx127(
|
|
28922
29174
|
FontAwesomeIcon2,
|
|
28923
29175
|
{
|
|
28924
29176
|
icon: faArrowRight,
|
|
28925
29177
|
className: "w-5 h-5 text-t_text_primary opacity-50 mx-1.5"
|
|
28926
29178
|
}
|
|
28927
29179
|
),
|
|
28928
|
-
/* @__PURE__ */
|
|
29180
|
+
/* @__PURE__ */ jsx127(
|
|
28929
29181
|
TokenDetails,
|
|
28930
29182
|
{
|
|
28931
29183
|
chain: dstChain,
|
|
@@ -28939,11 +29191,11 @@ var TxDataCardUI = ({
|
|
|
28939
29191
|
};
|
|
28940
29192
|
|
|
28941
29193
|
// src/components/TxDataCard/index.tsx
|
|
28942
|
-
import { jsx as
|
|
29194
|
+
import { jsx as jsx128 } from "react/jsx-runtime";
|
|
28943
29195
|
|
|
28944
29196
|
// src/components/TxModal/index.tsx
|
|
28945
29197
|
import { createPortal as createPortal2 } from "react-dom";
|
|
28946
|
-
import { jsx as
|
|
29198
|
+
import { jsx as jsx129, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
28947
29199
|
var TxModal = ({
|
|
28948
29200
|
id: id2,
|
|
28949
29201
|
children,
|
|
@@ -28959,24 +29211,24 @@ var TxModal = ({
|
|
|
28959
29211
|
}
|
|
28960
29212
|
};
|
|
28961
29213
|
return createPortal2(
|
|
28962
|
-
/* @__PURE__ */
|
|
29214
|
+
/* @__PURE__ */ jsx129(
|
|
28963
29215
|
"div",
|
|
28964
29216
|
{
|
|
28965
29217
|
className: "fixed box-border inset-0 z-20 flex items-center justify-center bg-black bg-opacity-80",
|
|
28966
29218
|
onMouseDown: onBackdropClick,
|
|
28967
|
-
children: /* @__PURE__ */
|
|
29219
|
+
children: /* @__PURE__ */ jsxs68(
|
|
28968
29220
|
"div",
|
|
28969
29221
|
{
|
|
28970
29222
|
className: `relative rounded-[32px] p-6 sm:p-8 w-full min-w-[340px] overflow-auto max-w-[var(--modal-width,588px)] backdrop-blur-[32px] bg-t_bg_secondary bg-opacity-75 border border-solid ${type === "warning" ? "border-t_warning_dark" : type === "waiting" ? "border-t_main_accent_dark" : "border-t_text_primary border-opacity-10"} ${className}`,
|
|
28971
29223
|
children: [
|
|
28972
|
-
(type === "error" || type === "success") && /* @__PURE__ */
|
|
29224
|
+
(type === "error" || type === "success") && /* @__PURE__ */ jsx129(
|
|
28973
29225
|
"div",
|
|
28974
29226
|
{
|
|
28975
29227
|
"aria-hidden": true,
|
|
28976
29228
|
className: `absolute inset-0 rounded-[inherit] pointer-events-none ${type === "error" ? "tx-modal-glow-error" : "tx-modal-glow-success"}`
|
|
28977
29229
|
}
|
|
28978
29230
|
),
|
|
28979
|
-
/* @__PURE__ */
|
|
29231
|
+
/* @__PURE__ */ jsx129("div", { className: "relative", children })
|
|
28980
29232
|
]
|
|
28981
29233
|
}
|
|
28982
29234
|
)
|
|
@@ -28988,30 +29240,30 @@ var TxModal = ({
|
|
|
28988
29240
|
};
|
|
28989
29241
|
|
|
28990
29242
|
// src/components/TxStatusButton/index.tsx
|
|
28991
|
-
import { useMemo as
|
|
28992
|
-
import { Fragment as Fragment15, jsx as
|
|
29243
|
+
import { useMemo as useMemo32, useState as useState18 } from "react";
|
|
29244
|
+
import { Fragment as Fragment15, jsx as jsx130, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
28993
29245
|
var TxStatusButton = ({
|
|
28994
29246
|
transaction,
|
|
28995
29247
|
supportedChains,
|
|
28996
29248
|
srcToken,
|
|
28997
29249
|
dstToken
|
|
28998
29250
|
}) => {
|
|
28999
|
-
const [isWide, setIsWide] =
|
|
29000
|
-
const background =
|
|
29251
|
+
const [isWide, setIsWide] = useState18(false);
|
|
29252
|
+
const background = useMemo32(
|
|
29001
29253
|
() => transaction?.status === "DONE" ? "bg-t_bg_primary bg-gradient-to-r from-t_success_light/20 to-t_success_dark/20" : "bg-t_bg_primary bg-gradient-to-r from-t_main_accent_light/20 to-t_main_accent_dark/20]",
|
|
29002
29254
|
[transaction]
|
|
29003
29255
|
);
|
|
29004
|
-
const border =
|
|
29256
|
+
const border = useMemo32(
|
|
29005
29257
|
() => transaction?.status === "DONE" ? "border border-solid border-t_success_dark" : "border border-solid border-t_main_accent_dark",
|
|
29006
29258
|
[transaction]
|
|
29007
29259
|
);
|
|
29008
|
-
return /* @__PURE__ */
|
|
29260
|
+
return /* @__PURE__ */ jsxs69(
|
|
29009
29261
|
"div",
|
|
29010
29262
|
{
|
|
29011
29263
|
className: "flex gap-2 items-end justify-end flex-wrap",
|
|
29012
29264
|
onClick: () => setIsWide((x) => !x),
|
|
29013
29265
|
children: [
|
|
29014
|
-
isWide && /* @__PURE__ */
|
|
29266
|
+
isWide && /* @__PURE__ */ jsx130(
|
|
29015
29267
|
TxDataCardUI,
|
|
29016
29268
|
{
|
|
29017
29269
|
transaction,
|
|
@@ -29020,15 +29272,15 @@ var TxStatusButton = ({
|
|
|
29020
29272
|
dstToken
|
|
29021
29273
|
}
|
|
29022
29274
|
),
|
|
29023
|
-
/* @__PURE__ */
|
|
29275
|
+
/* @__PURE__ */ jsx130(
|
|
29024
29276
|
"div",
|
|
29025
29277
|
{
|
|
29026
29278
|
className: `text-t_text_primary rounded-xl h-14 w-20 mb-2 cursor-pointer ${background} ${border}`,
|
|
29027
|
-
children: /* @__PURE__ */
|
|
29028
|
-
/* @__PURE__ */
|
|
29029
|
-
/* @__PURE__ */
|
|
29030
|
-
/* @__PURE__ */
|
|
29031
|
-
/* @__PURE__ */
|
|
29279
|
+
children: /* @__PURE__ */ jsxs69("div", { className: "flex gap-2 items-center h-14 w-20 justify-center fill-t_text_primary", children: [
|
|
29280
|
+
/* @__PURE__ */ jsx130("div", { className: `${isWide ? "rotate-180" : ""}`, children: /* @__PURE__ */ jsx130(ArrowLeftIcon, {}) }),
|
|
29281
|
+
/* @__PURE__ */ jsx130("div", { className: "relative flex items-center justify-center w-9 h-9", children: transaction?.status === "DONE" ? /* @__PURE__ */ jsx130("div", { className: "w-5 h-5 fill-t_success_dark", children: /* @__PURE__ */ jsx130(CheckIcon, {}) }) : /* @__PURE__ */ jsxs69(Fragment15, { children: [
|
|
29282
|
+
/* @__PURE__ */ jsx130("div", { className: "w-5 h-5", children: /* @__PURE__ */ jsx130(XSwapLogo, {}) }),
|
|
29283
|
+
/* @__PURE__ */ jsx130("div", { className: "absolute flex items-center justify-center top-0 left-0 right-0 bottom-0 text-t_text_primary", children: /* @__PURE__ */ jsx130(Spinner, { className: "w-10 h-10" }) })
|
|
29032
29284
|
] }) })
|
|
29033
29285
|
] })
|
|
29034
29286
|
}
|
|
@@ -29065,12 +29317,12 @@ var updateTransactionDoneInRenderedTransactions = (hash3) => {
|
|
|
29065
29317
|
});
|
|
29066
29318
|
};
|
|
29067
29319
|
var renderTxStatusButtons = () => {
|
|
29068
|
-
const buttons = renderedTransactions.map((item) => /* @__PURE__ */
|
|
29320
|
+
const buttons = renderedTransactions.map((item) => /* @__PURE__ */ jsx130(TxStatusButton, { ...item }, item.transaction.hash));
|
|
29069
29321
|
if (xpayTxStatusRoot === null) {
|
|
29070
29322
|
throw new Error("XPay was incorrectly initialized");
|
|
29071
29323
|
}
|
|
29072
29324
|
xpayTxStatusRoot.render(
|
|
29073
|
-
/* @__PURE__ */
|
|
29325
|
+
/* @__PURE__ */ jsx130("div", { className: "fixed bottom-5 right-2 flex flex-col gap-3 pl-9 items-end w-full z-50", children: buttons })
|
|
29074
29326
|
);
|
|
29075
29327
|
};
|
|
29076
29328
|
|
|
@@ -29099,8 +29351,8 @@ var createWebComponent = (ReactComponent, options = {}) => {
|
|
|
29099
29351
|
};
|
|
29100
29352
|
|
|
29101
29353
|
// src/components/TxWidgetWC/index.tsx
|
|
29102
|
-
import { useEffect as
|
|
29103
|
-
import { Fragment as Fragment16, jsx as
|
|
29354
|
+
import { useEffect as useEffect17, useState as useState19 } from "react";
|
|
29355
|
+
import { Fragment as Fragment16, jsx as jsx131, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
29104
29356
|
var TxWidget = ({
|
|
29105
29357
|
integratorId,
|
|
29106
29358
|
dstChain: dstChainId,
|
|
@@ -29130,15 +29382,15 @@ var TxWidget = ({
|
|
|
29130
29382
|
integratorFeeReceiverAddress,
|
|
29131
29383
|
highlightedDstTokens
|
|
29132
29384
|
}) => {
|
|
29133
|
-
const [loading, setLoading] =
|
|
29134
|
-
const [supportedChains, setSupportedChains] =
|
|
29135
|
-
const [srcTokenAddr, setSrcTokenAddr] =
|
|
29385
|
+
const [loading, setLoading] = useState19(true);
|
|
29386
|
+
const [supportedChains, setSupportedChains] = useState19([]);
|
|
29387
|
+
const [srcTokenAddr, setSrcTokenAddr] = useState19(
|
|
29136
29388
|
void 0
|
|
29137
29389
|
);
|
|
29138
|
-
const [dstTokenAddr, setDstTokenAddr] =
|
|
29390
|
+
const [dstTokenAddr, setDstTokenAddr] = useState19(
|
|
29139
29391
|
void 0
|
|
29140
29392
|
);
|
|
29141
|
-
|
|
29393
|
+
useEffect17(() => {
|
|
29142
29394
|
(async () => {
|
|
29143
29395
|
setLoading(true);
|
|
29144
29396
|
if (override?.apiUrl) {
|
|
@@ -29159,7 +29411,7 @@ var TxWidget = ({
|
|
|
29159
29411
|
console.error("Error parsing styles:", error);
|
|
29160
29412
|
}
|
|
29161
29413
|
})();
|
|
29162
|
-
|
|
29414
|
+
useEffect17(() => {
|
|
29163
29415
|
const newSrcTokenAddr = resolveTokenAddress(
|
|
29164
29416
|
srcTokenId,
|
|
29165
29417
|
srcChainId,
|
|
@@ -29173,9 +29425,9 @@ var TxWidget = ({
|
|
|
29173
29425
|
setSrcTokenAddr(newSrcTokenAddr);
|
|
29174
29426
|
setDstTokenAddr(newDstTokenAddr);
|
|
29175
29427
|
}, [srcTokenId, srcChainId, dstTokenId, dstChainId, supportedChains]);
|
|
29176
|
-
return /* @__PURE__ */
|
|
29177
|
-
/* @__PURE__ */
|
|
29178
|
-
loading ? /* @__PURE__ */
|
|
29428
|
+
return /* @__PURE__ */ jsxs70(Fragment16, { children: [
|
|
29429
|
+
/* @__PURE__ */ jsx131("style", { children: global_default }),
|
|
29430
|
+
loading ? /* @__PURE__ */ jsx131("div", { className: "min-h-[532px] w-full flex items-center justify-center", children: /* @__PURE__ */ jsx131(Spinner, { className: "w-10 h-10" }) }) : /* @__PURE__ */ jsx131(
|
|
29179
29431
|
TxConfigForm,
|
|
29180
29432
|
{
|
|
29181
29433
|
integratorId,
|
|
@@ -29254,8 +29506,8 @@ var createTxWidgetWC = () => {
|
|
|
29254
29506
|
|
|
29255
29507
|
// src/components/TxWidgetWCWrapped/index.tsx
|
|
29256
29508
|
import { isServer as isServer2 } from "@tanstack/react-query";
|
|
29257
|
-
import { useEffect as
|
|
29258
|
-
import { jsx as
|
|
29509
|
+
import { useEffect as useEffect18 } from "react";
|
|
29510
|
+
import { jsx as jsx132 } from "react/jsx-runtime";
|
|
29259
29511
|
var TxWidgetWC = createTxWidgetWC();
|
|
29260
29512
|
if (!isServer2 && typeof customElements !== "undefined") {
|
|
29261
29513
|
if (!customElements.get("xpay-widget")) {
|
|
@@ -29295,7 +29547,7 @@ var TxWidgetWCWrapped = ({
|
|
|
29295
29547
|
if (typeof window !== "undefined") {
|
|
29296
29548
|
window.xPayWagmiConfig = wagmiConfig;
|
|
29297
29549
|
}
|
|
29298
|
-
|
|
29550
|
+
useEffect18(() => {
|
|
29299
29551
|
window.xPayOnPendingTransactionsChange = onPendingTransactionsChange;
|
|
29300
29552
|
window.xPayOnDstTokenChange = onDstTokenChange;
|
|
29301
29553
|
window.xPayOnDstChainChange = onDstChainChange;
|
|
@@ -29310,7 +29562,7 @@ var TxWidgetWCWrapped = ({
|
|
|
29310
29562
|
onSrcChainChange,
|
|
29311
29563
|
onConnectWallet
|
|
29312
29564
|
]);
|
|
29313
|
-
return /* @__PURE__ */
|
|
29565
|
+
return /* @__PURE__ */ jsx132(
|
|
29314
29566
|
"xpay-widget",
|
|
29315
29567
|
{
|
|
29316
29568
|
"integrator-id": integratorId,
|