@lukso/transaction-view-core 0.3.1-dev.a8c9315
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/.turbo/turbo-build.log +33 -0
- package/CHANGELOG.md +104 -0
- package/LICENSE +201 -0
- package/README.md +264 -0
- package/dist/index.cjs +4573 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +493 -0
- package/dist/index.d.ts +493 -0
- package/dist/index.js +4534 -0
- package/dist/index.js.map +1 -0
- package/dist/shared/index.cjs +2480 -0
- package/dist/shared/index.cjs.map +1 -0
- package/dist/shared/index.d.cts +887 -0
- package/dist/shared/index.d.ts +887 -0
- package/dist/shared/index.js +2437 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/styles/index.cjs +58 -0
- package/dist/styles/index.cjs.map +1 -0
- package/dist/styles/index.d.cts +9 -0
- package/dist/styles/index.d.ts +9 -0
- package/dist/styles/index.js +31 -0
- package/dist/styles/index.js.map +1 -0
- package/package.json +57 -0
- package/publish.log +0 -0
- package/src/components/asset-card.ts +426 -0
- package/src/components/contract-card.ts +238 -0
- package/src/components/description-view.ts +605 -0
- package/src/components/index.ts +20 -0
- package/src/components/info-panel.ts +437 -0
- package/src/components/permissions-block.ts +138 -0
- package/src/components/transaction-playback.ts +429 -0
- package/src/components/universal-token-view.ts +281 -0
- package/src/declaration.d.ts +4 -0
- package/src/examples/INTEGRATION_GUIDE.md +240 -0
- package/src/examples/TransactionContentWithReplacement.vue +269 -0
- package/src/index.ts +38 -0
- package/src/registry/index.ts +31 -0
- package/src/registry/lit-view-loader.ts +191 -0
- package/src/shared/address-display.ts +370 -0
- package/src/shared/address-view.ts +385 -0
- package/src/shared/custom-select.ts +164 -0
- package/src/shared/function-name-view.ts +89 -0
- package/src/shared/gas-provider-view.ts +218 -0
- package/src/shared/icon-view.ts +288 -0
- package/src/shared/image-list.ts +261 -0
- package/src/shared/image-loader-controller.ts +160 -0
- package/src/shared/index.ts +34 -0
- package/src/shared/load-web-components.ts +56 -0
- package/src/shared/notification-view.ts +132 -0
- package/src/shared/progress-view.ts +86 -0
- package/src/shared/safe-custom-element.ts +35 -0
- package/src/shared/scroll-to-bottom-button.ts +55 -0
- package/src/shared/signal-controller.ts +124 -0
- package/src/shared/transaction-view-controller.ts +345 -0
- package/src/shared/url-view.ts +129 -0
- package/src/shared/value-view.ts +510 -0
- package/src/styles/index.ts +28 -0
- package/src/styles/styles.css +1 -0
- package/src/vue-entry.ts +15 -0
- package/tailwind.config.cjs +9 -0
- package/tsconfig.json +22 -0
- package/tsup.config.ts +90 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,4534 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// src/shared/address-display.ts
|
|
13
|
+
import { Task } from "@lit/task";
|
|
14
|
+
import {
|
|
15
|
+
useAddressResolver,
|
|
16
|
+
useImageLoader
|
|
17
|
+
} from "@lukso/transaction-view-headless";
|
|
18
|
+
import { css, html, LitElement } from "lit";
|
|
19
|
+
import { property, state } from "lit/decorators.js";
|
|
20
|
+
|
|
21
|
+
// src/shared/safe-custom-element.ts
|
|
22
|
+
function safeCustomElement(tagName) {
|
|
23
|
+
return (classOrDescriptor) => {
|
|
24
|
+
if (typeof customElements !== "undefined" && !customElements.get(tagName)) {
|
|
25
|
+
customElements.define(tagName, classOrDescriptor);
|
|
26
|
+
}
|
|
27
|
+
return classOrDescriptor;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// src/shared/address-display.ts
|
|
32
|
+
var AddressDisplay = class extends LitElement {
|
|
33
|
+
constructor() {
|
|
34
|
+
super(...arguments);
|
|
35
|
+
this.size = "small";
|
|
36
|
+
this.showCopyButton = false;
|
|
37
|
+
this.nameOnly = false;
|
|
38
|
+
this.maxWidth = 200;
|
|
39
|
+
this.isLoadingImage = false;
|
|
40
|
+
// Composables
|
|
41
|
+
this.imageLoader = useImageLoader();
|
|
42
|
+
this.addressResolver = useAddressResolver();
|
|
43
|
+
// Task for loading profile image
|
|
44
|
+
this.imageTask = new Task(this, {
|
|
45
|
+
task: async ([resolved], { signal }) => {
|
|
46
|
+
if (!resolved) return null;
|
|
47
|
+
this.isLoadingImage = true;
|
|
48
|
+
try {
|
|
49
|
+
const image = await this.imageLoader.loadProfileImage(resolved, {
|
|
50
|
+
width: this.getSizePixels(),
|
|
51
|
+
height: this.getSizePixels(),
|
|
52
|
+
dpr: window.devicePixelRatio || 1
|
|
53
|
+
});
|
|
54
|
+
return image || this.imageLoader.getFallbackImage(resolved);
|
|
55
|
+
} catch (error) {
|
|
56
|
+
console.warn("Failed to load address image:", error);
|
|
57
|
+
return this.imageLoader.getFallbackImage(resolved || {});
|
|
58
|
+
} finally {
|
|
59
|
+
this.isLoadingImage = false;
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
args: () => [this.resolved]
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Get the effective address value (supports both `value` and legacy `address` props)
|
|
67
|
+
*/
|
|
68
|
+
get effectiveAddress() {
|
|
69
|
+
return this.value || this.address || "";
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Get pixel size for the current size setting
|
|
73
|
+
*/
|
|
74
|
+
getSizePixels() {
|
|
75
|
+
switch (this.size) {
|
|
76
|
+
case "x-small":
|
|
77
|
+
return 16;
|
|
78
|
+
case "small":
|
|
79
|
+
return 24;
|
|
80
|
+
case "medium":
|
|
81
|
+
return 32;
|
|
82
|
+
case "large":
|
|
83
|
+
return 48;
|
|
84
|
+
default:
|
|
85
|
+
return 24;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Get display name for the address
|
|
90
|
+
*/
|
|
91
|
+
getDisplayName() {
|
|
92
|
+
if (!this.resolved) return "Anonymous";
|
|
93
|
+
const computedName = this.addressResolver.formatDisplayName(this.resolved);
|
|
94
|
+
return computedName || "Anonymous";
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Check if this is a contract address (shows square icon)
|
|
98
|
+
*/
|
|
99
|
+
get isContract() {
|
|
100
|
+
return this.resolved ? this.imageLoader.isContractAddress(this.resolved) : false;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Get prefix for the address display
|
|
104
|
+
*/
|
|
105
|
+
get addressPrefix() {
|
|
106
|
+
return this.resolved ? this.addressResolver.getAddressPrefix(this.resolved) : "@";
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Check if should show name colors
|
|
110
|
+
*/
|
|
111
|
+
get shouldShowNameColor() {
|
|
112
|
+
return this.resolved ? this.addressResolver.shouldShowNameColor(this.resolved) : true;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Handle copy button click
|
|
116
|
+
*/
|
|
117
|
+
handleCopy() {
|
|
118
|
+
if (navigator.clipboard) {
|
|
119
|
+
navigator.clipboard.writeText(this.effectiveAddress);
|
|
120
|
+
this.dispatchEvent(
|
|
121
|
+
new CustomEvent("address-copied", {
|
|
122
|
+
detail: { address: this.effectiveAddress },
|
|
123
|
+
bubbles: true
|
|
124
|
+
})
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Handle address click
|
|
130
|
+
*/
|
|
131
|
+
handleAddressClick() {
|
|
132
|
+
this.dispatchEvent(
|
|
133
|
+
new CustomEvent("address-click", {
|
|
134
|
+
detail: {
|
|
135
|
+
address: this.effectiveAddress,
|
|
136
|
+
resolved: this.resolved
|
|
137
|
+
},
|
|
138
|
+
bubbles: true
|
|
139
|
+
})
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
render() {
|
|
143
|
+
const imageResult = this.imageTask.value;
|
|
144
|
+
return html`
|
|
145
|
+
<div class="address-container">
|
|
146
|
+
${this.label ? html`<div class="label">${this.label}</div>` : ""}
|
|
147
|
+
|
|
148
|
+
<div class="address-display" @click=${this.handleAddressClick}>
|
|
149
|
+
<!-- Identity prefix (if present) -->
|
|
150
|
+
${this.resolved?.__identity ? html`
|
|
151
|
+
<span class="identity">
|
|
152
|
+
${this.resolved.__identity}
|
|
153
|
+
<lukso-username
|
|
154
|
+
address=${this.resolved.identity}
|
|
155
|
+
size=${this.size}
|
|
156
|
+
max-width="200"
|
|
157
|
+
has-name-color="false"
|
|
158
|
+
has-address-color="false"
|
|
159
|
+
></lukso-username>
|
|
160
|
+
of
|
|
161
|
+
</span>
|
|
162
|
+
` : ""}
|
|
163
|
+
|
|
164
|
+
<!-- Profile image and name -->
|
|
165
|
+
<lukso-profile
|
|
166
|
+
size=${this.size}
|
|
167
|
+
profile-address=${this.effectiveAddress}
|
|
168
|
+
profile-url=${imageResult?.src || ""}
|
|
169
|
+
has-identicon
|
|
170
|
+
?is-square=${this.isContract}
|
|
171
|
+
></lukso-profile>
|
|
172
|
+
|
|
173
|
+
<!-- Address/Name display -->
|
|
174
|
+
${this.nameOnly ? html`
|
|
175
|
+
<lukso-username
|
|
176
|
+
name=${this.getDisplayName()}
|
|
177
|
+
size=${this.size}
|
|
178
|
+
max-width=${this.maxWidth}
|
|
179
|
+
prefix=${this.addressPrefix}
|
|
180
|
+
?has-name-color=${this.shouldShowNameColor}
|
|
181
|
+
has-address-color="false"
|
|
182
|
+
></lukso-username>
|
|
183
|
+
` : html`
|
|
184
|
+
<lukso-username
|
|
185
|
+
name=${this.getDisplayName()}
|
|
186
|
+
address=${!this.isContract ? this.effectiveAddress : void 0}
|
|
187
|
+
size=${this.size}
|
|
188
|
+
max-width=${this.maxWidth}
|
|
189
|
+
prefix=${this.addressPrefix}
|
|
190
|
+
?has-name-color=${this.shouldShowNameColor}
|
|
191
|
+
?has-address-color=${this.shouldShowNameColor}
|
|
192
|
+
></lukso-username>
|
|
193
|
+
`}
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
<!-- Copy button -->
|
|
197
|
+
${this.showCopyButton ? html`
|
|
198
|
+
<button
|
|
199
|
+
class="copy-button"
|
|
200
|
+
@click=${this.handleCopy}
|
|
201
|
+
title="Copy address"
|
|
202
|
+
>
|
|
203
|
+
📋
|
|
204
|
+
</button>
|
|
205
|
+
` : ""}
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
`;
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
AddressDisplay.styles = css`
|
|
212
|
+
:host {
|
|
213
|
+
display: inline-block;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.address-container {
|
|
217
|
+
display: flex;
|
|
218
|
+
flex-direction: column;
|
|
219
|
+
gap: 4px;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.label {
|
|
223
|
+
font-size: 12px;
|
|
224
|
+
color: var(--neutral-60, #666);
|
|
225
|
+
font-weight: 500;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.address-display {
|
|
229
|
+
display: inline-flex;
|
|
230
|
+
align-items: center;
|
|
231
|
+
gap: 8px;
|
|
232
|
+
cursor: pointer;
|
|
233
|
+
padding: 4px;
|
|
234
|
+
border-radius: 4px;
|
|
235
|
+
transition: background-color 0.2s;
|
|
236
|
+
min-width: 200px;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.address-display:hover {
|
|
240
|
+
background-color: var(--neutral-95, #f5f5f5);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.identity {
|
|
244
|
+
font-size: 12px;
|
|
245
|
+
color: var(--neutral-60, #666);
|
|
246
|
+
margin-right: 4px;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.copy-button {
|
|
250
|
+
background: none;
|
|
251
|
+
border: 1px solid var(--neutral-80, #ccc);
|
|
252
|
+
border-radius: 4px;
|
|
253
|
+
padding: 2px 4px;
|
|
254
|
+
cursor: pointer;
|
|
255
|
+
font-size: 12px;
|
|
256
|
+
opacity: 0;
|
|
257
|
+
transition: opacity 0.2s;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.copy-button:hover {
|
|
261
|
+
background-color: var(--neutral-90, #eee);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.address-display:hover .copy-button {
|
|
265
|
+
opacity: 1;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
/* Ensure LUKSO web components are properly styled */
|
|
270
|
+
lukso-profile,
|
|
271
|
+
lukso-username {
|
|
272
|
+
display: inline-flex;
|
|
273
|
+
align-items: center;
|
|
274
|
+
}
|
|
275
|
+
`;
|
|
276
|
+
__decorateClass([
|
|
277
|
+
property()
|
|
278
|
+
], AddressDisplay.prototype, "value", 2);
|
|
279
|
+
__decorateClass([
|
|
280
|
+
property()
|
|
281
|
+
], AddressDisplay.prototype, "address", 2);
|
|
282
|
+
__decorateClass([
|
|
283
|
+
property({ type: Object })
|
|
284
|
+
], AddressDisplay.prototype, "resolved", 2);
|
|
285
|
+
__decorateClass([
|
|
286
|
+
property()
|
|
287
|
+
], AddressDisplay.prototype, "size", 2);
|
|
288
|
+
__decorateClass([
|
|
289
|
+
property()
|
|
290
|
+
], AddressDisplay.prototype, "label", 2);
|
|
291
|
+
__decorateClass([
|
|
292
|
+
property({ type: Boolean, attribute: "show-copy-button" })
|
|
293
|
+
], AddressDisplay.prototype, "showCopyButton", 2);
|
|
294
|
+
__decorateClass([
|
|
295
|
+
property({ type: Boolean, attribute: "name-only" })
|
|
296
|
+
], AddressDisplay.prototype, "nameOnly", 2);
|
|
297
|
+
__decorateClass([
|
|
298
|
+
property({ type: Number, attribute: "max-width" })
|
|
299
|
+
], AddressDisplay.prototype, "maxWidth", 2);
|
|
300
|
+
__decorateClass([
|
|
301
|
+
state()
|
|
302
|
+
], AddressDisplay.prototype, "imageData", 2);
|
|
303
|
+
__decorateClass([
|
|
304
|
+
state()
|
|
305
|
+
], AddressDisplay.prototype, "isLoadingImage", 2);
|
|
306
|
+
AddressDisplay = __decorateClass([
|
|
307
|
+
safeCustomElement("address-display")
|
|
308
|
+
], AddressDisplay);
|
|
309
|
+
|
|
310
|
+
// src/shared/address-view.ts
|
|
311
|
+
import { Task as Task2 } from "@lit/task";
|
|
312
|
+
import { useAddressResolver as useAddressResolver2 } from "@lukso/transaction-view-headless";
|
|
313
|
+
import makeBlockie from "ethereum-blockies-base64";
|
|
314
|
+
import { html as html2 } from "lit";
|
|
315
|
+
import { property as property2, state as state2 } from "lit/decorators.js";
|
|
316
|
+
|
|
317
|
+
// src/shared/load-web-components.ts
|
|
318
|
+
var originalDefine = typeof customElements !== "undefined" ? customElements.define.bind(customElements) : null;
|
|
319
|
+
if (typeof customElements !== "undefined" && originalDefine) {
|
|
320
|
+
customElements.define = function(name, constructor, options) {
|
|
321
|
+
if (!customElements.get(name)) {
|
|
322
|
+
originalDefine(name, constructor, options);
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
if (originalDefine && typeof customElements !== "undefined") {
|
|
327
|
+
customElements.define = originalDefine;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// src/styles/styles.css?__raw__
|
|
331
|
+
var styles_default = '/**\n * @file Main styles\n *\n * This file contain general styles that should be applied to host page.\n */\n:root {\n --neutral-10: #121b21;\n --neutral-15: #1b2832;\n --neutral-20: #243542;\n --neutral-25: #2d4253;\n --neutral-30: #365063;\n --neutral-35: #3e5d74;\n --neutral-40: #476a85;\n --neutral-45: #507795;\n --neutral-50: #5985a6;\n --neutral-55: #6a91af;\n --neutral-60: #7a9db8;\n --neutral-65: #8ba9c1;\n --neutral-70: #9cb6c9;\n --neutral-75: #acc2d2;\n --neutral-80: #bdcedb;\n --neutral-85: #cddae4;\n --neutral-90: #dee7ed;\n --neutral-95: #eef3f6;\n --neutral-97: #f5f8fa;\n --neutral-98: #f8fafb;\n --neutral-100: #ffffff;\n --honey-72: #fad275;\n --honey-75: #fbd784;\n --honey-82: #fce2a6;\n --honey-85: #fce7b5;\n --honey-92: #fef2d8;\n --coral-65: #f37c58;\n --coral-74: #f69e83;\n --coral-75: #f7a288;\n --coral-84: #fac3b3;\n --coral-85: #fac7b7;\n --coral-94: #fde9e2;\n --warm-77: #ffbb8a;\n --warm-87: #ffd8bd;\n --warm-97: #fff6f0;\n --sea-salt-57: #7fa4a4;\n --sea-salt-67: #9db9b9;\n --sea-salt-88: #dbe6e6;\n --cloud-43: #447c97;\n --cloud-75: #a7c7d7;\n --cloud-88: #d5e4ec;\n --ocean-38: #3c6286;\n --ocean-75: #a7c0d7;\n --ocean-88: #d5e1ec;\n --sky-64: #68a5de;\n --sky-75: #96c1e8;\n --sky-85: #c0daf1;\n --lukso-50: #aa5578;\n --lukso-60: #bb7793;\n --lukso-70: #cc99ae;\n --lukso-80: #ddbbc9;\n --lukso-90: #eedde4;\n --yellow-25: #804d00;\n --yellow-55: #ffa31a;\n --yellow-65: #ffb84d;\n --yellow-75: #ffcc80;\n --yellow-85: #ffe0b3;\n --yellow-95: #fff5e5;\n --green-45: #31b452;\n --green-54: #47cd68;\n --green-63: #6bd686;\n --green-75: #9be4ad;\n --green-85: #c3efce;\n --green-95: #ebfaef;\n --blue-40: #0452c8;\n --blue-50: #0567fa;\n --blue-60: #3785fb;\n --blue-75: #82b3fc;\n --blue-85: #b4d1fd;\n --blue-95: #e6f0fe;\n --red-55: #e23636;\n --red-65: #e96363;\n --red-75: #ef8f8f;\n --red-85: #f5bcbc;\n --red-95: #fce9e9;\n --purple-15: #1d202f;\n --purple-18: #232739;\n --purple-31: #3c4262;\n --purple-41: #4f5882;\n --purple-51: #646ea0;\n --purple-58: #7a83ae;\n --purple-63: #8a92b7;\n --purple-82: #c6cadc;\n --purple-94: #ecedf3;\n --pink-90: #f8dad3;\n --pink-91: #f9ddd7;\n --pink-92: #f9e1dc;\n --pink-93: #fae5e0;\n --pink-94: #fbe9e5;\n --pink-95: #fcece9;\n --pink-96: #fcf0ed;\n --pink-97: #fdf4f2;\n --measure-50: #e8178a;\n --measure-70: #f174b9;\n --measure-80: #f6a2d0;\n --measure-97: #fef1f8;\n --grey-10: #1a1a1a;\n --grey-15: #262626;\n --grey-20: #333333;\n --grey-25: #404040;\n --grey-30: #4d4d4d;\n --grey-35: #595959;\n --grey-40: #666666;\n --grey-45: #737373;\n --grey-50: #808080;\n --grey-55: #8c8c8c;\n --grey-60: #999999;\n --grey-65: #a6a6a6;\n --grey-70: #b3b3b3;\n --grey-75: #bfbfbf;\n --grey-80: #cccccc;\n --gradient-1-start: #D39B9D;\n --gradient-1-end: #9071D1;\n --gradient-2-start: #F8DAD3;\n --gradient-2-end: #CC99AE;\n --gradient-3-start: #393e56;\n --gradient-3-end: #646ea0;\n}\n/**\n * @file Fonts\n *\n * This file contains all fonts used in designs.\n */\n@font-face {\n font-family: Inter;\n src: url("/assets/fonts/Inter-Regular.woff2") format("woff2");\n font-weight: normal;\n font-style: normal;\n font-display: swap;\n}\n@font-face {\n font-family: Inter;\n src: url("/assets/fonts/Inter-ExtraBold.woff2") format("woff2");\n font-weight: 800;\n font-style: normal;\n font-display: swap;\n}\n@font-face {\n font-family: Inter;\n src: url("/assets/fonts/Inter-Bold.woff2") format("woff2");\n font-weight: bold;\n font-style: normal;\n font-display: swap;\n}\n@font-face {\n font-family: Inter;\n src: url("/assets/fonts/Inter-SemiBold.woff2") format("woff2");\n font-weight: 600;\n font-style: normal;\n font-display: swap;\n}\n@font-face {\n font-family: Inter;\n src: url("/assets/fonts/Inter-Medium.woff2") format("woff2");\n font-weight: 500;\n font-style: normal;\n font-display: swap;\n}\n@font-face {\n font-family: Inter;\n src: url("/assets/fonts/Inter-Thin.woff2") format("woff2");\n font-weight: 100;\n font-style: normal;\n font-display: swap;\n}\n@font-face {\n font-family: "PT Mono";\n src: url("/assets/fonts/PT-Mono-Regular.woff2") format("woff2");\n font-weight: normal;\n font-style: normal;\n}\n@font-face {\n font-family: "PT Mono";\n src: url("/assets/fonts/PT-Mono-Bold.woff2") format("woff2");\n font-weight: bold;\n font-style: normal;\n}\n/**\n * @file Typography\n *\n * This file contains all typography classes used in designs.\n * They should be used instead of individual font attributes.\n *\n * You can use them same as the normal Tailwind classes, e.g.: class="heading-inter-26-semi-bold"\n */\n/**\n * @file Variables\n *\n * This file contains all CSS variables used in designs.\n */\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0;\n}\n.tippy-arrow::before {\n content: "";\n position: absolute;\n border-color: transparent;\n border-style: solid;\n}\n.tippy-box[data-placement^=top] > .tippy-arrow::before {\n border-top-color: initial;\n transform-origin: center top;\n}\n.tippy-box[data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: initial;\n transform-origin: center bottom;\n}\n.tippy-box[data-placement^=left] > .tippy-arrow::before {\n border-left-color: initial;\n transform-origin: center left;\n}\n.tippy-box[data-placement^=right] > .tippy-arrow::before {\n border-right-color: initial;\n transform-origin: center right;\n}\n.tippy-box[data-inertia][data-state=visible] {\n transition-timing-function: cubic-bezier(0.54, 1.5, 0.38, 1.11);\n}\n.tippy-arrow {\n width: 16px;\n height: 16px;\n}\n.tippy-size-medium {\n border-radius: 4px;\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 10px;\n font-weight: 600;\n font-style: normal;\n line-height: 12px;\n --tw-shadow: 0px 27px 12px 0px rgba(63, 93, 116, 0.00), 0px 18px 7px 0px rgba(63, 93, 116, 0.02), 0px 10px 6px 0px rgba(63, 93, 116, 0.08), 0px 4px 4px 0px rgba(63, 93, 116, 0.13), 0px 1px 2px 0px rgba(63, 93, 116, 0.15), 0px 0px 14px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 27px 12px 0px var(--tw-shadow-color), 0px 18px 7px 0px var(--tw-shadow-color), 0px 10px 6px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color), 0px 1px 2px 0px var(--tw-shadow-color), 0px 0px 14px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.tippy-size-medium[data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n.tippy-size-medium[data-placement^=top] > .tippy-arrow::before {\n bottom: -6px;\n left: 2px;\n border-width: 6px 6px 0;\n}\n.tippy-size-medium[data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n.tippy-size-medium[data-placement^=bottom] > .tippy-arrow::before {\n top: -6px;\n left: 2px;\n border-width: 0 6px 6px;\n}\n.tippy-size-medium[data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n.tippy-size-medium[data-placement^=left] > .tippy-arrow::before {\n border-width: 6px 0 6px 6px;\n right: -6px;\n top: 2px;\n}\n.tippy-size-medium[data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n.tippy-size-medium[data-placement^=right] > .tippy-arrow::before {\n left: -6px;\n top: 2px;\n border-width: 6px 6px 6px 0;\n}\n.tippy-size-large {\n border-radius: 8px;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 12px;\n font-weight: 400;\n font-style: normal;\n line-height: 20px;\n --tw-shadow: 0px 27px 12px 0px rgba(63, 93, 116, 0.00), 0px 18px 7px 0px rgba(63, 93, 116, 0.02), 0px 10px 6px 0px rgba(63, 93, 116, 0.08), 0px 4px 4px 0px rgba(63, 93, 116, 0.13), 0px 1px 2px 0px rgba(63, 93, 116, 0.15), 0px 0px 14px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 27px 12px 0px var(--tw-shadow-color), 0px 18px 7px 0px var(--tw-shadow-color), 0px 10px 6px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color), 0px 1px 2px 0px var(--tw-shadow-color), 0px 0px 14px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.tippy-size-large[data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n.tippy-size-large[data-placement^=top] > .tippy-arrow::before {\n bottom: -8px;\n left: 0;\n border-width: 8px 8px 0;\n}\n.tippy-size-large[data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n.tippy-size-large[data-placement^=bottom] > .tippy-arrow::before {\n top: -8px;\n left: 0;\n border-width: 0 8px 8px;\n}\n.tippy-size-large[data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n.tippy-size-large[data-placement^=left] > .tippy-arrow::before {\n border-width: 8px 0 8px 8px;\n right: -8px;\n}\n.tippy-size-large[data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n.tippy-size-large[data-placement^=right] > .tippy-arrow::before {\n left: -8px;\n border-width: 8px 8px 8px 0;\n}\n.tippy-variant-dark {\n --tw-bg-opacity: 1;\n background-color: rgb(54 80 99 / var(--tw-bg-opacity, 1));\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.tippy-variant-dark[data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(54 80 99 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-dark[data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(54 80 99 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-dark[data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(54 80 99 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-dark[data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(54 80 99 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-dark > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(54 80 99 / var(--tw-bg-opacity, 1));\n}\n.tippy-variant-dark > .tippy-svg-arrow {\n fill: #365063;\n}\n.tippy-variant-light {\n --tw-bg-opacity: 1;\n background-color: rgb(245 248 250 / var(--tw-bg-opacity, 1));\n --tw-text-opacity: 1;\n color: rgb(36 53 66 / var(--tw-text-opacity, 1));\n}\n.tippy-variant-light[data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(245 248 250 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-light[data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(245 248 250 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-light[data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(245 248 250 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-light[data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(245 248 250 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-light > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(245 248 250 / var(--tw-bg-opacity, 1));\n}\n.tippy-variant-light > .tippy-svg-arrow {\n fill: #f5f8fa;\n}\n.tippy-variant-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n --tw-text-opacity: 1;\n color: rgb(36 53 66 / var(--tw-text-opacity, 1));\n}\n.tippy-variant-white[data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(255 255 255 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-white[data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(255 255 255 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-white[data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(255 255 255 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-white[data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(255 255 255 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-white > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n.tippy-variant-white > .tippy-svg-arrow {\n fill: #ffffff;\n}\n.tippy-variant-success {\n --tw-bg-opacity: 1;\n background-color: rgb(71 205 104 / var(--tw-bg-opacity, 1));\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.tippy-variant-success[data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(71 205 104 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-success[data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(71 205 104 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-success[data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(71 205 104 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-success[data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(71 205 104 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-success > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(71 205 104 / var(--tw-bg-opacity, 1));\n}\n.tippy-variant-success > .tippy-svg-arrow {\n fill: #47cd68;\n}\n.tippy-variant-danger {\n --tw-bg-opacity: 1;\n background-color: rgb(233 99 99 / var(--tw-bg-opacity, 1));\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.tippy-variant-danger[data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(233 99 99 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-danger[data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(233 99 99 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-danger[data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(233 99 99 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-danger[data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(233 99 99 / var(--tw-border-opacity, 1));\n}\n.tippy-variant-danger > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(233 99 99 / var(--tw-bg-opacity, 1));\n}\n.tippy-variant-danger > .tippy-svg-arrow {\n fill: #e96363;\n}\n.tippy-box[data-theme~=dark-medium] {\n border-radius: 4px;\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 10px;\n font-weight: 600;\n font-style: normal;\n line-height: 12px;\n --tw-shadow: 0px 27px 12px 0px rgba(63, 93, 116, 0.00), 0px 18px 7px 0px rgba(63, 93, 116, 0.02), 0px 10px 6px 0px rgba(63, 93, 116, 0.08), 0px 4px 4px 0px rgba(63, 93, 116, 0.13), 0px 1px 2px 0px rgba(63, 93, 116, 0.15), 0px 0px 14px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 27px 12px 0px var(--tw-shadow-color), 0px 18px 7px 0px var(--tw-shadow-color), 0px 10px 6px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color), 0px 1px 2px 0px var(--tw-shadow-color), 0px 0px 14px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.tippy-box[data-theme~=dark-medium][data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n.tippy-box[data-theme~=dark-medium][data-placement^=top] > .tippy-arrow::before {\n bottom: -6px;\n left: 2px;\n border-width: 6px 6px 0;\n}\n.tippy-box[data-theme~=dark-medium][data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n.tippy-box[data-theme~=dark-medium][data-placement^=bottom] > .tippy-arrow::before {\n top: -6px;\n left: 2px;\n border-width: 0 6px 6px;\n}\n.tippy-box[data-theme~=dark-medium][data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n.tippy-box[data-theme~=dark-medium][data-placement^=left] > .tippy-arrow::before {\n border-width: 6px 0 6px 6px;\n right: -6px;\n top: 2px;\n}\n.tippy-box[data-theme~=dark-medium][data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n.tippy-box[data-theme~=dark-medium][data-placement^=right] > .tippy-arrow::before {\n left: -6px;\n top: 2px;\n border-width: 6px 6px 6px 0;\n}\n.tippy-box[data-theme~=dark-medium] {\n --tw-bg-opacity: 1;\n background-color: rgb(54 80 99 / var(--tw-bg-opacity, 1));\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.tippy-box[data-theme~=dark-medium][data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(54 80 99 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=dark-medium][data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(54 80 99 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=dark-medium][data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(54 80 99 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=dark-medium][data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(54 80 99 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=dark-medium] > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(54 80 99 / var(--tw-bg-opacity, 1));\n}\n.tippy-box[data-theme~=dark-medium] > .tippy-svg-arrow {\n fill: #365063;\n}\n.tippy-box[data-theme~=dark-large] {\n border-radius: 8px;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 12px;\n font-weight: 400;\n font-style: normal;\n line-height: 20px;\n --tw-shadow: 0px 27px 12px 0px rgba(63, 93, 116, 0.00), 0px 18px 7px 0px rgba(63, 93, 116, 0.02), 0px 10px 6px 0px rgba(63, 93, 116, 0.08), 0px 4px 4px 0px rgba(63, 93, 116, 0.13), 0px 1px 2px 0px rgba(63, 93, 116, 0.15), 0px 0px 14px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 27px 12px 0px var(--tw-shadow-color), 0px 18px 7px 0px var(--tw-shadow-color), 0px 10px 6px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color), 0px 1px 2px 0px var(--tw-shadow-color), 0px 0px 14px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.tippy-box[data-theme~=dark-large][data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n.tippy-box[data-theme~=dark-large][data-placement^=top] > .tippy-arrow::before {\n bottom: -8px;\n left: 0;\n border-width: 8px 8px 0;\n}\n.tippy-box[data-theme~=dark-large][data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n.tippy-box[data-theme~=dark-large][data-placement^=bottom] > .tippy-arrow::before {\n top: -8px;\n left: 0;\n border-width: 0 8px 8px;\n}\n.tippy-box[data-theme~=dark-large][data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n.tippy-box[data-theme~=dark-large][data-placement^=left] > .tippy-arrow::before {\n border-width: 8px 0 8px 8px;\n right: -8px;\n}\n.tippy-box[data-theme~=dark-large][data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n.tippy-box[data-theme~=dark-large][data-placement^=right] > .tippy-arrow::before {\n left: -8px;\n border-width: 8px 8px 8px 0;\n}\n.tippy-box[data-theme~=dark-large] {\n --tw-bg-opacity: 1;\n background-color: rgb(54 80 99 / var(--tw-bg-opacity, 1));\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.tippy-box[data-theme~=dark-large][data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(54 80 99 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=dark-large][data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(54 80 99 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=dark-large][data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(54 80 99 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=dark-large][data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(54 80 99 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=dark-large] > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(54 80 99 / var(--tw-bg-opacity, 1));\n}\n.tippy-box[data-theme~=dark-large] > .tippy-svg-arrow {\n fill: #365063;\n}\n.tippy-box[data-theme~=light-medium] {\n border-radius: 4px;\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 10px;\n font-weight: 600;\n font-style: normal;\n line-height: 12px;\n --tw-shadow: 0px 27px 12px 0px rgba(63, 93, 116, 0.00), 0px 18px 7px 0px rgba(63, 93, 116, 0.02), 0px 10px 6px 0px rgba(63, 93, 116, 0.08), 0px 4px 4px 0px rgba(63, 93, 116, 0.13), 0px 1px 2px 0px rgba(63, 93, 116, 0.15), 0px 0px 14px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 27px 12px 0px var(--tw-shadow-color), 0px 18px 7px 0px var(--tw-shadow-color), 0px 10px 6px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color), 0px 1px 2px 0px var(--tw-shadow-color), 0px 0px 14px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.tippy-box[data-theme~=light-medium][data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n.tippy-box[data-theme~=light-medium][data-placement^=top] > .tippy-arrow::before {\n bottom: -6px;\n left: 2px;\n border-width: 6px 6px 0;\n}\n.tippy-box[data-theme~=light-medium][data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n.tippy-box[data-theme~=light-medium][data-placement^=bottom] > .tippy-arrow::before {\n top: -6px;\n left: 2px;\n border-width: 0 6px 6px;\n}\n.tippy-box[data-theme~=light-medium][data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n.tippy-box[data-theme~=light-medium][data-placement^=left] > .tippy-arrow::before {\n border-width: 6px 0 6px 6px;\n right: -6px;\n top: 2px;\n}\n.tippy-box[data-theme~=light-medium][data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n.tippy-box[data-theme~=light-medium][data-placement^=right] > .tippy-arrow::before {\n left: -6px;\n top: 2px;\n border-width: 6px 6px 6px 0;\n}\n.tippy-box[data-theme~=light-medium] {\n --tw-bg-opacity: 1;\n background-color: rgb(245 248 250 / var(--tw-bg-opacity, 1));\n --tw-text-opacity: 1;\n color: rgb(36 53 66 / var(--tw-text-opacity, 1));\n}\n.tippy-box[data-theme~=light-medium][data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(245 248 250 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=light-medium][data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(245 248 250 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=light-medium][data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(245 248 250 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=light-medium][data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(245 248 250 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=light-medium] > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(245 248 250 / var(--tw-bg-opacity, 1));\n}\n.tippy-box[data-theme~=light-medium] > .tippy-svg-arrow {\n fill: #f5f8fa;\n}\n.tippy-box[data-theme~=light-large] {\n border-radius: 8px;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 12px;\n font-weight: 400;\n font-style: normal;\n line-height: 20px;\n --tw-shadow: 0px 27px 12px 0px rgba(63, 93, 116, 0.00), 0px 18px 7px 0px rgba(63, 93, 116, 0.02), 0px 10px 6px 0px rgba(63, 93, 116, 0.08), 0px 4px 4px 0px rgba(63, 93, 116, 0.13), 0px 1px 2px 0px rgba(63, 93, 116, 0.15), 0px 0px 14px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 27px 12px 0px var(--tw-shadow-color), 0px 18px 7px 0px var(--tw-shadow-color), 0px 10px 6px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color), 0px 1px 2px 0px var(--tw-shadow-color), 0px 0px 14px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.tippy-box[data-theme~=light-large][data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n.tippy-box[data-theme~=light-large][data-placement^=top] > .tippy-arrow::before {\n bottom: -8px;\n left: 0;\n border-width: 8px 8px 0;\n}\n.tippy-box[data-theme~=light-large][data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n.tippy-box[data-theme~=light-large][data-placement^=bottom] > .tippy-arrow::before {\n top: -8px;\n left: 0;\n border-width: 0 8px 8px;\n}\n.tippy-box[data-theme~=light-large][data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n.tippy-box[data-theme~=light-large][data-placement^=left] > .tippy-arrow::before {\n border-width: 8px 0 8px 8px;\n right: -8px;\n}\n.tippy-box[data-theme~=light-large][data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n.tippy-box[data-theme~=light-large][data-placement^=right] > .tippy-arrow::before {\n left: -8px;\n border-width: 8px 8px 8px 0;\n}\n.tippy-box[data-theme~=light-large] {\n --tw-bg-opacity: 1;\n background-color: rgb(245 248 250 / var(--tw-bg-opacity, 1));\n --tw-text-opacity: 1;\n color: rgb(36 53 66 / var(--tw-text-opacity, 1));\n}\n.tippy-box[data-theme~=light-large][data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(245 248 250 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=light-large][data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(245 248 250 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=light-large][data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(245 248 250 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=light-large][data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(245 248 250 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=light-large] > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(245 248 250 / var(--tw-bg-opacity, 1));\n}\n.tippy-box[data-theme~=light-large] > .tippy-svg-arrow {\n fill: #f5f8fa;\n}\n.tippy-box[data-theme~=white-medium] {\n border-radius: 4px;\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 10px;\n font-weight: 600;\n font-style: normal;\n line-height: 12px;\n --tw-shadow: 0px 27px 12px 0px rgba(63, 93, 116, 0.00), 0px 18px 7px 0px rgba(63, 93, 116, 0.02), 0px 10px 6px 0px rgba(63, 93, 116, 0.08), 0px 4px 4px 0px rgba(63, 93, 116, 0.13), 0px 1px 2px 0px rgba(63, 93, 116, 0.15), 0px 0px 14px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 27px 12px 0px var(--tw-shadow-color), 0px 18px 7px 0px var(--tw-shadow-color), 0px 10px 6px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color), 0px 1px 2px 0px var(--tw-shadow-color), 0px 0px 14px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.tippy-box[data-theme~=white-medium][data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n.tippy-box[data-theme~=white-medium][data-placement^=top] > .tippy-arrow::before {\n bottom: -6px;\n left: 2px;\n border-width: 6px 6px 0;\n}\n.tippy-box[data-theme~=white-medium][data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n.tippy-box[data-theme~=white-medium][data-placement^=bottom] > .tippy-arrow::before {\n top: -6px;\n left: 2px;\n border-width: 0 6px 6px;\n}\n.tippy-box[data-theme~=white-medium][data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n.tippy-box[data-theme~=white-medium][data-placement^=left] > .tippy-arrow::before {\n border-width: 6px 0 6px 6px;\n right: -6px;\n top: 2px;\n}\n.tippy-box[data-theme~=white-medium][data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n.tippy-box[data-theme~=white-medium][data-placement^=right] > .tippy-arrow::before {\n left: -6px;\n top: 2px;\n border-width: 6px 6px 6px 0;\n}\n.tippy-box[data-theme~=white-medium] {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n --tw-text-opacity: 1;\n color: rgb(36 53 66 / var(--tw-text-opacity, 1));\n}\n.tippy-box[data-theme~=white-medium][data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(255 255 255 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=white-medium][data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(255 255 255 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=white-medium][data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(255 255 255 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=white-medium][data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(255 255 255 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=white-medium] > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n.tippy-box[data-theme~=white-medium] > .tippy-svg-arrow {\n fill: #ffffff;\n}\n.tippy-box[data-theme~=white-large] {\n border-radius: 8px;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 12px;\n font-weight: 400;\n font-style: normal;\n line-height: 20px;\n --tw-shadow: 0px 27px 12px 0px rgba(63, 93, 116, 0.00), 0px 18px 7px 0px rgba(63, 93, 116, 0.02), 0px 10px 6px 0px rgba(63, 93, 116, 0.08), 0px 4px 4px 0px rgba(63, 93, 116, 0.13), 0px 1px 2px 0px rgba(63, 93, 116, 0.15), 0px 0px 14px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 27px 12px 0px var(--tw-shadow-color), 0px 18px 7px 0px var(--tw-shadow-color), 0px 10px 6px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color), 0px 1px 2px 0px var(--tw-shadow-color), 0px 0px 14px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.tippy-box[data-theme~=white-large][data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n.tippy-box[data-theme~=white-large][data-placement^=top] > .tippy-arrow::before {\n bottom: -8px;\n left: 0;\n border-width: 8px 8px 0;\n}\n.tippy-box[data-theme~=white-large][data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n.tippy-box[data-theme~=white-large][data-placement^=bottom] > .tippy-arrow::before {\n top: -8px;\n left: 0;\n border-width: 0 8px 8px;\n}\n.tippy-box[data-theme~=white-large][data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n.tippy-box[data-theme~=white-large][data-placement^=left] > .tippy-arrow::before {\n border-width: 8px 0 8px 8px;\n right: -8px;\n}\n.tippy-box[data-theme~=white-large][data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n.tippy-box[data-theme~=white-large][data-placement^=right] > .tippy-arrow::before {\n left: -8px;\n border-width: 8px 8px 8px 0;\n}\n.tippy-box[data-theme~=white-large] {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n --tw-text-opacity: 1;\n color: rgb(36 53 66 / var(--tw-text-opacity, 1));\n}\n.tippy-box[data-theme~=white-large][data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(255 255 255 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=white-large][data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(255 255 255 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=white-large][data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(255 255 255 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=white-large][data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(255 255 255 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=white-large] > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n.tippy-box[data-theme~=white-large] > .tippy-svg-arrow {\n fill: #ffffff;\n}\n.tippy-box[data-theme~=success-medium] {\n border-radius: 4px;\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 10px;\n font-weight: 600;\n font-style: normal;\n line-height: 12px;\n --tw-shadow: 0px 27px 12px 0px rgba(63, 93, 116, 0.00), 0px 18px 7px 0px rgba(63, 93, 116, 0.02), 0px 10px 6px 0px rgba(63, 93, 116, 0.08), 0px 4px 4px 0px rgba(63, 93, 116, 0.13), 0px 1px 2px 0px rgba(63, 93, 116, 0.15), 0px 0px 14px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 27px 12px 0px var(--tw-shadow-color), 0px 18px 7px 0px var(--tw-shadow-color), 0px 10px 6px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color), 0px 1px 2px 0px var(--tw-shadow-color), 0px 0px 14px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.tippy-box[data-theme~=success-medium][data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n.tippy-box[data-theme~=success-medium][data-placement^=top] > .tippy-arrow::before {\n bottom: -6px;\n left: 2px;\n border-width: 6px 6px 0;\n}\n.tippy-box[data-theme~=success-medium][data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n.tippy-box[data-theme~=success-medium][data-placement^=bottom] > .tippy-arrow::before {\n top: -6px;\n left: 2px;\n border-width: 0 6px 6px;\n}\n.tippy-box[data-theme~=success-medium][data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n.tippy-box[data-theme~=success-medium][data-placement^=left] > .tippy-arrow::before {\n border-width: 6px 0 6px 6px;\n right: -6px;\n top: 2px;\n}\n.tippy-box[data-theme~=success-medium][data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n.tippy-box[data-theme~=success-medium][data-placement^=right] > .tippy-arrow::before {\n left: -6px;\n top: 2px;\n border-width: 6px 6px 6px 0;\n}\n.tippy-box[data-theme~=success-medium] {\n --tw-bg-opacity: 1;\n background-color: rgb(71 205 104 / var(--tw-bg-opacity, 1));\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.tippy-box[data-theme~=success-medium][data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(71 205 104 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=success-medium][data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(71 205 104 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=success-medium][data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(71 205 104 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=success-medium][data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(71 205 104 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=success-medium] > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(71 205 104 / var(--tw-bg-opacity, 1));\n}\n.tippy-box[data-theme~=success-medium] > .tippy-svg-arrow {\n fill: #47cd68;\n}\n.tippy-box[data-theme~=success-large] {\n border-radius: 8px;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 12px;\n font-weight: 400;\n font-style: normal;\n line-height: 20px;\n --tw-shadow: 0px 27px 12px 0px rgba(63, 93, 116, 0.00), 0px 18px 7px 0px rgba(63, 93, 116, 0.02), 0px 10px 6px 0px rgba(63, 93, 116, 0.08), 0px 4px 4px 0px rgba(63, 93, 116, 0.13), 0px 1px 2px 0px rgba(63, 93, 116, 0.15), 0px 0px 14px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 27px 12px 0px var(--tw-shadow-color), 0px 18px 7px 0px var(--tw-shadow-color), 0px 10px 6px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color), 0px 1px 2px 0px var(--tw-shadow-color), 0px 0px 14px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.tippy-box[data-theme~=success-large][data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n.tippy-box[data-theme~=success-large][data-placement^=top] > .tippy-arrow::before {\n bottom: -8px;\n left: 0;\n border-width: 8px 8px 0;\n}\n.tippy-box[data-theme~=success-large][data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n.tippy-box[data-theme~=success-large][data-placement^=bottom] > .tippy-arrow::before {\n top: -8px;\n left: 0;\n border-width: 0 8px 8px;\n}\n.tippy-box[data-theme~=success-large][data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n.tippy-box[data-theme~=success-large][data-placement^=left] > .tippy-arrow::before {\n border-width: 8px 0 8px 8px;\n right: -8px;\n}\n.tippy-box[data-theme~=success-large][data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n.tippy-box[data-theme~=success-large][data-placement^=right] > .tippy-arrow::before {\n left: -8px;\n border-width: 8px 8px 8px 0;\n}\n.tippy-box[data-theme~=success-large] {\n --tw-bg-opacity: 1;\n background-color: rgb(71 205 104 / var(--tw-bg-opacity, 1));\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.tippy-box[data-theme~=success-large][data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(71 205 104 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=success-large][data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(71 205 104 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=success-large][data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(71 205 104 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=success-large][data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(71 205 104 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=success-large] > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(71 205 104 / var(--tw-bg-opacity, 1));\n}\n.tippy-box[data-theme~=success-large] > .tippy-svg-arrow {\n fill: #47cd68;\n}\n.tippy-box[data-theme~=danger-medium] {\n border-radius: 4px;\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 10px;\n font-weight: 600;\n font-style: normal;\n line-height: 12px;\n --tw-shadow: 0px 27px 12px 0px rgba(63, 93, 116, 0.00), 0px 18px 7px 0px rgba(63, 93, 116, 0.02), 0px 10px 6px 0px rgba(63, 93, 116, 0.08), 0px 4px 4px 0px rgba(63, 93, 116, 0.13), 0px 1px 2px 0px rgba(63, 93, 116, 0.15), 0px 0px 14px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 27px 12px 0px var(--tw-shadow-color), 0px 18px 7px 0px var(--tw-shadow-color), 0px 10px 6px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color), 0px 1px 2px 0px var(--tw-shadow-color), 0px 0px 14px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.tippy-box[data-theme~=danger-medium][data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n.tippy-box[data-theme~=danger-medium][data-placement^=top] > .tippy-arrow::before {\n bottom: -6px;\n left: 2px;\n border-width: 6px 6px 0;\n}\n.tippy-box[data-theme~=danger-medium][data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n.tippy-box[data-theme~=danger-medium][data-placement^=bottom] > .tippy-arrow::before {\n top: -6px;\n left: 2px;\n border-width: 0 6px 6px;\n}\n.tippy-box[data-theme~=danger-medium][data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n.tippy-box[data-theme~=danger-medium][data-placement^=left] > .tippy-arrow::before {\n border-width: 6px 0 6px 6px;\n right: -6px;\n top: 2px;\n}\n.tippy-box[data-theme~=danger-medium][data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n.tippy-box[data-theme~=danger-medium][data-placement^=right] > .tippy-arrow::before {\n left: -6px;\n top: 2px;\n border-width: 6px 6px 6px 0;\n}\n.tippy-box[data-theme~=danger-medium] {\n --tw-bg-opacity: 1;\n background-color: rgb(233 99 99 / var(--tw-bg-opacity, 1));\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.tippy-box[data-theme~=danger-medium][data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(233 99 99 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=danger-medium][data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(233 99 99 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=danger-medium][data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(233 99 99 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=danger-medium][data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(233 99 99 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=danger-medium] > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(233 99 99 / var(--tw-bg-opacity, 1));\n}\n.tippy-box[data-theme~=danger-medium] > .tippy-svg-arrow {\n fill: #e96363;\n}\n.tippy-box[data-theme~=danger-large] {\n border-radius: 8px;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 12px;\n font-weight: 400;\n font-style: normal;\n line-height: 20px;\n --tw-shadow: 0px 27px 12px 0px rgba(63, 93, 116, 0.00), 0px 18px 7px 0px rgba(63, 93, 116, 0.02), 0px 10px 6px 0px rgba(63, 93, 116, 0.08), 0px 4px 4px 0px rgba(63, 93, 116, 0.13), 0px 1px 2px 0px rgba(63, 93, 116, 0.15), 0px 0px 14px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 27px 12px 0px var(--tw-shadow-color), 0px 18px 7px 0px var(--tw-shadow-color), 0px 10px 6px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color), 0px 1px 2px 0px var(--tw-shadow-color), 0px 0px 14px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.tippy-box[data-theme~=danger-large][data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n.tippy-box[data-theme~=danger-large][data-placement^=top] > .tippy-arrow::before {\n bottom: -8px;\n left: 0;\n border-width: 8px 8px 0;\n}\n.tippy-box[data-theme~=danger-large][data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n.tippy-box[data-theme~=danger-large][data-placement^=bottom] > .tippy-arrow::before {\n top: -8px;\n left: 0;\n border-width: 0 8px 8px;\n}\n.tippy-box[data-theme~=danger-large][data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n.tippy-box[data-theme~=danger-large][data-placement^=left] > .tippy-arrow::before {\n border-width: 8px 0 8px 8px;\n right: -8px;\n}\n.tippy-box[data-theme~=danger-large][data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n.tippy-box[data-theme~=danger-large][data-placement^=right] > .tippy-arrow::before {\n left: -8px;\n border-width: 8px 8px 8px 0;\n}\n.tippy-box[data-theme~=danger-large] {\n --tw-bg-opacity: 1;\n background-color: rgb(233 99 99 / var(--tw-bg-opacity, 1));\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.tippy-box[data-theme~=danger-large][data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(233 99 99 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=danger-large][data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(233 99 99 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=danger-large][data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(233 99 99 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=danger-large][data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(233 99 99 / var(--tw-border-opacity, 1));\n}\n.tippy-box[data-theme~=danger-large] > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(233 99 99 / var(--tw-bg-opacity, 1));\n}\n.tippy-box[data-theme~=danger-large] > .tippy-svg-arrow {\n fill: #e96363;\n}\n*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n/*! tailwindcss v3.4.18 | MIT License | https://tailwindcss.com\n */\n/*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n::before,\n::after {\n --tw-content: \'\';\n}\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user\'s configured `sans` font-family by default.\n5. Use the user\'s configured `sans` font-feature-settings by default.\n6. Use the user\'s configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n/*\nRemove the default font size and weight for headings.\n*/\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\na {\n color: inherit;\n text-decoration: inherit;\n}\n/*\nAdd the correct font weight in Edge and Safari.\n*/\nb,\nstrong {\n font-weight: bolder;\n}\n/*\n1. Use the user\'s configured `mono` font-family by default.\n2. Use the user\'s configured `mono` font-feature-settings by default.\n3. Use the user\'s configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\ncode,\nkbd,\nsamp,\npre {\n font-family: "PT Mono", sans-serif; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n/*\nAdd the correct font size in all browsers.\n*/\nsmall {\n font-size: 80%;\n}\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsub {\n bottom: -0.25em;\n}\nsup {\n top: -0.5em;\n}\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\nbutton,\nselect {\n text-transform: none;\n}\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\nbutton,\ninput:where([type=\'button\']),\ninput:where([type=\'reset\']),\ninput:where([type=\'submit\']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n:-moz-focusring {\n outline: auto;\n}\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n:-moz-ui-invalid {\n box-shadow: none;\n}\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\nprogress {\n vertical-align: baseline;\n}\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n[type=\'search\'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n/*\nAdd the correct display in Chrome and Safari.\n*/\nsummary {\n display: list-item;\n}\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\nfieldset {\n margin: 0;\n padding: 0;\n}\nlegend {\n padding: 0;\n}\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n/*\nPrevent resizing textareas horizontally by default.\n*/\ntextarea {\n resize: vertical;\n}\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user\'s configured gray 400 color.\n*/\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n/*\nSet the default cursor for buttons.\n*/\nbutton,\n[role="button"] {\n cursor: pointer;\n}\n/*\nMake sure disabled buttons don\'t get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden]:where(:not([hidden="until-found"])) {\n display: none;\n}\n.heading-inter-21-semi-bold {\n font-family: Inter, sans-serif;\n font-size: 21px;\n font-weight: 600;\n font-style: normal;\n line-height: 26px;\n}\n.heading-inter-17-semi-bold {\n font-family: Inter, sans-serif;\n font-size: 17px;\n font-weight: 600;\n font-style: normal;\n line-height: 22px;\n}\n.heading-inter-14-bold {\n font-family: Inter, sans-serif;\n font-size: 14px;\n font-weight: 700;\n font-style: normal;\n line-height: 17px;\n}\n.paragraph-inter-20-regular {\n font-family: Inter, sans-serif;\n font-size: 20px;\n font-weight: 400;\n font-style: normal;\n line-height: 32px;\n}\n.paragraph-inter-16-regular {\n font-family: Inter, sans-serif;\n font-size: 16px;\n font-weight: 400;\n font-style: normal;\n line-height: 24px;\n}\n.paragraph-inter-14-regular {\n font-family: Inter, sans-serif;\n font-size: 14px;\n font-weight: 400;\n font-style: normal;\n line-height: 22px;\n}\n.paragraph-inter-14-semi-bold {\n font-family: Inter, sans-serif;\n font-size: 14px;\n font-weight: 600;\n font-style: normal;\n line-height: 22px;\n}\n.paragraph-inter-12-regular {\n font-family: Inter, sans-serif;\n font-size: 12px;\n font-weight: 400;\n font-style: normal;\n line-height: 20px;\n}\n.paragraph-inter-12-medium {\n font-family: Inter, sans-serif;\n font-size: 12px;\n font-weight: 500;\n font-style: normal;\n line-height: 20px;\n}\n.paragraph-inter-12-semi-bold {\n font-family: Inter, sans-serif;\n font-size: 12px;\n font-weight: 600;\n font-style: normal;\n line-height: 20px;\n}\n.paragraph-ptmono-24-bold {\n font-family: "PT Mono", sans-serif;\n font-size: 24px;\n font-weight: 700;\n font-style: normal;\n line-height: 26px;\n}\n.paragraph-ptmono-16-bold {\n font-family: "PT Mono", sans-serif;\n font-size: 16px;\n font-weight: 700;\n font-style: normal;\n line-height: 22px;\n}\n.paragraph-ptmono-14-bold {\n font-family: "PT Mono", sans-serif;\n font-size: 14px;\n font-weight: 700;\n font-style: normal;\n line-height: 20px;\n}\n.paragraph-ptmono-12-bold {\n font-family: "PT Mono", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n line-height: 14px;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n .container {\n max-width: 1536px;\n }\n}\n.prose {\n color: var(--tw-prose-body);\n max-width: 65ch;\n}\n.prose :where(p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n}\n.prose :where([class~="lead"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: var(--tw-prose-lead);\n font-size: 1.25em;\n line-height: 1.6;\n margin-top: 1.2em;\n margin-bottom: 1.2em;\n}\n.prose :where(a):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: var(--tw-prose-links);\n text-decoration: underline;\n font-weight: 500;\n}\n.prose :where(strong):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: var(--tw-prose-bold);\n font-weight: 600;\n}\n.prose :where(a strong):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: inherit;\n}\n.prose :where(blockquote strong):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: inherit;\n}\n.prose :where(thead th strong):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: inherit;\n}\n.prose :where(ol):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n list-style-type: decimal;\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n padding-inline-start: 1.625em;\n}\n.prose :where(ol[type="A"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n list-style-type: upper-alpha;\n}\n.prose :where(ol[type="a"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n list-style-type: lower-alpha;\n}\n.prose :where(ol[type="A" s]):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n list-style-type: upper-alpha;\n}\n.prose :where(ol[type="a" s]):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n list-style-type: lower-alpha;\n}\n.prose :where(ol[type="I"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n list-style-type: upper-roman;\n}\n.prose :where(ol[type="i"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n list-style-type: lower-roman;\n}\n.prose :where(ol[type="I" s]):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n list-style-type: upper-roman;\n}\n.prose :where(ol[type="i" s]):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n list-style-type: lower-roman;\n}\n.prose :where(ol[type="1"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n list-style-type: decimal;\n}\n.prose :where(ul):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n list-style-type: disc;\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n padding-inline-start: 1.625em;\n}\n.prose :where(ol > li):not(:where([class~="not-prose"],[class~="not-prose"] *))::marker {\n font-weight: 400;\n color: var(--tw-prose-counters);\n}\n.prose :where(ul > li):not(:where([class~="not-prose"],[class~="not-prose"] *))::marker {\n color: var(--tw-prose-bullets);\n}\n.prose :where(dt):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n margin-top: 1.25em;\n}\n.prose :where(hr):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n border-color: var(--tw-prose-hr);\n border-top-width: 1px;\n margin-top: 3em;\n margin-bottom: 3em;\n}\n.prose :where(blockquote):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-weight: 500;\n font-style: italic;\n color: var(--tw-prose-quotes);\n border-inline-start-width: 0.25rem;\n border-inline-start-color: var(--tw-prose-quote-borders);\n quotes: "\\201C""\\201D""\\2018""\\2019";\n margin-top: 1.6em;\n margin-bottom: 1.6em;\n padding-inline-start: 1em;\n}\n.prose :where(blockquote p:first-of-type):not(:where([class~="not-prose"],[class~="not-prose"] *))::before {\n content: open-quote;\n}\n.prose :where(blockquote p:last-of-type):not(:where([class~="not-prose"],[class~="not-prose"] *))::after {\n content: close-quote;\n}\n.prose :where(h1):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: var(--tw-prose-headings);\n font-weight: 800;\n font-size: 2.25em;\n margin-top: 0;\n margin-bottom: 0.8888889em;\n line-height: 1.1111111;\n}\n.prose :where(h1 strong):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-weight: 900;\n color: inherit;\n}\n.prose :where(h2):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: var(--tw-prose-headings);\n font-weight: 700;\n font-size: 1.5em;\n margin-top: 2em;\n margin-bottom: 1em;\n line-height: 1.3333333;\n}\n.prose :where(h2 strong):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-weight: 800;\n color: inherit;\n}\n.prose :where(h3):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n font-size: 1.25em;\n margin-top: 1.6em;\n margin-bottom: 0.6em;\n line-height: 1.6;\n}\n.prose :where(h3 strong):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-weight: 700;\n color: inherit;\n}\n.prose :where(h4):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n margin-top: 1.5em;\n margin-bottom: 0.5em;\n line-height: 1.5;\n}\n.prose :where(h4 strong):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-weight: 700;\n color: inherit;\n}\n.prose :where(img):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose :where(picture):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n display: block;\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose :where(video):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose :where(kbd):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-weight: 500;\n font-family: inherit;\n color: var(--tw-prose-kbd);\n box-shadow: 0 0 0 1px var(--tw-prose-kbd-shadows), 0 3px 0 var(--tw-prose-kbd-shadows);\n font-size: 0.875em;\n border-radius: 0.3125rem;\n padding-top: 0.1875em;\n padding-inline-end: 0.375em;\n padding-bottom: 0.1875em;\n padding-inline-start: 0.375em;\n}\n.prose :where(code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: var(--tw-prose-code);\n font-weight: 600;\n font-size: 0.875em;\n}\n.prose :where(code):not(:where([class~="not-prose"],[class~="not-prose"] *))::before {\n content: "`";\n}\n.prose :where(code):not(:where([class~="not-prose"],[class~="not-prose"] *))::after {\n content: "`";\n}\n.prose :where(a code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: inherit;\n}\n.prose :where(h1 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: inherit;\n}\n.prose :where(h2 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: inherit;\n font-size: 0.875em;\n}\n.prose :where(h3 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: inherit;\n font-size: 0.9em;\n}\n.prose :where(h4 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: inherit;\n}\n.prose :where(blockquote code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: inherit;\n}\n.prose :where(thead th code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: inherit;\n}\n.prose :where(pre):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: var(--tw-prose-pre-code);\n background-color: var(--tw-prose-pre-bg);\n overflow-x: auto;\n font-weight: 400;\n font-size: 0.875em;\n line-height: 1.7142857;\n margin-top: 1.7142857em;\n margin-bottom: 1.7142857em;\n border-radius: 0.375rem;\n padding-top: 0.8571429em;\n padding-inline-end: 1.1428571em;\n padding-bottom: 0.8571429em;\n padding-inline-start: 1.1428571em;\n}\n.prose :where(pre code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n background-color: transparent;\n border-width: 0;\n border-radius: 0;\n padding: 0;\n font-weight: inherit;\n color: inherit;\n font-size: inherit;\n font-family: inherit;\n line-height: inherit;\n}\n.prose :where(pre code):not(:where([class~="not-prose"],[class~="not-prose"] *))::before {\n content: none;\n}\n.prose :where(pre code):not(:where([class~="not-prose"],[class~="not-prose"] *))::after {\n content: none;\n}\n.prose :where(table):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n width: 100%;\n table-layout: auto;\n margin-top: 2em;\n margin-bottom: 2em;\n font-size: 0.875em;\n line-height: 1.7142857;\n}\n.prose :where(thead):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n border-bottom-width: 1px;\n border-bottom-color: var(--tw-prose-th-borders);\n}\n.prose :where(thead th):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n vertical-align: bottom;\n padding-inline-end: 0.5714286em;\n padding-bottom: 0.5714286em;\n padding-inline-start: 0.5714286em;\n}\n.prose :where(tbody tr):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n border-bottom-width: 1px;\n border-bottom-color: var(--tw-prose-td-borders);\n}\n.prose :where(tbody tr:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n border-bottom-width: 0;\n}\n.prose :where(tbody td):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n vertical-align: baseline;\n}\n.prose :where(tfoot):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n border-top-width: 1px;\n border-top-color: var(--tw-prose-th-borders);\n}\n.prose :where(tfoot td):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n vertical-align: top;\n}\n.prose :where(th, td):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n text-align: start;\n}\n.prose :where(figure > *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.prose :where(figcaption):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: var(--tw-prose-captions);\n font-size: 0.875em;\n line-height: 1.4285714;\n margin-top: 0.8571429em;\n}\n.prose {\n --tw-prose-body: #374151;\n --tw-prose-headings: #111827;\n --tw-prose-lead: #4b5563;\n --tw-prose-links: #111827;\n --tw-prose-bold: #111827;\n --tw-prose-counters: #6b7280;\n --tw-prose-bullets: #d1d5db;\n --tw-prose-hr: #e5e7eb;\n --tw-prose-quotes: #111827;\n --tw-prose-quote-borders: #e5e7eb;\n --tw-prose-captions: #6b7280;\n --tw-prose-kbd: #111827;\n --tw-prose-kbd-shadows: rgb(17 24 39 / 10%);\n --tw-prose-code: #111827;\n --tw-prose-pre-code: #e5e7eb;\n --tw-prose-pre-bg: #1f2937;\n --tw-prose-th-borders: #d1d5db;\n --tw-prose-td-borders: #e5e7eb;\n --tw-prose-invert-body: #d1d5db;\n --tw-prose-invert-headings: #fff;\n --tw-prose-invert-lead: #9ca3af;\n --tw-prose-invert-links: #fff;\n --tw-prose-invert-bold: #fff;\n --tw-prose-invert-counters: #9ca3af;\n --tw-prose-invert-bullets: #4b5563;\n --tw-prose-invert-hr: #374151;\n --tw-prose-invert-quotes: #f3f4f6;\n --tw-prose-invert-quote-borders: #374151;\n --tw-prose-invert-captions: #9ca3af;\n --tw-prose-invert-kbd: #fff;\n --tw-prose-invert-kbd-shadows: rgb(255 255 255 / 10%);\n --tw-prose-invert-code: #fff;\n --tw-prose-invert-pre-code: #d1d5db;\n --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);\n --tw-prose-invert-th-borders: #4b5563;\n --tw-prose-invert-td-borders: #374151;\n font-size: 1rem;\n line-height: 1.75;\n}\n.prose :where(picture > img):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.prose :where(li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n}\n.prose :where(ol > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0.375em;\n}\n.prose :where(ul > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0.375em;\n}\n.prose :where(.prose > ul > li p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.75em;\n margin-bottom: 0.75em;\n}\n.prose :where(.prose > ul > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.25em;\n}\n.prose :where(.prose > ul > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-bottom: 1.25em;\n}\n.prose :where(.prose > ol > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.25em;\n}\n.prose :where(.prose > ol > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-bottom: 1.25em;\n}\n.prose :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.75em;\n margin-bottom: 0.75em;\n}\n.prose :where(dl):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n}\n.prose :where(dd):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n padding-inline-start: 1.625em;\n}\n.prose :where(hr + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose :where(h2 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose :where(h3 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose :where(h4 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose :where(thead th:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0;\n}\n.prose :where(thead th:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-end: 0;\n}\n.prose :where(tbody td, tfoot td):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-top: 0.5714286em;\n padding-inline-end: 0.5714286em;\n padding-bottom: 0.5714286em;\n padding-inline-start: 0.5714286em;\n}\n.prose :where(tbody td:first-child, tfoot td:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0;\n}\n.prose :where(tbody td:last-child, tfoot td:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-end: 0;\n}\n.prose :where(figure):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose :where(.prose > :first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose :where(.prose > :last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-bottom: 0;\n}\n.prose-sm {\n font-size: 0.875rem;\n line-height: 1.6;\n}\n.prose-sm :where(p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n line-height: 1.5;\n}\n.prose-sm :where([class~="lead"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 1.2857143em;\n line-height: 1.5555556;\n margin-top: 0.8888889em;\n margin-bottom: 0.8888889em;\n}\n.prose-sm :where(blockquote):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n padding-inline-start: 1.1111111em;\n padding-left: 1em;\n border-left-width: 0.25rem;\n font-style: italic;\n color: inherit;\n}\n.prose-sm :where(h1):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 2.1428571em;\n margin-top: 0.75em;\n margin-bottom: 0.5em;\n line-height: 1.2;\n}\n.prose-sm :where(h2):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 1.4285714em;\n margin-top: 0.65em;\n margin-bottom: 0.45em;\n line-height: 1.25;\n}\n.prose-sm :where(h3):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 1.2857143em;\n margin-top: 0.6em;\n margin-bottom: 0.4em;\n line-height: 1.3;\n}\n.prose-sm :where(h4):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.35em;\n line-height: 1.35;\n}\n.prose-sm :where(img):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.7142857em;\n margin-bottom: 1.7142857em;\n}\n.prose-sm :where(picture):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.7142857em;\n margin-bottom: 1.7142857em;\n}\n.prose-sm :where(picture > img):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.prose-sm :where(video):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.7142857em;\n margin-bottom: 1.7142857em;\n}\n.prose-sm :where(kbd):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.8571429em;\n border-radius: 0.3125rem;\n padding-top: 0.1428571em;\n padding-inline-end: 0.3571429em;\n padding-bottom: 0.1428571em;\n padding-inline-start: 0.3571429em;\n}\n.prose-sm :where(code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.8571429em;\n}\n.prose-sm :where(h2 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.9em;\n}\n.prose-sm :where(h3 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.8888889em;\n}\n.prose-sm :where(pre):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.8571429em;\n line-height: 1.45;\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n border-radius: 0.25rem;\n padding-top: 0.6666667em;\n padding-inline-end: 1em;\n padding-bottom: 0.6666667em;\n padding-inline-start: 1em;\n box-sizing: border-box;\n max-width: 100%;\n overflow-x: auto;\n white-space: pre-wrap;\n overflow-wrap: break-word;\n}\n.prose-sm :where(ol):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n padding-inline-start: 1.5714286em;\n padding-left: 1.25em;\n}\n.prose-sm :where(ul):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n padding-inline-start: 1.5714286em;\n padding-left: 1.25em;\n}\n.prose-sm :where(li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.25em;\n margin-bottom: 0.25em;\n}\n.prose-sm :where(ol > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0.4285714em;\n}\n.prose-sm :where(ul > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0.4285714em;\n}\n.prose-sm :where(.prose-sm > ul > li p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5714286em;\n margin-bottom: 0.5714286em;\n}\n.prose-sm :where(.prose-sm > ul > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.1428571em;\n}\n.prose-sm :where(.prose-sm > ul > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-bottom: 1.1428571em;\n}\n.prose-sm :where(.prose-sm > ol > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.1428571em;\n}\n.prose-sm :where(.prose-sm > ol > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-bottom: 1.1428571em;\n}\n.prose-sm :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.25em;\n margin-bottom: 0.25em;\n}\n.prose-sm :where(dl):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.1428571em;\n margin-bottom: 1.1428571em;\n}\n.prose-sm :where(dt):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.1428571em;\n}\n.prose-sm :where(dd):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.2857143em;\n padding-inline-start: 1.5714286em;\n}\n.prose-sm :where(hr):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose-sm :where(hr + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-sm :where(h2 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-sm :where(h3 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-sm :where(h4 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-sm :where(table):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.8571429em;\n line-height: 1.5;\n}\n.prose-sm :where(thead th):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-end: 1em;\n padding-bottom: 0.6666667em;\n padding-inline-start: 1em;\n}\n.prose-sm :where(thead th:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0;\n}\n.prose-sm :where(thead th:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-end: 0;\n}\n.prose-sm :where(tbody td, tfoot td):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-top: 0.6666667em;\n padding-inline-end: 1em;\n padding-bottom: 0.6666667em;\n padding-inline-start: 1em;\n}\n.prose-sm :where(tbody td:first-child, tfoot td:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0;\n}\n.prose-sm :where(tbody td:last-child, tfoot td:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-end: 0;\n}\n.prose-sm :where(figure):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.7142857em;\n margin-bottom: 1.7142857em;\n}\n.prose-sm :where(figure > *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.prose-sm :where(figcaption):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.8571429em;\n line-height: 1.3333333;\n margin-top: 0.6666667em;\n}\n.prose-sm :where(.prose-sm > :first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-sm :where(.prose-sm > :last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-bottom: 0;\n}\n.prose-sm {\n max-width: none;\n}\n.prose-sm :where(h5):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.45em;\n margin-bottom: 0.3em;\n line-height: 1.4;\n}\n.prose-sm :where(h6):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.4em;\n margin-bottom: 0.25em;\n line-height: 1.45;\n}\n.prose-sm :where(a):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: var(--tw-prose-links);\n text-decoration: underline;\n font-weight: 500;\n}\n.prose-sm :where(a):not(:where([class~="not-prose"],[class~="not-prose"] *)):hover {\n color: var(--tw-prose-links-hover, var(--tw-prose-links));\n text-decoration: none;\n}\n.prose-base {\n font-size: 1rem;\n line-height: 1.6;\n}\n.prose-base :where(p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n line-height: 1.5;\n}\n.prose-base :where([class~="lead"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 1.25em;\n line-height: 1.6;\n margin-top: 1.2em;\n margin-bottom: 1.2em;\n}\n.prose-base :where(blockquote):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n padding-inline-start: 1em;\n padding-left: 1em;\n border-left-width: 0.25rem;\n font-style: italic;\n color: inherit;\n}\n.prose-base :where(h1):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 2.25em;\n margin-top: 0.75em;\n margin-bottom: 0.5em;\n line-height: 1.2;\n}\n.prose-base :where(h2):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 1.5em;\n margin-top: 0.65em;\n margin-bottom: 0.45em;\n line-height: 1.25;\n}\n.prose-base :where(h3):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 1.25em;\n margin-top: 0.6em;\n margin-bottom: 0.4em;\n line-height: 1.3;\n}\n.prose-base :where(h4):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.35em;\n line-height: 1.35;\n}\n.prose-base :where(img):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose-base :where(picture):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose-base :where(picture > img):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.prose-base :where(video):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose-base :where(kbd):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.875em;\n border-radius: 0.3125rem;\n padding-top: 0.1875em;\n padding-inline-end: 0.375em;\n padding-bottom: 0.1875em;\n padding-inline-start: 0.375em;\n}\n.prose-base :where(code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.875em;\n}\n.prose-base :where(h2 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.875em;\n}\n.prose-base :where(h3 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.9em;\n}\n.prose-base :where(pre):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.875em;\n line-height: 1.45;\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n border-radius: 0.375rem;\n padding-top: 0.8571429em;\n padding-inline-end: 1.1428571em;\n padding-bottom: 0.8571429em;\n padding-inline-start: 1.1428571em;\n box-sizing: border-box;\n max-width: 100%;\n overflow-x: auto;\n white-space: pre-wrap;\n overflow-wrap: break-word;\n}\n.prose-base :where(ol):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n padding-inline-start: 1.625em;\n padding-left: 1.25em;\n}\n.prose-base :where(ul):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n padding-inline-start: 1.625em;\n padding-left: 1.25em;\n}\n.prose-base :where(li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.25em;\n margin-bottom: 0.25em;\n}\n.prose-base :where(ol > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0.375em;\n}\n.prose-base :where(ul > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0.375em;\n}\n.prose-base :where(.prose-base > ul > li p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.75em;\n margin-bottom: 0.75em;\n}\n.prose-base :where(.prose-base > ul > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.25em;\n}\n.prose-base :where(.prose-base > ul > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-bottom: 1.25em;\n}\n.prose-base :where(.prose-base > ol > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.25em;\n}\n.prose-base :where(.prose-base > ol > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-bottom: 1.25em;\n}\n.prose-base :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.25em;\n margin-bottom: 0.25em;\n}\n.prose-base :where(dl):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n}\n.prose-base :where(dt):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.25em;\n}\n.prose-base :where(dd):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n padding-inline-start: 1.625em;\n}\n.prose-base :where(hr):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose-base :where(hr + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-base :where(h2 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-base :where(h3 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-base :where(h4 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-base :where(table):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.875em;\n line-height: 1.7142857;\n}\n.prose-base :where(thead th):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-end: 0.5714286em;\n padding-bottom: 0.5714286em;\n padding-inline-start: 0.5714286em;\n}\n.prose-base :where(thead th:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0;\n}\n.prose-base :where(thead th:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-end: 0;\n}\n.prose-base :where(tbody td, tfoot td):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-top: 0.5714286em;\n padding-inline-end: 0.5714286em;\n padding-bottom: 0.5714286em;\n padding-inline-start: 0.5714286em;\n}\n.prose-base :where(tbody td:first-child, tfoot td:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0;\n}\n.prose-base :where(tbody td:last-child, tfoot td:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-end: 0;\n}\n.prose-base :where(figure):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose-base :where(figure > *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.prose-base :where(figcaption):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.875em;\n line-height: 1.4285714;\n margin-top: 0.8571429em;\n}\n.prose-base :where(.prose-base > :first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-base :where(.prose-base > :last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-bottom: 0;\n}\n.prose-base {\n max-width: none;\n}\n.prose-base :where(h5):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.45em;\n margin-bottom: 0.3em;\n line-height: 1.4;\n}\n.prose-base :where(h6):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.4em;\n margin-bottom: 0.25em;\n line-height: 1.45;\n}\n.prose-base :where(a):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: var(--tw-prose-links);\n text-decoration: underline;\n font-weight: 500;\n}\n.prose-base :where(a):not(:where([class~="not-prose"],[class~="not-prose"] *)):hover {\n color: var(--tw-prose-links-hover, var(--tw-prose-links));\n text-decoration: none;\n}\n.prose-lg {\n font-size: 1.125rem;\n line-height: 1.6;\n}\n.prose-lg :where(p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n line-height: 1.5;\n}\n.prose-lg :where([class~="lead"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 1.2222222em;\n line-height: 1.4545455;\n margin-top: 1.0909091em;\n margin-bottom: 1.0909091em;\n}\n.prose-lg :where(blockquote):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n padding-inline-start: 1em;\n padding-left: 1em;\n border-left-width: 0.25rem;\n font-style: italic;\n color: inherit;\n}\n.prose-lg :where(h1):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 2.6666667em;\n margin-top: 0.75em;\n margin-bottom: 0.5em;\n line-height: 1.2;\n}\n.prose-lg :where(h2):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 1.6666667em;\n margin-top: 0.65em;\n margin-bottom: 0.45em;\n line-height: 1.25;\n}\n.prose-lg :where(h3):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 1.3333333em;\n margin-top: 0.6em;\n margin-bottom: 0.4em;\n line-height: 1.3;\n}\n.prose-lg :where(h4):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.35em;\n line-height: 1.35;\n}\n.prose-lg :where(img):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.7777778em;\n margin-bottom: 1.7777778em;\n}\n.prose-lg :where(picture):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.7777778em;\n margin-bottom: 1.7777778em;\n}\n.prose-lg :where(picture > img):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.prose-lg :where(video):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.7777778em;\n margin-bottom: 1.7777778em;\n}\n.prose-lg :where(kbd):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.8888889em;\n border-radius: 0.3125rem;\n padding-top: 0.2222222em;\n padding-inline-end: 0.4444444em;\n padding-bottom: 0.2222222em;\n padding-inline-start: 0.4444444em;\n}\n.prose-lg :where(code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.8888889em;\n}\n.prose-lg :where(h2 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.8666667em;\n}\n.prose-lg :where(h3 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.875em;\n}\n.prose-lg :where(pre):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.8888889em;\n line-height: 1.45;\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n border-radius: 0.375rem;\n padding-top: 1em;\n padding-inline-end: 1.5em;\n padding-bottom: 1em;\n padding-inline-start: 1.5em;\n box-sizing: border-box;\n max-width: 100%;\n overflow-x: auto;\n white-space: pre-wrap;\n overflow-wrap: break-word;\n}\n.prose-lg :where(ol):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n padding-inline-start: 1.5555556em;\n padding-left: 1.25em;\n}\n.prose-lg :where(ul):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n padding-inline-start: 1.5555556em;\n padding-left: 1.25em;\n}\n.prose-lg :where(li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.25em;\n margin-bottom: 0.25em;\n}\n.prose-lg :where(ol > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0.4444444em;\n}\n.prose-lg :where(ul > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0.4444444em;\n}\n.prose-lg :where(.prose-lg > ul > li p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.8888889em;\n margin-bottom: 0.8888889em;\n}\n.prose-lg :where(.prose-lg > ul > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.3333333em;\n}\n.prose-lg :where(.prose-lg > ul > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-bottom: 1.3333333em;\n}\n.prose-lg :where(.prose-lg > ol > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.3333333em;\n}\n.prose-lg :where(.prose-lg > ol > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-bottom: 1.3333333em;\n}\n.prose-lg :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.25em;\n margin-bottom: 0.25em;\n}\n.prose-lg :where(dl):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.3333333em;\n margin-bottom: 1.3333333em;\n}\n.prose-lg :where(dt):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.3333333em;\n}\n.prose-lg :where(dd):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.6666667em;\n padding-inline-start: 1.5555556em;\n}\n.prose-lg :where(hr):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose-lg :where(hr + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-lg :where(h2 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-lg :where(h3 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-lg :where(h4 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-lg :where(table):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.8888889em;\n line-height: 1.5;\n}\n.prose-lg :where(thead th):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-end: 0.75em;\n padding-bottom: 0.75em;\n padding-inline-start: 0.75em;\n}\n.prose-lg :where(thead th:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0;\n}\n.prose-lg :where(thead th:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-end: 0;\n}\n.prose-lg :where(tbody td, tfoot td):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-top: 0.75em;\n padding-inline-end: 0.75em;\n padding-bottom: 0.75em;\n padding-inline-start: 0.75em;\n}\n.prose-lg :where(tbody td:first-child, tfoot td:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0;\n}\n.prose-lg :where(tbody td:last-child, tfoot td:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-end: 0;\n}\n.prose-lg :where(figure):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.7777778em;\n margin-bottom: 1.7777778em;\n}\n.prose-lg :where(figure > *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.prose-lg :where(figcaption):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.8888889em;\n line-height: 1.5;\n margin-top: 1em;\n}\n.prose-lg :where(.prose-lg > :first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-lg :where(.prose-lg > :last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-bottom: 0;\n}\n.prose-lg {\n max-width: none;\n}\n.prose-lg :where(h5):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.45em;\n margin-bottom: 0.3em;\n line-height: 1.4;\n}\n.prose-lg :where(h6):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.4em;\n margin-bottom: 0.25em;\n line-height: 1.45;\n}\n.prose-lg :where(a):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: var(--tw-prose-links);\n text-decoration: underline;\n font-weight: 500;\n}\n.prose-lg :where(a):not(:where([class~="not-prose"],[class~="not-prose"] *)):hover {\n color: var(--tw-prose-links-hover, var(--tw-prose-links));\n text-decoration: none;\n}\n.prose-xl {\n font-size: 1.25rem;\n line-height: 1.6;\n}\n.prose-xl :where(p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n line-height: 1.5;\n}\n.prose-xl :where([class~="lead"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 1.2em;\n line-height: 1.5;\n margin-top: 1em;\n margin-bottom: 1em;\n}\n.prose-xl :where(blockquote):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n padding-inline-start: 1.0666667em;\n padding-left: 1em;\n border-left-width: 0.25rem;\n font-style: italic;\n color: inherit;\n}\n.prose-xl :where(h1):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 2.8em;\n margin-top: 0.75em;\n margin-bottom: 0.5em;\n line-height: 1.2;\n}\n.prose-xl :where(h2):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 1.8em;\n margin-top: 0.65em;\n margin-bottom: 0.45em;\n line-height: 1.25;\n}\n.prose-xl :where(h3):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 1.5em;\n margin-top: 0.6em;\n margin-bottom: 0.4em;\n line-height: 1.3;\n}\n.prose-xl :where(h4):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.35em;\n line-height: 1.35;\n}\n.prose-xl :where(img):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose-xl :where(picture):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose-xl :where(picture > img):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.prose-xl :where(video):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose-xl :where(kbd):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.9em;\n border-radius: 0.3125rem;\n padding-top: 0.25em;\n padding-inline-end: 0.4em;\n padding-bottom: 0.25em;\n padding-inline-start: 0.4em;\n}\n.prose-xl :where(code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.9em;\n}\n.prose-xl :where(h2 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.8611111em;\n}\n.prose-xl :where(h3 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.9em;\n}\n.prose-xl :where(pre):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.9em;\n line-height: 1.45;\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n border-radius: 0.5rem;\n padding-top: 1.1111111em;\n padding-inline-end: 1.3333333em;\n padding-bottom: 1.1111111em;\n padding-inline-start: 1.3333333em;\n box-sizing: border-box;\n max-width: 100%;\n overflow-x: auto;\n white-space: pre-wrap;\n overflow-wrap: break-word;\n}\n.prose-xl :where(ol):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n padding-inline-start: 1.6em;\n padding-left: 1.25em;\n}\n.prose-xl :where(ul):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n padding-inline-start: 1.6em;\n padding-left: 1.25em;\n}\n.prose-xl :where(li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.25em;\n margin-bottom: 0.25em;\n}\n.prose-xl :where(ol > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0.4em;\n}\n.prose-xl :where(ul > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0.4em;\n}\n.prose-xl :where(.prose-xl > ul > li p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.8em;\n margin-bottom: 0.8em;\n}\n.prose-xl :where(.prose-xl > ul > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.2em;\n}\n.prose-xl :where(.prose-xl > ul > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-bottom: 1.2em;\n}\n.prose-xl :where(.prose-xl > ol > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.2em;\n}\n.prose-xl :where(.prose-xl > ol > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-bottom: 1.2em;\n}\n.prose-xl :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.25em;\n margin-bottom: 0.25em;\n}\n.prose-xl :where(dl):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.2em;\n margin-bottom: 1.2em;\n}\n.prose-xl :where(dt):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.2em;\n}\n.prose-xl :where(dd):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.6em;\n padding-inline-start: 1.6em;\n}\n.prose-xl :where(hr):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose-xl :where(hr + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-xl :where(h2 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-xl :where(h3 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-xl :where(h4 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-xl :where(table):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.9em;\n line-height: 1.5555556;\n}\n.prose-xl :where(thead th):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-end: 0.6666667em;\n padding-bottom: 0.8888889em;\n padding-inline-start: 0.6666667em;\n}\n.prose-xl :where(thead th:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0;\n}\n.prose-xl :where(thead th:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-end: 0;\n}\n.prose-xl :where(tbody td, tfoot td):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-top: 0.8888889em;\n padding-inline-end: 0.6666667em;\n padding-bottom: 0.8888889em;\n padding-inline-start: 0.6666667em;\n}\n.prose-xl :where(tbody td:first-child, tfoot td:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0;\n}\n.prose-xl :where(tbody td:last-child, tfoot td:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-end: 0;\n}\n.prose-xl :where(figure):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose-xl :where(figure > *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.prose-xl :where(figcaption):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.9em;\n line-height: 1.5555556;\n margin-top: 1em;\n}\n.prose-xl :where(.prose-xl > :first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-xl :where(.prose-xl > :last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-bottom: 0;\n}\n.prose-xl {\n max-width: none;\n}\n.prose-xl :where(h5):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.45em;\n margin-bottom: 0.3em;\n line-height: 1.4;\n}\n.prose-xl :where(h6):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.4em;\n margin-bottom: 0.25em;\n line-height: 1.45;\n}\n.prose-xl :where(a):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n color: var(--tw-prose-links);\n text-decoration: underline;\n font-weight: 500;\n}\n.prose-xl :where(a):not(:where([class~="not-prose"],[class~="not-prose"] *)):hover {\n color: var(--tw-prose-links-hover, var(--tw-prose-links));\n text-decoration: none;\n}\n.prose-2xl {\n font-size: 1.5rem;\n line-height: 1.6666667;\n}\n.prose-2xl :where(p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.3333333em;\n margin-bottom: 1.3333333em;\n}\n.prose-2xl :where([class~="lead"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 1.25em;\n line-height: 1.4666667;\n margin-top: 1.0666667em;\n margin-bottom: 1.0666667em;\n}\n.prose-2xl :where(blockquote):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.7777778em;\n margin-bottom: 1.7777778em;\n padding-inline-start: 1.1111111em;\n}\n.prose-2xl :where(h1):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 2.6666667em;\n margin-top: 0;\n margin-bottom: 0.875em;\n line-height: 1;\n}\n.prose-2xl :where(h2):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 2em;\n margin-top: 1.5em;\n margin-bottom: 0.8333333em;\n line-height: 1.0833333;\n}\n.prose-2xl :where(h3):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 1.5em;\n margin-top: 1.5555556em;\n margin-bottom: 0.6666667em;\n line-height: 1.2222222;\n}\n.prose-2xl :where(h4):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.6666667em;\n margin-bottom: 0.6666667em;\n line-height: 1.5;\n}\n.prose-2xl :where(img):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose-2xl :where(picture):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose-2xl :where(picture > img):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.prose-2xl :where(video):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose-2xl :where(kbd):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.8333333em;\n border-radius: 0.375rem;\n padding-top: 0.25em;\n padding-inline-end: 0.3333333em;\n padding-bottom: 0.25em;\n padding-inline-start: 0.3333333em;\n}\n.prose-2xl :where(code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.8333333em;\n}\n.prose-2xl :where(h2 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.875em;\n}\n.prose-2xl :where(h3 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.8888889em;\n}\n.prose-2xl :where(pre):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.8333333em;\n line-height: 1.8;\n margin-top: 2em;\n margin-bottom: 2em;\n border-radius: 0.5rem;\n padding-top: 1.2em;\n padding-inline-end: 1.6em;\n padding-bottom: 1.2em;\n padding-inline-start: 1.6em;\n}\n.prose-2xl :where(ol):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.3333333em;\n margin-bottom: 1.3333333em;\n padding-inline-start: 1.5833333em;\n}\n.prose-2xl :where(ul):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.3333333em;\n margin-bottom: 1.3333333em;\n padding-inline-start: 1.5833333em;\n}\n.prose-2xl :where(li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n}\n.prose-2xl :where(ol > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0.4166667em;\n}\n.prose-2xl :where(ul > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0.4166667em;\n}\n.prose-2xl :where(.prose-2xl > ul > li p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.8333333em;\n margin-bottom: 0.8333333em;\n}\n.prose-2xl :where(.prose-2xl > ul > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.3333333em;\n}\n.prose-2xl :where(.prose-2xl > ul > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-bottom: 1.3333333em;\n}\n.prose-2xl :where(.prose-2xl > ol > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.3333333em;\n}\n.prose-2xl :where(.prose-2xl > ol > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-bottom: 1.3333333em;\n}\n.prose-2xl :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.6666667em;\n margin-bottom: 0.6666667em;\n}\n.prose-2xl :where(dl):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.3333333em;\n margin-bottom: 1.3333333em;\n}\n.prose-2xl :where(dt):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 1.3333333em;\n}\n.prose-2xl :where(dd):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0.5em;\n padding-inline-start: 1.5833333em;\n}\n.prose-2xl :where(hr):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 3em;\n margin-bottom: 3em;\n}\n.prose-2xl :where(hr + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-2xl :where(h2 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-2xl :where(h3 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-2xl :where(h4 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-2xl :where(table):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.8333333em;\n line-height: 1.4;\n}\n.prose-2xl :where(thead th):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-end: 0.6em;\n padding-bottom: 0.8em;\n padding-inline-start: 0.6em;\n}\n.prose-2xl :where(thead th:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0;\n}\n.prose-2xl :where(thead th:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-end: 0;\n}\n.prose-2xl :where(tbody td, tfoot td):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-top: 0.8em;\n padding-inline-end: 0.6em;\n padding-bottom: 0.8em;\n padding-inline-start: 0.6em;\n}\n.prose-2xl :where(tbody td:first-child, tfoot td:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-start: 0;\n}\n.prose-2xl :where(tbody td:last-child, tfoot td:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n padding-inline-end: 0;\n}\n.prose-2xl :where(figure):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose-2xl :where(figure > *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.prose-2xl :where(figcaption):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n font-size: 0.8333333em;\n line-height: 1.6;\n margin-top: 1em;\n}\n.prose-2xl :where(.prose-2xl > :first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-top: 0;\n}\n.prose-2xl :where(.prose-2xl > :last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {\n margin-bottom: 0;\n}\n.prose-slate {\n --tw-prose-body: #334155;\n --tw-prose-headings: #0f172a;\n --tw-prose-lead: #475569;\n --tw-prose-links: #0f172a;\n --tw-prose-bold: #0f172a;\n --tw-prose-counters: #64748b;\n --tw-prose-bullets: #cbd5e1;\n --tw-prose-hr: #e2e8f0;\n --tw-prose-quotes: #0f172a;\n --tw-prose-quote-borders: #e2e8f0;\n --tw-prose-captions: #64748b;\n --tw-prose-kbd: #0f172a;\n --tw-prose-kbd-shadows: rgb(15 23 42 / 10%);\n --tw-prose-code: #0f172a;\n --tw-prose-pre-code: #e2e8f0;\n --tw-prose-pre-bg: #1e293b;\n --tw-prose-th-borders: #cbd5e1;\n --tw-prose-td-borders: #e2e8f0;\n --tw-prose-invert-body: #cbd5e1;\n --tw-prose-invert-headings: #fff;\n --tw-prose-invert-lead: #94a3b8;\n --tw-prose-invert-links: #fff;\n --tw-prose-invert-bold: #fff;\n --tw-prose-invert-counters: #94a3b8;\n --tw-prose-invert-bullets: #475569;\n --tw-prose-invert-hr: #334155;\n --tw-prose-invert-quotes: #f1f5f9;\n --tw-prose-invert-quote-borders: #334155;\n --tw-prose-invert-captions: #94a3b8;\n --tw-prose-invert-kbd: #fff;\n --tw-prose-invert-kbd-shadows: rgb(255 255 255 / 10%);\n --tw-prose-invert-code: #fff;\n --tw-prose-invert-pre-code: #cbd5e1;\n --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);\n --tw-prose-invert-th-borders: #475569;\n --tw-prose-invert-td-borders: #334155;\n}\n.prose-gray {\n --tw-prose-body: #374151;\n --tw-prose-headings: #111827;\n --tw-prose-lead: #4b5563;\n --tw-prose-links: #111827;\n --tw-prose-bold: #111827;\n --tw-prose-counters: #6b7280;\n --tw-prose-bullets: #d1d5db;\n --tw-prose-hr: #e5e7eb;\n --tw-prose-quotes: #111827;\n --tw-prose-quote-borders: #e5e7eb;\n --tw-prose-captions: #6b7280;\n --tw-prose-kbd: #111827;\n --tw-prose-kbd-shadows: rgb(17 24 39 / 10%);\n --tw-prose-code: #111827;\n --tw-prose-pre-code: #e5e7eb;\n --tw-prose-pre-bg: #1f2937;\n --tw-prose-th-borders: #d1d5db;\n --tw-prose-td-borders: #e5e7eb;\n --tw-prose-invert-body: #d1d5db;\n --tw-prose-invert-headings: #fff;\n --tw-prose-invert-lead: #9ca3af;\n --tw-prose-invert-links: #fff;\n --tw-prose-invert-bold: #fff;\n --tw-prose-invert-counters: #9ca3af;\n --tw-prose-invert-bullets: #4b5563;\n --tw-prose-invert-hr: #374151;\n --tw-prose-invert-quotes: #f3f4f6;\n --tw-prose-invert-quote-borders: #374151;\n --tw-prose-invert-captions: #9ca3af;\n --tw-prose-invert-kbd: #fff;\n --tw-prose-invert-kbd-shadows: rgb(255 255 255 / 10%);\n --tw-prose-invert-code: #fff;\n --tw-prose-invert-pre-code: #d1d5db;\n --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);\n --tw-prose-invert-th-borders: #4b5563;\n --tw-prose-invert-td-borders: #374151;\n}\n.prose-zinc {\n --tw-prose-body: #3f3f46;\n --tw-prose-headings: #18181b;\n --tw-prose-lead: #52525b;\n --tw-prose-links: #18181b;\n --tw-prose-bold: #18181b;\n --tw-prose-counters: #71717a;\n --tw-prose-bullets: #d4d4d8;\n --tw-prose-hr: #e4e4e7;\n --tw-prose-quotes: #18181b;\n --tw-prose-quote-borders: #e4e4e7;\n --tw-prose-captions: #71717a;\n --tw-prose-kbd: #18181b;\n --tw-prose-kbd-shadows: rgb(24 24 27 / 10%);\n --tw-prose-code: #18181b;\n --tw-prose-pre-code: #e4e4e7;\n --tw-prose-pre-bg: #27272a;\n --tw-prose-th-borders: #d4d4d8;\n --tw-prose-td-borders: #e4e4e7;\n --tw-prose-invert-body: #d4d4d8;\n --tw-prose-invert-headings: #fff;\n --tw-prose-invert-lead: #a1a1aa;\n --tw-prose-invert-links: #fff;\n --tw-prose-invert-bold: #fff;\n --tw-prose-invert-counters: #a1a1aa;\n --tw-prose-invert-bullets: #52525b;\n --tw-prose-invert-hr: #3f3f46;\n --tw-prose-invert-quotes: #f4f4f5;\n --tw-prose-invert-quote-borders: #3f3f46;\n --tw-prose-invert-captions: #a1a1aa;\n --tw-prose-invert-kbd: #fff;\n --tw-prose-invert-kbd-shadows: rgb(255 255 255 / 10%);\n --tw-prose-invert-code: #fff;\n --tw-prose-invert-pre-code: #d4d4d8;\n --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);\n --tw-prose-invert-th-borders: #52525b;\n --tw-prose-invert-td-borders: #3f3f46;\n}\n.prose-neutral {\n --tw-prose-body: #404040;\n --tw-prose-headings: #171717;\n --tw-prose-lead: #525252;\n --tw-prose-links: #171717;\n --tw-prose-bold: #171717;\n --tw-prose-counters: #737373;\n --tw-prose-bullets: #d4d4d4;\n --tw-prose-hr: #e5e5e5;\n --tw-prose-quotes: #171717;\n --tw-prose-quote-borders: #e5e5e5;\n --tw-prose-captions: #737373;\n --tw-prose-kbd: #171717;\n --tw-prose-kbd-shadows: rgb(23 23 23 / 10%);\n --tw-prose-code: #171717;\n --tw-prose-pre-code: #e5e5e5;\n --tw-prose-pre-bg: #262626;\n --tw-prose-th-borders: #d4d4d4;\n --tw-prose-td-borders: #e5e5e5;\n --tw-prose-invert-body: #d4d4d4;\n --tw-prose-invert-headings: #fff;\n --tw-prose-invert-lead: #a3a3a3;\n --tw-prose-invert-links: #fff;\n --tw-prose-invert-bold: #fff;\n --tw-prose-invert-counters: #a3a3a3;\n --tw-prose-invert-bullets: #525252;\n --tw-prose-invert-hr: #404040;\n --tw-prose-invert-quotes: #f5f5f5;\n --tw-prose-invert-quote-borders: #404040;\n --tw-prose-invert-captions: #a3a3a3;\n --tw-prose-invert-kbd: #fff;\n --tw-prose-invert-kbd-shadows: rgb(255 255 255 / 10%);\n --tw-prose-invert-code: #fff;\n --tw-prose-invert-pre-code: #d4d4d4;\n --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);\n --tw-prose-invert-th-borders: #525252;\n --tw-prose-invert-td-borders: #404040;\n}\n.prose-stone {\n --tw-prose-body: #44403c;\n --tw-prose-headings: #1c1917;\n --tw-prose-lead: #57534e;\n --tw-prose-links: #1c1917;\n --tw-prose-bold: #1c1917;\n --tw-prose-counters: #78716c;\n --tw-prose-bullets: #d6d3d1;\n --tw-prose-hr: #e7e5e4;\n --tw-prose-quotes: #1c1917;\n --tw-prose-quote-borders: #e7e5e4;\n --tw-prose-captions: #78716c;\n --tw-prose-kbd: #1c1917;\n --tw-prose-kbd-shadows: rgb(28 25 23 / 10%);\n --tw-prose-code: #1c1917;\n --tw-prose-pre-code: #e7e5e4;\n --tw-prose-pre-bg: #292524;\n --tw-prose-th-borders: #d6d3d1;\n --tw-prose-td-borders: #e7e5e4;\n --tw-prose-invert-body: #d6d3d1;\n --tw-prose-invert-headings: #fff;\n --tw-prose-invert-lead: #a8a29e;\n --tw-prose-invert-links: #fff;\n --tw-prose-invert-bold: #fff;\n --tw-prose-invert-counters: #a8a29e;\n --tw-prose-invert-bullets: #57534e;\n --tw-prose-invert-hr: #44403c;\n --tw-prose-invert-quotes: #f5f5f4;\n --tw-prose-invert-quote-borders: #44403c;\n --tw-prose-invert-captions: #a8a29e;\n --tw-prose-invert-kbd: #fff;\n --tw-prose-invert-kbd-shadows: rgb(255 255 255 / 10%);\n --tw-prose-invert-code: #fff;\n --tw-prose-invert-pre-code: #d6d3d1;\n --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);\n --tw-prose-invert-th-borders: #57534e;\n --tw-prose-invert-td-borders: #44403c;\n}\n.prose-red {\n --tw-prose-links: #dc2626;\n --tw-prose-invert-links: #ef4444;\n}\n.prose-orange {\n --tw-prose-links: #ea580c;\n --tw-prose-invert-links: #f97316;\n}\n.prose-amber {\n --tw-prose-links: #d97706;\n --tw-prose-invert-links: #f59e0b;\n}\n.prose-yellow {\n --tw-prose-links: #ca8a04;\n --tw-prose-invert-links: #eab308;\n}\n.prose-lime {\n --tw-prose-links: #65a30d;\n --tw-prose-invert-links: #84cc16;\n}\n.prose-green {\n --tw-prose-links: #16a34a;\n --tw-prose-invert-links: #22c55e;\n}\n.prose-emerald {\n --tw-prose-links: #059669;\n --tw-prose-invert-links: #10b981;\n}\n.prose-teal {\n --tw-prose-links: #0d9488;\n --tw-prose-invert-links: #14b8a6;\n}\n.prose-cyan {\n --tw-prose-links: #0891b2;\n --tw-prose-invert-links: #06b6d4;\n}\n.prose-sky {\n --tw-prose-links: #0284c7;\n --tw-prose-invert-links: #0ea5e9;\n}\n.prose-blue {\n --tw-prose-links: #2563eb;\n --tw-prose-invert-links: #3b82f6;\n}\n.prose-indigo {\n --tw-prose-links: #4f46e5;\n --tw-prose-invert-links: #6366f1;\n}\n.prose-violet {\n --tw-prose-links: #7c3aed;\n --tw-prose-invert-links: #8b5cf6;\n}\n.prose-purple {\n --tw-prose-links: #9333ea;\n --tw-prose-invert-links: #a855f7;\n}\n.prose-fuchsia {\n --tw-prose-links: #c026d3;\n --tw-prose-invert-links: #d946ef;\n}\n.prose-pink {\n --tw-prose-links: #db2777;\n --tw-prose-invert-links: #ec4899;\n}\n.prose-rose {\n --tw-prose-links: #e11d48;\n --tw-prose-invert-links: #f43f5e;\n}\n.prose-invert {\n --tw-prose-body: var(--tw-prose-invert-body);\n --tw-prose-headings: var(--tw-prose-invert-headings);\n --tw-prose-lead: var(--tw-prose-invert-lead);\n --tw-prose-links: var(--tw-prose-invert-links);\n --tw-prose-bold: var(--tw-prose-invert-bold);\n --tw-prose-counters: var(--tw-prose-invert-counters);\n --tw-prose-bullets: var(--tw-prose-invert-bullets);\n --tw-prose-hr: var(--tw-prose-invert-hr);\n --tw-prose-quotes: var(--tw-prose-invert-quotes);\n --tw-prose-quote-borders: var(--tw-prose-invert-quote-borders);\n --tw-prose-captions: var(--tw-prose-invert-captions);\n --tw-prose-kbd: var(--tw-prose-invert-kbd);\n --tw-prose-kbd-shadows: var(--tw-prose-invert-kbd-shadows);\n --tw-prose-code: var(--tw-prose-invert-code);\n --tw-prose-pre-code: var(--tw-prose-invert-pre-code);\n --tw-prose-pre-bg: var(--tw-prose-invert-pre-bg);\n --tw-prose-th-borders: var(--tw-prose-invert-th-borders);\n --tw-prose-td-borders: var(--tw-prose-invert-td-borders);\n}\n.prose-inherit {\n --tw-prose-body: inherit;\n --tw-prose-headings: inherit;\n --tw-prose-lead: inherit;\n --tw-prose-links: inherit;\n --tw-prose-bold: inherit;\n --tw-prose-counters: inherit;\n --tw-prose-bullets: inherit;\n}\n.visible {\n visibility: visible;\n}\n.static {\n position: static;\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.bottom-0 {\n bottom: 0px;\n}\n.left-0 {\n left: 0px;\n}\n.left-3 {\n left: 0.75rem;\n}\n.right-4 {\n right: 1rem;\n}\n.top-0 {\n top: 0px;\n}\n.top-3 {\n top: 0.75rem;\n}\n.top-\\[calc\\(100\\%\\+8px\\)\\] {\n top: calc(100% + 8px);\n}\n.-z-10 {\n z-index: -10;\n}\n.z-10 {\n z-index: 10;\n}\n.z-\\[1000\\] {\n z-index: 1000;\n}\n.z-\\[99\\] {\n z-index: 99;\n}\n.col-\\[1\\] {\n grid-column: 1;\n}\n.row-\\[1\\] {\n grid-row: 1;\n}\n.my-3 {\n margin-top: 0.75rem;\n margin-bottom: 0.75rem;\n}\n.my-4 {\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n.mb-2 {\n margin-bottom: 0.5rem;\n}\n.mb-6 {\n margin-bottom: 1.5rem;\n}\n.ml-1 {\n margin-left: 0.25rem;\n}\n.ml-2 {\n margin-left: 0.5rem;\n}\n.mt-1 {\n margin-top: 0.25rem;\n}\n.mt-2 {\n margin-top: 0.5rem;\n}\n.mt-4 {\n margin-top: 1rem;\n}\n.mt-6 {\n margin-top: 1.5rem;\n}\n.box-border {\n box-sizing: border-box;\n}\n.block {\n display: block;\n}\n.inline-block {\n display: inline-block;\n}\n.inline {\n display: inline;\n}\n.flex {\n display: flex;\n}\n.inline-flex {\n display: inline-flex;\n}\n.grid {\n display: grid;\n}\n.contents {\n display: contents;\n}\n.hidden {\n display: none;\n}\n.h-10 {\n height: 2.5rem;\n}\n.h-12 {\n height: 3rem;\n}\n.h-14 {\n height: 3.5rem;\n}\n.h-6 {\n height: 1.5rem;\n}\n.h-7 {\n height: 1.75rem;\n}\n.h-8 {\n height: 2rem;\n}\n.h-\\[29px\\] {\n height: 29px;\n}\n.h-full {\n height: 100%;\n}\n.h-px {\n height: 1px;\n}\n.min-h-20 {\n min-height: 5rem;\n}\n.w-10 {\n width: 2.5rem;\n}\n.w-6 {\n width: 1.5rem;\n}\n.w-\\[140px\\] {\n width: 140px;\n}\n.w-\\[48\\%\\] {\n width: 48%;\n}\n.w-\\[51\\%\\] {\n width: 51%;\n}\n.w-full {\n width: 100%;\n}\n.min-w-0 {\n min-width: 0px;\n}\n.min-w-20 {\n min-width: 5rem;\n}\n.min-w-\\[280px\\] {\n min-width: 280px;\n}\n.min-w-\\[320px\\] {\n min-width: 320px;\n}\n.min-w-\\[360px\\] {\n min-width: 360px;\n}\n.max-w-\\[60px\\] {\n max-width: 60px;\n}\n.flex-1 {\n flex: 1 1 0%;\n}\n.flex-none {\n flex: none;\n}\n.flex-shrink {\n flex-shrink: 1;\n}\n.flex-shrink-0 {\n flex-shrink: 0;\n}\n.shrink-0 {\n flex-shrink: 0;\n}\n.rotate-180 {\n --tw-rotate: 180deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n@keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n 50% {\n transform: none;\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n.animate-bounce {\n animation: bounce 1s infinite;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n.animate-spin {\n animation: spin 1s linear infinite;\n}\n.cursor-not-allowed {\n cursor: not-allowed;\n}\n.cursor-pointer {\n cursor: pointer;\n}\n.select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.grid-cols-\\[24px_1fr\\] {\n grid-template-columns: 24px 1fr;\n}\n.grid-cols-\\[40px\\2c 1fr\\2c 20px\\] {\n grid-template-columns: 40px 1fr 20px;\n}\n.grid-cols-\\[repeat\\(auto-fill\\2c minmax\\(\\$\\{this\\.getImageMinSizePx\\(\\)\\}px\\2c 300px\\)\\)\\] {\n grid-template-columns: repeat(auto-fill,minmax(${this.getImageMinSizePx()}px,300px));\n}\n.flex-row {\n flex-direction: row;\n}\n.flex-col {\n flex-direction: column;\n}\n.flex-wrap {\n flex-wrap: wrap;\n}\n.items-start {\n align-items: flex-start;\n}\n.items-center {\n align-items: center;\n}\n.justify-start {\n justify-content: flex-start;\n}\n.justify-end {\n justify-content: flex-end;\n}\n.justify-center {\n justify-content: center;\n}\n.justify-between {\n justify-content: space-between;\n}\n.gap-1 {\n gap: 0.25rem;\n}\n.gap-1\\.5 {\n gap: 0.375rem;\n}\n.gap-2 {\n gap: 0.5rem;\n}\n.gap-3 {\n gap: 0.75rem;\n}\n.gap-4 {\n gap: 1rem;\n}\n.gap-x-2 {\n -moz-column-gap: 0.5rem;\n column-gap: 0.5rem;\n}\n.self-center {\n align-self: center;\n}\n.overflow-hidden {\n overflow: hidden;\n}\n.overflow-visible {\n overflow: visible;\n}\n.text-ellipsis {\n text-overflow: ellipsis;\n}\n.whitespace-nowrap {\n white-space: nowrap;\n}\n.text-wrap {\n text-wrap: wrap;\n}\n.break-words {\n overflow-wrap: break-word;\n}\n.break-all {\n word-break: break-all;\n}\n.rounded {\n border-radius: 0.25rem;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.rounded-lg {\n border-radius: 0.5rem;\n}\n.rounded-md {\n border-radius: 0.375rem;\n}\n.rounded-xl {\n border-radius: 0.75rem;\n}\n.rounded-t-\\[120px\\] {\n border-top-left-radius: 120px;\n border-top-right-radius: 120px;\n}\n.border {\n border-width: 1px;\n}\n.border-0 {\n border-width: 0px;\n}\n.border-\\[var\\(--neutral-90\\)\\] {\n border-color: var(--neutral-90);\n}\n.border-neutral-90 {\n --tw-border-opacity: 1;\n border-color: rgb(222 231 237 / var(--tw-border-opacity, 1));\n}\n.bg-\\[var\\(--neutral-100\\)\\] {\n background-color: var(--neutral-100);\n}\n.bg-\\[var\\(--neutral-90\\)\\] {\n background-color: var(--neutral-90);\n}\n.bg-blue-85 {\n --tw-bg-opacity: 1;\n background-color: rgb(180 209 253 / var(--tw-bg-opacity, 1));\n}\n.bg-green-85 {\n --tw-bg-opacity: 1;\n background-color: rgb(195 239 206 / var(--tw-bg-opacity, 1));\n}\n.bg-neutral-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n.bg-neutral-90 {\n --tw-bg-opacity: 1;\n background-color: rgb(222 231 237 / var(--tw-bg-opacity, 1));\n}\n.bg-neutral-95 {\n --tw-bg-opacity: 1;\n background-color: rgb(238 243 246 / var(--tw-bg-opacity, 1));\n}\n.bg-neutral-98 {\n --tw-bg-opacity: 1;\n background-color: rgb(248 250 251 / var(--tw-bg-opacity, 1));\n}\n.bg-red-85 {\n --tw-bg-opacity: 1;\n background-color: rgb(245 188 188 / var(--tw-bg-opacity, 1));\n}\n.bg-transparent {\n background-color: transparent;\n}\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n.bg-yellow-85 {\n --tw-bg-opacity: 1;\n background-color: rgb(255 224 179 / var(--tw-bg-opacity, 1));\n}\n.bg-\\[radial-gradient\\(ellipse_75px_52px_at_bottom_center\\2c rgba\\(255\\2c 255\\2c 255\\2c 0\\.78\\)_0\\%\\2c rgba\\(255\\2c 255\\2c 255\\2c 0\\)_112\\.5\\%\\)\\] {\n background-image: radial-gradient(ellipse 75px 52px at bottom center,rgba(255,255,255,0.78) 0%,rgba(255,255,255,0) 112.5%);\n}\n.object-cover {\n -o-object-fit: cover;\n object-fit: cover;\n}\n.p-0 {\n padding: 0px;\n}\n.p-0\\.5 {\n padding: 0.125rem;\n}\n.p-1 {\n padding: 0.25rem;\n}\n.p-2 {\n padding: 0.5rem;\n}\n.p-2\\.5 {\n padding: 0.625rem;\n}\n.p-3 {\n padding: 0.75rem;\n}\n.p-4 {\n padding: 1rem;\n}\n.px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n.px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n.px-2\\.5 {\n padding-left: 0.625rem;\n padding-right: 0.625rem;\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n.py-0\\.5 {\n padding-top: 0.125rem;\n padding-bottom: 0.125rem;\n}\n.py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n.py-1\\.5 {\n padding-top: 0.375rem;\n padding-bottom: 0.375rem;\n}\n.py-10 {\n padding-top: 2.5rem;\n padding-bottom: 2.5rem;\n}\n.py-3 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n.pt-2 {\n padding-top: 0.5rem;\n}\n.pt-4 {\n padding-top: 1rem;\n}\n.text-center {\n text-align: center;\n}\n.align-middle {\n vertical-align: middle;\n}\n.font-mono {\n font-family: "PT Mono", sans-serif;\n}\n.text-\\[10px\\] {\n font-size: 10px;\n}\n.text-\\[12px\\] {\n font-size: 12px;\n}\n.text-\\[13px\\] {\n font-size: 13px;\n}\n.text-\\[14px\\] {\n font-size: 14px;\n}\n.text-\\[16px\\] {\n font-size: 16px;\n}\n.text-\\[17px\\] {\n font-size: 17px;\n}\n.text-\\[18px\\] {\n font-size: 18px;\n}\n.text-\\[24px\\] {\n font-size: 24px;\n}\n.font-bold {\n font-weight: 700;\n}\n.font-medium {\n font-weight: 500;\n}\n.font-normal {\n font-weight: 400;\n}\n.font-semibold {\n font-weight: 600;\n}\n.uppercase {\n text-transform: uppercase;\n}\n.italic {\n font-style: italic;\n}\n.leading-none {\n line-height: 1;\n}\n.leading-snug {\n line-height: 1.375;\n}\n.leading-tight {\n line-height: 1.25;\n}\n.text-\\[var\\(--neutral-40\\)\\] {\n color: var(--neutral-40);\n}\n.text-neutral-10 {\n --tw-text-opacity: 1;\n color: rgb(18 27 33 / var(--tw-text-opacity, 1));\n}\n.text-neutral-20 {\n --tw-text-opacity: 1;\n color: rgb(36 53 66 / var(--tw-text-opacity, 1));\n}\n.text-neutral-30 {\n --tw-text-opacity: 1;\n color: rgb(54 80 99 / var(--tw-text-opacity, 1));\n}\n.text-neutral-60 {\n --tw-text-opacity: 1;\n color: rgb(122 157 184 / var(--tw-text-opacity, 1));\n}\n.text-neutral-70 {\n --tw-text-opacity: 1;\n color: rgb(156 182 201 / var(--tw-text-opacity, 1));\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.underline {\n text-decoration-line: underline;\n}\n.opacity-0 {\n opacity: 0;\n}\n.opacity-100 {\n opacity: 1;\n}\n.mix-blend-difference {\n mix-blend-mode: difference;\n}\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-\\[0_0_16px_rgba\\(189\\2c 206\\2c 219\\2c 0\\.4\\)\\] {\n --tw-shadow: 0 0 16px rgba(189,206,219,0.4);\n --tw-shadow-colored: 0 0 16px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.ring-1 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n.ring-neutral-90 {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(222 231 237 / var(--tw-ring-opacity, 1));\n}\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-opacity {\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-transform {\n transition-property: transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.duration-200 {\n transition-duration: 200ms;\n}\n.duration-700 {\n transition-duration: 700ms;\n}\n.ease-in-out {\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n}\nstrong {\n font-weight: 600;\n}\n.hover\\:scale-105:hover {\n --tw-scale-x: 1.05;\n --tw-scale-y: 1.05;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.hover\\:bg-neutral-90:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(222 231 237 / var(--tw-bg-opacity, 1));\n}\n.hover\\:bg-neutral-95:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(238 243 246 / var(--tw-bg-opacity, 1));\n}\n';
|
|
332
|
+
|
|
333
|
+
// src/styles/index.ts
|
|
334
|
+
import { css as css2, LitElement as LitElement2, unsafeCSS } from "lit";
|
|
335
|
+
var style = css2`
|
|
336
|
+
${unsafeCSS(styles_default)}
|
|
337
|
+
|
|
338
|
+
:host([is-inline]) {
|
|
339
|
+
display: inline-flex;
|
|
340
|
+
align-items: center;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
:host([is-full-width]) {
|
|
344
|
+
width: 100%;
|
|
345
|
+
flex: 1;
|
|
346
|
+
display: flex;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
`;
|
|
350
|
+
var CoreLitElement = class extends LitElement2 {
|
|
351
|
+
static {
|
|
352
|
+
this.styles = [style];
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
// src/shared/address-view.ts
|
|
357
|
+
var AddressView = class extends CoreLitElement {
|
|
358
|
+
constructor() {
|
|
359
|
+
super(...arguments);
|
|
360
|
+
this.size = "small";
|
|
361
|
+
this.nameOnly = false;
|
|
362
|
+
this.addressOnly = false;
|
|
363
|
+
this.isCardView = false;
|
|
364
|
+
this.showCopyButton = false;
|
|
365
|
+
this.maxWidth = 200;
|
|
366
|
+
this.showIdenticon = true;
|
|
367
|
+
this.isLoadingAddress = false;
|
|
368
|
+
// Composables
|
|
369
|
+
this.addressResolver = useAddressResolver2();
|
|
370
|
+
// Task for resolving address data
|
|
371
|
+
this.addressTask = new Task2(this, {
|
|
372
|
+
task: async ([address], { signal }) => {
|
|
373
|
+
if (!address) return null;
|
|
374
|
+
this.isLoadingAddress = true;
|
|
375
|
+
try {
|
|
376
|
+
const resolved = await this.addressResolver.resolveAddress(address);
|
|
377
|
+
this.requestUpdate();
|
|
378
|
+
return resolved;
|
|
379
|
+
} catch (error) {
|
|
380
|
+
return null;
|
|
381
|
+
} finally {
|
|
382
|
+
this.isLoadingAddress = false;
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
args: () => [this.address]
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Get the display address (first segment only for compound addresses)
|
|
390
|
+
* e.g., "0x123...-0x456..." becomes "0x123..."
|
|
391
|
+
*/
|
|
392
|
+
get displayAddress() {
|
|
393
|
+
return this.address.split("-")[0];
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Get display name for the address
|
|
397
|
+
*/
|
|
398
|
+
getDisplayName() {
|
|
399
|
+
const resolved = this.addressTask.value;
|
|
400
|
+
if (!resolved) {
|
|
401
|
+
return this.isLoadingAddress ? "Loading..." : "Anonymous";
|
|
402
|
+
}
|
|
403
|
+
const computedName = this.addressResolver.formatDisplayName(resolved);
|
|
404
|
+
return this.label || computedName || "Anonymous";
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Check if this is a contract address (non-profile)
|
|
408
|
+
*/
|
|
409
|
+
get isContract() {
|
|
410
|
+
const resolved = this.addressTask.value;
|
|
411
|
+
return resolved ? resolved.__gqltype !== "Profile" : false;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Check if this should show the address hash (profiles show hash, contracts don't)
|
|
415
|
+
*/
|
|
416
|
+
get shouldShowAddressHash() {
|
|
417
|
+
const resolved = this.addressTask.value;
|
|
418
|
+
return resolved ? resolved.__gqltype === "Profile" : true;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Get prefix for the address display
|
|
422
|
+
*/
|
|
423
|
+
get addressPrefix() {
|
|
424
|
+
const resolved = this.addressTask.value;
|
|
425
|
+
return resolved?.hasProfile ? "@" : "";
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Check if should show name colors
|
|
429
|
+
*/
|
|
430
|
+
get shouldShowNameColor() {
|
|
431
|
+
const resolved = this.addressTask.value;
|
|
432
|
+
return resolved ? this.addressResolver.shouldShowNameColor(resolved) : true;
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Handle address click
|
|
436
|
+
*/
|
|
437
|
+
handleClick() {
|
|
438
|
+
this.dispatchEvent(
|
|
439
|
+
new CustomEvent("address-click", {
|
|
440
|
+
detail: {
|
|
441
|
+
address: this.address,
|
|
442
|
+
resolved: this.addressTask.value
|
|
443
|
+
},
|
|
444
|
+
bubbles: true
|
|
445
|
+
})
|
|
446
|
+
);
|
|
447
|
+
}
|
|
448
|
+
/** Generate identicon when address changes */
|
|
449
|
+
willUpdate(changed) {
|
|
450
|
+
if (changed.has("address") && this.address) {
|
|
451
|
+
try {
|
|
452
|
+
this.identicon = makeBlockie(this.displayAddress.toLowerCase());
|
|
453
|
+
} catch {
|
|
454
|
+
this.identicon = void 0;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
/** Copy the display address to clipboard (card view) */
|
|
459
|
+
handleCopy(event) {
|
|
460
|
+
if (event) event.stopPropagation();
|
|
461
|
+
if (navigator.clipboard) {
|
|
462
|
+
navigator.clipboard.writeText(this.displayAddress);
|
|
463
|
+
this.dispatchEvent(
|
|
464
|
+
new CustomEvent("address-copied", {
|
|
465
|
+
detail: { address: this.displayAddress },
|
|
466
|
+
bubbles: true
|
|
467
|
+
})
|
|
468
|
+
);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
/** ========== RENDER HELPERS (Use Cases) ========== */
|
|
472
|
+
/** Pixel size mapping for identicon based on component size */
|
|
473
|
+
getIdenticonSizePx() {
|
|
474
|
+
switch (this.size) {
|
|
475
|
+
case "x-small":
|
|
476
|
+
return 10;
|
|
477
|
+
case "small":
|
|
478
|
+
return 12;
|
|
479
|
+
case "medium":
|
|
480
|
+
return 14;
|
|
481
|
+
case "large":
|
|
482
|
+
return 16;
|
|
483
|
+
default:
|
|
484
|
+
return 14;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* Render only the name (and optionally the address hash when allowed for profiles)
|
|
489
|
+
*/
|
|
490
|
+
renderNameOnly(displayName) {
|
|
491
|
+
return html2`
|
|
492
|
+
<!-- Name Only Use Case -->
|
|
493
|
+
<lukso-username
|
|
494
|
+
class="inline-block align-middle"
|
|
495
|
+
name=${displayName}
|
|
496
|
+
address=${this.address}
|
|
497
|
+
size=${this.size}
|
|
498
|
+
max-width=${this.maxWidth}
|
|
499
|
+
prefix=${this.addressPrefix}
|
|
500
|
+
address-color=${this.addressColor}
|
|
501
|
+
name-color=${this.nameColor}
|
|
502
|
+
></lukso-username>
|
|
503
|
+
`;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Render only the raw address (no name)
|
|
507
|
+
*/
|
|
508
|
+
renderAddressOnly() {
|
|
509
|
+
return html2`
|
|
510
|
+
<!-- Address Only Use Case -->
|
|
511
|
+
<lukso-username
|
|
512
|
+
class="inline-block align-middle"
|
|
513
|
+
address=${this.displayAddress}
|
|
514
|
+
size=${this.size}
|
|
515
|
+
max-width=${this.maxWidth}
|
|
516
|
+
has-name-color="false"
|
|
517
|
+
?has-address-color=${this.shouldShowNameColor}
|
|
518
|
+
></lukso-username>
|
|
519
|
+
`;
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Render both name and (conditionally) the address hash (profiles show hash, contracts may hide it)
|
|
523
|
+
*/
|
|
524
|
+
renderNameAndAddress(displayName) {
|
|
525
|
+
return html2`
|
|
526
|
+
<!-- Name + Address Use Case -->
|
|
527
|
+
<lukso-username
|
|
528
|
+
class="inline-block align-middle"
|
|
529
|
+
name=${displayName}
|
|
530
|
+
address=${this.address}
|
|
531
|
+
size=${this.size}
|
|
532
|
+
max-width=${this.maxWidth}
|
|
533
|
+
prefix=${this.addressPrefix}
|
|
534
|
+
address-color=${this.addressColor}
|
|
535
|
+
name-color=${this.nameColor}
|
|
536
|
+
></lukso-username>
|
|
537
|
+
`;
|
|
538
|
+
}
|
|
539
|
+
renderIdenticon() {
|
|
540
|
+
if (!this.showIdenticon || !this.identicon) return "";
|
|
541
|
+
const size = this.getIdenticonSizePx();
|
|
542
|
+
return html2`
|
|
543
|
+
<div class="inline-flex items-center justify-center align-middle">
|
|
544
|
+
<img
|
|
545
|
+
class="inline-block rounded-full ring-1 ring-neutral-90 shrink-0"
|
|
546
|
+
src=${this.identicon}
|
|
547
|
+
alt="identicon"
|
|
548
|
+
style="width:${size}px;height:${size}px;image-rendering:pixelated;"
|
|
549
|
+
/>
|
|
550
|
+
</div>
|
|
551
|
+
`;
|
|
552
|
+
}
|
|
553
|
+
/** Map size to a typography class for the label */
|
|
554
|
+
getLabelClass() {
|
|
555
|
+
switch (this.size) {
|
|
556
|
+
case "x-small":
|
|
557
|
+
return "paragraph-inter-12-semi-bold";
|
|
558
|
+
case "small":
|
|
559
|
+
return "heading-inter-14-bold";
|
|
560
|
+
case "medium":
|
|
561
|
+
return "heading-inter-17-semi-bold";
|
|
562
|
+
case "large":
|
|
563
|
+
return "heading-inter-21-semi-bold";
|
|
564
|
+
default:
|
|
565
|
+
return "heading-inter-17-semi-bold";
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
renderDisplayName() {
|
|
569
|
+
const displayName = this.getDisplayName();
|
|
570
|
+
return this.label ? html2`<div class="inline-flex items-center gap-2 font-semibold text-neutral-20 ${this.getLabelClass()}">${this.label}</div>` : html2`<lukso-username
|
|
571
|
+
class="inline-block align-middle"
|
|
572
|
+
name=${displayName}
|
|
573
|
+
size=${this.size}
|
|
574
|
+
?has-name-color=${this.shouldShowNameColor}
|
|
575
|
+
></lukso-username>`;
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* Decide which of the three core inline variants to render
|
|
579
|
+
*/
|
|
580
|
+
renderInlineVariant(displayName) {
|
|
581
|
+
if (this.nameOnly) return this.renderNameOnly(displayName);
|
|
582
|
+
if (this.addressOnly) return this.renderAddressOnly();
|
|
583
|
+
return this.renderNameAndAddress(displayName);
|
|
584
|
+
}
|
|
585
|
+
render() {
|
|
586
|
+
const displayName = this.getDisplayName();
|
|
587
|
+
if (this.isCardView) {
|
|
588
|
+
return html2`
|
|
589
|
+
<div class="block border border-neutral-90 rounded-xl py-3 px-4 bg-neutral-100 min-w-[280px]" @click=${this.handleClick}>
|
|
590
|
+
<div class="flex items-center justify-between mb-2">
|
|
591
|
+
<div class="inline-flex items-center font-normal gap-1">
|
|
592
|
+
${this.renderIdenticon()}
|
|
593
|
+
${this.renderDisplayName()}
|
|
594
|
+
</div>
|
|
595
|
+
${this.showCopyButton ? html2`<button
|
|
596
|
+
class="bg-neutral-100 border-0 rounded-lg w-6 h-6 flex items-center justify-center cursor-pointer text-neutral-20 hover:bg-neutral-95"
|
|
597
|
+
@click=${(e) => this.handleCopy(e)}
|
|
598
|
+
title="Copy address"
|
|
599
|
+
>
|
|
600
|
+
<lukso-icon name="copy" size="small"></lukso-icon>
|
|
601
|
+
</button>` : html2``}
|
|
602
|
+
</div>
|
|
603
|
+
<div class="font-semibold text-neutral-20 break-all flex items-center gap-2">
|
|
604
|
+
|
|
605
|
+
<lukso-username
|
|
606
|
+
address=${this.displayAddress}
|
|
607
|
+
size=${this.size}
|
|
608
|
+
max-width=${this.maxWidth}
|
|
609
|
+
has-name-color="false"
|
|
610
|
+
slice-by="24"
|
|
611
|
+
?has-address-color=${this.shouldShowNameColor}
|
|
612
|
+
></lukso-username>
|
|
613
|
+
</div>
|
|
614
|
+
</div>
|
|
615
|
+
`;
|
|
616
|
+
}
|
|
617
|
+
return html2`
|
|
618
|
+
<div class="inline-flex items-center cursor-pointer gap-1" @click=${this.handleClick}>
|
|
619
|
+
${this.renderIdenticon()}
|
|
620
|
+
<!-- Inline Variants -->
|
|
621
|
+
${this.renderInlineVariant(displayName)}
|
|
622
|
+
</div>
|
|
623
|
+
`;
|
|
624
|
+
}
|
|
625
|
+
};
|
|
626
|
+
__decorateClass([
|
|
627
|
+
property2()
|
|
628
|
+
], AddressView.prototype, "address", 2);
|
|
629
|
+
__decorateClass([
|
|
630
|
+
property2()
|
|
631
|
+
], AddressView.prototype, "size", 2);
|
|
632
|
+
__decorateClass([
|
|
633
|
+
property2({ type: Boolean, attribute: "name-only" })
|
|
634
|
+
], AddressView.prototype, "nameOnly", 2);
|
|
635
|
+
__decorateClass([
|
|
636
|
+
property2({ type: Boolean, attribute: "address-only" })
|
|
637
|
+
], AddressView.prototype, "addressOnly", 2);
|
|
638
|
+
__decorateClass([
|
|
639
|
+
property2({ type: Boolean, attribute: "is-card-view" })
|
|
640
|
+
], AddressView.prototype, "isCardView", 2);
|
|
641
|
+
__decorateClass([
|
|
642
|
+
property2()
|
|
643
|
+
], AddressView.prototype, "label", 2);
|
|
644
|
+
__decorateClass([
|
|
645
|
+
property2({ type: Boolean, attribute: "show-copy-button" })
|
|
646
|
+
], AddressView.prototype, "showCopyButton", 2);
|
|
647
|
+
__decorateClass([
|
|
648
|
+
property2({ type: Number, attribute: "max-width" })
|
|
649
|
+
], AddressView.prototype, "maxWidth", 2);
|
|
650
|
+
__decorateClass([
|
|
651
|
+
property2({ type: Boolean, attribute: "show-identicon" })
|
|
652
|
+
], AddressView.prototype, "showIdenticon", 2);
|
|
653
|
+
__decorateClass([
|
|
654
|
+
property2({ type: String, attribute: "address-color" })
|
|
655
|
+
], AddressView.prototype, "addressColor", 2);
|
|
656
|
+
__decorateClass([
|
|
657
|
+
property2({ type: String, attribute: "name-color" })
|
|
658
|
+
], AddressView.prototype, "nameColor", 2);
|
|
659
|
+
__decorateClass([
|
|
660
|
+
state2()
|
|
661
|
+
], AddressView.prototype, "isLoadingAddress", 2);
|
|
662
|
+
__decorateClass([
|
|
663
|
+
state2()
|
|
664
|
+
], AddressView.prototype, "identicon", 2);
|
|
665
|
+
AddressView = __decorateClass([
|
|
666
|
+
safeCustomElement("address-view")
|
|
667
|
+
], AddressView);
|
|
668
|
+
|
|
669
|
+
// src/shared/custom-select.ts
|
|
670
|
+
import { html as html3 } from "lit";
|
|
671
|
+
import { property as property3 } from "lit/decorators.js";
|
|
672
|
+
import makeBlockie2 from "ethereum-blockies-base64";
|
|
673
|
+
var CustomOption = class extends CoreLitElement {
|
|
674
|
+
constructor() {
|
|
675
|
+
super(...arguments);
|
|
676
|
+
this.selected = false;
|
|
677
|
+
this.disabled = false;
|
|
678
|
+
this.hoverable = true;
|
|
679
|
+
}
|
|
680
|
+
render() {
|
|
681
|
+
const base = "flex flex-row flex-1 items-center px-2 py-1 gap-2 h-7 rounded-md border-0 cursor-pointer text-[14px] text-neutral-20 w-full justify-between";
|
|
682
|
+
const hover = this.hoverable ? " hover:bg-neutral-95" : "";
|
|
683
|
+
const selected = this.selected ? " bg-neutral-90 rounded" : "";
|
|
684
|
+
const disabled = this.disabled ? " text-neutral-60 cursor-not-allowed" : "";
|
|
685
|
+
return html3`<button class="${base}${hover}${selected}${disabled}" ?disabled=${this.disabled}><slot></slot></button>`;
|
|
686
|
+
}
|
|
687
|
+
};
|
|
688
|
+
__decorateClass([
|
|
689
|
+
property3({ type: Boolean, reflect: true })
|
|
690
|
+
], CustomOption.prototype, "selected", 2);
|
|
691
|
+
__decorateClass([
|
|
692
|
+
property3({ type: Boolean, reflect: true })
|
|
693
|
+
], CustomOption.prototype, "disabled", 2);
|
|
694
|
+
__decorateClass([
|
|
695
|
+
property3({ type: Boolean, reflect: true })
|
|
696
|
+
], CustomOption.prototype, "hoverable", 2);
|
|
697
|
+
CustomOption = __decorateClass([
|
|
698
|
+
safeCustomElement("custom-option")
|
|
699
|
+
], CustomOption);
|
|
700
|
+
var CustomSelect = class extends CoreLitElement {
|
|
701
|
+
constructor() {
|
|
702
|
+
super(...arguments);
|
|
703
|
+
this.open = false;
|
|
704
|
+
this.options = [];
|
|
705
|
+
this.size = "small";
|
|
706
|
+
this.onOutsideClick = (e) => {
|
|
707
|
+
if (!this.open) return;
|
|
708
|
+
const path = e.composedPath();
|
|
709
|
+
if (!path.includes(this)) this.close();
|
|
710
|
+
};
|
|
711
|
+
}
|
|
712
|
+
toggleOpen() {
|
|
713
|
+
this.open = !this.open;
|
|
714
|
+
}
|
|
715
|
+
close() {
|
|
716
|
+
this.open = false;
|
|
717
|
+
}
|
|
718
|
+
onOptionClick(opt) {
|
|
719
|
+
if (opt.disabled) return;
|
|
720
|
+
this.value = opt.value;
|
|
721
|
+
this.dispatchEvent(new Event("change", { bubbles: true }));
|
|
722
|
+
this.close();
|
|
723
|
+
}
|
|
724
|
+
onKeyDown(e) {
|
|
725
|
+
if (e.key === "Escape") this.close();
|
|
726
|
+
}
|
|
727
|
+
connectedCallback() {
|
|
728
|
+
super.connectedCallback();
|
|
729
|
+
window.addEventListener("click", this.onOutsideClick, { capture: true });
|
|
730
|
+
}
|
|
731
|
+
disconnectedCallback() {
|
|
732
|
+
window.removeEventListener("click", this.onOutsideClick, { capture: true });
|
|
733
|
+
super.disconnectedCallback();
|
|
734
|
+
}
|
|
735
|
+
updated() {
|
|
736
|
+
const selectedOption = this.getSelectedOption();
|
|
737
|
+
if (selectedOption) {
|
|
738
|
+
this.value = selectedOption.value;
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
getSelectedOption() {
|
|
742
|
+
return this.options.find((o) => o.value === this.value);
|
|
743
|
+
}
|
|
744
|
+
getIdenticonSizePx() {
|
|
745
|
+
switch (this.size) {
|
|
746
|
+
case "x-small":
|
|
747
|
+
return 10;
|
|
748
|
+
case "small":
|
|
749
|
+
return 12;
|
|
750
|
+
case "medium":
|
|
751
|
+
return 14;
|
|
752
|
+
case "large":
|
|
753
|
+
return 16;
|
|
754
|
+
default:
|
|
755
|
+
return 14;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
renderIdenticon(address) {
|
|
759
|
+
const size = this.getIdenticonSizePx();
|
|
760
|
+
const identicon = makeBlockie2(address.toLowerCase());
|
|
761
|
+
return html3`
|
|
762
|
+
<div class="inline-flex items-center p-1 justify-center rounded-lg bg-neutral-100 border border-neutral-90 overflow-hidden flex-none">
|
|
763
|
+
<img
|
|
764
|
+
class="block"
|
|
765
|
+
src=${identicon}
|
|
766
|
+
alt="identicon"
|
|
767
|
+
style="width:${size}px;height:${size}px;"
|
|
768
|
+
/>
|
|
769
|
+
</div>
|
|
770
|
+
`;
|
|
771
|
+
}
|
|
772
|
+
renderOptionLabel(option) {
|
|
773
|
+
return option.value.startsWith("0x") ? html3`<div class="inline-flex items-center gap-2 px-2.5 py-1.5 text-neutral-20 leading-tight font-semibold">${this.renderIdenticon(
|
|
774
|
+
option.value
|
|
775
|
+
)} <span class="whitespace-nowrap overflow-hidden text-ellipsis text-[14px]">${option.label}</span></div>` : html3`<url-view url=${option.value} label=${option.label} size="x-small"></url-view>`;
|
|
776
|
+
}
|
|
777
|
+
render() {
|
|
778
|
+
const selectedOption = this.getSelectedOption();
|
|
779
|
+
return html3`
|
|
780
|
+
<div class="relative w-full min-w-[360px]" @keydown=${this.onKeyDown}>
|
|
781
|
+
<button class="box-border flex flex-row flex-1 w-full items-center h-[29px] bg-white border border-neutral-90 rounded-lg text-neutral-20 cursor-pointer justify-between" @click=${this.toggleOpen} aria-haspopup="listbox" aria-expanded=${this.open}>
|
|
782
|
+
<custom-option is-full-width .hoverable=${false}>
|
|
783
|
+
<div class="flex flex-row flex-1 items-center justify-between">
|
|
784
|
+
<span>${selectedOption ? this.renderOptionLabel(selectedOption) : "Select option"}</span>
|
|
785
|
+
<lukso-icon class="transition-transform ${this.open ? "rotate-180" : ""}" name="arrow-down-sm" size="small" color="neutral-20" aria-hidden="true">
|
|
786
|
+
</lukso-icon>
|
|
787
|
+
</div>
|
|
788
|
+
</custom-option>
|
|
789
|
+
</button>
|
|
790
|
+
|
|
791
|
+
${this.open && this.options.length > 0 ? html3`<div class="absolute left-0 top-[calc(100%+8px)] w-full bg-white border border-neutral-90 shadow-[0_0_16px_rgba(189,206,219,0.4)] rounded-xl p-2.5 flex flex-col gap-1 z-[1000] overflow-hidden box-border" role="listbox">
|
|
792
|
+
${this.options.map(
|
|
793
|
+
(opt) => html3`<custom-option .selected=${opt.value === this.value} .disabled=${opt.disabled} @click=${() => this.onOptionClick(opt)}>
|
|
794
|
+
${this.renderOptionLabel(opt)}
|
|
795
|
+
</custom-option>`
|
|
796
|
+
)}
|
|
797
|
+
</div>` : ""}
|
|
798
|
+
</div>
|
|
799
|
+
`;
|
|
800
|
+
}
|
|
801
|
+
};
|
|
802
|
+
__decorateClass([
|
|
803
|
+
property3()
|
|
804
|
+
], CustomSelect.prototype, "value", 2);
|
|
805
|
+
__decorateClass([
|
|
806
|
+
property3({ type: Boolean })
|
|
807
|
+
], CustomSelect.prototype, "open", 2);
|
|
808
|
+
__decorateClass([
|
|
809
|
+
property3({ type: Array })
|
|
810
|
+
], CustomSelect.prototype, "options", 2);
|
|
811
|
+
__decorateClass([
|
|
812
|
+
property3({ type: String })
|
|
813
|
+
], CustomSelect.prototype, "size", 2);
|
|
814
|
+
CustomSelect = __decorateClass([
|
|
815
|
+
safeCustomElement("custom-select")
|
|
816
|
+
], CustomSelect);
|
|
817
|
+
|
|
818
|
+
// src/shared/function-name-view.ts
|
|
819
|
+
import { html as html4 } from "lit";
|
|
820
|
+
import { property as property4 } from "lit/decorators.js";
|
|
821
|
+
var FunctionNameView = class extends CoreLitElement {
|
|
822
|
+
constructor() {
|
|
823
|
+
super(...arguments);
|
|
824
|
+
this.label = "";
|
|
825
|
+
this.icon = "user";
|
|
826
|
+
this.size = "small";
|
|
827
|
+
}
|
|
828
|
+
getPadding() {
|
|
829
|
+
switch (this.size) {
|
|
830
|
+
case "x-small":
|
|
831
|
+
return "2px 8px";
|
|
832
|
+
case "small":
|
|
833
|
+
return "4px 10px";
|
|
834
|
+
case "medium":
|
|
835
|
+
return "6px 12px";
|
|
836
|
+
case "large":
|
|
837
|
+
return "8px 14px";
|
|
838
|
+
default:
|
|
839
|
+
return "4px 10px";
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
getFontSize() {
|
|
843
|
+
switch (this.size) {
|
|
844
|
+
case "x-small":
|
|
845
|
+
return "12px";
|
|
846
|
+
case "small":
|
|
847
|
+
return "14px";
|
|
848
|
+
case "medium":
|
|
849
|
+
return "16px";
|
|
850
|
+
case "large":
|
|
851
|
+
return "18px";
|
|
852
|
+
default:
|
|
853
|
+
return "14px";
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
getIconSize() {
|
|
857
|
+
return this.size;
|
|
858
|
+
}
|
|
859
|
+
getHeight() {
|
|
860
|
+
switch (this.size) {
|
|
861
|
+
case "x-small":
|
|
862
|
+
return "h-6";
|
|
863
|
+
case "small":
|
|
864
|
+
return "h-8";
|
|
865
|
+
case "medium":
|
|
866
|
+
return "h-10";
|
|
867
|
+
case "large":
|
|
868
|
+
return "h-12";
|
|
869
|
+
default:
|
|
870
|
+
return "h-8";
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
render() {
|
|
874
|
+
return html4`
|
|
875
|
+
<div class="inline-flex ${this.getHeight()} items-center gap-2 bg-neutral-90 text-neutral-20 rounded-xl leading-none font-semibold" style="padding:${this.getPadding()}; font-size:${this.getFontSize()};">
|
|
876
|
+
<lukso-icon name=${this.icon} size=${this.getIconSize()} color=${this.color || ""}></lukso-icon>
|
|
877
|
+
<span class="whitespace-nowrap"><slot>${this.label}</slot></span>
|
|
878
|
+
</div>
|
|
879
|
+
`;
|
|
880
|
+
}
|
|
881
|
+
};
|
|
882
|
+
__decorateClass([
|
|
883
|
+
property4()
|
|
884
|
+
], FunctionNameView.prototype, "label", 2);
|
|
885
|
+
__decorateClass([
|
|
886
|
+
property4()
|
|
887
|
+
], FunctionNameView.prototype, "icon", 2);
|
|
888
|
+
__decorateClass([
|
|
889
|
+
property4()
|
|
890
|
+
], FunctionNameView.prototype, "size", 2);
|
|
891
|
+
__decorateClass([
|
|
892
|
+
property4({ attribute: "color" })
|
|
893
|
+
], FunctionNameView.prototype, "color", 2);
|
|
894
|
+
FunctionNameView = __decorateClass([
|
|
895
|
+
safeCustomElement("function-name-view")
|
|
896
|
+
], FunctionNameView);
|
|
897
|
+
|
|
898
|
+
// src/shared/gas-provider-view.ts
|
|
899
|
+
import { html as html5 } from "lit";
|
|
900
|
+
import { property as property5 } from "lit/decorators.js";
|
|
901
|
+
var GasProviderView = class extends CoreLitElement {
|
|
902
|
+
constructor() {
|
|
903
|
+
super(...arguments);
|
|
904
|
+
this.allRelayers = [];
|
|
905
|
+
this.balance = 0;
|
|
906
|
+
this.symbol = "LYX";
|
|
907
|
+
this.decimals = 18;
|
|
908
|
+
this.transactionFee = 0;
|
|
909
|
+
this.relayerAvailable = 0;
|
|
910
|
+
this.relayerUsed = 0;
|
|
911
|
+
this.relayerToBeUsed = 0;
|
|
912
|
+
this.relayerResetDate = "N/A";
|
|
913
|
+
}
|
|
914
|
+
formatToken(amount) {
|
|
915
|
+
return (amount / 10 ** this.decimals).toLocaleString(void 0, {
|
|
916
|
+
maximumFractionDigits: 6
|
|
917
|
+
});
|
|
918
|
+
}
|
|
919
|
+
onSelectChanged(e) {
|
|
920
|
+
const value = e.target.value;
|
|
921
|
+
if (!value) return;
|
|
922
|
+
if (this.controllerAddress && value === this.controllerAddress) {
|
|
923
|
+
const next = {
|
|
924
|
+
type: "controller",
|
|
925
|
+
id: this.controllerAddress
|
|
926
|
+
};
|
|
927
|
+
if (!this.selectedGasProvider || this.selectedGasProvider.id !== next.id || this.selectedGasProvider.type !== next.type) {
|
|
928
|
+
this.selectedGasProvider = next;
|
|
929
|
+
this.dispatchEvent(
|
|
930
|
+
new CustomEvent("on-gas-provider-change", {
|
|
931
|
+
detail: next,
|
|
932
|
+
bubbles: true
|
|
933
|
+
})
|
|
934
|
+
);
|
|
935
|
+
}
|
|
936
|
+
return;
|
|
937
|
+
}
|
|
938
|
+
const match = this.allRelayers.find(
|
|
939
|
+
(r) => r.website === value || r.apiUrl === value
|
|
940
|
+
);
|
|
941
|
+
if (match) {
|
|
942
|
+
const next = { type: "relayer", id: match.id };
|
|
943
|
+
if (!this.selectedGasProvider || this.selectedGasProvider.id !== next.id || this.selectedGasProvider.type !== next.type) {
|
|
944
|
+
this.selectedGasProvider = next;
|
|
945
|
+
this.dispatchEvent(
|
|
946
|
+
new CustomEvent("on-gas-provider-change", {
|
|
947
|
+
detail: next,
|
|
948
|
+
bubbles: true
|
|
949
|
+
})
|
|
950
|
+
);
|
|
951
|
+
}
|
|
952
|
+
return;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
renderProgress(totalAvailable, used, toBeUsed, symbol, hasError) {
|
|
956
|
+
const usedPercent = totalAvailable ? used / totalAvailable * 100 : 0;
|
|
957
|
+
const toBeUsedPercent = totalAvailable ? toBeUsed / totalAvailable * 100 : 0;
|
|
958
|
+
const barOverHalf = usedPercent > 50;
|
|
959
|
+
return html5`<progress-view
|
|
960
|
+
class=${hasError ? "error" : ""}
|
|
961
|
+
.data=${[
|
|
962
|
+
{
|
|
963
|
+
value: usedPercent,
|
|
964
|
+
color: "var(--green-54)",
|
|
965
|
+
title: `${usedPercent}%`
|
|
966
|
+
},
|
|
967
|
+
{
|
|
968
|
+
value: toBeUsedPercent,
|
|
969
|
+
color: "var(--neutral-60)",
|
|
970
|
+
title: `${toBeUsedPercent}%`
|
|
971
|
+
}
|
|
972
|
+
]}
|
|
973
|
+
label-position=${barOverHalf ? "left" : "right"}
|
|
974
|
+
.label=${`${toBeUsed} / ${String(totalAvailable)} ${symbol}`}
|
|
975
|
+
>
|
|
976
|
+
</progress-view>`;
|
|
977
|
+
}
|
|
978
|
+
renderControllerProgress() {
|
|
979
|
+
return this.renderProgress(
|
|
980
|
+
this.balance,
|
|
981
|
+
0,
|
|
982
|
+
this.transactionFee,
|
|
983
|
+
this.symbol,
|
|
984
|
+
this.transactionFee > this.balance
|
|
985
|
+
);
|
|
986
|
+
}
|
|
987
|
+
renderRelayerProgress() {
|
|
988
|
+
return this.renderProgress(
|
|
989
|
+
this.relayerAvailable,
|
|
990
|
+
this.relayerUsed,
|
|
991
|
+
this.relayerToBeUsed,
|
|
992
|
+
"M GAS",
|
|
993
|
+
this.relayerToBeUsed > this.relayerAvailable
|
|
994
|
+
);
|
|
995
|
+
}
|
|
996
|
+
displayRelayerResetDate() {
|
|
997
|
+
const date = new Date(this.relayerResetDate);
|
|
998
|
+
return isNaN(date.getTime()) ? "N/A" : date.toLocaleDateString();
|
|
999
|
+
}
|
|
1000
|
+
render() {
|
|
1001
|
+
const formatted = this.formatToken(this.balance);
|
|
1002
|
+
const relayerOptions = this.allRelayers.map((r) => ({
|
|
1003
|
+
value: r.website || r.apiUrl || `relayer:${r.id}`,
|
|
1004
|
+
label: r.name,
|
|
1005
|
+
disabled: false
|
|
1006
|
+
}));
|
|
1007
|
+
const controllerOption = this.controllerAddress ? [
|
|
1008
|
+
{
|
|
1009
|
+
value: this.controllerAddress,
|
|
1010
|
+
label: this.controllerName ? `${this.controllerName} (${formatted} ${this.symbol})` : `UP Browser Extension (${formatted} ${this.symbol})`,
|
|
1011
|
+
disabled: false
|
|
1012
|
+
}
|
|
1013
|
+
] : [];
|
|
1014
|
+
const options = [...relayerOptions, ...controllerOption];
|
|
1015
|
+
const selectedValue = this.selectedGasProvider ? this.selectedGasProvider.type === "controller" ? this.controllerAddress : (() => {
|
|
1016
|
+
const r = this.allRelayers.find(
|
|
1017
|
+
(x) => x.id === this.selectedGasProvider.id
|
|
1018
|
+
);
|
|
1019
|
+
return r?.website || r?.apiUrl || `relayer:${this.selectedGasProvider.id}`;
|
|
1020
|
+
})() : void 0;
|
|
1021
|
+
return html5`
|
|
1022
|
+
<div class="w-full">
|
|
1023
|
+
<custom-select .value=${selectedValue} .options=${options} @change=${this.onSelectChanged}></custom-select>
|
|
1024
|
+
${this.selectedGasProvider ? html5`<div class="mt-2">
|
|
1025
|
+
${this.selectedGasProvider?.type === "controller" ? this.renderControllerProgress() : this.renderRelayerProgress()}
|
|
1026
|
+
${this.selectedGasProvider?.type === "relayer" ? html5`<span class="text-[12px] text-neutral-60 mt-2 block">
|
|
1027
|
+
Your total of ${this.relayerAvailable}M resets on ${this.displayRelayerResetDate()}.
|
|
1028
|
+
</span>` : html5``}
|
|
1029
|
+
</div>` : html5``}
|
|
1030
|
+
|
|
1031
|
+
</div>
|
|
1032
|
+
`;
|
|
1033
|
+
}
|
|
1034
|
+
};
|
|
1035
|
+
__decorateClass([
|
|
1036
|
+
property5({ type: Array, reflect: true })
|
|
1037
|
+
], GasProviderView.prototype, "allRelayers", 2);
|
|
1038
|
+
__decorateClass([
|
|
1039
|
+
property5({ type: Number, reflect: true })
|
|
1040
|
+
], GasProviderView.prototype, "balance", 2);
|
|
1041
|
+
__decorateClass([
|
|
1042
|
+
property5({ type: Object, attribute: "selected-gas-provider", reflect: true })
|
|
1043
|
+
], GasProviderView.prototype, "selectedGasProvider", 2);
|
|
1044
|
+
__decorateClass([
|
|
1045
|
+
property5({ attribute: "controller-address", reflect: true })
|
|
1046
|
+
], GasProviderView.prototype, "controllerAddress", 2);
|
|
1047
|
+
__decorateClass([
|
|
1048
|
+
property5({ attribute: "controller-name", reflect: true })
|
|
1049
|
+
], GasProviderView.prototype, "controllerName", 2);
|
|
1050
|
+
__decorateClass([
|
|
1051
|
+
property5({ attribute: "symbol", reflect: true })
|
|
1052
|
+
], GasProviderView.prototype, "symbol", 2);
|
|
1053
|
+
__decorateClass([
|
|
1054
|
+
property5({ type: Number, reflect: true })
|
|
1055
|
+
], GasProviderView.prototype, "decimals", 2);
|
|
1056
|
+
__decorateClass([
|
|
1057
|
+
property5({ type: Number, attribute: "transaction-fee", reflect: true })
|
|
1058
|
+
], GasProviderView.prototype, "transactionFee", 2);
|
|
1059
|
+
__decorateClass([
|
|
1060
|
+
property5({ type: Number, attribute: "relayer-available", reflect: true })
|
|
1061
|
+
], GasProviderView.prototype, "relayerAvailable", 2);
|
|
1062
|
+
__decorateClass([
|
|
1063
|
+
property5({ type: Number, attribute: "relayer-used", reflect: true })
|
|
1064
|
+
], GasProviderView.prototype, "relayerUsed", 2);
|
|
1065
|
+
__decorateClass([
|
|
1066
|
+
property5({ type: Number, attribute: "relayer-to-be-used", reflect: true })
|
|
1067
|
+
], GasProviderView.prototype, "relayerToBeUsed", 2);
|
|
1068
|
+
__decorateClass([
|
|
1069
|
+
property5({ attribute: "relayer-reset-date", reflect: true })
|
|
1070
|
+
], GasProviderView.prototype, "relayerResetDate", 2);
|
|
1071
|
+
GasProviderView = __decorateClass([
|
|
1072
|
+
safeCustomElement("gas-provider-view")
|
|
1073
|
+
], GasProviderView);
|
|
1074
|
+
|
|
1075
|
+
// src/shared/icon-view.ts
|
|
1076
|
+
import { Task as Task3 } from "@lit/task";
|
|
1077
|
+
import {
|
|
1078
|
+
useAddressResolver as useAddressResolver3,
|
|
1079
|
+
useImageLoader as useImageLoader2
|
|
1080
|
+
} from "@lukso/transaction-view-headless";
|
|
1081
|
+
import { html as html6 } from "lit";
|
|
1082
|
+
import { property as property6, state as state5 } from "lit/decorators.js";
|
|
1083
|
+
var IconView = class extends CoreLitElement {
|
|
1084
|
+
constructor() {
|
|
1085
|
+
super(...arguments);
|
|
1086
|
+
this.size = "small";
|
|
1087
|
+
this.showName = true;
|
|
1088
|
+
this.namePosition = "below";
|
|
1089
|
+
this.maxWidth = 200;
|
|
1090
|
+
this.showIconIdenticon = true;
|
|
1091
|
+
this.showLabelIdenticon = false;
|
|
1092
|
+
this.forceUnresolved = false;
|
|
1093
|
+
this.isLoadingImage = false;
|
|
1094
|
+
this.isLoadingAddress = false;
|
|
1095
|
+
// Composables
|
|
1096
|
+
this.imageLoader = useImageLoader2();
|
|
1097
|
+
this.addressResolver = useAddressResolver3();
|
|
1098
|
+
// Task for resolving address data
|
|
1099
|
+
this.addressTask = new Task3(this, {
|
|
1100
|
+
task: async ([address], { signal }) => {
|
|
1101
|
+
if (!address) return null;
|
|
1102
|
+
this.isLoadingAddress = true;
|
|
1103
|
+
try {
|
|
1104
|
+
const resolved = await this.addressResolver.resolveAddress(address);
|
|
1105
|
+
this.requestUpdate();
|
|
1106
|
+
return resolved;
|
|
1107
|
+
} catch (error) {
|
|
1108
|
+
console.warn("\u274C IconView: Failed to resolve address:", error);
|
|
1109
|
+
return null;
|
|
1110
|
+
} finally {
|
|
1111
|
+
this.isLoadingAddress = false;
|
|
1112
|
+
}
|
|
1113
|
+
},
|
|
1114
|
+
args: () => [this.address]
|
|
1115
|
+
});
|
|
1116
|
+
// Task for loading profile image
|
|
1117
|
+
this.imageTask = new Task3(this, {
|
|
1118
|
+
task: async ([resolved], { signal }) => {
|
|
1119
|
+
if (!resolved) return null;
|
|
1120
|
+
this.isLoadingImage = true;
|
|
1121
|
+
try {
|
|
1122
|
+
let image;
|
|
1123
|
+
if (this.imageHint && resolved[this.imageHint]) {
|
|
1124
|
+
const imageArray = resolved[this.imageHint];
|
|
1125
|
+
if (Array.isArray(imageArray) && imageArray.length > 0) {
|
|
1126
|
+
image = await this.imageLoader.loadImage(imageArray, {
|
|
1127
|
+
width: this.getSizePixels(),
|
|
1128
|
+
height: this.getSizePixels(),
|
|
1129
|
+
dpr: window.devicePixelRatio || 1,
|
|
1130
|
+
index: this.imageIndex
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1133
|
+
} else {
|
|
1134
|
+
image = await this.imageLoader.loadProfileImage(resolved, {
|
|
1135
|
+
width: this.getSizePixels(),
|
|
1136
|
+
height: this.getSizePixels(),
|
|
1137
|
+
dpr: window.devicePixelRatio || 1,
|
|
1138
|
+
index: this.imageIndex
|
|
1139
|
+
});
|
|
1140
|
+
}
|
|
1141
|
+
return image || this.imageLoader.getFallbackImage(resolved);
|
|
1142
|
+
} catch (error) {
|
|
1143
|
+
console.warn("Failed to load address image:", error);
|
|
1144
|
+
return this.imageLoader.getFallbackImage(resolved || {});
|
|
1145
|
+
} finally {
|
|
1146
|
+
this.isLoadingImage = false;
|
|
1147
|
+
}
|
|
1148
|
+
},
|
|
1149
|
+
args: () => [this.addressTask.value]
|
|
1150
|
+
});
|
|
1151
|
+
}
|
|
1152
|
+
/**
|
|
1153
|
+
* Get pixel size for the current size setting
|
|
1154
|
+
*/
|
|
1155
|
+
getSizePixels() {
|
|
1156
|
+
switch (this.size) {
|
|
1157
|
+
case "x-small":
|
|
1158
|
+
return 16;
|
|
1159
|
+
case "small":
|
|
1160
|
+
return 24;
|
|
1161
|
+
case "medium":
|
|
1162
|
+
return 32;
|
|
1163
|
+
case "large":
|
|
1164
|
+
return 48;
|
|
1165
|
+
case "2x-large":
|
|
1166
|
+
return 124;
|
|
1167
|
+
default:
|
|
1168
|
+
return 24;
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
/**
|
|
1172
|
+
* Check if this is a contract address (shows square icon)
|
|
1173
|
+
*/
|
|
1174
|
+
get isContract() {
|
|
1175
|
+
const resolved = this.addressTask.value;
|
|
1176
|
+
return resolved ? this.imageLoader.isContractAddress(resolved) : false;
|
|
1177
|
+
}
|
|
1178
|
+
/**
|
|
1179
|
+
* Handle icon click
|
|
1180
|
+
*/
|
|
1181
|
+
handleClick() {
|
|
1182
|
+
this.dispatchEvent(
|
|
1183
|
+
new CustomEvent("address-click", {
|
|
1184
|
+
detail: {
|
|
1185
|
+
address: this.address,
|
|
1186
|
+
resolved: this.addressTask.value
|
|
1187
|
+
},
|
|
1188
|
+
bubbles: true
|
|
1189
|
+
})
|
|
1190
|
+
);
|
|
1191
|
+
}
|
|
1192
|
+
render() {
|
|
1193
|
+
const imageResult = this.imageTask.value;
|
|
1194
|
+
const containerClass = this.namePosition === "beside" ? "row" : "column";
|
|
1195
|
+
return html6`
|
|
1196
|
+
<div class="${containerClass === "row" ? "flex items-start gap-1" : "flex flex-col items-center gap-1"}">
|
|
1197
|
+
${this.label ? html6`<div class="text-[12px] text-neutral-60 font-medium">${this.label}</div>` : ""}
|
|
1198
|
+
|
|
1199
|
+
<div class="${this.namePosition === "beside" ? "inline-flex flex-row items-center gap-2" : "inline-flex flex-col items-center gap-1.5"}">
|
|
1200
|
+
<lukso-profile
|
|
1201
|
+
size=${this.size}
|
|
1202
|
+
profile-address=${this.address}
|
|
1203
|
+
profile-url=${imageResult?.src || ""}
|
|
1204
|
+
?has-identicon=${this.showIconIdenticon}
|
|
1205
|
+
?is-square=${this.isContract}
|
|
1206
|
+
class="inline-flex items-center cursor-pointer transition-transform duration-200 hover:scale-105"
|
|
1207
|
+
@click=${this.handleClick}
|
|
1208
|
+
></lukso-profile>
|
|
1209
|
+
|
|
1210
|
+
${this.showName ? html6`
|
|
1211
|
+
<address-view
|
|
1212
|
+
class="leading-none"
|
|
1213
|
+
address=${this.address}
|
|
1214
|
+
.showIdenticon=${this.showLabelIdenticon}
|
|
1215
|
+
size=${this.size}
|
|
1216
|
+
max-width=${this.maxWidth}
|
|
1217
|
+
></address-view>
|
|
1218
|
+
` : ""}
|
|
1219
|
+
</div>
|
|
1220
|
+
</div>
|
|
1221
|
+
`;
|
|
1222
|
+
}
|
|
1223
|
+
};
|
|
1224
|
+
__decorateClass([
|
|
1225
|
+
property6()
|
|
1226
|
+
], IconView.prototype, "address", 2);
|
|
1227
|
+
__decorateClass([
|
|
1228
|
+
property6({ type: Object })
|
|
1229
|
+
], IconView.prototype, "resolved", 2);
|
|
1230
|
+
__decorateClass([
|
|
1231
|
+
property6()
|
|
1232
|
+
], IconView.prototype, "size", 2);
|
|
1233
|
+
__decorateClass([
|
|
1234
|
+
property6()
|
|
1235
|
+
], IconView.prototype, "label", 2);
|
|
1236
|
+
__decorateClass([
|
|
1237
|
+
property6({ type: Boolean, attribute: "show-name" })
|
|
1238
|
+
], IconView.prototype, "showName", 2);
|
|
1239
|
+
__decorateClass([
|
|
1240
|
+
property6({ attribute: "name-position" })
|
|
1241
|
+
], IconView.prototype, "namePosition", 2);
|
|
1242
|
+
__decorateClass([
|
|
1243
|
+
property6({ type: Number, attribute: "max-width" })
|
|
1244
|
+
], IconView.prototype, "maxWidth", 2);
|
|
1245
|
+
__decorateClass([
|
|
1246
|
+
property6({ type: Boolean, attribute: "show-icon-identicon" })
|
|
1247
|
+
], IconView.prototype, "showIconIdenticon", 2);
|
|
1248
|
+
__decorateClass([
|
|
1249
|
+
property6({ type: Boolean, attribute: "show-label-identicon" })
|
|
1250
|
+
], IconView.prototype, "showLabelIdenticon", 2);
|
|
1251
|
+
__decorateClass([
|
|
1252
|
+
property6({ type: Boolean, attribute: "force-unresolved" })
|
|
1253
|
+
], IconView.prototype, "forceUnresolved", 2);
|
|
1254
|
+
__decorateClass([
|
|
1255
|
+
property6({ type: String, attribute: "image-hint" })
|
|
1256
|
+
], IconView.prototype, "imageHint", 2);
|
|
1257
|
+
__decorateClass([
|
|
1258
|
+
property6({ type: Number, attribute: "image-index" })
|
|
1259
|
+
], IconView.prototype, "imageIndex", 2);
|
|
1260
|
+
__decorateClass([
|
|
1261
|
+
state5()
|
|
1262
|
+
], IconView.prototype, "imageData", 2);
|
|
1263
|
+
__decorateClass([
|
|
1264
|
+
state5()
|
|
1265
|
+
], IconView.prototype, "isLoadingImage", 2);
|
|
1266
|
+
__decorateClass([
|
|
1267
|
+
state5()
|
|
1268
|
+
], IconView.prototype, "isLoadingAddress", 2);
|
|
1269
|
+
IconView = __decorateClass([
|
|
1270
|
+
safeCustomElement("icon-view")
|
|
1271
|
+
], IconView);
|
|
1272
|
+
|
|
1273
|
+
// src/shared/image-loader-controller.ts
|
|
1274
|
+
import {
|
|
1275
|
+
useImageLoader as useImageLoaderHeadless
|
|
1276
|
+
} from "@lukso/transaction-view-headless";
|
|
1277
|
+
var ImageLoaderController = class {
|
|
1278
|
+
constructor(host) {
|
|
1279
|
+
this.headlessLoader = useImageLoaderHeadless();
|
|
1280
|
+
// Internal state
|
|
1281
|
+
this._state = {
|
|
1282
|
+
result: null,
|
|
1283
|
+
loading: false,
|
|
1284
|
+
error: null
|
|
1285
|
+
};
|
|
1286
|
+
this.host = host;
|
|
1287
|
+
host.addController(this);
|
|
1288
|
+
}
|
|
1289
|
+
hostConnected() {
|
|
1290
|
+
}
|
|
1291
|
+
hostDisconnected() {
|
|
1292
|
+
}
|
|
1293
|
+
get state() {
|
|
1294
|
+
return this._state;
|
|
1295
|
+
}
|
|
1296
|
+
get isLoading() {
|
|
1297
|
+
return this._state.loading;
|
|
1298
|
+
}
|
|
1299
|
+
get error() {
|
|
1300
|
+
return this._state.error;
|
|
1301
|
+
}
|
|
1302
|
+
get result() {
|
|
1303
|
+
return this._state.result;
|
|
1304
|
+
}
|
|
1305
|
+
/**
|
|
1306
|
+
* Load image from data array
|
|
1307
|
+
*/
|
|
1308
|
+
async loadImage(imageData, options = {}) {
|
|
1309
|
+
this.updateState({ loading: true, error: null });
|
|
1310
|
+
try {
|
|
1311
|
+
const result = await this.headlessLoader.loadImage(imageData, options);
|
|
1312
|
+
this.updateState({ result, loading: false });
|
|
1313
|
+
return result;
|
|
1314
|
+
} catch (err) {
|
|
1315
|
+
const error = err instanceof Error ? err.message : "Failed to load image";
|
|
1316
|
+
this.updateState({ loading: false, error });
|
|
1317
|
+
return null;
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
/**
|
|
1321
|
+
* Load profile image from address data
|
|
1322
|
+
*/
|
|
1323
|
+
async loadProfileImage(addressData, options = {}) {
|
|
1324
|
+
this.updateState({ loading: true, error: null });
|
|
1325
|
+
try {
|
|
1326
|
+
const result = await this.headlessLoader.loadProfileImage(addressData, options) || this.headlessLoader.getFallbackImage(addressData);
|
|
1327
|
+
this.updateState({ result, loading: false });
|
|
1328
|
+
return result;
|
|
1329
|
+
} catch (err) {
|
|
1330
|
+
const error = err instanceof Error ? err.message : "Failed to load profile image";
|
|
1331
|
+
const fallback = this.headlessLoader.getFallbackImage(addressData);
|
|
1332
|
+
this.updateState({ result: fallback, loading: false, error });
|
|
1333
|
+
return fallback;
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
/**
|
|
1337
|
+
* Load image from address signal (reactive)
|
|
1338
|
+
*/
|
|
1339
|
+
loadFromSignal(addressSignal, options = {}) {
|
|
1340
|
+
const addressData = addressSignal.value?.data;
|
|
1341
|
+
if (!addressData) {
|
|
1342
|
+
const fallback = this.headlessLoader.getFallbackImage({});
|
|
1343
|
+
this.updateState({ result: fallback, loading: false, error: null });
|
|
1344
|
+
return;
|
|
1345
|
+
}
|
|
1346
|
+
this.loadProfileImage(addressData, options);
|
|
1347
|
+
}
|
|
1348
|
+
/**
|
|
1349
|
+
* Get fallback image synchronously
|
|
1350
|
+
*/
|
|
1351
|
+
getFallbackImage(addressData) {
|
|
1352
|
+
return this.headlessLoader.getFallbackImage(addressData);
|
|
1353
|
+
}
|
|
1354
|
+
/**
|
|
1355
|
+
* Check if address is a contract
|
|
1356
|
+
*/
|
|
1357
|
+
isContractAddress(addressData) {
|
|
1358
|
+
return this.headlessLoader.isContractAddress(addressData);
|
|
1359
|
+
}
|
|
1360
|
+
/**
|
|
1361
|
+
* Clear current state
|
|
1362
|
+
*/
|
|
1363
|
+
clear() {
|
|
1364
|
+
this.updateState({ result: null, loading: false, error: null });
|
|
1365
|
+
}
|
|
1366
|
+
updateState(updates) {
|
|
1367
|
+
this._state = { ...this._state, ...updates };
|
|
1368
|
+
this.host.requestUpdate();
|
|
1369
|
+
}
|
|
1370
|
+
};
|
|
1371
|
+
function useImageLoader3(host) {
|
|
1372
|
+
return new ImageLoaderController(host);
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
// src/shared/notification-view.ts
|
|
1376
|
+
import { html as html7 } from "lit";
|
|
1377
|
+
import { property as property7, state as state6 } from "lit/decorators.js";
|
|
1378
|
+
var NotificationView = class extends CoreLitElement {
|
|
1379
|
+
constructor() {
|
|
1380
|
+
super(...arguments);
|
|
1381
|
+
this.variant = "info";
|
|
1382
|
+
this.message = "";
|
|
1383
|
+
this.title = "";
|
|
1384
|
+
this.acknowledgeable = false;
|
|
1385
|
+
this.acknowledgeText = "I understand and want to continue";
|
|
1386
|
+
this.acknowledged = false;
|
|
1387
|
+
this.checked = false;
|
|
1388
|
+
}
|
|
1389
|
+
handleAcknowledgeChange(e) {
|
|
1390
|
+
e.stopPropagation();
|
|
1391
|
+
const target = e.target;
|
|
1392
|
+
const checked = !!(target?.checked ?? e.detail?.checked ?? false);
|
|
1393
|
+
if (checked !== this.checked) {
|
|
1394
|
+
this.checked = checked;
|
|
1395
|
+
}
|
|
1396
|
+
if (this.checked) {
|
|
1397
|
+
this.acknowledged = true;
|
|
1398
|
+
this.dispatchEvent(
|
|
1399
|
+
new CustomEvent("notification-acknowledged", {
|
|
1400
|
+
detail: {
|
|
1401
|
+
variant: this.variant,
|
|
1402
|
+
message: this.message,
|
|
1403
|
+
title: this.title,
|
|
1404
|
+
checked: this.checked
|
|
1405
|
+
},
|
|
1406
|
+
bubbles: true
|
|
1407
|
+
})
|
|
1408
|
+
);
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
render() {
|
|
1412
|
+
if (this.acknowledged) return html7``;
|
|
1413
|
+
return html7`
|
|
1414
|
+
<div class="grid grid-cols-[24px_1fr] items-start gap-3 p-3 rounded-xl text-neutral-10 leading-snug ${this.getVariantBackgroundClass()}">
|
|
1415
|
+
<div class="flex items-center justify-center text-[16px] text-neutral-20 self-center" aria-hidden="true">
|
|
1416
|
+
<lukso-icon name="${this.renderIcon()}" size="large" color="${this.getVariantColor()}"></lukso-icon>
|
|
1417
|
+
</div>
|
|
1418
|
+
<div class="text-[14px] flex flex-col gap-1.5">
|
|
1419
|
+
${this.title ? html7`<div class="font-semibold text-neutral-20 paragraph-inter-14-semi-bold">${this.title}</div>` : ""}
|
|
1420
|
+
<div class="text-neutral-30"><slot>${this.message}</slot></div>
|
|
1421
|
+
${this.acknowledgeable ? html7`
|
|
1422
|
+
<div class="inline-flex items-center gap-2 mt-1 text-[12px] text-neutral-20 select-none cursor-pointer paragraph-inter-12-medium">
|
|
1423
|
+
<lukso-checkbox
|
|
1424
|
+
size="x-small"
|
|
1425
|
+
?checked=${this.checked}
|
|
1426
|
+
@change=${this.handleAcknowledgeChange}
|
|
1427
|
+
><span class="paragraph-inter-14-semi-bold">${this.acknowledgeText}</span></lukso-checkbox>
|
|
1428
|
+
</div>
|
|
1429
|
+
` : ""}
|
|
1430
|
+
</div>
|
|
1431
|
+
</div>
|
|
1432
|
+
`;
|
|
1433
|
+
}
|
|
1434
|
+
renderIcon() {
|
|
1435
|
+
switch (this.variant) {
|
|
1436
|
+
case "success":
|
|
1437
|
+
return "bulb-outline";
|
|
1438
|
+
case "warning":
|
|
1439
|
+
return "warning-round";
|
|
1440
|
+
case "error":
|
|
1441
|
+
return "warning-triangle";
|
|
1442
|
+
default:
|
|
1443
|
+
return "bulb-outline";
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
getVariantColor() {
|
|
1447
|
+
switch (this.variant) {
|
|
1448
|
+
case "success":
|
|
1449
|
+
return "green-45";
|
|
1450
|
+
case "warning":
|
|
1451
|
+
return "yellow-55";
|
|
1452
|
+
case "error":
|
|
1453
|
+
return "red-55";
|
|
1454
|
+
default:
|
|
1455
|
+
return "blue-50";
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
getVariantBackgroundClass() {
|
|
1459
|
+
switch (this.variant) {
|
|
1460
|
+
case "success":
|
|
1461
|
+
return "bg-green-85";
|
|
1462
|
+
case "warning":
|
|
1463
|
+
return "bg-yellow-85";
|
|
1464
|
+
case "error":
|
|
1465
|
+
return "bg-red-85";
|
|
1466
|
+
default:
|
|
1467
|
+
return "bg-blue-85";
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
};
|
|
1471
|
+
__decorateClass([
|
|
1472
|
+
property7()
|
|
1473
|
+
], NotificationView.prototype, "variant", 2);
|
|
1474
|
+
__decorateClass([
|
|
1475
|
+
property7()
|
|
1476
|
+
], NotificationView.prototype, "message", 2);
|
|
1477
|
+
__decorateClass([
|
|
1478
|
+
property7()
|
|
1479
|
+
], NotificationView.prototype, "title", 2);
|
|
1480
|
+
__decorateClass([
|
|
1481
|
+
property7({ type: Boolean, attribute: "acknowledgeable" })
|
|
1482
|
+
], NotificationView.prototype, "acknowledgeable", 2);
|
|
1483
|
+
__decorateClass([
|
|
1484
|
+
property7({ attribute: "acknowledge-text" })
|
|
1485
|
+
], NotificationView.prototype, "acknowledgeText", 2);
|
|
1486
|
+
__decorateClass([
|
|
1487
|
+
state6()
|
|
1488
|
+
], NotificationView.prototype, "acknowledged", 2);
|
|
1489
|
+
__decorateClass([
|
|
1490
|
+
property7({ type: Boolean, reflect: true })
|
|
1491
|
+
], NotificationView.prototype, "checked", 2);
|
|
1492
|
+
NotificationView = __decorateClass([
|
|
1493
|
+
safeCustomElement("notification-view")
|
|
1494
|
+
], NotificationView);
|
|
1495
|
+
|
|
1496
|
+
// src/shared/progress-view.ts
|
|
1497
|
+
import { html as html8 } from "lit";
|
|
1498
|
+
import { property as property8 } from "lit/decorators.js";
|
|
1499
|
+
var ProgressView = class extends CoreLitElement {
|
|
1500
|
+
constructor() {
|
|
1501
|
+
super(...arguments);
|
|
1502
|
+
this.data = [];
|
|
1503
|
+
this.labelPosition = "right";
|
|
1504
|
+
}
|
|
1505
|
+
renderGasProviderLabel() {
|
|
1506
|
+
return html8`
|
|
1507
|
+
${this.label ? html8`
|
|
1508
|
+
<span class="progress-label-value">${this.label}</span>
|
|
1509
|
+
${this.unit ? html8`<span class="progress-label-unit" data-testid="unit">${this.unit}</span>` : ""}
|
|
1510
|
+
` : html8`
|
|
1511
|
+
<slot></slot>
|
|
1512
|
+
${this.unit ? html8`<span class="progress-label-unit" data-testid="unit">${this.unit}</span>` : ""}
|
|
1513
|
+
`}
|
|
1514
|
+
`;
|
|
1515
|
+
}
|
|
1516
|
+
renderAddressLabel() {
|
|
1517
|
+
return html8`
|
|
1518
|
+
<value-view
|
|
1519
|
+
.value=${this.address}
|
|
1520
|
+
.unit=${this.unit}
|
|
1521
|
+
></value-view>
|
|
1522
|
+
`;
|
|
1523
|
+
}
|
|
1524
|
+
render() {
|
|
1525
|
+
const isError = (this.className || "").split(/\s+/).includes("error");
|
|
1526
|
+
return html8`
|
|
1527
|
+
<div class="relative grid w-full ${this.className || ""}">
|
|
1528
|
+
<div class="flex bg-neutral-95 h-6 rounded-lg relative col-[1] row-[1] overflow-hidden" style=${isError ? "background-color: var(--red-65);" : ""} role="progressbar">
|
|
1529
|
+
${this.data.map((seg, index) => {
|
|
1530
|
+
const width = `${Math.max(0, Math.min(100, Number(seg.value || 0)))}%`;
|
|
1531
|
+
const backgroundColor = seg.color || "var(--neutral-90)";
|
|
1532
|
+
const title = seg.title || "";
|
|
1533
|
+
return html8`<div
|
|
1534
|
+
class="h-full flex items-center justify-center text-[10px] font-semibold"
|
|
1535
|
+
style=${`width:${width};background-color:${backgroundColor};`}
|
|
1536
|
+
data-testid=${`value-${index}`}
|
|
1537
|
+
>${title}</div>`;
|
|
1538
|
+
})}
|
|
1539
|
+
</div>
|
|
1540
|
+
<div class=${`flex items-center absolute h-6 rounded-lg overflow-visible w-full col-[1] row-[1] top-0 left-0 ${this.labelPosition === "left" ? "justify-start" : "justify-end"}`} data-testid="progress-labels">
|
|
1541
|
+
<div class="text-[13px] font-semibold text-white mix-blend-difference h-inherit flex items-center p-0 right-4 absolute" data-testid="label">
|
|
1542
|
+
${this.renderGasProviderLabel()}
|
|
1543
|
+
</div>
|
|
1544
|
+
</div>
|
|
1545
|
+
</div>
|
|
1546
|
+
`;
|
|
1547
|
+
}
|
|
1548
|
+
};
|
|
1549
|
+
__decorateClass([
|
|
1550
|
+
property8({ type: Array })
|
|
1551
|
+
], ProgressView.prototype, "data", 2);
|
|
1552
|
+
__decorateClass([
|
|
1553
|
+
property8()
|
|
1554
|
+
], ProgressView.prototype, "label", 2);
|
|
1555
|
+
__decorateClass([
|
|
1556
|
+
property8()
|
|
1557
|
+
], ProgressView.prototype, "unit", 2);
|
|
1558
|
+
__decorateClass([
|
|
1559
|
+
property8()
|
|
1560
|
+
], ProgressView.prototype, "address", 2);
|
|
1561
|
+
__decorateClass([
|
|
1562
|
+
property8({ attribute: "label-position" })
|
|
1563
|
+
], ProgressView.prototype, "labelPosition", 2);
|
|
1564
|
+
ProgressView = __decorateClass([
|
|
1565
|
+
safeCustomElement("progress-view")
|
|
1566
|
+
], ProgressView);
|
|
1567
|
+
|
|
1568
|
+
// src/shared/scroll-to-bottom-button.ts
|
|
1569
|
+
import { html as html9 } from "lit";
|
|
1570
|
+
import { property as property9 } from "lit/decorators.js";
|
|
1571
|
+
var ScrollToBottomButton = class extends CoreLitElement {
|
|
1572
|
+
constructor() {
|
|
1573
|
+
super(...arguments);
|
|
1574
|
+
this.show = false;
|
|
1575
|
+
this.color = "neutral-20";
|
|
1576
|
+
this.iconSize = "medium";
|
|
1577
|
+
this.iconName = "arrow-down-lg";
|
|
1578
|
+
}
|
|
1579
|
+
handleClick() {
|
|
1580
|
+
this.dispatchEvent(new CustomEvent("scroll-to-bottom", { bubbles: true }));
|
|
1581
|
+
}
|
|
1582
|
+
render() {
|
|
1583
|
+
return html9`
|
|
1584
|
+
<div class="h-14 w-[140px] self-center rounded-t-[120px] bg-[radial-gradient(ellipse_75px_52px_at_bottom_center,rgba(255,255,255,0.78)_0%,rgba(255,255,255,0)_112.5%)] flex justify-center items-center transition-opacity duration-700 ease-in-out ${this.show ? "opacity-100 z-10" : "opacity-0 -z-10"}">
|
|
1585
|
+
<div class="flex justify-center items-center w-10 h-10 rounded-full border border-neutral-90 shadow-[0_0_16px_rgba(189,206,219,0.4)] bg-neutral-100 cursor-pointer animate-bounce" @click=${this.handleClick}>
|
|
1586
|
+
<lukso-icon
|
|
1587
|
+
name=${this.iconName}
|
|
1588
|
+
size=${this.iconSize}
|
|
1589
|
+
color=${this.color}
|
|
1590
|
+
></lukso-icon>
|
|
1591
|
+
</div>
|
|
1592
|
+
</div>
|
|
1593
|
+
`;
|
|
1594
|
+
}
|
|
1595
|
+
};
|
|
1596
|
+
__decorateClass([
|
|
1597
|
+
property9({ type: Boolean, attribute: "show" })
|
|
1598
|
+
], ScrollToBottomButton.prototype, "show", 2);
|
|
1599
|
+
__decorateClass([
|
|
1600
|
+
property9()
|
|
1601
|
+
], ScrollToBottomButton.prototype, "color", 2);
|
|
1602
|
+
__decorateClass([
|
|
1603
|
+
property9({ attribute: "icon-size" })
|
|
1604
|
+
], ScrollToBottomButton.prototype, "iconSize", 2);
|
|
1605
|
+
__decorateClass([
|
|
1606
|
+
property9({ attribute: "icon-name" })
|
|
1607
|
+
], ScrollToBottomButton.prototype, "iconName", 2);
|
|
1608
|
+
ScrollToBottomButton = __decorateClass([
|
|
1609
|
+
safeCustomElement("scroll-to-bottom-button")
|
|
1610
|
+
], ScrollToBottomButton);
|
|
1611
|
+
|
|
1612
|
+
// src/shared/signal-controller.ts
|
|
1613
|
+
var SignalController = class _SignalController {
|
|
1614
|
+
constructor(host, signal) {
|
|
1615
|
+
this.host = host;
|
|
1616
|
+
this.signal = signal;
|
|
1617
|
+
host.addController(this);
|
|
1618
|
+
}
|
|
1619
|
+
hostConnected() {
|
|
1620
|
+
let lastValue = this.signal.value;
|
|
1621
|
+
const check = () => {
|
|
1622
|
+
const currentValue = this.signal.value;
|
|
1623
|
+
if (currentValue !== lastValue) {
|
|
1624
|
+
lastValue = currentValue;
|
|
1625
|
+
this.host.requestUpdate();
|
|
1626
|
+
}
|
|
1627
|
+
};
|
|
1628
|
+
const interval = setInterval(check, 50);
|
|
1629
|
+
this.unsubscribe = () => clearInterval(interval);
|
|
1630
|
+
}
|
|
1631
|
+
hostDisconnected() {
|
|
1632
|
+
if (this.unsubscribe) {
|
|
1633
|
+
this.unsubscribe();
|
|
1634
|
+
this.unsubscribe = void 0;
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
get value() {
|
|
1638
|
+
return this.signal.value;
|
|
1639
|
+
}
|
|
1640
|
+
/**
|
|
1641
|
+
* Create a new SignalController for a different signal
|
|
1642
|
+
*/
|
|
1643
|
+
static create(host, signal) {
|
|
1644
|
+
return new _SignalController(host, signal);
|
|
1645
|
+
}
|
|
1646
|
+
};
|
|
1647
|
+
var MultiSignalController = class {
|
|
1648
|
+
constructor(host, signals) {
|
|
1649
|
+
this.unsubscribes = [];
|
|
1650
|
+
this.host = host;
|
|
1651
|
+
this.signals = signals;
|
|
1652
|
+
host.addController(this);
|
|
1653
|
+
}
|
|
1654
|
+
hostConnected() {
|
|
1655
|
+
this.signals.forEach((signal, index) => {
|
|
1656
|
+
let lastValue = signal.value;
|
|
1657
|
+
const check = () => {
|
|
1658
|
+
const currentValue = signal.value;
|
|
1659
|
+
if (currentValue !== lastValue) {
|
|
1660
|
+
lastValue = currentValue;
|
|
1661
|
+
this.host.requestUpdate();
|
|
1662
|
+
}
|
|
1663
|
+
};
|
|
1664
|
+
const interval = setInterval(check, 50);
|
|
1665
|
+
this.unsubscribes[index] = () => clearInterval(interval);
|
|
1666
|
+
});
|
|
1667
|
+
}
|
|
1668
|
+
hostDisconnected() {
|
|
1669
|
+
this.unsubscribes.forEach((unsubscribe) => unsubscribe());
|
|
1670
|
+
this.unsubscribes = [];
|
|
1671
|
+
}
|
|
1672
|
+
getValue(index) {
|
|
1673
|
+
return this.signals[index]?.value;
|
|
1674
|
+
}
|
|
1675
|
+
getValues() {
|
|
1676
|
+
return this.signals.map((signal) => signal.value);
|
|
1677
|
+
}
|
|
1678
|
+
};
|
|
1679
|
+
function useSignal(host, signal) {
|
|
1680
|
+
return new SignalController(host, signal);
|
|
1681
|
+
}
|
|
1682
|
+
function useSignals(host, signals) {
|
|
1683
|
+
return new MultiSignalController(host, signals);
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
// src/shared/transaction-view-controller.ts
|
|
1687
|
+
import {
|
|
1688
|
+
findAllTransactionViews,
|
|
1689
|
+
findBestTransactionView,
|
|
1690
|
+
useTransactionView as useTransactionViewHeadless
|
|
1691
|
+
} from "@lukso/transaction-view-headless";
|
|
1692
|
+
var TransactionViewController = class {
|
|
1693
|
+
constructor(host, transaction, options) {
|
|
1694
|
+
this.transaction = transaction;
|
|
1695
|
+
this.options = options;
|
|
1696
|
+
this.headlessInstance = null;
|
|
1697
|
+
// Internal state
|
|
1698
|
+
this._state = {
|
|
1699
|
+
matches: [],
|
|
1700
|
+
bestMatch: null,
|
|
1701
|
+
component: null,
|
|
1702
|
+
loading: false,
|
|
1703
|
+
error: null,
|
|
1704
|
+
isResolvingAddresses: false,
|
|
1705
|
+
resolvedAddresses: {}
|
|
1706
|
+
};
|
|
1707
|
+
this.host = host;
|
|
1708
|
+
host.addController(this);
|
|
1709
|
+
this.initialize();
|
|
1710
|
+
}
|
|
1711
|
+
hostConnected() {
|
|
1712
|
+
this.setupSync();
|
|
1713
|
+
}
|
|
1714
|
+
hostDisconnected() {
|
|
1715
|
+
if (this.syncInterval) {
|
|
1716
|
+
clearInterval(this.syncInterval);
|
|
1717
|
+
this.syncInterval = void 0;
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
get state() {
|
|
1721
|
+
return this._state;
|
|
1722
|
+
}
|
|
1723
|
+
get matches() {
|
|
1724
|
+
return this._state.matches;
|
|
1725
|
+
}
|
|
1726
|
+
get bestMatch() {
|
|
1727
|
+
return this._state.bestMatch;
|
|
1728
|
+
}
|
|
1729
|
+
get component() {
|
|
1730
|
+
return this._state.component;
|
|
1731
|
+
}
|
|
1732
|
+
get isLoading() {
|
|
1733
|
+
return this._state.loading;
|
|
1734
|
+
}
|
|
1735
|
+
get error() {
|
|
1736
|
+
return this._state.error;
|
|
1737
|
+
}
|
|
1738
|
+
get isResolvingAddresses() {
|
|
1739
|
+
return this._state.isResolvingAddresses;
|
|
1740
|
+
}
|
|
1741
|
+
get resolvedAddresses() {
|
|
1742
|
+
return this._state.resolvedAddresses;
|
|
1743
|
+
}
|
|
1744
|
+
/**
|
|
1745
|
+
* Load a specific match
|
|
1746
|
+
*/
|
|
1747
|
+
async loadMatch(match) {
|
|
1748
|
+
if (!this.headlessInstance) {
|
|
1749
|
+
throw new Error("Transaction view not initialized");
|
|
1750
|
+
}
|
|
1751
|
+
try {
|
|
1752
|
+
const result = await this.headlessInstance.loadMatch(match);
|
|
1753
|
+
this.syncState();
|
|
1754
|
+
return result;
|
|
1755
|
+
} catch (err) {
|
|
1756
|
+
this.syncState();
|
|
1757
|
+
throw err;
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
/**
|
|
1761
|
+
* Load the best match
|
|
1762
|
+
*/
|
|
1763
|
+
async loadBestMatch() {
|
|
1764
|
+
if (!this.headlessInstance) {
|
|
1765
|
+
throw new Error("Transaction view not initialized");
|
|
1766
|
+
}
|
|
1767
|
+
try {
|
|
1768
|
+
const result = await this.headlessInstance.loadBestMatch();
|
|
1769
|
+
this.syncState();
|
|
1770
|
+
return result;
|
|
1771
|
+
} catch (err) {
|
|
1772
|
+
this.syncState();
|
|
1773
|
+
throw err;
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
/**
|
|
1777
|
+
* Refresh matches
|
|
1778
|
+
*/
|
|
1779
|
+
refreshMatches() {
|
|
1780
|
+
if (!this.headlessInstance) {
|
|
1781
|
+
console.warn("Transaction view not initialized, cannot refresh matches");
|
|
1782
|
+
return;
|
|
1783
|
+
}
|
|
1784
|
+
this.headlessInstance.refreshMatches();
|
|
1785
|
+
this.syncState();
|
|
1786
|
+
}
|
|
1787
|
+
/**
|
|
1788
|
+
* Resolve addresses
|
|
1789
|
+
*/
|
|
1790
|
+
async resolveAddresses() {
|
|
1791
|
+
if (!this.headlessInstance) {
|
|
1792
|
+
throw new Error("Transaction view not initialized");
|
|
1793
|
+
}
|
|
1794
|
+
try {
|
|
1795
|
+
await this.headlessInstance.resolveAddresses();
|
|
1796
|
+
this.syncState();
|
|
1797
|
+
} catch (err) {
|
|
1798
|
+
this.syncState();
|
|
1799
|
+
throw err;
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1802
|
+
/**
|
|
1803
|
+
* Update transaction and options
|
|
1804
|
+
*/
|
|
1805
|
+
update(transaction, options) {
|
|
1806
|
+
this.transaction = transaction;
|
|
1807
|
+
this.options = options;
|
|
1808
|
+
this.initialize();
|
|
1809
|
+
}
|
|
1810
|
+
/**
|
|
1811
|
+
* Get the best matching view without loading
|
|
1812
|
+
*/
|
|
1813
|
+
static findBestMatch(transaction, framework = "lit") {
|
|
1814
|
+
return findBestTransactionView(transaction, framework);
|
|
1815
|
+
}
|
|
1816
|
+
/**
|
|
1817
|
+
* Get all matching views without loading
|
|
1818
|
+
*/
|
|
1819
|
+
static findAllMatches(transaction, framework = "lit") {
|
|
1820
|
+
return findAllTransactionViews(transaction, framework);
|
|
1821
|
+
}
|
|
1822
|
+
initialize() {
|
|
1823
|
+
try {
|
|
1824
|
+
this.headlessInstance = useTransactionViewHeadless(
|
|
1825
|
+
this.transaction,
|
|
1826
|
+
this.options
|
|
1827
|
+
);
|
|
1828
|
+
this.syncState();
|
|
1829
|
+
} catch (err) {
|
|
1830
|
+
this.updateState({
|
|
1831
|
+
error: err instanceof Error ? err : new Error("Failed to initialize transaction view")
|
|
1832
|
+
});
|
|
1833
|
+
console.error("Failed to initialize transaction view:", err);
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
setupSync() {
|
|
1837
|
+
this.syncState();
|
|
1838
|
+
this.syncInterval = setInterval(() => {
|
|
1839
|
+
this.syncState();
|
|
1840
|
+
}, 100);
|
|
1841
|
+
}
|
|
1842
|
+
syncState() {
|
|
1843
|
+
if (!this.headlessInstance) return;
|
|
1844
|
+
this.updateState({
|
|
1845
|
+
matches: this.headlessInstance.matches,
|
|
1846
|
+
bestMatch: this.headlessInstance.bestMatch,
|
|
1847
|
+
component: this.headlessInstance.component,
|
|
1848
|
+
loading: this.headlessInstance.isLoading,
|
|
1849
|
+
error: this.headlessInstance.error,
|
|
1850
|
+
isResolvingAddresses: this.headlessInstance.isResolvingAddresses,
|
|
1851
|
+
resolvedAddresses: this.headlessInstance.resolvedAddresses
|
|
1852
|
+
});
|
|
1853
|
+
}
|
|
1854
|
+
updateState(updates) {
|
|
1855
|
+
this._state = { ...this._state, ...updates };
|
|
1856
|
+
this.host.requestUpdate();
|
|
1857
|
+
}
|
|
1858
|
+
};
|
|
1859
|
+
function useTransactionView(host, transaction, options) {
|
|
1860
|
+
return new TransactionViewController(host, transaction, options);
|
|
1861
|
+
}
|
|
1862
|
+
var TransactionSignalController = class {
|
|
1863
|
+
constructor(host, signal) {
|
|
1864
|
+
this._data = null;
|
|
1865
|
+
this._loading = false;
|
|
1866
|
+
this._error = null;
|
|
1867
|
+
this.host = host;
|
|
1868
|
+
this.signal = signal;
|
|
1869
|
+
host.addController(this);
|
|
1870
|
+
}
|
|
1871
|
+
hostConnected() {
|
|
1872
|
+
this.setupSignalSync();
|
|
1873
|
+
}
|
|
1874
|
+
hostDisconnected() {
|
|
1875
|
+
if (this.unsubscribe) {
|
|
1876
|
+
this.unsubscribe();
|
|
1877
|
+
this.unsubscribe = void 0;
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
get data() {
|
|
1881
|
+
return this._data;
|
|
1882
|
+
}
|
|
1883
|
+
get loading() {
|
|
1884
|
+
return this._loading;
|
|
1885
|
+
}
|
|
1886
|
+
get error() {
|
|
1887
|
+
return this._error;
|
|
1888
|
+
}
|
|
1889
|
+
get isReady() {
|
|
1890
|
+
return !this._loading && this._data !== null && !this._error;
|
|
1891
|
+
}
|
|
1892
|
+
setupSignalSync() {
|
|
1893
|
+
const sync = () => {
|
|
1894
|
+
const signalValue = this.signal.value;
|
|
1895
|
+
const newData = signalValue?.data || null;
|
|
1896
|
+
const newLoading = signalValue?.loading || false;
|
|
1897
|
+
const newError = signalValue?.error || null;
|
|
1898
|
+
if (newData !== this._data || newLoading !== this._loading || newError !== this._error) {
|
|
1899
|
+
this._data = newData;
|
|
1900
|
+
this._loading = newLoading;
|
|
1901
|
+
this._error = newError;
|
|
1902
|
+
this.host.requestUpdate();
|
|
1903
|
+
}
|
|
1904
|
+
};
|
|
1905
|
+
sync();
|
|
1906
|
+
const interval = setInterval(sync, 50);
|
|
1907
|
+
this.unsubscribe = () => clearInterval(interval);
|
|
1908
|
+
}
|
|
1909
|
+
};
|
|
1910
|
+
function useTransactionSignal(host, signal) {
|
|
1911
|
+
return new TransactionSignalController(host, signal);
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
|
+
// src/shared/url-view.ts
|
|
1915
|
+
import { html as html10 } from "lit";
|
|
1916
|
+
import { property as property10, state as state7 } from "lit/decorators.js";
|
|
1917
|
+
var UrlView = class extends CoreLitElement {
|
|
1918
|
+
constructor() {
|
|
1919
|
+
super(...arguments);
|
|
1920
|
+
this.size = "small";
|
|
1921
|
+
this.showLogo = true;
|
|
1922
|
+
this.maxWidth = 240;
|
|
1923
|
+
this.displayName = "";
|
|
1924
|
+
this.faviconCandidates = [];
|
|
1925
|
+
this.faviconIndex = 0;
|
|
1926
|
+
}
|
|
1927
|
+
willUpdate(changed) {
|
|
1928
|
+
if (changed.has("url") || changed.has("label") || changed.has("logoUrl")) {
|
|
1929
|
+
this.computeMeta();
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1932
|
+
computeMeta() {
|
|
1933
|
+
try {
|
|
1934
|
+
const u = new URL(this.url);
|
|
1935
|
+
const origin = u.origin;
|
|
1936
|
+
this.faviconCandidates = [];
|
|
1937
|
+
if (this.logoUrl) this.faviconCandidates.push(this.logoUrl);
|
|
1938
|
+
this.faviconCandidates.push(
|
|
1939
|
+
`${origin}/favicon.ico`,
|
|
1940
|
+
`${origin}/favicon.png`
|
|
1941
|
+
);
|
|
1942
|
+
this.faviconIndex = 0;
|
|
1943
|
+
this.favicon = this.faviconCandidates[this.faviconIndex];
|
|
1944
|
+
const hostname = u.hostname.replace(/^www\./, "");
|
|
1945
|
+
const hostnamePretty = hostname.split(".").filter(Boolean).slice(-2).join(" ").replace(/-/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
1946
|
+
if (this.label && this.label.trim()) {
|
|
1947
|
+
this.displayName = this.label.trim();
|
|
1948
|
+
} else {
|
|
1949
|
+
this.displayName = hostnamePretty || this.url;
|
|
1950
|
+
}
|
|
1951
|
+
} catch {
|
|
1952
|
+
this.favicon = void 0;
|
|
1953
|
+
this.displayName = this.label && this.label.trim() ? this.label : this.url;
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
handleImageError() {
|
|
1957
|
+
this.faviconIndex += 1;
|
|
1958
|
+
if (this.faviconIndex < this.faviconCandidates.length) {
|
|
1959
|
+
this.favicon = this.faviconCandidates[this.faviconIndex];
|
|
1960
|
+
} else {
|
|
1961
|
+
this.favicon = void 0;
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
getSizePixels() {
|
|
1965
|
+
switch (this.size) {
|
|
1966
|
+
case "x-small":
|
|
1967
|
+
return 14;
|
|
1968
|
+
case "small":
|
|
1969
|
+
return 16;
|
|
1970
|
+
case "medium":
|
|
1971
|
+
return 20;
|
|
1972
|
+
case "large":
|
|
1973
|
+
return 24;
|
|
1974
|
+
default:
|
|
1975
|
+
return 16;
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1978
|
+
render() {
|
|
1979
|
+
const sizePx = this.getSizePixels();
|
|
1980
|
+
return html10`
|
|
1981
|
+
<div class="inline-flex flex-col gap-1">
|
|
1982
|
+
<div class="inline-flex items-center gap-2 px-2.5 py-1.5 text-neutral-20 leading-tight font-semibold">
|
|
1983
|
+
${this.showLogo ? html10`
|
|
1984
|
+
<div class="inline-flex items-center p-1 justify-center rounded-lg bg-neutral-100 border border-neutral-90 overflow-hidden flex-none">
|
|
1985
|
+
${this.favicon ? html10`<img
|
|
1986
|
+
src=${this.favicon}
|
|
1987
|
+
style="width:${sizePx}px;height:${sizePx}px;"
|
|
1988
|
+
alt="favicon"
|
|
1989
|
+
@error=${this.handleImageError}
|
|
1990
|
+
/>` : html10`<lukso-icon name="globe" size=${this.size} color="blue-85"></lukso-icon>`}
|
|
1991
|
+
</div>
|
|
1992
|
+
` : ""}
|
|
1993
|
+
<span class="whitespace-nowrap overflow-hidden text-ellipsis leading-tight" style=${`max-width:${this.maxWidth}px;font-size: ${sizePx}px;`}>${this.displayName}</span>
|
|
1994
|
+
</div>
|
|
1995
|
+
</div>
|
|
1996
|
+
`;
|
|
1997
|
+
}
|
|
1998
|
+
};
|
|
1999
|
+
__decorateClass([
|
|
2000
|
+
property10()
|
|
2001
|
+
], UrlView.prototype, "url", 2);
|
|
2002
|
+
__decorateClass([
|
|
2003
|
+
property10()
|
|
2004
|
+
], UrlView.prototype, "size", 2);
|
|
2005
|
+
__decorateClass([
|
|
2006
|
+
property10()
|
|
2007
|
+
], UrlView.prototype, "label", 2);
|
|
2008
|
+
__decorateClass([
|
|
2009
|
+
property10({ type: Boolean, attribute: "show-logo" })
|
|
2010
|
+
], UrlView.prototype, "showLogo", 2);
|
|
2011
|
+
__decorateClass([
|
|
2012
|
+
property10({ attribute: "logo-url" })
|
|
2013
|
+
], UrlView.prototype, "logoUrl", 2);
|
|
2014
|
+
__decorateClass([
|
|
2015
|
+
property10({ type: Number, attribute: "max-width" })
|
|
2016
|
+
], UrlView.prototype, "maxWidth", 2);
|
|
2017
|
+
__decorateClass([
|
|
2018
|
+
state7()
|
|
2019
|
+
], UrlView.prototype, "favicon", 2);
|
|
2020
|
+
__decorateClass([
|
|
2021
|
+
state7()
|
|
2022
|
+
], UrlView.prototype, "displayName", 2);
|
|
2023
|
+
UrlView = __decorateClass([
|
|
2024
|
+
safeCustomElement("url-view")
|
|
2025
|
+
], UrlView);
|
|
2026
|
+
|
|
2027
|
+
// src/shared/value-view.ts
|
|
2028
|
+
import { Task as Task4 } from "@lit/task";
|
|
2029
|
+
import { useAddressResolver as useAddressResolver4 } from "@lukso/transaction-view-headless";
|
|
2030
|
+
import { html as html11 } from "lit";
|
|
2031
|
+
import { property as property11, state as state8 } from "lit/decorators.js";
|
|
2032
|
+
import { when } from "lit/directives/when.js";
|
|
2033
|
+
function formatUnits(value, decimals = 18) {
|
|
2034
|
+
const divisor = 10n ** BigInt(decimals);
|
|
2035
|
+
const quotient = value / divisor;
|
|
2036
|
+
const remainder = value % divisor;
|
|
2037
|
+
if (remainder === 0n) {
|
|
2038
|
+
return quotient.toString();
|
|
2039
|
+
}
|
|
2040
|
+
const remainderStr = remainder.toString().padStart(decimals, "0");
|
|
2041
|
+
const trimmed = remainderStr.replace(/0+$/, "");
|
|
2042
|
+
return `${quotient}.${trimmed}`;
|
|
2043
|
+
}
|
|
2044
|
+
var ValueView = class extends CoreLitElement {
|
|
2045
|
+
constructor() {
|
|
2046
|
+
super(...arguments);
|
|
2047
|
+
this.type = "auto";
|
|
2048
|
+
this.currencySymbol = "LYX";
|
|
2049
|
+
this.decimals = 18;
|
|
2050
|
+
this.size = "medium";
|
|
2051
|
+
this.showCopyButton = false;
|
|
2052
|
+
this.isCardView = false;
|
|
2053
|
+
this._hasSlotContent = false;
|
|
2054
|
+
// Task for resolving address metadata
|
|
2055
|
+
this.addressTask = new Task4(this, {
|
|
2056
|
+
task: async ([address]) => {
|
|
2057
|
+
if (!address) return null;
|
|
2058
|
+
try {
|
|
2059
|
+
return this.addressResolver.resolveAddress(address);
|
|
2060
|
+
} catch (error) {
|
|
2061
|
+
console.warn("ValueView: Failed to resolve address metadata:", error);
|
|
2062
|
+
return null;
|
|
2063
|
+
}
|
|
2064
|
+
},
|
|
2065
|
+
args: () => [this.address]
|
|
2066
|
+
});
|
|
2067
|
+
}
|
|
2068
|
+
_onSlotChange(e) {
|
|
2069
|
+
const slot = e.target;
|
|
2070
|
+
const assigned = slot?.assignedNodes({ flatten: true }) ?? [];
|
|
2071
|
+
this._hasSlotContent = assigned.length > 0;
|
|
2072
|
+
}
|
|
2073
|
+
firstUpdated() {
|
|
2074
|
+
const slot = this.renderRoot.querySelector("slot");
|
|
2075
|
+
if (slot) {
|
|
2076
|
+
const assigned = slot.assignedNodes({ flatten: true });
|
|
2077
|
+
this._hasSlotContent = assigned.length > 0;
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
// Address resolution utilities (lazy initialization)
|
|
2081
|
+
get addressResolver() {
|
|
2082
|
+
try {
|
|
2083
|
+
return useAddressResolver4();
|
|
2084
|
+
} catch (error) {
|
|
2085
|
+
console.warn("ValueView: Address resolver not available:", error);
|
|
2086
|
+
return {
|
|
2087
|
+
resolveAddress: async () => null
|
|
2088
|
+
};
|
|
2089
|
+
}
|
|
2090
|
+
}
|
|
2091
|
+
/**
|
|
2092
|
+
* Get the effective type for the value
|
|
2093
|
+
*/
|
|
2094
|
+
getEffectiveType() {
|
|
2095
|
+
if (this.type !== "auto") return this.type;
|
|
2096
|
+
const value = this.value;
|
|
2097
|
+
if (value === null || value === void 0) return "null";
|
|
2098
|
+
if (typeof value === "string") return "string";
|
|
2099
|
+
if (typeof value === "number") return "number";
|
|
2100
|
+
if (typeof value === "boolean") return "boolean";
|
|
2101
|
+
if (typeof value === "bigint") {
|
|
2102
|
+
if (this.keyName === "value") return "currency";
|
|
2103
|
+
return "bigint";
|
|
2104
|
+
}
|
|
2105
|
+
return "string";
|
|
2106
|
+
}
|
|
2107
|
+
/**
|
|
2108
|
+
* Get CSS class for the value type
|
|
2109
|
+
*/
|
|
2110
|
+
getValueClass() {
|
|
2111
|
+
const effectiveType = this.getEffectiveType();
|
|
2112
|
+
switch (effectiveType) {
|
|
2113
|
+
case "string":
|
|
2114
|
+
return "text-success-60";
|
|
2115
|
+
case "number":
|
|
2116
|
+
return "text-info-60";
|
|
2117
|
+
case "boolean":
|
|
2118
|
+
return "text-error-60";
|
|
2119
|
+
case "currency":
|
|
2120
|
+
return "text-warning-60 font-medium";
|
|
2121
|
+
case "bigint":
|
|
2122
|
+
return "text-secondary-60";
|
|
2123
|
+
case "address":
|
|
2124
|
+
return "text-info-60 font-mono";
|
|
2125
|
+
case "null":
|
|
2126
|
+
return "text-neutral-70 italic";
|
|
2127
|
+
default:
|
|
2128
|
+
return "text-neutral-10";
|
|
2129
|
+
}
|
|
2130
|
+
}
|
|
2131
|
+
/**
|
|
2132
|
+
* Format the value for display
|
|
2133
|
+
*/
|
|
2134
|
+
getFormattedValue() {
|
|
2135
|
+
const value = this.value;
|
|
2136
|
+
const effectiveType = this.getEffectiveType();
|
|
2137
|
+
if (value === null) return "null";
|
|
2138
|
+
if (value === void 0) return "undefined";
|
|
2139
|
+
switch (effectiveType) {
|
|
2140
|
+
case "currency":
|
|
2141
|
+
const { numeric, symbol } = this.getCurrencyParts();
|
|
2142
|
+
return `${numeric} ${symbol}`;
|
|
2143
|
+
case "bigint":
|
|
2144
|
+
if (typeof value === "bigint") {
|
|
2145
|
+
return value.toString() + "n";
|
|
2146
|
+
}
|
|
2147
|
+
return String(value) + "n";
|
|
2148
|
+
case "boolean":
|
|
2149
|
+
return value ? "true" : "false";
|
|
2150
|
+
case "number":
|
|
2151
|
+
if (typeof value === "number") {
|
|
2152
|
+
return value.toLocaleString();
|
|
2153
|
+
}
|
|
2154
|
+
return String(value);
|
|
2155
|
+
case "string":
|
|
2156
|
+
return String(value);
|
|
2157
|
+
case "null":
|
|
2158
|
+
return "null";
|
|
2159
|
+
default:
|
|
2160
|
+
return String(value);
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
/**
|
|
2164
|
+
* Compute currency display parts: numeric portion and symbol
|
|
2165
|
+
*/
|
|
2166
|
+
getCurrencyParts() {
|
|
2167
|
+
const value = this.value;
|
|
2168
|
+
const resolvedData = this.addressTask.value;
|
|
2169
|
+
const effectiveDecimals = resolvedData?.lsp4TokenSymbol ? resolvedData.baseAsset?.decimals ?? resolvedData.decimals ?? this.decimals : this.decimals;
|
|
2170
|
+
const effectiveSymbol = resolvedData?.lsp4TokenSymbol || resolvedData?.baseAsset?.lsp4TokenSymbol || this.currencySymbol;
|
|
2171
|
+
let numeric = String(value ?? "");
|
|
2172
|
+
try {
|
|
2173
|
+
if (typeof value === "bigint") {
|
|
2174
|
+
numeric = formatUnits(value, effectiveDecimals);
|
|
2175
|
+
} else if (typeof value === "string" && !isNaN(Number(value))) {
|
|
2176
|
+
const bigintValue = BigInt(value);
|
|
2177
|
+
numeric = formatUnits(bigintValue, effectiveDecimals);
|
|
2178
|
+
}
|
|
2179
|
+
} catch {
|
|
2180
|
+
numeric = String(value ?? "");
|
|
2181
|
+
}
|
|
2182
|
+
return { numeric, symbol: effectiveSymbol };
|
|
2183
|
+
}
|
|
2184
|
+
/** Typography class for numeric value based on size */
|
|
2185
|
+
getNumericClass() {
|
|
2186
|
+
switch (this.size) {
|
|
2187
|
+
case "x-small":
|
|
2188
|
+
return "paragraph-ptmono-12-bold";
|
|
2189
|
+
case "small":
|
|
2190
|
+
return "paragraph-ptmono-14-bold";
|
|
2191
|
+
case "medium":
|
|
2192
|
+
return "paragraph-ptmono-16-bold";
|
|
2193
|
+
case "large":
|
|
2194
|
+
return "paragraph-ptmono-24-bold";
|
|
2195
|
+
default:
|
|
2196
|
+
return "paragraph-ptmono-16-bold";
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
/** Typography class for currency symbol based on size */
|
|
2200
|
+
getCurrencyClass() {
|
|
2201
|
+
switch (this.size) {
|
|
2202
|
+
case "x-small":
|
|
2203
|
+
return "paragraph-inter-12-regular";
|
|
2204
|
+
case "small":
|
|
2205
|
+
return "paragraph-inter-14-regular";
|
|
2206
|
+
case "medium":
|
|
2207
|
+
return "paragraph-inter-16-regular";
|
|
2208
|
+
case "large":
|
|
2209
|
+
return "paragraph-inter-20-regular";
|
|
2210
|
+
default:
|
|
2211
|
+
return "paragraph-inter-16-regular";
|
|
2212
|
+
}
|
|
2213
|
+
}
|
|
2214
|
+
/**
|
|
2215
|
+
* Get size-appropriate font size
|
|
2216
|
+
*/
|
|
2217
|
+
getContainerTextClass() {
|
|
2218
|
+
switch (this.size) {
|
|
2219
|
+
case "x-small":
|
|
2220
|
+
return "text-[12px]";
|
|
2221
|
+
case "small":
|
|
2222
|
+
return "text-[14px]";
|
|
2223
|
+
case "medium":
|
|
2224
|
+
return "text-[16px]";
|
|
2225
|
+
case "large":
|
|
2226
|
+
return "text-[18px]";
|
|
2227
|
+
default:
|
|
2228
|
+
return "text-[16px]";
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
/**
|
|
2232
|
+
* Handle copy to clipboard
|
|
2233
|
+
*/
|
|
2234
|
+
async handleCopy(e) {
|
|
2235
|
+
if (e) e.stopPropagation();
|
|
2236
|
+
const textToCopy = String(this.value);
|
|
2237
|
+
try {
|
|
2238
|
+
await navigator.clipboard.writeText(textToCopy);
|
|
2239
|
+
this.dispatchEvent(
|
|
2240
|
+
new CustomEvent("value-copied", {
|
|
2241
|
+
detail: { value: textToCopy },
|
|
2242
|
+
bubbles: true
|
|
2243
|
+
})
|
|
2244
|
+
);
|
|
2245
|
+
} catch (error) {
|
|
2246
|
+
console.error("Failed to copy value:", error);
|
|
2247
|
+
}
|
|
2248
|
+
}
|
|
2249
|
+
/**
|
|
2250
|
+
* Handle value click
|
|
2251
|
+
*/
|
|
2252
|
+
handleClick() {
|
|
2253
|
+
this.dispatchEvent(
|
|
2254
|
+
new CustomEvent("value-click", {
|
|
2255
|
+
detail: {
|
|
2256
|
+
value: this.value,
|
|
2257
|
+
formattedValue: this.getFormattedValue(),
|
|
2258
|
+
type: this.getEffectiveType()
|
|
2259
|
+
},
|
|
2260
|
+
bubbles: true
|
|
2261
|
+
})
|
|
2262
|
+
);
|
|
2263
|
+
}
|
|
2264
|
+
render() {
|
|
2265
|
+
const formattedValue = this.getFormattedValue();
|
|
2266
|
+
const valueClass = this.getValueClass();
|
|
2267
|
+
if (this.isCardView) {
|
|
2268
|
+
const effectiveType = this.getEffectiveType();
|
|
2269
|
+
let headerText = this.label || "";
|
|
2270
|
+
let contentTemplate = html11`
|
|
2271
|
+
<span class="inline-block text-wrap min-w-0 text-center">${formattedValue}</span>
|
|
2272
|
+
`;
|
|
2273
|
+
if (effectiveType === "currency") {
|
|
2274
|
+
const { numeric, symbol } = this.getCurrencyParts();
|
|
2275
|
+
if (this.label && this.label.trim() !== "") {
|
|
2276
|
+
headerText = this.label;
|
|
2277
|
+
contentTemplate = html11`
|
|
2278
|
+
<span class="inline-block overflow-hidden text-ellipsis whitespace-nowrap min-w-0 ${this.getNumericClass()}">${numeric}</span>
|
|
2279
|
+
<span class="inline-block ${this.getCurrencyClass()}"> ${symbol}</span>
|
|
2280
|
+
`;
|
|
2281
|
+
} else {
|
|
2282
|
+
headerText = symbol;
|
|
2283
|
+
contentTemplate = html11`
|
|
2284
|
+
<span class="inline-block overflow-hidden text-ellipsis whitespace-nowrap min-w-0 ${this.getNumericClass()}">${numeric}</span>
|
|
2285
|
+
`;
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
return html11`
|
|
2289
|
+
<div
|
|
2290
|
+
class="block border border-neutral-90 rounded-xl bg-white py-3 px-4 min-w-[320px] ${this.containerClassNames || ""}"
|
|
2291
|
+
@click=${this.handleClick}
|
|
2292
|
+
style="${this.maxWidth ? `max-width: ${this.maxWidth}px` : ""}"
|
|
2293
|
+
>
|
|
2294
|
+
<div class="flex items-center justify-between mb-2">
|
|
2295
|
+
${headerText ? html11`<div class="${this.getLabelClass()} text-neutral-20 overflow-hidden text-ellipsis whitespace-nowrap">${headerText}</div>` : html11``}
|
|
2296
|
+
${this.showCopyButton ? html11`
|
|
2297
|
+
<button
|
|
2298
|
+
class="bg-white rounded-lg w-6 h-6 flex items-center justify-center cursor-pointer text-neutral-20 hover:bg-neutral-95"
|
|
2299
|
+
@click=${(e) => this.handleCopy(e)}
|
|
2300
|
+
title="Copy value"
|
|
2301
|
+
aria-label="Copy"
|
|
2302
|
+
>
|
|
2303
|
+
<lukso-icon name="copy" size="small"></lukso-icon>
|
|
2304
|
+
</button>
|
|
2305
|
+
` : html11``}
|
|
2306
|
+
</div>
|
|
2307
|
+
${when(
|
|
2308
|
+
!this._hasSlotContent,
|
|
2309
|
+
() => html11`
|
|
2310
|
+
<div class="font-semibold text-neutral-10 break-words flex items-center gap-2 text-wrap ${this.getUseMonospace() ? "font-mono" : ""}">
|
|
2311
|
+
${contentTemplate}
|
|
2312
|
+
</div>
|
|
2313
|
+
`
|
|
2314
|
+
)}
|
|
2315
|
+
<slot @slotchange=${this._onSlotChange}></slot>
|
|
2316
|
+
</div>
|
|
2317
|
+
`;
|
|
2318
|
+
}
|
|
2319
|
+
return html11`
|
|
2320
|
+
<div
|
|
2321
|
+
class="inline-flex items-center gap-1.5 cursor-pointer transition-all duration-200 rounded px-1 py-0.5 hover:bg-neutral-95 min-w-[320px] ${this.getContainerTextClass()} ${this.containerClassNames || ""}"
|
|
2322
|
+
@click=${this.handleClick}
|
|
2323
|
+
style="${this.maxWidth ? `max-width: ${this.maxWidth}px` : ""}"
|
|
2324
|
+
>
|
|
2325
|
+
<span class="inline-block overflow-hidden text-ellipsis whitespace-nowrap min-w-0 ${valueClass}">
|
|
2326
|
+
${formattedValue}
|
|
2327
|
+
</span>
|
|
2328
|
+
${this.showCopyButton ? html11`
|
|
2329
|
+
<button
|
|
2330
|
+
class="inline-flex items-center justify-center bg-transparent border-0 cursor-pointer text-neutral-70 p-0.5 rounded transition-all duration-200 hover:text-primary-50 hover:bg-neutral-90 flex-shrink-0"
|
|
2331
|
+
@click=${(e) => this.handleCopy(e)}
|
|
2332
|
+
title="Copy value"
|
|
2333
|
+
aria-label="Copy value to clipboard"
|
|
2334
|
+
>
|
|
2335
|
+
<lukso-icon name="copy" size="small"></lukso-icon>
|
|
2336
|
+
</button>
|
|
2337
|
+
` : ""}
|
|
2338
|
+
</div>
|
|
2339
|
+
`;
|
|
2340
|
+
}
|
|
2341
|
+
/** Whether to use monospace font for the value content */
|
|
2342
|
+
getUseMonospace() {
|
|
2343
|
+
const t = this.getEffectiveType();
|
|
2344
|
+
if (t === "address" || t === "bigint" || this.value?.toString().startsWith("0x"))
|
|
2345
|
+
return true;
|
|
2346
|
+
if (t === "string") {
|
|
2347
|
+
const s = String(this.value ?? "");
|
|
2348
|
+
return /^0x[0-9a-fA-F]+$/.test(s) || s.length > 32;
|
|
2349
|
+
}
|
|
2350
|
+
return false;
|
|
2351
|
+
}
|
|
2352
|
+
/** Map size to a typography class for the label */
|
|
2353
|
+
getLabelClass() {
|
|
2354
|
+
switch (this.size) {
|
|
2355
|
+
case "x-small":
|
|
2356
|
+
return "paragraph-inter-12-semi-bold";
|
|
2357
|
+
case "small":
|
|
2358
|
+
return "heading-inter-14-bold";
|
|
2359
|
+
case "medium":
|
|
2360
|
+
return "heading-inter-17-semi-bold";
|
|
2361
|
+
case "large":
|
|
2362
|
+
return "heading-inter-21-semi-bold";
|
|
2363
|
+
default:
|
|
2364
|
+
return "heading-inter-17-semi-bold";
|
|
2365
|
+
}
|
|
2366
|
+
}
|
|
2367
|
+
};
|
|
2368
|
+
__decorateClass([
|
|
2369
|
+
property11()
|
|
2370
|
+
], ValueView.prototype, "value", 2);
|
|
2371
|
+
__decorateClass([
|
|
2372
|
+
property11({ attribute: "key-name" })
|
|
2373
|
+
], ValueView.prototype, "keyName", 2);
|
|
2374
|
+
__decorateClass([
|
|
2375
|
+
property11({ type: String, attribute: "container-class-names" })
|
|
2376
|
+
], ValueView.prototype, "containerClassNames", 2);
|
|
2377
|
+
__decorateClass([
|
|
2378
|
+
property11()
|
|
2379
|
+
], ValueView.prototype, "type", 2);
|
|
2380
|
+
__decorateClass([
|
|
2381
|
+
property11({ attribute: "currency-symbol" })
|
|
2382
|
+
], ValueView.prototype, "currencySymbol", 2);
|
|
2383
|
+
__decorateClass([
|
|
2384
|
+
property11({ type: Number })
|
|
2385
|
+
], ValueView.prototype, "decimals", 2);
|
|
2386
|
+
__decorateClass([
|
|
2387
|
+
property11()
|
|
2388
|
+
], ValueView.prototype, "size", 2);
|
|
2389
|
+
__decorateClass([
|
|
2390
|
+
property11({ type: Boolean, attribute: "show-copy-button" })
|
|
2391
|
+
], ValueView.prototype, "showCopyButton", 2);
|
|
2392
|
+
__decorateClass([
|
|
2393
|
+
property11({ type: Boolean, attribute: "is-card-view" })
|
|
2394
|
+
], ValueView.prototype, "isCardView", 2);
|
|
2395
|
+
__decorateClass([
|
|
2396
|
+
property11()
|
|
2397
|
+
], ValueView.prototype, "label", 2);
|
|
2398
|
+
__decorateClass([
|
|
2399
|
+
property11({ type: Number, attribute: "max-width" })
|
|
2400
|
+
], ValueView.prototype, "maxWidth", 2);
|
|
2401
|
+
__decorateClass([
|
|
2402
|
+
property11()
|
|
2403
|
+
], ValueView.prototype, "address", 2);
|
|
2404
|
+
__decorateClass([
|
|
2405
|
+
state8()
|
|
2406
|
+
], ValueView.prototype, "resolvedMetadata", 2);
|
|
2407
|
+
__decorateClass([
|
|
2408
|
+
state8()
|
|
2409
|
+
], ValueView.prototype, "_hasSlotContent", 2);
|
|
2410
|
+
ValueView = __decorateClass([
|
|
2411
|
+
safeCustomElement("value-view")
|
|
2412
|
+
], ValueView);
|
|
2413
|
+
|
|
2414
|
+
// src/shared/image-list.ts
|
|
2415
|
+
import { Task as Task5 } from "@lit/task";
|
|
2416
|
+
import { useAddressResolver as useAddressResolver5 } from "@lukso/transaction-view-headless";
|
|
2417
|
+
import { html as html12 } from "lit";
|
|
2418
|
+
import { property as property12, state as state9 } from "lit/decorators.js";
|
|
2419
|
+
import { repeat } from "lit/directives/repeat.js";
|
|
2420
|
+
var ImageList = class extends CoreLitElement {
|
|
2421
|
+
constructor() {
|
|
2422
|
+
super(...arguments);
|
|
2423
|
+
this.size = "small";
|
|
2424
|
+
this.isCardView = false;
|
|
2425
|
+
this.isLoading = false;
|
|
2426
|
+
// Composables
|
|
2427
|
+
this.addressResolver = useAddressResolver5();
|
|
2428
|
+
// Task for resolving address data
|
|
2429
|
+
this.addressTask = new Task5(this, {
|
|
2430
|
+
task: async ([address], { signal }) => {
|
|
2431
|
+
if (!address) return null;
|
|
2432
|
+
this.isLoading = true;
|
|
2433
|
+
try {
|
|
2434
|
+
const resolved = await this.addressResolver.resolveAddress(address);
|
|
2435
|
+
return resolved;
|
|
2436
|
+
} catch (error) {
|
|
2437
|
+
console.warn("\u274C ImageList: Failed to resolve address:", error);
|
|
2438
|
+
return null;
|
|
2439
|
+
} finally {
|
|
2440
|
+
this.isLoading = false;
|
|
2441
|
+
}
|
|
2442
|
+
},
|
|
2443
|
+
args: () => [this.address]
|
|
2444
|
+
});
|
|
2445
|
+
}
|
|
2446
|
+
/**
|
|
2447
|
+
* Get the list of items to display from resolved data
|
|
2448
|
+
*/
|
|
2449
|
+
getDisplayItems() {
|
|
2450
|
+
const resolved = this.addressTask.value;
|
|
2451
|
+
if (!resolved) return [];
|
|
2452
|
+
console.log("resolved images are", resolved);
|
|
2453
|
+
const items = resolved[this.imageHint];
|
|
2454
|
+
if (!Array.isArray(items)) return [];
|
|
2455
|
+
const hasIndex = items.length > 0 && items[0]?.index !== void 0;
|
|
2456
|
+
if (!hasIndex) {
|
|
2457
|
+
return items;
|
|
2458
|
+
}
|
|
2459
|
+
return items.filter((item) => {
|
|
2460
|
+
const index = item.index;
|
|
2461
|
+
if (this.minIndex !== void 0 && index < this.minIndex) return false;
|
|
2462
|
+
if (this.maxIndex !== void 0 && index > this.maxIndex) return false;
|
|
2463
|
+
return true;
|
|
2464
|
+
});
|
|
2465
|
+
}
|
|
2466
|
+
/**
|
|
2467
|
+
* Check if an item is an actual image based on fileType
|
|
2468
|
+
*/
|
|
2469
|
+
isImageFile(item) {
|
|
2470
|
+
if (!item.fileType) return true;
|
|
2471
|
+
return item.fileType.startsWith("image/");
|
|
2472
|
+
}
|
|
2473
|
+
/**
|
|
2474
|
+
* Get file type icon for non-image files
|
|
2475
|
+
*/
|
|
2476
|
+
getFileTypeIcon(item) {
|
|
2477
|
+
if (!item.fileType) return "\u{1F4C4}";
|
|
2478
|
+
if (item.fileType.startsWith("video/")) return "\u{1F3A5}";
|
|
2479
|
+
if (item.fileType.startsWith("audio/")) return "\u{1F3B5}";
|
|
2480
|
+
if (item.fileType.startsWith("application/pdf")) return "\u{1F4D5}";
|
|
2481
|
+
return "\u{1F4C4}";
|
|
2482
|
+
}
|
|
2483
|
+
/**
|
|
2484
|
+
* Render a single image item
|
|
2485
|
+
*/
|
|
2486
|
+
renderImageItem(item, index) {
|
|
2487
|
+
const itemIndex = item.index !== void 0 ? item.index : index;
|
|
2488
|
+
const isImage = this.isImageFile(item);
|
|
2489
|
+
if (isImage) {
|
|
2490
|
+
const imageSrc = item.src || item.url;
|
|
2491
|
+
if (!imageSrc) {
|
|
2492
|
+
return html12`
|
|
2493
|
+
<div class="image-item broken-image-item">
|
|
2494
|
+
<div class="broken-image-icon">🖼️❌</div>
|
|
2495
|
+
${item.index !== void 0 ? html12`<div class="broken-image-label">#${item.index}</div>` : ""}
|
|
2496
|
+
<div class="broken-image-text">No image</div>
|
|
2497
|
+
</div>
|
|
2498
|
+
`;
|
|
2499
|
+
}
|
|
2500
|
+
return html12`
|
|
2501
|
+
<div class="">
|
|
2502
|
+
<img
|
|
2503
|
+
class="min-h-20 min-w-20 object-cover rounded-lg"
|
|
2504
|
+
src=${imageSrc}
|
|
2505
|
+
alt=${item.index !== void 0 ? `#${item.index}` : "Image"}
|
|
2506
|
+
@error=${(e) => {
|
|
2507
|
+
const target = e.target;
|
|
2508
|
+
target.style.display = "none";
|
|
2509
|
+
const parent = target.parentElement;
|
|
2510
|
+
if (parent) {
|
|
2511
|
+
parent.innerHTML = `
|
|
2512
|
+
<div class="broken-image-icon">\u{1F5BC}\uFE0F\u274C</div>
|
|
2513
|
+
<div class="broken-image-text">Failed to load</div>
|
|
2514
|
+
`;
|
|
2515
|
+
}
|
|
2516
|
+
}}
|
|
2517
|
+
/>
|
|
2518
|
+
${item.index !== void 0 ? html12`<div class="image-label">#${item.index}</div>` : ""}
|
|
2519
|
+
</div>
|
|
2520
|
+
`;
|
|
2521
|
+
} else {
|
|
2522
|
+
return html12`
|
|
2523
|
+
<div class="image-item file-item">
|
|
2524
|
+
<div class="file-icon">${this.getFileTypeIcon(item)}</div>
|
|
2525
|
+
${item.index !== void 0 ? html12`<div class="file-label">#${item.index}</div>` : ""}
|
|
2526
|
+
<div class="file-type">${item.fileType || "Unknown"}</div>
|
|
2527
|
+
</div>
|
|
2528
|
+
`;
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
getImageMinSizePx() {
|
|
2532
|
+
switch (this.size) {
|
|
2533
|
+
case "x-small":
|
|
2534
|
+
return 80;
|
|
2535
|
+
case "small":
|
|
2536
|
+
return 120;
|
|
2537
|
+
case "medium":
|
|
2538
|
+
return 160;
|
|
2539
|
+
case "large":
|
|
2540
|
+
return 240;
|
|
2541
|
+
default:
|
|
2542
|
+
return 160;
|
|
2543
|
+
}
|
|
2544
|
+
}
|
|
2545
|
+
render() {
|
|
2546
|
+
if (this.isLoading) {
|
|
2547
|
+
return html12`
|
|
2548
|
+
<div class="flex flex-col items-center justify-center py-10 px-5 text-neutral-60">
|
|
2549
|
+
<div class="text-[24px] mb-2 animate-spin">⏳</div>
|
|
2550
|
+
<div class="text-[14px]">Loading images...</div>
|
|
2551
|
+
</div>
|
|
2552
|
+
`;
|
|
2553
|
+
}
|
|
2554
|
+
const items = this.getDisplayItems();
|
|
2555
|
+
if (items.length === 0) {
|
|
2556
|
+
return html12`
|
|
2557
|
+
<div class="flex flex-col items-center justify-center py-10 px-5 text-neutral-70">
|
|
2558
|
+
<div class="text-[14px]">No images found</div>
|
|
2559
|
+
</div>
|
|
2560
|
+
`;
|
|
2561
|
+
}
|
|
2562
|
+
const grid = html12`
|
|
2563
|
+
<div class="grid grid-cols-[repeat(auto-fill,minmax(${this.getImageMinSizePx()}px,300px))] gap-3 p-2">
|
|
2564
|
+
${repeat(
|
|
2565
|
+
items,
|
|
2566
|
+
(item, index) => item.index ?? index,
|
|
2567
|
+
(item, index) => this.renderImageItem(item, index)
|
|
2568
|
+
)}
|
|
2569
|
+
</div>
|
|
2570
|
+
`;
|
|
2571
|
+
return this.isCardView ? html12`<div class="flex flex-row flex-wrap border border-neutral-90 rounded-xl p-3 bg-neutral-100">${grid}</div>` : grid;
|
|
2572
|
+
}
|
|
2573
|
+
};
|
|
2574
|
+
__decorateClass([
|
|
2575
|
+
property12()
|
|
2576
|
+
], ImageList.prototype, "address", 2);
|
|
2577
|
+
__decorateClass([
|
|
2578
|
+
property12({ type: String, attribute: "image-hint" })
|
|
2579
|
+
], ImageList.prototype, "imageHint", 2);
|
|
2580
|
+
__decorateClass([
|
|
2581
|
+
property12({ type: Number, attribute: "min-index" })
|
|
2582
|
+
], ImageList.prototype, "minIndex", 2);
|
|
2583
|
+
__decorateClass([
|
|
2584
|
+
property12({ type: Number, attribute: "max-index" })
|
|
2585
|
+
], ImageList.prototype, "maxIndex", 2);
|
|
2586
|
+
__decorateClass([
|
|
2587
|
+
property12()
|
|
2588
|
+
], ImageList.prototype, "size", 2);
|
|
2589
|
+
__decorateClass([
|
|
2590
|
+
property12({ type: Boolean, attribute: "is-card-view" })
|
|
2591
|
+
], ImageList.prototype, "isCardView", 2);
|
|
2592
|
+
__decorateClass([
|
|
2593
|
+
state9()
|
|
2594
|
+
], ImageList.prototype, "isLoading", 2);
|
|
2595
|
+
ImageList = __decorateClass([
|
|
2596
|
+
safeCustomElement("image-list")
|
|
2597
|
+
], ImageList);
|
|
2598
|
+
|
|
2599
|
+
// src/components/info-panel.ts
|
|
2600
|
+
import { Task as Task6 } from "@lit/task";
|
|
2601
|
+
import {
|
|
2602
|
+
useAddressResolver as useAddressResolver6
|
|
2603
|
+
} from "@lukso/transaction-view-headless";
|
|
2604
|
+
import { css as css4, html as html13, LitElement as LitElement3 } from "lit";
|
|
2605
|
+
import { property as property13, state as state10 } from "lit/decorators.js";
|
|
2606
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
2607
|
+
import { repeat as repeat2 } from "lit/directives/repeat.js";
|
|
2608
|
+
import { when as when2 } from "lit/directives/when.js";
|
|
2609
|
+
var InfoPanel = class extends LitElement3 {
|
|
2610
|
+
constructor() {
|
|
2611
|
+
super(...arguments);
|
|
2612
|
+
this.address = "";
|
|
2613
|
+
this.open = false;
|
|
2614
|
+
this.standard = "";
|
|
2615
|
+
this.type = "transfer";
|
|
2616
|
+
this._isAnimating = false;
|
|
2617
|
+
this._resolutionTask = new Task6(this, {
|
|
2618
|
+
task: async ([address]) => {
|
|
2619
|
+
if (!address) return null;
|
|
2620
|
+
const { resolveAddress } = useAddressResolver6();
|
|
2621
|
+
const data = await resolveAddress(address);
|
|
2622
|
+
this._resolvedData = data;
|
|
2623
|
+
return data;
|
|
2624
|
+
},
|
|
2625
|
+
args: () => [this.address]
|
|
2626
|
+
});
|
|
2627
|
+
}
|
|
2628
|
+
_extractBaseAddress(addressOrComposite) {
|
|
2629
|
+
return addressOrComposite.split("-")[0];
|
|
2630
|
+
}
|
|
2631
|
+
_extractTokenId(addressOrComposite) {
|
|
2632
|
+
const parts = addressOrComposite.split("-");
|
|
2633
|
+
return parts.length > 1 ? parts[1] : void 0;
|
|
2634
|
+
}
|
|
2635
|
+
_handleClose() {
|
|
2636
|
+
this.dispatchEvent(new CustomEvent("close"));
|
|
2637
|
+
}
|
|
2638
|
+
_copyToClipboard(text) {
|
|
2639
|
+
if (navigator.clipboard) {
|
|
2640
|
+
navigator.clipboard.writeText(text);
|
|
2641
|
+
this.dispatchEvent(new CustomEvent("copied", { detail: { text } }));
|
|
2642
|
+
}
|
|
2643
|
+
}
|
|
2644
|
+
_renderHeader() {
|
|
2645
|
+
const name = this._resolvedData?.lsp4TokenName || this._resolvedData?.name || "Digital Asset";
|
|
2646
|
+
return html13`
|
|
2647
|
+
<div class="header">
|
|
2648
|
+
${when2(
|
|
2649
|
+
this.address,
|
|
2650
|
+
() => html13`
|
|
2651
|
+
<icon-view
|
|
2652
|
+
address="${this.address}"
|
|
2653
|
+
size="large"
|
|
2654
|
+
class="header-icon"
|
|
2655
|
+
></icon-view>
|
|
2656
|
+
`,
|
|
2657
|
+
() => html13`
|
|
2658
|
+
<div class="loading-placeholder">🪙</div>
|
|
2659
|
+
`
|
|
2660
|
+
)}
|
|
2661
|
+
<div class="header-title">${name}</div>
|
|
2662
|
+
</div>
|
|
2663
|
+
`;
|
|
2664
|
+
}
|
|
2665
|
+
_renderContractAddress() {
|
|
2666
|
+
const contractAddress = this._extractBaseAddress(this.address);
|
|
2667
|
+
if (!contractAddress) return "";
|
|
2668
|
+
return html13`
|
|
2669
|
+
<div class="section">
|
|
2670
|
+
<div class="section-title">
|
|
2671
|
+
📄 Contract Address
|
|
2672
|
+
<button
|
|
2673
|
+
class="copy-button"
|
|
2674
|
+
@click=${() => this._copyToClipboard(contractAddress)}
|
|
2675
|
+
title="Copy to clipboard"
|
|
2676
|
+
>
|
|
2677
|
+
📋
|
|
2678
|
+
</button>
|
|
2679
|
+
</div>
|
|
2680
|
+
<div class="section-content">
|
|
2681
|
+
<address-view
|
|
2682
|
+
.address=${contractAddress}
|
|
2683
|
+
format="truncated"
|
|
2684
|
+
></address-view>
|
|
2685
|
+
</div>
|
|
2686
|
+
</div>
|
|
2687
|
+
`;
|
|
2688
|
+
}
|
|
2689
|
+
_renderTokenId() {
|
|
2690
|
+
const tokenId = this._extractTokenId(this.address);
|
|
2691
|
+
if (!tokenId) return "";
|
|
2692
|
+
const formattedTokenId = this._resolvedData?.formattedTokenId;
|
|
2693
|
+
const displayTokenId = formattedTokenId ? `#${formattedTokenId}` : tokenId || "";
|
|
2694
|
+
return html13`
|
|
2695
|
+
<div class="section">
|
|
2696
|
+
<div class="section-title">
|
|
2697
|
+
🏷️ Token ID
|
|
2698
|
+
<button
|
|
2699
|
+
class="copy-button"
|
|
2700
|
+
@click=${() => this._copyToClipboard(tokenId)}
|
|
2701
|
+
title="Copy to clipboard"
|
|
2702
|
+
>
|
|
2703
|
+
📋
|
|
2704
|
+
</button>
|
|
2705
|
+
</div>
|
|
2706
|
+
<div class="section-content">${displayTokenId}</div>
|
|
2707
|
+
</div>
|
|
2708
|
+
`;
|
|
2709
|
+
}
|
|
2710
|
+
_renderDescription() {
|
|
2711
|
+
const description = this._resolvedData?.description;
|
|
2712
|
+
if (!description) return "";
|
|
2713
|
+
return html13`
|
|
2714
|
+
<div class="section">
|
|
2715
|
+
<div class="section-title">📝 Description</div>
|
|
2716
|
+
<div class="section-content description">${description}</div>
|
|
2717
|
+
</div>
|
|
2718
|
+
`;
|
|
2719
|
+
}
|
|
2720
|
+
_renderLinks() {
|
|
2721
|
+
const links = this._resolvedData?.links || [];
|
|
2722
|
+
if (!links.length) return "";
|
|
2723
|
+
return html13`
|
|
2724
|
+
<div class="section">
|
|
2725
|
+
<div class="section-title">🔗 Links</div>
|
|
2726
|
+
<ul class="links-list">
|
|
2727
|
+
${repeat2(
|
|
2728
|
+
links,
|
|
2729
|
+
(link) => link.url,
|
|
2730
|
+
(link) => html13`
|
|
2731
|
+
<li class="link-item">
|
|
2732
|
+
<a
|
|
2733
|
+
class="external-link"
|
|
2734
|
+
href="${link.url}"
|
|
2735
|
+
target="_blank"
|
|
2736
|
+
rel="noopener noreferrer"
|
|
2737
|
+
>
|
|
2738
|
+
${link.title || link.url}
|
|
2739
|
+
<span>↗</span>
|
|
2740
|
+
</a>
|
|
2741
|
+
</li>
|
|
2742
|
+
`
|
|
2743
|
+
)}
|
|
2744
|
+
</ul>
|
|
2745
|
+
</div>
|
|
2746
|
+
`;
|
|
2747
|
+
}
|
|
2748
|
+
_renderImages() {
|
|
2749
|
+
const images = this._resolvedData?.images || [];
|
|
2750
|
+
if (!images.length) return "";
|
|
2751
|
+
return html13`
|
|
2752
|
+
<div class="section">
|
|
2753
|
+
<div class="section-title">🖼️ Images</div>
|
|
2754
|
+
<image-list
|
|
2755
|
+
address=${this.address}
|
|
2756
|
+
image-hint="images"
|
|
2757
|
+
size="medium"
|
|
2758
|
+
></image-list>
|
|
2759
|
+
</div>
|
|
2760
|
+
`;
|
|
2761
|
+
}
|
|
2762
|
+
_renderAssets() {
|
|
2763
|
+
const assets = this._resolvedData?.assets || [];
|
|
2764
|
+
if (!assets.length) return "";
|
|
2765
|
+
return html13`
|
|
2766
|
+
<div class="section">
|
|
2767
|
+
<div class="section-title">📦 Assets</div>
|
|
2768
|
+
<image-list
|
|
2769
|
+
address=${this.address}
|
|
2770
|
+
image-hint="assets"
|
|
2771
|
+
size="medium"
|
|
2772
|
+
></image-list>
|
|
2773
|
+
</div>
|
|
2774
|
+
`;
|
|
2775
|
+
}
|
|
2776
|
+
_handleBackdropClick(e) {
|
|
2777
|
+
if (e.target === e.currentTarget) {
|
|
2778
|
+
this._handleClose();
|
|
2779
|
+
}
|
|
2780
|
+
}
|
|
2781
|
+
render() {
|
|
2782
|
+
const panelClasses = {
|
|
2783
|
+
panel: true,
|
|
2784
|
+
open: this.open
|
|
2785
|
+
};
|
|
2786
|
+
return html13`
|
|
2787
|
+
<div class=${classMap(panelClasses)} @click=${this._handleBackdropClick}>
|
|
2788
|
+
<div class="panel-content" @click=${(e) => e.stopPropagation()}>
|
|
2789
|
+
<button class="close-button" @click=${this._handleClose}>×</button>
|
|
2790
|
+
|
|
2791
|
+
${this._renderHeader()}
|
|
2792
|
+
${this._renderContractAddress()}
|
|
2793
|
+
${this._renderTokenId()}
|
|
2794
|
+
${this._renderDescription()}
|
|
2795
|
+
${this._renderLinks()}
|
|
2796
|
+
${this._renderImages()}
|
|
2797
|
+
${this._renderAssets()}
|
|
2798
|
+
</div>
|
|
2799
|
+
</div>
|
|
2800
|
+
`;
|
|
2801
|
+
}
|
|
2802
|
+
};
|
|
2803
|
+
InfoPanel.styles = css4`
|
|
2804
|
+
:host {
|
|
2805
|
+
display: block;
|
|
2806
|
+
position: relative;
|
|
2807
|
+
font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
|
|
2808
|
+
}
|
|
2809
|
+
|
|
2810
|
+
.panel {
|
|
2811
|
+
position: fixed;
|
|
2812
|
+
top: 0;
|
|
2813
|
+
left: 0;
|
|
2814
|
+
right: 0;
|
|
2815
|
+
bottom: 0;
|
|
2816
|
+
background: rgba(0, 0, 0, 0.5);
|
|
2817
|
+
z-index: 1000;
|
|
2818
|
+
opacity: 0;
|
|
2819
|
+
visibility: hidden;
|
|
2820
|
+
transition: all 0.3s ease;
|
|
2821
|
+
}
|
|
2822
|
+
|
|
2823
|
+
.panel.open {
|
|
2824
|
+
opacity: 1;
|
|
2825
|
+
visibility: visible;
|
|
2826
|
+
}
|
|
2827
|
+
|
|
2828
|
+
.panel-content {
|
|
2829
|
+
position: absolute;
|
|
2830
|
+
top: 0;
|
|
2831
|
+
right: 0;
|
|
2832
|
+
width: 100%;
|
|
2833
|
+
max-width: 400px;
|
|
2834
|
+
height: 100%;
|
|
2835
|
+
background: white;
|
|
2836
|
+
transform: translateX(100%);
|
|
2837
|
+
transition: transform 0.3s ease;
|
|
2838
|
+
overflow-y: auto;
|
|
2839
|
+
padding: 24px;
|
|
2840
|
+
box-sizing: border-box;
|
|
2841
|
+
}
|
|
2842
|
+
|
|
2843
|
+
.panel.open .panel-content {
|
|
2844
|
+
transform: translateX(0);
|
|
2845
|
+
}
|
|
2846
|
+
|
|
2847
|
+
.close-button {
|
|
2848
|
+
position: absolute;
|
|
2849
|
+
top: 20px;
|
|
2850
|
+
right: 20px;
|
|
2851
|
+
background: none;
|
|
2852
|
+
border: none;
|
|
2853
|
+
font-size: 24px;
|
|
2854
|
+
cursor: pointer;
|
|
2855
|
+
color: #6b7280;
|
|
2856
|
+
padding: 4px;
|
|
2857
|
+
border-radius: 4px;
|
|
2858
|
+
transition: background-color 0.2s;
|
|
2859
|
+
}
|
|
2860
|
+
|
|
2861
|
+
.close-button:hover {
|
|
2862
|
+
background-color: #f3f4f6;
|
|
2863
|
+
}
|
|
2864
|
+
|
|
2865
|
+
.header {
|
|
2866
|
+
display: flex;
|
|
2867
|
+
align-items: center;
|
|
2868
|
+
justify-content: center;
|
|
2869
|
+
margin-bottom: 24px;
|
|
2870
|
+
padding-top: 20px;
|
|
2871
|
+
}
|
|
2872
|
+
|
|
2873
|
+
.header-icon {
|
|
2874
|
+
margin-right: 12px;
|
|
2875
|
+
}
|
|
2876
|
+
|
|
2877
|
+
.header-title {
|
|
2878
|
+
font-size: 18px;
|
|
2879
|
+
font-weight: 600;
|
|
2880
|
+
color: #111827;
|
|
2881
|
+
text-align: center;
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2884
|
+
.section {
|
|
2885
|
+
margin-bottom: 20px;
|
|
2886
|
+
padding: 16px;
|
|
2887
|
+
background: #f9fafb;
|
|
2888
|
+
border-radius: 12px;
|
|
2889
|
+
border: 1px solid #e5e7eb;
|
|
2890
|
+
}
|
|
2891
|
+
|
|
2892
|
+
.section-title {
|
|
2893
|
+
font-size: 14px;
|
|
2894
|
+
font-weight: 600;
|
|
2895
|
+
color: #374151;
|
|
2896
|
+
margin-bottom: 8px;
|
|
2897
|
+
display: flex;
|
|
2898
|
+
align-items: center;
|
|
2899
|
+
gap: 8px;
|
|
2900
|
+
}
|
|
2901
|
+
|
|
2902
|
+
.section-content {
|
|
2903
|
+
font-size: 14px;
|
|
2904
|
+
color: #6b7280;
|
|
2905
|
+
word-break: break-all;
|
|
2906
|
+
}
|
|
2907
|
+
|
|
2908
|
+
.copy-button {
|
|
2909
|
+
background: none;
|
|
2910
|
+
border: none;
|
|
2911
|
+
cursor: pointer;
|
|
2912
|
+
padding: 4px;
|
|
2913
|
+
border-radius: 4px;
|
|
2914
|
+
color: #6b7280;
|
|
2915
|
+
transition: background-color 0.2s;
|
|
2916
|
+
}
|
|
2917
|
+
|
|
2918
|
+
.copy-button:hover {
|
|
2919
|
+
background-color: #e5e7eb;
|
|
2920
|
+
}
|
|
2921
|
+
|
|
2922
|
+
.links-list {
|
|
2923
|
+
list-style: none;
|
|
2924
|
+
padding: 0;
|
|
2925
|
+
margin: 0;
|
|
2926
|
+
}
|
|
2927
|
+
|
|
2928
|
+
.link-item {
|
|
2929
|
+
margin-bottom: 8px;
|
|
2930
|
+
}
|
|
2931
|
+
|
|
2932
|
+
.link-item:last-child {
|
|
2933
|
+
margin-bottom: 0;
|
|
2934
|
+
}
|
|
2935
|
+
|
|
2936
|
+
.external-link {
|
|
2937
|
+
display: inline-flex;
|
|
2938
|
+
align-items: center;
|
|
2939
|
+
gap: 6px;
|
|
2940
|
+
color: #3b82f6;
|
|
2941
|
+
text-decoration: none;
|
|
2942
|
+
font-size: 14px;
|
|
2943
|
+
padding: 6px 12px;
|
|
2944
|
+
border-radius: 6px;
|
|
2945
|
+
transition: background-color 0.2s;
|
|
2946
|
+
}
|
|
2947
|
+
|
|
2948
|
+
.external-link:hover {
|
|
2949
|
+
background-color: #eff6ff;
|
|
2950
|
+
}
|
|
2951
|
+
|
|
2952
|
+
.description {
|
|
2953
|
+
line-height: 1.6;
|
|
2954
|
+
color: #374151;
|
|
2955
|
+
}
|
|
2956
|
+
|
|
2957
|
+
.loading-placeholder {
|
|
2958
|
+
width: 96px;
|
|
2959
|
+
height: 96px;
|
|
2960
|
+
background: #f3f4f6;
|
|
2961
|
+
border-radius: 16px;
|
|
2962
|
+
display: flex;
|
|
2963
|
+
align-items: center;
|
|
2964
|
+
justify-content: center;
|
|
2965
|
+
color: #9ca3af;
|
|
2966
|
+
font-size: 32px;
|
|
2967
|
+
}
|
|
2968
|
+
|
|
2969
|
+
@media (max-width: 640px) {
|
|
2970
|
+
.panel-content {
|
|
2971
|
+
max-width: 100%;
|
|
2972
|
+
}
|
|
2973
|
+
}
|
|
2974
|
+
`;
|
|
2975
|
+
__decorateClass([
|
|
2976
|
+
property13({ type: String })
|
|
2977
|
+
], InfoPanel.prototype, "address", 2);
|
|
2978
|
+
__decorateClass([
|
|
2979
|
+
property13({ type: Boolean, attribute: "open" })
|
|
2980
|
+
], InfoPanel.prototype, "open", 2);
|
|
2981
|
+
__decorateClass([
|
|
2982
|
+
property13({ type: String })
|
|
2983
|
+
], InfoPanel.prototype, "standard", 2);
|
|
2984
|
+
__decorateClass([
|
|
2985
|
+
property13({ type: String })
|
|
2986
|
+
], InfoPanel.prototype, "type", 2);
|
|
2987
|
+
__decorateClass([
|
|
2988
|
+
state10()
|
|
2989
|
+
], InfoPanel.prototype, "_isAnimating", 2);
|
|
2990
|
+
__decorateClass([
|
|
2991
|
+
state10()
|
|
2992
|
+
], InfoPanel.prototype, "_resolvedData", 2);
|
|
2993
|
+
InfoPanel = __decorateClass([
|
|
2994
|
+
safeCustomElement("info-panel")
|
|
2995
|
+
], InfoPanel);
|
|
2996
|
+
|
|
2997
|
+
// src/components/asset-card.ts
|
|
2998
|
+
import { html as html14 } from "lit";
|
|
2999
|
+
import { property as property14, state as state11 } from "lit/decorators.js";
|
|
3000
|
+
import { repeat as repeat3 } from "lit/directives/repeat.js";
|
|
3001
|
+
import { when as when3 } from "lit/directives/when.js";
|
|
3002
|
+
import "@lukso/web-components";
|
|
3003
|
+
import { Task as Task7 } from "@lit/task";
|
|
3004
|
+
import {
|
|
3005
|
+
useAddressResolver as useAddressResolver7
|
|
3006
|
+
} from "@lukso/transaction-view-headless";
|
|
3007
|
+
function formatUnits2(value, decimals = 18) {
|
|
3008
|
+
const divisor = 10n ** BigInt(decimals);
|
|
3009
|
+
const quotient = value / divisor;
|
|
3010
|
+
const remainder = value % divisor;
|
|
3011
|
+
if (remainder === 0n) {
|
|
3012
|
+
return quotient.toString();
|
|
3013
|
+
}
|
|
3014
|
+
const remainderStr = remainder.toString().padStart(decimals, "0");
|
|
3015
|
+
const trimmed = remainderStr.replace(/0+$/, "");
|
|
3016
|
+
return `${quotient}.${trimmed}`;
|
|
3017
|
+
}
|
|
3018
|
+
var AssetCard = class extends CoreLitElement {
|
|
3019
|
+
constructor() {
|
|
3020
|
+
super(...arguments);
|
|
3021
|
+
this.functionIcon = "code-outline";
|
|
3022
|
+
this.size = "medium";
|
|
3023
|
+
this.showInfoButton = true;
|
|
3024
|
+
this.showCreator = true;
|
|
3025
|
+
this.displayDetails = false;
|
|
3026
|
+
this._imageError = false;
|
|
3027
|
+
// Composables
|
|
3028
|
+
this.addressResolver = useAddressResolver7();
|
|
3029
|
+
this._resolutionTask = new Task7(this, {
|
|
3030
|
+
task: async ([address]) => {
|
|
3031
|
+
if (!address) return null;
|
|
3032
|
+
const { resolveAddress } = this.addressResolver;
|
|
3033
|
+
const data = await resolveAddress(address);
|
|
3034
|
+
this._resolvedData = data;
|
|
3035
|
+
return data;
|
|
3036
|
+
},
|
|
3037
|
+
args: () => [this.address]
|
|
3038
|
+
});
|
|
3039
|
+
}
|
|
3040
|
+
_handleImageError() {
|
|
3041
|
+
this._imageError = true;
|
|
3042
|
+
}
|
|
3043
|
+
_handleInfoClick() {
|
|
3044
|
+
this.displayDetails = !this.displayDetails;
|
|
3045
|
+
}
|
|
3046
|
+
_extractBaseAddress(addressOrComposite) {
|
|
3047
|
+
return addressOrComposite.split("-")[0];
|
|
3048
|
+
}
|
|
3049
|
+
_extractTokenId(addressOrComposite) {
|
|
3050
|
+
const parts = addressOrComposite.split("-");
|
|
3051
|
+
return parts.length > 1 ? parts[1] : void 0;
|
|
3052
|
+
}
|
|
3053
|
+
_copyToClipboard(text) {
|
|
3054
|
+
if (navigator.clipboard) {
|
|
3055
|
+
navigator.clipboard.writeText(text);
|
|
3056
|
+
this.dispatchEvent(new CustomEvent("copied", { detail: { text } }));
|
|
3057
|
+
}
|
|
3058
|
+
}
|
|
3059
|
+
_renderAddressSection() {
|
|
3060
|
+
const data = this._resolutionTask.value;
|
|
3061
|
+
if (!data) return "";
|
|
3062
|
+
return html14`
|
|
3063
|
+
<div class="flex items-center justify-between cursor-pointer">
|
|
3064
|
+
${when3(
|
|
3065
|
+
data.lsp4TokenSymbol,
|
|
3066
|
+
() => html14`
|
|
3067
|
+
<address-view
|
|
3068
|
+
address=${this._extractBaseAddress(data.address)}
|
|
3069
|
+
size="medium"
|
|
3070
|
+
max-width=${100}
|
|
3071
|
+
.showIdenticon=${false}
|
|
3072
|
+
?is-card-view=${false}
|
|
3073
|
+
?show-copy-button=${false}
|
|
3074
|
+
address-color="neutral-60"
|
|
3075
|
+
></address-view>
|
|
3076
|
+
`
|
|
3077
|
+
)}
|
|
3078
|
+
${when3(
|
|
3079
|
+
this.showInfoButton,
|
|
3080
|
+
() => html14`
|
|
3081
|
+
<lukso-icon name="information" size="small" @click=${this._handleInfoClick}></lukso-icon>
|
|
3082
|
+
`
|
|
3083
|
+
)}
|
|
3084
|
+
</div>
|
|
3085
|
+
`;
|
|
3086
|
+
}
|
|
3087
|
+
_renderCreatorSection() {
|
|
3088
|
+
const owner = this._resolvedData?.owner_id;
|
|
3089
|
+
const creators = this._resolvedData?.lsp4Creators || [];
|
|
3090
|
+
const resolvedCreator = owner || creators[0]?.profile_id;
|
|
3091
|
+
if (!resolvedCreator) return "";
|
|
3092
|
+
return html14`
|
|
3093
|
+
<div class="gap-2">
|
|
3094
|
+
<div class="text-neutral-60 text-[12px] font-normal">Created by</div>
|
|
3095
|
+
<div class="flex justify-center flex-col gap-1 text-[12px] font-bold font-mono">
|
|
3096
|
+
<icon-view
|
|
3097
|
+
address=${owner}
|
|
3098
|
+
size="small"
|
|
3099
|
+
name-position="beside"
|
|
3100
|
+
></icon-view>
|
|
3101
|
+
</div>
|
|
3102
|
+
</div>
|
|
3103
|
+
`;
|
|
3104
|
+
}
|
|
3105
|
+
_renderContractAddress() {
|
|
3106
|
+
const data = this._resolutionTask.value;
|
|
3107
|
+
return html14`
|
|
3108
|
+
<div class="section">
|
|
3109
|
+
${when3(
|
|
3110
|
+
data.lsp4TokenSymbol,
|
|
3111
|
+
() => html14`
|
|
3112
|
+
<address-view
|
|
3113
|
+
address=${data.address}
|
|
3114
|
+
size="medium"
|
|
3115
|
+
label=${data.lsp4TokenName}
|
|
3116
|
+
max-width=${100}
|
|
3117
|
+
.showIdenticon=${false}
|
|
3118
|
+
?is-card-view=${true}
|
|
3119
|
+
?show-copy-button=${true}
|
|
3120
|
+
address-color="neutral-60"
|
|
3121
|
+
></address-view>
|
|
3122
|
+
`
|
|
3123
|
+
)}
|
|
3124
|
+
</div>
|
|
3125
|
+
`;
|
|
3126
|
+
}
|
|
3127
|
+
_renderAssetLongName() {
|
|
3128
|
+
const data = this._resolutionTask.value;
|
|
3129
|
+
return html14`
|
|
3130
|
+
${when3(
|
|
3131
|
+
data?.lsp4TokenName,
|
|
3132
|
+
() => html14`
|
|
3133
|
+
<value-view
|
|
3134
|
+
?is-card-view=${true}
|
|
3135
|
+
?show-copy-button=${true}
|
|
3136
|
+
value=${data.lsp4TokenName}
|
|
3137
|
+
label="Token Name"
|
|
3138
|
+
></value-view>
|
|
3139
|
+
`
|
|
3140
|
+
)}
|
|
3141
|
+
`;
|
|
3142
|
+
}
|
|
3143
|
+
_renderAssetSymbol() {
|
|
3144
|
+
const data = this._resolutionTask.value;
|
|
3145
|
+
return html14`
|
|
3146
|
+
${when3(
|
|
3147
|
+
data?.lsp4TokenSymbol,
|
|
3148
|
+
() => html14`
|
|
3149
|
+
<value-view
|
|
3150
|
+
?is-card-view=${true}
|
|
3151
|
+
?show-copy-button=${true}
|
|
3152
|
+
value=${data.lsp4TokenSymbol}
|
|
3153
|
+
label="Symbol"
|
|
3154
|
+
></value-view>
|
|
3155
|
+
`
|
|
3156
|
+
)}
|
|
3157
|
+
`;
|
|
3158
|
+
}
|
|
3159
|
+
get displayedTokenId() {
|
|
3160
|
+
const formattedTokenId = this._resolvedData?.formattedTokenId;
|
|
3161
|
+
const displayTokenId = formattedTokenId ? `${formattedTokenId}` : "";
|
|
3162
|
+
if (displayTokenId) return displayTokenId;
|
|
3163
|
+
return this.tokenId && !this._resolvedData?.isCollection ? `${parseInt(this.tokenId, 16)}` : void 0;
|
|
3164
|
+
}
|
|
3165
|
+
_renderTokenId() {
|
|
3166
|
+
const displayTokenId = this.displayedTokenId;
|
|
3167
|
+
if (!displayTokenId) return "";
|
|
3168
|
+
return html14`
|
|
3169
|
+
<value-view
|
|
3170
|
+
?is-card-view=${true}
|
|
3171
|
+
?show-copy-button=${true}
|
|
3172
|
+
value=${displayTokenId}
|
|
3173
|
+
label="Token ID"
|
|
3174
|
+
></value-view>
|
|
3175
|
+
`;
|
|
3176
|
+
}
|
|
3177
|
+
_renderDescription() {
|
|
3178
|
+
const description = this._resolvedData?.description;
|
|
3179
|
+
if (!description) return "";
|
|
3180
|
+
return html14`
|
|
3181
|
+
<value-view
|
|
3182
|
+
?is-card-view=${true}
|
|
3183
|
+
?show-copy-button=${true}
|
|
3184
|
+
value=${description}
|
|
3185
|
+
label="Description"
|
|
3186
|
+
>
|
|
3187
|
+
</value-view>
|
|
3188
|
+
`;
|
|
3189
|
+
}
|
|
3190
|
+
_renderLinks() {
|
|
3191
|
+
const links = this._resolvedData?.links || [];
|
|
3192
|
+
if (!links.length) return "";
|
|
3193
|
+
return html14`
|
|
3194
|
+
<div class="section">
|
|
3195
|
+
<div class="section-title">🔗 Links</div>
|
|
3196
|
+
<ul class="links-list">
|
|
3197
|
+
${repeat3(
|
|
3198
|
+
links,
|
|
3199
|
+
(link) => link.url,
|
|
3200
|
+
(link) => html14`
|
|
3201
|
+
<li class="link-item">
|
|
3202
|
+
<a
|
|
3203
|
+
class="external-link"
|
|
3204
|
+
href="${link.url}"
|
|
3205
|
+
target="_blank"
|
|
3206
|
+
rel="noopener noreferrer"
|
|
3207
|
+
>
|
|
3208
|
+
${link.title || link.url}
|
|
3209
|
+
<span>↗</span>
|
|
3210
|
+
</a>
|
|
3211
|
+
</li>
|
|
3212
|
+
`
|
|
3213
|
+
)}
|
|
3214
|
+
</ul>
|
|
3215
|
+
</div>
|
|
3216
|
+
`;
|
|
3217
|
+
}
|
|
3218
|
+
_renderImages() {
|
|
3219
|
+
const images = this._resolvedData?.images || [];
|
|
3220
|
+
if (images.length === 0) return "";
|
|
3221
|
+
return html14`
|
|
3222
|
+
<image-list
|
|
3223
|
+
address=${this.address}
|
|
3224
|
+
image-hint="images"
|
|
3225
|
+
size="medium"
|
|
3226
|
+
?is-card-view=${true}
|
|
3227
|
+
></image-list>
|
|
3228
|
+
`;
|
|
3229
|
+
}
|
|
3230
|
+
_renderAssets() {
|
|
3231
|
+
const assets = this._resolvedData?.assets || [];
|
|
3232
|
+
if (assets.length === 0) return "";
|
|
3233
|
+
return html14`
|
|
3234
|
+
<div class="section">
|
|
3235
|
+
<div class="section-title">Assets</div>
|
|
3236
|
+
<image-list
|
|
3237
|
+
address=${this.address}
|
|
3238
|
+
image-hint="assets"
|
|
3239
|
+
size="medium"
|
|
3240
|
+
></image-list>
|
|
3241
|
+
</div>
|
|
3242
|
+
`;
|
|
3243
|
+
}
|
|
3244
|
+
_renderStandards() {
|
|
3245
|
+
return html14`
|
|
3246
|
+
<div class="flex justify-between items-center my-4">
|
|
3247
|
+
<function-name-view
|
|
3248
|
+
label=${this.functionName}
|
|
3249
|
+
size="small"
|
|
3250
|
+
icon=${this.functionIcon ? this.functionIcon : "code-outline"}
|
|
3251
|
+
></function-name-view>
|
|
3252
|
+
<function-name-view label=${this._resolvedData?.standard} size="small"></function-name-view>
|
|
3253
|
+
</div>
|
|
3254
|
+
`;
|
|
3255
|
+
}
|
|
3256
|
+
_renderTokenDetails() {
|
|
3257
|
+
if (!this.displayDetails) return "";
|
|
3258
|
+
return html14`
|
|
3259
|
+
<div class="p-4 mt-6 flex flex-col border border-neutral-90 rounded-xl gap-4">
|
|
3260
|
+
${this._renderContractAddress()}
|
|
3261
|
+
${this._renderAssetLongName()}
|
|
3262
|
+
${this._renderAssetSymbol()}
|
|
3263
|
+
${this._renderTokenId()}
|
|
3264
|
+
${this._renderDescription()}
|
|
3265
|
+
${this._renderLinks()}
|
|
3266
|
+
${this._renderImages()}
|
|
3267
|
+
${this._renderAssets()}
|
|
3268
|
+
</div>
|
|
3269
|
+
`;
|
|
3270
|
+
}
|
|
3271
|
+
renderFormattedTokenIdBadge() {
|
|
3272
|
+
if (!this.displayedTokenId) return "";
|
|
3273
|
+
return html14`
|
|
3274
|
+
<span class="absolute top-3 left-3 z-10 text-[12px] text-neutral-20 font-mono font-bold bg-neutral-98 px-2 rounded-full">#${this.displayedTokenId}</span>
|
|
3275
|
+
`;
|
|
3276
|
+
}
|
|
3277
|
+
render() {
|
|
3278
|
+
return html14`
|
|
3279
|
+
<div >
|
|
3280
|
+
${this._renderStandards()}
|
|
3281
|
+
<div class="mt-6 flex-col">
|
|
3282
|
+
<div class="flex items-center justify-center gap-4">
|
|
3283
|
+
<div class="flex justify-end w-[48%]">
|
|
3284
|
+
<div class="border relative border-neutral-90 rounded-xl">
|
|
3285
|
+
${this.renderFormattedTokenIdBadge()}
|
|
3286
|
+
<div class="p-2 relative">
|
|
3287
|
+
<icon-view
|
|
3288
|
+
address="${this.address}"
|
|
3289
|
+
size="2x-large"
|
|
3290
|
+
.showName=${false}
|
|
3291
|
+
></icon-view>
|
|
3292
|
+
</div>
|
|
3293
|
+
<div style="height: 1px;" class="bg-neutral-90 w-full"></div>
|
|
3294
|
+
<div class="px-2">
|
|
3295
|
+
${this._renderAddressSection()}
|
|
3296
|
+
</div>
|
|
3297
|
+
</div>
|
|
3298
|
+
</div>
|
|
3299
|
+
|
|
3300
|
+
<div class="flex flex-col gap-1 w-[51%]">
|
|
3301
|
+
<div class="text-[14px] font-bold text-neutral-20">
|
|
3302
|
+
${this._resolvedData?.lsp4TokenName || "UNKNOWN"}
|
|
3303
|
+
</div>
|
|
3304
|
+
<div class="text-[17px] font-semibold text-neutral-20">
|
|
3305
|
+
${when3(
|
|
3306
|
+
this.amount,
|
|
3307
|
+
() => html14`
|
|
3308
|
+
<span class="">${formatUnits2(BigInt(this.amount), this._resolvedData?.decimals)}</span>
|
|
3309
|
+
<span class="ml-1 text-neutral-60 max-w-[60px] whitespace-nowrap overflow-hidden text-ellipsis text-[14px] font-semibold">${this._resolvedData?.lsp4TokenSymbol || ""}</span>
|
|
3310
|
+
`,
|
|
3311
|
+
() => html14`${this._resolvedData?.lsp4TokenSymbol || ""}`
|
|
3312
|
+
)}
|
|
3313
|
+
</div>
|
|
3314
|
+
|
|
3315
|
+
${when3(
|
|
3316
|
+
this.displayedTokenId,
|
|
3317
|
+
() => html14`<div class="text-[14px] font-medium text-neutral-60"><span class="font-bold">#${this.displayedTokenId}</span></div>`
|
|
3318
|
+
)}
|
|
3319
|
+
<div class="mt-4">
|
|
3320
|
+
${when3(this.showCreator, () => this._renderCreatorSection())}
|
|
3321
|
+
</div>
|
|
3322
|
+
</div>
|
|
3323
|
+
</div>
|
|
3324
|
+
<div class="border-neutral-90 pt-2">
|
|
3325
|
+
${this._renderTokenDetails()}
|
|
3326
|
+
</div>
|
|
3327
|
+
</div>
|
|
3328
|
+
`;
|
|
3329
|
+
}
|
|
3330
|
+
};
|
|
3331
|
+
__decorateClass([
|
|
3332
|
+
property14()
|
|
3333
|
+
], AssetCard.prototype, "address", 2);
|
|
3334
|
+
__decorateClass([
|
|
3335
|
+
property14({ type: String, attribute: "token-id" })
|
|
3336
|
+
], AssetCard.prototype, "tokenId", 2);
|
|
3337
|
+
__decorateClass([
|
|
3338
|
+
property14({ type: String })
|
|
3339
|
+
], AssetCard.prototype, "amount", 2);
|
|
3340
|
+
__decorateClass([
|
|
3341
|
+
property14({ type: String, attribute: "function-name" })
|
|
3342
|
+
], AssetCard.prototype, "functionName", 2);
|
|
3343
|
+
__decorateClass([
|
|
3344
|
+
property14({ type: String, attribute: "standard" })
|
|
3345
|
+
], AssetCard.prototype, "standard", 2);
|
|
3346
|
+
__decorateClass([
|
|
3347
|
+
property14({ type: String, attribute: "function-icon" })
|
|
3348
|
+
], AssetCard.prototype, "functionIcon", 2);
|
|
3349
|
+
__decorateClass([
|
|
3350
|
+
property14({ type: String })
|
|
3351
|
+
], AssetCard.prototype, "size", 2);
|
|
3352
|
+
__decorateClass([
|
|
3353
|
+
property14({ type: Boolean, attribute: "show-info-button" })
|
|
3354
|
+
], AssetCard.prototype, "showInfoButton", 2);
|
|
3355
|
+
__decorateClass([
|
|
3356
|
+
property14({ type: Boolean, attribute: "show-creator" })
|
|
3357
|
+
], AssetCard.prototype, "showCreator", 2);
|
|
3358
|
+
__decorateClass([
|
|
3359
|
+
state11()
|
|
3360
|
+
], AssetCard.prototype, "displayDetails", 2);
|
|
3361
|
+
__decorateClass([
|
|
3362
|
+
state11()
|
|
3363
|
+
], AssetCard.prototype, "_resolvedData", 2);
|
|
3364
|
+
__decorateClass([
|
|
3365
|
+
state11()
|
|
3366
|
+
], AssetCard.prototype, "_imageError", 2);
|
|
3367
|
+
AssetCard = __decorateClass([
|
|
3368
|
+
safeCustomElement("asset-card")
|
|
3369
|
+
], AssetCard);
|
|
3370
|
+
|
|
3371
|
+
// src/components/description-view.ts
|
|
3372
|
+
import { css as css5, html as html15, LitElement as LitElement4 } from "lit";
|
|
3373
|
+
import { property as property15 } from "lit/decorators.js";
|
|
3374
|
+
import { repeat as repeat4 } from "lit/directives/repeat.js";
|
|
3375
|
+
import { when as when4 } from "lit/directives/when.js";
|
|
3376
|
+
var DescriptionView = class extends LitElement4 {
|
|
3377
|
+
constructor() {
|
|
3378
|
+
super(...arguments);
|
|
3379
|
+
this.data = {};
|
|
3380
|
+
this.variant = "default";
|
|
3381
|
+
}
|
|
3382
|
+
_copyToClipboard(text) {
|
|
3383
|
+
if (navigator.clipboard) {
|
|
3384
|
+
navigator.clipboard.writeText(text);
|
|
3385
|
+
this.dispatchEvent(
|
|
3386
|
+
new CustomEvent("copied", {
|
|
3387
|
+
detail: { text }
|
|
3388
|
+
})
|
|
3389
|
+
);
|
|
3390
|
+
}
|
|
3391
|
+
}
|
|
3392
|
+
_handleItemClick(item) {
|
|
3393
|
+
if (item.link) {
|
|
3394
|
+
window.open(item.link, "_blank", "noopener,noreferrer");
|
|
3395
|
+
}
|
|
3396
|
+
this.dispatchEvent(
|
|
3397
|
+
new CustomEvent("item-click", {
|
|
3398
|
+
detail: { item }
|
|
3399
|
+
})
|
|
3400
|
+
);
|
|
3401
|
+
}
|
|
3402
|
+
_renderHeader() {
|
|
3403
|
+
if (!this.data.title && !this.data.description && !this.data.type) return "";
|
|
3404
|
+
return html15`
|
|
3405
|
+
<div class="header">
|
|
3406
|
+
${when4(
|
|
3407
|
+
this.data.title,
|
|
3408
|
+
() => html15`
|
|
3409
|
+
<h2 class="title">
|
|
3410
|
+
${this.data.title}
|
|
3411
|
+
${when4(
|
|
3412
|
+
this.data.type,
|
|
3413
|
+
() => html15`
|
|
3414
|
+
<span class="type-badge ${this.data.type}">
|
|
3415
|
+
${this.data.type}
|
|
3416
|
+
</span>
|
|
3417
|
+
`
|
|
3418
|
+
)}
|
|
3419
|
+
</h2>
|
|
3420
|
+
`
|
|
3421
|
+
)}
|
|
3422
|
+
|
|
3423
|
+
${when4(
|
|
3424
|
+
this.data.description,
|
|
3425
|
+
() => html15`
|
|
3426
|
+
<p class="description">${this.data.description}</p>
|
|
3427
|
+
`
|
|
3428
|
+
)}
|
|
3429
|
+
</div>
|
|
3430
|
+
`;
|
|
3431
|
+
}
|
|
3432
|
+
_renderItems() {
|
|
3433
|
+
const items = [];
|
|
3434
|
+
if (this.data.address) {
|
|
3435
|
+
const [contractAddress, tokenId] = this.data.address.split("-");
|
|
3436
|
+
items.push({
|
|
3437
|
+
label: "Contract Address",
|
|
3438
|
+
value: contractAddress,
|
|
3439
|
+
icon: "\u{1F4C4}",
|
|
3440
|
+
copyable: true
|
|
3441
|
+
});
|
|
3442
|
+
if (tokenId) {
|
|
3443
|
+
items.push({
|
|
3444
|
+
label: "Token ID",
|
|
3445
|
+
value: `#${tokenId}`,
|
|
3446
|
+
subtitle: tokenId,
|
|
3447
|
+
icon: "\u{1F3F7}\uFE0F",
|
|
3448
|
+
copyable: true
|
|
3449
|
+
});
|
|
3450
|
+
}
|
|
3451
|
+
}
|
|
3452
|
+
if (this.data.value) {
|
|
3453
|
+
items.push({
|
|
3454
|
+
label: "Amount",
|
|
3455
|
+
value: this.data.value.toString(),
|
|
3456
|
+
icon: "\u{1F4B0}",
|
|
3457
|
+
highlighted: true
|
|
3458
|
+
});
|
|
3459
|
+
}
|
|
3460
|
+
if (this.data.transactionInfo) {
|
|
3461
|
+
const txInfo = this.data.transactionInfo;
|
|
3462
|
+
if (txInfo.hash) {
|
|
3463
|
+
items.push({
|
|
3464
|
+
label: "Transaction Hash",
|
|
3465
|
+
value: txInfo.hash,
|
|
3466
|
+
icon: "\u{1F517}",
|
|
3467
|
+
copyable: true
|
|
3468
|
+
});
|
|
3469
|
+
}
|
|
3470
|
+
if (txInfo.blockNumber) {
|
|
3471
|
+
items.push({
|
|
3472
|
+
label: "Block Number",
|
|
3473
|
+
value: txInfo.blockNumber.toString(),
|
|
3474
|
+
icon: "\u{1F9F1}"
|
|
3475
|
+
});
|
|
3476
|
+
}
|
|
3477
|
+
if (txInfo.status) {
|
|
3478
|
+
items.push({
|
|
3479
|
+
label: "Status",
|
|
3480
|
+
value: txInfo.status.charAt(0).toUpperCase() + txInfo.status.slice(1),
|
|
3481
|
+
icon: txInfo.status === "success" ? "\u2705" : txInfo.status === "failed" ? "\u274C" : "\u23F3",
|
|
3482
|
+
highlighted: txInfo.status !== "success"
|
|
3483
|
+
});
|
|
3484
|
+
}
|
|
3485
|
+
}
|
|
3486
|
+
if (this.data.enhancedInfo) {
|
|
3487
|
+
const info = this.data.enhancedInfo;
|
|
3488
|
+
if (info.name) {
|
|
3489
|
+
items.push({
|
|
3490
|
+
label: "Asset Name",
|
|
3491
|
+
value: info.name,
|
|
3492
|
+
icon: "\u{1F3F7}\uFE0F"
|
|
3493
|
+
});
|
|
3494
|
+
}
|
|
3495
|
+
if (info.standard) {
|
|
3496
|
+
items.push({
|
|
3497
|
+
label: "Standard",
|
|
3498
|
+
value: info.standard,
|
|
3499
|
+
icon: "\u{1F4CB}"
|
|
3500
|
+
});
|
|
3501
|
+
}
|
|
3502
|
+
}
|
|
3503
|
+
if (this.data.customItems?.length) {
|
|
3504
|
+
items.push(...this.data.customItems);
|
|
3505
|
+
}
|
|
3506
|
+
if (!items.length) return "";
|
|
3507
|
+
return html15`
|
|
3508
|
+
<div class="items-list">
|
|
3509
|
+
${repeat4(
|
|
3510
|
+
items,
|
|
3511
|
+
(item) => `${item.label}-${item.value}`,
|
|
3512
|
+
(item) => html15`
|
|
3513
|
+
<div
|
|
3514
|
+
class="description-item ${item.highlighted ? "highlighted" : ""} ${item.link ? "clickable" : ""}"
|
|
3515
|
+
@click=${item.link ? () => this._handleItemClick(item) : void 0}
|
|
3516
|
+
>
|
|
3517
|
+
<div class="item-label">
|
|
3518
|
+
${when4(
|
|
3519
|
+
item.icon,
|
|
3520
|
+
() => html15`<span class="item-icon">${item.icon}</span>`
|
|
3521
|
+
)}
|
|
3522
|
+
${item.label}
|
|
3523
|
+
</div>
|
|
3524
|
+
|
|
3525
|
+
<div class="item-value-section">
|
|
3526
|
+
<div class="item-value">
|
|
3527
|
+
${item.link ? html15`<a class="external-link" href="${item.link}" target="_blank" rel="noopener noreferrer">${item.value}</a>` : item.value}
|
|
3528
|
+
</div>
|
|
3529
|
+
${when4(
|
|
3530
|
+
item.subtitle,
|
|
3531
|
+
() => html15`<div class="item-subtitle">${item.subtitle}</div>`
|
|
3532
|
+
)}
|
|
3533
|
+
</div>
|
|
3534
|
+
|
|
3535
|
+
<div class="item-actions">
|
|
3536
|
+
${when4(
|
|
3537
|
+
item.copyable,
|
|
3538
|
+
() => html15`
|
|
3539
|
+
<button
|
|
3540
|
+
class="copy-button"
|
|
3541
|
+
@click=${(e) => {
|
|
3542
|
+
e.stopPropagation();
|
|
3543
|
+
this._copyToClipboard(item.value);
|
|
3544
|
+
}}
|
|
3545
|
+
title="Copy to clipboard"
|
|
3546
|
+
>
|
|
3547
|
+
📋
|
|
3548
|
+
</button>
|
|
3549
|
+
`
|
|
3550
|
+
)}
|
|
3551
|
+
</div>
|
|
3552
|
+
</div>
|
|
3553
|
+
`
|
|
3554
|
+
)}
|
|
3555
|
+
</div>
|
|
3556
|
+
`;
|
|
3557
|
+
}
|
|
3558
|
+
render() {
|
|
3559
|
+
if (this.data.loading) {
|
|
3560
|
+
return html15`
|
|
3561
|
+
<div class="description-container">
|
|
3562
|
+
<div class="loading-state">
|
|
3563
|
+
<div class="loading-spinner">⏳</div>
|
|
3564
|
+
<div class="loading-text">Loading details...</div>
|
|
3565
|
+
</div>
|
|
3566
|
+
</div>
|
|
3567
|
+
`;
|
|
3568
|
+
}
|
|
3569
|
+
return html15`
|
|
3570
|
+
<div class="${this.variant} description-view">
|
|
3571
|
+
<div class="description-container">
|
|
3572
|
+
${this._renderHeader()}
|
|
3573
|
+
${this._renderItems()}
|
|
3574
|
+
</div>
|
|
3575
|
+
</div>
|
|
3576
|
+
`;
|
|
3577
|
+
}
|
|
3578
|
+
};
|
|
3579
|
+
DescriptionView.styles = css5`
|
|
3580
|
+
:host {
|
|
3581
|
+
display: block;
|
|
3582
|
+
font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
|
|
3583
|
+
}
|
|
3584
|
+
|
|
3585
|
+
.description-container {
|
|
3586
|
+
background: white;
|
|
3587
|
+
border-radius: 12px;
|
|
3588
|
+
padding: 16px;
|
|
3589
|
+
border: 1px solid #e5e7eb;
|
|
3590
|
+
}
|
|
3591
|
+
|
|
3592
|
+
.compact .description-container {
|
|
3593
|
+
padding: 12px;
|
|
3594
|
+
border-radius: 8px;
|
|
3595
|
+
}
|
|
3596
|
+
|
|
3597
|
+
.detailed .description-container {
|
|
3598
|
+
padding: 20px;
|
|
3599
|
+
border-radius: 16px;
|
|
3600
|
+
}
|
|
3601
|
+
|
|
3602
|
+
.header {
|
|
3603
|
+
margin-bottom: 16px;
|
|
3604
|
+
}
|
|
3605
|
+
|
|
3606
|
+
.compact .header {
|
|
3607
|
+
margin-bottom: 12px;
|
|
3608
|
+
}
|
|
3609
|
+
|
|
3610
|
+
.detailed .header {
|
|
3611
|
+
margin-bottom: 20px;
|
|
3612
|
+
}
|
|
3613
|
+
|
|
3614
|
+
.title {
|
|
3615
|
+
font-size: 16px;
|
|
3616
|
+
font-weight: 600;
|
|
3617
|
+
color: #111827;
|
|
3618
|
+
margin: 0 0 8px 0;
|
|
3619
|
+
display: flex;
|
|
3620
|
+
align-items: center;
|
|
3621
|
+
gap: 8px;
|
|
3622
|
+
}
|
|
3623
|
+
|
|
3624
|
+
.compact .title {
|
|
3625
|
+
font-size: 14px;
|
|
3626
|
+
margin-bottom: 6px;
|
|
3627
|
+
}
|
|
3628
|
+
|
|
3629
|
+
.detailed .title {
|
|
3630
|
+
font-size: 18px;
|
|
3631
|
+
margin-bottom: 12px;
|
|
3632
|
+
}
|
|
3633
|
+
|
|
3634
|
+
.type-badge {
|
|
3635
|
+
display: inline-flex;
|
|
3636
|
+
align-items: center;
|
|
3637
|
+
padding: 4px 8px;
|
|
3638
|
+
border-radius: 12px;
|
|
3639
|
+
font-size: 11px;
|
|
3640
|
+
font-weight: 600;
|
|
3641
|
+
text-transform: uppercase;
|
|
3642
|
+
letter-spacing: 0.5px;
|
|
3643
|
+
}
|
|
3644
|
+
|
|
3645
|
+
.type-badge.transfer {
|
|
3646
|
+
background: #dbeafe;
|
|
3647
|
+
color: #1d4ed8;
|
|
3648
|
+
}
|
|
3649
|
+
|
|
3650
|
+
.type-badge.mint {
|
|
3651
|
+
background: #d1fae5;
|
|
3652
|
+
color: #059669;
|
|
3653
|
+
}
|
|
3654
|
+
|
|
3655
|
+
.type-badge.burn {
|
|
3656
|
+
background: #fee2e2;
|
|
3657
|
+
color: #dc2626;
|
|
3658
|
+
}
|
|
3659
|
+
|
|
3660
|
+
.type-badge.approve {
|
|
3661
|
+
background: #fef3c7;
|
|
3662
|
+
color: #d97706;
|
|
3663
|
+
}
|
|
3664
|
+
|
|
3665
|
+
.type-badge.execute {
|
|
3666
|
+
background: #e0e7ff;
|
|
3667
|
+
color: #4338ca;
|
|
3668
|
+
}
|
|
3669
|
+
|
|
3670
|
+
.type-badge.deploy {
|
|
3671
|
+
background: #f3e8ff;
|
|
3672
|
+
color: #7c3aed;
|
|
3673
|
+
}
|
|
3674
|
+
|
|
3675
|
+
.description {
|
|
3676
|
+
font-size: 14px;
|
|
3677
|
+
line-height: 1.5;
|
|
3678
|
+
color: #6b7280;
|
|
3679
|
+
margin: 0;
|
|
3680
|
+
}
|
|
3681
|
+
|
|
3682
|
+
.compact .description {
|
|
3683
|
+
font-size: 13px;
|
|
3684
|
+
}
|
|
3685
|
+
|
|
3686
|
+
.detailed .description {
|
|
3687
|
+
font-size: 15px;
|
|
3688
|
+
line-height: 1.6;
|
|
3689
|
+
}
|
|
3690
|
+
|
|
3691
|
+
.items-list {
|
|
3692
|
+
display: flex;
|
|
3693
|
+
flex-direction: column;
|
|
3694
|
+
gap: 12px;
|
|
3695
|
+
margin-top: 16px;
|
|
3696
|
+
}
|
|
3697
|
+
|
|
3698
|
+
.compact .items-list {
|
|
3699
|
+
gap: 8px;
|
|
3700
|
+
margin-top: 12px;
|
|
3701
|
+
}
|
|
3702
|
+
|
|
3703
|
+
.detailed .items-list {
|
|
3704
|
+
gap: 16px;
|
|
3705
|
+
margin-top: 20px;
|
|
3706
|
+
}
|
|
3707
|
+
|
|
3708
|
+
.description-item {
|
|
3709
|
+
display: flex;
|
|
3710
|
+
justify-content: space-between;
|
|
3711
|
+
align-items: flex-start;
|
|
3712
|
+
padding: 12px;
|
|
3713
|
+
background: #f9fafb;
|
|
3714
|
+
border-radius: 8px;
|
|
3715
|
+
border: 1px solid #e5e7eb;
|
|
3716
|
+
transition: all 0.2s ease;
|
|
3717
|
+
}
|
|
3718
|
+
|
|
3719
|
+
.compact .description-item {
|
|
3720
|
+
padding: 8px;
|
|
3721
|
+
border-radius: 6px;
|
|
3722
|
+
}
|
|
3723
|
+
|
|
3724
|
+
.detailed .description-item {
|
|
3725
|
+
padding: 16px;
|
|
3726
|
+
border-radius: 12px;
|
|
3727
|
+
}
|
|
3728
|
+
|
|
3729
|
+
.description-item.highlighted {
|
|
3730
|
+
background: #eff6ff;
|
|
3731
|
+
border-color: #3b82f6;
|
|
3732
|
+
box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.1);
|
|
3733
|
+
}
|
|
3734
|
+
|
|
3735
|
+
.description-item.clickable {
|
|
3736
|
+
cursor: pointer;
|
|
3737
|
+
}
|
|
3738
|
+
|
|
3739
|
+
.description-item.clickable:hover {
|
|
3740
|
+
background: #f3f4f6;
|
|
3741
|
+
border-color: #d1d5db;
|
|
3742
|
+
}
|
|
3743
|
+
|
|
3744
|
+
.description-item.highlighted.clickable:hover {
|
|
3745
|
+
background: #dbeafe;
|
|
3746
|
+
}
|
|
3747
|
+
|
|
3748
|
+
.item-label {
|
|
3749
|
+
display: flex;
|
|
3750
|
+
align-items: center;
|
|
3751
|
+
gap: 8px;
|
|
3752
|
+
font-size: 13px;
|
|
3753
|
+
font-weight: 500;
|
|
3754
|
+
color: #374151;
|
|
3755
|
+
flex-shrink: 0;
|
|
3756
|
+
min-width: 0;
|
|
3757
|
+
}
|
|
3758
|
+
|
|
3759
|
+
.compact .item-label {
|
|
3760
|
+
font-size: 12px;
|
|
3761
|
+
gap: 6px;
|
|
3762
|
+
}
|
|
3763
|
+
|
|
3764
|
+
.detailed .item-label {
|
|
3765
|
+
font-size: 14px;
|
|
3766
|
+
}
|
|
3767
|
+
|
|
3768
|
+
.item-icon {
|
|
3769
|
+
font-size: 14px;
|
|
3770
|
+
flex-shrink: 0;
|
|
3771
|
+
}
|
|
3772
|
+
|
|
3773
|
+
.item-value-section {
|
|
3774
|
+
display: flex;
|
|
3775
|
+
flex-direction: column;
|
|
3776
|
+
align-items: flex-end;
|
|
3777
|
+
gap: 4px;
|
|
3778
|
+
min-width: 0;
|
|
3779
|
+
flex: 1;
|
|
3780
|
+
margin-left: 12px;
|
|
3781
|
+
}
|
|
3782
|
+
|
|
3783
|
+
.item-value {
|
|
3784
|
+
font-size: 14px;
|
|
3785
|
+
font-weight: 500;
|
|
3786
|
+
color: #111827;
|
|
3787
|
+
word-break: break-all;
|
|
3788
|
+
text-align: right;
|
|
3789
|
+
}
|
|
3790
|
+
|
|
3791
|
+
.compact .item-value {
|
|
3792
|
+
font-size: 13px;
|
|
3793
|
+
}
|
|
3794
|
+
|
|
3795
|
+
.detailed .item-value {
|
|
3796
|
+
font-size: 15px;
|
|
3797
|
+
}
|
|
3798
|
+
|
|
3799
|
+
.item-subtitle {
|
|
3800
|
+
font-size: 12px;
|
|
3801
|
+
color: #6b7280;
|
|
3802
|
+
text-align: right;
|
|
3803
|
+
}
|
|
3804
|
+
|
|
3805
|
+
.compact .item-subtitle {
|
|
3806
|
+
font-size: 11px;
|
|
3807
|
+
}
|
|
3808
|
+
|
|
3809
|
+
.item-actions {
|
|
3810
|
+
display: flex;
|
|
3811
|
+
align-items: center;
|
|
3812
|
+
gap: 4px;
|
|
3813
|
+
margin-left: 8px;
|
|
3814
|
+
}
|
|
3815
|
+
|
|
3816
|
+
.copy-button {
|
|
3817
|
+
background: none;
|
|
3818
|
+
border: none;
|
|
3819
|
+
cursor: pointer;
|
|
3820
|
+
padding: 4px;
|
|
3821
|
+
border-radius: 4px;
|
|
3822
|
+
color: #6b7280;
|
|
3823
|
+
transition: all 0.2s ease;
|
|
3824
|
+
font-size: 14px;
|
|
3825
|
+
}
|
|
3826
|
+
|
|
3827
|
+
.copy-button:hover {
|
|
3828
|
+
background-color: #e5e7eb;
|
|
3829
|
+
color: #374151;
|
|
3830
|
+
}
|
|
3831
|
+
|
|
3832
|
+
.external-link {
|
|
3833
|
+
color: #3b82f6;
|
|
3834
|
+
text-decoration: none;
|
|
3835
|
+
font-size: 14px;
|
|
3836
|
+
}
|
|
3837
|
+
|
|
3838
|
+
.external-link:hover {
|
|
3839
|
+
text-decoration: underline;
|
|
3840
|
+
}
|
|
3841
|
+
|
|
3842
|
+
.loading-state {
|
|
3843
|
+
display: flex;
|
|
3844
|
+
flex-direction: column;
|
|
3845
|
+
align-items: center;
|
|
3846
|
+
justify-content: center;
|
|
3847
|
+
padding: 40px 20px;
|
|
3848
|
+
color: #6b7280;
|
|
3849
|
+
}
|
|
3850
|
+
|
|
3851
|
+
.loading-spinner {
|
|
3852
|
+
font-size: 24px;
|
|
3853
|
+
margin-bottom: 12px;
|
|
3854
|
+
}
|
|
3855
|
+
|
|
3856
|
+
.loading-text {
|
|
3857
|
+
font-size: 14px;
|
|
3858
|
+
}
|
|
3859
|
+
`;
|
|
3860
|
+
__decorateClass([
|
|
3861
|
+
property15({ type: Object })
|
|
3862
|
+
], DescriptionView.prototype, "data", 2);
|
|
3863
|
+
__decorateClass([
|
|
3864
|
+
property15({ type: String })
|
|
3865
|
+
], DescriptionView.prototype, "variant", 2);
|
|
3866
|
+
DescriptionView = __decorateClass([
|
|
3867
|
+
safeCustomElement("description-view")
|
|
3868
|
+
], DescriptionView);
|
|
3869
|
+
|
|
3870
|
+
// src/components/universal-token-view.ts
|
|
3871
|
+
import { css as css6, html as html16, LitElement as LitElement5 } from "lit";
|
|
3872
|
+
import { property as property16, state as state12 } from "lit/decorators.js";
|
|
3873
|
+
import { when as when5 } from "lit/directives/when.js";
|
|
3874
|
+
var UniversalTokenView = class extends LitElement5 {
|
|
3875
|
+
constructor() {
|
|
3876
|
+
super(...arguments);
|
|
3877
|
+
this.data = {};
|
|
3878
|
+
this._infoPanelOpen = false;
|
|
3879
|
+
}
|
|
3880
|
+
_handleInfoPanelToggle() {
|
|
3881
|
+
this._infoPanelOpen = !this._infoPanelOpen;
|
|
3882
|
+
}
|
|
3883
|
+
_handleInfoPanelClose() {
|
|
3884
|
+
this._infoPanelOpen = false;
|
|
3885
|
+
}
|
|
3886
|
+
_buildAssetCardData() {
|
|
3887
|
+
const [contractAddress, tokenId] = (this.data.address || "").split("-");
|
|
3888
|
+
return {
|
|
3889
|
+
name: this.data.enhancedInfo?.name,
|
|
3890
|
+
symbol: this.data.enhancedInfo?.symbol || this.data.enhancedInfo?.lsp4TokenSymbol,
|
|
3891
|
+
icon: this.data.enhancedInfo?.icon || this.data.enhancedInfo?.images?.[0]?.url,
|
|
3892
|
+
address: contractAddress,
|
|
3893
|
+
tokenId,
|
|
3894
|
+
formattedTokenId: tokenId ? `${parseInt(tokenId, 16)}` : void 0,
|
|
3895
|
+
amount: this.data.value?.toString(),
|
|
3896
|
+
decimals: this.data.enhancedInfo?.decimals,
|
|
3897
|
+
loadingImages: this.data.loading?.asset,
|
|
3898
|
+
creator: this.data.enhancedInfo?.creator
|
|
3899
|
+
};
|
|
3900
|
+
}
|
|
3901
|
+
_renderLoadingState() {
|
|
3902
|
+
return html16`
|
|
3903
|
+
<div class="loading-state">
|
|
3904
|
+
<div class="loading-spinner">⏳</div>
|
|
3905
|
+
<div class="loading-text">Loading transaction details...</div>
|
|
3906
|
+
</div>
|
|
3907
|
+
`;
|
|
3908
|
+
}
|
|
3909
|
+
_renderErrorState(message) {
|
|
3910
|
+
return html16`
|
|
3911
|
+
<div class="error-state">
|
|
3912
|
+
<div class="error-icon">❌</div>
|
|
3913
|
+
<div class="error-title">Error Loading Transaction</div>
|
|
3914
|
+
<div class="error-message">${message}</div>
|
|
3915
|
+
</div>
|
|
3916
|
+
`;
|
|
3917
|
+
}
|
|
3918
|
+
render() {
|
|
3919
|
+
const isLoading = this.data.loading?.transaction || this.data.loading?.metadata && !this.data.enhancedInfo || this.data.loading?.asset && !this.data.address;
|
|
3920
|
+
if (isLoading) {
|
|
3921
|
+
return this._renderLoadingState();
|
|
3922
|
+
}
|
|
3923
|
+
if (!this.data.address && !this.data.enhancedInfo && !this.data.transaction) {
|
|
3924
|
+
return this._renderErrorState("No transaction data provided");
|
|
3925
|
+
}
|
|
3926
|
+
return html16`
|
|
3927
|
+
<div class="universal-view">
|
|
3928
|
+
<!-- Title wrapper with title and LSP tag - exact match -->
|
|
3929
|
+
<div class="title-wrapper">
|
|
3930
|
+
<div class="title-section">
|
|
3931
|
+
${when5(
|
|
3932
|
+
this.data.icon,
|
|
3933
|
+
() => html16`
|
|
3934
|
+
<svg class="title-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
3935
|
+
<path d="M7 16l-4-4 4-4M17 8l4 4-4 4" />
|
|
3936
|
+
</svg>
|
|
3937
|
+
`
|
|
3938
|
+
)}
|
|
3939
|
+
${this.data.title || "Transaction"}
|
|
3940
|
+
</div>
|
|
3941
|
+
${when5(
|
|
3942
|
+
this.data.standard,
|
|
3943
|
+
() => html16`<div class="lsp-tag">${this.data.standard}</div>`
|
|
3944
|
+
)}
|
|
3945
|
+
</div>
|
|
3946
|
+
|
|
3947
|
+
<!-- AssetCard replaces DigitalAssetInfo - exact same functionality -->
|
|
3948
|
+
<asset-card
|
|
3949
|
+
.data=${this._buildAssetCardData()}
|
|
3950
|
+
size="medium"
|
|
3951
|
+
?show-info-button=${true}
|
|
3952
|
+
@info-click=${this._handleInfoPanelToggle}
|
|
3953
|
+
></asset-card>
|
|
3954
|
+
|
|
3955
|
+
<!-- InfoPanel replaces BackPanelAsset with class="mt-4" spacing -->
|
|
3956
|
+
<info-panel
|
|
3957
|
+
class="info-panel"
|
|
3958
|
+
address=${this.data.address || ""}
|
|
3959
|
+
?open=${this._infoPanelOpen}
|
|
3960
|
+
standard=${this.data.standard || this.data.enhancedInfo?.standard || ""}
|
|
3961
|
+
type=${this.data.type || "transfer"}
|
|
3962
|
+
@close=${this._handleInfoPanelClose}
|
|
3963
|
+
></info-panel>
|
|
3964
|
+
</div>
|
|
3965
|
+
`;
|
|
3966
|
+
}
|
|
3967
|
+
};
|
|
3968
|
+
UniversalTokenView.styles = css6`
|
|
3969
|
+
:host {
|
|
3970
|
+
display: block;
|
|
3971
|
+
font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
|
|
3972
|
+
}
|
|
3973
|
+
|
|
3974
|
+
/* Match the original LSP7Transfer.vue structure exactly */
|
|
3975
|
+
.universal-view {
|
|
3976
|
+
padding: 16px; /* matches p-4 in Tailwind */
|
|
3977
|
+
}
|
|
3978
|
+
|
|
3979
|
+
/* Title wrapper - matches original layout */
|
|
3980
|
+
.title-wrapper {
|
|
3981
|
+
display: flex;
|
|
3982
|
+
justify-content: space-between;
|
|
3983
|
+
}
|
|
3984
|
+
|
|
3985
|
+
/* Title section with icon - replicates Title.vue */
|
|
3986
|
+
.title-section {
|
|
3987
|
+
display: flex;
|
|
3988
|
+
align-items: center;
|
|
3989
|
+
gap: 4px;
|
|
3990
|
+
font-size: 12px;
|
|
3991
|
+
font-weight: 500;
|
|
3992
|
+
color: var(--neutral-20, #374151);
|
|
3993
|
+
}
|
|
3994
|
+
|
|
3995
|
+
.title-icon {
|
|
3996
|
+
width: 16px;
|
|
3997
|
+
height: 16px;
|
|
3998
|
+
flex-shrink: 0;
|
|
3999
|
+
margin-right: 4px;
|
|
4000
|
+
}
|
|
4001
|
+
|
|
4002
|
+
/* LSP tag - matches original styling exactly */
|
|
4003
|
+
.lsp-tag {
|
|
4004
|
+
background: #eedde4;
|
|
4005
|
+
border-radius: 8px;
|
|
4006
|
+
height: 28px;
|
|
4007
|
+
padding: 8px;
|
|
4008
|
+
display: flex;
|
|
4009
|
+
align-items: center;
|
|
4010
|
+
justify-content: center;
|
|
4011
|
+
font-size: 12px;
|
|
4012
|
+
font-weight: 500;
|
|
4013
|
+
color: #374151;
|
|
4014
|
+
}
|
|
4015
|
+
|
|
4016
|
+
/* Info panel spacing - matches mt-4 */
|
|
4017
|
+
.info-panel {
|
|
4018
|
+
margin-top: 16px;
|
|
4019
|
+
}
|
|
4020
|
+
|
|
4021
|
+
.loading-state {
|
|
4022
|
+
display: flex;
|
|
4023
|
+
flex-direction: column;
|
|
4024
|
+
align-items: center;
|
|
4025
|
+
justify-content: center;
|
|
4026
|
+
padding: 60px 20px;
|
|
4027
|
+
color: #6b7280;
|
|
4028
|
+
}
|
|
4029
|
+
|
|
4030
|
+
.loading-spinner {
|
|
4031
|
+
font-size: 32px;
|
|
4032
|
+
margin-bottom: 16px;
|
|
4033
|
+
animation: spin 2s linear infinite;
|
|
4034
|
+
}
|
|
4035
|
+
|
|
4036
|
+
@keyframes spin {
|
|
4037
|
+
from { transform: rotate(0deg); }
|
|
4038
|
+
to { transform: rotate(360deg); }
|
|
4039
|
+
}
|
|
4040
|
+
|
|
4041
|
+
.loading-text {
|
|
4042
|
+
font-size: 16px;
|
|
4043
|
+
font-weight: 500;
|
|
4044
|
+
}
|
|
4045
|
+
|
|
4046
|
+
.error-state {
|
|
4047
|
+
display: flex;
|
|
4048
|
+
flex-direction: column;
|
|
4049
|
+
align-items: center;
|
|
4050
|
+
justify-content: center;
|
|
4051
|
+
padding: 60px 20px;
|
|
4052
|
+
color: #dc2626;
|
|
4053
|
+
background: #fef2f2;
|
|
4054
|
+
border: 1px solid #fecaca;
|
|
4055
|
+
border-radius: 12px;
|
|
4056
|
+
margin: 20px;
|
|
4057
|
+
}
|
|
4058
|
+
|
|
4059
|
+
.error-icon {
|
|
4060
|
+
font-size: 48px;
|
|
4061
|
+
margin-bottom: 16px;
|
|
4062
|
+
}
|
|
4063
|
+
|
|
4064
|
+
.error-title {
|
|
4065
|
+
font-size: 18px;
|
|
4066
|
+
font-weight: 600;
|
|
4067
|
+
margin-bottom: 8px;
|
|
4068
|
+
}
|
|
4069
|
+
|
|
4070
|
+
.error-message {
|
|
4071
|
+
font-size: 14px;
|
|
4072
|
+
text-align: center;
|
|
4073
|
+
line-height: 1.4;
|
|
4074
|
+
}
|
|
4075
|
+
`;
|
|
4076
|
+
__decorateClass([
|
|
4077
|
+
property16({ type: Object })
|
|
4078
|
+
], UniversalTokenView.prototype, "data", 2);
|
|
4079
|
+
__decorateClass([
|
|
4080
|
+
state12()
|
|
4081
|
+
], UniversalTokenView.prototype, "_infoPanelOpen", 2);
|
|
4082
|
+
UniversalTokenView = __decorateClass([
|
|
4083
|
+
safeCustomElement("universal-token-view")
|
|
4084
|
+
], UniversalTokenView);
|
|
4085
|
+
|
|
4086
|
+
// src/components/contract-card.ts
|
|
4087
|
+
import { Task as Task8 } from "@lit/task";
|
|
4088
|
+
import {
|
|
4089
|
+
useAddressResolver as useAddressResolver8,
|
|
4090
|
+
useImageLoader as useImageLoader4
|
|
4091
|
+
} from "@lukso/transaction-view-headless";
|
|
4092
|
+
import { css as css7, html as html17, LitElement as LitElement6 } from "lit";
|
|
4093
|
+
import { property as property17, state as state13 } from "lit/decorators.js";
|
|
4094
|
+
var ContractCard = class extends LitElement6 {
|
|
4095
|
+
constructor() {
|
|
4096
|
+
super(...arguments);
|
|
4097
|
+
this.variant = "basic";
|
|
4098
|
+
this.borderRadius = "medium";
|
|
4099
|
+
this.shadow = "large";
|
|
4100
|
+
this.isHoverable = false;
|
|
4101
|
+
this.hasOverlay = false;
|
|
4102
|
+
this.customClass = "";
|
|
4103
|
+
this.headerClass = "";
|
|
4104
|
+
this._resolutionTask = new Task8(this, {
|
|
4105
|
+
task: async ([address, resolved]) => {
|
|
4106
|
+
if (resolved) {
|
|
4107
|
+
this._resolvedData = resolved;
|
|
4108
|
+
return resolved;
|
|
4109
|
+
}
|
|
4110
|
+
const { resolveAddress } = useAddressResolver8();
|
|
4111
|
+
const baseAddress = this._extractBaseAddress(address);
|
|
4112
|
+
const data = await resolveAddress(baseAddress);
|
|
4113
|
+
this._resolvedData = data;
|
|
4114
|
+
return data;
|
|
4115
|
+
},
|
|
4116
|
+
args: () => [this.address, this.resolved]
|
|
4117
|
+
});
|
|
4118
|
+
this._profileImageTask = new Task8(this, {
|
|
4119
|
+
task: async ([resolved]) => {
|
|
4120
|
+
const { loadProfileImage } = useImageLoader4();
|
|
4121
|
+
const data = resolved || this._resolvedData;
|
|
4122
|
+
if (!data) return null;
|
|
4123
|
+
const image = await loadProfileImage(data, {
|
|
4124
|
+
width: 256,
|
|
4125
|
+
height: 256,
|
|
4126
|
+
dpr: window.devicePixelRatio || 1
|
|
4127
|
+
});
|
|
4128
|
+
if (image?.src) {
|
|
4129
|
+
this._profileImageUrl = image.src;
|
|
4130
|
+
}
|
|
4131
|
+
return image;
|
|
4132
|
+
},
|
|
4133
|
+
args: () => [this._resolvedData]
|
|
4134
|
+
});
|
|
4135
|
+
this._backgroundImageTask = new Task8(this, {
|
|
4136
|
+
task: async ([resolved]) => {
|
|
4137
|
+
const { loadBackgroundImage } = useImageLoader4();
|
|
4138
|
+
const data = resolved || this._resolvedData;
|
|
4139
|
+
if (!data) return null;
|
|
4140
|
+
const image = await loadBackgroundImage(data, {
|
|
4141
|
+
width: 800,
|
|
4142
|
+
height: 200,
|
|
4143
|
+
dpr: window.devicePixelRatio || 1
|
|
4144
|
+
});
|
|
4145
|
+
if (image?.src) {
|
|
4146
|
+
this._backgroundImageUrl = image.src;
|
|
4147
|
+
}
|
|
4148
|
+
return image;
|
|
4149
|
+
},
|
|
4150
|
+
args: () => [this._resolvedData]
|
|
4151
|
+
});
|
|
4152
|
+
}
|
|
4153
|
+
_extractBaseAddress(addressOrComposite) {
|
|
4154
|
+
return addressOrComposite.split("-")[0];
|
|
4155
|
+
}
|
|
4156
|
+
_handleClick() {
|
|
4157
|
+
this.dispatchEvent(
|
|
4158
|
+
new CustomEvent("address-click", {
|
|
4159
|
+
detail: {
|
|
4160
|
+
address: this.address,
|
|
4161
|
+
resolved: this._resolvedData
|
|
4162
|
+
},
|
|
4163
|
+
bubbles: true,
|
|
4164
|
+
composed: true
|
|
4165
|
+
})
|
|
4166
|
+
);
|
|
4167
|
+
}
|
|
4168
|
+
render() {
|
|
4169
|
+
const baseAddress = this._extractBaseAddress(this.address);
|
|
4170
|
+
const isEoa = !this._resolvedData?.__gqltype;
|
|
4171
|
+
return html17`
|
|
4172
|
+
<lukso-card
|
|
4173
|
+
variant="${this.variant}"
|
|
4174
|
+
border-radius="${this.borderRadius}"
|
|
4175
|
+
shadow="${this.shadow}"
|
|
4176
|
+
?is-hoverable="${this.isHoverable}"
|
|
4177
|
+
?has-overlay="${this.hasOverlay}"
|
|
4178
|
+
?is-eoa="${isEoa}"
|
|
4179
|
+
custom-class="${this.customClass}"
|
|
4180
|
+
header-class="${this.headerClass}"
|
|
4181
|
+
profile-url="${this._profileImageUrl || ""}"
|
|
4182
|
+
background-url="${this._backgroundImageUrl || ""}"
|
|
4183
|
+
profile-address="${baseAddress}"
|
|
4184
|
+
.width="${this.width}"
|
|
4185
|
+
.height="${this.height}"
|
|
4186
|
+
@click="${this._handleClick}"
|
|
4187
|
+
>
|
|
4188
|
+
<!-- Pass through all slots -->
|
|
4189
|
+
<slot name="header" slot="header"></slot>
|
|
4190
|
+
<slot name="content" slot="content"></slot>
|
|
4191
|
+
<slot name="bottom" slot="bottom"></slot>
|
|
4192
|
+
</lukso-card>
|
|
4193
|
+
`;
|
|
4194
|
+
}
|
|
4195
|
+
};
|
|
4196
|
+
ContractCard.styles = css7`
|
|
4197
|
+
:host {
|
|
4198
|
+
display: block;
|
|
4199
|
+
}
|
|
4200
|
+
`;
|
|
4201
|
+
__decorateClass([
|
|
4202
|
+
property17()
|
|
4203
|
+
], ContractCard.prototype, "address", 2);
|
|
4204
|
+
__decorateClass([
|
|
4205
|
+
property17({ type: Object })
|
|
4206
|
+
], ContractCard.prototype, "resolved", 2);
|
|
4207
|
+
__decorateClass([
|
|
4208
|
+
property17()
|
|
4209
|
+
], ContractCard.prototype, "variant", 2);
|
|
4210
|
+
__decorateClass([
|
|
4211
|
+
property17({ attribute: "border-radius" })
|
|
4212
|
+
], ContractCard.prototype, "borderRadius", 2);
|
|
4213
|
+
__decorateClass([
|
|
4214
|
+
property17()
|
|
4215
|
+
], ContractCard.prototype, "shadow", 2);
|
|
4216
|
+
__decorateClass([
|
|
4217
|
+
property17({ type: Number })
|
|
4218
|
+
], ContractCard.prototype, "width", 2);
|
|
4219
|
+
__decorateClass([
|
|
4220
|
+
property17({ type: Number })
|
|
4221
|
+
], ContractCard.prototype, "height", 2);
|
|
4222
|
+
__decorateClass([
|
|
4223
|
+
property17({ type: Boolean, attribute: "is-hoverable" })
|
|
4224
|
+
], ContractCard.prototype, "isHoverable", 2);
|
|
4225
|
+
__decorateClass([
|
|
4226
|
+
property17({ type: Boolean, attribute: "has-overlay" })
|
|
4227
|
+
], ContractCard.prototype, "hasOverlay", 2);
|
|
4228
|
+
__decorateClass([
|
|
4229
|
+
property17({ attribute: "custom-class" })
|
|
4230
|
+
], ContractCard.prototype, "customClass", 2);
|
|
4231
|
+
__decorateClass([
|
|
4232
|
+
property17({ attribute: "header-class" })
|
|
4233
|
+
], ContractCard.prototype, "headerClass", 2);
|
|
4234
|
+
__decorateClass([
|
|
4235
|
+
state13()
|
|
4236
|
+
], ContractCard.prototype, "_resolvedData", 2);
|
|
4237
|
+
__decorateClass([
|
|
4238
|
+
state13()
|
|
4239
|
+
], ContractCard.prototype, "_profileImageUrl", 2);
|
|
4240
|
+
__decorateClass([
|
|
4241
|
+
state13()
|
|
4242
|
+
], ContractCard.prototype, "_backgroundImageUrl", 2);
|
|
4243
|
+
ContractCard = __decorateClass([
|
|
4244
|
+
safeCustomElement("contract-card")
|
|
4245
|
+
], ContractCard);
|
|
4246
|
+
|
|
4247
|
+
// src/components/permissions-block.ts
|
|
4248
|
+
import { html as html18, nothing as nothing2 } from "lit";
|
|
4249
|
+
import { property as property18 } from "lit/decorators.js";
|
|
4250
|
+
var PermissionsBlock = class extends CoreLitElement {
|
|
4251
|
+
constructor() {
|
|
4252
|
+
super(...arguments);
|
|
4253
|
+
this.icon = "";
|
|
4254
|
+
this.actionIcon = "";
|
|
4255
|
+
this.color = "var(--neutral-60)";
|
|
4256
|
+
this.title = "";
|
|
4257
|
+
this.description = "";
|
|
4258
|
+
this.control = "";
|
|
4259
|
+
this.permissions = [];
|
|
4260
|
+
}
|
|
4261
|
+
render() {
|
|
4262
|
+
return html18`
|
|
4263
|
+
<div
|
|
4264
|
+
class="mb-6 p-4 bg-[var(--neutral-100)] border border-[var(--neutral-90)] rounded-lg"
|
|
4265
|
+
>
|
|
4266
|
+
<div class="flex items-center mb-2">
|
|
4267
|
+
${this.icon ? html18`<lukso-icon
|
|
4268
|
+
name=${this.icon}
|
|
4269
|
+
size="x-small"
|
|
4270
|
+
color=${this.color}
|
|
4271
|
+
></lukso-icon>` : nothing2}
|
|
4272
|
+
<div class="ml-2 heading-inter-14-bold">${this.title}</div>
|
|
4273
|
+
</div>
|
|
4274
|
+
|
|
4275
|
+
${this.description ? html18`<div class="text-[var(--neutral-40)] paragraph-inter-12-regular">
|
|
4276
|
+
${this.description}
|
|
4277
|
+
</div>` : nothing2}
|
|
4278
|
+
|
|
4279
|
+
<div class="h-px w-full bg-[var(--neutral-90)] mt-4"></div>
|
|
4280
|
+
|
|
4281
|
+
<slot></slot>
|
|
4282
|
+
|
|
4283
|
+
${(this.permissions || []).map((p) => this.renderPermission(p))}
|
|
4284
|
+
</div>
|
|
4285
|
+
`;
|
|
4286
|
+
}
|
|
4287
|
+
renderPermission(p) {
|
|
4288
|
+
const nameBase = (p.icon || p.permissionName || "").toLowerCase();
|
|
4289
|
+
const activeIcon = `${nameBase}-activated`;
|
|
4290
|
+
const inactiveIcon = `${nameBase}-inactive`;
|
|
4291
|
+
return html18`
|
|
4292
|
+
<div class="mt-4 grid grid-cols-[40px,1fr,20px] gap-x-2 items-start">
|
|
4293
|
+
<div class="relative w-10 h-10">
|
|
4294
|
+
<svg-icon
|
|
4295
|
+
class="active absolute bottom-0 opacity-0 z-[99] transition-opacity duration-200 ${p.isActive ? "opacity-100" : ""}"
|
|
4296
|
+
name=${activeIcon}
|
|
4297
|
+
width="40"
|
|
4298
|
+
height="40"
|
|
4299
|
+
color=${this.color}
|
|
4300
|
+
></svg-icon>
|
|
4301
|
+
<svg-icon
|
|
4302
|
+
class="inactive absolute bottom-0 ${p.isActive ? "opacity-0" : "opacity-100"}"
|
|
4303
|
+
name=${inactiveIcon}
|
|
4304
|
+
width="40"
|
|
4305
|
+
height="40"
|
|
4306
|
+
color=${this.color}
|
|
4307
|
+
></svg-icon>
|
|
4308
|
+
</div>
|
|
4309
|
+
|
|
4310
|
+
<div>
|
|
4311
|
+
<span class="paragraph-inter-12-semi-bold ">${p.type}</span>
|
|
4312
|
+
<div class="paragraph-inter-12-regular">${p.info}</div>
|
|
4313
|
+
</div>
|
|
4314
|
+
|
|
4315
|
+
${p.isActive ? html18`<lukso-icon
|
|
4316
|
+
name="complete-filled"
|
|
4317
|
+
width="20"
|
|
4318
|
+
height="20"
|
|
4319
|
+
secondary-color="neutral-100"
|
|
4320
|
+
color="green-54"
|
|
4321
|
+
stroke-width="1.5"
|
|
4322
|
+
></lukso-icon>` : html18`<lukso-icon
|
|
4323
|
+
name="cross-outline"
|
|
4324
|
+
width="20"
|
|
4325
|
+
height="20"
|
|
4326
|
+
color="red-65"
|
|
4327
|
+
stroke-width="1.5"
|
|
4328
|
+
></lukso-icon>`}
|
|
4329
|
+
</div>
|
|
4330
|
+
`;
|
|
4331
|
+
}
|
|
4332
|
+
};
|
|
4333
|
+
__decorateClass([
|
|
4334
|
+
property18({ type: String })
|
|
4335
|
+
], PermissionsBlock.prototype, "icon", 2);
|
|
4336
|
+
__decorateClass([
|
|
4337
|
+
property18({ type: String, attribute: "action-icon" })
|
|
4338
|
+
], PermissionsBlock.prototype, "actionIcon", 2);
|
|
4339
|
+
__decorateClass([
|
|
4340
|
+
property18({ type: String })
|
|
4341
|
+
], PermissionsBlock.prototype, "color", 2);
|
|
4342
|
+
__decorateClass([
|
|
4343
|
+
property18({ type: String })
|
|
4344
|
+
], PermissionsBlock.prototype, "title", 2);
|
|
4345
|
+
__decorateClass([
|
|
4346
|
+
property18({ type: String })
|
|
4347
|
+
], PermissionsBlock.prototype, "description", 2);
|
|
4348
|
+
__decorateClass([
|
|
4349
|
+
property18({ type: String })
|
|
4350
|
+
], PermissionsBlock.prototype, "control", 2);
|
|
4351
|
+
__decorateClass([
|
|
4352
|
+
property18({ type: Array })
|
|
4353
|
+
], PermissionsBlock.prototype, "permissions", 2);
|
|
4354
|
+
PermissionsBlock = __decorateClass([
|
|
4355
|
+
safeCustomElement("permissions-block")
|
|
4356
|
+
], PermissionsBlock);
|
|
4357
|
+
|
|
4358
|
+
// src/registry/index.ts
|
|
4359
|
+
import {
|
|
4360
|
+
DefaultViewRegistry,
|
|
4361
|
+
getGlobalRegistry,
|
|
4362
|
+
resetGlobalRegistry,
|
|
4363
|
+
setGlobalRegistry
|
|
4364
|
+
} from "@lukso/transaction-view-headless";
|
|
4365
|
+
|
|
4366
|
+
// src/registry/lit-view-loader.ts
|
|
4367
|
+
import { ViewLoadingError } from "@lukso/transaction-view-headless";
|
|
4368
|
+
var LitViewLoader = class {
|
|
4369
|
+
constructor() {
|
|
4370
|
+
this.loadedComponents = /* @__PURE__ */ new Map();
|
|
4371
|
+
}
|
|
4372
|
+
/**
|
|
4373
|
+
* Load a component from a view match
|
|
4374
|
+
*/
|
|
4375
|
+
async loadFromMatch(match) {
|
|
4376
|
+
if (!match.frameworkConfig) {
|
|
4377
|
+
throw new ViewLoadingError(
|
|
4378
|
+
`No framework config for view "${match.view.id}"`,
|
|
4379
|
+
{ type: "custom-element", tagName: "" },
|
|
4380
|
+
{}
|
|
4381
|
+
);
|
|
4382
|
+
}
|
|
4383
|
+
return this.loadComponent(match.frameworkConfig);
|
|
4384
|
+
}
|
|
4385
|
+
/**
|
|
4386
|
+
* Load a component based on framework config
|
|
4387
|
+
*/
|
|
4388
|
+
async loadComponent(config) {
|
|
4389
|
+
const { loader, component } = config;
|
|
4390
|
+
if (this.loadedComponents.has(component)) {
|
|
4391
|
+
return this.loadedComponents.get(component);
|
|
4392
|
+
}
|
|
4393
|
+
try {
|
|
4394
|
+
let loadedComponent;
|
|
4395
|
+
switch (loader.type) {
|
|
4396
|
+
case "custom-element":
|
|
4397
|
+
loadedComponent = await this.loadCustomElement(loader.tagName);
|
|
4398
|
+
break;
|
|
4399
|
+
case "dynamic-import":
|
|
4400
|
+
loadedComponent = await this.loadDynamicImport(loader.path);
|
|
4401
|
+
break;
|
|
4402
|
+
case "static-import":
|
|
4403
|
+
loadedComponent = await this.loadStaticImport(loader.path);
|
|
4404
|
+
break;
|
|
4405
|
+
case "custom":
|
|
4406
|
+
loadedComponent = await loader.loader(config);
|
|
4407
|
+
break;
|
|
4408
|
+
default:
|
|
4409
|
+
throw new ViewLoadingError(
|
|
4410
|
+
`Unsupported loader type: ${loader.type}`,
|
|
4411
|
+
loader,
|
|
4412
|
+
config
|
|
4413
|
+
);
|
|
4414
|
+
}
|
|
4415
|
+
this.loadedComponents.set(component, loadedComponent);
|
|
4416
|
+
return loadedComponent;
|
|
4417
|
+
} catch (error) {
|
|
4418
|
+
throw new ViewLoadingError(
|
|
4419
|
+
`Failed to load component "${component}"`,
|
|
4420
|
+
loader,
|
|
4421
|
+
config,
|
|
4422
|
+
error instanceof Error ? error : new Error(String(error))
|
|
4423
|
+
);
|
|
4424
|
+
}
|
|
4425
|
+
}
|
|
4426
|
+
/**
|
|
4427
|
+
* Load a custom element (Web Component)
|
|
4428
|
+
*/
|
|
4429
|
+
async loadCustomElement(tagName) {
|
|
4430
|
+
if (customElements.get(tagName)) {
|
|
4431
|
+
return customElements.get(tagName);
|
|
4432
|
+
}
|
|
4433
|
+
return new Promise((resolve, reject) => {
|
|
4434
|
+
const timeout = setTimeout(() => {
|
|
4435
|
+
reject(
|
|
4436
|
+
new Error(`Custom element "${tagName}" not found after 5s timeout`)
|
|
4437
|
+
);
|
|
4438
|
+
}, 5e3);
|
|
4439
|
+
customElements.whenDefined(tagName).then(() => {
|
|
4440
|
+
clearTimeout(timeout);
|
|
4441
|
+
resolve(customElements.get(tagName));
|
|
4442
|
+
}).catch(reject);
|
|
4443
|
+
});
|
|
4444
|
+
}
|
|
4445
|
+
/**
|
|
4446
|
+
* Load via dynamic import
|
|
4447
|
+
*/
|
|
4448
|
+
async loadDynamicImport(path) {
|
|
4449
|
+
if (typeof path === "function") {
|
|
4450
|
+
const module2 = await path();
|
|
4451
|
+
return module2.default || module2;
|
|
4452
|
+
}
|
|
4453
|
+
const module = await import(
|
|
4454
|
+
/* @vite-ignore */
|
|
4455
|
+
path
|
|
4456
|
+
);
|
|
4457
|
+
return module.default || module;
|
|
4458
|
+
}
|
|
4459
|
+
/**
|
|
4460
|
+
* Load via static import (not really possible at runtime, but for completeness)
|
|
4461
|
+
*/
|
|
4462
|
+
async loadStaticImport(path) {
|
|
4463
|
+
return this.loadDynamicImport(path);
|
|
4464
|
+
}
|
|
4465
|
+
/**
|
|
4466
|
+
* Create a component instance with data
|
|
4467
|
+
*/
|
|
4468
|
+
createInstance(componentClass, data) {
|
|
4469
|
+
const element = new componentClass();
|
|
4470
|
+
Object.keys(data).forEach((key) => {
|
|
4471
|
+
if (key in element) {
|
|
4472
|
+
element[key] = data[key];
|
|
4473
|
+
} else {
|
|
4474
|
+
element.setAttribute(
|
|
4475
|
+
key,
|
|
4476
|
+
typeof data[key] === "object" ? JSON.stringify(data[key]) : String(data[key])
|
|
4477
|
+
);
|
|
4478
|
+
}
|
|
4479
|
+
});
|
|
4480
|
+
return element;
|
|
4481
|
+
}
|
|
4482
|
+
/**
|
|
4483
|
+
* Clear component cache
|
|
4484
|
+
*/
|
|
4485
|
+
clearCache() {
|
|
4486
|
+
this.loadedComponents.clear();
|
|
4487
|
+
}
|
|
4488
|
+
};
|
|
4489
|
+
var globalLitLoader = null;
|
|
4490
|
+
function getGlobalLitLoader() {
|
|
4491
|
+
if (!globalLitLoader) {
|
|
4492
|
+
globalLitLoader = new LitViewLoader();
|
|
4493
|
+
}
|
|
4494
|
+
return globalLitLoader;
|
|
4495
|
+
}
|
|
4496
|
+
function setGlobalLitLoader(loader) {
|
|
4497
|
+
globalLitLoader = loader;
|
|
4498
|
+
}
|
|
4499
|
+
function resetGlobalLitLoader() {
|
|
4500
|
+
globalLitLoader = null;
|
|
4501
|
+
}
|
|
4502
|
+
export {
|
|
4503
|
+
AddressDisplay,
|
|
4504
|
+
AddressView,
|
|
4505
|
+
CustomOption,
|
|
4506
|
+
CustomSelect,
|
|
4507
|
+
DefaultViewRegistry,
|
|
4508
|
+
FunctionNameView,
|
|
4509
|
+
GasProviderView,
|
|
4510
|
+
IconView,
|
|
4511
|
+
ImageLoaderController,
|
|
4512
|
+
LitViewLoader,
|
|
4513
|
+
MultiSignalController,
|
|
4514
|
+
NotificationView,
|
|
4515
|
+
ProgressView,
|
|
4516
|
+
ScrollToBottomButton,
|
|
4517
|
+
SignalController,
|
|
4518
|
+
TransactionSignalController,
|
|
4519
|
+
TransactionViewController,
|
|
4520
|
+
UrlView,
|
|
4521
|
+
ValueView,
|
|
4522
|
+
getGlobalLitLoader,
|
|
4523
|
+
getGlobalRegistry,
|
|
4524
|
+
resetGlobalLitLoader,
|
|
4525
|
+
resetGlobalRegistry,
|
|
4526
|
+
setGlobalLitLoader,
|
|
4527
|
+
setGlobalRegistry,
|
|
4528
|
+
useImageLoader3 as useImageLoader,
|
|
4529
|
+
useSignal,
|
|
4530
|
+
useSignals,
|
|
4531
|
+
useTransactionSignal,
|
|
4532
|
+
useTransactionView
|
|
4533
|
+
};
|
|
4534
|
+
//# sourceMappingURL=index.js.map
|