@0xbot/chat-react 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/AaveLendingPoolABI-CdLq16uB-BGiZ7zvm.mjs +4 -0
- package/dist/AaveLendingPoolAddressesProvider-EOSAznLK-BSWFPv4x.mjs +4 -0
- package/dist/AavePriceOracleABI-C2UEpXR4-C_hStKK4.mjs +4 -0
- package/dist/AaveProtocolDataProviderABI-0JclmmLX-DLxLoyai.mjs +4 -0
- package/dist/BaseDrops-BrQZPqKk-B26CkeNy.mjs +4 -0
- package/dist/D3MM_READ_ABI-B5536S-z-CL3RJ1A8.mjs +4 -0
- package/dist/D3Proxy-CKIzLOhI-CGvfWU5A.mjs +4 -0
- package/dist/DODO1155-DDY5Jxhf-DGclqdqY.mjs +4 -0
- package/dist/DODO721-Kl5REiwU-CjPebx7D.mjs +4 -0
- package/dist/DODOCirculationHelperABI-gu1sCqZ2-DKVM1578.mjs +4 -0
- package/dist/DODORouteProxy-51kl6QgI-DjkLwYNY.mjs +4 -0
- package/dist/DODOV1PmmHelperABI-DQqthyaE-1aS8xEGz.mjs +4 -0
- package/dist/DVM-DjtWbqiJ-BbQRScdF.mjs +4 -0
- package/dist/DropsERC721-7Bckjcar-cRaNDmuo.mjs +4 -0
- package/dist/FilterAdmin-jm_-DS1l-BsNgsP2z.mjs +4 -0
- package/dist/FilterERC1155V1-VIUlIHdF-KqUEDK8Y.mjs +4 -0
- package/dist/FilterERC721V1-CWDEPGmH-BeOtdHta.mjs +4 -0
- package/dist/Fragment-Bd_AXeVx-C-ytfCBz.mjs +4 -0
- package/dist/FundingABI-WqQDGVVa-CaLckA9D.mjs +4 -0
- package/dist/IdodoV2-DlW8pwaE-1tII4uF5.mjs +4 -0
- package/dist/LockedTokenVaultABI-CfBj0wEX-CB4fg14z.mjs +4 -0
- package/dist/MarginTrading-CQ5odvHB-hsA_0CMf.mjs +4 -0
- package/dist/MarginTradingFactory-2RKqvCSO-DgmL1WxL.mjs +4 -0
- package/dist/MerkleDistributorABI-Ctn26fnA-BbXWPnph.mjs +4 -0
- package/dist/NonfungiblePositionManager-c8Yw_9-Q-DoGzZtUT.mjs +4 -0
- package/dist/PancakePairABI-Cc9LuXnX-CSfuOSUk.mjs +4 -0
- package/dist/UniswapV3Pool-Da11VKXE-Bpirv2VX.mjs +4 -0
- package/dist/add-CHJpf5Lw.mjs +19 -0
- package/dist/all-wallets-D2hkkUJ3.mjs +10 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/app-store-CqLKqQ5V.mjs +21 -0
- package/dist/apple-B0XeUiD1.mjs +22 -0
- package/dist/arrow-bottom-aeJVAvnL.mjs +12 -0
- package/dist/arrow-bottom-circle-R6EgzTHW.mjs +15 -0
- package/dist/arrow-left-BqQ4buTv.mjs +12 -0
- package/dist/arrow-right-C6Ed0Mzu.mjs +12 -0
- package/dist/arrow-top-BidIjQzK.mjs +12 -0
- package/dist/bank-yI5ZTpcM.mjs +18 -0
- package/dist/baseFilterV1-BPjWXMKw-Hn2CtZK1.mjs +4 -0
- package/dist/basic-Ck_Otdyv.mjs +5718 -0
- package/dist/browser-DfN9W7W3.mjs +18 -0
- package/dist/bsc-3D5wcqPq-Crqli4pE.mjs +4 -0
- package/dist/card-DNVrOepi.mjs +18 -0
- package/dist/chat-library.es.js +6 -0
- package/dist/chat-library.umd.js +7790 -0
- package/dist/checkmark-Y_JAaFYi.mjs +15 -0
- package/dist/checkmark-bold-BaUBCwEZ.mjs +12 -0
- package/dist/chevron-bottom-DT-gLTLE.mjs +12 -0
- package/dist/chevron-left-Db6JDZK5.mjs +12 -0
- package/dist/chevron-right-CcBMjaBn.mjs +12 -0
- package/dist/chevron-top-RvW8f4V7.mjs +12 -0
- package/dist/chrome-store-DnpyKbMo.mjs +65 -0
- package/dist/classicalPoolABI-D5LxySAJ-D7PleszW.mjs +4 -0
- package/dist/clock-Bz19eiZx.mjs +12 -0
- package/dist/close-Pad_fUXU.mjs +12 -0
- package/dist/coinPlaceholder-B7RKkvE0.mjs +12 -0
- package/dist/compass-Dw45tdte.mjs +12 -0
- package/dist/components/DodoSwap.d.ts +14 -0
- package/dist/copy-CwnxEVdO.mjs +19 -0
- package/dist/core-BncCIRvy.mjs +16730 -0
- package/dist/cursor-C6uOuAov.mjs +7 -0
- package/dist/cursor-transparent-xIFYE_0X.mjs +16 -0
- package/dist/desktop-Dz5Hje94.mjs +13 -0
- package/dist/disconnect-CTdx5PqO.mjs +12 -0
- package/dist/discord-C-gRbozI.mjs +21 -0
- package/dist/dodoABI-CLkEBJ8P-Bu3dOG4h.mjs +4 -0
- package/dist/dodoBuyoutModel-BtQv3C3q-BdkKV4YI.mjs +4 -0
- package/dist/dodoCP-N8KA8JwJ-TdVQ5mZP.mjs +4 -0
- package/dist/dodoCPABI-CdAN0KhU-COvDVH7-.mjs +4 -0
- package/dist/dodoCPABIV2-yzF6FlEg-nSP7QBK6.mjs +4 -0
- package/dist/dodoCPFactory-CD0SxXT6-C-NYcE0L.mjs +4 -0
- package/dist/dodoCpProxy-D2AI9-4r-CNpIMaS9.mjs +4 -0
- package/dist/dodoCpProxyV2-CGZRqk2H-CFqfOsrA.mjs +4 -0
- package/dist/dodoCpProxyV202-CoZaEf_6-D3tcGKYm.mjs +4 -0
- package/dist/dodoCustomMintableERC20-CPpNoX1v-CheGl3pc.mjs +4 -0
- package/dist/dodoDPPAdmin-B-fmpTbV-DDnM12B9.mjs +4 -0
- package/dist/dodoDPPFactory-DwAkVskt-BlCcT0Y7.mjs +4 -0
- package/dist/dodoDSP-B6KYm-Cn-BlRNrfLD.mjs +4 -0
- package/dist/dodoDSPFactory-j1eg7Ez--DBzB5BJy.mjs +4 -0
- package/dist/dodoDVM-DDYx1JAy-Dvy00nJq.mjs +4 -0
- package/dist/dodoDVMFactory-FpnJdZb2-pnHsrTp3.mjs +4 -0
- package/dist/dodoDppProxy-A7PPYsqp-D06i9e-K.mjs +4 -0
- package/dist/dodoDropsProxy-vHUWsRNO-QPtLS8Fb.mjs +4 -0
- package/dist/dodoDspProxy-CU7OAvJG-jDB-e7lT.mjs +4 -0
- package/dist/dodoERC20V3Factory-Cz4XKDrU-BczFXEyV.mjs +4 -0
- package/dist/dodoEthProxyABI-CoX95QJI-ClpiGz9q.mjs +4 -0
- package/dist/dodoFeeImpl-zR9Qv4Tq-DEWk3Y40.mjs +4 -0
- package/dist/dodoFragment-4lxmE2XJ-CyrfbNi9.mjs +4 -0
- package/dist/dodoMineV3Proxy-xOGM7Jnv-DB_whEuY.mjs +4 -0
- package/dist/dodoMineV3ProxyOld-BqsZxJRU-D2D73qEi.mjs +4 -0
- package/dist/dodoMiningABI-9J5C_6kN-Dd9oBdgN.mjs +4 -0
- package/dist/dodoMiningReaderABI-DmUXA9Gv-5oVswgl3.mjs +4 -0
- package/dist/dodoNftERC1155-Bw6ID2NE-B6ec1_gD.mjs +4 -0
- package/dist/dodoNftERC721-CI1l0ip9-4w4aINlO.mjs +4 -0
- package/dist/dodoNftPoolProxy-DQkcZHUV-QkmZ2nMD.mjs +4 -0
- package/dist/dodoNftProxy-Di-aoLYM-DxMxz-31.mjs +4 -0
- package/dist/dodoNftVault-B4NZaXcd-CnVQXRy8.mjs +4 -0
- package/dist/dodoOracleABI-BxwZofBV-CMjdc9D8.mjs +4 -0
- package/dist/dodoPair-VN1aEVFz-yv3rmA46.mjs +4 -0
- package/dist/dodoPreminingABI-DU7ocR7L-DbnrMY8U.mjs +4 -0
- package/dist/dodoProxyV2-9ED9HqK5-D1IbsmqR.mjs +4 -0
- package/dist/dodoStarterProxy-B1TdMOvw-Dc_OorIU.mjs +4 -0
- package/dist/dodoTokenABI-Dd2DVUbK-H42B3M0V.mjs +4 -0
- package/dist/dodoUpCPFactoryABI-C1W0Q4Ft-BoaZdses.mjs +4 -0
- package/dist/dodoUpCpFactory-D8ifQyp--qgHD5MAq.mjs +4 -0
- package/dist/dodoV1PairProxy-DyRTqyPe-C8yy7JSs.mjs +4 -0
- package/dist/dodoZooABI-D9Uc4iLK-KrPSOwCN.mjs +4 -0
- package/dist/dppPoolABI-BvoeLJgK-CDxK1JW7.mjs +4 -0
- package/dist/erc20ABI-v08X4jmE-CVM8vD3s.mjs +4 -0
- package/dist/erc20Helper-CG659oLz-CFUQnmR-.mjs +4 -0
- package/dist/eth-B9cviUl5-CG8RPzNA.mjs +4 -0
- package/dist/etherscan-BoxwTKtb.mjs +10 -0
- package/dist/exclamation-triangle-lJzIh3b3.mjs +8 -0
- package/dist/extension-Cu9Cmk3m.mjs +12 -0
- package/dist/external-link-BvvHuuY0.mjs +12 -0
- package/dist/facebook-By3QHn59.mjs +30 -0
- package/dist/farcaster-B6Uk0IIz.mjs +16 -0
- package/dist/feeABI-DnQdJUpQ-DesVgwnT.mjs +4 -0
- package/dist/filters-7iolnXNp.mjs +12 -0
- package/dist/github-CbNFQ-rE.mjs +22 -0
- package/dist/google-B4kpRWe2.mjs +22 -0
- package/dist/help-circle-BHYOhZH-.mjs +16 -0
- package/dist/helper-DvTqUYSd-DjCOVcV8.mjs +22500 -0
- package/dist/id-B63SRnJH.mjs +16 -0
- package/dist/image-BFYG_I7p.mjs +8 -0
- package/dist/index-Cm7qS4de-ByNXzPPy.mjs +188 -0
- package/dist/index-Csyx760V.mjs +1037 -0
- package/dist/index-DId52aLZ.mjs +102718 -0
- package/dist/index-KEmmG3yM-D6PVhm18.mjs +390 -0
- package/dist/index.css +1 -0
- package/dist/info-MhMaxvuu.mjs +7 -0
- package/dist/info-circle-Br6R310O.mjs +16 -0
- package/dist/lightbulb-CvIgiu_8.mjs +7 -0
- package/dist/mail-C37s8I6x.mjs +12 -0
- package/dist/mobile-6yKClGQT.mjs +13 -0
- package/dist/more-CoCXkplN.mjs +15 -0
- package/dist/multicallABI-D9E1EeQD-BHmsV5Ww.mjs +4 -0
- package/dist/network-placeholder-RiVpBWSW.mjs +18 -0
- package/dist/nftContract-d4b6ObxG-DDocz_o1.mjs +4 -0
- package/dist/nftFilterAdmin-DMr_jrK_-CzdnxC1u.mjs +4 -0
- package/dist/nftPlaceholder-BqPW-YRA.mjs +12 -0
- package/dist/off-BYd8177g.mjs +12 -0
- package/dist/oneBitSettlement-DMzQ-0t_-6O4CfYZH.mjs +4 -0
- package/dist/play-store-DOI54pIO.mjs +36 -0
- package/dist/plus-D3V6i3OL.mjs +17 -0
- package/dist/qr-code-BMbd5nBQ.mjs +10 -0
- package/dist/react-datetime.cjs-BazkzJ-h.mjs +3535 -0
- package/dist/recycle-horizontal-Rf_bshe8.mjs +13 -0
- package/dist/refresh-D188VUaC.mjs +12 -0
- package/dist/reown-logo-BlqEBF0T.mjs +16 -0
- package/dist/search-BwlhXkfV.mjs +12 -0
- package/dist/secp256k1-B3zICmiT.mjs +1469 -0
- package/dist/secp256k1-DgHq90iL.mjs +1510 -0
- package/dist/send-gHEIp_-C.mjs +19 -0
- package/dist/setApprovalForAll-BvnCORJI-BsLcI446.mjs +4 -0
- package/dist/spaceIdABI-BS4XGAT1-BjuJy2_U.mjs +4 -0
- package/dist/spaceIdResolverABI-sYDT8GfP-D5rMp5Lb.mjs +4 -0
- package/dist/swapHorizontal-CSBQUUlD.mjs +12 -0
- package/dist/swapHorizontalBold-BJqpmrQd.mjs +12 -0
- package/dist/swapHorizontalMedium-R5UjzDTB.mjs +20 -0
- package/dist/swapHorizontalRoundedBold-Dajt5M8H.mjs +12 -0
- package/dist/swapVertical-C00VFvcQ.mjs +12 -0
- package/dist/telegram-BjMNjPGO.mjs +20 -0
- package/dist/three-dots-CzB3opP1.mjs +9 -0
- package/dist/twitch-BJyvHwSX.mjs +22 -0
- package/dist/twitterIcon-C13sV4pO.mjs +10 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/request.d.ts +1 -0
- package/dist/utils/version.d.ts +13 -0
- package/dist/v3MiningABI-ZjGBkolS-DpOFVbMt.mjs +4 -0
- package/dist/vdodo-ttc2RVOs-BsdVbO8I.mjs +4 -0
- package/dist/vdodoTokenABI-PldrbOSo-CmQmhg5z.mjs +4 -0
- package/dist/verify-CZf1Key9.mjs +12 -0
- package/dist/verify-filled-TxR2AkrB.mjs +12 -0
- package/dist/w3m-modal-CtlM8yh_.mjs +1471 -0
- package/dist/wallet-placeholder-BZj9RGcX.mjs +18 -0
- package/dist/wallet-w_3wvddk.mjs +12 -0
- package/dist/walletconnect-Dst7WudJ.mjs +36 -0
- package/dist/warning-circle-BAvO6TFh.mjs +16 -0
- package/dist/weth-Dz5DGEIF-y7HuL7DE.mjs +4 -0
- package/dist/x-Ch4skAxW.mjs +16 -0
- package/package.json +23 -30
- package/dist/index.es.js +0 -1035
- package/dist/index.umd.js +0 -52
- package/dist/style.css +0 -1
|
@@ -0,0 +1,1471 @@
|
|
|
1
|
+
import { w as ve, s as fe, t as ge, v as be, M as g, y as re, R as l, i as v, r as P, a as f, x as a, z as K, e as ce, o as le, h as m, d as Y, j as ye, B as S, E as ie, O as E, C as q, D as oe, k as T, A as H, T as xe, F as Ce, b as ke, g as Se } from "./core-BncCIRvy.mjs";
|
|
2
|
+
import { c as u, n as w, r as d, o as F, U as We } from "./index-Csyx760V.mjs";
|
|
3
|
+
const p = fe({
|
|
4
|
+
message: "",
|
|
5
|
+
open: !1,
|
|
6
|
+
triggerRect: {
|
|
7
|
+
width: 0,
|
|
8
|
+
height: 0,
|
|
9
|
+
top: 0,
|
|
10
|
+
left: 0
|
|
11
|
+
},
|
|
12
|
+
variant: "shade"
|
|
13
|
+
}), Re = {
|
|
14
|
+
state: p,
|
|
15
|
+
subscribe(s) {
|
|
16
|
+
return be(p, () => s(p));
|
|
17
|
+
},
|
|
18
|
+
subscribeKey(s, e) {
|
|
19
|
+
return ge(p, s, e);
|
|
20
|
+
},
|
|
21
|
+
showTooltip({ message: s, triggerRect: e, variant: t }) {
|
|
22
|
+
p.open = !0, p.message = s, p.triggerRect = e, p.variant = t;
|
|
23
|
+
},
|
|
24
|
+
hide() {
|
|
25
|
+
p.open = !1, p.message = "", p.triggerRect = {
|
|
26
|
+
width: 0,
|
|
27
|
+
height: 0,
|
|
28
|
+
top: 0,
|
|
29
|
+
left: 0
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}, O = ve(Re), de = {
|
|
33
|
+
isUnsupportedChainView() {
|
|
34
|
+
return l.state.view === "UnsupportedChain" || l.state.view === "SwitchNetwork" && l.state.history.includes("UnsupportedChain");
|
|
35
|
+
},
|
|
36
|
+
async safeClose() {
|
|
37
|
+
if (this.isUnsupportedChainView()) {
|
|
38
|
+
g.shake();
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (await re.isSIWXCloseDisabled()) {
|
|
42
|
+
g.shake();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
g.close();
|
|
46
|
+
}
|
|
47
|
+
}, $e = v`
|
|
48
|
+
:host {
|
|
49
|
+
display: block;
|
|
50
|
+
border-radius: clamp(0px, var(--wui-border-radius-l), 44px);
|
|
51
|
+
box-shadow: 0 0 0 1px var(--wui-color-gray-glass-005);
|
|
52
|
+
background-color: var(--wui-color-modal-bg);
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host([data-embedded='true']) {
|
|
57
|
+
box-shadow:
|
|
58
|
+
0 0 0 1px var(--wui-color-gray-glass-005),
|
|
59
|
+
0px 4px 12px 4px var(--w3m-card-embedded-shadow-color);
|
|
60
|
+
}
|
|
61
|
+
`;
|
|
62
|
+
var Ae = function(s, e, t, o) {
|
|
63
|
+
var n = arguments.length, i = n < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, t) : o, r;
|
|
64
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(s, e, t, o);
|
|
65
|
+
else for (var c = s.length - 1; c >= 0; c--) (r = s[c]) && (i = (n < 3 ? r(i) : n > 3 ? r(e, t, i) : r(e, t)) || i);
|
|
66
|
+
return n > 3 && i && Object.defineProperty(e, t, i), i;
|
|
67
|
+
};
|
|
68
|
+
let J = class extends f {
|
|
69
|
+
render() {
|
|
70
|
+
return a`<slot></slot>`;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
J.styles = [P, $e];
|
|
74
|
+
J = Ae([
|
|
75
|
+
u("wui-card")
|
|
76
|
+
], J);
|
|
77
|
+
const Te = v`
|
|
78
|
+
:host {
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
padding: var(--wui-spacing-s);
|
|
83
|
+
border-radius: var(--wui-border-radius-s);
|
|
84
|
+
border: 1px solid var(--wui-color-dark-glass-100);
|
|
85
|
+
box-sizing: border-box;
|
|
86
|
+
background-color: var(--wui-color-bg-325);
|
|
87
|
+
box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.25);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
wui-flex {
|
|
91
|
+
width: 100%;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
wui-text {
|
|
95
|
+
word-break: break-word;
|
|
96
|
+
flex: 1;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.close {
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.icon-box {
|
|
104
|
+
height: 40px;
|
|
105
|
+
width: 40px;
|
|
106
|
+
border-radius: var(--wui-border-radius-3xs);
|
|
107
|
+
background-color: var(--local-icon-bg-value);
|
|
108
|
+
}
|
|
109
|
+
`;
|
|
110
|
+
var _ = function(s, e, t, o) {
|
|
111
|
+
var n = arguments.length, i = n < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, t) : o, r;
|
|
112
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(s, e, t, o);
|
|
113
|
+
else for (var c = s.length - 1; c >= 0; c--) (r = s[c]) && (i = (n < 3 ? r(i) : n > 3 ? r(e, t, i) : r(e, t)) || i);
|
|
114
|
+
return n > 3 && i && Object.defineProperty(e, t, i), i;
|
|
115
|
+
};
|
|
116
|
+
let W = class extends f {
|
|
117
|
+
constructor() {
|
|
118
|
+
super(...arguments), this.message = "", this.backgroundColor = "accent-100", this.iconColor = "accent-100", this.icon = "info";
|
|
119
|
+
}
|
|
120
|
+
render() {
|
|
121
|
+
return this.style.cssText = `
|
|
122
|
+
--local-icon-bg-value: var(--wui-color-${this.backgroundColor});
|
|
123
|
+
`, a`
|
|
124
|
+
<wui-flex flexDirection="row" justifyContent="space-between" alignItems="center">
|
|
125
|
+
<wui-flex columnGap="xs" flexDirection="row" alignItems="center">
|
|
126
|
+
<wui-flex
|
|
127
|
+
flexDirection="row"
|
|
128
|
+
alignItems="center"
|
|
129
|
+
justifyContent="center"
|
|
130
|
+
class="icon-box"
|
|
131
|
+
>
|
|
132
|
+
<wui-icon color=${this.iconColor} size="md" name=${this.icon}></wui-icon>
|
|
133
|
+
</wui-flex>
|
|
134
|
+
<wui-text variant="small-500" color="bg-350" data-testid="wui-alertbar-text"
|
|
135
|
+
>${this.message}</wui-text
|
|
136
|
+
>
|
|
137
|
+
</wui-flex>
|
|
138
|
+
<wui-icon
|
|
139
|
+
class="close"
|
|
140
|
+
color="bg-350"
|
|
141
|
+
size="sm"
|
|
142
|
+
name="close"
|
|
143
|
+
@click=${this.onClose}
|
|
144
|
+
></wui-icon>
|
|
145
|
+
</wui-flex>
|
|
146
|
+
`;
|
|
147
|
+
}
|
|
148
|
+
onClose() {
|
|
149
|
+
K.close();
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
W.styles = [P, Te];
|
|
153
|
+
_([
|
|
154
|
+
w()
|
|
155
|
+
], W.prototype, "message", void 0);
|
|
156
|
+
_([
|
|
157
|
+
w()
|
|
158
|
+
], W.prototype, "backgroundColor", void 0);
|
|
159
|
+
_([
|
|
160
|
+
w()
|
|
161
|
+
], W.prototype, "iconColor", void 0);
|
|
162
|
+
_([
|
|
163
|
+
w()
|
|
164
|
+
], W.prototype, "icon", void 0);
|
|
165
|
+
W = _([
|
|
166
|
+
u("wui-alertbar")
|
|
167
|
+
], W);
|
|
168
|
+
const Oe = v`
|
|
169
|
+
:host {
|
|
170
|
+
display: block;
|
|
171
|
+
position: absolute;
|
|
172
|
+
top: var(--wui-spacing-s);
|
|
173
|
+
left: var(--wui-spacing-l);
|
|
174
|
+
right: var(--wui-spacing-l);
|
|
175
|
+
opacity: 0;
|
|
176
|
+
pointer-events: none;
|
|
177
|
+
}
|
|
178
|
+
`;
|
|
179
|
+
var we = function(s, e, t, o) {
|
|
180
|
+
var n = arguments.length, i = n < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, t) : o, r;
|
|
181
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(s, e, t, o);
|
|
182
|
+
else for (var c = s.length - 1; c >= 0; c--) (r = s[c]) && (i = (n < 3 ? r(i) : n > 3 ? r(e, t, i) : r(e, t)) || i);
|
|
183
|
+
return n > 3 && i && Object.defineProperty(e, t, i), i;
|
|
184
|
+
};
|
|
185
|
+
const Ne = {
|
|
186
|
+
info: {
|
|
187
|
+
backgroundColor: "fg-350",
|
|
188
|
+
iconColor: "fg-325",
|
|
189
|
+
icon: "info"
|
|
190
|
+
},
|
|
191
|
+
success: {
|
|
192
|
+
backgroundColor: "success-glass-reown-020",
|
|
193
|
+
iconColor: "success-125",
|
|
194
|
+
icon: "checkmark"
|
|
195
|
+
},
|
|
196
|
+
warning: {
|
|
197
|
+
backgroundColor: "warning-glass-reown-020",
|
|
198
|
+
iconColor: "warning-100",
|
|
199
|
+
icon: "warningCircle"
|
|
200
|
+
},
|
|
201
|
+
error: {
|
|
202
|
+
backgroundColor: "error-glass-reown-020",
|
|
203
|
+
iconColor: "error-125",
|
|
204
|
+
icon: "exclamationTriangle"
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
let M = class extends f {
|
|
208
|
+
constructor() {
|
|
209
|
+
super(), this.unsubscribe = [], this.open = K.state.open, this.onOpen(!0), this.unsubscribe.push(K.subscribeKey("open", (e) => {
|
|
210
|
+
this.open = e, this.onOpen(!1);
|
|
211
|
+
}));
|
|
212
|
+
}
|
|
213
|
+
disconnectedCallback() {
|
|
214
|
+
this.unsubscribe.forEach((e) => e());
|
|
215
|
+
}
|
|
216
|
+
render() {
|
|
217
|
+
const { message: e, variant: t } = K.state, o = Ne[t];
|
|
218
|
+
return a`
|
|
219
|
+
<wui-alertbar
|
|
220
|
+
message=${e}
|
|
221
|
+
backgroundColor=${o == null ? void 0 : o.backgroundColor}
|
|
222
|
+
iconColor=${o == null ? void 0 : o.iconColor}
|
|
223
|
+
icon=${o == null ? void 0 : o.icon}
|
|
224
|
+
></wui-alertbar>
|
|
225
|
+
`;
|
|
226
|
+
}
|
|
227
|
+
onOpen(e) {
|
|
228
|
+
this.open ? (this.animate([
|
|
229
|
+
{ opacity: 0, transform: "scale(0.85)" },
|
|
230
|
+
{ opacity: 1, transform: "scale(1)" }
|
|
231
|
+
], {
|
|
232
|
+
duration: 150,
|
|
233
|
+
fill: "forwards",
|
|
234
|
+
easing: "ease"
|
|
235
|
+
}), this.style.cssText = "pointer-events: auto") : e || (this.animate([
|
|
236
|
+
{ opacity: 1, transform: "scale(1)" },
|
|
237
|
+
{ opacity: 0, transform: "scale(0.85)" }
|
|
238
|
+
], {
|
|
239
|
+
duration: 150,
|
|
240
|
+
fill: "forwards",
|
|
241
|
+
easing: "ease"
|
|
242
|
+
}), this.style.cssText = "pointer-events: none");
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
M.styles = Oe;
|
|
246
|
+
we([
|
|
247
|
+
d()
|
|
248
|
+
], M.prototype, "open", void 0);
|
|
249
|
+
M = we([
|
|
250
|
+
u("w3m-alertbar")
|
|
251
|
+
], M);
|
|
252
|
+
const Ee = v`
|
|
253
|
+
button {
|
|
254
|
+
border-radius: var(--local-border-radius);
|
|
255
|
+
color: var(--wui-color-fg-100);
|
|
256
|
+
padding: var(--local-padding);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
@media (max-width: 700px) {
|
|
260
|
+
button {
|
|
261
|
+
padding: var(--wui-spacing-s);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
button > wui-icon {
|
|
266
|
+
pointer-events: none;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
button:disabled > wui-icon {
|
|
270
|
+
color: var(--wui-color-bg-300) !important;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
button:disabled {
|
|
274
|
+
background-color: transparent;
|
|
275
|
+
}
|
|
276
|
+
`;
|
|
277
|
+
var B = function(s, e, t, o) {
|
|
278
|
+
var n = arguments.length, i = n < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, t) : o, r;
|
|
279
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(s, e, t, o);
|
|
280
|
+
else for (var c = s.length - 1; c >= 0; c--) (r = s[c]) && (i = (n < 3 ? r(i) : n > 3 ? r(e, t, i) : r(e, t)) || i);
|
|
281
|
+
return n > 3 && i && Object.defineProperty(e, t, i), i;
|
|
282
|
+
};
|
|
283
|
+
let R = class extends f {
|
|
284
|
+
constructor() {
|
|
285
|
+
super(...arguments), this.size = "md", this.disabled = !1, this.icon = "copy", this.iconColor = "inherit";
|
|
286
|
+
}
|
|
287
|
+
render() {
|
|
288
|
+
const e = this.size === "lg" ? "--wui-border-radius-xs" : "--wui-border-radius-xxs", t = this.size === "lg" ? "--wui-spacing-1xs" : "--wui-spacing-2xs";
|
|
289
|
+
return this.style.cssText = `
|
|
290
|
+
--local-border-radius: var(${e});
|
|
291
|
+
--local-padding: var(${t});
|
|
292
|
+
`, a`
|
|
293
|
+
<button ?disabled=${this.disabled}>
|
|
294
|
+
<wui-icon color=${this.iconColor} size=${this.size} name=${this.icon}></wui-icon>
|
|
295
|
+
</button>
|
|
296
|
+
`;
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
R.styles = [P, ce, le, Ee];
|
|
300
|
+
B([
|
|
301
|
+
w()
|
|
302
|
+
], R.prototype, "size", void 0);
|
|
303
|
+
B([
|
|
304
|
+
w({ type: Boolean })
|
|
305
|
+
], R.prototype, "disabled", void 0);
|
|
306
|
+
B([
|
|
307
|
+
w()
|
|
308
|
+
], R.prototype, "icon", void 0);
|
|
309
|
+
B([
|
|
310
|
+
w()
|
|
311
|
+
], R.prototype, "iconColor", void 0);
|
|
312
|
+
R = B([
|
|
313
|
+
u("wui-icon-link")
|
|
314
|
+
], R);
|
|
315
|
+
const Ie = v`
|
|
316
|
+
button {
|
|
317
|
+
display: block;
|
|
318
|
+
display: flex;
|
|
319
|
+
align-items: center;
|
|
320
|
+
padding: var(--wui-spacing-xxs);
|
|
321
|
+
gap: var(--wui-spacing-xxs);
|
|
322
|
+
transition: all var(--wui-ease-out-power-1) var(--wui-duration-md);
|
|
323
|
+
border-radius: var(--wui-border-radius-xxs);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
wui-image {
|
|
327
|
+
border-radius: 100%;
|
|
328
|
+
width: var(--wui-spacing-xl);
|
|
329
|
+
height: var(--wui-spacing-xl);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
wui-icon-box {
|
|
333
|
+
width: var(--wui-spacing-xl);
|
|
334
|
+
height: var(--wui-spacing-xl);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
button:hover {
|
|
338
|
+
background-color: var(--wui-color-gray-glass-002);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
button:active {
|
|
342
|
+
background-color: var(--wui-color-gray-glass-005);
|
|
343
|
+
}
|
|
344
|
+
`;
|
|
345
|
+
var ue = function(s, e, t, o) {
|
|
346
|
+
var n = arguments.length, i = n < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, t) : o, r;
|
|
347
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(s, e, t, o);
|
|
348
|
+
else for (var c = s.length - 1; c >= 0; c--) (r = s[c]) && (i = (n < 3 ? r(i) : n > 3 ? r(e, t, i) : r(e, t)) || i);
|
|
349
|
+
return n > 3 && i && Object.defineProperty(e, t, i), i;
|
|
350
|
+
};
|
|
351
|
+
let V = class extends f {
|
|
352
|
+
constructor() {
|
|
353
|
+
super(...arguments), this.imageSrc = "";
|
|
354
|
+
}
|
|
355
|
+
render() {
|
|
356
|
+
return a`<button>
|
|
357
|
+
${this.imageTemplate()}
|
|
358
|
+
<wui-icon size="xs" color="fg-200" name="chevronBottom"></wui-icon>
|
|
359
|
+
</button>`;
|
|
360
|
+
}
|
|
361
|
+
imageTemplate() {
|
|
362
|
+
return this.imageSrc ? a`<wui-image src=${this.imageSrc} alt="select visual"></wui-image>` : a`<wui-icon-box
|
|
363
|
+
size="xxs"
|
|
364
|
+
iconColor="fg-200"
|
|
365
|
+
backgroundColor="fg-100"
|
|
366
|
+
background="opaque"
|
|
367
|
+
icon="networkPlaceholder"
|
|
368
|
+
></wui-icon-box>`;
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
V.styles = [P, ce, le, Ie];
|
|
372
|
+
ue([
|
|
373
|
+
w()
|
|
374
|
+
], V.prototype, "imageSrc", void 0);
|
|
375
|
+
V = ue([
|
|
376
|
+
u("wui-select")
|
|
377
|
+
], V);
|
|
378
|
+
const Pe = v`
|
|
379
|
+
:host {
|
|
380
|
+
height: 64px;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
wui-text {
|
|
384
|
+
text-transform: capitalize;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
wui-flex.w3m-header-title {
|
|
388
|
+
transform: translateY(0);
|
|
389
|
+
opacity: 1;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
wui-flex.w3m-header-title[view-direction='prev'] {
|
|
393
|
+
animation:
|
|
394
|
+
slide-down-out 120ms forwards var(--wui-ease-out-power-2),
|
|
395
|
+
slide-down-in 120ms forwards var(--wui-ease-out-power-2);
|
|
396
|
+
animation-delay: 0ms, 200ms;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
wui-flex.w3m-header-title[view-direction='next'] {
|
|
400
|
+
animation:
|
|
401
|
+
slide-up-out 120ms forwards var(--wui-ease-out-power-2),
|
|
402
|
+
slide-up-in 120ms forwards var(--wui-ease-out-power-2);
|
|
403
|
+
animation-delay: 0ms, 200ms;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
wui-icon-link[data-hidden='true'] {
|
|
407
|
+
opacity: 0 !important;
|
|
408
|
+
pointer-events: none;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
@keyframes slide-up-out {
|
|
412
|
+
from {
|
|
413
|
+
transform: translateY(0px);
|
|
414
|
+
opacity: 1;
|
|
415
|
+
}
|
|
416
|
+
to {
|
|
417
|
+
transform: translateY(3px);
|
|
418
|
+
opacity: 0;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
@keyframes slide-up-in {
|
|
423
|
+
from {
|
|
424
|
+
transform: translateY(-3px);
|
|
425
|
+
opacity: 0;
|
|
426
|
+
}
|
|
427
|
+
to {
|
|
428
|
+
transform: translateY(0);
|
|
429
|
+
opacity: 1;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
@keyframes slide-down-out {
|
|
434
|
+
from {
|
|
435
|
+
transform: translateY(0px);
|
|
436
|
+
opacity: 1;
|
|
437
|
+
}
|
|
438
|
+
to {
|
|
439
|
+
transform: translateY(-3px);
|
|
440
|
+
opacity: 0;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
@keyframes slide-down-in {
|
|
445
|
+
from {
|
|
446
|
+
transform: translateY(3px);
|
|
447
|
+
opacity: 0;
|
|
448
|
+
}
|
|
449
|
+
to {
|
|
450
|
+
transform: translateY(0);
|
|
451
|
+
opacity: 1;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
`;
|
|
455
|
+
var y = function(s, e, t, o) {
|
|
456
|
+
var n = arguments.length, i = n < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, t) : o, r;
|
|
457
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(s, e, t, o);
|
|
458
|
+
else for (var c = s.length - 1; c >= 0; c--) (r = s[c]) && (i = (n < 3 ? r(i) : n > 3 ? r(e, t, i) : r(e, t)) || i);
|
|
459
|
+
return n > 3 && i && Object.defineProperty(e, t, i), i;
|
|
460
|
+
};
|
|
461
|
+
const _e = ["SmartSessionList"];
|
|
462
|
+
function G() {
|
|
463
|
+
var r, c, N, k, j, L, U;
|
|
464
|
+
const s = (c = (r = l.state.data) == null ? void 0 : r.connector) == null ? void 0 : c.name, e = (k = (N = l.state.data) == null ? void 0 : N.wallet) == null ? void 0 : k.name, t = (L = (j = l.state.data) == null ? void 0 : j.network) == null ? void 0 : L.name, o = e ?? s, n = q.getConnectors();
|
|
465
|
+
return {
|
|
466
|
+
Connect: `Connect ${n.length === 1 && ((U = n[0]) == null ? void 0 : U.id) === "w3m-email" ? "Email" : ""} Wallet`,
|
|
467
|
+
Create: "Create Wallet",
|
|
468
|
+
ChooseAccountName: void 0,
|
|
469
|
+
Account: void 0,
|
|
470
|
+
AccountSettings: void 0,
|
|
471
|
+
AllWallets: "All Wallets",
|
|
472
|
+
ApproveTransaction: "Approve Transaction",
|
|
473
|
+
BuyInProgress: "Buy",
|
|
474
|
+
ConnectingExternal: o ?? "Connect Wallet",
|
|
475
|
+
ConnectingWalletConnect: o ?? "WalletConnect",
|
|
476
|
+
ConnectingWalletConnectBasic: "WalletConnect",
|
|
477
|
+
ConnectingSiwe: "Sign In",
|
|
478
|
+
Convert: "Convert",
|
|
479
|
+
ConvertSelectToken: "Select token",
|
|
480
|
+
ConvertPreview: "Preview convert",
|
|
481
|
+
Downloads: o ? `Get ${o}` : "Downloads",
|
|
482
|
+
EmailLogin: "Email Login",
|
|
483
|
+
EmailVerifyOtp: "Confirm Email",
|
|
484
|
+
EmailVerifyDevice: "Register Device",
|
|
485
|
+
GetWallet: "Get a wallet",
|
|
486
|
+
Networks: "Choose Network",
|
|
487
|
+
OnRampProviders: "Choose Provider",
|
|
488
|
+
OnRampActivity: "Activity",
|
|
489
|
+
OnRampTokenSelect: "Select Token",
|
|
490
|
+
OnRampFiatSelect: "Select Currency",
|
|
491
|
+
Pay: "How you pay",
|
|
492
|
+
Profile: void 0,
|
|
493
|
+
SwitchNetwork: t ?? "Switch Network",
|
|
494
|
+
SwitchAddress: "Switch Address",
|
|
495
|
+
Transactions: "Activity",
|
|
496
|
+
UnsupportedChain: "Switch Network",
|
|
497
|
+
UpgradeEmailWallet: "Upgrade your Wallet",
|
|
498
|
+
UpdateEmailWallet: "Edit Email",
|
|
499
|
+
UpdateEmailPrimaryOtp: "Confirm Current Email",
|
|
500
|
+
UpdateEmailSecondaryOtp: "Confirm New Email",
|
|
501
|
+
WhatIsABuy: "What is Buy?",
|
|
502
|
+
RegisterAccountName: "Choose name",
|
|
503
|
+
RegisterAccountNameSuccess: "",
|
|
504
|
+
WalletReceive: "Receive",
|
|
505
|
+
WalletCompatibleNetworks: "Compatible Networks",
|
|
506
|
+
Swap: "Swap",
|
|
507
|
+
SwapSelectToken: "Select token",
|
|
508
|
+
SwapPreview: "Preview swap",
|
|
509
|
+
WalletSend: "Send",
|
|
510
|
+
WalletSendPreview: "Review send",
|
|
511
|
+
WalletSendSelectToken: "Select Token",
|
|
512
|
+
WhatIsANetwork: "What is a network?",
|
|
513
|
+
WhatIsAWallet: "What is a wallet?",
|
|
514
|
+
ConnectWallets: "Connect wallet",
|
|
515
|
+
ConnectSocials: "All socials",
|
|
516
|
+
ConnectingSocial: oe.state.socialProvider ? oe.state.socialProvider : "Connect Social",
|
|
517
|
+
ConnectingMultiChain: "Select chain",
|
|
518
|
+
ConnectingFarcaster: "Farcaster",
|
|
519
|
+
SwitchActiveChain: "Switch chain",
|
|
520
|
+
SmartSessionCreated: void 0,
|
|
521
|
+
SmartSessionList: "Smart Sessions",
|
|
522
|
+
SIWXSignMessage: "Sign In",
|
|
523
|
+
PayLoading: "Payment in progress"
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
let h = class extends f {
|
|
527
|
+
constructor() {
|
|
528
|
+
super(), this.unsubscribe = [], this.heading = G()[l.state.view], this.network = m.state.activeCaipNetwork, this.networkImage = Y.getNetworkImage(this.network), this.showBack = !1, this.prevHistoryLength = 1, this.view = l.state.view, this.viewDirection = "", this.headerText = G()[l.state.view], this.unsubscribe.push(ye.subscribeNetworkImages(() => {
|
|
529
|
+
this.networkImage = Y.getNetworkImage(this.network);
|
|
530
|
+
}), l.subscribeKey("view", (e) => {
|
|
531
|
+
setTimeout(() => {
|
|
532
|
+
this.view = e, this.headerText = G()[e];
|
|
533
|
+
}, S.ANIMATION_DURATIONS.HeaderText), this.onViewChange(), this.onHistoryChange();
|
|
534
|
+
}), m.subscribeKey("activeCaipNetwork", (e) => {
|
|
535
|
+
this.network = e, this.networkImage = Y.getNetworkImage(this.network);
|
|
536
|
+
}));
|
|
537
|
+
}
|
|
538
|
+
disconnectCallback() {
|
|
539
|
+
this.unsubscribe.forEach((e) => e());
|
|
540
|
+
}
|
|
541
|
+
render() {
|
|
542
|
+
return a`
|
|
543
|
+
<wui-flex .padding=${this.getPadding()} justifyContent="space-between" alignItems="center">
|
|
544
|
+
${this.leftHeaderTemplate()} ${this.titleTemplate()} ${this.rightHeaderTemplate()}
|
|
545
|
+
</wui-flex>
|
|
546
|
+
`;
|
|
547
|
+
}
|
|
548
|
+
onWalletHelp() {
|
|
549
|
+
ie.sendEvent({ type: "track", event: "CLICK_WALLET_HELP" }), l.push("WhatIsAWallet");
|
|
550
|
+
}
|
|
551
|
+
async onClose() {
|
|
552
|
+
await de.safeClose();
|
|
553
|
+
}
|
|
554
|
+
rightHeaderTemplate() {
|
|
555
|
+
var t, o, n;
|
|
556
|
+
const e = (n = (o = (t = E) == null ? void 0 : t.state) == null ? void 0 : o.features) == null ? void 0 : n.smartSessions;
|
|
557
|
+
return l.state.view !== "Account" || !e ? this.closeButtonTemplate() : a`<wui-flex>
|
|
558
|
+
<wui-icon-link
|
|
559
|
+
icon="clock"
|
|
560
|
+
@click=${() => l.push("SmartSessionList")}
|
|
561
|
+
data-testid="w3m-header-smart-sessions"
|
|
562
|
+
></wui-icon-link>
|
|
563
|
+
${this.closeButtonTemplate()}
|
|
564
|
+
</wui-flex> `;
|
|
565
|
+
}
|
|
566
|
+
closeButtonTemplate() {
|
|
567
|
+
return a`
|
|
568
|
+
<wui-icon-link
|
|
569
|
+
icon="close"
|
|
570
|
+
@click=${this.onClose.bind(this)}
|
|
571
|
+
data-testid="w3m-header-close"
|
|
572
|
+
></wui-icon-link>
|
|
573
|
+
`;
|
|
574
|
+
}
|
|
575
|
+
titleTemplate() {
|
|
576
|
+
const e = _e.includes(this.view);
|
|
577
|
+
return a`
|
|
578
|
+
<wui-flex
|
|
579
|
+
view-direction="${this.viewDirection}"
|
|
580
|
+
class="w3m-header-title"
|
|
581
|
+
alignItems="center"
|
|
582
|
+
gap="xs"
|
|
583
|
+
>
|
|
584
|
+
<wui-text variant="paragraph-700" color="fg-100" data-testid="w3m-header-text"
|
|
585
|
+
>${this.headerText}</wui-text
|
|
586
|
+
>
|
|
587
|
+
${e ? a`<wui-tag variant="main">Beta</wui-tag>` : null}
|
|
588
|
+
</wui-flex>
|
|
589
|
+
`;
|
|
590
|
+
}
|
|
591
|
+
leftHeaderTemplate() {
|
|
592
|
+
var k;
|
|
593
|
+
const { view: e } = l.state, t = e === "Connect", o = E.state.enableEmbedded, n = e === "ApproveTransaction", i = e === "ConnectingSiwe", r = e === "Account", c = E.state.enableNetworkSwitch, N = n || i || t && o;
|
|
594
|
+
return r && c ? a`<wui-select
|
|
595
|
+
id="dynamic"
|
|
596
|
+
data-testid="w3m-account-select-network"
|
|
597
|
+
active-network=${F((k = this.network) == null ? void 0 : k.name)}
|
|
598
|
+
@click=${this.onNetworks.bind(this)}
|
|
599
|
+
imageSrc=${F(this.networkImage)}
|
|
600
|
+
></wui-select>` : this.showBack && !N ? a`<wui-icon-link
|
|
601
|
+
data-testid="header-back"
|
|
602
|
+
id="dynamic"
|
|
603
|
+
icon="chevronLeft"
|
|
604
|
+
@click=${this.onGoBack.bind(this)}
|
|
605
|
+
></wui-icon-link>` : a`<wui-icon-link
|
|
606
|
+
data-hidden=${!t}
|
|
607
|
+
id="dynamic"
|
|
608
|
+
icon="helpCircle"
|
|
609
|
+
@click=${this.onWalletHelp.bind(this)}
|
|
610
|
+
></wui-icon-link>`;
|
|
611
|
+
}
|
|
612
|
+
onNetworks() {
|
|
613
|
+
this.isAllowedNetworkSwitch() && (ie.sendEvent({ type: "track", event: "CLICK_NETWORKS" }), l.push("Networks"));
|
|
614
|
+
}
|
|
615
|
+
isAllowedNetworkSwitch() {
|
|
616
|
+
const e = m.getAllRequestedCaipNetworks(), t = e ? e.length > 1 : !1, o = e == null ? void 0 : e.find(({ id: n }) => {
|
|
617
|
+
var i;
|
|
618
|
+
return n === ((i = this.network) == null ? void 0 : i.id);
|
|
619
|
+
});
|
|
620
|
+
return t || !o;
|
|
621
|
+
}
|
|
622
|
+
getPadding() {
|
|
623
|
+
return this.heading ? ["l", "2l", "l", "2l"] : ["0", "2l", "0", "2l"];
|
|
624
|
+
}
|
|
625
|
+
onViewChange() {
|
|
626
|
+
const { history: e } = l.state;
|
|
627
|
+
let t = S.VIEW_DIRECTION.Next;
|
|
628
|
+
e.length < this.prevHistoryLength && (t = S.VIEW_DIRECTION.Prev), this.prevHistoryLength = e.length, this.viewDirection = t;
|
|
629
|
+
}
|
|
630
|
+
async onHistoryChange() {
|
|
631
|
+
var o;
|
|
632
|
+
const { history: e } = l.state, t = (o = this.shadowRoot) == null ? void 0 : o.querySelector("#dynamic");
|
|
633
|
+
e.length > 1 && !this.showBack && t ? (await t.animate([{ opacity: 1 }, { opacity: 0 }], {
|
|
634
|
+
duration: 200,
|
|
635
|
+
fill: "forwards",
|
|
636
|
+
easing: "ease"
|
|
637
|
+
}).finished, this.showBack = !0, t.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
638
|
+
duration: 200,
|
|
639
|
+
fill: "forwards",
|
|
640
|
+
easing: "ease"
|
|
641
|
+
})) : e.length <= 1 && this.showBack && t && (await t.animate([{ opacity: 1 }, { opacity: 0 }], {
|
|
642
|
+
duration: 200,
|
|
643
|
+
fill: "forwards",
|
|
644
|
+
easing: "ease"
|
|
645
|
+
}).finished, this.showBack = !1, t.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
646
|
+
duration: 200,
|
|
647
|
+
fill: "forwards",
|
|
648
|
+
easing: "ease"
|
|
649
|
+
}));
|
|
650
|
+
}
|
|
651
|
+
onGoBack() {
|
|
652
|
+
l.goBack();
|
|
653
|
+
}
|
|
654
|
+
};
|
|
655
|
+
h.styles = Pe;
|
|
656
|
+
y([
|
|
657
|
+
d()
|
|
658
|
+
], h.prototype, "heading", void 0);
|
|
659
|
+
y([
|
|
660
|
+
d()
|
|
661
|
+
], h.prototype, "network", void 0);
|
|
662
|
+
y([
|
|
663
|
+
d()
|
|
664
|
+
], h.prototype, "networkImage", void 0);
|
|
665
|
+
y([
|
|
666
|
+
d()
|
|
667
|
+
], h.prototype, "showBack", void 0);
|
|
668
|
+
y([
|
|
669
|
+
d()
|
|
670
|
+
], h.prototype, "prevHistoryLength", void 0);
|
|
671
|
+
y([
|
|
672
|
+
d()
|
|
673
|
+
], h.prototype, "view", void 0);
|
|
674
|
+
y([
|
|
675
|
+
d()
|
|
676
|
+
], h.prototype, "viewDirection", void 0);
|
|
677
|
+
y([
|
|
678
|
+
d()
|
|
679
|
+
], h.prototype, "headerText", void 0);
|
|
680
|
+
h = y([
|
|
681
|
+
u("w3m-header")
|
|
682
|
+
], h);
|
|
683
|
+
const Be = v`
|
|
684
|
+
:host {
|
|
685
|
+
display: flex;
|
|
686
|
+
column-gap: var(--wui-spacing-s);
|
|
687
|
+
align-items: center;
|
|
688
|
+
padding: var(--wui-spacing-xs) var(--wui-spacing-m) var(--wui-spacing-xs) var(--wui-spacing-xs);
|
|
689
|
+
border-radius: var(--wui-border-radius-s);
|
|
690
|
+
border: 1px solid var(--wui-color-gray-glass-005);
|
|
691
|
+
box-sizing: border-box;
|
|
692
|
+
background-color: var(--wui-color-bg-175);
|
|
693
|
+
box-shadow:
|
|
694
|
+
0px 14px 64px -4px rgba(0, 0, 0, 0.15),
|
|
695
|
+
0px 8px 22px -6px rgba(0, 0, 0, 0.15);
|
|
696
|
+
|
|
697
|
+
max-width: 300px;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
:host wui-loading-spinner {
|
|
701
|
+
margin-left: var(--wui-spacing-3xs);
|
|
702
|
+
}
|
|
703
|
+
`;
|
|
704
|
+
var A = function(s, e, t, o) {
|
|
705
|
+
var n = arguments.length, i = n < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, t) : o, r;
|
|
706
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(s, e, t, o);
|
|
707
|
+
else for (var c = s.length - 1; c >= 0; c--) (r = s[c]) && (i = (n < 3 ? r(i) : n > 3 ? r(e, t, i) : r(e, t)) || i);
|
|
708
|
+
return n > 3 && i && Object.defineProperty(e, t, i), i;
|
|
709
|
+
};
|
|
710
|
+
let b = class extends f {
|
|
711
|
+
constructor() {
|
|
712
|
+
super(...arguments), this.backgroundColor = "accent-100", this.iconColor = "accent-100", this.icon = "checkmark", this.message = "", this.loading = !1, this.iconType = "default";
|
|
713
|
+
}
|
|
714
|
+
render() {
|
|
715
|
+
return a`
|
|
716
|
+
${this.templateIcon()}
|
|
717
|
+
<wui-text variant="paragraph-500" color="fg-100" data-testid="wui-snackbar-message"
|
|
718
|
+
>${this.message}</wui-text
|
|
719
|
+
>
|
|
720
|
+
`;
|
|
721
|
+
}
|
|
722
|
+
templateIcon() {
|
|
723
|
+
return this.loading ? a`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>` : this.iconType === "default" ? a`<wui-icon size="xl" color=${this.iconColor} name=${this.icon}></wui-icon>` : a`<wui-icon-box
|
|
724
|
+
size="sm"
|
|
725
|
+
iconSize="xs"
|
|
726
|
+
iconColor=${this.iconColor}
|
|
727
|
+
backgroundColor=${this.backgroundColor}
|
|
728
|
+
icon=${this.icon}
|
|
729
|
+
background="opaque"
|
|
730
|
+
></wui-icon-box>`;
|
|
731
|
+
}
|
|
732
|
+
};
|
|
733
|
+
b.styles = [P, Be];
|
|
734
|
+
A([
|
|
735
|
+
w()
|
|
736
|
+
], b.prototype, "backgroundColor", void 0);
|
|
737
|
+
A([
|
|
738
|
+
w()
|
|
739
|
+
], b.prototype, "iconColor", void 0);
|
|
740
|
+
A([
|
|
741
|
+
w()
|
|
742
|
+
], b.prototype, "icon", void 0);
|
|
743
|
+
A([
|
|
744
|
+
w()
|
|
745
|
+
], b.prototype, "message", void 0);
|
|
746
|
+
A([
|
|
747
|
+
w()
|
|
748
|
+
], b.prototype, "loading", void 0);
|
|
749
|
+
A([
|
|
750
|
+
w()
|
|
751
|
+
], b.prototype, "iconType", void 0);
|
|
752
|
+
b = A([
|
|
753
|
+
u("wui-snackbar")
|
|
754
|
+
], b);
|
|
755
|
+
const De = v`
|
|
756
|
+
:host {
|
|
757
|
+
display: block;
|
|
758
|
+
position: absolute;
|
|
759
|
+
opacity: 0;
|
|
760
|
+
pointer-events: none;
|
|
761
|
+
top: 11px;
|
|
762
|
+
left: 50%;
|
|
763
|
+
width: max-content;
|
|
764
|
+
}
|
|
765
|
+
`;
|
|
766
|
+
var pe = function(s, e, t, o) {
|
|
767
|
+
var n = arguments.length, i = n < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, t) : o, r;
|
|
768
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(s, e, t, o);
|
|
769
|
+
else for (var c = s.length - 1; c >= 0; c--) (r = s[c]) && (i = (n < 3 ? r(i) : n > 3 ? r(e, t, i) : r(e, t)) || i);
|
|
770
|
+
return n > 3 && i && Object.defineProperty(e, t, i), i;
|
|
771
|
+
};
|
|
772
|
+
const je = {
|
|
773
|
+
loading: void 0,
|
|
774
|
+
success: {
|
|
775
|
+
backgroundColor: "success-100",
|
|
776
|
+
iconColor: "success-100",
|
|
777
|
+
icon: "checkmark"
|
|
778
|
+
},
|
|
779
|
+
error: {
|
|
780
|
+
backgroundColor: "error-100",
|
|
781
|
+
iconColor: "error-100",
|
|
782
|
+
icon: "close"
|
|
783
|
+
}
|
|
784
|
+
};
|
|
785
|
+
let X = class extends f {
|
|
786
|
+
constructor() {
|
|
787
|
+
super(), this.unsubscribe = [], this.timeout = void 0, this.open = T.state.open, this.unsubscribe.push(T.subscribeKey("open", (e) => {
|
|
788
|
+
this.open = e, this.onOpen();
|
|
789
|
+
}));
|
|
790
|
+
}
|
|
791
|
+
disconnectedCallback() {
|
|
792
|
+
clearTimeout(this.timeout), this.unsubscribe.forEach((e) => e());
|
|
793
|
+
}
|
|
794
|
+
render() {
|
|
795
|
+
const { message: e, variant: t, svg: o } = T.state, n = je[t], { icon: i, iconColor: r } = o ?? n ?? {};
|
|
796
|
+
return a`
|
|
797
|
+
<wui-snackbar
|
|
798
|
+
message=${e}
|
|
799
|
+
backgroundColor=${n == null ? void 0 : n.backgroundColor}
|
|
800
|
+
iconColor=${r}
|
|
801
|
+
icon=${i}
|
|
802
|
+
.loading=${t === "loading"}
|
|
803
|
+
></wui-snackbar>
|
|
804
|
+
`;
|
|
805
|
+
}
|
|
806
|
+
onOpen() {
|
|
807
|
+
clearTimeout(this.timeout), this.open ? (this.animate([
|
|
808
|
+
{ opacity: 0, transform: "translateX(-50%) scale(0.85)" },
|
|
809
|
+
{ opacity: 1, transform: "translateX(-50%) scale(1)" }
|
|
810
|
+
], {
|
|
811
|
+
duration: 150,
|
|
812
|
+
fill: "forwards",
|
|
813
|
+
easing: "ease"
|
|
814
|
+
}), this.timeout && clearTimeout(this.timeout), T.state.autoClose && (this.timeout = setTimeout(() => T.hide(), 2500))) : this.animate([
|
|
815
|
+
{ opacity: 1, transform: "translateX(-50%) scale(1)" },
|
|
816
|
+
{ opacity: 0, transform: "translateX(-50%) scale(0.85)" }
|
|
817
|
+
], {
|
|
818
|
+
duration: 150,
|
|
819
|
+
fill: "forwards",
|
|
820
|
+
easing: "ease"
|
|
821
|
+
});
|
|
822
|
+
}
|
|
823
|
+
};
|
|
824
|
+
X.styles = De;
|
|
825
|
+
pe([
|
|
826
|
+
d()
|
|
827
|
+
], X.prototype, "open", void 0);
|
|
828
|
+
X = pe([
|
|
829
|
+
u("w3m-snackbar")
|
|
830
|
+
], X);
|
|
831
|
+
const Le = v`
|
|
832
|
+
:host {
|
|
833
|
+
pointer-events: none;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
:host > wui-flex {
|
|
837
|
+
display: var(--w3m-tooltip-display);
|
|
838
|
+
opacity: var(--w3m-tooltip-opacity);
|
|
839
|
+
padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s);
|
|
840
|
+
border-radius: var(--wui-border-radius-xxs);
|
|
841
|
+
color: var(--wui-color-bg-100);
|
|
842
|
+
position: fixed;
|
|
843
|
+
top: var(--w3m-tooltip-top);
|
|
844
|
+
left: var(--w3m-tooltip-left);
|
|
845
|
+
transform: translate(calc(-50% + var(--w3m-tooltip-parent-width)), calc(-100% - 8px));
|
|
846
|
+
max-width: calc(var(--w3m-modal-width) - var(--wui-spacing-xl));
|
|
847
|
+
transition: opacity 0.2s var(--wui-ease-out-power-2);
|
|
848
|
+
will-change: opacity;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
:host([data-variant='shade']) > wui-flex {
|
|
852
|
+
background-color: var(--wui-color-bg-150);
|
|
853
|
+
border: 1px solid var(--wui-color-gray-glass-005);
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
:host([data-variant='shade']) > wui-flex > wui-text {
|
|
857
|
+
color: var(--wui-color-fg-150);
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
:host([data-variant='fill']) > wui-flex {
|
|
861
|
+
background-color: var(--wui-color-fg-100);
|
|
862
|
+
border: none;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
wui-icon {
|
|
866
|
+
position: absolute;
|
|
867
|
+
width: 12px !important;
|
|
868
|
+
height: 4px !important;
|
|
869
|
+
color: var(--wui-color-bg-150);
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
wui-icon[data-placement='top'] {
|
|
873
|
+
bottom: 0px;
|
|
874
|
+
left: 50%;
|
|
875
|
+
transform: translate(-50%, 95%);
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
wui-icon[data-placement='bottom'] {
|
|
879
|
+
top: 0;
|
|
880
|
+
left: 50%;
|
|
881
|
+
transform: translate(-50%, -95%) rotate(180deg);
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
wui-icon[data-placement='right'] {
|
|
885
|
+
top: 50%;
|
|
886
|
+
left: 0;
|
|
887
|
+
transform: translate(-65%, -50%) rotate(90deg);
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
wui-icon[data-placement='left'] {
|
|
891
|
+
top: 50%;
|
|
892
|
+
right: 0%;
|
|
893
|
+
transform: translate(65%, -50%) rotate(270deg);
|
|
894
|
+
}
|
|
895
|
+
`;
|
|
896
|
+
var D = function(s, e, t, o) {
|
|
897
|
+
var n = arguments.length, i = n < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, t) : o, r;
|
|
898
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(s, e, t, o);
|
|
899
|
+
else for (var c = s.length - 1; c >= 0; c--) (r = s[c]) && (i = (n < 3 ? r(i) : n > 3 ? r(e, t, i) : r(e, t)) || i);
|
|
900
|
+
return n > 3 && i && Object.defineProperty(e, t, i), i;
|
|
901
|
+
};
|
|
902
|
+
let $ = class extends f {
|
|
903
|
+
constructor() {
|
|
904
|
+
super(), this.unsubscribe = [], this.open = O.state.open, this.message = O.state.message, this.triggerRect = O.state.triggerRect, this.variant = O.state.variant, this.unsubscribe.push(O.subscribe((e) => {
|
|
905
|
+
this.open = e.open, this.message = e.message, this.triggerRect = e.triggerRect, this.variant = e.variant;
|
|
906
|
+
}));
|
|
907
|
+
}
|
|
908
|
+
disconnectedCallback() {
|
|
909
|
+
this.unsubscribe.forEach((e) => e());
|
|
910
|
+
}
|
|
911
|
+
render() {
|
|
912
|
+
this.dataset.variant = this.variant;
|
|
913
|
+
const e = this.triggerRect.top, t = this.triggerRect.left;
|
|
914
|
+
return this.style.cssText = `
|
|
915
|
+
--w3m-tooltip-top: ${e}px;
|
|
916
|
+
--w3m-tooltip-left: ${t}px;
|
|
917
|
+
--w3m-tooltip-parent-width: ${this.triggerRect.width / 2}px;
|
|
918
|
+
--w3m-tooltip-display: ${this.open ? "flex" : "none"};
|
|
919
|
+
--w3m-tooltip-opacity: ${this.open ? 1 : 0};
|
|
920
|
+
`, a`<wui-flex>
|
|
921
|
+
<wui-icon data-placement="top" color="fg-100" size="inherit" name="cursor"></wui-icon>
|
|
922
|
+
<wui-text color="inherit" variant="small-500">${this.message}</wui-text>
|
|
923
|
+
</wui-flex>`;
|
|
924
|
+
}
|
|
925
|
+
};
|
|
926
|
+
$.styles = [Le];
|
|
927
|
+
D([
|
|
928
|
+
d()
|
|
929
|
+
], $.prototype, "open", void 0);
|
|
930
|
+
D([
|
|
931
|
+
d()
|
|
932
|
+
], $.prototype, "message", void 0);
|
|
933
|
+
D([
|
|
934
|
+
d()
|
|
935
|
+
], $.prototype, "triggerRect", void 0);
|
|
936
|
+
D([
|
|
937
|
+
d()
|
|
938
|
+
], $.prototype, "variant", void 0);
|
|
939
|
+
$ = D([
|
|
940
|
+
u("w3m-tooltip"),
|
|
941
|
+
u("w3m-tooltip")
|
|
942
|
+
], $);
|
|
943
|
+
const Ue = v`
|
|
944
|
+
:host {
|
|
945
|
+
--prev-height: 0px;
|
|
946
|
+
--new-height: 0px;
|
|
947
|
+
display: block;
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
div.w3m-router-container {
|
|
951
|
+
transform: translateY(0);
|
|
952
|
+
opacity: 1;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
div.w3m-router-container[view-direction='prev'] {
|
|
956
|
+
animation:
|
|
957
|
+
slide-left-out 150ms forwards ease,
|
|
958
|
+
slide-left-in 150ms forwards ease;
|
|
959
|
+
animation-delay: 0ms, 200ms;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
div.w3m-router-container[view-direction='next'] {
|
|
963
|
+
animation:
|
|
964
|
+
slide-right-out 150ms forwards ease,
|
|
965
|
+
slide-right-in 150ms forwards ease;
|
|
966
|
+
animation-delay: 0ms, 200ms;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
@keyframes slide-left-out {
|
|
970
|
+
from {
|
|
971
|
+
transform: translateX(0px);
|
|
972
|
+
opacity: 1;
|
|
973
|
+
}
|
|
974
|
+
to {
|
|
975
|
+
transform: translateX(10px);
|
|
976
|
+
opacity: 0;
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
@keyframes slide-left-in {
|
|
981
|
+
from {
|
|
982
|
+
transform: translateX(-10px);
|
|
983
|
+
opacity: 0;
|
|
984
|
+
}
|
|
985
|
+
to {
|
|
986
|
+
transform: translateX(0);
|
|
987
|
+
opacity: 1;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
@keyframes slide-right-out {
|
|
992
|
+
from {
|
|
993
|
+
transform: translateX(0px);
|
|
994
|
+
opacity: 1;
|
|
995
|
+
}
|
|
996
|
+
to {
|
|
997
|
+
transform: translateX(-10px);
|
|
998
|
+
opacity: 0;
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
@keyframes slide-right-in {
|
|
1003
|
+
from {
|
|
1004
|
+
transform: translateX(10px);
|
|
1005
|
+
opacity: 0;
|
|
1006
|
+
}
|
|
1007
|
+
to {
|
|
1008
|
+
transform: translateX(0);
|
|
1009
|
+
opacity: 1;
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
`;
|
|
1013
|
+
var Q = function(s, e, t, o) {
|
|
1014
|
+
var n = arguments.length, i = n < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, t) : o, r;
|
|
1015
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(s, e, t, o);
|
|
1016
|
+
else for (var c = s.length - 1; c >= 0; c--) (r = s[c]) && (i = (n < 3 ? r(i) : n > 3 ? r(e, t, i) : r(e, t)) || i);
|
|
1017
|
+
return n > 3 && i && Object.defineProperty(e, t, i), i;
|
|
1018
|
+
};
|
|
1019
|
+
let I = class extends f {
|
|
1020
|
+
constructor() {
|
|
1021
|
+
super(), this.resizeObserver = void 0, this.prevHeight = "0px", this.prevHistoryLength = 1, this.unsubscribe = [], this.view = l.state.view, this.viewDirection = "", this.unsubscribe.push(l.subscribeKey("view", (e) => this.onViewChange(e)));
|
|
1022
|
+
}
|
|
1023
|
+
firstUpdated() {
|
|
1024
|
+
var e;
|
|
1025
|
+
this.resizeObserver = new ResizeObserver(([t]) => {
|
|
1026
|
+
const o = `${t == null ? void 0 : t.contentRect.height}px`;
|
|
1027
|
+
this.prevHeight !== "0px" && (this.style.setProperty("--prev-height", this.prevHeight), this.style.setProperty("--new-height", o), this.style.animation = "w3m-view-height 150ms forwards ease", this.style.height = "auto"), setTimeout(() => {
|
|
1028
|
+
this.prevHeight = o, this.style.animation = "unset";
|
|
1029
|
+
}, S.ANIMATION_DURATIONS.ModalHeight);
|
|
1030
|
+
}), (e = this.resizeObserver) == null || e.observe(this.getWrapper());
|
|
1031
|
+
}
|
|
1032
|
+
disconnectedCallback() {
|
|
1033
|
+
var e;
|
|
1034
|
+
(e = this.resizeObserver) == null || e.unobserve(this.getWrapper()), this.unsubscribe.forEach((t) => t());
|
|
1035
|
+
}
|
|
1036
|
+
render() {
|
|
1037
|
+
return a`<div class="w3m-router-container" view-direction="${this.viewDirection}">
|
|
1038
|
+
${this.viewTemplate()}
|
|
1039
|
+
</div>`;
|
|
1040
|
+
}
|
|
1041
|
+
viewTemplate() {
|
|
1042
|
+
switch (this.view) {
|
|
1043
|
+
case "AccountSettings":
|
|
1044
|
+
return a`<w3m-account-settings-view></w3m-account-settings-view>`;
|
|
1045
|
+
case "Account":
|
|
1046
|
+
return a`<w3m-account-view></w3m-account-view>`;
|
|
1047
|
+
case "AllWallets":
|
|
1048
|
+
return a`<w3m-all-wallets-view></w3m-all-wallets-view>`;
|
|
1049
|
+
case "ApproveTransaction":
|
|
1050
|
+
return a`<w3m-approve-transaction-view></w3m-approve-transaction-view>`;
|
|
1051
|
+
case "BuyInProgress":
|
|
1052
|
+
return a`<w3m-buy-in-progress-view></w3m-buy-in-progress-view>`;
|
|
1053
|
+
case "ChooseAccountName":
|
|
1054
|
+
return a`<w3m-choose-account-name-view></w3m-choose-account-name-view>`;
|
|
1055
|
+
case "Connect":
|
|
1056
|
+
return a`<w3m-connect-view></w3m-connect-view>`;
|
|
1057
|
+
case "Create":
|
|
1058
|
+
return a`<w3m-connect-view walletGuide="explore"></w3m-connect-view>`;
|
|
1059
|
+
case "ConnectingWalletConnect":
|
|
1060
|
+
return a`<w3m-connecting-wc-view></w3m-connecting-wc-view>`;
|
|
1061
|
+
case "ConnectingWalletConnectBasic":
|
|
1062
|
+
return a`<w3m-connecting-wc-basic-view></w3m-connecting-wc-basic-view>`;
|
|
1063
|
+
case "ConnectingExternal":
|
|
1064
|
+
return a`<w3m-connecting-external-view></w3m-connecting-external-view>`;
|
|
1065
|
+
case "ConnectingSiwe":
|
|
1066
|
+
return a`<w3m-connecting-siwe-view></w3m-connecting-siwe-view>`;
|
|
1067
|
+
case "ConnectWallets":
|
|
1068
|
+
return a`<w3m-connect-wallets-view></w3m-connect-wallets-view>`;
|
|
1069
|
+
case "ConnectSocials":
|
|
1070
|
+
return a`<w3m-connect-socials-view></w3m-connect-socials-view>`;
|
|
1071
|
+
case "ConnectingSocial":
|
|
1072
|
+
return a`<w3m-connecting-social-view></w3m-connecting-social-view>`;
|
|
1073
|
+
case "Downloads":
|
|
1074
|
+
return a`<w3m-downloads-view></w3m-downloads-view>`;
|
|
1075
|
+
case "EmailLogin":
|
|
1076
|
+
return a`<w3m-email-login-view></w3m-email-login-view>`;
|
|
1077
|
+
case "EmailVerifyOtp":
|
|
1078
|
+
return a`<w3m-email-verify-otp-view></w3m-email-verify-otp-view>`;
|
|
1079
|
+
case "EmailVerifyDevice":
|
|
1080
|
+
return a`<w3m-email-verify-device-view></w3m-email-verify-device-view>`;
|
|
1081
|
+
case "GetWallet":
|
|
1082
|
+
return a`<w3m-get-wallet-view></w3m-get-wallet-view>`;
|
|
1083
|
+
case "Networks":
|
|
1084
|
+
return a`<w3m-networks-view></w3m-networks-view>`;
|
|
1085
|
+
case "SwitchNetwork":
|
|
1086
|
+
return a`<w3m-network-switch-view></w3m-network-switch-view>`;
|
|
1087
|
+
case "Profile":
|
|
1088
|
+
return a`<w3m-profile-view></w3m-profile-view>`;
|
|
1089
|
+
case "SwitchAddress":
|
|
1090
|
+
return a`<w3m-switch-address-view></w3m-switch-address-view>`;
|
|
1091
|
+
case "Transactions":
|
|
1092
|
+
return a`<w3m-transactions-view></w3m-transactions-view>`;
|
|
1093
|
+
case "OnRampProviders":
|
|
1094
|
+
return a`<w3m-onramp-providers-view></w3m-onramp-providers-view>`;
|
|
1095
|
+
case "OnRampActivity":
|
|
1096
|
+
return a`<w3m-onramp-activity-view></w3m-onramp-activity-view>`;
|
|
1097
|
+
case "OnRampTokenSelect":
|
|
1098
|
+
return a`<w3m-onramp-token-select-view></w3m-onramp-token-select-view>`;
|
|
1099
|
+
case "OnRampFiatSelect":
|
|
1100
|
+
return a`<w3m-onramp-fiat-select-view></w3m-onramp-fiat-select-view>`;
|
|
1101
|
+
case "UpgradeEmailWallet":
|
|
1102
|
+
return a`<w3m-upgrade-wallet-view></w3m-upgrade-wallet-view>`;
|
|
1103
|
+
case "UpdateEmailWallet":
|
|
1104
|
+
return a`<w3m-update-email-wallet-view></w3m-update-email-wallet-view>`;
|
|
1105
|
+
case "UpdateEmailPrimaryOtp":
|
|
1106
|
+
return a`<w3m-update-email-primary-otp-view></w3m-update-email-primary-otp-view>`;
|
|
1107
|
+
case "UpdateEmailSecondaryOtp":
|
|
1108
|
+
return a`<w3m-update-email-secondary-otp-view></w3m-update-email-secondary-otp-view>`;
|
|
1109
|
+
case "UnsupportedChain":
|
|
1110
|
+
return a`<w3m-unsupported-chain-view></w3m-unsupported-chain-view>`;
|
|
1111
|
+
case "Swap":
|
|
1112
|
+
return a`<w3m-swap-view></w3m-swap-view>`;
|
|
1113
|
+
case "SwapSelectToken":
|
|
1114
|
+
return a`<w3m-swap-select-token-view></w3m-swap-select-token-view>`;
|
|
1115
|
+
case "SwapPreview":
|
|
1116
|
+
return a`<w3m-swap-preview-view></w3m-swap-preview-view>`;
|
|
1117
|
+
case "WalletSend":
|
|
1118
|
+
return a`<w3m-wallet-send-view></w3m-wallet-send-view>`;
|
|
1119
|
+
case "WalletSendSelectToken":
|
|
1120
|
+
return a`<w3m-wallet-send-select-token-view></w3m-wallet-send-select-token-view>`;
|
|
1121
|
+
case "WalletSendPreview":
|
|
1122
|
+
return a`<w3m-wallet-send-preview-view></w3m-wallet-send-preview-view>`;
|
|
1123
|
+
case "WhatIsABuy":
|
|
1124
|
+
return a`<w3m-what-is-a-buy-view></w3m-what-is-a-buy-view>`;
|
|
1125
|
+
case "WalletReceive":
|
|
1126
|
+
return a`<w3m-wallet-receive-view></w3m-wallet-receive-view>`;
|
|
1127
|
+
case "WalletCompatibleNetworks":
|
|
1128
|
+
return a`<w3m-wallet-compatible-networks-view></w3m-wallet-compatible-networks-view>`;
|
|
1129
|
+
case "WhatIsAWallet":
|
|
1130
|
+
return a`<w3m-what-is-a-wallet-view></w3m-what-is-a-wallet-view>`;
|
|
1131
|
+
case "ConnectingMultiChain":
|
|
1132
|
+
return a`<w3m-connecting-multi-chain-view></w3m-connecting-multi-chain-view>`;
|
|
1133
|
+
case "WhatIsANetwork":
|
|
1134
|
+
return a`<w3m-what-is-a-network-view></w3m-what-is-a-network-view>`;
|
|
1135
|
+
case "ConnectingFarcaster":
|
|
1136
|
+
return a`<w3m-connecting-farcaster-view></w3m-connecting-farcaster-view>`;
|
|
1137
|
+
case "SwitchActiveChain":
|
|
1138
|
+
return a`<w3m-switch-active-chain-view></w3m-switch-active-chain-view>`;
|
|
1139
|
+
case "RegisterAccountName":
|
|
1140
|
+
return a`<w3m-register-account-name-view></w3m-register-account-name-view>`;
|
|
1141
|
+
case "RegisterAccountNameSuccess":
|
|
1142
|
+
return a`<w3m-register-account-name-success-view></w3m-register-account-name-success-view>`;
|
|
1143
|
+
case "SmartSessionCreated":
|
|
1144
|
+
return a`<w3m-smart-session-created-view></w3m-smart-session-created-view>`;
|
|
1145
|
+
case "SmartSessionList":
|
|
1146
|
+
return a`<w3m-smart-session-list-view></w3m-smart-session-list-view>`;
|
|
1147
|
+
case "SIWXSignMessage":
|
|
1148
|
+
return a`<w3m-siwx-sign-message-view></w3m-siwx-sign-message-view>`;
|
|
1149
|
+
case "Pay":
|
|
1150
|
+
return a`<w3m-pay-view></w3m-pay-view>`;
|
|
1151
|
+
case "PayLoading":
|
|
1152
|
+
return a`<w3m-pay-loading-view></w3m-pay-loading-view>`;
|
|
1153
|
+
default:
|
|
1154
|
+
return a`<w3m-connect-view></w3m-connect-view>`;
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
onViewChange(e) {
|
|
1158
|
+
O.hide();
|
|
1159
|
+
let t = S.VIEW_DIRECTION.Next;
|
|
1160
|
+
const { history: o } = l.state;
|
|
1161
|
+
o.length < this.prevHistoryLength && (t = S.VIEW_DIRECTION.Prev), this.prevHistoryLength = o.length, this.viewDirection = t, setTimeout(() => {
|
|
1162
|
+
this.view = e;
|
|
1163
|
+
}, S.ANIMATION_DURATIONS.ViewTransition);
|
|
1164
|
+
}
|
|
1165
|
+
getWrapper() {
|
|
1166
|
+
var e;
|
|
1167
|
+
return (e = this.shadowRoot) == null ? void 0 : e.querySelector("div");
|
|
1168
|
+
}
|
|
1169
|
+
};
|
|
1170
|
+
I.styles = Ue;
|
|
1171
|
+
Q([
|
|
1172
|
+
d()
|
|
1173
|
+
], I.prototype, "view", void 0);
|
|
1174
|
+
Q([
|
|
1175
|
+
d()
|
|
1176
|
+
], I.prototype, "viewDirection", void 0);
|
|
1177
|
+
I = Q([
|
|
1178
|
+
u("w3m-router")
|
|
1179
|
+
], I);
|
|
1180
|
+
const ze = v`
|
|
1181
|
+
:host {
|
|
1182
|
+
z-index: var(--w3m-z-index);
|
|
1183
|
+
display: block;
|
|
1184
|
+
backface-visibility: hidden;
|
|
1185
|
+
will-change: opacity;
|
|
1186
|
+
position: fixed;
|
|
1187
|
+
top: 0;
|
|
1188
|
+
left: 0;
|
|
1189
|
+
right: 0;
|
|
1190
|
+
bottom: 0;
|
|
1191
|
+
pointer-events: none;
|
|
1192
|
+
opacity: 0;
|
|
1193
|
+
background-color: var(--wui-cover);
|
|
1194
|
+
transition: opacity 0.2s var(--wui-ease-out-power-2);
|
|
1195
|
+
will-change: opacity;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
:host(.open) {
|
|
1199
|
+
opacity: 1;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
:host(.appkit-modal) {
|
|
1203
|
+
position: relative;
|
|
1204
|
+
pointer-events: unset;
|
|
1205
|
+
background: none;
|
|
1206
|
+
width: 100%;
|
|
1207
|
+
opacity: 1;
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
wui-card {
|
|
1211
|
+
max-width: var(--w3m-modal-width);
|
|
1212
|
+
width: 100%;
|
|
1213
|
+
position: relative;
|
|
1214
|
+
animation: zoom-in 0.2s var(--wui-ease-out-power-2);
|
|
1215
|
+
animation-fill-mode: backwards;
|
|
1216
|
+
outline: none;
|
|
1217
|
+
transition:
|
|
1218
|
+
border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1),
|
|
1219
|
+
background-color var(--wui-duration-lg) var(--wui-ease-out-power-1);
|
|
1220
|
+
will-change: border-radius, background-color;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
:host(.appkit-modal) wui-card {
|
|
1224
|
+
max-width: 400px;
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
wui-card[shake='true'] {
|
|
1228
|
+
animation:
|
|
1229
|
+
zoom-in 0.2s var(--wui-ease-out-power-2),
|
|
1230
|
+
w3m-shake 0.5s var(--wui-ease-out-power-2);
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
wui-flex {
|
|
1234
|
+
overflow-x: hidden;
|
|
1235
|
+
overflow-y: auto;
|
|
1236
|
+
display: flex;
|
|
1237
|
+
align-items: center;
|
|
1238
|
+
justify-content: center;
|
|
1239
|
+
width: 100%;
|
|
1240
|
+
height: 100%;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
@media (max-height: 700px) and (min-width: 431px) {
|
|
1244
|
+
wui-flex {
|
|
1245
|
+
align-items: flex-start;
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
wui-card {
|
|
1249
|
+
margin: var(--wui-spacing-xxl) 0px;
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
@media (max-width: 430px) {
|
|
1254
|
+
wui-flex {
|
|
1255
|
+
align-items: flex-end;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
wui-card {
|
|
1259
|
+
max-width: 100%;
|
|
1260
|
+
border-bottom-left-radius: var(--local-border-bottom-mobile-radius);
|
|
1261
|
+
border-bottom-right-radius: var(--local-border-bottom-mobile-radius);
|
|
1262
|
+
border-bottom: none;
|
|
1263
|
+
animation: slide-in 0.2s var(--wui-ease-out-power-2);
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
wui-card[shake='true'] {
|
|
1267
|
+
animation:
|
|
1268
|
+
slide-in 0.2s var(--wui-ease-out-power-2),
|
|
1269
|
+
w3m-shake 0.5s var(--wui-ease-out-power-2);
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
@keyframes zoom-in {
|
|
1274
|
+
0% {
|
|
1275
|
+
transform: scale(0.95) translateY(0);
|
|
1276
|
+
}
|
|
1277
|
+
100% {
|
|
1278
|
+
transform: scale(1) translateY(0);
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
@keyframes slide-in {
|
|
1283
|
+
0% {
|
|
1284
|
+
transform: scale(1) translateY(50px);
|
|
1285
|
+
}
|
|
1286
|
+
100% {
|
|
1287
|
+
transform: scale(1) translateY(0);
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
@keyframes w3m-shake {
|
|
1292
|
+
0% {
|
|
1293
|
+
transform: scale(1) rotate(0deg);
|
|
1294
|
+
}
|
|
1295
|
+
20% {
|
|
1296
|
+
transform: scale(1) rotate(-1deg);
|
|
1297
|
+
}
|
|
1298
|
+
40% {
|
|
1299
|
+
transform: scale(1) rotate(1.5deg);
|
|
1300
|
+
}
|
|
1301
|
+
60% {
|
|
1302
|
+
transform: scale(1) rotate(-1.5deg);
|
|
1303
|
+
}
|
|
1304
|
+
80% {
|
|
1305
|
+
transform: scale(1) rotate(1deg);
|
|
1306
|
+
}
|
|
1307
|
+
100% {
|
|
1308
|
+
transform: scale(1) rotate(0deg);
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
@keyframes w3m-view-height {
|
|
1313
|
+
from {
|
|
1314
|
+
height: var(--prev-height);
|
|
1315
|
+
}
|
|
1316
|
+
to {
|
|
1317
|
+
height: var(--new-height);
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
`;
|
|
1321
|
+
var C = function(s, e, t, o) {
|
|
1322
|
+
var n = arguments.length, i = n < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, t) : o, r;
|
|
1323
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(s, e, t, o);
|
|
1324
|
+
else for (var c = s.length - 1; c >= 0; c--) (r = s[c]) && (i = (n < 3 ? r(i) : n > 3 ? r(e, t, i) : r(e, t)) || i);
|
|
1325
|
+
return n > 3 && i && Object.defineProperty(e, t, i), i;
|
|
1326
|
+
};
|
|
1327
|
+
const ae = "scroll-lock";
|
|
1328
|
+
class x extends f {
|
|
1329
|
+
constructor() {
|
|
1330
|
+
super(), this.unsubscribe = [], this.abortController = void 0, this.hasPrefetched = !1, this.enableEmbedded = E.state.enableEmbedded, this.open = g.state.open, this.caipAddress = m.state.activeCaipAddress, this.caipNetwork = m.state.activeCaipNetwork, this.shake = g.state.shake, this.filterByNamespace = q.state.filterByNamespace, this.initializeTheming(), H.prefetchAnalyticsConfig(), this.unsubscribe.push(g.subscribeKey("open", (e) => e ? this.onOpen() : this.onClose()), g.subscribeKey("shake", (e) => this.shake = e), m.subscribeKey("activeCaipNetwork", (e) => this.onNewNetwork(e)), m.subscribeKey("activeCaipAddress", (e) => this.onNewAddress(e)), E.subscribeKey("enableEmbedded", (e) => this.enableEmbedded = e), q.subscribeKey("filterByNamespace", (e) => {
|
|
1331
|
+
var t;
|
|
1332
|
+
this.filterByNamespace !== e && !((t = m.getAccountData(e)) != null && t.caipAddress) && (H.fetchRecommendedWallets(), this.filterByNamespace = e);
|
|
1333
|
+
}));
|
|
1334
|
+
}
|
|
1335
|
+
firstUpdated() {
|
|
1336
|
+
if (this.caipAddress) {
|
|
1337
|
+
if (this.enableEmbedded) {
|
|
1338
|
+
g.close(), this.prefetch();
|
|
1339
|
+
return;
|
|
1340
|
+
}
|
|
1341
|
+
this.onNewAddress(this.caipAddress);
|
|
1342
|
+
}
|
|
1343
|
+
this.open && this.onOpen(), this.enableEmbedded && this.prefetch();
|
|
1344
|
+
}
|
|
1345
|
+
disconnectedCallback() {
|
|
1346
|
+
this.unsubscribe.forEach((e) => e()), this.onRemoveKeyboardListener();
|
|
1347
|
+
}
|
|
1348
|
+
render() {
|
|
1349
|
+
return this.style.cssText = `
|
|
1350
|
+
--local-border-bottom-mobile-radius: ${this.enableEmbedded ? "clamp(0px, var(--wui-border-radius-l), 44px)" : "0px"};
|
|
1351
|
+
`, this.enableEmbedded ? a`${this.contentTemplate()}
|
|
1352
|
+
<w3m-tooltip></w3m-tooltip> ` : this.open ? a`
|
|
1353
|
+
<wui-flex @click=${this.onOverlayClick.bind(this)} data-testid="w3m-modal-overlay">
|
|
1354
|
+
${this.contentTemplate()}
|
|
1355
|
+
</wui-flex>
|
|
1356
|
+
<w3m-tooltip></w3m-tooltip>
|
|
1357
|
+
` : null;
|
|
1358
|
+
}
|
|
1359
|
+
contentTemplate() {
|
|
1360
|
+
return a` <wui-card
|
|
1361
|
+
shake="${this.shake}"
|
|
1362
|
+
data-embedded="${F(this.enableEmbedded)}"
|
|
1363
|
+
role="alertdialog"
|
|
1364
|
+
aria-modal="true"
|
|
1365
|
+
tabindex="0"
|
|
1366
|
+
data-testid="w3m-modal-card"
|
|
1367
|
+
>
|
|
1368
|
+
<w3m-header></w3m-header>
|
|
1369
|
+
<w3m-router></w3m-router>
|
|
1370
|
+
<w3m-snackbar></w3m-snackbar>
|
|
1371
|
+
<w3m-alertbar></w3m-alertbar>
|
|
1372
|
+
</wui-card>`;
|
|
1373
|
+
}
|
|
1374
|
+
async onOverlayClick(e) {
|
|
1375
|
+
e.target === e.currentTarget && await this.handleClose();
|
|
1376
|
+
}
|
|
1377
|
+
async handleClose() {
|
|
1378
|
+
await de.safeClose();
|
|
1379
|
+
}
|
|
1380
|
+
initializeTheming() {
|
|
1381
|
+
const { themeVariables: e, themeMode: t } = xe.state, o = We.getColorTheme(t);
|
|
1382
|
+
Ce(e, o);
|
|
1383
|
+
}
|
|
1384
|
+
onClose() {
|
|
1385
|
+
this.open = !1, this.classList.remove("open"), this.onScrollUnlock(), T.hide(), this.onRemoveKeyboardListener();
|
|
1386
|
+
}
|
|
1387
|
+
onOpen() {
|
|
1388
|
+
this.open = !0, this.classList.add("open"), this.onScrollLock(), this.onAddKeyboardListener();
|
|
1389
|
+
}
|
|
1390
|
+
onScrollLock() {
|
|
1391
|
+
const e = document.createElement("style");
|
|
1392
|
+
e.dataset.w3m = ae, e.textContent = `
|
|
1393
|
+
body {
|
|
1394
|
+
touch-action: none;
|
|
1395
|
+
overflow: hidden;
|
|
1396
|
+
overscroll-behavior: contain;
|
|
1397
|
+
}
|
|
1398
|
+
w3m-modal {
|
|
1399
|
+
pointer-events: auto;
|
|
1400
|
+
}
|
|
1401
|
+
`, document.head.appendChild(e);
|
|
1402
|
+
}
|
|
1403
|
+
onScrollUnlock() {
|
|
1404
|
+
const e = document.head.querySelector(`style[data-w3m="${ae}"]`);
|
|
1405
|
+
e && e.remove();
|
|
1406
|
+
}
|
|
1407
|
+
onAddKeyboardListener() {
|
|
1408
|
+
var t;
|
|
1409
|
+
this.abortController = new AbortController();
|
|
1410
|
+
const e = (t = this.shadowRoot) == null ? void 0 : t.querySelector("wui-card");
|
|
1411
|
+
e == null || e.focus(), window.addEventListener("keydown", (o) => {
|
|
1412
|
+
if (o.key === "Escape")
|
|
1413
|
+
this.handleClose();
|
|
1414
|
+
else if (o.key === "Tab") {
|
|
1415
|
+
const { tagName: n } = o.target;
|
|
1416
|
+
n && !n.includes("W3M-") && !n.includes("WUI-") && (e == null || e.focus());
|
|
1417
|
+
}
|
|
1418
|
+
}, this.abortController);
|
|
1419
|
+
}
|
|
1420
|
+
onRemoveKeyboardListener() {
|
|
1421
|
+
var e;
|
|
1422
|
+
(e = this.abortController) == null || e.abort(), this.abortController = void 0;
|
|
1423
|
+
}
|
|
1424
|
+
async onNewAddress(e) {
|
|
1425
|
+
const t = m.state.isSwitchingNamespace, o = ke.getPlainAddress(e);
|
|
1426
|
+
!o && !t ? g.close() : t && o && l.goBack(), await re.initializeIfEnabled(), this.caipAddress = e, m.setIsSwitchingNamespace(!1);
|
|
1427
|
+
}
|
|
1428
|
+
onNewNetwork(e) {
|
|
1429
|
+
var Z, ee, te;
|
|
1430
|
+
const t = this.caipNetwork, o = (Z = t == null ? void 0 : t.caipNetworkId) == null ? void 0 : Z.toString(), n = t == null ? void 0 : t.chainNamespace, i = (ee = e == null ? void 0 : e.caipNetworkId) == null ? void 0 : ee.toString(), r = e == null ? void 0 : e.chainNamespace, c = o !== i, k = c && !(n !== r), j = (t == null ? void 0 : t.name) === Se.UNSUPPORTED_NETWORK_NAME, L = l.state.view === "ConnectingExternal", U = !((te = m.getAccountData(e == null ? void 0 : e.chainNamespace)) != null && te.caipAddress), me = l.state.view === "UnsupportedChain", he = g.state.open;
|
|
1431
|
+
let z = !1;
|
|
1432
|
+
he && !L && (U ? c && (z = !0) : (me || k && !j) && (z = !0)), z && l.state.view !== "SIWXSignMessage" && l.goBack(), this.caipNetwork = e;
|
|
1433
|
+
}
|
|
1434
|
+
prefetch() {
|
|
1435
|
+
this.hasPrefetched || (H.prefetch(), H.fetchWalletsByPage({ page: 1 }), this.hasPrefetched = !0);
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
x.styles = ze;
|
|
1439
|
+
C([
|
|
1440
|
+
w({ type: Boolean })
|
|
1441
|
+
], x.prototype, "enableEmbedded", void 0);
|
|
1442
|
+
C([
|
|
1443
|
+
d()
|
|
1444
|
+
], x.prototype, "open", void 0);
|
|
1445
|
+
C([
|
|
1446
|
+
d()
|
|
1447
|
+
], x.prototype, "caipAddress", void 0);
|
|
1448
|
+
C([
|
|
1449
|
+
d()
|
|
1450
|
+
], x.prototype, "caipNetwork", void 0);
|
|
1451
|
+
C([
|
|
1452
|
+
d()
|
|
1453
|
+
], x.prototype, "shake", void 0);
|
|
1454
|
+
C([
|
|
1455
|
+
d()
|
|
1456
|
+
], x.prototype, "filterByNamespace", void 0);
|
|
1457
|
+
let ne = class extends x {
|
|
1458
|
+
};
|
|
1459
|
+
ne = C([
|
|
1460
|
+
u("w3m-modal")
|
|
1461
|
+
], ne);
|
|
1462
|
+
let se = class extends x {
|
|
1463
|
+
};
|
|
1464
|
+
se = C([
|
|
1465
|
+
u("appkit-modal")
|
|
1466
|
+
], se);
|
|
1467
|
+
export {
|
|
1468
|
+
se as AppKitModal,
|
|
1469
|
+
ne as W3mModal,
|
|
1470
|
+
x as W3mModalBase
|
|
1471
|
+
};
|