@prohetamine/redstone 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PhArrowCircleDown-BR-zH4LC.js +14 -0
- package/dist/PhArrowCircleDown-Sb38khBy.mjs +73 -0
- package/dist/PhArrowClockwise-BE5j9P0Z.mjs +73 -0
- package/dist/PhArrowClockwise-BRaehQGe.js +14 -0
- package/dist/PhArrowDown-B_WmmmY9.js +14 -0
- package/dist/PhArrowDown-CFEyR2dR.mjs +73 -0
- package/dist/PhArrowLeft-CYfU7NZj.mjs +73 -0
- package/dist/PhArrowLeft-CkEd70hm.js +14 -0
- package/dist/PhArrowRight-C07Qkx86.js +14 -0
- package/dist/PhArrowRight-EermNu0V.mjs +73 -0
- package/dist/PhArrowSquareOut-BjTBfzOP.js +14 -0
- package/dist/PhArrowSquareOut-DZwTtw54.mjs +73 -0
- package/dist/PhArrowUp-DB4CCSss.js +14 -0
- package/dist/PhArrowUp-xTpLFQkg.mjs +73 -0
- package/dist/PhArrowUpRight-CQbvn6NO.mjs +73 -0
- package/dist/PhArrowUpRight-GpCIMsAh.js +14 -0
- package/dist/PhArrowsClockwise-BgcIUg-Z.js +14 -0
- package/dist/PhArrowsClockwise-DnUYZTVx.mjs +73 -0
- package/dist/PhArrowsDownUp-C8KXUqtu.js +14 -0
- package/dist/PhArrowsDownUp-DgoprEe2.mjs +73 -0
- package/dist/PhArrowsLeftRight-CahChzCj.js +14 -0
- package/dist/PhArrowsLeftRight-FD4AZiLh.mjs +73 -0
- package/dist/PhBank-DIqIL4x_.js +14 -0
- package/dist/PhBank-DbQOQ9zJ.mjs +73 -0
- package/dist/PhBrowser-BCBXK2IM.mjs +73 -0
- package/dist/PhBrowser-laCKtn7T.js +14 -0
- package/dist/PhCaretDown-CnjP-QjZ.mjs +73 -0
- package/dist/PhCaretDown-DDe42xDU.js +14 -0
- package/dist/PhCaretLeft-Cskc5OY9.js +14 -0
- package/dist/PhCaretLeft-DkuXxjf_.mjs +73 -0
- package/dist/PhCaretRight-CBWpghxt.mjs +73 -0
- package/dist/PhCaretRight-DNgI5w_B.js +14 -0
- package/dist/PhCaretUp-CQ-OztBV.mjs +73 -0
- package/dist/PhCaretUp-CUZ4g_Me.js +14 -0
- package/dist/PhCheck-BVV_Dwfo.js +14 -0
- package/dist/PhCheck-t515emYS.mjs +73 -0
- package/dist/PhCircleHalf-BuQTmrKW.mjs +73 -0
- package/dist/PhCircleHalf-DDC7rige.js +14 -0
- package/dist/PhClock-BqynEKWl.js +14 -0
- package/dist/PhClock-D6XkTmM_.mjs +73 -0
- package/dist/PhCompass-2QeeX5Ad.mjs +73 -0
- package/dist/PhCompass-BsuJwXAE.js +14 -0
- package/dist/PhCopy-CO34-_xD.mjs +73 -0
- package/dist/PhCopy-MVqtRS6X.js +14 -0
- package/dist/PhCreditCard-Dq4kdjCw.js +14 -0
- package/dist/PhCreditCard-bfnqYflD.mjs +73 -0
- package/dist/PhCurrencyDollar-6k8UWxal.js +14 -0
- package/dist/PhCurrencyDollar-BekVYPtC.mjs +73 -0
- package/dist/PhDesktop-BkNzf3rT.mjs +73 -0
- package/dist/PhDesktop-CfsXQ0vC.js +14 -0
- package/dist/PhDeviceMobile-BT3Mg_b0.mjs +73 -0
- package/dist/PhDeviceMobile-BnrrDrwf.js +14 -0
- package/dist/PhDotsThree-6LRvhAcL.js +14 -0
- package/dist/PhDotsThree-kpf2OKxJ.mjs +73 -0
- package/dist/PhEnvelope-CHsfC2e0.js +14 -0
- package/dist/PhEnvelope-UFKpKtwf.mjs +73 -0
- package/dist/PhFunnelSimple-CdAqSIhK.mjs +73 -0
- package/dist/PhFunnelSimple-JAk7X9Wo.js +14 -0
- package/dist/PhGlobe-B3RYXl8h.mjs +73 -0
- package/dist/PhGlobe-Tfs4MfpG.js +14 -0
- package/dist/PhIdentificationCard-Dqmd6eY1.js +14 -0
- package/dist/PhIdentificationCard-rSq59Czm.mjs +73 -0
- package/dist/PhImage-aEryzfCi.js +14 -0
- package/dist/PhImage-ynsEnFd_.mjs +73 -0
- package/dist/PhInfo-B7lsWl6m.mjs +73 -0
- package/dist/PhInfo-D6oUrWpA.js +14 -0
- package/dist/PhLightbulb-FQDaMMqu.mjs +73 -0
- package/dist/PhLightbulb-qbEduhPa.js +14 -0
- package/dist/PhMagnifyingGlass-COdRH2k5.js +14 -0
- package/dist/PhMagnifyingGlass-_NXk13-0.mjs +73 -0
- package/dist/PhPaperPlaneRight-BYi7SorW.mjs +73 -0
- package/dist/PhPaperPlaneRight-DrpVAQOZ.js +14 -0
- package/dist/PhPlus-25KQTPHG.mjs +73 -0
- package/dist/PhPlus-BhUXef08.js +14 -0
- package/dist/PhPower-BKl7gzsB.mjs +73 -0
- package/dist/PhPower-BNJf1AGQ.js +14 -0
- package/dist/PhPuzzlePiece-BkZeF8CX.js +14 -0
- package/dist/PhPuzzlePiece-BqUI4GRs.mjs +73 -0
- package/dist/PhQrCode-C-tqZKPP.mjs +73 -0
- package/dist/PhQrCode-C0v0iXQN.js +14 -0
- package/dist/PhQuestion-BBAiRWgt.js +14 -0
- package/dist/PhQuestion-CtYvffyD.mjs +73 -0
- package/dist/PhQuestionMark-BNbtL2yx.mjs +73 -0
- package/dist/PhQuestionMark-BvGUBZ1h.js +14 -0
- package/dist/PhSealCheck-B0TEqWpq.mjs +73 -0
- package/dist/PhSealCheck-BwNkuF7G.js +14 -0
- package/dist/PhSignOut-C1rMSNaS.js +14 -0
- package/dist/PhSignOut-HX2_BVsD.mjs +73 -0
- package/dist/PhSpinner-CoDYLYOX.mjs +73 -0
- package/dist/PhSpinner-nmsGWDQl.js +14 -0
- package/dist/PhTrash-CALlKx3e.js +14 -0
- package/dist/PhTrash-DeQHS8ZP.mjs +73 -0
- package/dist/PhUser-CA0e5OPI.js +14 -0
- package/dist/PhUser-Cy5EY3vX.mjs +73 -0
- package/dist/PhVault-DdXjVOO9.mjs +73 -0
- package/dist/PhVault-DqxV75cz.js +14 -0
- package/dist/PhWallet-CeQrfGYc.mjs +73 -0
- package/dist/PhWallet-CyCuEs2U.js +14 -0
- package/dist/PhWarning-BKaHv_wT.mjs +73 -0
- package/dist/PhWarning-C7oj86bY.js +14 -0
- package/dist/PhWarningCircle-8MWw-QgE.mjs +73 -0
- package/dist/PhWarningCircle-CrNPXGj4.js +14 -0
- package/dist/PhX-9lsrXjyl.js +14 -0
- package/dist/PhX-DgXr_Fb0.mjs +73 -0
- package/dist/ReownAuthentication-Bfv31LzI.mjs +274 -0
- package/dist/ReownAuthentication-d8aYgGOq.js +5 -0
- package/dist/SwapController-4lzoYsYr.js +1 -0
- package/dist/SwapController-DjzUWRyQ.mjs +462 -0
- package/dist/ccip-CvwbEhki.js +1 -0
- package/dist/ccip-TuO68NeE.mjs +150 -0
- package/dist/data-capture-BwdjH2vc.mjs +489 -0
- package/dist/data-capture-xVUNZJ2T.js +242 -0
- package/dist/email-BCZObJCY.js +90 -0
- package/dist/email-m-wo60fN.mjs +338 -0
- package/dist/embedded-wallet-CGSri-4g.js +410 -0
- package/dist/embedded-wallet-DdZmv5qP.mjs +808 -0
- package/dist/features-BJ8kNaE8.js +1 -0
- package/dist/features-CJ34oImB.mjs +6 -0
- package/dist/index-4lfXeo30.js +132 -0
- package/dist/index-B6Mg114Z.mjs +69182 -0
- package/dist/index-BX7gAgT3.mjs +35 -0
- package/dist/index-BYQqNbCe.js +1 -0
- package/dist/index-BmdHwtJo.js +1 -0
- package/dist/index-BvUx3ULC.js +78 -0
- package/dist/index-CD-QGO70.mjs +196 -0
- package/dist/index-CJtXfdoM.mjs +29621 -0
- package/dist/index-CMzdgE-y.mjs +215 -0
- package/dist/index-CjZQCcwG.js +7203 -0
- package/dist/index-D7VuOaCI.js +19 -0
- package/dist/index-DV7SQwgn.mjs +2688 -0
- package/dist/index-DVf4BnNh.mjs +352 -0
- package/dist/index-DhN9vL4k.js +138 -0
- package/dist/index-DvllakY0.mjs +274 -0
- package/dist/index-Ho06VKh2.mjs +151 -0
- package/dist/index-a8mS2Eh1.js +1062 -0
- package/dist/index-aamBi9Tu.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.es.js +14 -0
- package/dist/onramp-DLlhSPQg.js +422 -0
- package/dist/onramp-k-EAEepC.mjs +842 -0
- package/dist/parseSignature-D1tZHglo.js +16 -0
- package/dist/parseSignature-DM0lwcDr.mjs +8883 -0
- package/dist/pay-with-exchange---G2M1Ag.js +280 -0
- package/dist/pay-with-exchange-CFIcUXUe.mjs +512 -0
- package/dist/property-Bd8U3_QP.mjs +618 -0
- package/dist/property-DissjCbZ.js +27 -0
- package/dist/receive-B9LCljO6.mjs +228 -0
- package/dist/receive-E8H6GDOX.js +131 -0
- package/dist/send-B-AooLph.js +554 -0
- package/dist/send-DZd_xhsd.mjs +1155 -0
- package/dist/socials-ChWFLEFe.mjs +611 -0
- package/dist/socials-YSUYSh8o.js +250 -0
- package/dist/swaps-DpR9W9Ld.js +1050 -0
- package/dist/swaps-Du7-Ui_V.mjs +1752 -0
- package/dist/transactions-DhsK5-QJ.mjs +35 -0
- package/dist/transactions-VPsz2OLe.js +16 -0
- package/dist/w3m-modal-DhomfjKU.js +891 -0
- package/dist/w3m-modal-KuYD-zqQ.mjs +1759 -0
- package/package.json +51 -0
- package/readme.md +1 -0
|
@@ -0,0 +1,1759 @@
|
|
|
1
|
+
import { cz as k, cS as le, c3 as c, c5 as pe, bR as v, bS as V, bV as f, bW as g, bX as d, bU as l, cu as $, ce as H, cv as u, bT as me, ca as w, bZ as B, cs as U, cO as fe, cE as F, c7 as K, cy as A, ci as M, c0 as we, c4 as E, cq as z, cL as oe, ct as be, b$ as ce, cT as ge, cU as ye } from "./index-B6Mg114Z.mjs";
|
|
2
|
+
import { P as D } from "./index-DV7SQwgn.mjs";
|
|
3
|
+
import { S as ve } from "./SwapController-DjzUWRyQ.mjs";
|
|
4
|
+
const de = {
|
|
5
|
+
isUnsupportedChainView() {
|
|
6
|
+
return c.state.view === "UnsupportedChain" || c.state.view === "SwitchNetwork" && c.state.history.includes("UnsupportedChain");
|
|
7
|
+
},
|
|
8
|
+
async safeClose() {
|
|
9
|
+
if (this.isUnsupportedChainView()) {
|
|
10
|
+
k.shake();
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (await le.isSIWXCloseDisabled()) {
|
|
14
|
+
k.shake();
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
(c.state.view === "DataCapture" || c.state.view === "DataCaptureOtpConfirm") && pe.disconnect(), k.close();
|
|
18
|
+
}
|
|
19
|
+
}, xe = v`
|
|
20
|
+
:host {
|
|
21
|
+
display: block;
|
|
22
|
+
border-radius: clamp(0px, ${({ borderRadius: e }) => e[8]}, 44px);
|
|
23
|
+
box-shadow: 0 0 0 1px ${({ tokens: e }) => e.theme.foregroundPrimary};
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
var ke = function(e, t, i, r) {
|
|
28
|
+
var a = arguments.length, o = a < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, i) : r, n;
|
|
29
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(e, t, i, r);
|
|
30
|
+
else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (o = (a < 3 ? n(o) : a > 3 ? n(t, i, o) : n(t, i)) || o);
|
|
31
|
+
return a > 3 && o && Object.defineProperty(t, i, o), o;
|
|
32
|
+
};
|
|
33
|
+
let X = class extends g {
|
|
34
|
+
render() {
|
|
35
|
+
return d`<slot></slot>`;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
X.styles = [V, xe];
|
|
39
|
+
X = ke([
|
|
40
|
+
f("wui-card")
|
|
41
|
+
], X);
|
|
42
|
+
const $e = v`
|
|
43
|
+
:host {
|
|
44
|
+
width: 100%;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:host > wui-flex {
|
|
48
|
+
width: 100%;
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
gap: ${({ spacing: e }) => e[2]};
|
|
53
|
+
padding: ${({ spacing: e }) => e[3]};
|
|
54
|
+
border-radius: ${({ borderRadius: e }) => e[6]};
|
|
55
|
+
border: 1px solid ${({ tokens: e }) => e.theme.borderPrimary};
|
|
56
|
+
box-sizing: border-box;
|
|
57
|
+
background-color: ${({ tokens: e }) => e.theme.foregroundPrimary};
|
|
58
|
+
box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.25);
|
|
59
|
+
color: ${({ tokens: e }) => e.theme.textPrimary};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:host > wui-flex[data-type='info'] {
|
|
63
|
+
.icon-box {
|
|
64
|
+
background-color: ${({ tokens: e }) => e.theme.foregroundSecondary};
|
|
65
|
+
|
|
66
|
+
wui-icon {
|
|
67
|
+
color: ${({ tokens: e }) => e.theme.iconDefault};
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
:host > wui-flex[data-type='success'] {
|
|
72
|
+
.icon-box {
|
|
73
|
+
background-color: ${({ tokens: e }) => e.core.backgroundSuccess};
|
|
74
|
+
|
|
75
|
+
wui-icon {
|
|
76
|
+
color: ${({ tokens: e }) => e.core.borderSuccess};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
:host > wui-flex[data-type='warning'] {
|
|
81
|
+
.icon-box {
|
|
82
|
+
background-color: ${({ tokens: e }) => e.core.backgroundWarning};
|
|
83
|
+
|
|
84
|
+
wui-icon {
|
|
85
|
+
color: ${({ tokens: e }) => e.core.borderWarning};
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
:host > wui-flex[data-type='error'] {
|
|
90
|
+
.icon-box {
|
|
91
|
+
background-color: ${({ tokens: e }) => e.core.backgroundError};
|
|
92
|
+
|
|
93
|
+
wui-icon {
|
|
94
|
+
color: ${({ tokens: e }) => e.core.borderError};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
wui-flex {
|
|
100
|
+
width: 100%;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
wui-text {
|
|
104
|
+
word-break: break-word;
|
|
105
|
+
flex: 1;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.close {
|
|
109
|
+
cursor: pointer;
|
|
110
|
+
color: ${({ tokens: e }) => e.theme.iconDefault};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.icon-box {
|
|
114
|
+
height: 40px;
|
|
115
|
+
width: 40px;
|
|
116
|
+
border-radius: ${({ borderRadius: e }) => e[2]};
|
|
117
|
+
background-color: var(--local-icon-bg-value);
|
|
118
|
+
}
|
|
119
|
+
`;
|
|
120
|
+
var G = function(e, t, i, r) {
|
|
121
|
+
var a = arguments.length, o = a < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, i) : r, n;
|
|
122
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(e, t, i, r);
|
|
123
|
+
else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (o = (a < 3 ? n(o) : a > 3 ? n(t, i, o) : n(t, i)) || o);
|
|
124
|
+
return a > 3 && o && Object.defineProperty(t, i, o), o;
|
|
125
|
+
};
|
|
126
|
+
const Ce = {
|
|
127
|
+
info: "info",
|
|
128
|
+
success: "checkmark",
|
|
129
|
+
warning: "warningCircle",
|
|
130
|
+
error: "warning"
|
|
131
|
+
};
|
|
132
|
+
let N = class extends g {
|
|
133
|
+
constructor() {
|
|
134
|
+
super(...arguments), this.message = "", this.type = "info";
|
|
135
|
+
}
|
|
136
|
+
render() {
|
|
137
|
+
return d`
|
|
138
|
+
<wui-flex
|
|
139
|
+
data-type=${$(this.type)}
|
|
140
|
+
flexDirection="row"
|
|
141
|
+
justifyContent="space-between"
|
|
142
|
+
alignItems="center"
|
|
143
|
+
gap="2"
|
|
144
|
+
>
|
|
145
|
+
<wui-flex columnGap="2" flexDirection="row" alignItems="center">
|
|
146
|
+
<wui-flex
|
|
147
|
+
flexDirection="row"
|
|
148
|
+
alignItems="center"
|
|
149
|
+
justifyContent="center"
|
|
150
|
+
class="icon-box"
|
|
151
|
+
>
|
|
152
|
+
<wui-icon color="inherit" size="md" name=${Ce[this.type]}></wui-icon>
|
|
153
|
+
</wui-flex>
|
|
154
|
+
<wui-text variant="md-medium" color="inherit" data-testid="wui-alertbar-text"
|
|
155
|
+
>${this.message}</wui-text
|
|
156
|
+
>
|
|
157
|
+
</wui-flex>
|
|
158
|
+
<wui-icon
|
|
159
|
+
class="close"
|
|
160
|
+
color="inherit"
|
|
161
|
+
size="sm"
|
|
162
|
+
name="close"
|
|
163
|
+
@click=${this.onClose}
|
|
164
|
+
></wui-icon>
|
|
165
|
+
</wui-flex>
|
|
166
|
+
`;
|
|
167
|
+
}
|
|
168
|
+
onClose() {
|
|
169
|
+
H.close();
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
N.styles = [V, $e];
|
|
173
|
+
G([
|
|
174
|
+
l()
|
|
175
|
+
], N.prototype, "message", void 0);
|
|
176
|
+
G([
|
|
177
|
+
l()
|
|
178
|
+
], N.prototype, "type", void 0);
|
|
179
|
+
N = G([
|
|
180
|
+
f("wui-alertbar")
|
|
181
|
+
], N);
|
|
182
|
+
const Se = v`
|
|
183
|
+
:host {
|
|
184
|
+
display: block;
|
|
185
|
+
position: absolute;
|
|
186
|
+
top: ${({ spacing: e }) => e[3]};
|
|
187
|
+
left: ${({ spacing: e }) => e[4]};
|
|
188
|
+
right: ${({ spacing: e }) => e[4]};
|
|
189
|
+
opacity: 0;
|
|
190
|
+
pointer-events: none;
|
|
191
|
+
}
|
|
192
|
+
`;
|
|
193
|
+
var ue = function(e, t, i, r) {
|
|
194
|
+
var a = arguments.length, o = a < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, i) : r, n;
|
|
195
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(e, t, i, r);
|
|
196
|
+
else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (o = (a < 3 ? n(o) : a > 3 ? n(t, i, o) : n(t, i)) || o);
|
|
197
|
+
return a > 3 && o && Object.defineProperty(t, i, o), o;
|
|
198
|
+
};
|
|
199
|
+
const We = {
|
|
200
|
+
info: {
|
|
201
|
+
backgroundColor: "fg-350",
|
|
202
|
+
iconColor: "fg-325",
|
|
203
|
+
icon: "info"
|
|
204
|
+
},
|
|
205
|
+
success: {
|
|
206
|
+
backgroundColor: "success-glass-reown-020",
|
|
207
|
+
iconColor: "success-125",
|
|
208
|
+
icon: "checkmark"
|
|
209
|
+
},
|
|
210
|
+
warning: {
|
|
211
|
+
backgroundColor: "warning-glass-reown-020",
|
|
212
|
+
iconColor: "warning-100",
|
|
213
|
+
icon: "warningCircle"
|
|
214
|
+
},
|
|
215
|
+
error: {
|
|
216
|
+
backgroundColor: "error-glass-reown-020",
|
|
217
|
+
iconColor: "error-125",
|
|
218
|
+
icon: "warning"
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
let j = class extends g {
|
|
222
|
+
constructor() {
|
|
223
|
+
super(), this.unsubscribe = [], this.open = H.state.open, this.onOpen(!0), this.unsubscribe.push(H.subscribeKey("open", (t) => {
|
|
224
|
+
this.open = t, this.onOpen(!1);
|
|
225
|
+
}));
|
|
226
|
+
}
|
|
227
|
+
disconnectedCallback() {
|
|
228
|
+
this.unsubscribe.forEach((t) => t());
|
|
229
|
+
}
|
|
230
|
+
render() {
|
|
231
|
+
const { message: t, variant: i } = H.state, r = We[i];
|
|
232
|
+
return d`
|
|
233
|
+
<wui-alertbar
|
|
234
|
+
message=${t}
|
|
235
|
+
backgroundColor=${r == null ? void 0 : r.backgroundColor}
|
|
236
|
+
iconColor=${r == null ? void 0 : r.iconColor}
|
|
237
|
+
icon=${r == null ? void 0 : r.icon}
|
|
238
|
+
type=${i}
|
|
239
|
+
></wui-alertbar>
|
|
240
|
+
`;
|
|
241
|
+
}
|
|
242
|
+
onOpen(t) {
|
|
243
|
+
this.open ? (this.animate([
|
|
244
|
+
{ opacity: 0, transform: "scale(0.85)" },
|
|
245
|
+
{ opacity: 1, transform: "scale(1)" }
|
|
246
|
+
], {
|
|
247
|
+
duration: 150,
|
|
248
|
+
fill: "forwards",
|
|
249
|
+
easing: "ease"
|
|
250
|
+
}), this.style.cssText = "pointer-events: auto") : t || (this.animate([
|
|
251
|
+
{ opacity: 1, transform: "scale(1)" },
|
|
252
|
+
{ opacity: 0, transform: "scale(0.85)" }
|
|
253
|
+
], {
|
|
254
|
+
duration: 150,
|
|
255
|
+
fill: "forwards",
|
|
256
|
+
easing: "ease"
|
|
257
|
+
}), this.style.cssText = "pointer-events: none");
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
j.styles = Se;
|
|
261
|
+
ue([
|
|
262
|
+
u()
|
|
263
|
+
], j.prototype, "open", void 0);
|
|
264
|
+
j = ue([
|
|
265
|
+
f("w3m-alertbar")
|
|
266
|
+
], j);
|
|
267
|
+
const Ie = v`
|
|
268
|
+
button {
|
|
269
|
+
display: block;
|
|
270
|
+
display: flex;
|
|
271
|
+
align-items: center;
|
|
272
|
+
padding: ${({ spacing: e }) => e[1]};
|
|
273
|
+
transition: background-color ${({ durations: e }) => e.lg}
|
|
274
|
+
${({ easings: e }) => e["ease-out-power-2"]};
|
|
275
|
+
will-change: background-color;
|
|
276
|
+
border-radius: ${({ borderRadius: e }) => e[32]};
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
wui-image {
|
|
280
|
+
border-radius: 100%;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
wui-text {
|
|
284
|
+
padding-left: ${({ spacing: e }) => e[1]};
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.left-icon-container,
|
|
288
|
+
.right-icon-container {
|
|
289
|
+
width: 24px;
|
|
290
|
+
height: 24px;
|
|
291
|
+
justify-content: center;
|
|
292
|
+
align-items: center;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
wui-icon {
|
|
296
|
+
color: ${({ tokens: e }) => e.theme.iconDefault};
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/* -- Sizes --------------------------------------------------- */
|
|
300
|
+
button[data-size='lg'] {
|
|
301
|
+
height: 32px;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
button[data-size='md'] {
|
|
305
|
+
height: 28px;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
button[data-size='sm'] {
|
|
309
|
+
height: 24px;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
button[data-size='lg'] wui-image {
|
|
313
|
+
width: 24px;
|
|
314
|
+
height: 24px;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
button[data-size='md'] wui-image {
|
|
318
|
+
width: 20px;
|
|
319
|
+
height: 20px;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
button[data-size='sm'] wui-image {
|
|
323
|
+
width: 16px;
|
|
324
|
+
height: 16px;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
button[data-size='lg'] .left-icon-container {
|
|
328
|
+
width: 24px;
|
|
329
|
+
height: 24px;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
button[data-size='md'] .left-icon-container {
|
|
333
|
+
width: 20px;
|
|
334
|
+
height: 20px;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
button[data-size='sm'] .left-icon-container {
|
|
338
|
+
width: 16px;
|
|
339
|
+
height: 16px;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/* -- Variants --------------------------------------------------------- */
|
|
343
|
+
button[data-type='filled-dropdown'] {
|
|
344
|
+
background-color: ${({ tokens: e }) => e.theme.foregroundPrimary};
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
button[data-type='text-dropdown'] {
|
|
348
|
+
background-color: transparent;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/* -- Focus states --------------------------------------------------- */
|
|
352
|
+
button:focus-visible:enabled {
|
|
353
|
+
background-color: ${({ tokens: e }) => e.theme.foregroundSecondary};
|
|
354
|
+
box-shadow: 0 0 0 4px ${({ tokens: e }) => e.core.foregroundAccent040};
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/* -- Hover & Active states ----------------------------------------------------------- */
|
|
358
|
+
@media (hover: hover) and (pointer: fine) {
|
|
359
|
+
button:hover:enabled,
|
|
360
|
+
button:active:enabled {
|
|
361
|
+
background-color: ${({ tokens: e }) => e.theme.foregroundSecondary};
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/* -- Disabled states --------------------------------------------------- */
|
|
366
|
+
button:disabled {
|
|
367
|
+
background-color: ${({ tokens: e }) => e.theme.foregroundSecondary};
|
|
368
|
+
opacity: 0.5;
|
|
369
|
+
}
|
|
370
|
+
`;
|
|
371
|
+
var O = function(e, t, i, r) {
|
|
372
|
+
var a = arguments.length, o = a < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, i) : r, n;
|
|
373
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(e, t, i, r);
|
|
374
|
+
else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (o = (a < 3 ? n(o) : a > 3 ? n(t, i, o) : n(t, i)) || o);
|
|
375
|
+
return a > 3 && o && Object.defineProperty(t, i, o), o;
|
|
376
|
+
};
|
|
377
|
+
const Re = {
|
|
378
|
+
lg: "lg-regular",
|
|
379
|
+
md: "md-regular",
|
|
380
|
+
sm: "sm-regular"
|
|
381
|
+
}, Ae = {
|
|
382
|
+
lg: "lg",
|
|
383
|
+
md: "md",
|
|
384
|
+
sm: "sm"
|
|
385
|
+
};
|
|
386
|
+
let I = class extends g {
|
|
387
|
+
constructor() {
|
|
388
|
+
super(...arguments), this.imageSrc = "", this.text = "", this.size = "lg", this.type = "text-dropdown", this.disabled = !1;
|
|
389
|
+
}
|
|
390
|
+
render() {
|
|
391
|
+
return d`<button ?disabled=${this.disabled} data-size=${this.size} data-type=${this.type}>
|
|
392
|
+
${this.imageTemplate()} ${this.textTemplate()}
|
|
393
|
+
<wui-flex class="right-icon-container">
|
|
394
|
+
<wui-icon name="chevronBottom"></wui-icon>
|
|
395
|
+
</wui-flex>
|
|
396
|
+
</button>`;
|
|
397
|
+
}
|
|
398
|
+
textTemplate() {
|
|
399
|
+
const t = Re[this.size];
|
|
400
|
+
return this.text ? d`<wui-text color="primary" variant=${t}>${this.text}</wui-text>` : null;
|
|
401
|
+
}
|
|
402
|
+
imageTemplate() {
|
|
403
|
+
if (this.imageSrc)
|
|
404
|
+
return d`<wui-image src=${this.imageSrc} alt="select visual"></wui-image>`;
|
|
405
|
+
const t = Ae[this.size];
|
|
406
|
+
return d` <wui-flex class="left-icon-container">
|
|
407
|
+
<wui-icon size=${t} name="networkPlaceholder"></wui-icon>
|
|
408
|
+
</wui-flex>`;
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
I.styles = [V, me, Ie];
|
|
412
|
+
O([
|
|
413
|
+
l()
|
|
414
|
+
], I.prototype, "imageSrc", void 0);
|
|
415
|
+
O([
|
|
416
|
+
l()
|
|
417
|
+
], I.prototype, "text", void 0);
|
|
418
|
+
O([
|
|
419
|
+
l()
|
|
420
|
+
], I.prototype, "size", void 0);
|
|
421
|
+
O([
|
|
422
|
+
l()
|
|
423
|
+
], I.prototype, "type", void 0);
|
|
424
|
+
O([
|
|
425
|
+
l({ type: Boolean })
|
|
426
|
+
], I.prototype, "disabled", void 0);
|
|
427
|
+
I = O([
|
|
428
|
+
f("wui-select")
|
|
429
|
+
], I);
|
|
430
|
+
const Ee = v`
|
|
431
|
+
wui-image {
|
|
432
|
+
border-radius: ${({ borderRadius: e }) => e.round};
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.transfers-badge {
|
|
436
|
+
background-color: ${({ tokens: e }) => e.theme.foregroundPrimary};
|
|
437
|
+
border: 1px solid ${({ tokens: e }) => e.theme.foregroundSecondary};
|
|
438
|
+
border-radius: ${({ borderRadius: e }) => e[4]};
|
|
439
|
+
}
|
|
440
|
+
`;
|
|
441
|
+
var q = function(e, t, i, r) {
|
|
442
|
+
var a = arguments.length, o = a < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, i) : r, n;
|
|
443
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(e, t, i, r);
|
|
444
|
+
else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (o = (a < 3 ? n(o) : a > 3 ? n(t, i, o) : n(t, i)) || o);
|
|
445
|
+
return a > 3 && o && Object.defineProperty(t, i, o), o;
|
|
446
|
+
};
|
|
447
|
+
let T = class extends g {
|
|
448
|
+
constructor() {
|
|
449
|
+
super(), this.unsubscribe = [], this.paymentAsset = D.state.paymentAsset, this.amount = D.state.amount, this.unsubscribe.push(D.subscribeKey("paymentAsset", (t) => {
|
|
450
|
+
this.paymentAsset = t;
|
|
451
|
+
}), D.subscribeKey("amount", (t) => {
|
|
452
|
+
this.amount = t;
|
|
453
|
+
}));
|
|
454
|
+
}
|
|
455
|
+
disconnectedCallback() {
|
|
456
|
+
this.unsubscribe.forEach((t) => t());
|
|
457
|
+
}
|
|
458
|
+
render() {
|
|
459
|
+
const i = w.getAllRequestedCaipNetworks().find((r) => r.caipNetworkId === this.paymentAsset.network);
|
|
460
|
+
return d`<wui-flex
|
|
461
|
+
alignItems="center"
|
|
462
|
+
gap="1"
|
|
463
|
+
.padding=${["1", "2", "1", "1"]}
|
|
464
|
+
class="transfers-badge"
|
|
465
|
+
>
|
|
466
|
+
<wui-image src=${$(this.paymentAsset.metadata.logoURI)} size="xl"></wui-image>
|
|
467
|
+
<wui-text variant="lg-regular" color="primary">
|
|
468
|
+
${this.amount} ${this.paymentAsset.metadata.symbol}
|
|
469
|
+
</wui-text>
|
|
470
|
+
<wui-text variant="sm-regular" color="secondary">
|
|
471
|
+
on ${(i == null ? void 0 : i.name) ?? "Unknown"}
|
|
472
|
+
</wui-text>
|
|
473
|
+
</wui-flex>`;
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
T.styles = [Ee];
|
|
477
|
+
q([
|
|
478
|
+
l()
|
|
479
|
+
], T.prototype, "paymentAsset", void 0);
|
|
480
|
+
q([
|
|
481
|
+
l()
|
|
482
|
+
], T.prototype, "amount", void 0);
|
|
483
|
+
T = q([
|
|
484
|
+
f("w3m-pay-header")
|
|
485
|
+
], T);
|
|
486
|
+
const Oe = v`
|
|
487
|
+
:host {
|
|
488
|
+
height: 60px;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
:host > wui-flex {
|
|
492
|
+
box-sizing: border-box;
|
|
493
|
+
background-color: var(--local-header-background-color);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
wui-text {
|
|
497
|
+
background-color: var(--local-header-background-color);
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
wui-flex.w3m-header-title {
|
|
501
|
+
transform: translateY(0);
|
|
502
|
+
opacity: 1;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
wui-flex.w3m-header-title[view-direction='prev'] {
|
|
506
|
+
animation:
|
|
507
|
+
slide-down-out 120ms forwards ${({ easings: e }) => e["ease-out-power-2"]},
|
|
508
|
+
slide-down-in 120ms forwards ${({ easings: e }) => e["ease-out-power-2"]};
|
|
509
|
+
animation-delay: 0ms, 200ms;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
wui-flex.w3m-header-title[view-direction='next'] {
|
|
513
|
+
animation:
|
|
514
|
+
slide-up-out 120ms forwards ${({ easings: e }) => e["ease-out-power-2"]},
|
|
515
|
+
slide-up-in 120ms forwards ${({ easings: e }) => e["ease-out-power-2"]};
|
|
516
|
+
animation-delay: 0ms, 200ms;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
wui-icon-button[data-hidden='true'] {
|
|
520
|
+
opacity: 0 !important;
|
|
521
|
+
pointer-events: none;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
@keyframes slide-up-out {
|
|
525
|
+
from {
|
|
526
|
+
transform: translateY(0px);
|
|
527
|
+
opacity: 1;
|
|
528
|
+
}
|
|
529
|
+
to {
|
|
530
|
+
transform: translateY(3px);
|
|
531
|
+
opacity: 0;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
@keyframes slide-up-in {
|
|
536
|
+
from {
|
|
537
|
+
transform: translateY(-3px);
|
|
538
|
+
opacity: 0;
|
|
539
|
+
}
|
|
540
|
+
to {
|
|
541
|
+
transform: translateY(0);
|
|
542
|
+
opacity: 1;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
@keyframes slide-down-out {
|
|
547
|
+
from {
|
|
548
|
+
transform: translateY(0px);
|
|
549
|
+
opacity: 1;
|
|
550
|
+
}
|
|
551
|
+
to {
|
|
552
|
+
transform: translateY(-3px);
|
|
553
|
+
opacity: 0;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
@keyframes slide-down-in {
|
|
558
|
+
from {
|
|
559
|
+
transform: translateY(3px);
|
|
560
|
+
opacity: 0;
|
|
561
|
+
}
|
|
562
|
+
to {
|
|
563
|
+
transform: translateY(0);
|
|
564
|
+
opacity: 1;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
`;
|
|
568
|
+
var R = function(e, t, i, r) {
|
|
569
|
+
var a = arguments.length, o = a < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, i) : r, n;
|
|
570
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(e, t, i, r);
|
|
571
|
+
else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (o = (a < 3 ? n(o) : a > 3 ? n(t, i, o) : n(t, i)) || o);
|
|
572
|
+
return a > 3 && o && Object.defineProperty(t, i, o), o;
|
|
573
|
+
};
|
|
574
|
+
const Pe = ["SmartSessionList"], Ne = {
|
|
575
|
+
PayWithExchange: B.tokens.theme.foregroundPrimary
|
|
576
|
+
};
|
|
577
|
+
function re() {
|
|
578
|
+
var m, y, P, Z, J, ee, te, ie;
|
|
579
|
+
const e = (y = (m = c.state.data) == null ? void 0 : m.connector) == null ? void 0 : y.name, t = (Z = (P = c.state.data) == null ? void 0 : P.wallet) == null ? void 0 : Z.name, i = (ee = (J = c.state.data) == null ? void 0 : J.network) == null ? void 0 : ee.name, r = t ?? e, a = M.getConnectors(), o = a.length === 1 && ((te = a[0]) == null ? void 0 : te.id) === "w3m-email", n = (ie = w.getAccountData()) == null ? void 0 : ie.socialProvider, s = n ? n.charAt(0).toUpperCase() + n.slice(1) : "Connect Social";
|
|
580
|
+
return {
|
|
581
|
+
Connect: `Connect ${o ? "Email" : ""} Wallet`,
|
|
582
|
+
Create: "Create Wallet",
|
|
583
|
+
ChooseAccountName: void 0,
|
|
584
|
+
Account: void 0,
|
|
585
|
+
AccountSettings: void 0,
|
|
586
|
+
AllWallets: "All Wallets",
|
|
587
|
+
ApproveTransaction: "Approve Transaction",
|
|
588
|
+
BuyInProgress: "Buy",
|
|
589
|
+
UsageExceeded: "Usage Exceeded",
|
|
590
|
+
ConnectingExternal: r ?? "Connect Wallet",
|
|
591
|
+
ConnectingWalletConnect: r ?? "WalletConnect",
|
|
592
|
+
ConnectingWalletConnectBasic: "WalletConnect",
|
|
593
|
+
ConnectingSiwe: "Sign In",
|
|
594
|
+
Convert: "Convert",
|
|
595
|
+
ConvertSelectToken: "Select token",
|
|
596
|
+
ConvertPreview: "Preview Convert",
|
|
597
|
+
Downloads: r ? `Get ${r}` : "Downloads",
|
|
598
|
+
EmailLogin: "Email Login",
|
|
599
|
+
EmailVerifyOtp: "Confirm Email",
|
|
600
|
+
EmailVerifyDevice: "Register Device",
|
|
601
|
+
GetWallet: "Get a Wallet",
|
|
602
|
+
Networks: "Choose Network",
|
|
603
|
+
OnRampProviders: "Choose Provider",
|
|
604
|
+
OnRampActivity: "Activity",
|
|
605
|
+
OnRampTokenSelect: "Select Token",
|
|
606
|
+
OnRampFiatSelect: "Select Currency",
|
|
607
|
+
Pay: "How you pay",
|
|
608
|
+
ProfileWallets: "Wallets",
|
|
609
|
+
SwitchNetwork: i ?? "Switch Network",
|
|
610
|
+
Transactions: "Activity",
|
|
611
|
+
UnsupportedChain: "Switch Network",
|
|
612
|
+
UpgradeEmailWallet: "Upgrade Your Wallet",
|
|
613
|
+
UpdateEmailWallet: "Edit Email",
|
|
614
|
+
UpdateEmailPrimaryOtp: "Confirm Current Email",
|
|
615
|
+
UpdateEmailSecondaryOtp: "Confirm New Email",
|
|
616
|
+
WhatIsABuy: "What is Buy?",
|
|
617
|
+
RegisterAccountName: "Choose Name",
|
|
618
|
+
RegisterAccountNameSuccess: "",
|
|
619
|
+
WalletReceive: "Receive",
|
|
620
|
+
WalletCompatibleNetworks: "Compatible Networks",
|
|
621
|
+
Swap: "Swap",
|
|
622
|
+
SwapSelectToken: "Select Token",
|
|
623
|
+
SwapPreview: "Preview Swap",
|
|
624
|
+
WalletSend: "Send",
|
|
625
|
+
WalletSendPreview: "Review Send",
|
|
626
|
+
WalletSendSelectToken: "Select Token",
|
|
627
|
+
WalletSendConfirmed: "Confirmed",
|
|
628
|
+
WhatIsANetwork: "What is a network?",
|
|
629
|
+
WhatIsAWallet: "What is a Wallet?",
|
|
630
|
+
ConnectWallets: "Connect Wallet",
|
|
631
|
+
ConnectSocials: "All Socials",
|
|
632
|
+
ConnectingSocial: s,
|
|
633
|
+
ConnectingMultiChain: "Select Chain",
|
|
634
|
+
ConnectingFarcaster: "Farcaster",
|
|
635
|
+
SwitchActiveChain: "Switch Chain",
|
|
636
|
+
SmartSessionCreated: void 0,
|
|
637
|
+
SmartSessionList: "Smart Sessions",
|
|
638
|
+
SIWXSignMessage: "Sign In",
|
|
639
|
+
PayLoading: "Processing payment...",
|
|
640
|
+
PayQuote: "Payment Quote",
|
|
641
|
+
DataCapture: "Profile",
|
|
642
|
+
DataCaptureOtpConfirm: "Confirm Email",
|
|
643
|
+
FundWallet: "Fund Wallet",
|
|
644
|
+
PayWithExchange: "Deposit from Exchange",
|
|
645
|
+
PayWithExchangeSelectAsset: "Select Asset",
|
|
646
|
+
SmartAccountSettings: "Smart Account Settings"
|
|
647
|
+
};
|
|
648
|
+
}
|
|
649
|
+
let C = class extends g {
|
|
650
|
+
constructor() {
|
|
651
|
+
super(), this.unsubscribe = [], this.heading = re()[c.state.view], this.network = w.state.activeCaipNetwork, this.networkImage = U.getNetworkImage(this.network), this.showBack = !1, this.prevHistoryLength = 1, this.view = c.state.view, this.viewDirection = "", this.unsubscribe.push(fe.subscribeNetworkImages(() => {
|
|
652
|
+
this.networkImage = U.getNetworkImage(this.network);
|
|
653
|
+
}), c.subscribeKey("view", (t) => {
|
|
654
|
+
setTimeout(() => {
|
|
655
|
+
this.view = t, this.heading = re()[t];
|
|
656
|
+
}, F.ANIMATION_DURATIONS.HeaderText), this.onViewChange(), this.onHistoryChange();
|
|
657
|
+
}), w.subscribeKey("activeCaipNetwork", (t) => {
|
|
658
|
+
this.network = t, this.networkImage = U.getNetworkImage(this.network);
|
|
659
|
+
}));
|
|
660
|
+
}
|
|
661
|
+
disconnectCallback() {
|
|
662
|
+
this.unsubscribe.forEach((t) => t());
|
|
663
|
+
}
|
|
664
|
+
render() {
|
|
665
|
+
const t = Ne[c.state.view] ?? B.tokens.theme.backgroundPrimary;
|
|
666
|
+
return this.style.setProperty("--local-header-background-color", t), d`
|
|
667
|
+
<wui-flex
|
|
668
|
+
.padding=${["0", "4", "0", "4"]}
|
|
669
|
+
justifyContent="space-between"
|
|
670
|
+
alignItems="center"
|
|
671
|
+
>
|
|
672
|
+
${this.leftHeaderTemplate()} ${this.titleTemplate()} ${this.rightHeaderTemplate()}
|
|
673
|
+
</wui-flex>
|
|
674
|
+
`;
|
|
675
|
+
}
|
|
676
|
+
onWalletHelp() {
|
|
677
|
+
K.sendEvent({ type: "track", event: "CLICK_WALLET_HELP" }), c.push("WhatIsAWallet");
|
|
678
|
+
}
|
|
679
|
+
async onClose() {
|
|
680
|
+
await de.safeClose();
|
|
681
|
+
}
|
|
682
|
+
rightHeaderTemplate() {
|
|
683
|
+
var i, r, a;
|
|
684
|
+
const t = (a = (r = (i = A) == null ? void 0 : i.state) == null ? void 0 : r.features) == null ? void 0 : a.smartSessions;
|
|
685
|
+
return c.state.view !== "Account" || !t ? this.closeButtonTemplate() : d`<wui-flex>
|
|
686
|
+
<wui-icon-button
|
|
687
|
+
icon="clock"
|
|
688
|
+
size="lg"
|
|
689
|
+
iconSize="lg"
|
|
690
|
+
type="neutral"
|
|
691
|
+
variant="primary"
|
|
692
|
+
@click=${() => c.push("SmartSessionList")}
|
|
693
|
+
data-testid="w3m-header-smart-sessions"
|
|
694
|
+
></wui-icon-button>
|
|
695
|
+
${this.closeButtonTemplate()}
|
|
696
|
+
</wui-flex> `;
|
|
697
|
+
}
|
|
698
|
+
closeButtonTemplate() {
|
|
699
|
+
return d`
|
|
700
|
+
<wui-icon-button
|
|
701
|
+
icon="close"
|
|
702
|
+
size="lg"
|
|
703
|
+
type="neutral"
|
|
704
|
+
variant="primary"
|
|
705
|
+
iconSize="lg"
|
|
706
|
+
@click=${this.onClose.bind(this)}
|
|
707
|
+
data-testid="w3m-header-close"
|
|
708
|
+
></wui-icon-button>
|
|
709
|
+
`;
|
|
710
|
+
}
|
|
711
|
+
titleTemplate() {
|
|
712
|
+
if (this.view === "PayQuote")
|
|
713
|
+
return d`<w3m-pay-header></w3m-pay-header>`;
|
|
714
|
+
const t = Pe.includes(this.view);
|
|
715
|
+
return d`
|
|
716
|
+
<wui-flex
|
|
717
|
+
view-direction="${this.viewDirection}"
|
|
718
|
+
class="w3m-header-title"
|
|
719
|
+
alignItems="center"
|
|
720
|
+
gap="2"
|
|
721
|
+
>
|
|
722
|
+
<wui-text
|
|
723
|
+
display="inline"
|
|
724
|
+
variant="lg-regular"
|
|
725
|
+
color="primary"
|
|
726
|
+
data-testid="w3m-header-text"
|
|
727
|
+
>
|
|
728
|
+
${this.heading}
|
|
729
|
+
</wui-text>
|
|
730
|
+
${t ? d`<wui-tag variant="accent" size="md">Beta</wui-tag>` : null}
|
|
731
|
+
</wui-flex>
|
|
732
|
+
`;
|
|
733
|
+
}
|
|
734
|
+
leftHeaderTemplate() {
|
|
735
|
+
var y;
|
|
736
|
+
const { view: t } = c.state, i = t === "Connect", r = A.state.enableEmbedded, a = t === "ApproveTransaction", o = t === "ConnectingSiwe", n = t === "Account", s = A.state.enableNetworkSwitch, m = a || o || i && r;
|
|
737
|
+
return n && s ? d`<wui-select
|
|
738
|
+
id="dynamic"
|
|
739
|
+
data-testid="w3m-account-select-network"
|
|
740
|
+
active-network=${$((y = this.network) == null ? void 0 : y.name)}
|
|
741
|
+
@click=${this.onNetworks.bind(this)}
|
|
742
|
+
imageSrc=${$(this.networkImage)}
|
|
743
|
+
></wui-select>` : this.showBack && !m ? d`<wui-icon-button
|
|
744
|
+
data-testid="header-back"
|
|
745
|
+
id="dynamic"
|
|
746
|
+
icon="chevronLeft"
|
|
747
|
+
size="lg"
|
|
748
|
+
iconSize="lg"
|
|
749
|
+
type="neutral"
|
|
750
|
+
variant="primary"
|
|
751
|
+
@click=${this.onGoBack.bind(this)}
|
|
752
|
+
></wui-icon-button>` : d`<wui-icon-button
|
|
753
|
+
data-hidden=${!i}
|
|
754
|
+
id="dynamic"
|
|
755
|
+
icon="helpCircle"
|
|
756
|
+
size="lg"
|
|
757
|
+
iconSize="lg"
|
|
758
|
+
type="neutral"
|
|
759
|
+
variant="primary"
|
|
760
|
+
@click=${this.onWalletHelp.bind(this)}
|
|
761
|
+
></wui-icon-button>`;
|
|
762
|
+
}
|
|
763
|
+
onNetworks() {
|
|
764
|
+
this.isAllowedNetworkSwitch() && (K.sendEvent({ type: "track", event: "CLICK_NETWORKS" }), c.push("Networks"));
|
|
765
|
+
}
|
|
766
|
+
isAllowedNetworkSwitch() {
|
|
767
|
+
const t = w.getAllRequestedCaipNetworks(), i = t ? t.length > 1 : !1, r = t == null ? void 0 : t.find(({ id: a }) => {
|
|
768
|
+
var o;
|
|
769
|
+
return a === ((o = this.network) == null ? void 0 : o.id);
|
|
770
|
+
});
|
|
771
|
+
return i || !r;
|
|
772
|
+
}
|
|
773
|
+
onViewChange() {
|
|
774
|
+
const { history: t } = c.state;
|
|
775
|
+
let i = F.VIEW_DIRECTION.Next;
|
|
776
|
+
t.length < this.prevHistoryLength && (i = F.VIEW_DIRECTION.Prev), this.prevHistoryLength = t.length, this.viewDirection = i;
|
|
777
|
+
}
|
|
778
|
+
async onHistoryChange() {
|
|
779
|
+
var r;
|
|
780
|
+
const { history: t } = c.state, i = (r = this.shadowRoot) == null ? void 0 : r.querySelector("#dynamic");
|
|
781
|
+
t.length > 1 && !this.showBack && i ? (await i.animate([{ opacity: 1 }, { opacity: 0 }], {
|
|
782
|
+
duration: 200,
|
|
783
|
+
fill: "forwards",
|
|
784
|
+
easing: "ease"
|
|
785
|
+
}).finished, this.showBack = !0, i.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
786
|
+
duration: 200,
|
|
787
|
+
fill: "forwards",
|
|
788
|
+
easing: "ease"
|
|
789
|
+
})) : t.length <= 1 && this.showBack && i && (await i.animate([{ opacity: 1 }, { opacity: 0 }], {
|
|
790
|
+
duration: 200,
|
|
791
|
+
fill: "forwards",
|
|
792
|
+
easing: "ease"
|
|
793
|
+
}).finished, this.showBack = !1, i.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
794
|
+
duration: 200,
|
|
795
|
+
fill: "forwards",
|
|
796
|
+
easing: "ease"
|
|
797
|
+
}));
|
|
798
|
+
}
|
|
799
|
+
onGoBack() {
|
|
800
|
+
c.goBack();
|
|
801
|
+
}
|
|
802
|
+
};
|
|
803
|
+
C.styles = Oe;
|
|
804
|
+
R([
|
|
805
|
+
u()
|
|
806
|
+
], C.prototype, "heading", void 0);
|
|
807
|
+
R([
|
|
808
|
+
u()
|
|
809
|
+
], C.prototype, "network", void 0);
|
|
810
|
+
R([
|
|
811
|
+
u()
|
|
812
|
+
], C.prototype, "networkImage", void 0);
|
|
813
|
+
R([
|
|
814
|
+
u()
|
|
815
|
+
], C.prototype, "showBack", void 0);
|
|
816
|
+
R([
|
|
817
|
+
u()
|
|
818
|
+
], C.prototype, "prevHistoryLength", void 0);
|
|
819
|
+
R([
|
|
820
|
+
u()
|
|
821
|
+
], C.prototype, "view", void 0);
|
|
822
|
+
R([
|
|
823
|
+
u()
|
|
824
|
+
], C.prototype, "viewDirection", void 0);
|
|
825
|
+
C = R([
|
|
826
|
+
f("w3m-header")
|
|
827
|
+
], C);
|
|
828
|
+
const Te = v`
|
|
829
|
+
:host {
|
|
830
|
+
display: flex;
|
|
831
|
+
align-items: center;
|
|
832
|
+
gap: ${({ spacing: e }) => e[1]};
|
|
833
|
+
padding: ${({ spacing: e }) => e[2]} ${({ spacing: e }) => e[3]}
|
|
834
|
+
${({ spacing: e }) => e[2]} ${({ spacing: e }) => e[2]};
|
|
835
|
+
border-radius: ${({ borderRadius: e }) => e[20]};
|
|
836
|
+
background-color: ${({ tokens: e }) => e.theme.foregroundPrimary};
|
|
837
|
+
box-shadow:
|
|
838
|
+
0px 0px 8px 0px rgba(0, 0, 0, 0.1),
|
|
839
|
+
inset 0 0 0 1px ${({ tokens: e }) => e.theme.borderPrimary};
|
|
840
|
+
max-width: 320px;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
wui-icon-box {
|
|
844
|
+
border-radius: ${({ borderRadius: e }) => e.round} !important;
|
|
845
|
+
overflow: hidden;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
wui-loading-spinner {
|
|
849
|
+
padding: ${({ spacing: e }) => e[1]};
|
|
850
|
+
background-color: ${({ tokens: e }) => e.core.foregroundAccent010};
|
|
851
|
+
border-radius: ${({ borderRadius: e }) => e.round} !important;
|
|
852
|
+
}
|
|
853
|
+
`;
|
|
854
|
+
var Q = function(e, t, i, r) {
|
|
855
|
+
var a = arguments.length, o = a < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, i) : r, n;
|
|
856
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(e, t, i, r);
|
|
857
|
+
else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (o = (a < 3 ? n(o) : a > 3 ? n(t, i, o) : n(t, i)) || o);
|
|
858
|
+
return a > 3 && o && Object.defineProperty(t, i, o), o;
|
|
859
|
+
};
|
|
860
|
+
let _ = class extends g {
|
|
861
|
+
constructor() {
|
|
862
|
+
super(...arguments), this.message = "", this.variant = "success";
|
|
863
|
+
}
|
|
864
|
+
render() {
|
|
865
|
+
return d`
|
|
866
|
+
${this.templateIcon()}
|
|
867
|
+
<wui-text variant="lg-regular" color="primary" data-testid="wui-snackbar-message"
|
|
868
|
+
>${this.message}</wui-text
|
|
869
|
+
>
|
|
870
|
+
`;
|
|
871
|
+
}
|
|
872
|
+
templateIcon() {
|
|
873
|
+
const t = {
|
|
874
|
+
success: "success",
|
|
875
|
+
error: "error",
|
|
876
|
+
warning: "warning",
|
|
877
|
+
info: "default"
|
|
878
|
+
}, i = {
|
|
879
|
+
success: "checkmark",
|
|
880
|
+
error: "warning",
|
|
881
|
+
warning: "warningCircle",
|
|
882
|
+
info: "info"
|
|
883
|
+
};
|
|
884
|
+
return this.variant === "loading" ? d`<wui-loading-spinner size="md" color="accent-primary"></wui-loading-spinner>` : d`<wui-icon-box
|
|
885
|
+
size="md"
|
|
886
|
+
color=${t[this.variant]}
|
|
887
|
+
icon=${i[this.variant]}
|
|
888
|
+
></wui-icon-box>`;
|
|
889
|
+
}
|
|
890
|
+
};
|
|
891
|
+
_.styles = [V, Te];
|
|
892
|
+
Q([
|
|
893
|
+
l()
|
|
894
|
+
], _.prototype, "message", void 0);
|
|
895
|
+
Q([
|
|
896
|
+
l()
|
|
897
|
+
], _.prototype, "variant", void 0);
|
|
898
|
+
_ = Q([
|
|
899
|
+
f("wui-snackbar")
|
|
900
|
+
], _);
|
|
901
|
+
const _e = we`
|
|
902
|
+
:host {
|
|
903
|
+
display: block;
|
|
904
|
+
position: absolute;
|
|
905
|
+
opacity: 0;
|
|
906
|
+
pointer-events: none;
|
|
907
|
+
top: 11px;
|
|
908
|
+
left: 50%;
|
|
909
|
+
width: max-content;
|
|
910
|
+
}
|
|
911
|
+
`;
|
|
912
|
+
var he = function(e, t, i, r) {
|
|
913
|
+
var a = arguments.length, o = a < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, i) : r, n;
|
|
914
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(e, t, i, r);
|
|
915
|
+
else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (o = (a < 3 ? n(o) : a > 3 ? n(t, i, o) : n(t, i)) || o);
|
|
916
|
+
return a > 3 && o && Object.defineProperty(t, i, o), o;
|
|
917
|
+
};
|
|
918
|
+
let L = class extends g {
|
|
919
|
+
constructor() {
|
|
920
|
+
super(), this.unsubscribe = [], this.timeout = void 0, this.open = E.state.open, this.unsubscribe.push(E.subscribeKey("open", (t) => {
|
|
921
|
+
this.open = t, this.onOpen();
|
|
922
|
+
}));
|
|
923
|
+
}
|
|
924
|
+
disconnectedCallback() {
|
|
925
|
+
clearTimeout(this.timeout), this.unsubscribe.forEach((t) => t());
|
|
926
|
+
}
|
|
927
|
+
render() {
|
|
928
|
+
const { message: t, variant: i } = E.state;
|
|
929
|
+
return d` <wui-snackbar message=${t} variant=${i}></wui-snackbar> `;
|
|
930
|
+
}
|
|
931
|
+
onOpen() {
|
|
932
|
+
clearTimeout(this.timeout), this.open ? (this.animate([
|
|
933
|
+
{ opacity: 0, transform: "translateX(-50%) scale(0.85)" },
|
|
934
|
+
{ opacity: 1, transform: "translateX(-50%) scale(1)" }
|
|
935
|
+
], {
|
|
936
|
+
duration: 150,
|
|
937
|
+
fill: "forwards",
|
|
938
|
+
easing: "ease"
|
|
939
|
+
}), this.timeout && clearTimeout(this.timeout), E.state.autoClose && (this.timeout = setTimeout(() => E.hide(), 2500))) : this.animate([
|
|
940
|
+
{ opacity: 1, transform: "translateX(-50%) scale(1)" },
|
|
941
|
+
{ opacity: 0, transform: "translateX(-50%) scale(0.85)" }
|
|
942
|
+
], {
|
|
943
|
+
duration: 150,
|
|
944
|
+
fill: "forwards",
|
|
945
|
+
easing: "ease"
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
};
|
|
949
|
+
L.styles = _e;
|
|
950
|
+
he([
|
|
951
|
+
u()
|
|
952
|
+
], L.prototype, "open", void 0);
|
|
953
|
+
L = he([
|
|
954
|
+
f("w3m-snackbar")
|
|
955
|
+
], L);
|
|
956
|
+
const ze = v`
|
|
957
|
+
:host {
|
|
958
|
+
z-index: ${({ tokens: e }) => e.core.zIndex};
|
|
959
|
+
display: block;
|
|
960
|
+
backface-visibility: hidden;
|
|
961
|
+
will-change: opacity;
|
|
962
|
+
position: fixed;
|
|
963
|
+
top: 0;
|
|
964
|
+
left: 0;
|
|
965
|
+
right: 0;
|
|
966
|
+
bottom: 0;
|
|
967
|
+
pointer-events: none;
|
|
968
|
+
opacity: 0;
|
|
969
|
+
background-color: ${({ tokens: e }) => e.theme.overlay};
|
|
970
|
+
backdrop-filter: blur(0px);
|
|
971
|
+
transition:
|
|
972
|
+
opacity ${({ durations: e }) => e.lg} ${({ easings: e }) => e["ease-out-power-2"]},
|
|
973
|
+
backdrop-filter ${({ durations: e }) => e.lg}
|
|
974
|
+
${({ easings: e }) => e["ease-out-power-2"]};
|
|
975
|
+
will-change: opacity;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
:host(.open) {
|
|
979
|
+
opacity: 1;
|
|
980
|
+
backdrop-filter: blur(8px);
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
:host(.appkit-modal) {
|
|
984
|
+
position: relative;
|
|
985
|
+
pointer-events: unset;
|
|
986
|
+
background: none;
|
|
987
|
+
width: 100%;
|
|
988
|
+
opacity: 1;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
wui-card {
|
|
992
|
+
max-width: var(--apkt-modal-width);
|
|
993
|
+
width: 100%;
|
|
994
|
+
position: relative;
|
|
995
|
+
outline: none;
|
|
996
|
+
transform: translateY(4px);
|
|
997
|
+
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.05);
|
|
998
|
+
transition:
|
|
999
|
+
transform ${({ durations: e }) => e.lg}
|
|
1000
|
+
${({ easings: e }) => e["ease-out-power-2"]},
|
|
1001
|
+
border-radius ${({ durations: e }) => e.lg}
|
|
1002
|
+
${({ easings: e }) => e["ease-out-power-1"]},
|
|
1003
|
+
background-color ${({ durations: e }) => e.lg}
|
|
1004
|
+
${({ easings: e }) => e["ease-out-power-1"]},
|
|
1005
|
+
box-shadow ${({ durations: e }) => e.lg}
|
|
1006
|
+
${({ easings: e }) => e["ease-out-power-1"]};
|
|
1007
|
+
will-change: border-radius, background-color, transform, box-shadow;
|
|
1008
|
+
background-color: ${({ tokens: e }) => e.theme.backgroundPrimary};
|
|
1009
|
+
padding: var(--local-modal-padding);
|
|
1010
|
+
box-sizing: border-box;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
:host(.open) wui-card {
|
|
1014
|
+
transform: translateY(0px);
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
wui-card::before {
|
|
1018
|
+
z-index: 1;
|
|
1019
|
+
pointer-events: none;
|
|
1020
|
+
content: '';
|
|
1021
|
+
position: absolute;
|
|
1022
|
+
inset: 0;
|
|
1023
|
+
border-radius: clamp(0px, var(--apkt-borderRadius-8), 44px);
|
|
1024
|
+
transition: box-shadow ${({ durations: e }) => e.lg}
|
|
1025
|
+
${({ easings: e }) => e["ease-out-power-2"]};
|
|
1026
|
+
transition-delay: ${({ durations: e }) => e.md};
|
|
1027
|
+
will-change: box-shadow;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
:host([data-mobile-fullscreen='true']) wui-card::before {
|
|
1031
|
+
border-radius: 0px;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
:host([data-border='true']) wui-card::before {
|
|
1035
|
+
box-shadow: inset 0px 0px 0px 4px ${({ tokens: e }) => e.theme.foregroundSecondary};
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
:host([data-border='false']) wui-card::before {
|
|
1039
|
+
box-shadow: inset 0px 0px 0px 1px ${({ tokens: e }) => e.theme.borderPrimaryDark};
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
:host([data-border='true']) wui-card {
|
|
1043
|
+
animation:
|
|
1044
|
+
fade-in ${({ durations: e }) => e.lg} ${({ easings: e }) => e["ease-out-power-2"]},
|
|
1045
|
+
card-background-border var(--apkt-duration-dynamic)
|
|
1046
|
+
${({ easings: e }) => e["ease-out-power-2"]};
|
|
1047
|
+
animation-fill-mode: backwards, both;
|
|
1048
|
+
animation-delay: var(--apkt-duration-dynamic);
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
:host([data-border='false']) wui-card {
|
|
1052
|
+
animation:
|
|
1053
|
+
fade-in ${({ durations: e }) => e.lg} ${({ easings: e }) => e["ease-out-power-2"]},
|
|
1054
|
+
card-background-default var(--apkt-duration-dynamic)
|
|
1055
|
+
${({ easings: e }) => e["ease-out-power-2"]};
|
|
1056
|
+
animation-fill-mode: backwards, both;
|
|
1057
|
+
animation-delay: 0s;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
:host(.appkit-modal) wui-card {
|
|
1061
|
+
max-width: var(--apkt-modal-width);
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
wui-card[shake='true'] {
|
|
1065
|
+
animation:
|
|
1066
|
+
fade-in ${({ durations: e }) => e.lg} ${({ easings: e }) => e["ease-out-power-2"]},
|
|
1067
|
+
w3m-shake ${({ durations: e }) => e.xl}
|
|
1068
|
+
${({ easings: e }) => e["ease-out-power-2"]};
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
wui-flex {
|
|
1072
|
+
overflow-x: hidden;
|
|
1073
|
+
overflow-y: auto;
|
|
1074
|
+
display: flex;
|
|
1075
|
+
align-items: center;
|
|
1076
|
+
justify-content: center;
|
|
1077
|
+
width: 100%;
|
|
1078
|
+
height: 100%;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
@media (max-height: 700px) and (min-width: 431px) {
|
|
1082
|
+
wui-flex {
|
|
1083
|
+
align-items: flex-start;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
wui-card {
|
|
1087
|
+
margin: var(--apkt-spacing-6) 0px;
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
@media (max-width: 430px) {
|
|
1092
|
+
:host([data-mobile-fullscreen='true']) {
|
|
1093
|
+
height: 100dvh;
|
|
1094
|
+
}
|
|
1095
|
+
:host([data-mobile-fullscreen='true']) wui-flex {
|
|
1096
|
+
align-items: stretch;
|
|
1097
|
+
}
|
|
1098
|
+
:host([data-mobile-fullscreen='true']) wui-card {
|
|
1099
|
+
max-width: 100%;
|
|
1100
|
+
height: 100%;
|
|
1101
|
+
border-radius: 0;
|
|
1102
|
+
border: none;
|
|
1103
|
+
}
|
|
1104
|
+
:host(:not([data-mobile-fullscreen='true'])) wui-flex {
|
|
1105
|
+
align-items: flex-end;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
:host(:not([data-mobile-fullscreen='true'])) wui-card {
|
|
1109
|
+
max-width: 100%;
|
|
1110
|
+
border-bottom: none;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
:host(:not([data-mobile-fullscreen='true'])) wui-card[data-embedded='true'] {
|
|
1114
|
+
border-bottom-left-radius: clamp(0px, var(--apkt-borderRadius-8), 44px);
|
|
1115
|
+
border-bottom-right-radius: clamp(0px, var(--apkt-borderRadius-8), 44px);
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
:host(:not([data-mobile-fullscreen='true'])) wui-card:not([data-embedded='true']) {
|
|
1119
|
+
border-bottom-left-radius: 0px;
|
|
1120
|
+
border-bottom-right-radius: 0px;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
wui-card[shake='true'] {
|
|
1124
|
+
animation: w3m-shake 0.5s ${({ easings: e }) => e["ease-out-power-2"]};
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
@keyframes fade-in {
|
|
1129
|
+
0% {
|
|
1130
|
+
transform: scale(0.99) translateY(4px);
|
|
1131
|
+
}
|
|
1132
|
+
100% {
|
|
1133
|
+
transform: scale(1) translateY(0);
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
@keyframes w3m-shake {
|
|
1138
|
+
0% {
|
|
1139
|
+
transform: scale(1) rotate(0deg);
|
|
1140
|
+
}
|
|
1141
|
+
20% {
|
|
1142
|
+
transform: scale(1) rotate(-1deg);
|
|
1143
|
+
}
|
|
1144
|
+
40% {
|
|
1145
|
+
transform: scale(1) rotate(1.5deg);
|
|
1146
|
+
}
|
|
1147
|
+
60% {
|
|
1148
|
+
transform: scale(1) rotate(-1.5deg);
|
|
1149
|
+
}
|
|
1150
|
+
80% {
|
|
1151
|
+
transform: scale(1) rotate(1deg);
|
|
1152
|
+
}
|
|
1153
|
+
100% {
|
|
1154
|
+
transform: scale(1) rotate(0deg);
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
@keyframes card-background-border {
|
|
1159
|
+
from {
|
|
1160
|
+
background-color: ${({ tokens: e }) => e.theme.backgroundPrimary};
|
|
1161
|
+
}
|
|
1162
|
+
to {
|
|
1163
|
+
background-color: ${({ tokens: e }) => e.theme.foregroundSecondary};
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
@keyframes card-background-default {
|
|
1168
|
+
from {
|
|
1169
|
+
background-color: ${({ tokens: e }) => e.theme.foregroundSecondary};
|
|
1170
|
+
}
|
|
1171
|
+
to {
|
|
1172
|
+
background-color: ${({ tokens: e }) => e.theme.backgroundPrimary};
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
`;
|
|
1176
|
+
var S = function(e, t, i, r) {
|
|
1177
|
+
var a = arguments.length, o = a < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, i) : r, n;
|
|
1178
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(e, t, i, r);
|
|
1179
|
+
else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (o = (a < 3 ? n(o) : a > 3 ? n(t, i, o) : n(t, i)) || o);
|
|
1180
|
+
return a > 3 && o && Object.defineProperty(t, i, o), o;
|
|
1181
|
+
};
|
|
1182
|
+
const ae = "scroll-lock", De = {
|
|
1183
|
+
PayWithExchange: "0",
|
|
1184
|
+
PayWithExchangeSelectAsset: "0",
|
|
1185
|
+
Pay: "0",
|
|
1186
|
+
PayQuote: "0",
|
|
1187
|
+
PayLoading: "0"
|
|
1188
|
+
};
|
|
1189
|
+
class x extends g {
|
|
1190
|
+
constructor() {
|
|
1191
|
+
super(), this.unsubscribe = [], this.abortController = void 0, this.hasPrefetched = !1, this.enableEmbedded = A.state.enableEmbedded, this.open = k.state.open, this.caipAddress = w.state.activeCaipAddress, this.caipNetwork = w.state.activeCaipNetwork, this.shake = k.state.shake, this.filterByNamespace = M.state.filterByNamespace, this.padding = B.spacing[1], this.mobileFullScreen = A.state.enableMobileFullScreen, this.initializeTheming(), z.prefetchAnalyticsConfig(), this.unsubscribe.push(k.subscribeKey("open", (t) => t ? this.onOpen() : this.onClose()), k.subscribeKey("shake", (t) => this.shake = t), w.subscribeKey("activeCaipNetwork", (t) => this.onNewNetwork(t)), w.subscribeKey("activeCaipAddress", (t) => this.onNewAddress(t)), A.subscribeKey("enableEmbedded", (t) => this.enableEmbedded = t), M.subscribeKey("filterByNamespace", (t) => {
|
|
1192
|
+
var i;
|
|
1193
|
+
this.filterByNamespace !== t && !((i = w.getAccountData(t)) != null && i.caipAddress) && (z.fetchRecommendedWallets(), this.filterByNamespace = t);
|
|
1194
|
+
}), c.subscribeKey("view", () => {
|
|
1195
|
+
this.dataset.border = oe.hasFooter() ? "true" : "false", this.padding = De[c.state.view] ?? B.spacing[1];
|
|
1196
|
+
}));
|
|
1197
|
+
}
|
|
1198
|
+
firstUpdated() {
|
|
1199
|
+
if (this.dataset.border = oe.hasFooter() ? "true" : "false", this.mobileFullScreen && this.setAttribute("data-mobile-fullscreen", "true"), this.caipAddress) {
|
|
1200
|
+
if (this.enableEmbedded) {
|
|
1201
|
+
k.close(), this.prefetch();
|
|
1202
|
+
return;
|
|
1203
|
+
}
|
|
1204
|
+
this.onNewAddress(this.caipAddress);
|
|
1205
|
+
}
|
|
1206
|
+
this.open && this.onOpen(), this.enableEmbedded && this.prefetch();
|
|
1207
|
+
}
|
|
1208
|
+
disconnectedCallback() {
|
|
1209
|
+
this.unsubscribe.forEach((t) => t()), this.onRemoveKeyboardListener();
|
|
1210
|
+
}
|
|
1211
|
+
render() {
|
|
1212
|
+
return this.style.setProperty("--local-modal-padding", this.padding), this.enableEmbedded ? d`${this.contentTemplate()}
|
|
1213
|
+
<w3m-tooltip></w3m-tooltip> ` : this.open ? d`
|
|
1214
|
+
<wui-flex @click=${this.onOverlayClick.bind(this)} data-testid="w3m-modal-overlay">
|
|
1215
|
+
${this.contentTemplate()}
|
|
1216
|
+
</wui-flex>
|
|
1217
|
+
<w3m-tooltip></w3m-tooltip>
|
|
1218
|
+
` : null;
|
|
1219
|
+
}
|
|
1220
|
+
contentTemplate() {
|
|
1221
|
+
return d` <wui-card
|
|
1222
|
+
shake="${this.shake}"
|
|
1223
|
+
data-embedded="${$(this.enableEmbedded)}"
|
|
1224
|
+
role="alertdialog"
|
|
1225
|
+
aria-modal="true"
|
|
1226
|
+
tabindex="0"
|
|
1227
|
+
data-testid="w3m-modal-card"
|
|
1228
|
+
>
|
|
1229
|
+
<w3m-header></w3m-header>
|
|
1230
|
+
<w3m-router></w3m-router>
|
|
1231
|
+
<w3m-footer></w3m-footer>
|
|
1232
|
+
<w3m-snackbar></w3m-snackbar>
|
|
1233
|
+
<w3m-alertbar></w3m-alertbar>
|
|
1234
|
+
</wui-card>`;
|
|
1235
|
+
}
|
|
1236
|
+
async onOverlayClick(t) {
|
|
1237
|
+
if (t.target === t.currentTarget) {
|
|
1238
|
+
if (this.mobileFullScreen)
|
|
1239
|
+
return;
|
|
1240
|
+
await this.handleClose();
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
async handleClose() {
|
|
1244
|
+
await de.safeClose();
|
|
1245
|
+
}
|
|
1246
|
+
initializeTheming() {
|
|
1247
|
+
const { themeVariables: t, themeMode: i } = be.state, r = ce.getColorTheme(i);
|
|
1248
|
+
ge(t, r);
|
|
1249
|
+
}
|
|
1250
|
+
onClose() {
|
|
1251
|
+
this.open = !1, this.classList.remove("open"), this.onScrollUnlock(), E.hide(), this.onRemoveKeyboardListener();
|
|
1252
|
+
}
|
|
1253
|
+
onOpen() {
|
|
1254
|
+
this.open = !0, this.classList.add("open"), this.onScrollLock(), this.onAddKeyboardListener();
|
|
1255
|
+
}
|
|
1256
|
+
onScrollLock() {
|
|
1257
|
+
const t = document.createElement("style");
|
|
1258
|
+
t.dataset.w3m = ae, t.textContent = `
|
|
1259
|
+
body {
|
|
1260
|
+
touch-action: none;
|
|
1261
|
+
overflow: hidden;
|
|
1262
|
+
overscroll-behavior: contain;
|
|
1263
|
+
}
|
|
1264
|
+
w3m-modal {
|
|
1265
|
+
pointer-events: auto;
|
|
1266
|
+
}
|
|
1267
|
+
`, document.head.appendChild(t);
|
|
1268
|
+
}
|
|
1269
|
+
onScrollUnlock() {
|
|
1270
|
+
const t = document.head.querySelector(`style[data-w3m="${ae}"]`);
|
|
1271
|
+
t && t.remove();
|
|
1272
|
+
}
|
|
1273
|
+
onAddKeyboardListener() {
|
|
1274
|
+
var i;
|
|
1275
|
+
this.abortController = new AbortController();
|
|
1276
|
+
const t = (i = this.shadowRoot) == null ? void 0 : i.querySelector("wui-card");
|
|
1277
|
+
t == null || t.focus(), window.addEventListener("keydown", (r) => {
|
|
1278
|
+
if (r.key === "Escape")
|
|
1279
|
+
this.handleClose();
|
|
1280
|
+
else if (r.key === "Tab") {
|
|
1281
|
+
const { tagName: a } = r.target;
|
|
1282
|
+
a && !a.includes("W3M-") && !a.includes("WUI-") && (t == null || t.focus());
|
|
1283
|
+
}
|
|
1284
|
+
}, this.abortController);
|
|
1285
|
+
}
|
|
1286
|
+
onRemoveKeyboardListener() {
|
|
1287
|
+
var t;
|
|
1288
|
+
(t = this.abortController) == null || t.abort(), this.abortController = void 0;
|
|
1289
|
+
}
|
|
1290
|
+
async onNewAddress(t) {
|
|
1291
|
+
const i = w.state.isSwitchingNamespace, r = c.state.view === "ProfileWallets";
|
|
1292
|
+
!t && !i && !r && k.close(), await le.initializeIfEnabled(t), this.caipAddress = t, w.setIsSwitchingNamespace(!1);
|
|
1293
|
+
}
|
|
1294
|
+
onNewNetwork(t) {
|
|
1295
|
+
var y, P;
|
|
1296
|
+
const i = this.caipNetwork, r = (y = i == null ? void 0 : i.caipNetworkId) == null ? void 0 : y.toString(), a = (P = t == null ? void 0 : t.caipNetworkId) == null ? void 0 : P.toString(), o = r !== a, n = c.state.view === "UnsupportedChain", s = k.state.open;
|
|
1297
|
+
let m = !1;
|
|
1298
|
+
this.enableEmbedded && c.state.view === "SwitchNetwork" && (m = !0), o && ve.resetState(), s && n && (m = !0), m && c.state.view !== "SIWXSignMessage" && c.goBack(), this.caipNetwork = t;
|
|
1299
|
+
}
|
|
1300
|
+
prefetch() {
|
|
1301
|
+
this.hasPrefetched || (z.prefetch(), z.fetchWalletsByPage({ page: 1 }), this.hasPrefetched = !0);
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
x.styles = ze;
|
|
1305
|
+
S([
|
|
1306
|
+
l({ type: Boolean })
|
|
1307
|
+
], x.prototype, "enableEmbedded", void 0);
|
|
1308
|
+
S([
|
|
1309
|
+
u()
|
|
1310
|
+
], x.prototype, "open", void 0);
|
|
1311
|
+
S([
|
|
1312
|
+
u()
|
|
1313
|
+
], x.prototype, "caipAddress", void 0);
|
|
1314
|
+
S([
|
|
1315
|
+
u()
|
|
1316
|
+
], x.prototype, "caipNetwork", void 0);
|
|
1317
|
+
S([
|
|
1318
|
+
u()
|
|
1319
|
+
], x.prototype, "shake", void 0);
|
|
1320
|
+
S([
|
|
1321
|
+
u()
|
|
1322
|
+
], x.prototype, "filterByNamespace", void 0);
|
|
1323
|
+
S([
|
|
1324
|
+
u()
|
|
1325
|
+
], x.prototype, "padding", void 0);
|
|
1326
|
+
S([
|
|
1327
|
+
u()
|
|
1328
|
+
], x.prototype, "mobileFullScreen", void 0);
|
|
1329
|
+
let ne = class extends x {
|
|
1330
|
+
};
|
|
1331
|
+
ne = S([
|
|
1332
|
+
f("w3m-modal")
|
|
1333
|
+
], ne);
|
|
1334
|
+
let se = class extends x {
|
|
1335
|
+
};
|
|
1336
|
+
se = S([
|
|
1337
|
+
f("appkit-modal")
|
|
1338
|
+
], se);
|
|
1339
|
+
const He = v`
|
|
1340
|
+
.icon-box {
|
|
1341
|
+
width: 64px;
|
|
1342
|
+
height: 64px;
|
|
1343
|
+
border-radius: ${({ borderRadius: e }) => e[5]};
|
|
1344
|
+
background-color: ${({ colors: e }) => e.semanticError010};
|
|
1345
|
+
}
|
|
1346
|
+
`;
|
|
1347
|
+
var Be = function(e, t, i, r) {
|
|
1348
|
+
var a = arguments.length, o = a < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, i) : r, n;
|
|
1349
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(e, t, i, r);
|
|
1350
|
+
else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (o = (a < 3 ? n(o) : a > 3 ? n(t, i, o) : n(t, i)) || o);
|
|
1351
|
+
return a > 3 && o && Object.defineProperty(t, i, o), o;
|
|
1352
|
+
};
|
|
1353
|
+
let Y = class extends g {
|
|
1354
|
+
constructor() {
|
|
1355
|
+
super();
|
|
1356
|
+
}
|
|
1357
|
+
render() {
|
|
1358
|
+
return d`
|
|
1359
|
+
<wui-flex
|
|
1360
|
+
flexDirection="column"
|
|
1361
|
+
alignItems="center"
|
|
1362
|
+
gap="4"
|
|
1363
|
+
.padding="${["1", "3", "4", "3"]}"
|
|
1364
|
+
>
|
|
1365
|
+
<wui-flex justifyContent="center" alignItems="center" class="icon-box">
|
|
1366
|
+
<wui-icon size="xxl" color="error" name="warningCircle"></wui-icon>
|
|
1367
|
+
</wui-flex>
|
|
1368
|
+
|
|
1369
|
+
<wui-text variant="lg-medium" color="primary" align="center">
|
|
1370
|
+
The app isn't responding as expected
|
|
1371
|
+
</wui-text>
|
|
1372
|
+
<wui-text variant="md-regular" color="secondary" align="center">
|
|
1373
|
+
Try again or reach out to the app team for help.
|
|
1374
|
+
</wui-text>
|
|
1375
|
+
|
|
1376
|
+
<wui-button
|
|
1377
|
+
variant="neutral-secondary"
|
|
1378
|
+
size="md"
|
|
1379
|
+
@click=${this.onTryAgainClick.bind(this)}
|
|
1380
|
+
data-testid="w3m-usage-exceeded-button"
|
|
1381
|
+
>
|
|
1382
|
+
<wui-icon color="inherit" slot="iconLeft" name="refresh"></wui-icon>
|
|
1383
|
+
Try Again
|
|
1384
|
+
</wui-button>
|
|
1385
|
+
</wui-flex>
|
|
1386
|
+
`;
|
|
1387
|
+
}
|
|
1388
|
+
onTryAgainClick() {
|
|
1389
|
+
c.goBack();
|
|
1390
|
+
}
|
|
1391
|
+
};
|
|
1392
|
+
Y.styles = He;
|
|
1393
|
+
Y = Be([
|
|
1394
|
+
f("w3m-usage-exceeded-view")
|
|
1395
|
+
], Y);
|
|
1396
|
+
const je = v`
|
|
1397
|
+
:host {
|
|
1398
|
+
width: 100%;
|
|
1399
|
+
}
|
|
1400
|
+
`;
|
|
1401
|
+
var p = function(e, t, i, r) {
|
|
1402
|
+
var a = arguments.length, o = a < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, i) : r, n;
|
|
1403
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(e, t, i, r);
|
|
1404
|
+
else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (o = (a < 3 ? n(o) : a > 3 ? n(t, i, o) : n(t, i)) || o);
|
|
1405
|
+
return a > 3 && o && Object.defineProperty(t, i, o), o;
|
|
1406
|
+
};
|
|
1407
|
+
let h = class extends g {
|
|
1408
|
+
constructor() {
|
|
1409
|
+
super(...arguments), this.hasImpressionSent = !1, this.walletImages = [], this.imageSrc = "", this.name = "", this.size = "md", this.tabIdx = void 0, this.disabled = !1, this.showAllWallets = !1, this.loading = !1, this.loadingSpinnerColor = "accent-100", this.rdnsId = "", this.displayIndex = void 0, this.walletRank = void 0, this.namespaces = [];
|
|
1410
|
+
}
|
|
1411
|
+
connectedCallback() {
|
|
1412
|
+
super.connectedCallback();
|
|
1413
|
+
}
|
|
1414
|
+
disconnectedCallback() {
|
|
1415
|
+
super.disconnectedCallback(), this.cleanupIntersectionObserver();
|
|
1416
|
+
}
|
|
1417
|
+
updated(t) {
|
|
1418
|
+
super.updated(t), (t.has("name") || t.has("imageSrc") || t.has("walletRank")) && (this.hasImpressionSent = !1), t.has("walletRank") && this.walletRank && !this.intersectionObserver && this.setupIntersectionObserver();
|
|
1419
|
+
}
|
|
1420
|
+
setupIntersectionObserver() {
|
|
1421
|
+
this.intersectionObserver = new IntersectionObserver((t) => {
|
|
1422
|
+
t.forEach((i) => {
|
|
1423
|
+
i.isIntersecting && !this.loading && !this.hasImpressionSent && this.sendImpressionEvent();
|
|
1424
|
+
});
|
|
1425
|
+
}, { threshold: 0.1 }), this.intersectionObserver.observe(this);
|
|
1426
|
+
}
|
|
1427
|
+
cleanupIntersectionObserver() {
|
|
1428
|
+
this.intersectionObserver && (this.intersectionObserver.disconnect(), this.intersectionObserver = void 0);
|
|
1429
|
+
}
|
|
1430
|
+
sendImpressionEvent() {
|
|
1431
|
+
!this.name || this.hasImpressionSent || !this.walletRank || (this.hasImpressionSent = !0, (this.rdnsId || this.name) && K.sendWalletImpressionEvent({
|
|
1432
|
+
name: this.name,
|
|
1433
|
+
walletRank: this.walletRank,
|
|
1434
|
+
rdnsId: this.rdnsId,
|
|
1435
|
+
view: c.state.view,
|
|
1436
|
+
displayIndex: this.displayIndex
|
|
1437
|
+
}));
|
|
1438
|
+
}
|
|
1439
|
+
handleGetWalletNamespaces() {
|
|
1440
|
+
return Object.keys(ye.state.adapters).length > 1 ? this.namespaces : [];
|
|
1441
|
+
}
|
|
1442
|
+
render() {
|
|
1443
|
+
return d`
|
|
1444
|
+
<wui-list-wallet
|
|
1445
|
+
.walletImages=${this.walletImages}
|
|
1446
|
+
imageSrc=${$(this.imageSrc)}
|
|
1447
|
+
name=${this.name}
|
|
1448
|
+
size=${$(this.size)}
|
|
1449
|
+
tagLabel=${$(this.tagLabel)}
|
|
1450
|
+
.tagVariant=${this.tagVariant}
|
|
1451
|
+
.walletIcon=${this.walletIcon}
|
|
1452
|
+
.tabIdx=${this.tabIdx}
|
|
1453
|
+
.disabled=${this.disabled}
|
|
1454
|
+
.showAllWallets=${this.showAllWallets}
|
|
1455
|
+
.loading=${this.loading}
|
|
1456
|
+
loadingSpinnerColor=${this.loadingSpinnerColor}
|
|
1457
|
+
.namespaces=${this.handleGetWalletNamespaces()}
|
|
1458
|
+
></wui-list-wallet>
|
|
1459
|
+
`;
|
|
1460
|
+
}
|
|
1461
|
+
};
|
|
1462
|
+
h.styles = je;
|
|
1463
|
+
p([
|
|
1464
|
+
l({ type: Array })
|
|
1465
|
+
], h.prototype, "walletImages", void 0);
|
|
1466
|
+
p([
|
|
1467
|
+
l()
|
|
1468
|
+
], h.prototype, "imageSrc", void 0);
|
|
1469
|
+
p([
|
|
1470
|
+
l()
|
|
1471
|
+
], h.prototype, "name", void 0);
|
|
1472
|
+
p([
|
|
1473
|
+
l()
|
|
1474
|
+
], h.prototype, "size", void 0);
|
|
1475
|
+
p([
|
|
1476
|
+
l()
|
|
1477
|
+
], h.prototype, "tagLabel", void 0);
|
|
1478
|
+
p([
|
|
1479
|
+
l()
|
|
1480
|
+
], h.prototype, "tagVariant", void 0);
|
|
1481
|
+
p([
|
|
1482
|
+
l()
|
|
1483
|
+
], h.prototype, "walletIcon", void 0);
|
|
1484
|
+
p([
|
|
1485
|
+
l()
|
|
1486
|
+
], h.prototype, "tabIdx", void 0);
|
|
1487
|
+
p([
|
|
1488
|
+
l({ type: Boolean })
|
|
1489
|
+
], h.prototype, "disabled", void 0);
|
|
1490
|
+
p([
|
|
1491
|
+
l({ type: Boolean })
|
|
1492
|
+
], h.prototype, "showAllWallets", void 0);
|
|
1493
|
+
p([
|
|
1494
|
+
l({ type: Boolean })
|
|
1495
|
+
], h.prototype, "loading", void 0);
|
|
1496
|
+
p([
|
|
1497
|
+
l({ type: String })
|
|
1498
|
+
], h.prototype, "loadingSpinnerColor", void 0);
|
|
1499
|
+
p([
|
|
1500
|
+
l()
|
|
1501
|
+
], h.prototype, "rdnsId", void 0);
|
|
1502
|
+
p([
|
|
1503
|
+
l()
|
|
1504
|
+
], h.prototype, "displayIndex", void 0);
|
|
1505
|
+
p([
|
|
1506
|
+
l()
|
|
1507
|
+
], h.prototype, "walletRank", void 0);
|
|
1508
|
+
p([
|
|
1509
|
+
l({ type: Array })
|
|
1510
|
+
], h.prototype, "namespaces", void 0);
|
|
1511
|
+
h = p([
|
|
1512
|
+
f("w3m-list-wallet")
|
|
1513
|
+
], h);
|
|
1514
|
+
const Le = v`
|
|
1515
|
+
:host {
|
|
1516
|
+
--local-duration-height: 0s;
|
|
1517
|
+
--local-duration: ${({ durations: e }) => e.lg};
|
|
1518
|
+
--local-transition: ${({ easings: e }) => e["ease-out-power-2"]};
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
.container {
|
|
1522
|
+
display: block;
|
|
1523
|
+
overflow: hidden;
|
|
1524
|
+
overflow: hidden;
|
|
1525
|
+
position: relative;
|
|
1526
|
+
height: var(--local-container-height);
|
|
1527
|
+
transition: height var(--local-duration-height) var(--local-transition);
|
|
1528
|
+
will-change: height, padding-bottom;
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
.container[data-mobile-fullscreen='true'] {
|
|
1532
|
+
overflow: scroll;
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
.page {
|
|
1536
|
+
position: absolute;
|
|
1537
|
+
top: 0;
|
|
1538
|
+
left: 0;
|
|
1539
|
+
right: 0;
|
|
1540
|
+
width: 100%;
|
|
1541
|
+
height: auto;
|
|
1542
|
+
width: inherit;
|
|
1543
|
+
box-sizing: border-box;
|
|
1544
|
+
display: flex;
|
|
1545
|
+
flex-direction: column;
|
|
1546
|
+
background-color: ${({ tokens: e }) => e.theme.backgroundPrimary};
|
|
1547
|
+
border-bottom-left-radius: var(--local-border-bottom-radius);
|
|
1548
|
+
border-bottom-right-radius: var(--local-border-bottom-radius);
|
|
1549
|
+
transition: border-bottom-left-radius var(--local-duration) var(--local-transition);
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
.page[data-mobile-fullscreen='true'] {
|
|
1553
|
+
height: 100%;
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
.page-content {
|
|
1557
|
+
display: flex;
|
|
1558
|
+
flex-direction: column;
|
|
1559
|
+
min-height: 100%;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
.footer {
|
|
1563
|
+
height: var(--apkt-footer-height);
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
div.page[view-direction^='prev-'] .page-content {
|
|
1567
|
+
animation:
|
|
1568
|
+
slide-left-out var(--local-duration) forwards var(--local-transition),
|
|
1569
|
+
slide-left-in var(--local-duration) forwards var(--local-transition);
|
|
1570
|
+
animation-delay: 0ms, var(--local-duration, ${({ durations: e }) => e.lg});
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
div.page[view-direction^='next-'] .page-content {
|
|
1574
|
+
animation:
|
|
1575
|
+
slide-right-out var(--local-duration) forwards var(--local-transition),
|
|
1576
|
+
slide-right-in var(--local-duration) forwards var(--local-transition);
|
|
1577
|
+
animation-delay: 0ms, var(--local-duration, ${({ durations: e }) => e.lg});
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
@keyframes slide-left-out {
|
|
1581
|
+
from {
|
|
1582
|
+
transform: translateX(0px) scale(1);
|
|
1583
|
+
opacity: 1;
|
|
1584
|
+
filter: blur(0px);
|
|
1585
|
+
}
|
|
1586
|
+
to {
|
|
1587
|
+
transform: translateX(8px) scale(0.99);
|
|
1588
|
+
opacity: 0;
|
|
1589
|
+
filter: blur(4px);
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
@keyframes slide-left-in {
|
|
1594
|
+
from {
|
|
1595
|
+
transform: translateX(-8px) scale(0.99);
|
|
1596
|
+
opacity: 0;
|
|
1597
|
+
filter: blur(4px);
|
|
1598
|
+
}
|
|
1599
|
+
to {
|
|
1600
|
+
transform: translateX(0) translateY(0) scale(1);
|
|
1601
|
+
opacity: 1;
|
|
1602
|
+
filter: blur(0px);
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
@keyframes slide-right-out {
|
|
1607
|
+
from {
|
|
1608
|
+
transform: translateX(0px) scale(1);
|
|
1609
|
+
opacity: 1;
|
|
1610
|
+
filter: blur(0px);
|
|
1611
|
+
}
|
|
1612
|
+
to {
|
|
1613
|
+
transform: translateX(-8px) scale(0.99);
|
|
1614
|
+
opacity: 0;
|
|
1615
|
+
filter: blur(4px);
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
@keyframes slide-right-in {
|
|
1620
|
+
from {
|
|
1621
|
+
transform: translateX(8px) scale(0.99);
|
|
1622
|
+
opacity: 0;
|
|
1623
|
+
filter: blur(4px);
|
|
1624
|
+
}
|
|
1625
|
+
to {
|
|
1626
|
+
transform: translateX(0) translateY(0) scale(1);
|
|
1627
|
+
opacity: 1;
|
|
1628
|
+
filter: blur(0px);
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
`;
|
|
1632
|
+
var W = function(e, t, i, r) {
|
|
1633
|
+
var a = arguments.length, o = a < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, i) : r, n;
|
|
1634
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(e, t, i, r);
|
|
1635
|
+
else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (o = (a < 3 ? n(o) : a > 3 ? n(t, i, o) : n(t, i)) || o);
|
|
1636
|
+
return a > 3 && o && Object.defineProperty(t, i, o), o;
|
|
1637
|
+
};
|
|
1638
|
+
const Ve = 60;
|
|
1639
|
+
let b = class extends g {
|
|
1640
|
+
constructor() {
|
|
1641
|
+
super(...arguments), this.resizeObserver = void 0, this.transitionDuration = "0.15s", this.transitionFunction = "", this.history = "", this.view = "", this.setView = void 0, this.viewDirection = "", this.historyState = "", this.previousHeight = "0px", this.mobileFullScreen = A.state.enableMobileFullScreen, this.onViewportResize = () => {
|
|
1642
|
+
this.updateContainerHeight();
|
|
1643
|
+
};
|
|
1644
|
+
}
|
|
1645
|
+
updated(t) {
|
|
1646
|
+
if (t.has("history")) {
|
|
1647
|
+
const i = this.history;
|
|
1648
|
+
this.historyState !== "" && this.historyState !== i && this.onViewChange(i);
|
|
1649
|
+
}
|
|
1650
|
+
t.has("transitionDuration") && this.style.setProperty("--local-duration", this.transitionDuration), t.has("transitionFunction") && this.style.setProperty("--local-transition", this.transitionFunction);
|
|
1651
|
+
}
|
|
1652
|
+
firstUpdated() {
|
|
1653
|
+
var t;
|
|
1654
|
+
this.transitionFunction && this.style.setProperty("--local-transition", this.transitionFunction), this.style.setProperty("--local-duration", this.transitionDuration), this.historyState = this.history, this.resizeObserver = new ResizeObserver((i) => {
|
|
1655
|
+
var r;
|
|
1656
|
+
for (const a of i)
|
|
1657
|
+
if (a.target === this.getWrapper()) {
|
|
1658
|
+
let o = a.contentRect.height;
|
|
1659
|
+
const n = parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--apkt-footer-height") || "0");
|
|
1660
|
+
if (this.mobileFullScreen) {
|
|
1661
|
+
const s = ((r = window.visualViewport) == null ? void 0 : r.height) || window.innerHeight, m = this.getHeaderHeight();
|
|
1662
|
+
o = s - m - n, this.style.setProperty("--local-border-bottom-radius", "0px");
|
|
1663
|
+
} else
|
|
1664
|
+
o = o + n, this.style.setProperty("--local-border-bottom-radius", n ? "var(--apkt-borderRadius-5)" : "0px");
|
|
1665
|
+
this.style.setProperty("--local-container-height", `${o}px`), this.previousHeight !== "0px" && this.style.setProperty("--local-duration-height", this.transitionDuration), this.previousHeight = `${o}px`;
|
|
1666
|
+
}
|
|
1667
|
+
}), this.resizeObserver.observe(this.getWrapper()), this.updateContainerHeight(), window.addEventListener("resize", this.onViewportResize), (t = window.visualViewport) == null || t.addEventListener("resize", this.onViewportResize);
|
|
1668
|
+
}
|
|
1669
|
+
disconnectedCallback() {
|
|
1670
|
+
var i;
|
|
1671
|
+
const t = this.getWrapper();
|
|
1672
|
+
t && this.resizeObserver && this.resizeObserver.unobserve(t), window.removeEventListener("resize", this.onViewportResize), (i = window.visualViewport) == null || i.removeEventListener("resize", this.onViewportResize);
|
|
1673
|
+
}
|
|
1674
|
+
render() {
|
|
1675
|
+
return d`
|
|
1676
|
+
<div class="container" data-mobile-fullscreen="${$(this.mobileFullScreen)}">
|
|
1677
|
+
<div
|
|
1678
|
+
class="page"
|
|
1679
|
+
data-mobile-fullscreen="${$(this.mobileFullScreen)}"
|
|
1680
|
+
view-direction="${this.viewDirection}"
|
|
1681
|
+
>
|
|
1682
|
+
<div class="page-content">
|
|
1683
|
+
<slot></slot>
|
|
1684
|
+
</div>
|
|
1685
|
+
</div>
|
|
1686
|
+
</div>
|
|
1687
|
+
`;
|
|
1688
|
+
}
|
|
1689
|
+
onViewChange(t) {
|
|
1690
|
+
const i = t.split(",").filter(Boolean), r = this.historyState.split(",").filter(Boolean), a = r.length, o = i.length, n = i[i.length - 1] || "", s = ce.cssDurationToNumber(this.transitionDuration);
|
|
1691
|
+
let m = "";
|
|
1692
|
+
o > a ? m = "next" : o < a ? m = "prev" : o === a && i[o - 1] !== r[a - 1] && (m = "next"), this.viewDirection = `${m}-${n}`, setTimeout(() => {
|
|
1693
|
+
var y;
|
|
1694
|
+
this.historyState = t, (y = this.setView) == null || y.call(this, n);
|
|
1695
|
+
}, s), setTimeout(() => {
|
|
1696
|
+
this.viewDirection = "";
|
|
1697
|
+
}, s * 2);
|
|
1698
|
+
}
|
|
1699
|
+
getWrapper() {
|
|
1700
|
+
var t;
|
|
1701
|
+
return (t = this.shadowRoot) == null ? void 0 : t.querySelector("div.page");
|
|
1702
|
+
}
|
|
1703
|
+
updateContainerHeight() {
|
|
1704
|
+
var a;
|
|
1705
|
+
const t = this.getWrapper();
|
|
1706
|
+
if (!t)
|
|
1707
|
+
return;
|
|
1708
|
+
const i = parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--apkt-footer-height") || "0");
|
|
1709
|
+
let r = 0;
|
|
1710
|
+
if (this.mobileFullScreen) {
|
|
1711
|
+
const o = ((a = window.visualViewport) == null ? void 0 : a.height) || window.innerHeight, n = this.getHeaderHeight();
|
|
1712
|
+
r = o - n - i, this.style.setProperty("--local-border-bottom-radius", "0px");
|
|
1713
|
+
} else
|
|
1714
|
+
r = t.getBoundingClientRect().height + i, this.style.setProperty("--local-border-bottom-radius", i ? "var(--apkt-borderRadius-5)" : "0px");
|
|
1715
|
+
this.style.setProperty("--local-container-height", `${r}px`), this.previousHeight !== "0px" && this.style.setProperty("--local-duration-height", this.transitionDuration), this.previousHeight = `${r}px`;
|
|
1716
|
+
}
|
|
1717
|
+
getHeaderHeight() {
|
|
1718
|
+
return Ve;
|
|
1719
|
+
}
|
|
1720
|
+
};
|
|
1721
|
+
b.styles = [Le];
|
|
1722
|
+
W([
|
|
1723
|
+
l({ type: String })
|
|
1724
|
+
], b.prototype, "transitionDuration", void 0);
|
|
1725
|
+
W([
|
|
1726
|
+
l({ type: String })
|
|
1727
|
+
], b.prototype, "transitionFunction", void 0);
|
|
1728
|
+
W([
|
|
1729
|
+
l({ type: String })
|
|
1730
|
+
], b.prototype, "history", void 0);
|
|
1731
|
+
W([
|
|
1732
|
+
l({ type: String })
|
|
1733
|
+
], b.prototype, "view", void 0);
|
|
1734
|
+
W([
|
|
1735
|
+
l({ attribute: !1 })
|
|
1736
|
+
], b.prototype, "setView", void 0);
|
|
1737
|
+
W([
|
|
1738
|
+
u()
|
|
1739
|
+
], b.prototype, "viewDirection", void 0);
|
|
1740
|
+
W([
|
|
1741
|
+
u()
|
|
1742
|
+
], b.prototype, "historyState", void 0);
|
|
1743
|
+
W([
|
|
1744
|
+
u()
|
|
1745
|
+
], b.prototype, "previousHeight", void 0);
|
|
1746
|
+
W([
|
|
1747
|
+
u()
|
|
1748
|
+
], b.prototype, "mobileFullScreen", void 0);
|
|
1749
|
+
b = W([
|
|
1750
|
+
f("w3m-router-container")
|
|
1751
|
+
], b);
|
|
1752
|
+
export {
|
|
1753
|
+
se as AppKitModal,
|
|
1754
|
+
h as W3mListWallet,
|
|
1755
|
+
ne as W3mModal,
|
|
1756
|
+
x as W3mModalBase,
|
|
1757
|
+
b as W3mRouterContainer,
|
|
1758
|
+
Y as W3mUsageExceededView
|
|
1759
|
+
};
|