@zerodev/wallet-react-ui 0.0.12 → 0.0.13
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/_types/auth/authStoreSlice.d.ts +31 -0
- package/dist/_types/auth/authStoreSlice.d.ts.map +1 -1
- package/dist/_types/auth/components/WalletSheet/index.d.ts.map +1 -1
- package/dist/_types/auth/hooks/useAuth.d.ts +5 -0
- package/dist/_types/auth/hooks/useAuth.d.ts.map +1 -1
- package/dist/_types/auth/index.d.ts.map +1 -1
- package/dist/_types/auth/pages/SignUp/InstalledWallets.d.ts.map +1 -1
- package/dist/_types/auth/pages/SignUp/MoreWallets.d.ts.map +1 -1
- package/dist/_types/auth/pages/SignUp/Wallet.d.ts.map +1 -1
- package/dist/_types/auth/pages/Verifying.d.ts.map +1 -1
- package/dist/_types/auth/pages/WalletConnecting.d.ts +11 -0
- package/dist/_types/auth/pages/WalletConnecting.d.ts.map +1 -0
- package/dist/_types/auth/types.d.ts +1 -1
- package/dist/_types/auth/types.d.ts.map +1 -1
- package/dist/_types/auth/utils/isCancellationError.d.ts +4 -0
- package/dist/_types/auth/utils/isCancellationError.d.ts.map +1 -1
- package/dist/_types/auth/utils/isResourceUnavailableError.d.ts +12 -0
- package/dist/_types/auth/utils/isResourceUnavailableError.d.ts.map +1 -0
- package/dist/_types/connector.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +872 -723
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +4 -4
- package/src/auth/authStoreSlice.ts +72 -3
- package/src/auth/components/WalletSheet/index.tsx +9 -18
- package/src/auth/hooks/useAuth.ts +7 -0
- package/src/auth/index.tsx +3 -0
- package/src/auth/pages/SignUp/InstalledWallets.tsx +18 -28
- package/src/auth/pages/SignUp/MoreWallets.tsx +14 -26
- package/src/auth/pages/SignUp/Wallet.tsx +11 -27
- package/src/auth/pages/Verifying.tsx +28 -8
- package/src/auth/pages/WalletConnecting.tsx +237 -0
- package/src/auth/types.ts +1 -0
- package/src/auth/utils/isCancellationError.ts +20 -1
- package/src/auth/utils/isResourceUnavailableError.ts +29 -0
- package/src/connector.ts +13 -4
- package/src/shared/components/StatusScreen/index.tsx +1 -1
- package/dist/_types/shared/components/TokenSummary/index.d.ts +0 -18
- package/dist/_types/shared/components/TokenSummary/index.d.ts.map +0 -1
- package/src/shared/components/TokenSummary/index.tsx +0 -50
package/dist/index.mjs
CHANGED
|
@@ -1,82 +1,88 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Text as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useStore as
|
|
5
|
-
import { useConfig as
|
|
6
|
-
import { useSendMagicLink as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsxs as f, jsx as n, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import { Text as D, cn as G, PoweredBy as H, Button as v, Wrapper as u2, BottomSheet as f2, BottomSheetContent as p2, BottomSheetTitle as h2, BottomSheetClose as m2, QrCode as T2, Input as L2, Icon as V, ListItem as O, ListItemChevron as _, ListItemIcon as g2, Badge as Q, Screen as z2, TopNav as C2 } from "@zerodev/react-ui";
|
|
3
|
+
import { useState as x, useEffect as k, useMemo as Y, useRef as j, createContext as O2, useContext as M2, useLayoutEffect as W2, useCallback as B2, Fragment as R2 } from "react";
|
|
4
|
+
import { useStore as T, create as H2 } from "zustand";
|
|
5
|
+
import { useConfig as D2, useConnectors as W, useConnect as P2, useConnections as _2, useAccount as w2 } from "wagmi";
|
|
6
|
+
import { useSendMagicLink as x2, useSendOTP as E2, useVerifyOTP as Z2, useAuthenticateOAuth as G2, useRegisterPasskey as V2, useLoginPasskey as j2, useVerifyMagicLink as q2, zeroDevWallet as K2, NotAuthenticatedError as J2 } from "@zerodev/wallet-react";
|
|
7
|
+
import { connect as Q2 } from "@wagmi/core";
|
|
8
|
+
import { subscribeWithSelector as Y2 } from "zustand/middleware";
|
|
9
|
+
import { walletConnect as X2 } from "wagmi/connectors";
|
|
10
|
+
const $2 = "" + new URL("error.webp", import.meta.url).href, ee = "" + new URL("loading.webp", import.meta.url).href, te = "" + new URL("send.webp", import.meta.url).href, ne = "" + new URL("success.webp", import.meta.url).href, ie = {
|
|
11
|
+
error: $2,
|
|
12
|
+
loading: ee,
|
|
13
|
+
send: te,
|
|
14
|
+
success: ne
|
|
14
15
|
};
|
|
15
|
-
function
|
|
16
|
+
function N({
|
|
16
17
|
imageName: e,
|
|
17
18
|
title: t,
|
|
18
|
-
children:
|
|
19
|
+
children: o,
|
|
19
20
|
className: i
|
|
20
21
|
}) {
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ f(
|
|
22
23
|
"div",
|
|
23
24
|
{
|
|
24
|
-
className:
|
|
25
|
+
className: G("zd:flex zd:flex-col zd:gap-8 zd:items-center", i),
|
|
25
26
|
children: [
|
|
26
27
|
/* @__PURE__ */ n(
|
|
27
28
|
"img",
|
|
28
29
|
{
|
|
29
|
-
src:
|
|
30
|
+
src: ie[e],
|
|
30
31
|
alt: e,
|
|
31
|
-
className: "zd:w-[118px] zd:h-[118px] zd:bg-transparent"
|
|
32
|
+
className: "zd:w-[118px] zd:h-[118px] zd:object-contain zd:bg-transparent"
|
|
32
33
|
}
|
|
33
34
|
),
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */ n(
|
|
36
|
-
/* @__PURE__ */ n(
|
|
35
|
+
/* @__PURE__ */ f("div", { className: "zd:flex zd:flex-col zd:gap-4 zd:items-center", children: [
|
|
36
|
+
/* @__PURE__ */ n(D, { className: "zd:text-h2 zd:text-center zd:whitespace-pre-wrap", children: t }),
|
|
37
|
+
/* @__PURE__ */ n(D, { className: "zd:text-center zd:whitespace-pre-wrap", children: o })
|
|
37
38
|
] })
|
|
38
39
|
]
|
|
39
40
|
}
|
|
40
41
|
);
|
|
41
42
|
}
|
|
42
|
-
function
|
|
43
|
-
const t =
|
|
43
|
+
function y2() {
|
|
44
|
+
const t = D2().connectors.find((o) => o.id === "zerodev-wallet");
|
|
44
45
|
if (!t || !("getKitStore" in t))
|
|
45
46
|
throw new Error("useKitStore must be used with the zeroDevWallet connector");
|
|
46
47
|
return t.getKitStore();
|
|
47
48
|
}
|
|
48
|
-
function
|
|
49
|
-
const e =
|
|
49
|
+
function b() {
|
|
50
|
+
const e = y2(), t = T(e, (s) => s.auth.step), o = T(e, (s) => s.auth.stepHistory), i = T(e, (s) => s.auth.email), r = T(e, (s) => s.auth.otpId), a = T(
|
|
50
51
|
e,
|
|
51
52
|
(s) => s.auth.otpEncryptionTargetBundle
|
|
52
|
-
);
|
|
53
|
+
), c = T(e, (s) => s.auth.pendingWallet), l = T(e, (s) => s.auth.connectError);
|
|
53
54
|
return {
|
|
54
55
|
step: t,
|
|
55
56
|
email: i,
|
|
56
|
-
otpId:
|
|
57
|
+
otpId: r,
|
|
57
58
|
otpEncryptionTargetBundle: a,
|
|
59
|
+
pendingWallet: c,
|
|
60
|
+
connectError: l,
|
|
61
|
+
startWalletConnection: e.getState().auth.startWalletConnection,
|
|
62
|
+
setConnectError: e.getState().auth.setConnectError,
|
|
63
|
+
clearPendingWallet: e.getState().auth.clearPendingWallet,
|
|
58
64
|
goToStep: e.getState().auth.goToStep,
|
|
59
|
-
goBack:
|
|
65
|
+
goBack: o.length > 0 ? e.getState().auth.goBack : null,
|
|
60
66
|
reset: e.getState().auth.reset,
|
|
61
67
|
setEmail: e.getState().auth.setEmail,
|
|
62
68
|
setOtpSession: e.getState().auth.setOtpSession,
|
|
63
69
|
clearOtpSession: e.getState().auth.clearOtpSession
|
|
64
70
|
};
|
|
65
71
|
}
|
|
66
|
-
function
|
|
67
|
-
const { email: e, setOtpSession: t } =
|
|
68
|
-
return
|
|
69
|
-
if (
|
|
70
|
-
const
|
|
71
|
-
a((
|
|
72
|
+
function re() {
|
|
73
|
+
const { email: e, setOtpSession: t } = b(), { mutateAsync: o, isPending: i } = x2(), [r, a] = x(60), c = r <= 0 && !i;
|
|
74
|
+
return k(() => {
|
|
75
|
+
if (r <= 0) return;
|
|
76
|
+
const s = setInterval(() => {
|
|
77
|
+
a((d) => Math.max(0, d - 1));
|
|
72
78
|
}, 1e3);
|
|
73
79
|
return () => {
|
|
74
|
-
clearInterval(
|
|
80
|
+
clearInterval(s);
|
|
75
81
|
};
|
|
76
|
-
}, [
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
|
|
82
|
+
}, [r]), /* @__PURE__ */ f(A, { children: [
|
|
83
|
+
/* @__PURE__ */ f("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:gap-8 zd:justify-center", children: [
|
|
84
|
+
/* @__PURE__ */ f(
|
|
85
|
+
N,
|
|
80
86
|
{
|
|
81
87
|
imageName: "send",
|
|
82
88
|
title: `Check your email!
|
|
@@ -84,278 +90,278 @@ function te() {
|
|
|
84
90
|
children: [
|
|
85
91
|
"We've sent a magic link to",
|
|
86
92
|
" ",
|
|
87
|
-
/* @__PURE__ */ n(
|
|
93
|
+
/* @__PURE__ */ n(D, { as: "span", className: "zd:text-solarOrange", children: e }),
|
|
88
94
|
`
|
|
89
95
|
`,
|
|
90
96
|
"Please open the email and click the link to log in."
|
|
91
97
|
]
|
|
92
98
|
}
|
|
93
99
|
),
|
|
94
|
-
/* @__PURE__ */ n("div", { className: "zd:flex zd:flex-col zd:gap-1", children: /* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ n("div", { className: "zd:flex zd:flex-col zd:gap-1", children: /* @__PURE__ */ f(D, { className: "zd:text-center", children: [
|
|
95
101
|
"Did not get an email?",
|
|
96
102
|
" ",
|
|
97
103
|
/* @__PURE__ */ n(
|
|
98
104
|
"button",
|
|
99
105
|
{
|
|
100
106
|
type: "button",
|
|
101
|
-
disabled: !
|
|
107
|
+
disabled: !c,
|
|
102
108
|
onClick: async () => {
|
|
103
|
-
if (!(!e || !
|
|
109
|
+
if (!(!e || !c))
|
|
104
110
|
try {
|
|
105
|
-
const { otpId:
|
|
111
|
+
const { otpId: s, otpEncryptionTargetBundle: d } = await o({
|
|
106
112
|
email: e
|
|
107
113
|
});
|
|
108
|
-
t({ otpId:
|
|
114
|
+
t({ otpId: s, otpEncryptionTargetBundle: d }), a(60);
|
|
109
115
|
} catch {
|
|
110
116
|
}
|
|
111
117
|
},
|
|
112
118
|
className: "zd:cursor-pointer zd:underline zd:disabled:opacity-50 zd:disabled:cursor-not-allowed",
|
|
113
|
-
children:
|
|
119
|
+
children: c ? "Resend" : `Resend in ${r} ${r === 1 ? "second" : "seconds"}`
|
|
114
120
|
}
|
|
115
121
|
)
|
|
116
122
|
] }) })
|
|
117
123
|
] }),
|
|
118
|
-
/* @__PURE__ */ n(
|
|
124
|
+
/* @__PURE__ */ n(H, { className: "zd:self-center zd:pt-4 zd:pb-6" })
|
|
119
125
|
] });
|
|
120
126
|
}
|
|
121
|
-
function
|
|
127
|
+
function oe() {
|
|
122
128
|
return typeof window > "u" ? !1 : new URLSearchParams(window.location.search).has("code");
|
|
123
129
|
}
|
|
124
|
-
function
|
|
130
|
+
function P() {
|
|
125
131
|
if (typeof window > "u") return;
|
|
126
132
|
const e = new URL(window.location.href);
|
|
127
133
|
e.searchParams.has("code") && (e.searchParams.delete("code"), window.history.replaceState(null, "", e.toString()));
|
|
128
134
|
}
|
|
129
|
-
function
|
|
135
|
+
function ae({
|
|
130
136
|
title: e = "Oops, something went wrong",
|
|
131
137
|
message: t = "We couldn't complete the sign-in process. This could be due to timeout, an expired link, or a cancelled request.",
|
|
132
|
-
showRetry:
|
|
138
|
+
showRetry: o = !1,
|
|
133
139
|
showChooseAnother: i = !0
|
|
134
140
|
}) {
|
|
135
|
-
const { goToStep:
|
|
136
|
-
return /* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */ n(
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
|
|
141
|
+
const { goToStep: r, goBack: a, reset: c } = b();
|
|
142
|
+
return /* @__PURE__ */ f(A, { children: [
|
|
143
|
+
/* @__PURE__ */ f("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:gap-8 zd:items-center zd:justify-center", children: [
|
|
144
|
+
/* @__PURE__ */ n(N, { imageName: "error", title: e, children: t }),
|
|
145
|
+
/* @__PURE__ */ f("div", { className: "zd:flex zd:flex-col zd:gap-1", children: [
|
|
146
|
+
o && /* @__PURE__ */ n(v, { action: "primary", text: "Try again", onClick: a ?? (() => r("sign-up")) }),
|
|
141
147
|
i && /* @__PURE__ */ n(
|
|
142
|
-
|
|
148
|
+
v,
|
|
143
149
|
{
|
|
144
|
-
action:
|
|
150
|
+
action: o ? "secondary" : "primary",
|
|
145
151
|
onClick: () => {
|
|
146
|
-
|
|
152
|
+
P(), r("sign-up");
|
|
147
153
|
},
|
|
148
154
|
text: "Choose another sign-in method"
|
|
149
155
|
}
|
|
150
156
|
),
|
|
151
|
-
!
|
|
157
|
+
!o && !i && /* @__PURE__ */ n(v, { action: "primary", text: "Start over", onClick: c })
|
|
152
158
|
] })
|
|
153
159
|
] }),
|
|
154
|
-
/* @__PURE__ */ n(
|
|
160
|
+
/* @__PURE__ */ n(H, { className: "zd:self-center zd:pt-4 zd:pb-6" })
|
|
155
161
|
] });
|
|
156
162
|
}
|
|
157
|
-
const
|
|
158
|
-
function
|
|
159
|
-
return Math.max(
|
|
163
|
+
const se = 4, le = 8, ce = 6;
|
|
164
|
+
function de(e) {
|
|
165
|
+
return Math.max(se, Math.min(le, e));
|
|
160
166
|
}
|
|
161
|
-
function
|
|
167
|
+
function ue({ char: e, isFocused: t }) {
|
|
162
168
|
return /* @__PURE__ */ n(
|
|
163
|
-
|
|
169
|
+
u2,
|
|
164
170
|
{
|
|
165
171
|
"data-testid": "code-input-box",
|
|
166
172
|
"data-active": t || void 0,
|
|
167
|
-
className:
|
|
173
|
+
className: G(
|
|
168
174
|
"zd:h-16 zd:w-14 zd:rounded-lg zd:flex zd:items-center zd:justify-center",
|
|
169
175
|
t && "zd:border-[1.5px] zd:border-greyScale"
|
|
170
176
|
),
|
|
171
|
-
children: /* @__PURE__ */ n(
|
|
177
|
+
children: /* @__PURE__ */ n(D, { className: "zd:text-h2", children: e })
|
|
172
178
|
}
|
|
173
179
|
);
|
|
174
180
|
}
|
|
175
|
-
function
|
|
181
|
+
function fe({
|
|
176
182
|
onChange: e,
|
|
177
183
|
onComplete: t,
|
|
178
|
-
disabled:
|
|
184
|
+
disabled: o = !1,
|
|
179
185
|
error: i = !1,
|
|
180
|
-
autoFocus:
|
|
181
|
-
length: a =
|
|
182
|
-
"data-testid":
|
|
186
|
+
autoFocus: r = !1,
|
|
187
|
+
length: a = ce,
|
|
188
|
+
"data-testid": c
|
|
183
189
|
}) {
|
|
184
|
-
const l =
|
|
185
|
-
() => Array.from({ length: l }, (
|
|
186
|
-
id: `char-${
|
|
187
|
-
index:
|
|
190
|
+
const l = de(a), s = Y(
|
|
191
|
+
() => Array.from({ length: l }, (u, h) => ({
|
|
192
|
+
id: `char-${h}`,
|
|
193
|
+
index: h
|
|
188
194
|
})),
|
|
189
195
|
[l]
|
|
190
|
-
), [
|
|
191
|
-
|
|
192
|
-
var
|
|
193
|
-
|
|
194
|
-
}, [
|
|
195
|
-
|
|
196
|
+
), [d, p] = x(""), [w, z] = x(!1), C = j(null);
|
|
197
|
+
k(() => {
|
|
198
|
+
var u;
|
|
199
|
+
r && !o && ((u = C.current) == null || u.focus());
|
|
200
|
+
}, [r, o]), k(() => {
|
|
201
|
+
p((u) => u.slice(0, l));
|
|
196
202
|
}, [l]);
|
|
197
|
-
const
|
|
198
|
-
const
|
|
199
|
-
|
|
200
|
-
var
|
|
201
|
-
t == null || t(
|
|
203
|
+
const m = (u) => {
|
|
204
|
+
const h = u.slice(0, l).toUpperCase();
|
|
205
|
+
p(h), e == null || e(h), h.length === l && setTimeout(() => {
|
|
206
|
+
var g;
|
|
207
|
+
t == null || t(h), (g = C.current) == null || g.blur();
|
|
202
208
|
}, 0);
|
|
203
209
|
};
|
|
204
|
-
return /* @__PURE__ */
|
|
210
|
+
return /* @__PURE__ */ f(
|
|
205
211
|
"button",
|
|
206
212
|
{
|
|
207
213
|
type: "button",
|
|
208
214
|
className: "zd:flex zd:flex-row zd:items-center zd:justify-between zd:gap-2 zd:w-full zd:cursor-text",
|
|
209
215
|
onClick: () => {
|
|
210
|
-
var
|
|
211
|
-
return (
|
|
216
|
+
var u;
|
|
217
|
+
return (u = C.current) == null ? void 0 : u.focus();
|
|
212
218
|
},
|
|
213
|
-
disabled:
|
|
214
|
-
"data-testid":
|
|
219
|
+
disabled: o,
|
|
220
|
+
"data-testid": c,
|
|
215
221
|
children: [
|
|
216
222
|
/* @__PURE__ */ n(
|
|
217
223
|
"input",
|
|
218
224
|
{
|
|
219
|
-
ref:
|
|
220
|
-
value:
|
|
221
|
-
onChange: (
|
|
222
|
-
onFocus: () =>
|
|
223
|
-
onBlur: () =>
|
|
225
|
+
ref: C,
|
|
226
|
+
value: d,
|
|
227
|
+
onChange: (u) => m(u.target.value),
|
|
228
|
+
onFocus: () => z(!0),
|
|
229
|
+
onBlur: () => z(!1),
|
|
224
230
|
maxLength: l,
|
|
225
|
-
disabled:
|
|
231
|
+
disabled: o,
|
|
226
232
|
className: "zd:absolute zd:opacity-0 zd:pointer-events-none",
|
|
227
233
|
style: { position: "absolute", opacity: 0 },
|
|
228
234
|
"aria-label": "Verification code"
|
|
229
235
|
}
|
|
230
236
|
),
|
|
231
|
-
|
|
232
|
-
|
|
237
|
+
s.map((u) => /* @__PURE__ */ n(
|
|
238
|
+
ue,
|
|
233
239
|
{
|
|
234
|
-
char:
|
|
235
|
-
isFocused: !i &&
|
|
240
|
+
char: d[u.index] ?? "",
|
|
241
|
+
isFocused: !i && w && u.index === d.length
|
|
236
242
|
},
|
|
237
|
-
|
|
243
|
+
u.id
|
|
238
244
|
))
|
|
239
245
|
]
|
|
240
246
|
}
|
|
241
247
|
);
|
|
242
248
|
}
|
|
243
|
-
function
|
|
249
|
+
function pe() {
|
|
244
250
|
const {
|
|
245
251
|
email: e,
|
|
246
252
|
otpId: t,
|
|
247
|
-
otpEncryptionTargetBundle:
|
|
253
|
+
otpEncryptionTargetBundle: o,
|
|
248
254
|
setOtpSession: i,
|
|
249
|
-
clearOtpSession:
|
|
255
|
+
clearOtpSession: r,
|
|
250
256
|
goToStep: a
|
|
251
|
-
} =
|
|
252
|
-
|
|
253
|
-
if (
|
|
254
|
-
const
|
|
255
|
-
|
|
257
|
+
} = b(), { mutateAsync: c, isPending: l } = E2(), { mutateAsync: s, isPending: d } = Z2(), [p, w] = x(""), [z, C] = x(!1), [m, u] = x(60);
|
|
258
|
+
k(() => {
|
|
259
|
+
if (m <= 0) return;
|
|
260
|
+
const S = setInterval(() => {
|
|
261
|
+
u((y) => Math.max(0, y - 1));
|
|
256
262
|
}, 1e3);
|
|
257
|
-
return () => clearInterval(
|
|
258
|
-
}, [
|
|
259
|
-
const
|
|
260
|
-
if (!(!
|
|
261
|
-
|
|
263
|
+
return () => clearInterval(S);
|
|
264
|
+
}, [m]);
|
|
265
|
+
const h = async () => {
|
|
266
|
+
if (!(!p.trim() || !t || !o)) {
|
|
267
|
+
C(!1);
|
|
262
268
|
try {
|
|
263
|
-
await
|
|
269
|
+
await s({
|
|
264
270
|
otpId: t,
|
|
265
|
-
code:
|
|
266
|
-
otpEncryptionTargetBundle:
|
|
267
|
-
}),
|
|
271
|
+
code: p.trim(),
|
|
272
|
+
otpEncryptionTargetBundle: o
|
|
273
|
+
}), r(), a("authenticated");
|
|
268
274
|
} catch {
|
|
269
|
-
|
|
275
|
+
C(!0);
|
|
270
276
|
}
|
|
271
277
|
}
|
|
272
|
-
},
|
|
273
|
-
|
|
274
|
-
},
|
|
275
|
-
if (!(!e ||
|
|
278
|
+
}, g = (S) => {
|
|
279
|
+
w(S);
|
|
280
|
+
}, E = async () => {
|
|
281
|
+
if (!(!e || m > 0 || l))
|
|
276
282
|
try {
|
|
277
|
-
const { otpId:
|
|
283
|
+
const { otpId: S, otpEncryptionTargetBundle: y } = await c({ email: e });
|
|
278
284
|
i({
|
|
279
|
-
otpId:
|
|
285
|
+
otpId: S,
|
|
280
286
|
otpEncryptionTargetBundle: y
|
|
281
|
-
}),
|
|
287
|
+
}), u(60), C(!1);
|
|
282
288
|
} catch {
|
|
283
|
-
|
|
289
|
+
C(!0);
|
|
284
290
|
}
|
|
285
|
-
},
|
|
286
|
-
return /* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
-
/* @__PURE__ */ n(
|
|
290
|
-
/* @__PURE__ */
|
|
291
|
+
}, F = m <= 0 && !l;
|
|
292
|
+
return /* @__PURE__ */ f(A, { children: [
|
|
293
|
+
/* @__PURE__ */ f("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:gap-8 zd:justify-center zd:items-center", children: [
|
|
294
|
+
/* @__PURE__ */ f("div", { className: "zd:flex zd:flex-col zd:gap-4", children: [
|
|
295
|
+
/* @__PURE__ */ n(D, { className: "zd:text-h2 zd:text-center", children: "Enter verification code" }),
|
|
296
|
+
/* @__PURE__ */ f(D, { className: "zd:text-center", children: [
|
|
291
297
|
"Enter the code from the email we sent to",
|
|
292
298
|
" ",
|
|
293
|
-
/* @__PURE__ */ n(
|
|
299
|
+
/* @__PURE__ */ n(D, { className: "zd:text-solarOrange", children: e })
|
|
294
300
|
] })
|
|
295
301
|
] }),
|
|
296
302
|
/* @__PURE__ */ n(
|
|
297
|
-
|
|
303
|
+
fe,
|
|
298
304
|
{
|
|
299
|
-
onComplete:
|
|
300
|
-
onChange: () =>
|
|
301
|
-
disabled:
|
|
302
|
-
error:
|
|
305
|
+
onComplete: g,
|
|
306
|
+
onChange: () => C(!1),
|
|
307
|
+
disabled: d,
|
|
308
|
+
error: z,
|
|
303
309
|
autoFocus: !0
|
|
304
310
|
}
|
|
305
311
|
),
|
|
306
312
|
/* @__PURE__ */ n(
|
|
307
|
-
|
|
313
|
+
v,
|
|
308
314
|
{
|
|
309
315
|
text: "Confirm code",
|
|
310
|
-
onClick:
|
|
311
|
-
disabled: !
|
|
316
|
+
onClick: h,
|
|
317
|
+
disabled: !p.trim() || d
|
|
312
318
|
}
|
|
313
319
|
),
|
|
314
|
-
/* @__PURE__ */ n("div", { className: "zd:flex zd:flex-col zd:gap-1", children: /* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ n("div", { className: "zd:flex zd:flex-col zd:gap-1", children: /* @__PURE__ */ f(D, { className: "zd:text-center", children: [
|
|
315
321
|
"Did not get an email?",
|
|
316
322
|
" ",
|
|
317
323
|
/* @__PURE__ */ n(
|
|
318
324
|
"button",
|
|
319
325
|
{
|
|
320
326
|
type: "button",
|
|
321
|
-
disabled: !
|
|
322
|
-
onClick:
|
|
327
|
+
disabled: !F,
|
|
328
|
+
onClick: E,
|
|
323
329
|
className: "zd:cursor-pointer zd:underline zd:disabled:opacity-50 zd:disabled:cursor-not-allowed",
|
|
324
|
-
children:
|
|
330
|
+
children: F ? "Resend" : `Resend in ${m} ${m === 1 ? "second" : "seconds"}`
|
|
325
331
|
}
|
|
326
332
|
)
|
|
327
333
|
] }) })
|
|
328
334
|
] }),
|
|
329
|
-
/* @__PURE__ */ n(
|
|
335
|
+
/* @__PURE__ */ n(H, { className: "zd:self-center zd:pt-4 zd:pb-6" })
|
|
330
336
|
] });
|
|
331
337
|
}
|
|
332
|
-
function
|
|
338
|
+
function he({
|
|
333
339
|
termsAndConditionsUrl: e,
|
|
334
340
|
privacyPolicyUrl: t,
|
|
335
|
-
agreedToTerms:
|
|
341
|
+
agreedToTerms: o,
|
|
336
342
|
setAgreedToTerms: i,
|
|
337
|
-
highlight:
|
|
343
|
+
highlight: r = !1
|
|
338
344
|
}) {
|
|
339
|
-
return /* @__PURE__ */
|
|
340
|
-
!!(e || t) && /* @__PURE__ */
|
|
345
|
+
return /* @__PURE__ */ f("div", { className: "zd:flex zd:flex-col zd:items-center zd:gap-5", children: [
|
|
346
|
+
!!(e || t) && /* @__PURE__ */ f(
|
|
341
347
|
"div",
|
|
342
348
|
{
|
|
343
|
-
className: `zd:flex zd:flex-row zd:items-center zd:gap-2 zd:rounded-md zd:p-2 zd:transition-colors ${
|
|
349
|
+
className: `zd:flex zd:flex-row zd:items-center zd:gap-2 zd:rounded-md zd:p-2 zd:transition-colors ${r ? "zd:border zd:border-negative" : "zd:border zd:border-transparent"}`,
|
|
344
350
|
children: [
|
|
345
351
|
/* @__PURE__ */ n(
|
|
346
352
|
"input",
|
|
347
353
|
{
|
|
348
354
|
type: "checkbox",
|
|
349
|
-
checked:
|
|
350
|
-
onChange: (
|
|
355
|
+
checked: o,
|
|
356
|
+
onChange: (c) => i(c.target.checked),
|
|
351
357
|
className: "zd:cursor-pointer zd:[color-scheme:light]"
|
|
352
358
|
}
|
|
353
359
|
),
|
|
354
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ f(D, { className: "zd:flex-1", children: [
|
|
355
361
|
"I agree to the",
|
|
356
362
|
" ",
|
|
357
363
|
e && /* @__PURE__ */ n(
|
|
358
|
-
|
|
364
|
+
D,
|
|
359
365
|
{
|
|
360
366
|
as: "a",
|
|
361
367
|
href: e,
|
|
@@ -367,7 +373,7 @@ function ue({
|
|
|
367
373
|
),
|
|
368
374
|
e && t && " and ",
|
|
369
375
|
t && /* @__PURE__ */ n(
|
|
370
|
-
|
|
376
|
+
D,
|
|
371
377
|
{
|
|
372
378
|
as: "a",
|
|
373
379
|
href: t,
|
|
@@ -381,17 +387,17 @@ function ue({
|
|
|
381
387
|
]
|
|
382
388
|
}
|
|
383
389
|
),
|
|
384
|
-
/* @__PURE__ */ n(
|
|
390
|
+
/* @__PURE__ */ n(H, {})
|
|
385
391
|
] });
|
|
386
392
|
}
|
|
387
|
-
const
|
|
388
|
-
function
|
|
393
|
+
const me = "" + new URL("blob.webm", import.meta.url).href;
|
|
394
|
+
function ge({ className: e }) {
|
|
389
395
|
return /* @__PURE__ */ n(
|
|
390
396
|
"video",
|
|
391
397
|
{
|
|
392
398
|
className: e,
|
|
393
399
|
style: { aspectRatio: "1 / 1" },
|
|
394
|
-
src:
|
|
400
|
+
src: me,
|
|
395
401
|
autoPlay: !0,
|
|
396
402
|
loop: !0,
|
|
397
403
|
muted: !0,
|
|
@@ -401,17 +407,14 @@ function pe({ className: e }) {
|
|
|
401
407
|
}
|
|
402
408
|
);
|
|
403
409
|
}
|
|
404
|
-
const
|
|
405
|
-
function
|
|
406
|
-
return e instanceof Error ? e.name === "AbortError" || e.name === "NotAllowedError" || e.name === "UserRejectedRequestError" ? !0 : e.message.toLowerCase().includes("oauth popup was closed") : !1;
|
|
407
|
-
}
|
|
408
|
-
function n2(e, t) {
|
|
410
|
+
const ze = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20width='24'%20height='24'%20fill='url(%23pattern0_19361_9946)'/%3e%3cdefs%3e%3cpattern%20id='pattern0_19361_9946'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_19361_9946'%20transform='scale(0.0136986)'/%3e%3c/pattern%3e%3cimage%20id='image0_19361_9946'%20width='73'%20height='73'%20preserveAspectRatio='none'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAABJCAYAAABxcwvcAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAgpSURBVHgB5Zx/bFNVFMfPbWc2NJD9BAckjmSDDs1WEwSNvzqVxGCCDP/ABJUZTUQJv4wGogkwEg38xQ9jookJW9QE/hhs+8N/AFeDkoAkPIyuA6aUBEgJYw4WZcDayzl3feV1e3197/a+0rWfpGn7+nr73rfnnHvuue8+Blmm7nG/nwMEIBZ7DIDVMAA/bcdtNcb9cHsYtw2BeHANPJ6LuFHr/1MLQpZh4DI1Nf7SokegBWL8dfw1P6pRCpkTBA/rKopCZ1+fFgaXcUWkJGHIatwlyDys/e5/0BkOa0PgAkpFEuI8HFuPzW5QZDG2GXNP3lnEPXtUW5cykWrnN2x9EOKMR4jFeFt/7x+toIiMRap9wh9gUb5vfOB90JBYGLdaz/+ltUGGSIskXGtKbMx6chjGoO3u/2xjJvFKSiSfz18zyvghiHffuQ5ZlZezJtlY5QGHkHuNevhpmCQCERQK8E89PdfnXwUSeJ3sPNfXsIpz6MSXJTD5KOEMlpVPnwGD167+4uSLtkWq9TVs5YzthkkPCzgVypZIwoLyQiAdZ0KlFYliUNzF8gwWqKysDl8fiJxJu6fVh9SLRRnvybUcSCFDOKRpwlxKs9rJsnfLc4GIUhxfHqKcz2qnlCLV1jfsynOBBHSORVP4Pqt9TN2N4hBEeQ8UEBxY898hzTT2mloSjcWgwGDA96Vyuwki1dU3rC8ENzMByzxgOg5NcrcC6M3SMTR6i80ZPxhOsqRRiK0qYIEIU2tKsqS6+sYL2RJp2rSpsPCpBbAIH9OmToVZs2aKbcTNm8Nwc3gYQn1nxePk76fEtiwxwZoSIuEsRguPuRuwSYTly5bCKy81waKFCxx998TJU3Cws1s8XIex1v5ebVvirf6itr6RuvwAuMTaNauh5e2VCWuR5fLlK9CBQn319TfgGjR11XvmyftvIVFEuwAuQBaz84vtwp1UQmJt+nyLsDBX8LImfY5PBO6o1x0LanlnJfzQ9p1ygQhqk9omC3WF2H1NRBWgvHLGLlAcsOngP/14PbgNWSq58LFfj4NqBgeuttOzcLfa+Y3/qpwKIoHW2fiHyVWO/Nwjni9fuZLoweik633zxMNukD94qFu4n0qwlyujXo7V+nCcxtSN0+bjiXUdPGC5D/VQezHwUlyxA7kWiU49oxVL31gBodBZUIU+nvOI+XmF9GJek6rnuYSiLF2+AjZ9tsW2QIQI0vidwOIlog0z6DdVCkSweAjyllU9+ia+eRoUcgKTP/Jjo5scOdoD732wxpE44xnGBLP9+x9h9syZUF8/L7GdBNrrQkrAGIsMXot0eSuqZmwCF7Jso1DkXhs+2Qy3b98BFVAc09t2SyAB/gjWwb9lGLRPo/O5Noe2+OUmOHzUndIUBXYatrgFTWqeD52Z42GSvRr1QJSnBA//BLMt8iC7AlEb1Fa69oxYCaS3142diGyWr49jGQ5HODhEF4j+SYLizIfrNkoHztnxxFBPOqm9t1reTxmknbZHYlJ7MoNkSgMcT3OPF4jQs19jMLXL+BMytmfXoozQcXV1HEhqj7bJtldSAqWORVr70eokgXSo3OFUKDOBdGSE0sUwcy/6THYI41gk6qlSma0ToawE0nEilJVAOjIdyMgIDHnExU4OSOffdoSyI5COHaHSCUTHSsd8REIkGpY4tiTCjlDdGBfMhhFOBNKxinl2BZIsqYjqpAe7Ng0ksNNj7Pxye5JQ+gnJlE7MhKK2rbp4XSDpXIqNeRkOS6qfkR2WDAxcFyWK5597NuWBUjKpD0XoJKuqKlO2txnHZ4cxm6bvmFFcXAyvLXkVjv12HF7A36Q/IRUZCyRgJwYHIvsxT/Lj7ADfBRlgJ27QQVsFVRKoI16/JpF2YDVTNglUIxAkat0eTCul3M2IneTPyiWMAhHUC8kmf6LSQCUTBcMVHtfGM1qCLxhkfCW9TJas/+MdJjMgMlnypfgxZFJpMPKQLlJYw/klBdZEOBHKjks4EUq1QDRjol+tG08BWBcowo5QTmKGHaGUCwTkaixxqaAQqUjx5X5WQskEVdqX4oxZe24IRDDvfU2ESHGzCoJCzITST0gmqFq1p1wgTLSN6+oMGbc6l9MxnlgmAlm1p1ogAicA9hjfJ6a5a/z+0qI7OIvr0iojSgFUXfRgvLDCDYo4m2NcYpG4RHkoEhkpr6iegrIFwAVU1bf1tlS2ZwSL/23nQlq7cVvy9UklsFtFzjSZ8cZgwjq5JJFEzhRL9sdCgqzIbCXThFIJWZPTGlM+IJZ7mVgRMUEksiZMpN6FQoOz1lTr4UzXlmB5IIwllDLVM7u5CrnZ+ZDWmurzlJXJaDFsKwS3s3IznZQiiSDuYc1539vhOaZbdmq5lGvwWiRSUVF9FYVaBvnIWFFtf7rd0q53w/iklVdWM7eSzAfGuCtsrbC1chKFCuaVUA4EImyvwc0boRwKRDhazU1CVVRWX8RwH4BJuaKbbewPaTvAIdI3T5hMC3XE/UswQe7vk7v3kiNL0hkYiAxNr6zu4oyVQc7fRIEFsfTRfK5Pk67jS1mSkTqfvwUY35pzVkX5HQ410L0yXqovZUlGKEUgq4oBu5ErQZ0qi9FbrPmffjW3NsvYkoyMxSrYxoFL3RMkI9BysOvtpCFGzt5kyogQi1Y8ZcMNya2wBjY6Arsnxe3KzKC7AcZi0MIYvIiTWUqCPFpMOAbQxXAqTLbHcvZ7WUTcmKoEe8OxPKtRTDownvqOgWJwzcJ4kFqMww3cEozegqBbFpOKrIqUDnJTeqZL8LIthBX3AMO5NwaXDfWSAAAAAElFTkSuQmCC'/%3e%3c/defs%3e%3c/svg%3e", X = ze;
|
|
411
|
+
function $(e, t) {
|
|
409
412
|
return t.rdns && e.id === t.rdns ? !0 : !!t.rdns && e.type === "injected" && e.id !== "injected" && e.id !== "zerodev-wallet" && e.name === t.name;
|
|
410
413
|
}
|
|
411
|
-
function
|
|
412
|
-
return
|
|
414
|
+
function M(e, t) {
|
|
415
|
+
return $(e, t) ? !0 : !!t.rdns && (Array.isArray(e.rdns) ? e.rdns.includes(t.rdns) : e.rdns === t.rdns);
|
|
413
416
|
}
|
|
414
|
-
const
|
|
417
|
+
const Ce = [
|
|
415
418
|
{
|
|
416
419
|
id: "metamask",
|
|
417
420
|
name: "MetaMask",
|
|
@@ -490,52 +493,48 @@ const he = [
|
|
|
490
493
|
mobileLink: "bnc://app.binance.com/cedefi/wc?uri=",
|
|
491
494
|
downloadUrl: "https://www.binance.com/en/download"
|
|
492
495
|
}
|
|
493
|
-
],
|
|
494
|
-
function
|
|
496
|
+
], U = Ce;
|
|
497
|
+
function De({
|
|
495
498
|
open: e,
|
|
496
499
|
onOpenChange: t,
|
|
497
|
-
wallet:
|
|
500
|
+
wallet: o,
|
|
498
501
|
pairing: i
|
|
499
502
|
}) {
|
|
500
|
-
return /* @__PURE__ */ n(
|
|
501
|
-
/* @__PURE__ */ n(
|
|
502
|
-
/* @__PURE__ */ n(
|
|
503
|
+
return /* @__PURE__ */ n(f2, { open: e, onOpenChange: t, children: /* @__PURE__ */ f(p2, { className: "zd:p-4", children: [
|
|
504
|
+
/* @__PURE__ */ n(h2, { children: o ? `Connect ${o.name}` : "WalletConnect" }),
|
|
505
|
+
/* @__PURE__ */ n(we, { wallet: o, pairing: i })
|
|
503
506
|
] }) });
|
|
504
507
|
}
|
|
505
|
-
function
|
|
508
|
+
function we({
|
|
506
509
|
wallet: e,
|
|
507
510
|
pairing: t
|
|
508
511
|
}) {
|
|
509
|
-
const {
|
|
510
|
-
|
|
511
|
-
), [
|
|
512
|
+
const { startWalletConnection: o } = b(), { uri: i, error: r, retry: a } = t, c = W(), l = e ? c.find((h) => M(h, e)) : void 0, [s, d] = x(
|
|
513
|
+
l ? "browser" : "mobile"
|
|
514
|
+
), [p, w] = x(!1), z = i && (e != null && e.mobileLink) ? `${e.mobileLink}${encodeURIComponent(i)}` : i, C = async () => {
|
|
512
515
|
if (i)
|
|
513
516
|
try {
|
|
514
|
-
await navigator.clipboard.writeText(i),
|
|
517
|
+
await navigator.clipboard.writeText(i), w(!0), setTimeout(() => w(!1), 2e3);
|
|
515
518
|
} catch {
|
|
516
519
|
}
|
|
517
|
-
},
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
));
|
|
527
|
-
}, m = o ?? F;
|
|
528
|
-
return /* @__PURE__ */ c("div", { className: "zd:flex zd:flex-col zd:items-center zd:gap-3", children: [
|
|
529
|
-
/* @__PURE__ */ c("div", { className: "zd:flex zd:w-full zd:items-center zd:gap-2", children: [
|
|
520
|
+
}, m = () => {
|
|
521
|
+
l && o({
|
|
522
|
+
connectorUid: l.uid,
|
|
523
|
+
name: (e == null ? void 0 : e.name) ?? l.name,
|
|
524
|
+
icon: (e == null ? void 0 : e.icon) ?? l.icon
|
|
525
|
+
});
|
|
526
|
+
}, u = r;
|
|
527
|
+
return /* @__PURE__ */ f("div", { className: "zd:flex zd:flex-col zd:items-center zd:gap-3", children: [
|
|
528
|
+
/* @__PURE__ */ f("div", { className: "zd:flex zd:w-full zd:items-center zd:gap-2", children: [
|
|
530
529
|
/* @__PURE__ */ n(
|
|
531
530
|
"img",
|
|
532
531
|
{
|
|
533
|
-
src: e ? e.icon :
|
|
532
|
+
src: e ? e.icon : X,
|
|
534
533
|
alt: "",
|
|
535
534
|
className: "zd:w-8 zd:h-8 zd:rounded-xl"
|
|
536
535
|
}
|
|
537
536
|
),
|
|
538
|
-
/* @__PURE__ */ n(
|
|
537
|
+
/* @__PURE__ */ n(D, { className: "zd:text-h3 zd:flex-1", children: e ? e.name : "WalletConnect" }),
|
|
539
538
|
/* @__PURE__ */ n(m2, { asChild: !0, children: /* @__PURE__ */ n(
|
|
540
539
|
"button",
|
|
541
540
|
{
|
|
@@ -550,21 +549,21 @@ function ze({
|
|
|
550
549
|
"button",
|
|
551
550
|
{
|
|
552
551
|
type: "button",
|
|
553
|
-
onClick: () =>
|
|
554
|
-
className: `zd:flex-1 zd:rounded-2xl zd:py-1.5 zd:text-body3 zd:cursor-pointer ${
|
|
552
|
+
onClick: () => d(h),
|
|
553
|
+
className: `zd:flex-1 zd:rounded-2xl zd:py-1.5 zd:text-body3 zd:cursor-pointer ${s === h ? "zd:bg-greyScale/10 zd:font-semibold" : "zd:text-greyScale/60"}`,
|
|
555
554
|
children: h === "mobile" ? "Mobile" : "Browser"
|
|
556
555
|
},
|
|
557
556
|
h
|
|
558
557
|
)) }),
|
|
559
|
-
!e ||
|
|
560
|
-
/* @__PURE__ */ n(
|
|
561
|
-
/* @__PURE__ */ n(
|
|
562
|
-
] }) : /* @__PURE__ */
|
|
563
|
-
/* @__PURE__ */ n("div", { className: "zd:bg-white zd:rounded-2xl zd:p-2 zd:border zd:border-greyScale/10", children:
|
|
564
|
-
|
|
558
|
+
!e || s === "mobile" ? u ? /* @__PURE__ */ f("div", { className: "zd:flex zd:flex-col zd:gap-2 zd:items-center", children: [
|
|
559
|
+
/* @__PURE__ */ n(D, { className: "zd:text-center zd:text-red-500", children: u }),
|
|
560
|
+
/* @__PURE__ */ n(v, { action: "secondary", text: "Try again", onClick: a })
|
|
561
|
+
] }) : /* @__PURE__ */ f(A, { children: [
|
|
562
|
+
/* @__PURE__ */ n("div", { className: "zd:bg-white zd:rounded-2xl zd:p-2 zd:border zd:border-greyScale/10", children: z ? /* @__PURE__ */ n(T2, { value: z, size: 176 }) : /* @__PURE__ */ n("div", { className: "zd:w-[176px] zd:h-[176px] zd:flex zd:items-center zd:justify-center", children: /* @__PURE__ */ n("div", { className: "zd:w-8 zd:h-8 zd:border-2 zd:border-solarOrange zd:border-t-transparent zd:rounded-full zd:animate-spin" }) }) }),
|
|
563
|
+
z && (e == null ? void 0 : e.mobileLink) && /* @__PURE__ */ f(
|
|
565
564
|
"a",
|
|
566
565
|
{
|
|
567
|
-
href:
|
|
566
|
+
href: z,
|
|
568
567
|
className: "zd:w-full zd:rounded-2xl zd:bg-greyScale/10 zd:py-2 zd:text-center zd:text-body2 zd:font-semibold",
|
|
569
568
|
children: [
|
|
570
569
|
"Open in ",
|
|
@@ -573,36 +572,36 @@ function ze({
|
|
|
573
572
|
}
|
|
574
573
|
),
|
|
575
574
|
/* @__PURE__ */ n(
|
|
576
|
-
|
|
575
|
+
v,
|
|
577
576
|
{
|
|
578
577
|
action: "secondary",
|
|
579
|
-
text:
|
|
578
|
+
text: p ? "Copied" : "Copy link",
|
|
580
579
|
onClick: C,
|
|
581
|
-
disabled: !
|
|
580
|
+
disabled: !z
|
|
582
581
|
}
|
|
583
582
|
)
|
|
584
|
-
] }) :
|
|
585
|
-
/* @__PURE__ */ n(
|
|
583
|
+
] }) : u ? /* @__PURE__ */ f("div", { className: "zd:flex zd:flex-col zd:gap-2 zd:items-center", children: [
|
|
584
|
+
/* @__PURE__ */ n(D, { className: "zd:text-center zd:text-red-500", children: u }),
|
|
586
585
|
/* @__PURE__ */ n(
|
|
587
|
-
|
|
586
|
+
v,
|
|
588
587
|
{
|
|
589
588
|
action: "secondary",
|
|
590
589
|
text: "Try again",
|
|
591
|
-
onClick:
|
|
590
|
+
onClick: l ? m : a
|
|
592
591
|
}
|
|
593
592
|
)
|
|
594
|
-
] }) :
|
|
593
|
+
] }) : l && e ? /* @__PURE__ */ f(
|
|
595
594
|
"button",
|
|
596
595
|
{
|
|
597
596
|
type: "button",
|
|
598
|
-
onClick:
|
|
597
|
+
onClick: m,
|
|
599
598
|
className: "zd:w-full zd:cursor-pointer zd:rounded-2xl zd:bg-greyScale/10 zd:py-2 zd:text-center zd:text-body2 zd:font-semibold",
|
|
600
599
|
children: [
|
|
601
600
|
"Open in ",
|
|
602
601
|
e.name
|
|
603
602
|
]
|
|
604
603
|
}
|
|
605
|
-
) : e && /* @__PURE__ */
|
|
604
|
+
) : e && /* @__PURE__ */ f(
|
|
606
605
|
"a",
|
|
607
606
|
{
|
|
608
607
|
href: e.downloadUrl,
|
|
@@ -617,199 +616,202 @@ function ze({
|
|
|
617
616
|
)
|
|
618
617
|
] });
|
|
619
618
|
}
|
|
620
|
-
function
|
|
619
|
+
function F2() {
|
|
621
620
|
var e, t;
|
|
622
621
|
return typeof window > "u" ? !1 : ((t = (e = window.matchMedia) == null ? void 0 : e.call(window, "(pointer: coarse)")) == null ? void 0 : t.matches) || /Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(
|
|
623
622
|
navigator.userAgent
|
|
624
623
|
);
|
|
625
624
|
}
|
|
626
|
-
function
|
|
625
|
+
function q(e) {
|
|
627
626
|
return e.type === "walletConnect" && "zdWalletConnect" in e;
|
|
628
627
|
}
|
|
629
|
-
function
|
|
630
|
-
const { wallet: t, connectors:
|
|
631
|
-
return !t.mobileLink || !
|
|
628
|
+
function xe(e) {
|
|
629
|
+
const { wallet: t, connectors: o, uri: i, mobile: r } = e;
|
|
630
|
+
return !t.mobileLink || !r || !i || o.some((a) => M(a, t)) ? null : `${t.mobileLink}${encodeURIComponent(i)}`;
|
|
632
631
|
}
|
|
633
|
-
function
|
|
634
|
-
const { goToStep: e } =
|
|
635
|
-
(
|
|
636
|
-
), { isReconnecting:
|
|
637
|
-
|
|
632
|
+
function Ee() {
|
|
633
|
+
const { goToStep: e } = b(), t = W(), o = t.find(q), { connect: i } = P2(), a = _2().some(
|
|
634
|
+
(C) => C.connector.uid === (o == null ? void 0 : o.uid)
|
|
635
|
+
), { isReconnecting: c } = w2(), [l, s] = x(null), [d, p] = x(null), w = j(!1), z = (C) => {
|
|
636
|
+
p(null), s(null), i({ connector: C }, { onError: (m) => p(m.message) });
|
|
638
637
|
};
|
|
639
|
-
return
|
|
640
|
-
if (!
|
|
641
|
-
const
|
|
642
|
-
|
|
638
|
+
return k(() => {
|
|
639
|
+
if (!o || a) return;
|
|
640
|
+
const C = ({ type: E, data: F }) => {
|
|
641
|
+
E === "display_uri" && typeof F == "string" && s(F);
|
|
643
642
|
};
|
|
644
|
-
|
|
645
|
-
const
|
|
646
|
-
let
|
|
647
|
-
return
|
|
648
|
-
var
|
|
649
|
-
|
|
650
|
-
}).catch((
|
|
651
|
-
|
|
652
|
-
}), !
|
|
653
|
-
var
|
|
654
|
-
|
|
643
|
+
o.emitter.on("message", C);
|
|
644
|
+
const m = () => p("Proposal expired"), u = () => e(null);
|
|
645
|
+
let h, g = !1;
|
|
646
|
+
return o.getProvider().then((E) => {
|
|
647
|
+
var F, S, y;
|
|
648
|
+
g || (h = E, (y = (S = (F = h.signer) == null ? void 0 : F.client) == null ? void 0 : S.events) == null || y.on("proposal_expire", m), h.on("connect", u));
|
|
649
|
+
}).catch((E) => {
|
|
650
|
+
g || p(E instanceof Error ? E.message : String(E));
|
|
651
|
+
}), !w.current && !c && (w.current = !0, z(o)), () => {
|
|
652
|
+
var E, F, S;
|
|
653
|
+
g = !0, (S = (F = (E = h == null ? void 0 : h.signer) == null ? void 0 : E.client) == null ? void 0 : F.events) == null || S.off("proposal_expire", m), h == null || h.off("connect", u), o.emitter.off("message", C);
|
|
655
654
|
};
|
|
656
|
-
}, [
|
|
655
|
+
}, [o, a, c]), {
|
|
657
656
|
uri: l,
|
|
658
|
-
error:
|
|
657
|
+
error: d,
|
|
659
658
|
retry: () => {
|
|
660
|
-
|
|
659
|
+
o && z(o);
|
|
661
660
|
},
|
|
662
|
-
deepLinkFor: (
|
|
663
|
-
wallet:
|
|
661
|
+
deepLinkFor: (C) => xe({
|
|
662
|
+
wallet: C,
|
|
664
663
|
connectors: t,
|
|
665
|
-
uri:
|
|
666
|
-
mobile:
|
|
664
|
+
uri: d ? null : l,
|
|
665
|
+
mobile: F2()
|
|
667
666
|
})
|
|
668
667
|
};
|
|
669
668
|
}
|
|
670
|
-
const
|
|
671
|
-
function
|
|
672
|
-
const e =
|
|
669
|
+
const v2 = O2(null);
|
|
670
|
+
function I() {
|
|
671
|
+
const e = M2(v2);
|
|
673
672
|
if (!e)
|
|
674
673
|
throw new Error("SignUp.* components must be rendered inside <SignUp>");
|
|
675
674
|
return e;
|
|
676
675
|
}
|
|
677
|
-
function
|
|
678
|
-
const { setAuthPending: t } =
|
|
679
|
-
|
|
676
|
+
function e2(e) {
|
|
677
|
+
const { setAuthPending: t } = I();
|
|
678
|
+
k(() => (t(e), () => t(!1)), [e, t]);
|
|
680
679
|
}
|
|
681
|
-
const
|
|
682
|
-
function
|
|
683
|
-
return
|
|
680
|
+
const ye = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
681
|
+
function J(e) {
|
|
682
|
+
return ye.test(e.trim());
|
|
684
683
|
}
|
|
685
|
-
function
|
|
686
|
-
const { goToStep: e, setEmail: t, setOtpSession:
|
|
684
|
+
function b2() {
|
|
685
|
+
const { goToStep: e, setEmail: t, setOtpSession: o } = b(), {
|
|
687
686
|
authPending: i,
|
|
688
|
-
emailAuthMethod:
|
|
687
|
+
emailAuthMethod: r,
|
|
689
688
|
needsAgreement: a,
|
|
690
|
-
guardAgreement:
|
|
689
|
+
guardAgreement: c,
|
|
691
690
|
setError: l
|
|
692
|
-
} =
|
|
693
|
-
|
|
694
|
-
const
|
|
695
|
-
if (!(!
|
|
691
|
+
} = I(), [s, d] = x(""), p = r === "otp", { mutateAsync: w, isPending: z } = E2(), { mutateAsync: C, isPending: m } = x2(), u = z || m;
|
|
692
|
+
e2(u);
|
|
693
|
+
const h = async () => {
|
|
694
|
+
if (!(!s || i) && J(s) && c()) {
|
|
696
695
|
l(null);
|
|
697
696
|
try {
|
|
698
|
-
const
|
|
699
|
-
email:
|
|
697
|
+
const g = p ? w : C, { otpId: E, otpEncryptionTargetBundle: F } = await g({
|
|
698
|
+
email: s
|
|
700
699
|
});
|
|
701
|
-
t(
|
|
702
|
-
} catch (
|
|
700
|
+
t(s), o({ otpId: E, otpEncryptionTargetBundle: F }), e(p ? "otp-input" : "email-verification");
|
|
701
|
+
} catch (g) {
|
|
703
702
|
l(
|
|
704
|
-
|
|
703
|
+
g instanceof Error ? g.message : "Failed to send verification code"
|
|
705
704
|
);
|
|
706
705
|
}
|
|
707
706
|
}
|
|
708
707
|
};
|
|
709
708
|
return /* @__PURE__ */ n(
|
|
710
|
-
|
|
709
|
+
L2,
|
|
711
710
|
{
|
|
712
711
|
iconName: "email",
|
|
713
712
|
placeholder: "Enter your email",
|
|
714
|
-
value:
|
|
715
|
-
onChange: (
|
|
713
|
+
value: s,
|
|
714
|
+
onChange: (g) => d(g.target.value),
|
|
716
715
|
type: "email",
|
|
717
716
|
autoCapitalize: "none",
|
|
718
717
|
autoComplete: "email",
|
|
719
718
|
disabled: i,
|
|
720
719
|
variant: "listItemStyle",
|
|
721
|
-
onKeyDown: (
|
|
722
|
-
|
|
720
|
+
onKeyDown: (g) => {
|
|
721
|
+
g.key === "Enter" && s && !i && h();
|
|
723
722
|
},
|
|
724
|
-
children:
|
|
723
|
+
children: u ? /* @__PURE__ */ n("div", { className: "zd:w-13 zd:h-13 zd:flex zd:items-center zd:justify-center", children: /* @__PURE__ */ n("div", { className: "zd:w-5 zd:h-5 zd:border-2 zd:border-solarOrange zd:border-t-transparent zd:rounded-full zd:animate-spin" }) }) : /* @__PURE__ */ n(
|
|
725
724
|
"button",
|
|
726
725
|
{
|
|
727
726
|
type: "button",
|
|
728
|
-
disabled: !
|
|
729
|
-
className: `zd:w-13 zd:h-13 zd:rounded-2xl zd:flex zd:items-center zd:justify-center zd:transition-colors ${
|
|
730
|
-
onClick: () =>
|
|
731
|
-
children: /* @__PURE__ */ n(
|
|
727
|
+
disabled: !J(s) || a,
|
|
728
|
+
className: `zd:w-13 zd:h-13 zd:rounded-2xl zd:flex zd:items-center zd:justify-center zd:transition-colors ${J(s) && !a ? "zd:cursor-pointer" : "zd:cursor-not-allowed zd:opacity-50"}`,
|
|
729
|
+
onClick: () => h(),
|
|
730
|
+
children: /* @__PURE__ */ n(V, { name: "chevronRight", className: "zd:text-greyScale" })
|
|
732
731
|
}
|
|
733
732
|
)
|
|
734
733
|
}
|
|
735
734
|
);
|
|
736
735
|
}
|
|
737
|
-
function
|
|
738
|
-
|
|
736
|
+
function t2(e) {
|
|
737
|
+
let t = e;
|
|
738
|
+
for (let i = 0; i < 5 && Fe(t); i++) {
|
|
739
|
+
if (t.code === 4001) return !0;
|
|
740
|
+
t = t.cause;
|
|
741
|
+
}
|
|
742
|
+
return e instanceof Error ? e.name === "AbortError" || e.name === "NotAllowedError" || e.name === "UserRejectedRequestError" ? !0 : e.message.toLowerCase().includes("oauth popup was closed") : !1;
|
|
743
|
+
}
|
|
744
|
+
function Fe(e) {
|
|
745
|
+
return typeof e == "object" && e !== null;
|
|
746
|
+
}
|
|
747
|
+
function S2() {
|
|
748
|
+
const { goToStep: e } = b(), { authPending: t, guardAgreement: o, setError: i } = I(), { mutateAsync: r, isPending: a } = G2({
|
|
739
749
|
mutation: {
|
|
740
750
|
onSuccess: () => {
|
|
741
751
|
e("authenticated");
|
|
742
752
|
}
|
|
743
753
|
}
|
|
744
754
|
});
|
|
745
|
-
return
|
|
746
|
-
|
|
755
|
+
return e2(a), /* @__PURE__ */ n(
|
|
756
|
+
O,
|
|
747
757
|
{
|
|
748
|
-
icon: /* @__PURE__ */ n(
|
|
758
|
+
icon: /* @__PURE__ */ n(g2, { name: "google" }),
|
|
749
759
|
title: "Google",
|
|
750
|
-
trailing: /* @__PURE__ */ n(
|
|
760
|
+
trailing: /* @__PURE__ */ n(_, {}),
|
|
751
761
|
disabled: t,
|
|
752
762
|
onClick: async () => {
|
|
753
|
-
if (!t &&
|
|
763
|
+
if (!t && o()) {
|
|
754
764
|
i(null);
|
|
755
765
|
try {
|
|
756
|
-
await
|
|
766
|
+
await r({ provider: "google" });
|
|
757
767
|
} catch (l) {
|
|
758
|
-
|
|
768
|
+
t2(l) || i(l instanceof Error ? l.message : String(l));
|
|
759
769
|
}
|
|
760
770
|
}
|
|
761
771
|
}
|
|
762
772
|
}
|
|
763
773
|
);
|
|
764
774
|
}
|
|
765
|
-
function
|
|
775
|
+
function ve({
|
|
766
776
|
excludeWalletIds: e = [],
|
|
767
777
|
maxWallets: t = 4
|
|
768
778
|
}) {
|
|
769
|
-
const {
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
).map((p) => {
|
|
774
|
-
const d = k.find((D) => O(p, D));
|
|
779
|
+
const { startWalletConnection: o } = b(), { authPending: i, guardAgreement: r, registeredWallets: a } = I(), l = W().filter(
|
|
780
|
+
(d) => d.type === "injected" && d.id !== "injected" && d.id !== "zerodev-wallet"
|
|
781
|
+
).map((d) => {
|
|
782
|
+
const p = U.find((w) => M(d, w));
|
|
775
783
|
return {
|
|
776
|
-
connector:
|
|
777
|
-
walletId:
|
|
778
|
-
name: (
|
|
779
|
-
icon: (
|
|
780
|
-
ids:
|
|
781
|
-
rank:
|
|
784
|
+
connector: d,
|
|
785
|
+
walletId: p == null ? void 0 : p.id,
|
|
786
|
+
name: (p == null ? void 0 : p.name) ?? d.name,
|
|
787
|
+
icon: (p == null ? void 0 : p.icon) ?? d.icon,
|
|
788
|
+
ids: p ? [p.id, d.id] : [d.id],
|
|
789
|
+
rank: p ? U.indexOf(p) : U.length
|
|
782
790
|
};
|
|
783
791
|
}).filter(
|
|
784
|
-
(
|
|
785
|
-
).filter((
|
|
786
|
-
i ||
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
onSuccess: () => r(null),
|
|
792
|
-
onError: (d) => {
|
|
793
|
-
R(d) || a(d instanceof Error ? d.message : String(d));
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
));
|
|
792
|
+
(d) => !(d.walletId && a.includes(d.walletId))
|
|
793
|
+
).filter((d) => !d.ids.some((p) => e.includes(p))).sort((d, p) => d.rank - p.rank).slice(0, t), s = (d) => {
|
|
794
|
+
i || r() && o({
|
|
795
|
+
connectorUid: d.connector.uid,
|
|
796
|
+
name: d.name,
|
|
797
|
+
icon: d.icon
|
|
798
|
+
});
|
|
797
799
|
};
|
|
798
|
-
return /* @__PURE__ */ n(
|
|
799
|
-
|
|
800
|
+
return /* @__PURE__ */ n(A, { children: l.map((d) => /* @__PURE__ */ n(
|
|
801
|
+
O,
|
|
800
802
|
{
|
|
801
|
-
title: d,
|
|
802
|
-
icon:
|
|
803
|
-
subtitle: /* @__PURE__ */ n(
|
|
804
|
-
trailing: /* @__PURE__ */ n(
|
|
803
|
+
title: d.name,
|
|
804
|
+
icon: d.icon ? /* @__PURE__ */ n("img", { src: d.icon, alt: "", className: "zd:w-6 zd:h-6" }) : null,
|
|
805
|
+
subtitle: /* @__PURE__ */ n(Q, { text: "INSTALLED" }),
|
|
806
|
+
trailing: /* @__PURE__ */ n(_, {}),
|
|
805
807
|
disabled: i,
|
|
806
|
-
onClick: () =>
|
|
808
|
+
onClick: () => s(d)
|
|
807
809
|
},
|
|
808
|
-
|
|
810
|
+
d.connector.uid
|
|
809
811
|
)) });
|
|
810
812
|
}
|
|
811
|
-
function
|
|
812
|
-
return /* @__PURE__ */
|
|
813
|
+
function be({ tile: e }) {
|
|
814
|
+
return /* @__PURE__ */ f(
|
|
813
815
|
"button",
|
|
814
816
|
{
|
|
815
817
|
type: "button",
|
|
@@ -817,26 +819,26 @@ function Ee({ tile: e }) {
|
|
|
817
819
|
className: "zd:flex zd:flex-col zd:items-center zd:gap-1.5 zd:cursor-pointer",
|
|
818
820
|
children: [
|
|
819
821
|
/* @__PURE__ */ n("div", { className: "zd:w-16 zd:h-16 zd:rounded-2xl zd:bg-greyScale/5 zd:flex zd:items-center zd:justify-center", children: e.icon ? /* @__PURE__ */ n("img", { src: e.icon, alt: "", className: "zd:w-8 zd:h-8" }) : /* @__PURE__ */ n(
|
|
820
|
-
|
|
822
|
+
V,
|
|
821
823
|
{
|
|
822
824
|
name: "walletOutline",
|
|
823
825
|
className: "zd:w-8 zd:h-8 zd:text-greyScale"
|
|
824
826
|
}
|
|
825
827
|
) }),
|
|
826
|
-
/* @__PURE__ */ n(
|
|
828
|
+
/* @__PURE__ */ n(D, { className: "zd:text-body3 zd:max-w-full zd:truncate", children: e.name })
|
|
827
829
|
]
|
|
828
830
|
}
|
|
829
831
|
);
|
|
830
832
|
}
|
|
831
|
-
function
|
|
833
|
+
function Se({
|
|
832
834
|
open: e,
|
|
833
835
|
onOpenChange: t,
|
|
834
|
-
tiles:
|
|
836
|
+
tiles: o
|
|
835
837
|
}) {
|
|
836
|
-
return /* @__PURE__ */ n(
|
|
837
|
-
/* @__PURE__ */ n(
|
|
838
|
-
/* @__PURE__ */
|
|
839
|
-
/* @__PURE__ */ n(
|
|
838
|
+
return /* @__PURE__ */ n(f2, { open: e, onOpenChange: t, children: /* @__PURE__ */ f(p2, { className: "zd:p-4", children: [
|
|
839
|
+
/* @__PURE__ */ n(h2, { children: "All wallets" }),
|
|
840
|
+
/* @__PURE__ */ f("div", { className: "zd:mb-3 zd:flex zd:items-center zd:gap-2", children: [
|
|
841
|
+
/* @__PURE__ */ n(D, { className: "zd:text-h3 zd:flex-1", children: "All wallets" }),
|
|
840
842
|
/* @__PURE__ */ n(m2, { asChild: !0, children: /* @__PURE__ */ n(
|
|
841
843
|
"button",
|
|
842
844
|
{
|
|
@@ -847,182 +849,158 @@ function Fe({
|
|
|
847
849
|
}
|
|
848
850
|
) })
|
|
849
851
|
] }),
|
|
850
|
-
/* @__PURE__ */ n("div", { className: "zd:grid zd:grid-cols-3 zd:gap-3 zd:max-h-80 zd:overflow-y-auto", children:
|
|
852
|
+
/* @__PURE__ */ n("div", { className: "zd:grid zd:grid-cols-3 zd:gap-3 zd:max-h-80 zd:overflow-y-auto", children: o.map((i) => /* @__PURE__ */ n(be, { tile: i }, i.key)) })
|
|
851
853
|
] }) });
|
|
852
854
|
}
|
|
853
|
-
function
|
|
855
|
+
function Ae({
|
|
854
856
|
title: e = "More wallets"
|
|
855
857
|
}) {
|
|
856
|
-
const {
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
(
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
{ connector: m },
|
|
863
|
-
{
|
|
864
|
-
// The external wallet is now the active wagmi connection — the
|
|
865
|
-
// embedded-wallet flow is done, so close it.
|
|
866
|
-
onSuccess: () => t(null),
|
|
867
|
-
onError: (h) => {
|
|
868
|
-
R(h) || o(h instanceof Error ? h.message : String(h));
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
));
|
|
872
|
-
}, d = u.some(J), D = k.map((m) => {
|
|
873
|
-
const h = F.find((v) => n2(v, m));
|
|
858
|
+
const { startWalletConnection: t } = b(), { authPending: o, guardAgreement: i, openWalletSheet: r } = I(), [a, c] = x(!1), l = W(), s = l.filter(
|
|
859
|
+
(u) => u.id !== "zerodev-wallet" && u.type !== "walletConnect"
|
|
860
|
+
), d = (u, h, g) => {
|
|
861
|
+
o || i() && (c(!1), t({ connectorUid: u.uid, name: h, icon: g }));
|
|
862
|
+
}, p = l.some(q), w = U.map((u) => {
|
|
863
|
+
const h = s.find((g) => $(g, u));
|
|
874
864
|
return {
|
|
875
|
-
key:
|
|
876
|
-
name:
|
|
877
|
-
icon:
|
|
865
|
+
key: u.id,
|
|
866
|
+
name: u.name,
|
|
867
|
+
icon: u.icon,
|
|
878
868
|
onSelect: () => {
|
|
879
869
|
if (h) {
|
|
880
|
-
|
|
870
|
+
d(h, u.name, u.icon);
|
|
881
871
|
return;
|
|
882
872
|
}
|
|
883
|
-
if (
|
|
884
|
-
if (
|
|
885
|
-
|
|
873
|
+
if (p) {
|
|
874
|
+
if (o || !i()) return;
|
|
875
|
+
c(!1), r(u);
|
|
886
876
|
return;
|
|
887
877
|
}
|
|
888
|
-
const
|
|
889
|
-
if (
|
|
890
|
-
|
|
878
|
+
const g = s.find((E) => M(E, u));
|
|
879
|
+
if (g) {
|
|
880
|
+
d(g, u.name, u.icon);
|
|
891
881
|
return;
|
|
892
882
|
}
|
|
893
|
-
|
|
883
|
+
c(!1), window.open(u.downloadUrl, "_blank", "noopener,noreferrer");
|
|
894
884
|
}
|
|
895
885
|
};
|
|
896
|
-
}),
|
|
897
|
-
key:
|
|
898
|
-
name:
|
|
899
|
-
icon:
|
|
900
|
-
onSelect: () =>
|
|
886
|
+
}), z = s.filter((u) => !U.some((h) => M(u, h))).map((u) => ({
|
|
887
|
+
key: u.uid,
|
|
888
|
+
name: u.name,
|
|
889
|
+
icon: u.icon,
|
|
890
|
+
onSelect: () => d(u, u.name, u.icon)
|
|
901
891
|
}));
|
|
902
|
-
return /* @__PURE__ */
|
|
892
|
+
return /* @__PURE__ */ f(A, { children: [
|
|
903
893
|
/* @__PURE__ */ n(
|
|
904
|
-
|
|
894
|
+
O,
|
|
905
895
|
{
|
|
906
|
-
icon: /* @__PURE__ */ n(
|
|
896
|
+
icon: /* @__PURE__ */ n(g2, { name: "walletOutline", className: "zd:w-5 zd:h-5" }),
|
|
907
897
|
title: e,
|
|
908
|
-
trailing: /* @__PURE__ */ n(
|
|
909
|
-
disabled:
|
|
898
|
+
trailing: /* @__PURE__ */ n(_, {}),
|
|
899
|
+
disabled: o,
|
|
910
900
|
onClick: () => {
|
|
911
|
-
|
|
901
|
+
o || i() && c(!0);
|
|
912
902
|
}
|
|
913
903
|
}
|
|
914
904
|
),
|
|
915
905
|
/* @__PURE__ */ n(
|
|
916
|
-
|
|
906
|
+
Se,
|
|
917
907
|
{
|
|
918
|
-
open:
|
|
919
|
-
onOpenChange:
|
|
920
|
-
tiles: [...
|
|
908
|
+
open: a,
|
|
909
|
+
onOpenChange: c,
|
|
910
|
+
tiles: [...p ? [
|
|
921
911
|
{
|
|
922
912
|
key: "walletconnect",
|
|
923
913
|
name: "WalletConnect",
|
|
924
|
-
icon:
|
|
914
|
+
icon: X,
|
|
925
915
|
onSelect: () => {
|
|
926
|
-
|
|
916
|
+
o || i() && (c(!1), r());
|
|
927
917
|
}
|
|
928
918
|
}
|
|
929
|
-
] : [], ...
|
|
919
|
+
] : [], ...w, ...z]
|
|
930
920
|
}
|
|
931
921
|
)
|
|
932
922
|
] });
|
|
933
923
|
}
|
|
934
|
-
function
|
|
935
|
-
const { goToStep: e } =
|
|
924
|
+
function A2() {
|
|
925
|
+
const { goToStep: e } = b(), { authPending: t, guardAgreement: o, setError: i } = I(), r = {
|
|
936
926
|
onSuccess: () => {
|
|
937
927
|
e("authenticated");
|
|
938
928
|
},
|
|
939
|
-
onError: (
|
|
940
|
-
|
|
929
|
+
onError: (p) => {
|
|
930
|
+
t2(p) || i(p instanceof Error ? p.message : String(p));
|
|
941
931
|
}
|
|
942
|
-
}, { mutate: a, isPending:
|
|
943
|
-
mutation:
|
|
932
|
+
}, { mutate: a, isPending: c } = V2({ mutation: r }), { mutate: l, isPending: s } = j2({
|
|
933
|
+
mutation: r
|
|
944
934
|
});
|
|
945
|
-
|
|
946
|
-
const
|
|
947
|
-
t ||
|
|
935
|
+
e2(c || s);
|
|
936
|
+
const d = (p) => () => {
|
|
937
|
+
t || o() && (i(null), p());
|
|
948
938
|
};
|
|
949
|
-
return /* @__PURE__ */
|
|
939
|
+
return /* @__PURE__ */ f(A, { children: [
|
|
950
940
|
/* @__PURE__ */ n(
|
|
951
|
-
|
|
941
|
+
v,
|
|
952
942
|
{
|
|
953
943
|
action: "secondary",
|
|
954
944
|
text: "Create a passkey",
|
|
955
945
|
iconName: "key",
|
|
956
946
|
trailIcon: !0,
|
|
957
947
|
disabled: t,
|
|
958
|
-
onClick:
|
|
948
|
+
onClick: d(() => a())
|
|
959
949
|
}
|
|
960
950
|
),
|
|
961
951
|
/* @__PURE__ */ n(
|
|
962
|
-
|
|
952
|
+
v,
|
|
963
953
|
{
|
|
964
954
|
action: "secondary",
|
|
965
955
|
text: "Log in with passkey",
|
|
966
956
|
iconName: "key",
|
|
967
957
|
trailIcon: !0,
|
|
968
958
|
disabled: t,
|
|
969
|
-
onClick:
|
|
959
|
+
onClick: d(() => l())
|
|
970
960
|
}
|
|
971
961
|
)
|
|
972
962
|
] });
|
|
973
963
|
}
|
|
974
|
-
function
|
|
975
|
-
const t =
|
|
964
|
+
function ke({ walletId: e }) {
|
|
965
|
+
const t = U.find((z) => z.id === e);
|
|
976
966
|
if (!t)
|
|
977
967
|
throw new Error(
|
|
978
|
-
`Unknown walletId "${e}". Valid ids: ${
|
|
968
|
+
`Unknown walletId "${e}". Valid ids: ${U.map((z) => z.id).join(", ")}`
|
|
979
969
|
);
|
|
980
|
-
const {
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
setError: a,
|
|
984
|
-
registerWallet: s,
|
|
985
|
-
openWalletSheet: l
|
|
986
|
-
} = U(), u = H(), { connect: g, isPending: z } = V();
|
|
987
|
-
P(z), L2(() => s(t.id), [s, t.id]);
|
|
988
|
-
const F = u.find((f) => n2(f, t)), p = {
|
|
970
|
+
const { startWalletConnection: o } = b(), { authPending: i, guardAgreement: r, registerWallet: a, openWalletSheet: c } = I(), l = W();
|
|
971
|
+
W2(() => a(t.id), [a, t.id]);
|
|
972
|
+
const s = l.find((z) => $(z, t)), d = {
|
|
989
973
|
title: t.name,
|
|
990
974
|
icon: /* @__PURE__ */ n("img", { src: t.icon, alt: "", className: "zd:w-6 zd:h-6" }),
|
|
991
|
-
trailing: /* @__PURE__ */ n(
|
|
975
|
+
trailing: /* @__PURE__ */ n(_, {})
|
|
992
976
|
};
|
|
993
|
-
if (!
|
|
977
|
+
if (!s && l.some(q))
|
|
994
978
|
return /* @__PURE__ */ n(
|
|
995
|
-
|
|
979
|
+
O,
|
|
996
980
|
{
|
|
997
|
-
...
|
|
981
|
+
...d,
|
|
998
982
|
disabled: i,
|
|
999
983
|
onClick: () => {
|
|
1000
|
-
i ||
|
|
984
|
+
i || r() && c(t);
|
|
1001
985
|
}
|
|
1002
986
|
}
|
|
1003
987
|
);
|
|
1004
|
-
const
|
|
1005
|
-
return
|
|
1006
|
-
|
|
988
|
+
const p = s ?? l.find((z) => M(z, t));
|
|
989
|
+
return p ? /* @__PURE__ */ n(
|
|
990
|
+
O,
|
|
1007
991
|
{
|
|
1008
|
-
...
|
|
1009
|
-
...!!
|
|
992
|
+
...d,
|
|
993
|
+
...!!s && { subtitle: /* @__PURE__ */ n(Q, { text: "INSTALLED" }) },
|
|
1010
994
|
disabled: i,
|
|
1011
995
|
onClick: () => {
|
|
1012
|
-
i ||
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
onSuccess: () => r(null),
|
|
1018
|
-
onError: (f) => {
|
|
1019
|
-
R(f) || a(f instanceof Error ? f.message : String(f));
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
));
|
|
996
|
+
i || r() && o({
|
|
997
|
+
connectorUid: p.uid,
|
|
998
|
+
name: t.name,
|
|
999
|
+
icon: t.icon
|
|
1000
|
+
});
|
|
1023
1001
|
}
|
|
1024
1002
|
}
|
|
1025
|
-
) : /* @__PURE__ */ n(
|
|
1003
|
+
) : /* @__PURE__ */ n(O, { ...d, asChild: !0, children: /* @__PURE__ */ n(
|
|
1026
1004
|
"a",
|
|
1027
1005
|
{
|
|
1028
1006
|
href: t.downloadUrl,
|
|
@@ -1031,282 +1009,426 @@ function ve({ walletId: e }) {
|
|
|
1031
1009
|
}
|
|
1032
1010
|
) });
|
|
1033
1011
|
}
|
|
1034
|
-
function
|
|
1035
|
-
const { authPending: e, guardAgreement: t, openWalletSheet:
|
|
1036
|
-
return
|
|
1037
|
-
|
|
1012
|
+
function Ne() {
|
|
1013
|
+
const { authPending: e, guardAgreement: t, openWalletSheet: o } = I();
|
|
1014
|
+
return W().some(q) ? /* @__PURE__ */ n(
|
|
1015
|
+
O,
|
|
1038
1016
|
{
|
|
1039
1017
|
title: "WalletConnect",
|
|
1040
|
-
icon: /* @__PURE__ */ n("img", { src:
|
|
1041
|
-
subtitle: /* @__PURE__ */ n(
|
|
1042
|
-
trailing: /* @__PURE__ */ n(
|
|
1018
|
+
icon: /* @__PURE__ */ n("img", { src: X, alt: "", className: "zd:w-6 zd:h-6" }),
|
|
1019
|
+
subtitle: /* @__PURE__ */ n(Q, { text: "QR CODE" }),
|
|
1020
|
+
trailing: /* @__PURE__ */ n(_, {}),
|
|
1043
1021
|
disabled: e,
|
|
1044
1022
|
onClick: () => {
|
|
1045
|
-
e || t() &&
|
|
1023
|
+
e || t() && o();
|
|
1046
1024
|
}
|
|
1047
1025
|
}
|
|
1048
1026
|
) : null;
|
|
1049
1027
|
}
|
|
1050
|
-
function
|
|
1028
|
+
function k2({
|
|
1051
1029
|
children: e,
|
|
1052
1030
|
termsAndConditionsUrl: t,
|
|
1053
|
-
privacyPolicyUrl:
|
|
1031
|
+
privacyPolicyUrl: o,
|
|
1054
1032
|
emailAuthMethod: i = "magicLink"
|
|
1055
1033
|
}) {
|
|
1056
|
-
const [
|
|
1034
|
+
const [r, a] = x(!1), [c, l] = x(!1), [s, d] = x(null), [p, w] = x(!1), [z, C] = x(
|
|
1057
1035
|
[]
|
|
1058
|
-
),
|
|
1059
|
-
|
|
1060
|
-
const
|
|
1061
|
-
return
|
|
1036
|
+
), m = B2((y) => (C((B) => [...B, y]), () => {
|
|
1037
|
+
C((B) => {
|
|
1038
|
+
const K = [...B];
|
|
1039
|
+
return K.splice(K.indexOf(y), 1), K;
|
|
1062
1040
|
});
|
|
1063
|
-
}), []), [
|
|
1064
|
-
return /* @__PURE__ */
|
|
1065
|
-
|
|
1041
|
+
}), []), [u, h] = x(null), g = Ee(), F = !!(t || o) && !r, S = () => F ? (l(!0), !1) : !0;
|
|
1042
|
+
return /* @__PURE__ */ f(
|
|
1043
|
+
v2.Provider,
|
|
1066
1044
|
{
|
|
1067
1045
|
value: {
|
|
1068
|
-
authPending:
|
|
1046
|
+
authPending: p,
|
|
1069
1047
|
emailAuthMethod: i,
|
|
1070
|
-
setAuthPending:
|
|
1071
|
-
needsAgreement:
|
|
1072
|
-
guardAgreement:
|
|
1073
|
-
setError:
|
|
1074
|
-
registeredWallets:
|
|
1075
|
-
registerWallet:
|
|
1048
|
+
setAuthPending: w,
|
|
1049
|
+
needsAgreement: F,
|
|
1050
|
+
guardAgreement: S,
|
|
1051
|
+
setError: d,
|
|
1052
|
+
registeredWallets: z,
|
|
1053
|
+
registerWallet: m,
|
|
1076
1054
|
openWalletSheet: (y) => {
|
|
1077
|
-
const
|
|
1078
|
-
|
|
1055
|
+
const B = y && g.deepLinkFor(y);
|
|
1056
|
+
B && (window.location.href = B), h({ wallet: y });
|
|
1079
1057
|
}
|
|
1080
1058
|
},
|
|
1081
1059
|
children: [
|
|
1082
|
-
|
|
1083
|
-
/* @__PURE__ */ n(
|
|
1084
|
-
/* @__PURE__ */ n(
|
|
1060
|
+
s !== null && /* @__PURE__ */ n("div", { className: "zd:flex zd:items-center zd:justify-center zd:h-full zd:min-h-100", children: /* @__PURE__ */ f("div", { className: "zd:flex zd:flex-col zd:gap-4 zd:max-w-md", children: [
|
|
1061
|
+
/* @__PURE__ */ n(D, { className: "zd:text-h2 zd:text-center", children: "Error occurred" }),
|
|
1062
|
+
/* @__PURE__ */ n(D, { className: "zd:text-center zd:text-red-500", children: s }),
|
|
1085
1063
|
/* @__PURE__ */ n(
|
|
1086
|
-
|
|
1064
|
+
v,
|
|
1087
1065
|
{
|
|
1088
1066
|
action: "primary",
|
|
1089
1067
|
text: "Try again",
|
|
1090
|
-
onClick: () =>
|
|
1068
|
+
onClick: () => d(null)
|
|
1091
1069
|
}
|
|
1092
1070
|
)
|
|
1093
1071
|
] }) }),
|
|
1094
|
-
/* @__PURE__ */
|
|
1072
|
+
/* @__PURE__ */ f(
|
|
1095
1073
|
"div",
|
|
1096
1074
|
{
|
|
1097
|
-
className: `zd:-mx-4 zd:flex-1 zd:flex zd:flex-col zd:justify-between zd:pb-4 zd:overflow-y-auto zd:overflow-x-hidden${
|
|
1075
|
+
className: `zd:-mx-4 zd:flex-1 zd:flex zd:flex-col zd:justify-between zd:pb-4 zd:overflow-y-auto zd:overflow-x-hidden${s !== null ? " zd:hidden" : ""}`,
|
|
1098
1076
|
children: [
|
|
1099
|
-
/* @__PURE__ */
|
|
1100
|
-
/* @__PURE__ */
|
|
1101
|
-
/* @__PURE__ */ n("div", { className: "zd:w-full zd:px-16 zd:py-4", children: /* @__PURE__ */ n(
|
|
1102
|
-
/* @__PURE__ */ n(
|
|
1103
|
-
/* @__PURE__ */ n(
|
|
1077
|
+
/* @__PURE__ */ f("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:justify-center", children: [
|
|
1078
|
+
/* @__PURE__ */ f("div", { className: "zd:px-4 zd:flex zd:flex-col zd:items-center", children: [
|
|
1079
|
+
/* @__PURE__ */ n("div", { className: "zd:w-full zd:px-16 zd:py-4", children: /* @__PURE__ */ n(ge, { className: "zd:w-full zd:pointer-events-none zd:select-none" }) }),
|
|
1080
|
+
/* @__PURE__ */ n(D, { className: "zd:text-h2 zd:text-center", children: "Continue to your wallet" }),
|
|
1081
|
+
/* @__PURE__ */ n(D, { className: "zd:mt-2 zd:text-center zd:text-greyScale/50", children: "Choose a sign-in method to proceed" })
|
|
1104
1082
|
] }),
|
|
1105
1083
|
/* @__PURE__ */ n("div", { className: "zd:mt-6 zd:mb-4 zd:px-4 zd:flex zd:flex-col zd:gap-2", children: e })
|
|
1106
1084
|
] }),
|
|
1107
1085
|
/* @__PURE__ */ n("div", { className: "zd:px-4", children: /* @__PURE__ */ n(
|
|
1108
|
-
|
|
1086
|
+
he,
|
|
1109
1087
|
{
|
|
1110
1088
|
termsAndConditionsUrl: t,
|
|
1111
|
-
privacyPolicyUrl:
|
|
1112
|
-
agreedToTerms:
|
|
1089
|
+
privacyPolicyUrl: o,
|
|
1090
|
+
agreedToTerms: r,
|
|
1113
1091
|
setAgreedToTerms: (y) => {
|
|
1114
1092
|
a(y), y && l(!1);
|
|
1115
1093
|
},
|
|
1116
|
-
highlight:
|
|
1094
|
+
highlight: c
|
|
1117
1095
|
}
|
|
1118
1096
|
) })
|
|
1119
1097
|
]
|
|
1120
1098
|
}
|
|
1121
1099
|
),
|
|
1122
1100
|
/* @__PURE__ */ n(
|
|
1123
|
-
|
|
1101
|
+
De,
|
|
1124
1102
|
{
|
|
1125
|
-
pairing:
|
|
1126
|
-
open:
|
|
1103
|
+
pairing: g,
|
|
1104
|
+
open: u !== null,
|
|
1127
1105
|
onOpenChange: (y) => {
|
|
1128
|
-
y ||
|
|
1106
|
+
y || h(null);
|
|
1129
1107
|
},
|
|
1130
|
-
wallet:
|
|
1108
|
+
wallet: u == null ? void 0 : u.wallet
|
|
1131
1109
|
}
|
|
1132
1110
|
)
|
|
1133
1111
|
]
|
|
1134
1112
|
}
|
|
1135
1113
|
);
|
|
1136
1114
|
}
|
|
1137
|
-
function
|
|
1138
|
-
return /* @__PURE__ */
|
|
1115
|
+
function N2({ label: e = "or" }) {
|
|
1116
|
+
return /* @__PURE__ */ f("div", { className: "zd:-mx-4 zd:my-2 zd:flex zd:items-center zd:gap-3", children: [
|
|
1139
1117
|
/* @__PURE__ */ n("div", { className: "zd:h-px zd:flex-1 zd:bg-greyScale/30" }),
|
|
1140
|
-
/* @__PURE__ */ n(
|
|
1118
|
+
/* @__PURE__ */ n(D, { className: "zd:text-body3", children: e }),
|
|
1141
1119
|
/* @__PURE__ */ n("div", { className: "zd:h-px zd:flex-1 zd:bg-greyScale/30" })
|
|
1142
1120
|
] });
|
|
1143
1121
|
}
|
|
1144
|
-
function
|
|
1145
|
-
return /* @__PURE__ */
|
|
1146
|
-
/* @__PURE__ */ n(v2, {}),
|
|
1122
|
+
function Ue(e) {
|
|
1123
|
+
return /* @__PURE__ */ f(k2, { ...e, children: [
|
|
1147
1124
|
/* @__PURE__ */ n(A2, {}),
|
|
1148
|
-
/* @__PURE__ */ n(
|
|
1149
|
-
/* @__PURE__ */ n(
|
|
1125
|
+
/* @__PURE__ */ n(N2, {}),
|
|
1126
|
+
/* @__PURE__ */ n(S2, {}),
|
|
1127
|
+
/* @__PURE__ */ n(b2, {})
|
|
1150
1128
|
] });
|
|
1151
1129
|
}
|
|
1152
|
-
const
|
|
1153
|
-
Default:
|
|
1154
|
-
Passkey:
|
|
1155
|
-
Google:
|
|
1156
|
-
Email:
|
|
1157
|
-
Wallet:
|
|
1158
|
-
WalletConnect:
|
|
1159
|
-
InstalledWallets:
|
|
1160
|
-
MoreWallets:
|
|
1161
|
-
Divider:
|
|
1130
|
+
const Ie = Object.assign(k2, {
|
|
1131
|
+
Default: Ue,
|
|
1132
|
+
Passkey: A2,
|
|
1133
|
+
Google: S2,
|
|
1134
|
+
Email: b2,
|
|
1135
|
+
Wallet: ke,
|
|
1136
|
+
WalletConnect: Ne,
|
|
1137
|
+
InstalledWallets: ve,
|
|
1138
|
+
MoreWallets: Ae,
|
|
1139
|
+
Divider: N2
|
|
1162
1140
|
});
|
|
1163
|
-
function
|
|
1141
|
+
function Te() {
|
|
1164
1142
|
return typeof window > "u" ? null : new URLSearchParams(window.location.search).get("code");
|
|
1165
1143
|
}
|
|
1166
|
-
function
|
|
1167
|
-
const { otpId: e, otpEncryptionTargetBundle: t, goToStep:
|
|
1144
|
+
function Le() {
|
|
1145
|
+
const { otpId: e, otpEncryptionTargetBundle: t, goToStep: o, clearOtpSession: i } = b(), [r] = x(Te), [a, c] = x(null), [l, s] = x(!1), d = j(!1), { mutate: p, isPending: w } = q2({
|
|
1168
1146
|
mutation: {
|
|
1169
1147
|
onSuccess: () => {
|
|
1170
|
-
i(),
|
|
1148
|
+
i(), o("authenticated");
|
|
1171
1149
|
},
|
|
1172
1150
|
onError: (z) => {
|
|
1173
|
-
|
|
1151
|
+
c(z);
|
|
1174
1152
|
}
|
|
1175
1153
|
}
|
|
1176
1154
|
});
|
|
1177
|
-
return
|
|
1178
|
-
if (!(
|
|
1179
|
-
if (
|
|
1180
|
-
|
|
1155
|
+
return k(() => {
|
|
1156
|
+
if (!(d.current || !r)) {
|
|
1157
|
+
if (d.current = !0, !e || !t) {
|
|
1158
|
+
s(!0);
|
|
1181
1159
|
return;
|
|
1182
1160
|
}
|
|
1183
|
-
|
|
1161
|
+
p({ otpId: e, code: r, otpEncryptionTargetBundle: t });
|
|
1184
1162
|
}
|
|
1185
|
-
}, [e, t,
|
|
1186
|
-
/* @__PURE__ */
|
|
1187
|
-
!a &&
|
|
1188
|
-
!a &&
|
|
1189
|
-
/* @__PURE__ */
|
|
1163
|
+
}, [e, t, r, p, o]), /* @__PURE__ */ f(A, { children: [
|
|
1164
|
+
/* @__PURE__ */ f("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:gap-8 zd:items-center zd:justify-center", children: [
|
|
1165
|
+
!a && w && /* @__PURE__ */ n(N, { imageName: "loading", title: "Verifying Your Email", children: "Please wait while we securely connect your wallet." }),
|
|
1166
|
+
!a && l && /* @__PURE__ */ f(A, { children: [
|
|
1167
|
+
/* @__PURE__ */ f(N, { imageName: "error", title: "Link Expired", children: [
|
|
1168
|
+
"This verification link has expired or was already used.",
|
|
1169
|
+
/* @__PURE__ */ n("br", {}),
|
|
1170
|
+
"Please sign in again to request a new one."
|
|
1171
|
+
] }),
|
|
1172
|
+
/* @__PURE__ */ n(
|
|
1173
|
+
v,
|
|
1174
|
+
{
|
|
1175
|
+
action: "primary",
|
|
1176
|
+
onClick: () => {
|
|
1177
|
+
P(), o("sign-up");
|
|
1178
|
+
},
|
|
1179
|
+
text: "Choose another sign-in method"
|
|
1180
|
+
}
|
|
1181
|
+
)
|
|
1182
|
+
] }),
|
|
1183
|
+
!a && !l && !r && !w && /* @__PURE__ */ f(A, { children: [
|
|
1184
|
+
/* @__PURE__ */ f(N, { imageName: "error", title: "Invalid Link", children: [
|
|
1190
1185
|
"This verification link is invalid or incomplete.",
|
|
1191
1186
|
/* @__PURE__ */ n("br", {}),
|
|
1192
1187
|
"Please check your email and try again with the correct link."
|
|
1193
1188
|
] }),
|
|
1194
1189
|
/* @__PURE__ */ n(
|
|
1195
|
-
|
|
1190
|
+
v,
|
|
1196
1191
|
{
|
|
1197
1192
|
action: "primary",
|
|
1198
1193
|
onClick: () => {
|
|
1199
|
-
|
|
1194
|
+
P(), o("sign-up");
|
|
1200
1195
|
},
|
|
1201
1196
|
text: "Choose another sign-in method"
|
|
1202
1197
|
}
|
|
1203
1198
|
)
|
|
1204
1199
|
] }),
|
|
1205
|
-
a != null && /* @__PURE__ */
|
|
1206
|
-
/* @__PURE__ */ n(
|
|
1200
|
+
a != null && /* @__PURE__ */ f(A, { children: [
|
|
1201
|
+
/* @__PURE__ */ n(N, { imageName: "error", title: "Oops, something went wrong", children: "We couldn't complete the sign-in process. This could be due to timeout, an expired link, or a cancelled request." }),
|
|
1207
1202
|
/* @__PURE__ */ n(
|
|
1208
|
-
|
|
1203
|
+
v,
|
|
1209
1204
|
{
|
|
1210
1205
|
action: "primary",
|
|
1211
1206
|
onClick: () => {
|
|
1212
|
-
|
|
1207
|
+
P(), o("sign-up");
|
|
1213
1208
|
},
|
|
1214
1209
|
text: "Choose another sign-in method"
|
|
1215
1210
|
}
|
|
1216
1211
|
)
|
|
1217
1212
|
] })
|
|
1218
1213
|
] }),
|
|
1219
|
-
/* @__PURE__ */ n(
|
|
1214
|
+
/* @__PURE__ */ n(H, { className: "zd:self-center zd:pt-4 zd:pb-6" })
|
|
1215
|
+
] });
|
|
1216
|
+
}
|
|
1217
|
+
function Oe(e) {
|
|
1218
|
+
let t = e;
|
|
1219
|
+
for (let o = 0; o < 5 && Me(t); o++) {
|
|
1220
|
+
if (t.code === -32002 || t.name === "ResourceUnavailableRpcError")
|
|
1221
|
+
return !0;
|
|
1222
|
+
t = t.cause;
|
|
1223
|
+
}
|
|
1224
|
+
return !1;
|
|
1225
|
+
}
|
|
1226
|
+
function Me(e) {
|
|
1227
|
+
return typeof e == "object" && e !== null;
|
|
1228
|
+
}
|
|
1229
|
+
const i2 = /* @__PURE__ */ new WeakMap();
|
|
1230
|
+
function r2(e) {
|
|
1231
|
+
let t = i2.get(e);
|
|
1232
|
+
return t || (t = /* @__PURE__ */ new Set(), i2.set(e, t)), t;
|
|
1233
|
+
}
|
|
1234
|
+
function We(e, t) {
|
|
1235
|
+
if (t2(e))
|
|
1236
|
+
return {
|
|
1237
|
+
title: "Request declined",
|
|
1238
|
+
message: `You declined the connection request in ${t}.`,
|
|
1239
|
+
pending: !1
|
|
1240
|
+
};
|
|
1241
|
+
if (Oe(e))
|
|
1242
|
+
return {
|
|
1243
|
+
title: `Check ${t}`,
|
|
1244
|
+
message: `Open ${t} and check for an outstanding request. If one is waiting, approve or dismiss it, then try again.`,
|
|
1245
|
+
pending: !0
|
|
1246
|
+
};
|
|
1247
|
+
let o, i;
|
|
1248
|
+
if (typeof e == "string" && e.length > 0)
|
|
1249
|
+
o = e;
|
|
1250
|
+
else if (typeof e == "object" && e !== null) {
|
|
1251
|
+
const r = e, a = r.shortMessage ?? r.message;
|
|
1252
|
+
typeof a == "string" && a.length > 0 && (o = a), typeof r.code == "number" && (i = r.code);
|
|
1253
|
+
}
|
|
1254
|
+
return {
|
|
1255
|
+
title: "Couldn’t connect",
|
|
1256
|
+
message: o ?? `Something went wrong while connecting to ${t}. Please try again.` + (i !== void 0 ? ` (code ${i})` : ""),
|
|
1257
|
+
pending: !1
|
|
1258
|
+
};
|
|
1259
|
+
}
|
|
1260
|
+
function Be() {
|
|
1261
|
+
const {
|
|
1262
|
+
pendingWallet: e,
|
|
1263
|
+
connectError: t,
|
|
1264
|
+
setConnectError: o,
|
|
1265
|
+
clearPendingWallet: i,
|
|
1266
|
+
goToStep: r
|
|
1267
|
+
} = b(), a = W(), c = D2(), l = y2(), s = e ? a.find((m) => m.uid === e.connectorUid) : void 0, d = (e == null ? void 0 : e.name) ?? "your wallet", p = () => {
|
|
1268
|
+
const m = l.getState().auth;
|
|
1269
|
+
m.stepHistory.length > 0 ? m.goBack() : m.goToStep("sign-up");
|
|
1270
|
+
}, w = () => {
|
|
1271
|
+
i(), r(null);
|
|
1272
|
+
}, z = () => {
|
|
1273
|
+
if (o(null), s && r2(c).has(s.uid)) return;
|
|
1274
|
+
if (!s) {
|
|
1275
|
+
i(), p();
|
|
1276
|
+
return;
|
|
1277
|
+
}
|
|
1278
|
+
if (c.state.current === s.uid) {
|
|
1279
|
+
w();
|
|
1280
|
+
return;
|
|
1281
|
+
}
|
|
1282
|
+
const m = r2(c);
|
|
1283
|
+
m.add(s.uid), Q2(c, { connector: s }).then(
|
|
1284
|
+
() => {
|
|
1285
|
+
m.delete(s.uid), w();
|
|
1286
|
+
},
|
|
1287
|
+
(u) => {
|
|
1288
|
+
var g;
|
|
1289
|
+
m.delete(s.uid);
|
|
1290
|
+
const h = l.getState().auth;
|
|
1291
|
+
h.step !== "wallet-connecting" || ((g = h.pendingWallet) == null ? void 0 : g.connectorUid) !== s.uid || o(We(u, d));
|
|
1292
|
+
}
|
|
1293
|
+
);
|
|
1294
|
+
};
|
|
1295
|
+
k(() => {
|
|
1296
|
+
if (!s) return;
|
|
1297
|
+
const m = s.uid;
|
|
1298
|
+
return c.subscribe(
|
|
1299
|
+
(u) => u.status === "connected" ? u.current : null,
|
|
1300
|
+
(u) => {
|
|
1301
|
+
var E;
|
|
1302
|
+
if (!u) return;
|
|
1303
|
+
const h = (E = c.state.connections.get(u)) == null ? void 0 : E.connector;
|
|
1304
|
+
if ((h == null ? void 0 : h.uid) !== m) return;
|
|
1305
|
+
const g = l.getState().auth;
|
|
1306
|
+
g.clearPendingWallet(), g.goToStep(null);
|
|
1307
|
+
}
|
|
1308
|
+
);
|
|
1309
|
+
}, [s, c, l]);
|
|
1310
|
+
const C = j(!1);
|
|
1311
|
+
return k(() => {
|
|
1312
|
+
C.current || (C.current = !0, z());
|
|
1313
|
+
}, []), /* @__PURE__ */ f(A, { children: [
|
|
1314
|
+
/* @__PURE__ */ f("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:gap-8 zd:items-center zd:justify-center", children: [
|
|
1315
|
+
t === null ? /* @__PURE__ */ f(N, { imageName: "loading", title: `Waiting for ${d}`, children: [
|
|
1316
|
+
"Approve or reject the request in your wallet.",
|
|
1317
|
+
/* @__PURE__ */ n("br", {}),
|
|
1318
|
+
"Nothing showing? Open the wallet, the request may be waiting behind its unlock screen."
|
|
1319
|
+
] }) : /* @__PURE__ */ n(
|
|
1320
|
+
N,
|
|
1321
|
+
{
|
|
1322
|
+
imageName: t.pending ? "loading" : "error",
|
|
1323
|
+
title: t.title,
|
|
1324
|
+
children: t.message
|
|
1325
|
+
}
|
|
1326
|
+
),
|
|
1327
|
+
/* @__PURE__ */ f("div", { className: "zd:flex zd:flex-col zd:gap-1", children: [
|
|
1328
|
+
t !== null && /* @__PURE__ */ n(v, { action: "primary", text: "Try again", onClick: z }),
|
|
1329
|
+
/* @__PURE__ */ n(
|
|
1330
|
+
v,
|
|
1331
|
+
{
|
|
1332
|
+
action: "secondary",
|
|
1333
|
+
text: "Choose another sign-in method",
|
|
1334
|
+
onClick: p
|
|
1335
|
+
}
|
|
1336
|
+
)
|
|
1337
|
+
] })
|
|
1338
|
+
] }),
|
|
1339
|
+
/* @__PURE__ */ n(H, { className: "zd:self-center zd:pt-4 zd:pb-6" })
|
|
1220
1340
|
] });
|
|
1221
1341
|
}
|
|
1222
|
-
function
|
|
1223
|
-
return /* @__PURE__ */ n("div", { className: "zd:flex zd:flex-1 zd:items-center zd:justify-center", children: /* @__PURE__ */ n(
|
|
1342
|
+
function Re() {
|
|
1343
|
+
return /* @__PURE__ */ n("div", { className: "zd:flex zd:flex-1 zd:items-center zd:justify-center", children: /* @__PURE__ */ n(N, { imageName: "loading", title: "Authenticating...", children: "Please wait while we complete the OAuth authentication." }) });
|
|
1224
1344
|
}
|
|
1225
|
-
function
|
|
1226
|
-
return /* @__PURE__ */ n("div", { className: "zd:flex zd:flex-1 zd:items-center zd:justify-center", children: /* @__PURE__ */ n(
|
|
1345
|
+
function He() {
|
|
1346
|
+
return /* @__PURE__ */ n("div", { className: "zd:flex zd:flex-1 zd:items-center zd:justify-center", children: /* @__PURE__ */ n(N, { imageName: "loading", title: "Passkey authentication", children: "Please authenticate with your passkey." }) });
|
|
1227
1347
|
}
|
|
1228
|
-
function
|
|
1348
|
+
function Pe(e, t) {
|
|
1229
1349
|
switch (e) {
|
|
1230
1350
|
case "sign-up":
|
|
1231
|
-
return t ? t() : /* @__PURE__ */ n(
|
|
1351
|
+
return t ? t() : /* @__PURE__ */ n(Ie.Default, {});
|
|
1232
1352
|
case "email-verification":
|
|
1233
|
-
return /* @__PURE__ */ n(
|
|
1353
|
+
return /* @__PURE__ */ n(re, {});
|
|
1234
1354
|
case "otp-input":
|
|
1235
|
-
return /* @__PURE__ */ n(
|
|
1355
|
+
return /* @__PURE__ */ n(pe, {});
|
|
1236
1356
|
case "verifying-otp":
|
|
1237
|
-
return /* @__PURE__ */ n(
|
|
1357
|
+
return /* @__PURE__ */ n(Le, {});
|
|
1238
1358
|
case "oauth-in-progress":
|
|
1239
|
-
return /* @__PURE__ */ n(
|
|
1359
|
+
return /* @__PURE__ */ n(Re, {});
|
|
1240
1360
|
case "passkey-prompt":
|
|
1241
|
-
return /* @__PURE__ */ n(
|
|
1361
|
+
return /* @__PURE__ */ n(He, {});
|
|
1362
|
+
case "wallet-connecting":
|
|
1363
|
+
return /* @__PURE__ */ n(Be, {});
|
|
1242
1364
|
case "error":
|
|
1243
|
-
return /* @__PURE__ */ n(
|
|
1365
|
+
return /* @__PURE__ */ n(ae, {});
|
|
1244
1366
|
default:
|
|
1245
1367
|
return null;
|
|
1246
1368
|
}
|
|
1247
1369
|
}
|
|
1248
|
-
function
|
|
1370
|
+
function pt({
|
|
1249
1371
|
onClose: e,
|
|
1250
1372
|
size: t,
|
|
1251
|
-
renderSignUp:
|
|
1373
|
+
renderSignUp: o,
|
|
1252
1374
|
logo: i
|
|
1253
1375
|
} = {}) {
|
|
1254
|
-
const { step:
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
}, [
|
|
1258
|
-
const
|
|
1259
|
-
return
|
|
1260
|
-
|
|
1376
|
+
const { step: r, goToStep: a, goBack: c, reset: l } = b();
|
|
1377
|
+
k(() => {
|
|
1378
|
+
r === null && oe() && a("verifying-otp");
|
|
1379
|
+
}, [r, a]);
|
|
1380
|
+
const s = Pe(r, o);
|
|
1381
|
+
return s ? /* @__PURE__ */ n(
|
|
1382
|
+
z2,
|
|
1261
1383
|
{
|
|
1262
1384
|
...t && { size: t },
|
|
1263
|
-
className:
|
|
1385
|
+
className: r === "sign-up" ? "zd:h-auto zd:max-h-202.5" : void 0,
|
|
1264
1386
|
topNav: /* @__PURE__ */ n(
|
|
1265
|
-
|
|
1387
|
+
C2,
|
|
1266
1388
|
{
|
|
1267
|
-
...
|
|
1389
|
+
...c !== null && { onLeftButtonClick: c },
|
|
1268
1390
|
onRightButtonClick: () => {
|
|
1269
|
-
|
|
1391
|
+
P(), l(), e == null || e();
|
|
1270
1392
|
},
|
|
1271
|
-
...
|
|
1393
|
+
...r === "sign-up" && {
|
|
1272
1394
|
...i && { logo: i },
|
|
1273
1395
|
className: "zd:px-4"
|
|
1274
1396
|
}
|
|
1275
1397
|
}
|
|
1276
1398
|
),
|
|
1277
|
-
children:
|
|
1399
|
+
children: s
|
|
1278
1400
|
}
|
|
1279
1401
|
) : null;
|
|
1280
1402
|
}
|
|
1281
|
-
function
|
|
1403
|
+
function _e(e) {
|
|
1282
1404
|
const t = e.toLowerCase();
|
|
1283
|
-
return
|
|
1284
|
-
const i =
|
|
1405
|
+
return U.find((o) => {
|
|
1406
|
+
const i = o.name.toLowerCase();
|
|
1285
1407
|
return t.includes(i) || i.includes(t);
|
|
1286
1408
|
});
|
|
1287
1409
|
}
|
|
1288
|
-
function
|
|
1289
|
-
return
|
|
1410
|
+
function Ze(e) {
|
|
1411
|
+
return U.find((t) => M(e, t));
|
|
1290
1412
|
}
|
|
1291
|
-
function
|
|
1292
|
-
const { connector: e, isConnected: t } =
|
|
1293
|
-
return
|
|
1294
|
-
if (!e || !
|
|
1413
|
+
function Ge() {
|
|
1414
|
+
const { connector: e, isConnected: t } = w2(), [o, i] = x(void 0), r = !!e && e.type === "walletConnect";
|
|
1415
|
+
return k(() => {
|
|
1416
|
+
if (!e || !r) {
|
|
1295
1417
|
i(void 0);
|
|
1296
1418
|
return;
|
|
1297
1419
|
}
|
|
1298
1420
|
let a = !1;
|
|
1299
|
-
return e.getProvider().then((
|
|
1300
|
-
var
|
|
1421
|
+
return e.getProvider().then((c) => {
|
|
1422
|
+
var s, d;
|
|
1301
1423
|
if (a) return;
|
|
1302
|
-
const l = (
|
|
1424
|
+
const l = (d = (s = c.session) == null ? void 0 : s.peer) == null ? void 0 : d.metadata;
|
|
1303
1425
|
i(l);
|
|
1304
1426
|
}).catch(() => {
|
|
1305
1427
|
}), () => {
|
|
1306
1428
|
a = !0;
|
|
1307
1429
|
};
|
|
1308
|
-
}, [e,
|
|
1309
|
-
var
|
|
1430
|
+
}, [e, r]), Y(() => {
|
|
1431
|
+
var c;
|
|
1310
1432
|
if (!t || !e) return;
|
|
1311
1433
|
if (e.id === "zerodev-wallet")
|
|
1312
1434
|
return {
|
|
@@ -1314,35 +1436,35 @@ function Me() {
|
|
|
1314
1436
|
icon: e.icon,
|
|
1315
1437
|
source: "embedded"
|
|
1316
1438
|
};
|
|
1317
|
-
if (
|
|
1318
|
-
const l =
|
|
1439
|
+
if (r) {
|
|
1440
|
+
const l = o != null && o.name ? _e(o.name) : void 0;
|
|
1319
1441
|
return {
|
|
1320
|
-
name: (
|
|
1321
|
-
icon: ((
|
|
1442
|
+
name: (o == null ? void 0 : o.name) ?? void 0,
|
|
1443
|
+
icon: ((c = o == null ? void 0 : o.icons) == null ? void 0 : c[0]) ?? (l == null ? void 0 : l.icon),
|
|
1322
1444
|
walletId: l == null ? void 0 : l.id,
|
|
1323
1445
|
// Identity is about the session, so a raw walletConnect() connector
|
|
1324
1446
|
// resolves here too — unlike pairing, which is kit-connector-only.
|
|
1325
1447
|
source: "walletconnect"
|
|
1326
1448
|
};
|
|
1327
1449
|
}
|
|
1328
|
-
const a =
|
|
1450
|
+
const a = Ze(e);
|
|
1329
1451
|
return {
|
|
1330
1452
|
name: e.name,
|
|
1331
1453
|
icon: e.icon ?? (a == null ? void 0 : a.icon),
|
|
1332
1454
|
walletId: a == null ? void 0 : a.id,
|
|
1333
1455
|
source: e.type === "injected" ? "injected" : "other"
|
|
1334
1456
|
};
|
|
1335
|
-
}, [e, t,
|
|
1457
|
+
}, [e, t, r, o]);
|
|
1336
1458
|
}
|
|
1337
|
-
function
|
|
1338
|
-
const t =
|
|
1339
|
-
return
|
|
1459
|
+
function ht(e) {
|
|
1460
|
+
const t = Ge();
|
|
1461
|
+
return Y(() => ({ walletInfo: t }), [t]);
|
|
1340
1462
|
}
|
|
1341
|
-
const
|
|
1342
|
-
function
|
|
1463
|
+
const n2 = "zerodev:auth:otpSession";
|
|
1464
|
+
function Ve() {
|
|
1343
1465
|
if (typeof window > "u") return null;
|
|
1344
1466
|
try {
|
|
1345
|
-
const e = window.localStorage.getItem(
|
|
1467
|
+
const e = window.localStorage.getItem(n2);
|
|
1346
1468
|
if (!e) return null;
|
|
1347
1469
|
const t = JSON.parse(e);
|
|
1348
1470
|
return !(t != null && t.otpId) || !(t != null && t.otpEncryptionTargetBundle) ? null : t;
|
|
@@ -1350,24 +1472,24 @@ function Be() {
|
|
|
1350
1472
|
return null;
|
|
1351
1473
|
}
|
|
1352
1474
|
}
|
|
1353
|
-
function
|
|
1475
|
+
function je(e) {
|
|
1354
1476
|
if (!(typeof window > "u"))
|
|
1355
1477
|
try {
|
|
1356
1478
|
window.localStorage.setItem(
|
|
1357
|
-
|
|
1479
|
+
n2,
|
|
1358
1480
|
JSON.stringify(e)
|
|
1359
1481
|
);
|
|
1360
1482
|
} catch {
|
|
1361
1483
|
}
|
|
1362
1484
|
}
|
|
1363
|
-
function
|
|
1485
|
+
function o2() {
|
|
1364
1486
|
if (!(typeof window > "u"))
|
|
1365
1487
|
try {
|
|
1366
|
-
window.localStorage.removeItem(
|
|
1488
|
+
window.localStorage.removeItem(n2);
|
|
1367
1489
|
} catch {
|
|
1368
1490
|
}
|
|
1369
1491
|
}
|
|
1370
|
-
const
|
|
1492
|
+
const qe = (e, t, o) => ({
|
|
1371
1493
|
auth: {
|
|
1372
1494
|
// Initial state
|
|
1373
1495
|
step: null,
|
|
@@ -1375,69 +1497,96 @@ const Re = (e, t, r) => ({
|
|
|
1375
1497
|
email: null,
|
|
1376
1498
|
otpId: null,
|
|
1377
1499
|
otpEncryptionTargetBundle: null,
|
|
1500
|
+
pendingWallet: null,
|
|
1501
|
+
connectError: null,
|
|
1378
1502
|
// Actions
|
|
1379
1503
|
initialize: () => {
|
|
1380
|
-
const i =
|
|
1381
|
-
i && e((
|
|
1504
|
+
const i = Ve();
|
|
1505
|
+
i && e((r) => ({
|
|
1382
1506
|
auth: {
|
|
1383
|
-
...
|
|
1507
|
+
...r.auth,
|
|
1384
1508
|
otpId: i.otpId,
|
|
1385
1509
|
otpEncryptionTargetBundle: i.otpEncryptionTargetBundle
|
|
1386
1510
|
}
|
|
1387
1511
|
}));
|
|
1388
1512
|
},
|
|
1389
1513
|
goToStep: (i) => {
|
|
1390
|
-
e((
|
|
1514
|
+
e((r) => ({
|
|
1391
1515
|
auth: {
|
|
1392
|
-
...
|
|
1516
|
+
...r.auth,
|
|
1393
1517
|
step: i,
|
|
1394
|
-
|
|
1518
|
+
// `null` ends the flow: clear the history so the next open has no
|
|
1519
|
+
// stale back arrow.
|
|
1520
|
+
stepHistory: i === null ? [] : r.auth.step === null ? r.auth.stepHistory : [...r.auth.stepHistory, r.auth.step]
|
|
1395
1521
|
}
|
|
1396
1522
|
}));
|
|
1397
1523
|
},
|
|
1398
1524
|
goBack: () => {
|
|
1399
1525
|
const { auth: i } = t();
|
|
1400
1526
|
if (i.stepHistory.length === 0) return;
|
|
1401
|
-
const
|
|
1402
|
-
e((
|
|
1527
|
+
const r = [...i.stepHistory], a = r.pop();
|
|
1528
|
+
e((c) => ({
|
|
1403
1529
|
auth: {
|
|
1404
|
-
...
|
|
1530
|
+
...c.auth,
|
|
1405
1531
|
step: a,
|
|
1406
|
-
stepHistory:
|
|
1532
|
+
stepHistory: r
|
|
1407
1533
|
}
|
|
1408
1534
|
}));
|
|
1409
1535
|
},
|
|
1410
1536
|
reset: () => {
|
|
1411
|
-
|
|
1537
|
+
o2(), e((i) => ({
|
|
1412
1538
|
auth: {
|
|
1413
1539
|
...i.auth,
|
|
1414
1540
|
step: null,
|
|
1415
1541
|
stepHistory: [],
|
|
1416
1542
|
email: null,
|
|
1417
1543
|
otpId: null,
|
|
1418
|
-
otpEncryptionTargetBundle: null
|
|
1544
|
+
otpEncryptionTargetBundle: null,
|
|
1545
|
+
pendingWallet: null,
|
|
1546
|
+
connectError: null
|
|
1419
1547
|
}
|
|
1420
1548
|
}));
|
|
1421
1549
|
},
|
|
1550
|
+
startWalletConnection: (i) => {
|
|
1551
|
+
e((r) => ({
|
|
1552
|
+
auth: {
|
|
1553
|
+
...r.auth,
|
|
1554
|
+
pendingWallet: i,
|
|
1555
|
+
connectError: null,
|
|
1556
|
+
step: "wallet-connecting",
|
|
1557
|
+
stepHistory: r.auth.step === null ? r.auth.stepHistory : [...r.auth.stepHistory, r.auth.step]
|
|
1558
|
+
}
|
|
1559
|
+
}));
|
|
1560
|
+
},
|
|
1561
|
+
setConnectError: (i) => {
|
|
1562
|
+
e((r) => ({
|
|
1563
|
+
auth: { ...r.auth, connectError: i }
|
|
1564
|
+
}));
|
|
1565
|
+
},
|
|
1566
|
+
clearPendingWallet: () => {
|
|
1567
|
+
e((i) => ({
|
|
1568
|
+
auth: { ...i.auth, pendingWallet: null, connectError: null }
|
|
1569
|
+
}));
|
|
1570
|
+
},
|
|
1422
1571
|
setEmail: (i) => {
|
|
1423
|
-
e((
|
|
1572
|
+
e((r) => ({
|
|
1424
1573
|
auth: {
|
|
1425
|
-
...
|
|
1574
|
+
...r.auth,
|
|
1426
1575
|
email: i
|
|
1427
1576
|
}
|
|
1428
1577
|
}));
|
|
1429
1578
|
},
|
|
1430
|
-
setOtpSession: ({ otpId: i, otpEncryptionTargetBundle:
|
|
1431
|
-
|
|
1579
|
+
setOtpSession: ({ otpId: i, otpEncryptionTargetBundle: r }) => {
|
|
1580
|
+
je({ otpId: i, otpEncryptionTargetBundle: r }), e((a) => ({
|
|
1432
1581
|
auth: {
|
|
1433
1582
|
...a.auth,
|
|
1434
1583
|
otpId: i,
|
|
1435
|
-
otpEncryptionTargetBundle:
|
|
1584
|
+
otpEncryptionTargetBundle: r
|
|
1436
1585
|
}
|
|
1437
1586
|
}));
|
|
1438
1587
|
},
|
|
1439
1588
|
clearOtpSession: () => {
|
|
1440
|
-
|
|
1589
|
+
o2(), e((i) => ({
|
|
1441
1590
|
auth: {
|
|
1442
1591
|
...i.auth,
|
|
1443
1592
|
otpId: null,
|
|
@@ -1446,104 +1595,104 @@ const Re = (e, t, r) => ({
|
|
|
1446
1595
|
}));
|
|
1447
1596
|
}
|
|
1448
1597
|
}
|
|
1449
|
-
}),
|
|
1450
|
-
|
|
1598
|
+
}), Ke = () => H2()(
|
|
1599
|
+
Y2((e, t, o) => ({
|
|
1451
1600
|
pendingRequests: [],
|
|
1452
1601
|
userConfirmationListenerActive: !1,
|
|
1453
|
-
addPendingRequest: (i) => e((
|
|
1454
|
-
pendingRequests: [...
|
|
1602
|
+
addPendingRequest: (i) => e((r) => ({
|
|
1603
|
+
pendingRequests: [...r.pendingRequests, i]
|
|
1455
1604
|
})),
|
|
1456
|
-
removePendingRequest: (i) => e((
|
|
1457
|
-
pendingRequests:
|
|
1605
|
+
removePendingRequest: (i) => e((r) => ({
|
|
1606
|
+
pendingRequests: r.pendingRequests.filter((a) => a.id !== i)
|
|
1458
1607
|
})),
|
|
1459
1608
|
clearPendingRequests: () => e({ pendingRequests: [] }),
|
|
1460
1609
|
setUserConfirmationListenerActive: (i) => e({ userConfirmationListenerActive: i }),
|
|
1461
|
-
...
|
|
1610
|
+
...qe(e, t)
|
|
1462
1611
|
}))
|
|
1463
1612
|
);
|
|
1464
|
-
function
|
|
1465
|
-
return new Promise((t,
|
|
1613
|
+
function Je(e) {
|
|
1614
|
+
return new Promise((t, o) => {
|
|
1466
1615
|
const i = e.subscribe(
|
|
1467
|
-
(
|
|
1468
|
-
(
|
|
1469
|
-
|
|
1616
|
+
(r) => r.auth.step,
|
|
1617
|
+
(r) => {
|
|
1618
|
+
r === "authenticated" ? (i(), t()) : r === null && (i(), o(new Error("Auth flow dismissed")));
|
|
1470
1619
|
}
|
|
1471
1620
|
);
|
|
1472
1621
|
});
|
|
1473
1622
|
}
|
|
1474
|
-
function
|
|
1475
|
-
const t =
|
|
1623
|
+
function mt(e) {
|
|
1624
|
+
const t = K2(e), o = Ke();
|
|
1476
1625
|
return (i) => {
|
|
1477
|
-
const
|
|
1626
|
+
const r = t(i);
|
|
1478
1627
|
return {
|
|
1479
|
-
...
|
|
1628
|
+
...r,
|
|
1480
1629
|
async connect(a) {
|
|
1481
1630
|
try {
|
|
1482
|
-
return await
|
|
1483
|
-
} catch (
|
|
1484
|
-
if (a != null && a.isReconnecting || !(
|
|
1485
|
-
throw
|
|
1486
|
-
if (
|
|
1631
|
+
return await r.connect(a);
|
|
1632
|
+
} catch (c) {
|
|
1633
|
+
if (a != null && a.isReconnecting || !(c instanceof J2))
|
|
1634
|
+
throw c;
|
|
1635
|
+
if (o.getState().auth.step !== null)
|
|
1487
1636
|
throw new Error("Auth flow already in progress");
|
|
1488
|
-
return
|
|
1637
|
+
return o.getState().auth.goToStep("sign-up"), await Je(o), r.connect(a);
|
|
1489
1638
|
}
|
|
1490
1639
|
},
|
|
1491
1640
|
async disconnect() {
|
|
1492
1641
|
var a;
|
|
1493
|
-
await ((a =
|
|
1642
|
+
await ((a = r.disconnect) == null ? void 0 : a.call(r)), o.getState().auth.reset();
|
|
1494
1643
|
},
|
|
1495
1644
|
async setup() {
|
|
1496
1645
|
var a;
|
|
1497
|
-
await ((a =
|
|
1646
|
+
typeof window < "u" && o.getState().auth.initialize(), await ((a = r.setup) == null ? void 0 : a.call(r)), typeof window > "u";
|
|
1498
1647
|
},
|
|
1499
1648
|
getKitStore() {
|
|
1500
|
-
return
|
|
1649
|
+
return o;
|
|
1501
1650
|
}
|
|
1502
1651
|
};
|
|
1503
1652
|
};
|
|
1504
1653
|
}
|
|
1505
|
-
const
|
|
1654
|
+
const Qe = {
|
|
1506
1655
|
Pending: "zd:text-solarOrange",
|
|
1507
1656
|
Success: "zd:text-positive",
|
|
1508
1657
|
Failed: "zd:text-negative"
|
|
1509
1658
|
};
|
|
1510
|
-
function
|
|
1659
|
+
function Ye({
|
|
1511
1660
|
icon: e,
|
|
1512
1661
|
title: t,
|
|
1513
|
-
value:
|
|
1662
|
+
value: o,
|
|
1514
1663
|
chainName: i,
|
|
1515
|
-
chainIconUrl:
|
|
1664
|
+
chainIconUrl: r,
|
|
1516
1665
|
destChainName: a,
|
|
1517
|
-
destChainIconUrl:
|
|
1666
|
+
destChainIconUrl: c,
|
|
1518
1667
|
status: l,
|
|
1519
|
-
className:
|
|
1668
|
+
className: s
|
|
1520
1669
|
}) {
|
|
1521
|
-
return /* @__PURE__ */
|
|
1670
|
+
return /* @__PURE__ */ f(
|
|
1522
1671
|
"div",
|
|
1523
1672
|
{
|
|
1524
|
-
className:
|
|
1673
|
+
className: G(
|
|
1525
1674
|
"zd:flex zd:w-full zd:items-center zd:gap-2 zd:p-2",
|
|
1526
|
-
|
|
1675
|
+
s
|
|
1527
1676
|
),
|
|
1528
1677
|
children: [
|
|
1529
|
-
/* @__PURE__ */ n("div", { className: "zd:flex zd:size-11 zd:shrink-0 zd:items-center zd:justify-center zd:rounded-xl zd:bg-white", children: /* @__PURE__ */ n(
|
|
1530
|
-
/* @__PURE__ */
|
|
1531
|
-
/* @__PURE__ */
|
|
1532
|
-
/* @__PURE__ */ n(
|
|
1533
|
-
/* @__PURE__ */ n(
|
|
1678
|
+
/* @__PURE__ */ n("div", { className: "zd:flex zd:size-11 zd:shrink-0 zd:items-center zd:justify-center zd:rounded-xl zd:bg-white", children: /* @__PURE__ */ n(V, { name: e, className: "zd:size-5" }) }),
|
|
1679
|
+
/* @__PURE__ */ f("div", { className: "zd:flex zd:min-w-0 zd:flex-1 zd:flex-col zd:gap-2", children: [
|
|
1680
|
+
/* @__PURE__ */ f("div", { className: "zd:flex zd:w-full zd:items-center zd:justify-between zd:gap-2", children: [
|
|
1681
|
+
/* @__PURE__ */ n(D, { className: "zd:shrink-0 zd:whitespace-nowrap zd:text-body1", children: t }),
|
|
1682
|
+
/* @__PURE__ */ n(D, { className: "zd:min-w-0 zd:truncate zd:text-right zd:text-body1", children: o })
|
|
1534
1683
|
] }),
|
|
1535
|
-
/* @__PURE__ */
|
|
1536
|
-
/* @__PURE__ */
|
|
1684
|
+
/* @__PURE__ */ f("div", { className: "zd:flex zd:w-full zd:items-center zd:justify-between zd:gap-2", children: [
|
|
1685
|
+
/* @__PURE__ */ f("div", { className: "zd:flex zd:min-w-0 zd:items-center zd:gap-2", children: [
|
|
1537
1686
|
/* @__PURE__ */ n(
|
|
1538
|
-
|
|
1687
|
+
a2,
|
|
1539
1688
|
{
|
|
1540
1689
|
name: i,
|
|
1541
|
-
...
|
|
1690
|
+
...r && { iconUrl: r }
|
|
1542
1691
|
}
|
|
1543
1692
|
),
|
|
1544
|
-
a && /* @__PURE__ */
|
|
1693
|
+
a && /* @__PURE__ */ f(A, { children: [
|
|
1545
1694
|
/* @__PURE__ */ n(
|
|
1546
|
-
|
|
1695
|
+
V,
|
|
1547
1696
|
{
|
|
1548
1697
|
name: "arrowRightFill",
|
|
1549
1698
|
"aria-hidden": !0,
|
|
@@ -1551,18 +1700,18 @@ function Ze({
|
|
|
1551
1700
|
}
|
|
1552
1701
|
),
|
|
1553
1702
|
/* @__PURE__ */ n(
|
|
1554
|
-
|
|
1703
|
+
a2,
|
|
1555
1704
|
{
|
|
1556
1705
|
name: a,
|
|
1557
|
-
...
|
|
1706
|
+
...c && { iconUrl: c }
|
|
1558
1707
|
}
|
|
1559
1708
|
)
|
|
1560
1709
|
] })
|
|
1561
1710
|
] }),
|
|
1562
1711
|
/* @__PURE__ */ n(
|
|
1563
|
-
|
|
1712
|
+
D,
|
|
1564
1713
|
{
|
|
1565
|
-
className:
|
|
1714
|
+
className: G("zd:shrink-0 zd:text-body3", Qe[l]),
|
|
1566
1715
|
children: l
|
|
1567
1716
|
}
|
|
1568
1717
|
)
|
|
@@ -1572,8 +1721,8 @@ function Ze({
|
|
|
1572
1721
|
}
|
|
1573
1722
|
);
|
|
1574
1723
|
}
|
|
1575
|
-
function
|
|
1576
|
-
return /* @__PURE__ */
|
|
1724
|
+
function a2({ name: e, iconUrl: t }) {
|
|
1725
|
+
return /* @__PURE__ */ f("div", { className: "zd:flex zd:min-w-0 zd:items-center zd:gap-[5px]", children: [
|
|
1577
1726
|
t && /* @__PURE__ */ n("span", { className: "zd:size-3 zd:shrink-0 zd:overflow-hidden zd:rounded-full zd:bg-white", children: /* @__PURE__ */ n(
|
|
1578
1727
|
"img",
|
|
1579
1728
|
{
|
|
@@ -1583,21 +1732,21 @@ function o2({ name: e, iconUrl: t }) {
|
|
|
1583
1732
|
className: "zd:size-full zd:object-cover"
|
|
1584
1733
|
}
|
|
1585
1734
|
) }),
|
|
1586
|
-
/* @__PURE__ */ n(
|
|
1735
|
+
/* @__PURE__ */ n(D, { className: "zd:truncate zd:text-body3", children: e })
|
|
1587
1736
|
] });
|
|
1588
1737
|
}
|
|
1589
|
-
const
|
|
1738
|
+
const R = "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/arbitrum/info/logo.png", s2 = "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/base/info/logo.png", L = 3600 * 1e3, Xe = [
|
|
1590
1739
|
{
|
|
1591
1740
|
id: "mock-1",
|
|
1592
1741
|
icon: "arrowSwapHorizontalOutline",
|
|
1593
1742
|
title: "Swapped ETH → USD₮0",
|
|
1594
1743
|
value: "2,343 ETH",
|
|
1595
1744
|
chainName: "Arbitrum One",
|
|
1596
|
-
chainIconUrl:
|
|
1745
|
+
chainIconUrl: R,
|
|
1597
1746
|
destChainName: "Base",
|
|
1598
|
-
destChainIconUrl:
|
|
1747
|
+
destChainIconUrl: s2,
|
|
1599
1748
|
status: "Pending",
|
|
1600
|
-
timestamp: Date.now() - 1 *
|
|
1749
|
+
timestamp: Date.now() - 1 * L
|
|
1601
1750
|
},
|
|
1602
1751
|
{
|
|
1603
1752
|
id: "mock-2",
|
|
@@ -1605,11 +1754,11 @@ const B = "https://raw.githubusercontent.com/trustwallet/assets/master/blockchai
|
|
|
1605
1754
|
title: "Swapped ETH → USD₮0",
|
|
1606
1755
|
value: "2,343 ETH",
|
|
1607
1756
|
chainName: "Arbitrum One",
|
|
1608
|
-
chainIconUrl:
|
|
1757
|
+
chainIconUrl: R,
|
|
1609
1758
|
destChainName: "Base",
|
|
1610
|
-
destChainIconUrl:
|
|
1759
|
+
destChainIconUrl: s2,
|
|
1611
1760
|
status: "Pending",
|
|
1612
|
-
timestamp: Date.now() - 2 *
|
|
1761
|
+
timestamp: Date.now() - 2 * L
|
|
1613
1762
|
},
|
|
1614
1763
|
{
|
|
1615
1764
|
id: "mock-3",
|
|
@@ -1617,9 +1766,9 @@ const B = "https://raw.githubusercontent.com/trustwallet/assets/master/blockchai
|
|
|
1617
1766
|
title: "Fixed Yield",
|
|
1618
1767
|
value: "2,323 PT wstETH (25 Jan 2026)",
|
|
1619
1768
|
chainName: "Arbitrum One",
|
|
1620
|
-
chainIconUrl:
|
|
1769
|
+
chainIconUrl: R,
|
|
1621
1770
|
status: "Success",
|
|
1622
|
-
timestamp: Date.now() - 3 *
|
|
1771
|
+
timestamp: Date.now() - 3 * L
|
|
1623
1772
|
},
|
|
1624
1773
|
{
|
|
1625
1774
|
id: "mock-4",
|
|
@@ -1627,9 +1776,9 @@ const B = "https://raw.githubusercontent.com/trustwallet/assets/master/blockchai
|
|
|
1627
1776
|
title: "Received NFT",
|
|
1628
1777
|
value: "Bored Ape Yacht Club",
|
|
1629
1778
|
chainName: "Arbitrum One",
|
|
1630
|
-
chainIconUrl:
|
|
1779
|
+
chainIconUrl: R,
|
|
1631
1780
|
status: "Success",
|
|
1632
|
-
timestamp: Date.now() - 4 *
|
|
1781
|
+
timestamp: Date.now() - 4 * L
|
|
1633
1782
|
},
|
|
1634
1783
|
{
|
|
1635
1784
|
id: "mock-5",
|
|
@@ -1637,9 +1786,9 @@ const B = "https://raw.githubusercontent.com/trustwallet/assets/master/blockchai
|
|
|
1637
1786
|
title: "Collateral Used",
|
|
1638
1787
|
value: "Collateralization enabled for USD₮0",
|
|
1639
1788
|
chainName: "Arbitrum One",
|
|
1640
|
-
chainIconUrl:
|
|
1789
|
+
chainIconUrl: R,
|
|
1641
1790
|
status: "Success",
|
|
1642
|
-
timestamp: Date.now() - 336 *
|
|
1791
|
+
timestamp: Date.now() - 336 * L
|
|
1643
1792
|
},
|
|
1644
1793
|
{
|
|
1645
1794
|
id: "mock-6",
|
|
@@ -1647,64 +1796,64 @@ const B = "https://raw.githubusercontent.com/trustwallet/assets/master/blockchai
|
|
|
1647
1796
|
title: "Liquid Staked ETH",
|
|
1648
1797
|
value: "2,323 PT wstETH (25 Jan 2026)",
|
|
1649
1798
|
chainName: "Arbitrum One",
|
|
1650
|
-
chainIconUrl:
|
|
1799
|
+
chainIconUrl: R,
|
|
1651
1800
|
status: "Success",
|
|
1652
|
-
timestamp: Date.now() - 336 *
|
|
1801
|
+
timestamp: Date.now() - 336 * L - 1 * L
|
|
1653
1802
|
}
|
|
1654
1803
|
];
|
|
1655
|
-
function
|
|
1804
|
+
function Z(e) {
|
|
1656
1805
|
const t = new Date(e);
|
|
1657
1806
|
return `${t.getFullYear()}-${t.getMonth()}-${t.getDate()}`;
|
|
1658
1807
|
}
|
|
1659
|
-
function
|
|
1660
|
-
const
|
|
1661
|
-
return
|
|
1808
|
+
function $e(e, t) {
|
|
1809
|
+
const o = Z(e);
|
|
1810
|
+
return o === Z(t) ? "Today" : o === Z(t - 1440 * 60 * 1e3) ? "Yesterday" : new Intl.DateTimeFormat("en-US", {
|
|
1662
1811
|
month: "long",
|
|
1663
1812
|
day: "numeric",
|
|
1664
1813
|
year: "numeric"
|
|
1665
1814
|
}).format(new Date(e));
|
|
1666
1815
|
}
|
|
1667
|
-
function
|
|
1816
|
+
function et(e, t = Date.now()) {
|
|
1668
1817
|
var a;
|
|
1669
|
-
const
|
|
1670
|
-
let
|
|
1671
|
-
for (const
|
|
1672
|
-
const l =
|
|
1673
|
-
l !==
|
|
1818
|
+
const o = [...e].sort((c, l) => l.timestamp - c.timestamp), i = [];
|
|
1819
|
+
let r = null;
|
|
1820
|
+
for (const c of o) {
|
|
1821
|
+
const l = Z(c.timestamp);
|
|
1822
|
+
l !== r && (r = l, i.push({ label: $e(c.timestamp, t), entries: [] })), (a = i[i.length - 1]) == null || a.entries.push(c);
|
|
1674
1823
|
}
|
|
1675
1824
|
return i;
|
|
1676
1825
|
}
|
|
1677
|
-
function
|
|
1678
|
-
entries: e =
|
|
1826
|
+
function tt({
|
|
1827
|
+
entries: e = Xe,
|
|
1679
1828
|
onSelectEntry: t
|
|
1680
1829
|
}) {
|
|
1681
|
-
const
|
|
1830
|
+
const o = et(e);
|
|
1682
1831
|
return /* @__PURE__ */ n("div", { className: "zd:flex zd:h-full zd:w-full zd:flex-col zd:gap-1 zd:pt-2 zd:pb-4", children: /* @__PURE__ */ n(
|
|
1683
|
-
|
|
1832
|
+
u2,
|
|
1684
1833
|
{
|
|
1685
1834
|
variant: "ghost",
|
|
1686
1835
|
className: "zd:flex zd:w-full zd:flex-1 zd:flex-col zd:gap-1 zd:overflow-y-auto zd:rounded-2xl zd:p-2",
|
|
1687
|
-
children:
|
|
1688
|
-
/* @__PURE__ */ n("div", { className: "zd:flex zd:w-full zd:items-center zd:py-2 zd:pr-2", children: /* @__PURE__ */ n(
|
|
1836
|
+
children: o.map((i) => /* @__PURE__ */ f(R2, { children: [
|
|
1837
|
+
/* @__PURE__ */ n("div", { className: "zd:flex zd:w-full zd:items-center zd:py-2 zd:pr-2", children: /* @__PURE__ */ n(D, { className: "zd:text-body3", children: i.label }) }),
|
|
1689
1838
|
i.entries.map(
|
|
1690
|
-
(
|
|
1839
|
+
(r) => t ? /* @__PURE__ */ n(
|
|
1691
1840
|
"button",
|
|
1692
1841
|
{
|
|
1693
1842
|
type: "button",
|
|
1694
|
-
onClick: () => t(
|
|
1843
|
+
onClick: () => t(r),
|
|
1695
1844
|
className: "zd:w-full zd:cursor-pointer zd:text-left",
|
|
1696
|
-
children: /* @__PURE__ */ n(
|
|
1845
|
+
children: /* @__PURE__ */ n(l2, { entry: r })
|
|
1697
1846
|
},
|
|
1698
|
-
|
|
1699
|
-
) : /* @__PURE__ */ n(
|
|
1847
|
+
r.id
|
|
1848
|
+
) : /* @__PURE__ */ n(l2, { entry: r }, r.id)
|
|
1700
1849
|
)
|
|
1701
1850
|
] }, i.label))
|
|
1702
1851
|
}
|
|
1703
1852
|
) });
|
|
1704
1853
|
}
|
|
1705
|
-
function
|
|
1854
|
+
function l2({ entry: e }) {
|
|
1706
1855
|
return /* @__PURE__ */ n(
|
|
1707
|
-
|
|
1856
|
+
Ye,
|
|
1708
1857
|
{
|
|
1709
1858
|
icon: e.icon,
|
|
1710
1859
|
title: e.title,
|
|
@@ -1719,82 +1868,82 @@ function s2({ entry: e }) {
|
|
|
1719
1868
|
}
|
|
1720
1869
|
);
|
|
1721
1870
|
}
|
|
1722
|
-
const
|
|
1871
|
+
const nt = {
|
|
1723
1872
|
history: "History"
|
|
1724
1873
|
};
|
|
1725
|
-
function
|
|
1874
|
+
function gt({
|
|
1726
1875
|
onClose: e,
|
|
1727
1876
|
entries: t,
|
|
1728
|
-
onSelectEntry:
|
|
1877
|
+
onSelectEntry: o,
|
|
1729
1878
|
className: i,
|
|
1730
|
-
size:
|
|
1879
|
+
size: r
|
|
1731
1880
|
}) {
|
|
1732
|
-
const [a] =
|
|
1881
|
+
const [a] = x("history"), c = () => {
|
|
1733
1882
|
switch (a) {
|
|
1734
1883
|
case "history":
|
|
1735
1884
|
return /* @__PURE__ */ n(
|
|
1736
|
-
|
|
1885
|
+
tt,
|
|
1737
1886
|
{
|
|
1738
1887
|
...t && { entries: t },
|
|
1739
|
-
...
|
|
1888
|
+
...o && { onSelectEntry: o }
|
|
1740
1889
|
}
|
|
1741
1890
|
);
|
|
1742
1891
|
}
|
|
1743
1892
|
};
|
|
1744
1893
|
return /* @__PURE__ */ n(
|
|
1745
|
-
|
|
1894
|
+
z2,
|
|
1746
1895
|
{
|
|
1747
1896
|
...i && { className: i },
|
|
1748
|
-
...
|
|
1749
|
-
topNav: /* @__PURE__ */ n(
|
|
1750
|
-
children:
|
|
1897
|
+
...r && { size: r },
|
|
1898
|
+
topNav: /* @__PURE__ */ n(C2, { title: nt[a], onRightButtonClick: e }),
|
|
1899
|
+
children: c()
|
|
1751
1900
|
}
|
|
1752
1901
|
);
|
|
1753
1902
|
}
|
|
1754
|
-
const
|
|
1903
|
+
const U2 = "WALLETCONNECT_DEEPLINK_CHOICE", c2 = /* @__PURE__ */ new WeakSet();
|
|
1755
1904
|
function d2(e) {
|
|
1756
|
-
var i,
|
|
1757
|
-
const t = (
|
|
1758
|
-
if (!
|
|
1759
|
-
|
|
1905
|
+
var i, r, a;
|
|
1906
|
+
const t = (r = (i = e.session) == null ? void 0 : i.peer) == null ? void 0 : r.metadata, o = (a = t == null ? void 0 : t.redirect) == null ? void 0 : a.native;
|
|
1907
|
+
if (!o || !F2()) {
|
|
1908
|
+
I2();
|
|
1760
1909
|
return;
|
|
1761
1910
|
}
|
|
1762
1911
|
try {
|
|
1763
1912
|
localStorage.setItem(
|
|
1764
|
-
|
|
1765
|
-
JSON.stringify({ href:
|
|
1913
|
+
U2,
|
|
1914
|
+
JSON.stringify({ href: o, name: (t == null ? void 0 : t.name) ?? "" })
|
|
1766
1915
|
);
|
|
1767
1916
|
} catch {
|
|
1768
1917
|
}
|
|
1769
1918
|
}
|
|
1770
|
-
function
|
|
1919
|
+
function I2() {
|
|
1771
1920
|
try {
|
|
1772
|
-
localStorage.removeItem(
|
|
1921
|
+
localStorage.removeItem(U2);
|
|
1773
1922
|
} catch {
|
|
1774
1923
|
}
|
|
1775
1924
|
}
|
|
1776
|
-
function
|
|
1777
|
-
|
|
1925
|
+
function it(e) {
|
|
1926
|
+
c2.has(e) || (c2.add(e), e.on("connect", () => d2(e)), e.on("disconnect", I2), e.session && d2(e));
|
|
1778
1927
|
}
|
|
1779
|
-
function
|
|
1928
|
+
function zt(e) {
|
|
1780
1929
|
if (!e.projectId)
|
|
1781
1930
|
throw new Error("zeroDevWalletConnect requires a WalletConnect projectId");
|
|
1782
|
-
const t =
|
|
1783
|
-
return (
|
|
1784
|
-
const i = Object.assign(t(
|
|
1931
|
+
const t = X2({ ...e, showQrModal: !1 });
|
|
1932
|
+
return (o) => {
|
|
1933
|
+
const i = Object.assign(t(o), { zdWalletConnect: !0 }), r = i.getProvider.bind(i);
|
|
1785
1934
|
return i.getProvider = async (...a) => {
|
|
1786
|
-
const
|
|
1787
|
-
return
|
|
1935
|
+
const c = await r(...a);
|
|
1936
|
+
return it(c), c;
|
|
1788
1937
|
}, i;
|
|
1789
1938
|
};
|
|
1790
1939
|
}
|
|
1791
1940
|
export {
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1941
|
+
pt as ConnectWallet,
|
|
1942
|
+
Ie as SignUp,
|
|
1943
|
+
gt as TxHistory,
|
|
1944
|
+
b as useAuth,
|
|
1945
|
+
ht as useWalletInfo,
|
|
1946
|
+
mt as zeroDevWallet,
|
|
1947
|
+
zt as zeroDevWalletConnect
|
|
1799
1948
|
};
|
|
1800
1949
|
//# sourceMappingURL=index.mjs.map
|