@volr/react-ui 0.1.107 → 0.1.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1759 -349
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +63 -0
- package/dist/index.d.ts +63 -0
- package/dist/index.js +1760 -350
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React13, { createContext, useContext, useState, useMemo, useEffect, useCallback, useRef, useId, useReducer } from 'react';
|
|
2
2
|
import { createPortal } from 'react-dom';
|
|
3
|
-
import { useVolrContext, useInternalAuth, usePasskeyEnrollment, useMpcConnection, VolrProvider, useVolrAuthCallback, useVolrPaymentApi, useVolrLogin, useVolr, useDepositListener, createGetNetworkInfo } from '@volr/react';
|
|
3
|
+
import { useVolrContext, useInternalAuth, usePasskeyEnrollment, useMpcConnection, VolrProvider, useVolrAuthCallback, useVolrPaymentApi, useUserBalances, useVolrLogin, useVolr, useWithdraw, useDepositListener, createGetNetworkInfo, useEIP6963 } from '@volr/react';
|
|
4
4
|
export { VolrProvider, useDepositListener, usePasskeyEnrollment, useVolr, useVolrLogin, useVolrPaymentApi } from '@volr/react';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
import { clsx } from 'clsx';
|
|
@@ -12,6 +12,123 @@ var __esm = (fn, res) => function __init() {
|
|
|
12
12
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
+
// ../node_modules/viem/_esm/errors/version.js
|
|
16
|
+
var version;
|
|
17
|
+
var init_version = __esm({
|
|
18
|
+
"../node_modules/viem/_esm/errors/version.js"() {
|
|
19
|
+
version = "2.38.6";
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// ../node_modules/viem/_esm/errors/base.js
|
|
24
|
+
function walk(err, fn) {
|
|
25
|
+
if (fn?.(err))
|
|
26
|
+
return err;
|
|
27
|
+
if (err && typeof err === "object" && "cause" in err && err.cause !== void 0)
|
|
28
|
+
return walk(err.cause, fn);
|
|
29
|
+
return fn ? null : err;
|
|
30
|
+
}
|
|
31
|
+
var errorConfig, BaseError;
|
|
32
|
+
var init_base = __esm({
|
|
33
|
+
"../node_modules/viem/_esm/errors/base.js"() {
|
|
34
|
+
init_version();
|
|
35
|
+
errorConfig = {
|
|
36
|
+
getDocsUrl: ({ docsBaseUrl, docsPath = "", docsSlug }) => docsPath ? `${docsBaseUrl ?? "https://viem.sh"}${docsPath}${docsSlug ? `#${docsSlug}` : ""}` : void 0,
|
|
37
|
+
version: `viem@${version}`
|
|
38
|
+
};
|
|
39
|
+
BaseError = class _BaseError extends Error {
|
|
40
|
+
constructor(shortMessage, args = {}) {
|
|
41
|
+
const details = (() => {
|
|
42
|
+
if (args.cause instanceof _BaseError)
|
|
43
|
+
return args.cause.details;
|
|
44
|
+
if (args.cause?.message)
|
|
45
|
+
return args.cause.message;
|
|
46
|
+
return args.details;
|
|
47
|
+
})();
|
|
48
|
+
const docsPath = (() => {
|
|
49
|
+
if (args.cause instanceof _BaseError)
|
|
50
|
+
return args.cause.docsPath || args.docsPath;
|
|
51
|
+
return args.docsPath;
|
|
52
|
+
})();
|
|
53
|
+
const docsUrl = errorConfig.getDocsUrl?.({ ...args, docsPath });
|
|
54
|
+
const message = [
|
|
55
|
+
shortMessage || "An error occurred.",
|
|
56
|
+
"",
|
|
57
|
+
...args.metaMessages ? [...args.metaMessages, ""] : [],
|
|
58
|
+
...docsUrl ? [`Docs: ${docsUrl}`] : [],
|
|
59
|
+
...details ? [`Details: ${details}`] : [],
|
|
60
|
+
...errorConfig.version ? [`Version: ${errorConfig.version}`] : []
|
|
61
|
+
].join("\n");
|
|
62
|
+
super(message, args.cause ? { cause: args.cause } : void 0);
|
|
63
|
+
Object.defineProperty(this, "details", {
|
|
64
|
+
enumerable: true,
|
|
65
|
+
configurable: true,
|
|
66
|
+
writable: true,
|
|
67
|
+
value: void 0
|
|
68
|
+
});
|
|
69
|
+
Object.defineProperty(this, "docsPath", {
|
|
70
|
+
enumerable: true,
|
|
71
|
+
configurable: true,
|
|
72
|
+
writable: true,
|
|
73
|
+
value: void 0
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(this, "metaMessages", {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
configurable: true,
|
|
78
|
+
writable: true,
|
|
79
|
+
value: void 0
|
|
80
|
+
});
|
|
81
|
+
Object.defineProperty(this, "shortMessage", {
|
|
82
|
+
enumerable: true,
|
|
83
|
+
configurable: true,
|
|
84
|
+
writable: true,
|
|
85
|
+
value: void 0
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(this, "version", {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
configurable: true,
|
|
90
|
+
writable: true,
|
|
91
|
+
value: void 0
|
|
92
|
+
});
|
|
93
|
+
Object.defineProperty(this, "name", {
|
|
94
|
+
enumerable: true,
|
|
95
|
+
configurable: true,
|
|
96
|
+
writable: true,
|
|
97
|
+
value: "BaseError"
|
|
98
|
+
});
|
|
99
|
+
this.details = details;
|
|
100
|
+
this.docsPath = docsPath;
|
|
101
|
+
this.metaMessages = args.metaMessages;
|
|
102
|
+
this.name = args.name ?? this.name;
|
|
103
|
+
this.shortMessage = shortMessage;
|
|
104
|
+
this.version = version;
|
|
105
|
+
}
|
|
106
|
+
walk(fn) {
|
|
107
|
+
return walk(this, fn);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
// ../node_modules/viem/_esm/utils/unit/formatUnits.js
|
|
114
|
+
function formatUnits(value, decimals) {
|
|
115
|
+
let display = value.toString();
|
|
116
|
+
const negative = display.startsWith("-");
|
|
117
|
+
if (negative)
|
|
118
|
+
display = display.slice(1);
|
|
119
|
+
display = display.padStart(decimals, "0");
|
|
120
|
+
let [integer, fraction] = [
|
|
121
|
+
display.slice(0, display.length - decimals),
|
|
122
|
+
display.slice(display.length - decimals)
|
|
123
|
+
];
|
|
124
|
+
fraction = fraction.replace(/(0+)$/, "");
|
|
125
|
+
return `${negative ? "-" : ""}${integer || "0"}${fraction ? `.${fraction}` : ""}`;
|
|
126
|
+
}
|
|
127
|
+
var init_formatUnits = __esm({
|
|
128
|
+
"../node_modules/viem/_esm/utils/unit/formatUnits.js"() {
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
15
132
|
// ../node_modules/viem/_esm/constants/abis.js
|
|
16
133
|
var universalResolverErrors, erc20Abi;
|
|
17
134
|
var init_abis = __esm({
|
|
@@ -352,7 +469,9 @@ var en = {
|
|
|
352
469
|
common: {
|
|
353
470
|
back: "Back",
|
|
354
471
|
loading: "Loading...",
|
|
355
|
-
cancel: "Cancel"
|
|
472
|
+
cancel: "Cancel",
|
|
473
|
+
done: "Done",
|
|
474
|
+
tryAgain: "Try again"
|
|
356
475
|
},
|
|
357
476
|
login: {
|
|
358
477
|
title: "Sign in",
|
|
@@ -435,7 +554,50 @@ var en = {
|
|
|
435
554
|
title: "My Account",
|
|
436
555
|
walletAddress: "Wallet Address",
|
|
437
556
|
email: "Email",
|
|
438
|
-
logout: "Log out"
|
|
557
|
+
logout: "Log out",
|
|
558
|
+
totalBalance: "Total Balance",
|
|
559
|
+
noAssets: "No assets configured",
|
|
560
|
+
menu: {
|
|
561
|
+
assets: "Assets",
|
|
562
|
+
withdraw: "Withdraw",
|
|
563
|
+
payments: "Payment History",
|
|
564
|
+
account: "Account"
|
|
565
|
+
},
|
|
566
|
+
info: {
|
|
567
|
+
loginMethod: {
|
|
568
|
+
label: "Login Method",
|
|
569
|
+
email: "Email",
|
|
570
|
+
google: "Google",
|
|
571
|
+
twitter: "Twitter",
|
|
572
|
+
wallet: "Wallet"
|
|
573
|
+
},
|
|
574
|
+
connectedWallet: "Connected Wallet",
|
|
575
|
+
signerType: "Signer Type"
|
|
576
|
+
},
|
|
577
|
+
withdraw: {
|
|
578
|
+
title: "Withdraw",
|
|
579
|
+
selectToken: "Select token to withdraw",
|
|
580
|
+
toAddress: "Destination Address",
|
|
581
|
+
amount: "Amount",
|
|
582
|
+
available: "Available",
|
|
583
|
+
useConnectedWallet: "Use connected wallet",
|
|
584
|
+
confirm: "Confirm Withdrawal",
|
|
585
|
+
processing: "Processing withdrawal...",
|
|
586
|
+
success: "Withdrawal Successful",
|
|
587
|
+
sent: "sent",
|
|
588
|
+
failed: "Withdrawal Failed",
|
|
589
|
+
unknownError: "An unknown error occurred"
|
|
590
|
+
},
|
|
591
|
+
payments: {
|
|
592
|
+
payment: "Payment",
|
|
593
|
+
noPayments: "No payment history",
|
|
594
|
+
fetchError: "Failed to load payment history",
|
|
595
|
+
createdAt: "Created",
|
|
596
|
+
confirmedAt: "Confirmed",
|
|
597
|
+
token: "Token",
|
|
598
|
+
txHash: "Transaction",
|
|
599
|
+
referenceId: "Reference ID"
|
|
600
|
+
}
|
|
439
601
|
},
|
|
440
602
|
deposit: {
|
|
441
603
|
selectTitle: "Select asset to deposit",
|
|
@@ -456,7 +618,26 @@ var en = {
|
|
|
456
618
|
noAssets: "No deposit assets configured.",
|
|
457
619
|
otherToken: "Deposit with another token",
|
|
458
620
|
noToken: "Don't have this token?",
|
|
459
|
-
getOtherToken: "Deposit with another token"
|
|
621
|
+
getOtherToken: "Deposit with another token",
|
|
622
|
+
// Wallet transfer
|
|
623
|
+
useWallet: "Use connected wallet",
|
|
624
|
+
walletTransfer: {
|
|
625
|
+
title: "Transfer from Wallet",
|
|
626
|
+
selectWallet: "Select wallet",
|
|
627
|
+
noWallets: "No wallets detected",
|
|
628
|
+
connecting: "Connecting...",
|
|
629
|
+
balance: "Balance",
|
|
630
|
+
amount: "Amount",
|
|
631
|
+
amountPlaceholder: "Enter amount",
|
|
632
|
+
max: "MAX",
|
|
633
|
+
transfer: "Transfer",
|
|
634
|
+
transferring: "Transferring...",
|
|
635
|
+
success: "Transfer successful!",
|
|
636
|
+
insufficientBalance: "Insufficient balance",
|
|
637
|
+
invalidAmount: "Invalid amount",
|
|
638
|
+
wrongNetwork: "Please switch to {{network}}",
|
|
639
|
+
switchNetwork: "Switch Network"
|
|
640
|
+
}
|
|
460
641
|
},
|
|
461
642
|
sign: {
|
|
462
643
|
title: "Sign Request",
|
|
@@ -481,7 +662,9 @@ var ko = {
|
|
|
481
662
|
common: {
|
|
482
663
|
back: "\uB4A4\uB85C",
|
|
483
664
|
loading: "\uB85C\uB529 \uC911...",
|
|
484
|
-
cancel: "\uCDE8\uC18C"
|
|
665
|
+
cancel: "\uCDE8\uC18C",
|
|
666
|
+
done: "\uC644\uB8CC",
|
|
667
|
+
tryAgain: "\uB2E4\uC2DC \uC2DC\uB3C4"
|
|
485
668
|
},
|
|
486
669
|
login: {
|
|
487
670
|
title: "\uB85C\uADF8\uC778",
|
|
@@ -564,7 +747,50 @@ var ko = {
|
|
|
564
747
|
title: "\uB0B4 \uACC4\uC815",
|
|
565
748
|
walletAddress: "\uC9C0\uAC11 \uC8FC\uC18C",
|
|
566
749
|
email: "\uC774\uBA54\uC77C",
|
|
567
|
-
logout: "\uB85C\uADF8\uC544\uC6C3"
|
|
750
|
+
logout: "\uB85C\uADF8\uC544\uC6C3",
|
|
751
|
+
totalBalance: "\uCD1D \uC794\uACE0",
|
|
752
|
+
noAssets: "\uC124\uC815\uB41C \uC790\uC0B0\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
753
|
+
menu: {
|
|
754
|
+
assets: "\uC790\uC0B0",
|
|
755
|
+
withdraw: "\uCD9C\uAE08",
|
|
756
|
+
payments: "\uACB0\uC81C \uAE30\uB85D",
|
|
757
|
+
account: "\uACC4\uC815 \uC815\uBCF4"
|
|
758
|
+
},
|
|
759
|
+
info: {
|
|
760
|
+
loginMethod: {
|
|
761
|
+
label: "\uB85C\uADF8\uC778 \uBC29\uBC95",
|
|
762
|
+
email: "\uC774\uBA54\uC77C",
|
|
763
|
+
google: "\uAD6C\uAE00",
|
|
764
|
+
twitter: "\uD2B8\uC704\uD130",
|
|
765
|
+
wallet: "\uC9C0\uAC11"
|
|
766
|
+
},
|
|
767
|
+
connectedWallet: "\uC5F0\uACB0\uB41C \uC678\uBD80 \uC9C0\uAC11",
|
|
768
|
+
signerType: "\uC11C\uBA85 \uBC29\uC2DD"
|
|
769
|
+
},
|
|
770
|
+
withdraw: {
|
|
771
|
+
title: "\uCD9C\uAE08",
|
|
772
|
+
selectToken: "\uCD9C\uAE08\uD560 \uD1A0\uD070 \uC120\uD0DD",
|
|
773
|
+
toAddress: "\uBC1B\uB294 \uC8FC\uC18C",
|
|
774
|
+
amount: "\uAE08\uC561",
|
|
775
|
+
available: "\uC0AC\uC6A9 \uAC00\uB2A5",
|
|
776
|
+
useConnectedWallet: "\uC5F0\uACB0\uB41C \uC9C0\uAC11\uC73C\uB85C \uBCF4\uB0B4\uAE30",
|
|
777
|
+
confirm: "\uCD9C\uAE08 \uD655\uC778",
|
|
778
|
+
processing: "\uCD9C\uAE08 \uCC98\uB9AC \uC911...",
|
|
779
|
+
success: "\uCD9C\uAE08 \uC644\uB8CC",
|
|
780
|
+
sent: "\uC804\uC1A1\uB428",
|
|
781
|
+
failed: "\uCD9C\uAE08 \uC2E4\uD328",
|
|
782
|
+
unknownError: "\uC54C \uC218 \uC5C6\uB294 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4"
|
|
783
|
+
},
|
|
784
|
+
payments: {
|
|
785
|
+
payment: "\uACB0\uC81C",
|
|
786
|
+
noPayments: "\uACB0\uC81C \uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
787
|
+
fetchError: "\uACB0\uC81C \uAE30\uB85D\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4",
|
|
788
|
+
createdAt: "\uC0DD\uC131\uC77C\uC2DC",
|
|
789
|
+
confirmedAt: "\uD655\uC815\uC77C\uC2DC",
|
|
790
|
+
token: "\uD1A0\uD070",
|
|
791
|
+
txHash: "\uD2B8\uB79C\uC7AD\uC158",
|
|
792
|
+
referenceId: "\uCC38\uC870 ID"
|
|
793
|
+
}
|
|
568
794
|
},
|
|
569
795
|
deposit: {
|
|
570
796
|
selectTitle: "\uCDA9\uC804\uD560 \uC790\uC0B0\uC744 \uC120\uD0DD\uD558\uC138\uC694",
|
|
@@ -585,7 +811,26 @@ var ko = {
|
|
|
585
811
|
noAssets: "\uC124\uC815\uB41C \uCDA9\uC804 \uC790\uC0B0\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
586
812
|
otherToken: "\uB2E4\uB978 \uD1A0\uD070\uC73C\uB85C \uCDA9\uC804\uD558\uAE30",
|
|
587
813
|
noToken: "\uC774 \uD1A0\uD070\uC774 \uC5C6\uC73C\uC2E0\uAC00\uC694?",
|
|
588
|
-
getOtherToken: "\uB2E4\uB978 \uD1A0\uD070\uC73C\uB85C \uC785\uAE08\uD558\uAE30"
|
|
814
|
+
getOtherToken: "\uB2E4\uB978 \uD1A0\uD070\uC73C\uB85C \uC785\uAE08\uD558\uAE30",
|
|
815
|
+
// Wallet transfer
|
|
816
|
+
useWallet: "\uC5F0\uACB0\uB41C \uC9C0\uAC11\uC73C\uB85C \uC785\uAE08",
|
|
817
|
+
walletTransfer: {
|
|
818
|
+
title: "\uC9C0\uAC11\uC5D0\uC11C \uC804\uC1A1",
|
|
819
|
+
selectWallet: "\uC9C0\uAC11 \uC120\uD0DD",
|
|
820
|
+
noWallets: "\uAC10\uC9C0\uB41C \uC9C0\uAC11\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
821
|
+
connecting: "\uC5F0\uACB0 \uC911...",
|
|
822
|
+
balance: "\uC794\uACE0",
|
|
823
|
+
amount: "\uAE08\uC561",
|
|
824
|
+
amountPlaceholder: "\uAE08\uC561 \uC785\uB825",
|
|
825
|
+
max: "\uCD5C\uB300",
|
|
826
|
+
transfer: "\uC804\uC1A1",
|
|
827
|
+
transferring: "\uC804\uC1A1 \uC911...",
|
|
828
|
+
success: "\uC804\uC1A1 \uC644\uB8CC!",
|
|
829
|
+
insufficientBalance: "\uC794\uACE0 \uBD80\uC871",
|
|
830
|
+
invalidAmount: "\uC798\uBABB\uB41C \uAE08\uC561",
|
|
831
|
+
wrongNetwork: "{{network}}\uB85C \uB124\uD2B8\uC6CC\uD06C\uB97C \uBCC0\uACBD\uD574\uC8FC\uC138\uC694",
|
|
832
|
+
switchNetwork: "\uB124\uD2B8\uC6CC\uD06C \uBCC0\uACBD"
|
|
833
|
+
}
|
|
589
834
|
},
|
|
590
835
|
sign: {
|
|
591
836
|
title: "\uC11C\uBA85 \uC694\uCCAD",
|
|
@@ -736,7 +981,7 @@ function useMediaQuery(query) {
|
|
|
736
981
|
}
|
|
737
982
|
|
|
738
983
|
// src/generated/volr-sdk-css.ts
|
|
739
|
-
var VOLR_SDK_CSS = '/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--volr-tw-translate-x:0;--volr-tw-translate-y:0;--volr-tw-translate-z:0;--volr-tw-space-y-reverse:0;--volr-tw-border-style:solid;--volr-tw-gradient-position:initial;--volr-tw-gradient-from:#0000;--volr-tw-gradient-via:#0000;--volr-tw-gradient-to:#0000;--volr-tw-gradient-stops:initial;--volr-tw-gradient-via-stops:initial;--volr-tw-gradient-from-position:0%;--volr-tw-gradient-via-position:50%;--volr-tw-gradient-to-position:100%;--volr-tw-leading:initial;--volr-tw-font-weight:initial;--volr-tw-shadow:0 0 #0000;--volr-tw-shadow-color:initial;--volr-tw-shadow-alpha:100%;--volr-tw-inset-shadow:0 0 #0000;--volr-tw-inset-shadow-color:initial;--volr-tw-inset-shadow-alpha:100%;--volr-tw-ring-color:initial;--volr-tw-ring-shadow:0 0 #0000;--volr-tw-inset-ring-color:initial;--volr-tw-inset-ring-shadow:0 0 #0000;--volr-tw-ring-inset:initial;--volr-tw-ring-offset-width:0px;--volr-tw-ring-offset-color:#fff;--volr-tw-ring-offset-shadow:0 0 #0000;--volr-tw-blur:initial;--volr-tw-brightness:initial;--volr-tw-contrast:initial;--volr-tw-grayscale:initial;--volr-tw-hue-rotate:initial;--volr-tw-invert:initial;--volr-tw-opacity:initial;--volr-tw-saturate:initial;--volr-tw-sepia:initial;--volr-tw-drop-shadow:initial;--volr-tw-drop-shadow-color:initial;--volr-tw-drop-shadow-alpha:100%;--volr-tw-drop-shadow-size:initial;--volr-tw-duration:initial;--volr-tw-ease:initial}}}@layer theme{:root,:host{--volr-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--volr-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--volr-color-red-50:oklch(97.1% .013 17.38);--volr-color-red-200:oklch(88.5% .062 18.334);--volr-color-red-500:oklch(63.7% .237 25.331);--volr-color-red-600:oklch(57.7% .245 27.325);--volr-color-red-700:oklch(50.5% .213 27.518);--volr-color-orange-600:oklch(64.6% .222 41.116);--volr-color-green-50:oklch(98.2% .018 155.826);--volr-color-green-600:oklch(62.7% .194 149.214);--volr-color-emerald-300:oklch(84.5% .143 164.978);--volr-color-emerald-400:oklch(76.5% .177 163.223);--volr-color-emerald-500:oklch(69.6% .17 162.48);--volr-color-emerald-600:oklch(59.6% .145 163.225);--volr-color-teal-400:oklch(77.7% .152 181.912);--volr-color-teal-500:oklch(70.4% .14 182.503);--volr-color-cyan-400:oklch(78.9% .154 211.53);--volr-color-blue-600:oklch(54.6% .245 262.881);--volr-color-purple-600:oklch(55.8% .288 302.321);--volr-color-slate-50:oklch(98.4% .003 247.858);--volr-color-slate-100:oklch(96.8% .007 247.896);--volr-color-slate-200:oklch(92.9% .013 255.508);--volr-color-slate-300:oklch(86.9% .022 252.894);--volr-color-slate-400:oklch(70.4% .04 256.788);--volr-color-slate-500:oklch(55.4% .046 257.417);--volr-color-slate-600:oklch(44.6% .043 257.281);--volr-color-slate-900:oklch(20.8% .042 265.755);--volr-color-gray-500:oklch(55.1% .027 264.364);--volr-color-black:#000;--volr-color-white:#fff;--volr-spacing:.25rem;--volr-container-md:28rem;--volr-container-4xl:56rem;--volr-text-xs:.75rem;--volr-text-xs--line-height:calc(1/.75);--volr-text-sm:.875rem;--volr-text-sm--line-height:calc(1.25/.875);--volr-text-base:1rem;--volr-text-base--line-height:calc(1.5/1);--volr-text-lg:1.125rem;--volr-text-lg--line-height:calc(1.75/1.125);--volr-text-xl:1.25rem;--volr-text-xl--line-height:calc(1.75/1.25);--volr-text-2xl:1.5rem;--volr-text-2xl--line-height:calc(2/1.5);--volr-text-8xl:6rem;--volr-text-8xl--line-height:1;--volr-font-weight-medium:500;--volr-font-weight-semibold:600;--volr-font-weight-bold:700;--volr-leading-relaxed:1.625;--volr-radius-md:.375rem;--volr-radius-lg:.5rem;--volr-radius-xl:.75rem;--volr-radius-2xl:1rem;--volr-radius-3xl:1.5rem;--volr-ease-out:cubic-bezier(0,0,.2,1);--volr-animate-spin:spin 1s linear infinite;--volr-animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--volr-blur-2xl:40px;--volr-default-transition-duration:.15s;--volr-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--volr-default-font-family:var(--volr-font-sans);--volr-default-mono-font-family:var(--volr-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--volr-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--volr-default-font-feature-settings,normal);font-variation-settings:var(--volr-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--volr-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--volr-default-mono-font-feature-settings,normal);font-variation-settings:var(--volr-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:host{--volr-primary-color:var(--volr-accent-color,#303030);--volr-font-family:var(--volr-custom-font,inherit);--volr-bg:#fff;--volr-bg-secondary:#f8fafc;--volr-bg-tertiary:#f1f5f9;--volr-text:#0f172a;--volr-text-secondary:#475569;--volr-text-muted:#94a3b8;--volr-border:#e2e8f0;--volr-border-strong:#cbd5e1;--volr-hover-bg:#f8fafc;--volr-error-bg:#fef2f2;--volr-error-border:#fecaca;--volr-error-text:#991b1b}:host([data-theme=dark]){--volr-bg:#1c1c1e;--volr-bg-secondary:#2c2c2e;--volr-bg-tertiary:#3a3a3c;--volr-text:#f5f5f7;--volr-text-secondary:#c7c7cc;--volr-text-muted:#8e8e93;--volr-border:#3a3a3c;--volr-border-strong:#48484a;--volr-hover-bg:#2c2c2e;--volr-error-bg:#3c1f1f;--volr-error-border:#7f1d1d;--volr-error-text:#fca5a5}*,:before,:after{box-sizing:border-box}*{font-family:var(--volr-font-family);color:var(--volr-text)}button,input,select,textarea{color:var(--volr-text);background-color:#0000}button{cursor:pointer;background-color:#0000}input::placeholder{color:var(--volr-text-muted)}h1,h2,h3{color:var(--volr-text);margin:0;font-weight:700}h1{font-size:1.875rem;line-height:2.25rem}h2{font-size:1.5rem;line-height:2rem}h3{font-size:1.25rem;line-height:1.75rem}p{margin:0}}@layer components{.volr-dialog-overlay{inset:calc(var(--volr-spacing)*0);z-index:40;background-color:var(--volr-color-black);position:fixed}@supports (color:color-mix(in lab, red, red)){.volr-dialog-overlay{background-color:color-mix(in oklab,var(--volr-color-black)45%,transparent)}}.volr-dialog-content{z-index:50;border-radius:var(--volr-radius-2xl);border-style:var(--volr-tw-border-style);padding:calc(var(--volr-spacing)*7);--volr-tw-shadow:0 20px 25px -5px var(--volr-tw-shadow-color,#0000001a),0 8px 10px -6px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow);background-color:var(--volr-bg);border-width:1px;border-color:var(--volr-border-strong);width:calc(100% - 2rem);max-width:28rem;max-height:85vh;position:fixed;top:50%;left:50%;overflow-y:auto;transform:translate(-50%,-50%)}@media (max-width:640px){.volr-dialog-content{top:auto;right:calc(var(--volr-spacing)*0);bottom:calc(var(--volr-spacing)*0);left:calc(var(--volr-spacing)*0);border-radius:1.25rem 1.25rem 0 0;width:100%;max-width:100%;margin:0 auto;transform:translateY(0)}}.volr-dialog-close{top:calc(var(--volr-spacing)*4);right:calc(var(--volr-spacing)*4);height:calc(var(--volr-spacing)*8);width:calc(var(--volr-spacing)*8);color:var(--volr-text-muted);cursor:pointer;background-color:#0000;border:none;border-radius:3.40282e38px;justify-content:center;align-items:center;display:inline-flex;position:absolute}.volr-dialog-close:hover{background-color:var(--volr-hover-bg);color:var(--volr-text-secondary)}.volr-dialog-close:focus-visible{box-shadow:0 0 0 2px var(--volr-border-strong);outline:none}.volr-dialog-close-icon{height:calc(var(--volr-spacing)*4);width:calc(var(--volr-spacing)*4)}.volr-email-input{border:1px solid var(--volr-border-strong);background-color:var(--volr-bg);width:100%;color:var(--volr-text);border-radius:.5rem;outline:none;padding:.75rem .75rem .75rem 2.75rem;font-size:1rem;line-height:1.5}.volr-email-input::placeholder{color:var(--volr-text-muted)}.volr-email-input:focus{border-color:var(--volr-border-strong);box-shadow:0 0 0 2px var(--volr-border-strong)}.volr-option-button{border:1px solid var(--volr-border);background-color:var(--volr-bg);width:100%;color:var(--volr-text);cursor:pointer;border-radius:.5rem;align-items:center;gap:.75rem;padding:.75rem;transition:background-color .15s ease-out,border-color .15s ease-out,box-shadow .15s ease-out;display:flex}.volr-option-button:hover{background-color:var(--volr-hover-bg);border-color:var(--volr-border)}.volr-option-button:focus-visible{box-shadow:0 0 0 2px var(--volr-border-strong);outline:none}}@layer utilities{.volr\\:pointer-events-auto{pointer-events:auto}.volr\\:pointer-events-none{pointer-events:none}.volr\\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.volr\\:absolute{position:absolute}.volr\\:fixed{position:fixed}.volr\\:relative{position:relative}.volr\\:inset-0{inset:calc(var(--volr-spacing)*0)}.volr\\:-top-3{top:calc(var(--volr-spacing)*-3)}.volr\\:top-1\\/2{top:50%}.volr\\:-right-3{right:calc(var(--volr-spacing)*-3)}.volr\\:-right-4{right:calc(var(--volr-spacing)*-4)}.volr\\:right-2{right:calc(var(--volr-spacing)*2)}.volr\\:bottom-0{bottom:calc(var(--volr-spacing)*0)}.volr\\:-left-4{left:calc(var(--volr-spacing)*-4)}.volr\\:left-3{left:calc(var(--volr-spacing)*3)}.volr\\:-z-10{z-index:calc(10*-1)}.volr\\:z-10{z-index:10}.volr\\:z-20{z-index:20}.volr\\:z-40{z-index:40}.volr\\:z-50{z-index:50}.volr\\:mx-auto{margin-inline:auto}.volr\\:my-6{margin-block:calc(var(--volr-spacing)*6)}.volr\\:mt-0\\.5{margin-top:calc(var(--volr-spacing)*.5)}.volr\\:mt-1{margin-top:calc(var(--volr-spacing)*1)}.volr\\:mt-2{margin-top:calc(var(--volr-spacing)*2)}.volr\\:mt-3{margin-top:calc(var(--volr-spacing)*3)}.volr\\:mt-4{margin-top:calc(var(--volr-spacing)*4)}.volr\\:mt-6{margin-top:calc(var(--volr-spacing)*6)}.volr\\:mt-8{margin-top:calc(var(--volr-spacing)*8)}.volr\\:mb-1{margin-bottom:calc(var(--volr-spacing)*1)}.volr\\:mb-2{margin-bottom:calc(var(--volr-spacing)*2)}.volr\\:mb-3{margin-bottom:calc(var(--volr-spacing)*3)}.volr\\:mb-4{margin-bottom:calc(var(--volr-spacing)*4)}.volr\\:mb-5{margin-bottom:calc(var(--volr-spacing)*5)}.volr\\:mb-6{margin-bottom:calc(var(--volr-spacing)*6)}.volr\\:mb-8{margin-bottom:calc(var(--volr-spacing)*8)}.volr\\:-ml-2{margin-left:calc(var(--volr-spacing)*-2)}.volr\\:line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.volr\\:flex{display:flex}.volr\\:grid{display:grid}.volr\\:inline-block{display:inline-block}.volr\\:inline-flex{display:inline-flex}.volr\\:h-1{height:calc(var(--volr-spacing)*1)}.volr\\:h-1\\.5{height:calc(var(--volr-spacing)*1.5)}.volr\\:h-2{height:calc(var(--volr-spacing)*2)}.volr\\:h-3{height:calc(var(--volr-spacing)*3)}.volr\\:h-4{height:calc(var(--volr-spacing)*4)}.volr\\:h-5{height:calc(var(--volr-spacing)*5)}.volr\\:h-6{height:calc(var(--volr-spacing)*6)}.volr\\:h-7{height:calc(var(--volr-spacing)*7)}.volr\\:h-8{height:calc(var(--volr-spacing)*8)}.volr\\:h-10{height:calc(var(--volr-spacing)*10)}.volr\\:h-12{height:calc(var(--volr-spacing)*12)}.volr\\:h-14{height:calc(var(--volr-spacing)*14)}.volr\\:h-16{height:calc(var(--volr-spacing)*16)}.volr\\:h-20{height:calc(var(--volr-spacing)*20)}.volr\\:h-24{height:calc(var(--volr-spacing)*24)}.volr\\:h-40{height:calc(var(--volr-spacing)*40)}.volr\\:h-44{height:calc(var(--volr-spacing)*44)}.volr\\:h-48{height:calc(var(--volr-spacing)*48)}.volr\\:h-\\[0\\.8em\\]{height:.8em}.volr\\:h-\\[200px\\]{height:200px}.volr\\:h-full{height:100%}.volr\\:h-px{height:1px}.volr\\:max-h-36{max-height:calc(var(--volr-spacing)*36)}.volr\\:max-h-60{max-height:calc(var(--volr-spacing)*60)}.volr\\:max-h-96{max-height:calc(var(--volr-spacing)*96)}.volr\\:max-h-\\[85vh\\]{max-height:85vh}.volr\\:max-h-\\[90vh\\]{max-height:90vh}.volr\\:min-h-\\[120px\\]{min-height:120px}.volr\\:min-h-\\[500px\\]{min-height:500px}.volr\\:w-1\\.5{width:calc(var(--volr-spacing)*1.5)}.volr\\:w-2{width:calc(var(--volr-spacing)*2)}.volr\\:w-4{width:calc(var(--volr-spacing)*4)}.volr\\:w-5{width:calc(var(--volr-spacing)*5)}.volr\\:w-6{width:calc(var(--volr-spacing)*6)}.volr\\:w-7{width:calc(var(--volr-spacing)*7)}.volr\\:w-8{width:calc(var(--volr-spacing)*8)}.volr\\:w-10{width:calc(var(--volr-spacing)*10)}.volr\\:w-12{width:calc(var(--volr-spacing)*12)}.volr\\:w-14{width:calc(var(--volr-spacing)*14)}.volr\\:w-16{width:calc(var(--volr-spacing)*16)}.volr\\:w-20{width:calc(var(--volr-spacing)*20)}.volr\\:w-24{width:calc(var(--volr-spacing)*24)}.volr\\:w-32{width:calc(var(--volr-spacing)*32)}.volr\\:w-36{width:calc(var(--volr-spacing)*36)}.volr\\:w-40{width:calc(var(--volr-spacing)*40)}.volr\\:w-44{width:calc(var(--volr-spacing)*44)}.volr\\:w-48{width:calc(var(--volr-spacing)*48)}.volr\\:w-\\[200px\\]{width:200px}.volr\\:w-auto{width:auto}.volr\\:w-full{width:100%}.volr\\:max-w-4xl{max-width:var(--volr-container-4xl)}.volr\\:max-w-full{max-width:100%}.volr\\:max-w-md{max-width:var(--volr-container-md)}.volr\\:max-w-none{max-width:none}.volr\\:min-w-0{min-width:calc(var(--volr-spacing)*0)}.volr\\:flex-1{flex:1}.volr\\:flex-shrink-0,.volr\\:shrink-0{flex-shrink:0}.volr\\:-translate-y-1\\/2{--volr-tw-translate-y:calc(calc(1/2*100%)*-1);translate:var(--volr-tw-translate-x)var(--volr-tw-translate-y)}.volr\\:rotate-180{rotate:180deg}.volr\\:animate-\\[volrFadeIn_0\\.2s_ease-out\\]{animation:.2s ease-out volrFadeIn}.volr\\:animate-pulse{animation:var(--volr-animate-pulse)}.volr\\:animate-spin{animation:var(--volr-animate-spin)}.volr\\:cursor-not-allowed{cursor:not-allowed}.volr\\:cursor-pointer{cursor:pointer}.volr\\:list-inside{list-style-position:inside}.volr\\:list-decimal{list-style-type:decimal}.volr\\:grid-cols-\\[minmax\\(0\\,1\\.1fr\\)_minmax\\(0\\,1fr\\)\\]{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}.volr\\:flex-col{flex-direction:column}.volr\\:flex-wrap{flex-wrap:wrap}.volr\\:items-baseline{align-items:baseline}.volr\\:items-center{align-items:center}.volr\\:items-end{align-items:flex-end}.volr\\:items-start{align-items:flex-start}.volr\\:justify-between{justify-content:space-between}.volr\\:justify-center{justify-content:center}.volr\\:gap-1{gap:calc(var(--volr-spacing)*1)}.volr\\:gap-2{gap:calc(var(--volr-spacing)*2)}.volr\\:gap-3{gap:calc(var(--volr-spacing)*3)}.volr\\:gap-4{gap:calc(var(--volr-spacing)*4)}:where(.volr\\:space-y-1>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*1)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*1)*calc(1 - var(--volr-tw-space-y-reverse)))}:where(.volr\\:space-y-2>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*2)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*2)*calc(1 - var(--volr-tw-space-y-reverse)))}:where(.volr\\:space-y-3>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*3)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*3)*calc(1 - var(--volr-tw-space-y-reverse)))}:where(.volr\\:space-y-4>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*4)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*4)*calc(1 - var(--volr-tw-space-y-reverse)))}:where(.volr\\:space-y-6>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*6)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*6)*calc(1 - var(--volr-tw-space-y-reverse)))}:where(.volr\\:space-y-8>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*8)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*8)*calc(1 - var(--volr-tw-space-y-reverse)))}.volr\\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.volr\\:overflow-auto{overflow:auto}.volr\\:overflow-hidden{overflow:hidden}.volr\\:overflow-visible{overflow:visible}.volr\\:overflow-y-auto{overflow-y:auto}.volr\\:rounded{border-radius:.25rem}.volr\\:rounded-2xl{border-radius:var(--volr-radius-2xl)}.volr\\:rounded-full{border-radius:3.40282e38px}.volr\\:rounded-lg{border-radius:var(--volr-radius-lg)}.volr\\:rounded-md{border-radius:var(--volr-radius-md)}.volr\\:rounded-xl{border-radius:var(--volr-radius-xl)}.volr\\:rounded-t-2xl{border-top-left-radius:var(--volr-radius-2xl);border-top-right-radius:var(--volr-radius-2xl)}.volr\\:rounded-t-3xl{border-top-left-radius:var(--volr-radius-3xl);border-top-right-radius:var(--volr-radius-3xl)}.volr\\:border{border-style:var(--volr-tw-border-style);border-width:1px}.volr\\:border-2{border-style:var(--volr-tw-border-style);border-width:2px}.volr\\:border-4{border-style:var(--volr-tw-border-style);border-width:4px}.volr\\:border-t{border-top-style:var(--volr-tw-border-style);border-top-width:1px}.volr\\:border-t-2{border-top-style:var(--volr-tw-border-style);border-top-width:2px}.volr\\:border-red-200{border-color:var(--volr-color-red-200)}.volr\\:border-slate-200{border-color:var(--volr-color-slate-200)}.volr\\:border-slate-300{border-color:var(--volr-color-slate-300)}.volr\\:border-white{border-color:var(--volr-color-white)}.volr\\:border-t-slate-600{border-top-color:var(--volr-color-slate-600)}.volr\\:bg-black\\/45{background-color:var(--volr-color-black)}@supports (color:color-mix(in lab, red, red)){.volr\\:bg-black\\/45{background-color:color-mix(in oklab,var(--volr-color-black)45%,transparent)}}.volr\\:bg-cyan-400{background-color:var(--volr-color-cyan-400)}.volr\\:bg-emerald-300{background-color:var(--volr-color-emerald-300)}.volr\\:bg-emerald-400{background-color:var(--volr-color-emerald-400)}.volr\\:bg-green-50{background-color:var(--volr-color-green-50)}.volr\\:bg-red-50{background-color:var(--volr-color-red-50)}.volr\\:bg-slate-50{background-color:var(--volr-color-slate-50)}.volr\\:bg-slate-100{background-color:var(--volr-color-slate-100)}.volr\\:bg-slate-200{background-color:var(--volr-color-slate-200)}.volr\\:bg-slate-900{background-color:var(--volr-color-slate-900)}.volr\\:bg-teal-400{background-color:var(--volr-color-teal-400)}.volr\\:bg-white{background-color:var(--volr-color-white)}.volr\\:bg-linear-to-br{--volr-tw-gradient-position:to bottom right}@supports (background-image:linear-gradient(in lab, red, red)){.volr\\:bg-linear-to-br{--volr-tw-gradient-position:to bottom right in oklab}}.volr\\:bg-linear-to-br{background-image:linear-gradient(var(--volr-tw-gradient-stops))}.volr\\:from-emerald-400{--volr-tw-gradient-from:var(--volr-color-emerald-400);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}.volr\\:from-emerald-500{--volr-tw-gradient-from:var(--volr-color-emerald-500);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}.volr\\:to-teal-500{--volr-tw-gradient-to:var(--volr-color-teal-500);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}.volr\\:object-cover{object-fit:cover}.volr\\:p-1{padding:calc(var(--volr-spacing)*1)}.volr\\:p-2{padding:calc(var(--volr-spacing)*2)}.volr\\:p-3{padding:calc(var(--volr-spacing)*3)}.volr\\:p-4{padding:calc(var(--volr-spacing)*4)}.volr\\:p-5{padding:calc(var(--volr-spacing)*5)}.volr\\:p-8{padding:calc(var(--volr-spacing)*8)}.volr\\:px-1\\.5{padding-inline:calc(var(--volr-spacing)*1.5)}.volr\\:px-2{padding-inline:calc(var(--volr-spacing)*2)}.volr\\:px-3{padding-inline:calc(var(--volr-spacing)*3)}.volr\\:px-4{padding-inline:calc(var(--volr-spacing)*4)}.volr\\:py-0\\.5{padding-block:calc(var(--volr-spacing)*.5)}.volr\\:py-1{padding-block:calc(var(--volr-spacing)*1)}.volr\\:py-1\\.5{padding-block:calc(var(--volr-spacing)*1.5)}.volr\\:py-2{padding-block:calc(var(--volr-spacing)*2)}.volr\\:py-2\\.5{padding-block:calc(var(--volr-spacing)*2.5)}.volr\\:py-3{padding-block:calc(var(--volr-spacing)*3)}.volr\\:py-4{padding-block:calc(var(--volr-spacing)*4)}.volr\\:py-6{padding-block:calc(var(--volr-spacing)*6)}.volr\\:py-8{padding-block:calc(var(--volr-spacing)*8)}.volr\\:py-12{padding-block:calc(var(--volr-spacing)*12)}.volr\\:pt-2{padding-top:calc(var(--volr-spacing)*2)}.volr\\:pt-3{padding-top:calc(var(--volr-spacing)*3)}.volr\\:pt-4{padding-top:calc(var(--volr-spacing)*4)}.volr\\:pr-3{padding-right:calc(var(--volr-spacing)*3)}.volr\\:pb-2{padding-bottom:calc(var(--volr-spacing)*2)}.volr\\:pb-4{padding-bottom:calc(var(--volr-spacing)*4)}.volr\\:pl-4{padding-left:calc(var(--volr-spacing)*4)}.volr\\:pl-11{padding-left:calc(var(--volr-spacing)*11)}.volr\\:text-center{text-align:center}.volr\\:text-left{text-align:left}.volr\\:text-right{text-align:right}.volr\\:align-baseline{vertical-align:baseline}.volr\\:font-mono{font-family:var(--volr-font-mono)}.volr\\:text-2xl{font-size:var(--volr-text-2xl);line-height:var(--volr-tw-leading,var(--volr-text-2xl--line-height))}.volr\\:text-8xl{font-size:var(--volr-text-8xl);line-height:var(--volr-tw-leading,var(--volr-text-8xl--line-height))}.volr\\:text-base{font-size:var(--volr-text-base);line-height:var(--volr-tw-leading,var(--volr-text-base--line-height))}.volr\\:text-lg{font-size:var(--volr-text-lg);line-height:var(--volr-tw-leading,var(--volr-text-lg--line-height))}.volr\\:text-sm{font-size:var(--volr-text-sm);line-height:var(--volr-tw-leading,var(--volr-text-sm--line-height))}.volr\\:text-xl{font-size:var(--volr-text-xl);line-height:var(--volr-tw-leading,var(--volr-text-xl--line-height))}.volr\\:text-xs{font-size:var(--volr-text-xs);line-height:var(--volr-tw-leading,var(--volr-text-xs--line-height))}.volr\\:leading-relaxed{--volr-tw-leading:var(--volr-leading-relaxed);line-height:var(--volr-leading-relaxed)}.volr\\:font-bold{--volr-tw-font-weight:var(--volr-font-weight-bold);font-weight:var(--volr-font-weight-bold)}.volr\\:font-medium{--volr-tw-font-weight:var(--volr-font-weight-medium);font-weight:var(--volr-font-weight-medium)}.volr\\:font-semibold{--volr-tw-font-weight:var(--volr-font-weight-semibold);font-weight:var(--volr-font-weight-semibold)}.volr\\:break-all{word-break:break-all}.volr\\:text-blue-600{color:var(--volr-color-blue-600)}.volr\\:text-emerald-600{color:var(--volr-color-emerald-600)}.volr\\:text-gray-500{color:var(--volr-color-gray-500)}.volr\\:text-green-600{color:var(--volr-color-green-600)}.volr\\:text-orange-600{color:var(--volr-color-orange-600)}.volr\\:text-purple-600{color:var(--volr-color-purple-600)}.volr\\:text-red-500{color:var(--volr-color-red-500)}.volr\\:text-red-600{color:var(--volr-color-red-600)}.volr\\:text-red-700{color:var(--volr-color-red-700)}.volr\\:text-slate-100{color:var(--volr-color-slate-100)}.volr\\:text-slate-400{color:var(--volr-color-slate-400)}.volr\\:text-slate-500{color:var(--volr-color-slate-500)}.volr\\:text-slate-600{color:var(--volr-color-slate-600)}.volr\\:text-slate-900{color:var(--volr-color-slate-900)}.volr\\:text-white{color:var(--volr-color-white)}.volr\\:capitalize{text-transform:capitalize}.volr\\:underline{text-decoration-line:underline}.volr\\:opacity-0{opacity:0}.volr\\:opacity-25{opacity:.25}.volr\\:opacity-30{opacity:.3}.volr\\:opacity-50{opacity:.5}.volr\\:opacity-75{opacity:.75}.volr\\:shadow-2xl{--volr-tw-shadow:0 25px 50px -12px var(--volr-tw-shadow-color,#00000040);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-\\[0_-8px_30px_rgba\\(0\\,0\\,0\\,0\\.2\\)\\]{--volr-tw-shadow:0 -8px 30px var(--volr-tw-shadow-color,#0003);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-lg{--volr-tw-shadow:0 10px 15px -3px var(--volr-tw-shadow-color,#0000001a),0 4px 6px -4px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-md{--volr-tw-shadow:0 4px 6px -1px var(--volr-tw-shadow-color,#0000001a),0 2px 4px -2px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-sm{--volr-tw-shadow:0 1px 3px 0 var(--volr-tw-shadow-color,#0000001a),0 1px 2px -1px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-xl{--volr-tw-shadow:0 20px 25px -5px var(--volr-tw-shadow-color,#0000001a),0 8px 10px -6px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-emerald-500\\/50{--volr-tw-shadow-color:var(--volr-color-emerald-500)}@supports (color:color-mix(in lab, red, red)){.volr\\:shadow-emerald-500\\/50{--volr-tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--volr-color-emerald-500)50%,transparent)var(--volr-tw-shadow-alpha),transparent)}}.volr\\:blur-2xl{--volr-tw-blur:blur(var(--volr-blur-2xl));filter:var(--volr-tw-blur,)var(--volr-tw-brightness,)var(--volr-tw-contrast,)var(--volr-tw-grayscale,)var(--volr-tw-hue-rotate,)var(--volr-tw-invert,)var(--volr-tw-saturate,)var(--volr-tw-sepia,)var(--volr-tw-drop-shadow,)}.volr\\:transition-all{transition-property:all;transition-timing-function:var(--volr-tw-ease,var(--volr-default-transition-timing-function));transition-duration:var(--volr-tw-duration,var(--volr-default-transition-duration))}.volr\\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--volr-tw-gradient-from,--volr-tw-gradient-via,--volr-tw-gradient-to;transition-timing-function:var(--volr-tw-ease,var(--volr-default-transition-timing-function));transition-duration:var(--volr-tw-duration,var(--volr-default-transition-duration))}.volr\\:transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--volr-tw-ease,var(--volr-default-transition-timing-function));transition-duration:var(--volr-tw-duration,var(--volr-default-transition-duration))}.volr\\:duration-300{--volr-tw-duration:.3s;transition-duration:.3s}.volr\\:duration-500{--volr-tw-duration:.5s;transition-duration:.5s}.volr\\:ease-out{--volr-tw-ease:var(--volr-ease-out);transition-timing-function:var(--volr-ease-out)}.volr\\:outline-none{--volr-tw-outline-style:none;outline-style:none}@media (hover:hover){.volr\\:hover\\:border-slate-300:hover{border-color:var(--volr-color-slate-300)}.volr\\:hover\\:bg-slate-50:hover{background-color:var(--volr-color-slate-50)}}.volr\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.volr\\:disabled\\:opacity-50:disabled{opacity:.5}.volr-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.volr-text-secondary{color:var(--volr-text-secondary)}.volr-text-muted{color:var(--volr-text-muted)}.volr-bg-secondary{background-color:var(--volr-bg-secondary)}.volr-bg-tertiary{background-color:var(--volr-bg-tertiary)}.volr-border{border-color:var(--volr-border)}.volr-border-strong{border-color:var(--volr-border-strong)}.volr-divider-line{background-color:var(--volr-border)}.volr-error{background-color:var(--volr-error-bg);border-color:var(--volr-error-border);color:var(--volr-error-text)}.volr-hover:hover{background-color:var(--volr-hover-bg)}.volr-surface{background-color:var(--volr-bg)}}@property --volr-tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --volr-tw-gradient-position{syntax:"*";inherits:false}@property --volr-tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --volr-tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --volr-tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --volr-tw-gradient-stops{syntax:"*";inherits:false}@property --volr-tw-gradient-via-stops{syntax:"*";inherits:false}@property --volr-tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --volr-tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --volr-tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --volr-tw-leading{syntax:"*";inherits:false}@property --volr-tw-font-weight{syntax:"*";inherits:false}@property --volr-tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-shadow-color{syntax:"*";inherits:false}@property --volr-tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --volr-tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-inset-shadow-color{syntax:"*";inherits:false}@property --volr-tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --volr-tw-ring-color{syntax:"*";inherits:false}@property --volr-tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-inset-ring-color{syntax:"*";inherits:false}@property --volr-tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-ring-inset{syntax:"*";inherits:false}@property --volr-tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --volr-tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --volr-tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-blur{syntax:"*";inherits:false}@property --volr-tw-brightness{syntax:"*";inherits:false}@property --volr-tw-contrast{syntax:"*";inherits:false}@property --volr-tw-grayscale{syntax:"*";inherits:false}@property --volr-tw-hue-rotate{syntax:"*";inherits:false}@property --volr-tw-invert{syntax:"*";inherits:false}@property --volr-tw-opacity{syntax:"*";inherits:false}@property --volr-tw-saturate{syntax:"*";inherits:false}@property --volr-tw-sepia{syntax:"*";inherits:false}@property --volr-tw-drop-shadow{syntax:"*";inherits:false}@property --volr-tw-drop-shadow-color{syntax:"*";inherits:false}@property --volr-tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --volr-tw-drop-shadow-size{syntax:"*";inherits:false}@property --volr-tw-duration{syntax:"*";inherits:false}@property --volr-tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}';
|
|
984
|
+
var VOLR_SDK_CSS = '/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--volr-tw-translate-x:0;--volr-tw-translate-y:0;--volr-tw-translate-z:0;--volr-tw-space-y-reverse:0;--volr-tw-border-style:solid;--volr-tw-gradient-position:initial;--volr-tw-gradient-from:#0000;--volr-tw-gradient-via:#0000;--volr-tw-gradient-to:#0000;--volr-tw-gradient-stops:initial;--volr-tw-gradient-via-stops:initial;--volr-tw-gradient-from-position:0%;--volr-tw-gradient-via-position:50%;--volr-tw-gradient-to-position:100%;--volr-tw-leading:initial;--volr-tw-font-weight:initial;--volr-tw-tracking:initial;--volr-tw-shadow:0 0 #0000;--volr-tw-shadow-color:initial;--volr-tw-shadow-alpha:100%;--volr-tw-inset-shadow:0 0 #0000;--volr-tw-inset-shadow-color:initial;--volr-tw-inset-shadow-alpha:100%;--volr-tw-ring-color:initial;--volr-tw-ring-shadow:0 0 #0000;--volr-tw-inset-ring-color:initial;--volr-tw-inset-ring-shadow:0 0 #0000;--volr-tw-ring-inset:initial;--volr-tw-ring-offset-width:0px;--volr-tw-ring-offset-color:#fff;--volr-tw-ring-offset-shadow:0 0 #0000;--volr-tw-blur:initial;--volr-tw-brightness:initial;--volr-tw-contrast:initial;--volr-tw-grayscale:initial;--volr-tw-hue-rotate:initial;--volr-tw-invert:initial;--volr-tw-opacity:initial;--volr-tw-saturate:initial;--volr-tw-sepia:initial;--volr-tw-drop-shadow:initial;--volr-tw-drop-shadow-color:initial;--volr-tw-drop-shadow-alpha:100%;--volr-tw-drop-shadow-size:initial;--volr-tw-duration:initial;--volr-tw-ease:initial}}}@layer theme{:root,:host{--volr-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--volr-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--volr-color-red-50:oklch(97.1% .013 17.38);--volr-color-red-100:oklch(93.6% .032 17.717);--volr-color-red-200:oklch(88.5% .062 18.334);--volr-color-red-500:oklch(63.7% .237 25.331);--volr-color-red-600:oklch(57.7% .245 27.325);--volr-color-red-700:oklch(50.5% .213 27.518);--volr-color-amber-50:oklch(98.7% .022 95.277);--volr-color-amber-200:oklch(92.4% .12 95.746);--volr-color-amber-700:oklch(55.5% .163 48.998);--volr-color-yellow-100:oklch(97.3% .071 103.193);--volr-color-yellow-700:oklch(55.4% .135 66.442);--volr-color-green-50:oklch(98.2% .018 155.826);--volr-color-green-100:oklch(96.2% .044 156.743);--volr-color-green-600:oklch(62.7% .194 149.214);--volr-color-green-700:oklch(52.7% .154 150.069);--volr-color-emerald-300:oklch(84.5% .143 164.978);--volr-color-emerald-400:oklch(76.5% .177 163.223);--volr-color-emerald-500:oklch(69.6% .17 162.48);--volr-color-emerald-600:oklch(59.6% .145 163.225);--volr-color-teal-400:oklch(77.7% .152 181.912);--volr-color-teal-500:oklch(70.4% .14 182.503);--volr-color-cyan-400:oklch(78.9% .154 211.53);--volr-color-blue-100:oklch(93.2% .032 255.585);--volr-color-blue-700:oklch(48.8% .243 264.376);--volr-color-slate-50:oklch(98.4% .003 247.858);--volr-color-slate-100:oklch(96.8% .007 247.896);--volr-color-slate-200:oklch(92.9% .013 255.508);--volr-color-slate-300:oklch(86.9% .022 252.894);--volr-color-slate-400:oklch(70.4% .04 256.788);--volr-color-slate-500:oklch(55.4% .046 257.417);--volr-color-slate-600:oklch(44.6% .043 257.281);--volr-color-slate-700:oklch(37.2% .044 257.287);--volr-color-slate-900:oklch(20.8% .042 265.755);--volr-color-gray-500:oklch(55.1% .027 264.364);--volr-color-black:#000;--volr-color-white:#fff;--volr-spacing:.25rem;--volr-container-md:28rem;--volr-container-4xl:56rem;--volr-text-xs:.75rem;--volr-text-xs--line-height:calc(1/.75);--volr-text-sm:.875rem;--volr-text-sm--line-height:calc(1.25/.875);--volr-text-base:1rem;--volr-text-base--line-height:calc(1.5/1);--volr-text-lg:1.125rem;--volr-text-lg--line-height:calc(1.75/1.125);--volr-text-xl:1.25rem;--volr-text-xl--line-height:calc(1.75/1.25);--volr-text-2xl:1.5rem;--volr-text-2xl--line-height:calc(2/1.5);--volr-text-3xl:1.875rem;--volr-text-3xl--line-height:calc(2.25/1.875);--volr-text-8xl:6rem;--volr-text-8xl--line-height:1;--volr-font-weight-medium:500;--volr-font-weight-semibold:600;--volr-font-weight-bold:700;--volr-tracking-wide:.025em;--volr-leading-relaxed:1.625;--volr-radius-md:.375rem;--volr-radius-lg:.5rem;--volr-radius-xl:.75rem;--volr-radius-2xl:1rem;--volr-radius-3xl:1.5rem;--volr-ease-out:cubic-bezier(0,0,.2,1);--volr-animate-spin:spin 1s linear infinite;--volr-animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--volr-blur-2xl:40px;--volr-default-transition-duration:.15s;--volr-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--volr-default-font-family:var(--volr-font-sans);--volr-default-mono-font-family:var(--volr-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--volr-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--volr-default-font-feature-settings,normal);font-variation-settings:var(--volr-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--volr-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--volr-default-mono-font-feature-settings,normal);font-variation-settings:var(--volr-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:host{--volr-primary-color:var(--volr-accent-color,#303030);--volr-font-family:var(--volr-custom-font,inherit);--volr-bg:#fff;--volr-bg-secondary:#f8fafc;--volr-bg-tertiary:#f1f5f9;--volr-text:#0f172a;--volr-text-secondary:#475569;--volr-text-muted:#94a3b8;--volr-border:#e2e8f0;--volr-border-strong:#cbd5e1;--volr-hover-bg:#f8fafc;--volr-error-bg:#fef2f2;--volr-error-border:#fecaca;--volr-error-text:#991b1b}:host([data-theme=dark]){--volr-bg:#1c1c1e;--volr-bg-secondary:#2c2c2e;--volr-bg-tertiary:#3a3a3c;--volr-text:#f5f5f7;--volr-text-secondary:#c7c7cc;--volr-text-muted:#8e8e93;--volr-border:#3a3a3c;--volr-border-strong:#48484a;--volr-hover-bg:#2c2c2e;--volr-error-bg:#3c1f1f;--volr-error-border:#7f1d1d;--volr-error-text:#fca5a5}*,:before,:after{box-sizing:border-box}*{font-family:var(--volr-font-family);color:var(--volr-text)}button,input,select,textarea{color:var(--volr-text);background-color:#0000}button{cursor:pointer;background-color:#0000}input::placeholder{color:var(--volr-text-muted)}h1,h2,h3{color:var(--volr-text);margin:0;font-weight:700}h1{font-size:1.875rem;line-height:2.25rem}h2{font-size:1.5rem;line-height:2rem}h3{font-size:1.25rem;line-height:1.75rem}p{margin:0}}@layer components{.volr-dialog-overlay{inset:calc(var(--volr-spacing)*0);z-index:40;background-color:var(--volr-color-black);position:fixed}@supports (color:color-mix(in lab, red, red)){.volr-dialog-overlay{background-color:color-mix(in oklab,var(--volr-color-black)45%,transparent)}}.volr-dialog-content{z-index:50;border-radius:var(--volr-radius-2xl);border-style:var(--volr-tw-border-style);padding:calc(var(--volr-spacing)*7);--volr-tw-shadow:0 20px 25px -5px var(--volr-tw-shadow-color,#0000001a),0 8px 10px -6px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow);background-color:var(--volr-bg);border-width:1px;border-color:var(--volr-border-strong);width:calc(100% - 2rem);max-width:28rem;max-height:85vh;position:fixed;top:50%;left:50%;overflow-y:auto;transform:translate(-50%,-50%)}@media (max-width:640px){.volr-dialog-content{top:auto;right:calc(var(--volr-spacing)*0);bottom:calc(var(--volr-spacing)*0);left:calc(var(--volr-spacing)*0);border-radius:1.25rem 1.25rem 0 0;width:100%;max-width:100%;margin:0 auto;transform:translateY(0)}}.volr-dialog-close{top:calc(var(--volr-spacing)*4);right:calc(var(--volr-spacing)*4);height:calc(var(--volr-spacing)*8);width:calc(var(--volr-spacing)*8);color:var(--volr-text-muted);cursor:pointer;background-color:#0000;border:none;border-radius:3.40282e38px;justify-content:center;align-items:center;display:inline-flex;position:absolute}.volr-dialog-close:hover{background-color:var(--volr-hover-bg);color:var(--volr-text-secondary)}.volr-dialog-close:focus-visible{box-shadow:0 0 0 2px var(--volr-border-strong);outline:none}.volr-dialog-close-icon{height:calc(var(--volr-spacing)*4);width:calc(var(--volr-spacing)*4)}.volr-email-input{border:1px solid var(--volr-border-strong);background-color:var(--volr-bg);width:100%;color:var(--volr-text);border-radius:.5rem;outline:none;padding:.75rem .75rem .75rem 2.75rem;font-size:1rem;line-height:1.5}.volr-email-input::placeholder{color:var(--volr-text-muted)}.volr-email-input:focus{border-color:var(--volr-border-strong);box-shadow:0 0 0 2px var(--volr-border-strong)}.volr-option-button{border:1px solid var(--volr-border);background-color:var(--volr-bg);width:100%;color:var(--volr-text);cursor:pointer;border-radius:.5rem;align-items:center;gap:.75rem;padding:.75rem;transition:background-color .15s ease-out,border-color .15s ease-out,box-shadow .15s ease-out;display:flex}.volr-option-button:hover{background-color:var(--volr-hover-bg);border-color:var(--volr-border)}.volr-option-button:focus-visible{box-shadow:0 0 0 2px var(--volr-border-strong);outline:none}}@layer utilities{.volr\\:pointer-events-auto{pointer-events:auto}.volr\\:pointer-events-none{pointer-events:none}.volr\\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.volr\\:absolute{position:absolute}.volr\\:fixed{position:fixed}.volr\\:relative{position:relative}.volr\\:inset-0{inset:calc(var(--volr-spacing)*0)}.volr\\:-top-3{top:calc(var(--volr-spacing)*-3)}.volr\\:top-1\\/2{top:50%}.volr\\:-right-3{right:calc(var(--volr-spacing)*-3)}.volr\\:right-2{right:calc(var(--volr-spacing)*2)}.volr\\:right-3{right:calc(var(--volr-spacing)*3)}.volr\\:bottom-3{bottom:calc(var(--volr-spacing)*3)}.volr\\:left-3{left:calc(var(--volr-spacing)*3)}.volr\\:-z-10{z-index:calc(10*-1)}.volr\\:z-10{z-index:10}.volr\\:z-20{z-index:20}.volr\\:z-40{z-index:40}.volr\\:z-50{z-index:50}.volr\\:mx-auto{margin-inline:auto}.volr\\:my-6{margin-block:calc(var(--volr-spacing)*6)}.volr\\:mt-0\\.5{margin-top:calc(var(--volr-spacing)*.5)}.volr\\:mt-1{margin-top:calc(var(--volr-spacing)*1)}.volr\\:mt-2{margin-top:calc(var(--volr-spacing)*2)}.volr\\:mt-3{margin-top:calc(var(--volr-spacing)*3)}.volr\\:mt-4{margin-top:calc(var(--volr-spacing)*4)}.volr\\:mt-6{margin-top:calc(var(--volr-spacing)*6)}.volr\\:mt-8{margin-top:calc(var(--volr-spacing)*8)}.volr\\:mb-1{margin-bottom:calc(var(--volr-spacing)*1)}.volr\\:mb-2{margin-bottom:calc(var(--volr-spacing)*2)}.volr\\:mb-3{margin-bottom:calc(var(--volr-spacing)*3)}.volr\\:mb-4{margin-bottom:calc(var(--volr-spacing)*4)}.volr\\:mb-5{margin-bottom:calc(var(--volr-spacing)*5)}.volr\\:mb-6{margin-bottom:calc(var(--volr-spacing)*6)}.volr\\:mb-8{margin-bottom:calc(var(--volr-spacing)*8)}.volr\\:-ml-2{margin-left:calc(var(--volr-spacing)*-2)}.volr\\:line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.volr\\:block{display:block}.volr\\:flex{display:flex}.volr\\:grid{display:grid}.volr\\:inline-block{display:inline-block}.volr\\:inline-flex{display:inline-flex}.volr\\:h-1{height:calc(var(--volr-spacing)*1)}.volr\\:h-1\\.5{height:calc(var(--volr-spacing)*1.5)}.volr\\:h-2{height:calc(var(--volr-spacing)*2)}.volr\\:h-3{height:calc(var(--volr-spacing)*3)}.volr\\:h-4{height:calc(var(--volr-spacing)*4)}.volr\\:h-5{height:calc(var(--volr-spacing)*5)}.volr\\:h-6{height:calc(var(--volr-spacing)*6)}.volr\\:h-7{height:calc(var(--volr-spacing)*7)}.volr\\:h-8{height:calc(var(--volr-spacing)*8)}.volr\\:h-9{height:calc(var(--volr-spacing)*9)}.volr\\:h-10{height:calc(var(--volr-spacing)*10)}.volr\\:h-12{height:calc(var(--volr-spacing)*12)}.volr\\:h-14{height:calc(var(--volr-spacing)*14)}.volr\\:h-16{height:calc(var(--volr-spacing)*16)}.volr\\:h-20{height:calc(var(--volr-spacing)*20)}.volr\\:h-24{height:calc(var(--volr-spacing)*24)}.volr\\:h-40{height:calc(var(--volr-spacing)*40)}.volr\\:h-44{height:calc(var(--volr-spacing)*44)}.volr\\:h-48{height:calc(var(--volr-spacing)*48)}.volr\\:h-\\[0\\.8em\\]{height:.8em}.volr\\:h-\\[200px\\]{height:200px}.volr\\:h-full{height:100%}.volr\\:h-px{height:1px}.volr\\:max-h-48{max-height:calc(var(--volr-spacing)*48)}.volr\\:max-h-60{max-height:calc(var(--volr-spacing)*60)}.volr\\:max-h-64{max-height:calc(var(--volr-spacing)*64)}.volr\\:max-h-\\[85vh\\]{max-height:85vh}.volr\\:max-h-\\[90vh\\]{max-height:90vh}.volr\\:min-h-\\[120px\\]{min-height:120px}.volr\\:min-h-\\[500px\\]{min-height:500px}.volr\\:w-1\\.5{width:calc(var(--volr-spacing)*1.5)}.volr\\:w-2{width:calc(var(--volr-spacing)*2)}.volr\\:w-3{width:calc(var(--volr-spacing)*3)}.volr\\:w-4{width:calc(var(--volr-spacing)*4)}.volr\\:w-5{width:calc(var(--volr-spacing)*5)}.volr\\:w-6{width:calc(var(--volr-spacing)*6)}.volr\\:w-7{width:calc(var(--volr-spacing)*7)}.volr\\:w-8{width:calc(var(--volr-spacing)*8)}.volr\\:w-10{width:calc(var(--volr-spacing)*10)}.volr\\:w-12{width:calc(var(--volr-spacing)*12)}.volr\\:w-14{width:calc(var(--volr-spacing)*14)}.volr\\:w-16{width:calc(var(--volr-spacing)*16)}.volr\\:w-20{width:calc(var(--volr-spacing)*20)}.volr\\:w-24{width:calc(var(--volr-spacing)*24)}.volr\\:w-32{width:calc(var(--volr-spacing)*32)}.volr\\:w-36{width:calc(var(--volr-spacing)*36)}.volr\\:w-40{width:calc(var(--volr-spacing)*40)}.volr\\:w-44{width:calc(var(--volr-spacing)*44)}.volr\\:w-48{width:calc(var(--volr-spacing)*48)}.volr\\:w-\\[200px\\]{width:200px}.volr\\:w-auto{width:auto}.volr\\:w-full{width:100%}.volr\\:max-w-4xl{max-width:var(--volr-container-4xl)}.volr\\:max-w-full{max-width:100%}.volr\\:max-w-md{max-width:var(--volr-container-md)}.volr\\:max-w-none{max-width:none}.volr\\:min-w-0{min-width:calc(var(--volr-spacing)*0)}.volr\\:flex-1{flex:1}.volr\\:flex-shrink-0,.volr\\:shrink-0{flex-shrink:0}.volr\\:-translate-y-1\\/2{--volr-tw-translate-y:calc(calc(1/2*100%)*-1);translate:var(--volr-tw-translate-x)var(--volr-tw-translate-y)}.volr\\:rotate-90{rotate:90deg}.volr\\:rotate-180{rotate:180deg}.volr\\:animate-pulse{animation:var(--volr-animate-pulse)}.volr\\:animate-spin{animation:var(--volr-animate-spin)}.volr\\:cursor-not-allowed{cursor:not-allowed}.volr\\:cursor-pointer{cursor:pointer}.volr\\:list-inside{list-style-position:inside}.volr\\:list-decimal{list-style-type:decimal}.volr\\:grid-cols-\\[minmax\\(0\\,1\\.1fr\\)_minmax\\(0\\,1fr\\)\\]{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}.volr\\:flex-col{flex-direction:column}.volr\\:items-baseline{align-items:baseline}.volr\\:items-center{align-items:center}.volr\\:items-end{align-items:flex-end}.volr\\:items-start{align-items:flex-start}.volr\\:justify-between{justify-content:space-between}.volr\\:justify-center{justify-content:center}.volr\\:gap-1{gap:calc(var(--volr-spacing)*1)}.volr\\:gap-2{gap:calc(var(--volr-spacing)*2)}.volr\\:gap-3{gap:calc(var(--volr-spacing)*3)}.volr\\:gap-4{gap:calc(var(--volr-spacing)*4)}:where(.volr\\:space-y-1>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*1)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*1)*calc(1 - var(--volr-tw-space-y-reverse)))}:where(.volr\\:space-y-2>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*2)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*2)*calc(1 - var(--volr-tw-space-y-reverse)))}:where(.volr\\:space-y-3>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*3)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*3)*calc(1 - var(--volr-tw-space-y-reverse)))}:where(.volr\\:space-y-4>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*4)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*4)*calc(1 - var(--volr-tw-space-y-reverse)))}:where(.volr\\:space-y-6>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*6)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*6)*calc(1 - var(--volr-tw-space-y-reverse)))}:where(.volr\\:space-y-8>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*8)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*8)*calc(1 - var(--volr-tw-space-y-reverse)))}.volr\\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.volr\\:overflow-auto{overflow:auto}.volr\\:overflow-hidden{overflow:hidden}.volr\\:overflow-visible{overflow:visible}.volr\\:overflow-x-auto{overflow-x:auto}.volr\\:overflow-y-auto{overflow-y:auto}.volr\\:rounded{border-radius:.25rem}.volr\\:rounded-2xl{border-radius:var(--volr-radius-2xl)}.volr\\:rounded-full{border-radius:3.40282e38px}.volr\\:rounded-lg{border-radius:var(--volr-radius-lg)}.volr\\:rounded-md{border-radius:var(--volr-radius-md)}.volr\\:rounded-xl{border-radius:var(--volr-radius-xl)}.volr\\:rounded-t-2xl{border-top-left-radius:var(--volr-radius-2xl);border-top-right-radius:var(--volr-radius-2xl)}.volr\\:rounded-t-3xl{border-top-left-radius:var(--volr-radius-3xl);border-top-right-radius:var(--volr-radius-3xl)}.volr\\:border{border-style:var(--volr-tw-border-style);border-width:1px}.volr\\:border-2{border-style:var(--volr-tw-border-style);border-width:2px}.volr\\:border-4{border-style:var(--volr-tw-border-style);border-width:4px}.volr\\:border-y{border-block-style:var(--volr-tw-border-style);border-block-width:1px}.volr\\:border-t{border-top-style:var(--volr-tw-border-style);border-top-width:1px}.volr\\:border-b{border-bottom-style:var(--volr-tw-border-style);border-bottom-width:1px}.volr\\:border-amber-200{border-color:var(--volr-color-amber-200)}.volr\\:border-red-200{border-color:var(--volr-color-red-200)}.volr\\:border-slate-100{border-color:var(--volr-color-slate-100)}.volr\\:border-slate-200{border-color:var(--volr-color-slate-200)}.volr\\:border-slate-300{border-color:var(--volr-color-slate-300)}.volr\\:border-white{border-color:var(--volr-color-white)}.volr\\:border-t-slate-600{border-top-color:var(--volr-color-slate-600)}.volr\\:bg-amber-50{background-color:var(--volr-color-amber-50)}.volr\\:bg-black\\/40{background-color:var(--volr-color-black)}@supports (color:color-mix(in lab, red, red)){.volr\\:bg-black\\/40{background-color:color-mix(in oklab,var(--volr-color-black)40%,transparent)}}.volr\\:bg-black\\/45{background-color:var(--volr-color-black)}@supports (color:color-mix(in lab, red, red)){.volr\\:bg-black\\/45{background-color:color-mix(in oklab,var(--volr-color-black)45%,transparent)}}.volr\\:bg-blue-100{background-color:var(--volr-color-blue-100)}.volr\\:bg-cyan-400{background-color:var(--volr-color-cyan-400)}.volr\\:bg-emerald-300{background-color:var(--volr-color-emerald-300)}.volr\\:bg-emerald-400{background-color:var(--volr-color-emerald-400)}.volr\\:bg-green-50{background-color:var(--volr-color-green-50)}.volr\\:bg-green-100{background-color:var(--volr-color-green-100)}.volr\\:bg-red-50{background-color:var(--volr-color-red-50)}.volr\\:bg-red-100{background-color:var(--volr-color-red-100)}.volr\\:bg-slate-50{background-color:var(--volr-color-slate-50)}.volr\\:bg-slate-100{background-color:var(--volr-color-slate-100)}.volr\\:bg-slate-200{background-color:var(--volr-color-slate-200)}.volr\\:bg-slate-900{background-color:var(--volr-color-slate-900)}.volr\\:bg-teal-400{background-color:var(--volr-color-teal-400)}.volr\\:bg-white{background-color:var(--volr-color-white)}.volr\\:bg-yellow-100{background-color:var(--volr-color-yellow-100)}.volr\\:bg-linear-to-br{--volr-tw-gradient-position:to bottom right}@supports (background-image:linear-gradient(in lab, red, red)){.volr\\:bg-linear-to-br{--volr-tw-gradient-position:to bottom right in oklab}}.volr\\:bg-linear-to-br{background-image:linear-gradient(var(--volr-tw-gradient-stops))}.volr\\:bg-gradient-to-br{--volr-tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--volr-tw-gradient-stops))}.volr\\:bg-gradient-to-r{--volr-tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--volr-tw-gradient-stops))}.volr\\:from-emerald-400{--volr-tw-gradient-from:var(--volr-color-emerald-400);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}.volr\\:from-emerald-500{--volr-tw-gradient-from:var(--volr-color-emerald-500);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}.volr\\:to-teal-500{--volr-tw-gradient-to:var(--volr-color-teal-500);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}.volr\\:object-cover{object-fit:cover}.volr\\:p-1{padding:calc(var(--volr-spacing)*1)}.volr\\:p-2{padding:calc(var(--volr-spacing)*2)}.volr\\:p-3{padding:calc(var(--volr-spacing)*3)}.volr\\:p-4{padding:calc(var(--volr-spacing)*4)}.volr\\:p-5{padding:calc(var(--volr-spacing)*5)}.volr\\:p-8{padding:calc(var(--volr-spacing)*8)}.volr\\:px-1{padding-inline:calc(var(--volr-spacing)*1)}.volr\\:px-1\\.5{padding-inline:calc(var(--volr-spacing)*1.5)}.volr\\:px-2{padding-inline:calc(var(--volr-spacing)*2)}.volr\\:px-3{padding-inline:calc(var(--volr-spacing)*3)}.volr\\:px-4{padding-inline:calc(var(--volr-spacing)*4)}.volr\\:py-0\\.5{padding-block:calc(var(--volr-spacing)*.5)}.volr\\:py-1{padding-block:calc(var(--volr-spacing)*1)}.volr\\:py-1\\.5{padding-block:calc(var(--volr-spacing)*1.5)}.volr\\:py-2{padding-block:calc(var(--volr-spacing)*2)}.volr\\:py-2\\.5{padding-block:calc(var(--volr-spacing)*2.5)}.volr\\:py-3{padding-block:calc(var(--volr-spacing)*3)}.volr\\:py-4{padding-block:calc(var(--volr-spacing)*4)}.volr\\:py-6{padding-block:calc(var(--volr-spacing)*6)}.volr\\:py-8{padding-block:calc(var(--volr-spacing)*8)}.volr\\:py-12{padding-block:calc(var(--volr-spacing)*12)}.volr\\:pt-2{padding-top:calc(var(--volr-spacing)*2)}.volr\\:pt-3{padding-top:calc(var(--volr-spacing)*3)}.volr\\:pt-4{padding-top:calc(var(--volr-spacing)*4)}.volr\\:pr-3{padding-right:calc(var(--volr-spacing)*3)}.volr\\:pr-16{padding-right:calc(var(--volr-spacing)*16)}.volr\\:pl-11{padding-left:calc(var(--volr-spacing)*11)}.volr\\:text-center{text-align:center}.volr\\:text-left{text-align:left}.volr\\:text-right{text-align:right}.volr\\:align-baseline{vertical-align:baseline}.volr\\:font-mono{font-family:var(--volr-font-mono)}.volr\\:text-2xl{font-size:var(--volr-text-2xl);line-height:var(--volr-tw-leading,var(--volr-text-2xl--line-height))}.volr\\:text-3xl{font-size:var(--volr-text-3xl);line-height:var(--volr-tw-leading,var(--volr-text-3xl--line-height))}.volr\\:text-8xl{font-size:var(--volr-text-8xl);line-height:var(--volr-tw-leading,var(--volr-text-8xl--line-height))}.volr\\:text-base{font-size:var(--volr-text-base);line-height:var(--volr-tw-leading,var(--volr-text-base--line-height))}.volr\\:text-lg{font-size:var(--volr-text-lg);line-height:var(--volr-tw-leading,var(--volr-text-lg--line-height))}.volr\\:text-sm{font-size:var(--volr-text-sm);line-height:var(--volr-tw-leading,var(--volr-text-sm--line-height))}.volr\\:text-xl{font-size:var(--volr-text-xl);line-height:var(--volr-tw-leading,var(--volr-text-xl--line-height))}.volr\\:text-xs{font-size:var(--volr-text-xs);line-height:var(--volr-tw-leading,var(--volr-text-xs--line-height))}.volr\\:leading-relaxed{--volr-tw-leading:var(--volr-leading-relaxed);line-height:var(--volr-leading-relaxed)}.volr\\:font-bold{--volr-tw-font-weight:var(--volr-font-weight-bold);font-weight:var(--volr-font-weight-bold)}.volr\\:font-medium{--volr-tw-font-weight:var(--volr-font-weight-medium);font-weight:var(--volr-font-weight-medium)}.volr\\:font-semibold{--volr-tw-font-weight:var(--volr-font-weight-semibold);font-weight:var(--volr-font-weight-semibold)}.volr\\:tracking-wide{--volr-tw-tracking:var(--volr-tracking-wide);letter-spacing:var(--volr-tracking-wide)}.volr\\:break-all{word-break:break-all}.volr\\:text-amber-700{color:var(--volr-color-amber-700)}.volr\\:text-blue-700{color:var(--volr-color-blue-700)}.volr\\:text-emerald-600{color:var(--volr-color-emerald-600)}.volr\\:text-gray-500{color:var(--volr-color-gray-500)}.volr\\:text-green-600{color:var(--volr-color-green-600)}.volr\\:text-green-700{color:var(--volr-color-green-700)}.volr\\:text-red-500{color:var(--volr-color-red-500)}.volr\\:text-red-600{color:var(--volr-color-red-600)}.volr\\:text-red-700{color:var(--volr-color-red-700)}.volr\\:text-slate-100{color:var(--volr-color-slate-100)}.volr\\:text-slate-300{color:var(--volr-color-slate-300)}.volr\\:text-slate-400{color:var(--volr-color-slate-400)}.volr\\:text-slate-500{color:var(--volr-color-slate-500)}.volr\\:text-slate-600{color:var(--volr-color-slate-600)}.volr\\:text-slate-700{color:var(--volr-color-slate-700)}.volr\\:text-slate-900{color:var(--volr-color-slate-900)}.volr\\:text-white{color:var(--volr-color-white)}.volr\\:text-yellow-700{color:var(--volr-color-yellow-700)}.volr\\:capitalize{text-transform:capitalize}.volr\\:uppercase{text-transform:uppercase}.volr\\:underline{text-decoration-line:underline}.volr\\:opacity-0{opacity:0}.volr\\:opacity-25{opacity:.25}.volr\\:opacity-30{opacity:.3}.volr\\:opacity-50{opacity:.5}.volr\\:opacity-75{opacity:.75}.volr\\:shadow-2xl{--volr-tw-shadow:0 25px 50px -12px var(--volr-tw-shadow-color,#00000040);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-lg{--volr-tw-shadow:0 10px 15px -3px var(--volr-tw-shadow-color,#0000001a),0 4px 6px -4px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-md{--volr-tw-shadow:0 4px 6px -1px var(--volr-tw-shadow-color,#0000001a),0 2px 4px -2px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-sm{--volr-tw-shadow:0 1px 3px 0 var(--volr-tw-shadow-color,#0000001a),0 1px 2px -1px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-xl{--volr-tw-shadow:0 20px 25px -5px var(--volr-tw-shadow-color,#0000001a),0 8px 10px -6px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-emerald-500\\/50{--volr-tw-shadow-color:var(--volr-color-emerald-500)}@supports (color:color-mix(in lab, red, red)){.volr\\:shadow-emerald-500\\/50{--volr-tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--volr-color-emerald-500)50%,transparent)var(--volr-tw-shadow-alpha),transparent)}}.volr\\:blur-2xl{--volr-tw-blur:blur(var(--volr-blur-2xl));filter:var(--volr-tw-blur,)var(--volr-tw-brightness,)var(--volr-tw-contrast,)var(--volr-tw-grayscale,)var(--volr-tw-hue-rotate,)var(--volr-tw-invert,)var(--volr-tw-saturate,)var(--volr-tw-sepia,)var(--volr-tw-drop-shadow,)}.volr\\:transition-all{transition-property:all;transition-timing-function:var(--volr-tw-ease,var(--volr-default-transition-timing-function));transition-duration:var(--volr-tw-duration,var(--volr-default-transition-duration))}.volr\\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--volr-tw-gradient-from,--volr-tw-gradient-via,--volr-tw-gradient-to;transition-timing-function:var(--volr-tw-ease,var(--volr-default-transition-timing-function));transition-duration:var(--volr-tw-duration,var(--volr-default-transition-duration))}.volr\\:transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--volr-tw-ease,var(--volr-default-transition-timing-function));transition-duration:var(--volr-tw-duration,var(--volr-default-transition-duration))}.volr\\:duration-300{--volr-tw-duration:.3s;transition-duration:.3s}.volr\\:duration-500{--volr-tw-duration:.5s;transition-duration:.5s}.volr\\:ease-out{--volr-tw-ease:var(--volr-ease-out);transition-timing-function:var(--volr-ease-out)}.volr\\:outline-none{--volr-tw-outline-style:none;outline-style:none}@media (hover:hover){.volr\\:hover\\:border-slate-300:hover{border-color:var(--volr-color-slate-300)}.volr\\:hover\\:bg-slate-50:hover{background-color:var(--volr-color-slate-50)}.volr\\:hover\\:bg-slate-200:hover{background-color:var(--volr-color-slate-200)}.volr\\:hover\\:text-slate-700:hover{color:var(--volr-color-slate-700)}}.volr\\:focus\\:ring-2:focus{--volr-tw-ring-shadow:var(--volr-tw-ring-inset,)0 0 0 calc(2px + var(--volr-tw-ring-offset-width))var(--volr-tw-ring-color,currentcolor);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:focus\\:ring-slate-300:focus{--volr-tw-ring-color:var(--volr-color-slate-300)}.volr\\:focus\\:outline-none:focus{--volr-tw-outline-style:none;outline-style:none}.volr\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.volr\\:disabled\\:bg-slate-100:disabled{background-color:var(--volr-color-slate-100)}.volr\\:disabled\\:text-slate-400:disabled{color:var(--volr-color-slate-400)}.volr\\:disabled\\:opacity-50:disabled{opacity:.5}.volr-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.volr-text-secondary{color:var(--volr-text-secondary)}.volr-text-muted{color:var(--volr-text-muted)}.volr-bg-secondary{background-color:var(--volr-bg-secondary)}.volr-bg-tertiary{background-color:var(--volr-bg-tertiary)}.volr-border{border-color:var(--volr-border)}.volr-border-strong{border-color:var(--volr-border-strong)}.volr-divider-line{background-color:var(--volr-border)}.volr-error{background-color:var(--volr-error-bg);border-color:var(--volr-error-border);color:var(--volr-error-text)}.volr-hover:hover{background-color:var(--volr-hover-bg)}.volr-surface{background-color:var(--volr-bg)}}@property --volr-tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --volr-tw-gradient-position{syntax:"*";inherits:false}@property --volr-tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --volr-tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --volr-tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --volr-tw-gradient-stops{syntax:"*";inherits:false}@property --volr-tw-gradient-via-stops{syntax:"*";inherits:false}@property --volr-tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --volr-tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --volr-tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --volr-tw-leading{syntax:"*";inherits:false}@property --volr-tw-font-weight{syntax:"*";inherits:false}@property --volr-tw-tracking{syntax:"*";inherits:false}@property --volr-tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-shadow-color{syntax:"*";inherits:false}@property --volr-tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --volr-tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-inset-shadow-color{syntax:"*";inherits:false}@property --volr-tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --volr-tw-ring-color{syntax:"*";inherits:false}@property --volr-tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-inset-ring-color{syntax:"*";inherits:false}@property --volr-tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-ring-inset{syntax:"*";inherits:false}@property --volr-tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --volr-tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --volr-tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-blur{syntax:"*";inherits:false}@property --volr-tw-brightness{syntax:"*";inherits:false}@property --volr-tw-contrast{syntax:"*";inherits:false}@property --volr-tw-grayscale{syntax:"*";inherits:false}@property --volr-tw-hue-rotate{syntax:"*";inherits:false}@property --volr-tw-invert{syntax:"*";inherits:false}@property --volr-tw-opacity{syntax:"*";inherits:false}@property --volr-tw-saturate{syntax:"*";inherits:false}@property --volr-tw-sepia{syntax:"*";inherits:false}@property --volr-tw-drop-shadow{syntax:"*";inherits:false}@property --volr-tw-drop-shadow-color{syntax:"*";inherits:false}@property --volr-tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --volr-tw-drop-shadow-size{syntax:"*";inherits:false}@property --volr-tw-duration{syntax:"*";inherits:false}@property --volr-tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}';
|
|
740
985
|
function useResolvedTheme(theme = "light") {
|
|
741
986
|
const [resolvedTheme, setResolvedTheme] = useState(() => {
|
|
742
987
|
if (theme !== "system") return theme;
|
|
@@ -1710,34 +1955,6 @@ function MpcConnectView({
|
|
|
1710
1955
|
}
|
|
1711
1956
|
);
|
|
1712
1957
|
}
|
|
1713
|
-
var CopyButton = ({ text, className, onCopy }) => {
|
|
1714
|
-
const [copied, setCopied] = useState(false);
|
|
1715
|
-
const handleCopy = async () => {
|
|
1716
|
-
try {
|
|
1717
|
-
await navigator.clipboard.writeText(text);
|
|
1718
|
-
setCopied(true);
|
|
1719
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
1720
|
-
onCopy?.();
|
|
1721
|
-
} catch (error) {
|
|
1722
|
-
console.error("Copy failed:", error);
|
|
1723
|
-
}
|
|
1724
|
-
};
|
|
1725
|
-
return /* @__PURE__ */ jsx(
|
|
1726
|
-
"button",
|
|
1727
|
-
{
|
|
1728
|
-
onClick: handleCopy,
|
|
1729
|
-
className: cn(
|
|
1730
|
-
"volr:p-2 volr:rounded-lg volr:transition-all volr-text-muted volr-hover",
|
|
1731
|
-
className
|
|
1732
|
-
),
|
|
1733
|
-
"aria-label": "Copy",
|
|
1734
|
-
children: copied ? /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ jsx("polyline", { points: "20 6 9 17 4 12" }) }) : /* @__PURE__ */ jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
1735
|
-
/* @__PURE__ */ jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
1736
|
-
/* @__PURE__ */ jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
1737
|
-
] })
|
|
1738
|
-
}
|
|
1739
|
-
);
|
|
1740
|
-
};
|
|
1741
1958
|
function OptionButton({
|
|
1742
1959
|
icon,
|
|
1743
1960
|
title,
|
|
@@ -1894,7 +2111,7 @@ function PoweredBy() {
|
|
|
1894
2111
|
fill: "none",
|
|
1895
2112
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1896
2113
|
className: "volr:inline-block volr:h-[0.8em] volr:w-auto volr:align-baseline volr-text-secondary",
|
|
1897
|
-
style: { fill: "
|
|
2114
|
+
style: { fill: "#303030" },
|
|
1898
2115
|
"aria-label": "Volr",
|
|
1899
2116
|
children: /* @__PURE__ */ jsx(
|
|
1900
2117
|
"path",
|
|
@@ -2153,6 +2370,34 @@ function CodeInputScreen({ email, onSubmit, onResend }) {
|
|
|
2153
2370
|
)
|
|
2154
2371
|
] });
|
|
2155
2372
|
}
|
|
2373
|
+
var CopyButton = ({ text, className, onCopy }) => {
|
|
2374
|
+
const [copied, setCopied] = useState(false);
|
|
2375
|
+
const handleCopy = async () => {
|
|
2376
|
+
try {
|
|
2377
|
+
await navigator.clipboard.writeText(text);
|
|
2378
|
+
setCopied(true);
|
|
2379
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
2380
|
+
onCopy?.();
|
|
2381
|
+
} catch (error) {
|
|
2382
|
+
console.error("Copy failed:", error);
|
|
2383
|
+
}
|
|
2384
|
+
};
|
|
2385
|
+
return /* @__PURE__ */ jsx(
|
|
2386
|
+
"button",
|
|
2387
|
+
{
|
|
2388
|
+
onClick: handleCopy,
|
|
2389
|
+
className: cn(
|
|
2390
|
+
"volr:p-2 volr:rounded-lg volr:transition-all volr-text-muted volr-hover",
|
|
2391
|
+
className
|
|
2392
|
+
),
|
|
2393
|
+
"aria-label": "Copy",
|
|
2394
|
+
children: copied ? /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ jsx("polyline", { points: "20 6 9 17 4 12" }) }) : /* @__PURE__ */ jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
2395
|
+
/* @__PURE__ */ jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
2396
|
+
/* @__PURE__ */ jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
2397
|
+
] })
|
|
2398
|
+
}
|
|
2399
|
+
);
|
|
2400
|
+
};
|
|
2156
2401
|
var isMobile = () => {
|
|
2157
2402
|
if (typeof window === "undefined") return false;
|
|
2158
2403
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
@@ -2642,93 +2887,818 @@ function SigninModal({ isOpen, onClose, onError }) {
|
|
|
2642
2887
|
}
|
|
2643
2888
|
);
|
|
2644
2889
|
}
|
|
2645
|
-
function
|
|
2646
|
-
|
|
2890
|
+
function ChevronRightIcon({ className }) {
|
|
2891
|
+
return /* @__PURE__ */ jsx(
|
|
2892
|
+
"svg",
|
|
2893
|
+
{
|
|
2894
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2895
|
+
viewBox: "0 0 20 20",
|
|
2896
|
+
fill: "currentColor",
|
|
2897
|
+
className,
|
|
2898
|
+
children: /* @__PURE__ */ jsx(
|
|
2899
|
+
"path",
|
|
2900
|
+
{
|
|
2901
|
+
fillRule: "evenodd",
|
|
2902
|
+
d: "M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z",
|
|
2903
|
+
clipRule: "evenodd"
|
|
2904
|
+
}
|
|
2905
|
+
)
|
|
2906
|
+
}
|
|
2907
|
+
);
|
|
2908
|
+
}
|
|
2909
|
+
function MenuItem({ label, onClick }) {
|
|
2910
|
+
return /* @__PURE__ */ jsxs(
|
|
2911
|
+
"button",
|
|
2912
|
+
{
|
|
2913
|
+
type: "button",
|
|
2914
|
+
onClick,
|
|
2915
|
+
className: "volr:w-full volr:flex volr:items-center volr:justify-between volr:py-3 volr:px-1 volr:text-sm volr:text-slate-700 volr:border-b volr:border-slate-100 hover:volr:bg-slate-50 volr:transition-colors volr:text-left",
|
|
2916
|
+
children: [
|
|
2917
|
+
/* @__PURE__ */ jsx("span", { children: label }),
|
|
2918
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "volr:w-4 volr:h-4 volr:text-slate-300" })
|
|
2919
|
+
]
|
|
2920
|
+
}
|
|
2921
|
+
);
|
|
2922
|
+
}
|
|
2923
|
+
function AccountMainView({
|
|
2924
|
+
totalUsd,
|
|
2925
|
+
isLoading,
|
|
2926
|
+
paymentEnabled,
|
|
2927
|
+
onNavigate,
|
|
2928
|
+
onLogout,
|
|
2929
|
+
isLoggingOut
|
|
2930
|
+
}) {
|
|
2647
2931
|
const { t } = useI18n();
|
|
2648
|
-
const
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
}
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2932
|
+
const formattedUsd = isLoading ? "\u2014" : totalUsd.toLocaleString("en-US", {
|
|
2933
|
+
style: "currency",
|
|
2934
|
+
currency: "USD",
|
|
2935
|
+
minimumFractionDigits: 2,
|
|
2936
|
+
maximumFractionDigits: 2
|
|
2937
|
+
});
|
|
2938
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
2939
|
+
/* @__PURE__ */ jsx("div", { className: "volr:py-8 volr:text-center", children: isLoading ? /* @__PURE__ */ jsxs("div", { className: "volr:animate-pulse", children: [
|
|
2940
|
+
/* @__PURE__ */ jsx("div", { className: "volr:h-9 volr:w-32 volr:bg-slate-200 volr:rounded volr:mx-auto volr:mb-2" }),
|
|
2941
|
+
/* @__PURE__ */ jsx("div", { className: "volr:h-4 volr:w-24 volr:bg-slate-100 volr:rounded volr:mx-auto" })
|
|
2942
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2943
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-3xl volr:font-semibold volr:text-slate-900", children: formattedUsd }),
|
|
2944
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-xs volr:text-slate-400 volr:tracking-wide volr:mt-1", children: t("account.totalBalance") })
|
|
2945
|
+
] }) }),
|
|
2946
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:border-t volr:border-slate-100", children: [
|
|
2947
|
+
/* @__PURE__ */ jsx(
|
|
2948
|
+
MenuItem,
|
|
2949
|
+
{
|
|
2950
|
+
label: t("account.menu.assets"),
|
|
2951
|
+
onClick: () => onNavigate("assets")
|
|
2668
2952
|
}
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2953
|
+
),
|
|
2954
|
+
/* @__PURE__ */ jsx(
|
|
2955
|
+
MenuItem,
|
|
2956
|
+
{
|
|
2957
|
+
label: t("account.menu.withdraw"),
|
|
2958
|
+
onClick: () => onNavigate("withdraw")
|
|
2959
|
+
}
|
|
2960
|
+
),
|
|
2961
|
+
paymentEnabled && /* @__PURE__ */ jsx(
|
|
2962
|
+
MenuItem,
|
|
2963
|
+
{
|
|
2964
|
+
label: t("account.menu.payments"),
|
|
2965
|
+
onClick: () => onNavigate("payments")
|
|
2966
|
+
}
|
|
2967
|
+
),
|
|
2968
|
+
/* @__PURE__ */ jsx(
|
|
2969
|
+
MenuItem,
|
|
2970
|
+
{
|
|
2971
|
+
label: t("account.menu.account"),
|
|
2972
|
+
onClick: () => onNavigate("account")
|
|
2973
|
+
}
|
|
2974
|
+
)
|
|
2975
|
+
] }),
|
|
2976
|
+
/* @__PURE__ */ jsx("div", { className: "volr:border-t volr:border-slate-100 volr:mt-2 volr:pt-2", children: /* @__PURE__ */ jsx(
|
|
2977
|
+
"button",
|
|
2673
2978
|
{
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2979
|
+
type: "button",
|
|
2980
|
+
onClick: onLogout,
|
|
2981
|
+
disabled: isLoggingOut,
|
|
2982
|
+
className: "volr:w-full volr:py-3 volr:px-1 volr:text-sm volr:text-slate-400 volr:text-left hover:volr:text-slate-600 volr:transition-colors disabled:volr:opacity-50",
|
|
2983
|
+
children: isLoggingOut ? t("common.loading") : t("account.logout")
|
|
2679
2984
|
}
|
|
2680
|
-
) })
|
|
2985
|
+
) })
|
|
2986
|
+
] });
|
|
2987
|
+
}
|
|
2988
|
+
function TokenRow({ token }) {
|
|
2989
|
+
return /* @__PURE__ */ jsxs("div", { className: "volr:flex volr:items-center volr:justify-between volr:py-3 volr:border-b volr:border-slate-100 last:volr:border-b-0", children: [
|
|
2990
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:flex volr:items-center volr:gap-3", children: [
|
|
2991
|
+
/* @__PURE__ */ jsx("div", { className: "volr:w-8 volr:h-8 volr:rounded-full volr:bg-slate-100 volr:flex volr:items-center volr:justify-center volr:overflow-hidden volr:shrink-0", children: token.iconUrl ? /* @__PURE__ */ jsx(
|
|
2992
|
+
"img",
|
|
2993
|
+
{
|
|
2994
|
+
src: token.iconUrl,
|
|
2995
|
+
alt: token.symbol,
|
|
2996
|
+
className: "volr:w-full volr:h-full volr:object-cover"
|
|
2997
|
+
}
|
|
2998
|
+
) : /* @__PURE__ */ jsx("span", { className: "volr:text-xs volr:font-medium volr:text-slate-500", children: token.symbol.slice(0, 2) }) }),
|
|
2999
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
3000
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:font-medium volr:text-slate-900", children: token.symbol }),
|
|
3001
|
+
/* @__PURE__ */ jsxs("p", { className: "volr:text-xs volr:text-slate-400", children: [
|
|
3002
|
+
"Chain ",
|
|
3003
|
+
token.chainId
|
|
3004
|
+
] })
|
|
3005
|
+
] })
|
|
3006
|
+
] }),
|
|
3007
|
+
/* @__PURE__ */ jsx("div", { className: "volr:text-right", children: token.isLoading ? /* @__PURE__ */ jsx("div", { className: "volr:animate-pulse", children: /* @__PURE__ */ jsx("div", { className: "volr:h-4 volr:w-16 volr:bg-slate-200 volr:rounded" }) }) : token.error ? /* @__PURE__ */ jsx("p", { className: "volr:text-xs volr:text-red-500", children: "Error" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3008
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:font-medium volr:text-slate-900", children: token.balance }),
|
|
3009
|
+
token.balanceUsd !== void 0 && token.balanceUsd > 0 && /* @__PURE__ */ jsxs("p", { className: "volr:text-xs volr:text-slate-400", children: [
|
|
3010
|
+
"$",
|
|
3011
|
+
token.balanceUsd.toFixed(2)
|
|
3012
|
+
] })
|
|
3013
|
+
] }) })
|
|
3014
|
+
] });
|
|
3015
|
+
}
|
|
3016
|
+
function BalanceDetailView({
|
|
3017
|
+
balances,
|
|
3018
|
+
isLoading
|
|
3019
|
+
}) {
|
|
3020
|
+
const { t } = useI18n();
|
|
3021
|
+
if (isLoading && balances.length === 0) {
|
|
3022
|
+
return /* @__PURE__ */ jsx("div", { className: "volr:py-8", children: /* @__PURE__ */ jsx("div", { className: "volr:animate-pulse volr:space-y-4", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsxs("div", { className: "volr:flex volr:items-center volr:gap-3", children: [
|
|
3023
|
+
/* @__PURE__ */ jsx("div", { className: "volr:w-8 volr:h-8 volr:rounded-full volr:bg-slate-200" }),
|
|
3024
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:flex-1", children: [
|
|
3025
|
+
/* @__PURE__ */ jsx("div", { className: "volr:h-4 volr:w-16 volr:bg-slate-200 volr:rounded volr:mb-1" }),
|
|
3026
|
+
/* @__PURE__ */ jsx("div", { className: "volr:h-3 volr:w-12 volr:bg-slate-100 volr:rounded" })
|
|
3027
|
+
] }),
|
|
3028
|
+
/* @__PURE__ */ jsx("div", { className: "volr:h-4 volr:w-16 volr:bg-slate-200 volr:rounded" })
|
|
3029
|
+
] }, i)) }) });
|
|
2681
3030
|
}
|
|
2682
|
-
|
|
2683
|
-
|
|
3031
|
+
if (balances.length === 0) {
|
|
3032
|
+
return /* @__PURE__ */ jsx("div", { className: "volr:py-12 volr:text-center", children: /* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:text-slate-400", children: t("account.noAssets") }) });
|
|
3033
|
+
}
|
|
3034
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
3035
|
+
/* @__PURE__ */ jsx("h2", { className: "volr:text-lg volr:font-semibold volr:text-slate-900 volr:mb-4", children: t("account.menu.assets") }),
|
|
3036
|
+
/* @__PURE__ */ jsx("div", { children: balances.map((token) => /* @__PURE__ */ jsx(TokenRow, { token }, token.id)) })
|
|
3037
|
+
] });
|
|
3038
|
+
}
|
|
3039
|
+
var Input = React13.forwardRef(
|
|
3040
|
+
({ leftIcon, error, className, style, disabled, ...props }, ref) => {
|
|
3041
|
+
return /* @__PURE__ */ jsxs("div", { className: "volr:relative", children: [
|
|
3042
|
+
leftIcon && /* @__PURE__ */ jsx("div", { className: "volr:absolute volr:left-3 volr:top-1/2 volr:-translate-y-1/2 volr:pointer-events-none volr-text-muted", children: leftIcon }),
|
|
3043
|
+
/* @__PURE__ */ jsx(
|
|
3044
|
+
"input",
|
|
3045
|
+
{
|
|
3046
|
+
ref,
|
|
3047
|
+
disabled,
|
|
3048
|
+
className: cn(
|
|
3049
|
+
"volr:w-full volr:text-base volr:outline-none volr:transition-all volr:rounded-lg volr:py-3 volr:disabled:cursor-not-allowed volr-surface",
|
|
3050
|
+
leftIcon ? "volr:pl-11 volr:pr-3" : "volr:px-3",
|
|
3051
|
+
error ? "volr:border volr-error" : "volr:border volr-border-strong",
|
|
3052
|
+
className
|
|
3053
|
+
),
|
|
3054
|
+
style,
|
|
3055
|
+
...props
|
|
3056
|
+
}
|
|
3057
|
+
)
|
|
3058
|
+
] });
|
|
3059
|
+
}
|
|
3060
|
+
);
|
|
3061
|
+
Input.displayName = "Input";
|
|
3062
|
+
function WithdrawView({
|
|
3063
|
+
balances,
|
|
3064
|
+
connectedWallet,
|
|
3065
|
+
onSuccess
|
|
3066
|
+
}) {
|
|
3067
|
+
const { t } = useI18n();
|
|
3068
|
+
const { withdraw, isWithdrawing, result, error, reset } = useWithdraw();
|
|
3069
|
+
const [step, setStep] = useState("select");
|
|
3070
|
+
const [selectedTokenId, setSelectedTokenId] = useState(null);
|
|
3071
|
+
const [toAddress, setToAddress] = useState("");
|
|
3072
|
+
const [amount, setAmount] = useState("");
|
|
3073
|
+
const [useConnectedWallet, setUseConnectedWallet] = useState(false);
|
|
3074
|
+
const selectedToken = useMemo(
|
|
3075
|
+
() => balances.find((b) => b.id === selectedTokenId),
|
|
3076
|
+
[balances, selectedTokenId]
|
|
3077
|
+
);
|
|
3078
|
+
const connectedAddress = useMemo(() => {
|
|
3079
|
+
if (!connectedWallet) return null;
|
|
3080
|
+
const parts = connectedWallet.split(":");
|
|
3081
|
+
return parts.length >= 2 ? parts[1] : null;
|
|
3082
|
+
}, [connectedWallet]);
|
|
3083
|
+
const handleSelectToken = (tokenId) => {
|
|
3084
|
+
setSelectedTokenId(tokenId);
|
|
3085
|
+
setStep("input");
|
|
3086
|
+
};
|
|
3087
|
+
const handleUseConnectedWallet = () => {
|
|
3088
|
+
if (connectedAddress) {
|
|
3089
|
+
setToAddress(connectedAddress);
|
|
3090
|
+
setUseConnectedWallet(true);
|
|
3091
|
+
}
|
|
3092
|
+
};
|
|
3093
|
+
const handleConfirm = async () => {
|
|
3094
|
+
if (!selectedToken || !toAddress || !amount) return;
|
|
3095
|
+
setStep("confirm");
|
|
2684
3096
|
try {
|
|
2685
|
-
await
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
3097
|
+
await withdraw({
|
|
3098
|
+
chainId: selectedToken.chainId,
|
|
3099
|
+
tokenAddress: selectedToken.address,
|
|
3100
|
+
decimals: selectedToken.decimals,
|
|
3101
|
+
amount,
|
|
3102
|
+
to: toAddress
|
|
3103
|
+
});
|
|
3104
|
+
setStep("result");
|
|
3105
|
+
} catch {
|
|
3106
|
+
setStep("result");
|
|
2693
3107
|
}
|
|
2694
3108
|
};
|
|
2695
|
-
const
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
3109
|
+
const handleReset = () => {
|
|
3110
|
+
reset();
|
|
3111
|
+
setStep("select");
|
|
3112
|
+
setSelectedTokenId(null);
|
|
3113
|
+
setToAddress("");
|
|
3114
|
+
setAmount("");
|
|
3115
|
+
setUseConnectedWallet(false);
|
|
3116
|
+
};
|
|
3117
|
+
const isAmountValid = useMemo(() => {
|
|
3118
|
+
if (!amount || !selectedToken) return false;
|
|
3119
|
+
const num = parseFloat(amount);
|
|
3120
|
+
if (isNaN(num) || num <= 0) return false;
|
|
3121
|
+
const balance = parseFloat(selectedToken.balance.replace(/,/g, ""));
|
|
3122
|
+
return num <= balance;
|
|
3123
|
+
}, [amount, selectedToken]);
|
|
3124
|
+
const isAddressValid = /^0x[a-fA-F0-9]{40}$/.test(toAddress);
|
|
3125
|
+
if (step === "select") {
|
|
3126
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
3127
|
+
/* @__PURE__ */ jsx("h2", { className: "volr:text-lg volr:font-semibold volr:text-slate-900 volr:mb-4", children: t("account.withdraw.selectToken") }),
|
|
3128
|
+
/* @__PURE__ */ jsx("div", { className: "volr:space-y-2", children: balances.map((token) => /* @__PURE__ */ jsxs(
|
|
3129
|
+
"button",
|
|
3130
|
+
{
|
|
3131
|
+
type: "button",
|
|
3132
|
+
onClick: () => handleSelectToken(token.id),
|
|
3133
|
+
disabled: token.balanceRaw === 0n,
|
|
3134
|
+
className: "volr:w-full volr:flex volr:items-center volr:justify-between volr:p-3 volr:rounded-lg volr:border volr:border-slate-200 hover:volr:bg-slate-50 volr:transition-colors disabled:volr:opacity-50 disabled:volr:cursor-not-allowed",
|
|
3135
|
+
children: [
|
|
3136
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:flex volr:items-center volr:gap-3", children: [
|
|
3137
|
+
/* @__PURE__ */ jsx("div", { className: "volr:w-8 volr:h-8 volr:rounded-full volr:bg-slate-100 volr:flex volr:items-center volr:justify-center volr:overflow-hidden", children: token.iconUrl ? /* @__PURE__ */ jsx(
|
|
3138
|
+
"img",
|
|
3139
|
+
{
|
|
3140
|
+
src: token.iconUrl,
|
|
3141
|
+
alt: token.symbol,
|
|
3142
|
+
className: "volr:w-full volr:h-full volr:object-cover"
|
|
3143
|
+
}
|
|
3144
|
+
) : /* @__PURE__ */ jsx("span", { className: "volr:text-xs volr:font-medium volr:text-slate-500", children: token.symbol.slice(0, 2) }) }),
|
|
3145
|
+
/* @__PURE__ */ jsx("span", { className: "volr:text-sm volr:font-medium volr:text-slate-900", children: token.symbol })
|
|
3146
|
+
] }),
|
|
3147
|
+
/* @__PURE__ */ jsx("span", { className: "volr:text-sm volr:text-slate-500", children: token.balance })
|
|
3148
|
+
]
|
|
3149
|
+
},
|
|
3150
|
+
token.id
|
|
3151
|
+
)) })
|
|
3152
|
+
] });
|
|
3153
|
+
}
|
|
3154
|
+
if (step === "input" && selectedToken) {
|
|
3155
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
3156
|
+
/* @__PURE__ */ jsx("h2", { className: "volr:text-lg volr:font-semibold volr:text-slate-900 volr:mb-4", children: t("account.withdraw.title") }),
|
|
3157
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:flex volr:items-center volr:gap-3 volr:p-3 volr:rounded-lg volr:bg-slate-50 volr:mb-4", children: [
|
|
3158
|
+
/* @__PURE__ */ jsx("div", { className: "volr:w-8 volr:h-8 volr:rounded-full volr:bg-slate-200 volr:flex volr:items-center volr:justify-center volr:overflow-hidden", children: selectedToken.iconUrl ? /* @__PURE__ */ jsx(
|
|
3159
|
+
"img",
|
|
3160
|
+
{
|
|
3161
|
+
src: selectedToken.iconUrl,
|
|
3162
|
+
alt: selectedToken.symbol,
|
|
3163
|
+
className: "volr:w-full volr:h-full volr:object-cover"
|
|
3164
|
+
}
|
|
3165
|
+
) : /* @__PURE__ */ jsx("span", { className: "volr:text-xs volr:font-medium volr:text-slate-500", children: selectedToken.symbol.slice(0, 2) }) }),
|
|
3166
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
3167
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:font-medium volr:text-slate-900", children: selectedToken.symbol }),
|
|
3168
|
+
/* @__PURE__ */ jsxs("p", { className: "volr:text-xs volr:text-slate-400", children: [
|
|
3169
|
+
t("account.withdraw.available"),
|
|
3170
|
+
": ",
|
|
3171
|
+
selectedToken.balance
|
|
3172
|
+
] })
|
|
3173
|
+
] })
|
|
3174
|
+
] }),
|
|
3175
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:mb-4", children: [
|
|
3176
|
+
/* @__PURE__ */ jsx("label", { className: "volr:block volr:text-sm volr:text-slate-600 volr:mb-2", children: t("account.withdraw.toAddress") }),
|
|
3177
|
+
/* @__PURE__ */ jsx(
|
|
3178
|
+
Input,
|
|
3179
|
+
{
|
|
3180
|
+
type: "text",
|
|
3181
|
+
placeholder: "0x...",
|
|
3182
|
+
value: toAddress,
|
|
3183
|
+
onChange: (e) => {
|
|
3184
|
+
setToAddress(e.target.value);
|
|
3185
|
+
setUseConnectedWallet(false);
|
|
3186
|
+
}
|
|
3187
|
+
}
|
|
3188
|
+
),
|
|
3189
|
+
connectedAddress && !useConnectedWallet && /* @__PURE__ */ jsx(
|
|
3190
|
+
"button",
|
|
3191
|
+
{
|
|
3192
|
+
type: "button",
|
|
3193
|
+
onClick: handleUseConnectedWallet,
|
|
3194
|
+
className: "volr:mt-2 volr:text-xs volr:text-slate-500 hover:volr:text-slate-700 volr:underline",
|
|
3195
|
+
children: t("account.withdraw.useConnectedWallet")
|
|
3196
|
+
}
|
|
3197
|
+
)
|
|
3198
|
+
] }),
|
|
3199
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:mb-6", children: [
|
|
3200
|
+
/* @__PURE__ */ jsx("label", { className: "volr:block volr:text-sm volr:text-slate-600 volr:mb-2", children: t("account.withdraw.amount") }),
|
|
3201
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:relative", children: [
|
|
3202
|
+
/* @__PURE__ */ jsx(
|
|
3203
|
+
Input,
|
|
3204
|
+
{
|
|
3205
|
+
type: "text",
|
|
3206
|
+
inputMode: "decimal",
|
|
3207
|
+
placeholder: "0.00",
|
|
3208
|
+
value: amount,
|
|
3209
|
+
onChange: (e) => setAmount(e.target.value)
|
|
3210
|
+
}
|
|
3211
|
+
),
|
|
2706
3212
|
/* @__PURE__ */ jsx(
|
|
2707
|
-
|
|
3213
|
+
"button",
|
|
2708
3214
|
{
|
|
2709
|
-
|
|
2710
|
-
|
|
3215
|
+
type: "button",
|
|
3216
|
+
onClick: () => setAmount(selectedToken.balance.replace(/,/g, "")),
|
|
3217
|
+
className: "volr:absolute volr:right-3 volr:top-1/2 volr:-translate-y-1/2 volr:text-xs volr:text-slate-500 hover:volr:text-slate-700 volr:font-medium",
|
|
3218
|
+
children: "MAX"
|
|
2711
3219
|
}
|
|
2712
3220
|
)
|
|
2713
|
-
] }),
|
|
2714
|
-
user.email && !user.email.includes("@wallet.") && /* @__PURE__ */ jsxs("div", { className: "volr:mt-4 volr:pt-4 volr:border-t volr-border", children: [
|
|
2715
|
-
/* @__PURE__ */ jsx("p", { className: "volr:text-xs volr:mb-1 volr-text-secondary", children: t("account.email") }),
|
|
2716
|
-
/* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:font-medium", children: user.email })
|
|
2717
3221
|
] })
|
|
2718
3222
|
] }),
|
|
2719
3223
|
/* @__PURE__ */ jsx(
|
|
2720
3224
|
Button,
|
|
2721
3225
|
{
|
|
2722
|
-
|
|
3226
|
+
onClick: handleConfirm,
|
|
3227
|
+
disabled: !isAddressValid || !isAmountValid,
|
|
2723
3228
|
fullWidth: true,
|
|
2724
|
-
|
|
2725
|
-
disabled: isLoggingOut,
|
|
2726
|
-
children: isLoggingOut ? t("common.loading") : t("account.logout")
|
|
3229
|
+
children: t("account.withdraw.confirm")
|
|
2727
3230
|
}
|
|
2728
3231
|
)
|
|
2729
|
-
] })
|
|
2730
|
-
|
|
2731
|
-
|
|
3232
|
+
] });
|
|
3233
|
+
}
|
|
3234
|
+
if (step === "confirm" && selectedToken) {
|
|
3235
|
+
return /* @__PURE__ */ jsxs("div", { className: "volr:py-8 volr:text-center", children: [
|
|
3236
|
+
/* @__PURE__ */ jsx("div", { className: "volr:animate-spin volr:w-8 volr:h-8 volr:border-2 volr:border-slate-200 volr:border-t-slate-600 volr:rounded-full volr:mx-auto volr:mb-4" }),
|
|
3237
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:text-slate-600", children: t("account.withdraw.processing") })
|
|
3238
|
+
] });
|
|
3239
|
+
}
|
|
3240
|
+
if (step === "result") {
|
|
3241
|
+
const isSuccess = result && !error;
|
|
3242
|
+
return /* @__PURE__ */ jsxs("div", { className: "volr:py-8 volr:text-center", children: [
|
|
3243
|
+
isSuccess ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3244
|
+
/* @__PURE__ */ jsx("div", { className: "volr:w-12 volr:h-12 volr:rounded-full volr:bg-green-100 volr:flex volr:items-center volr:justify-center volr:mx-auto volr:mb-4", children: /* @__PURE__ */ jsx(
|
|
3245
|
+
"svg",
|
|
3246
|
+
{
|
|
3247
|
+
className: "volr:w-6 volr:h-6 volr:text-green-600",
|
|
3248
|
+
fill: "none",
|
|
3249
|
+
viewBox: "0 0 24 24",
|
|
3250
|
+
stroke: "currentColor",
|
|
3251
|
+
children: /* @__PURE__ */ jsx(
|
|
3252
|
+
"path",
|
|
3253
|
+
{
|
|
3254
|
+
strokeLinecap: "round",
|
|
3255
|
+
strokeLinejoin: "round",
|
|
3256
|
+
strokeWidth: 2,
|
|
3257
|
+
d: "M5 13l4 4L19 7"
|
|
3258
|
+
}
|
|
3259
|
+
)
|
|
3260
|
+
}
|
|
3261
|
+
) }),
|
|
3262
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-lg volr:font-semibold volr:text-slate-900 volr:mb-2", children: t("account.withdraw.success") }),
|
|
3263
|
+
/* @__PURE__ */ jsxs("p", { className: "volr:text-sm volr:text-slate-500 volr:mb-6", children: [
|
|
3264
|
+
amount,
|
|
3265
|
+
" ",
|
|
3266
|
+
selectedToken?.symbol,
|
|
3267
|
+
" ",
|
|
3268
|
+
t("account.withdraw.sent")
|
|
3269
|
+
] })
|
|
3270
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3271
|
+
/* @__PURE__ */ jsx("div", { className: "volr:w-12 volr:h-12 volr:rounded-full volr:bg-red-100 volr:flex volr:items-center volr:justify-center volr:mx-auto volr:mb-4", children: /* @__PURE__ */ jsx(
|
|
3272
|
+
"svg",
|
|
3273
|
+
{
|
|
3274
|
+
className: "volr:w-6 volr:h-6 volr:text-red-600",
|
|
3275
|
+
fill: "none",
|
|
3276
|
+
viewBox: "0 0 24 24",
|
|
3277
|
+
stroke: "currentColor",
|
|
3278
|
+
children: /* @__PURE__ */ jsx(
|
|
3279
|
+
"path",
|
|
3280
|
+
{
|
|
3281
|
+
strokeLinecap: "round",
|
|
3282
|
+
strokeLinejoin: "round",
|
|
3283
|
+
strokeWidth: 2,
|
|
3284
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
3285
|
+
}
|
|
3286
|
+
)
|
|
3287
|
+
}
|
|
3288
|
+
) }),
|
|
3289
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-lg volr:font-semibold volr:text-slate-900 volr:mb-2", children: t("account.withdraw.failed") }),
|
|
3290
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:text-red-500 volr:mb-6", children: error?.message || t("account.withdraw.unknownError") })
|
|
3291
|
+
] }),
|
|
3292
|
+
/* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: isSuccess ? onSuccess : handleReset, fullWidth: true, children: isSuccess ? t("common.done") : t("common.tryAgain") })
|
|
3293
|
+
] });
|
|
3294
|
+
}
|
|
3295
|
+
return null;
|
|
3296
|
+
}
|
|
3297
|
+
function PaymentRow({ payment, onClick }) {
|
|
3298
|
+
const { t } = useI18n();
|
|
3299
|
+
const date = new Date(payment.createdAt);
|
|
3300
|
+
const formattedDate = date.toLocaleDateString(void 0, {
|
|
3301
|
+
month: "short",
|
|
3302
|
+
day: "numeric",
|
|
3303
|
+
year: "numeric"
|
|
3304
|
+
});
|
|
3305
|
+
const statusColors = {
|
|
3306
|
+
CONFIRMED: "volr:bg-green-100 volr:text-green-700",
|
|
3307
|
+
PENDING: "volr:bg-yellow-100 volr:text-yellow-700",
|
|
3308
|
+
PROCESSING: "volr:bg-blue-100 volr:text-blue-700",
|
|
3309
|
+
FAILED: "volr:bg-red-100 volr:text-red-700",
|
|
3310
|
+
CANCELLED: "volr:bg-slate-100 volr:text-slate-500",
|
|
3311
|
+
EXPIRED: "volr:bg-slate-100 volr:text-slate-500"
|
|
3312
|
+
};
|
|
3313
|
+
return /* @__PURE__ */ jsxs(
|
|
3314
|
+
"button",
|
|
3315
|
+
{
|
|
3316
|
+
type: "button",
|
|
3317
|
+
onClick,
|
|
3318
|
+
className: "volr:w-full volr:flex volr:items-center volr:justify-between volr:py-3 volr:border-b volr:border-slate-100 hover:volr:bg-slate-50 volr:transition-colors volr:text-left",
|
|
3319
|
+
children: [
|
|
3320
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:flex-1 volr:min-w-0", children: [
|
|
3321
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:flex volr:items-center volr:gap-2 volr:mb-1", children: [
|
|
3322
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:font-medium volr:text-slate-900 volr:truncate", children: payment.itemName || t("account.payments.payment") }),
|
|
3323
|
+
/* @__PURE__ */ jsx(
|
|
3324
|
+
"span",
|
|
3325
|
+
{
|
|
3326
|
+
className: `volr:px-1.5 volr:py-0.5 volr:text-xs volr:font-medium volr:rounded ${statusColors[payment.status] || "volr:bg-slate-100 volr:text-slate-500"}`,
|
|
3327
|
+
children: payment.status
|
|
3328
|
+
}
|
|
3329
|
+
)
|
|
3330
|
+
] }),
|
|
3331
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-xs volr:text-slate-400", children: formattedDate })
|
|
3332
|
+
] }),
|
|
3333
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:flex volr:items-center volr:gap-2", children: [
|
|
3334
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:text-right", children: [
|
|
3335
|
+
/* @__PURE__ */ jsxs("p", { className: "volr:text-sm volr:font-medium volr:text-slate-900", children: [
|
|
3336
|
+
payment.amount,
|
|
3337
|
+
" ",
|
|
3338
|
+
payment.token.symbol
|
|
3339
|
+
] }),
|
|
3340
|
+
payment.totalUsd && /* @__PURE__ */ jsxs("p", { className: "volr:text-xs volr:text-slate-400", children: [
|
|
3341
|
+
"$",
|
|
3342
|
+
parseFloat(payment.totalUsd).toFixed(2)
|
|
3343
|
+
] })
|
|
3344
|
+
] }),
|
|
3345
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "volr:w-4 volr:h-4 volr:text-slate-300" })
|
|
3346
|
+
] })
|
|
3347
|
+
]
|
|
3348
|
+
}
|
|
3349
|
+
);
|
|
3350
|
+
}
|
|
3351
|
+
function PaymentHistoryView({ onSelectPayment }) {
|
|
3352
|
+
const { t } = useI18n();
|
|
3353
|
+
const { getPaymentHistory, isLoading: isApiLoading } = useVolrPaymentApi();
|
|
3354
|
+
const [payments, setPayments] = useState([]);
|
|
3355
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
3356
|
+
const [error, setError] = useState(null);
|
|
3357
|
+
useEffect(() => {
|
|
3358
|
+
setIsLoading(true);
|
|
3359
|
+
setError(null);
|
|
3360
|
+
getPaymentHistory({ take: 20 }).then((result) => {
|
|
3361
|
+
setPayments(result.payments);
|
|
3362
|
+
}).catch((err) => {
|
|
3363
|
+
console.error("[PaymentHistoryView] Failed to fetch payments:", err);
|
|
3364
|
+
setError(t("account.payments.fetchError"));
|
|
3365
|
+
}).finally(() => {
|
|
3366
|
+
setIsLoading(false);
|
|
3367
|
+
});
|
|
3368
|
+
}, [getPaymentHistory, t]);
|
|
3369
|
+
if (isLoading || isApiLoading) {
|
|
3370
|
+
return /* @__PURE__ */ jsx("div", { className: "volr:py-8", children: /* @__PURE__ */ jsx("div", { className: "volr:animate-pulse volr:space-y-4", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsxs("div", { className: "volr:flex volr:items-center volr:justify-between volr:py-3", children: [
|
|
3371
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
3372
|
+
/* @__PURE__ */ jsx("div", { className: "volr:h-4 volr:w-32 volr:bg-slate-200 volr:rounded volr:mb-2" }),
|
|
3373
|
+
/* @__PURE__ */ jsx("div", { className: "volr:h-3 volr:w-20 volr:bg-slate-100 volr:rounded" })
|
|
3374
|
+
] }),
|
|
3375
|
+
/* @__PURE__ */ jsx("div", { className: "volr:h-4 volr:w-16 volr:bg-slate-200 volr:rounded" })
|
|
3376
|
+
] }, i)) }) });
|
|
3377
|
+
}
|
|
3378
|
+
if (error) {
|
|
3379
|
+
return /* @__PURE__ */ jsx("div", { className: "volr:py-12 volr:text-center", children: /* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:text-red-500", children: error }) });
|
|
3380
|
+
}
|
|
3381
|
+
if (payments.length === 0) {
|
|
3382
|
+
return /* @__PURE__ */ jsx("div", { className: "volr:py-12 volr:text-center", children: /* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:text-slate-400", children: t("account.payments.noPayments") }) });
|
|
3383
|
+
}
|
|
3384
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
3385
|
+
/* @__PURE__ */ jsx("h2", { className: "volr:text-lg volr:font-semibold volr:text-slate-900 volr:mb-4", children: t("account.menu.payments") }),
|
|
3386
|
+
/* @__PURE__ */ jsx("div", { children: payments.map((payment) => /* @__PURE__ */ jsx(
|
|
3387
|
+
PaymentRow,
|
|
3388
|
+
{
|
|
3389
|
+
payment,
|
|
3390
|
+
onClick: () => onSelectPayment(payment)
|
|
3391
|
+
},
|
|
3392
|
+
payment.id
|
|
3393
|
+
)) })
|
|
3394
|
+
] });
|
|
3395
|
+
}
|
|
3396
|
+
function DetailRow({ label, value, copyable, mono }) {
|
|
3397
|
+
return /* @__PURE__ */ jsxs("div", { className: "volr:flex volr:items-start volr:justify-between volr:py-2 volr:border-b volr:border-slate-100 last:volr:border-b-0", children: [
|
|
3398
|
+
/* @__PURE__ */ jsx("span", { className: "volr:text-sm volr:text-slate-500", children: label }),
|
|
3399
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:flex volr:items-center volr:gap-2", children: [
|
|
3400
|
+
/* @__PURE__ */ jsx(
|
|
3401
|
+
"span",
|
|
3402
|
+
{
|
|
3403
|
+
className: `volr:text-sm volr:text-slate-900 volr:text-right ${mono ? "volr:font-mono" : ""}`,
|
|
3404
|
+
children: value
|
|
3405
|
+
}
|
|
3406
|
+
),
|
|
3407
|
+
copyable && /* @__PURE__ */ jsx(CopyButton, { text: value, className: "volr:shrink-0" })
|
|
3408
|
+
] })
|
|
3409
|
+
] });
|
|
3410
|
+
}
|
|
3411
|
+
function PaymentDetailView({ payment }) {
|
|
3412
|
+
const { t } = useI18n();
|
|
3413
|
+
const createdDate = new Date(payment.createdAt);
|
|
3414
|
+
const formattedCreatedAt = createdDate.toLocaleString(void 0, {
|
|
3415
|
+
year: "numeric",
|
|
3416
|
+
month: "short",
|
|
3417
|
+
day: "numeric",
|
|
3418
|
+
hour: "2-digit",
|
|
3419
|
+
minute: "2-digit"
|
|
3420
|
+
});
|
|
3421
|
+
const confirmedDate = payment.confirmedAt ? new Date(payment.confirmedAt) : null;
|
|
3422
|
+
const formattedConfirmedAt = confirmedDate ? confirmedDate.toLocaleString(void 0, {
|
|
3423
|
+
year: "numeric",
|
|
3424
|
+
month: "short",
|
|
3425
|
+
day: "numeric",
|
|
3426
|
+
hour: "2-digit",
|
|
3427
|
+
minute: "2-digit"
|
|
3428
|
+
}) : null;
|
|
3429
|
+
const statusColors = {
|
|
3430
|
+
CONFIRMED: "volr:bg-green-100 volr:text-green-700",
|
|
3431
|
+
PENDING: "volr:bg-yellow-100 volr:text-yellow-700",
|
|
3432
|
+
PROCESSING: "volr:bg-blue-100 volr:text-blue-700",
|
|
3433
|
+
FAILED: "volr:bg-red-100 volr:text-red-700",
|
|
3434
|
+
CANCELLED: "volr:bg-slate-100 volr:text-slate-500",
|
|
3435
|
+
EXPIRED: "volr:bg-slate-100 volr:text-slate-500"
|
|
3436
|
+
};
|
|
3437
|
+
const truncateHash = (hash) => {
|
|
3438
|
+
if (hash.length <= 16) return hash;
|
|
3439
|
+
return `${hash.slice(0, 8)}...${hash.slice(-6)}`;
|
|
3440
|
+
};
|
|
3441
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
3442
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:mb-6", children: [
|
|
3443
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:flex volr:items-center volr:gap-2 volr:mb-2", children: [
|
|
3444
|
+
/* @__PURE__ */ jsx("h2", { className: "volr:text-lg volr:font-semibold volr:text-slate-900", children: payment.itemName || t("account.payments.payment") }),
|
|
3445
|
+
/* @__PURE__ */ jsx(
|
|
3446
|
+
"span",
|
|
3447
|
+
{
|
|
3448
|
+
className: `volr:px-2 volr:py-0.5 volr:text-xs volr:font-medium volr:rounded ${statusColors[payment.status] || "volr:bg-slate-100 volr:text-slate-500"}`,
|
|
3449
|
+
children: payment.status
|
|
3450
|
+
}
|
|
3451
|
+
)
|
|
3452
|
+
] }),
|
|
3453
|
+
payment.itemDescription && /* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:text-slate-500", children: payment.itemDescription })
|
|
3454
|
+
] }),
|
|
3455
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:py-4 volr:mb-4 volr:border-y volr:border-slate-100", children: [
|
|
3456
|
+
/* @__PURE__ */ jsxs("p", { className: "volr:text-2xl volr:font-semibold volr:text-slate-900", children: [
|
|
3457
|
+
payment.amount,
|
|
3458
|
+
" ",
|
|
3459
|
+
payment.token.symbol
|
|
3460
|
+
] }),
|
|
3461
|
+
payment.totalUsd && /* @__PURE__ */ jsxs("p", { className: "volr:text-sm volr:text-slate-500", children: [
|
|
3462
|
+
"\u2248 $",
|
|
3463
|
+
parseFloat(payment.totalUsd).toFixed(2),
|
|
3464
|
+
" USD"
|
|
3465
|
+
] })
|
|
3466
|
+
] }),
|
|
3467
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:space-y-1", children: [
|
|
3468
|
+
/* @__PURE__ */ jsx(DetailRow, { label: t("account.payments.createdAt"), value: formattedCreatedAt }),
|
|
3469
|
+
formattedConfirmedAt && /* @__PURE__ */ jsx(DetailRow, { label: t("account.payments.confirmedAt"), value: formattedConfirmedAt }),
|
|
3470
|
+
/* @__PURE__ */ jsx(
|
|
3471
|
+
DetailRow,
|
|
3472
|
+
{
|
|
3473
|
+
label: t("account.payments.token"),
|
|
3474
|
+
value: `${payment.token.symbol} (Chain ${payment.token.chainId})`
|
|
3475
|
+
}
|
|
3476
|
+
),
|
|
3477
|
+
payment.txHash && /* @__PURE__ */ jsx(
|
|
3478
|
+
DetailRow,
|
|
3479
|
+
{
|
|
3480
|
+
label: t("account.payments.txHash"),
|
|
3481
|
+
value: truncateHash(payment.txHash),
|
|
3482
|
+
copyable: true,
|
|
3483
|
+
mono: true
|
|
3484
|
+
}
|
|
3485
|
+
),
|
|
3486
|
+
payment.referenceId && /* @__PURE__ */ jsx(
|
|
3487
|
+
DetailRow,
|
|
3488
|
+
{
|
|
3489
|
+
label: t("account.payments.referenceId"),
|
|
3490
|
+
value: payment.referenceId,
|
|
3491
|
+
copyable: true
|
|
3492
|
+
}
|
|
3493
|
+
)
|
|
3494
|
+
] }),
|
|
3495
|
+
payment.itemImage && /* @__PURE__ */ jsx("div", { className: "volr:mt-6", children: /* @__PURE__ */ jsx(
|
|
3496
|
+
"img",
|
|
3497
|
+
{
|
|
3498
|
+
src: payment.itemImage,
|
|
3499
|
+
alt: payment.itemName || "Item",
|
|
3500
|
+
className: "volr:w-full volr:h-40 volr:object-cover volr:rounded-lg"
|
|
3501
|
+
}
|
|
3502
|
+
) })
|
|
3503
|
+
] });
|
|
3504
|
+
}
|
|
3505
|
+
function InfoRow({ label, value, copyable, mono }) {
|
|
3506
|
+
return /* @__PURE__ */ jsxs("div", { className: "volr:py-3 volr:border-b volr:border-slate-100 last:volr:border-b-0", children: [
|
|
3507
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-xs volr:text-slate-400 volr:mb-1", children: label }),
|
|
3508
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:flex volr:items-center volr:justify-between volr:gap-2", children: [
|
|
3509
|
+
/* @__PURE__ */ jsx(
|
|
3510
|
+
"p",
|
|
3511
|
+
{
|
|
3512
|
+
className: `volr:text-sm volr:text-slate-900 volr:break-all ${mono ? "volr:font-mono" : ""}`,
|
|
3513
|
+
children: value
|
|
3514
|
+
}
|
|
3515
|
+
),
|
|
3516
|
+
copyable && /* @__PURE__ */ jsx(CopyButton, { text: value, className: "volr:shrink-0" })
|
|
3517
|
+
] })
|
|
3518
|
+
] });
|
|
3519
|
+
}
|
|
3520
|
+
function AccountInfoView({ user }) {
|
|
3521
|
+
const { t } = useI18n();
|
|
3522
|
+
const getLoginMethod = () => {
|
|
3523
|
+
if (user.authWallet) {
|
|
3524
|
+
return t("account.info.loginMethod.wallet");
|
|
3525
|
+
}
|
|
3526
|
+
if (user.email?.includes("@google.")) {
|
|
3527
|
+
return t("account.info.loginMethod.google");
|
|
3528
|
+
}
|
|
3529
|
+
if (user.email?.includes("@twitter.") || user.email?.includes("@x.")) {
|
|
3530
|
+
return t("account.info.loginMethod.twitter");
|
|
3531
|
+
}
|
|
3532
|
+
if (user.email?.includes("@wallet.")) {
|
|
3533
|
+
return t("account.info.loginMethod.wallet");
|
|
3534
|
+
}
|
|
3535
|
+
return t("account.info.loginMethod.email");
|
|
3536
|
+
};
|
|
3537
|
+
const formatAddress = (address) => {
|
|
3538
|
+
if (address.length <= 16) return address;
|
|
3539
|
+
return `${address.slice(0, 6)}...${address.slice(-4)}`;
|
|
3540
|
+
};
|
|
3541
|
+
const externalWallet = user.authWallet ? user.authWallet.split(":")[1] || user.authWallet : null;
|
|
3542
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
3543
|
+
/* @__PURE__ */ jsx("h2", { className: "volr:text-lg volr:font-semibold volr:text-slate-900 volr:mb-4", children: t("account.menu.account") }),
|
|
3544
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
3545
|
+
/* @__PURE__ */ jsx(InfoRow, { label: t("account.info.loginMethod.label"), value: getLoginMethod() }),
|
|
3546
|
+
user.email && !user.email.includes("@wallet.") && /* @__PURE__ */ jsx(InfoRow, { label: t("account.email"), value: user.email }),
|
|
3547
|
+
user.evmAddress && /* @__PURE__ */ jsx(
|
|
3548
|
+
InfoRow,
|
|
3549
|
+
{
|
|
3550
|
+
label: t("account.walletAddress"),
|
|
3551
|
+
value: formatAddress(user.evmAddress),
|
|
3552
|
+
copyable: true,
|
|
3553
|
+
mono: true
|
|
3554
|
+
}
|
|
3555
|
+
),
|
|
3556
|
+
externalWallet && /* @__PURE__ */ jsx(
|
|
3557
|
+
InfoRow,
|
|
3558
|
+
{
|
|
3559
|
+
label: t("account.info.connectedWallet"),
|
|
3560
|
+
value: formatAddress(externalWallet),
|
|
3561
|
+
copyable: true,
|
|
3562
|
+
mono: true
|
|
3563
|
+
}
|
|
3564
|
+
),
|
|
3565
|
+
user.signerType && /* @__PURE__ */ jsx(
|
|
3566
|
+
InfoRow,
|
|
3567
|
+
{
|
|
3568
|
+
label: t("account.info.signerType"),
|
|
3569
|
+
value: user.signerType === "passkey" ? "Passkey" : user.signerType
|
|
3570
|
+
}
|
|
3571
|
+
)
|
|
3572
|
+
] })
|
|
3573
|
+
] });
|
|
3574
|
+
}
|
|
3575
|
+
function AccountModal({ isOpen, onClose, onError }) {
|
|
3576
|
+
const { user, logout } = useVolrContext();
|
|
3577
|
+
const { balances, totalUsd, isLoading, paymentEnabled, refresh } = useUserBalances();
|
|
3578
|
+
const [currentView, setCurrentView] = useState("main");
|
|
3579
|
+
const [selectedPayment, setSelectedPayment] = useState(null);
|
|
3580
|
+
const [isLoggingOut, setIsLoggingOut] = useState(false);
|
|
3581
|
+
const handleOpenChange = useCallback((open) => {
|
|
3582
|
+
if (!open) {
|
|
3583
|
+
onClose();
|
|
3584
|
+
setTimeout(() => {
|
|
3585
|
+
setCurrentView("main");
|
|
3586
|
+
setSelectedPayment(null);
|
|
3587
|
+
}, 200);
|
|
3588
|
+
}
|
|
3589
|
+
}, [onClose]);
|
|
3590
|
+
if (!user) {
|
|
3591
|
+
return /* @__PURE__ */ jsx(SigninModal, { isOpen, onClose, onError });
|
|
3592
|
+
}
|
|
3593
|
+
if (!user.keyStorageType) {
|
|
3594
|
+
const handlePasskeyComplete = () => {
|
|
3595
|
+
onClose();
|
|
3596
|
+
};
|
|
3597
|
+
const handlePasskeyError = (error) => {
|
|
3598
|
+
if (onError) onError(error);
|
|
3599
|
+
};
|
|
3600
|
+
const handleLogoutFromPasskey = async () => {
|
|
3601
|
+
try {
|
|
3602
|
+
await logout();
|
|
3603
|
+
onClose();
|
|
3604
|
+
} catch (error) {
|
|
3605
|
+
if (onError) {
|
|
3606
|
+
onError(error instanceof Error ? error : new Error("Logout failed"));
|
|
3607
|
+
}
|
|
3608
|
+
}
|
|
3609
|
+
};
|
|
3610
|
+
return /* @__PURE__ */ jsx(Modal, { open: isOpen, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsx(
|
|
3611
|
+
PasskeyEnrollView,
|
|
3612
|
+
{
|
|
3613
|
+
wrapInModal: false,
|
|
3614
|
+
onComplete: handlePasskeyComplete,
|
|
3615
|
+
onError: handlePasskeyError,
|
|
3616
|
+
onLogout: handleLogoutFromPasskey,
|
|
3617
|
+
onClose
|
|
3618
|
+
}
|
|
3619
|
+
) });
|
|
3620
|
+
}
|
|
3621
|
+
const handleLogout = async () => {
|
|
3622
|
+
setIsLoggingOut(true);
|
|
3623
|
+
try {
|
|
3624
|
+
await logout();
|
|
3625
|
+
onClose();
|
|
3626
|
+
} catch (error) {
|
|
3627
|
+
if (onError) {
|
|
3628
|
+
onError(error instanceof Error ? error : new Error("Logout failed"));
|
|
3629
|
+
}
|
|
3630
|
+
} finally {
|
|
3631
|
+
setIsLoggingOut(false);
|
|
3632
|
+
}
|
|
3633
|
+
};
|
|
3634
|
+
const handleNavigate = (view) => {
|
|
3635
|
+
setCurrentView(view);
|
|
3636
|
+
};
|
|
3637
|
+
const handleBack = () => {
|
|
3638
|
+
if (selectedPayment) {
|
|
3639
|
+
setSelectedPayment(null);
|
|
3640
|
+
setCurrentView("payments");
|
|
3641
|
+
} else {
|
|
3642
|
+
setCurrentView("main");
|
|
3643
|
+
}
|
|
3644
|
+
};
|
|
3645
|
+
const handleSelectPayment = (payment) => {
|
|
3646
|
+
setSelectedPayment(payment);
|
|
3647
|
+
};
|
|
3648
|
+
const handleWithdrawSuccess = () => {
|
|
3649
|
+
refresh();
|
|
3650
|
+
setCurrentView("main");
|
|
3651
|
+
};
|
|
3652
|
+
const showBack = currentView !== "main" || selectedPayment !== null;
|
|
3653
|
+
const renderContent = () => {
|
|
3654
|
+
if (selectedPayment) {
|
|
3655
|
+
return /* @__PURE__ */ jsx(PaymentDetailView, { payment: selectedPayment });
|
|
3656
|
+
}
|
|
3657
|
+
switch (currentView) {
|
|
3658
|
+
case "main":
|
|
3659
|
+
return /* @__PURE__ */ jsx(
|
|
3660
|
+
AccountMainView,
|
|
3661
|
+
{
|
|
3662
|
+
totalUsd,
|
|
3663
|
+
balances,
|
|
3664
|
+
isLoading,
|
|
3665
|
+
paymentEnabled,
|
|
3666
|
+
onNavigate: handleNavigate,
|
|
3667
|
+
onLogout: handleLogout,
|
|
3668
|
+
isLoggingOut
|
|
3669
|
+
}
|
|
3670
|
+
);
|
|
3671
|
+
case "assets":
|
|
3672
|
+
return /* @__PURE__ */ jsx(BalanceDetailView, { balances, isLoading });
|
|
3673
|
+
case "withdraw":
|
|
3674
|
+
return /* @__PURE__ */ jsx(
|
|
3675
|
+
WithdrawView,
|
|
3676
|
+
{
|
|
3677
|
+
balances,
|
|
3678
|
+
connectedWallet: user.authWallet,
|
|
3679
|
+
onSuccess: handleWithdrawSuccess
|
|
3680
|
+
}
|
|
3681
|
+
);
|
|
3682
|
+
case "payments":
|
|
3683
|
+
return /* @__PURE__ */ jsx(PaymentHistoryView, { onSelectPayment: handleSelectPayment });
|
|
3684
|
+
case "account":
|
|
3685
|
+
return /* @__PURE__ */ jsx(AccountInfoView, { user });
|
|
3686
|
+
default:
|
|
3687
|
+
return null;
|
|
3688
|
+
}
|
|
3689
|
+
};
|
|
3690
|
+
return /* @__PURE__ */ jsxs(Modal, { open: isOpen, onOpenChange: handleOpenChange, children: [
|
|
3691
|
+
/* @__PURE__ */ jsx(
|
|
3692
|
+
ModalHeader,
|
|
3693
|
+
{
|
|
3694
|
+
back: showBack,
|
|
3695
|
+
onBack: showBack ? handleBack : void 0,
|
|
3696
|
+
onClose
|
|
3697
|
+
}
|
|
3698
|
+
),
|
|
3699
|
+
renderContent()
|
|
3700
|
+
] });
|
|
3701
|
+
}
|
|
2732
3702
|
function AssetSelectView({
|
|
2733
3703
|
assets,
|
|
2734
3704
|
onSelect
|
|
@@ -2744,72 +3714,449 @@ function AssetSelectView({
|
|
|
2744
3714
|
return /* @__PURE__ */ jsxs(
|
|
2745
3715
|
"button",
|
|
2746
3716
|
{
|
|
2747
|
-
className: cn(
|
|
2748
|
-
"volr:w-full volr:p-4 volr:rounded-xl volr:border-2",
|
|
2749
|
-
"volr:text-left volr:transition-all",
|
|
2750
|
-
"volr:flex volr:items-center volr:gap-4",
|
|
2751
|
-
"volr-border volr-hover"
|
|
2752
|
-
),
|
|
2753
|
-
onClick: () => onSelect(idx),
|
|
3717
|
+
className: cn(
|
|
3718
|
+
"volr:w-full volr:p-4 volr:rounded-xl volr:border-2",
|
|
3719
|
+
"volr:text-left volr:transition-all",
|
|
3720
|
+
"volr:flex volr:items-center volr:gap-4",
|
|
3721
|
+
"volr-border volr-hover"
|
|
3722
|
+
),
|
|
3723
|
+
onClick: () => onSelect(idx),
|
|
3724
|
+
children: [
|
|
3725
|
+
/* @__PURE__ */ jsx("div", { className: "volr:shrink-0", children: !isNative && a.token.iconUrl ? /* @__PURE__ */ jsx(
|
|
3726
|
+
"img",
|
|
3727
|
+
{
|
|
3728
|
+
alt: a.token.symbol,
|
|
3729
|
+
src: a.token.iconUrl,
|
|
3730
|
+
className: "volr:w-10 volr:h-10 volr:rounded-full volr:border volr-border"
|
|
3731
|
+
}
|
|
3732
|
+
) : /* @__PURE__ */ jsx("div", { className: "volr:w-10 volr:h-10 volr:rounded-full volr:flex volr:items-center volr:justify-center volr:text-white volr:font-bold volr:text-sm volr-bg-tertiary", children: tokenSymbol.slice(0, 2) }) }),
|
|
3733
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:flex-1 volr:min-w-0", children: [
|
|
3734
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:flex volr:items-center volr:gap-2 volr:mb-1", children: [
|
|
3735
|
+
/* @__PURE__ */ jsx("span", { className: "volr:text-base volr:font-semibold", children: tokenSymbol }),
|
|
3736
|
+
/* @__PURE__ */ jsxs("span", { className: "volr:text-xs volr:px-2 volr:py-0.5 volr:rounded-full volr:font-medium volr-bg-secondary volr-text-secondary", children: [
|
|
3737
|
+
"Chain ",
|
|
3738
|
+
a.chainId
|
|
3739
|
+
] })
|
|
3740
|
+
] }),
|
|
3741
|
+
/* @__PURE__ */ jsx("div", { className: "volr:text-sm volr-text-secondary", children: tokenName }),
|
|
3742
|
+
!isNative && /* @__PURE__ */ jsx("div", { className: "volr:text-xs volr:font-mono volr:truncate volr:mt-1 volr-text-muted", children: a.token.address })
|
|
3743
|
+
] }),
|
|
3744
|
+
/* @__PURE__ */ jsx("div", { className: "volr:shrink-0 volr-text-muted", children: /* @__PURE__ */ jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx("polyline", { points: "9 18 15 12 9 6" }) }) })
|
|
3745
|
+
]
|
|
3746
|
+
},
|
|
3747
|
+
`${a.chainId}-${idx}`
|
|
3748
|
+
);
|
|
3749
|
+
}) })
|
|
3750
|
+
] });
|
|
3751
|
+
}
|
|
3752
|
+
var TextLinkButton = React13.forwardRef(({ showArrow = false, className, children, ...props }, ref) => {
|
|
3753
|
+
return /* @__PURE__ */ jsxs(
|
|
3754
|
+
"button",
|
|
3755
|
+
{
|
|
3756
|
+
ref,
|
|
3757
|
+
type: "button",
|
|
3758
|
+
className: cn(
|
|
3759
|
+
"volr:underline volr:transition-colors volr-text-secondary",
|
|
3760
|
+
className
|
|
3761
|
+
),
|
|
3762
|
+
...props,
|
|
3763
|
+
children: [
|
|
3764
|
+
children,
|
|
3765
|
+
showArrow && " \u2192"
|
|
3766
|
+
]
|
|
3767
|
+
}
|
|
3768
|
+
);
|
|
3769
|
+
});
|
|
3770
|
+
TextLinkButton.displayName = "TextLinkButton";
|
|
3771
|
+
var OtherTokenModal = ({
|
|
3772
|
+
open,
|
|
3773
|
+
onOpenChange
|
|
3774
|
+
}) => {
|
|
3775
|
+
return /* @__PURE__ */ jsxs(Modal, { open, onOpenChange, children: [
|
|
3776
|
+
/* @__PURE__ */ jsx(ModalHeader, { onClose: () => onOpenChange(false) }),
|
|
3777
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:text-center", children: [
|
|
3778
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-lg volr:font-semibold volr:mb-2", children: "Coming Soon" }),
|
|
3779
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-sm volr-text-secondary", children: "Swap and bridge recommendations will be available here soon." })
|
|
3780
|
+
] })
|
|
3781
|
+
] });
|
|
3782
|
+
};
|
|
3783
|
+
|
|
3784
|
+
// ../node_modules/viem/_esm/errors/unit.js
|
|
3785
|
+
init_base();
|
|
3786
|
+
var InvalidDecimalNumberError = class extends BaseError {
|
|
3787
|
+
constructor({ value }) {
|
|
3788
|
+
super(`Number \`${value}\` is not a valid decimal number.`, {
|
|
3789
|
+
name: "InvalidDecimalNumberError"
|
|
3790
|
+
});
|
|
3791
|
+
}
|
|
3792
|
+
};
|
|
3793
|
+
|
|
3794
|
+
// ../node_modules/viem/_esm/utils/unit/parseUnits.js
|
|
3795
|
+
function parseUnits(value, decimals) {
|
|
3796
|
+
if (!/^(-?)([0-9]*)\.?([0-9]*)$/.test(value))
|
|
3797
|
+
throw new InvalidDecimalNumberError({ value });
|
|
3798
|
+
let [integer, fraction = "0"] = value.split(".");
|
|
3799
|
+
const negative = integer.startsWith("-");
|
|
3800
|
+
if (negative)
|
|
3801
|
+
integer = integer.slice(1);
|
|
3802
|
+
fraction = fraction.replace(/(0+)$/, "");
|
|
3803
|
+
if (decimals === 0) {
|
|
3804
|
+
if (Math.round(Number(`.${fraction}`)) === 1)
|
|
3805
|
+
integer = `${BigInt(integer) + 1n}`;
|
|
3806
|
+
fraction = "";
|
|
3807
|
+
} else if (fraction.length > decimals) {
|
|
3808
|
+
const [left, unit, right] = [
|
|
3809
|
+
fraction.slice(0, decimals - 1),
|
|
3810
|
+
fraction.slice(decimals - 1, decimals),
|
|
3811
|
+
fraction.slice(decimals)
|
|
3812
|
+
];
|
|
3813
|
+
const rounded = Math.round(Number(`${unit}.${right}`));
|
|
3814
|
+
if (rounded > 9)
|
|
3815
|
+
fraction = `${BigInt(left) + BigInt(1)}0`.padStart(left.length + 1, "0");
|
|
3816
|
+
else
|
|
3817
|
+
fraction = `${left}${rounded}`;
|
|
3818
|
+
if (fraction.length > decimals) {
|
|
3819
|
+
fraction = fraction.slice(1);
|
|
3820
|
+
integer = `${BigInt(integer) + 1n}`;
|
|
3821
|
+
}
|
|
3822
|
+
fraction = fraction.slice(0, decimals);
|
|
3823
|
+
} else {
|
|
3824
|
+
fraction = fraction.padEnd(decimals, "0");
|
|
3825
|
+
}
|
|
3826
|
+
return BigInt(`${negative ? "-" : ""}${integer}${fraction}`);
|
|
3827
|
+
}
|
|
3828
|
+
|
|
3829
|
+
// ../node_modules/viem/_esm/index.js
|
|
3830
|
+
init_abis();
|
|
3831
|
+
init_formatUnits();
|
|
3832
|
+
var DefaultWalletIcon2 = () => /* @__PURE__ */ jsxs(
|
|
3833
|
+
"svg",
|
|
3834
|
+
{
|
|
3835
|
+
className: "volr:w-6 volr:h-6",
|
|
3836
|
+
viewBox: "0 0 24 24",
|
|
3837
|
+
fill: "none",
|
|
3838
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3839
|
+
children: [
|
|
3840
|
+
/* @__PURE__ */ jsx(
|
|
3841
|
+
"rect",
|
|
3842
|
+
{
|
|
3843
|
+
x: "2",
|
|
3844
|
+
y: "6",
|
|
3845
|
+
width: "20",
|
|
3846
|
+
height: "14",
|
|
3847
|
+
rx: "2",
|
|
3848
|
+
stroke: "currentColor",
|
|
3849
|
+
strokeWidth: "1.5"
|
|
3850
|
+
}
|
|
3851
|
+
),
|
|
3852
|
+
/* @__PURE__ */ jsx(
|
|
3853
|
+
"path",
|
|
3854
|
+
{
|
|
3855
|
+
d: "M17 12.5C17 13.3284 16.3284 14 15.5 14C14.6716 14 14 13.3284 14 12.5C14 11.6716 14.6716 11 15.5 11C16.3284 11 17 11.6716 17 12.5Z",
|
|
3856
|
+
fill: "currentColor"
|
|
3857
|
+
}
|
|
3858
|
+
),
|
|
3859
|
+
/* @__PURE__ */ jsx(
|
|
3860
|
+
"path",
|
|
3861
|
+
{
|
|
3862
|
+
d: "M6 6V5C6 3.89543 6.89543 3 8 3H16C17.1046 3 18 3.89543 18 5V6",
|
|
3863
|
+
stroke: "currentColor",
|
|
3864
|
+
strokeWidth: "1.5"
|
|
3865
|
+
}
|
|
3866
|
+
)
|
|
3867
|
+
]
|
|
3868
|
+
}
|
|
3869
|
+
);
|
|
3870
|
+
function WalletTransferView({
|
|
3871
|
+
chainId,
|
|
3872
|
+
asset,
|
|
3873
|
+
destinationAddress,
|
|
3874
|
+
onBack,
|
|
3875
|
+
onSuccess
|
|
3876
|
+
}) {
|
|
3877
|
+
const { t } = useI18n();
|
|
3878
|
+
const { config } = useVolrContext();
|
|
3879
|
+
const { client } = useInternalAuth();
|
|
3880
|
+
const { isDetecting, getWalletsForDisplay, hasWallet } = useEIP6963();
|
|
3881
|
+
const [viewState, setViewState] = useState("select-wallet");
|
|
3882
|
+
const [selectedWallet, setSelectedWallet] = useState(null);
|
|
3883
|
+
const [connectedAddress, setConnectedAddress] = useState(null);
|
|
3884
|
+
const [balance, setBalance] = useState(null);
|
|
3885
|
+
const [amount, setAmount] = useState("");
|
|
3886
|
+
const [isConnecting, setIsConnecting] = useState(false);
|
|
3887
|
+
const [isTransferring, setIsTransferring] = useState(false);
|
|
3888
|
+
const [error, setError] = useState(null);
|
|
3889
|
+
const [chainName, setChainName] = useState(null);
|
|
3890
|
+
const [currentChainId, setCurrentChainId] = useState(null);
|
|
3891
|
+
const tokenSymbol = asset === "native" ? "ETH" : asset.symbol;
|
|
3892
|
+
const decimals = asset === "native" ? 18 : asset.decimals;
|
|
3893
|
+
const getNetworkInfo = useCallback(
|
|
3894
|
+
createGetNetworkInfo({ client, rpcOverrides: config.rpcOverrides }),
|
|
3895
|
+
[client, config.rpcOverrides]
|
|
3896
|
+
);
|
|
3897
|
+
useEffect(() => {
|
|
3898
|
+
let cancelled = false;
|
|
3899
|
+
const loadChainName = async () => {
|
|
3900
|
+
try {
|
|
3901
|
+
const info = await getNetworkInfo(chainId, false);
|
|
3902
|
+
if (!cancelled) setChainName(info.name);
|
|
3903
|
+
} catch {
|
|
3904
|
+
if (!cancelled) setChainName(`Chain ${chainId}`);
|
|
3905
|
+
}
|
|
3906
|
+
};
|
|
3907
|
+
loadChainName();
|
|
3908
|
+
return () => {
|
|
3909
|
+
cancelled = true;
|
|
3910
|
+
};
|
|
3911
|
+
}, [getNetworkInfo, chainId]);
|
|
3912
|
+
const connectWallet = useCallback(async (wallet) => {
|
|
3913
|
+
setIsConnecting(true);
|
|
3914
|
+
setError(null);
|
|
3915
|
+
try {
|
|
3916
|
+
const provider = wallet.provider;
|
|
3917
|
+
const accounts = await provider.request({ method: "eth_requestAccounts" });
|
|
3918
|
+
if (!accounts || accounts.length === 0) {
|
|
3919
|
+
throw new Error("No accounts found");
|
|
3920
|
+
}
|
|
3921
|
+
const address = accounts[0];
|
|
3922
|
+
setConnectedAddress(address);
|
|
3923
|
+
setSelectedWallet(wallet);
|
|
3924
|
+
const chainIdHex = await provider.request({ method: "eth_chainId" });
|
|
3925
|
+
const currentChain = parseInt(chainIdHex, 16);
|
|
3926
|
+
setCurrentChainId(currentChain);
|
|
3927
|
+
await fetchBalance(provider, address, currentChain);
|
|
3928
|
+
setViewState("transfer");
|
|
3929
|
+
} catch (err) {
|
|
3930
|
+
console.error("Failed to connect wallet:", err);
|
|
3931
|
+
setError(err instanceof Error ? err.message : "Connection failed");
|
|
3932
|
+
} finally {
|
|
3933
|
+
setIsConnecting(false);
|
|
3934
|
+
}
|
|
3935
|
+
}, [chainId, asset]);
|
|
3936
|
+
const fetchBalance = useCallback(async (provider, address, currentChain) => {
|
|
3937
|
+
try {
|
|
3938
|
+
if (currentChain !== chainId) {
|
|
3939
|
+
setBalance(null);
|
|
3940
|
+
return;
|
|
3941
|
+
}
|
|
3942
|
+
if (asset === "native") {
|
|
3943
|
+
const balanceHex = await provider.request({
|
|
3944
|
+
method: "eth_getBalance",
|
|
3945
|
+
params: [address, "latest"]
|
|
3946
|
+
});
|
|
3947
|
+
setBalance(BigInt(balanceHex));
|
|
3948
|
+
} else {
|
|
3949
|
+
const data = `0x70a08231000000000000000000000000${address.slice(2)}`;
|
|
3950
|
+
const result = await provider.request({
|
|
3951
|
+
method: "eth_call",
|
|
3952
|
+
params: [{ to: asset.address, data }, "latest"]
|
|
3953
|
+
});
|
|
3954
|
+
setBalance(BigInt(result));
|
|
3955
|
+
}
|
|
3956
|
+
} catch (err) {
|
|
3957
|
+
console.error("Failed to fetch balance:", err);
|
|
3958
|
+
setBalance(BigInt(0));
|
|
3959
|
+
}
|
|
3960
|
+
}, [chainId, asset]);
|
|
3961
|
+
const switchNetwork = useCallback(async () => {
|
|
3962
|
+
if (!selectedWallet?.provider) return;
|
|
3963
|
+
try {
|
|
3964
|
+
await selectedWallet.provider.request({
|
|
3965
|
+
method: "wallet_switchEthereumChain",
|
|
3966
|
+
params: [{ chainId: `0x${chainId.toString(16)}` }]
|
|
3967
|
+
});
|
|
3968
|
+
const chainIdHex = await selectedWallet.provider.request({ method: "eth_chainId" });
|
|
3969
|
+
const currentChain = parseInt(chainIdHex, 16);
|
|
3970
|
+
setCurrentChainId(currentChain);
|
|
3971
|
+
if (connectedAddress) {
|
|
3972
|
+
await fetchBalance(selectedWallet.provider, connectedAddress, currentChain);
|
|
3973
|
+
}
|
|
3974
|
+
} catch (err) {
|
|
3975
|
+
console.error("Failed to switch network:", err);
|
|
3976
|
+
setError(err instanceof Error ? err.message : "Failed to switch network");
|
|
3977
|
+
}
|
|
3978
|
+
}, [selectedWallet, chainId, connectedAddress, fetchBalance]);
|
|
3979
|
+
const executeTransfer = useCallback(async () => {
|
|
3980
|
+
if (!selectedWallet?.provider || !connectedAddress || !amount) return;
|
|
3981
|
+
setIsTransferring(true);
|
|
3982
|
+
setError(null);
|
|
3983
|
+
try {
|
|
3984
|
+
const amountWei = parseUnits(amount, decimals);
|
|
3985
|
+
if (balance !== null && amountWei > balance) {
|
|
3986
|
+
setError(t("deposit.walletTransfer.insufficientBalance"));
|
|
3987
|
+
setIsTransferring(false);
|
|
3988
|
+
return;
|
|
3989
|
+
}
|
|
3990
|
+
let txHash;
|
|
3991
|
+
if (asset === "native") {
|
|
3992
|
+
txHash = await selectedWallet.provider.request({
|
|
3993
|
+
method: "eth_sendTransaction",
|
|
3994
|
+
params: [{
|
|
3995
|
+
from: connectedAddress,
|
|
3996
|
+
to: destinationAddress,
|
|
3997
|
+
value: `0x${amountWei.toString(16)}`
|
|
3998
|
+
}]
|
|
3999
|
+
});
|
|
4000
|
+
} else {
|
|
4001
|
+
const paddedTo = destinationAddress.slice(2).padStart(64, "0");
|
|
4002
|
+
const paddedAmount = amountWei.toString(16).padStart(64, "0");
|
|
4003
|
+
const data = `0xa9059cbb${paddedTo}${paddedAmount}`;
|
|
4004
|
+
txHash = await selectedWallet.provider.request({
|
|
4005
|
+
method: "eth_sendTransaction",
|
|
4006
|
+
params: [{
|
|
4007
|
+
from: connectedAddress,
|
|
4008
|
+
to: asset.address,
|
|
4009
|
+
data
|
|
4010
|
+
}]
|
|
4011
|
+
});
|
|
4012
|
+
}
|
|
4013
|
+
console.log("Transfer tx hash:", txHash);
|
|
4014
|
+
onSuccess?.();
|
|
4015
|
+
} catch (err) {
|
|
4016
|
+
console.error("Transfer failed:", err);
|
|
4017
|
+
setError(err instanceof Error ? err.message : "Transfer failed");
|
|
4018
|
+
} finally {
|
|
4019
|
+
setIsTransferring(false);
|
|
4020
|
+
}
|
|
4021
|
+
}, [selectedWallet, connectedAddress, amount, decimals, balance, asset, destinationAddress, onSuccess, t]);
|
|
4022
|
+
const setMaxAmount = useCallback(() => {
|
|
4023
|
+
if (balance !== null) {
|
|
4024
|
+
const formatted = formatUnits(balance, decimals);
|
|
4025
|
+
setAmount(formatted);
|
|
4026
|
+
}
|
|
4027
|
+
}, [balance, decimals]);
|
|
4028
|
+
const wallets = getWalletsForDisplay();
|
|
4029
|
+
const isWrongNetwork = currentChainId !== null && currentChainId !== chainId;
|
|
4030
|
+
const formattedBalance = balance !== null ? formatUnits(balance, decimals) : null;
|
|
4031
|
+
if (viewState === "select-wallet") {
|
|
4032
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
4033
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:mb-4", children: [
|
|
4034
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-xl volr:font-semibold volr:mb-1", children: t("deposit.walletTransfer.title") }),
|
|
4035
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:text-slate-500", children: t("deposit.walletTransfer.selectWallet") })
|
|
4036
|
+
] }),
|
|
4037
|
+
isDetecting && /* @__PURE__ */ jsxs("div", { className: "volr:text-center volr:py-8", children: [
|
|
4038
|
+
/* @__PURE__ */ jsx("div", { className: "volr:animate-spin volr:w-6 volr:h-6 volr:border-2 volr:border-slate-300 volr:border-t-slate-600 volr:rounded-full volr:mx-auto" }),
|
|
4039
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:text-slate-500 volr:mt-3", children: t("common.loading") })
|
|
4040
|
+
] }),
|
|
4041
|
+
!isDetecting && !hasWallet && /* @__PURE__ */ jsx("div", { className: "volr:text-center volr:py-8", children: /* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:text-slate-500", children: t("deposit.walletTransfer.noWallets") }) }),
|
|
4042
|
+
!isDetecting && wallets.length > 0 && /* @__PURE__ */ jsx("div", { className: "volr:space-y-2", children: wallets.map((wallet) => /* @__PURE__ */ jsxs(
|
|
4043
|
+
"button",
|
|
4044
|
+
{
|
|
4045
|
+
type: "button",
|
|
4046
|
+
onClick: () => connectWallet(wallet),
|
|
4047
|
+
disabled: isConnecting,
|
|
4048
|
+
className: "volr:w-full volr:flex volr:items-center volr:gap-3 volr:p-3 volr:border volr:border-slate-200 volr:rounded-xl volr:hover:bg-slate-50 volr:transition-colors volr:disabled:opacity-50",
|
|
2754
4049
|
children: [
|
|
2755
|
-
/* @__PURE__ */ jsx("div", { className: "volr:shrink-0", children:
|
|
4050
|
+
/* @__PURE__ */ jsx("div", { className: "volr:w-10 volr:h-10 volr:rounded-lg volr:bg-slate-100 volr:flex volr:items-center volr:justify-center volr:overflow-hidden volr:flex-shrink-0", children: wallet.icon ? /* @__PURE__ */ jsx(
|
|
2756
4051
|
"img",
|
|
2757
4052
|
{
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
className: "volr:w-
|
|
4053
|
+
src: wallet.icon,
|
|
4054
|
+
alt: wallet.name,
|
|
4055
|
+
className: "volr:w-7 volr:h-7"
|
|
2761
4056
|
}
|
|
2762
|
-
) : /* @__PURE__ */ jsx("div", { className: "volr:
|
|
2763
|
-
/* @__PURE__ */
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
/* @__PURE__ */ jsx("div", { className: "volr:shrink-0 volr-text-muted", children: /* @__PURE__ */ jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx("polyline", { points: "9 18 15 12 9 6" }) }) })
|
|
4057
|
+
) : /* @__PURE__ */ jsx("div", { className: "volr:text-slate-400", children: /* @__PURE__ */ jsx(DefaultWalletIcon2, {}) }) }),
|
|
4058
|
+
/* @__PURE__ */ jsx("span", { className: "volr:flex-1 volr:text-left volr:font-medium volr:text-slate-900", children: wallet.name }),
|
|
4059
|
+
/* @__PURE__ */ jsx(
|
|
4060
|
+
"svg",
|
|
4061
|
+
{
|
|
4062
|
+
className: "volr:w-5 volr:h-5 volr:text-slate-400",
|
|
4063
|
+
fill: "none",
|
|
4064
|
+
viewBox: "0 0 24 24",
|
|
4065
|
+
stroke: "currentColor",
|
|
4066
|
+
children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" })
|
|
4067
|
+
}
|
|
4068
|
+
)
|
|
2775
4069
|
]
|
|
2776
4070
|
},
|
|
2777
|
-
|
|
2778
|
-
)
|
|
2779
|
-
|
|
4071
|
+
wallet.id
|
|
4072
|
+
)) }),
|
|
4073
|
+
error && /* @__PURE__ */ jsx("div", { className: "volr:mt-4 volr:p-3 volr:bg-red-50 volr:border volr:border-red-200 volr:rounded-lg", children: /* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:text-red-600", children: error }) }),
|
|
4074
|
+
/* @__PURE__ */ jsx("div", { className: "volr:mt-6 volr:pt-4 volr:border-t volr:border-slate-200", children: /* @__PURE__ */ jsx(Button, { variant: "ghost", onClick: onBack, className: "volr:w-full", children: t("common.back") }) })
|
|
4075
|
+
] });
|
|
4076
|
+
}
|
|
4077
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
4078
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:mb-4", children: [
|
|
4079
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-xl volr:font-semibold volr:mb-1", children: t("deposit.walletTransfer.title") }),
|
|
4080
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:flex volr:items-center volr:gap-2", children: [
|
|
4081
|
+
selectedWallet?.icon && /* @__PURE__ */ jsx("img", { src: selectedWallet.icon, alt: "", className: "volr:w-5 volr:h-5 volr:rounded" }),
|
|
4082
|
+
/* @__PURE__ */ jsxs("span", { className: "volr:text-sm volr:text-slate-500", children: [
|
|
4083
|
+
connectedAddress?.slice(0, 6),
|
|
4084
|
+
"...",
|
|
4085
|
+
connectedAddress?.slice(-4)
|
|
4086
|
+
] })
|
|
4087
|
+
] })
|
|
4088
|
+
] }),
|
|
4089
|
+
isWrongNetwork && /* @__PURE__ */ jsxs("div", { className: "volr:mb-4 volr:p-3 volr:bg-amber-50 volr:border volr:border-amber-200 volr:rounded-lg", children: [
|
|
4090
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:text-amber-700 volr:mb-2", children: t("deposit.walletTransfer.wrongNetwork", { network: chainName || `Chain ${chainId}` }) }),
|
|
4091
|
+
/* @__PURE__ */ jsx(
|
|
4092
|
+
Button,
|
|
4093
|
+
{
|
|
4094
|
+
variant: "secondary",
|
|
4095
|
+
size: "sm",
|
|
4096
|
+
onClick: switchNetwork,
|
|
4097
|
+
className: "volr:w-full",
|
|
4098
|
+
children: t("deposit.walletTransfer.switchNetwork")
|
|
4099
|
+
}
|
|
4100
|
+
)
|
|
4101
|
+
] }),
|
|
4102
|
+
/* @__PURE__ */ jsx("div", { className: "volr:mb-4 volr:p-4 volr:bg-slate-50 volr:rounded-xl volr:border volr:border-slate-200", children: /* @__PURE__ */ jsxs("div", { className: "volr:flex volr:items-center volr:justify-between", children: [
|
|
4103
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:flex volr:items-center volr:gap-2", children: [
|
|
4104
|
+
/* @__PURE__ */ jsx("span", { className: "volr:text-base volr:font-semibold", children: tokenSymbol }),
|
|
4105
|
+
/* @__PURE__ */ jsx("span", { className: "volr:text-xs volr:px-2 volr:py-0.5 volr:rounded-full volr:bg-slate-200 volr:text-slate-600", children: chainName || `Chain ${chainId}` })
|
|
4106
|
+
] }),
|
|
4107
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:text-right", children: [
|
|
4108
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-xs volr:text-slate-500", children: t("deposit.walletTransfer.balance") }),
|
|
4109
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:font-mono volr:font-medium", children: isWrongNetwork ? "-" : formattedBalance ? `${Number(formattedBalance).toFixed(4)}` : "..." })
|
|
4110
|
+
] })
|
|
4111
|
+
] }) }),
|
|
4112
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:mb-4", children: [
|
|
4113
|
+
/* @__PURE__ */ jsx("label", { className: "volr:block volr:text-sm volr:font-medium volr:text-slate-700 volr:mb-2", children: t("deposit.walletTransfer.amount") }),
|
|
4114
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:relative", children: [
|
|
4115
|
+
/* @__PURE__ */ jsx(
|
|
4116
|
+
"input",
|
|
4117
|
+
{
|
|
4118
|
+
type: "text",
|
|
4119
|
+
inputMode: "decimal",
|
|
4120
|
+
value: amount,
|
|
4121
|
+
onChange: (e) => setAmount(e.target.value),
|
|
4122
|
+
placeholder: t("deposit.walletTransfer.amountPlaceholder"),
|
|
4123
|
+
disabled: isWrongNetwork,
|
|
4124
|
+
className: "volr:w-full volr:px-4 volr:py-3 volr:pr-16 volr:border volr:border-slate-300 volr:rounded-xl volr:text-base volr:font-mono volr:focus:outline-none volr:focus:ring-2 volr:focus:ring-slate-300 volr:disabled:bg-slate-100 volr:disabled:text-slate-400"
|
|
4125
|
+
}
|
|
4126
|
+
),
|
|
4127
|
+
/* @__PURE__ */ jsx(
|
|
4128
|
+
"button",
|
|
4129
|
+
{
|
|
4130
|
+
type: "button",
|
|
4131
|
+
onClick: setMaxAmount,
|
|
4132
|
+
disabled: isWrongNetwork || balance === null,
|
|
4133
|
+
className: "volr:absolute volr:right-3 volr:top-1/2 volr:-translate-y-1/2 volr:px-2 volr:py-1 volr:text-xs volr:font-semibold volr:text-slate-600 volr:bg-slate-100 volr:rounded volr:hover:bg-slate-200 volr:disabled:opacity-50",
|
|
4134
|
+
children: t("deposit.walletTransfer.max")
|
|
4135
|
+
}
|
|
4136
|
+
)
|
|
4137
|
+
] })
|
|
4138
|
+
] }),
|
|
4139
|
+
error && /* @__PURE__ */ jsx("div", { className: "volr:mb-4 volr:p-3 volr:bg-red-50 volr:border volr:border-red-200 volr:rounded-lg", children: /* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:text-red-600", children: error }) }),
|
|
4140
|
+
/* @__PURE__ */ jsx(
|
|
4141
|
+
Button,
|
|
4142
|
+
{
|
|
4143
|
+
onClick: executeTransfer,
|
|
4144
|
+
disabled: isTransferring || !amount || isWrongNetwork,
|
|
4145
|
+
className: "volr:w-full",
|
|
4146
|
+
children: isTransferring ? t("deposit.walletTransfer.transferring") : t("deposit.walletTransfer.transfer")
|
|
4147
|
+
}
|
|
4148
|
+
),
|
|
4149
|
+
/* @__PURE__ */ jsx("div", { className: "volr:mt-3", children: /* @__PURE__ */ jsx(
|
|
4150
|
+
Button,
|
|
4151
|
+
{
|
|
4152
|
+
variant: "ghost",
|
|
4153
|
+
onClick: () => setViewState("select-wallet"),
|
|
4154
|
+
className: "volr:w-full",
|
|
4155
|
+
children: t("common.back")
|
|
4156
|
+
}
|
|
4157
|
+
) })
|
|
2780
4158
|
] });
|
|
2781
4159
|
}
|
|
2782
|
-
var TextLinkButton = React13.forwardRef(({ showArrow = false, className, children, ...props }, ref) => {
|
|
2783
|
-
return /* @__PURE__ */ jsxs(
|
|
2784
|
-
"button",
|
|
2785
|
-
{
|
|
2786
|
-
ref,
|
|
2787
|
-
type: "button",
|
|
2788
|
-
className: cn(
|
|
2789
|
-
"volr:underline volr:transition-colors volr-text-secondary",
|
|
2790
|
-
className
|
|
2791
|
-
),
|
|
2792
|
-
...props,
|
|
2793
|
-
children: [
|
|
2794
|
-
children,
|
|
2795
|
-
showArrow && " \u2192"
|
|
2796
|
-
]
|
|
2797
|
-
}
|
|
2798
|
-
);
|
|
2799
|
-
});
|
|
2800
|
-
TextLinkButton.displayName = "TextLinkButton";
|
|
2801
|
-
var OtherTokenModal = ({
|
|
2802
|
-
open,
|
|
2803
|
-
onOpenChange
|
|
2804
|
-
}) => {
|
|
2805
|
-
return /* @__PURE__ */ jsxs(Modal, { open, onOpenChange, children: [
|
|
2806
|
-
/* @__PURE__ */ jsx(ModalHeader, { onClose: () => onOpenChange(false) }),
|
|
2807
|
-
/* @__PURE__ */ jsxs("div", { className: "volr:text-center", children: [
|
|
2808
|
-
/* @__PURE__ */ jsx("p", { className: "volr:text-lg volr:font-semibold volr:mb-2", children: "Coming Soon" }),
|
|
2809
|
-
/* @__PURE__ */ jsx("p", { className: "volr:text-sm volr-text-secondary", children: "Swap and bridge recommendations will be available here soon." })
|
|
2810
|
-
] })
|
|
2811
|
-
] });
|
|
2812
|
-
};
|
|
2813
4160
|
var DepositQRStatusOverlay = ({
|
|
2814
4161
|
status
|
|
2815
4162
|
}) => {
|
|
@@ -3048,112 +4395,129 @@ var DepositCompletedToast = ({
|
|
|
3048
4395
|
return trimmedFraction ? `${whole}.${trimmedFraction}` : `${whole}`;
|
|
3049
4396
|
};
|
|
3050
4397
|
const formattedDelta = formatAmount(delta);
|
|
3051
|
-
return /* @__PURE__ */ jsxs(
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
"
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
4398
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4399
|
+
/* @__PURE__ */ jsx(
|
|
4400
|
+
"div",
|
|
4401
|
+
{
|
|
4402
|
+
className: "volr:absolute volr:inset-0 volr:bg-black/40 volr:z-40",
|
|
4403
|
+
onClick: onClose,
|
|
4404
|
+
style: { animation: "volrFadeIn 0.2s ease-out" }
|
|
4405
|
+
}
|
|
4406
|
+
),
|
|
4407
|
+
/* @__PURE__ */ jsxs(
|
|
4408
|
+
"div",
|
|
4409
|
+
{
|
|
4410
|
+
className: cn(
|
|
4411
|
+
// Position: centered at bottom with margin
|
|
4412
|
+
"volr:absolute volr:bottom-3 volr:left-3 volr:right-3 volr:z-50",
|
|
4413
|
+
// Appearance: floating card
|
|
4414
|
+
"volr:bg-white volr:rounded-2xl",
|
|
4415
|
+
// Border: full border for clear card definition
|
|
4416
|
+
"volr:border volr:border-slate-200",
|
|
4417
|
+
// Shadow: strong shadow for floating effect
|
|
4418
|
+
"volr:shadow-2xl",
|
|
4419
|
+
// Animation
|
|
4420
|
+
"volr:transition-all volr:duration-300 volr:ease-out"
|
|
4421
|
+
),
|
|
4422
|
+
style: {
|
|
4423
|
+
animation: "volrSlideUp 0.3s ease-out"
|
|
4424
|
+
},
|
|
4425
|
+
children: [
|
|
4426
|
+
/* @__PURE__ */ jsx("div", { className: "volr:h-1 volr:bg-gradient-to-r volr:from-emerald-400 volr:to-teal-500 volr:rounded-t-2xl" }),
|
|
4427
|
+
/* @__PURE__ */ jsx("div", { className: "volr:p-4", children: /* @__PURE__ */ jsxs("div", { className: "volr:flex volr:items-start volr:gap-3", children: [
|
|
4428
|
+
/* @__PURE__ */ jsx("div", { className: "volr:shrink-0 volr:w-10 volr:h-10 volr:rounded-full volr:bg-gradient-to-br volr:from-emerald-500 volr:to-teal-500 volr:flex volr:items-center volr:justify-center volr:shadow-md", children: /* @__PURE__ */ jsx(
|
|
4429
|
+
"svg",
|
|
4430
|
+
{
|
|
4431
|
+
width: "20",
|
|
4432
|
+
height: "20",
|
|
4433
|
+
viewBox: "0 0 24 24",
|
|
4434
|
+
fill: "none",
|
|
4435
|
+
stroke: "white",
|
|
4436
|
+
strokeWidth: "2.5",
|
|
4437
|
+
strokeLinecap: "round",
|
|
4438
|
+
strokeLinejoin: "round",
|
|
4439
|
+
children: /* @__PURE__ */ jsx("polyline", { points: "20 6 9 17 4 12" })
|
|
4440
|
+
}
|
|
4441
|
+
) }),
|
|
4442
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:flex-1 volr:min-w-0", children: [
|
|
4443
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:flex volr:items-start volr:justify-between volr:gap-2 volr:mb-1", children: [
|
|
4444
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:font-semibold volr:text-slate-900", children: t("deposit.completed") }),
|
|
4445
|
+
/* @__PURE__ */ jsx(
|
|
4446
|
+
"button",
|
|
4447
|
+
{
|
|
4448
|
+
onClick: onClose,
|
|
4449
|
+
className: "volr:shrink-0 volr:w-6 volr:h-6 volr:flex volr:items-center volr:justify-center volr:rounded-full volr:transition-colors volr:bg-slate-100 volr:text-slate-500 volr:hover:bg-slate-200",
|
|
4450
|
+
"aria-label": "Close",
|
|
4451
|
+
children: /* @__PURE__ */ jsxs(
|
|
4452
|
+
"svg",
|
|
4453
|
+
{
|
|
4454
|
+
width: "14",
|
|
4455
|
+
height: "14",
|
|
4456
|
+
viewBox: "0 0 24 24",
|
|
4457
|
+
fill: "none",
|
|
4458
|
+
stroke: "currentColor",
|
|
4459
|
+
strokeWidth: "2.5",
|
|
4460
|
+
children: [
|
|
4461
|
+
/* @__PURE__ */ jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
4462
|
+
/* @__PURE__ */ jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
4463
|
+
]
|
|
4464
|
+
}
|
|
4465
|
+
)
|
|
4466
|
+
}
|
|
4467
|
+
)
|
|
4468
|
+
] }),
|
|
4469
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:font-medium volr:text-slate-700 volr:mb-3", children: t("deposit.completedAmount", { amount: formattedDelta, symbol }) }),
|
|
4470
|
+
expanded && /* @__PURE__ */ jsxs(
|
|
4471
|
+
"div",
|
|
4472
|
+
{
|
|
4473
|
+
className: "volr:space-y-2 volr:mb-3 volr:p-3 volr:rounded-lg volr:bg-slate-50 volr:border volr:border-slate-200",
|
|
4474
|
+
style: { animation: "volrFadeIn 0.2s ease-out" },
|
|
4475
|
+
children: [
|
|
4476
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:flex volr:justify-between volr:text-xs", children: [
|
|
4477
|
+
/* @__PURE__ */ jsx("span", { className: "volr:text-slate-500", children: t("deposit.amount") }),
|
|
4478
|
+
/* @__PURE__ */ jsxs("span", { className: "volr:font-mono volr:text-emerald-600 volr:font-semibold", children: [
|
|
4479
|
+
"+",
|
|
4480
|
+
formattedDelta,
|
|
4481
|
+
" ",
|
|
4482
|
+
symbol
|
|
4483
|
+
] })
|
|
4484
|
+
] }),
|
|
4485
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:flex volr:justify-between volr:text-xs", children: [
|
|
4486
|
+
/* @__PURE__ */ jsx("span", { className: "volr:text-slate-500", children: t("deposit.previousBalance") }),
|
|
4487
|
+
/* @__PURE__ */ jsxs("span", { className: "volr:font-mono volr:text-slate-500", children: [
|
|
4488
|
+
formatAmount(previousBalance),
|
|
4489
|
+
" ",
|
|
4490
|
+
symbol
|
|
4491
|
+
] })
|
|
4492
|
+
] }),
|
|
4493
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:flex volr:justify-between volr:text-xs volr:pt-2 volr:border-t volr:border-slate-200", children: [
|
|
4494
|
+
/* @__PURE__ */ jsx("span", { className: "volr:text-slate-500", children: t("deposit.newBalance") }),
|
|
4495
|
+
/* @__PURE__ */ jsxs("span", { className: "volr:font-mono volr:font-semibold volr:text-slate-900", children: [
|
|
4496
|
+
formatAmount(newBalance),
|
|
4497
|
+
" ",
|
|
4498
|
+
symbol
|
|
4499
|
+
] })
|
|
4500
|
+
] })
|
|
4501
|
+
]
|
|
4502
|
+
}
|
|
4503
|
+
),
|
|
3091
4504
|
/* @__PURE__ */ jsx(
|
|
3092
4505
|
"button",
|
|
3093
4506
|
{
|
|
3094
|
-
onClick:
|
|
3095
|
-
className: "volr:
|
|
3096
|
-
"
|
|
3097
|
-
children: /* @__PURE__ */ jsxs(
|
|
3098
|
-
"svg",
|
|
3099
|
-
{
|
|
3100
|
-
width: "14",
|
|
3101
|
-
height: "14",
|
|
3102
|
-
viewBox: "0 0 24 24",
|
|
3103
|
-
fill: "none",
|
|
3104
|
-
stroke: "currentColor",
|
|
3105
|
-
strokeWidth: "2.5",
|
|
3106
|
-
children: [
|
|
3107
|
-
/* @__PURE__ */ jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
3108
|
-
/* @__PURE__ */ jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
3109
|
-
]
|
|
3110
|
-
}
|
|
3111
|
-
)
|
|
4507
|
+
onClick: () => setExpanded(!expanded),
|
|
4508
|
+
className: "volr:w-full volr:py-2.5 volr:text-xs volr:font-medium volr:rounded-lg volr:transition-colors volr:bg-slate-100 volr:text-slate-600 volr:border volr:border-slate-200 volr:hover:bg-slate-200",
|
|
4509
|
+
children: expanded ? t("deposit.seeLess") : t("deposit.seeMore")
|
|
3112
4510
|
}
|
|
3113
4511
|
)
|
|
3114
|
-
] })
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
"+",
|
|
3121
|
-
formattedDelta,
|
|
3122
|
-
" ",
|
|
3123
|
-
symbol
|
|
3124
|
-
] })
|
|
3125
|
-
] }),
|
|
3126
|
-
/* @__PURE__ */ jsxs("div", { className: "volr:flex volr:justify-between volr:text-xs", children: [
|
|
3127
|
-
/* @__PURE__ */ jsx("span", { className: "volr-text-secondary", children: t("deposit.previousBalance") }),
|
|
3128
|
-
/* @__PURE__ */ jsxs("span", { className: "volr:font-mono volr-text-secondary", children: [
|
|
3129
|
-
formatAmount(previousBalance),
|
|
3130
|
-
" ",
|
|
3131
|
-
symbol
|
|
3132
|
-
] })
|
|
3133
|
-
] }),
|
|
3134
|
-
/* @__PURE__ */ jsxs("div", { className: "volr:flex volr:justify-between volr:text-xs volr:pt-2 volr:border-t volr-border", children: [
|
|
3135
|
-
/* @__PURE__ */ jsx("span", { className: "volr-text-secondary", children: t("deposit.newBalance") }),
|
|
3136
|
-
/* @__PURE__ */ jsxs("span", { className: "volr:font-mono volr:font-semibold", children: [
|
|
3137
|
-
formatAmount(newBalance),
|
|
3138
|
-
" ",
|
|
3139
|
-
symbol
|
|
3140
|
-
] })
|
|
3141
|
-
] })
|
|
3142
|
-
] }),
|
|
3143
|
-
/* @__PURE__ */ jsx(
|
|
3144
|
-
"button",
|
|
3145
|
-
{
|
|
3146
|
-
onClick: () => setExpanded(!expanded),
|
|
3147
|
-
className: "volr:w-full volr:py-2.5 volr:text-xs volr:font-medium volr:rounded-lg volr:transition-colors volr:border volr-bg-secondary volr-text-secondary volr-border volr-hover",
|
|
3148
|
-
children: expanded ? t("deposit.seeLess") : t("deposit.seeMore")
|
|
3149
|
-
}
|
|
3150
|
-
)
|
|
3151
|
-
] })
|
|
3152
|
-
] }) }),
|
|
3153
|
-
/* @__PURE__ */ jsx("style", { children: `
|
|
4512
|
+
] })
|
|
4513
|
+
] }) })
|
|
4514
|
+
]
|
|
4515
|
+
}
|
|
4516
|
+
),
|
|
4517
|
+
/* @__PURE__ */ jsx("style", { children: `
|
|
3154
4518
|
@keyframes volrSlideUp {
|
|
3155
4519
|
from {
|
|
3156
|
-
transform: translateY(
|
|
4520
|
+
transform: translateY(20px);
|
|
3157
4521
|
opacity: 0;
|
|
3158
4522
|
}
|
|
3159
4523
|
to {
|
|
@@ -3170,9 +4534,7 @@ var DepositCompletedToast = ({
|
|
|
3170
4534
|
}
|
|
3171
4535
|
}
|
|
3172
4536
|
` })
|
|
3173
|
-
|
|
3174
|
-
}
|
|
3175
|
-
);
|
|
4537
|
+
] });
|
|
3176
4538
|
};
|
|
3177
4539
|
var DepositSkeleton = () => {
|
|
3178
4540
|
return /* @__PURE__ */ jsxs("div", { className: "volr:animate-pulse", children: [
|
|
@@ -3197,6 +4559,7 @@ function DepositQRView(props) {
|
|
|
3197
4559
|
const [showOtherTokenModal, setShowOtherTokenModal] = useState(false);
|
|
3198
4560
|
const [showToast, setShowToast] = useState(false);
|
|
3199
4561
|
const [toastData, setToastData] = useState(null);
|
|
4562
|
+
const [viewMode, setViewMode] = useState("qr");
|
|
3200
4563
|
const eip681 = `ethereum:${props.address}`;
|
|
3201
4564
|
const status = useDepositListener({
|
|
3202
4565
|
chainId: props.chainId,
|
|
@@ -3245,6 +4608,36 @@ function DepositQRView(props) {
|
|
|
3245
4608
|
const tokenSymbol = props.asset === "native" ? "ETH" : props.asset.symbol;
|
|
3246
4609
|
const displayChainName = chainName || `Chain ${props.chainId}`;
|
|
3247
4610
|
const decimals = props.asset === "native" ? 18 : props.asset.decimals;
|
|
4611
|
+
if (viewMode === "wallet-transfer") {
|
|
4612
|
+
return /* @__PURE__ */ jsxs("div", { className: "volr:relative", children: [
|
|
4613
|
+
/* @__PURE__ */ jsx(
|
|
4614
|
+
WalletTransferView,
|
|
4615
|
+
{
|
|
4616
|
+
chainId: props.chainId,
|
|
4617
|
+
asset: props.asset,
|
|
4618
|
+
destinationAddress: props.address,
|
|
4619
|
+
onBack: () => setViewMode("qr"),
|
|
4620
|
+
onSuccess: () => {
|
|
4621
|
+
setViewMode("qr");
|
|
4622
|
+
}
|
|
4623
|
+
}
|
|
4624
|
+
),
|
|
4625
|
+
showToast && toastData && /* @__PURE__ */ jsx(
|
|
4626
|
+
DepositCompletedToast,
|
|
4627
|
+
{
|
|
4628
|
+
onClose: () => {
|
|
4629
|
+
setShowToast(false);
|
|
4630
|
+
setToastData(null);
|
|
4631
|
+
},
|
|
4632
|
+
previousBalance: toastData.previousBalance,
|
|
4633
|
+
newBalance: toastData.newBalance,
|
|
4634
|
+
delta: toastData.delta,
|
|
4635
|
+
decimals,
|
|
4636
|
+
symbol: tokenSymbol
|
|
4637
|
+
}
|
|
4638
|
+
)
|
|
4639
|
+
] });
|
|
4640
|
+
}
|
|
3248
4641
|
return /* @__PURE__ */ jsxs("div", { className: "volr:relative", children: [
|
|
3249
4642
|
/* @__PURE__ */ jsxs("div", { className: "volr:mb-4", children: [
|
|
3250
4643
|
/* @__PURE__ */ jsx("p", { className: "volr:text-xl volr:font-semibold volr:mb-2", children: t("deposit.qrTitle") }),
|
|
@@ -3290,7 +4683,33 @@ function DepositQRView(props) {
|
|
|
3290
4683
|
] }) }) }),
|
|
3291
4684
|
status.state === "error" && /* @__PURE__ */ jsx("div", { className: "volr:text-xs volr:text-center volr:mb-4 volr-error", children: status.message })
|
|
3292
4685
|
] }),
|
|
3293
|
-
/* @__PURE__ */ jsx("div", { className: "volr:
|
|
4686
|
+
/* @__PURE__ */ jsx("div", { className: "volr:mt-4", children: /* @__PURE__ */ jsxs(
|
|
4687
|
+
"button",
|
|
4688
|
+
{
|
|
4689
|
+
type: "button",
|
|
4690
|
+
onClick: () => setViewMode("wallet-transfer"),
|
|
4691
|
+
className: "volr:w-full volr:flex volr:items-center volr:justify-center volr:gap-2 volr:py-3 volr:px-4 volr:border volr:border-slate-200 volr:rounded-xl volr:text-sm volr:font-medium volr:text-slate-700 volr:bg-white volr:hover:bg-slate-50 volr:transition-colors",
|
|
4692
|
+
children: [
|
|
4693
|
+
/* @__PURE__ */ jsxs(
|
|
4694
|
+
"svg",
|
|
4695
|
+
{
|
|
4696
|
+
className: "volr:w-5 volr:h-5",
|
|
4697
|
+
viewBox: "0 0 24 24",
|
|
4698
|
+
fill: "none",
|
|
4699
|
+
stroke: "currentColor",
|
|
4700
|
+
strokeWidth: "1.5",
|
|
4701
|
+
children: [
|
|
4702
|
+
/* @__PURE__ */ jsx("rect", { x: "2", y: "6", width: "20", height: "14", rx: "2" }),
|
|
4703
|
+
/* @__PURE__ */ jsx("path", { d: "M17 12.5C17 13.3284 16.3284 14 15.5 14C14.6716 14 14 13.3284 14 12.5C14 11.6716 14.6716 11 15.5 11C16.3284 11 17 11.6716 17 12.5Z", fill: "currentColor" }),
|
|
4704
|
+
/* @__PURE__ */ jsx("path", { d: "M6 6V5C6 3.89543 6.89543 3 8 3H16C17.1046 3 18 3.89543 18 5V6" })
|
|
4705
|
+
]
|
|
4706
|
+
}
|
|
4707
|
+
),
|
|
4708
|
+
t("deposit.useWallet")
|
|
4709
|
+
]
|
|
4710
|
+
}
|
|
4711
|
+
) }),
|
|
4712
|
+
/* @__PURE__ */ jsx("div", { className: "volr:text-center volr:pt-3 volr:mt-3 volr:border-t volr-border", children: /* @__PURE__ */ jsxs("span", { className: "volr:text-xs volr-text-secondary", children: [
|
|
3294
4713
|
t("deposit.noToken"),
|
|
3295
4714
|
" ",
|
|
3296
4715
|
/* @__PURE__ */ jsx(
|
|
@@ -3337,19 +4756,40 @@ function DepositModalBody({
|
|
|
3337
4756
|
if (error) {
|
|
3338
4757
|
return /* @__PURE__ */ jsxs("div", { className: "volr:relative", children: [
|
|
3339
4758
|
/* @__PURE__ */ jsx(DepositSkeleton, {}),
|
|
3340
|
-
/* @__PURE__ */ jsx(
|
|
4759
|
+
/* @__PURE__ */ jsx(
|
|
4760
|
+
"div",
|
|
4761
|
+
{
|
|
4762
|
+
className: "volr:absolute volr:inset-0 volr:flex volr:items-center volr:justify-center volr-surface",
|
|
4763
|
+
style: { opacity: 0.9 },
|
|
4764
|
+
children: /* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:text-center volr:px-4 volr-error", children: error })
|
|
4765
|
+
}
|
|
4766
|
+
)
|
|
3341
4767
|
] });
|
|
3342
4768
|
}
|
|
3343
4769
|
if (depositAssets.length === 0) {
|
|
3344
4770
|
return /* @__PURE__ */ jsxs("div", { className: "volr:relative", children: [
|
|
3345
4771
|
/* @__PURE__ */ jsx(DepositSkeleton, {}),
|
|
3346
|
-
/* @__PURE__ */ jsx(
|
|
4772
|
+
/* @__PURE__ */ jsx(
|
|
4773
|
+
"div",
|
|
4774
|
+
{
|
|
4775
|
+
className: "volr:absolute volr:inset-0 volr:flex volr:items-center volr:justify-center volr-surface",
|
|
4776
|
+
style: { opacity: 0.9 },
|
|
4777
|
+
children: /* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:text-center volr:px-4 volr-text-secondary", children: "No payment token configured. Please contact the app developer." })
|
|
4778
|
+
}
|
|
4779
|
+
)
|
|
3347
4780
|
] });
|
|
3348
4781
|
}
|
|
3349
4782
|
if (!evmAddress) {
|
|
3350
4783
|
return /* @__PURE__ */ jsxs("div", { className: "volr:relative", children: [
|
|
3351
4784
|
/* @__PURE__ */ jsx(DepositSkeleton, {}),
|
|
3352
|
-
/* @__PURE__ */ jsx(
|
|
4785
|
+
/* @__PURE__ */ jsx(
|
|
4786
|
+
"div",
|
|
4787
|
+
{
|
|
4788
|
+
className: "volr:absolute volr:inset-0 volr:flex volr:items-center volr:justify-center volr-surface",
|
|
4789
|
+
style: { opacity: 0.9 },
|
|
4790
|
+
children: /* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:text-center volr:px-4 volr-text-secondary", children: "Wallet address is not ready. Please finish wallet setup first." })
|
|
4791
|
+
}
|
|
4792
|
+
)
|
|
3353
4793
|
] });
|
|
3354
4794
|
}
|
|
3355
4795
|
if (depositAssets.length === 1) {
|
|
@@ -3455,11 +4895,6 @@ var DepositModal = ({
|
|
|
3455
4895
|
)
|
|
3456
4896
|
] });
|
|
3457
4897
|
};
|
|
3458
|
-
|
|
3459
|
-
// ../node_modules/viem/_esm/index.js
|
|
3460
|
-
init_abis();
|
|
3461
|
-
|
|
3462
|
-
// src/hooks/usePaymentModalState.ts
|
|
3463
4898
|
var initialState = {
|
|
3464
4899
|
step: "info",
|
|
3465
4900
|
processingStep: "signing",
|
|
@@ -4569,111 +6004,86 @@ function MessageSignView({ message }) {
|
|
|
4569
6004
|
] })
|
|
4570
6005
|
] });
|
|
4571
6006
|
}
|
|
4572
|
-
function
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
6007
|
+
function TypedDataSignView({ typedData }) {
|
|
6008
|
+
const [showRawData, setShowRawData] = useState(false);
|
|
6009
|
+
const { domain, message } = typedData;
|
|
6010
|
+
const appName = domain.name;
|
|
6011
|
+
return /* @__PURE__ */ jsxs("div", { className: "volr:space-y-4", children: [
|
|
6012
|
+
appName && /* @__PURE__ */ jsxs("div", { className: "volr:flex volr:items-center volr:gap-2", children: [
|
|
6013
|
+
/* @__PURE__ */ jsx("div", { className: "volr:w-8 volr:h-8 volr:rounded-lg volr:bg-slate-100 volr:flex volr:items-center volr:justify-center", children: /* @__PURE__ */ jsx("span", { className: "volr:text-sm volr:font-medium volr:text-slate-600", children: appName.charAt(0).toUpperCase() }) }),
|
|
6014
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
6015
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:font-medium volr:text-slate-900", children: appName }),
|
|
6016
|
+
/* @__PURE__ */ jsx("p", { className: "volr:text-xs volr:text-slate-500", children: "Signature Request" })
|
|
6017
|
+
] })
|
|
6018
|
+
] }),
|
|
6019
|
+
/* @__PURE__ */ jsxs("div", { className: "volr:rounded-lg volr:bg-slate-50 volr:border volr:border-slate-200 volr:overflow-hidden", children: [
|
|
6020
|
+
/* @__PURE__ */ jsx("div", { className: "volr:px-3 volr:py-2 volr:border-b volr:border-slate-200 volr:bg-slate-100", children: /* @__PURE__ */ jsx("span", { className: "volr:text-xs volr:font-medium volr:text-slate-500 volr:uppercase volr:tracking-wide", children: "Data to Sign" }) }),
|
|
6021
|
+
/* @__PURE__ */ jsx("pre", { className: "volr:p-3 volr:text-xs volr:text-slate-700 volr:overflow-x-auto volr:max-h-48 volr:overflow-y-auto", style: { fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace" }, children: formatMessage(message) })
|
|
6022
|
+
] }),
|
|
4579
6023
|
/* @__PURE__ */ jsxs(
|
|
4580
6024
|
"button",
|
|
4581
6025
|
{
|
|
4582
6026
|
type: "button",
|
|
4583
|
-
onClick: () =>
|
|
4584
|
-
className: "volr:
|
|
6027
|
+
onClick: () => setShowRawData(!showRawData),
|
|
6028
|
+
className: "volr:text-xs volr:text-slate-500 volr:hover:text-slate-700 volr:flex volr:items-center volr:gap-1 volr:transition-colors",
|
|
4585
6029
|
children: [
|
|
4586
|
-
/* @__PURE__ */ jsx("span", { className: "volr:text-sm volr:font-medium volr-text", children: title }),
|
|
4587
6030
|
/* @__PURE__ */ jsx(
|
|
4588
6031
|
"svg",
|
|
4589
6032
|
{
|
|
4590
|
-
className: `volr:w-
|
|
6033
|
+
className: `volr:w-3 volr:h-3 volr:transition-transform ${showRawData ? "volr:rotate-90" : ""}`,
|
|
4591
6034
|
fill: "none",
|
|
4592
6035
|
viewBox: "0 0 24 24",
|
|
4593
6036
|
stroke: "currentColor",
|
|
4594
|
-
children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "
|
|
6037
|
+
children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" })
|
|
4595
6038
|
}
|
|
4596
|
-
)
|
|
6039
|
+
),
|
|
6040
|
+
showRawData ? "Hide" : "View",
|
|
6041
|
+
" technical details"
|
|
4597
6042
|
]
|
|
4598
6043
|
}
|
|
4599
6044
|
),
|
|
4600
|
-
|
|
6045
|
+
showRawData && /* @__PURE__ */ jsx("div", { className: "volr:rounded-lg volr:bg-slate-50 volr:border volr:border-slate-200 volr:overflow-hidden", children: /* @__PURE__ */ jsx("pre", { className: "volr:p-3 volr:text-xs volr:text-slate-600 volr:overflow-x-auto volr:max-h-64 volr:overflow-y-auto", style: { fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace" }, children: JSON.stringify(typedData, null, 2) }) })
|
|
4601
6046
|
] });
|
|
4602
6047
|
}
|
|
4603
|
-
function
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
return /* @__PURE__ */ jsx("span", { className: "volr:text-blue-600", children: String(value) });
|
|
6048
|
+
function formatMessage(message) {
|
|
6049
|
+
const lines = [];
|
|
6050
|
+
for (const [key, value] of Object.entries(message)) {
|
|
6051
|
+
const formattedValue = formatValue(value);
|
|
6052
|
+
lines.push(`${key}: ${formattedValue}`);
|
|
4609
6053
|
}
|
|
4610
|
-
|
|
4611
|
-
|
|
6054
|
+
return lines.join("\n");
|
|
6055
|
+
}
|
|
6056
|
+
function formatValue(value, indent = 0) {
|
|
6057
|
+
const pad = " ".repeat(indent);
|
|
6058
|
+
if (value === null || value === void 0) {
|
|
6059
|
+
return "null";
|
|
4612
6060
|
}
|
|
4613
6061
|
if (typeof value === "string") {
|
|
4614
|
-
if (value.startsWith("0x") && value.length
|
|
4615
|
-
return
|
|
4616
|
-
"span",
|
|
4617
|
-
{
|
|
4618
|
-
className: "volr:text-purple-600",
|
|
4619
|
-
style: { fontFamily: "ui-monospace, monospace", fontSize: "0.8125rem" },
|
|
4620
|
-
children: value
|
|
4621
|
-
}
|
|
4622
|
-
);
|
|
4623
|
-
}
|
|
4624
|
-
if (value.startsWith("0x")) {
|
|
4625
|
-
return /* @__PURE__ */ jsx(
|
|
4626
|
-
"span",
|
|
4627
|
-
{
|
|
4628
|
-
className: "volr:text-orange-600",
|
|
4629
|
-
style: { fontFamily: "ui-monospace, monospace", fontSize: "0.8125rem", wordBreak: "break-all" },
|
|
4630
|
-
children: value
|
|
4631
|
-
}
|
|
4632
|
-
);
|
|
6062
|
+
if (value.startsWith("0x") && value.length > 20) {
|
|
6063
|
+
return `${value.slice(0, 10)}...${value.slice(-8)}`;
|
|
4633
6064
|
}
|
|
4634
|
-
return
|
|
6065
|
+
return value;
|
|
6066
|
+
}
|
|
6067
|
+
if (typeof value === "number" || typeof value === "bigint" || typeof value === "boolean") {
|
|
6068
|
+
return String(value);
|
|
4635
6069
|
}
|
|
4636
6070
|
if (Array.isArray(value)) {
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
] }),
|
|
4643
|
-
renderValue(item, depth + 1)
|
|
4644
|
-
] }, index)) });
|
|
6071
|
+
if (value.length === 0) return "[]";
|
|
6072
|
+
const items = value.map((v, i) => `${pad} [${i}]: ${formatValue(v, indent + 1)}`);
|
|
6073
|
+
return `[
|
|
6074
|
+
${items.join("\n")}
|
|
6075
|
+
${pad}]`;
|
|
4645
6076
|
}
|
|
4646
6077
|
if (typeof value === "object") {
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
renderValue(val, depth + 1)
|
|
4654
|
-
] }, key)) });
|
|
6078
|
+
const entries = Object.entries(value);
|
|
6079
|
+
if (entries.length === 0) return "{}";
|
|
6080
|
+
const items = entries.map(([k, v]) => `${pad} ${k}: ${formatValue(v, indent + 1)}`);
|
|
6081
|
+
return `{
|
|
6082
|
+
${items.join("\n")}
|
|
6083
|
+
${pad}}`;
|
|
4655
6084
|
}
|
|
4656
6085
|
return String(value);
|
|
4657
6086
|
}
|
|
4658
|
-
function TypedDataSignView({ typedData }) {
|
|
4659
|
-
const { domain, message } = typedData;
|
|
4660
|
-
const domainInfo = {
|
|
4661
|
-
...domain.name && { Name: domain.name },
|
|
4662
|
-
...domain.version && { Version: domain.version },
|
|
4663
|
-
...domain.chainId !== void 0 && { "Chain ID": domain.chainId },
|
|
4664
|
-
...domain.verifyingContract && { Contract: domain.verifyingContract }
|
|
4665
|
-
};
|
|
4666
|
-
return /* @__PURE__ */ jsxs("div", { className: "volr:space-y-3", children: [
|
|
4667
|
-
/* @__PURE__ */ jsx(CollapsibleSection, { title: "Domain", defaultExpanded: false, children: /* @__PURE__ */ jsx("div", { className: "volr:text-sm volr:space-y-2", children: Object.entries(domainInfo).map(([key, value]) => /* @__PURE__ */ jsxs("div", { className: "volr:flex volr:gap-2 volr:flex-wrap", children: [
|
|
4668
|
-
/* @__PURE__ */ jsxs("span", { className: "volr:font-medium volr-text-secondary", children: [
|
|
4669
|
-
key,
|
|
4670
|
-
":"
|
|
4671
|
-
] }),
|
|
4672
|
-
renderValue(value)
|
|
4673
|
-
] }, key)) }) }),
|
|
4674
|
-
/* @__PURE__ */ jsx(CollapsibleSection, { title: "Message", defaultExpanded: true, children: /* @__PURE__ */ jsx("div", { className: "volr:text-sm", children: renderValue(message) }) })
|
|
4675
|
-
] });
|
|
4676
|
-
}
|
|
4677
6087
|
function SignRequestModal({ open, onOpenChange }) {
|
|
4678
6088
|
const { pendingRequest, approve, reject } = useSignRequestInternal();
|
|
4679
6089
|
const { t } = useI18n();
|