@nowramp/form 0.1.59 → 0.1.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +520 -520
- package/dist/index.js.map +1 -1
- package/dist/nowramp-form.iife.js +9 -9
- package/dist/nowramp-form.iife.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -8,73 +8,73 @@
|
|
|
8
8
|
}`;
|
|
9
9
|
document.head.appendChild(s);
|
|
10
10
|
})();
|
|
11
|
-
import { jsx as e, jsxs as r, Fragment as
|
|
12
|
-
import _e, { useState as b, useRef as _, useCallback as B, useEffect as D, useMemo as W, useReducer as
|
|
11
|
+
import { jsx as e, jsxs as r, Fragment as re } from "react/jsx-runtime";
|
|
12
|
+
import _e, { useState as b, useRef as _, useCallback as B, useEffect as D, useMemo as W, useReducer as zt, useContext as Jt, createContext as qt } from "react";
|
|
13
13
|
import { RampApi as $e } from "@nowramp/sdk";
|
|
14
|
-
import { createPortal as
|
|
15
|
-
function
|
|
16
|
-
const [a, o] = b(null), [l,
|
|
14
|
+
import { createPortal as vt } from "react-dom";
|
|
15
|
+
function en(t, n) {
|
|
16
|
+
const [a, o] = b(null), [l, c] = b(!0), [m, s] = b(null), d = _(null);
|
|
17
17
|
(!d.current || d.current !== t) && (d.current = new $e({ apiKey: "", ...t }));
|
|
18
18
|
const p = B(async () => {
|
|
19
19
|
if (!t.projectId) {
|
|
20
|
-
|
|
20
|
+
s(new Error("projectId is required")), c(!1);
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
c(!0), s(null);
|
|
24
24
|
try {
|
|
25
25
|
const h = await d.current.getSupported(n);
|
|
26
26
|
o(h);
|
|
27
27
|
} catch (h) {
|
|
28
|
-
|
|
28
|
+
s(h instanceof Error ? h : new Error("Failed to fetch config"));
|
|
29
29
|
} finally {
|
|
30
|
-
|
|
30
|
+
c(!1);
|
|
31
31
|
}
|
|
32
32
|
}, [t.projectId, n]);
|
|
33
33
|
return D(() => {
|
|
34
34
|
p();
|
|
35
35
|
}, [p]), { config: a, loading: l, error: m, refetch: p };
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const [a, o] = b(null), [l,
|
|
37
|
+
function tn(t, n) {
|
|
38
|
+
const [a, o] = b(null), [l, c] = b(!1), [m, s] = b(null), d = _(null), p = _(""), h = `${t.apiUrl}|${t.projectId}`;
|
|
39
39
|
(!d.current || p.current !== h) && (d.current = new $e({ apiKey: "", ...t }), p.current = h);
|
|
40
40
|
const u = _(0);
|
|
41
41
|
D(() => {
|
|
42
42
|
const x = ++u.current;
|
|
43
43
|
if (!n || !t.projectId) {
|
|
44
|
-
o(null),
|
|
44
|
+
o(null), c(!1);
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
c(!0), s(null), d.current.getQuotes(n).then(
|
|
48
48
|
(E) => {
|
|
49
|
-
u.current === x && (o(E),
|
|
49
|
+
u.current === x && (o(E), c(!1));
|
|
50
50
|
},
|
|
51
51
|
(E) => {
|
|
52
|
-
u.current === x && (
|
|
52
|
+
u.current === x && (s(E instanceof Error ? E : new Error("Failed to fetch quotes")), o(null), c(!1));
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
}, [t.projectId, n == null ? void 0 : n.fiatCurrency, n == null ? void 0 : n.fiatAmount, n == null ? void 0 : n.cryptoAmount, n == null ? void 0 : n.cryptoCurrency, n == null ? void 0 : n.network, n == null ? void 0 : n.paymentMethodId, n == null ? void 0 : n.country, n == null ? void 0 : n.orderType]);
|
|
56
56
|
const f = B(async () => {
|
|
57
57
|
if (!(!n || !t.projectId)) {
|
|
58
|
-
|
|
58
|
+
c(!0), s(null);
|
|
59
59
|
try {
|
|
60
60
|
const x = await d.current.getQuotes(n);
|
|
61
61
|
o(x);
|
|
62
62
|
} catch (x) {
|
|
63
|
-
|
|
63
|
+
s(x instanceof Error ? x : new Error("Failed to fetch quotes"));
|
|
64
64
|
} finally {
|
|
65
|
-
|
|
65
|
+
c(!1);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
}, [t.projectId, n]);
|
|
69
69
|
return { quotes: a, loading: l, error: m, refetch: f };
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
const [n, a] = b(null), [o, l] = b(!1), [
|
|
73
|
-
(!
|
|
71
|
+
function nn(t) {
|
|
72
|
+
const [n, a] = b(null), [o, l] = b(!1), [c, m] = b(null), s = _(null), d = _(""), p = `${t.apiUrl}|${t.projectId}`;
|
|
73
|
+
(!s.current || d.current !== p) && (s.current = new $e({ apiKey: "", ...t }), d.current = p);
|
|
74
74
|
const h = B(async (f) => {
|
|
75
75
|
l(!0), m(null);
|
|
76
76
|
try {
|
|
77
|
-
const x = await
|
|
77
|
+
const x = await s.current.createCheckoutIntent(f);
|
|
78
78
|
return a(x), x;
|
|
79
79
|
} catch (x) {
|
|
80
80
|
const E = x instanceof Error ? x : new Error("Failed to create checkout intent");
|
|
@@ -85,10 +85,10 @@ function tn(t) {
|
|
|
85
85
|
}, []), u = B(() => {
|
|
86
86
|
a(null), m(null);
|
|
87
87
|
}, []);
|
|
88
|
-
return { order: n, loading: o, error:
|
|
88
|
+
return { order: n, loading: o, error: c, createOrder: h, reset: u };
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
const [o, l] = b(null), [
|
|
90
|
+
function an(t, n, a) {
|
|
91
|
+
const [o, l] = b(null), [c, m] = b(!1), [s, d] = b(null), p = _(null);
|
|
92
92
|
p.current || (p.current = new $e({ apiKey: "", projectId: "", ...t }));
|
|
93
93
|
const h = B(async () => {
|
|
94
94
|
if (n) {
|
|
@@ -116,16 +116,16 @@ function nn(t, n, a) {
|
|
|
116
116
|
return;
|
|
117
117
|
const f = setInterval(h, a.pollInterval);
|
|
118
118
|
return () => clearInterval(f);
|
|
119
|
-
}, [n, a == null ? void 0 : a.pollInterval, o == null ? void 0 : o.status, h]), { status: o, loading:
|
|
119
|
+
}, [n, a == null ? void 0 : a.pollInterval, o == null ? void 0 : o.status, h]), { status: o, loading: c, error: s, refetch: h };
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function bt(t, n) {
|
|
122
122
|
if (!t) return t;
|
|
123
123
|
const a = t.indexOf(".");
|
|
124
124
|
if (a === -1) return t;
|
|
125
125
|
let o = t;
|
|
126
126
|
return o.length - a - 1 > n && (o = o.slice(0, a + n + 1)), o = o.replace(/0+$/, "").replace(/\.$/, ""), o;
|
|
127
127
|
}
|
|
128
|
-
const
|
|
128
|
+
const Lt = {
|
|
129
129
|
step: "amount",
|
|
130
130
|
flowType: "buy",
|
|
131
131
|
fiatCurrency: "USD",
|
|
@@ -143,7 +143,7 @@ const It = {
|
|
|
143
143
|
country: "",
|
|
144
144
|
errorMessage: null
|
|
145
145
|
};
|
|
146
|
-
function
|
|
146
|
+
function rn(t, n) {
|
|
147
147
|
switch (n.type) {
|
|
148
148
|
case "SET_STEP":
|
|
149
149
|
return { ...t, step: n.step, errorMessage: null };
|
|
@@ -193,21 +193,21 @@ function an(t, n) {
|
|
|
193
193
|
case "CLEAR_ERROR":
|
|
194
194
|
return { ...t, errorMessage: null };
|
|
195
195
|
case "RESET":
|
|
196
|
-
return
|
|
196
|
+
return Lt;
|
|
197
197
|
default:
|
|
198
198
|
return t;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
const
|
|
202
|
-
function
|
|
201
|
+
const It = qt(null);
|
|
202
|
+
function on({
|
|
203
203
|
projectId: t,
|
|
204
204
|
apiUrl: n = "https://api.nowramp.com",
|
|
205
205
|
assetBaseUrl: a = "",
|
|
206
206
|
flowType: o = "buy",
|
|
207
207
|
customerId: l = "",
|
|
208
|
-
brandId:
|
|
208
|
+
brandId: c,
|
|
209
209
|
defaultFiatCurrency: m = "USD",
|
|
210
|
-
defaultCryptoCurrency:
|
|
210
|
+
defaultCryptoCurrency: s = "BTC",
|
|
211
211
|
defaultNetwork: d = "",
|
|
212
212
|
defaultFiatAmount: p = "",
|
|
213
213
|
defaultCryptoAmount: h = "",
|
|
@@ -217,24 +217,24 @@ function rn({
|
|
|
217
217
|
statusPollInterval: E = 5e3,
|
|
218
218
|
onComplete: v,
|
|
219
219
|
onError: S,
|
|
220
|
-
children:
|
|
220
|
+
children: P
|
|
221
221
|
}) {
|
|
222
|
-
const
|
|
223
|
-
...
|
|
224
|
-
step:
|
|
222
|
+
const V = W(() => ({ apiUrl: n, projectId: t }), [n, t]), U = d || (s ? s.toLowerCase() : ""), G = o === "sell", z = G ? !!h : !!p, de = (G ? !!(z && s && U) : !!(z && s && U && u)) && f ? "confirm" : "amount", y = p || (o === "buy" ? "250" : ""), [i, w] = zt(rn, {
|
|
223
|
+
...Lt,
|
|
224
|
+
step: de,
|
|
225
225
|
flowType: o,
|
|
226
226
|
fiatCurrency: m,
|
|
227
|
-
cryptoCurrency:
|
|
228
|
-
network:
|
|
229
|
-
fiatAmount:
|
|
230
|
-
cryptoAmount:
|
|
227
|
+
cryptoCurrency: s,
|
|
228
|
+
network: U,
|
|
229
|
+
fiatAmount: bt(y, 2),
|
|
230
|
+
cryptoAmount: bt(h, 6),
|
|
231
231
|
walletAddress: u,
|
|
232
232
|
customerId: l
|
|
233
233
|
}), O = i.flowType === "sell", {
|
|
234
234
|
config: C,
|
|
235
|
-
loading:
|
|
236
|
-
error:
|
|
237
|
-
} =
|
|
235
|
+
loading: pe,
|
|
236
|
+
error: oe
|
|
237
|
+
} = en(V, i.flowType);
|
|
238
238
|
_e.useEffect(() => {
|
|
239
239
|
var Z, L, I;
|
|
240
240
|
if (!C || !i.cryptoCurrency || i.network) return;
|
|
@@ -249,11 +249,11 @@ function rn({
|
|
|
249
249
|
))
|
|
250
250
|
return;
|
|
251
251
|
const L = T.find(
|
|
252
|
-
(
|
|
253
|
-
) || T.find((
|
|
252
|
+
(ne) => ne.supportedFiats.includes(N) && (ne.id.includes("card") || ne.id.includes("debit"))
|
|
253
|
+
) || T.find((ne) => ne.supportedFiats.includes(N));
|
|
254
254
|
w({ type: "SET_PAYMENT_METHOD", methodId: (L == null ? void 0 : L.id) || ((Q = T[0]) == null ? void 0 : Q.id) || "" });
|
|
255
255
|
}, [C, i.fiatCurrency, i.paymentMethodId]);
|
|
256
|
-
const
|
|
256
|
+
const ee = W(() => {
|
|
257
257
|
if (O) {
|
|
258
258
|
if (!i.cryptoAmount) return null;
|
|
259
259
|
const I = parseFloat(i.cryptoAmount);
|
|
@@ -268,7 +268,7 @@ function rn({
|
|
|
268
268
|
return !isNaN(Z) && N < Z ? `Minimum amount is ${T.minAmount} ${i.fiatCurrency}` : !isNaN(L) && N > L ? `Maximum amount is ${T.maxAmount} ${i.fiatCurrency}` : null;
|
|
269
269
|
}, [C, i.fiatAmount, i.fiatCurrency, i.cryptoAmount, O]), be = W(() => {
|
|
270
270
|
const N = O ? !!i.cryptoAmount : !!i.fiatAmount;
|
|
271
|
-
return !C || !N || !i.cryptoCurrency || !i.network ||
|
|
271
|
+
return !C || !N || !i.cryptoCurrency || !i.network || ee ? null : {
|
|
272
272
|
fiatCurrency: i.fiatCurrency,
|
|
273
273
|
...O ? { cryptoAmount: i.cryptoAmount } : { fiatAmount: i.fiatAmount },
|
|
274
274
|
cryptoCurrency: i.cryptoCurrency,
|
|
@@ -277,36 +277,36 @@ function rn({
|
|
|
277
277
|
country: i.country || void 0,
|
|
278
278
|
orderType: i.flowType
|
|
279
279
|
};
|
|
280
|
-
}, [C, i.fiatCurrency, i.fiatAmount, i.cryptoAmount, i.cryptoCurrency, i.network, i.paymentMethodId, i.country,
|
|
281
|
-
quotes:
|
|
282
|
-
loading:
|
|
280
|
+
}, [C, i.fiatCurrency, i.fiatAmount, i.cryptoAmount, i.cryptoCurrency, i.network, i.paymentMethodId, i.country, ee, O, i.flowType]), {
|
|
281
|
+
quotes: te,
|
|
282
|
+
loading: fe,
|
|
283
283
|
error: k,
|
|
284
284
|
refetch: Ne
|
|
285
|
-
} =
|
|
286
|
-
order:
|
|
287
|
-
loading:
|
|
288
|
-
error:
|
|
289
|
-
createOrder:
|
|
290
|
-
} =
|
|
285
|
+
} = tn(V, be), {
|
|
286
|
+
order: F,
|
|
287
|
+
loading: le,
|
|
288
|
+
error: ue,
|
|
289
|
+
createOrder: ye
|
|
290
|
+
} = nn(V), We = 15e3, {
|
|
291
291
|
status: $,
|
|
292
292
|
loading: Y
|
|
293
|
-
} =
|
|
293
|
+
} = an(
|
|
294
294
|
{ apiUrl: n },
|
|
295
|
-
(
|
|
295
|
+
(F == null ? void 0 : F.orderId) ?? null,
|
|
296
296
|
{ pollInterval: E, initialDelay: We }
|
|
297
297
|
);
|
|
298
298
|
_e.useEffect(() => {
|
|
299
299
|
($ == null ? void 0 : $.status) === "completed" && v && v($);
|
|
300
300
|
}, [$ == null ? void 0 : $.status, v]), _e.useEffect(() => {
|
|
301
|
-
const N =
|
|
301
|
+
const N = oe || ue;
|
|
302
302
|
N && S && S(N);
|
|
303
|
-
}, [
|
|
304
|
-
const
|
|
305
|
-
ke.current =
|
|
306
|
-
const Le = _(
|
|
307
|
-
Le.current =
|
|
308
|
-
const Ee = _(
|
|
309
|
-
Ee.current =
|
|
303
|
+
}, [oe, ue, S]);
|
|
304
|
+
const xe = f || (C == null ? void 0 : C.defaultGateway) || null, ke = _(xe);
|
|
305
|
+
ke.current = xe;
|
|
306
|
+
const Le = _(te);
|
|
307
|
+
Le.current = te;
|
|
308
|
+
const Ee = _(c);
|
|
309
|
+
Ee.current = c;
|
|
310
310
|
const Ie = B(async () => {
|
|
311
311
|
var T, Z, L;
|
|
312
312
|
const N = ((T = i.selectedQuote) == null ? void 0 : T.gatewayId) || ((L = (Z = Le.current) == null ? void 0 : Z.bestQuote) == null ? void 0 : L.gatewayId) || ke.current;
|
|
@@ -316,7 +316,7 @@ function rn({
|
|
|
316
316
|
return;
|
|
317
317
|
}
|
|
318
318
|
try {
|
|
319
|
-
await
|
|
319
|
+
await ye({
|
|
320
320
|
gateway: N,
|
|
321
321
|
customerId: i.customerId || void 0,
|
|
322
322
|
fiatCurrency: i.fiatCurrency,
|
|
@@ -333,18 +333,18 @@ function rn({
|
|
|
333
333
|
const Q = I instanceof Error ? I.message : "Failed to create order";
|
|
334
334
|
/wallet|address/i.test(Q) ? w({ type: "SET_WALLET_ERROR", message: Q.replace(/^Failed to create checkout intent:\s*/i, "") }) : w({ type: "SET_ERROR", message: Q });
|
|
335
335
|
}
|
|
336
|
-
}, [i,
|
|
336
|
+
}, [i, ye, O]), Pe = B((N) => {
|
|
337
337
|
w({ type: "SET_STEP", step: N });
|
|
338
338
|
}, []), Ge = B(() => {
|
|
339
339
|
const N = ["confirm", "amount", "quotes", "wallet", "checkout", "processing", "complete"], T = N.indexOf(i.step);
|
|
340
340
|
T > 0 && w({ type: "SET_STEP", step: N[T - 1] });
|
|
341
|
-
}, [i.step, O]),
|
|
341
|
+
}, [i.step, O]), ge = W(() => {
|
|
342
342
|
const N = O ? !!i.cryptoAmount : !!i.fiatAmount;
|
|
343
343
|
switch (i.step) {
|
|
344
344
|
case "confirm":
|
|
345
|
-
return !!(N && i.cryptoCurrency && i.network && i.walletAddress && !
|
|
345
|
+
return !!(N && i.cryptoCurrency && i.network && i.walletAddress && !ee);
|
|
346
346
|
case "amount":
|
|
347
|
-
return !!(N && i.cryptoCurrency && i.network && !
|
|
347
|
+
return !!(N && i.cryptoCurrency && i.network && !ee);
|
|
348
348
|
case "quotes":
|
|
349
349
|
return !!i.selectedQuote;
|
|
350
350
|
case "wallet":
|
|
@@ -352,40 +352,40 @@ function rn({
|
|
|
352
352
|
default:
|
|
353
353
|
return !1;
|
|
354
354
|
}
|
|
355
|
-
}, [i,
|
|
356
|
-
apiConfig:
|
|
355
|
+
}, [i, ee, O]), Me = {
|
|
356
|
+
apiConfig: V,
|
|
357
357
|
assetBaseUrl: a,
|
|
358
358
|
config: C,
|
|
359
|
-
configLoading:
|
|
360
|
-
configError:
|
|
359
|
+
configLoading: pe,
|
|
360
|
+
configError: oe,
|
|
361
361
|
state: i,
|
|
362
362
|
dispatch: w,
|
|
363
|
-
quotes:
|
|
364
|
-
quotesLoading:
|
|
363
|
+
quotes: te,
|
|
364
|
+
quotesLoading: fe,
|
|
365
365
|
quotesError: k,
|
|
366
366
|
fetchQuotes: Ne,
|
|
367
|
-
order:
|
|
368
|
-
orderLoading:
|
|
369
|
-
orderError:
|
|
367
|
+
order: F,
|
|
368
|
+
orderLoading: le,
|
|
369
|
+
orderError: ue,
|
|
370
370
|
createOrder: Ie,
|
|
371
371
|
orderStatus: $,
|
|
372
372
|
orderStatusLoading: Y,
|
|
373
373
|
fieldLocks: x || null,
|
|
374
|
-
defaultGateway:
|
|
375
|
-
amountError:
|
|
376
|
-
goToStep:
|
|
374
|
+
defaultGateway: xe,
|
|
375
|
+
amountError: ee,
|
|
376
|
+
goToStep: Pe,
|
|
377
377
|
goBack: Ge,
|
|
378
|
-
canProceed:
|
|
378
|
+
canProceed: ge
|
|
379
379
|
};
|
|
380
|
-
return /* @__PURE__ */ e(
|
|
380
|
+
return /* @__PURE__ */ e(It.Provider, { value: Me, children: P });
|
|
381
381
|
}
|
|
382
382
|
function Te() {
|
|
383
|
-
const t =
|
|
383
|
+
const t = Jt(It);
|
|
384
384
|
if (!t)
|
|
385
385
|
throw new Error("useRamp must be used within a RampProvider");
|
|
386
386
|
return t;
|
|
387
387
|
}
|
|
388
|
-
const
|
|
388
|
+
const Oe = {
|
|
389
389
|
// Canonical IDs (returned by the API — lowercase full names)
|
|
390
390
|
// These cover cases where the canonical ID differs from the legacy uppercase key
|
|
391
391
|
ethereum: { name: "Ethereum (ERC20)", shortName: "Ethereum", icon: "eth" },
|
|
@@ -547,7 +547,7 @@ const Be = {
|
|
|
547
547
|
OKC: { name: "OKX Chain", icon: "eth" },
|
|
548
548
|
UNI_CHAIN: { name: "UNI", icon: "uni" },
|
|
549
549
|
ZEC: { name: "ZCash", icon: "zec" }
|
|
550
|
-
},
|
|
550
|
+
}, Mt = [
|
|
551
551
|
// --- Popular / Top coins ---
|
|
552
552
|
{ code: "BTC", name: "Bitcoin", chains: ["BTC", "LN"], popular: !0 },
|
|
553
553
|
{ code: "ETH", name: "Ethereum", chains: ["ETH", "ARB", "BASE", "BSC", "OPTIMISM", "LINEA", "ZKSYNC", "LRC", "STARK", "APE", "ECLIPSE", "FUEL", "INK", "SOPHON", "UNICHAIN", "WLD"], popular: !0 },
|
|
@@ -740,9 +740,9 @@ const Be = {
|
|
|
740
740
|
{ code: "ZCHF", name: "Frankencoin", chains: ["ETH"], popular: !1 },
|
|
741
741
|
{ code: "ZETA", name: "Zeta", chains: ["ETH", "ZETACHAIN"], popular: !1 },
|
|
742
742
|
{ code: "ZTG", name: "Zeitgeist", chains: ["ZTG"], popular: !1 }
|
|
743
|
-
],
|
|
744
|
-
|
|
745
|
-
),
|
|
743
|
+
], ln = Object.fromEntries(
|
|
744
|
+
Mt.map((t) => [t.code, t.name])
|
|
745
|
+
), cn = {
|
|
746
746
|
AED: "ae",
|
|
747
747
|
ALL: "al",
|
|
748
748
|
ARS: "ar",
|
|
@@ -777,21 +777,21 @@ const Be = {
|
|
|
777
777
|
VND: "vn",
|
|
778
778
|
ZAR: "za"
|
|
779
779
|
};
|
|
780
|
-
function
|
|
780
|
+
function Bt(t, n = "") {
|
|
781
781
|
return `${n}/crypto-icons/${t.toLowerCase()}.svg`;
|
|
782
782
|
}
|
|
783
783
|
function sn(t, n = "") {
|
|
784
|
-
const a =
|
|
784
|
+
const a = cn[t] || "us";
|
|
785
785
|
return `${n}/flags/${a}.svg`;
|
|
786
786
|
}
|
|
787
787
|
function Xe(t) {
|
|
788
|
-
return
|
|
788
|
+
return Oe[t] || Oe[t.toLowerCase()] || Oe[t.toUpperCase()] || Oe[t.toUpperCase().replace(/-/g, "_")] || Oe[t.toLowerCase().replace(/-/g, "_")];
|
|
789
789
|
}
|
|
790
790
|
function tt(t, n = "") {
|
|
791
791
|
const a = Xe(t);
|
|
792
792
|
return a ? `${n}/crypto-icons/${a.icon}.svg` : `${n}/crypto-icons/${t.toLowerCase()}.svg`;
|
|
793
793
|
}
|
|
794
|
-
const
|
|
794
|
+
const Nt = [
|
|
795
795
|
{ code: "ALL", name: "Albania Lek" },
|
|
796
796
|
{ code: "ARS", name: "Argentina Peso" },
|
|
797
797
|
{ code: "AUD", name: "Australian Dollar" },
|
|
@@ -804,14 +804,14 @@ const Et = [
|
|
|
804
804
|
{ code: "CHF", name: "Swiss Franc" },
|
|
805
805
|
{ code: "MXN", name: "Mexican Peso" },
|
|
806
806
|
{ code: "INR", name: "Indian Rupee" }
|
|
807
|
-
],
|
|
807
|
+
], Et = [
|
|
808
808
|
{ id: "blue", name: "Blue", accent: "#0077FF" },
|
|
809
809
|
{ id: "violet", name: "Violet", accent: "#7C3AED" },
|
|
810
810
|
{ id: "green", name: "Green", accent: "#10B981" },
|
|
811
811
|
{ id: "orange", name: "Orange", accent: "#F59E0B" },
|
|
812
812
|
{ id: "rose", name: "Rose", accent: "#F43F5E" },
|
|
813
813
|
{ id: "mono", name: "Mono", accent: null }
|
|
814
|
-
],
|
|
814
|
+
], wt = {
|
|
815
815
|
USDC: { USD: 0.9962, EUR: 1.0814, GBP: 1.2573, JPY: 667e-5, CAD: 0.7198, AUD: 0.6384, BRL: 0.1726, CHF: 1.1306, MXN: 0.0487, INR: 0.01187, ARS: 855e-6, ALL: 0.01058 },
|
|
816
816
|
USDT: { USD: 0.9958, EUR: 1.081, GBP: 1.2568, JPY: 666e-5, CAD: 0.7194, AUD: 0.638, BRL: 0.1724, CHF: 1.1301, MXN: 0.0486, INR: 0.01186, ARS: 854e-6, ALL: 0.01057 },
|
|
817
817
|
BTC: { USD: 104e-7, EUR: 1129e-8, GBP: 1313e-8, JPY: 696e-10, CAD: 751e-8, AUD: 666e-8, BRL: 18e-7, CHF: 118e-7, MXN: 508e-9, INR: 124e-9, ARS: 892e-11, ALL: 11e-8 },
|
|
@@ -820,7 +820,7 @@ const Et = [
|
|
|
820
820
|
XRP: { USD: 0.4081, EUR: 0.4432, GBP: 0.5153, JPY: 273e-5, CAD: 0.2948, AUD: 0.2614, BRL: 0.0707, CHF: 0.463, MXN: 0.01992, INR: 486e-5, ARS: 35e-5, ALL: 433e-5 },
|
|
821
821
|
DOGE: { USD: 3.896, EUR: 4.232, GBP: 4.92, JPY: 0.02607, CAD: 2.815, AUD: 2.496, BRL: 0.675, CHF: 4.421, MXN: 0.1902, INR: 0.04641, ARS: 3345e-6, ALL: 0.04134 },
|
|
822
822
|
ADA: { USD: 1.333, EUR: 1.448, GBP: 1.683, JPY: 892e-5, CAD: 0.963, AUD: 0.854, BRL: 0.2309, CHF: 1.512, MXN: 0.0651, INR: 0.01588, ARS: 1145e-6, ALL: 0.01414 }
|
|
823
|
-
},
|
|
823
|
+
}, dn = /* @__PURE__ */ new Set([
|
|
824
824
|
"USDC",
|
|
825
825
|
"USDT",
|
|
826
826
|
"DAI",
|
|
@@ -847,17 +847,17 @@ const Et = [
|
|
|
847
847
|
"EURR",
|
|
848
848
|
"ZCHF"
|
|
849
849
|
]);
|
|
850
|
-
function
|
|
851
|
-
return
|
|
850
|
+
function Ot(t) {
|
|
851
|
+
return dn.has(t.toUpperCase());
|
|
852
852
|
}
|
|
853
|
-
function
|
|
853
|
+
function qn(t, n) {
|
|
854
854
|
var a, o;
|
|
855
|
-
return ((a =
|
|
855
|
+
return ((a = wt[t]) == null ? void 0 : a[n]) ?? ((o = wt.USDC) == null ? void 0 : o[n]) ?? 1;
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function un(t) {
|
|
858
858
|
return parseFloat(t.replace(/,/g, "")) || 0;
|
|
859
859
|
}
|
|
860
|
-
function
|
|
860
|
+
function Ht(t) {
|
|
861
861
|
if (t === 0) return "0";
|
|
862
862
|
if (t >= 1e3) return t.toLocaleString("en-US", { maximumFractionDigits: 2 });
|
|
863
863
|
if (t >= 1) return t.toFixed(2);
|
|
@@ -865,21 +865,21 @@ function Dt(t) {
|
|
|
865
865
|
const n = t.toPrecision(4);
|
|
866
866
|
return parseFloat(n).toString();
|
|
867
867
|
}
|
|
868
|
-
const se = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t),
|
|
868
|
+
const se = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), At = 10, St = 1e-4, mn = (() => {
|
|
869
869
|
const t = [];
|
|
870
|
-
for (const n of
|
|
870
|
+
for (const n of Mt)
|
|
871
871
|
for (const a of n.chains)
|
|
872
872
|
t.push({ code: n.code, name: n.name, chain: a, popular: n.popular });
|
|
873
873
|
return t;
|
|
874
874
|
})();
|
|
875
|
-
function
|
|
875
|
+
function Dt({
|
|
876
876
|
src: t,
|
|
877
877
|
alt: n,
|
|
878
878
|
size: a,
|
|
879
879
|
className: o = "",
|
|
880
880
|
background: l
|
|
881
881
|
}) {
|
|
882
|
-
const [
|
|
882
|
+
const [c, m] = b(!1), [s, d] = b(!1);
|
|
883
883
|
D(() => {
|
|
884
884
|
m(!1), d(!1);
|
|
885
885
|
}, [t]);
|
|
@@ -890,14 +890,14 @@ function Pt({
|
|
|
890
890
|
className: `relative rounded-full shrink-0 ${o}`,
|
|
891
891
|
style: { width: a, height: a, background: l },
|
|
892
892
|
children: [
|
|
893
|
-
!
|
|
893
|
+
!c && !s && /* @__PURE__ */ e(
|
|
894
894
|
"div",
|
|
895
895
|
{
|
|
896
896
|
className: "absolute inset-0 rounded-full animate-pulse",
|
|
897
897
|
style: { background: "var(--t-pill-bg, #333)" }
|
|
898
898
|
}
|
|
899
899
|
),
|
|
900
|
-
|
|
900
|
+
s ? /* @__PURE__ */ e(
|
|
901
901
|
"div",
|
|
902
902
|
{
|
|
903
903
|
className: "absolute inset-0 rounded-full flex items-center justify-center font-bold",
|
|
@@ -918,7 +918,7 @@ function Pt({
|
|
|
918
918
|
loading: "lazy",
|
|
919
919
|
onLoad: p,
|
|
920
920
|
onError: h,
|
|
921
|
-
className: `rounded-full ${
|
|
921
|
+
className: `rounded-full ${c ? "opacity-100" : "opacity-0"}`,
|
|
922
922
|
style: { width: a, height: a, transition: "opacity 0.15s ease-in" }
|
|
923
923
|
}
|
|
924
924
|
)
|
|
@@ -926,11 +926,11 @@ function Pt({
|
|
|
926
926
|
}
|
|
927
927
|
);
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function Rt({ ticker: t, size: n = 32, baseUrl: a = "" }) {
|
|
930
930
|
return /* @__PURE__ */ e(
|
|
931
|
-
|
|
931
|
+
Dt,
|
|
932
932
|
{
|
|
933
|
-
src:
|
|
933
|
+
src: Bt(t, a),
|
|
934
934
|
alt: t,
|
|
935
935
|
size: n,
|
|
936
936
|
background: "#ffffff"
|
|
@@ -939,7 +939,7 @@ function Tt({ ticker: t, size: n = 32, baseUrl: a = "" }) {
|
|
|
939
939
|
}
|
|
940
940
|
function nt({ currencyCode: t, size: n = 16, baseUrl: a = "" }) {
|
|
941
941
|
return /* @__PURE__ */ e(
|
|
942
|
-
|
|
942
|
+
Dt,
|
|
943
943
|
{
|
|
944
944
|
src: sn(t, a),
|
|
945
945
|
alt: t,
|
|
@@ -953,7 +953,7 @@ function at({ size: t = 32, color: n = "#888" }) {
|
|
|
953
953
|
/* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "8", stroke: "white", strokeWidth: "1.5", fill: "none" })
|
|
954
954
|
] });
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function hn({ size: t = 24 }) {
|
|
957
957
|
return /* @__PURE__ */ e(
|
|
958
958
|
"div",
|
|
959
959
|
{
|
|
@@ -970,7 +970,7 @@ function mn({ size: t = 24 }) {
|
|
|
970
970
|
}
|
|
971
971
|
);
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function pn({ size: t = 32 }) {
|
|
974
974
|
return /* @__PURE__ */ e(
|
|
975
975
|
"div",
|
|
976
976
|
{
|
|
@@ -980,7 +980,7 @@ function hn({ size: t = 32 }) {
|
|
|
980
980
|
}
|
|
981
981
|
);
|
|
982
982
|
}
|
|
983
|
-
function
|
|
983
|
+
function fn({ size: t = 32 }) {
|
|
984
984
|
return /* @__PURE__ */ e(
|
|
985
985
|
"div",
|
|
986
986
|
{
|
|
@@ -996,7 +996,7 @@ function pn({ size: t = 32 }) {
|
|
|
996
996
|
}
|
|
997
997
|
);
|
|
998
998
|
}
|
|
999
|
-
function
|
|
999
|
+
function yn({ size: t = 32 }) {
|
|
1000
1000
|
return /* @__PURE__ */ e(
|
|
1001
1001
|
"div",
|
|
1002
1002
|
{
|
|
@@ -1011,7 +1011,7 @@ function fn({ size: t = 32 }) {
|
|
|
1011
1011
|
}
|
|
1012
1012
|
);
|
|
1013
1013
|
}
|
|
1014
|
-
function
|
|
1014
|
+
function xn({ size: t = 32 }) {
|
|
1015
1015
|
return /* @__PURE__ */ e(
|
|
1016
1016
|
"div",
|
|
1017
1017
|
{
|
|
@@ -1021,7 +1021,7 @@ function yn({ size: t = 32 }) {
|
|
|
1021
1021
|
}
|
|
1022
1022
|
);
|
|
1023
1023
|
}
|
|
1024
|
-
function
|
|
1024
|
+
function gn({ size: t = 32 }) {
|
|
1025
1025
|
return /* @__PURE__ */ e(
|
|
1026
1026
|
"div",
|
|
1027
1027
|
{
|
|
@@ -1037,7 +1037,7 @@ function xn({ size: t = 32 }) {
|
|
|
1037
1037
|
}
|
|
1038
1038
|
);
|
|
1039
1039
|
}
|
|
1040
|
-
function
|
|
1040
|
+
function Cn({ size: t = 32 }) {
|
|
1041
1041
|
const n = t * 0.8;
|
|
1042
1042
|
return /* @__PURE__ */ e(
|
|
1043
1043
|
"div",
|
|
@@ -1052,7 +1052,7 @@ function gn({ size: t = 32 }) {
|
|
|
1052
1052
|
}
|
|
1053
1053
|
);
|
|
1054
1054
|
}
|
|
1055
|
-
function
|
|
1055
|
+
function vn({ size: t = 32 }) {
|
|
1056
1056
|
const n = t * 0.56, a = n * 0.65, o = Math.max(2, n * 0.1), l = n * 0.2;
|
|
1057
1057
|
return /* @__PURE__ */ r("div", { className: "flex items-center justify-center shrink-0", style: { width: t, height: t }, children: [
|
|
1058
1058
|
/* @__PURE__ */ e(
|
|
@@ -1103,7 +1103,7 @@ function Cn({ size: t = 32 }) {
|
|
|
1103
1103
|
)
|
|
1104
1104
|
] });
|
|
1105
1105
|
}
|
|
1106
|
-
function
|
|
1106
|
+
function ea({ size: t = 18 }) {
|
|
1107
1107
|
return /* @__PURE__ */ e(
|
|
1108
1108
|
"div",
|
|
1109
1109
|
{
|
|
@@ -1113,13 +1113,13 @@ function qn({ size: t = 18 }) {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
);
|
|
1115
1115
|
}
|
|
1116
|
-
function
|
|
1116
|
+
function He() {
|
|
1117
1117
|
return /* @__PURE__ */ e("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e("path", { d: "M3 4.5L6 7.5L9 4.5", stroke: "var(--t-text-secondary)", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1119
|
+
function bn() {
|
|
1120
1120
|
return /* @__PURE__ */ e("svg", { width: "8", height: "14", viewBox: "0 0 8 14", fill: "none", children: /* @__PURE__ */ e("path", { d: "M1 1L7 7L1 13", stroke: "var(--t-icon-stroke)", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
1121
1121
|
}
|
|
1122
|
-
function
|
|
1122
|
+
function Nn({ onClick: t }) {
|
|
1123
1123
|
return /* @__PURE__ */ e("button", { onClick: t, className: "hover:opacity-70 transition-opacity", children: /* @__PURE__ */ e("svg", { width: "24", height: "16", viewBox: "0 0 24 16", fill: "none", children: /* @__PURE__ */ e(
|
|
1124
1124
|
"path",
|
|
1125
1125
|
{
|
|
@@ -1128,7 +1128,7 @@ function bn({ onClick: t }) {
|
|
|
1128
1128
|
}
|
|
1129
1129
|
) }) });
|
|
1130
1130
|
}
|
|
1131
|
-
function
|
|
1131
|
+
function En({ size: t = 40 }) {
|
|
1132
1132
|
return /* @__PURE__ */ e(
|
|
1133
1133
|
"div",
|
|
1134
1134
|
{
|
|
@@ -1141,29 +1141,29 @@ function Nn({ size: t = 40 }) {
|
|
|
1141
1141
|
}
|
|
1142
1142
|
);
|
|
1143
1143
|
}
|
|
1144
|
-
function
|
|
1144
|
+
function wn(t, n = 32) {
|
|
1145
1145
|
switch (t) {
|
|
1146
1146
|
case "revolut":
|
|
1147
|
-
return /* @__PURE__ */ e(hn, { size: n });
|
|
1148
|
-
case "applepay":
|
|
1149
1147
|
return /* @__PURE__ */ e(pn, { size: n });
|
|
1148
|
+
case "applepay":
|
|
1149
|
+
return /* @__PURE__ */ e(fn, { size: n });
|
|
1150
1150
|
case "card":
|
|
1151
|
-
return /* @__PURE__ */ e(
|
|
1151
|
+
return /* @__PURE__ */ e(vn, { size: n });
|
|
1152
1152
|
case "googlepay":
|
|
1153
|
-
return /* @__PURE__ */ e(fn, { size: n });
|
|
1154
|
-
case "paypal":
|
|
1155
1153
|
return /* @__PURE__ */ e(yn, { size: n });
|
|
1154
|
+
case "paypal":
|
|
1155
|
+
return /* @__PURE__ */ e(xn, { size: n });
|
|
1156
1156
|
case "bank":
|
|
1157
|
-
return /* @__PURE__ */ e(
|
|
1157
|
+
return /* @__PURE__ */ e(hn, { size: n });
|
|
1158
1158
|
case "visa":
|
|
1159
|
-
return /* @__PURE__ */ e(xn, { size: n });
|
|
1160
|
-
case "mastercard":
|
|
1161
1159
|
return /* @__PURE__ */ e(gn, { size: n });
|
|
1160
|
+
case "mastercard":
|
|
1161
|
+
return /* @__PURE__ */ e(Cn, { size: n });
|
|
1162
1162
|
default:
|
|
1163
1163
|
return /* @__PURE__ */ e(at, { size: n });
|
|
1164
1164
|
}
|
|
1165
1165
|
}
|
|
1166
|
-
const
|
|
1166
|
+
const An = {
|
|
1167
1167
|
"debit-credit-card": "card",
|
|
1168
1168
|
"bank-transfer": "bank",
|
|
1169
1169
|
"ach-bank-transfer": "bank",
|
|
@@ -1174,7 +1174,7 @@ const wn = {
|
|
|
1174
1174
|
"google-pay": "googlepay",
|
|
1175
1175
|
paypal: "paypal",
|
|
1176
1176
|
revolut: "revolut"
|
|
1177
|
-
},
|
|
1177
|
+
}, Sn = {
|
|
1178
1178
|
"debit-credit-card": "Card",
|
|
1179
1179
|
"bank-transfer": "Bank Transfer",
|
|
1180
1180
|
"ach-bank-transfer": "ACH",
|
|
@@ -1184,14 +1184,14 @@ const wn = {
|
|
|
1184
1184
|
paypal: "PayPal",
|
|
1185
1185
|
revolut: "Revolut"
|
|
1186
1186
|
};
|
|
1187
|
-
function
|
|
1188
|
-
return
|
|
1187
|
+
function Pt(t, n) {
|
|
1188
|
+
return Sn[t] || n;
|
|
1189
1189
|
}
|
|
1190
|
-
function
|
|
1191
|
-
const o =
|
|
1192
|
-
return o ?
|
|
1190
|
+
function Ut(t, n, a = 24) {
|
|
1191
|
+
const o = An[t];
|
|
1192
|
+
return o ? wn(o, a) : n ? /* @__PURE__ */ e("img", { src: n, alt: "", width: a, height: a, style: { borderRadius: "50%" } }) : /* @__PURE__ */ e(at, { size: a });
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1194
|
+
function Rn({
|
|
1195
1195
|
methods: t,
|
|
1196
1196
|
selectedId: n,
|
|
1197
1197
|
onOpenModal: a,
|
|
@@ -1200,7 +1200,7 @@ function Sn({
|
|
|
1200
1200
|
const l = W(
|
|
1201
1201
|
() => t.filter((m) => m.supportedFiats.includes(o)),
|
|
1202
1202
|
[t, o]
|
|
1203
|
-
),
|
|
1203
|
+
), c = l.find((m) => m.id === n) || l[0];
|
|
1204
1204
|
return l.length === 0 ? /* @__PURE__ */ e(
|
|
1205
1205
|
"div",
|
|
1206
1206
|
{
|
|
@@ -1215,7 +1215,7 @@ function Sn({
|
|
|
1215
1215
|
o
|
|
1216
1216
|
] })
|
|
1217
1217
|
}
|
|
1218
|
-
) : /* @__PURE__ */ e(
|
|
1218
|
+
) : /* @__PURE__ */ e(re, { children: /* @__PURE__ */ r(
|
|
1219
1219
|
"div",
|
|
1220
1220
|
{
|
|
1221
1221
|
role: "button",
|
|
@@ -1235,21 +1235,21 @@ function Sn({
|
|
|
1235
1235
|
children: [
|
|
1236
1236
|
/* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Payment method" }),
|
|
1237
1237
|
/* @__PURE__ */ r("span", { className: "flex items-center gap-2", children: [
|
|
1238
|
-
/* @__PURE__ */ e("span", { className: "flex items-center justify-center", style: { width: 20, height: 20 }, children:
|
|
1239
|
-
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children:
|
|
1240
|
-
/* @__PURE__ */ e(
|
|
1238
|
+
/* @__PURE__ */ e("span", { className: "flex items-center justify-center", style: { width: 20, height: 20 }, children: c && Ut(c.id, c.icon, 20) }),
|
|
1239
|
+
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: c ? Pt(c.id, c.name) : "Select" }),
|
|
1240
|
+
/* @__PURE__ */ e(He, {})
|
|
1241
1241
|
] })
|
|
1242
1242
|
]
|
|
1243
1243
|
}
|
|
1244
1244
|
) });
|
|
1245
1245
|
}
|
|
1246
|
-
function
|
|
1246
|
+
function Tn({
|
|
1247
1247
|
className: t = "",
|
|
1248
1248
|
autoRedirect: n = !1,
|
|
1249
1249
|
redirectDelay: a = 3e3
|
|
1250
1250
|
}) {
|
|
1251
1251
|
var f;
|
|
1252
|
-
const { order: o, orderStatus: l, goToStep:
|
|
1252
|
+
const { order: o, orderStatus: l, goToStep: c, goBack: m } = Te(), [s, d] = b(!1), [p, h] = b(null), u = o != null && o.checkout.expiresAt ? Date.now() > o.checkout.expiresAt : !1;
|
|
1253
1253
|
if (D(() => {
|
|
1254
1254
|
if ((o == null ? void 0 : o.checkout.method) === "redirect" && n && !u) {
|
|
1255
1255
|
h(Math.ceil(a / 1e3));
|
|
@@ -1263,8 +1263,8 @@ function Rn({
|
|
|
1263
1263
|
};
|
|
1264
1264
|
}
|
|
1265
1265
|
}, [o, n, a, u]), D(() => {
|
|
1266
|
-
l && (l.status === "completed" ?
|
|
1267
|
-
}, [l == null ? void 0 : l.status,
|
|
1266
|
+
l && (l.status === "completed" ? c("complete") : ["failed", "cancelled", "expired"].includes(l.status) && c("error"));
|
|
1267
|
+
}, [l == null ? void 0 : l.status, c]), !o)
|
|
1268
1268
|
return /* @__PURE__ */ r(
|
|
1269
1269
|
"div",
|
|
1270
1270
|
{
|
|
@@ -1319,7 +1319,7 @@ function Rn({
|
|
|
1319
1319
|
);
|
|
1320
1320
|
if (o.checkout.method === "iframe") {
|
|
1321
1321
|
const x = o.checkout.url, E = ((f = o.checkout.allowedFeatures) == null ? void 0 : f.join("; ")) || "payment; camera; microphone; geolocation; clipboard-read; clipboard-write; accelerometer; gyroscope; magnetometer; fullscreen; autoplay; encrypted-media; web-share";
|
|
1322
|
-
return
|
|
1322
|
+
return vt(
|
|
1323
1323
|
/* @__PURE__ */ r(
|
|
1324
1324
|
"div",
|
|
1325
1325
|
{
|
|
@@ -1370,7 +1370,7 @@ function Rn({
|
|
|
1370
1370
|
}
|
|
1371
1371
|
),
|
|
1372
1372
|
/* @__PURE__ */ r("div", { style: { flex: 1, position: "relative", overflow: "hidden" }, children: [
|
|
1373
|
-
!
|
|
1373
|
+
!s && /* @__PURE__ */ r(
|
|
1374
1374
|
"div",
|
|
1375
1375
|
{
|
|
1376
1376
|
style: {
|
|
@@ -1392,7 +1392,7 @@ function Rn({
|
|
|
1392
1392
|
{
|
|
1393
1393
|
src: x,
|
|
1394
1394
|
style: {
|
|
1395
|
-
display:
|
|
1395
|
+
display: s ? "block" : "none",
|
|
1396
1396
|
width: "100%",
|
|
1397
1397
|
height: "100%",
|
|
1398
1398
|
border: "none"
|
|
@@ -1466,8 +1466,8 @@ function Rn({
|
|
|
1466
1466
|
}
|
|
1467
1467
|
);
|
|
1468
1468
|
if (o.checkout.method === "widget" && o.widgetConfig) {
|
|
1469
|
-
const x =
|
|
1470
|
-
return
|
|
1469
|
+
const x = kn(o.checkout.url, o.widgetConfig);
|
|
1470
|
+
return vt(
|
|
1471
1471
|
/* @__PURE__ */ r(
|
|
1472
1472
|
"div",
|
|
1473
1473
|
{
|
|
@@ -1518,7 +1518,7 @@ function Rn({
|
|
|
1518
1518
|
}
|
|
1519
1519
|
),
|
|
1520
1520
|
/* @__PURE__ */ r("div", { style: { flex: 1, position: "relative", overflow: "hidden" }, children: [
|
|
1521
|
-
!
|
|
1521
|
+
!s && /* @__PURE__ */ r(
|
|
1522
1522
|
"div",
|
|
1523
1523
|
{
|
|
1524
1524
|
style: {
|
|
@@ -1540,7 +1540,7 @@ function Rn({
|
|
|
1540
1540
|
{
|
|
1541
1541
|
src: x,
|
|
1542
1542
|
style: {
|
|
1543
|
-
display:
|
|
1543
|
+
display: s ? "block" : "none",
|
|
1544
1544
|
width: "100%",
|
|
1545
1545
|
height: "100%",
|
|
1546
1546
|
border: "none"
|
|
@@ -1584,13 +1584,13 @@ function Rn({
|
|
|
1584
1584
|
}
|
|
1585
1585
|
);
|
|
1586
1586
|
}
|
|
1587
|
-
function
|
|
1587
|
+
function kn(t, n) {
|
|
1588
1588
|
const a = new URL("/en/partner/widget", t);
|
|
1589
1589
|
for (const [o, l] of Object.entries(n))
|
|
1590
1590
|
l != null && l !== "" && a.searchParams.set(o, String(l));
|
|
1591
1591
|
return a.toString();
|
|
1592
1592
|
}
|
|
1593
|
-
function
|
|
1593
|
+
function Ln({ className: t = "" }) {
|
|
1594
1594
|
const { orderStatus: n, orderStatusLoading: a, goToStep: o } = Te();
|
|
1595
1595
|
D(() => {
|
|
1596
1596
|
n && (n.status === "completed" ? o("complete") : ["failed", "cancelled", "expired", "refunded"].includes(n.status) && o("error"));
|
|
@@ -1663,13 +1663,13 @@ function Re({ label: t, value: n, mono: a }) {
|
|
|
1663
1663
|
}
|
|
1664
1664
|
);
|
|
1665
1665
|
}
|
|
1666
|
-
function
|
|
1666
|
+
function In({
|
|
1667
1667
|
className: t = "",
|
|
1668
1668
|
explorerUrl: n,
|
|
1669
1669
|
onDone: a,
|
|
1670
1670
|
doneButtonText: o = "Done"
|
|
1671
1671
|
}) {
|
|
1672
|
-
const { orderStatus: l, state:
|
|
1672
|
+
const { orderStatus: l, state: c, dispatch: m } = Te(), s = c.flowType === "sell", d = () => {
|
|
1673
1673
|
if (!(l != null && l.transactionHash)) return null;
|
|
1674
1674
|
if (!n) {
|
|
1675
1675
|
const u = {
|
|
@@ -1683,7 +1683,7 @@ function Ln({
|
|
|
1683
1683
|
avalanche: "https://snowtrace.io/tx/{txHash}",
|
|
1684
1684
|
fantom: "https://ftmscan.com/tx/{txHash}"
|
|
1685
1685
|
};
|
|
1686
|
-
return (u[
|
|
1686
|
+
return (u[c.network] || u.ethereum).replace("{txHash}", l.transactionHash);
|
|
1687
1687
|
}
|
|
1688
1688
|
return n.replace("{txHash}", l.transactionHash);
|
|
1689
1689
|
}, p = () => {
|
|
@@ -1698,27 +1698,27 @@ function Ln({
|
|
|
1698
1698
|
children: /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", width: "32", height: "32", fill: "white", children: /* @__PURE__ */ e("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z" }) })
|
|
1699
1699
|
}
|
|
1700
1700
|
),
|
|
1701
|
-
/* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children:
|
|
1702
|
-
/* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children:
|
|
1701
|
+
/* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: s ? "Sale Complete!" : "Purchase Complete!" }),
|
|
1702
|
+
/* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: s ? `Your ${(l == null ? void 0 : l.fiatCurrency) || c.fiatCurrency} payout is being processed.` : `Your ${(l == null ? void 0 : l.cryptoCurrency) || c.cryptoCurrency} has been sent to your wallet.` }),
|
|
1703
1703
|
l && /* @__PURE__ */ r("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
|
|
1704
1704
|
/* @__PURE__ */ e(
|
|
1705
|
-
|
|
1705
|
+
he,
|
|
1706
1706
|
{
|
|
1707
|
-
label:
|
|
1707
|
+
label: s ? "Amount Sold" : "Amount Received",
|
|
1708
1708
|
value: `${l.cryptoAmount} ${l.cryptoCurrency}`,
|
|
1709
1709
|
highlight: !0
|
|
1710
1710
|
}
|
|
1711
1711
|
),
|
|
1712
1712
|
/* @__PURE__ */ e(
|
|
1713
|
-
|
|
1713
|
+
he,
|
|
1714
1714
|
{
|
|
1715
|
-
label:
|
|
1715
|
+
label: s ? "Payout Amount" : "Amount Paid",
|
|
1716
1716
|
value: `${l.fiatAmount} ${l.fiatCurrency}`
|
|
1717
1717
|
}
|
|
1718
1718
|
),
|
|
1719
|
-
/* @__PURE__ */ e(
|
|
1719
|
+
/* @__PURE__ */ e(he, { label: "Network", value: l.network }),
|
|
1720
1720
|
/* @__PURE__ */ e(
|
|
1721
|
-
|
|
1721
|
+
he,
|
|
1722
1722
|
{
|
|
1723
1723
|
label: "Wallet",
|
|
1724
1724
|
value: `${l.walletAddress.slice(0, 10)}...${l.walletAddress.slice(-8)}`,
|
|
@@ -1726,17 +1726,17 @@ function Ln({
|
|
|
1726
1726
|
}
|
|
1727
1727
|
),
|
|
1728
1728
|
l.transactionHash && /* @__PURE__ */ e(
|
|
1729
|
-
|
|
1729
|
+
he,
|
|
1730
1730
|
{
|
|
1731
1731
|
label: "Transaction",
|
|
1732
1732
|
value: `${l.transactionHash.slice(0, 10)}...${l.transactionHash.slice(-8)}`,
|
|
1733
1733
|
mono: !0
|
|
1734
1734
|
}
|
|
1735
1735
|
),
|
|
1736
|
-
/* @__PURE__ */ e(
|
|
1737
|
-
/* @__PURE__ */ e(
|
|
1736
|
+
/* @__PURE__ */ e(he, { label: "Provider", value: l.gateway }),
|
|
1737
|
+
/* @__PURE__ */ e(he, { label: "Order ID", value: l.orderId, mono: !0 }),
|
|
1738
1738
|
l.completedAt && /* @__PURE__ */ e(
|
|
1739
|
-
|
|
1739
|
+
he,
|
|
1740
1740
|
{
|
|
1741
1741
|
label: "Completed",
|
|
1742
1742
|
value: new Date(l.completedAt).toLocaleString()
|
|
@@ -1767,7 +1767,7 @@ function Ln({
|
|
|
1767
1767
|
] })
|
|
1768
1768
|
] });
|
|
1769
1769
|
}
|
|
1770
|
-
function
|
|
1770
|
+
function he({ label: t, value: n, mono: a, highlight: o }) {
|
|
1771
1771
|
return /* @__PURE__ */ r(
|
|
1772
1772
|
"div",
|
|
1773
1773
|
{
|
|
@@ -1787,12 +1787,12 @@ function ue({ label: t, value: n, mono: a, highlight: o }) {
|
|
|
1787
1787
|
}
|
|
1788
1788
|
);
|
|
1789
1789
|
}
|
|
1790
|
-
function
|
|
1790
|
+
function Mn({
|
|
1791
1791
|
className: t = "",
|
|
1792
1792
|
onRetry: n,
|
|
1793
1793
|
supportEmail: a = "support@nowramp.com"
|
|
1794
1794
|
}) {
|
|
1795
|
-
const { state: o, orderStatus: l, dispatch:
|
|
1795
|
+
const { state: o, orderStatus: l, dispatch: c, goToStep: m } = Te(), s = o.flowType === "sell", d = () => {
|
|
1796
1796
|
if (l)
|
|
1797
1797
|
switch (l.status) {
|
|
1798
1798
|
case "failed":
|
|
@@ -1812,21 +1812,21 @@ function In({
|
|
|
1812
1812
|
if (l)
|
|
1813
1813
|
switch (l.status) {
|
|
1814
1814
|
case "failed":
|
|
1815
|
-
return
|
|
1815
|
+
return s ? "Your sale could not be processed. Please try again." : "Your payment could not be processed. Please try again or use a different payment method.";
|
|
1816
1816
|
case "cancelled":
|
|
1817
|
-
return
|
|
1817
|
+
return s ? "Your sale was cancelled. No crypto was transferred." : "Your order was cancelled. No payment was processed.";
|
|
1818
1818
|
case "expired":
|
|
1819
|
-
return
|
|
1819
|
+
return s ? "Your order has expired. Please start a new sale." : "Your order has expired. Please start a new purchase.";
|
|
1820
1820
|
case "refunded":
|
|
1821
|
-
return
|
|
1821
|
+
return s ? "Your crypto has been returned. The funds should appear in your wallet shortly." : "Your payment has been refunded. The funds should appear in your account within 5-10 business days.";
|
|
1822
1822
|
default:
|
|
1823
1823
|
return "An unexpected error occurred. Please try again.";
|
|
1824
1824
|
}
|
|
1825
1825
|
return "An unexpected error occurred. Please try again.";
|
|
1826
1826
|
}, h = () => {
|
|
1827
|
-
|
|
1827
|
+
c({ type: "CLEAR_ERROR" }), n ? n() : (c({ type: "RESET" }), m("amount"));
|
|
1828
1828
|
}, u = () => {
|
|
1829
|
-
|
|
1829
|
+
c({ type: "RESET" }), m("amount");
|
|
1830
1830
|
};
|
|
1831
1831
|
return /* @__PURE__ */ r("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
|
|
1832
1832
|
/* @__PURE__ */ e(
|
|
@@ -1884,27 +1884,27 @@ function In({
|
|
|
1884
1884
|
] })
|
|
1885
1885
|
] });
|
|
1886
1886
|
}
|
|
1887
|
-
function
|
|
1887
|
+
function Tt(t) {
|
|
1888
1888
|
return t.length <= 12 ? t : `${t.slice(0, 6)}...${t.slice(-6)}`;
|
|
1889
1889
|
}
|
|
1890
|
-
function
|
|
1891
|
-
var
|
|
1890
|
+
function Bn({ className: t = "", stablecoinParity: n, partnerName: a }) {
|
|
1891
|
+
var z;
|
|
1892
1892
|
const {
|
|
1893
1893
|
config: o,
|
|
1894
1894
|
configLoading: l,
|
|
1895
|
-
state:
|
|
1895
|
+
state: c,
|
|
1896
1896
|
defaultGateway: m,
|
|
1897
|
-
quotes:
|
|
1897
|
+
quotes: s,
|
|
1898
1898
|
fetchQuotes: d,
|
|
1899
1899
|
createOrder: p,
|
|
1900
1900
|
orderLoading: h
|
|
1901
|
-
} = Te(), u =
|
|
1901
|
+
} = Te(), u = c.flowType === "sell", [f, x] = b(null), E = o == null ? void 0 : o.gateways.find((X) => X.id === m), v = (z = s == null ? void 0 : s.bestQuote) != null && z.exchangeRate ? parseFloat(s.bestQuote.exchangeRate) : null, S = parseFloat(c.fiatAmount) || 0, P = !!(n && a && !u && Ot(c.cryptoCurrency) && v), V = P && v >= 0.95 && v <= 1.05, U = P && S > 0 ? Ht(V ? S : S / v) : null, G = async () => {
|
|
1902
1902
|
x(null);
|
|
1903
1903
|
try {
|
|
1904
1904
|
d(), await p();
|
|
1905
1905
|
} catch (X) {
|
|
1906
|
-
const
|
|
1907
|
-
x(
|
|
1906
|
+
const de = X instanceof Error ? X.message : "Failed to create order";
|
|
1907
|
+
x(de);
|
|
1908
1908
|
}
|
|
1909
1909
|
};
|
|
1910
1910
|
return l ? /* @__PURE__ */ r("div", { className: `flex flex-col items-center justify-center p-12 ${t}`, children: [
|
|
@@ -1920,27 +1920,30 @@ function Mn({ className: t = "", stablecoinParity: n, partnerName: a }) {
|
|
|
1920
1920
|
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: E.name })
|
|
1921
1921
|
] })
|
|
1922
1922
|
] }),
|
|
1923
|
-
u ? /* @__PURE__ */ r(
|
|
1924
|
-
/* @__PURE__ */ e(
|
|
1925
|
-
/* @__PURE__ */ e(
|
|
1926
|
-
] }) : /* @__PURE__ */ r(
|
|
1927
|
-
/* @__PURE__ */ e(
|
|
1923
|
+
u ? /* @__PURE__ */ r(re, { children: [
|
|
1924
|
+
/* @__PURE__ */ e(ve, { label: "You sell", value: `${c.cryptoAmount} ${c.cryptoCurrency}`, highlight: !0 }),
|
|
1925
|
+
/* @__PURE__ */ e(ve, { label: "You receive", value: `${c.fiatCurrency} payout` })
|
|
1926
|
+
] }) : /* @__PURE__ */ r(re, { children: [
|
|
1927
|
+
/* @__PURE__ */ e(ve, { label: "You pay", value: `${c.fiatAmount} ${c.fiatCurrency}`, highlight: !0 }),
|
|
1928
1928
|
/* @__PURE__ */ e(
|
|
1929
|
-
|
|
1929
|
+
ve,
|
|
1930
1930
|
{
|
|
1931
1931
|
label: "You receive",
|
|
1932
|
-
value:
|
|
1932
|
+
value: U ? `${U} ${c.cryptoCurrency}` : `${c.cryptoCurrency} on ${c.network}`
|
|
1933
1933
|
}
|
|
1934
1934
|
),
|
|
1935
|
-
/* @__PURE__ */ e(
|
|
1936
|
-
|
|
1937
|
-
|
|
1935
|
+
/* @__PURE__ */ e(ve, { label: "Wallet", value: Tt(c.walletAddress), mono: !0 }),
|
|
1936
|
+
P && U && /* @__PURE__ */ r("div", { className: "py-2 text-[11px]", style: { color: "var(--t-text-muted)", lineHeight: "15px" }, children: [
|
|
1937
|
+
U,
|
|
1938
|
+
" ",
|
|
1939
|
+
c.cryptoCurrency,
|
|
1940
|
+
" will be credited to your ",
|
|
1938
1941
|
a,
|
|
1939
1942
|
" account."
|
|
1940
1943
|
] })
|
|
1941
1944
|
] }),
|
|
1942
|
-
/* @__PURE__ */ e(
|
|
1943
|
-
u &&
|
|
1945
|
+
/* @__PURE__ */ e(ve, { label: "Network", value: c.network }),
|
|
1946
|
+
u && c.walletAddress && /* @__PURE__ */ e(ve, { label: "Refund address", value: Tt(c.walletAddress), mono: !0 })
|
|
1944
1947
|
] }),
|
|
1945
1948
|
f && /* @__PURE__ */ e("p", { className: "text-[12px] mb-4", style: { color: "#EF4444" }, children: f }),
|
|
1946
1949
|
/* @__PURE__ */ e(
|
|
@@ -1950,7 +1953,7 @@ function Mn({ className: t = "", stablecoinParity: n, partnerName: a }) {
|
|
|
1950
1953
|
style: { height: 60, borderRadius: 5, background: "var(--t-cta-bg)", color: "var(--t-cta-text)", opacity: h ? 0.7 : 1 },
|
|
1951
1954
|
disabled: h,
|
|
1952
1955
|
onClick: G,
|
|
1953
|
-
children: h ? /* @__PURE__ */ r(
|
|
1956
|
+
children: h ? /* @__PURE__ */ r(re, { children: [
|
|
1954
1957
|
/* @__PURE__ */ e("span", { className: "nramp-spinner-inline" }),
|
|
1955
1958
|
"Processing..."
|
|
1956
1959
|
] }) : u ? "Confirm & Sell" : "Confirm & Pay"
|
|
@@ -1958,7 +1961,7 @@ function Mn({ className: t = "", stablecoinParity: n, partnerName: a }) {
|
|
|
1958
1961
|
)
|
|
1959
1962
|
] });
|
|
1960
1963
|
}
|
|
1961
|
-
function
|
|
1964
|
+
function ve({ label: t, value: n, mono: a, highlight: o }) {
|
|
1962
1965
|
return /* @__PURE__ */ r("div", { className: "flex justify-between items-center py-2", style: { borderBottom: "1px solid var(--t-divider)" }, children: [
|
|
1963
1966
|
/* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: t }),
|
|
1964
1967
|
/* @__PURE__ */ e(
|
|
@@ -1976,7 +1979,7 @@ function Ve({
|
|
|
1976
1979
|
onClose: n,
|
|
1977
1980
|
children: a
|
|
1978
1981
|
}) {
|
|
1979
|
-
const [o, l] = b(!1), [
|
|
1982
|
+
const [o, l] = b(!1), [c, m] = b(!1);
|
|
1980
1983
|
D(() => {
|
|
1981
1984
|
if (t)
|
|
1982
1985
|
l(!0), requestAnimationFrame(() => requestAnimationFrame(() => m(!0)));
|
|
@@ -1986,42 +1989,42 @@ function Ve({
|
|
|
1986
1989
|
return () => clearTimeout(d);
|
|
1987
1990
|
}
|
|
1988
1991
|
}, [t]);
|
|
1989
|
-
const
|
|
1992
|
+
const s = B(() => {
|
|
1990
1993
|
m(!1), setTimeout(() => n(), 250);
|
|
1991
1994
|
}, [n]);
|
|
1992
1995
|
return D(() => {
|
|
1993
1996
|
if (!t) return;
|
|
1994
1997
|
const d = (p) => {
|
|
1995
|
-
p.key === "Escape" &&
|
|
1998
|
+
p.key === "Escape" && s();
|
|
1996
1999
|
};
|
|
1997
2000
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
1998
|
-
}, [t,
|
|
2001
|
+
}, [t, s]), o ? /* @__PURE__ */ e(
|
|
1999
2002
|
"div",
|
|
2000
2003
|
{
|
|
2001
2004
|
className: "absolute inset-0 z-20 transition-opacity duration-250",
|
|
2002
|
-
style: { opacity:
|
|
2005
|
+
style: { opacity: c ? 1 : 0 },
|
|
2003
2006
|
children: /* @__PURE__ */ e(
|
|
2004
2007
|
"div",
|
|
2005
2008
|
{
|
|
2006
2009
|
className: "absolute inset-0 flex flex-col transition-transform duration-250 ease-out",
|
|
2007
|
-
style: { background: "var(--t-modal-bg)", transform:
|
|
2008
|
-
children: typeof a == "function" ? a(
|
|
2010
|
+
style: { background: "var(--t-modal-bg)", transform: c ? "translateY(0)" : "translateY(24px)" },
|
|
2011
|
+
children: typeof a == "function" ? a(s) : a
|
|
2009
2012
|
}
|
|
2010
2013
|
)
|
|
2011
2014
|
}
|
|
2012
2015
|
) : null;
|
|
2013
2016
|
}
|
|
2014
|
-
function
|
|
2017
|
+
function On({ char: t, height: n = 38 }) {
|
|
2015
2018
|
const a = "0123456789", o = a.indexOf(t);
|
|
2016
2019
|
return o === -1 ? /* @__PURE__ */ e("span", { children: t }) : /* @__PURE__ */ e("span", { className: "digit-slot", style: { height: n, lineHeight: `${n}px` }, children: /* @__PURE__ */ e("span", { className: "digit-slot-inner block", style: { transform: `translateY(-${o * n}px)` }, children: a.split("").map((l) => /* @__PURE__ */ e("span", { className: "block", style: { height: n, lineHeight: `${n}px` }, children: l }, l)) }) });
|
|
2017
2020
|
}
|
|
2018
|
-
function
|
|
2021
|
+
function Hn({
|
|
2019
2022
|
value: t,
|
|
2020
2023
|
height: n = 38,
|
|
2021
2024
|
className: a = "",
|
|
2022
2025
|
style: o = {}
|
|
2023
2026
|
}) {
|
|
2024
|
-
return /* @__PURE__ */ e("span", { className: a, style: { display: "inline-flex", ...o }, children: t.split("").map((l,
|
|
2027
|
+
return /* @__PURE__ */ e("span", { className: a, style: { display: "inline-flex", ...o }, children: t.split("").map((l, c) => /* @__PURE__ */ e(On, { char: l, height: n }, c)) });
|
|
2025
2028
|
}
|
|
2026
2029
|
function M({
|
|
2027
2030
|
w: t,
|
|
@@ -2030,7 +2033,7 @@ function M({
|
|
|
2030
2033
|
}) {
|
|
2031
2034
|
return /* @__PURE__ */ e("div", { className: `skeleton ${a}`, style: { width: t, height: n } });
|
|
2032
2035
|
}
|
|
2033
|
-
function
|
|
2036
|
+
function Dn() {
|
|
2034
2037
|
return /* @__PURE__ */ r("div", { className: "flex-1 px-5 flex flex-col", children: [
|
|
2035
2038
|
/* @__PURE__ */ r("div", { className: "px-[18px] pt-[14px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5 }, children: [
|
|
2036
2039
|
/* @__PURE__ */ e(M, { w: 70, h: 14, className: "mb-3" }),
|
|
@@ -2059,7 +2062,7 @@ function Hn() {
|
|
|
2059
2062
|
/* @__PURE__ */ e("div", { className: "text-center py-3", children: /* @__PURE__ */ e("span", { className: "text-[11px]", style: { color: "var(--t-text-tertiary)" }, children: "Powered by NowRamp" }) })
|
|
2060
2063
|
] });
|
|
2061
2064
|
}
|
|
2062
|
-
function
|
|
2065
|
+
function De({ onClick: t }) {
|
|
2063
2066
|
return /* @__PURE__ */ e(
|
|
2064
2067
|
"button",
|
|
2065
2068
|
{
|
|
@@ -2100,38 +2103,38 @@ function je({
|
|
|
2100
2103
|
)
|
|
2101
2104
|
] });
|
|
2102
2105
|
}
|
|
2103
|
-
function
|
|
2106
|
+
function Pn({
|
|
2104
2107
|
onClose: t,
|
|
2105
2108
|
onSelect: n,
|
|
2106
2109
|
currencies: a,
|
|
2107
2110
|
assetBaseUrl: o = "",
|
|
2108
2111
|
selectedCode: l
|
|
2109
2112
|
}) {
|
|
2110
|
-
const [
|
|
2111
|
-
if (!a || a.length === 0) return
|
|
2112
|
-
const p = new Map(
|
|
2113
|
+
const [c, m] = b(""), s = W(() => {
|
|
2114
|
+
if (!a || a.length === 0) return Nt;
|
|
2115
|
+
const p = new Map(Nt.map((h) => [h.code, h.name]));
|
|
2113
2116
|
return a.map((h) => ({
|
|
2114
2117
|
code: h.code,
|
|
2115
2118
|
name: h.name || p.get(h.code) || h.code
|
|
2116
2119
|
}));
|
|
2117
2120
|
}, [a]), d = W(() => {
|
|
2118
|
-
const p =
|
|
2121
|
+
const p = c.trim().toLowerCase();
|
|
2119
2122
|
if (!p) {
|
|
2120
2123
|
if (l) {
|
|
2121
|
-
const h =
|
|
2124
|
+
const h = s.find((u) => u.code === l);
|
|
2122
2125
|
if (h) {
|
|
2123
|
-
const u =
|
|
2126
|
+
const u = s.filter((f) => f.code !== l);
|
|
2124
2127
|
return [h, ...u];
|
|
2125
2128
|
}
|
|
2126
2129
|
}
|
|
2127
|
-
return
|
|
2130
|
+
return s;
|
|
2128
2131
|
}
|
|
2129
|
-
return
|
|
2132
|
+
return s.filter(
|
|
2130
2133
|
(h) => h.code.toLowerCase().includes(p) || h.name.toLowerCase().includes(p)
|
|
2131
2134
|
);
|
|
2132
|
-
}, [
|
|
2133
|
-
return /* @__PURE__ */ r(
|
|
2134
|
-
/* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(
|
|
2135
|
+
}, [s, c, l]);
|
|
2136
|
+
return /* @__PURE__ */ r(re, { children: [
|
|
2137
|
+
/* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(De, { onClick: t }) }),
|
|
2135
2138
|
/* @__PURE__ */ e(
|
|
2136
2139
|
"h2",
|
|
2137
2140
|
{
|
|
@@ -2146,7 +2149,7 @@ function Dn({
|
|
|
2146
2149
|
children: "Select fiat currency"
|
|
2147
2150
|
}
|
|
2148
2151
|
),
|
|
2149
|
-
/* @__PURE__ */ e(je, { value:
|
|
2152
|
+
/* @__PURE__ */ e(je, { value: c, onChange: m }),
|
|
2150
2153
|
/* @__PURE__ */ r("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
|
|
2151
2154
|
d.map((p, h) => {
|
|
2152
2155
|
const u = p.name !== p.code ? p.name : "", f = l === p.code;
|
|
@@ -2188,21 +2191,21 @@ function Dn({
|
|
|
2188
2191
|
] })
|
|
2189
2192
|
] });
|
|
2190
2193
|
}
|
|
2191
|
-
function
|
|
2192
|
-
const [
|
|
2194
|
+
function kt({ src: t, alt: n, size: a, className: o, style: l }) {
|
|
2195
|
+
const [c, m] = b(!1), [s, d] = b(!1);
|
|
2193
2196
|
D(() => {
|
|
2194
2197
|
m(!1), d(!1);
|
|
2195
2198
|
}, [t]);
|
|
2196
2199
|
const p = B(() => m(!0), []), h = B(() => d(!0), []);
|
|
2197
2200
|
return /* @__PURE__ */ r("div", { className: o, style: { ...l, width: a, height: a, position: "relative" }, children: [
|
|
2198
|
-
!
|
|
2201
|
+
!c && !s && /* @__PURE__ */ e(
|
|
2199
2202
|
"div",
|
|
2200
2203
|
{
|
|
2201
2204
|
className: "absolute inset-0 rounded-full animate-pulse",
|
|
2202
2205
|
style: { background: "var(--t-pill-bg, #333)" }
|
|
2203
2206
|
}
|
|
2204
2207
|
),
|
|
2205
|
-
|
|
2208
|
+
s ? /* @__PURE__ */ e(
|
|
2206
2209
|
"div",
|
|
2207
2210
|
{
|
|
2208
2211
|
className: "absolute inset-0 rounded-full flex items-center justify-center text-[10px] font-bold",
|
|
@@ -2219,18 +2222,18 @@ function Lt({ src: t, alt: n, size: a, className: o, style: l }) {
|
|
|
2219
2222
|
loading: "lazy",
|
|
2220
2223
|
onLoad: p,
|
|
2221
2224
|
onError: h,
|
|
2222
|
-
className: `rounded-full ${
|
|
2225
|
+
className: `rounded-full ${c ? "opacity-100" : "opacity-0"}`,
|
|
2223
2226
|
style: { width: a, height: a, transition: "opacity 0.15s ease-in" }
|
|
2224
2227
|
}
|
|
2225
2228
|
)
|
|
2226
2229
|
] });
|
|
2227
2230
|
}
|
|
2228
|
-
function
|
|
2229
|
-
const [m,
|
|
2230
|
-
if (!a || a.length === 0) return
|
|
2231
|
+
function Un({ onClose: t, onSelect: n, cryptos: a, assetBaseUrl: o = "", selectedCode: l, selectedChain: c }) {
|
|
2232
|
+
const [m, s] = b(""), d = W(() => {
|
|
2233
|
+
if (!a || a.length === 0) return mn;
|
|
2231
2234
|
const u = [];
|
|
2232
2235
|
for (const f of a) {
|
|
2233
|
-
const x = f.networks || [], E = f.name ||
|
|
2236
|
+
const x = f.networks || [], E = f.name || ln[f.code] || f.code;
|
|
2234
2237
|
if (x.length === 0)
|
|
2235
2238
|
u.push({ code: f.code, name: E, chain: f.code, popular: !1 });
|
|
2236
2239
|
else
|
|
@@ -2246,14 +2249,14 @@ function Pn({ onClose: t, onSelect: n, cryptos: a, assetBaseUrl: o = "", selecte
|
|
|
2246
2249
|
}
|
|
2247
2250
|
}
|
|
2248
2251
|
return u;
|
|
2249
|
-
}, [a]), p = B((u, f) => l === u &&
|
|
2252
|
+
}, [a]), p = B((u, f) => l === u && c === f, [l, c]), h = W(() => {
|
|
2250
2253
|
var E;
|
|
2251
2254
|
const u = m.trim().toLowerCase();
|
|
2252
2255
|
if (!u) {
|
|
2253
|
-
if (l &&
|
|
2254
|
-
const v = d.find((S) => S.code === l && S.chain ===
|
|
2256
|
+
if (l && c) {
|
|
2257
|
+
const v = d.find((S) => S.code === l && S.chain === c);
|
|
2255
2258
|
if (v) {
|
|
2256
|
-
const S = d.filter((
|
|
2259
|
+
const S = d.filter((P) => !(P.code === l && P.chain === c));
|
|
2257
2260
|
return [v, ...S];
|
|
2258
2261
|
}
|
|
2259
2262
|
}
|
|
@@ -2261,15 +2264,15 @@ function Pn({ onClose: t, onSelect: n, cryptos: a, assetBaseUrl: o = "", selecte
|
|
|
2261
2264
|
}
|
|
2262
2265
|
const f = u.split(/\s+/), x = [];
|
|
2263
2266
|
for (const v of d) {
|
|
2264
|
-
const S = Xe(v.chain),
|
|
2265
|
-
if (!f.every((i) =>
|
|
2267
|
+
const S = Xe(v.chain), P = S ? S.name.toLowerCase() : "", V = ((E = S == null ? void 0 : S.shortName) == null ? void 0 : E.toLowerCase()) || "", U = v.chain.toLowerCase(), G = v.code.toLowerCase(), z = v.name.toLowerCase(), X = [G, z, P, V, U];
|
|
2268
|
+
if (!f.every((i) => X.some((w) => w.includes(i)))) continue;
|
|
2266
2269
|
let y = 0;
|
|
2267
|
-
|
|
2270
|
+
G === u ? y += 100 : G.startsWith(f[0]) && (y += 50), v.popular && (y += 10), f.length > 1 && (P.includes(f[1]) || V.includes(f[1]) || U.includes(f[1])) && (y += 25), x.push({ item: v, score: y });
|
|
2268
2271
|
}
|
|
2269
2272
|
return x.sort((v, S) => S.score - v.score), x.map((v) => v.item);
|
|
2270
|
-
}, [d, m, l,
|
|
2271
|
-
return /* @__PURE__ */ r(
|
|
2272
|
-
/* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(
|
|
2273
|
+
}, [d, m, l, c]);
|
|
2274
|
+
return /* @__PURE__ */ r(re, { children: [
|
|
2275
|
+
/* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(De, { onClick: t }) }),
|
|
2273
2276
|
/* @__PURE__ */ e(
|
|
2274
2277
|
"h2",
|
|
2275
2278
|
{
|
|
@@ -2278,7 +2281,7 @@ function Pn({ onClose: t, onSelect: n, cryptos: a, assetBaseUrl: o = "", selecte
|
|
|
2278
2281
|
children: "Select crypto currency"
|
|
2279
2282
|
}
|
|
2280
2283
|
),
|
|
2281
|
-
/* @__PURE__ */ e(je, { value: m, onChange:
|
|
2284
|
+
/* @__PURE__ */ e(je, { value: m, onChange: s }),
|
|
2282
2285
|
/* @__PURE__ */ r("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
|
|
2283
2286
|
h.map((u, f) => {
|
|
2284
2287
|
const x = Xe(u.chain), E = (x == null ? void 0 : x.name) || u.chainName || u.chain, v = u.name !== u.code ? u.name : "", S = p(u.code, u.chain);
|
|
@@ -2297,9 +2300,9 @@ function Pn({ onClose: t, onSelect: n, cryptos: a, assetBaseUrl: o = "", selecte
|
|
|
2297
2300
|
className: "absolute top-0 left-0",
|
|
2298
2301
|
style: { background: "#ffffff", borderRadius: "50%" },
|
|
2299
2302
|
children: /* @__PURE__ */ e(
|
|
2300
|
-
|
|
2303
|
+
kt,
|
|
2301
2304
|
{
|
|
2302
|
-
src:
|
|
2305
|
+
src: Bt(u.code, o),
|
|
2303
2306
|
alt: u.code,
|
|
2304
2307
|
size: 32
|
|
2305
2308
|
}
|
|
@@ -2318,7 +2321,7 @@ function Pn({ onClose: t, onSelect: n, cryptos: a, assetBaseUrl: o = "", selecte
|
|
|
2318
2321
|
background: "#ffffff"
|
|
2319
2322
|
},
|
|
2320
2323
|
children: /* @__PURE__ */ e(
|
|
2321
|
-
|
|
2324
|
+
kt,
|
|
2322
2325
|
{
|
|
2323
2326
|
src: tt(u.chain, o),
|
|
2324
2327
|
alt: u.chain,
|
|
@@ -2369,15 +2372,15 @@ function Pn({ onClose: t, onSelect: n, cryptos: a, assetBaseUrl: o = "", selecte
|
|
|
2369
2372
|
] })
|
|
2370
2373
|
] });
|
|
2371
2374
|
}
|
|
2372
|
-
function
|
|
2375
|
+
function Fn({
|
|
2373
2376
|
methods: t,
|
|
2374
2377
|
selectedId: n,
|
|
2375
2378
|
onSelect: a,
|
|
2376
2379
|
onClose: o
|
|
2377
2380
|
}) {
|
|
2378
|
-
const [l,
|
|
2379
|
-
const
|
|
2380
|
-
if (!
|
|
2381
|
+
const [l, c] = b(""), m = W(() => {
|
|
2382
|
+
const s = l.trim().toLowerCase();
|
|
2383
|
+
if (!s) {
|
|
2381
2384
|
if (n) {
|
|
2382
2385
|
const d = t.find((p) => p.id === n);
|
|
2383
2386
|
if (d) {
|
|
@@ -2388,11 +2391,11 @@ function Un({
|
|
|
2388
2391
|
return t;
|
|
2389
2392
|
}
|
|
2390
2393
|
return t.filter(
|
|
2391
|
-
(d) => d.id.toLowerCase().includes(
|
|
2394
|
+
(d) => d.id.toLowerCase().includes(s) || d.name.toLowerCase().includes(s) || d.description && d.description.toLowerCase().includes(s)
|
|
2392
2395
|
);
|
|
2393
2396
|
}, [t, l, n]);
|
|
2394
|
-
return /* @__PURE__ */ r(
|
|
2395
|
-
/* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(
|
|
2397
|
+
return /* @__PURE__ */ r(re, { children: [
|
|
2398
|
+
/* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(De, { onClick: o }) }),
|
|
2396
2399
|
/* @__PURE__ */ e(
|
|
2397
2400
|
"h2",
|
|
2398
2401
|
{
|
|
@@ -2401,24 +2404,24 @@ function Un({
|
|
|
2401
2404
|
children: "Choose payment method"
|
|
2402
2405
|
}
|
|
2403
2406
|
),
|
|
2404
|
-
/* @__PURE__ */ e(je, { value: l, onChange:
|
|
2407
|
+
/* @__PURE__ */ e(je, { value: l, onChange: c }),
|
|
2405
2408
|
/* @__PURE__ */ r("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
|
|
2406
|
-
m.map((
|
|
2407
|
-
const p =
|
|
2409
|
+
m.map((s, d) => {
|
|
2410
|
+
const p = s.id === n, h = Pt(s.id, s.name);
|
|
2408
2411
|
return /* @__PURE__ */ r("div", { children: [
|
|
2409
2412
|
/* @__PURE__ */ r(
|
|
2410
2413
|
"button",
|
|
2411
2414
|
{
|
|
2412
|
-
onClick: () => a(
|
|
2413
|
-
className: `flex w-full transition-colors rounded-lg hover-item ${
|
|
2415
|
+
onClick: () => a(s.id),
|
|
2416
|
+
className: `flex w-full transition-colors rounded-lg hover-item ${s.description ? "items-start" : "items-center"}`,
|
|
2414
2417
|
style: { color: "var(--t-text)", gap: 14, padding: "18px 8px", margin: "0 -8px" },
|
|
2415
2418
|
children: [
|
|
2416
2419
|
/* @__PURE__ */ e(
|
|
2417
2420
|
"span",
|
|
2418
2421
|
{
|
|
2419
|
-
className: `flex items-center justify-center shrink-0 ${
|
|
2422
|
+
className: `flex items-center justify-center shrink-0 ${s.description ? "mt-0.5" : ""}`,
|
|
2420
2423
|
style: { width: 32, height: 32 },
|
|
2421
|
-
children:
|
|
2424
|
+
children: Ut(s.id, s.icon, 32)
|
|
2422
2425
|
}
|
|
2423
2426
|
),
|
|
2424
2427
|
/* @__PURE__ */ r("div", { className: "text-left flex-1", children: [
|
|
@@ -2430,12 +2433,12 @@ function Un({
|
|
|
2430
2433
|
children: h
|
|
2431
2434
|
}
|
|
2432
2435
|
),
|
|
2433
|
-
|
|
2436
|
+
s.description && /* @__PURE__ */ e(
|
|
2434
2437
|
"div",
|
|
2435
2438
|
{
|
|
2436
2439
|
className: "text-[13px] leading-snug mt-1",
|
|
2437
2440
|
style: { color: "var(--t-text-secondary)" },
|
|
2438
|
-
children:
|
|
2441
|
+
children: s.description
|
|
2439
2442
|
}
|
|
2440
2443
|
)
|
|
2441
2444
|
] }),
|
|
@@ -2453,13 +2456,13 @@ function Un({
|
|
|
2453
2456
|
}
|
|
2454
2457
|
),
|
|
2455
2458
|
d < m.length - 1 && /* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider, rgba(255,255,255,0.08))" } })
|
|
2456
|
-
] },
|
|
2459
|
+
] }, s.id);
|
|
2457
2460
|
}),
|
|
2458
2461
|
m.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: "No payment methods found" })
|
|
2459
2462
|
] })
|
|
2460
2463
|
] });
|
|
2461
2464
|
}
|
|
2462
|
-
function
|
|
2465
|
+
function Kn({
|
|
2463
2466
|
checked: t,
|
|
2464
2467
|
onChange: n,
|
|
2465
2468
|
accentColor: a = "var(--t-accent)"
|
|
@@ -2489,25 +2492,25 @@ function Fn({
|
|
|
2489
2492
|
}
|
|
2490
2493
|
);
|
|
2491
2494
|
}
|
|
2492
|
-
const
|
|
2495
|
+
const _n = [
|
|
2493
2496
|
{ label: "Privacy policy", href: "https://nowramp.com/privacy-policy" },
|
|
2494
2497
|
{ label: "Terms of use", href: "https://nowramp.com/terms-and-conditions" }
|
|
2495
2498
|
];
|
|
2496
|
-
function
|
|
2499
|
+
function Vn({
|
|
2497
2500
|
onClose: t,
|
|
2498
2501
|
darkMode: n,
|
|
2499
2502
|
onToggleDarkMode: a,
|
|
2500
2503
|
skinId: o,
|
|
2501
2504
|
onSelectSkin: l,
|
|
2502
|
-
showThemeToggle:
|
|
2505
|
+
showThemeToggle: c = !0
|
|
2503
2506
|
}) {
|
|
2504
|
-
return /* @__PURE__ */ r(
|
|
2505
|
-
/* @__PURE__ */ e("div", { className: "flex justify-end items-center px-5 pt-5", children: /* @__PURE__ */ e(
|
|
2507
|
+
return /* @__PURE__ */ r(re, { children: [
|
|
2508
|
+
/* @__PURE__ */ e("div", { className: "flex justify-end items-center px-5 pt-5", children: /* @__PURE__ */ e(De, { onClick: t }) }),
|
|
2506
2509
|
/* @__PURE__ */ r("div", { className: "px-5 flex-1 pt-6 overflow-y-auto custom-scroll", children: [
|
|
2507
|
-
|
|
2510
|
+
c && /* @__PURE__ */ r(re, { children: [
|
|
2508
2511
|
/* @__PURE__ */ e("div", { style: { borderTop: "1px solid var(--t-divider)" }, children: /* @__PURE__ */ r("div", { className: "flex items-center justify-between w-full py-5", children: [
|
|
2509
2512
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-3.5", children: [
|
|
2510
|
-
/* @__PURE__ */ e(
|
|
2513
|
+
/* @__PURE__ */ e(En, { size: 40 }),
|
|
2511
2514
|
/* @__PURE__ */ e(
|
|
2512
2515
|
"span",
|
|
2513
2516
|
{
|
|
@@ -2517,11 +2520,11 @@ function _n({
|
|
|
2517
2520
|
}
|
|
2518
2521
|
)
|
|
2519
2522
|
] }),
|
|
2520
|
-
/* @__PURE__ */ e(
|
|
2523
|
+
/* @__PURE__ */ e(Kn, { checked: n, onChange: a, accentColor: "#4CD964" })
|
|
2521
2524
|
] }) }),
|
|
2522
2525
|
/* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider)" } })
|
|
2523
2526
|
] }),
|
|
2524
|
-
|
|
2527
|
+
_n.map((m) => /* @__PURE__ */ r("div", { children: [
|
|
2525
2528
|
/* @__PURE__ */ r(
|
|
2526
2529
|
"a",
|
|
2527
2530
|
{
|
|
@@ -2539,7 +2542,7 @@ function _n({
|
|
|
2539
2542
|
children: m.label
|
|
2540
2543
|
}
|
|
2541
2544
|
),
|
|
2542
|
-
/* @__PURE__ */ e(
|
|
2545
|
+
/* @__PURE__ */ e(bn, {})
|
|
2543
2546
|
]
|
|
2544
2547
|
}
|
|
2545
2548
|
),
|
|
@@ -2548,15 +2551,15 @@ function _n({
|
|
|
2548
2551
|
] })
|
|
2549
2552
|
] });
|
|
2550
2553
|
}
|
|
2551
|
-
function
|
|
2554
|
+
function Xn({
|
|
2552
2555
|
className: t = "",
|
|
2553
2556
|
theme: n = "dark",
|
|
2554
2557
|
skinId: a = "mono",
|
|
2555
2558
|
accentColor: o,
|
|
2556
2559
|
bgColor: l,
|
|
2557
|
-
bgImage:
|
|
2560
|
+
bgImage: c,
|
|
2558
2561
|
borderColor: m,
|
|
2559
|
-
borderRadius:
|
|
2562
|
+
borderRadius: s,
|
|
2560
2563
|
surfaceColor: d,
|
|
2561
2564
|
inputBgColor: p,
|
|
2562
2565
|
textColor: h,
|
|
@@ -2566,33 +2569,33 @@ function Vn({
|
|
|
2566
2569
|
showFlowToggle: E = !0,
|
|
2567
2570
|
showSettings: v = !0,
|
|
2568
2571
|
showThemeToggle: S = !0,
|
|
2569
|
-
autoRedirect:
|
|
2570
|
-
explorerUrl:
|
|
2571
|
-
doneButtonText:
|
|
2572
|
-
supportEmail:
|
|
2573
|
-
stablecoinParity:
|
|
2574
|
-
partnerName:
|
|
2575
|
-
onDone:
|
|
2572
|
+
autoRedirect: P = !1,
|
|
2573
|
+
explorerUrl: V,
|
|
2574
|
+
doneButtonText: U = "Done",
|
|
2575
|
+
supportEmail: G,
|
|
2576
|
+
stablecoinParity: z,
|
|
2577
|
+
partnerName: X,
|
|
2578
|
+
onDone: de
|
|
2576
2579
|
}) {
|
|
2577
|
-
var ht, pt, ft, yt, xt, gt, Ct
|
|
2580
|
+
var mt, ht, pt, ft, yt, xt, gt, Ct;
|
|
2578
2581
|
const {
|
|
2579
2582
|
state: y,
|
|
2580
2583
|
dispatch: i,
|
|
2581
2584
|
config: w,
|
|
2582
2585
|
configLoading: O,
|
|
2583
2586
|
quotes: C,
|
|
2584
|
-
quotesLoading:
|
|
2585
|
-
quotesError:
|
|
2586
|
-
fetchQuotes:
|
|
2587
|
+
quotesLoading: pe,
|
|
2588
|
+
quotesError: oe,
|
|
2589
|
+
fetchQuotes: ee,
|
|
2587
2590
|
createOrder: be,
|
|
2588
|
-
orderLoading:
|
|
2589
|
-
amountError:
|
|
2591
|
+
orderLoading: te,
|
|
2592
|
+
amountError: fe,
|
|
2590
2593
|
fieldLocks: k,
|
|
2591
2594
|
apiConfig: Ne,
|
|
2592
|
-
assetBaseUrl:
|
|
2593
|
-
} = Te(), [
|
|
2595
|
+
assetBaseUrl: F
|
|
2596
|
+
} = Te(), [le, ue] = b(n === "dark"), [ye, We] = b(a), [$, Y] = b(null), [xe, ke] = b(!1), [Le, Ee] = b(!1), [Ie, Pe] = b(!1), [Ge, ge] = b(null), [Me, N] = b(!0), [T, Z] = b(!1), [L, I] = b(!1), Q = _(null), ne = _(), we = _(y.flowType);
|
|
2594
2597
|
D(() => {
|
|
2595
|
-
|
|
2598
|
+
ue(n === "dark");
|
|
2596
2599
|
}, [n]), D(() => {
|
|
2597
2600
|
const g = setTimeout(() => N(!1), O ? 0 : 800);
|
|
2598
2601
|
return () => clearTimeout(g);
|
|
@@ -2604,27 +2607,27 @@ function Vn({
|
|
|
2604
2607
|
}
|
|
2605
2608
|
we.current = y.flowType;
|
|
2606
2609
|
}, [y.flowType, Me]);
|
|
2607
|
-
const Ae = y.flowType, K = Ae === "buy", j = y.cryptoCurrency || "BTC",
|
|
2608
|
-
|
|
2609
|
-
const
|
|
2610
|
+
const Ae = y.flowType, K = Ae === "buy", j = y.cryptoCurrency || "BTC", ie = y.fiatCurrency || "USD", Ye = K ? y.fiatAmount : y.cryptoAmount, J = un(Ye), ae = (mt = C == null ? void 0 : C.bestQuote) != null && mt.exchangeRate ? parseFloat(C.bestQuote.exchangeRate) : null, Ue = _(null);
|
|
2611
|
+
ae && j && ie && (Ue.current = { rate: ae, crypto: j, fiat: ie });
|
|
2612
|
+
const Ft = W(() => {
|
|
2610
2613
|
if (C != null && C.bestQuote) {
|
|
2611
2614
|
const g = K ? C.bestQuote.cryptoAmount : C.bestQuote.fiatAmount;
|
|
2612
2615
|
if (g) return g;
|
|
2613
2616
|
}
|
|
2614
2617
|
return "0";
|
|
2615
|
-
}, [C, K]),
|
|
2616
|
-
var H,
|
|
2617
|
-
const g =
|
|
2618
|
+
}, [C, K]), Be = !!(z && X && K && Ot(j) && ae), Kt = Be && ae >= 0.95 && ae <= 1.05, Ze = Be && J > 0 ? Ht(Kt ? J : J / ae) : null, _t = Be && Ze ? Ze : Ft, Vt = W(() => {
|
|
2619
|
+
var H, me, Je;
|
|
2620
|
+
const g = ae || ((H = Ue.current) == null ? void 0 : H.rate), A = ae ? j : (me = Ue.current) == null ? void 0 : me.crypto, R = ae ? ie : (Je = Ue.current) == null ? void 0 : Je.fiat;
|
|
2618
2621
|
return !g || !A || !R ? "" : `1 ${A} ≈ ${g.toFixed(2)} ${R}`;
|
|
2619
|
-
}, [j,
|
|
2622
|
+
}, [j, ie, ae]);
|
|
2620
2623
|
D(() => {
|
|
2621
2624
|
const g = y.walletAddress.trim(), A = y.network;
|
|
2622
2625
|
if (!g || g.length < 10) {
|
|
2623
|
-
|
|
2626
|
+
ge(null), i({ type: "SET_WALLET_ERROR", message: "" });
|
|
2624
2627
|
return;
|
|
2625
2628
|
}
|
|
2626
|
-
return
|
|
2627
|
-
var R, H,
|
|
2629
|
+
return Pe(!0), ge(null), clearTimeout(ne.current), ne.current = setTimeout(async () => {
|
|
2630
|
+
var R, H, me;
|
|
2628
2631
|
try {
|
|
2629
2632
|
const qe = await (await fetch(`${Ne.apiUrl}/public/validate/address`, {
|
|
2630
2633
|
method: "POST",
|
|
@@ -2632,108 +2635,108 @@ function Vn({
|
|
|
2632
2635
|
body: JSON.stringify({ address: g, ...A ? { network: A } : {} })
|
|
2633
2636
|
})).json(), et = ((R = qe.data) == null ? void 0 : R.attributes) || qe.data || qe;
|
|
2634
2637
|
if (et.isValid)
|
|
2635
|
-
|
|
2638
|
+
ge(!0), i({ type: "SET_WALLET_ERROR", message: "" });
|
|
2636
2639
|
else {
|
|
2637
|
-
|
|
2638
|
-
const
|
|
2639
|
-
i({ type: "SET_WALLET_ERROR", message:
|
|
2640
|
+
ge(!1);
|
|
2641
|
+
const Qt = ((H = et.errors) == null ? void 0 : H[0]) || ((me = et.details) == null ? void 0 : me.formatMessage) || "Invalid wallet address";
|
|
2642
|
+
i({ type: "SET_WALLET_ERROR", message: Qt });
|
|
2640
2643
|
}
|
|
2641
2644
|
} catch {
|
|
2642
|
-
|
|
2645
|
+
ge(null);
|
|
2643
2646
|
} finally {
|
|
2644
|
-
|
|
2647
|
+
Pe(!1);
|
|
2645
2648
|
}
|
|
2646
|
-
}, 500), () => clearTimeout(
|
|
2649
|
+
}, 500), () => clearTimeout(ne.current);
|
|
2647
2650
|
}, [y.walletAddress, y.network, Ne.apiUrl]);
|
|
2648
|
-
const
|
|
2651
|
+
const rt = !Ye || J === 0, ot = J > 0 && (K ? J < At : J < St), lt = !!fe || ot || xe && rt, Xt = J > 0 && !fe && !ot, Qe = y.walletAddress.trim().length >= 10 && Ge !== !1 && !Ie, Fe = Xt && Qe && !!y.cryptoCurrency && !!y.network, $t = (g) => {
|
|
2649
2652
|
let A = g.target.value.replace(/[^0-9.,]/g, "");
|
|
2650
2653
|
const R = K ? 2 : 6, H = A.indexOf(".");
|
|
2651
2654
|
H !== -1 && A.length - H - 1 > R && (A = A.slice(0, H + R + 1)), i(K ? { type: "SET_FIAT_AMOUNT", amount: A } : { type: "SET_CRYPTO_AMOUNT", amount: A });
|
|
2652
|
-
},
|
|
2655
|
+
}, it = (g) => {
|
|
2653
2656
|
g !== Ae && i({ type: "SET_FLOW_TYPE", flowType: g });
|
|
2654
|
-
},
|
|
2657
|
+
}, jt = B(
|
|
2655
2658
|
(g) => {
|
|
2656
2659
|
i({ type: "SET_FIAT_CURRENCY", currency: g });
|
|
2657
2660
|
},
|
|
2658
2661
|
[i]
|
|
2659
|
-
),
|
|
2662
|
+
), Wt = B(
|
|
2660
2663
|
(g, A) => {
|
|
2661
2664
|
i({ type: "SET_CRYPTO_CURRENCY", currency: g }), i({ type: "SET_CRYPTO_CHAIN", chain: A });
|
|
2662
2665
|
},
|
|
2663
2666
|
[i]
|
|
2664
|
-
),
|
|
2667
|
+
), Gt = B(
|
|
2665
2668
|
(g) => {
|
|
2666
2669
|
i({ type: "SET_PAYMENT_METHOD", methodId: g });
|
|
2667
2670
|
},
|
|
2668
2671
|
[i]
|
|
2669
|
-
),
|
|
2670
|
-
Fe && (I(!0),
|
|
2672
|
+
), Yt = () => {
|
|
2673
|
+
Fe && (I(!0), ee());
|
|
2671
2674
|
};
|
|
2672
2675
|
D(() => {
|
|
2673
2676
|
var g;
|
|
2674
|
-
if (!(!L ||
|
|
2677
|
+
if (!(!L || pe)) {
|
|
2675
2678
|
if (C != null && C.bestQuote)
|
|
2676
2679
|
I(!1), i({ type: "SELECT_QUOTE", quote: C.bestQuote }), be().catch(() => {
|
|
2677
2680
|
});
|
|
2678
|
-
else if (
|
|
2679
|
-
I(!1), i({ type: "SET_ERROR", message:
|
|
2681
|
+
else if (oe)
|
|
2682
|
+
I(!1), i({ type: "SET_ERROR", message: oe.message || "No quotes available" });
|
|
2680
2683
|
else if (C && !C.bestQuote) {
|
|
2681
2684
|
I(!1);
|
|
2682
2685
|
const A = (g = C.unavailableGateways) == null ? void 0 : g.map((H) => H.reason).filter(Boolean), R = A != null && A.length ? `No providers available: ${A.join("; ")}` : "No providers available for this currency/network combination";
|
|
2683
2686
|
i({ type: "SET_ERROR", message: R });
|
|
2684
2687
|
}
|
|
2685
2688
|
}
|
|
2686
|
-
}, [L, C,
|
|
2687
|
-
const ct =
|
|
2688
|
-
"--t-accent":
|
|
2689
|
-
"--t-cta-bg":
|
|
2690
|
-
"--t-cta-text":
|
|
2689
|
+
}, [L, C, pe, oe, i, be]);
|
|
2690
|
+
const ct = le ? "theme-dark" : "theme-light", ze = Et.find((g) => g.id === ye) || Et[0], Zt = ze.accent === null, st = (o ? se(o) : !1) ? { "--t-accent": o, "--t-cta-bg": o, "--t-cta-text": "#ffffff" } : Zt ? {
|
|
2691
|
+
"--t-accent": le ? "#ffffff" : "#111111",
|
|
2692
|
+
"--t-cta-bg": le ? "#ffffff" : "#111111",
|
|
2693
|
+
"--t-cta-text": le ? "#000000" : "#ffffff"
|
|
2691
2694
|
} : {
|
|
2692
2695
|
"--t-accent": ze.accent,
|
|
2693
2696
|
"--t-cta-bg": ze.accent,
|
|
2694
2697
|
"--t-cta-text": "#ffffff"
|
|
2695
|
-
},
|
|
2696
|
-
d && se(d) && (
|
|
2697
|
-
const
|
|
2698
|
-
l && se(l) ?
|
|
2698
|
+
}, q = {};
|
|
2699
|
+
d && se(d) && (q["--t-surface"] = d, q["--t-modal-bg"] = d), p && se(p) && (q["--t-pill-bg"] = p, q["--t-close-bg"] = p), h && se(h) && (q["--t-text"] = h), u && se(u) && (q["--t-text-secondary"] = u), f && se(f) && (q["--t-text-muted"] = f, q["--t-text-tertiary"] = f), x && se(x) && (q["--t-success"] = x);
|
|
2700
|
+
const Ce = {};
|
|
2701
|
+
l && se(l) ? Ce.backgroundColor = l : Ce.backgroundColor = "var(--t-bg)", c && (Ce.backgroundImage = `url(${c})`, Ce.backgroundSize = "cover", Ce.backgroundPosition = "center");
|
|
2699
2702
|
const Ke = {};
|
|
2700
|
-
m && se(m) && (Ke.border = `1px solid ${m}`),
|
|
2701
|
-
const
|
|
2702
|
-
if (
|
|
2703
|
+
m && se(m) && (Ke.border = `1px solid ${m}`), s && (Ke.borderRadius = s);
|
|
2704
|
+
const dt = y.step === "checkout" ? /* @__PURE__ */ e(Tn, { autoRedirect: P }) : y.step === "processing" ? /* @__PURE__ */ e(Ln, {}) : y.step === "complete" ? /* @__PURE__ */ e(In, { explorerUrl: V, doneButtonText: U, onDone: de }) : y.step === "error" ? /* @__PURE__ */ e(Mn, { supportEmail: G }) : y.step === "confirm" ? /* @__PURE__ */ e(Bn, { stablecoinParity: Be, partnerName: X }) : null;
|
|
2705
|
+
if (dt)
|
|
2703
2706
|
return /* @__PURE__ */ e(
|
|
2704
2707
|
"div",
|
|
2705
2708
|
{
|
|
2706
2709
|
className: `${ct} relative w-full max-w-[390px] h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
|
|
2707
2710
|
style: {
|
|
2708
2711
|
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
2709
|
-
...
|
|
2710
|
-
...
|
|
2711
|
-
...
|
|
2712
|
+
...Ce,
|
|
2713
|
+
...st,
|
|
2714
|
+
...q,
|
|
2712
2715
|
...Ke
|
|
2713
2716
|
},
|
|
2714
|
-
children:
|
|
2717
|
+
children: dt
|
|
2715
2718
|
}
|
|
2716
2719
|
);
|
|
2717
|
-
const
|
|
2720
|
+
const ce = y.network, Se = ce ? Xe(ce) : null, ut = (Se == null ? void 0 : Se.shortName) || (Se == null ? void 0 : Se.name) || ce;
|
|
2718
2721
|
return /* @__PURE__ */ r(
|
|
2719
2722
|
"div",
|
|
2720
2723
|
{
|
|
2721
2724
|
className: `${ct} relative w-full max-w-[390px] min-h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
|
|
2722
2725
|
style: {
|
|
2723
2726
|
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
2724
|
-
...
|
|
2725
|
-
...
|
|
2726
|
-
...
|
|
2727
|
+
...Ce,
|
|
2728
|
+
...st,
|
|
2729
|
+
...q,
|
|
2727
2730
|
...Ke
|
|
2728
2731
|
},
|
|
2729
2732
|
children: [
|
|
2730
|
-
v && /* @__PURE__ */ e("div", { className: `flex justify-end items-center px-5 pt-3 ${E ? "pb-1" : "pb-5"}`, children: /* @__PURE__ */ e(
|
|
2733
|
+
v && /* @__PURE__ */ e("div", { className: `flex justify-end items-center px-5 pt-3 ${E ? "pb-1" : "pb-5"}`, children: /* @__PURE__ */ e(Nn, { onClick: () => Y("settings") }) }),
|
|
2731
2734
|
E ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center pt-3 pb-5", children: [
|
|
2732
2735
|
/* @__PURE__ */ r("div", { className: "flex", style: { width: 165 }, children: [
|
|
2733
2736
|
/* @__PURE__ */ e(
|
|
2734
2737
|
"button",
|
|
2735
2738
|
{
|
|
2736
|
-
onClick: () =>
|
|
2739
|
+
onClick: () => it("buy"),
|
|
2737
2740
|
className: "flex-1 pb-2.5 text-[16px] font-medium text-center transition-colors duration-200",
|
|
2738
2741
|
style: { color: Ae === "buy" ? "var(--t-text)" : "var(--t-text-secondary)" },
|
|
2739
2742
|
children: "Buy"
|
|
@@ -2742,7 +2745,7 @@ function Vn({
|
|
|
2742
2745
|
/* @__PURE__ */ e(
|
|
2743
2746
|
"button",
|
|
2744
2747
|
{
|
|
2745
|
-
onClick: () =>
|
|
2748
|
+
onClick: () => it("sell"),
|
|
2746
2749
|
className: "flex-1 pb-2.5 text-[16px] font-medium text-center transition-colors duration-200",
|
|
2747
2750
|
style: { color: Ae === "sell" ? "var(--t-text)" : "var(--t-text-secondary)" },
|
|
2748
2751
|
children: "Sell"
|
|
@@ -2764,7 +2767,7 @@ function Vn({
|
|
|
2764
2767
|
)
|
|
2765
2768
|
] })
|
|
2766
2769
|
] }) : null,
|
|
2767
|
-
Me || T || O ? /* @__PURE__ */ e(
|
|
2770
|
+
Me || T || O ? /* @__PURE__ */ e(Dn, {}) : /* @__PURE__ */ r("div", { className: "flex-1 overflow-hidden px-5 flex flex-col tab-fade-in", children: [
|
|
2768
2771
|
/* @__PURE__ */ r(
|
|
2769
2772
|
"div",
|
|
2770
2773
|
{
|
|
@@ -2772,7 +2775,7 @@ function Vn({
|
|
|
2772
2775
|
style: {
|
|
2773
2776
|
background: "var(--t-surface)",
|
|
2774
2777
|
borderRadius: 5,
|
|
2775
|
-
border:
|
|
2778
|
+
border: xe && lt ? "1px solid #EF4444" : "1px solid transparent",
|
|
2776
2779
|
minHeight: 102
|
|
2777
2780
|
},
|
|
2778
2781
|
children: [
|
|
@@ -2784,13 +2787,13 @@ function Vn({
|
|
|
2784
2787
|
ref: Q,
|
|
2785
2788
|
type: "text",
|
|
2786
2789
|
value: Ye,
|
|
2787
|
-
onChange:
|
|
2790
|
+
onChange: $t,
|
|
2788
2791
|
onBlur: () => ke(!0),
|
|
2789
2792
|
placeholder: K ? "250" : "0.01",
|
|
2790
2793
|
className: "bg-transparent outline-none w-0 flex-1 mr-3",
|
|
2791
2794
|
style: { color: "var(--t-text)", fontSize: 24, fontWeight: 600, lineHeight: "32px", padding: 0, border: "none", borderRadius: 0, backgroundColor: "transparent", height: "auto", width: 0 },
|
|
2792
2795
|
inputMode: "decimal",
|
|
2793
|
-
disabled: !!((
|
|
2796
|
+
disabled: !!((ht = k == null ? void 0 : k.sourceAmount) != null && ht.locked)
|
|
2794
2797
|
}
|
|
2795
2798
|
),
|
|
2796
2799
|
K ? /* @__PURE__ */ r(
|
|
@@ -2805,11 +2808,11 @@ function Vn({
|
|
|
2805
2808
|
paddingLeft: 10,
|
|
2806
2809
|
paddingRight: 10
|
|
2807
2810
|
},
|
|
2808
|
-
disabled: !!((
|
|
2811
|
+
disabled: !!((pt = k == null ? void 0 : k.sourceCurrency) != null && pt.locked),
|
|
2809
2812
|
children: [
|
|
2810
|
-
/* @__PURE__ */ e(nt, { currencyCode:
|
|
2811
|
-
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children:
|
|
2812
|
-
/* @__PURE__ */ e(
|
|
2813
|
+
/* @__PURE__ */ e(nt, { currencyCode: ie, size: 16, baseUrl: F }),
|
|
2814
|
+
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: ie }),
|
|
2815
|
+
/* @__PURE__ */ e(He, {})
|
|
2813
2816
|
]
|
|
2814
2817
|
}
|
|
2815
2818
|
) : /* @__PURE__ */ r("div", { className: "flex flex-col items-end shrink-0", children: [
|
|
@@ -2825,34 +2828,34 @@ function Vn({
|
|
|
2825
2828
|
paddingLeft: 10,
|
|
2826
2829
|
paddingRight: 10
|
|
2827
2830
|
},
|
|
2828
|
-
disabled: !!((
|
|
2831
|
+
disabled: !!((ft = k == null ? void 0 : k.destinationCurrency) != null && ft.locked),
|
|
2829
2832
|
children: [
|
|
2830
|
-
/* @__PURE__ */ e(
|
|
2833
|
+
/* @__PURE__ */ e(Rt, { ticker: j, size: 16, baseUrl: F }),
|
|
2831
2834
|
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: j }),
|
|
2832
|
-
/* @__PURE__ */ e(
|
|
2835
|
+
/* @__PURE__ */ e(He, {})
|
|
2833
2836
|
]
|
|
2834
2837
|
}
|
|
2835
2838
|
),
|
|
2836
|
-
|
|
2839
|
+
ce && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 mt-1.5 mr-0.5", children: [
|
|
2837
2840
|
/* @__PURE__ */ e("div", { className: "rounded-full", style: { width: 14, height: 14, background: "#ffffff" }, children: /* @__PURE__ */ e(
|
|
2838
2841
|
"img",
|
|
2839
2842
|
{
|
|
2840
|
-
src: tt(
|
|
2841
|
-
alt:
|
|
2843
|
+
src: tt(ce, F),
|
|
2844
|
+
alt: ce,
|
|
2842
2845
|
width: 14,
|
|
2843
2846
|
height: 14,
|
|
2844
2847
|
className: "rounded-full",
|
|
2845
2848
|
style: { width: 14, height: 14 }
|
|
2846
2849
|
}
|
|
2847
2850
|
) }),
|
|
2848
|
-
/* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children:
|
|
2851
|
+
/* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: ut })
|
|
2849
2852
|
] })
|
|
2850
2853
|
] })
|
|
2851
2854
|
] })
|
|
2852
2855
|
]
|
|
2853
2856
|
}
|
|
2854
2857
|
),
|
|
2855
|
-
|
|
2858
|
+
xe && lt && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 px-[2px]", style: { color: "#EF4444" }, children: fe || (rt ? "Amount should be more than 0" : K ? `Minimum amount is ${At} ${ie}` : `Minimum amount is ${St} ${j}`) }),
|
|
2856
2859
|
/* @__PURE__ */ r(
|
|
2857
2860
|
"div",
|
|
2858
2861
|
{
|
|
@@ -2869,13 +2872,13 @@ function Vn({
|
|
|
2869
2872
|
children: [
|
|
2870
2873
|
/* @__PURE__ */ e("div", { className: "text-[13px] mb-2.5", style: { color: "var(--t-text-secondary)" }, children: "You get" }),
|
|
2871
2874
|
/* @__PURE__ */ r("div", { className: "flex items-start justify-between", children: [
|
|
2872
|
-
|
|
2873
|
-
|
|
2875
|
+
pe && !L ? /* @__PURE__ */ e(M, { w: 180, h: 32 }) : /* @__PURE__ */ e(
|
|
2876
|
+
Hn,
|
|
2874
2877
|
{
|
|
2875
|
-
value:
|
|
2878
|
+
value: J > 0 ? _t : "0",
|
|
2876
2879
|
height: 32,
|
|
2877
2880
|
className: "font-semibold",
|
|
2878
|
-
style: { color:
|
|
2881
|
+
style: { color: J > 0 ? "var(--t-text)" : "var(--t-text-muted)", fontSize: 24 }
|
|
2879
2882
|
}
|
|
2880
2883
|
),
|
|
2881
2884
|
K ? /* @__PURE__ */ r("div", { className: "flex flex-col items-end shrink-0", children: [
|
|
@@ -2891,27 +2894,27 @@ function Vn({
|
|
|
2891
2894
|
paddingLeft: 10,
|
|
2892
2895
|
paddingRight: 10
|
|
2893
2896
|
},
|
|
2894
|
-
disabled: !!((
|
|
2897
|
+
disabled: !!((yt = k == null ? void 0 : k.destinationCurrency) != null && yt.locked),
|
|
2895
2898
|
children: [
|
|
2896
|
-
/* @__PURE__ */ e(
|
|
2899
|
+
/* @__PURE__ */ e(Rt, { ticker: j, size: 16, baseUrl: F }),
|
|
2897
2900
|
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: j }),
|
|
2898
|
-
/* @__PURE__ */ e(
|
|
2901
|
+
/* @__PURE__ */ e(He, {})
|
|
2899
2902
|
]
|
|
2900
2903
|
}
|
|
2901
2904
|
),
|
|
2902
|
-
|
|
2905
|
+
ce && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 mt-1.5 mr-0.5", children: [
|
|
2903
2906
|
/* @__PURE__ */ e("div", { className: "rounded-full", style: { width: 14, height: 14, background: "#ffffff" }, children: /* @__PURE__ */ e(
|
|
2904
2907
|
"img",
|
|
2905
2908
|
{
|
|
2906
|
-
src: tt(
|
|
2907
|
-
alt:
|
|
2909
|
+
src: tt(ce, F),
|
|
2910
|
+
alt: ce,
|
|
2908
2911
|
width: 14,
|
|
2909
2912
|
height: 14,
|
|
2910
2913
|
className: "rounded-full",
|
|
2911
2914
|
style: { width: 14, height: 14 }
|
|
2912
2915
|
}
|
|
2913
2916
|
) }),
|
|
2914
|
-
/* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children:
|
|
2917
|
+
/* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: ut })
|
|
2915
2918
|
] })
|
|
2916
2919
|
] }) : /* @__PURE__ */ r(
|
|
2917
2920
|
"button",
|
|
@@ -2925,11 +2928,11 @@ function Vn({
|
|
|
2925
2928
|
paddingLeft: 10,
|
|
2926
2929
|
paddingRight: 10
|
|
2927
2930
|
},
|
|
2928
|
-
disabled: !!((
|
|
2931
|
+
disabled: !!((xt = k == null ? void 0 : k.sourceCurrency) != null && xt.locked),
|
|
2929
2932
|
children: [
|
|
2930
|
-
/* @__PURE__ */ e(nt, { currencyCode:
|
|
2931
|
-
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children:
|
|
2932
|
-
/* @__PURE__ */ e(
|
|
2933
|
+
/* @__PURE__ */ e(nt, { currencyCode: ie, size: 16, baseUrl: F }),
|
|
2934
|
+
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: ie }),
|
|
2935
|
+
/* @__PURE__ */ e(He, {})
|
|
2933
2936
|
]
|
|
2934
2937
|
}
|
|
2935
2938
|
)
|
|
@@ -2937,7 +2940,7 @@ function Vn({
|
|
|
2937
2940
|
]
|
|
2938
2941
|
}
|
|
2939
2942
|
),
|
|
2940
|
-
|
|
2943
|
+
Be && J > 0 && (C == null ? void 0 : C.bestQuote) && /* @__PURE__ */ r(
|
|
2941
2944
|
"div",
|
|
2942
2945
|
{
|
|
2943
2946
|
className: "flex items-start gap-2 mt-[2px] px-[14px] py-[10px]",
|
|
@@ -2948,14 +2951,11 @@ function Vn({
|
|
|
2948
2951
|
/* @__PURE__ */ e("path", { d: "M8 7v4M8 5.5v-.01", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
2949
2952
|
] }),
|
|
2950
2953
|
/* @__PURE__ */ r("span", { children: [
|
|
2951
|
-
|
|
2952
|
-
rt,
|
|
2954
|
+
Ze,
|
|
2953
2955
|
" ",
|
|
2954
2956
|
j,
|
|
2955
|
-
", the rest up to ",
|
|
2956
|
-
Ze,
|
|
2957
2957
|
" will be credited to your ",
|
|
2958
|
-
|
|
2958
|
+
X,
|
|
2959
2959
|
" account"
|
|
2960
2960
|
] })
|
|
2961
2961
|
]
|
|
@@ -2967,13 +2967,13 @@ function Vn({
|
|
|
2967
2967
|
className: "flex items-center justify-between mt-[2px] px-[18px] pt-[12px] pb-[14px]",
|
|
2968
2968
|
style: {
|
|
2969
2969
|
background: "var(--t-surface)",
|
|
2970
|
-
...(
|
|
2970
|
+
...(gt = w == null ? void 0 : w.paymentMethods) != null && gt.length ? {} : { borderBottomLeftRadius: 5, borderBottomRightRadius: 5 }
|
|
2971
2971
|
},
|
|
2972
|
-
children: /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: x ? "var(--t-success)" : "var(--t-text-secondary)" }, children:
|
|
2972
|
+
children: /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: x ? "var(--t-success)" : "var(--t-text-secondary)" }, children: Vt || " " })
|
|
2973
2973
|
}
|
|
2974
2974
|
),
|
|
2975
2975
|
(w == null ? void 0 : w.paymentMethods) && w.paymentMethods.length > 0 && /* @__PURE__ */ e("div", { className: "mt-[2px]", children: /* @__PURE__ */ e(
|
|
2976
|
-
|
|
2976
|
+
Rn,
|
|
2977
2977
|
{
|
|
2978
2978
|
methods: w.paymentMethods,
|
|
2979
2979
|
selectedId: y.paymentMethodId,
|
|
@@ -3003,7 +3003,7 @@ function Vn({
|
|
|
3003
3003
|
fontSize: 13,
|
|
3004
3004
|
backgroundColor: "transparent"
|
|
3005
3005
|
},
|
|
3006
|
-
disabled: !!((
|
|
3006
|
+
disabled: !!((Ct = k == null ? void 0 : k.destinationAddress) != null && Ct.locked)
|
|
3007
3007
|
}
|
|
3008
3008
|
),
|
|
3009
3009
|
y.walletError ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: y.walletError }) : Le && !Qe && !Ie ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: "Enter a valid wallet address" }) : Ie && y.walletAddress.trim().length >= 10 ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "var(--t-text-muted)" }, children: "Validating address..." }) : null
|
|
@@ -3012,18 +3012,18 @@ function Vn({
|
|
|
3012
3012
|
/* @__PURE__ */ e(
|
|
3013
3013
|
"button",
|
|
3014
3014
|
{
|
|
3015
|
-
disabled: !Fe ||
|
|
3016
|
-
onClick:
|
|
3015
|
+
disabled: !Fe || te || L,
|
|
3016
|
+
onClick: Yt,
|
|
3017
3017
|
className: "w-full font-semibold text-[16px] transition-all",
|
|
3018
3018
|
style: {
|
|
3019
3019
|
height: 60,
|
|
3020
3020
|
borderRadius: 5,
|
|
3021
3021
|
background: "var(--t-cta-bg)",
|
|
3022
3022
|
color: "var(--t-cta-text)",
|
|
3023
|
-
opacity: Fe && !
|
|
3024
|
-
cursor: Fe && !
|
|
3023
|
+
opacity: Fe && !te && !L ? 1 : 0.4,
|
|
3024
|
+
cursor: Fe && !te && !L ? "pointer" : "not-allowed"
|
|
3025
3025
|
},
|
|
3026
|
-
children: L ? "Getting best price..." :
|
|
3026
|
+
children: L ? "Getting best price..." : te ? "Processing..." : K ? `Buy ${j}` : `Sell ${j}`
|
|
3027
3027
|
}
|
|
3028
3028
|
),
|
|
3029
3029
|
/* @__PURE__ */ e("div", { className: "text-center py-3", children: /* @__PURE__ */ e("span", { className: "text-[11px]", style: { color: "var(--t-text-tertiary)" }, children: "Powered by NowRamp" }) })
|
|
@@ -3031,14 +3031,14 @@ function Vn({
|
|
|
3031
3031
|
/* @__PURE__ */ e(Ve, { isOpen: $ === "fiat", onClose: () => Y(null), children: (g) => {
|
|
3032
3032
|
var A;
|
|
3033
3033
|
return /* @__PURE__ */ e(
|
|
3034
|
-
|
|
3034
|
+
Pn,
|
|
3035
3035
|
{
|
|
3036
3036
|
onClose: g,
|
|
3037
3037
|
onSelect: (R) => {
|
|
3038
|
-
|
|
3038
|
+
jt(R), g();
|
|
3039
3039
|
},
|
|
3040
3040
|
currencies: (A = w == null ? void 0 : w.fiats) == null ? void 0 : A.map((R) => ({ code: R.code, name: R.code })),
|
|
3041
|
-
assetBaseUrl:
|
|
3041
|
+
assetBaseUrl: F,
|
|
3042
3042
|
selectedCode: y.fiatCurrency
|
|
3043
3043
|
}
|
|
3044
3044
|
);
|
|
@@ -3046,21 +3046,21 @@ function Vn({
|
|
|
3046
3046
|
/* @__PURE__ */ e(Ve, { isOpen: $ === "crypto", onClose: () => Y(null), children: (g) => {
|
|
3047
3047
|
var A;
|
|
3048
3048
|
return /* @__PURE__ */ e(
|
|
3049
|
-
|
|
3049
|
+
Un,
|
|
3050
3050
|
{
|
|
3051
3051
|
onClose: g,
|
|
3052
3052
|
onSelect: (R, H) => {
|
|
3053
|
-
|
|
3053
|
+
Wt(R, H), g();
|
|
3054
3054
|
},
|
|
3055
3055
|
cryptos: (A = w == null ? void 0 : w.cryptos) == null ? void 0 : A.map((R) => {
|
|
3056
3056
|
var H;
|
|
3057
3057
|
return {
|
|
3058
3058
|
code: R.code,
|
|
3059
3059
|
name: R.code,
|
|
3060
|
-
networks: (H = R.networks) == null ? void 0 : H.map((
|
|
3060
|
+
networks: (H = R.networks) == null ? void 0 : H.map((me) => ({ code: me.id, name: me.name }))
|
|
3061
3061
|
};
|
|
3062
3062
|
}),
|
|
3063
|
-
assetBaseUrl:
|
|
3063
|
+
assetBaseUrl: F,
|
|
3064
3064
|
selectedCode: y.cryptoCurrency,
|
|
3065
3065
|
selectedChain: y.network
|
|
3066
3066
|
}
|
|
@@ -3069,24 +3069,24 @@ function Vn({
|
|
|
3069
3069
|
/* @__PURE__ */ e(Ve, { isOpen: $ === "payment", onClose: () => Y(null), children: (g) => {
|
|
3070
3070
|
var A;
|
|
3071
3071
|
return /* @__PURE__ */ e(
|
|
3072
|
-
|
|
3072
|
+
Fn,
|
|
3073
3073
|
{
|
|
3074
3074
|
methods: ((A = w == null ? void 0 : w.paymentMethods) == null ? void 0 : A.filter((R) => R.supportedFiats.includes(y.fiatCurrency))) || [],
|
|
3075
3075
|
selectedId: y.paymentMethodId,
|
|
3076
3076
|
onSelect: (R) => {
|
|
3077
|
-
|
|
3077
|
+
Gt(R), g();
|
|
3078
3078
|
},
|
|
3079
3079
|
onClose: g
|
|
3080
3080
|
}
|
|
3081
3081
|
);
|
|
3082
3082
|
} }),
|
|
3083
3083
|
/* @__PURE__ */ e(Ve, { isOpen: $ === "settings", onClose: () => Y(null), children: (g) => /* @__PURE__ */ e(
|
|
3084
|
-
|
|
3084
|
+
Vn,
|
|
3085
3085
|
{
|
|
3086
3086
|
onClose: g,
|
|
3087
|
-
darkMode:
|
|
3088
|
-
onToggleDarkMode:
|
|
3089
|
-
skinId:
|
|
3087
|
+
darkMode: le,
|
|
3088
|
+
onToggleDarkMode: ue,
|
|
3089
|
+
skinId: ye,
|
|
3090
3090
|
onSelectSkin: (A) => {
|
|
3091
3091
|
We(A);
|
|
3092
3092
|
},
|
|
@@ -3097,15 +3097,15 @@ function Vn({
|
|
|
3097
3097
|
}
|
|
3098
3098
|
);
|
|
3099
3099
|
}
|
|
3100
|
-
function
|
|
3100
|
+
function $n({
|
|
3101
3101
|
projectId: t,
|
|
3102
3102
|
apiUrl: n,
|
|
3103
3103
|
assetBaseUrl: a,
|
|
3104
3104
|
flowType: o,
|
|
3105
3105
|
customerId: l,
|
|
3106
|
-
brandId:
|
|
3106
|
+
brandId: c,
|
|
3107
3107
|
defaultFiatCurrency: m,
|
|
3108
|
-
defaultCryptoCurrency:
|
|
3108
|
+
defaultCryptoCurrency: s,
|
|
3109
3109
|
defaultNetwork: d,
|
|
3110
3110
|
defaultFiatAmount: p,
|
|
3111
3111
|
defaultCryptoAmount: h,
|
|
@@ -3115,42 +3115,42 @@ function Xn({
|
|
|
3115
3115
|
statusPollInterval: E,
|
|
3116
3116
|
onComplete: v,
|
|
3117
3117
|
onError: S,
|
|
3118
|
-
className:
|
|
3119
|
-
theme:
|
|
3120
|
-
skinId:
|
|
3121
|
-
accentColor:
|
|
3122
|
-
bgColor:
|
|
3123
|
-
bgImage:
|
|
3124
|
-
borderColor:
|
|
3118
|
+
className: P,
|
|
3119
|
+
theme: V,
|
|
3120
|
+
skinId: U,
|
|
3121
|
+
accentColor: G,
|
|
3122
|
+
bgColor: z,
|
|
3123
|
+
bgImage: X,
|
|
3124
|
+
borderColor: de,
|
|
3125
3125
|
borderRadius: y,
|
|
3126
3126
|
surfaceColor: i,
|
|
3127
3127
|
inputBgColor: w,
|
|
3128
3128
|
textColor: O,
|
|
3129
3129
|
textSecondaryColor: C,
|
|
3130
|
-
textMutedColor:
|
|
3131
|
-
successColor:
|
|
3132
|
-
showFlowToggle:
|
|
3130
|
+
textMutedColor: pe,
|
|
3131
|
+
successColor: oe,
|
|
3132
|
+
showFlowToggle: ee,
|
|
3133
3133
|
showSettings: be,
|
|
3134
|
-
showThemeToggle:
|
|
3135
|
-
autoRedirect:
|
|
3134
|
+
showThemeToggle: te,
|
|
3135
|
+
autoRedirect: fe,
|
|
3136
3136
|
explorerUrl: k,
|
|
3137
3137
|
doneButtonText: Ne,
|
|
3138
|
-
supportEmail:
|
|
3139
|
-
stablecoinParity:
|
|
3140
|
-
partnerName:
|
|
3141
|
-
onDone:
|
|
3138
|
+
supportEmail: F,
|
|
3139
|
+
stablecoinParity: le,
|
|
3140
|
+
partnerName: ue,
|
|
3141
|
+
onDone: ye
|
|
3142
3142
|
}) {
|
|
3143
3143
|
return /* @__PURE__ */ e(
|
|
3144
|
-
|
|
3144
|
+
on,
|
|
3145
3145
|
{
|
|
3146
3146
|
projectId: t,
|
|
3147
3147
|
apiUrl: n,
|
|
3148
3148
|
assetBaseUrl: a,
|
|
3149
3149
|
flowType: o,
|
|
3150
3150
|
customerId: l,
|
|
3151
|
-
brandId:
|
|
3151
|
+
brandId: c,
|
|
3152
3152
|
defaultFiatCurrency: m,
|
|
3153
|
-
defaultCryptoCurrency:
|
|
3153
|
+
defaultCryptoCurrency: s,
|
|
3154
3154
|
defaultNetwork: d,
|
|
3155
3155
|
defaultFiatAmount: p,
|
|
3156
3156
|
defaultCryptoAmount: h,
|
|
@@ -3161,52 +3161,52 @@ function Xn({
|
|
|
3161
3161
|
onComplete: v,
|
|
3162
3162
|
onError: S,
|
|
3163
3163
|
children: /* @__PURE__ */ e(
|
|
3164
|
-
|
|
3164
|
+
Xn,
|
|
3165
3165
|
{
|
|
3166
|
-
className:
|
|
3167
|
-
theme:
|
|
3168
|
-
skinId:
|
|
3169
|
-
accentColor:
|
|
3170
|
-
bgColor:
|
|
3171
|
-
bgImage:
|
|
3172
|
-
borderColor:
|
|
3166
|
+
className: P,
|
|
3167
|
+
theme: V,
|
|
3168
|
+
skinId: U,
|
|
3169
|
+
accentColor: G,
|
|
3170
|
+
bgColor: z,
|
|
3171
|
+
bgImage: X,
|
|
3172
|
+
borderColor: de,
|
|
3173
3173
|
borderRadius: y,
|
|
3174
3174
|
surfaceColor: i,
|
|
3175
3175
|
inputBgColor: w,
|
|
3176
3176
|
textColor: O,
|
|
3177
3177
|
textSecondaryColor: C,
|
|
3178
|
-
textMutedColor:
|
|
3179
|
-
successColor:
|
|
3180
|
-
showFlowToggle:
|
|
3178
|
+
textMutedColor: pe,
|
|
3179
|
+
successColor: oe,
|
|
3180
|
+
showFlowToggle: ee,
|
|
3181
3181
|
showSettings: be,
|
|
3182
|
-
showThemeToggle:
|
|
3183
|
-
autoRedirect:
|
|
3182
|
+
showThemeToggle: te,
|
|
3183
|
+
autoRedirect: fe,
|
|
3184
3184
|
explorerUrl: k,
|
|
3185
3185
|
doneButtonText: Ne,
|
|
3186
|
-
supportEmail:
|
|
3187
|
-
stablecoinParity:
|
|
3188
|
-
partnerName:
|
|
3189
|
-
onDone:
|
|
3186
|
+
supportEmail: F,
|
|
3187
|
+
stablecoinParity: le,
|
|
3188
|
+
partnerName: ue,
|
|
3189
|
+
onDone: ye
|
|
3190
3190
|
}
|
|
3191
3191
|
)
|
|
3192
3192
|
}
|
|
3193
3193
|
);
|
|
3194
3194
|
}
|
|
3195
|
-
function
|
|
3195
|
+
function ta({
|
|
3196
3196
|
submitButtonText: t,
|
|
3197
3197
|
rateRefreshInterval: n,
|
|
3198
3198
|
...a
|
|
3199
3199
|
}) {
|
|
3200
|
-
return /* @__PURE__ */ e(
|
|
3200
|
+
return /* @__PURE__ */ e($n, { ...a });
|
|
3201
3201
|
}
|
|
3202
|
-
function
|
|
3202
|
+
function na({
|
|
3203
3203
|
skin: t,
|
|
3204
3204
|
active: n,
|
|
3205
3205
|
onClick: a,
|
|
3206
3206
|
darkMode: o,
|
|
3207
3207
|
dimmed: l
|
|
3208
3208
|
}) {
|
|
3209
|
-
const
|
|
3209
|
+
const c = t.accent === null, m = 32;
|
|
3210
3210
|
return /* @__PURE__ */ r(
|
|
3211
3211
|
"button",
|
|
3212
3212
|
{
|
|
@@ -3214,7 +3214,7 @@ function ta({
|
|
|
3214
3214
|
className: "relative shrink-0",
|
|
3215
3215
|
style: { width: m, height: m, opacity: l ? 0.4 : 1, transition: "opacity 0.2s" },
|
|
3216
3216
|
children: [
|
|
3217
|
-
|
|
3217
|
+
c ? /* @__PURE__ */ r("svg", { width: m, height: m, viewBox: "0 0 32 32", children: [
|
|
3218
3218
|
/* @__PURE__ */ e("clipPath", { id: "mono-left", children: /* @__PURE__ */ e("rect", { x: "0", y: "0", width: "16", height: "32" }) }),
|
|
3219
3219
|
/* @__PURE__ */ e("clipPath", { id: "mono-right", children: /* @__PURE__ */ e("rect", { x: "16", y: "0", width: "16", height: "32" }) }),
|
|
3220
3220
|
/* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "15", fill: "#111111", clipPath: "url(#mono-left)" }),
|
|
@@ -3232,13 +3232,13 @@ function ta({
|
|
|
3232
3232
|
}
|
|
3233
3233
|
);
|
|
3234
3234
|
}
|
|
3235
|
-
function
|
|
3235
|
+
function jn({ quote: t }) {
|
|
3236
3236
|
return t.isBestRate ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Best price" }) : t.isRecommended ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Recommended" }) : t.rank && t.rank <= 3 ? /* @__PURE__ */ r("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: [
|
|
3237
3237
|
"#",
|
|
3238
3238
|
t.rank
|
|
3239
3239
|
] }) : null;
|
|
3240
3240
|
}
|
|
3241
|
-
function
|
|
3241
|
+
function Wn({ quote: t }) {
|
|
3242
3242
|
return t.gatewayLogo ? /* @__PURE__ */ e(
|
|
3243
3243
|
"img",
|
|
3244
3244
|
{
|
|
@@ -3251,7 +3251,7 @@ function jn({ quote: t }) {
|
|
|
3251
3251
|
}
|
|
3252
3252
|
) : /* @__PURE__ */ e(at, { size: 36 });
|
|
3253
3253
|
}
|
|
3254
|
-
function
|
|
3254
|
+
function Gn() {
|
|
3255
3255
|
return /* @__PURE__ */ e("div", { className: "space-y-2", children: [0, 1, 2].map((t) => /* @__PURE__ */ r(
|
|
3256
3256
|
"div",
|
|
3257
3257
|
{
|
|
@@ -3278,20 +3278,20 @@ function Wn() {
|
|
|
3278
3278
|
t
|
|
3279
3279
|
)) });
|
|
3280
3280
|
}
|
|
3281
|
-
function
|
|
3281
|
+
function aa({
|
|
3282
3282
|
onClose: t,
|
|
3283
3283
|
onSelect: n,
|
|
3284
3284
|
quotes: a,
|
|
3285
3285
|
quotesLoading: o,
|
|
3286
3286
|
cryptoCurrency: l
|
|
3287
3287
|
}) {
|
|
3288
|
-
const [
|
|
3288
|
+
const [c, m] = b(""), s = W(() => {
|
|
3289
3289
|
if (!(a != null && a.quotes)) return [];
|
|
3290
|
-
const d =
|
|
3290
|
+
const d = c.trim().toLowerCase();
|
|
3291
3291
|
return d ? a.quotes.filter((p) => p.gatewayName.toLowerCase().includes(d)) : a.quotes;
|
|
3292
|
-
}, [a,
|
|
3293
|
-
return /* @__PURE__ */ r(
|
|
3294
|
-
/* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(
|
|
3292
|
+
}, [a, c]);
|
|
3293
|
+
return /* @__PURE__ */ r(re, { children: [
|
|
3294
|
+
/* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(De, { onClick: t }) }),
|
|
3295
3295
|
/* @__PURE__ */ e(
|
|
3296
3296
|
"h2",
|
|
3297
3297
|
{
|
|
@@ -3300,9 +3300,9 @@ function na({
|
|
|
3300
3300
|
children: "Choose Ramp"
|
|
3301
3301
|
}
|
|
3302
3302
|
),
|
|
3303
|
-
/* @__PURE__ */ e(je, { value:
|
|
3303
|
+
/* @__PURE__ */ e(je, { value: c, onChange: m }),
|
|
3304
3304
|
/* @__PURE__ */ r("div", { className: "flex-1 overflow-y-auto custom-scroll px-5 space-y-2", children: [
|
|
3305
|
-
o ? /* @__PURE__ */ e(
|
|
3305
|
+
o ? /* @__PURE__ */ e(Gn, {}) : s.length === 0 ? /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: a && a.quotes.length === 0 ? "No quotes available for this request" : "No providers found" }) : s.map((d, p) => {
|
|
3306
3306
|
const h = p === 0, u = parseFloat(d.cryptoAmount), f = u >= 1 ? u.toFixed(4) : u.toPrecision(6);
|
|
3307
3307
|
return /* @__PURE__ */ r(
|
|
3308
3308
|
"button",
|
|
@@ -3318,10 +3318,10 @@ function na({
|
|
|
3318
3318
|
background: h ? "transparent" : "var(--t-surface)"
|
|
3319
3319
|
},
|
|
3320
3320
|
children: [
|
|
3321
|
-
/* @__PURE__ */ e(
|
|
3321
|
+
/* @__PURE__ */ e(Wn, { quote: d }),
|
|
3322
3322
|
/* @__PURE__ */ r("div", { className: "text-left flex-1 min-w-0", children: [
|
|
3323
3323
|
/* @__PURE__ */ e("div", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: d.gatewayName }),
|
|
3324
|
-
/* @__PURE__ */ e(
|
|
3324
|
+
/* @__PURE__ */ e(jn, { quote: d })
|
|
3325
3325
|
] }),
|
|
3326
3326
|
/* @__PURE__ */ r("div", { className: "text-right shrink-0", children: [
|
|
3327
3327
|
/* @__PURE__ */ e("div", { className: "text-[11px]", style: { color: "var(--t-text-secondary)" }, children: "You get" }),
|
|
@@ -3352,61 +3352,61 @@ function na({
|
|
|
3352
3352
|
] });
|
|
3353
3353
|
}
|
|
3354
3354
|
export {
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3355
|
+
On as AnimatedDigit,
|
|
3356
|
+
Hn as AnimatedNumber,
|
|
3357
|
+
fn as ApplePayIcon,
|
|
3358
|
+
Oe as BLOCKCHAINS,
|
|
3359
|
+
hn as BankIcon,
|
|
3360
|
+
mn as CRYPTO_CHAIN_COMBOS,
|
|
3361
|
+
Mt as CRYPTO_CURRENCIES,
|
|
3362
|
+
vn as CardIcon,
|
|
3363
|
+
ta as CheckoutForm,
|
|
3364
|
+
Tn as CheckoutStep,
|
|
3365
|
+
He as ChevronDown,
|
|
3366
|
+
bn as ChevronRight,
|
|
3367
|
+
aa as ChooseRampModal,
|
|
3368
|
+
De as CloseButton,
|
|
3369
|
+
ea as CoinifyIcon,
|
|
3370
|
+
In as CompleteStep,
|
|
3371
|
+
Bn as ConfirmStep,
|
|
3372
|
+
Un as CryptoCurrencyModal,
|
|
3373
|
+
Rt as CryptoIcon,
|
|
3374
|
+
En as DarkModeIcon,
|
|
3375
|
+
Mn as ErrorStep,
|
|
3376
|
+
Nt as FIAT_CURRENCIES,
|
|
3377
|
+
cn as FIAT_TO_COUNTRY,
|
|
3378
|
+
Pn as FiatCurrencyModal,
|
|
3379
3379
|
nt as FiatFlag,
|
|
3380
|
-
|
|
3380
|
+
Dn as FormSkeleton,
|
|
3381
3381
|
at as GenericCoinIcon,
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3382
|
+
yn as GooglePayIcon,
|
|
3383
|
+
wt as MOCK_RATES,
|
|
3384
|
+
Nn as MenuIcon,
|
|
3385
3385
|
Ve as Modal,
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3386
|
+
xn as PayPalIcon,
|
|
3387
|
+
Rn as PaymentMethodSelector,
|
|
3388
|
+
Ln as ProcessingStep,
|
|
3389
|
+
$n as RampForm,
|
|
3390
|
+
on as RampProvider,
|
|
3391
|
+
pn as RevolutIcon,
|
|
3392
|
+
Et as SKINS,
|
|
3393
3393
|
je as SearchInput,
|
|
3394
|
-
|
|
3394
|
+
Vn as SettingsScreen,
|
|
3395
3395
|
M as Skeleton,
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3396
|
+
na as SkinSwatch,
|
|
3397
|
+
Kn as ToggleSwitch,
|
|
3398
|
+
Ht as formatOutput,
|
|
3399
3399
|
tt as getChainIconUrl,
|
|
3400
|
-
|
|
3400
|
+
Bt as getCryptoIconUrl,
|
|
3401
3401
|
sn as getFiatFlagUrl,
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3402
|
+
qn as getMockRate,
|
|
3403
|
+
wn as getPaymentIcon,
|
|
3404
|
+
Ot as isStablecoin,
|
|
3405
|
+
un as parseAmount,
|
|
3406
|
+
nn as useCheckoutIntent,
|
|
3407
|
+
tn as useQuotes,
|
|
3408
3408
|
Te as useRamp,
|
|
3409
|
-
|
|
3410
|
-
|
|
3409
|
+
en as useRampConfig,
|
|
3410
|
+
an as useTransaction
|
|
3411
3411
|
};
|
|
3412
3412
|
//# sourceMappingURL=index.js.map
|