mirror of
https://github.com/logos-messaging/OpChan.git
synced 2026-01-02 12:53:10 +00:00
chore: setup workspace
This commit is contained in:
parent
b9c4a36b8a
commit
75dd710c11
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
node_modules
|
||||
15
dist/assets/add-B1b4Ty-5.js
vendored
Normal file
15
dist/assets/add-B1b4Ty-5.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const o=l`<svg
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 14 14"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M7.0023 0.875C7.48571 0.875 7.8776 1.26675 7.8776 1.75V6.125H12.2541C12.7375 6.125 13.1294 6.51675 13.1294 7C13.1294 7.48325 12.7375 7.875 12.2541 7.875H7.8776V12.25C7.8776 12.7332 7.48571 13.125 7.0023 13.125C6.51889 13.125 6.12701 12.7332 6.12701 12.25V7.875H1.75054C1.26713 7.875 0.875244 7.48325 0.875244 7C0.875244 6.51675 1.26713 6.125 1.75054 6.125H6.12701V1.75C6.12701 1.26675 6.51889 0.875 7.0023 0.875Z"
|
||||
fill="#667dff"
|
||||
/></svg
|
||||
>`;export{o as addSvg};
|
||||
6
dist/assets/all-wallets-DKy0zRrU.js
vendored
Normal file
6
dist/assets/all-wallets-DKy0zRrU.js
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const o=l`<svg fill="none" viewBox="0 0 24 24">
|
||||
<path
|
||||
style="fill: var(--wui-color-accent-100);"
|
||||
d="M10.2 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM10.2 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0Z"
|
||||
/>
|
||||
</svg>`;export{o as allWalletsSvg};
|
||||
17
dist/assets/app-store-qA41k1iG.js
vendored
Normal file
17
dist/assets/app-store-qA41k1iG.js
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
import{b as t}from"./index-Cr5N_0pd.js";const e=t`
|
||||
<svg width="36" height="36">
|
||||
<path
|
||||
d="M28.724 0H7.271A7.269 7.269 0 0 0 0 7.272v21.46A7.268 7.268 0 0 0 7.271 36H28.73A7.272 7.272 0 0 0 36 28.728V7.272A7.275 7.275 0 0 0 28.724 0Z"
|
||||
fill="url(#a)"
|
||||
/>
|
||||
<path
|
||||
d="m17.845 8.271.729-1.26a1.64 1.64 0 1 1 2.843 1.638l-7.023 12.159h5.08c1.646 0 2.569 1.935 1.853 3.276H6.434a1.632 1.632 0 0 1-1.638-1.638c0-.909.73-1.638 1.638-1.638h4.176l5.345-9.265-1.67-2.898a1.642 1.642 0 0 1 2.844-1.638l.716 1.264Zm-6.317 17.5-1.575 2.732a1.64 1.64 0 1 1-2.844-1.638l1.17-2.025c1.323-.41 2.398-.095 3.249.931Zm13.56-4.954h4.262c.909 0 1.638.729 1.638 1.638 0 .909-.73 1.638-1.638 1.638h-2.367l1.597 2.772c.45.788.185 1.782-.602 2.241a1.642 1.642 0 0 1-2.241-.603c-2.69-4.666-4.711-8.159-6.052-10.485-1.372-2.367-.391-4.743.576-5.549 1.075 1.846 2.682 4.631 4.828 8.348Z"
|
||||
fill="#fff"
|
||||
/>
|
||||
<defs>
|
||||
<linearGradient id="a" x1="18" y1="0" x2="18" y2="36" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#18BFFB" />
|
||||
<stop offset="1" stop-color="#2072F3" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>`;export{e as appStoreSvg};
|
||||
18
dist/assets/apple-B3teXytZ.js
vendored
Normal file
18
dist/assets/apple-B3teXytZ.js
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const f=l`<svg fill="none" viewBox="0 0 40 40">
|
||||
<g clip-path="url(#a)">
|
||||
<g clip-path="url(#b)">
|
||||
<circle cx="20" cy="19.89" r="20" fill="#000" />
|
||||
<g clip-path="url(#c)">
|
||||
<path
|
||||
fill="#fff"
|
||||
d="M28.77 23.3c-.69 1.99-2.75 5.52-4.87 5.56-1.4.03-1.86-.84-3.46-.84-1.61 0-2.12.81-3.45.86-2.25.1-5.72-5.1-5.72-9.62 0-4.15 2.9-6.2 5.42-6.25 1.36-.02 2.64.92 3.47.92.83 0 2.38-1.13 4.02-.97.68.03 2.6.28 3.84 2.08-3.27 2.14-2.76 6.61.75 8.25ZM24.2 7.88c-2.47.1-4.49 2.69-4.2 4.84 2.28.17 4.47-2.39 4.2-4.84Z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
|
||||
<clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
|
||||
<clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
|
||||
</defs>
|
||||
</svg>`;export{f as appleSvg};
|
||||
8
dist/assets/arrow-bottom-C7NMSF0g.js
vendored
Normal file
8
dist/assets/arrow-bottom-C7NMSF0g.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as o}from"./index-Cr5N_0pd.js";const e=o`<svg fill="none" viewBox="0 0 14 15">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M7 1.99a1 1 0 0 1 1 1v7.58l2.46-2.46a1 1 0 0 1 1.41 1.42L7.7 13.69a1 1 0 0 1-1.41 0L2.12 9.53A1 1 0 0 1 3.54 8.1L6 10.57V3a1 1 0 0 1 1-1Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{e as arrowBottomSvg};
|
||||
11
dist/assets/arrow-bottom-circle-Bo8O7JgA.js
vendored
Normal file
11
dist/assets/arrow-bottom-circle-Bo8O7JgA.js
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
import{b as C}from"./index-Cr5N_0pd.js";const e=C`<svg
|
||||
fill="none"
|
||||
viewBox="0 0 21 20"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M10.5 2.42908C6.31875 2.42908 2.92859 5.81989 2.92859 10.0034C2.92859 14.1869 6.31875 17.5777 10.5 17.5777C14.6813 17.5777 18.0714 14.1869 18.0714 10.0034C18.0714 5.81989 14.6813 2.42908 10.5 2.42908ZM0.928589 10.0034C0.928589 4.71596 5.21355 0.429077 10.5 0.429077C15.7865 0.429077 20.0714 4.71596 20.0714 10.0034C20.0714 15.2908 15.7865 19.5777 10.5 19.5777C5.21355 19.5777 0.928589 15.2908 0.928589 10.0034ZM10.5 5.75003C11.0523 5.75003 11.5 6.19774 11.5 6.75003L11.5 10.8343L12.7929 9.54137C13.1834 9.15085 13.8166 9.15085 14.2071 9.54137C14.5976 9.9319 14.5976 10.5651 14.2071 10.9556L11.2071 13.9556C10.8166 14.3461 10.1834 14.3461 9.79291 13.9556L6.79291 10.9556C6.40239 10.5651 6.40239 9.9319 6.79291 9.54137C7.18343 9.15085 7.8166 9.15085 8.20712 9.54137L9.50002 10.8343L9.50002 6.75003C9.50002 6.19774 9.94773 5.75003 10.5 5.75003Z"
|
||||
clip-rule="evenodd"
|
||||
/></svg
|
||||
>`;export{e as arrowBottomCircleSvg};
|
||||
8
dist/assets/arrow-left-DFwUccrs.js
vendored
Normal file
8
dist/assets/arrow-left-DFwUccrs.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as e}from"./index-Cr5N_0pd.js";const o=e`<svg fill="none" viewBox="0 0 14 15">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M13 7.99a1 1 0 0 1-1 1H4.4l2.46 2.46a1 1 0 1 1-1.41 1.41L1.29 8.7a1 1 0 0 1 0-1.41L5.46 3.1a1 1 0 0 1 1.41 1.42L4.41 6.99H12a1 1 0 0 1 1 1Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{o as arrowLeftSvg};
|
||||
8
dist/assets/arrow-right-2iACcb0n.js
vendored
Normal file
8
dist/assets/arrow-right-2iACcb0n.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const e=l`<svg fill="none" viewBox="0 0 14 15">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M1 7.99a1 1 0 0 1 1-1h7.58L7.12 4.53A1 1 0 1 1 8.54 3.1l4.16 4.17a1 1 0 0 1 0 1.41l-4.16 4.17a1 1 0 1 1-1.42-1.41l2.46-2.46H2a1 1 0 0 1-1-1Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{e as arrowRightSvg};
|
||||
8
dist/assets/arrow-top-BtzNMuue.js
vendored
Normal file
8
dist/assets/arrow-top-BtzNMuue.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as o}from"./index-Cr5N_0pd.js";const e=o`<svg fill="none" viewBox="0 0 14 15">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M7 13.99a1 1 0 0 1-1-1V5.4L3.54 7.86a1 1 0 0 1-1.42-1.41L6.3 2.28a1 1 0 0 1 1.41 0l4.17 4.17a1 1 0 1 1-1.41 1.41L8 5.4v7.59a1 1 0 0 1-1 1Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{e as arrowTopSvg};
|
||||
14
dist/assets/bank-DPwf5DsI.js
vendored
Normal file
14
dist/assets/bank-DPwf5DsI.js
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
import{b as e}from"./index-Cr5N_0pd.js";const o=e`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="12"
|
||||
height="13"
|
||||
viewBox="0 0 12 13"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M5.61391 1.57124C5.85142 1.42873 6.14813 1.42873 6.38564 1.57124L11.0793 4.38749C11.9179 4.89067 11.5612 6.17864 10.5832 6.17864H9.96398V10.0358H10.2854C10.6996 10.0358 11.0354 10.3716 11.0354 10.7858C11.0354 11.2 10.6996 11.5358 10.2854 11.5358H1.71416C1.29995 11.5358 0.964172 11.2 0.964172 10.7858C0.964172 10.3716 1.29995 10.0358 1.71416 10.0358H2.03558L2.03558 6.17864H1.41637C0.438389 6.17864 0.0816547 4.89066 0.920263 4.38749L5.61391 1.57124ZM3.53554 6.17864V10.0358H5.24979V6.17864H3.53554ZM6.74976 6.17864V10.0358H8.46401V6.17864H6.74976ZM8.64913 4.67864H3.35043L5.99978 3.089L8.64913 4.67864Z"
|
||||
fill="currentColor"
|
||||
/></svg
|
||||
>`;export{o as bankSvg};
|
||||
4
dist/assets/bin-BshwV3dZ.js
vendored
Normal file
4
dist/assets/bin-BshwV3dZ.js
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import{b as C}from"./index-Cr5N_0pd.js";const o=C`<svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.90029 1.71429C4.09883 0.736183 4.96358 0 6.00028 0C7.03698 0 7.90173 0.736183 8.10027 1.71429H9.41533C9.42361 1.71417 9.4319 1.71417 9.44022 1.71429H10.286C10.7594 1.71429 11.1431 2.09804 11.1431 2.57143C11.1431 3.04482 10.7594 3.42857 10.286 3.42857H10.1855L9.73675 7.01877C9.6785 7.48493 9.6279 7.88983 9.55601 8.22075C9.47948 8.57304 9.36472 8.91574 9.13613 9.22925C8.91553 9.53181 8.63151 9.78254 8.30392 9.96392C7.96448 10.1519 7.61019 10.2232 7.25112 10.2555C6.91385 10.2858 6.50581 10.2857 6.03603 10.2857H5.96453C5.49475 10.2857 5.08671 10.2858 4.74944 10.2555C4.39037 10.2232 4.03608 10.1519 3.69664 9.96392C3.36905 9.78254 3.08503 9.53181 2.86442 9.22925C2.63583 8.91574 2.52108 8.57304 2.44455 8.22075C2.37266 7.88984 2.32206 7.48496 2.26382 7.0188L1.81504 3.42857H1.71456C1.24118 3.42857 0.857422 3.04482 0.857422 2.57143C0.857422 2.09804 1.24118 1.71429 1.71456 1.71429H2.56034C2.56866 1.71417 2.57695 1.71417 2.58522 1.71429H3.90029ZM3.54266 3.42857L3.96043 6.77068C4.02441 7.2825 4.06617 7.61016 4.11976 7.85681C4.17051 8.09045 4.21726 8.17492 4.2496 8.21928C4.32314 8.32013 4.41781 8.4037 4.52701 8.46416C4.57504 8.49076 4.66465 8.52666 4.90278 8.54805C5.15417 8.57063 5.48448 8.57143 6.00028 8.57143C6.51608 8.57143 6.84638 8.57063 7.09778 8.54805C7.33591 8.52666 7.42552 8.49076 7.47355 8.46416C7.58275 8.4037 7.67742 8.32013 7.75096 8.21928C7.7833 8.17491 7.83005 8.09045 7.8808 7.85681C7.93439 7.61016 7.97615 7.2825 8.04013 6.77068L8.4579 3.42857H3.54266Z" fill="currentColor"/>
|
||||
</svg>
|
||||
`;export{o as binSvg};
|
||||
13
dist/assets/bitcoin-M-S4Gfjc.js
vendored
Normal file
13
dist/assets/bitcoin-M-S4Gfjc.js
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
import{b as L}from"./index-Cr5N_0pd.js";const i=L`
|
||||
<svg width="13" height="12" viewBox="0 0 13 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_24458_3947)">
|
||||
<path d="M12.6542 7.45143C11.8528 10.6657 8.59691 12.6219 5.38191 11.8204C2.16827 11.019 0.211924 7.76324 1.01369 4.54918C1.81476 1.33451 5.07063 -0.621803 8.28463 0.17954C11.4994 0.980884 13.4556 4.23702 12.6541 7.45149L12.6542 7.45143H12.6542Z" fill="var(--wui-color-gray-glass-005)"/>
|
||||
<path d="M9.48002 5.14517C9.59946 4.3467 8.9915 3.91749 8.16017 3.63117L8.42986 2.54957L7.7714 2.38551L7.50886 3.43863C7.33576 3.39546 7.15799 3.35479 6.9813 3.31446L7.24574 2.25439L6.58769 2.09033L6.31786 3.17158C6.17461 3.13896 6.03391 3.10673 5.89741 3.07277L5.89817 3.06937L4.99014 2.84264L4.81498 3.54585C4.81498 3.54585 5.3035 3.65783 5.29321 3.66472C5.55985 3.73126 5.60807 3.90775 5.60006 4.04765L5.29286 5.27984C5.31122 5.2845 5.33503 5.29125 5.36131 5.3018C5.33935 5.29635 5.31597 5.2904 5.29171 5.28459L4.86112 7.01072C4.82853 7.09172 4.74582 7.21328 4.5594 7.16712C4.566 7.17668 4.08082 7.0477 4.08082 7.0477L3.75391 7.80135L4.61079 8.01495C4.77019 8.05492 4.92641 8.09674 5.08024 8.13607L4.80777 9.23007L5.46547 9.39413L5.7353 8.31174C5.91498 8.36051 6.08935 8.4055 6.26005 8.44791L5.99112 9.52519L6.64961 9.68925L6.92206 8.5973C8.04487 8.80978 8.88914 8.72411 9.2445 7.70862C9.53085 6.89103 9.23025 6.41944 8.63954 6.11192C9.06978 6.0127 9.39385 5.72975 9.48026 5.14525L9.48005 5.14511L9.48002 5.14517ZM7.9756 7.25457C7.7721 8.07216 6.39541 7.6302 5.94906 7.51937L6.31064 6.07001C6.75696 6.18142 8.18827 6.40191 7.97562 7.25457H7.9756ZM8.17923 5.13332C7.9936 5.877 6.84776 5.49918 6.47606 5.40653L6.80389 4.09205C7.17559 4.18469 8.37261 4.35761 8.17929 5.13332H8.17923Z" fill="var(--wui-color-gray-glass-090)"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_24458_3947">
|
||||
<rect width="11.9997" height="12" fill="white" transform="translate(0.833984)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
`;export{i as bitcoinSvg};
|
||||
14
dist/assets/browser-CC3et0uk.js
vendored
Normal file
14
dist/assets/browser-CC3et0uk.js
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const a=l`<svg fill="none" viewBox="0 0 20 20">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M4 6.4a1 1 0 0 1-.46.89 6.98 6.98 0 0 0 .38 6.18A7 7 0 0 0 16.46 7.3a1 1 0 0 1-.47-.92 7 7 0 0 0-12 .03Zm-2.02-.5a9 9 0 1 1 16.03 8.2A9 9 0 0 1 1.98 5.9Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M6.03 8.63c-1.46-.3-2.72-.75-3.6-1.35l-.02-.01-.14-.11a1 1 0 0 1 1.2-1.6l.1.08c.6.4 1.52.74 2.69 1 .16-.99.39-1.88.67-2.65.3-.79.68-1.5 1.15-2.02A2.58 2.58 0 0 1 9.99 1c.8 0 1.45.44 1.92.97.47.52.84 1.23 1.14 2.02.29.77.52 1.66.68 2.64a8 8 0 0 0 2.7-1l.26-.18h.48a1 1 0 0 1 .12 2c-.86.51-2.01.91-3.34 1.18a22.24 22.24 0 0 1-.03 3.19c1.45.29 2.7.73 3.58 1.31a1 1 0 0 1-1.1 1.68c-.6-.4-1.56-.76-2.75-1-.15.8-.36 1.55-.6 2.2-.3.79-.67 1.5-1.14 2.02-.47.53-1.12.97-1.92.97-.8 0-1.45-.44-1.91-.97a6.51 6.51 0 0 1-1.15-2.02c-.24-.65-.44-1.4-.6-2.2-1.18.24-2.13.6-2.73.99a1 1 0 1 1-1.1-1.67c.88-.58 2.12-1.03 3.57-1.31a22.03 22.03 0 0 1-.04-3.2Zm2.2-1.7c.15-.86.34-1.61.58-2.24.24-.65.51-1.12.76-1.4.25-.28.4-.29.42-.29.03 0 .17.01.42.3.25.27.52.74.77 1.4.23.62.43 1.37.57 2.22a19.96 19.96 0 0 1-3.52 0Zm-.18 4.6a20.1 20.1 0 0 1-.03-2.62 21.95 21.95 0 0 0 3.94 0 20.4 20.4 0 0 1-.03 2.63 21.97 21.97 0 0 0-3.88 0Zm.27 2c.13.66.3 1.26.49 1.78.24.65.51 1.12.76 1.4.25.28.4.29.42.29.03 0 .17-.01.42-.3.25-.27.52-.74.77-1.4.19-.5.36-1.1.49-1.78a20.03 20.03 0 0 0-3.35 0Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{a as browserSvg};
|
||||
14
dist/assets/card-9KwzYBwi.js
vendored
Normal file
14
dist/assets/card-9KwzYBwi.js
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
import{b as C}from"./index-Cr5N_0pd.js";const l=C`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="12"
|
||||
height="13"
|
||||
viewBox="0 0 12 13"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M4.16072 2C4.17367 2 4.18665 2 4.19968 2L7.83857 2C8.36772 1.99998 8.82398 1.99996 9.19518 2.04018C9.5895 2.0829 9.97577 2.17811 10.3221 2.42971C10.5131 2.56849 10.6811 2.73647 10.8198 2.92749C11.0714 3.27379 11.1666 3.66007 11.2094 4.0544C11.2496 4.42561 11.2496 4.88188 11.2495 5.41105V7.58896C11.2496 8.11812 11.2496 8.57439 11.2094 8.94561C11.1666 9.33994 11.0714 9.72621 10.8198 10.0725C10.6811 10.2635 10.5131 10.4315 10.3221 10.5703C9.97577 10.8219 9.5895 10.9171 9.19518 10.9598C8.82398 11 8.36772 11 7.83856 11H4.16073C3.63157 11 3.17531 11 2.80411 10.9598C2.40979 10.9171 2.02352 10.8219 1.67722 10.5703C1.48621 10.4315 1.31824 10.2635 1.17946 10.0725C0.927858 9.72621 0.832652 9.33994 0.78993 8.94561C0.749713 8.5744 0.749733 8.11813 0.749757 7.58896L0.749758 5.45C0.749758 5.43697 0.749758 5.42399 0.749757 5.41104C0.749733 4.88188 0.749713 4.42561 0.78993 4.0544C0.832652 3.66007 0.927858 3.27379 1.17946 2.92749C1.31824 2.73647 1.48621 2.56849 1.67722 2.42971C2.02352 2.17811 2.40979 2.0829 2.80411 2.04018C3.17531 1.99996 3.63157 1.99998 4.16072 2ZM2.96567 3.53145C2.69897 3.56034 2.60687 3.60837 2.55888 3.64324C2.49521 3.6895 2.43922 3.74549 2.39296 3.80916C2.35809 3.85715 2.31007 3.94926 2.28117 4.21597C2.26629 4.35335 2.25844 4.51311 2.25431 4.70832H9.74498C9.74085 4.51311 9.733 4.35335 9.71812 4.21597C9.68922 3.94926 9.6412 3.85715 9.60633 3.80916C9.56007 3.74549 9.50408 3.6895 9.44041 3.64324C9.39242 3.60837 9.30031 3.56034 9.03362 3.53145C8.75288 3.50103 8.37876 3.5 7.79961 3.5H4.19968C3.62053 3.5 3.24641 3.50103 2.96567 3.53145ZM9.74956 6.20832H2.24973V7.55C2.24973 8.12917 2.25076 8.5033 2.28117 8.78404C2.31007 9.05074 2.35809 9.14285 2.39296 9.19084C2.43922 9.25451 2.49521 9.31051 2.55888 9.35677C2.60687 9.39163 2.69897 9.43966 2.96567 9.46856C3.24641 9.49897 3.62053 9.5 4.19968 9.5H7.79961C8.37876 9.5 8.75288 9.49897 9.03362 9.46856C9.30032 9.43966 9.39242 9.39163 9.44041 9.35677C9.50408 9.31051 9.56007 9.25451 9.60633 9.19084C9.6412 9.14285 9.68922 9.05075 9.71812 8.78404C9.74854 8.5033 9.74956 8.12917 9.74956 7.55V6.20832ZM6.74963 8C6.74963 7.58579 7.08541 7.25 7.49961 7.25H8.2496C8.6638 7.25 8.99958 7.58579 8.99958 8C8.99958 8.41422 8.6638 8.75 8.2496 8.75H7.49961C7.08541 8.75 6.74963 8.41422 6.74963 8Z"
|
||||
fill="currentColor"
|
||||
/></svg
|
||||
>`;export{l as cardSvg};
|
||||
1
dist/assets/ccip-CSxoh1Sw.js
vendored
Normal file
1
dist/assets/ccip-CSxoh1Sw.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
import{B as p,f as y,s as w,h as k,j as b,l as L,k as O,m as R,o as E,p as x,H as m,q as M}from"./index-Cr5N_0pd.js";class q extends p{constructor({callbackSelector:s,cause:e,data:o,extraData:n,sender:c,urls:t}){super(e.shortMessage||"An error occurred while fetching for an offchain result.",{cause:e,metaMessages:[...e.metaMessages||[],e.metaMessages?.length?"":[],"Offchain Gateway Call:",t&&[" Gateway URL(s):",...t.map(i=>` ${y(i)}`)],` Sender: ${c}`,` Data: ${o}`,` Callback selector: ${s}`,` Extra data: ${n}`].flat(),name:"OffchainLookupError"})}}class S extends p{constructor({result:s,url:e}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${y(e)}`,`Response: ${w(s)}`],name:"OffchainLookupResponseMalformedError"})}}class $ extends p{constructor({sender:s,to:e}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${e}`,`OffchainLookup sender address: ${s}`],name:"OffchainLookupSenderMismatchError"})}}const A="0x556f1830",T={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function D(d,{blockNumber:s,blockTag:e,data:o,to:n}){const{args:c}=k({data:o,abi:[T]}),[t,i,l,a,r]=c,{ccipRead:f}=d,h=f&&typeof f?.request=="function"?f.request:C;try{if(!b(n,t))throw new $({sender:t,to:n});const u=i.includes(L)?await O({data:l,ccipRequest:h}):await h({data:l,sender:t,urls:i}),{data:g}=await R(d,{blockNumber:s,blockTag:e,data:E([a,x([{type:"bytes"},{type:"bytes"}],[u,r])]),to:n});return g}catch(u){throw new q({callbackSelector:a,cause:u,data:o,extraData:r,sender:t,urls:i})}}async function C({data:d,sender:s,urls:e}){let o=new Error("An unknown error occurred.");for(let n=0;n<e.length;n++){const c=e[n],t=c.includes("{data}")?"GET":"POST",i=t==="POST"?{data:d,sender:s}:void 0,l=t==="POST"?{"Content-Type":"application/json"}:{};try{const a=await fetch(c.replace("{sender}",s.toLowerCase()).replace("{data}",d),{body:JSON.stringify(i),headers:l,method:t});let r;if(a.headers.get("Content-Type")?.startsWith("application/json")?r=(await a.json()).data:r=await a.text(),!a.ok){o=new m({body:i,details:r?.error?w(r.error):a.statusText,headers:a.headers,status:a.status,url:c});continue}if(!M(r)){o=new S({result:r,url:c});continue}return r}catch(a){o=new m({body:i,details:a.message,url:c})}}throw o}export{C as ccipRequest,D as offchainLookup,T as offchainLookupAbiItem,A as offchainLookupSignature};
|
||||
11
dist/assets/checkmark-CDGh-jbz.js
vendored
Normal file
11
dist/assets/checkmark-CDGh-jbz.js
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
import{b as e}from"./index-Cr5N_0pd.js";const o=e`<svg
|
||||
width="28"
|
||||
height="28"
|
||||
viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M25.5297 4.92733C26.1221 5.4242 26.1996 6.30724 25.7027 6.89966L12.2836 22.8997C12.0316 23.2001 11.6652 23.3811 11.2735 23.3986C10.8817 23.4161 10.5006 23.2686 10.2228 22.9919L2.38218 15.1815C1.83439 14.6358 1.83268 13.7494 2.37835 13.2016C2.92403 12.6538 3.81046 12.6521 4.35825 13.1978L11.1183 19.9317L23.5573 5.10036C24.0542 4.50794 24.9372 4.43047 25.5297 4.92733Z"
|
||||
fill="currentColor"/>
|
||||
</svg>
|
||||
`;export{o as checkmarkSvg};
|
||||
8
dist/assets/checkmark-bold-DBpjkRrv.js
vendored
Normal file
8
dist/assets/checkmark-bold-DBpjkRrv.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as e}from"./index-Cr5N_0pd.js";const o=e`<svg fill="none" viewBox="0 0 14 14">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M12.9576 2.23383C13.3807 2.58873 13.4361 3.21947 13.0812 3.64263L6.37159 11.6426C6.19161 11.8572 5.92989 11.9865 5.65009 11.999C5.3703 12.0115 5.09808 11.9062 4.89965 11.7085L0.979321 7.80331C0.588042 7.41354 0.586817 6.78038 0.976585 6.3891C1.36635 5.99782 1.99952 5.99659 2.3908 6.38636L5.53928 9.52268L11.5488 2.35742C11.9037 1.93426 12.5344 1.87893 12.9576 2.23383Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{o as checkmarkBoldSvg};
|
||||
8
dist/assets/chevron-bottom-B9wx_mOd.js
vendored
Normal file
8
dist/assets/chevron-bottom-B9wx_mOd.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as o}from"./index-Cr5N_0pd.js";const e=o`<svg fill="none" viewBox="0 0 16 16">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M1.46 4.96a1 1 0 0 1 1.41 0L8 10.09l5.13-5.13a1 1 0 1 1 1.41 1.41l-5.83 5.84a1 1 0 0 1-1.42 0L1.46 6.37a1 1 0 0 1 0-1.41Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{e as chevronBottomSvg};
|
||||
8
dist/assets/chevron-left-nYdEcmRU.js
vendored
Normal file
8
dist/assets/chevron-left-nYdEcmRU.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as e}from"./index-Cr5N_0pd.js";const o=e`<svg fill="none" viewBox="0 0 16 16">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M11.04 1.46a1 1 0 0 1 0 1.41L5.91 8l5.13 5.13a1 1 0 1 1-1.41 1.41L3.79 8.71a1 1 0 0 1 0-1.42l5.84-5.83a1 1 0 0 1 1.41 0Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{o as chevronLeftSvg};
|
||||
8
dist/assets/chevron-right-BIvCTfn4.js
vendored
Normal file
8
dist/assets/chevron-right-BIvCTfn4.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const o=l`<svg fill="none" viewBox="0 0 16 16">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M4.96 14.54a1 1 0 0 1 0-1.41L10.09 8 4.96 2.87a1 1 0 0 1 1.41-1.41l5.84 5.83a1 1 0 0 1 0 1.42l-5.84 5.83a1 1 0 0 1-1.41 0Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{o as chevronRightSvg};
|
||||
8
dist/assets/chevron-top-D_T8NmSU.js
vendored
Normal file
8
dist/assets/chevron-top-D_T8NmSU.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const e=l`<svg fill="none" viewBox="0 0 16 16">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M14.54 11.04a1 1 0 0 1-1.41 0L8 5.92l-5.13 5.12a1 1 0 1 1-1.41-1.41l5.83-5.84a1 1 0 0 1 1.42 0l5.83 5.84a1 1 0 0 1 0 1.41Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{e as chevronTopSvg};
|
||||
61
dist/assets/chrome-store-DjKACh-G.js
vendored
Normal file
61
dist/assets/chrome-store-DjKACh-G.js
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
import{b as t}from"./index-Cr5N_0pd.js";const o=t`<svg width="36" height="36" fill="none">
|
||||
<path
|
||||
fill="#fff"
|
||||
fill-opacity=".05"
|
||||
d="M0 14.94c0-5.55 0-8.326 1.182-10.4a9 9 0 0 1 3.359-3.358C6.614 0 9.389 0 14.94 0h6.12c5.55 0 8.326 0 10.4 1.182a9 9 0 0 1 3.358 3.359C36 6.614 36 9.389 36 14.94v6.12c0 5.55 0 8.326-1.182 10.4a9 9 0 0 1-3.359 3.358C29.386 36 26.611 36 21.06 36h-6.12c-5.55 0-8.326 0-10.4-1.182a9 9 0 0 1-3.358-3.359C0 29.386 0 26.611 0 21.06v-6.12Z"
|
||||
/>
|
||||
<path
|
||||
stroke="#fff"
|
||||
stroke-opacity=".05"
|
||||
d="M14.94.5h6.12c2.785 0 4.84 0 6.46.146 1.612.144 2.743.43 3.691.97a8.5 8.5 0 0 1 3.172 3.173c.541.948.826 2.08.971 3.692.145 1.62.146 3.675.146 6.459v6.12c0 2.785 0 4.84-.146 6.46-.145 1.612-.43 2.743-.97 3.691a8.5 8.5 0 0 1-3.173 3.172c-.948.541-2.08.826-3.692.971-1.62.145-3.674.146-6.459.146h-6.12c-2.784 0-4.84 0-6.46-.146-1.612-.145-2.743-.43-3.691-.97a8.5 8.5 0 0 1-3.172-3.173c-.541-.948-.827-2.08-.971-3.692C.5 25.9.5 23.845.5 21.06v-6.12c0-2.784 0-4.84.146-6.46.144-1.612.43-2.743.97-3.691A8.5 8.5 0 0 1 4.79 1.617C5.737 1.076 6.869.79 8.48.646 10.1.5 12.156.5 14.94.5Z"
|
||||
/>
|
||||
<path
|
||||
fill="url(#a)"
|
||||
d="M17.998 10.8h12.469a14.397 14.397 0 0 0-24.938.001l6.234 10.798.006-.001a7.19 7.19 0 0 1 6.23-10.799Z"
|
||||
/>
|
||||
<path
|
||||
fill="url(#b)"
|
||||
d="m24.237 21.598-6.234 10.798A14.397 14.397 0 0 0 30.47 10.798H18.002l-.002.006a7.191 7.191 0 0 1 6.237 10.794Z"
|
||||
/>
|
||||
<path
|
||||
fill="url(#c)"
|
||||
d="M11.765 21.601 5.531 10.803A14.396 14.396 0 0 0 18.001 32.4l6.235-10.798-.004-.004a7.19 7.19 0 0 1-12.466.004Z"
|
||||
/>
|
||||
<path fill="#fff" d="M18 25.2a7.2 7.2 0 1 0 0-14.4 7.2 7.2 0 0 0 0 14.4Z" />
|
||||
<path fill="#1A73E8" d="M18 23.7a5.7 5.7 0 1 0 0-11.4 5.7 5.7 0 0 0 0 11.4Z" />
|
||||
<defs>
|
||||
<linearGradient
|
||||
id="a"
|
||||
x1="6.294"
|
||||
x2="41.1"
|
||||
y1="5.995"
|
||||
y2="5.995"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
>
|
||||
<stop stop-color="#D93025" />
|
||||
<stop offset="1" stop-color="#EA4335" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="b"
|
||||
x1="20.953"
|
||||
x2="37.194"
|
||||
y1="32.143"
|
||||
y2="2.701"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
>
|
||||
<stop stop-color="#FCC934" />
|
||||
<stop offset="1" stop-color="#FBBC04" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="c"
|
||||
x1="25.873"
|
||||
x2="9.632"
|
||||
y1="31.2"
|
||||
y2="1.759"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
>
|
||||
<stop stop-color="#1E8E3E" />
|
||||
<stop offset="1" stop-color="#34A853" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>`;export{o as chromeStoreSvg};
|
||||
4
dist/assets/circle-CMRf11j6.js
vendored
Normal file
4
dist/assets/circle-CMRf11j6.js
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import{b as i}from"./index-Cr5N_0pd.js";const t=i`<svg width="4" height="4" viewBox="0 0 4 4" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="2" cy="2" r="2" fill="white" fill-opacity="0.2"/>
|
||||
</svg>
|
||||
`;export{t as circleSvg};
|
||||
8
dist/assets/clock-Bu8fqLqw.js
vendored
Normal file
8
dist/assets/clock-Bu8fqLqw.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as C}from"./index-Cr5N_0pd.js";const l=C`<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M7.00235 2C4.24 2 2.00067 4.23858 2.00067 7C2.00067 9.76142 4.24 12 7.00235 12C9.7647 12 12.004 9.76142 12.004 7C12.004 4.23858 9.7647 2 7.00235 2ZM0 7C0 3.13401 3.13506 0 7.00235 0C10.8696 0 14.0047 3.13401 14.0047 7C14.0047 10.866 10.8696 14 7.00235 14C3.13506 14 0 10.866 0 7ZM7.00235 3C7.55482 3 8.00269 3.44771 8.00269 4V6.58579L9.85327 8.43575C10.2439 8.82627 10.2439 9.45944 9.85327 9.84996C9.46262 10.2405 8.82924 10.2405 8.43858 9.84996L6.29501 7.70711C6.10741 7.51957 6.00201 7.26522 6.00201 7V4C6.00201 3.44771 6.44988 3 7.00235 3Z"
|
||||
fill="currentColor"
|
||||
/>
|
||||
</svg>`;export{l as clockSvg};
|
||||
8
dist/assets/close-DkOqA3XA.js
vendored
Normal file
8
dist/assets/close-DkOqA3XA.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const o=l`<svg fill="none" viewBox="0 0 16 16">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M2.54 2.54a1 1 0 0 1 1.42 0L8 6.6l4.04-4.05a1 1 0 1 1 1.42 1.42L9.4 8l4.05 4.04a1 1 0 0 1-1.42 1.42L8 9.4l-4.04 4.05a1 1 0 0 1-1.42-1.42L6.6 8 2.54 3.96a1 1 0 0 1 0-1.42Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{o as closeSvg};
|
||||
8
dist/assets/coinPlaceholder-Bog9viJQ.js
vendored
Normal file
8
dist/assets/coinPlaceholder-Bog9viJQ.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const o=l`<svg fill="none" viewBox="0 0 20 20">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M10 3a7 7 0 0 0-6.85 8.44l8.29-8.3C10.97 3.06 10.49 3 10 3Zm3.49.93-9.56 9.56c.32.55.71 1.06 1.16 1.5L15 5.1a7.03 7.03 0 0 0-1.5-1.16Zm2.7 2.8-9.46 9.46a7 7 0 0 0 9.46-9.46ZM1.99 5.9A9 9 0 1 1 18 14.09 9 9 0 0 1 1.98 5.91Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{o as coinPlaceholderSvg};
|
||||
8
dist/assets/compass-k9qpYhtB.js
vendored
Normal file
8
dist/assets/compass-k9qpYhtB.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const e=l`<svg fill="none" viewBox="0 0 16 16">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm10.66-2.65a1 1 0 0 1 .23 1.06L9.83 9.24a1 1 0 0 1-.59.58l-2.83 1.06A1 1 0 0 1 5.13 9.6l1.06-2.82a1 1 0 0 1 .58-.59L9.6 5.12a1 1 0 0 1 1.06.23ZM7.9 7.89l-.13.35.35-.13.12-.35-.34.13Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{e as compassSvg};
|
||||
15
dist/assets/copy-CrR_vPRD.js
vendored
Normal file
15
dist/assets/copy-CrR_vPRD.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
import{b as C}from"./index-Cr5N_0pd.js";const o=C`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 16 16"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M9.21498 1.28565H10.5944C11.1458 1.28562 11.6246 1.2856 12.0182 1.32093C12.4353 1.35836 12.853 1.44155 13.2486 1.66724C13.7005 1.92498 14.0749 2.29935 14.3326 2.75122C14.5583 3.14689 14.6415 3.56456 14.6789 3.9817C14.7143 4.37531 14.7142 4.85403 14.7142 5.40545V6.78489C14.7142 7.33631 14.7143 7.81503 14.6789 8.20865C14.6415 8.62578 14.5583 9.04345 14.3326 9.43912C14.0749 9.89099 13.7005 10.2654 13.2486 10.5231C12.853 10.7488 12.4353 10.832 12.0182 10.8694C11.7003 10.8979 11.3269 10.9034 10.9045 10.9045C10.9034 11.3269 10.8979 11.7003 10.8694 12.0182C10.832 12.4353 10.7488 12.853 10.5231 13.2486C10.2654 13.7005 9.89099 14.0749 9.43912 14.3326C9.04345 14.5583 8.62578 14.6415 8.20865 14.6789C7.81503 14.7143 7.33631 14.7142 6.78489 14.7142H5.40545C4.85403 14.7142 4.37531 14.7143 3.9817 14.6789C3.56456 14.6415 3.14689 14.5583 2.75122 14.3326C2.29935 14.0749 1.92498 13.7005 1.66724 13.2486C1.44155 12.853 1.35836 12.4353 1.32093 12.0182C1.2856 11.6246 1.28562 11.1458 1.28565 10.5944V9.21498C1.28562 8.66356 1.2856 8.18484 1.32093 7.79122C1.35836 7.37409 1.44155 6.95642 1.66724 6.56074C1.92498 6.10887 2.29935 5.73451 2.75122 5.47677C3.14689 5.25108 3.56456 5.16789 3.9817 5.13045C4.2996 5.10192 4.67301 5.09645 5.09541 5.09541C5.09645 4.67302 5.10192 4.2996 5.13045 3.9817C5.16789 3.56456 5.25108 3.14689 5.47676 2.75122C5.73451 2.29935 6.10887 1.92498 6.56074 1.66724C6.95642 1.44155 7.37409 1.35836 7.79122 1.32093C8.18484 1.2856 8.66356 1.28562 9.21498 1.28565ZM5.09541 7.09552C4.68397 7.09667 4.39263 7.10161 4.16046 7.12245C3.88053 7.14757 3.78516 7.18949 3.74214 7.21403C3.60139 7.29431 3.48478 7.41091 3.4045 7.55166C3.37997 7.59468 3.33804 7.69005 3.31292 7.96999C3.28659 8.26345 3.28565 8.65147 3.28565 9.25708V10.5523C3.28565 11.1579 3.28659 11.5459 3.31292 11.8394C3.33804 12.1193 3.37997 12.2147 3.4045 12.2577C3.48478 12.3985 3.60139 12.5151 3.74214 12.5954C3.78516 12.6199 3.88053 12.6618 4.16046 12.6869C4.45393 12.7133 4.84195 12.7142 5.44755 12.7142H6.74279C7.3484 12.7142 7.73641 12.7133 8.02988 12.6869C8.30981 12.6618 8.40518 12.6199 8.44821 12.5954C8.58895 12.5151 8.70556 12.3985 8.78584 12.2577C8.81038 12.2147 8.8523 12.1193 8.87742 11.8394C8.89825 11.6072 8.90319 11.3159 8.90435 10.9045C8.48219 10.9034 8.10898 10.8979 7.79122 10.8694C7.37409 10.832 6.95641 10.7488 6.56074 10.5231C6.10887 10.2654 5.73451 9.89099 5.47676 9.43912C5.25108 9.04345 5.16789 8.62578 5.13045 8.20865C5.10194 7.89089 5.09645 7.51767 5.09541 7.09552ZM7.96999 3.31292C7.69005 3.33804 7.59468 3.37997 7.55166 3.4045C7.41091 3.48478 7.29431 3.60139 7.21403 3.74214C7.18949 3.78516 7.14757 3.88053 7.12245 4.16046C7.09611 4.45393 7.09517 4.84195 7.09517 5.44755V6.74279C7.09517 7.3484 7.09611 7.73641 7.12245 8.02988C7.14757 8.30981 7.18949 8.40518 7.21403 8.4482C7.29431 8.58895 7.41091 8.70556 7.55166 8.78584C7.59468 8.81038 7.69005 8.8523 7.96999 8.87742C8.26345 8.90376 8.65147 8.9047 9.25708 8.9047H10.5523C11.1579 8.9047 11.5459 8.90376 11.8394 8.87742C12.1193 8.8523 12.2147 8.81038 12.2577 8.78584C12.3985 8.70556 12.5151 8.58895 12.5954 8.4482C12.6199 8.40518 12.6618 8.30981 12.6869 8.02988C12.7133 7.73641 12.7142 7.3484 12.7142 6.74279V5.44755C12.7142 4.84195 12.7133 4.45393 12.6869 4.16046C12.6618 3.88053 12.6199 3.78516 12.5954 3.74214C12.5151 3.60139 12.3985 3.48478 12.2577 3.4045C12.2147 3.37997 12.1193 3.33804 11.8394 3.31292C11.5459 3.28659 11.1579 3.28565 10.5523 3.28565H9.25708C8.65147 3.28565 8.26345 3.28659 7.96999 3.31292Z"
|
||||
fill="#788181"
|
||||
/></svg
|
||||
>`;export{o as copySvg};
|
||||
3
dist/assets/cursor-B5zA10jJ.js
vendored
Normal file
3
dist/assets/cursor-B5zA10jJ.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import{b as o}from"./index-Cr5N_0pd.js";const l=o` <svg fill="none" viewBox="0 0 13 4">
|
||||
<path fill="currentColor" d="M.5 0h12L8.9 3.13a3.76 3.76 0 0 1-4.8 0L.5 0Z" />
|
||||
</svg>`;export{l as cursorSvg};
|
||||
12
dist/assets/cursor-transparent-8xgUPsqN.js
vendored
Normal file
12
dist/assets/cursor-transparent-8xgUPsqN.js
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import{b as o}from"./index-Cr5N_0pd.js";const l=o`<svg fill="none" viewBox="0 0 14 6">
|
||||
<path style="fill: var(--wui-color-bg-150);" d="M0 1h14L9.21 5.12a3.31 3.31 0 0 1-4.49 0L0 1Z" />
|
||||
<path
|
||||
style="stroke: var(--wui-color-inverse-100);"
|
||||
stroke-opacity=".05"
|
||||
d="M1.33 1.5h11.32L8.88 4.75l-.01.01a2.81 2.81 0 0 1-3.8 0l-.02-.01L1.33 1.5Z"
|
||||
/>
|
||||
<path
|
||||
style="fill: var(--wui-color-bg-150);"
|
||||
d="M1.25.71h11.5L9.21 3.88a3.31 3.31 0 0 1-4.49 0L1.25.71Z"
|
||||
/>
|
||||
</svg> `;export{l as cursorTransparentSvg};
|
||||
9
dist/assets/desktop-CW7qCBPc.js
vendored
Normal file
9
dist/assets/desktop-CW7qCBPc.js
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import{b as c}from"./index-Cr5N_0pd.js";const l=c`<svg fill="none" viewBox="0 0 20 20">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M13.66 2H6.34c-1.07 0-1.96 0-2.68.08-.74.08-1.42.25-2.01.68a4 4 0 0 0-.89.89c-.43.6-.6 1.27-.68 2.01C0 6.38 0 7.26 0 8.34v.89c0 1.07 0 1.96.08 2.68.08.74.25 1.42.68 2.01a4 4 0 0 0 .89.89c.6.43 1.27.6 2.01.68a27 27 0 0 0 2.68.08h7.32a27 27 0 0 0 2.68-.08 4.03 4.03 0 0 0 2.01-.68 4 4 0 0 0 .89-.89c.43-.6.6-1.27.68-2.01.08-.72.08-1.6.08-2.68v-.89c0-1.07 0-1.96-.08-2.68a4.04 4.04 0 0 0-.68-2.01 4 4 0 0 0-.89-.89c-.6-.43-1.27-.6-2.01-.68C15.62 2 14.74 2 13.66 2ZM2.82 4.38c.2-.14.48-.25 1.06-.31C4.48 4 5.25 4 6.4 4h7.2c1.15 0 1.93 0 2.52.07.58.06.86.17 1.06.31a2 2 0 0 1 .44.44c.14.2.25.48.31 1.06.07.6.07 1.37.07 2.52v.77c0 1.15 0 1.93-.07 2.52-.06.58-.17.86-.31 1.06a2 2 0 0 1-.44.44c-.2.14-.48.25-1.06.32-.6.06-1.37.06-2.52.06H6.4c-1.15 0-1.93 0-2.52-.06-.58-.07-.86-.18-1.06-.32a2 2 0 0 1-.44-.44c-.14-.2-.25-.48-.31-1.06C2 11.1 2 10.32 2 9.17V8.4c0-1.15 0-1.93.07-2.52.06-.58.17-.86.31-1.06a2 2 0 0 1 .44-.44Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
<path fill="currentColor" d="M6.14 17.57a1 1 0 1 0 0 2h7.72a1 1 0 1 0 0-2H6.14Z" />
|
||||
</svg>`;export{l as desktopSvg};
|
||||
8
dist/assets/disconnect-DzbPXgkg.js
vendored
Normal file
8
dist/assets/disconnect-DzbPXgkg.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as a}from"./index-Cr5N_0pd.js";const e=a`<svg fill="none" viewBox="0 0 16 16">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M6.07 1h.57a1 1 0 0 1 0 2h-.52c-.98 0-1.64 0-2.14.06-.48.05-.7.14-.84.24-.13.1-.25.22-.34.35-.1.14-.2.35-.25.83-.05.5-.05 1.16-.05 2.15v2.74c0 .99 0 1.65.05 2.15.05.48.14.7.25.83.1.14.2.25.34.35.14.1.36.2.84.25.5.05 1.16.05 2.14.05h.52a1 1 0 0 1 0 2h-.57c-.92 0-1.69 0-2.3-.07a3.6 3.6 0 0 1-1.8-.61c-.3-.22-.57-.49-.8-.8a3.6 3.6 0 0 1-.6-1.79C.5 11.11.5 10.35.5 9.43V6.58c0-.92 0-1.7.06-2.31a3.6 3.6 0 0 1 .62-1.8c.22-.3.48-.57.79-.79a3.6 3.6 0 0 1 1.8-.61C4.37 1 5.14 1 6.06 1ZM9.5 3a1 1 0 0 1 1.42 0l4.28 4.3a1 1 0 0 1 0 1.4L10.93 13a1 1 0 0 1-1.42-1.42L12.1 9H6.8a1 1 0 1 1 0-2h5.3L9.51 4.42a1 1 0 0 1 0-1.41Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{e as disconnectSvg};
|
||||
17
dist/assets/discord-CPs1H_Zj.js
vendored
Normal file
17
dist/assets/discord-CPs1H_Zj.js
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const i=l`<svg fill="none" viewBox="0 0 40 40">
|
||||
<g clip-path="url(#a)">
|
||||
<g clip-path="url(#b)">
|
||||
<circle cx="20" cy="19.89" r="20" fill="#5865F2" />
|
||||
<path
|
||||
fill="#fff"
|
||||
fill-rule="evenodd"
|
||||
d="M25.71 28.15C30.25 28 32 25.02 32 25.02c0-6.61-2.96-11.98-2.96-11.98-2.96-2.22-5.77-2.15-5.77-2.15l-.29.32c3.5 1.07 5.12 2.61 5.12 2.61a16.75 16.75 0 0 0-10.34-1.93l-.35.04a15.43 15.43 0 0 0-5.88 1.9s1.71-1.63 5.4-2.7l-.2-.24s-2.81-.07-5.77 2.15c0 0-2.96 5.37-2.96 11.98 0 0 1.73 2.98 6.27 3.13l1.37-1.7c-2.6-.79-3.6-2.43-3.6-2.43l.58.35.09.06.08.04.02.01.08.05a17.25 17.25 0 0 0 4.52 1.58 14.4 14.4 0 0 0 8.3-.86c.72-.27 1.52-.66 2.37-1.21 0 0-1.03 1.68-3.72 2.44.61.78 1.35 1.67 1.35 1.67Zm-9.55-9.6c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28.01-1.25-.93-2.28-2.1-2.28Zm7.5 0c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28 0-1.25-.93-2.28-2.1-2.28Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
|
||||
<clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
|
||||
</defs>
|
||||
</svg>`;export{i as discordSvg};
|
||||
237
dist/assets/email-OHUMhOV6.js
vendored
Normal file
237
dist/assets/email-OHUMhOV6.js
vendored
Normal file
@ -0,0 +1,237 @@
|
||||
import{i as b,a3 as U,a4 as M,a5 as I,c as d,a as v,x as u,aa as m,a7 as P,d3 as R,T as l,O as h,L as C,R as f,K as V,$ as N,aj as y,a0 as c,ap as L,ay as B,aA as H,aw as q,Q as K}from"./index-Cr5N_0pd.js";const G=b`
|
||||
:host {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background: var(--wui-color-gray-glass-010);
|
||||
border-radius: var(--wui-border-radius-xs);
|
||||
border: 1px solid var(--wui-color-gray-glass-005);
|
||||
font-family: var(--wui-font-family);
|
||||
font-size: var(--wui-font-size-large);
|
||||
font-weight: var(--wui-font-weight-regular);
|
||||
letter-spacing: var(--wui-letter-spacing-large);
|
||||
text-align: center;
|
||||
color: var(--wui-color-fg-100);
|
||||
caret-color: var(--wui-color-accent-100);
|
||||
transition:
|
||||
background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
|
||||
border-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
|
||||
box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md);
|
||||
will-change: background-color, border-color, box-shadow;
|
||||
box-sizing: border-box;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: textfield;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
input::-webkit-outer-spin-button,
|
||||
input::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
input[type='number'] {
|
||||
-moz-appearance: textfield;
|
||||
}
|
||||
|
||||
input:disabled {
|
||||
cursor: not-allowed;
|
||||
border: 1px solid var(--wui-color-gray-glass-010);
|
||||
background: var(--wui-color-gray-glass-005);
|
||||
}
|
||||
|
||||
input:focus:enabled {
|
||||
background-color: var(--wui-color-gray-glass-015);
|
||||
border: 1px solid var(--wui-color-accent-100);
|
||||
-webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
|
||||
-moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
|
||||
box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
|
||||
}
|
||||
|
||||
@media (hover: hover) and (pointer: fine) {
|
||||
input:hover:enabled {
|
||||
background-color: var(--wui-color-gray-glass-015);
|
||||
}
|
||||
}
|
||||
`;var S=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i};let g=class extends v{constructor(){super(...arguments),this.disabled=!1,this.value=""}render(){return u`<input
|
||||
type="number"
|
||||
maxlength="1"
|
||||
inputmode="numeric"
|
||||
autofocus
|
||||
?disabled=${this.disabled}
|
||||
value=${this.value}
|
||||
/> `}};g.styles=[U,M,G];S([I({type:Boolean})],g.prototype,"disabled",void 0);S([I({type:String})],g.prototype,"value",void 0);g=S([d("wui-input-numeric")],g);const Y=b`
|
||||
:host {
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
`;var O=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i};let w=class extends v{constructor(){super(...arguments),this.length=6,this.otp="",this.values=Array.from({length:this.length}).map(()=>""),this.numerics=[],this.shouldInputBeEnabled=e=>this.values.slice(0,e).every(n=>n!==""),this.handleKeyDown=(e,t)=>{const n=e.target,o=this.getInputElement(n),i=["ArrowLeft","ArrowRight","Shift","Delete"];if(!o)return;i.includes(e.key)&&e.preventDefault();const r=o.selectionStart;switch(e.key){case"ArrowLeft":r&&o.setSelectionRange(r+1,r+1),this.focusInputField("prev",t);break;case"ArrowRight":this.focusInputField("next",t);break;case"Shift":this.focusInputField("next",t);break;case"Delete":o.value===""?this.focusInputField("prev",t):this.updateInput(o,t,"");break;case"Backspace":o.value===""?this.focusInputField("prev",t):this.updateInput(o,t,"");break}},this.focusInputField=(e,t)=>{if(e==="next"){const n=t+1;if(!this.shouldInputBeEnabled(n))return;const o=this.numerics[n<this.length?n:t],i=o?this.getInputElement(o):void 0;i&&(i.disabled=!1,i.focus())}if(e==="prev"){const n=t-1,o=this.numerics[n>-1?n:t],i=o?this.getInputElement(o):void 0;i&&i.focus()}}}firstUpdated(){this.otp&&(this.values=this.otp.split(""));const e=this.shadowRoot?.querySelectorAll("wui-input-numeric");e&&(this.numerics=Array.from(e)),this.numerics[0]?.focus()}render(){return u`
|
||||
<wui-flex gap="xxs" data-testid="wui-otp-input">
|
||||
${Array.from({length:this.length}).map((e,t)=>u`
|
||||
<wui-input-numeric
|
||||
@input=${n=>this.handleInput(n,t)}
|
||||
@click=${n=>this.selectInput(n)}
|
||||
@keydown=${n=>this.handleKeyDown(n,t)}
|
||||
.disabled=${!this.shouldInputBeEnabled(t)}
|
||||
.value=${this.values[t]||""}
|
||||
>
|
||||
</wui-input-numeric>
|
||||
`)}
|
||||
</wui-flex>
|
||||
`}updateInput(e,t,n){const o=this.numerics[t],i=e||(o?this.getInputElement(o):void 0);i&&(i.value=n,this.values=this.values.map((r,s)=>s===t?n:r))}selectInput(e){const t=e.target;t&&this.getInputElement(t)?.select()}handleInput(e,t){const n=e.target,o=this.getInputElement(n);if(o){const i=o.value;e.inputType==="insertFromPaste"?this.handlePaste(o,i,t):P.isNumber(i)&&e.data?(this.updateInput(o,t,e.data),this.focusInputField("next",t)):this.updateInput(o,t,"")}this.dispatchInputChangeEvent()}handlePaste(e,t,n){const o=t[0];if(o&&P.isNumber(o)){this.updateInput(e,n,o);const r=t.substring(1);if(n+1<this.length&&r.length){const s=this.numerics[n+1],D=s?this.getInputElement(s):void 0;D&&this.handlePaste(D,r,n+1)}else this.focusInputField("next",n)}else this.updateInput(e,n,"")}getInputElement(e){return e.shadowRoot?.querySelector("input")?e.shadowRoot.querySelector("input"):null}dispatchInputChangeEvent(){const e=this.values.join("");this.dispatchEvent(new CustomEvent("inputChange",{detail:e,bubbles:!0,composed:!0}))}};w.styles=[U,Y];O([I({type:Number})],w.prototype,"length",void 0);O([I({type:String})],w.prototype,"otp",void 0);O([m()],w.prototype,"values",void 0);w=O([d("wui-otp")],w);const Q=b`
|
||||
wui-loading-spinner {
|
||||
margin: 9px auto;
|
||||
}
|
||||
|
||||
.email-display,
|
||||
.email-display wui-text {
|
||||
max-width: 100%;
|
||||
}
|
||||
`;var _=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i},T;let p=T=class extends v{firstUpdated(){this.startOTPTimeout()}disconnectedCallback(){clearTimeout(this.OTPTimeout)}constructor(){super(),this.loading=!1,this.timeoutTimeLeft=R.getTimeToNextEmailLogin(),this.error="",this.otp="",this.email=l.state.data?.email,this.authConnector=h.getAuthConnector()}render(){if(!this.email)throw new Error("w3m-email-otp-widget: No email provided");const e=!!this.timeoutTimeLeft,t=this.getFooterLabels(e);return u`
|
||||
<wui-flex
|
||||
flexDirection="column"
|
||||
alignItems="center"
|
||||
.padding=${["l","0","l","0"]}
|
||||
gap="l"
|
||||
>
|
||||
<wui-flex
|
||||
class="email-display"
|
||||
flexDirection="column"
|
||||
alignItems="center"
|
||||
.padding=${["0","xl","0","xl"]}
|
||||
>
|
||||
<wui-text variant="paragraph-400" color="fg-100" align="center">
|
||||
Enter the code we sent to
|
||||
</wui-text>
|
||||
<wui-text variant="paragraph-500" color="fg-100" lineClamp="1" align="center">
|
||||
${this.email}
|
||||
</wui-text>
|
||||
</wui-flex>
|
||||
|
||||
<wui-text variant="small-400" color="fg-200">The code expires in 20 minutes</wui-text>
|
||||
|
||||
${this.loading?u`<wui-loading-spinner size="xl" color="accent-100"></wui-loading-spinner>`:u` <wui-flex flexDirection="column" alignItems="center" gap="xs">
|
||||
<wui-otp
|
||||
dissabled
|
||||
length="6"
|
||||
@inputChange=${this.onOtpInputChange.bind(this)}
|
||||
.otp=${this.otp}
|
||||
></wui-otp>
|
||||
${this.error?u`
|
||||
<wui-text variant="small-400" align="center" color="error-100">
|
||||
${this.error}. Try Again
|
||||
</wui-text>
|
||||
`:null}
|
||||
</wui-flex>`}
|
||||
|
||||
<wui-flex alignItems="center" gap="xs">
|
||||
<wui-text variant="small-400" color="fg-200">${t.title}</wui-text>
|
||||
<wui-link @click=${this.onResendCode.bind(this)} .disabled=${e}>
|
||||
${t.action}
|
||||
</wui-link>
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
`}startOTPTimeout(){this.timeoutTimeLeft=R.getTimeToNextEmailLogin(),this.OTPTimeout=setInterval(()=>{this.timeoutTimeLeft>0?this.timeoutTimeLeft=R.getTimeToNextEmailLogin():clearInterval(this.OTPTimeout)},1e3)}async onOtpInputChange(e){try{this.loading||(this.otp=e.detail,this.shouldSubmitOnOtpChange()&&(this.loading=!0,await this.onOtpSubmit?.(this.otp)))}catch(t){this.error=C.parseError(t),this.loading=!1}}async onResendCode(){try{if(this.onOtpResend){if(!this.loading&&!this.timeoutTimeLeft){if(this.error="",this.otp="",!h.getAuthConnector()||!this.email)throw new Error("w3m-email-otp-widget: Unable to resend email");this.loading=!0,await this.onOtpResend(this.email),this.startOTPTimeout(),f.showSuccess("Code email resent")}}else this.onStartOver&&this.onStartOver()}catch(e){f.showError(e)}finally{this.loading=!1}}getFooterLabels(e){return this.onStartOver?{title:"Something wrong?",action:`Try again ${e?`in ${this.timeoutTimeLeft}s`:""}`}:{title:"Didn't receive it?",action:`Resend ${e?`in ${this.timeoutTimeLeft}s`:"Code"}`}}shouldSubmitOnOtpChange(){return this.authConnector&&this.otp.length===T.OTP_LENGTH}};p.OTP_LENGTH=6;p.styles=Q;_([m()],p.prototype,"loading",void 0);_([m()],p.prototype,"timeoutTimeLeft",void 0);_([m()],p.prototype,"error",void 0);p=T=_([d("w3m-email-otp-widget")],p);var J=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i};let W=class extends p{constructor(){super(...arguments),this.onOtpSubmit=async e=>{try{if(this.authConnector){const t=V.state.activeChain,n=N.getConnections(t),o=y.state.remoteFeatures?.multiWallet,i=n.length>0;if(await this.authConnector.provider.connectOtp({otp:e}),c.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),t)await N.connectExternal(this.authConnector,t);else throw new Error("Active chain is not set on ChainControll");if(c.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"email",name:this.authConnector.name||"Unknown",caipNetworkId:V.getActiveCaipNetwork()?.caipNetworkId}}),y.state.remoteFeatures?.emailCapture)return;if(y.state.siwx){L.close();return}if(i&&o){l.replace("ProfileWallets"),f.showSuccess("New Wallet Added");return}L.close()}}catch(t){throw c.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL",properties:{message:C.parseError(t)}}),t}},this.onOtpResend=async e=>{this.authConnector&&(await this.authConnector.provider.connectEmail({email:e}),c.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}))}}};W=J([d("w3m-email-verify-otp-view")],W);const X=b`
|
||||
wui-icon-box {
|
||||
height: var(--wui-icon-box-size-xl);
|
||||
width: var(--wui-icon-box-size-xl);
|
||||
}
|
||||
`;var k=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i};let x=class extends v{constructor(){super(),this.email=l.state.data?.email,this.authConnector=h.getAuthConnector(),this.loading=!1,this.listenForDeviceApproval()}render(){if(!this.email)throw new Error("w3m-email-verify-device-view: No email provided");if(!this.authConnector)throw new Error("w3m-email-verify-device-view: No auth connector provided");return u`
|
||||
<wui-flex
|
||||
flexDirection="column"
|
||||
alignItems="center"
|
||||
.padding=${["xxl","s","xxl","s"]}
|
||||
gap="l"
|
||||
>
|
||||
<wui-icon-box
|
||||
size="xl"
|
||||
iconcolor="accent-100"
|
||||
backgroundcolor="accent-100"
|
||||
icon="verify"
|
||||
background="opaque"
|
||||
></wui-icon-box>
|
||||
|
||||
<wui-flex flexDirection="column" alignItems="center" gap="s">
|
||||
<wui-flex flexDirection="column" alignItems="center">
|
||||
<wui-text variant="paragraph-400" color="fg-100">
|
||||
Approve the login link we sent to
|
||||
</wui-text>
|
||||
<wui-text variant="paragraph-400" color="fg-100"><b>${this.email}</b></wui-text>
|
||||
</wui-flex>
|
||||
|
||||
<wui-text variant="small-400" color="fg-200" align="center">
|
||||
The code expires in 20 minutes
|
||||
</wui-text>
|
||||
|
||||
<wui-flex alignItems="center" id="w3m-resend-section" gap="xs">
|
||||
<wui-text variant="small-400" color="fg-100" align="center">
|
||||
Didn't receive it?
|
||||
</wui-text>
|
||||
<wui-link @click=${this.onResendCode.bind(this)} .disabled=${this.loading}>
|
||||
Resend email
|
||||
</wui-link>
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
`}async listenForDeviceApproval(){if(this.authConnector)try{await this.authConnector.provider.connectDevice(),c.sendEvent({type:"track",event:"DEVICE_REGISTERED_FOR_EMAIL"}),c.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),l.replace("EmailVerifyOtp",{email:this.email})}catch{l.goBack()}}async onResendCode(){try{if(!this.loading){if(!this.authConnector||!this.email)throw new Error("w3m-email-login-widget: Unable to resend email");this.loading=!0,await this.authConnector.provider.connectEmail({email:this.email}),this.listenForDeviceApproval(),f.showSuccess("Code email resent")}}catch(e){f.showError(e)}finally{this.loading=!1}}};x.styles=X;k([m()],x.prototype,"loading",void 0);x=k([d("w3m-email-verify-device-view")],x);const Z=b`
|
||||
wui-email-input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
form {
|
||||
width: 100%;
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
`;var $=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i};let E=class extends v{constructor(){super(...arguments),this.formRef=B(),this.initialEmail=l.state.data?.email??"",this.redirectView=l.state.data?.redirectView,this.email="",this.loading=!1}firstUpdated(){this.formRef.value?.addEventListener("keydown",e=>{e.key==="Enter"&&this.onSubmitEmail(e)})}render(){return u`
|
||||
<wui-flex flexDirection="column" padding="m" gap="m">
|
||||
<form ${H(this.formRef)} @submit=${this.onSubmitEmail.bind(this)}>
|
||||
<wui-email-input
|
||||
value=${this.initialEmail}
|
||||
.disabled=${this.loading}
|
||||
@inputChange=${this.onEmailInputChange.bind(this)}
|
||||
>
|
||||
</wui-email-input>
|
||||
<input type="submit" hidden />
|
||||
</form>
|
||||
${this.buttonsTemplate()}
|
||||
</wui-flex>
|
||||
`}onEmailInputChange(e){this.email=e.detail}async onSubmitEmail(e){try{if(this.loading)return;this.loading=!0,e.preventDefault();const t=h.getAuthConnector();if(!t)throw new Error("w3m-update-email-wallet: Auth connector not found");const n=await t.provider.updateEmail({email:this.email});c.sendEvent({type:"track",event:"EMAIL_EDIT"}),n.action==="VERIFY_SECONDARY_OTP"?l.push("UpdateEmailSecondaryOtp",{email:this.initialEmail,newEmail:this.email,redirectView:this.redirectView}):l.push("UpdateEmailPrimaryOtp",{email:this.initialEmail,newEmail:this.email,redirectView:this.redirectView})}catch(t){f.showError(t),this.loading=!1}}buttonsTemplate(){const e=!this.loading&&this.email.length>3&&this.email!==this.initialEmail;return this.redirectView?u`
|
||||
<wui-flex gap="s">
|
||||
<wui-button size="md" variant="neutral" fullWidth @click=${l.goBack}>
|
||||
Cancel
|
||||
</wui-button>
|
||||
|
||||
<wui-button
|
||||
size="md"
|
||||
variant="main"
|
||||
fullWidth
|
||||
@click=${this.onSubmitEmail.bind(this)}
|
||||
.disabled=${!e}
|
||||
.loading=${this.loading}
|
||||
>
|
||||
Save
|
||||
</wui-button>
|
||||
</wui-flex>
|
||||
`:u`
|
||||
<wui-button
|
||||
size="md"
|
||||
variant="main"
|
||||
fullWidth
|
||||
@click=${this.onSubmitEmail.bind(this)}
|
||||
.disabled=${!e}
|
||||
.loading=${this.loading}
|
||||
>
|
||||
Save
|
||||
</wui-button>
|
||||
`}};E.styles=Z;$([m()],E.prototype,"email",void 0);$([m()],E.prototype,"loading",void 0);E=$([d("w3m-update-email-wallet-view")],E);var ee=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i};let F=class extends p{constructor(){super(),this.email=l.state.data?.email,this.onOtpSubmit=async e=>{try{this.authConnector&&(await this.authConnector.provider.updateEmailPrimaryOtp({otp:e}),c.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),l.replace("UpdateEmailSecondaryOtp",l.state.data))}catch(t){throw c.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL",properties:{message:C.parseError(t)}}),t}},this.onStartOver=()=>{l.replace("UpdateEmailWallet",l.state.data)}}};F=ee([d("w3m-update-email-primary-otp-view")],F);var te=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i};let j=class extends p{constructor(){super(),this.email=l.state.data?.newEmail,this.redirectView=l.state.data?.redirectView,this.onOtpSubmit=async e=>{try{this.authConnector&&(await this.authConnector.provider.updateEmailSecondaryOtp({otp:e}),c.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),this.redirectView&&l.reset(this.redirectView))}catch(t){throw c.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL",properties:{message:C.parseError(t)}}),t}},this.onStartOver=()=>{l.replace("UpdateEmailWallet",l.state.data)}}};j=te([d("w3m-update-email-secondary-otp-view")],j);var z=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i};let A=class extends v{constructor(){super(),this.authConnector=h.getAuthConnector(),this.isEmailEnabled=y.state.remoteFeatures?.email,this.isAuthEnabled=this.checkIfAuthEnabled(h.state.connectors),this.connectors=h.state.connectors,h.subscribeKey("connectors",e=>{this.connectors=e,this.isAuthEnabled=this.checkIfAuthEnabled(this.connectors)})}render(){if(!this.isEmailEnabled)throw new Error("w3m-email-login-view: Email is not enabled");if(!this.isAuthEnabled)throw new Error("w3m-email-login-view: No auth connector provided");return u`<wui-flex
|
||||
flexDirection="column"
|
||||
.padding=${["3xs","m","m","m"]}
|
||||
gap="l"
|
||||
>
|
||||
<w3m-email-login-widget></w3m-email-login-widget>
|
||||
</wui-flex> `}checkIfAuthEnabled(e){const t=e.filter(o=>o.type===q.CONNECTOR_TYPE_AUTH).map(o=>o.chain);return K.AUTH_CONNECTOR_SUPPORTED_CHAINS.some(o=>t.includes(o))}};z([m()],A.prototype,"connectors",void 0);A=z([d("w3m-email-login-view")],A);export{A as W3mEmailLoginView,p as W3mEmailOtpWidget,x as W3mEmailVerifyDeviceView,W as W3mEmailVerifyOtpView,F as W3mUpdateEmailPrimaryOtpView,j as W3mUpdateEmailSecondaryOtpView,E as W3mUpdateEmailWalletView};
|
||||
194
dist/assets/embedded-wallet-Axuw_fFm.js
vendored
Normal file
194
dist/assets/embedded-wallet-Axuw_fFm.js
vendored
Normal file
@ -0,0 +1,194 @@
|
||||
import{i as v,a as p,ap as E,x as l,O as j,a8 as A,ax as D,aa as h,c as f,F as _,a3 as M,a5 as g,a9 as P,Q as C,ay as z,az as c,Y as N,L as U,aA as k,a0 as x,a1 as y,K as S,a2 as T,R as H,aB as F,T as V}from"./index-Cr5N_0pd.js";const B=v`
|
||||
div {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
[data-ready='false'] {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
@media (max-width: 430px) {
|
||||
[data-ready='false'] {
|
||||
transform: translateY(-50px);
|
||||
}
|
||||
}
|
||||
`;var W=function(r,e,i,n){var s=arguments.length,t=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,i,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(t=(s<3?a(t):s>3?a(e,i,t):a(e,i))||t);return s>3&&t&&Object.defineProperty(e,i,t),t};const $=600,I=360,Y=64;let b=class extends p{constructor(){super(),this.bodyObserver=void 0,this.unsubscribe=[],this.iframe=document.getElementById("w3m-iframe"),this.ready=!1,this.unsubscribe.push(E.subscribeKey("open",e=>{e||this.onHideIframe()}),E.subscribeKey("shake",e=>{e?this.iframe.style.animation="w3m-shake 500ms var(--wui-ease-out-power-2)":this.iframe.style.animation="none"}))}disconnectedCallback(){this.onHideIframe(),this.unsubscribe.forEach(e=>e()),this.bodyObserver?.unobserve(window.document.body)}async firstUpdated(){await this.syncTheme(),this.iframe.style.display="block";const e=this?.renderRoot?.querySelector("div");this.bodyObserver=new ResizeObserver(i=>{const s=i?.[0]?.contentBoxSize?.[0]?.inlineSize;this.iframe.style.height=`${$}px`,e.style.height=`${$}px`,s&&s<=430?(this.iframe.style.width="100%",this.iframe.style.left="0px",this.iframe.style.bottom="0px",this.iframe.style.top="unset"):(this.iframe.style.width=`${I}px`,this.iframe.style.left=`calc(50% - ${I/2}px)`,this.iframe.style.top=`calc(50% - ${$/2}px + ${Y/2}px)`,this.iframe.style.bottom="unset"),this.ready=!0,this.onShowIframe()}),this.bodyObserver.observe(window.document.body)}render(){return l`<div data-ready=${this.ready} id="w3m-frame-container"></div>`}onShowIframe(){const e=window.innerWidth<=430;this.iframe.style.animation=e?"w3m-iframe-zoom-in-mobile 200ms var(--wui-ease-out-power-2)":"w3m-iframe-zoom-in 200ms var(--wui-ease-out-power-2)"}onHideIframe(){this.iframe.style.display="none",this.iframe.style.animation="w3m-iframe-fade-out 200ms var(--wui-ease-out-power-2)"}async syncTheme(){const e=j.getAuthConnector();if(e){const i=A.getSnapshot().themeMode,n=A.getSnapshot().themeVariables;await e.provider.syncTheme({themeVariables:n,w3mThemeVariables:D(n,i)})}}};b.styles=B;W([h()],b.prototype,"ready",void 0);b=W([f("w3m-approve-transaction-view")],b);var G=function(r,e,i,n){var s=arguments.length,t=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,i,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(t=(s<3?a(t):s>3?a(e,i,t):a(e,i))||t);return s>3&&t&&Object.defineProperty(e,i,t),t};let O=class extends p{render(){return l`
|
||||
<wui-flex flexDirection="column" alignItems="center" gap="xl" padding="xl">
|
||||
<wui-text variant="paragraph-400" color="fg-100">Follow the instructions on</wui-text>
|
||||
<wui-chip
|
||||
icon="externalLink"
|
||||
variant="fill"
|
||||
href=${_.SECURE_SITE_DASHBOARD}
|
||||
imageSrc=${_.SECURE_SITE_FAVICON}
|
||||
data-testid="w3m-secure-website-button"
|
||||
>
|
||||
</wui-chip>
|
||||
<wui-text variant="small-400" color="fg-200">
|
||||
You will have to reconnect for security reasons
|
||||
</wui-text>
|
||||
</wui-flex>
|
||||
`}};O=G([f("w3m-upgrade-wallet-view")],O);const L=v`
|
||||
:host {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
color: var(--wui-color-fg-275);
|
||||
}
|
||||
|
||||
.error {
|
||||
margin: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-0) var(--wui-spacing-m);
|
||||
}
|
||||
|
||||
.base-name {
|
||||
position: absolute;
|
||||
right: 45px;
|
||||
top: 15px;
|
||||
text-align: right;
|
||||
}
|
||||
`;var w=function(r,e,i,n){var s=arguments.length,t=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,i,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(t=(s<3?a(t):s>3?a(e,i,t):a(e,i))||t);return s>3&&t&&Object.defineProperty(e,i,t),t};let d=class extends p{constructor(){super(...arguments),this.disabled=!1,this.loading=!1}render(){return l`
|
||||
<wui-input-text
|
||||
value=${P(this.value)}
|
||||
?disabled=${this.disabled}
|
||||
.value=${this.value||""}
|
||||
data-testid="wui-ens-input"
|
||||
inputRightPadding="5xl"
|
||||
>
|
||||
${this.baseNameTemplate()} ${this.errorTemplate()}${this.loadingTemplate()}
|
||||
</wui-input-text>
|
||||
`}baseNameTemplate(){return l`<wui-text variant="paragraph-400" color="fg-200" class="base-name">
|
||||
${C.WC_NAME_SUFFIX}
|
||||
</wui-text>`}loadingTemplate(){return this.loading?l`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>`:null}errorTemplate(){return this.errorMessage?l`<wui-text variant="tiny-500" color="error-100" class="error"
|
||||
>${this.errorMessage}</wui-text
|
||||
>`:null}};d.styles=[M,L];w([g()],d.prototype,"errorMessage",void 0);w([g({type:Boolean})],d.prototype,"disabled",void 0);w([g()],d.prototype,"value",void 0);w([g({type:Boolean})],d.prototype,"loading",void 0);d=w([f("wui-ens-input")],d);const K=v`
|
||||
wui-flex {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.suggestion {
|
||||
background: var(--wui-color-gray-glass-002);
|
||||
border-radius: var(--wui-border-radius-xs);
|
||||
}
|
||||
|
||||
.suggestion:hover {
|
||||
background-color: var(--wui-color-gray-glass-005);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.suggested-name {
|
||||
max-width: 75%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
form {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
wui-icon-link {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
transform: translateY(11px);
|
||||
}
|
||||
`;var m=function(r,e,i,n){var s=arguments.length,t=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,i,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(t=(s<3?a(t):s>3?a(e,i,t):a(e,i))||t);return s>3&&t&&Object.defineProperty(e,i,t),t};let u=class extends p{constructor(){super(),this.formRef=z(),this.usubscribe=[],this.name="",this.error="",this.loading=c.state.loading,this.suggestions=c.state.suggestions,this.registered=!1,this.profileName=N.state.profileName,this.onDebouncedNameInputChange=U.debounce(e=>{c.validateName(e)?(this.error="",this.name=e,c.getSuggestions(e),c.isNameRegistered(e).then(i=>{this.registered=i})):e.length<4?this.error="Name must be at least 4 characters long":this.error="Can only contain letters, numbers and - characters"}),this.usubscribe.push(c.subscribe(e=>{this.suggestions=e.suggestions,this.loading=e.loading}),N.subscribeKey("profileName",e=>{this.profileName=e,e&&(this.error="You already own a name")}))}firstUpdated(){this.formRef.value?.addEventListener("keydown",this.onEnterKey.bind(this))}disconnectedCallback(){super.disconnectedCallback(),this.usubscribe.forEach(e=>e()),this.formRef.value?.removeEventListener("keydown",this.onEnterKey.bind(this))}render(){return l`
|
||||
<wui-flex
|
||||
flexDirection="column"
|
||||
alignItems="center"
|
||||
gap="m"
|
||||
.padding=${["0","s","m","s"]}
|
||||
>
|
||||
<form ${k(this.formRef)} @submit=${this.onSubmitName.bind(this)}>
|
||||
<wui-ens-input
|
||||
@inputChange=${this.onNameInputChange.bind(this)}
|
||||
.errorMessage=${this.error}
|
||||
.value=${this.name}
|
||||
>
|
||||
</wui-ens-input>
|
||||
${this.submitButtonTemplate()}
|
||||
<input type="submit" hidden />
|
||||
</form>
|
||||
${this.templateSuggestions()}
|
||||
</wui-flex>
|
||||
`}submitButtonTemplate(){return this.isAllowedToSubmit()?l`
|
||||
<wui-icon-link
|
||||
size="sm"
|
||||
icon="chevronRight"
|
||||
iconcolor="accent-100"
|
||||
@click=${this.onSubmitName.bind(this)}
|
||||
>
|
||||
</wui-icon-link>
|
||||
`:null}onSelectSuggestion(e){return()=>{this.name=e,this.registered=!1,this.requestUpdate()}}onNameInputChange(e){this.onDebouncedNameInputChange(e.detail)}nameSuggestionTagTemplate(){return this.loading?l`<wui-loading-spinner size="lg" color="fg-100"></wui-loading-spinner>`:this.registered?l`<wui-tag variant="shade" size="lg">Registered</wui-tag>`:l`<wui-tag variant="success" size="lg">Available</wui-tag>`}templateSuggestions(){if(!this.name||this.name.length<4||this.error)return null;const e=this.registered?this.suggestions.filter(i=>i.name!==this.name):[];return l`<wui-flex flexDirection="column" gap="xxs" alignItems="center">
|
||||
<wui-flex
|
||||
data-testid="account-name-suggestion"
|
||||
.padding=${["m","m","m","m"]}
|
||||
justifyContent="space-between"
|
||||
class="suggestion"
|
||||
@click=${this.onSubmitName.bind(this)}
|
||||
>
|
||||
<wui-text color="fg-100" variant="paragraph-400" class="suggested-name">
|
||||
${this.name}</wui-text
|
||||
>${this.nameSuggestionTagTemplate()}
|
||||
</wui-flex>
|
||||
${e.map(i=>this.availableNameTemplate(i.name))}
|
||||
</wui-flex>`}availableNameTemplate(e){return l` <wui-flex
|
||||
data-testid="account-name-suggestion"
|
||||
.padding=${["m","m","m","m"]}
|
||||
justifyContent="space-between"
|
||||
class="suggestion"
|
||||
@click=${this.onSelectSuggestion(e)}
|
||||
>
|
||||
<wui-text color="fg-100" variant="paragraph-400" class="suggested-name">
|
||||
${e}
|
||||
</wui-text>
|
||||
<wui-tag variant="success" size="lg">Available</wui-tag>
|
||||
</wui-flex>`}isAllowedToSubmit(){return!this.loading&&!this.registered&&!this.error&&!this.profileName&&c.validateName(this.name)}async onSubmitName(){try{if(!this.isAllowedToSubmit())return;const e=`${this.name}${C.WC_NAME_SUFFIX}`;x.sendEvent({type:"track",event:"REGISTER_NAME_INITIATED",properties:{isSmartAccount:y(S.state.activeChain)===T.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:e}}),await c.registerName(e),x.sendEvent({type:"track",event:"REGISTER_NAME_SUCCESS",properties:{isSmartAccount:y(S.state.activeChain)===T.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:e}})}catch(e){H.showError(e.message),x.sendEvent({type:"track",event:"REGISTER_NAME_ERROR",properties:{isSmartAccount:y(S.state.activeChain)===T.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:`${this.name}${C.WC_NAME_SUFFIX}`,error:e?.message||"Unknown error"}})}}onEnterKey(e){e.key==="Enter"&&this.isAllowedToSubmit()&&this.onSubmitName()}};u.styles=K;m([g()],u.prototype,"errorMessage",void 0);m([h()],u.prototype,"name",void 0);m([h()],u.prototype,"error",void 0);m([h()],u.prototype,"loading",void 0);m([h()],u.prototype,"suggestions",void 0);m([h()],u.prototype,"registered",void 0);m([h()],u.prototype,"profileName",void 0);u=m([f("w3m-register-account-name-view")],u);const q=v`
|
||||
.continue-button-container {
|
||||
width: 100%;
|
||||
}
|
||||
`;var X=function(r,e,i,n){var s=arguments.length,t=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,i,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(t=(s<3?a(t):s>3?a(e,i,t):a(e,i))||t);return s>3&&t&&Object.defineProperty(e,i,t),t};let R=class extends p{render(){return l`
|
||||
<wui-flex
|
||||
flexDirection="column"
|
||||
alignItems="center"
|
||||
gap="xxl"
|
||||
.padding=${["0","0","l","0"]}
|
||||
>
|
||||
${this.onboardingTemplate()} ${this.buttonsTemplate()}
|
||||
<wui-link
|
||||
@click=${()=>{U.openHref(F.URLS.FAQ,"_blank")}}
|
||||
>
|
||||
Learn more
|
||||
<wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon>
|
||||
</wui-link>
|
||||
</wui-flex>
|
||||
`}onboardingTemplate(){return l` <wui-flex
|
||||
flexDirection="column"
|
||||
gap="xxl"
|
||||
alignItems="center"
|
||||
.padding=${["0","xxl","0","xxl"]}
|
||||
>
|
||||
<wui-flex gap="s" alignItems="center" justifyContent="center">
|
||||
<wui-icon-box
|
||||
size="xl"
|
||||
iconcolor="success-100"
|
||||
backgroundcolor="success-100"
|
||||
icon="checkmark"
|
||||
background="opaque"
|
||||
></wui-icon-box>
|
||||
</wui-flex>
|
||||
<wui-flex flexDirection="column" alignItems="center" gap="s">
|
||||
<wui-text align="center" variant="medium-600" color="fg-100">
|
||||
Account name chosen successfully
|
||||
</wui-text>
|
||||
<wui-text align="center" variant="paragraph-400" color="fg-100">
|
||||
You can now fund your account and trade crypto
|
||||
</wui-text>
|
||||
</wui-flex>
|
||||
</wui-flex>`}buttonsTemplate(){return l`<wui-flex
|
||||
.padding=${["0","2l","0","2l"]}
|
||||
gap="s"
|
||||
class="continue-button-container"
|
||||
>
|
||||
<wui-button fullWidth size="lg" borderRadius="xs" @click=${this.redirectToAccount.bind(this)}
|
||||
>Let's Go!
|
||||
</wui-button>
|
||||
</wui-flex>`}redirectToAccount(){V.replace("Account")}};R.styles=q;R=X([f("w3m-register-account-name-success-view")],R);export{b as W3mApproveTransactionView,R as W3mRegisterAccountNameSuccess,u as W3mRegisterAccountNameView,O as W3mUpgradeWalletView};
|
||||
10
dist/assets/ethereum-pDlrEry5.js
vendored
Normal file
10
dist/assets/ethereum-pDlrEry5.js
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const r=l`<svg width="13" height="12" viewBox="0 0 13 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6.66686 12C9.9805 12 12.6667 9.31371 12.6667 6C12.6667 2.68629 9.9805 0 6.66686 0C3.35323 0 0.666992 2.68629 0.666992 6C0.666992 9.31371 3.35323 12 6.66686 12Z" fill="var(--wui-color-gray-glass-005)"/>
|
||||
<path d="M6.6658 1.50098V4.82739L9.47712 6.08381L6.6658 1.50098Z" fill="var(--wui-color-gray-glass-060)"/>
|
||||
<path d="M6.6658 1.50098L3.85449 6.08381L6.6658 4.82739V1.50098Z" fill="var(--wui-color-gray-glass-090)"/>
|
||||
<path d="M6.6658 8.23909V10.4993L9.47876 6.60705L6.6658 8.23909Z" fill="var(--wui-color-gray-glass-060)"/>
|
||||
<path d="M6.6658 10.4993V8.23909L3.85449 6.60705L6.6658 10.4993Z" fill="var(--wui-color-gray-glass-090)"/>
|
||||
<path d="M6.6658 7.71585L9.47712 6.08381L6.6658 4.82739V7.71585Z" fill="var(--wui-color-gray-glass-020)"/>
|
||||
<path d="M3.85449 6.08381L6.6658 7.71585V4.82739L3.85449 6.08381Z" fill="var(--wui-color-gray-glass-060)"/>
|
||||
</svg>
|
||||
`;export{r as ethereumSvg};
|
||||
6
dist/assets/etherscan-yowPVDyy.js
vendored
Normal file
6
dist/assets/etherscan-yowPVDyy.js
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
import{b as c}from"./index-Cr5N_0pd.js";const a=c`<svg fill="none" viewBox="0 0 16 16">
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M4.25 7a.63.63 0 0 0-.63.63v3.97c0 .28-.2.51-.47.54l-.75.07a.93.93 0 0 1-.9-.47A7.51 7.51 0 0 1 5.54.92a7.5 7.5 0 0 1 9.54 4.62c.12.35.06.72-.16 1-.74.97-1.68 1.78-2.6 2.44V4.44a.64.64 0 0 0-.63-.64h-1.06c-.35 0-.63.3-.63.64v5.5c0 .23-.12.42-.32.5l-.52.23V6.05c0-.36-.3-.64-.64-.64H7.45c-.35 0-.64.3-.64.64v4.97c0 .25-.17.46-.4.52a5.8 5.8 0 0 0-.45.11v-4c0-.36-.3-.65-.64-.65H4.25ZM14.07 12.4A7.49 7.49 0 0 1 3.6 14.08c4.09-.58 9.14-2.5 11.87-6.6v.03a7.56 7.56 0 0 1-1.41 4.91Z"
|
||||
/>
|
||||
</svg>`;export{a as etherscanSvg};
|
||||
4
dist/assets/exclamation-triangle-ByL4C-X2.js
vendored
Normal file
4
dist/assets/exclamation-triangle-ByL4C-X2.js
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import{b as C}from"./index-Cr5N_0pd.js";const t=C`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15.0162 11.6312L9.55059 2.13937C9.39228 1.86862 9.16584 1.64405 8.8938 1.48798C8.62176 1.33192 8.3136 1.2498 7.99997 1.2498C7.68634 1.2498 7.37817 1.33192 7.10613 1.48798C6.83409 1.64405 6.60765 1.86862 6.44934 2.13937L0.983716 11.6312C0.830104 11.894 0.749146 12.1928 0.749146 12.4972C0.749146 12.8015 0.830104 13.1004 0.983716 13.3631C1.14027 13.6352 1.3664 13.8608 1.63889 14.0166C1.91139 14.1725 2.22044 14.253 2.53434 14.25H13.4656C13.7793 14.2528 14.0881 14.1721 14.3603 14.0163C14.6326 13.8604 14.8585 13.635 15.015 13.3631C15.1688 13.1005 15.2499 12.8017 15.2502 12.4973C15.2504 12.193 15.1696 11.8941 15.0162 11.6312ZM13.7162 12.6125C13.6908 12.6558 13.6541 12.6914 13.6101 12.7157C13.5661 12.7399 13.5164 12.7517 13.4662 12.75H2.53434C2.48415 12.7517 2.43442 12.7399 2.39042 12.7157C2.34641 12.6914 2.30976 12.6558 2.28434 12.6125C2.26278 12.5774 2.25137 12.5371 2.25137 12.4959C2.25137 12.4548 2.26278 12.4144 2.28434 12.3794L7.74997 2.88749C7.77703 2.84583 7.81408 2.8116 7.85774 2.7879C7.9014 2.7642 7.95029 2.75178 7.99997 2.75178C8.04964 2.75178 8.09854 2.7642 8.1422 2.7879C8.18586 2.8116 8.2229 2.84583 8.24997 2.88749L13.715 12.3794C13.7367 12.4143 13.7483 12.4546 13.7486 12.4958C13.7488 12.5369 13.7376 12.5773 13.7162 12.6125ZM7.24997 8.49999V6.49999C7.24997 6.30108 7.32898 6.11031 7.46964 5.96966C7.61029 5.82901 7.80105 5.74999 7.99997 5.74999C8.19888 5.74999 8.38964 5.82901 8.5303 5.96966C8.67095 6.11031 8.74997 6.30108 8.74997 6.49999V8.49999C8.74997 8.6989 8.67095 8.88967 8.5303 9.03032C8.38964 9.17097 8.19888 9.24999 7.99997 9.24999C7.80105 9.24999 7.61029 9.17097 7.46964 9.03032C7.32898 8.88967 7.24997 8.6989 7.24997 8.49999ZM8.99997 11C8.99997 11.1978 8.94132 11.3911 8.83144 11.5556C8.72155 11.72 8.56538 11.8482 8.38265 11.9239C8.19992 11.9996 7.99886 12.0194 7.80488 11.9808C7.6109 11.9422 7.43271 11.847 7.29286 11.7071C7.15301 11.5672 7.05777 11.3891 7.01918 11.1951C6.9806 11.0011 7.0004 10.8 7.07609 10.6173C7.15177 10.4346 7.27995 10.2784 7.4444 10.1685C7.60885 10.0586 7.80219 9.99999 7.99997 9.99999C8.26518 9.99999 8.51954 10.1053 8.70707 10.2929C8.89461 10.4804 8.99997 10.7348 8.99997 11Z" fill="currentColor"/>
|
||||
</svg>
|
||||
`;export{t as exclamationTriangleSvg};
|
||||
8
dist/assets/extension-V_MQztIO.js
vendored
Normal file
8
dist/assets/extension-V_MQztIO.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as a}from"./index-Cr5N_0pd.js";const e=a`<svg fill="none" viewBox="0 0 14 15">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M6.71 2.99a.57.57 0 0 0-.57.57 1 1 0 0 1-1 1c-.58 0-.96 0-1.24.03-.27.03-.37.07-.42.1a.97.97 0 0 0-.36.35c-.04.08-.09.21-.11.67a2.57 2.57 0 0 1 0 5.13c.02.45.07.6.11.66.09.15.21.28.36.36.07.04.21.1.67.12a2.57 2.57 0 0 1 5.12 0c.46-.03.6-.08.67-.12a.97.97 0 0 0 .36-.36c.03-.04.07-.14.1-.41.02-.29.03-.66.03-1.24a1 1 0 0 1 1-1 .57.57 0 0 0 0-1.15 1 1 0 0 1-1-1c0-.58 0-.95-.03-1.24a1.04 1.04 0 0 0-.1-.42.97.97 0 0 0-.36-.36 1.04 1.04 0 0 0-.42-.1c-.28-.02-.65-.02-1.24-.02a1 1 0 0 1-1-1 .57.57 0 0 0-.57-.57ZM5.15 13.98a1 1 0 0 0 .99-1v-.78a.57.57 0 0 1 1.14 0v.78a1 1 0 0 0 .99 1H8.36a66.26 66.26 0 0 0 .73 0 3.78 3.78 0 0 0 1.84-.38c.46-.26.85-.64 1.1-1.1.23-.4.32-.8.36-1.22.02-.2.03-.4.03-.63a2.57 2.57 0 0 0 0-4.75c0-.23-.01-.44-.03-.63a2.96 2.96 0 0 0-.35-1.22 2.97 2.97 0 0 0-1.1-1.1c-.4-.22-.8-.31-1.22-.35a8.7 8.7 0 0 0-.64-.04 2.57 2.57 0 0 0-4.74 0c-.23 0-.44.02-.63.04-.42.04-.83.13-1.22.35-.46.26-.84.64-1.1 1.1-.33.57-.37 1.2-.39 1.84a21.39 21.39 0 0 0 0 .72v.1a1 1 0 0 0 1 .99h.78a.57.57 0 0 1 0 1.15h-.77a1 1 0 0 0-1 .98v.1a63.87 63.87 0 0 0 0 .73c0 .64.05 1.27.38 1.83.26.47.64.85 1.1 1.11.56.32 1.2.37 1.84.38a20.93 20.93 0 0 0 .72 0h.1Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{e as extensionSvg};
|
||||
8
dist/assets/external-link-D5nUBuK8.js
vendored
Normal file
8
dist/assets/external-link-D5nUBuK8.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const o=l`<svg fill="none" viewBox="0 0 14 15">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M3.74 3.99a1 1 0 0 1 1-1H11a1 1 0 0 1 1 1v6.26a1 1 0 0 1-2 0V6.4l-6.3 6.3a1 1 0 0 1-1.4-1.42l6.29-6.3H4.74a1 1 0 0 1-1-1Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{o as externalLinkSvg};
|
||||
26
dist/assets/facebook-IzGdkHXn.js
vendored
Normal file
26
dist/assets/facebook-IzGdkHXn.js
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const f=l`<svg fill="none" viewBox="0 0 40 40">
|
||||
<g clip-path="url(#a)">
|
||||
<g clip-path="url(#b)">
|
||||
<circle cx="20" cy="19.89" r="20" fill="#1877F2" />
|
||||
<g clip-path="url(#c)">
|
||||
<path
|
||||
fill="#fff"
|
||||
d="M26 12.38h-2.89c-.92 0-1.61.38-1.61 1.34v1.66H26l-.36 4.5H21.5v12H17v-12h-3v-4.5h3V12.5c0-3.03 1.6-4.62 5.2-4.62H26v4.5Z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<path
|
||||
fill="#1877F2"
|
||||
d="M40 20a20 20 0 1 0-23.13 19.76V25.78H11.8V20h5.07v-4.4c0-5.02 3-7.79 7.56-7.79 2.19 0 4.48.4 4.48.4v4.91h-2.53c-2.48 0-3.25 1.55-3.25 3.13V20h5.54l-.88 5.78h-4.66v13.98A20 20 0 0 0 40 20Z"
|
||||
/>
|
||||
<path
|
||||
fill="#fff"
|
||||
d="m27.79 25.78.88-5.78h-5.55v-3.75c0-1.58.78-3.13 3.26-3.13h2.53V8.2s-2.3-.39-4.48-.39c-4.57 0-7.55 2.77-7.55 7.78V20H11.8v5.78h5.07v13.98a20.15 20.15 0 0 0 6.25 0V25.78h4.67Z"
|
||||
/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
|
||||
<clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
|
||||
<clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
|
||||
</defs>
|
||||
</svg>`;export{f as facebookSvg};
|
||||
12
dist/assets/farcaster-CQ1ZnK9M.js
vendored
Normal file
12
dist/assets/farcaster-CQ1ZnK9M.js
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import{b as h}from"./index-Cr5N_0pd.js";const a=h`<svg style="border-radius: 9999px; overflow: hidden;" fill="none" viewBox="0 0 1000 1000">
|
||||
<rect width="1000" height="1000" rx="9999" ry="9999" fill="#855DCD"/>
|
||||
<path fill="#855DCD" d="M0 0h1000v1000H0V0Z" />
|
||||
<path
|
||||
fill="#fff"
|
||||
d="M320 248h354v504h-51.96V521.13h-.5c-5.76-63.8-59.31-113.81-124.54-113.81s-118.78 50-124.53 113.81h-.5V752H320V248Z"
|
||||
/>
|
||||
<path
|
||||
fill="#fff"
|
||||
d="m225 320 21.16 71.46h17.9v289.09a16.29 16.29 0 0 0-16.28 16.24v19.49h-3.25a16.3 16.3 0 0 0-16.28 16.24V752h182.26v-19.48a16.22 16.22 0 0 0-16.28-16.24h-3.25v-19.5a16.22 16.22 0 0 0-16.28-16.23h-19.52V320H225Zm400.3 360.55a16.3 16.3 0 0 0-15.04 10.02 16.2 16.2 0 0 0-1.24 6.22v19.49h-3.25a16.29 16.29 0 0 0-16.27 16.24V752h182.24v-19.48a16.23 16.23 0 0 0-16.27-16.24h-3.25v-19.5a16.2 16.2 0 0 0-10.04-15 16.3 16.3 0 0 0-6.23-1.23v-289.1h17.9L775 320H644.82v360.55H625.3Z"
|
||||
/>
|
||||
</svg>`;export{a as farcasterSvg};
|
||||
8
dist/assets/filters-CENUgXu3.js
vendored
Normal file
8
dist/assets/filters-CENUgXu3.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as e}from"./index-Cr5N_0pd.js";const a=e`<svg fill="none" viewBox="0 0 16 16">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M0 3a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H1a1 1 0 0 1-1-1Zm2.63 5.25a1 1 0 0 1 1-1h8.75a1 1 0 1 1 0 2H3.63a1 1 0 0 1-1-1Zm2.62 5.25a1 1 0 0 1 1-1h3.5a1 1 0 0 1 0 2h-3.5a1 1 0 0 1-1-1Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{a as filtersSvg};
|
||||
18
dist/assets/github-DB7o3FYw.js
vendored
Normal file
18
dist/assets/github-DB7o3FYw.js
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const c=l`<svg fill="none" viewBox="0 0 40 40">
|
||||
<g clip-path="url(#a)">
|
||||
<g clip-path="url(#b)">
|
||||
<circle cx="20" cy="19.89" r="20" fill="#1B1F23" />
|
||||
<g clip-path="url(#c)">
|
||||
<path
|
||||
fill="#fff"
|
||||
d="M8 19.89a12 12 0 1 1 15.8 11.38c-.6.12-.8-.26-.8-.57v-3.3c0-1.12-.4-1.85-.82-2.22 2.67-.3 5.48-1.31 5.48-5.92 0-1.31-.47-2.38-1.24-3.22.13-.3.54-1.52-.12-3.18 0 0-1-.32-3.3 1.23a11.54 11.54 0 0 0-6 0c-2.3-1.55-3.3-1.23-3.3-1.23a4.32 4.32 0 0 0-.12 3.18 4.64 4.64 0 0 0-1.24 3.22c0 4.6 2.8 5.63 5.47 5.93-.34.3-.65.83-.76 1.6-.69.31-2.42.84-3.5-1 0 0-.63-1.15-1.83-1.23 0 0-1.18-.02-.09.73 0 0 .8.37 1.34 1.76 0 0 .7 2.14 4.03 1.41v2.24c0 .31-.2.68-.8.57A12 12 0 0 1 8 19.9Z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
|
||||
<clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
|
||||
<clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
|
||||
</defs>
|
||||
</svg>`;export{c as githubSvg};
|
||||
18
dist/assets/google-BQasw2Dk.js
vendored
Normal file
18
dist/assets/google-BQasw2Dk.js
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const o=l`<svg fill="none" viewBox="0 0 40 40">
|
||||
<path
|
||||
fill="#4285F4"
|
||||
d="M32.74 20.3c0-.93-.08-1.81-.24-2.66H20.26v5.03h7a6 6 0 0 1-2.62 3.91v3.28h4.22c2.46-2.27 3.88-5.6 3.88-9.56Z"
|
||||
/>
|
||||
<path
|
||||
fill="#34A853"
|
||||
d="M20.26 33a12.4 12.4 0 0 0 8.6-3.14l-4.22-3.28a7.74 7.74 0 0 1-4.38 1.26 7.76 7.76 0 0 1-7.28-5.36H8.65v3.36A12.99 12.99 0 0 0 20.26 33Z"
|
||||
/>
|
||||
<path
|
||||
fill="#FBBC05"
|
||||
d="M12.98 22.47a7.79 7.79 0 0 1 0-4.94v-3.36H8.65a12.84 12.84 0 0 0 0 11.66l3.37-2.63.96-.73Z"
|
||||
/>
|
||||
<path
|
||||
fill="#EA4335"
|
||||
d="M20.26 12.18a7.1 7.1 0 0 1 4.98 1.93l3.72-3.72A12.47 12.47 0 0 0 20.26 7c-5.08 0-9.47 2.92-11.6 7.17l4.32 3.36a7.76 7.76 0 0 1 7.28-5.35Z"
|
||||
/>
|
||||
</svg>`;export{o as googleSvg};
|
||||
1
dist/assets/hashTypedData-D0Cx__mD.js
vendored
Normal file
1
dist/assets/hashTypedData-D0Cx__mD.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
import{B as f,s as S,r as $,n as z,t as M,I as k,u as A,v as l,y as B,z as c,o as N,p as g,A as b}from"./index-Cr5N_0pd.js";class O extends f{constructor({domain:t}){super(`Invalid domain "${S(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class _ extends f{constructor({primaryType:t,types:n}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(n))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class j extends f{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function C(e){const{domain:t,message:n,primaryType:s,types:r}=e,a=(i,d)=>{for(const D of i){const{name:x,type:p}=D,o=d[x],m=p.match($);if(m&&(typeof o=="number"||typeof o=="bigint")){const[w,y,P]=m;z(o,{signed:y==="int",size:Number.parseInt(P,10)/8})}if(p==="address"&&typeof o=="string"&&!M(o))throw new k({address:o});const u=p.match(A);if(u){const[w,y]=u;if(y&&l(o)!==Number.parseInt(y,10))throw new B({expectedSize:Number.parseInt(y,10),givenSize:l(o)})}const h=r[p];h&&(R(p),a(h,o))}};if(r.EIP712Domain&&t){if(typeof t!="object")throw new O({domain:t});a(r.EIP712Domain,t)}if(s!=="EIP712Domain")if(r[s])a(r[s],n);else throw new _({primaryType:s,types:r})}function H({domain:e}){return[typeof e?.name=="string"&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},(typeof e?.chainId=="number"||typeof e?.chainId=="bigint")&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}function R(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new j({type:e})}function q(e){const{domain:t={},message:n,primaryType:s}=e,r={EIP712Domain:H({domain:t}),...e.types};C({domain:t,message:n,primaryType:s,types:r});const a=["0x1901"];return t&&a.push(W({domain:t,types:r})),s!=="EIP712Domain"&&a.push(I({data:n,primaryType:s,types:r})),c(N(a))}function W({domain:e,types:t}){return I({data:e,primaryType:"EIP712Domain",types:t})}function I({data:e,primaryType:t,types:n}){const s=T({data:e,primaryType:t,types:n});return c(s)}function T({data:e,primaryType:t,types:n}){const s=[{type:"bytes32"}],r=[F({primaryType:t,types:n})];for(const a of n[t]){const[i,d]=E({types:n,name:a.name,type:a.type,value:e[a.name]});s.push(i),r.push(d)}return g(s,r)}function F({primaryType:e,types:t}){const n=b(V({primaryType:e,types:t}));return c(n)}function V({primaryType:e,types:t}){let n="";const s=v({primaryType:e,types:t});s.delete(e);const r=[e,...Array.from(s).sort()];for(const a of r)n+=`${a}(${t[a].map(({name:i,type:d})=>`${d} ${i}`).join(",")})`;return n}function v({primaryType:e,types:t},n=new Set){const r=e.match(/^\w*/u)?.[0];if(n.has(r)||t[r]===void 0)return n;n.add(r);for(const a of t[r])v({primaryType:a.type,types:t},n);return n}function E({types:e,name:t,type:n,value:s}){if(e[n]!==void 0)return[{type:"bytes32"},c(T({data:s,primaryType:n,types:e}))];if(n==="bytes")return s=`0x${(s.length%2?"0":"")+s.slice(2)}`,[{type:"bytes32"},c(s)];if(n==="string")return[{type:"bytes32"},c(b(s))];if(n.lastIndexOf("]")===n.length-1){const r=n.slice(0,n.lastIndexOf("[")),a=s.map(i=>E({name:t,type:r,types:e,value:i}));return[{type:"bytes32"},c(g(a.map(([i])=>i),a.map(([,i])=>i)))]}return[{type:n},s]}export{q as h};
|
||||
12
dist/assets/help-circle-VyIXOAlM.js
vendored
Normal file
12
dist/assets/help-circle-VyIXOAlM.js
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const o=l`<svg fill="none" viewBox="0 0 16 16">
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M8.51 5.66a.83.83 0 0 0-.57-.2.83.83 0 0 0-.52.28.8.8 0 0 0-.25.52 1 1 0 0 1-2 0c0-.75.34-1.43.81-1.91a2.75 2.75 0 0 1 4.78 1.92c0 1.24-.8 1.86-1.25 2.2l-.04.03c-.47.36-.5.43-.5.65a1 1 0 1 1-2 0c0-1.25.8-1.86 1.24-2.2l.04-.04c.47-.36.5-.43.5-.65 0-.3-.1-.49-.24-.6ZM9.12 11.87a1.13 1.13 0 1 1-2.25 0 1.13 1.13 0 0 1 2.25 0Z"
|
||||
/>
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6a6 6 0 1 0 0 12A6 6 0 0 0 8 2Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{o as helpCircleSvg};
|
||||
1
dist/assets/hooks.module-Dz_XB4AG.js
vendored
Normal file
1
dist/assets/hooks.module-Dz_XB4AG.js
vendored
Normal file
File diff suppressed because one or more lines are too long
12
dist/assets/id-Dqw-Wgu3.js
vendored
Normal file
12
dist/assets/id-Dqw-Wgu3.js
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import{b as c}from"./index-Cr5N_0pd.js";const e=c`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="28"
|
||||
height="28"
|
||||
viewBox="0 0 28 28"
|
||||
fill="none">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M7.974 2.975h12.052c1.248 0 2.296 0 3.143.092.89.096 1.723.307 2.461.844a4.9 4.9 0 0 1 1.084 1.084c.537.738.748 1.57.844 2.461.092.847.092 1.895.092 3.143v6.802c0 1.248 0 2.296-.092 3.143-.096.89-.307 1.723-.844 2.461a4.9 4.9 0 0 1-1.084 1.084c-.738.537-1.57.748-2.461.844-.847.092-1.895.092-3.143.092H7.974c-1.247 0-2.296 0-3.143-.092-.89-.096-1.723-.307-2.461-.844a4.901 4.901 0 0 1-1.084-1.084c-.537-.738-.748-1.571-.844-2.461C.35 19.697.35 18.649.35 17.4v-6.802c0-1.248 0-2.296.092-3.143.096-.89.307-1.723.844-2.461A4.9 4.9 0 0 1 2.37 3.91c.738-.537 1.571-.748 2.461-.844.847-.092 1.895-.092 3.143-.092ZM5.133 5.85c-.652.071-.936.194-1.117.326a2.1 2.1 0 0 0-.465.465c-.132.181-.255.465-.325 1.117-.074.678-.076 1.573-.076 2.917v6.65c0 1.344.002 2.239.076 2.917.07.652.193.936.325 1.117a2.1 2.1 0 0 0 .465.465c.181.132.465.255 1.117.326.678.073 1.574.075 2.917.075h11.9c1.344 0 2.239-.002 2.917-.075.652-.071.936-.194 1.117-.326.179-.13.335-.286.465-.465.132-.181.255-.465.326-1.117.073-.678.075-1.573.075-2.917v-6.65c0-1.344-.002-2.239-.075-2.917-.071-.652-.194-.936-.326-1.117a2.1 2.1 0 0 0-.465-.465c-.181-.132-.465-.255-1.117-.326-.678-.073-1.573-.075-2.917-.075H8.05c-1.343 0-2.239.002-2.917.075Zm.467 7.275a3.15 3.15 0 1 1 6.3 0 3.15 3.15 0 0 1-6.3 0Zm8.75-1.75a1.4 1.4 0 0 1 1.4-1.4h3.5a1.4 1.4 0 0 1 0 2.8h-3.5a1.4 1.4 0 0 1-1.4-1.4Zm0 5.25a1.4 1.4 0 0 1 1.4-1.4H21a1.4 1.4 0 1 1 0 2.8h-5.25a1.4 1.4 0 0 1-1.4-1.4Z"
|
||||
clip-rule="evenodd"/>
|
||||
</svg>`;export{e as idSvg};
|
||||
4
dist/assets/image-Dd9GhBqt.js
vendored
Normal file
4
dist/assets/image-Dd9GhBqt.js
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import{b as C}from"./index-Cr5N_0pd.js";const l=C`<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
|
||||
<path d="M4.98926 3.73932C4.2989 3.73932 3.73926 4.29896 3.73926 4.98932C3.73926 5.67968 4.2989 6.23932 4.98926 6.23932C5.67962 6.23932 6.23926 5.67968 6.23926 4.98932C6.23926 4.29896 5.67962 3.73932 4.98926 3.73932Z" fill="currentColor"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.60497 0.500001H6.39504C5.41068 0.499977 4.59185 0.499958 3.93178 0.571471C3.24075 0.64634 2.60613 0.809093 2.04581 1.21619C1.72745 1.44749 1.44749 1.72745 1.21619 2.04581C0.809093 2.60613 0.64634 3.24075 0.571471 3.93178C0.499958 4.59185 0.499977 5.41065 0.500001 6.39501V7.57815C0.499998 8.37476 0.499995 9.05726 0.534869 9.62725C0.570123 10.2034 0.644114 10.7419 0.828442 11.2302C0.925651 11.4877 1.05235 11.7287 1.21619 11.9542C1.44749 12.2726 1.72745 12.5525 2.04581 12.7838C2.60613 13.1909 3.24075 13.3537 3.93178 13.4285C4.59185 13.5001 5.41066 13.5 6.39503 13.5H7.60496C8.58933 13.5 9.40815 13.5001 10.0682 13.4285C10.7593 13.3537 11.3939 13.1909 11.9542 12.7838C12.2726 12.5525 12.5525 12.2726 12.7838 11.9542C13.1909 11.3939 13.3537 10.7593 13.4285 10.0682C13.5 9.40816 13.5 8.58935 13.5 7.60497V6.39505C13.5 5.41068 13.5 4.59185 13.4285 3.93178C13.3537 3.24075 13.1909 2.60613 12.7838 2.04581C12.5525 1.72745 12.2726 1.44749 11.9542 1.21619C11.3939 0.809093 10.7593 0.64634 10.0682 0.571471C9.40816 0.499958 8.58933 0.499977 7.60497 0.500001ZM3.22138 2.83422C3.38394 2.71612 3.62634 2.61627 4.14721 2.55984C4.68679 2.50138 5.39655 2.5 6.45 2.5H7.55C8.60345 2.5 9.31322 2.50138 9.8528 2.55984C10.3737 2.61627 10.6161 2.71612 10.7786 2.83422C10.9272 2.94216 11.0578 3.07281 11.1658 3.22138C11.2839 3.38394 11.3837 3.62634 11.4402 4.14721C11.4986 4.68679 11.5 5.39655 11.5 6.45V6.49703C10.9674 6.11617 10.386 5.84936 9.74213 5.81948C8.40536 5.75745 7.3556 6.73051 6.40509 7.84229C6.33236 7.92737 6.27406 7.98735 6.22971 8.02911L6.1919 8.00514L6.17483 7.99427C6.09523 7.94353 5.98115 7.87083 5.85596 7.80302C5.56887 7.64752 5.18012 7.4921 4.68105 7.4921C4.66697 7.4921 4.6529 7.49239 4.63884 7.49299C3.79163 7.52878 3.09922 8.1106 2.62901 8.55472C2.58751 8.59392 2.54594 8.6339 2.50435 8.6745C2.50011 8.34653 2.5 7.97569 2.5 7.55V6.45C2.5 5.39655 2.50138 4.68679 2.55984 4.14721C2.61627 3.62634 2.71612 3.38394 2.83422 3.22138C2.94216 3.07281 3.07281 2.94216 3.22138 2.83422ZM10.3703 8.14825C10.6798 8.37526 11.043 8.71839 11.4832 9.20889C11.4744 9.44992 11.4608 9.662 11.4402 9.8528C11.3837 10.3737 11.2839 10.6161 11.1658 10.7786C11.0578 10.9272 10.9272 11.0578 10.7786 11.1658C10.6161 11.2839 10.3737 11.3837 9.8528 11.4402C9.31322 11.4986 8.60345 11.5 7.55 11.5H6.45C5.39655 11.5 4.68679 11.4986 4.14721 11.4402C3.62634 11.3837 3.38394 11.2839 3.22138 11.1658C3.15484 11.1174 3.0919 11.0645 3.03298 11.0075C3.10126 10.9356 3.16806 10.8649 3.23317 10.7959L3.29772 10.7276C3.55763 10.4525 3.78639 10.2126 4.00232 10.0087C4.22016 9.80294 4.39412 9.66364 4.53524 9.57742C4.63352 9.51738 4.69022 9.49897 4.71275 9.49345C4.76387 9.49804 4.81803 9.51537 4.90343 9.56162C4.96409 9.59447 5.02355 9.63225 5.11802 9.69238L5.12363 9.69595C5.20522 9.74789 5.32771 9.82587 5.46078 9.89278C5.76529 10.0459 6.21427 10.186 6.74977 10.0158C7.21485 9.86796 7.59367 9.52979 7.92525 9.14195C8.91377 7.98571 9.38267 7.80495 9.64941 7.81733C9.7858 7.82366 10.0101 7.884 10.3703 8.14825Z" fill="currentColor"/>
|
||||
</svg>`;export{l as imageSvg};
|
||||
2
dist/assets/index-4N_q9Ijm.js
vendored
Normal file
2
dist/assets/index-4N_q9Ijm.js
vendored
Normal file
File diff suppressed because one or more lines are too long
143
dist/assets/index-BGGOaaWA.js
vendored
Normal file
143
dist/assets/index-BGGOaaWA.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/index-BXHa4upX.css
vendored
Normal file
1
dist/assets/index-BXHa4upX.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/index-COonna6N.js
vendored
Normal file
1
dist/assets/index-COonna6N.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/index-Cl4M8jG7.js
vendored
Normal file
1
dist/assets/index-Cl4M8jG7.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/assets/index-CqL7mnh0.js
vendored
Normal file
2
dist/assets/index-CqL7mnh0.js
vendored
Normal file
File diff suppressed because one or more lines are too long
8205
dist/assets/index-Cr5N_0pd.js
vendored
Normal file
8205
dist/assets/index-Cr5N_0pd.js
vendored
Normal file
File diff suppressed because one or more lines are too long
8
dist/assets/index-DCwOSe4Q.js
vendored
Normal file
8
dist/assets/index-DCwOSe4Q.js
vendored
Normal file
File diff suppressed because one or more lines are too long
35
dist/assets/index-DUeQylCA.js
vendored
Normal file
35
dist/assets/index-DUeQylCA.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
dist/assets/index-Dl0F4g05.js
vendored
Normal file
7
dist/assets/index-Dl0F4g05.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/index-sYri9oP4.js
vendored
Normal file
1
dist/assets/index-sYri9oP4.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
dist/assets/info-BzF0mPAp.js
vendored
Normal file
3
dist/assets/info-BzF0mPAp.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import{b as C}from"./index-Cr5N_0pd.js";const t=C`<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9.125 6.875C9.125 6.57833 9.21298 6.28832 9.3778 6.04165C9.54262 5.79497 9.77689 5.60271 10.051 5.48918C10.3251 5.37565 10.6267 5.34594 10.9176 5.40382C11.2086 5.4617 11.4759 5.60456 11.6857 5.81434C11.8954 6.02412 12.0383 6.29139 12.0962 6.58236C12.1541 6.87334 12.1244 7.17494 12.0108 7.44903C11.8973 7.72311 11.705 7.95738 11.4584 8.1222C11.2117 8.28703 10.9217 8.375 10.625 8.375C10.2272 8.375 9.84565 8.21696 9.56434 7.93566C9.28304 7.65436 9.125 7.27282 9.125 6.875ZM21.125 11C21.125 13.0025 20.5312 14.9601 19.4186 16.6251C18.3061 18.2902 16.7248 19.5879 14.8747 20.3543C13.0246 21.1206 10.9888 21.3211 9.02471 20.9305C7.06066 20.5398 5.25656 19.5755 3.84055 18.1595C2.42454 16.7435 1.46023 14.9393 1.06955 12.9753C0.678878 11.0112 0.879387 8.97543 1.64572 7.12533C2.41206 5.27523 3.70981 3.69392 5.37486 2.58137C7.0399 1.46882 8.99747 0.875 11 0.875C13.6844 0.877978 16.258 1.94567 18.1562 3.84383C20.0543 5.74199 21.122 8.3156 21.125 11ZM18.875 11C18.875 9.44247 18.4131 7.91992 17.5478 6.62488C16.6825 5.32985 15.4526 4.32049 14.0136 3.72445C12.5747 3.12841 10.9913 2.97246 9.46367 3.27632C7.93607 3.58017 6.53288 4.3302 5.43154 5.43153C4.3302 6.53287 3.58018 7.93606 3.27632 9.46366C2.97246 10.9913 3.12841 12.5747 3.72445 14.0136C4.32049 15.4526 5.32985 16.6825 6.62489 17.5478C7.91993 18.4131 9.44248 18.875 11 18.875C13.0879 18.8728 15.0896 18.0424 16.566 16.566C18.0424 15.0896 18.8728 13.0879 18.875 11ZM12.125 14.4387V11.375C12.125 10.8777 11.9275 10.4008 11.5758 10.0492C11.2242 9.69754 10.7473 9.5 10.25 9.5C9.98433 9.4996 9.72708 9.59325 9.52383 9.76435C9.32058 9.93544 9.18444 10.173 9.13952 10.4348C9.09461 10.6967 9.14381 10.966 9.27843 11.195C9.41304 11.4241 9.62438 11.5981 9.875 11.6863V14.75C9.875 15.2473 10.0725 15.7242 10.4242 16.0758C10.7758 16.4275 11.2527 16.625 11.75 16.625C12.0157 16.6254 12.2729 16.5318 12.4762 16.3607C12.6794 16.1896 12.8156 15.952 12.8605 15.6902C12.9054 15.4283 12.8562 15.159 12.7216 14.93C12.587 14.7009 12.3756 14.5269 12.125 14.4387Z" fill="currentColor"/>
|
||||
</svg>`;export{t as infoSvg};
|
||||
12
dist/assets/info-circle-CXT71X33.js
vendored
Normal file
12
dist/assets/info-circle-CXT71X33.js
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const e=l`<svg fill="none" viewBox="0 0 14 15">
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M6 10.49a1 1 0 1 0 2 0v-2a1 1 0 0 0-2 0v2ZM7 4.49a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"
|
||||
/>
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M7 14.99a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5-7a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{e as infoCircleSvg};
|
||||
3
dist/assets/lightbulb-DXUATdFd.js
vendored
Normal file
3
dist/assets/lightbulb-DXUATdFd.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import{b as C}from"./index-Cr5N_0pd.js";const e=C`<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.00177 1.78569C3.8179 1.78569 2.85819 2.74508 2.85819 3.92855C2.85819 4.52287 3.09928 5.05956 3.49077 5.4485L3.5005 5.45817C3.64381 5.60054 3.76515 5.72108 3.85631 5.81845C3.93747 5.90512 4.05255 6.03218 4.12889 6.1805C4.16999 6.26034 4.19 6.30843 4.21768 6.39385C4.22145 6.40546 4.22499 6.41703 4.22833 6.42855H5.77521C5.77854 6.41703 5.78208 6.40547 5.78585 6.39385C5.81353 6.30843 5.83354 6.26034 5.87464 6.1805C5.95098 6.03218 6.06606 5.90512 6.14722 5.81845C6.23839 5.72108 6.35973 5.60053 6.50304 5.45816L6.51276 5.4485C6.90425 5.05956 7.14534 4.52287 7.14534 3.92855C7.14534 2.74508 6.18563 1.78569 5.00177 1.78569ZM5.71629 7.85712H4.28724C4.28724 8.21403 4.28876 8.40985 4.30703 8.54571C4.30727 8.54748 4.30751 8.54921 4.30774 8.55091C4.30944 8.55115 4.31118 8.55138 4.31295 8.55162C4.44884 8.56989 4.64474 8.5714 5.00177 8.5714C5.3588 8.5714 5.55469 8.56989 5.69059 8.55162C5.69236 8.55138 5.69409 8.55115 5.69579 8.55091C5.69603 8.54921 5.69627 8.54748 5.6965 8.54571C5.71477 8.40985 5.71629 8.21403 5.71629 7.85712ZM2.85819 7.14283C2.85819 6.9948 2.85796 6.91114 2.8548 6.85032C2.85461 6.84656 2.85441 6.84309 2.85421 6.83988C2.84393 6.8282 2.83047 6.81334 2.81301 6.79469C2.74172 6.71856 2.63908 6.61643 2.48342 6.46178C1.83307 5.81566 1.42914 4.91859 1.42914 3.92855C1.42914 1.9561 3.02866 0.357117 5.00177 0.357117C6.97487 0.357117 8.57439 1.9561 8.57439 3.92855C8.57439 4.91859 8.17047 5.81566 7.52012 6.46178C7.36445 6.61643 7.26182 6.71856 7.19053 6.79469C7.17306 6.81334 7.1596 6.8282 7.14932 6.83988C7.14912 6.84309 7.14892 6.84656 7.14873 6.85032C7.14557 6.91114 7.14534 6.9948 7.14534 7.14283V7.85712C7.14534 7.87009 7.14535 7.88304 7.14535 7.89598C7.14541 8.19889 7.14547 8.49326 7.11281 8.73606C7.076 9.00978 6.98631 9.32212 6.72678 9.58156C6.46726 9.841 6.15481 9.93065 5.881 9.96745C5.63813 10.0001 5.34365 10 5.04064 9.99998C5.0277 9.99998 5.01474 9.99998 5.00177 9.99998C4.98879 9.99998 4.97583 9.99998 4.96289 9.99998C4.65988 10 4.36541 10.0001 4.12253 9.96745C3.84872 9.93065 3.53628 9.841 3.27675 9.58156C3.01722 9.32212 2.92753 9.00978 2.89072 8.73606C2.85807 8.49326 2.85812 8.19889 2.85818 7.89598C2.85819 7.88304 2.85819 7.87008 2.85819 7.85712V7.14283ZM7.1243 6.86977C7.12366 6.87069 7.1233 6.87116 7.12327 6.87119C7.12323 6.87123 7.12356 6.87076 7.1243 6.86977ZM2.88027 6.8712C2.88025 6.87119 2.87988 6.8707 2.87921 6.86975C2.87995 6.87072 2.88028 6.8712 2.88027 6.8712Z" fill="#949E9E"/>
|
||||
</svg>`;export{e as lightbulbSvg};
|
||||
8
dist/assets/mail-D5Kz7lp0.js
vendored
Normal file
8
dist/assets/mail-D5Kz7lp0.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as c}from"./index-Cr5N_0pd.js";const e=c`<svg fill="none" viewBox="0 0 16 16">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M4.83 1.34h6.34c.68 0 1.26 0 1.73.04.5.05.97.15 1.42.4.52.3.95.72 1.24 1.24.26.45.35.92.4 1.42.04.47.04 1.05.04 1.73v3.71c0 .69 0 1.26-.04 1.74-.05.5-.14.97-.4 1.41-.3.52-.72.95-1.24 1.25-.45.25-.92.35-1.42.4-.47.03-1.05.03-1.73.03H4.83c-.68 0-1.26 0-1.73-.04-.5-.04-.97-.14-1.42-.4-.52-.29-.95-.72-1.24-1.24a3.39 3.39 0 0 1-.4-1.41A20.9 20.9 0 0 1 0 9.88v-3.7c0-.7 0-1.27.04-1.74.05-.5.14-.97.4-1.42.3-.52.72-.95 1.24-1.24.45-.25.92-.35 1.42-.4.47-.04 1.05-.04 1.73-.04ZM3.28 3.38c-.36.03-.51.08-.6.14-.21.11-.39.29-.5.5a.8.8 0 0 0-.08.19l5.16 3.44c.45.3 1.03.3 1.48 0L13.9 4.2a.79.79 0 0 0-.08-.2c-.11-.2-.29-.38-.5-.5-.09-.05-.24-.1-.6-.13-.37-.04-.86-.04-1.6-.04H4.88c-.73 0-1.22 0-1.6.04ZM14 6.54 9.85 9.31a3.33 3.33 0 0 1-3.7 0L2 6.54v3.3c0 .74 0 1.22.03 1.6.04.36.1.5.15.6.11.2.29.38.5.5.09.05.24.1.6.14.37.03.86.03 1.6.03h6.25c.73 0 1.22 0 1.6-.03.35-.03.5-.09.6-.14.2-.12.38-.3.5-.5.05-.1.1-.24.14-.6.03-.38.03-.86.03-1.6v-3.3Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{e as mailSvg};
|
||||
9
dist/assets/mobile-iSKvjbUf.js
vendored
Normal file
9
dist/assets/mobile-iSKvjbUf.js
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const e=l`<svg fill="none" viewBox="0 0 20 20">
|
||||
<path fill="currentColor" d="M10.81 5.81a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z" />
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M3 4.75A4.75 4.75 0 0 1 7.75 0h4.5A4.75 4.75 0 0 1 17 4.75v10.5A4.75 4.75 0 0 1 12.25 20h-4.5A4.75 4.75 0 0 1 3 15.25V4.75ZM7.75 2A2.75 2.75 0 0 0 5 4.75v10.5A2.75 2.75 0 0 0 7.75 18h4.5A2.75 2.75 0 0 0 15 15.25V4.75A2.75 2.75 0 0 0 12.25 2h-4.5Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{e as mobileSvg};
|
||||
11
dist/assets/more-C8OTKC0g.js
vendored
Normal file
11
dist/assets/more-C8OTKC0g.js
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const a=l`<svg fill="none" viewBox="0 0 41 40">
|
||||
<path
|
||||
style="fill: var(--wui-color-fg-100);"
|
||||
fill-opacity=".05"
|
||||
d="M.6 20a20 20 0 1 1 40 0 20 20 0 0 1-40 0Z"
|
||||
/>
|
||||
<path
|
||||
fill="#949E9E"
|
||||
d="M15.6 20.31a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM23.1 20.31a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM28.1 22.81a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"
|
||||
/>
|
||||
</svg>`;export{a as moreSvg};
|
||||
14
dist/assets/network-placeholder-C3ZqCyor.js
vendored
Normal file
14
dist/assets/network-placeholder-C3ZqCyor.js
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const e=l`<svg fill="none" viewBox="0 0 22 20">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M16.32 13.62a3.14 3.14 0 1 1-.99 1.72l-1.6-.93a3.83 3.83 0 0 1-3.71 1 3.66 3.66 0 0 1-1.74-1l-1.6.94a3.14 3.14 0 1 1-1-1.73l1.6-.94a3.7 3.7 0 0 1 0-2 3.81 3.81 0 0 1 1.8-2.33c.29-.17.6-.3.92-.38V6.1a3.14 3.14 0 1 1 2 0l-.01.02v1.85H12a3.82 3.82 0 0 1 2.33 1.8 3.7 3.7 0 0 1 .39 2.91l1.6.93ZM2.6 16.54a1.14 1.14 0 0 0 1.98-1.14 1.14 1.14 0 0 0-1.98 1.14ZM11 2.01a1.14 1.14 0 1 0 0 2.28 1.14 1.14 0 0 0 0-2.28Zm1.68 10.45c.08-.19.14-.38.16-.58v-.05l.02-.13v-.13a1.92 1.92 0 0 0-.24-.8l-.11-.15a1.89 1.89 0 0 0-.74-.6 1.86 1.86 0 0 0-.77-.17h-.19a1.97 1.97 0 0 0-.89.34 1.98 1.98 0 0 0-.61.74 1.99 1.99 0 0 0-.16.9v.05a1.87 1.87 0 0 0 .24.74l.1.15c.12.16.26.3.42.42l.16.1.13.07.04.02a1.84 1.84 0 0 0 .76.17h.17a2 2 0 0 0 .91-.35 1.78 1.78 0 0 0 .52-.58l.03-.05a.84.84 0 0 0 .05-.11Zm5.15 4.5a1.14 1.14 0 0 0 1.14-1.97 1.13 1.13 0 0 0-1.55.41c-.32.55-.13 1.25.41 1.56Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M4.63 9.43a1.5 1.5 0 1 0 1.5-2.6 1.5 1.5 0 0 0-1.5 2.6Zm.32-1.55a.5.5 0 0 1 .68-.19.5.5 0 0 1 .18.68.5.5 0 0 1-.68.19.5.5 0 0 1-.18-.68ZM17.94 8.88a1.5 1.5 0 1 1-2.6-1.5 1.5 1.5 0 1 1 2.6 1.5ZM16.9 7.69a.5.5 0 0 0-.68.19.5.5 0 0 0 .18.68.5.5 0 0 0 .68-.19.5.5 0 0 0-.18-.68ZM9.75 17.75a1.5 1.5 0 1 1 2.6 1.5 1.5 1.5 0 1 1-2.6-1.5Zm1.05 1.18a.5.5 0 0 0 .68-.18.5.5 0 0 0-.18-.68.5.5 0 0 0-.68.18.5.5 0 0 0 .18.68Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{e as networkPlaceholderSvg};
|
||||
8
dist/assets/nftPlaceholder-1Liwzove.js
vendored
Normal file
8
dist/assets/nftPlaceholder-1Liwzove.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as c}from"./index-Cr5N_0pd.js";const a=c`<svg fill="none" viewBox="0 0 20 20">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M9.13 1h1.71c1.46 0 2.63 0 3.56.1.97.1 1.8.33 2.53.85a5 5 0 0 1 1.1 1.11c.53.73.75 1.56.86 2.53.1.93.1 2.1.1 3.55v1.72c0 1.45 0 2.62-.1 3.55-.1.97-.33 1.8-.86 2.53a5 5 0 0 1-1.1 1.1c-.73.53-1.56.75-2.53.86-.93.1-2.1.1-3.55.1H9.13c-1.45 0-2.62 0-3.56-.1-.96-.1-1.8-.33-2.52-.85a5 5 0 0 1-1.1-1.11 5.05 5.05 0 0 1-.86-2.53c-.1-.93-.1-2.1-.1-3.55V9.14c0-1.45 0-2.62.1-3.55.1-.97.33-1.8.85-2.53a5 5 0 0 1 1.1-1.1 5.05 5.05 0 0 1 2.53-.86C6.51 1 7.67 1 9.13 1ZM5.79 3.09a3.1 3.1 0 0 0-1.57.48 3 3 0 0 0-.66.67c-.24.32-.4.77-.48 1.56-.1.82-.1 1.88-.1 3.4v1.6c0 1.15 0 2.04.05 2.76l.41-.42c.5-.5.93-.92 1.32-1.24.41-.33.86-.6 1.43-.7a3 3 0 0 1 .94 0c.35.06.66.2.95.37a17.11 17.11 0 0 0 .8.45c.1-.08.2-.2.41-.4l.04-.03a27 27 0 0 1 1.95-1.84 4.03 4.03 0 0 1 1.91-.94 4 4 0 0 1 1.25 0c.73.11 1.33.46 1.91.94l.64.55V9.2c0-1.52 0-2.58-.1-3.4a3.1 3.1 0 0 0-.48-1.56 3 3 0 0 0-.66-.67 3.1 3.1 0 0 0-1.56-.48C13.37 3 12.3 3 10.79 3h-1.6c-1.52 0-2.59 0-3.4.09Zm11.18 10-.04-.05a26.24 26.24 0 0 0-1.83-1.74c-.45-.36-.73-.48-.97-.52a2 2 0 0 0-.63 0c-.24.04-.51.16-.97.52-.46.38-1.01.93-1.83 1.74l-.02.02c-.17.18-.34.34-.49.47a2.04 2.04 0 0 1-1.08.5 1.97 1.97 0 0 1-1.25-.27l-.79-.46-.02-.02a.65.65 0 0 0-.24-.1 1 1 0 0 0-.31 0c-.08.02-.21.06-.49.28-.3.24-.65.59-1.2 1.14l-.56.56-.65.66a3 3 0 0 0 .62.6c.33.24.77.4 1.57.49.81.09 1.88.09 3.4.09h1.6c1.52 0 2.58 0 3.4-.09a3.1 3.1 0 0 0 1.56-.48 3 3 0 0 0 .66-.67c.24-.32.4-.77.49-1.56l.07-1.12Zm-8.02-1.03ZM4.99 7a2 2 0 1 1 4 0 2 2 0 0 1-4 0Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{a as nftPlaceholderSvg};
|
||||
4
dist/assets/off-DkfF0_gL.js
vendored
Normal file
4
dist/assets/off-DkfF0_gL.js
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import{b as C}from"./index-Cr5N_0pd.js";const l=C`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.99792 0C8.6291 0 9.14077 0.511675 9.14077 1.14286V6.41758C9.14077 7.04877 8.6291 7.56044 7.99792 7.56044C7.36673 7.56044 6.85506 7.04877 6.85506 6.41758V1.14286C6.85506 0.511675 7.36673 0 7.99792 0ZM5.44952 2.61998C5.79899 3.14558 5.6562 3.85497 5.1306 4.20444C3.73012 5.1356 2.8111 6.72446 2.8111 8.52747C2.8111 11.3921 5.13332 13.7143 7.99792 13.7143C10.8625 13.7143 13.1847 11.3921 13.1847 8.52747C13.1847 6.72446 12.2657 5.1356 10.8652 4.20444C10.3396 3.85497 10.1968 3.14558 10.5463 2.61998C10.8958 2.09437 11.6052 1.95158 12.1308 2.30105C14.1414 3.63786 15.4704 5.92721 15.4704 8.52747C15.4704 12.6544 12.1249 16 7.99792 16C3.87095 16 0.525391 12.6544 0.525391 8.52747C0.525391 5.92721 1.85448 3.63786 3.86506 2.30105C4.39066 1.95158 5.10005 2.09437 5.44952 2.61998Z" fill="currentColor"/>
|
||||
</svg>
|
||||
`;export{l as offSvg};
|
||||
468
dist/assets/onramp-BiRdNRiA.js
vendored
Normal file
468
dist/assets/onramp-BiRdNRiA.js
vendored
Normal file
@ -0,0 +1,468 @@
|
||||
import{i as P,a as y,aG as l,aH as $,am as j,aj as _,x as u,a9 as h,ap as C,aa as c,c as b,a5 as p,K as I,a6 as M,a0 as E,a1 as z,a2 as N,T as W,L as U,$ as q,a8 as F,R as B}from"./index-Cr5N_0pd.js";const K=P`
|
||||
:host > wui-grid {
|
||||
max-height: 360px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
wui-flex {
|
||||
transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
|
||||
will-change: opacity;
|
||||
}
|
||||
|
||||
wui-grid::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
wui-flex.disabled {
|
||||
opacity: 0.3;
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
}
|
||||
`;var A=function(s,e,i,r){var n=arguments.length,t=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(s,e,i,r);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(t=(n<3?o(t):n>3?o(e,i,t):o(e,i))||t);return n>3&&t&&Object.defineProperty(e,i,t),t};let k=class extends y{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=l.state.paymentCurrency,this.currencies=l.state.paymentCurrencies,this.currencyImages=$.state.currencyImages,this.checked=j.state.isLegalCheckboxChecked,this.unsubscribe.push(l.subscribe(e=>{this.selectedCurrency=e.paymentCurrency,this.currencies=e.paymentCurrencies}),$.subscribeKey("currencyImages",e=>this.currencyImages=e),j.subscribeKey("isLegalCheckboxChecked",e=>{this.checked=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const{termsConditionsUrl:e,privacyPolicyUrl:i}=_.state,r=_.state.features?.legalCheckbox,o=!!(e||i)&&!!r&&!this.checked;return u`
|
||||
<w3m-legal-checkbox></w3m-legal-checkbox>
|
||||
<wui-flex
|
||||
flexDirection="column"
|
||||
.padding=${["0","s","s","s"]}
|
||||
gap="xs"
|
||||
class=${h(o?"disabled":void 0)}
|
||||
>
|
||||
${this.currenciesTemplate(o)}
|
||||
</wui-flex>
|
||||
<w3m-legal-footer></w3m-legal-footer>
|
||||
`}currenciesTemplate(e=!1){return this.currencies.map(i=>u`
|
||||
<wui-list-item
|
||||
imageSrc=${h(this.currencyImages?.[i.id])}
|
||||
@click=${()=>this.selectCurrency(i)}
|
||||
variant="image"
|
||||
tabIdx=${h(e?-1:void 0)}
|
||||
>
|
||||
<wui-text variant="paragraph-500" color="fg-100">${i.id}</wui-text>
|
||||
</wui-list-item>
|
||||
`)}selectCurrency(e){e&&(l.setPaymentCurrency(e),C.close())}};k.styles=K;A([c()],k.prototype,"selectedCurrency",void 0);A([c()],k.prototype,"currencies",void 0);A([c()],k.prototype,"currencyImages",void 0);A([c()],k.prototype,"checked",void 0);k=A([b("w3m-onramp-fiat-select-view")],k);const Y=P`
|
||||
button {
|
||||
padding: var(--wui-spacing-s);
|
||||
border-radius: var(--wui-border-radius-xs);
|
||||
border: none;
|
||||
outline: none;
|
||||
background-color: var(--wui-color-gray-glass-002);
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
gap: var(--wui-spacing-s);
|
||||
transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
|
||||
will-change: background-color;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: var(--wui-color-gray-glass-005);
|
||||
}
|
||||
|
||||
.provider-image {
|
||||
width: var(--wui-spacing-3xl);
|
||||
min-width: var(--wui-spacing-3xl);
|
||||
height: var(--wui-spacing-3xl);
|
||||
border-radius: calc(var(--wui-border-radius-xs) - calc(var(--wui-spacing-s) / 2));
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.provider-image::after {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: calc(var(--wui-border-radius-xs) - calc(var(--wui-spacing-s) / 2));
|
||||
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
|
||||
}
|
||||
|
||||
.network-icon {
|
||||
width: var(--wui-spacing-m);
|
||||
height: var(--wui-spacing-m);
|
||||
border-radius: calc(var(--wui-spacing-m) / 2);
|
||||
overflow: hidden;
|
||||
box-shadow:
|
||||
0 0 0 3px var(--wui-color-gray-glass-002),
|
||||
0 0 0 3px var(--wui-color-modal-bg);
|
||||
transition: box-shadow var(--wui-ease-out-power-1) var(--wui-duration-md);
|
||||
will-change: box-shadow;
|
||||
}
|
||||
|
||||
button:hover .network-icon {
|
||||
box-shadow:
|
||||
0 0 0 3px var(--wui-color-gray-glass-005),
|
||||
0 0 0 3px var(--wui-color-modal-bg);
|
||||
}
|
||||
`;var v=function(s,e,i,r){var n=arguments.length,t=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(s,e,i,r);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(t=(n<3?o(t):n>3?o(e,i,t):o(e,i))||t);return n>3&&t&&Object.defineProperty(e,i,t),t};let m=class extends y{constructor(){super(...arguments),this.disabled=!1,this.color="inherit",this.label="",this.feeRange="",this.loading=!1,this.onClick=null}render(){return u`
|
||||
<button ?disabled=${this.disabled} @click=${this.onClick} ontouchstart>
|
||||
<wui-visual name=${h(this.name)} class="provider-image"></wui-visual>
|
||||
<wui-flex flexDirection="column" gap="4xs">
|
||||
<wui-text variant="paragraph-500" color="fg-100">${this.label}</wui-text>
|
||||
<wui-flex alignItems="center" justifyContent="flex-start" gap="l">
|
||||
<wui-text variant="tiny-500" color="fg-100">
|
||||
<wui-text variant="tiny-400" color="fg-200">Fees</wui-text>
|
||||
${this.feeRange}
|
||||
</wui-text>
|
||||
<wui-flex gap="xxs">
|
||||
<wui-icon name="bank" size="xs" color="fg-150"></wui-icon>
|
||||
<wui-icon name="card" size="xs" color="fg-150"></wui-icon>
|
||||
</wui-flex>
|
||||
${this.networksTemplate()}
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
${this.loading?u`<wui-loading-spinner color="fg-200" size="md"></wui-loading-spinner>`:u`<wui-icon name="chevronRight" color="fg-200" size="sm"></wui-icon>`}
|
||||
</button>
|
||||
`}networksTemplate(){const i=I.getAllRequestedCaipNetworks()?.filter(r=>r?.assets?.imageId)?.slice(0,5);return u`
|
||||
<wui-flex class="networks">
|
||||
${i?.map(r=>u`
|
||||
<wui-flex class="network-icon">
|
||||
<wui-image src=${h(M.getNetworkImage(r))}></wui-image>
|
||||
</wui-flex>
|
||||
`)}
|
||||
</wui-flex>
|
||||
`}};m.styles=[Y];v([p({type:Boolean})],m.prototype,"disabled",void 0);v([p()],m.prototype,"color",void 0);v([p()],m.prototype,"name",void 0);v([p()],m.prototype,"label",void 0);v([p()],m.prototype,"feeRange",void 0);v([p({type:Boolean})],m.prototype,"loading",void 0);v([p()],m.prototype,"onClick",void 0);m=v([b("w3m-onramp-provider-item")],m);const H=P`
|
||||
wui-flex {
|
||||
border-top: 1px solid var(--wui-color-gray-glass-005);
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: var(--wui-color-fg-175);
|
||||
font-weight: 500;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--wui-spacing-3xs);
|
||||
}
|
||||
`;var Q=function(s,e,i,r){var n=arguments.length,t=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(s,e,i,r);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(t=(n<3?o(t):n>3?o(e,i,t):o(e,i))||t);return n>3&&t&&Object.defineProperty(e,i,t),t};let L=class extends y{render(){const{termsConditionsUrl:e,privacyPolicyUrl:i}=_.state;return!e&&!i?null:u`
|
||||
<wui-flex
|
||||
.padding=${["m","s","s","s"]}
|
||||
flexDirection="column"
|
||||
alignItems="center"
|
||||
justifyContent="center"
|
||||
gap="s"
|
||||
>
|
||||
<wui-text color="fg-250" variant="small-400" align="center">
|
||||
We work with the best providers to give you the lowest fees and best support. More options
|
||||
coming soon!
|
||||
</wui-text>
|
||||
|
||||
${this.howDoesItWorkTemplate()}
|
||||
</wui-flex>
|
||||
`}howDoesItWorkTemplate(){return u` <wui-link @click=${this.onWhatIsBuy.bind(this)}>
|
||||
<wui-icon size="xs" color="accent-100" slot="iconLeft" name="helpCircle"></wui-icon>
|
||||
How does it work?
|
||||
</wui-link>`}onWhatIsBuy(){E.sendEvent({type:"track",event:"SELECT_WHAT_IS_A_BUY",properties:{isSmartAccount:z(I.state.activeChain)===N.ACCOUNT_TYPES.SMART_ACCOUNT}}),W.push("WhatIsABuy")}};L.styles=[H];L=Q([b("w3m-onramp-providers-footer")],L);var V=function(s,e,i,r){var n=arguments.length,t=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(s,e,i,r);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(t=(n<3?o(t):n>3?o(e,i,t):o(e,i))||t);return n>3&&t&&Object.defineProperty(e,i,t),t};let S=class extends y{constructor(){super(),this.unsubscribe=[],this.providers=l.state.providers,this.unsubscribe.push(l.subscribeKey("providers",e=>{this.providers=e}))}render(){return u`
|
||||
<wui-flex flexDirection="column" .padding=${["0","s","s","s"]} gap="xs">
|
||||
${this.onRampProvidersTemplate()}
|
||||
</wui-flex>
|
||||
<w3m-onramp-providers-footer></w3m-onramp-providers-footer>
|
||||
`}onRampProvidersTemplate(){return this.providers.filter(e=>e.supportedChains.includes(I.state.activeChain??"eip155")).map(e=>u`
|
||||
<w3m-onramp-provider-item
|
||||
label=${e.label}
|
||||
name=${e.name}
|
||||
feeRange=${e.feeRange}
|
||||
@click=${()=>{this.onClickProvider(e)}}
|
||||
?disabled=${!e.url}
|
||||
data-testid=${`onramp-provider-${e.name}`}
|
||||
></w3m-onramp-provider-item>
|
||||
`)}onClickProvider(e){l.setSelectedProvider(e),W.push("BuyInProgress"),U.openHref(l.state.selectedProvider?.url||e.url,"popupWindow","width=600,height=800,scrollbars=yes"),E.sendEvent({type:"track",event:"SELECT_BUY_PROVIDER",properties:{provider:e.name,isSmartAccount:z(I.state.activeChain)===N.ACCOUNT_TYPES.SMART_ACCOUNT}})}};V([c()],S.prototype,"providers",void 0);S=V([b("w3m-onramp-providers-view")],S);const X=P`
|
||||
:host > wui-grid {
|
||||
max-height: 360px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
wui-flex {
|
||||
transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
|
||||
will-change: opacity;
|
||||
}
|
||||
|
||||
wui-grid::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
wui-flex.disabled {
|
||||
opacity: 0.3;
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
}
|
||||
`;var T=function(s,e,i,r){var n=arguments.length,t=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(s,e,i,r);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(t=(n<3?o(t):n>3?o(e,i,t):o(e,i))||t);return n>3&&t&&Object.defineProperty(e,i,t),t};let R=class extends y{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=l.state.purchaseCurrencies,this.tokens=l.state.purchaseCurrencies,this.tokenImages=$.state.tokenImages,this.checked=j.state.isLegalCheckboxChecked,this.unsubscribe.push(l.subscribe(e=>{this.selectedCurrency=e.purchaseCurrencies,this.tokens=e.purchaseCurrencies}),$.subscribeKey("tokenImages",e=>this.tokenImages=e),j.subscribeKey("isLegalCheckboxChecked",e=>{this.checked=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const{termsConditionsUrl:e,privacyPolicyUrl:i}=_.state,r=_.state.features?.legalCheckbox,o=!!(e||i)&&!!r&&!this.checked;return u`
|
||||
<w3m-legal-checkbox></w3m-legal-checkbox>
|
||||
<wui-flex
|
||||
flexDirection="column"
|
||||
.padding=${["0","s","s","s"]}
|
||||
gap="xs"
|
||||
class=${h(o?"disabled":void 0)}
|
||||
>
|
||||
${this.currenciesTemplate(o)}
|
||||
</wui-flex>
|
||||
<w3m-legal-footer></w3m-legal-footer>
|
||||
`}currenciesTemplate(e=!1){return this.tokens.map(i=>u`
|
||||
<wui-list-item
|
||||
imageSrc=${h(this.tokenImages?.[i.symbol])}
|
||||
@click=${()=>this.selectToken(i)}
|
||||
variant="image"
|
||||
tabIdx=${h(e?-1:void 0)}
|
||||
>
|
||||
<wui-flex gap="3xs" alignItems="center">
|
||||
<wui-text variant="paragraph-500" color="fg-100">${i.name}</wui-text>
|
||||
<wui-text variant="small-400" color="fg-200">${i.symbol}</wui-text>
|
||||
</wui-flex>
|
||||
</wui-list-item>
|
||||
`)}selectToken(e){e&&(l.setPurchaseCurrency(e),C.close())}};R.styles=X;T([c()],R.prototype,"selectedCurrency",void 0);T([c()],R.prototype,"tokens",void 0);T([c()],R.prototype,"tokenImages",void 0);T([c()],R.prototype,"checked",void 0);R=T([b("w3m-onramp-token-select-view")],R);const G=P`
|
||||
@keyframes shake {
|
||||
0% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
25% {
|
||||
transform: translateX(3px);
|
||||
}
|
||||
50% {
|
||||
transform: translateX(-3px);
|
||||
}
|
||||
75% {
|
||||
transform: translateX(3px);
|
||||
}
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
wui-flex:first-child:not(:only-child) {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
wui-loading-thumbnail {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
wui-visual {
|
||||
width: var(--wui-wallet-image-size-lg);
|
||||
height: var(--wui-wallet-image-size-lg);
|
||||
border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs));
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
wui-visual::after {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs));
|
||||
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
|
||||
}
|
||||
|
||||
wui-icon-box {
|
||||
position: absolute;
|
||||
right: calc(var(--wui-spacing-3xs) * -1);
|
||||
bottom: calc(var(--wui-spacing-3xs) * -1);
|
||||
opacity: 0;
|
||||
transform: scale(0.5);
|
||||
transition:
|
||||
opacity var(--wui-ease-out-power-2) var(--wui-duration-lg),
|
||||
transform var(--wui-ease-out-power-2) var(--wui-duration-lg);
|
||||
will-change: opacity, transform;
|
||||
}
|
||||
|
||||
wui-text[align='center'] {
|
||||
width: 100%;
|
||||
padding: 0px var(--wui-spacing-l);
|
||||
}
|
||||
|
||||
[data-error='true'] wui-icon-box {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
[data-error='true'] > wui-flex:first-child {
|
||||
animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
|
||||
}
|
||||
|
||||
[data-retry='false'] wui-link {
|
||||
display: none;
|
||||
}
|
||||
|
||||
[data-retry='true'] wui-link {
|
||||
display: block;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
wui-link {
|
||||
padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs);
|
||||
}
|
||||
`;var f=function(s,e,i,r){var n=arguments.length,t=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(s,e,i,r);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(t=(n<3?o(t):n>3?o(e,i,t):o(e,i))||t);return n>3&&t&&Object.defineProperty(e,i,t),t};let d=class extends y{constructor(){super(),this.unsubscribe=[],this.selectedOnRampProvider=l.state.selectedProvider,this.uri=q.state.wcUri,this.ready=!1,this.showRetry=!1,this.buffering=!1,this.error=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(l.subscribeKey("selectedProvider",e=>{this.selectedOnRampProvider=e}))}disconnectedCallback(){this.intervalId&&clearInterval(this.intervalId)}render(){let e="Continue in external window";this.error?e="Buy failed":this.selectedOnRampProvider&&(e=`Buy in ${this.selectedOnRampProvider?.label}`);const i=this.error?"Buy can be declined from your side or due to and error on the provider app":"We’ll notify you once your Buy is processed";return u`
|
||||
<wui-flex
|
||||
data-error=${h(this.error)}
|
||||
data-retry=${this.showRetry}
|
||||
flexDirection="column"
|
||||
alignItems="center"
|
||||
.padding=${["3xl","xl","xl","xl"]}
|
||||
gap="xl"
|
||||
>
|
||||
<wui-flex justifyContent="center" alignItems="center">
|
||||
<wui-visual
|
||||
name=${h(this.selectedOnRampProvider?.name)}
|
||||
size="lg"
|
||||
class="provider-image"
|
||||
>
|
||||
</wui-visual>
|
||||
|
||||
${this.error?null:this.loaderTemplate()}
|
||||
|
||||
<wui-icon-box
|
||||
backgroundColor="error-100"
|
||||
background="opaque"
|
||||
iconColor="error-100"
|
||||
icon="close"
|
||||
size="sm"
|
||||
border
|
||||
borderColor="wui-color-bg-125"
|
||||
></wui-icon-box>
|
||||
</wui-flex>
|
||||
|
||||
<wui-flex flexDirection="column" alignItems="center" gap="xs">
|
||||
<wui-text variant="paragraph-500" color=${this.error?"error-100":"fg-100"}>
|
||||
${e}
|
||||
</wui-text>
|
||||
<wui-text align="center" variant="small-500" color="fg-200">${i}</wui-text>
|
||||
</wui-flex>
|
||||
|
||||
${this.error?this.tryAgainTemplate():null}
|
||||
</wui-flex>
|
||||
|
||||
<wui-flex .padding=${["0","xl","xl","xl"]} justifyContent="center">
|
||||
<wui-link @click=${this.onCopyUri} color="fg-200">
|
||||
<wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon>
|
||||
Copy link
|
||||
</wui-link>
|
||||
</wui-flex>
|
||||
`}onTryAgain(){this.selectedOnRampProvider&&(this.error=!1,U.openHref(this.selectedOnRampProvider.url,"popupWindow","width=600,height=800,scrollbars=yes"))}tryAgainTemplate(){return this.selectedOnRampProvider?.url?u`<wui-button size="md" variant="accent" @click=${this.onTryAgain.bind(this)}>
|
||||
<wui-icon color="inherit" slot="iconLeft" name="refresh"></wui-icon>
|
||||
Try again
|
||||
</wui-button>`:null}loaderTemplate(){const e=F.state.themeVariables["--w3m-border-radius-master"],i=e?parseInt(e.replace("px",""),10):4;return u`<wui-loading-thumbnail radius=${i*9}></wui-loading-thumbnail>`}onCopyUri(){if(!this.selectedOnRampProvider?.url){B.showError("No link found"),W.goBack();return}try{U.copyToClopboard(this.selectedOnRampProvider.url),B.showSuccess("Link copied")}catch{B.showError("Failed to copy")}}};d.styles=G;f([c()],d.prototype,"intervalId",void 0);f([c()],d.prototype,"selectedOnRampProvider",void 0);f([c()],d.prototype,"uri",void 0);f([c()],d.prototype,"ready",void 0);f([c()],d.prototype,"showRetry",void 0);f([c()],d.prototype,"buffering",void 0);f([c()],d.prototype,"error",void 0);f([p({type:Boolean})],d.prototype,"isMobile",void 0);f([p()],d.prototype,"onRetry",void 0);d=f([b("w3m-buy-in-progress-view")],d);var J=function(s,e,i,r){var n=arguments.length,t=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(s,e,i,r);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(t=(n<3?o(t):n>3?o(e,i,t):o(e,i))||t);return n>3&&t&&Object.defineProperty(e,i,t),t};let D=class extends y{render(){return u`
|
||||
<wui-flex
|
||||
flexDirection="column"
|
||||
.padding=${["xxl","3xl","xl","3xl"]}
|
||||
alignItems="center"
|
||||
gap="xl"
|
||||
>
|
||||
<wui-visual name="onrampCard"></wui-visual>
|
||||
<wui-flex flexDirection="column" gap="xs" alignItems="center">
|
||||
<wui-text align="center" variant="paragraph-500" color="fg-100">
|
||||
Quickly and easily buy digital assets!
|
||||
</wui-text>
|
||||
<wui-text align="center" variant="small-400" color="fg-200">
|
||||
Simply select your preferred onramp provider and add digital assets to your account
|
||||
using your credit card or bank transfer
|
||||
</wui-text>
|
||||
</wui-flex>
|
||||
<wui-button @click=${W.goBack}>
|
||||
<wui-icon size="sm" color="inherit" name="add" slot="iconLeft"></wui-icon>
|
||||
Buy
|
||||
</wui-button>
|
||||
</wui-flex>
|
||||
`}};D=J([b("w3m-what-is-a-buy-view")],D);const Z=P`
|
||||
:host {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
wui-loading-spinner {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 20px;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.currency-container {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
right: var(--wui-spacing-1xs);
|
||||
height: 40px;
|
||||
padding: var(--wui-spacing-xs) var(--wui-spacing-1xs) var(--wui-spacing-xs)
|
||||
var(--wui-spacing-xs);
|
||||
min-width: 95px;
|
||||
border-radius: var(--FULL, 1000px);
|
||||
border: 1px solid var(--wui-color-gray-glass-002);
|
||||
background: var(--wui-color-gray-glass-002);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.currency-container > wui-image {
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
`;var O=function(s,e,i,r){var n=arguments.length,t=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(s,e,i,r);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(t=(n<3?o(t):n>3?o(e,i,t):o(e,i))||t);return n>3&&t&&Object.defineProperty(e,i,t),t};let g=class extends y{constructor(){super(),this.unsubscribe=[],this.type="Token",this.value=0,this.currencies=[],this.selectedCurrency=this.currencies?.[0],this.currencyImages=$.state.currencyImages,this.tokenImages=$.state.tokenImages,this.unsubscribe.push(l.subscribeKey("purchaseCurrency",e=>{!e||this.type==="Fiat"||(this.selectedCurrency=this.formatPurchaseCurrency(e))}),l.subscribeKey("paymentCurrency",e=>{!e||this.type==="Token"||(this.selectedCurrency=this.formatPaymentCurrency(e))}),l.subscribe(e=>{this.type==="Fiat"?this.currencies=e.purchaseCurrencies.map(this.formatPurchaseCurrency):this.currencies=e.paymentCurrencies.map(this.formatPaymentCurrency)}),$.subscribe(e=>{this.currencyImages={...e.currencyImages},this.tokenImages={...e.tokenImages}}))}firstUpdated(){l.getAvailableCurrencies()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.selectedCurrency?.symbol||"",i=this.currencyImages[e]||this.tokenImages[e];return u`<wui-input-text type="number" size="lg" value=${this.value}>
|
||||
${this.selectedCurrency?u` <wui-flex
|
||||
class="currency-container"
|
||||
justifyContent="space-between"
|
||||
alignItems="center"
|
||||
gap="xxs"
|
||||
@click=${()=>C.open({view:`OnRamp${this.type}Select`})}
|
||||
>
|
||||
<wui-image src=${h(i)}></wui-image>
|
||||
<wui-text color="fg-100">${this.selectedCurrency.symbol}</wui-text>
|
||||
</wui-flex>`:u`<wui-loading-spinner></wui-loading-spinner>`}
|
||||
</wui-input-text>`}formatPaymentCurrency(e){return{name:e.id,symbol:e.id}}formatPurchaseCurrency(e){return{name:e.name,symbol:e.symbol}}};g.styles=Z;O([p({type:String})],g.prototype,"type",void 0);O([p({type:Number})],g.prototype,"value",void 0);O([c()],g.prototype,"currencies",void 0);O([c()],g.prototype,"selectedCurrency",void 0);O([c()],g.prototype,"currencyImages",void 0);O([c()],g.prototype,"tokenImages",void 0);g=O([b("w3m-onramp-input")],g);const ee=P`
|
||||
:host > wui-flex {
|
||||
width: 100%;
|
||||
max-width: 360px;
|
||||
}
|
||||
|
||||
:host > wui-flex > wui-flex {
|
||||
border-radius: var(--wui-border-radius-l);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.amounts-container {
|
||||
width: 100%;
|
||||
}
|
||||
`;var x=function(s,e,i,r){var n=arguments.length,t=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(s,e,i,r);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(t=(n<3?o(t):n>3?o(e,i,t):o(e,i))||t);return n>3&&t&&Object.defineProperty(e,i,t),t};const te={USD:"$",EUR:"€",GBP:"£"},ie=[100,250,500,1e3];let w=class extends y{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.caipAddress=I.state.activeCaipAddress,this.loading=C.state.loading,this.paymentCurrency=l.state.paymentCurrency,this.paymentAmount=l.state.paymentAmount,this.purchaseAmount=l.state.purchaseAmount,this.quoteLoading=l.state.quotesLoading,this.unsubscribe.push(I.subscribeKey("activeCaipAddress",e=>this.caipAddress=e),C.subscribeKey("loading",e=>{this.loading=e}),l.subscribe(e=>{this.paymentCurrency=e.paymentCurrency,this.paymentAmount=e.paymentAmount,this.purchaseAmount=e.purchaseAmount,this.quoteLoading=e.quotesLoading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return u`
|
||||
<wui-flex flexDirection="column" justifyContent="center" alignItems="center">
|
||||
<wui-flex flexDirection="column" alignItems="center" gap="xs">
|
||||
<w3m-onramp-input
|
||||
type="Fiat"
|
||||
@inputChange=${this.onPaymentAmountChange.bind(this)}
|
||||
.value=${this.paymentAmount||0}
|
||||
></w3m-onramp-input>
|
||||
<w3m-onramp-input
|
||||
type="Token"
|
||||
.value=${this.purchaseAmount||0}
|
||||
.loading=${this.quoteLoading}
|
||||
></w3m-onramp-input>
|
||||
<wui-flex justifyContent="space-evenly" class="amounts-container" gap="xs">
|
||||
${ie.map(e=>u`<wui-button
|
||||
variant=${this.paymentAmount===e?"accent":"neutral"}
|
||||
size="md"
|
||||
textVariant="paragraph-600"
|
||||
fullWidth
|
||||
@click=${()=>this.selectPresetAmount(e)}
|
||||
>${`${te[this.paymentCurrency?.id||"USD"]} ${e}`}</wui-button
|
||||
>`)}
|
||||
</wui-flex>
|
||||
${this.templateButton()}
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
`}templateButton(){return this.caipAddress?u`<wui-button
|
||||
@click=${this.getQuotes.bind(this)}
|
||||
variant="main"
|
||||
fullWidth
|
||||
size="lg"
|
||||
borderRadius="xs"
|
||||
>
|
||||
Get quotes
|
||||
</wui-button>`:u`<wui-button
|
||||
@click=${this.openModal.bind(this)}
|
||||
variant="accent"
|
||||
fullWidth
|
||||
size="lg"
|
||||
borderRadius="xs"
|
||||
>
|
||||
Connect wallet
|
||||
</wui-button>`}getQuotes(){this.loading||C.open({view:"OnRampProviders"})}openModal(){C.open({view:"Connect"})}async onPaymentAmountChange(e){l.setPaymentAmount(Number(e.detail)),await l.getQuote()}async selectPresetAmount(e){l.setPaymentAmount(e),await l.getQuote()}};w.styles=ee;x([p({type:Boolean})],w.prototype,"disabled",void 0);x([c()],w.prototype,"caipAddress",void 0);x([c()],w.prototype,"loading",void 0);x([c()],w.prototype,"paymentCurrency",void 0);x([c()],w.prototype,"paymentAmount",void 0);x([c()],w.prototype,"purchaseAmount",void 0);x([c()],w.prototype,"quoteLoading",void 0);w=x([b("w3m-onramp-widget")],w);export{d as W3mBuyInProgressView,S as W3mOnRampProvidersView,k as W3mOnrampFiatSelectView,R as W3mOnrampTokensView,w as W3mOnrampWidget,D as W3mWhatIsABuyView};
|
||||
32
dist/assets/play-store-D-_ekw15.js
vendored
Normal file
32
dist/assets/play-store-D-_ekw15.js
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
import{b as a}from"./index-Cr5N_0pd.js";const t=a` <svg
|
||||
width="36"
|
||||
height="36"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
d="M0 8a8 8 0 0 1 8-8h20a8 8 0 0 1 8 8v20a8 8 0 0 1-8 8H8a8 8 0 0 1-8-8V8Z"
|
||||
fill="#fff"
|
||||
fill-opacity=".05"
|
||||
/>
|
||||
<path
|
||||
d="m18.262 17.513-8.944 9.49v.01a2.417 2.417 0 0 0 3.56 1.452l.026-.017 10.061-5.803-4.703-5.132Z"
|
||||
fill="#EA4335"
|
||||
/>
|
||||
<path
|
||||
d="m27.307 15.9-.008-.008-4.342-2.52-4.896 4.36 4.913 4.912 4.325-2.494a2.42 2.42 0 0 0 .008-4.25Z"
|
||||
fill="#FBBC04"
|
||||
/>
|
||||
<path
|
||||
d="M9.318 8.997c-.05.202-.084.403-.084.622V26.39c0 .218.025.42.084.621l9.246-9.247-9.246-8.768Z"
|
||||
fill="#4285F4"
|
||||
/>
|
||||
<path
|
||||
d="m18.33 18 4.627-4.628-10.053-5.828a2.427 2.427 0 0 0-3.586 1.444L18.329 18Z"
|
||||
fill="#34A853"
|
||||
/>
|
||||
<path
|
||||
d="M8 .5h20A7.5 7.5 0 0 1 35.5 8v20a7.5 7.5 0 0 1-7.5 7.5H8A7.5 7.5 0 0 1 .5 28V8A7.5 7.5 0 0 1 8 .5Z"
|
||||
stroke="#fff"
|
||||
stroke-opacity=".05"
|
||||
/>
|
||||
</svg>`;export{t as playStoreSvg};
|
||||
13
dist/assets/plus-DaZ9pOJ-.js
vendored
Normal file
13
dist/assets/plus-DaZ9pOJ-.js
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
import{b as e}from"./index-Cr5N_0pd.js";const o=e`<svg
|
||||
width="13"
|
||||
height="12"
|
||||
viewBox="0 0 13 12"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M0.794373 5.99982C0.794373 5.52643 1.17812 5.14268 1.6515 5.14268H5.643V1.15109C5.643 0.677701 6.02675 0.293946 6.50012 0.293945C6.9735 0.293946 7.35725 0.677701 7.35725 1.15109V5.14268H11.3488C11.8221 5.14268 12.2059 5.52643 12.2059 5.99982C12.2059 6.47321 11.8221 6.85696 11.3488 6.85696H7.35725V10.8486C7.35725 11.3219 6.9735 11.7057 6.50012 11.7057C6.02675 11.7057 5.643 11.3219 5.643 10.8486V6.85696H1.6515C1.17812 6.85696 0.794373 6.47321 0.794373 5.99982Z"
|
||||
/></svg
|
||||
>`;export{o as plusSvg};
|
||||
6
dist/assets/qr-code-zSuzYj6q.js
vendored
Normal file
6
dist/assets/qr-code-zSuzYj6q.js
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
import{b as a}from"./index-Cr5N_0pd.js";const o=a`<svg fill="none" viewBox="0 0 20 20">
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M3 6a3 3 0 0 1 3-3h1a1 1 0 1 0 0-2H6a5 5 0 0 0-5 5v1a1 1 0 0 0 2 0V6ZM13 1a1 1 0 1 0 0 2h1a3 3 0 0 1 3 3v1a1 1 0 1 0 2 0V6a5 5 0 0 0-5-5h-1ZM3 13a1 1 0 1 0-2 0v1a5 5 0 0 0 5 5h1a1 1 0 1 0 0-2H6a3 3 0 0 1-3-3v-1ZM19 13a1 1 0 1 0-2 0v1a3 3 0 0 1-3 3h-1a1 1 0 1 0 0 2h1.01a5 5 0 0 0 5-5v-1ZM5.3 6.36c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05A1.5 1.5 0 0 0 9.2 8.14c.06-.2.06-.43.06-.89s0-.7-.06-.89A1.5 1.5 0 0 0 8.14 5.3c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06ZM10.8 6.36c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05a1.5 1.5 0 0 0 1.06-1.06c.06-.2.06-.43.06-.89s0-.7-.06-.89a1.5 1.5 0 0 0-1.06-1.06c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06ZM5.26 12.75c0-.46 0-.7.05-.89a1.5 1.5 0 0 1 1.06-1.06c.19-.05.42-.05.89-.05.46 0 .7 0 .88.05.52.14.93.54 1.06 1.06.06.2.06.43.06.89s0 .7-.06.89a1.5 1.5 0 0 1-1.06 1.06c-.19.05-.42.05-.88.05-.47 0-.7 0-.9-.05a1.5 1.5 0 0 1-1.05-1.06c-.05-.2-.05-.43-.05-.89ZM10.8 11.86c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05a1.5 1.5 0 0 0 1.06-1.06c.06-.2.06-.43.06-.89s0-.7-.06-.89a1.5 1.5 0 0 0-1.06-1.06c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06Z"
|
||||
/>
|
||||
</svg>`;export{o as qrCodeIcon};
|
||||
83
dist/assets/receive-dL28-83Q.js
vendored
Normal file
83
dist/assets/receive-dL28-83Q.js
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
import{i as b,a3 as y,a4 as C,a5 as v,c as x,a as N,x as c,Y as p,K as u,R as m,a6 as h,a7 as $,a8 as k,a9 as R,a1 as I,a2 as A,T,L as S,aa as f}from"./index-Cr5N_0pd.js";const O=b`
|
||||
button {
|
||||
display: flex;
|
||||
gap: var(--wui-spacing-xl);
|
||||
width: 100%;
|
||||
background-color: var(--wui-color-gray-glass-002);
|
||||
border-radius: var(--wui-border-radius-xxs);
|
||||
padding: var(--wui-spacing-m) var(--wui-spacing-s);
|
||||
}
|
||||
|
||||
wui-text {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
wui-flex {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.network-icon {
|
||||
width: var(--wui-spacing-2l);
|
||||
height: var(--wui-spacing-2l);
|
||||
border-radius: calc(var(--wui-spacing-2l) / 2);
|
||||
overflow: hidden;
|
||||
box-shadow:
|
||||
0 0 0 3px var(--wui-color-gray-glass-002),
|
||||
0 0 0 3px var(--wui-color-modal-bg);
|
||||
}
|
||||
`;var g=function(n,e,i,r){var o=arguments.length,t=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(n,e,i,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(t=(o<3?s(t):o>3?s(e,i,t):s(e,i))||t);return o>3&&t&&Object.defineProperty(e,i,t),t};let w=class extends N{constructor(){super(...arguments),this.networkImages=[""],this.text=""}render(){return c`
|
||||
<button>
|
||||
<wui-text variant="small-400" color="fg-200">${this.text}</wui-text>
|
||||
<wui-flex gap="3xs" alignItems="center">
|
||||
${this.networksTemplate()}
|
||||
<wui-icon name="chevronRight" size="sm" color="fg-200"></wui-icon>
|
||||
</wui-flex>
|
||||
</button>
|
||||
`}networksTemplate(){const e=this.networkImages.slice(0,5);return c` <wui-flex class="networks">
|
||||
${e?.map(i=>c` <wui-flex class="network-icon"> <wui-image src=${i}></wui-image> </wui-flex>`)}
|
||||
</wui-flex>`}};w.styles=[y,C,O];g([v({type:Array})],w.prototype,"networkImages",void 0);g([v()],w.prototype,"text",void 0);w=g([x("wui-compatible-network")],w);const _=b`
|
||||
wui-compatible-network {
|
||||
margin-top: var(--wui-spacing-l);
|
||||
}
|
||||
`;var d=function(n,e,i,r){var o=arguments.length,t=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(n,e,i,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(t=(o<3?s(t):o>3?s(e,i,t):s(e,i))||t);return o>3&&t&&Object.defineProperty(e,i,t),t};let l=class extends N{constructor(){super(),this.unsubscribe=[],this.address=p.state.address,this.profileName=p.state.profileName,this.network=u.state.activeCaipNetwork,this.unsubscribe.push(p.subscribe(e=>{e.address?(this.address=e.address,this.profileName=e.profileName):m.showError("Account not found")}),u.subscribeKey("activeCaipNetwork",e=>{e?.id&&(this.network=e)}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!this.address)throw new Error("w3m-wallet-receive-view: No account provided");const e=h.getNetworkImage(this.network);return c` <wui-flex
|
||||
flexDirection="column"
|
||||
.padding=${["0","l","l","l"]}
|
||||
alignItems="center"
|
||||
>
|
||||
<wui-chip-button
|
||||
data-testid="receive-address-copy-button"
|
||||
@click=${this.onCopyClick.bind(this)}
|
||||
text=${$.getTruncateString({string:this.profileName||this.address||"",charsStart:this.profileName?18:4,charsEnd:this.profileName?0:4,truncate:this.profileName?"end":"middle"})}
|
||||
icon="copy"
|
||||
size="sm"
|
||||
imageSrc=${e||""}
|
||||
variant="gray"
|
||||
></wui-chip-button>
|
||||
<wui-flex
|
||||
flexDirection="column"
|
||||
.padding=${["l","0","0","0"]}
|
||||
alignItems="center"
|
||||
gap="s"
|
||||
>
|
||||
<wui-qr-code
|
||||
size=${232}
|
||||
theme=${k.state.themeMode}
|
||||
uri=${this.address}
|
||||
?arenaClear=${!0}
|
||||
color=${R(k.state.themeVariables["--w3m-qr-color"])}
|
||||
data-testid="wui-qr-code"
|
||||
></wui-qr-code>
|
||||
<wui-text variant="paragraph-500" color="fg-100" align="center">
|
||||
Copy your address or scan this QR code
|
||||
</wui-text>
|
||||
</wui-flex>
|
||||
${this.networkTemplate()}
|
||||
</wui-flex>`}networkTemplate(){const e=u.getAllRequestedCaipNetworks(),i=u.checkIfSmartAccountEnabled(),r=u.state.activeCaipNetwork,o=e.filter(a=>a?.chainNamespace===r?.chainNamespace);if(I(r?.chainNamespace)===A.ACCOUNT_TYPES.SMART_ACCOUNT&&i)return r?c`<wui-compatible-network
|
||||
@click=${this.onReceiveClick.bind(this)}
|
||||
text="Only receive assets on this network"
|
||||
.networkImages=${[h.getNetworkImage(r)??""]}
|
||||
></wui-compatible-network>`:null;const s=(o?.filter(a=>a?.assets?.imageId)?.slice(0,5)).map(h.getNetworkImage).filter(Boolean);return c`<wui-compatible-network
|
||||
@click=${this.onReceiveClick.bind(this)}
|
||||
text="Only receive assets on these networks"
|
||||
.networkImages=${s}
|
||||
></wui-compatible-network>`}onReceiveClick(){T.push("WalletCompatibleNetworks")}onCopyClick(){try{this.address&&(S.copyToClopboard(this.address),m.showSuccess("Address copied"))}catch{m.showError("Failed to copy")}}};l.styles=_;d([f()],l.prototype,"address",void 0);d([f()],l.prototype,"profileName",void 0);d([f()],l.prototype,"network",void 0);l=d([x("w3m-wallet-receive-view")],l);export{l as W3mWalletReceiveView};
|
||||
9
dist/assets/recycle-horizontal-B85mmaoN.js
vendored
Normal file
9
dist/assets/recycle-horizontal-B85mmaoN.js
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import{b as C}from"./index-Cr5N_0pd.js";const o=C`<svg
|
||||
fill="none"
|
||||
viewBox="0 0 21 20"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M8.8071 0.292893C9.19763 0.683417 9.19763 1.31658 8.8071 1.70711L6.91421 3.6H11.8404C14.3368 3.6 16.5533 5.1975 17.3427 7.56588L17.4487 7.88377C17.6233 8.40772 17.3402 8.97404 16.8162 9.14868C16.2923 9.32333 15.726 9.04017 15.5513 8.51623L15.4453 8.19834C14.9281 6.64664 13.476 5.6 11.8404 5.6H6.91421L8.8071 7.49289C9.19763 7.88342 9.19763 8.51658 8.8071 8.90711C8.41658 9.29763 7.78341 9.29763 7.39289 8.90711L3.79289 5.30711C3.40236 4.91658 3.40236 4.28342 3.79289 3.89289L7.39289 0.292893C7.78341 -0.0976311 8.41658 -0.0976311 8.8071 0.292893ZM4.18377 10.8513C4.70771 10.6767 5.27403 10.9598 5.44868 11.4838L5.55464 11.8017C6.07188 13.3534 7.52401 14.4 9.15964 14.4L14.0858 14.4L12.1929 12.5071C11.8024 12.1166 11.8024 11.4834 12.1929 11.0929C12.5834 10.7024 13.2166 10.7024 13.6071 11.0929L17.2071 14.6929C17.5976 15.0834 17.5976 15.7166 17.2071 16.1071L13.6071 19.7071C13.2166 20.0976 12.5834 20.0976 12.1929 19.7071C11.8024 19.3166 11.8024 18.6834 12.1929 18.2929L14.0858 16.4L9.15964 16.4C6.66314 16.4 4.44674 14.8025 3.65728 12.4341L3.55131 12.1162C3.37667 11.5923 3.65983 11.026 4.18377 10.8513Z"
|
||||
/></svg
|
||||
>`;export{o as recycleHorizontalSvg};
|
||||
8
dist/assets/refresh-CsELgs90.js
vendored
Normal file
8
dist/assets/refresh-CsELgs90.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const o=l`<svg fill="none" viewBox="0 0 14 16">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M3.94 1.04a1 1 0 0 1 .7 1.23l-.48 1.68a5.85 5.85 0 0 1 8.53 4.32 5.86 5.86 0 0 1-11.4 2.56 1 1 0 0 1 1.9-.57 3.86 3.86 0 1 0 1.83-4.5l1.87.53a1 1 0 0 1-.55 1.92l-4.1-1.15a1 1 0 0 1-.69-1.23l1.16-4.1a1 1 0 0 1 1.23-.7Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{o as refreshSvg};
|
||||
12
dist/assets/reown-logo-CHoXyyWe.js
vendored
Normal file
12
dist/assets/reown-logo-CHoXyyWe.js
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import{b as C}from"./index-Cr5N_0pd.js";const l=C`<svg width="60" height="16" viewBox="0 0 60 16" fill="none"">
|
||||
<path d="M9.3335 4.66667C9.3335 2.08934 11.4229 0 14.0002 0H20.6669C23.2442 0 25.3335 2.08934 25.3335 4.66667V11.3333C25.3335 13.9106 23.2442 16 20.6669 16H14.0002C11.4229 16 9.3335 13.9106 9.3335 11.3333V4.66667Z" fill="#363636"/>
|
||||
<path d="M15.6055 11.0003L17.9448 4.66699H18.6316L16.2923 11.0003H15.6055Z" fill="#F6F6F6"/>
|
||||
<path d="M0 4.33333C0 1.9401 1.9401 0 4.33333 0C6.72657 0 8.66669 1.9401 8.66669 4.33333V11.6667C8.66669 14.0599 6.72657 16 4.33333 16C1.9401 16 0 14.0599 0 11.6667V4.33333Z" fill="#363636"/>
|
||||
<path d="M3.9165 9.99934V9.16602H4.74983V9.99934H3.9165Z" fill="#F6F6F6"/>
|
||||
<path d="M26 8C26 3.58172 29.3517 0 33.4863 0H52.5137C56.6483 0 60 3.58172 60 8C60 12.4183 56.6483 16 52.5137 16H33.4863C29.3517 16 26 12.4183 26 8Z" fill="#363636"/>
|
||||
<path d="M49.3687 9.95834V6.26232H50.0213V6.81966C50.256 6.40899 50.7326 6.16699 51.2606 6.16699C52.0599 6.16699 52.6173 6.67299 52.6173 7.65566V9.95834H51.972V7.69234C51.972 7.04696 51.6053 6.70966 51.07 6.70966C50.4906 6.70966 50.0213 7.17168 50.0213 7.82433V9.95834H49.3687Z" fill="#F6F6F6"/>
|
||||
<path d="M45.2538 9.95773L44.5718 6.26172H45.1877L45.6717 9.31242L46.3098 7.30306H46.9184L47.5491 9.29041L48.0404 6.26172H48.6564L47.9744 9.95773H47.2411L46.6178 8.03641L45.9871 9.95773H45.2538Z" fill="#F6F6F6"/>
|
||||
<path d="M42.3709 10.0536C41.2489 10.0536 40.5889 9.21765 40.5889 8.1103C40.5889 7.01035 41.2489 6.16699 42.3709 6.16699C43.4929 6.16699 44.1529 7.01035 44.1529 8.1103C44.1529 9.21765 43.4929 10.0536 42.3709 10.0536ZM42.3709 9.51096C43.1775 9.51096 43.4856 8.82164 43.4856 8.10296C43.4856 7.39163 43.1775 6.70966 42.3709 6.70966C41.5642 6.70966 41.2562 7.39163 41.2562 8.10296C41.2562 8.82164 41.5642 9.51096 42.3709 9.51096Z" fill="#F6F6F6"/>
|
||||
<path d="M38.2805 10.0536C37.1952 10.0536 36.5132 9.22499 36.5132 8.1103C36.5132 7.00302 37.1952 6.16699 38.2805 6.16699C39.1972 6.16699 40.0038 6.68766 39.9159 8.27896H37.1805C37.2319 8.96103 37.5472 9.5183 38.2805 9.5183C38.7718 9.5183 39.0945 9.21765 39.2045 8.87299H39.8499C39.7472 9.48903 39.1679 10.0536 38.2805 10.0536ZM37.1952 7.78765H39.2852C39.2338 7.04696 38.8892 6.70232 38.2805 6.70232C37.6132 6.70232 37.2832 7.18635 37.1952 7.78765Z" fill="#F6F6F6"/>
|
||||
<path d="M33.3828 9.95773V6.26172H34.0501V6.88506C34.2848 6.47439 34.6882 6.26172 35.1061 6.26172H35.9935V6.88506H35.0548C34.4682 6.88506 34.0501 7.26638 34.0501 8.00706V9.95773H33.3828Z" fill="#F6F6F6"/>
|
||||
</svg>`;export{l as reownSvg};
|
||||
8
dist/assets/search-DCC0JOe_.js
vendored
Normal file
8
dist/assets/search-DCC0JOe_.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const o=l`<svg fill="none" viewBox="0 0 20 20">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M9.36 4.21a5.14 5.14 0 1 0 0 10.29 5.14 5.14 0 0 0 0-10.29ZM1.64 9.36a7.71 7.71 0 1 1 14 4.47l2.52 2.5a1.29 1.29 0 1 1-1.82 1.83l-2.51-2.51A7.71 7.71 0 0 1 1.65 9.36Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{o as searchSvg};
|
||||
1
dist/assets/secp256k1-BjJYwyg8.js
vendored
Normal file
1
dist/assets/secp256k1-BjJYwyg8.js
vendored
Normal file
File diff suppressed because one or more lines are too long
15
dist/assets/send-DbOL9rGQ.js
vendored
Normal file
15
dist/assets/send-DbOL9rGQ.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
import{b as C}from"./index-Cr5N_0pd.js";const l=C`<svg fill="none" viewBox="0 0 21 20">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M14.3808 4.34812C13.72 4.47798 12.8501 4.7587 11.5748 5.17296L9.00869 6.00646C6.90631 6.68935 5.40679 7.17779 4.38121 7.63178C3.87166 7.85734 3.5351 8.05091 3.32022 8.22035C3.11183 8.38466 3.07011 8.48486 3.05969 8.51817C2.98058 8.77103 2.98009 9.04195 3.05831 9.29509C3.06861 9.32844 3.10998 9.42878 3.31777 9.59384C3.53205 9.76404 3.86792 9.95881 4.37667 10.1862C5.29287 10.5957 6.58844 11.0341 8.35529 11.6164L10.8876 8.59854C11.2426 8.17547 11.8733 8.12028 12.2964 8.47528C12.7195 8.83029 12.7746 9.46104 12.4196 9.88412L9.88738 12.9019C10.7676 14.5408 11.4244 15.7406 11.9867 16.5718C12.299 17.0333 12.5491 17.3303 12.7539 17.5117C12.9526 17.6877 13.0586 17.711 13.0932 17.7154C13.3561 17.7484 13.6228 17.7009 13.8581 17.5791C13.8891 17.563 13.9805 17.5046 14.1061 17.2708C14.2357 17.0298 14.3679 16.6647 14.5015 16.1237C14.7705 15.0349 14.9912 13.4733 15.2986 11.2843L15.6738 8.61249C15.8603 7.28456 15.9857 6.37917 15.9989 5.7059C16.012 5.03702 15.9047 4.8056 15.8145 4.69183C15.7044 4.55297 15.5673 4.43792 15.4114 4.35365C15.2837 4.28459 15.0372 4.2191 14.3808 4.34812ZM7.99373 13.603C6.11919 12.9864 4.6304 12.4902 3.5606 12.0121C2.98683 11.7557 2.4778 11.4808 2.07383 11.1599C1.66337 10.8339 1.31312 10.4217 1.14744 9.88551C0.949667 9.24541 0.950886 8.56035 1.15094 7.92096C1.31852 7.38534 1.67024 6.97442 2.08185 6.64985C2.48697 6.33041 2.99697 6.05734 3.57166 5.80295C4.70309 5.3021 6.30179 4.78283 8.32903 4.12437L11.0196 3.25042C12.2166 2.86159 13.2017 2.54158 13.9951 2.38566C14.8065 2.22618 15.6202 2.19289 16.3627 2.59437C16.7568 2.80747 17.1035 3.09839 17.3818 3.4495C17.9062 4.111 18.0147 4.91815 17.9985 5.74496C17.9827 6.55332 17.8386 7.57903 17.6636 8.82534L17.2701 11.6268C16.9737 13.7376 16.7399 15.4022 16.4432 16.6034C16.2924 17.2135 16.1121 17.7632 15.8678 18.2176C15.6197 18.6794 15.2761 19.0971 14.7777 19.3551C14.1827 19.6632 13.5083 19.7833 12.8436 19.6997C12.2867 19.6297 11.82 19.3563 11.4277 19.0087C11.0415 18.6666 10.6824 18.213 10.3302 17.6925C9.67361 16.722 8.92648 15.342 7.99373 13.603Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="21"
|
||||
height="20"
|
||||
viewBox="0 0 21 20"
|
||||
fill="none"
|
||||
></svg></svg
|
||||
>`;export{l as sendSvg};
|
||||
535
dist/assets/send-Ncb2jADE.js
vendored
Normal file
535
dist/assets/send-Ncb2jADE.js
vendored
Normal file
@ -0,0 +1,535 @@
|
||||
import{i as f,a5 as d,aa as c,c as w,a as m,ay as O,L as I,K as x,$ as H,aL as l,x as u,aA as D,a3 as z,a4 as W,aM as q,aN as F,T as g,a7 as b,N as M,a9 as Y,a6 as K,R as _,a0 as G,a1 as J,a2 as Q}from"./index-Cr5N_0pd.js";import{S as L}from"./index-DUeQylCA.js";const X=f`
|
||||
:host {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
border-radius: var(--wui-border-radius-s);
|
||||
border: 1px solid var(--wui-color-gray-glass-002);
|
||||
background-color: var(--wui-color-gray-glass-002);
|
||||
transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg);
|
||||
will-change: background-color;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
:host(:hover) {
|
||||
background-color: var(--wui-color-gray-glass-005);
|
||||
}
|
||||
|
||||
wui-flex {
|
||||
width: 100%;
|
||||
height: fit-content;
|
||||
}
|
||||
|
||||
wui-button {
|
||||
display: ruby;
|
||||
color: var(--wui-color-fg-100);
|
||||
margin: 0 var(--wui-spacing-xs);
|
||||
}
|
||||
|
||||
.instruction {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.paste {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
textarea {
|
||||
background: transparent;
|
||||
width: 100%;
|
||||
font-family: var(--w3m-font-family);
|
||||
font-size: var(--wui-font-size-medium);
|
||||
font-style: normal;
|
||||
font-weight: var(--wui-font-weight-light);
|
||||
line-height: 130%;
|
||||
letter-spacing: var(--wui-letter-spacing-medium);
|
||||
color: var(--wui-color-fg-100);
|
||||
caret-color: var(--wui-color-accent-100);
|
||||
box-sizing: border-box;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: textfield;
|
||||
padding: 0px;
|
||||
border: none;
|
||||
outline: none;
|
||||
appearance: none;
|
||||
resize: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
`;var E=function(o,e,i,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(o,e,i,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(t=(r<3?s(t):r>3?s(e,i,t):s(e,i))||t);return r>3&&t&&Object.defineProperty(e,i,t),t};let A=class extends m{constructor(){super(...arguments),this.inputElementRef=O(),this.instructionElementRef=O(),this.instructionHidden=!!this.value,this.pasting=!1,this.onDebouncedSearch=I.debounce(async e=>{if(!e.length){this.setReceiverAddress("");return}const i=x.state.activeChain;if(I.isAddress(e,i)){this.setReceiverAddress(e);return}try{const r=await H.getEnsAddress(e);if(r){l.setReceiverProfileName(e),l.setReceiverAddress(r);const t=await H.getEnsAvatar(e);l.setReceiverProfileImageUrl(t||void 0)}}catch{this.setReceiverAddress(e)}finally{l.setLoading(!1)}})}firstUpdated(){this.value&&(this.instructionHidden=!0),this.checkHidden()}render(){return u` <wui-flex
|
||||
@click=${this.onBoxClick.bind(this)}
|
||||
flexDirection="column"
|
||||
justifyContent="center"
|
||||
gap="4xs"
|
||||
.padding=${["2xl","l","xl","l"]}
|
||||
>
|
||||
<wui-text
|
||||
${D(this.instructionElementRef)}
|
||||
class="instruction"
|
||||
color="fg-300"
|
||||
variant="medium-400"
|
||||
>
|
||||
Type or
|
||||
<wui-button
|
||||
class="paste"
|
||||
size="md"
|
||||
variant="neutral"
|
||||
iconLeft="copy"
|
||||
@click=${this.onPasteClick.bind(this)}
|
||||
>
|
||||
<wui-icon size="sm" color="inherit" slot="iconLeft" name="copy"></wui-icon>
|
||||
Paste
|
||||
</wui-button>
|
||||
address
|
||||
</wui-text>
|
||||
<textarea
|
||||
spellcheck="false"
|
||||
?disabled=${!this.instructionHidden}
|
||||
${D(this.inputElementRef)}
|
||||
@input=${this.onInputChange.bind(this)}
|
||||
@blur=${this.onBlur.bind(this)}
|
||||
.value=${this.value??""}
|
||||
autocomplete="off"
|
||||
>
|
||||
${this.value??""}</textarea
|
||||
>
|
||||
</wui-flex>`}async focusInput(){this.instructionElementRef.value&&(this.instructionHidden=!0,await this.toggleInstructionFocus(!1),this.instructionElementRef.value.style.pointerEvents="none",this.inputElementRef.value?.focus(),this.inputElementRef.value&&(this.inputElementRef.value.selectionStart=this.inputElementRef.value.selectionEnd=this.inputElementRef.value.value.length))}async focusInstruction(){this.instructionElementRef.value&&(this.instructionHidden=!1,await this.toggleInstructionFocus(!0),this.instructionElementRef.value.style.pointerEvents="auto",this.inputElementRef.value?.blur())}async toggleInstructionFocus(e){this.instructionElementRef.value&&await this.instructionElementRef.value.animate([{opacity:e?0:1},{opacity:e?1:0}],{duration:100,easing:"ease",fill:"forwards"}).finished}onBoxClick(){!this.value&&!this.instructionHidden&&this.focusInput()}onBlur(){!this.value&&this.instructionHidden&&!this.pasting&&this.focusInstruction()}checkHidden(){this.instructionHidden&&this.focusInput()}async onPasteClick(){this.pasting=!0;const e=await navigator.clipboard.readText();l.setReceiverAddress(e),this.focusInput()}onInputChange(e){const i=e.target;this.pasting=!1,this.value=e.target?.value,i.value&&!this.instructionHidden&&this.focusInput(),l.setLoading(!0),this.onDebouncedSearch(i.value)}setReceiverAddress(e){l.setReceiverAddress(e),l.setReceiverProfileName(void 0),l.setReceiverProfileImageUrl(void 0),l.setLoading(!1)}};A.styles=X;E([d()],A.prototype,"value",void 0);E([c()],A.prototype,"instructionHidden",void 0);E([c()],A.prototype,"pasting",void 0);A=E([w("w3m-input-address")],A);const Z=f`
|
||||
:host {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
input {
|
||||
background: transparent;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
font-family: var(--wui-font-family);
|
||||
color: var(--wui-color-fg-100);
|
||||
|
||||
font-feature-settings: 'case' on;
|
||||
font-size: 32px;
|
||||
font-weight: var(--wui-font-weight-light);
|
||||
caret-color: var(--wui-color-accent-100);
|
||||
line-height: 130%;
|
||||
letter-spacing: -1.28px;
|
||||
box-sizing: border-box;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: textfield;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
input::-webkit-outer-spin-button,
|
||||
input::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
input::placeholder {
|
||||
color: var(--wui-color-fg-275);
|
||||
}
|
||||
`;var B=function(o,e,i,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(o,e,i,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(t=(r<3?s(t):r>3?s(e,i,t):s(e,i))||t);return r>3&&t&&Object.defineProperty(e,i,t),t};let C=class extends m{constructor(){super(...arguments),this.inputElementRef=O(),this.disabled=!1,this.value="",this.placeholder="0"}render(){return this.inputElementRef?.value&&this.value&&(this.inputElementRef.value.value=this.value),u`<input
|
||||
${D(this.inputElementRef)}
|
||||
type="text"
|
||||
inputmode="decimal"
|
||||
pattern="[0-9,.]*"
|
||||
placeholder=${this.placeholder}
|
||||
?disabled=${this.disabled}
|
||||
autofocus
|
||||
value=${this.value??""}
|
||||
@input=${this.dispatchInputChangeEvent.bind(this)}
|
||||
/> `}dispatchInputChangeEvent(e){const i=e.data;if(i&&this.inputElementRef?.value)if(i===","){const n=this.inputElementRef.value.value.replace(",",".");this.inputElementRef.value.value=n,this.value=`${this.value}${n}`}else q.test(i)||(this.inputElementRef.value.value=this.value.replace(new RegExp(i.replace(F,"\\$&"),"gu"),""));this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value?.value,bubbles:!0,composed:!0}))}};C.styles=[z,W,Z];B([d({type:Boolean})],C.prototype,"disabled",void 0);B([d({type:String})],C.prototype,"value",void 0);B([d({type:String})],C.prototype,"placeholder",void 0);C=B([w("wui-input-amount")],C);const ee=f`
|
||||
:host {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
border-radius: var(--wui-border-radius-s);
|
||||
border: 1px solid var(--wui-color-gray-glass-002);
|
||||
background-color: var(--wui-color-gray-glass-002);
|
||||
transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg);
|
||||
will-change: background-color;
|
||||
}
|
||||
|
||||
:host(:hover) {
|
||||
background-color: var(--wui-color-gray-glass-005);
|
||||
}
|
||||
|
||||
wui-flex {
|
||||
width: 100%;
|
||||
height: fit-content;
|
||||
}
|
||||
|
||||
wui-button {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
wui-input-amount {
|
||||
mask-image: linear-gradient(
|
||||
270deg,
|
||||
transparent 0px,
|
||||
transparent 8px,
|
||||
black 24px,
|
||||
black 25px,
|
||||
black 32px,
|
||||
black 100%
|
||||
);
|
||||
}
|
||||
|
||||
.totalValue {
|
||||
width: 100%;
|
||||
}
|
||||
`;var V=function(o,e,i,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(o,e,i,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(t=(r<3?s(t):r>3?s(e,i,t):s(e,i))||t);return r>3&&t&&Object.defineProperty(e,i,t),t};let R=class extends m{render(){return u` <wui-flex
|
||||
flexDirection="column"
|
||||
gap="4xs"
|
||||
.padding=${["xl","s","l","l"]}
|
||||
>
|
||||
<wui-flex alignItems="center">
|
||||
<wui-input-amount
|
||||
@inputChange=${this.onInputChange.bind(this)}
|
||||
?disabled=${!this.token&&!0}
|
||||
.value=${this.sendTokenAmount?String(this.sendTokenAmount):""}
|
||||
></wui-input-amount>
|
||||
${this.buttonTemplate()}
|
||||
</wui-flex>
|
||||
<wui-flex alignItems="center" justifyContent="space-between">
|
||||
${this.sendValueTemplate()}
|
||||
<wui-flex alignItems="center" gap="4xs" justifyContent="flex-end">
|
||||
${this.maxAmountTemplate()} ${this.actionTemplate()}
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
</wui-flex>`}buttonTemplate(){return this.token?u`<wui-token-button
|
||||
text=${this.token.symbol}
|
||||
imageSrc=${this.token.iconUrl}
|
||||
@click=${this.handleSelectButtonClick.bind(this)}
|
||||
>
|
||||
</wui-token-button>`:u`<wui-button
|
||||
size="md"
|
||||
variant="accent"
|
||||
@click=${this.handleSelectButtonClick.bind(this)}
|
||||
>Select token</wui-button
|
||||
>`}handleSelectButtonClick(){g.push("WalletSendSelectToken")}sendValueTemplate(){if(this.token&&this.sendTokenAmount){const i=this.token.price*this.sendTokenAmount;return u`<wui-text class="totalValue" variant="small-400" color="fg-200"
|
||||
>${i?`$${b.formatNumberToLocalString(i,2)}`:"Incorrect value"}</wui-text
|
||||
>`}return null}maxAmountTemplate(){return this.token?this.sendTokenAmount&&this.sendTokenAmount>Number(this.token.quantity.numeric)?u` <wui-text variant="small-400" color="error-100">
|
||||
${b.roundNumber(Number(this.token.quantity.numeric),6,5)}
|
||||
</wui-text>`:u` <wui-text variant="small-400" color="fg-200">
|
||||
${b.roundNumber(Number(this.token.quantity.numeric),6,5)}
|
||||
</wui-text>`:null}actionTemplate(){return this.token?this.sendTokenAmount&&this.sendTokenAmount>Number(this.token.quantity.numeric)?u`<wui-link @click=${this.onBuyClick.bind(this)}>Buy</wui-link>`:u`<wui-link @click=${this.onMaxClick.bind(this)}>Max</wui-link>`:null}onInputChange(e){l.setTokenAmount(e.detail)}onMaxClick(){if(this.token){const e=M.bigNumber(this.token.quantity.numeric);l.setTokenAmount(Number(e.toFixed(20)))}}onBuyClick(){g.push("OnRampProviders")}};R.styles=ee;V([d({type:Object})],R.prototype,"token",void 0);V([d({type:Number})],R.prototype,"sendTokenAmount",void 0);R=V([w("w3m-input-token")],R);const te=f`
|
||||
:host {
|
||||
display: block;
|
||||
}
|
||||
|
||||
wui-flex {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
wui-icon-box {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: var(--wui-border-radius-xs) !important;
|
||||
border: 5px solid var(--wui-color-bg-125);
|
||||
background: var(--wui-color-bg-175);
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
wui-button {
|
||||
--local-border-radius: var(--wui-border-radius-xs) !important;
|
||||
}
|
||||
|
||||
.inputContainer {
|
||||
height: fit-content;
|
||||
}
|
||||
`;var $=function(o,e,i,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(o,e,i,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(t=(r<3?s(t):r>3?s(e,i,t):s(e,i))||t);return r>3&&t&&Object.defineProperty(e,i,t),t};let p=class extends m{constructor(){super(),this.unsubscribe=[],this.token=l.state.token,this.sendTokenAmount=l.state.sendTokenAmount,this.receiverAddress=l.state.receiverAddress,this.receiverProfileName=l.state.receiverProfileName,this.loading=l.state.loading,this.message="Preview Send",this.token&&(this.fetchBalances(),this.fetchNetworkPrice()),this.unsubscribe.push(l.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress,this.receiverProfileName=e.receiverProfileName,this.loading=e.loading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return this.getMessage(),u` <wui-flex flexDirection="column" .padding=${["0","l","l","l"]}>
|
||||
<wui-flex class="inputContainer" gap="xs" flexDirection="column">
|
||||
<w3m-input-token
|
||||
.token=${this.token}
|
||||
.sendTokenAmount=${this.sendTokenAmount}
|
||||
></w3m-input-token>
|
||||
<wui-icon-box
|
||||
size="inherit"
|
||||
backgroundColor="fg-300"
|
||||
iconSize="lg"
|
||||
iconColor="fg-250"
|
||||
background="opaque"
|
||||
icon="arrowBottom"
|
||||
></wui-icon-box>
|
||||
<w3m-input-address
|
||||
.value=${this.receiverProfileName?this.receiverProfileName:this.receiverAddress}
|
||||
></w3m-input-address>
|
||||
</wui-flex>
|
||||
<wui-flex .margin=${["l","0","0","0"]}>
|
||||
<wui-button
|
||||
@click=${this.onButtonClick.bind(this)}
|
||||
?disabled=${!this.message.startsWith("Preview Send")}
|
||||
size="lg"
|
||||
variant="main"
|
||||
?loading=${this.loading}
|
||||
fullWidth
|
||||
>
|
||||
${this.message}
|
||||
</wui-button>
|
||||
</wui-flex>
|
||||
</wui-flex>`}async fetchBalances(){await l.fetchTokenBalance(),l.fetchNetworkBalance()}async fetchNetworkPrice(){await L.getNetworkTokenPrice()}onButtonClick(){g.push("WalletSendPreview")}getMessage(){this.message="Preview Send",this.receiverAddress&&!I.isAddress(this.receiverAddress,x.state.activeChain)&&(this.message="Invalid Address"),this.receiverAddress||(this.message="Add Address"),this.sendTokenAmount&&this.token&&this.sendTokenAmount>Number(this.token.quantity.numeric)&&(this.message="Insufficient Funds"),this.sendTokenAmount||(this.message="Add Amount"),this.sendTokenAmount&&this.token?.price&&(this.sendTokenAmount*this.token.price||(this.message="Incorrect Value")),this.token||(this.message="Select Token")}};p.styles=te;$([c()],p.prototype,"token",void 0);$([c()],p.prototype,"sendTokenAmount",void 0);$([c()],p.prototype,"receiverAddress",void 0);$([c()],p.prototype,"receiverProfileName",void 0);$([c()],p.prototype,"loading",void 0);$([c()],p.prototype,"message",void 0);p=$([w("w3m-wallet-send-view")],p);const ie=f`
|
||||
.contentContainer {
|
||||
height: 440px;
|
||||
overflow: scroll;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
.contentContainer::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
wui-icon-box {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: var(--wui-border-radius-xxs);
|
||||
}
|
||||
`;var S=function(o,e,i,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(o,e,i,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(t=(r<3?s(t):r>3?s(e,i,t):s(e,i))||t);return r>3&&t&&Object.defineProperty(e,i,t),t};let k=class extends m{constructor(){super(),this.unsubscribe=[],this.tokenBalances=l.state.tokenBalances,this.search="",this.onDebouncedSearch=I.debounce(e=>{this.search=e}),this.fetchBalancesAndNetworkPrice(),this.unsubscribe.push(l.subscribe(e=>{this.tokenBalances=e.tokenBalances}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return u`
|
||||
<wui-flex flexDirection="column">
|
||||
${this.templateSearchInput()} <wui-separator></wui-separator> ${this.templateTokens()}
|
||||
</wui-flex>
|
||||
`}async fetchBalancesAndNetworkPrice(){(!this.tokenBalances||this.tokenBalances?.length===0)&&(await this.fetchBalances(),await this.fetchNetworkPrice())}async fetchBalances(){await l.fetchTokenBalance(),l.fetchNetworkBalance()}async fetchNetworkPrice(){await L.getNetworkTokenPrice()}templateSearchInput(){return u`
|
||||
<wui-flex gap="xs" padding="s">
|
||||
<wui-input-text
|
||||
@inputChange=${this.onInputChange.bind(this)}
|
||||
class="network-search-input"
|
||||
size="sm"
|
||||
placeholder="Search token"
|
||||
icon="search"
|
||||
></wui-input-text>
|
||||
</wui-flex>
|
||||
`}templateTokens(){return this.tokens=this.tokenBalances?.filter(e=>e.chainId===x.state.activeCaipNetwork?.caipNetworkId),this.search?this.filteredTokens=this.tokenBalances?.filter(e=>e.name.toLowerCase().includes(this.search.toLowerCase())):this.filteredTokens=this.tokens,u`
|
||||
<wui-flex
|
||||
class="contentContainer"
|
||||
flexDirection="column"
|
||||
.padding=${["0","s","0","s"]}
|
||||
>
|
||||
<wui-flex justifyContent="flex-start" .padding=${["m","s","s","s"]}>
|
||||
<wui-text variant="paragraph-500" color="fg-200">Your tokens</wui-text>
|
||||
</wui-flex>
|
||||
<wui-flex flexDirection="column" gap="xs">
|
||||
${this.filteredTokens&&this.filteredTokens.length>0?this.filteredTokens.map(e=>u`<wui-list-token
|
||||
@click=${this.handleTokenClick.bind(this,e)}
|
||||
?clickable=${!0}
|
||||
tokenName=${e.name}
|
||||
tokenImageUrl=${e.iconUrl}
|
||||
tokenAmount=${e.quantity.numeric}
|
||||
tokenValue=${e.value}
|
||||
tokenCurrency=${e.symbol}
|
||||
></wui-list-token>`):u`<wui-flex
|
||||
.padding=${["4xl","0","0","0"]}
|
||||
alignItems="center"
|
||||
flexDirection="column"
|
||||
gap="l"
|
||||
>
|
||||
<wui-icon-box
|
||||
icon="coinPlaceholder"
|
||||
size="inherit"
|
||||
iconColor="fg-200"
|
||||
backgroundColor="fg-200"
|
||||
iconSize="lg"
|
||||
></wui-icon-box>
|
||||
<wui-flex
|
||||
class="textContent"
|
||||
gap="xs"
|
||||
flexDirection="column"
|
||||
justifyContent="center"
|
||||
flexDirection="column"
|
||||
>
|
||||
<wui-text variant="paragraph-500" align="center" color="fg-100"
|
||||
>No tokens found</wui-text
|
||||
>
|
||||
<wui-text variant="small-400" align="center" color="fg-200"
|
||||
>Your tokens will appear here</wui-text
|
||||
>
|
||||
</wui-flex>
|
||||
<wui-link @click=${this.onBuyClick.bind(this)}>Buy</wui-link>
|
||||
</wui-flex>`}
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
`}onBuyClick(){g.push("OnRampProviders")}onInputChange(e){this.onDebouncedSearch(e.detail)}handleTokenClick(e){l.setToken(e),l.setTokenAmount(void 0),g.goBack()}};k.styles=ie;S([c()],k.prototype,"tokenBalances",void 0);S([c()],k.prototype,"tokens",void 0);S([c()],k.prototype,"filteredTokens",void 0);S([c()],k.prototype,"search",void 0);k=S([w("w3m-wallet-send-select-token-view")],k);const ne=f`
|
||||
:host {
|
||||
display: flex;
|
||||
gap: var(--wui-spacing-xs);
|
||||
border-radius: var(--wui-border-radius-3xl);
|
||||
border: 1px solid var(--wui-color-gray-glass-002);
|
||||
background: var(--wui-color-gray-glass-002);
|
||||
padding: var(--wui-spacing-2xs) var(--wui-spacing-xs) var(--wui-spacing-2xs)
|
||||
var(--wui-spacing-s);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
wui-avatar,
|
||||
wui-icon,
|
||||
wui-image {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border: 1px solid var(--wui-color-gray-glass-002);
|
||||
border-radius: var(--wui-border-radius-3xl);
|
||||
box-shadow: 0 0 0 2px var(--wui-color-gray-glass-002);
|
||||
}
|
||||
`;var N=function(o,e,i,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(o,e,i,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(t=(r<3?s(t):r>3?s(e,i,t):s(e,i))||t);return r>3&&t&&Object.defineProperty(e,i,t),t};let y=class extends m{constructor(){super(...arguments),this.text="",this.address="",this.isAddress=!1}render(){return u`<wui-text variant="large-500" color="fg-100">${this.text}</wui-text>
|
||||
${this.imageTemplate()}`}imageTemplate(){return this.isAddress?u`<wui-avatar address=${this.address} .imageSrc=${this.imageSrc}></wui-avatar>`:this.imageSrc?u`<wui-image src=${this.imageSrc}></wui-image>`:u`<wui-icon size="inherit" color="fg-200" name="networkPlaceholder"></wui-icon>`}};y.styles=[z,W,ne];N([d()],y.prototype,"text",void 0);N([d()],y.prototype,"address",void 0);N([d()],y.prototype,"imageSrc",void 0);N([d({type:Boolean})],y.prototype,"isAddress",void 0);y=N([w("wui-preview-item")],y);const re=f`
|
||||
:host {
|
||||
display: flex;
|
||||
column-gap: var(--wui-spacing-s);
|
||||
padding: 17px 18px 17px var(--wui-spacing-m);
|
||||
width: 100%;
|
||||
background-color: var(--wui-color-gray-glass-002);
|
||||
border-radius: var(--wui-border-radius-xs);
|
||||
color: var(--wui-color-fg-250);
|
||||
}
|
||||
|
||||
wui-image {
|
||||
width: var(--wui-icon-size-lg);
|
||||
height: var(--wui-icon-size-lg);
|
||||
border-radius: var(--wui-border-radius-3xl);
|
||||
}
|
||||
|
||||
wui-icon {
|
||||
width: var(--wui-icon-size-lg);
|
||||
height: var(--wui-icon-size-lg);
|
||||
}
|
||||
`;var j=function(o,e,i,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(o,e,i,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(t=(r<3?s(t):r>3?s(e,i,t):s(e,i))||t);return r>3&&t&&Object.defineProperty(e,i,t),t};let T=class extends m{constructor(){super(...arguments),this.imageSrc=void 0,this.textTitle="",this.textValue=void 0}render(){return u`
|
||||
<wui-flex justifyContent="space-between" alignItems="center">
|
||||
<wui-text variant="paragraph-500" color=${this.textValue?"fg-200":"fg-100"}>
|
||||
${this.textTitle}
|
||||
</wui-text>
|
||||
${this.templateContent()}
|
||||
</wui-flex>
|
||||
`}templateContent(){return this.imageSrc?u`<wui-image src=${this.imageSrc} alt=${this.textTitle}></wui-image>`:this.textValue?u` <wui-text variant="paragraph-400" color="fg-100"> ${this.textValue} </wui-text>`:u`<wui-icon size="inherit" color="fg-200" name="networkPlaceholder"></wui-icon>`}};T.styles=[z,W,re];j([d()],T.prototype,"imageSrc",void 0);j([d()],T.prototype,"textTitle",void 0);j([d()],T.prototype,"textValue",void 0);T=j([w("wui-list-content")],T);const oe=f`
|
||||
:host {
|
||||
display: flex;
|
||||
width: auto;
|
||||
flex-direction: column;
|
||||
gap: var(--wui-border-radius-1xs);
|
||||
border-radius: var(--wui-border-radius-s);
|
||||
background: var(--wui-color-gray-glass-002);
|
||||
padding: var(--wui-spacing-s) var(--wui-spacing-1xs) var(--wui-spacing-1xs)
|
||||
var(--wui-spacing-1xs);
|
||||
}
|
||||
|
||||
wui-text {
|
||||
padding: 0 var(--wui-spacing-1xs);
|
||||
}
|
||||
|
||||
wui-flex {
|
||||
margin-top: var(--wui-spacing-1xs);
|
||||
}
|
||||
|
||||
.network {
|
||||
cursor: pointer;
|
||||
transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg);
|
||||
will-change: background-color;
|
||||
}
|
||||
|
||||
.network:focus-visible {
|
||||
border: 1px solid var(--wui-color-accent-100);
|
||||
background-color: var(--wui-color-gray-glass-005);
|
||||
-webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
|
||||
-moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
|
||||
box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
|
||||
}
|
||||
|
||||
.network:hover {
|
||||
background-color: var(--wui-color-gray-glass-005);
|
||||
}
|
||||
|
||||
.network:active {
|
||||
background-color: var(--wui-color-gray-glass-010);
|
||||
}
|
||||
`;var U=function(o,e,i,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(o,e,i,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(t=(r<3?s(t):r>3?s(e,i,t):s(e,i))||t);return r>3&&t&&Object.defineProperty(e,i,t),t};let P=class extends m{render(){return u` <wui-text variant="small-400" color="fg-200">Details</wui-text>
|
||||
<wui-flex flexDirection="column" gap="xxs">
|
||||
<wui-list-content
|
||||
textTitle="Address"
|
||||
textValue=${b.getTruncateString({string:this.receiverAddress??"",charsStart:4,charsEnd:4,truncate:"middle"})}
|
||||
>
|
||||
</wui-list-content>
|
||||
${this.networkTemplate()}
|
||||
</wui-flex>`}networkTemplate(){return this.caipNetwork?.name?u` <wui-list-content
|
||||
@click=${()=>this.onNetworkClick(this.caipNetwork)}
|
||||
class="network"
|
||||
textTitle="Network"
|
||||
imageSrc=${Y(K.getNetworkImage(this.caipNetwork))}
|
||||
></wui-list-content>`:null}onNetworkClick(e){e&&g.push("Networks",{network:e})}};P.styles=oe;U([d()],P.prototype,"receiverAddress",void 0);U([d({type:Object})],P.prototype,"caipNetwork",void 0);P=U([w("w3m-wallet-send-details")],P);const se=f`
|
||||
wui-avatar,
|
||||
wui-image {
|
||||
display: ruby;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: var(--wui-border-radius-3xl);
|
||||
}
|
||||
|
||||
.sendButton {
|
||||
width: 70%;
|
||||
--local-width: 100% !important;
|
||||
--local-border-radius: var(--wui-border-radius-xs) !important;
|
||||
}
|
||||
|
||||
.cancelButton {
|
||||
width: 30%;
|
||||
--local-width: 100% !important;
|
||||
--local-border-radius: var(--wui-border-radius-xs) !important;
|
||||
}
|
||||
`;var v=function(o,e,i,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(o,e,i,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(t=(r<3?s(t):r>3?s(e,i,t):s(e,i))||t);return r>3&&t&&Object.defineProperty(e,i,t),t};let h=class extends m{constructor(){super(),this.unsubscribe=[],this.token=l.state.token,this.sendTokenAmount=l.state.sendTokenAmount,this.receiverAddress=l.state.receiverAddress,this.receiverProfileName=l.state.receiverProfileName,this.receiverProfileImageUrl=l.state.receiverProfileImageUrl,this.caipNetwork=x.state.activeCaipNetwork,this.loading=l.state.loading,this.unsubscribe.push(l.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress,this.receiverProfileName=e.receiverProfileName,this.receiverProfileImageUrl=e.receiverProfileImageUrl,this.loading=e.loading}),x.subscribeKey("activeCaipNetwork",e=>this.caipNetwork=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return u` <wui-flex flexDirection="column" .padding=${["0","l","l","l"]}>
|
||||
<wui-flex gap="xs" flexDirection="column" .padding=${["0","xs","0","xs"]}>
|
||||
<wui-flex alignItems="center" justifyContent="space-between">
|
||||
<wui-flex flexDirection="column" gap="4xs">
|
||||
<wui-text variant="small-400" color="fg-150">Send</wui-text>
|
||||
${this.sendValueTemplate()}
|
||||
</wui-flex>
|
||||
<wui-preview-item
|
||||
text="${this.sendTokenAmount?b.roundNumber(this.sendTokenAmount,6,5):"unknown"} ${this.token?.symbol}"
|
||||
.imageSrc=${this.token?.iconUrl}
|
||||
></wui-preview-item>
|
||||
</wui-flex>
|
||||
<wui-flex>
|
||||
<wui-icon color="fg-200" size="md" name="arrowBottom"></wui-icon>
|
||||
</wui-flex>
|
||||
<wui-flex alignItems="center" justifyContent="space-between">
|
||||
<wui-text variant="small-400" color="fg-150">To</wui-text>
|
||||
<wui-preview-item
|
||||
text="${this.receiverProfileName?b.getTruncateString({string:this.receiverProfileName,charsStart:20,charsEnd:0,truncate:"end"}):b.getTruncateString({string:this.receiverAddress?this.receiverAddress:"",charsStart:4,charsEnd:4,truncate:"middle"})}"
|
||||
address=${this.receiverAddress??""}
|
||||
.imageSrc=${this.receiverProfileImageUrl??void 0}
|
||||
.isAddress=${!0}
|
||||
></wui-preview-item>
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
<wui-flex flexDirection="column" .padding=${["xxl","0","0","0"]}>
|
||||
<w3m-wallet-send-details
|
||||
.caipNetwork=${this.caipNetwork}
|
||||
.receiverAddress=${this.receiverAddress}
|
||||
></w3m-wallet-send-details>
|
||||
<wui-flex justifyContent="center" gap="xxs" .padding=${["s","0","0","0"]}>
|
||||
<wui-icon size="sm" color="fg-200" name="warningCircle"></wui-icon>
|
||||
<wui-text variant="small-400" color="fg-200">Review transaction carefully</wui-text>
|
||||
</wui-flex>
|
||||
<wui-flex justifyContent="center" gap="s" .padding=${["l","0","0","0"]}>
|
||||
<wui-button
|
||||
class="cancelButton"
|
||||
@click=${this.onCancelClick.bind(this)}
|
||||
size="lg"
|
||||
variant="neutral"
|
||||
>
|
||||
Cancel
|
||||
</wui-button>
|
||||
<wui-button
|
||||
class="sendButton"
|
||||
@click=${this.onSendClick.bind(this)}
|
||||
size="lg"
|
||||
variant="main"
|
||||
.loading=${this.loading}
|
||||
>
|
||||
Send
|
||||
</wui-button>
|
||||
</wui-flex>
|
||||
</wui-flex></wui-flex
|
||||
>`}sendValueTemplate(){if(this.token&&this.sendTokenAmount){const i=this.token.price*this.sendTokenAmount;return u`<wui-text variant="paragraph-400" color="fg-100"
|
||||
>$${i.toFixed(2)}</wui-text
|
||||
>`}return null}async onSendClick(){if(!this.sendTokenAmount||!this.receiverAddress){_.showError("Please enter a valid amount and receiver address");return}try{await l.sendToken(),_.showSuccess("Transaction started"),g.replace("Account")}catch(e){_.showError("Failed to send transaction. Please try again."),console.error("SendController:sendToken - failed to send transaction",e);const i=e instanceof Error?e.message:"Unknown error";G.sendEvent({type:"track",event:"SEND_ERROR",properties:{message:i,isSmartAccount:J(x.state.activeChain)===Q.ACCOUNT_TYPES.SMART_ACCOUNT,token:this.token?.symbol||"",amount:this.sendTokenAmount,network:x.state.activeCaipNetwork?.caipNetworkId||""}})}}onCancelClick(){g.goBack()}};h.styles=se;v([c()],h.prototype,"token",void 0);v([c()],h.prototype,"sendTokenAmount",void 0);v([c()],h.prototype,"receiverAddress",void 0);v([c()],h.prototype,"receiverProfileName",void 0);v([c()],h.prototype,"receiverProfileImageUrl",void 0);v([c()],h.prototype,"caipNetwork",void 0);v([c()],h.prototype,"loading",void 0);h=v([w("w3m-wallet-send-preview-view")],h);export{k as W3mSendSelectTokenView,h as W3mWalletSendPreviewView,p as W3mWalletSendView};
|
||||
262
dist/assets/socials-DtOZCIFp.js
vendored
Normal file
262
dist/assets/socials-DtOZCIFp.js
vendored
Normal file
@ -0,0 +1,262 @@
|
||||
import{i as L,a5 as U,aa as c,c as I,a as _,O as $,aj as u,T as m,F as A,x as l,ak as F,L as P,al as N,Z as D,am as R,a9 as y,Y as d,$ as E,K as b,an as j,a0 as p,ao as W,R as v,ap as O,a8 as S,aq as q}from"./index-Cr5N_0pd.js";const M=L`
|
||||
:host {
|
||||
margin-top: var(--wui-spacing-3xs);
|
||||
}
|
||||
wui-separator {
|
||||
margin: var(--wui-spacing-m) calc(var(--wui-spacing-m) * -1) var(--wui-spacing-xs)
|
||||
calc(var(--wui-spacing-m) * -1);
|
||||
width: calc(100% + var(--wui-spacing-s) * 2);
|
||||
}
|
||||
`;var x=function(a,e,t,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,o);else for(var n=a.length-1;n>=0;n--)(s=a[n])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};let w=class extends _{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=$.state.connectors,this.authConnector=this.connectors.find(e=>e.type==="AUTH"),this.remoteFeatures=u.state.remoteFeatures,this.isPwaLoading=!1,this.unsubscribe.push($.subscribeKey("connectors",e=>{this.connectors=e,this.authConnector=this.connectors.find(t=>t.type==="AUTH")}),u.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}connectedCallback(){super.connectedCallback(),this.handlePwaFrameLoad()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.remoteFeatures?.socials||[];const t=!!this.authConnector,o=e?.length,r=m.state.view==="ConnectSocials";return(!t||!o)&&!r?null:(r&&!o&&(e=A.DEFAULT_SOCIALS),l` <wui-flex flexDirection="column" gap="xs">
|
||||
${e.map(i=>l`<wui-list-social
|
||||
@click=${()=>{this.onSocialClick(i)}}
|
||||
data-testid=${`social-selector-${i}`}
|
||||
name=${i}
|
||||
logo=${i}
|
||||
?disabled=${this.isPwaLoading}
|
||||
></wui-list-social>`)}
|
||||
</wui-flex>`)}async onSocialClick(e){e&&await F(e)}async handlePwaFrameLoad(){if(P.isPWA()){this.isPwaLoading=!0;try{this.authConnector?.provider instanceof N&&await this.authConnector.provider.init()}catch(e){D.open({displayMessage:"Error loading embedded wallet in PWA",debugMessage:e.message},"error")}finally{this.isPwaLoading=!1}}}};w.styles=M;x([U()],w.prototype,"tabIdx",void 0);x([c()],w.prototype,"connectors",void 0);x([c()],w.prototype,"authConnector",void 0);x([c()],w.prototype,"remoteFeatures",void 0);x([c()],w.prototype,"isPwaLoading",void 0);w=x([I("w3m-social-login-list")],w);const z=L`
|
||||
wui-flex {
|
||||
max-height: clamp(360px, 540px, 80vh);
|
||||
overflow: scroll;
|
||||
scrollbar-width: none;
|
||||
transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
|
||||
will-change: opacity;
|
||||
}
|
||||
wui-flex::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
wui-flex.disabled {
|
||||
opacity: 0.3;
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
}
|
||||
`;var T=function(a,e,t,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,o);else for(var n=a.length-1;n>=0;n--)(s=a[n])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};let k=class extends _{constructor(){super(),this.unsubscribe=[],this.checked=R.state.isLegalCheckboxChecked,this.unsubscribe.push(R.subscribeKey("isLegalCheckboxChecked",e=>{this.checked=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const{termsConditionsUrl:e,privacyPolicyUrl:t}=u.state,o=u.state.features?.legalCheckbox,i=!!(e||t)&&!!o,s=i&&!this.checked,n=s?-1:void 0;return l`
|
||||
<w3m-legal-checkbox></w3m-legal-checkbox>
|
||||
<wui-flex
|
||||
flexDirection="column"
|
||||
.padding=${i?["0","s","s","s"]:"s"}
|
||||
gap="xs"
|
||||
class=${y(s?"disabled":void 0)}
|
||||
>
|
||||
<w3m-social-login-list tabIdx=${y(n)}></w3m-social-login-list>
|
||||
</wui-flex>
|
||||
<w3m-legal-footer></w3m-legal-footer>
|
||||
`}};k.styles=z;T([c()],k.prototype,"checked",void 0);k=T([I("w3m-connect-socials-view")],k);const B=L`
|
||||
wui-logo {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: var(--wui-border-radius-m);
|
||||
}
|
||||
@keyframes shake {
|
||||
0% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
25% {
|
||||
transform: translateX(3px);
|
||||
}
|
||||
50% {
|
||||
transform: translateX(-3px);
|
||||
}
|
||||
75% {
|
||||
transform: translateX(3px);
|
||||
}
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
wui-flex:first-child:not(:only-child) {
|
||||
position: relative;
|
||||
}
|
||||
wui-loading-thumbnail {
|
||||
position: absolute;
|
||||
}
|
||||
wui-icon-box {
|
||||
position: absolute;
|
||||
right: calc(var(--wui-spacing-3xs) * -1);
|
||||
bottom: calc(var(--wui-spacing-3xs) * -1);
|
||||
opacity: 0;
|
||||
transform: scale(0.5);
|
||||
transition: all var(--wui-ease-out-power-2) var(--wui-duration-lg);
|
||||
}
|
||||
wui-text[align='center'] {
|
||||
width: 100%;
|
||||
padding: 0px var(--wui-spacing-l);
|
||||
}
|
||||
[data-error='true'] wui-icon-box {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
}
|
||||
[data-error='true'] > wui-flex:first-child {
|
||||
animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
|
||||
}
|
||||
.capitalize {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
`;var g=function(a,e,t,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,o);else for(var n=a.length-1;n>=0;n--)(s=a[n])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};let h=class extends _{constructor(){super(),this.unsubscribe=[],this.socialProvider=d.state.socialProvider,this.socialWindow=d.state.socialWindow,this.error=!1,this.connecting=!1,this.message="Connect in the provider window",this.remoteFeatures=u.state.remoteFeatures,this.address=d.state.address,this.connectionsByNamespace=E.getConnections(b.state.activeChain),this.hasMultipleConnections=this.connectionsByNamespace.length>0,this.authConnector=$.getAuthConnector(),this.handleSocialConnection=async t=>{if(t.data?.resultUri)if(t.origin===j.SECURE_SITE_ORIGIN){window.removeEventListener("message",this.handleSocialConnection,!1);try{if(this.authConnector&&!this.connecting){this.socialWindow&&(this.socialWindow.close(),d.setSocialWindow(void 0,b.state.activeChain)),this.connecting=!0,this.updateMessage();const o=t.data.resultUri;this.socialProvider&&p.sendEvent({type:"track",event:"SOCIAL_LOGIN_REQUEST_USER_DATA",properties:{provider:this.socialProvider}}),await E.connectExternal({id:this.authConnector.id,type:this.authConnector.type,socialUri:o},this.authConnector.chain),this.socialProvider&&(W.setConnectedSocialProvider(this.socialProvider),p.sendEvent({type:"track",event:"SOCIAL_LOGIN_SUCCESS",properties:{provider:this.socialProvider,caipNetworkId:b.getActiveCaipNetwork()?.caipNetworkId}}))}}catch{this.error=!0,this.updateMessage(),this.socialProvider&&p.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:this.socialProvider}})}}else m.goBack(),v.showError("Untrusted Origin"),this.socialProvider&&p.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:this.socialProvider}})},q.EmbeddedWalletAbortController.signal.addEventListener("abort",()=>{this.socialWindow&&(this.socialWindow.close(),d.setSocialWindow(void 0,b.state.activeChain))}),this.unsubscribe.push(d.subscribe(t=>{t.socialProvider&&(this.socialProvider=t.socialProvider),t.socialWindow&&(this.socialWindow=t.socialWindow)}),u.subscribeKey("remoteFeatures",t=>{this.remoteFeatures=t}),d.subscribeKey("address",t=>{const o=this.remoteFeatures?.multiWallet;t&&t!==this.address&&(this.hasMultipleConnections&&o?(m.replace("ProfileWallets"),v.showSuccess("New Wallet Added")):(O.state.open||u.state.enableEmbedded)&&O.close())})),this.authConnector&&this.connectSocial()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),window.removeEventListener("message",this.handleSocialConnection,!1),this.socialWindow?.close(),d.setSocialWindow(void 0,b.state.activeChain)}render(){return l`
|
||||
<wui-flex
|
||||
data-error=${y(this.error)}
|
||||
flexDirection="column"
|
||||
alignItems="center"
|
||||
.padding=${["3xl","xl","xl","xl"]}
|
||||
gap="xl"
|
||||
>
|
||||
<wui-flex justifyContent="center" alignItems="center">
|
||||
<wui-logo logo=${y(this.socialProvider)}></wui-logo>
|
||||
${this.error?null:this.loaderTemplate()}
|
||||
<wui-icon-box
|
||||
backgroundColor="error-100"
|
||||
background="opaque"
|
||||
iconColor="error-100"
|
||||
icon="close"
|
||||
size="sm"
|
||||
border
|
||||
borderColor="wui-color-bg-125"
|
||||
></wui-icon-box>
|
||||
</wui-flex>
|
||||
<wui-flex flexDirection="column" alignItems="center" gap="xs">
|
||||
<wui-text align="center" variant="paragraph-500" color="fg-100"
|
||||
>Log in with
|
||||
<span class="capitalize">${this.socialProvider??"Social"}</span></wui-text
|
||||
>
|
||||
<wui-text align="center" variant="small-400" color=${this.error?"error-100":"fg-200"}
|
||||
>${this.message}</wui-text
|
||||
></wui-flex
|
||||
>
|
||||
</wui-flex>
|
||||
`}loaderTemplate(){const e=S.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return l`<wui-loading-thumbnail radius=${t*9}></wui-loading-thumbnail>`}connectSocial(){const e=setInterval(()=>{this.socialWindow?.closed&&(!this.connecting&&m.state.view==="ConnectingSocial"&&(this.socialProvider&&p.sendEvent({type:"track",event:"SOCIAL_LOGIN_CANCELED",properties:{provider:this.socialProvider}}),m.goBack()),clearInterval(e))},1e3);window.addEventListener("message",this.handleSocialConnection,!1)}updateMessage(){this.error?this.message="Something went wrong":this.connecting?this.message="Retrieving user data":this.message="Connect in the provider window"}};h.styles=B;g([c()],h.prototype,"socialProvider",void 0);g([c()],h.prototype,"socialWindow",void 0);g([c()],h.prototype,"error",void 0);g([c()],h.prototype,"connecting",void 0);g([c()],h.prototype,"message",void 0);g([c()],h.prototype,"remoteFeatures",void 0);h=g([I("w3m-connecting-social-view")],h);const V=L`
|
||||
@keyframes fadein {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
wui-shimmer {
|
||||
width: 100%;
|
||||
aspect-ratio: 1 / 1;
|
||||
border-radius: clamp(0px, var(--wui-border-radius-l), 40px) !important;
|
||||
}
|
||||
|
||||
wui-qr-code {
|
||||
opacity: 0;
|
||||
animation-duration: 200ms;
|
||||
animation-timing-function: ease;
|
||||
animation-name: fadein;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
||||
|
||||
wui-logo {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: var(--wui-border-radius-m);
|
||||
}
|
||||
|
||||
wui-flex:first-child:not(:only-child) {
|
||||
position: relative;
|
||||
}
|
||||
wui-loading-thumbnail {
|
||||
position: absolute;
|
||||
}
|
||||
wui-icon-box {
|
||||
position: absolute;
|
||||
right: calc(var(--wui-spacing-3xs) * -1);
|
||||
bottom: calc(var(--wui-spacing-3xs) * -1);
|
||||
opacity: 0;
|
||||
transform: scale(0.5);
|
||||
transition: all var(--wui-ease-out-power-2) var(--wui-duration-lg);
|
||||
}
|
||||
`;var C=function(a,e,t,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,o);else for(var n=a.length-1;n>=0;n--)(s=a[n])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};let f=class extends _{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.socialProvider=d.state.socialProvider,this.uri=d.state.farcasterUrl,this.ready=!1,this.loading=!1,this.remoteFeatures=u.state.remoteFeatures,this.authConnector=$.getAuthConnector(),this.forceUpdate=()=>{this.requestUpdate()},this.unsubscribe.push(d.subscribeKey("farcasterUrl",e=>{e&&(this.uri=e,this.connectFarcaster())}),d.subscribeKey("socialProvider",e=>{e&&(this.socialProvider=e)}),u.subscribeKey("remoteFeatures",e=>{this.remoteFeatures=e})),window.addEventListener("resize",this.forceUpdate)}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.timeout),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),l`${this.platformTemplate()}`}platformTemplate(){return P.isMobile()?l`${this.mobileTemplate()}`:l`${this.desktopTemplate()}`}desktopTemplate(){return this.loading?l`${this.loadingTemplate()}`:l`${this.qrTemplate()}`}qrTemplate(){return l` <wui-flex
|
||||
flexDirection="column"
|
||||
alignItems="center"
|
||||
.padding=${["0","xl","xl","xl"]}
|
||||
gap="xl"
|
||||
>
|
||||
<wui-shimmer borderRadius="l" width="100%"> ${this.qrCodeTemplate()} </wui-shimmer>
|
||||
|
||||
<wui-text variant="paragraph-500" color="fg-100">
|
||||
Scan this QR Code with your phone
|
||||
</wui-text>
|
||||
${this.copyTemplate()}
|
||||
</wui-flex>`}loadingTemplate(){return l`
|
||||
<wui-flex
|
||||
flexDirection="column"
|
||||
alignItems="center"
|
||||
.padding=${["xl","xl","xl","xl"]}
|
||||
gap="xl"
|
||||
>
|
||||
<wui-flex justifyContent="center" alignItems="center">
|
||||
<wui-logo logo="farcaster"></wui-logo>
|
||||
${this.loaderTemplate()}
|
||||
<wui-icon-box
|
||||
backgroundColor="error-100"
|
||||
background="opaque"
|
||||
iconColor="error-100"
|
||||
icon="close"
|
||||
size="sm"
|
||||
border
|
||||
borderColor="wui-color-bg-125"
|
||||
></wui-icon-box>
|
||||
</wui-flex>
|
||||
<wui-flex flexDirection="column" alignItems="center" gap="xs">
|
||||
<wui-text align="center" variant="paragraph-500" color="fg-100">
|
||||
Loading user data
|
||||
</wui-text>
|
||||
<wui-text align="center" variant="small-400" color="fg-200">
|
||||
Please wait a moment while we load your data.
|
||||
</wui-text>
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
`}mobileTemplate(){return l` <wui-flex
|
||||
flexDirection="column"
|
||||
alignItems="center"
|
||||
.padding=${["3xl","xl","xl","xl"]}
|
||||
gap="xl"
|
||||
>
|
||||
<wui-flex justifyContent="center" alignItems="center">
|
||||
<wui-logo logo="farcaster"></wui-logo>
|
||||
${this.loaderTemplate()}
|
||||
<wui-icon-box
|
||||
backgroundColor="error-100"
|
||||
background="opaque"
|
||||
iconColor="error-100"
|
||||
icon="close"
|
||||
size="sm"
|
||||
border
|
||||
borderColor="wui-color-bg-125"
|
||||
></wui-icon-box>
|
||||
</wui-flex>
|
||||
<wui-flex flexDirection="column" alignItems="center" gap="xs">
|
||||
<wui-text align="center" variant="paragraph-500" color="fg-100"
|
||||
>Continue in Farcaster</span></wui-text
|
||||
>
|
||||
<wui-text align="center" variant="small-400" color="fg-200"
|
||||
>Accept connection request in the app</wui-text
|
||||
></wui-flex
|
||||
>
|
||||
${this.mobileLinkTemplate()}
|
||||
</wui-flex>`}loaderTemplate(){const e=S.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return l`<wui-loading-thumbnail radius=${t*9}></wui-loading-thumbnail>`}async connectFarcaster(){if(this.authConnector)try{await this.authConnector?.provider.connectFarcaster(),this.socialProvider&&(W.setConnectedSocialProvider(this.socialProvider),p.sendEvent({type:"track",event:"SOCIAL_LOGIN_REQUEST_USER_DATA",properties:{provider:this.socialProvider}})),this.loading=!0;const t=E.getConnections(this.authConnector.chain).length>0;await E.connectExternal(this.authConnector,this.authConnector.chain);const o=this.remoteFeatures?.multiWallet;this.socialProvider&&p.sendEvent({type:"track",event:"SOCIAL_LOGIN_SUCCESS",properties:{provider:this.socialProvider,caipNetworkId:b.getActiveCaipNetwork()?.caipNetworkId}}),this.loading=!1,t&&o?(m.replace("ProfileWallets"),v.showSuccess("New Wallet Added")):O.close()}catch(e){this.socialProvider&&p.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:this.socialProvider}}),m.goBack(),v.showError(e)}}mobileLinkTemplate(){return l`<wui-button
|
||||
size="md"
|
||||
?loading=${this.loading}
|
||||
?disabled=${!this.uri||this.loading}
|
||||
@click=${()=>{this.uri&&P.openHref(this.uri,"_blank")}}
|
||||
>
|
||||
Open farcaster</wui-button
|
||||
>`}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout(()=>{this.ready=!0},200))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;const e=this.getBoundingClientRect().width-40;return l` <wui-qr-code
|
||||
size=${e}
|
||||
theme=${S.state.themeMode}
|
||||
uri=${this.uri}
|
||||
?farcaster=${!0}
|
||||
data-testid="wui-qr-code"
|
||||
color=${y(S.state.themeVariables["--w3m-qr-color"])}
|
||||
></wui-qr-code>`}copyTemplate(){const e=!this.uri||!this.ready;return l`<wui-link
|
||||
.disabled=${e}
|
||||
@click=${this.onCopyUri}
|
||||
color="fg-200"
|
||||
data-testid="copy-wc2-uri"
|
||||
>
|
||||
<wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon>
|
||||
Copy link
|
||||
</wui-link>`}onCopyUri(){try{this.uri&&(P.copyToClopboard(this.uri),v.showSuccess("Link copied"))}catch{v.showError("Failed to copy")}}};f.styles=V;C([c()],f.prototype,"socialProvider",void 0);C([c()],f.prototype,"uri",void 0);C([c()],f.prototype,"ready",void 0);C([c()],f.prototype,"loading",void 0);C([c()],f.prototype,"remoteFeatures",void 0);f=C([I("w3m-connecting-farcaster-view")],f);export{k as W3mConnectSocialsView,f as W3mConnectingFarcasterView,h as W3mConnectingSocialView};
|
||||
13
dist/assets/solana-wnPogKuz.js
vendored
Normal file
13
dist/assets/solana-wnPogKuz.js
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
import{b as C}from"./index-Cr5N_0pd.js";const i=C`
|
||||
<svg width="13" height="12" viewBox="0 0 13 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_24458_3940)">
|
||||
<path d="M6.49987 12C9.81351 12 12.4997 9.31371 12.4997 6C12.4997 2.68629 9.81351 0 6.49987 0C3.18623 0 0.5 2.68629 0.5 6C0.5 9.31371 3.18623 12 6.49987 12Z" fill="var(--wui-color-gray-glass-005)"/>
|
||||
<path d="M9.89298 7.73057L8.76102 8.91828C8.73642 8.94408 8.70664 8.96465 8.67356 8.97871C8.64047 8.99277 8.60478 9.00002 8.56872 9H3.2027C3.1771 9 3.15205 8.99268 3.13064 8.97895C3.10923 8.96521 3.09239 8.94565 3.08218 8.92268C3.07197 8.8997 3.06885 8.87431 3.07319 8.84963C3.07753 8.82494 3.08915 8.80203 3.10662 8.78371L4.23943 7.596C4.26397 7.57027 4.29365 7.54974 4.32662 7.53569C4.3596 7.52163 4.39518 7.51435 4.43115 7.51428H9.79688C9.82248 7.51428 9.84752 7.52161 9.86895 7.53534C9.89033 7.54908 9.90717 7.56864 9.91742 7.59161C9.92761 7.61459 9.93073 7.63997 9.92638 7.66466C9.92204 7.68935 9.91043 7.71226 9.89298 7.73057ZM8.76102 5.33885C8.73642 5.31305 8.70664 5.29248 8.67356 5.27843C8.64047 5.26437 8.60478 5.25713 8.56872 5.25715H3.2027C3.1771 5.25715 3.15205 5.26446 3.13064 5.2782C3.10923 5.29194 3.09239 5.31149 3.08218 5.33446C3.07197 5.35744 3.06885 5.38283 3.07319 5.40752C3.07753 5.4322 3.08915 5.45511 3.10662 5.47343L4.23943 6.66115C4.26397 6.68688 4.29365 6.7074 4.32662 6.72146C4.3596 6.73551 4.39518 6.7428 4.43115 6.74285H9.79688C9.82248 6.74285 9.84752 6.73554 9.86895 6.7218C9.89033 6.70806 9.90717 6.68851 9.91742 6.66554C9.92761 6.64256 9.93073 6.61717 9.92638 6.59248C9.92204 6.5678 9.91043 6.54489 9.89298 6.52657L8.76102 5.33885ZM3.2027 4.48572H8.56872C8.60478 4.48573 8.64047 4.47849 8.67356 4.46443C8.70664 4.45037 8.73642 4.4298 8.76102 4.404L9.89298 3.21629C9.91043 3.19797 9.92204 3.17506 9.92638 3.15037C9.93073 3.12569 9.92761 3.1003 9.91742 3.07732C9.90717 3.05435 9.89033 3.03479 9.86895 3.02106C9.84752 3.00732 9.82248 3 9.79688 3H4.43115C4.39518 3.00006 4.3596 3.00734 4.32662 3.0214C4.29365 3.03545 4.26397 3.05598 4.23943 3.08171L3.10691 4.26943C3.08946 4.28772 3.07785 4.31061 3.0735 4.33527C3.06914 4.35993 3.07224 4.3853 3.08241 4.40826C3.09258 4.43122 3.10938 4.45078 3.13075 4.46454C3.15212 4.4783 3.17712 4.48565 3.2027 4.48572Z" fill="var(--wui-color-gray-glass-090)"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_24458_3940">
|
||||
<rect width="11.9997" height="12" fill="white" transform="translate(0.5)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
`;export{i as solanaSvg};
|
||||
8
dist/assets/swapHorizontal-iQa05UE_.js
vendored
Normal file
8
dist/assets/swapHorizontal-iQa05UE_.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const o=l`<svg fill="none" viewBox="0 0 20 20">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M6.76.3a1 1 0 0 1 0 1.4L4.07 4.4h9a1 1 0 1 1 0 2h-9l2.69 2.68a1 1 0 1 1-1.42 1.42L.95 6.09a1 1 0 0 1 0-1.4l4.4-4.4a1 1 0 0 1 1.4 0Zm6.49 9.21a1 1 0 0 1 1.41 0l4.39 4.4a1 1 0 0 1 0 1.4l-4.39 4.4a1 1 0 0 1-1.41-1.42l2.68-2.68h-9a1 1 0 0 1 0-2h9l-2.68-2.68a1 1 0 0 1 0-1.42Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{o as swapHorizontalSvg};
|
||||
8
dist/assets/swapHorizontalBold-CxDNxTSc.js
vendored
Normal file
8
dist/assets/swapHorizontalBold-CxDNxTSc.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as C}from"./index-Cr5N_0pd.js";const e=C`<svg width="10" height="10" viewBox="0 0 10 10">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M3.77986 0.566631C4.0589 0.845577 4.0589 1.29784 3.77986 1.57678L3.08261 2.2738H6.34184C6.73647 2.2738 7.05637 2.5936 7.05637 2.98808C7.05637 3.38257 6.73647 3.70237 6.34184 3.70237H3.08261L3.77986 4.39938C4.0589 4.67833 4.0589 5.13059 3.77986 5.40954C3.50082 5.68848 3.04841 5.68848 2.76937 5.40954L0.852346 3.49316C0.573306 3.21421 0.573306 2.76195 0.852346 2.48301L2.76937 0.566631C3.04841 0.287685 3.50082 0.287685 3.77986 0.566631ZM6.22 4.59102C6.49904 4.31208 6.95145 4.31208 7.23049 4.59102L9.14751 6.5074C9.42655 6.78634 9.42655 7.23861 9.14751 7.51755L7.23049 9.43393C6.95145 9.71287 6.49904 9.71287 6.22 9.43393C5.94096 9.15498 5.94096 8.70272 6.22 8.42377L6.91725 7.72676L3.65802 7.72676C3.26339 7.72676 2.94349 7.40696 2.94349 7.01247C2.94349 6.61798 3.26339 6.29819 3.65802 6.29819L6.91725 6.29819L6.22 5.60117C5.94096 5.32223 5.94096 4.86997 6.22 4.59102Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{e as swapHorizontalBoldSvg};
|
||||
16
dist/assets/swapHorizontalMedium-KeWOduSV.js
vendored
Normal file
16
dist/assets/swapHorizontalMedium-KeWOduSV.js
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
import{b as C}from"./index-Cr5N_0pd.js";const e=C`<svg
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 14 14"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M13.7306 3.24213C14.0725 3.58384 14.0725 4.13786 13.7306 4.47957L10.7418 7.46737C10.4 7.80908 9.84581 7.80908 9.50399 7.46737C9.16216 7.12567 9.16216 6.57165 9.50399 6.22994L10.9986 4.73585H5.34082C4.85741 4.73585 4.46553 4.3441 4.46553 3.86085C4.46553 3.3776 4.85741 2.98585 5.34082 2.98585L10.9986 2.98585L9.50399 1.49177C9.16216 1.15006 9.16216 0.596037 9.50399 0.254328C9.84581 -0.0873803 10.4 -0.0873803 10.7418 0.254328L13.7306 3.24213ZM9.52515 10.1352C9.52515 10.6185 9.13327 11.0102 8.64986 11.0102L2.9921 11.0102L4.48669 12.5043C4.82852 12.846 4.82852 13.4001 4.48669 13.7418C4.14487 14.0835 3.59066 14.0835 3.24884 13.7418L0.26003 10.754C0.0958806 10.5899 0.0036621 10.3673 0.00366211 10.1352C0.00366212 9.90318 0.0958806 9.68062 0.26003 9.51652L3.24884 6.52872C3.59066 6.18701 4.14487 6.18701 4.48669 6.52872C4.82851 6.87043 4.82851 7.42445 4.48669 7.76616L2.9921 9.26024L8.64986 9.26024C9.13327 9.26024 9.52515 9.65199 9.52515 10.1352Z"
|
||||
fill="currentColor"
|
||||
/>
|
||||
</svg>
|
||||
|
||||
`;export{e as swapHorizontalMediumSvg};
|
||||
8
dist/assets/swapHorizontalRoundedBold-BKa1b4V9.js
vendored
Normal file
8
dist/assets/swapHorizontalRoundedBold-BKa1b4V9.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as C}from"./index-Cr5N_0pd.js";const L=C`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M8.3071 0.292893C8.69763 0.683417 8.69763 1.31658 8.3071 1.70711L6.41421 3.6H11.3404C13.8368 3.6 16.0533 5.1975 16.8427 7.56588L16.9487 7.88377C17.1233 8.40772 16.8402 8.97404 16.3162 9.14868C15.7923 9.32333 15.226 9.04017 15.0513 8.51623L14.9453 8.19834C14.4281 6.64664 12.976 5.6 11.3404 5.6H6.41421L8.3071 7.49289C8.69763 7.88342 8.69763 8.51658 8.3071 8.90711C7.91658 9.29763 7.28341 9.29763 6.89289 8.90711L3.29289 5.30711C2.90236 4.91658 2.90236 4.28342 3.29289 3.89289L6.89289 0.292893C7.28341 -0.0976311 7.91658 -0.0976311 8.3071 0.292893ZM3.68377 10.8513C4.20771 10.6767 4.77403 10.9598 4.94868 11.4838L5.05464 11.8017C5.57188 13.3534 7.024 14.4 8.65964 14.4L13.5858 14.4L11.6929 12.5071C11.3024 12.1166 11.3024 11.4834 11.6929 11.0929C12.0834 10.7024 12.7166 10.7024 13.1071 11.0929L16.7071 14.6929C17.0976 15.0834 17.0976 15.7166 16.7071 16.1071L13.1071 19.7071C12.7166 20.0976 12.0834 20.0976 11.6929 19.7071C11.3024 19.3166 11.3024 18.6834 11.6929 18.2929L13.5858 16.4L8.65964 16.4C6.16314 16.4 3.94674 14.8025 3.15728 12.4341L3.05131 12.1162C2.87667 11.5923 3.15983 11.026 3.68377 10.8513Z"
|
||||
/>
|
||||
</svg>`;export{L as swapHorizontalRoundedBoldSvg};
|
||||
8
dist/assets/swapVertical-BkcJfrl6.js
vendored
Normal file
8
dist/assets/swapVertical-BkcJfrl6.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const e=l`<svg fill="none" viewBox="0 0 14 14">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M3.48 2.18a1 1 0 0 1 1.41 0l2.68 2.68a1 1 0 1 1-1.41 1.42l-.98-.98v4.56a1 1 0 0 1-2 0V5.3l-.97.98A1 1 0 0 1 .79 4.86l2.69-2.68Zm6.34 2.93a1 1 0 0 1 1 1v4.56l.97-.98a1 1 0 1 1 1.42 1.42l-2.69 2.68a1 1 0 0 1-1.41 0l-2.68-2.68a1 1 0 0 1 1.41-1.42l.98.98V6.1a1 1 0 0 1 1-1Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{e as swapVerticalSvg};
|
||||
976
dist/assets/swaps-2zeCrlxq.js
vendored
Normal file
976
dist/assets/swaps-2zeCrlxq.js
vendored
Normal file
@ -0,0 +1,976 @@
|
||||
import{i as A,aa as s,a5 as w,c as P,a as C,K as I,N as D,x as u,a7 as x,F as z,a0 as O,T,Y as U,L as K,ap as F,a1 as M,a2 as Q,a3 as H,a4 as q,aF as L}from"./index-Cr5N_0pd.js";import{S as o}from"./index-DUeQylCA.js";const G={numericInputKeyDown(l,e,i){const n=["Backspace","Meta","Ctrl","a","A","c","C","x","X","v","V","ArrowLeft","ArrowRight","Tab"],r=l.metaKey||l.ctrlKey,t=l.key,a=t.toLocaleLowerCase(),c=a==="a",E=a==="c",V=a==="v",W=a==="x",N=t===",",j=t===".",R=t>="0"&&t<="9";!r&&(c||E||V||W)&&l.preventDefault(),e==="0"&&!N&&!j&&t==="0"&&l.preventDefault(),e==="0"&&R&&(i(t),l.preventDefault()),(N||j)&&(e||(i("0."),l.preventDefault()),(e?.includes(".")||e?.includes(","))&&l.preventDefault()),!R&&!n.includes(t)&&!j&&!N&&l.preventDefault()}},Y=A`
|
||||
:host {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.details-container > wui-flex {
|
||||
background: var(--wui-color-gray-glass-002);
|
||||
border-radius: var(--wui-border-radius-xxs);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.details-container > wui-flex > button {
|
||||
border: none;
|
||||
background: none;
|
||||
padding: var(--wui-spacing-s);
|
||||
border-radius: var(--wui-border-radius-xxs);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.details-content-container {
|
||||
padding: var(--wui-spacing-1xs);
|
||||
padding-top: 0px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.details-content-container > wui-flex {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.details-row {
|
||||
width: 100%;
|
||||
padding: var(--wui-spacing-s);
|
||||
padding-left: var(--wui-spacing-s);
|
||||
padding-right: var(--wui-spacing-1xs);
|
||||
border-radius: calc(var(--wui-border-radius-5xs) + var(--wui-border-radius-4xs));
|
||||
background: var(--wui-color-gray-glass-002);
|
||||
}
|
||||
|
||||
.details-row-title {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.details-row.provider-free-row {
|
||||
padding-right: var(--wui-spacing-xs);
|
||||
}
|
||||
`;var b=function(l,e,i,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(l,e,i,n);else for(var c=l.length-1;c>=0;c--)(a=l[c])&&(t=(r<3?a(t):r>3?a(e,i,t):a(e,i))||t);return r>3&&t&&Object.defineProperty(e,i,t),t};const X=z.CONVERT_SLIPPAGE_TOLERANCE;let f=class extends C{constructor(){super(),this.unsubscribe=[],this.networkName=I.state.activeCaipNetwork?.name,this.detailsOpen=!1,this.sourceToken=o.state.sourceToken,this.toToken=o.state.toToken,this.toTokenAmount=o.state.toTokenAmount,this.sourceTokenPriceInUSD=o.state.sourceTokenPriceInUSD,this.toTokenPriceInUSD=o.state.toTokenPriceInUSD,this.priceImpact=o.state.priceImpact,this.maxSlippage=o.state.maxSlippage,this.networkTokenSymbol=o.state.networkTokenSymbol,this.inputError=o.state.inputError,this.unsubscribe.push(o.subscribe(e=>{this.sourceToken=e.sourceToken,this.toToken=e.toToken,this.toTokenAmount=e.toTokenAmount,this.priceImpact=e.priceImpact,this.maxSlippage=e.maxSlippage,this.sourceTokenPriceInUSD=e.sourceTokenPriceInUSD,this.toTokenPriceInUSD=e.toTokenPriceInUSD,this.inputError=e.inputError}))}render(){const e=this.toTokenAmount&&this.maxSlippage?D.bigNumber(this.toTokenAmount).minus(this.maxSlippage).toString():null;if(!this.sourceToken||!this.toToken||this.inputError)return null;const i=this.sourceTokenPriceInUSD&&this.toTokenPriceInUSD?1/this.toTokenPriceInUSD*this.sourceTokenPriceInUSD:0;return u`
|
||||
<wui-flex flexDirection="column" alignItems="center" gap="1xs" class="details-container">
|
||||
<wui-flex flexDirection="column">
|
||||
<button @click=${this.toggleDetails.bind(this)}>
|
||||
<wui-flex justifyContent="space-between" .padding=${["0","xs","0","xs"]}>
|
||||
<wui-flex justifyContent="flex-start" flexGrow="1" gap="xs">
|
||||
<wui-text variant="small-400" color="fg-100">
|
||||
1 ${this.sourceToken.symbol} =
|
||||
${x.formatNumberToLocalString(i,3)}
|
||||
${this.toToken.symbol}
|
||||
</wui-text>
|
||||
<wui-text variant="small-400" color="fg-200">
|
||||
$${x.formatNumberToLocalString(this.sourceTokenPriceInUSD)}
|
||||
</wui-text>
|
||||
</wui-flex>
|
||||
<wui-icon name="chevronBottom"></wui-icon>
|
||||
</wui-flex>
|
||||
</button>
|
||||
${this.detailsOpen?u`
|
||||
<wui-flex flexDirection="column" gap="xs" class="details-content-container">
|
||||
${this.priceImpact?u` <wui-flex flexDirection="column" gap="xs">
|
||||
<wui-flex
|
||||
justifyContent="space-between"
|
||||
alignItems="center"
|
||||
class="details-row"
|
||||
>
|
||||
<wui-flex alignItems="center" gap="xs">
|
||||
<wui-text class="details-row-title" variant="small-400" color="fg-150">
|
||||
Price impact
|
||||
</wui-text>
|
||||
<w3m-tooltip-trigger
|
||||
text="Price impact reflects the change in market price due to your trade"
|
||||
>
|
||||
<wui-icon size="xs" color="fg-250" name="infoCircle"></wui-icon>
|
||||
</w3m-tooltip-trigger>
|
||||
</wui-flex>
|
||||
<wui-flex>
|
||||
<wui-text variant="small-400" color="fg-200">
|
||||
${x.formatNumberToLocalString(this.priceImpact,3)}%
|
||||
</wui-text>
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
</wui-flex>`:null}
|
||||
${this.maxSlippage&&this.sourceToken.symbol?u`<wui-flex flexDirection="column" gap="xs">
|
||||
<wui-flex
|
||||
justifyContent="space-between"
|
||||
alignItems="center"
|
||||
class="details-row"
|
||||
>
|
||||
<wui-flex alignItems="center" gap="xs">
|
||||
<wui-text class="details-row-title" variant="small-400" color="fg-150">
|
||||
Max. slippage
|
||||
</wui-text>
|
||||
<w3m-tooltip-trigger
|
||||
text=${`Max slippage sets the minimum amount you must receive for the transaction to proceed. ${e?`Transaction will be reversed if you receive less than ${x.formatNumberToLocalString(e,6)} ${this.toToken.symbol} due to price changes.`:""}`}
|
||||
>
|
||||
<wui-icon size="xs" color="fg-250" name="infoCircle"></wui-icon>
|
||||
</w3m-tooltip-trigger>
|
||||
</wui-flex>
|
||||
<wui-flex>
|
||||
<wui-text variant="small-400" color="fg-200">
|
||||
${x.formatNumberToLocalString(this.maxSlippage,6)}
|
||||
${this.toToken.symbol} ${X}%
|
||||
</wui-text>
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
</wui-flex>`:null}
|
||||
<wui-flex flexDirection="column" gap="xs">
|
||||
<wui-flex
|
||||
justifyContent="space-between"
|
||||
alignItems="center"
|
||||
class="details-row provider-free-row"
|
||||
>
|
||||
<wui-flex alignItems="center" gap="xs">
|
||||
<wui-text class="details-row-title" variant="small-400" color="fg-150">
|
||||
Provider fee
|
||||
</wui-text>
|
||||
</wui-flex>
|
||||
<wui-flex>
|
||||
<wui-text variant="small-400" color="fg-200">0.85%</wui-text>
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
`:null}
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
`}toggleDetails(){this.detailsOpen=!this.detailsOpen}};f.styles=[Y];b([s()],f.prototype,"networkName",void 0);b([w()],f.prototype,"detailsOpen",void 0);b([s()],f.prototype,"sourceToken",void 0);b([s()],f.prototype,"toToken",void 0);b([s()],f.prototype,"toTokenAmount",void 0);b([s()],f.prototype,"sourceTokenPriceInUSD",void 0);b([s()],f.prototype,"toTokenPriceInUSD",void 0);b([s()],f.prototype,"priceImpact",void 0);b([s()],f.prototype,"maxSlippage",void 0);b([s()],f.prototype,"networkTokenSymbol",void 0);b([s()],f.prototype,"inputError",void 0);f=b([P("w3m-swap-details")],f);const Z=A`
|
||||
:host {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:host > wui-flex {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-radius: var(--wui-border-radius-s);
|
||||
padding: var(--wui-spacing-xl);
|
||||
padding-right: var(--wui-spacing-s);
|
||||
background-color: var(--wui-color-gray-glass-002);
|
||||
box-shadow: inset 0px 0px 0px 1px var(--wui-color-gray-glass-002);
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
wui-shimmer.market-value {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
:host > wui-flex > svg.input_mask {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
:host wui-flex .input_mask__border,
|
||||
:host wui-flex .input_mask__background {
|
||||
transition: fill var(--wui-duration-md) var(--wui-ease-out-power-1);
|
||||
will-change: fill;
|
||||
}
|
||||
|
||||
:host wui-flex .input_mask__border {
|
||||
fill: var(--wui-color-gray-glass-020);
|
||||
}
|
||||
|
||||
:host wui-flex .input_mask__background {
|
||||
fill: var(--wui-color-gray-glass-002);
|
||||
}
|
||||
`;var B=function(l,e,i,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(l,e,i,n);else for(var c=l.length-1;c>=0;c--)(a=l[c])&&(t=(r<3?a(t):r>3?a(e,i,t):a(e,i))||t);return r>3&&t&&Object.defineProperty(e,i,t),t};let _=class extends C{constructor(){super(...arguments),this.target="sourceToken"}render(){return u`
|
||||
<wui-flex class justifyContent="space-between">
|
||||
<wui-flex
|
||||
flex="1"
|
||||
flexDirection="column"
|
||||
alignItems="flex-start"
|
||||
justifyContent="center"
|
||||
class="swap-input"
|
||||
gap="xxs"
|
||||
>
|
||||
<wui-shimmer width="80px" height="40px" borderRadius="xxs" variant="light"></wui-shimmer>
|
||||
</wui-flex>
|
||||
${this.templateTokenSelectButton()}
|
||||
</wui-flex>
|
||||
`}templateTokenSelectButton(){return u`
|
||||
<wui-flex
|
||||
class="swap-token-button"
|
||||
flexDirection="column"
|
||||
alignItems="flex-end"
|
||||
justifyContent="center"
|
||||
gap="xxs"
|
||||
>
|
||||
<wui-shimmer width="80px" height="40px" borderRadius="3xl" variant="light"></wui-shimmer>
|
||||
</wui-flex>
|
||||
`}};_.styles=[Z];B([w()],_.prototype,"target",void 0);_=B([P("w3m-swap-input-skeleton")],_);const J=A`
|
||||
:host > wui-flex {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-radius: var(--wui-border-radius-s);
|
||||
background-color: var(--wui-color-gray-glass-002);
|
||||
padding: var(--wui-spacing-xl);
|
||||
padding-right: var(--wui-spacing-s);
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
box-sizing: border-box;
|
||||
box-shadow: inset 0px 0px 0px 1px var(--wui-color-gray-glass-002);
|
||||
position: relative;
|
||||
transition: box-shadow var(--wui-ease-out-power-1) var(--wui-duration-lg);
|
||||
will-change: background-color;
|
||||
}
|
||||
|
||||
:host wui-flex.focus {
|
||||
box-shadow: inset 0px 0px 0px 1px var(--wui-color-gray-glass-005);
|
||||
}
|
||||
|
||||
:host > wui-flex .swap-input,
|
||||
:host > wui-flex .swap-token-button {
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
:host > wui-flex .swap-input {
|
||||
-webkit-mask-image: linear-gradient(
|
||||
270deg,
|
||||
transparent 0px,
|
||||
transparent 8px,
|
||||
black 24px,
|
||||
black 25px,
|
||||
black 32px,
|
||||
black 100%
|
||||
);
|
||||
mask-image: linear-gradient(
|
||||
270deg,
|
||||
transparent 0px,
|
||||
transparent 8px,
|
||||
black 24px,
|
||||
black 25px,
|
||||
black 32px,
|
||||
black 100%
|
||||
);
|
||||
}
|
||||
|
||||
:host > wui-flex .swap-input input {
|
||||
background: none;
|
||||
border: none;
|
||||
height: 42px;
|
||||
width: 100%;
|
||||
font-size: 32px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: 130%;
|
||||
letter-spacing: -1.28px;
|
||||
outline: none;
|
||||
caret-color: var(--wui-color-accent-100);
|
||||
color: var(--wui-color-fg-100);
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
:host > wui-flex .swap-input input:focus-visible {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
:host > wui-flex .swap-input input::-webkit-outer-spin-button,
|
||||
:host > wui-flex .swap-input input::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.max-value-button {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
color: var(--wui-color-gray-glass-020);
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
.market-value {
|
||||
min-height: 18px;
|
||||
}
|
||||
`;var v=function(l,e,i,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(l,e,i,n);else for(var c=l.length-1;c>=0;c--)(a=l[c])&&(t=(r<3?a(t):r>3?a(e,i,t):a(e,i))||t);return r>3&&t&&Object.defineProperty(e,i,t),t};const ee=5e-5;let m=class extends C{constructor(){super(...arguments),this.focused=!1,this.price=0,this.target="sourceToken",this.onSetAmount=null,this.onSetMaxValue=null}render(){const e=this.marketValue||"0",i=D.bigNumber(e).gt("0");return u`
|
||||
<wui-flex class="${this.focused?"focus":""}" justifyContent="space-between">
|
||||
<wui-flex
|
||||
flex="1"
|
||||
flexDirection="column"
|
||||
alignItems="flex-start"
|
||||
justifyContent="center"
|
||||
class="swap-input"
|
||||
>
|
||||
<input
|
||||
data-testid="swap-input-${this.target}"
|
||||
@focusin=${()=>this.onFocusChange(!0)}
|
||||
@focusout=${()=>this.onFocusChange(!1)}
|
||||
?disabled=${this.disabled}
|
||||
.value=${this.value}
|
||||
@input=${this.dispatchInputChangeEvent}
|
||||
@keydown=${this.handleKeydown}
|
||||
placeholder="0"
|
||||
type="text"
|
||||
inputmode="decimal"
|
||||
/>
|
||||
<wui-text class="market-value" variant="small-400" color="fg-200">
|
||||
${i?`$${x.formatNumberToLocalString(this.marketValue,2)}`:null}
|
||||
</wui-text>
|
||||
</wui-flex>
|
||||
${this.templateTokenSelectButton()}
|
||||
</wui-flex>
|
||||
`}handleKeydown(e){return G.numericInputKeyDown(e,this.value,i=>this.onSetAmount?.(this.target,i))}dispatchInputChangeEvent(e){if(!this.onSetAmount)return;const i=e.target.value.replace(/[^0-9.]/gu,"");i===","||i==="."?this.onSetAmount(this.target,"0."):i.endsWith(",")?this.onSetAmount(this.target,i.replace(",",".")):this.onSetAmount(this.target,i)}setMaxValueToInput(){this.onSetMaxValue?.(this.target,this.balance)}templateTokenSelectButton(){return this.token?u`
|
||||
<wui-flex
|
||||
class="swap-token-button"
|
||||
flexDirection="column"
|
||||
alignItems="flex-end"
|
||||
justifyContent="center"
|
||||
gap="xxs"
|
||||
>
|
||||
<wui-token-button
|
||||
data-testid="swap-input-token-${this.target}"
|
||||
text=${this.token.symbol}
|
||||
imageSrc=${this.token.logoUri}
|
||||
@click=${this.onSelectToken.bind(this)}
|
||||
>
|
||||
</wui-token-button>
|
||||
<wui-flex alignItems="center" gap="xxs"> ${this.tokenBalanceTemplate()} </wui-flex>
|
||||
</wui-flex>
|
||||
`:u` <wui-button
|
||||
data-testid="swap-select-token-button-${this.target}"
|
||||
class="swap-token-button"
|
||||
size="md"
|
||||
variant="accent"
|
||||
@click=${this.onSelectToken.bind(this)}
|
||||
>
|
||||
Select token
|
||||
</wui-button>`}tokenBalanceTemplate(){const e=D.multiply(this.balance,this.price),i=e?e?.gt(ee):!1;return u`
|
||||
${i?u`<wui-text variant="small-400" color="fg-200">
|
||||
${x.formatNumberToLocalString(this.balance,2)}
|
||||
</wui-text>`:null}
|
||||
${this.target==="sourceToken"?this.tokenActionButtonTemplate(i):null}
|
||||
`}tokenActionButtonTemplate(e){return e?u` <button class="max-value-button" @click=${this.setMaxValueToInput.bind(this)}>
|
||||
<wui-text color="accent-100" variant="small-600">Max</wui-text>
|
||||
</button>`:u` <button class="max-value-button" @click=${this.onBuyToken.bind(this)}>
|
||||
<wui-text color="accent-100" variant="small-600">Buy</wui-text>
|
||||
</button>`}onFocusChange(e){this.focused=e}onSelectToken(){O.sendEvent({type:"track",event:"CLICK_SELECT_TOKEN_TO_SWAP"}),T.push("SwapSelectToken",{target:this.target})}onBuyToken(){T.push("OnRampProviders")}};m.styles=[J];v([w()],m.prototype,"focused",void 0);v([w()],m.prototype,"balance",void 0);v([w()],m.prototype,"value",void 0);v([w()],m.prototype,"price",void 0);v([w()],m.prototype,"marketValue",void 0);v([w()],m.prototype,"disabled",void 0);v([w()],m.prototype,"target",void 0);v([w()],m.prototype,"token",void 0);v([w()],m.prototype,"onSetAmount",void 0);v([w()],m.prototype,"onSetMaxValue",void 0);m=v([P("w3m-swap-input")],m);const te=A`
|
||||
:host > wui-flex:first-child {
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
:host > wui-flex:first-child::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
wui-loading-hexagon {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.action-button {
|
||||
width: 100%;
|
||||
border-radius: var(--wui-border-radius-xs);
|
||||
}
|
||||
|
||||
.action-button:disabled {
|
||||
border-color: 1px solid var(--wui-color-gray-glass-005);
|
||||
}
|
||||
|
||||
.swap-inputs-container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.replace-tokens-button-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
gap: var(--wui-spacing-1xs);
|
||||
border-radius: var(--wui-border-radius-xs);
|
||||
background-color: var(--wui-color-modal-bg-base);
|
||||
padding: var(--wui-spacing-xxs);
|
||||
}
|
||||
|
||||
.replace-tokens-button-container > button {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
padding: var(--wui-spacing-xs);
|
||||
border: none;
|
||||
border-radius: var(--wui-border-radius-xxs);
|
||||
background: var(--wui-color-gray-glass-002);
|
||||
transition: background-color var(--wui-duration-md) var(--wui-ease-out-power-1);
|
||||
will-change: background-color;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.replace-tokens-button-container > button:hover {
|
||||
background: var(--wui-color-gray-glass-005);
|
||||
}
|
||||
|
||||
.details-container > wui-flex {
|
||||
background: var(--wui-color-gray-glass-002);
|
||||
border-radius: var(--wui-border-radius-xxs);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.details-container > wui-flex > button {
|
||||
border: none;
|
||||
background: none;
|
||||
padding: var(--wui-spacing-s);
|
||||
border-radius: var(--wui-border-radius-xxs);
|
||||
transition: background 0.2s linear;
|
||||
}
|
||||
|
||||
.details-container > wui-flex > button:hover {
|
||||
background: var(--wui-color-gray-glass-002);
|
||||
}
|
||||
|
||||
.details-content-container {
|
||||
padding: var(--wui-spacing-1xs);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.details-content-container > wui-flex {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.details-row {
|
||||
width: 100%;
|
||||
padding: var(--wui-spacing-s) var(--wui-spacing-xl);
|
||||
border-radius: var(--wui-border-radius-xxs);
|
||||
background: var(--wui-color-gray-glass-002);
|
||||
}
|
||||
`;var h=function(l,e,i,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(l,e,i,n);else for(var c=l.length-1;c>=0;c--)(a=l[c])&&(t=(r<3?a(t):r>3?a(e,i,t):a(e,i))||t);return r>3&&t&&Object.defineProperty(e,i,t),t};let p=class extends C{constructor(){super(),this.unsubscribe=[],this.initialParams=T.state.data?.swap,this.detailsOpen=!1,this.caipAddress=U.state.caipAddress,this.caipNetworkId=I.state.activeCaipNetwork?.caipNetworkId,this.initialized=o.state.initialized,this.loadingQuote=o.state.loadingQuote,this.loadingPrices=o.state.loadingPrices,this.loadingTransaction=o.state.loadingTransaction,this.sourceToken=o.state.sourceToken,this.sourceTokenAmount=o.state.sourceTokenAmount,this.sourceTokenPriceInUSD=o.state.sourceTokenPriceInUSD,this.toToken=o.state.toToken,this.toTokenAmount=o.state.toTokenAmount,this.toTokenPriceInUSD=o.state.toTokenPriceInUSD,this.inputError=o.state.inputError,this.fetchError=o.state.fetchError,this.lastTokenPriceUpdate=0,this.minTokenPriceUpdateInterval=1e4,this.visibilityChangeHandler=()=>{document?.hidden?(clearInterval(this.interval),this.interval=void 0):this.startTokenPriceInterval()},this.startTokenPriceInterval=()=>{this.interval&&Date.now()-this.lastTokenPriceUpdate<this.minTokenPriceUpdateInterval||(this.lastTokenPriceUpdate&&Date.now()-this.lastTokenPriceUpdate>this.minTokenPriceUpdateInterval&&this.fetchTokensAndValues(),clearInterval(this.interval),this.interval=setInterval(()=>{this.fetchTokensAndValues()},this.minTokenPriceUpdateInterval))},this.watchTokensAndValues=()=>{!this.sourceToken||!this.toToken||(this.subscribeToVisibilityChange(),this.startTokenPriceInterval())},this.onDebouncedGetSwapCalldata=K.debounce(async()=>{await o.swapTokens()},200),I.subscribeKey("activeCaipNetwork",e=>this.onCaipNetworkChange({newCaipNetwork:e,resetSwapState:!0,initializeSwapState:!1})),U.subscribeKey("caipAddress",e=>this.onCaipAddressChange({newCaipAddress:e,resetSwapState:!0,initializeSwapState:!1})),this.unsubscribe.push(I.subscribeKey("activeCaipNetwork",e=>this.onCaipNetworkChange({newCaipNetwork:e,resetSwapState:!1,initializeSwapState:!0})),U.subscribeKey("caipAddress",e=>this.onCaipAddressChange({newCaipAddress:e,resetSwapState:!1,initializeSwapState:!0})),F.subscribeKey("open",e=>{e||o.resetState()}),T.subscribeKey("view",e=>{e.includes("Swap")||o.resetValues()}),o.subscribe(e=>{this.initialized=e.initialized,this.loadingQuote=e.loadingQuote,this.loadingPrices=e.loadingPrices,this.loadingTransaction=e.loadingTransaction,this.sourceToken=e.sourceToken,this.sourceTokenAmount=e.sourceTokenAmount,this.sourceTokenPriceInUSD=e.sourceTokenPriceInUSD,this.toToken=e.toToken,this.toTokenAmount=e.toTokenAmount,this.toTokenPriceInUSD=e.toTokenPriceInUSD,this.inputError=e.inputError,this.fetchError=e.fetchError,e.sourceToken&&e.toToken&&this.watchTokensAndValues()}))}async firstUpdated(){o.initializeState(),this.watchTokensAndValues(),await this.handleSwapParameters()}disconnectedCallback(){this.unsubscribe.forEach(e=>e?.()),clearInterval(this.interval),document?.removeEventListener("visibilitychange",this.visibilityChangeHandler)}render(){return u`
|
||||
<wui-flex flexDirection="column" .padding=${["0","l","l","l"]} gap="s">
|
||||
${this.initialized?this.templateSwap():this.templateLoading()}
|
||||
</wui-flex>
|
||||
`}subscribeToVisibilityChange(){document?.removeEventListener("visibilitychange",this.visibilityChangeHandler),document?.addEventListener("visibilitychange",this.visibilityChangeHandler)}fetchTokensAndValues(){o.getNetworkTokenPrice(),o.getMyTokensWithBalance(),o.swapTokens(),this.lastTokenPriceUpdate=Date.now()}templateSwap(){return u`
|
||||
<wui-flex flexDirection="column" gap="s">
|
||||
<wui-flex flexDirection="column" alignItems="center" gap="xs" class="swap-inputs-container">
|
||||
${this.templateTokenInput("sourceToken",this.sourceToken)}
|
||||
${this.templateTokenInput("toToken",this.toToken)} ${this.templateReplaceTokensButton()}
|
||||
</wui-flex>
|
||||
${this.templateDetails()} ${this.templateActionButton()}
|
||||
</wui-flex>
|
||||
`}actionButtonLabel(){return this.fetchError?"Swap":!this.sourceToken||!this.toToken?"Select token":this.sourceTokenAmount?this.inputError?this.inputError:"Review swap":"Enter amount"}templateReplaceTokensButton(){return u`
|
||||
<wui-flex class="replace-tokens-button-container">
|
||||
<button @click=${this.onSwitchTokens.bind(this)}>
|
||||
<wui-icon name="recycleHorizontal" color="fg-250" size="lg"></wui-icon>
|
||||
</button>
|
||||
</wui-flex>
|
||||
`}templateLoading(){return u`
|
||||
<wui-flex flexDirection="column" gap="l">
|
||||
<wui-flex flexDirection="column" alignItems="center" gap="xs" class="swap-inputs-container">
|
||||
<w3m-swap-input-skeleton target="sourceToken"></w3m-swap-input-skeleton>
|
||||
<w3m-swap-input-skeleton target="toToken"></w3m-swap-input-skeleton>
|
||||
${this.templateReplaceTokensButton()}
|
||||
</wui-flex>
|
||||
${this.templateActionButton()}
|
||||
</wui-flex>
|
||||
`}templateTokenInput(e,i){const n=o.state.myTokensWithBalance?.find(c=>c?.address===i?.address),r=e==="toToken"?this.toTokenAmount:this.sourceTokenAmount,t=e==="toToken"?this.toTokenPriceInUSD:this.sourceTokenPriceInUSD,a=D.parseLocalStringToNumber(r)*t;return u`<w3m-swap-input
|
||||
.value=${e==="toToken"?this.toTokenAmount:this.sourceTokenAmount}
|
||||
.disabled=${e==="toToken"}
|
||||
.onSetAmount=${this.handleChangeAmount.bind(this)}
|
||||
target=${e}
|
||||
.token=${i}
|
||||
.balance=${n?.quantity?.numeric}
|
||||
.price=${n?.price}
|
||||
.marketValue=${a}
|
||||
.onSetMaxValue=${this.onSetMaxValue.bind(this)}
|
||||
></w3m-swap-input>`}onSetMaxValue(e,i){const n=D.bigNumber(i||"0");this.handleChangeAmount(e,n.gt(0)?n.toFixed(20):"0")}templateDetails(){return!this.sourceToken||!this.toToken||this.inputError?null:u`<w3m-swap-details .detailsOpen=${this.detailsOpen}></w3m-swap-details>`}handleChangeAmount(e,i){o.clearError(),e==="sourceToken"?o.setSourceTokenAmount(i):o.setToTokenAmount(i),this.onDebouncedGetSwapCalldata()}templateActionButton(){const e=!this.toToken||!this.sourceToken,i=!this.sourceTokenAmount,n=this.loadingQuote||this.loadingPrices||this.loadingTransaction,r=n||e||i||this.inputError;return u` <wui-flex gap="xs">
|
||||
<wui-button
|
||||
data-testid="swap-action-button"
|
||||
class="action-button"
|
||||
fullWidth
|
||||
size="lg"
|
||||
borderRadius="xs"
|
||||
variant=${e?"neutral":"main"}
|
||||
.loading=${n}
|
||||
.disabled=${r}
|
||||
@click=${this.onSwapPreview.bind(this)}
|
||||
>
|
||||
${this.actionButtonLabel()}
|
||||
</wui-button>
|
||||
</wui-flex>`}onSwitchTokens(){o.switchTokens()}async onSwapPreview(){this.fetchError&&await o.swapTokens(),O.sendEvent({type:"track",event:"INITIATE_SWAP",properties:{network:this.caipNetworkId||"",swapFromToken:this.sourceToken?.symbol||"",swapToToken:this.toToken?.symbol||"",swapFromAmount:this.sourceTokenAmount||"",swapToAmount:this.toTokenAmount||"",isSmartAccount:M(I.state.activeChain)===Q.ACCOUNT_TYPES.SMART_ACCOUNT}}),T.push("SwapPreview")}async handleSwapParameters(){this.initialParams&&(o.state.initialized||await new Promise(i=>{const n=o.subscribeKey("initialized",r=>{r&&(n?.(),i())})}),await this.setSwapParameters(this.initialParams))}async setSwapParameters({amount:e,fromToken:i,toToken:n}){(!o.state.tokens||!o.state.myTokensWithBalance)&&await new Promise(a=>{const c=o.subscribeKey("myTokensWithBalance",E=>{E&&E.length>0&&(c?.(),a())});setTimeout(()=>{c?.(),a()},5e3)});const r=[...o.state.tokens||[],...o.state.myTokensWithBalance||[]];if(i){const t=r.find(a=>a.symbol.toLowerCase()===i.toLowerCase());t&&o.setSourceToken(t)}if(n){const t=r.find(a=>a.symbol.toLowerCase()===n.toLowerCase());t&&o.setToToken(t)}e&&!isNaN(Number(e))&&o.setSourceTokenAmount(e)}onCaipAddressChange({newCaipAddress:e,resetSwapState:i,initializeSwapState:n}){this.caipAddress!==e&&(this.caipAddress=e,i&&o.resetState(),n&&o.initializeState())}onCaipNetworkChange({newCaipNetwork:e,resetSwapState:i,initializeSwapState:n}){this.caipNetworkId!==e?.caipNetworkId&&(this.caipNetworkId=e?.caipNetworkId,i&&o.resetState(),n&&o.initializeState())}};p.styles=te;h([w({type:Object})],p.prototype,"initialParams",void 0);h([s()],p.prototype,"interval",void 0);h([s()],p.prototype,"detailsOpen",void 0);h([s()],p.prototype,"caipAddress",void 0);h([s()],p.prototype,"caipNetworkId",void 0);h([s()],p.prototype,"initialized",void 0);h([s()],p.prototype,"loadingQuote",void 0);h([s()],p.prototype,"loadingPrices",void 0);h([s()],p.prototype,"loadingTransaction",void 0);h([s()],p.prototype,"sourceToken",void 0);h([s()],p.prototype,"sourceTokenAmount",void 0);h([s()],p.prototype,"sourceTokenPriceInUSD",void 0);h([s()],p.prototype,"toToken",void 0);h([s()],p.prototype,"toTokenAmount",void 0);h([s()],p.prototype,"toTokenPriceInUSD",void 0);h([s()],p.prototype,"inputError",void 0);h([s()],p.prototype,"fetchError",void 0);h([s()],p.prototype,"lastTokenPriceUpdate",void 0);p=h([P("w3m-swap-view")],p);const ie=A`
|
||||
:host > wui-flex:first-child {
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
:host > wui-flex:first-child::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.preview-container,
|
||||
.details-container {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.token-image {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
wui-loading-hexagon {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.token-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--wui-spacing-xxs);
|
||||
padding: var(--wui-spacing-xs);
|
||||
height: 40px;
|
||||
border: none;
|
||||
border-radius: 80px;
|
||||
background: var(--wui-color-gray-glass-002);
|
||||
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
|
||||
cursor: pointer;
|
||||
transition: background 0.2s linear;
|
||||
}
|
||||
|
||||
.token-item:hover {
|
||||
background: var(--wui-color-gray-glass-005);
|
||||
}
|
||||
|
||||
.preview-token-details-container {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.details-row {
|
||||
width: 100%;
|
||||
padding: var(--wui-spacing-s) var(--wui-spacing-xl);
|
||||
border-radius: var(--wui-border-radius-xxs);
|
||||
background: var(--wui-color-gray-glass-002);
|
||||
}
|
||||
|
||||
.action-buttons-container {
|
||||
width: 100%;
|
||||
gap: var(--wui-spacing-xs);
|
||||
}
|
||||
|
||||
.action-buttons-container > button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: transparent;
|
||||
height: 48px;
|
||||
border-radius: var(--wui-border-radius-xs);
|
||||
border: none;
|
||||
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
|
||||
}
|
||||
|
||||
.action-buttons-container > button:disabled {
|
||||
opacity: 0.8;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.action-button > wui-loading-spinner {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.cancel-button:hover,
|
||||
.action-button:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.action-buttons-container > wui-button.cancel-button {
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
.action-buttons-container > wui-button.action-button {
|
||||
flex: 4;
|
||||
}
|
||||
|
||||
.action-buttons-container > button.action-button > wui-text {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.details-container > wui-flex {
|
||||
background: var(--wui-color-gray-glass-002);
|
||||
border-radius: var(--wui-border-radius-xxs);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.details-container > wui-flex > button {
|
||||
border: none;
|
||||
background: none;
|
||||
padding: var(--wui-spacing-s);
|
||||
border-radius: var(--wui-border-radius-xxs);
|
||||
transition: background 0.2s linear;
|
||||
}
|
||||
|
||||
.details-container > wui-flex > button:hover {
|
||||
background: var(--wui-color-gray-glass-002);
|
||||
}
|
||||
|
||||
.details-content-container {
|
||||
padding: var(--wui-spacing-1xs);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.details-content-container > wui-flex {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.details-row {
|
||||
width: 100%;
|
||||
padding: var(--wui-spacing-s) var(--wui-spacing-xl);
|
||||
border-radius: var(--wui-border-radius-xxs);
|
||||
background: var(--wui-color-gray-glass-002);
|
||||
}
|
||||
`;var g=function(l,e,i,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(l,e,i,n);else for(var c=l.length-1;c>=0;c--)(a=l[c])&&(t=(r<3?a(t):r>3?a(e,i,t):a(e,i))||t);return r>3&&t&&Object.defineProperty(e,i,t),t};let d=class extends C{constructor(){super(),this.unsubscribe=[],this.detailsOpen=!0,this.approvalTransaction=o.state.approvalTransaction,this.swapTransaction=o.state.swapTransaction,this.sourceToken=o.state.sourceToken,this.sourceTokenAmount=o.state.sourceTokenAmount??"",this.sourceTokenPriceInUSD=o.state.sourceTokenPriceInUSD,this.toToken=o.state.toToken,this.toTokenAmount=o.state.toTokenAmount??"",this.toTokenPriceInUSD=o.state.toTokenPriceInUSD,this.caipNetwork=I.state.activeCaipNetwork,this.balanceSymbol=U.state.balanceSymbol,this.inputError=o.state.inputError,this.loadingQuote=o.state.loadingQuote,this.loadingApprovalTransaction=o.state.loadingApprovalTransaction,this.loadingBuildTransaction=o.state.loadingBuildTransaction,this.loadingTransaction=o.state.loadingTransaction,this.unsubscribe.push(U.subscribeKey("balanceSymbol",e=>{this.balanceSymbol!==e&&T.goBack()}),I.subscribeKey("activeCaipNetwork",e=>{this.caipNetwork!==e&&(this.caipNetwork=e)}),o.subscribe(e=>{this.approvalTransaction=e.approvalTransaction,this.swapTransaction=e.swapTransaction,this.sourceToken=e.sourceToken,this.toToken=e.toToken,this.toTokenPriceInUSD=e.toTokenPriceInUSD,this.sourceTokenAmount=e.sourceTokenAmount??"",this.toTokenAmount=e.toTokenAmount??"",this.inputError=e.inputError,e.inputError&&T.goBack(),this.loadingQuote=e.loadingQuote,this.loadingApprovalTransaction=e.loadingApprovalTransaction,this.loadingBuildTransaction=e.loadingBuildTransaction,this.loadingTransaction=e.loadingTransaction}))}firstUpdated(){o.getTransaction(),this.refreshTransaction()}disconnectedCallback(){this.unsubscribe.forEach(e=>e?.()),clearInterval(this.interval)}render(){return u`
|
||||
<wui-flex flexDirection="column" .padding=${["0","l","l","l"]} gap="s">
|
||||
${this.templateSwap()}
|
||||
</wui-flex>
|
||||
`}refreshTransaction(){this.interval=setInterval(()=>{o.getApprovalLoadingState()||o.getTransaction()},1e4)}templateSwap(){const e=`${x.formatNumberToLocalString(parseFloat(this.sourceTokenAmount))} ${this.sourceToken?.symbol}`,i=`${x.formatNumberToLocalString(parseFloat(this.toTokenAmount))} ${this.toToken?.symbol}`,n=parseFloat(this.sourceTokenAmount)*this.sourceTokenPriceInUSD,r=parseFloat(this.toTokenAmount)*this.toTokenPriceInUSD,t=x.formatNumberToLocalString(n),a=x.formatNumberToLocalString(r),c=this.loadingQuote||this.loadingBuildTransaction||this.loadingTransaction||this.loadingApprovalTransaction;return u`
|
||||
<wui-flex flexDirection="column" alignItems="center" gap="l">
|
||||
<wui-flex class="preview-container" flexDirection="column" alignItems="flex-start" gap="l">
|
||||
<wui-flex
|
||||
class="preview-token-details-container"
|
||||
alignItems="center"
|
||||
justifyContent="space-between"
|
||||
gap="l"
|
||||
>
|
||||
<wui-flex flexDirection="column" alignItems="flex-start" gap="4xs">
|
||||
<wui-text variant="small-400" color="fg-150">Send</wui-text>
|
||||
<wui-text variant="paragraph-400" color="fg-100">$${t}</wui-text>
|
||||
</wui-flex>
|
||||
<wui-token-button
|
||||
flexDirection="row-reverse"
|
||||
text=${e}
|
||||
imageSrc=${this.sourceToken?.logoUri}
|
||||
>
|
||||
</wui-token-button>
|
||||
</wui-flex>
|
||||
<wui-icon name="recycleHorizontal" color="fg-200" size="md"></wui-icon>
|
||||
<wui-flex
|
||||
class="preview-token-details-container"
|
||||
alignItems="center"
|
||||
justifyContent="space-between"
|
||||
gap="l"
|
||||
>
|
||||
<wui-flex flexDirection="column" alignItems="flex-start" gap="4xs">
|
||||
<wui-text variant="small-400" color="fg-150">Receive</wui-text>
|
||||
<wui-text variant="paragraph-400" color="fg-100">$${a}</wui-text>
|
||||
</wui-flex>
|
||||
<wui-token-button
|
||||
flexDirection="row-reverse"
|
||||
text=${i}
|
||||
imageSrc=${this.toToken?.logoUri}
|
||||
>
|
||||
</wui-token-button>
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
|
||||
${this.templateDetails()}
|
||||
|
||||
<wui-flex flexDirection="row" alignItems="center" justifyContent="center" gap="xs">
|
||||
<wui-icon size="sm" color="fg-200" name="infoCircle"></wui-icon>
|
||||
<wui-text variant="small-400" color="fg-200">Review transaction carefully</wui-text>
|
||||
</wui-flex>
|
||||
|
||||
<wui-flex
|
||||
class="action-buttons-container"
|
||||
flexDirection="row"
|
||||
alignItems="center"
|
||||
justifyContent="space-between"
|
||||
gap="xs"
|
||||
>
|
||||
<wui-button
|
||||
class="cancel-button"
|
||||
fullWidth
|
||||
size="lg"
|
||||
borderRadius="xs"
|
||||
variant="neutral"
|
||||
@click=${this.onCancelTransaction.bind(this)}
|
||||
>
|
||||
<wui-text variant="paragraph-600" color="fg-200">Cancel</wui-text>
|
||||
</wui-button>
|
||||
<wui-button
|
||||
class="action-button"
|
||||
fullWidth
|
||||
size="lg"
|
||||
borderRadius="xs"
|
||||
variant="main"
|
||||
?loading=${c}
|
||||
?disabled=${c}
|
||||
@click=${this.onSendTransaction.bind(this)}
|
||||
>
|
||||
<wui-text variant="paragraph-600" color="inverse-100">
|
||||
${this.actionButtonLabel()}
|
||||
</wui-text>
|
||||
</wui-button>
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
`}templateDetails(){return!this.sourceToken||!this.toToken||this.inputError?null:u`<w3m-swap-details .detailsOpen=${this.detailsOpen}></w3m-swap-details>`}actionButtonLabel(){return this.loadingApprovalTransaction?"Approving...":this.approvalTransaction?"Approve":"Swap"}onCancelTransaction(){T.goBack()}onSendTransaction(){this.approvalTransaction?o.sendTransactionForApproval(this.approvalTransaction):o.sendTransactionForSwap(this.swapTransaction)}};d.styles=ie;g([s()],d.prototype,"interval",void 0);g([s()],d.prototype,"detailsOpen",void 0);g([s()],d.prototype,"approvalTransaction",void 0);g([s()],d.prototype,"swapTransaction",void 0);g([s()],d.prototype,"sourceToken",void 0);g([s()],d.prototype,"sourceTokenAmount",void 0);g([s()],d.prototype,"sourceTokenPriceInUSD",void 0);g([s()],d.prototype,"toToken",void 0);g([s()],d.prototype,"toTokenAmount",void 0);g([s()],d.prototype,"toTokenPriceInUSD",void 0);g([s()],d.prototype,"caipNetwork",void 0);g([s()],d.prototype,"balanceSymbol",void 0);g([s()],d.prototype,"inputError",void 0);g([s()],d.prototype,"loadingQuote",void 0);g([s()],d.prototype,"loadingApprovalTransaction",void 0);g([s()],d.prototype,"loadingBuildTransaction",void 0);g([s()],d.prototype,"loadingTransaction",void 0);d=g([P("w3m-swap-preview-view")],d);const oe=A`
|
||||
:host {
|
||||
height: 60px;
|
||||
min-height: 60px;
|
||||
}
|
||||
|
||||
:host > wui-flex {
|
||||
cursor: pointer;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
column-gap: var(--wui-spacing-s);
|
||||
padding: var(--wui-spacing-xs);
|
||||
padding-right: var(--wui-spacing-l);
|
||||
width: 100%;
|
||||
background-color: transparent;
|
||||
border-radius: var(--wui-border-radius-xs);
|
||||
color: var(--wui-color-fg-250);
|
||||
transition:
|
||||
background-color var(--wui-ease-out-power-1) var(--wui-duration-lg),
|
||||
opacity var(--wui-ease-out-power-1) var(--wui-duration-lg);
|
||||
will-change: background-color, opacity;
|
||||
}
|
||||
|
||||
@media (hover: hover) and (pointer: fine) {
|
||||
:host > wui-flex:hover {
|
||||
background-color: var(--wui-color-gray-glass-002);
|
||||
}
|
||||
|
||||
:host > wui-flex:active {
|
||||
background-color: var(--wui-color-gray-glass-005);
|
||||
}
|
||||
}
|
||||
|
||||
:host([disabled]) > wui-flex {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
:host([disabled]) > wui-flex:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
:host > wui-flex > wui-flex {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
:host > wui-flex > wui-image,
|
||||
:host > wui-flex > .token-item-image-placeholder {
|
||||
width: 40px;
|
||||
max-width: 40px;
|
||||
height: 40px;
|
||||
border-radius: var(--wui-border-radius-3xl);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
:host > wui-flex > .token-item-image-placeholder {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
:host > wui-flex > wui-image::after,
|
||||
:host > wui-flex > .token-item-image-placeholder::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
inset: 0;
|
||||
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
|
||||
border-radius: var(--wui-border-radius-l);
|
||||
}
|
||||
|
||||
button > wui-icon-box[data-variant='square-blue'] {
|
||||
border-radius: var(--wui-border-radius-3xs);
|
||||
position: relative;
|
||||
border: none;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
}
|
||||
`;var $=function(l,e,i,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(l,e,i,n);else for(var c=l.length-1;c>=0;c--)(a=l[c])&&(t=(r<3?a(t):r>3?a(e,i,t):a(e,i))||t);return r>3&&t&&Object.defineProperty(e,i,t),t};let y=class extends C{constructor(){super(),this.observer=new IntersectionObserver(()=>{}),this.imageSrc=void 0,this.name=void 0,this.symbol=void 0,this.price=void 0,this.amount=void 0,this.visible=!1,this.imageError=!1,this.observer=new IntersectionObserver(e=>{e.forEach(i=>{i.isIntersecting?this.visible=!0:this.visible=!1})},{threshold:.1})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){if(!this.visible)return null;const e=this.amount&&this.price?D.multiply(this.price,this.amount)?.toFixed(3):null;return u`
|
||||
<wui-flex alignItems="center">
|
||||
${this.visualTemplate()}
|
||||
<wui-flex flexDirection="column" gap="3xs">
|
||||
<wui-flex justifyContent="space-between">
|
||||
<wui-text variant="paragraph-500" color="fg-100" lineClamp="1">${this.name}</wui-text>
|
||||
${e?u`
|
||||
<wui-text variant="paragraph-500" color="fg-100">
|
||||
$${x.formatNumberToLocalString(e,3)}
|
||||
</wui-text>
|
||||
`:null}
|
||||
</wui-flex>
|
||||
<wui-flex justifyContent="space-between">
|
||||
<wui-text variant="small-400" color="fg-200" lineClamp="1">${this.symbol}</wui-text>
|
||||
${this.amount?u`<wui-text variant="small-400" color="fg-200">
|
||||
${x.formatNumberToLocalString(this.amount,3)}
|
||||
</wui-text>`:null}
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
`}visualTemplate(){return this.imageError?u`<wui-flex class="token-item-image-placeholder">
|
||||
<wui-icon name="image" color="inherit"></wui-icon>
|
||||
</wui-flex>`:this.imageSrc?u`<wui-image
|
||||
width="40"
|
||||
height="40"
|
||||
src=${this.imageSrc}
|
||||
@onLoadError=${this.imageLoadError}
|
||||
></wui-image>`:null}imageLoadError(){this.imageError=!0}};y.styles=[H,q,oe];$([w()],y.prototype,"imageSrc",void 0);$([w()],y.prototype,"name",void 0);$([w()],y.prototype,"symbol",void 0);$([w()],y.prototype,"price",void 0);$([w()],y.prototype,"amount",void 0);$([s()],y.prototype,"visible",void 0);$([s()],y.prototype,"imageError",void 0);y=$([P("wui-token-list-item")],y);const ne=A`
|
||||
:host {
|
||||
--tokens-scroll--top-opacity: 0;
|
||||
--tokens-scroll--bottom-opacity: 1;
|
||||
--suggested-tokens-scroll--left-opacity: 0;
|
||||
--suggested-tokens-scroll--right-opacity: 1;
|
||||
}
|
||||
|
||||
:host > wui-flex:first-child {
|
||||
overflow-y: hidden;
|
||||
overflow-x: hidden;
|
||||
scrollbar-width: none;
|
||||
scrollbar-height: none;
|
||||
}
|
||||
|
||||
:host > wui-flex:first-child::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
wui-loading-hexagon {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.suggested-tokens-container {
|
||||
overflow-x: auto;
|
||||
mask-image: linear-gradient(
|
||||
to right,
|
||||
rgba(0, 0, 0, calc(1 - var(--suggested-tokens-scroll--left-opacity))) 0px,
|
||||
rgba(200, 200, 200, calc(1 - var(--suggested-tokens-scroll--left-opacity))) 1px,
|
||||
black 50px,
|
||||
black 90px,
|
||||
black calc(100% - 90px),
|
||||
black calc(100% - 50px),
|
||||
rgba(155, 155, 155, calc(1 - var(--suggested-tokens-scroll--right-opacity))) calc(100% - 1px),
|
||||
rgba(0, 0, 0, calc(1 - var(--suggested-tokens-scroll--right-opacity))) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.suggested-tokens-container::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tokens-container {
|
||||
border-top: 1px solid var(--wui-color-gray-glass-005);
|
||||
height: 100%;
|
||||
max-height: 390px;
|
||||
}
|
||||
|
||||
.tokens {
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
mask-image: linear-gradient(
|
||||
to bottom,
|
||||
rgba(0, 0, 0, calc(1 - var(--tokens-scroll--top-opacity))) 0px,
|
||||
rgba(200, 200, 200, calc(1 - var(--tokens-scroll--top-opacity))) 1px,
|
||||
black 50px,
|
||||
black 90px,
|
||||
black calc(100% - 90px),
|
||||
black calc(100% - 50px),
|
||||
rgba(155, 155, 155, calc(1 - var(--tokens-scroll--bottom-opacity))) calc(100% - 1px),
|
||||
rgba(0, 0, 0, calc(1 - var(--tokens-scroll--bottom-opacity))) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.network-search-input,
|
||||
.select-network-button {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.select-network-button {
|
||||
border: none;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--wui-spacing-xs);
|
||||
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
|
||||
background-color: transparent;
|
||||
border-radius: var(--wui-border-radius-xxs);
|
||||
padding: var(--wui-spacing-xs);
|
||||
align-items: center;
|
||||
transition: background-color 0.2s linear;
|
||||
}
|
||||
|
||||
.select-network-button:hover {
|
||||
background-color: var(--wui-color-gray-glass-002);
|
||||
}
|
||||
|
||||
.select-network-button > wui-image {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
border-radius: var(--wui-border-radius-xs);
|
||||
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
|
||||
}
|
||||
`;var S=function(l,e,i,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(l,e,i,n);else for(var c=l.length-1;c>=0;c--)(a=l[c])&&(t=(r<3?a(t):r>3?a(e,i,t):a(e,i))||t);return r>3&&t&&Object.defineProperty(e,i,t),t};let k=class extends C{constructor(){super(),this.unsubscribe=[],this.targetToken=T.state.data?.target,this.sourceToken=o.state.sourceToken,this.sourceTokenAmount=o.state.sourceTokenAmount,this.toToken=o.state.toToken,this.myTokensWithBalance=o.state.myTokensWithBalance,this.popularTokens=o.state.popularTokens,this.searchValue="",this.unsubscribe.push(o.subscribe(e=>{this.sourceToken=e.sourceToken,this.toToken=e.toToken,this.myTokensWithBalance=e.myTokensWithBalance}))}updated(){this.renderRoot?.querySelector(".suggested-tokens-container")?.addEventListener("scroll",this.handleSuggestedTokensScroll.bind(this)),this.renderRoot?.querySelector(".tokens")?.addEventListener("scroll",this.handleTokenListScroll.bind(this))}disconnectedCallback(){super.disconnectedCallback();const e=this.renderRoot?.querySelector(".suggested-tokens-container"),i=this.renderRoot?.querySelector(".tokens");e?.removeEventListener("scroll",this.handleSuggestedTokensScroll.bind(this)),i?.removeEventListener("scroll",this.handleTokenListScroll.bind(this)),clearInterval(this.interval)}render(){return u`
|
||||
<wui-flex flexDirection="column" gap="s">
|
||||
${this.templateSearchInput()} ${this.templateSuggestedTokens()} ${this.templateTokens()}
|
||||
</wui-flex>
|
||||
`}onSelectToken(e){this.targetToken==="sourceToken"?o.setSourceToken(e):(o.setToToken(e),this.sourceToken&&this.sourceTokenAmount&&o.swapTokens()),T.goBack()}templateSearchInput(){return u`
|
||||
<wui-flex .padding=${["3xs","s","0","s"]} gap="xs">
|
||||
<wui-input-text
|
||||
data-testid="swap-select-token-search-input"
|
||||
class="network-search-input"
|
||||
size="sm"
|
||||
placeholder="Search token"
|
||||
icon="search"
|
||||
.value=${this.searchValue}
|
||||
@inputChange=${this.onSearchInputChange.bind(this)}
|
||||
></wui-input-text>
|
||||
</wui-flex>
|
||||
`}templateTokens(){const e=this.myTokensWithBalance?Object.values(this.myTokensWithBalance):[],i=this.popularTokens?this.popularTokens:[],n=this.filterTokensWithText(e,this.searchValue),r=this.filterTokensWithText(i,this.searchValue);return u`
|
||||
<wui-flex class="tokens-container">
|
||||
<wui-flex class="tokens" .padding=${["0","s","s","s"]} flexDirection="column">
|
||||
${n?.length>0?u`
|
||||
<wui-flex justifyContent="flex-start" padding="s">
|
||||
<wui-text variant="paragraph-500" color="fg-200">Your tokens</wui-text>
|
||||
</wui-flex>
|
||||
${n.map(t=>{const a=t.symbol===this.sourceToken?.symbol||t.symbol===this.toToken?.symbol;return u`
|
||||
<wui-token-list-item
|
||||
data-testid="swap-select-token-item-${t.symbol}"
|
||||
name=${t.name}
|
||||
?disabled=${a}
|
||||
symbol=${t.symbol}
|
||||
price=${t?.price}
|
||||
amount=${t?.quantity?.numeric}
|
||||
imageSrc=${t.logoUri}
|
||||
@click=${()=>{a||this.onSelectToken(t)}}
|
||||
>
|
||||
</wui-token-list-item>
|
||||
`})}
|
||||
`:null}
|
||||
|
||||
<wui-flex justifyContent="flex-start" padding="s">
|
||||
<wui-text variant="paragraph-500" color="fg-200">Tokens</wui-text>
|
||||
</wui-flex>
|
||||
${r?.length>0?r.map(t=>u`
|
||||
<wui-token-list-item
|
||||
data-testid="swap-select-token-item-${t.symbol}"
|
||||
name=${t.name}
|
||||
symbol=${t.symbol}
|
||||
imageSrc=${t.logoUri}
|
||||
@click=${()=>this.onSelectToken(t)}
|
||||
>
|
||||
</wui-token-list-item>
|
||||
`):null}
|
||||
</wui-flex>
|
||||
</wui-flex>
|
||||
`}templateSuggestedTokens(){const e=o.state.suggestedTokens?o.state.suggestedTokens.slice(0,8):null;return e?u`
|
||||
<wui-flex class="suggested-tokens-container" .padding=${["0","s","0","s"]} gap="xs">
|
||||
${e.map(i=>u`
|
||||
<wui-token-button
|
||||
text=${i.symbol}
|
||||
imageSrc=${i.logoUri}
|
||||
@click=${()=>this.onSelectToken(i)}
|
||||
>
|
||||
</wui-token-button>
|
||||
`)}
|
||||
</wui-flex>
|
||||
`:null}onSearchInputChange(e){this.searchValue=e.detail}handleSuggestedTokensScroll(){const e=this.renderRoot?.querySelector(".suggested-tokens-container");e&&(e.style.setProperty("--suggested-tokens-scroll--left-opacity",L.interpolate([0,100],[0,1],e.scrollLeft).toString()),e.style.setProperty("--suggested-tokens-scroll--right-opacity",L.interpolate([0,100],[0,1],e.scrollWidth-e.scrollLeft-e.offsetWidth).toString()))}handleTokenListScroll(){const e=this.renderRoot?.querySelector(".tokens");e&&(e.style.setProperty("--tokens-scroll--top-opacity",L.interpolate([0,100],[0,1],e.scrollTop).toString()),e.style.setProperty("--tokens-scroll--bottom-opacity",L.interpolate([0,100],[0,1],e.scrollHeight-e.scrollTop-e.offsetHeight).toString()))}filterTokensWithText(e,i){return e.filter(n=>`${n.symbol} ${n.name} ${n.address}`.toLowerCase().includes(i.toLowerCase()))}};k.styles=ne;S([s()],k.prototype,"interval",void 0);S([s()],k.prototype,"targetToken",void 0);S([s()],k.prototype,"sourceToken",void 0);S([s()],k.prototype,"sourceTokenAmount",void 0);S([s()],k.prototype,"toToken",void 0);S([s()],k.prototype,"myTokensWithBalance",void 0);S([s()],k.prototype,"popularTokens",void 0);S([s()],k.prototype,"searchValue",void 0);k=S([P("w3m-swap-select-token-view")],k);export{d as W3mSwapPreviewView,k as W3mSwapSelectTokenView,p as W3mSwapView};
|
||||
16
dist/assets/telegram-APKTNwpu.js
vendored
Normal file
16
dist/assets/telegram-APKTNwpu.js
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
import{b as t}from"./index-Cr5N_0pd.js";const l=t`<svg width="32" height="32" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<g clip-path="url(#a)">
|
||||
<path fill="url(#b)" d="M0 0h32v32H0z"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.034 15.252c4.975-2.167 8.293-3.596 9.953-4.287 4.74-1.971 5.725-2.314 6.366-2.325.142-.002.457.033.662.198.172.14.22.33.243.463.022.132.05.435.028.671-.257 2.7-1.368 9.248-1.933 12.27-.24 1.28-.71 1.708-1.167 1.75-.99.091-1.743-.655-2.703-1.284-1.502-.985-2.351-1.598-3.81-2.558-1.684-1.11-.592-1.721.368-2.718.252-.261 4.619-4.233 4.703-4.594.01-.045.02-.213-.08-.301-.1-.09-.246-.059-.353-.035-.15.034-2.55 1.62-7.198 4.758-.682.468-1.298.696-1.851.684-.61-.013-1.782-.344-2.653-.628-1.069-.347-1.918-.53-1.845-1.12.039-.308.462-.623 1.27-.944Z" fill="#fff"/>
|
||||
</g>
|
||||
<path d="M.5 16C.5 7.44 7.44.5 16 .5 24.56.5 31.5 7.44 31.5 16c0 8.56-6.94 15.5-15.5 15.5C7.44 31.5.5 24.56.5 16Z" stroke="#141414" stroke-opacity=".05"/>
|
||||
<defs>
|
||||
<linearGradient id="b" x1="1600" y1="0" x2="1600" y2="3176.27" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#2AABEE"/>
|
||||
<stop offset="1" stop-color="#229ED9"/>
|
||||
</linearGradient>
|
||||
<clipPath id="a">
|
||||
<path d="M0 16C0 7.163 7.163 0 16 0s16 7.163 16 16-7.163 16-16 16S0 24.837 0 16Z" fill="#fff"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>`;export{l as telegramSvg};
|
||||
5
dist/assets/three-dots-8jGyRbgm.js
vendored
Normal file
5
dist/assets/three-dots-8jGyRbgm.js
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import{b as t}from"./index-Cr5N_0pd.js";const l=t`<svg width="14" height="15" viewBox="0 0 14 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7 3.71875C6.0335 3.71875 5.25 2.93525 5.25 1.96875C5.25 1.00225 6.0335 0.21875 7 0.21875C7.9665 0.21875 8.75 1.00225 8.75 1.96875C8.75 2.93525 7.9665 3.71875 7 3.71875Z" fill="#949E9E"/>
|
||||
<path d="M7 8.96875C6.0335 8.96875 5.25 8.18525 5.25 7.21875C5.25 6.25225 6.0335 5.46875 7 5.46875C7.9665 5.46875 8.75 6.25225 8.75 7.21875C8.75 8.18525 7.9665 8.96875 7 8.96875Z" fill="#949E9E"/>
|
||||
<path d="M5.25 12.4688C5.25 13.4352 6.0335 14.2187 7 14.2187C7.9665 14.2187 8.75 13.4352 8.75 12.4688C8.75 11.5023 7.9665 10.7188 7 10.7188C6.0335 10.7188 5.25 11.5023 5.25 12.4688Z" fill="#949E9E"/>
|
||||
</svg>`;export{l as threeDotsSvg};
|
||||
16
dist/assets/transactions-QUhMMh8E.js
vendored
Normal file
16
dist/assets/transactions-QUhMMh8E.js
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
import{i as f,a,x as d,c as u}from"./index-Cr5N_0pd.js";const w=f`
|
||||
:host > wui-flex:first-child {
|
||||
height: 500px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
:host > wui-flex:first-child::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
`;var m=function(n,t,i,l){var o=arguments.length,e=o<3?t:l===null?l=Object.getOwnPropertyDescriptor(t,i):l,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(n,t,i,l);else for(var c=n.length-1;c>=0;c--)(r=n[c])&&(e=(o<3?r(e):o>3?r(t,i,e):r(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let s=class extends a{render(){return d`
|
||||
<wui-flex flexDirection="column" .padding=${["0","m","m","m"]} gap="s">
|
||||
<w3m-activity-list page="activity"></w3m-activity-list>
|
||||
</wui-flex>
|
||||
`}};s.styles=w;s=m([u("w3m-transactions-view")],s);export{s as W3mTransactionsView};
|
||||
18
dist/assets/twitch-BUKiRB8R.js
vendored
Normal file
18
dist/assets/twitch-BUKiRB8R.js
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const i=l`<svg fill="none" viewBox="0 0 40 40">
|
||||
<g clip-path="url(#a)">
|
||||
<g clip-path="url(#b)">
|
||||
<circle cx="20" cy="19.89" r="20" fill="#5A3E85" />
|
||||
<g clip-path="url(#c)">
|
||||
<path
|
||||
fill="#fff"
|
||||
d="M18.22 25.7 20 23.91h3.34l2.1-2.1v-6.68H15.4v8.78h2.82v1.77Zm3.87-8.16h1.25v3.66H22.1v-3.66Zm-3.34 0H20v3.66h-1.25v-3.66ZM20 7.9a12 12 0 1 0 0 24 12 12 0 0 0 0-24Zm6.69 14.56-3.66 3.66h-2.72l-1.77 1.78h-1.88V26.1H13.3v-9.82l.94-2.4H26.7v8.56Z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
|
||||
<clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
|
||||
<clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
|
||||
</defs>
|
||||
</svg>`;export{i as twitchSvg};
|
||||
6
dist/assets/twitterIcon-CzR_RgAK.js
vendored
Normal file
6
dist/assets/twitterIcon-CzR_RgAK.js
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
import{b as o}from"./index-Cr5N_0pd.js";const c=o`<svg fill="none" viewBox="0 0 16 16">
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="m14.36 4.74.01.42c0 4.34-3.3 9.34-9.34 9.34A9.3 9.3 0 0 1 0 13.03a6.6 6.6 0 0 0 4.86-1.36 3.29 3.29 0 0 1-3.07-2.28c.5.1 1 .07 1.48-.06A3.28 3.28 0 0 1 .64 6.11v-.04c.46.26.97.4 1.49.41A3.29 3.29 0 0 1 1.11 2.1a9.32 9.32 0 0 0 6.77 3.43 3.28 3.28 0 0 1 5.6-3 6.59 6.59 0 0 0 2.08-.8 3.3 3.3 0 0 1-1.45 1.82A6.53 6.53 0 0 0 16 3.04c-.44.66-1 1.23-1.64 1.7Z"
|
||||
/>
|
||||
</svg>`;export{c as twitterIconSvg};
|
||||
246
dist/assets/ui-CTdGiFlJ.js
vendored
Normal file
246
dist/assets/ui-CTdGiFlJ.js
vendored
Normal file
@ -0,0 +1,246 @@
|
||||
import{K as g,ar as P,as as b,at as j,Q as k,au as m,W as U,Y as K,av as L,aw as x,i as z,a as N,x as c,a5 as O,c as $,T as f,aj as w,R as v,a7 as M,aa as u}from"./index-Cr5N_0pd.js";import{W3mEmailOtpWidget as R}from"./email-OHUMhOV6.js";class V{constructor(e){this.expiration=e.expiration,this.getNonce=e.getNonce,this.getRequestId=e.getRequestId,this.domain=e.domain,this.uri=e.uri,this.statement=e.statement,this.resources=e.resources}async createMessage(e){const t={accountAddress:e.accountAddress,chainId:e.chainId,version:this.version,domain:this.domain,uri:this.uri,statement:this.statement,resources:this.resources,nonce:await this.getNonce(e),requestId:await this.getRequestId?.(),expirationTime:this.getExpirationTime(e),issuedAt:this.getIssuedAt(),notBefore:this.getNotBefore(e)};return Object.assign(t,{toString:()=>this.stringify(t)})}getExpirationTime({notBefore:e}){if(typeof this.expiration>"u")return;const t=e?new Date(e).getTime():Date.now();return this.stringifyDate(new Date(t+this.expiration))}getNotBefore({notBefore:e}){return e?this.stringifyDate(new Date(e)):void 0}getIssuedAt(){return this.stringifyDate(new Date)}stringifyDate(e){return e.toISOString()}}class X extends V{constructor({clearChainIdNamespace:e,...t}){super(t),this.version="1",this.clearChainIdNamespace=e||!1}getNetworkName(e){const t=g.getAllRequestedCaipNetworks();return P.getNetworkNameByCaipNetworkId(t,e)}stringify(e){const t=this.clearChainIdNamespace?e.chainId.split(":")[1]:e.chainId,i=this.getNetworkName(e.chainId);return[`${e.domain} wants you to sign in with your ${i} account:`,e.accountAddress,e.statement?`
|
||||
${e.statement}
|
||||
`:"",`URI: ${e.uri}`,`Version: ${e.version}`,`Chain ID: ${t}`,`Nonce: ${e.nonce}`,e.issuedAt&&`Issued At: ${e.issuedAt}`,e.expirationTime&&`Expiration Time: ${e.expirationTime}`,e.notBefore&&`Not Before: ${e.notBefore}`,e.requestId&&`Request ID: ${e.requestId}`,e.resources?.length&&e.resources.reduce((s,n)=>`${s}
|
||||
- ${n}`,"Resources:")].filter(s=>typeof s=="string").join(`
|
||||
`).trim()}}class T{constructor(e={}){this.otpUuid=null,this.listeners={sessionChanged:[]},this.localAuthStorageKey=e.localAuthStorageKey||b.SIWX_AUTH_TOKEN,this.localNonceStorageKey=e.localNonceStorageKey||b.SIWX_NONCE_TOKEN,this.required=e.required??!0,this.messenger=new X({domain:typeof document>"u"?"Unknown Domain":document.location.host,uri:typeof document>"u"?"Unknown URI":document.location.href,getNonce:this.getNonce.bind(this),clearChainIdNamespace:!1})}async createMessage(e){return this.messenger.createMessage(e)}async addSession(e){const t=await this.request({method:"POST",key:"authenticate",body:{data:e.data,message:e.message,signature:e.signature,clientId:this.getClientId(),walletInfo:this.getWalletInfo()},headers:["nonce","otp"]});this.setStorageToken(t.token,this.localAuthStorageKey),this.emit("sessionChanged",e),this.setAppKitAccountUser(B(t.token)),this.otpUuid=null}async getSessions(e,t){try{if(!this.getStorageToken(this.localAuthStorageKey))return[];const i=await this.request({method:"GET",key:"me",query:{},headers:["auth"]});if(!i)return[];const s=i.address.toLowerCase()===t.toLowerCase(),n=i.caip2Network===e;if(!s||!n)return[];const a={data:{accountAddress:i.address,chainId:i.caip2Network},message:"",signature:""};return this.emit("sessionChanged",a),this.setAppKitAccountUser(i),[a]}catch{return[]}}async revokeSession(e,t){return Promise.resolve(this.clearStorageTokens())}async setSessions(e){if(e.length===0)this.clearStorageTokens();else{const t=e.find(i=>i.data.chainId===j()?.caipNetworkId)||e[0];await this.addSession(t)}}getRequired(){return this.required}async getSessionAccount(){if(!this.getStorageToken(this.localAuthStorageKey))throw new Error("Not authenticated");return this.request({method:"GET",key:"me",body:void 0,query:{includeAppKitAccount:!0},headers:["auth"]})}async setSessionAccountMetadata(e=null){if(!this.getStorageToken(this.localAuthStorageKey))throw new Error("Not authenticated");return this.request({method:"PUT",key:"account-metadata",body:{metadata:e},headers:["auth"]})}on(e,t){return this.listeners[e].push(t),()=>{this.listeners[e]=this.listeners[e].filter(i=>i!==t)}}removeAllListeners(){Object.keys(this.listeners).forEach(t=>{this.listeners[t]=[]})}async requestEmailOtp({email:e,account:t}){const i=await this.request({method:"POST",key:"otp",body:{email:e,account:t}});return this.otpUuid=i.uuid,this.messenger.resources=[`email:${e}`],i}confirmEmailOtp({code:e}){return this.request({method:"PUT",key:"otp",body:{code:e},headers:["otp"]})}async request({method:e,key:t,query:i,body:s,headers:n}){const{projectId:a,st:o,sv:W}=this.getSDKProperties(),p=new URL(`${k.W3M_API_URL}/auth/v1/${String(t)}`);p.searchParams.set("projectId",a),p.searchParams.set("st",o),p.searchParams.set("sv",W),i&&Object.entries(i).forEach(([h,C])=>p.searchParams.set(h,String(C)));const y=await fetch(p,{method:e,body:s?JSON.stringify(s):void 0,headers:Array.isArray(n)?n.reduce((h,C)=>{switch(C){case"nonce":h["x-nonce-jwt"]=`Bearer ${this.getStorageToken(this.localNonceStorageKey)}`;break;case"auth":h.Authorization=`Bearer ${this.getStorageToken(this.localAuthStorageKey)}`;break;case"otp":this.otpUuid&&(h["x-otp"]=this.otpUuid);break}return h},{}):void 0});if(!y.ok)throw new Error(await y.text());return y.headers.get("content-type")?.includes("application/json")?y.json():null}getStorageToken(e){return m.getItem(e)}setStorageToken(e,t){m.setItem(t,e)}clearStorageTokens(){this.otpUuid=null,m.removeItem(this.localAuthStorageKey),m.removeItem(this.localNonceStorageKey),this.emit("sessionChanged",void 0)}async getNonce(){const{nonce:e,token:t}=await this.request({method:"GET",key:"nonce"});return this.setStorageToken(t,this.localNonceStorageKey),e}getClientId(){return U.state.clientId}getWalletInfo(){const{connectedWalletInfo:e}=K.state;if(!e)return;if("social"in e){const n=e.social,a=e.identifier;return{type:"social",social:n,identifier:a}}const{name:t,icon:i}=e;let s="unknown";switch(e.type){case x.CONNECTOR_TYPE_EXTERNAL:case x.CONNECTOR_TYPE_INJECTED:case x.CONNECTOR_TYPE_ANNOUNCED:s="extension";break;case x.CONNECTOR_TYPE_WALLET_CONNECT:s="walletconnect";break;default:s="unknown"}return{type:s,name:t,icon:i}}getSDKProperties(){return L._getSdkProperties()}emit(e,t){this.listeners[e].forEach(i=>i(t))}setAppKitAccountUser(e){const{email:t}=e;t&&Object.values(k.CHAIN).forEach(i=>{g.setAccountProp("user",{email:t},i)})}}function B(r){const e=r.split(".");if(e.length!==3)throw new Error("Invalid token");const t=e[1];if(typeof t!="string")throw new Error("Invalid token");const i=t.replace(/-/gu,"+").replace(/_/gu,"/"),s=i.padEnd(i.length+(4-i.length%4)%4,"=");return JSON.parse(atob(s))}const A=z`
|
||||
.hero {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--wui-spacing-3xs);
|
||||
|
||||
transition-property: margin, height;
|
||||
transition-duration: var(--wui-duration-md);
|
||||
transition-timing-function: var(--wui-ease-out-power-1);
|
||||
margin-top: -100px;
|
||||
|
||||
&[data-state='loading'] {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
position: relative;
|
||||
&:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
height: 252px;
|
||||
width: 360px;
|
||||
background: radial-gradient(
|
||||
96.11% 53.95% at 50% 51.28%,
|
||||
transparent 0%,
|
||||
color-mix(in srgb, var(--wui-color-bg-100) 5%, transparent) 49%,
|
||||
color-mix(in srgb, var(--wui-color-bg-100) 65%, transparent) 99.43%
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
.hero-main-icon {
|
||||
width: 176px;
|
||||
transition-property: background-color;
|
||||
transition-duration: var(--wui-duration-lg);
|
||||
transition-timing-function: var(--wui-ease-out-power-1);
|
||||
|
||||
&[data-state='loading'] {
|
||||
width: 56px;
|
||||
}
|
||||
}
|
||||
|
||||
.hero-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--wui-spacing-3xs);
|
||||
flex-wrap: nowrap;
|
||||
min-width: fit-content;
|
||||
|
||||
&:nth-child(1) {
|
||||
transform: translateX(-30px);
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
transform: translateX(30px);
|
||||
}
|
||||
|
||||
&:nth-child(4) {
|
||||
transform: translateX(40px);
|
||||
}
|
||||
|
||||
transition-property: height;
|
||||
transition-duration: var(--wui-duration-md);
|
||||
transition-timing-function: var(--wui-ease-out-power-1);
|
||||
height: 68px;
|
||||
|
||||
&[data-state='loading'] {
|
||||
height: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.hero-row-icon {
|
||||
opacity: 0.1;
|
||||
transition-property: opacity;
|
||||
transition-duration: var(--wui-duration-md);
|
||||
transition-timing-function: var(--wui-ease-out-power-1);
|
||||
|
||||
&[data-state='loading'] {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.email-sufixes {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: var(--wui-spacing-3xs);
|
||||
overflow-x: auto;
|
||||
max-width: 100%;
|
||||
margin-top: var(--wui-spacing-s);
|
||||
margin-bottom: calc(-1 * var(--wui-spacing-m));
|
||||
padding-bottom: var(--wui-spacing-m);
|
||||
margin-left: calc(-1 * var(--wui-spacing-m));
|
||||
margin-right: calc(-1 * var(--wui-spacing-m));
|
||||
padding-left: var(--wui-spacing-m);
|
||||
padding-right: var(--wui-spacing-m);
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.recent-emails {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: var(--wui-spacing-s) 0;
|
||||
border-top: 1px solid var(--wui-color-gray-glass-005);
|
||||
border-bottom: 1px solid var(--wui-color-gray-glass-005);
|
||||
}
|
||||
|
||||
.recent-emails-heading {
|
||||
margin-bottom: var(--wui-spacing-s);
|
||||
}
|
||||
|
||||
.recent-emails-list-item {
|
||||
--wui-color-gray-glass-002: transparent;
|
||||
}
|
||||
`;var _=function(r,e,t,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(n=(s<3?a(n):s>3?a(e,t,n):a(e,t))||n);return s>3&&n&&Object.defineProperty(e,t,n),n};const H=["@gmail.com","@outlook.com","@yahoo.com","@hotmail.com","@aol.com","@icloud.com","@zoho.com"];let E=class extends N{constructor(){super(...arguments),this.email=""}render(){const e=H.filter(this.filter.bind(this)).map(this.item.bind(this));return e.length===0?null:c`<div class="email-sufixes">${e}</div>`}filter(e){if(!this.email)return!1;const t=this.email.split("@");if(t.length<2)return!0;const i=t.pop();return e.includes(i)&&e!==`@${i}`}item(e){return c`<wui-button variant="neutral" size="sm" @click=${()=>{const i=this.email.split("@");i.length>1&&i.pop();const s=i[0]+e;this.dispatchEvent(new CustomEvent("change",{detail:s,bubbles:!0,composed:!0}))}}
|
||||
>${e}</wui-button
|
||||
>`}};E.styles=[A];_([O()],E.prototype,"email",void 0);E=_([$("w3m-email-suffixes-widget")],E);var q=function(r,e,t,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(n=(s<3?a(n):s>3?a(e,t,n):a(e,t))||n);return s>3&&n&&Object.defineProperty(e,t,n),n};let S=class extends N{constructor(){super(...arguments),this.emails=[]}render(){return this.emails.length===0?null:c`<div class="recent-emails">
|
||||
<wui-text variant="micro-600" color="fg-200" class="recent-emails-heading"
|
||||
>Recently used emails</wui-text
|
||||
>
|
||||
${this.emails.map(this.item.bind(this))}
|
||||
</div>`}item(e){return c`<wui-list-item
|
||||
@click=${()=>{this.dispatchEvent(new CustomEvent("select",{detail:e,bubbles:!0,composed:!0}))}}
|
||||
?chevron=${!0}
|
||||
icon="mail"
|
||||
iconVariant="overlay"
|
||||
class="recent-emails-list-item"
|
||||
>
|
||||
<wui-text variant="paragraph-500" color="fg-100">${e}</wui-text>
|
||||
</wui-list-item>`}};S.styles=[A];q([O()],S.prototype,"emails",void 0);S=q([$("w3m-recent-emails-widget")],S);var d=function(r,e,t,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(n=(s<3?a(n):s>3?a(e,t,n):a(e,t))||n);return s>3&&n&&Object.defineProperty(e,t,n),n};let l=class extends N{constructor(){super(...arguments),this.email=f.state.data?.email??g.getAccountData()?.user?.email??"",this.address=g.getAccountData()?.address??"",this.loading=!1,this.appName=w.state.metadata?.name??"AppKit",this.siwx=w.state.siwx,this.isRequired=Array.isArray(w.state.remoteFeatures?.emailCapture)&&w.state.remoteFeatures?.emailCapture.includes("required"),this.recentEmails=this.getRecentEmails()}connectedCallback(){(!this.siwx||!(this.siwx instanceof T))&&v.showError("ReownAuthentication is not initialized."),super.connectedCallback()}firstUpdated(){this.loading=!1,this.recentEmails=this.getRecentEmails(),this.email&&this.onSubmit()}render(){return c`
|
||||
<wui-flex flexDirection="column" .padding=${["3xs","m","m","m"]} gap="l">
|
||||
${this.hero()} ${this.paragraph()} ${this.emailInput()} ${this.recentEmailsWidget()}
|
||||
${this.footerActions()}
|
||||
</wui-flex>
|
||||
`}hero(){return c`
|
||||
<div class="hero" data-state=${this.loading?"loading":"default"}>
|
||||
${this.heroRow(["id","mail","wallet","x","solana","qrCode"])}
|
||||
${this.heroRow(["mail","farcaster","wallet","discord","mobile","qrCode"])}
|
||||
<div class="hero-row">
|
||||
${this.heroIcon("github")} ${this.heroIcon("bank")}
|
||||
<wui-icon-box
|
||||
size="xl"
|
||||
iconSize="xxl"
|
||||
iconColor=${this.loading?"fg-100":"accent-100"}
|
||||
backgroundColor=${this.loading?"fg-100":"accent-100"}
|
||||
icon=${this.loading?"id":"user"}
|
||||
isOpaque
|
||||
class="hero-main-icon"
|
||||
data-state=${this.loading?"loading":"default"}
|
||||
>
|
||||
</wui-icon-box>
|
||||
${this.heroIcon("id")} ${this.heroIcon("card")}
|
||||
</div>
|
||||
${this.heroRow(["google","id","github","verify","apple","mobile"])}
|
||||
</div>
|
||||
`}heroRow(e){return c`
|
||||
<div class="hero-row" data-state=${this.loading?"loading":"default"}>
|
||||
${e.map(this.heroIcon.bind(this))}
|
||||
</div>
|
||||
`}heroIcon(e){return c`
|
||||
<wui-icon-box
|
||||
size="xl"
|
||||
iconSize="xxl"
|
||||
iconColor="fg-100"
|
||||
backgroundColor="fg-100"
|
||||
icon=${e}
|
||||
data-state=${this.loading?"loading":"default"}
|
||||
isOpaque
|
||||
class="hero-row-icon"
|
||||
>
|
||||
</wui-icon-box>
|
||||
`}paragraph(){return this.loading?c`
|
||||
<wui-text variant="paragraph-400" color="fg-200" align="center"
|
||||
>We are verifying your account with email
|
||||
<wui-text variant="paragraph-600" color="accent-100">${this.email}</wui-text> and address
|
||||
<wui-text variant="paragraph-600" color="fg-100">
|
||||
${M.getTruncateString({string:this.address,charsEnd:4,charsStart:4,truncate:"middle"})} </wui-text
|
||||
>, please wait a moment.</wui-text
|
||||
>
|
||||
`:this.isRequired?c`
|
||||
<wui-text variant="paragraph-600" color="fg-100" align="center">
|
||||
${this.appName} requires your email for authentication.
|
||||
</wui-text>
|
||||
`:c`
|
||||
<wui-flex flexDirection="column" gap="xs" alignItems="center">
|
||||
<wui-text variant="paragraph-600" color="fg-100" align="center" size>
|
||||
${this.appName} would like to collect your email.
|
||||
</wui-text>
|
||||
|
||||
<wui-text variant="small-400" color="fg-200" align="center">
|
||||
Don't worry, it's optional—you can skip this step.
|
||||
</wui-text>
|
||||
</wui-flex>
|
||||
`}emailInput(){if(this.loading)return null;const e=i=>{i.key==="Enter"&&this.onSubmit()},t=i=>{this.email=i.detail};return c`
|
||||
<wui-flex flexDirection="column">
|
||||
<wui-email-input
|
||||
.value=${this.email}
|
||||
.disabled=${this.loading}
|
||||
@inputChange=${t}
|
||||
@keydown=${e}
|
||||
></wui-email-input>
|
||||
|
||||
<w3m-email-suffixes-widget
|
||||
.email=${this.email}
|
||||
@change=${t}
|
||||
></w3m-email-suffixes-widget>
|
||||
</wui-flex>
|
||||
`}recentEmailsWidget(){if(this.recentEmails.length===0||this.loading)return null;const e=t=>{this.email=t.detail,this.onSubmit()};return c`
|
||||
<w3m-recent-emails-widget
|
||||
.emails=${this.recentEmails}
|
||||
@select=${e}
|
||||
></w3m-recent-emails-widget>
|
||||
`}footerActions(){return c`
|
||||
<wui-flex flexDirection="row" fullWidth gap="s">
|
||||
${this.isRequired?null:c`<wui-button
|
||||
size="lg"
|
||||
variant="neutral"
|
||||
fullWidth
|
||||
.disabled=${this.loading}
|
||||
@click=${this.onSkip.bind(this)}
|
||||
>Skip this step</wui-button
|
||||
>`}
|
||||
|
||||
<wui-button
|
||||
size="lg"
|
||||
variant="main"
|
||||
type="submit"
|
||||
fullWidth
|
||||
.disabled=${!this.email||!this.isValidEmail(this.email)}
|
||||
.loading=${this.loading}
|
||||
@click=${this.onSubmit.bind(this)}
|
||||
>
|
||||
Continue
|
||||
</wui-button>
|
||||
</wui-flex>
|
||||
`}async onSubmit(){const e=g.getActiveCaipAddress();if(!e)throw new Error("Account is not connected.");if(!this.isValidEmail(this.email)){v.showError("Please provide a valid email.");return}try{this.loading=!0;const t=await this.siwx.requestEmailOtp({email:this.email,account:e});this.pushRecentEmail(this.email),t.uuid===null?f.replace("SIWXSignMessage"):f.replace("DataCaptureOtpConfirm",{email:this.email})}catch{v.showError("Failed to send email OTP"),this.loading=!1}}onSkip(){f.replace("SIWXSignMessage")}getRecentEmails(){const e=m.getItem(b.RECENT_EMAILS);return(e?e.split(","):[]).filter(this.isValidEmail.bind(this)).slice(0,3)}pushRecentEmail(e){const t=this.getRecentEmails(),i=Array.from(new Set([e,...t])).slice(0,3);m.setItem(b.RECENT_EMAILS,i.join(","))}isValidEmail(e){return/^\S+@\S+\.\S+$/u.test(e)}};l.styles=[A];d([u()],l.prototype,"email",void 0);d([u()],l.prototype,"address",void 0);d([u()],l.prototype,"loading",void 0);d([u()],l.prototype,"appName",void 0);d([u()],l.prototype,"siwx",void 0);d([u()],l.prototype,"isRequired",void 0);d([u()],l.prototype,"recentEmails",void 0);l=d([$("w3m-data-capture-view")],l);var D=function(r,e,t,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(n=(s<3?a(n):s>3?a(e,t,n):a(e,t))||n);return s>3&&n&&Object.defineProperty(e,t,n),n};let I=class extends R{constructor(){super(...arguments),this.siwx=w.state.siwx,this.onOtpSubmit=async e=>{await this.siwx.confirmEmailOtp({code:e}),f.replace("SIWXSignMessage")},this.onOtpResend=async e=>{const t=g.getAccountData();if(!t?.caipAddress)throw new Error("No account data found");await this.siwx.requestEmailOtp({email:e,account:t.caipAddress})}}connectedCallback(){(!this.siwx||!(this.siwx instanceof T))&&v.showError("ReownAuthentication is not initialized."),super.connectedCallback()}shouldSubmitOnOtpChange(){return this.otp.length===R.OTP_LENGTH}};D([u()],I.prototype,"siwx",void 0);I=D([$("w3m-data-capture-otp-confirm-view")],I);export{I as W3mDataCaptureOtpConfirmView,l as W3mDataCaptureView,E as W3mEmailSuffixesWidget,S as W3mRecentEmailsWidget};
|
||||
3
dist/assets/user-BSr3AuAa.js
vendored
Normal file
3
dist/assets/user-BSr3AuAa.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import{b as C}from"./index-Cr5N_0pd.js";const l=C`<svg viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M13.9998 3.5C12.3085 3.5 10.9373 4.87113 10.9373 6.5625C10.9373 8.25387 12.3085 9.625 13.9998 9.625C15.6912 9.625 17.0623 8.25387 17.0623 6.5625C17.0623 4.87113 15.6912 3.5 13.9998 3.5ZM7.43735 6.5625C7.43735 2.93813 10.3755 0 13.9998 0C17.6242 0 20.5623 2.93813 20.5623 6.5625C20.5623 10.1869 17.6242 13.125 13.9998 13.125C10.3755 13.125 7.43735 10.1869 7.43735 6.5625ZM13.9998 17.8675C11.126 17.8675 8.58879 19.3111 7.07434 21.5207C6.78205 21.9471 6.56997 22.2579 6.4061 22.534C6.24539 22.8047 6.1769 22.9681 6.14674 23.0736C6.12281 23.1573 6.1203 23.2121 6.13052 23.2804C6.14324 23.3656 6.18621 23.5318 6.33646 23.8169C6.5167 24.1589 6.66134 24.2632 7.0307 24.3543C7.59943 24.4944 8.4222 24.5064 9.94429 24.5064H18.0554C19.5775 24.5064 20.4003 24.4944 20.969 24.3543C21.3384 24.2632 21.483 24.1589 21.6632 23.8169C21.8135 23.5318 21.8565 23.3656 21.8692 23.2804C21.8794 23.2121 21.8769 23.1573 21.853 23.0736C21.8228 22.9681 21.7543 22.8047 21.5936 22.534C21.4297 22.2579 21.2176 21.9471 20.9254 21.5207C19.4109 19.3111 16.8737 17.8675 13.9998 17.8675ZM4.18736 19.542C6.32648 16.421 9.92314 14.3675 13.9998 14.3675C18.0766 14.3675 21.6732 16.421 23.8123 19.542C23.8409 19.5836 23.8699 19.6258 23.8991 19.6684C24.3886 20.3805 24.9617 21.2145 25.2181 22.1115C25.5476 23.2638 25.3418 24.3438 24.7596 25.4485C24.0843 26.7302 23.0844 27.4377 21.8064 27.7526C20.7724 28.0074 19.5099 28.0069 18.2225 28.0064C18.1669 28.0064 18.1111 28.0064 18.0554 28.0064H9.94429C9.88855 28.0064 9.83284 28.0064 9.77717 28.0064C8.48981 28.0069 7.22727 28.0074 6.19332 27.7526C4.9153 27.4377 3.91541 26.7302 3.24005 25.4485C2.65792 24.3438 2.45214 23.2638 2.78156 22.1115C3.03802 21.2145 3.61113 20.3805 4.10056 19.6684C4.12982 19.6258 4.15878 19.5836 4.18736 19.542Z"/>
|
||||
</svg>`;export{l as userSvg};
|
||||
8
dist/assets/verify-BjYfOgD5.js
vendored
Normal file
8
dist/assets/verify-BjYfOgD5.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const c=l`<svg fill="none" viewBox="0 0 28 28">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="M18.1 4.76c-.42-.73-1.33-1.01-2.09-.66l-1.42.66c-.37.18-.8.18-1.18 0l-1.4-.65a1.63 1.63 0 0 0-2.1.66l-.84 1.45c-.2.34-.53.59-.92.67l-1.7.35c-.83.17-1.39.94-1.3 1.78l.19 1.56c.04.39-.08.78-.33 1.07l-1.12 1.3c-.52.6-.52 1.5 0 2.11L5 16.38c.25.3.37.68.33 1.06l-.18 1.57c-.1.83.46 1.6 1.28 1.78l1.7.35c.4.08.73.32.93.66l.84 1.43a1.63 1.63 0 0 0 2.09.66l1.41-.66c.37-.17.8-.17 1.18 0l1.43.67c.76.35 1.66.07 2.08-.65l.86-1.45c.2-.34.54-.58.92-.66l1.68-.35A1.63 1.63 0 0 0 22.84 19l-.18-1.57a1.4 1.4 0 0 1 .33-1.06l1.12-1.32c.52-.6.52-1.5 0-2.11l-1.12-1.3a1.4 1.4 0 0 1-.33-1.07l.18-1.57c.1-.83-.46-1.6-1.28-1.77l-1.68-.35a1.4 1.4 0 0 1-.92-.66l-.86-1.47Zm-3.27-3.2a4.43 4.43 0 0 1 5.69 1.78l.54.93 1.07.22a4.43 4.43 0 0 1 3.5 4.84l-.11.96.7.83a4.43 4.43 0 0 1 .02 5.76l-.72.85.1.96a4.43 4.43 0 0 1-3.5 4.84l-1.06.22-.54.92a4.43 4.43 0 0 1-5.68 1.77l-.84-.4-.82.39a4.43 4.43 0 0 1-5.7-1.79l-.51-.89-1.09-.22a4.43 4.43 0 0 1-3.5-4.84l.1-.96-.72-.85a4.43 4.43 0 0 1 .01-5.76l.71-.83-.1-.95a4.43 4.43 0 0 1 3.5-4.84l1.08-.23.53-.9a4.43 4.43 0 0 1 5.7-1.8l.81.38.83-.39ZM18.2 9.4c.65.42.84 1.28.42 1.93l-4.4 6.87a1.4 1.4 0 0 1-2.26.14L9.5 15.39a1.4 1.4 0 0 1 2.15-1.8l1.23 1.48 3.38-5.26a1.4 1.4 0 0 1 1.93-.42Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{c as verifySvg};
|
||||
8
dist/assets/verify-filled-C34Ypr-X.js
vendored
Normal file
8
dist/assets/verify-filled-C34Ypr-X.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import{b as l}from"./index-Cr5N_0pd.js";const o=l`<svg fill="none" viewBox="0 0 14 14">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
d="m4.1 12.43-.45-.78-.93-.2a1.65 1.65 0 0 1-1.31-1.8l.1-.86-.61-.71a1.65 1.65 0 0 1 0-2.16l.6-.7-.09-.85c-.1-.86.47-1.64 1.3-1.81l.94-.2.45-.78A1.65 1.65 0 0 1 6.23.9l.77.36.78-.36c.77-.36 1.69-.07 2.12.66l.47.8.91.2c.84.17 1.4.95 1.31 1.8l-.1.86.6.7c.54.62.54 1.54.01 2.16l-.6.71.09.86c.1.85-.47 1.63-1.3 1.8l-.92.2-.47.79a1.65 1.65 0 0 1-2.12.66L7 12.74l-.77.36c-.78.35-1.7.07-2.13-.67Zm5.74-6.9a1 1 0 1 0-1.68-1.07L6.32 7.3l-.55-.66a1 1 0 0 0-1.54 1.28l1.43 1.71a1 1 0 0 0 1.61-.1l2.57-4Z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>`;export{o as verifyFilledSvg};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user