@nowramp/form 0.2.0-beta.8 → 0.2.0-beta.9
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 +345 -344
- 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,11 +8,11 @@
|
|
|
8
8
|
}`;
|
|
9
9
|
document.head.appendChild(s);
|
|
10
10
|
})();
|
|
11
|
-
import { jsx as e, jsxs as l, Fragment as
|
|
12
|
-
import Ce, { useState as b, useRef as M, useCallback as P, useEffect as H, useMemo as _, useReducer as
|
|
11
|
+
import { jsx as e, jsxs as l, Fragment as Y } from "react/jsx-runtime";
|
|
12
|
+
import Ce, { useState as b, useRef as M, useCallback as P, useEffect as H, useMemo as _, useReducer as qa, useContext as ga, createContext as xa } from "react";
|
|
13
13
|
import { RampApi as ft } from "@nowramp/sdk";
|
|
14
14
|
import { createPortal as ia } from "react-dom";
|
|
15
|
-
function
|
|
15
|
+
function en(t, a, n) {
|
|
16
16
|
const [r, o] = b(null), [s, u] = b(!0), [c, d] = b(null), i = M(null);
|
|
17
17
|
(!i.current || i.current !== t) && (i.current = new ft({ apiKey: "", ...t }));
|
|
18
18
|
const h = P(async () => {
|
|
@@ -36,7 +36,7 @@ function qa(t, a, n) {
|
|
|
36
36
|
h();
|
|
37
37
|
}, [h]), { config: r, loading: s, error: c, refetch: h };
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function tn(t, a) {
|
|
40
40
|
const [n, r] = b(null), [o, s] = b(!1), [u, c] = b(null), d = M(null), i = M(""), h = `${t.apiUrl}|${t.projectId}`;
|
|
41
41
|
(!d.current || i.current !== h) && (d.current = new ft({ apiKey: "", ...t }), i.current = h);
|
|
42
42
|
const p = M(0);
|
|
@@ -70,7 +70,7 @@ function en(t, a) {
|
|
|
70
70
|
}, [t.projectId, a]);
|
|
71
71
|
return { quotes: n, loading: o, error: u, refetch: f };
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function an(t) {
|
|
74
74
|
const [a, n] = b(null), [r, o] = b(!1), [s, u] = b(null), c = M(null), d = M(""), i = `${t.apiUrl}|${t.projectId}`;
|
|
75
75
|
(!c.current || d.current !== i) && (c.current = new ft({ apiKey: "", ...t }), d.current = i);
|
|
76
76
|
const h = P(async (f) => {
|
|
@@ -89,7 +89,7 @@ function tn(t) {
|
|
|
89
89
|
}, []);
|
|
90
90
|
return { order: a, loading: r, error: s, createOrder: h, reset: p };
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function nn(t, a, n) {
|
|
93
93
|
const [r, o] = b(null), [s, u] = b(!1), [c, d] = b(null), i = M(null);
|
|
94
94
|
i.current || (i.current = new ft({ apiKey: "", projectId: "", ...t }));
|
|
95
95
|
const h = P(async () => {
|
|
@@ -324,10 +324,10 @@ const yt = !0;
|
|
|
324
324
|
function Ht(t, a, n = yt) {
|
|
325
325
|
return t === void 0 || a === void 0 ? n : t.length === 0 || a.length === 0 ? !1 : t.some((r) => a.includes(r));
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function rn(t, a, n = yt) {
|
|
328
328
|
return t.filter((r) => Ht(r.providers, a, n));
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function on(t, a, n = yt) {
|
|
331
331
|
const r = [];
|
|
332
332
|
for (const o of t) {
|
|
333
333
|
const s = o.networks.filter(
|
|
@@ -339,12 +339,12 @@ function rn(t, a, n = yt) {
|
|
|
339
339
|
}
|
|
340
340
|
return r;
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function ln(t, a, n, r = yt) {
|
|
343
343
|
return n ? t.filter(
|
|
344
344
|
(o) => o.supportedFiats.includes(n) && Ht(o.providers, a, r)
|
|
345
345
|
) : [];
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function cn(t, a, n) {
|
|
348
348
|
const r = {};
|
|
349
349
|
let o = !1;
|
|
350
350
|
if (!n.cryptoLocked && !n.networkLocked) {
|
|
@@ -388,7 +388,7 @@ function ln(t, a, n) {
|
|
|
388
388
|
}
|
|
389
389
|
return o ? r : null;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function sn(t, a, n, r) {
|
|
392
392
|
var o, s, u;
|
|
393
393
|
if (n.cryptoLocked) {
|
|
394
394
|
const c = (o = t.cryptos) == null ? void 0 : o.find(
|
|
@@ -417,23 +417,23 @@ function la(t, a) {
|
|
|
417
417
|
let r = t;
|
|
418
418
|
return r.length - n - 1 > a && (r = r.slice(0, n + a + 1)), r = r.replace(/0+$/, "").replace(/\.$/, ""), r;
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function dn(t, a, n) {
|
|
421
421
|
return !t && !!a && !a.bestQuote && !!n;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function un(t, a) {
|
|
424
424
|
if (!t.length) return null;
|
|
425
425
|
if (a) {
|
|
426
426
|
const r = t.find((o) => o.gatewayId === a);
|
|
427
427
|
if (r != null && r.reason) return r.reason;
|
|
428
428
|
}
|
|
429
|
-
const n = t.map((r, o) => ({ reason: r.reason, score: r.reason ?
|
|
429
|
+
const n = t.map((r, o) => ({ reason: r.reason, score: r.reason ? mn(r.reason) : 99, idx: o })).filter((r) => r.reason);
|
|
430
430
|
return n.length ? (n.sort((r, o) => r.score - o.score || r.idx - o.idx), n[0].reason) : null;
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function mn(t) {
|
|
433
433
|
const a = t.toLowerCase();
|
|
434
434
|
return /amount|out of range for|minimum|maximum/.test(a) ? 1 : /currency|pair|network|chain/.test(a) ? 2 : /country|region|location/.test(a) ? 3 : /does not support|unsupported/.test(a) ? 4 : 5;
|
|
435
435
|
}
|
|
436
|
-
const
|
|
436
|
+
const pn = ["completed", "failed", "cancelled", "expired", "refunded"], va = {
|
|
437
437
|
step: "amount",
|
|
438
438
|
flowType: "buy",
|
|
439
439
|
fiatCurrency: "USD",
|
|
@@ -452,7 +452,7 @@ const mn = ["completed", "failed", "cancelled", "expired", "refunded"], xa = {
|
|
|
452
452
|
countrySource: "",
|
|
453
453
|
errorMessage: null
|
|
454
454
|
};
|
|
455
|
-
function
|
|
455
|
+
function hn(t, a) {
|
|
456
456
|
var n, r, o, s, u, c, d, i;
|
|
457
457
|
switch (a.type) {
|
|
458
458
|
case "SET_STEP":
|
|
@@ -508,13 +508,13 @@ function pn(t, a) {
|
|
|
508
508
|
case "CLEAR_ERROR":
|
|
509
509
|
return { ...t, errorMessage: null };
|
|
510
510
|
case "RESET":
|
|
511
|
-
return
|
|
511
|
+
return va;
|
|
512
512
|
default:
|
|
513
513
|
return t;
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
const
|
|
517
|
-
function
|
|
516
|
+
const Ca = xa(null);
|
|
517
|
+
function fn(t) {
|
|
518
518
|
const a = M(t.defaultFiatCurrency !== void 0), {
|
|
519
519
|
projectId: n,
|
|
520
520
|
apiUrl: r = "https://api.nowramp.com",
|
|
@@ -533,11 +533,11 @@ function hn(t) {
|
|
|
533
533
|
fieldLocks: y,
|
|
534
534
|
partnerMetadata: E,
|
|
535
535
|
statusPollInterval: V = 5e3,
|
|
536
|
-
onComplete:
|
|
536
|
+
onComplete: X,
|
|
537
537
|
onError: z,
|
|
538
538
|
children: ie
|
|
539
|
-
} = t, J = _(() => ({ apiUrl: r, projectId: n }), [r, n]), ee = h || (i === "BTC" ? "bitcoin" : i ? i.toLowerCase() : ""), ge = s === "sell", te = ge ? !!f : !!p, S = (ge ? !!(te && i && ee) : !!(te && i && ee && g)) && k ? "confirm" : "amount", D = p || (s === "buy" ? "250" : ""), [m, I] =
|
|
540
|
-
...
|
|
539
|
+
} = t, J = _(() => ({ apiUrl: r, projectId: n }), [r, n]), ee = h || (i === "BTC" ? "bitcoin" : i ? i.toLowerCase() : ""), ge = s === "sell", te = ge ? !!f : !!p, S = (ge ? !!(te && i && ee) : !!(te && i && ee && g)) && k ? "confirm" : "amount", D = p || (s === "buy" ? "250" : ""), [m, I] = qa(hn, {
|
|
540
|
+
...va,
|
|
541
541
|
step: S,
|
|
542
542
|
flowType: s,
|
|
543
543
|
fiatCurrency: d,
|
|
@@ -553,7 +553,7 @@ function hn(t) {
|
|
|
553
553
|
config: w,
|
|
554
554
|
loading: ae,
|
|
555
555
|
error: me
|
|
556
|
-
} =
|
|
556
|
+
} = en(J, m.flowType, m.country || void 0), ke = M(!1);
|
|
557
557
|
Ce.useEffect(() => {
|
|
558
558
|
var F, U;
|
|
559
559
|
if (ke.current || !(w != null && w.detectedCountry) || m.country) return;
|
|
@@ -602,9 +602,9 @@ function hn(t) {
|
|
|
602
602
|
Z ? A = Z.providers : A = [];
|
|
603
603
|
}
|
|
604
604
|
return {
|
|
605
|
-
availableFiats:
|
|
606
|
-
availableCryptos:
|
|
607
|
-
availablePaymentMethods:
|
|
605
|
+
availableFiats: rn(w.fiats ?? [], v),
|
|
606
|
+
availableCryptos: on(w.cryptos ?? [], A),
|
|
607
|
+
availablePaymentMethods: ln(
|
|
608
608
|
w.paymentMethods ?? [],
|
|
609
609
|
v,
|
|
610
610
|
m.fiatCurrency
|
|
@@ -612,7 +612,7 @@ function hn(t) {
|
|
|
612
612
|
};
|
|
613
613
|
}, [w, m.cryptoCurrency, m.network, m.fiatCurrency]), $e = _(() => {
|
|
614
614
|
var v, A, T;
|
|
615
|
-
return ae || !w ? !1 :
|
|
615
|
+
return ae || !w ? !1 : sn(
|
|
616
616
|
w,
|
|
617
617
|
{ cryptoCurrency: m.cryptoCurrency, network: m.network, fiatCurrency: m.fiatCurrency },
|
|
618
618
|
{
|
|
@@ -636,7 +636,7 @@ function hn(t) {
|
|
|
636
636
|
Ce.useEffect(() => {
|
|
637
637
|
var A, T, F;
|
|
638
638
|
if (ae || ce.length === 0 && q.length === 0) return;
|
|
639
|
-
const v =
|
|
639
|
+
const v = cn(
|
|
640
640
|
{
|
|
641
641
|
cryptoCurrency: m.cryptoCurrency,
|
|
642
642
|
network: m.network,
|
|
@@ -692,7 +692,7 @@ function hn(t) {
|
|
|
692
692
|
loading: He,
|
|
693
693
|
error: Qe,
|
|
694
694
|
refetch: gt
|
|
695
|
-
} =
|
|
695
|
+
} = tn(J, he), se = dn(He, j, he), Pe = M(!1);
|
|
696
696
|
Ce.useEffect(() => {
|
|
697
697
|
var v;
|
|
698
698
|
Pe.current || m.countrySource === "auto" && ((v = y == null ? void 0 : y.sourceCurrency) != null && v.locked || a.current || He || !he || Qe || !j || j.bestQuote || m.fiatCurrency !== "USD" && (Pe.current = !0, I({ type: "SET_FIAT_CURRENCY", currency: "USD" }), I({ type: "SET_FIAT_AMOUNT", amount: "250" })));
|
|
@@ -702,24 +702,24 @@ function hn(t) {
|
|
|
702
702
|
loading: xt,
|
|
703
703
|
error: ue,
|
|
704
704
|
createOrder: W
|
|
705
|
-
} =
|
|
705
|
+
} = an(J), it = 15e3, {
|
|
706
706
|
status: G,
|
|
707
707
|
loading: vt
|
|
708
|
-
} =
|
|
708
|
+
} = nn(
|
|
709
709
|
{ apiUrl: r },
|
|
710
710
|
(Ee == null ? void 0 : Ee.orderId) ?? null,
|
|
711
711
|
{ pollInterval: V, initialDelay: it }
|
|
712
712
|
), ze = M(null);
|
|
713
713
|
Ce.useEffect(() => {
|
|
714
|
-
!(G != null && G.status) || !
|
|
715
|
-
}, [G == null ? void 0 : G.status, G == null ? void 0 : G.orderId,
|
|
714
|
+
!(G != null && G.status) || !X || pn.includes(G.status) && ze.current !== G.orderId && (ze.current = G.orderId, X(G));
|
|
715
|
+
}, [G == null ? void 0 : G.status, G == null ? void 0 : G.orderId, X]), Ce.useEffect(() => {
|
|
716
716
|
const v = me || ue;
|
|
717
717
|
v && z && z(v);
|
|
718
718
|
}, [me, ue, z]);
|
|
719
719
|
const Re = k || (w == null ? void 0 : w.defaultGateway) || null, lt = _(() => {
|
|
720
720
|
if (!se || !(j != null && j.unavailableGateways)) return null;
|
|
721
721
|
const v = j.preferredGatewayId || Re;
|
|
722
|
-
return
|
|
722
|
+
return un(j.unavailableGateways, v);
|
|
723
723
|
}, [se, j, Re]), Oe = M(Re);
|
|
724
724
|
Oe.current = Re;
|
|
725
725
|
const Je = M(j);
|
|
@@ -803,10 +803,10 @@ function hn(t) {
|
|
|
803
803
|
goBack: Ct,
|
|
804
804
|
canProceed: bt
|
|
805
805
|
};
|
|
806
|
-
return /* @__PURE__ */ e(
|
|
806
|
+
return /* @__PURE__ */ e(Ca.Provider, { value: ct, children: ie });
|
|
807
807
|
}
|
|
808
|
-
function
|
|
809
|
-
const t =
|
|
808
|
+
function Ye() {
|
|
809
|
+
const t = ga(Ca);
|
|
810
810
|
if (!t)
|
|
811
811
|
throw new Error("useRamp must be used within a RampProvider");
|
|
812
812
|
return t;
|
|
@@ -1040,7 +1040,7 @@ const ot = {
|
|
|
1040
1040
|
{ code: "gu", name: "ગુજરાતી", english: "Gujarati" },
|
|
1041
1041
|
{ code: "kn", name: "ಕನ್ನಡ", english: "Kannada" },
|
|
1042
1042
|
{ code: "ml", name: "മലയാളം", english: "Malayalam" }
|
|
1043
|
-
],
|
|
1043
|
+
], ba = xa(null), ca = {
|
|
1044
1044
|
en: () => Promise.resolve({ default: ot }),
|
|
1045
1045
|
es: () => import("./es-BZoxhEOy.mjs"),
|
|
1046
1046
|
fr: () => import("./fr-BpkdqjbM.mjs"),
|
|
@@ -1086,13 +1086,13 @@ const ot = {
|
|
|
1086
1086
|
kn: () => import("./kn-BCDT2d-H.mjs"),
|
|
1087
1087
|
ml: () => import("./ml-CFfGYcpH.mjs")
|
|
1088
1088
|
}, Ie = { en: ot };
|
|
1089
|
-
function
|
|
1089
|
+
function Sa(t, a) {
|
|
1090
1090
|
return a ? t.replace(/\{(\w+)\}/g, (n, r) => {
|
|
1091
1091
|
const o = a[r];
|
|
1092
1092
|
return o !== void 0 ? String(o) : `{${r}}`;
|
|
1093
1093
|
}) : t;
|
|
1094
1094
|
}
|
|
1095
|
-
function
|
|
1095
|
+
function yn({
|
|
1096
1096
|
defaultLocale: t = "en",
|
|
1097
1097
|
children: a
|
|
1098
1098
|
}) {
|
|
@@ -1119,29 +1119,29 @@ function fn({
|
|
|
1119
1119
|
}, []), c = P(
|
|
1120
1120
|
(i, h) => {
|
|
1121
1121
|
const p = o[i] || ot[i] || i;
|
|
1122
|
-
return
|
|
1122
|
+
return Sa(p, h);
|
|
1123
1123
|
},
|
|
1124
1124
|
[o]
|
|
1125
1125
|
), d = _(
|
|
1126
1126
|
() => ({ locale: n, setLocale: u, t: c, languages: Ze }),
|
|
1127
1127
|
[n, u, c]
|
|
1128
1128
|
);
|
|
1129
|
-
return /* @__PURE__ */ e(
|
|
1129
|
+
return /* @__PURE__ */ e(ba.Provider, { value: d, children: a });
|
|
1130
1130
|
}
|
|
1131
1131
|
function Pt() {
|
|
1132
|
-
const t =
|
|
1132
|
+
const t = ga(ba);
|
|
1133
1133
|
return t || {
|
|
1134
1134
|
locale: "en",
|
|
1135
1135
|
setLocale: () => {
|
|
1136
1136
|
},
|
|
1137
|
-
t: (a, n) =>
|
|
1137
|
+
t: (a, n) => Sa(ot[a] || a, n),
|
|
1138
1138
|
languages: Ze
|
|
1139
1139
|
};
|
|
1140
1140
|
}
|
|
1141
1141
|
function O() {
|
|
1142
1142
|
return Pt().t;
|
|
1143
1143
|
}
|
|
1144
|
-
function
|
|
1144
|
+
function gn({
|
|
1145
1145
|
gatewayName: t,
|
|
1146
1146
|
checkoutUrl: a,
|
|
1147
1147
|
onCancel: n,
|
|
@@ -1229,13 +1229,13 @@ function Se({ size: t = 48 }) {
|
|
|
1229
1229
|
}
|
|
1230
1230
|
);
|
|
1231
1231
|
}
|
|
1232
|
-
function
|
|
1232
|
+
function xn({
|
|
1233
1233
|
className: t = "",
|
|
1234
1234
|
autoRedirect: a = !1,
|
|
1235
1235
|
redirectDelay: n = 3e3
|
|
1236
1236
|
}) {
|
|
1237
1237
|
var g;
|
|
1238
|
-
const { order: r, orderStatus: o, goToStep: s, goBack: u } =
|
|
1238
|
+
const { order: r, orderStatus: o, goToStep: s, goBack: u } = Ye(), c = O(), [d, i] = b(!1), [h, p] = b(null), f = r != null && r.checkout.expiresAt ? Date.now() > r.checkout.expiresAt : !1;
|
|
1239
1239
|
if (H(() => {
|
|
1240
1240
|
if ((r == null ? void 0 : r.checkout.method) === "redirect" && a && !f) {
|
|
1241
1241
|
p(Math.ceil(n / 1e3));
|
|
@@ -1397,7 +1397,7 @@ function gn({
|
|
|
1397
1397
|
}
|
|
1398
1398
|
if (r.checkout.method === "redirect")
|
|
1399
1399
|
return /* @__PURE__ */ e(
|
|
1400
|
-
|
|
1400
|
+
gn,
|
|
1401
1401
|
{
|
|
1402
1402
|
gatewayName: r.gateway,
|
|
1403
1403
|
checkoutUrl: r.checkout.url,
|
|
@@ -1406,7 +1406,7 @@ function gn({
|
|
|
1406
1406
|
}
|
|
1407
1407
|
);
|
|
1408
1408
|
if (r.checkout.method === "widget" && r.widgetConfig) {
|
|
1409
|
-
const k =
|
|
1409
|
+
const k = vn(r.checkout.url, r.widgetConfig);
|
|
1410
1410
|
return ia(
|
|
1411
1411
|
/* @__PURE__ */ l(
|
|
1412
1412
|
"div",
|
|
@@ -1524,14 +1524,14 @@ function gn({
|
|
|
1524
1524
|
}
|
|
1525
1525
|
);
|
|
1526
1526
|
}
|
|
1527
|
-
function
|
|
1527
|
+
function vn(t, a) {
|
|
1528
1528
|
const n = new URL("/en/partner/widget", t);
|
|
1529
1529
|
for (const [r, o] of Object.entries(a))
|
|
1530
1530
|
o != null && o !== "" && n.searchParams.set(r, String(o));
|
|
1531
1531
|
return n.toString();
|
|
1532
1532
|
}
|
|
1533
|
-
function
|
|
1534
|
-
const { orderStatus: a, orderStatusLoading: n, goToStep: r } =
|
|
1533
|
+
function Cn({ className: t = "" }) {
|
|
1534
|
+
const { orderStatus: a, orderStatusLoading: n, goToStep: r } = Ye(), o = O();
|
|
1535
1535
|
H(() => {
|
|
1536
1536
|
a && (a.status === "completed" ? r("complete") : ["failed", "cancelled", "expired", "refunded"].includes(a.status) && r("error"));
|
|
1537
1537
|
}, [a == null ? void 0 : a.status, r]);
|
|
@@ -1603,13 +1603,13 @@ function We({ label: t, value: a, mono: n }) {
|
|
|
1603
1603
|
}
|
|
1604
1604
|
);
|
|
1605
1605
|
}
|
|
1606
|
-
function
|
|
1606
|
+
function bn({
|
|
1607
1607
|
className: t = "",
|
|
1608
1608
|
explorerUrl: a,
|
|
1609
1609
|
onDone: n,
|
|
1610
1610
|
doneButtonText: r
|
|
1611
1611
|
}) {
|
|
1612
|
-
const { orderStatus: o, state: s, dispatch: u } =
|
|
1612
|
+
const { orderStatus: o, state: s, dispatch: u } = Ye(), c = O(), d = s.flowType === "sell", i = () => {
|
|
1613
1613
|
if (!(o != null && o.transactionHash)) return null;
|
|
1614
1614
|
if (!a) {
|
|
1615
1615
|
const f = {
|
|
@@ -1727,14 +1727,14 @@ function be({ label: t, value: a, mono: n, highlight: r }) {
|
|
|
1727
1727
|
}
|
|
1728
1728
|
);
|
|
1729
1729
|
}
|
|
1730
|
-
function
|
|
1730
|
+
function Sn({
|
|
1731
1731
|
className: t = "",
|
|
1732
1732
|
onRetry: a,
|
|
1733
1733
|
onDone: n,
|
|
1734
1734
|
doneButtonText: r,
|
|
1735
1735
|
supportEmail: o = "support@nowramp.com"
|
|
1736
1736
|
}) {
|
|
1737
|
-
const { state: s, orderStatus: u, dispatch: c, goToStep: d } =
|
|
1737
|
+
const { state: s, orderStatus: u, dispatch: c, goToStep: d } = Ye(), i = O(), h = s.flowType === "sell", p = () => {
|
|
1738
1738
|
if (u)
|
|
1739
1739
|
switch (u.status) {
|
|
1740
1740
|
case "failed":
|
|
@@ -2001,7 +2001,7 @@ const rt = {
|
|
|
2001
2001
|
OKC: { name: "OKX Chain", icon: "eth" },
|
|
2002
2002
|
UNI_CHAIN: { name: "UNI", icon: "uni" },
|
|
2003
2003
|
ZEC: { name: "ZCash", icon: "zec" }
|
|
2004
|
-
},
|
|
2004
|
+
}, wa = [
|
|
2005
2005
|
// --- Popular / Top coins ---
|
|
2006
2006
|
{ code: "BTC", name: "Bitcoin", chains: ["BTC", "LN"], popular: !0 },
|
|
2007
2007
|
{ code: "ETH", name: "Ethereum", chains: ["ETH", "ARB", "BASE", "BSC", "OPTIMISM", "LINEA", "ZKSYNC", "LRC", "STARK", "APE", "ECLIPSE", "FUEL", "INK", "SOPHON", "UNICHAIN", "WLD"], popular: !0 },
|
|
@@ -2194,9 +2194,9 @@ const rt = {
|
|
|
2194
2194
|
{ code: "ZCHF", name: "Frankencoin", chains: ["ETH"], popular: !1 },
|
|
2195
2195
|
{ code: "ZETA", name: "Zeta", chains: ["ETH", "ZETACHAIN"], popular: !1 },
|
|
2196
2196
|
{ code: "ZTG", name: "Zeitgeist", chains: ["ZTG"], popular: !1 }
|
|
2197
|
-
],
|
|
2198
|
-
|
|
2199
|
-
),
|
|
2197
|
+
], wn = Object.fromEntries(
|
|
2198
|
+
wa.map((t) => [t.code, t.name])
|
|
2199
|
+
), kn = {
|
|
2200
2200
|
AED: "ae",
|
|
2201
2201
|
ALL: "al",
|
|
2202
2202
|
ARS: "ar",
|
|
@@ -2231,11 +2231,11 @@ const rt = {
|
|
|
2231
2231
|
VND: "vn",
|
|
2232
2232
|
ZAR: "za"
|
|
2233
2233
|
};
|
|
2234
|
-
function
|
|
2234
|
+
function ka(t, a = "") {
|
|
2235
2235
|
return `${a}/crypto-icons/${t.toLowerCase()}.svg`;
|
|
2236
2236
|
}
|
|
2237
|
-
function
|
|
2238
|
-
const n =
|
|
2237
|
+
function Nn(t, a = "") {
|
|
2238
|
+
const n = kn[t] || "us";
|
|
2239
2239
|
return `${a}/flags/${n}.svg`;
|
|
2240
2240
|
}
|
|
2241
2241
|
function ht(t) {
|
|
@@ -2274,7 +2274,7 @@ const sa = [
|
|
|
2274
2274
|
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 },
|
|
2275
2275
|
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 },
|
|
2276
2276
|
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 }
|
|
2277
|
-
},
|
|
2277
|
+
}, En = /* @__PURE__ */ new Set([
|
|
2278
2278
|
"USDC",
|
|
2279
2279
|
"USDT",
|
|
2280
2280
|
"DAI",
|
|
@@ -2301,14 +2301,14 @@ const sa = [
|
|
|
2301
2301
|
"EURR",
|
|
2302
2302
|
"ZCHF"
|
|
2303
2303
|
]);
|
|
2304
|
-
function
|
|
2305
|
-
return
|
|
2304
|
+
function Na(t) {
|
|
2305
|
+
return En.has(t.toUpperCase());
|
|
2306
2306
|
}
|
|
2307
|
-
function
|
|
2307
|
+
function Nr(t, a) {
|
|
2308
2308
|
var n, r;
|
|
2309
2309
|
return ((n = ua[t]) == null ? void 0 : n[a]) ?? ((r = ua.USDC) == null ? void 0 : r[a]) ?? 1;
|
|
2310
2310
|
}
|
|
2311
|
-
function
|
|
2311
|
+
function Rn(t) {
|
|
2312
2312
|
return parseFloat(t.replace(/,/g, "")) || 0;
|
|
2313
2313
|
}
|
|
2314
2314
|
function It(t) {
|
|
@@ -2319,9 +2319,9 @@ function It(t) {
|
|
|
2319
2319
|
const a = t.toPrecision(4);
|
|
2320
2320
|
return parseFloat(a).toString();
|
|
2321
2321
|
}
|
|
2322
|
-
const ye = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), ma = 10, pa = 1e-4,
|
|
2322
|
+
const ye = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), ma = 10, pa = 1e-4, An = (() => {
|
|
2323
2323
|
const t = [];
|
|
2324
|
-
for (const a of
|
|
2324
|
+
for (const a of wa)
|
|
2325
2325
|
for (const n of a.chains)
|
|
2326
2326
|
t.push({ code: a.code, name: a.name, chain: n, popular: a.popular });
|
|
2327
2327
|
return t;
|
|
@@ -2329,7 +2329,7 @@ const ye = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), ma = 10, pa = 1e-4, Rn = (
|
|
|
2329
2329
|
function ha(t) {
|
|
2330
2330
|
return t.length <= 12 ? t : `${t.slice(0, 6)}...${t.slice(-6)}`;
|
|
2331
2331
|
}
|
|
2332
|
-
function
|
|
2332
|
+
function Tn({ className: t = "", stablecoinParity: a, partnerName: n }) {
|
|
2333
2333
|
var J;
|
|
2334
2334
|
const {
|
|
2335
2335
|
config: r,
|
|
@@ -2340,7 +2340,7 @@ function An({ className: t = "", stablecoinParity: a, partnerName: n }) {
|
|
|
2340
2340
|
fetchQuotes: d,
|
|
2341
2341
|
createOrder: i,
|
|
2342
2342
|
orderLoading: h
|
|
2343
|
-
} =
|
|
2343
|
+
} = Ye(), p = O(), f = s.flowType === "sell", [g, k] = b(null), N = r == null ? void 0 : r.gateways.find((ee) => ee.id === u), y = (J = c == null ? void 0 : c.bestQuote) != null && J.exchangeRate ? parseFloat(c.bestQuote.exchangeRate) : null, E = parseFloat(s.fiatAmount) || 0, V = !!(a && n && !f && Na(s.cryptoCurrency) && y), X = V && s.cryptoCurrency.toUpperCase().includes(s.fiatCurrency.toUpperCase()), z = V && E > 0 ? It(X ? E : E / y) : null, ie = async () => {
|
|
2344
2344
|
k(null);
|
|
2345
2345
|
try {
|
|
2346
2346
|
d(), await i();
|
|
@@ -2362,10 +2362,10 @@ function An({ className: t = "", stablecoinParity: a, partnerName: n }) {
|
|
|
2362
2362
|
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: N.name })
|
|
2363
2363
|
] })
|
|
2364
2364
|
] }),
|
|
2365
|
-
f ? /* @__PURE__ */ l(
|
|
2365
|
+
f ? /* @__PURE__ */ l(Y, { children: [
|
|
2366
2366
|
/* @__PURE__ */ e(Me, { label: p("confirm.youSell"), value: `${s.cryptoAmount} ${s.cryptoCurrency}`, highlight: !0 }),
|
|
2367
2367
|
/* @__PURE__ */ e(Me, { label: p("confirm.youReceive"), value: p("confirm.payout", { currency: s.fiatCurrency }) })
|
|
2368
|
-
] }) : /* @__PURE__ */ l(
|
|
2368
|
+
] }) : /* @__PURE__ */ l(Y, { children: [
|
|
2369
2369
|
/* @__PURE__ */ e(Me, { label: p("confirm.youPay"), value: `${s.fiatAmount} ${s.fiatCurrency}`, highlight: !0 }),
|
|
2370
2370
|
/* @__PURE__ */ e(
|
|
2371
2371
|
Me,
|
|
@@ -2388,7 +2388,7 @@ function An({ className: t = "", stablecoinParity: a, partnerName: n }) {
|
|
|
2388
2388
|
style: { height: 60, borderRadius: "var(--t-cta-radius, 100px)", background: "var(--t-cta-bg)", color: "var(--t-cta-text)", opacity: h ? 0.7 : 1 },
|
|
2389
2389
|
disabled: h,
|
|
2390
2390
|
onClick: ie,
|
|
2391
|
-
children: h ? /* @__PURE__ */ l(
|
|
2391
|
+
children: h ? /* @__PURE__ */ l(Y, { children: [
|
|
2392
2392
|
/* @__PURE__ */ e(Se, { size: 18 }),
|
|
2393
2393
|
p("confirm.processing")
|
|
2394
2394
|
] }) : p(f ? "confirm.confirmSell" : "confirm.confirmPay")
|
|
@@ -2456,7 +2456,7 @@ function Q({
|
|
|
2456
2456
|
}) {
|
|
2457
2457
|
return /* @__PURE__ */ e("div", { className: `skeleton ${n}`, style: { width: t, height: a } });
|
|
2458
2458
|
}
|
|
2459
|
-
function
|
|
2459
|
+
function Ln() {
|
|
2460
2460
|
const t = O();
|
|
2461
2461
|
return /* @__PURE__ */ l("div", { className: "flex-1 px-5 flex flex-col", children: [
|
|
2462
2462
|
/* @__PURE__ */ l("div", { className: "px-[18px] pt-[14px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5 }, children: [
|
|
@@ -2486,7 +2486,7 @@ function Tn() {
|
|
|
2486
2486
|
/* @__PURE__ */ e("div", { className: "text-center py-3", children: /* @__PURE__ */ e("span", { className: "text-[11px]", style: { color: "var(--t-text-tertiary)" }, children: t("skeleton.poweredBy") }) })
|
|
2487
2487
|
] });
|
|
2488
2488
|
}
|
|
2489
|
-
function
|
|
2489
|
+
function Ea({
|
|
2490
2490
|
src: t,
|
|
2491
2491
|
alt: a,
|
|
2492
2492
|
size: n,
|
|
@@ -2537,11 +2537,11 @@ function Na({
|
|
|
2537
2537
|
}
|
|
2538
2538
|
);
|
|
2539
2539
|
}
|
|
2540
|
-
function
|
|
2540
|
+
function Ra({ ticker: t, size: a = 32, baseUrl: n = "" }) {
|
|
2541
2541
|
return /* @__PURE__ */ e(
|
|
2542
|
-
|
|
2542
|
+
Ea,
|
|
2543
2543
|
{
|
|
2544
|
-
src:
|
|
2544
|
+
src: ka(t, n),
|
|
2545
2545
|
alt: t,
|
|
2546
2546
|
size: a,
|
|
2547
2547
|
background: "#ffffff"
|
|
@@ -2550,9 +2550,9 @@ function Ea({ ticker: t, size: a = 32, baseUrl: n = "" }) {
|
|
|
2550
2550
|
}
|
|
2551
2551
|
function Ot({ currencyCode: t, size: a = 16, baseUrl: n = "" }) {
|
|
2552
2552
|
return /* @__PURE__ */ e(
|
|
2553
|
-
|
|
2553
|
+
Ea,
|
|
2554
2554
|
{
|
|
2555
|
-
src:
|
|
2555
|
+
src: Nn(t, n),
|
|
2556
2556
|
alt: t,
|
|
2557
2557
|
size: a
|
|
2558
2558
|
}
|
|
@@ -2564,7 +2564,7 @@ function Kt({ size: t = 32, color: a = "#888" }) {
|
|
|
2564
2564
|
/* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "8", stroke: "white", strokeWidth: "1.5", fill: "none" })
|
|
2565
2565
|
] });
|
|
2566
2566
|
}
|
|
2567
|
-
function
|
|
2567
|
+
function Er({ size: t = 24 }) {
|
|
2568
2568
|
return /* @__PURE__ */ e(
|
|
2569
2569
|
"div",
|
|
2570
2570
|
{
|
|
@@ -2581,7 +2581,7 @@ function Nr({ size: t = 24 }) {
|
|
|
2581
2581
|
}
|
|
2582
2582
|
);
|
|
2583
2583
|
}
|
|
2584
|
-
function
|
|
2584
|
+
function Fn({ size: t = 32 }) {
|
|
2585
2585
|
return /* @__PURE__ */ e(
|
|
2586
2586
|
"div",
|
|
2587
2587
|
{
|
|
@@ -2591,7 +2591,7 @@ function Ln({ size: t = 32 }) {
|
|
|
2591
2591
|
}
|
|
2592
2592
|
);
|
|
2593
2593
|
}
|
|
2594
|
-
function
|
|
2594
|
+
function Rr({ size: t = 32 }) {
|
|
2595
2595
|
return /* @__PURE__ */ e(
|
|
2596
2596
|
"div",
|
|
2597
2597
|
{
|
|
@@ -2607,7 +2607,7 @@ function Er({ size: t = 32 }) {
|
|
|
2607
2607
|
}
|
|
2608
2608
|
);
|
|
2609
2609
|
}
|
|
2610
|
-
function
|
|
2610
|
+
function Ar({ size: t = 32 }) {
|
|
2611
2611
|
return /* @__PURE__ */ e(
|
|
2612
2612
|
"div",
|
|
2613
2613
|
{
|
|
@@ -2622,7 +2622,7 @@ function Rr({ size: t = 32 }) {
|
|
|
2622
2622
|
}
|
|
2623
2623
|
);
|
|
2624
2624
|
}
|
|
2625
|
-
function
|
|
2625
|
+
function Un({ size: t = 32 }) {
|
|
2626
2626
|
return /* @__PURE__ */ e(
|
|
2627
2627
|
"div",
|
|
2628
2628
|
{
|
|
@@ -2632,7 +2632,7 @@ function Fn({ size: t = 32 }) {
|
|
|
2632
2632
|
}
|
|
2633
2633
|
);
|
|
2634
2634
|
}
|
|
2635
|
-
function
|
|
2635
|
+
function In({ size: t = 32 }) {
|
|
2636
2636
|
return /* @__PURE__ */ e(
|
|
2637
2637
|
"div",
|
|
2638
2638
|
{
|
|
@@ -2648,7 +2648,7 @@ function Un({ size: t = 32 }) {
|
|
|
2648
2648
|
}
|
|
2649
2649
|
);
|
|
2650
2650
|
}
|
|
2651
|
-
function
|
|
2651
|
+
function Mn({ size: t = 32 }) {
|
|
2652
2652
|
const a = t * 0.8;
|
|
2653
2653
|
return /* @__PURE__ */ e(
|
|
2654
2654
|
"div",
|
|
@@ -2663,7 +2663,7 @@ function In({ size: t = 32 }) {
|
|
|
2663
2663
|
}
|
|
2664
2664
|
);
|
|
2665
2665
|
}
|
|
2666
|
-
function
|
|
2666
|
+
function Tr({ size: t = 32 }) {
|
|
2667
2667
|
const a = t * 0.56, n = a * 0.65, r = Math.max(2, a * 0.1), o = a * 0.2;
|
|
2668
2668
|
return /* @__PURE__ */ l("div", { className: "flex items-center justify-center shrink-0", style: { width: t, height: t }, children: [
|
|
2669
2669
|
/* @__PURE__ */ e(
|
|
@@ -2714,7 +2714,7 @@ function Ar({ size: t = 32 }) {
|
|
|
2714
2714
|
)
|
|
2715
2715
|
] });
|
|
2716
2716
|
}
|
|
2717
|
-
function
|
|
2717
|
+
function Lr({ size: t = 18 }) {
|
|
2718
2718
|
return /* @__PURE__ */ e(
|
|
2719
2719
|
"div",
|
|
2720
2720
|
{
|
|
@@ -2727,10 +2727,10 @@ function Tr({ size: t = 18 }) {
|
|
|
2727
2727
|
function De() {
|
|
2728
2728
|
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" }) });
|
|
2729
2729
|
}
|
|
2730
|
-
function
|
|
2730
|
+
function Dn() {
|
|
2731
2731
|
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" }) });
|
|
2732
2732
|
}
|
|
2733
|
-
function
|
|
2733
|
+
function Fr({ onClick: t }) {
|
|
2734
2734
|
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(
|
|
2735
2735
|
"path",
|
|
2736
2736
|
{
|
|
@@ -2739,7 +2739,7 @@ function Lr({ onClick: t }) {
|
|
|
2739
2739
|
}
|
|
2740
2740
|
) }) });
|
|
2741
2741
|
}
|
|
2742
|
-
function
|
|
2742
|
+
function Ur({ size: t = 40 }) {
|
|
2743
2743
|
return /* @__PURE__ */ e(
|
|
2744
2744
|
"div",
|
|
2745
2745
|
{
|
|
@@ -2752,7 +2752,7 @@ function Fr({ size: t = 40 }) {
|
|
|
2752
2752
|
}
|
|
2753
2753
|
);
|
|
2754
2754
|
}
|
|
2755
|
-
function
|
|
2755
|
+
function Bn({ size: t = 20 }) {
|
|
2756
2756
|
const a = t * 0.6;
|
|
2757
2757
|
return /* @__PURE__ */ e(
|
|
2758
2758
|
"div",
|
|
@@ -2770,7 +2770,7 @@ function Dn({ size: t = 20 }) {
|
|
|
2770
2770
|
}
|
|
2771
2771
|
);
|
|
2772
2772
|
}
|
|
2773
|
-
function
|
|
2773
|
+
function Hn({ size: t = 20 }) {
|
|
2774
2774
|
const a = t * 0.6;
|
|
2775
2775
|
return /* @__PURE__ */ e(
|
|
2776
2776
|
"div",
|
|
@@ -2785,7 +2785,7 @@ function Bn({ size: t = 20 }) {
|
|
|
2785
2785
|
}
|
|
2786
2786
|
);
|
|
2787
2787
|
}
|
|
2788
|
-
function
|
|
2788
|
+
function Pn({ size: t = 20 }) {
|
|
2789
2789
|
return /* @__PURE__ */ e(
|
|
2790
2790
|
"div",
|
|
2791
2791
|
{
|
|
@@ -2798,7 +2798,7 @@ function Hn({ size: t = 20 }) {
|
|
|
2798
2798
|
}
|
|
2799
2799
|
);
|
|
2800
2800
|
}
|
|
2801
|
-
function
|
|
2801
|
+
function On({ size: t = 20 }) {
|
|
2802
2802
|
return /* @__PURE__ */ e(
|
|
2803
2803
|
"div",
|
|
2804
2804
|
{
|
|
@@ -2813,7 +2813,7 @@ function Pn({ size: t = 20 }) {
|
|
|
2813
2813
|
}
|
|
2814
2814
|
);
|
|
2815
2815
|
}
|
|
2816
|
-
function
|
|
2816
|
+
function Ir({ size: t = 24 }) {
|
|
2817
2817
|
const a = t * 1.15;
|
|
2818
2818
|
return /* @__PURE__ */ l("svg", { width: a, height: t, viewBox: "0 0 48 32", fill: "none", preserveAspectRatio: "xMidYMid meet", children: [
|
|
2819
2819
|
/* @__PURE__ */ e("path", { d: "M0 0H5.76C11.0619 0 15.36 4.47715 15.36 10V32H0V0Z", fill: "var(--t-text)" }),
|
|
@@ -2847,7 +2847,7 @@ function Mt({ size: t = 12 }) {
|
|
|
2847
2847
|
}
|
|
2848
2848
|
);
|
|
2849
2849
|
}
|
|
2850
|
-
function
|
|
2850
|
+
function Kn({ onClick: t }) {
|
|
2851
2851
|
return /* @__PURE__ */ e(
|
|
2852
2852
|
"button",
|
|
2853
2853
|
{
|
|
@@ -2862,44 +2862,44 @@ function On({ onClick: t }) {
|
|
|
2862
2862
|
}
|
|
2863
2863
|
);
|
|
2864
2864
|
}
|
|
2865
|
-
function
|
|
2865
|
+
function Mr({ size: t = 16 }) {
|
|
2866
2866
|
return /* @__PURE__ */ l("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: "none", children: [
|
|
2867
2867
|
/* @__PURE__ */ e("circle", { cx: "7", cy: "7", r: "5.25", stroke: "var(--t-text-secondary)", strokeWidth: "1.2" }),
|
|
2868
2868
|
/* @__PURE__ */ e("path", { d: "M11 11l3.5 3.5", stroke: "var(--t-text-secondary)", strokeWidth: "1.2", strokeLinecap: "round" })
|
|
2869
2869
|
] });
|
|
2870
2870
|
}
|
|
2871
|
-
function
|
|
2871
|
+
function Dr({ size: t = 12 }) {
|
|
2872
2872
|
return /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e("path", { d: "M6 10V2M6 2L2.5 5.5M6 2l3.5 3.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
2873
2873
|
}
|
|
2874
|
-
function
|
|
2874
|
+
function _n({ size: t = 14 }) {
|
|
2875
2875
|
return /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ e("path", { d: "M11.5 3.5L5.5 10.5L2.5 7.5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
2876
2876
|
}
|
|
2877
2877
|
function Dt({ size: t = 12 }) {
|
|
2878
2878
|
return /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e("path", { d: "M2 2l8 8M10 2l-8 8", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round" }) });
|
|
2879
2879
|
}
|
|
2880
|
-
function
|
|
2880
|
+
function Vn(t, a = 32, n) {
|
|
2881
2881
|
switch (t) {
|
|
2882
2882
|
case "bank":
|
|
2883
|
-
return /* @__PURE__ */ e(Dn, { size: a });
|
|
2884
|
-
case "card":
|
|
2885
2883
|
return /* @__PURE__ */ e(Bn, { size: a });
|
|
2886
|
-
case "
|
|
2884
|
+
case "card":
|
|
2887
2885
|
return /* @__PURE__ */ e(Hn, { size: a });
|
|
2888
|
-
case "
|
|
2886
|
+
case "applepay":
|
|
2889
2887
|
return /* @__PURE__ */ e(Pn, { size: a });
|
|
2888
|
+
case "googlepay":
|
|
2889
|
+
return /* @__PURE__ */ e(On, { size: a });
|
|
2890
2890
|
case "revolut":
|
|
2891
|
-
return /* @__PURE__ */ e(Ln, { size: a });
|
|
2892
|
-
case "paypal":
|
|
2893
2891
|
return /* @__PURE__ */ e(Fn, { size: a });
|
|
2894
|
-
case "
|
|
2892
|
+
case "paypal":
|
|
2895
2893
|
return /* @__PURE__ */ e(Un, { size: a });
|
|
2896
|
-
case "
|
|
2894
|
+
case "visa":
|
|
2897
2895
|
return /* @__PURE__ */ e(In, { size: a });
|
|
2896
|
+
case "mastercard":
|
|
2897
|
+
return /* @__PURE__ */ e(Mn, { size: a });
|
|
2898
2898
|
default:
|
|
2899
2899
|
return /* @__PURE__ */ e(Kt, { size: a });
|
|
2900
2900
|
}
|
|
2901
2901
|
}
|
|
2902
|
-
function
|
|
2902
|
+
function jn({ type: t, title: a, description: n, visible: r, onDismiss: o }) {
|
|
2903
2903
|
const [s, u] = b(!1), [c, d] = b(!1), i = P(() => {
|
|
2904
2904
|
d(!0), setTimeout(() => {
|
|
2905
2905
|
u(!1), d(!1), o();
|
|
@@ -2922,7 +2922,7 @@ function Vn({ type: t, title: a, description: n, visible: r, onDismiss: o }) {
|
|
|
2922
2922
|
className: "flex items-start gap-2.5 rounded-2xl px-4 py-3",
|
|
2923
2923
|
style: { background: t === "success" ? "var(--t-toast-success-bg)" : "var(--t-toast-error-bg)", color: "#ffffff" },
|
|
2924
2924
|
children: [
|
|
2925
|
-
/* @__PURE__ */ e("span", { className: "mt-0.5 shrink-0", children: t === "success" ? /* @__PURE__ */ e(
|
|
2925
|
+
/* @__PURE__ */ e("span", { className: "mt-0.5 shrink-0", children: t === "success" ? /* @__PURE__ */ e(_n, { size: 14 }) : /* @__PURE__ */ e(Dt, { size: 12 }) }),
|
|
2926
2926
|
/* @__PURE__ */ l("div", { className: "flex-1 min-w-0", children: [
|
|
2927
2927
|
/* @__PURE__ */ e("div", { className: "text-[13px] font-medium leading-tight", children: a }),
|
|
2928
2928
|
n && /* @__PURE__ */ e("div", { className: "text-[12px] leading-snug mt-0.5 opacity-90", children: n })
|
|
@@ -2949,7 +2949,7 @@ function we({ width: t = 46 }) {
|
|
|
2949
2949
|
/* @__PURE__ */ e("path", { d: "M32.64 8C32.64 3.58172 36.0785 0 40.32 0C44.5615 0 48 3.58172 48 8C48 12.4183 44.5615 16 40.32 16C36.0785 16 32.64 12.4183 32.64 8Z", fill: "var(--t-text)" })
|
|
2950
2950
|
] });
|
|
2951
2951
|
}
|
|
2952
|
-
function
|
|
2952
|
+
function Wn() {
|
|
2953
2953
|
return /* @__PURE__ */ e(
|
|
2954
2954
|
"div",
|
|
2955
2955
|
{
|
|
@@ -2959,8 +2959,8 @@ function jn() {
|
|
|
2959
2959
|
}
|
|
2960
2960
|
);
|
|
2961
2961
|
}
|
|
2962
|
-
function
|
|
2963
|
-
return /* @__PURE__ */ l(
|
|
2962
|
+
function Gn({ isOpen: t, onClose: a, children: n }) {
|
|
2963
|
+
return /* @__PURE__ */ l(Y, { children: [
|
|
2964
2964
|
/* @__PURE__ */ e(
|
|
2965
2965
|
"div",
|
|
2966
2966
|
{
|
|
@@ -3005,7 +3005,7 @@ function Be({ onClick: t }) {
|
|
|
3005
3005
|
}
|
|
3006
3006
|
);
|
|
3007
3007
|
}
|
|
3008
|
-
function
|
|
3008
|
+
function Xe({
|
|
3009
3009
|
value: t,
|
|
3010
3010
|
onChange: a,
|
|
3011
3011
|
placeholder: n = "",
|
|
@@ -3060,8 +3060,8 @@ function Ye({
|
|
|
3060
3060
|
}
|
|
3061
3061
|
);
|
|
3062
3062
|
}
|
|
3063
|
-
const
|
|
3064
|
-
function
|
|
3063
|
+
const Zn = ["USD", "EUR", "GBP"];
|
|
3064
|
+
function Yn({
|
|
3065
3065
|
onClose: t,
|
|
3066
3066
|
onSelect: a,
|
|
3067
3067
|
currencies: n,
|
|
@@ -3091,12 +3091,12 @@ function Zn({
|
|
|
3091
3091
|
(p) => p.code.toLowerCase().includes(h) || p.name.toLowerCase().includes(h)
|
|
3092
3092
|
);
|
|
3093
3093
|
}, [d, u, o]);
|
|
3094
|
-
return /* @__PURE__ */ l(
|
|
3094
|
+
return /* @__PURE__ */ l(Y, { children: [
|
|
3095
3095
|
/* @__PURE__ */ l("div", { className: "relative shrink-0", style: { height: 128, background: "var(--t-header-bg)", backdropFilter: "blur(var(--t-header-blur))", WebkitBackdropFilter: "blur(var(--t-header-blur))" }, children: [
|
|
3096
3096
|
/* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(we, { width: 46 }) }),
|
|
3097
3097
|
/* @__PURE__ */ e("p", { className: "absolute text-[16px] text-center truncate", style: { top: 28, left: 64, right: 64, color: "var(--t-text)", lineHeight: "24px" }, children: s("modal.selectFiat") }),
|
|
3098
3098
|
/* @__PURE__ */ e("div", { className: "absolute", style: { right: 12, top: 20 }, children: /* @__PURE__ */ e(Be, { onClick: t }) }),
|
|
3099
|
-
/* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(
|
|
3099
|
+
/* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Xe, { value: u, onChange: c, inline: !0 }) })
|
|
3100
3100
|
] }),
|
|
3101
3101
|
/* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-3", children: [
|
|
3102
3102
|
i.map((h) => {
|
|
@@ -3111,7 +3111,7 @@ function Zn({
|
|
|
3111
3111
|
/* @__PURE__ */ e(Ot, { currencyCode: h.code, size: 32, baseUrl: r }),
|
|
3112
3112
|
/* @__PURE__ */ l("div", { className: "flex-1 flex items-center", style: { borderBottom: "1px solid var(--t-card-border)", paddingTop: 20, paddingBottom: 20, gap: 10 }, children: [
|
|
3113
3113
|
/* @__PURE__ */ e("span", { className: "flex-1 text-[18px] text-left", style: { color: "var(--t-text)", lineHeight: "20px" }, children: h.code }),
|
|
3114
|
-
|
|
3114
|
+
Zn.includes(h.code) && /* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { border: "1.5px solid var(--t-card-border)", borderRadius: 100, paddingLeft: 8, paddingRight: 8, color: "var(--t-text-secondary)", lineHeight: "20px", letterSpacing: "0.22px" }, children: s("modal.popular") }),
|
|
3115
3115
|
p && /* @__PURE__ */ e("div", { style: { width: 40, height: 20, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
|
|
3116
3116
|
"path",
|
|
3117
3117
|
{
|
|
@@ -3132,7 +3132,8 @@ function Zn({
|
|
|
3132
3132
|
] })
|
|
3133
3133
|
] });
|
|
3134
3134
|
}
|
|
3135
|
-
|
|
3135
|
+
const fa = ["BTC", "ETH", "SOL"];
|
|
3136
|
+
function ya({ src: t, alt: a, size: n, className: r, style: o }) {
|
|
3136
3137
|
const [s, u] = b(!1), [c, d] = b(!1), i = M(t);
|
|
3137
3138
|
i.current !== t && (i.current = t, u(!1), d(!1));
|
|
3138
3139
|
const h = P(() => u(!0), []), p = P(() => d(!0), []);
|
|
@@ -3168,12 +3169,12 @@ function fa({ src: t, alt: a, size: n, className: r, style: o }) {
|
|
|
3168
3169
|
}
|
|
3169
3170
|
function Xn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selectedCode: o, selectedChain: s }) {
|
|
3170
3171
|
const u = O(), [c, d] = b(""), i = _(() => {
|
|
3171
|
-
if (!n || n.length === 0) return
|
|
3172
|
+
if (!n || n.length === 0) return An;
|
|
3172
3173
|
const f = [];
|
|
3173
3174
|
for (const g of n) {
|
|
3174
|
-
const k = g.networks || [], N = g.name ||
|
|
3175
|
+
const k = g.networks || [], N = g.name || wn[g.code] || g.code;
|
|
3175
3176
|
if (k.length === 0)
|
|
3176
|
-
f.push({ code: g.code, name: N, chain: g.code, popular:
|
|
3177
|
+
f.push({ code: g.code, name: N, chain: g.code, popular: fa.includes(g.code) });
|
|
3177
3178
|
else
|
|
3178
3179
|
for (const y of k) {
|
|
3179
3180
|
const E = y.code || y.id || y.name || g.code;
|
|
@@ -3182,7 +3183,7 @@ function Xn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
|
|
|
3182
3183
|
name: N,
|
|
3183
3184
|
chain: E,
|
|
3184
3185
|
chainName: y.name,
|
|
3185
|
-
popular:
|
|
3186
|
+
popular: fa.includes(g.code)
|
|
3186
3187
|
});
|
|
3187
3188
|
}
|
|
3188
3189
|
}
|
|
@@ -3202,19 +3203,19 @@ function Xn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
|
|
|
3202
3203
|
}
|
|
3203
3204
|
const g = f.split(/\s+/), k = [];
|
|
3204
3205
|
for (const y of i) {
|
|
3205
|
-
const E = ht(y.chain), V = E ? E.name.toLowerCase() : "",
|
|
3206
|
+
const E = ht(y.chain), V = E ? E.name.toLowerCase() : "", X = ((N = E == null ? void 0 : E.shortName) == null ? void 0 : N.toLowerCase()) || "", z = y.chain.toLowerCase(), ie = y.code.toLowerCase(), J = y.name.toLowerCase(), ee = [ie, J, V, X, z];
|
|
3206
3207
|
if (!g.every((L) => ee.some((S) => S.includes(L)))) continue;
|
|
3207
3208
|
let te = 0;
|
|
3208
|
-
ie === f ? te += 100 : ie.startsWith(g[0]) && (te += 50), y.popular && (te += 10), g.length > 1 && (V.includes(g[1]) ||
|
|
3209
|
+
ie === f ? te += 100 : ie.startsWith(g[0]) && (te += 50), y.popular && (te += 10), g.length > 1 && (V.includes(g[1]) || X.includes(g[1]) || z.includes(g[1])) && (te += 25), k.push({ item: y, score: te });
|
|
3209
3210
|
}
|
|
3210
3211
|
return k.sort((y, E) => E.score - y.score), k.map((y) => y.item);
|
|
3211
3212
|
}, [i, c, o, s]);
|
|
3212
|
-
return /* @__PURE__ */ l(
|
|
3213
|
+
return /* @__PURE__ */ l(Y, { children: [
|
|
3213
3214
|
/* @__PURE__ */ l("div", { className: "relative shrink-0", style: { height: 128, background: "var(--t-header-bg)", backdropFilter: "blur(var(--t-header-blur))", WebkitBackdropFilter: "blur(var(--t-header-blur))" }, children: [
|
|
3214
3215
|
/* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(we, { width: 46 }) }),
|
|
3215
3216
|
/* @__PURE__ */ e("p", { className: "absolute text-[16px] text-center truncate", style: { top: 28, left: 64, right: 64, color: "var(--t-text)", lineHeight: "24px" }, children: u("modal.selectCrypto") }),
|
|
3216
3217
|
/* @__PURE__ */ e("div", { className: "absolute", style: { right: 12, top: 20 }, children: /* @__PURE__ */ e(Be, { onClick: t }) }),
|
|
3217
|
-
/* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(
|
|
3218
|
+
/* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Xe, { value: c, onChange: d, inline: !0 }) })
|
|
3218
3219
|
] }),
|
|
3219
3220
|
/* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-3", children: [
|
|
3220
3221
|
p.map((f) => {
|
|
@@ -3233,9 +3234,9 @@ function Xn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
|
|
|
3233
3234
|
className: "absolute top-0 left-0",
|
|
3234
3235
|
style: { background: "#ffffff", borderRadius: "50%" },
|
|
3235
3236
|
children: /* @__PURE__ */ e(
|
|
3236
|
-
|
|
3237
|
+
ya,
|
|
3237
3238
|
{
|
|
3238
|
-
src:
|
|
3239
|
+
src: ka(f.code, r),
|
|
3239
3240
|
alt: f.code,
|
|
3240
3241
|
size: 32
|
|
3241
3242
|
}
|
|
@@ -3254,7 +3255,7 @@ function Xn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
|
|
|
3254
3255
|
background: "#ffffff"
|
|
3255
3256
|
},
|
|
3256
3257
|
children: /* @__PURE__ */ e(
|
|
3257
|
-
|
|
3258
|
+
ya,
|
|
3258
3259
|
{
|
|
3259
3260
|
src: Ut(f.chain, r),
|
|
3260
3261
|
alt: f.chain,
|
|
@@ -3288,7 +3289,7 @@ function Xn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
|
|
|
3288
3289
|
] })
|
|
3289
3290
|
] });
|
|
3290
3291
|
}
|
|
3291
|
-
const
|
|
3292
|
+
const $n = {
|
|
3292
3293
|
"debit-credit-card": "card",
|
|
3293
3294
|
"bank-transfer": "bank",
|
|
3294
3295
|
"ach-bank-transfer": "bank",
|
|
@@ -3299,11 +3300,11 @@ const Yn = {
|
|
|
3299
3300
|
"google-pay": "googlepay",
|
|
3300
3301
|
paypal: "paypal",
|
|
3301
3302
|
revolut: "revolut"
|
|
3302
|
-
},
|
|
3303
|
+
}, Qn = {
|
|
3303
3304
|
"debit-credit-card": "payment.name.card",
|
|
3304
3305
|
"bank-transfer": "payment.name.bankTransfer",
|
|
3305
3306
|
"ach-bank-transfer": "payment.name.ach"
|
|
3306
|
-
},
|
|
3307
|
+
}, zn = {
|
|
3307
3308
|
"apple-pay": "Apple Pay",
|
|
3308
3309
|
"google-pay": "Google Pay",
|
|
3309
3310
|
"payid-bank-transfer": "PayID",
|
|
@@ -3311,9 +3312,9 @@ const Yn = {
|
|
|
3311
3312
|
revolut: "Revolut"
|
|
3312
3313
|
};
|
|
3313
3314
|
function _t(t, a, n) {
|
|
3314
|
-
const r =
|
|
3315
|
+
const r = zn[t];
|
|
3315
3316
|
if (r) return r;
|
|
3316
|
-
const o =
|
|
3317
|
+
const o = Qn[t];
|
|
3317
3318
|
return o && n ? n(o) : o && {
|
|
3318
3319
|
"debit-credit-card": "Card",
|
|
3319
3320
|
"bank-transfer": "Bank Transfer",
|
|
@@ -3321,10 +3322,10 @@ function _t(t, a, n) {
|
|
|
3321
3322
|
}[t] || a;
|
|
3322
3323
|
}
|
|
3323
3324
|
function Vt(t, a, n = 24) {
|
|
3324
|
-
const r =
|
|
3325
|
-
return r ?
|
|
3325
|
+
const r = $n[t];
|
|
3326
|
+
return r ? Vn(r, n) : a ? /* @__PURE__ */ e("img", { src: a, alt: "", width: n, height: n, style: { borderRadius: "50%" } }) : /* @__PURE__ */ e(Kt, { size: n });
|
|
3326
3327
|
}
|
|
3327
|
-
function
|
|
3328
|
+
function Br({
|
|
3328
3329
|
methods: t,
|
|
3329
3330
|
selectedId: a,
|
|
3330
3331
|
onOpenModal: n,
|
|
@@ -3345,7 +3346,7 @@ function Dr({
|
|
|
3345
3346
|
},
|
|
3346
3347
|
children: /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: o("payment.unavailableFor", { currency: r }) })
|
|
3347
3348
|
}
|
|
3348
|
-
) : /* @__PURE__ */ e(
|
|
3349
|
+
) : /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ l(
|
|
3349
3350
|
"div",
|
|
3350
3351
|
{
|
|
3351
3352
|
role: "button",
|
|
@@ -3373,42 +3374,42 @@ function Dr({
|
|
|
3373
3374
|
}
|
|
3374
3375
|
) });
|
|
3375
3376
|
}
|
|
3376
|
-
function
|
|
3377
|
+
function Jn({
|
|
3377
3378
|
methods: t,
|
|
3378
3379
|
selectedId: a,
|
|
3379
3380
|
onSelect: n,
|
|
3380
3381
|
onClose: r
|
|
3381
3382
|
}) {
|
|
3382
|
-
const o = O(), [s, u] = b(""), c = _(() => {
|
|
3383
|
-
const
|
|
3384
|
-
if (!
|
|
3383
|
+
const o = O(), [s, u] = b(""), c = t.length > 0 ? t[0].id : "", d = _(() => {
|
|
3384
|
+
const i = s.trim().toLowerCase();
|
|
3385
|
+
if (!i) {
|
|
3385
3386
|
if (a) {
|
|
3386
|
-
const
|
|
3387
|
-
if (
|
|
3388
|
-
const
|
|
3389
|
-
return [
|
|
3387
|
+
const h = t.find((p) => p.id === a);
|
|
3388
|
+
if (h) {
|
|
3389
|
+
const p = t.filter((f) => f.id !== a);
|
|
3390
|
+
return [h, ...p];
|
|
3390
3391
|
}
|
|
3391
3392
|
}
|
|
3392
3393
|
return t;
|
|
3393
3394
|
}
|
|
3394
3395
|
return t.filter(
|
|
3395
|
-
(
|
|
3396
|
+
(h) => h.id.toLowerCase().includes(i) || h.name.toLowerCase().includes(i) || h.description && h.description.toLowerCase().includes(i)
|
|
3396
3397
|
);
|
|
3397
3398
|
}, [t, s, a]);
|
|
3398
|
-
return /* @__PURE__ */ l(
|
|
3399
|
+
return /* @__PURE__ */ l(Y, { children: [
|
|
3399
3400
|
/* @__PURE__ */ l("div", { className: "relative shrink-0", style: { height: 128, background: "var(--t-header-bg)", backdropFilter: "blur(var(--t-header-blur))", WebkitBackdropFilter: "blur(var(--t-header-blur))" }, children: [
|
|
3400
3401
|
/* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(we, { width: 46 }) }),
|
|
3401
3402
|
/* @__PURE__ */ e("p", { className: "absolute text-[16px] text-center truncate", style: { top: 28, left: 64, right: 64, color: "var(--t-text)", lineHeight: "24px" }, children: o("modal.choosePayment") }),
|
|
3402
3403
|
/* @__PURE__ */ e("div", { className: "absolute", style: { right: 12, top: 20 }, children: /* @__PURE__ */ e(Be, { onClick: r }) }),
|
|
3403
|
-
/* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(
|
|
3404
|
+
/* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Xe, { value: s, onChange: u, inline: !0 }) })
|
|
3404
3405
|
] }),
|
|
3405
3406
|
/* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-3", children: [
|
|
3406
|
-
|
|
3407
|
-
const h =
|
|
3407
|
+
d.map((i) => {
|
|
3408
|
+
const h = i.id === a, p = _t(i.id, i.name, o);
|
|
3408
3409
|
return /* @__PURE__ */ l(
|
|
3409
3410
|
"button",
|
|
3410
3411
|
{
|
|
3411
|
-
onClick: () => n(
|
|
3412
|
+
onClick: () => n(i.id),
|
|
3412
3413
|
className: "flex items-center w-full card-press",
|
|
3413
3414
|
style: { gap: 16 },
|
|
3414
3415
|
children: [
|
|
@@ -3417,12 +3418,12 @@ function zn({
|
|
|
3417
3418
|
{
|
|
3418
3419
|
className: "flex items-center justify-center shrink-0",
|
|
3419
3420
|
style: { width: 32, height: 32 },
|
|
3420
|
-
children: Vt(
|
|
3421
|
+
children: Vt(i.id, i.icon, 32)
|
|
3421
3422
|
}
|
|
3422
3423
|
),
|
|
3423
3424
|
/* @__PURE__ */ l("div", { className: "flex-1 flex items-center", style: { borderBottom: "1px solid var(--t-card-border)", paddingTop: 20, paddingBottom: 20, gap: 10 }, children: [
|
|
3424
3425
|
/* @__PURE__ */ e("span", { className: "flex-1 text-[18px] text-left", style: { color: "var(--t-text)", lineHeight: "20px" }, children: p }),
|
|
3425
|
-
i ===
|
|
3426
|
+
i.id === c && /* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { border: "1.5px solid var(--t-card-border)", borderRadius: 100, paddingLeft: 8, paddingRight: 8, color: "var(--t-text-secondary)", lineHeight: "20px", letterSpacing: "0.22px" }, children: o("modal.recommended") }),
|
|
3426
3427
|
h && /* @__PURE__ */ e("div", { style: { width: 40, height: 20, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
|
|
3427
3428
|
"path",
|
|
3428
3429
|
{
|
|
@@ -3436,14 +3437,14 @@ function zn({
|
|
|
3436
3437
|
] })
|
|
3437
3438
|
]
|
|
3438
3439
|
},
|
|
3439
|
-
|
|
3440
|
+
i.id
|
|
3440
3441
|
);
|
|
3441
3442
|
}),
|
|
3442
|
-
|
|
3443
|
+
d.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: o("modal.noPaymentMethods") })
|
|
3443
3444
|
] })
|
|
3444
3445
|
] });
|
|
3445
3446
|
}
|
|
3446
|
-
function
|
|
3447
|
+
function qn({
|
|
3447
3448
|
checked: t,
|
|
3448
3449
|
onChange: a,
|
|
3449
3450
|
accentColor: n
|
|
@@ -3475,14 +3476,14 @@ function Jn({
|
|
|
3475
3476
|
}
|
|
3476
3477
|
);
|
|
3477
3478
|
}
|
|
3478
|
-
const
|
|
3479
|
+
const er = [
|
|
3479
3480
|
{ key: "settings.privacy", href: "https://nowramp.com/privacy-policy" },
|
|
3480
3481
|
{ key: "settings.terms", href: "https://nowramp.com/terms-and-conditions" }
|
|
3481
3482
|
], mt = {
|
|
3482
3483
|
background: "var(--t-surface)",
|
|
3483
3484
|
borderRadius: "var(--t-card-radius)"
|
|
3484
3485
|
};
|
|
3485
|
-
function
|
|
3486
|
+
function tr({
|
|
3486
3487
|
onClose: t,
|
|
3487
3488
|
darkMode: a,
|
|
3488
3489
|
onToggleDarkMode: n,
|
|
@@ -3497,7 +3498,7 @@ function er({
|
|
|
3497
3498
|
}) {
|
|
3498
3499
|
var y;
|
|
3499
3500
|
const { t: p, locale: f, languages: g } = Pt(), [k, N] = b(!1);
|
|
3500
|
-
return /* @__PURE__ */ l(
|
|
3501
|
+
return /* @__PURE__ */ l(Y, { children: [
|
|
3501
3502
|
/* @__PURE__ */ l("div", { className: "relative shrink-0", style: { height: 80, background: "var(--t-header-bg)", backdropFilter: "blur(var(--t-header-blur))", WebkitBackdropFilter: "blur(var(--t-header-blur))" }, children: [
|
|
3502
3503
|
/* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(we, { width: 46 }) }),
|
|
3503
3504
|
/* @__PURE__ */ e("div", { className: "absolute", style: { right: 12, top: 20 }, children: /* @__PURE__ */ e(Be, { onClick: t }) })
|
|
@@ -3523,7 +3524,7 @@ function er({
|
|
|
3523
3524
|
style: { width: 28, height: 28, borderRadius: "50%", objectFit: "cover" },
|
|
3524
3525
|
onError: () => N(!0)
|
|
3525
3526
|
}
|
|
3526
|
-
) : /* @__PURE__ */ e(
|
|
3527
|
+
) : /* @__PURE__ */ e(ar, { size: 28 }),
|
|
3527
3528
|
/* @__PURE__ */ e("span", { className: "text-[15px] font-medium", style: { color: "var(--t-text)" }, children: c || u })
|
|
3528
3529
|
] }),
|
|
3529
3530
|
/* @__PURE__ */ e(De, {})
|
|
@@ -3538,7 +3539,7 @@ function er({
|
|
|
3538
3539
|
style: { ...mt, paddingTop: 14, paddingBottom: 14 },
|
|
3539
3540
|
children: [
|
|
3540
3541
|
/* @__PURE__ */ e("span", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: p("settings.darkMode") }),
|
|
3541
|
-
/* @__PURE__ */ e(
|
|
3542
|
+
/* @__PURE__ */ e(qn, { checked: a, onChange: n })
|
|
3542
3543
|
]
|
|
3543
3544
|
}
|
|
3544
3545
|
),
|
|
@@ -3546,15 +3547,15 @@ function er({
|
|
|
3546
3547
|
"button",
|
|
3547
3548
|
{
|
|
3548
3549
|
onClick: i,
|
|
3549
|
-
className: "flex items-center justify-between w-full
|
|
3550
|
-
style: { ...mt, backgroundColor: "var(--t-surface)", color: "inherit", border: "none", cursor: "pointer",
|
|
3550
|
+
className: "flex items-center justify-between w-full transition-colors card-press",
|
|
3551
|
+
style: { ...mt, backgroundColor: "var(--t-surface)", color: "inherit", border: "none", cursor: "pointer", padding: "14px 16px", margin: 0, textAlign: "left" },
|
|
3551
3552
|
children: [
|
|
3552
3553
|
/* @__PURE__ */ e("span", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: p("settings.language") }),
|
|
3553
3554
|
/* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: ((y = g.find((E) => E.code === f)) == null ? void 0 : y.name) || f })
|
|
3554
3555
|
]
|
|
3555
3556
|
}
|
|
3556
3557
|
),
|
|
3557
|
-
|
|
3558
|
+
er.map((E) => /* @__PURE__ */ l(
|
|
3558
3559
|
"a",
|
|
3559
3560
|
{
|
|
3560
3561
|
href: E.href,
|
|
@@ -3564,7 +3565,7 @@ function er({
|
|
|
3564
3565
|
style: { ...mt, textDecoration: "none", color: "inherit", paddingTop: 14, paddingBottom: 14 },
|
|
3565
3566
|
children: [
|
|
3566
3567
|
/* @__PURE__ */ e("span", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: p(E.key) }),
|
|
3567
|
-
/* @__PURE__ */ e(
|
|
3568
|
+
/* @__PURE__ */ e(Dn, {})
|
|
3568
3569
|
]
|
|
3569
3570
|
},
|
|
3570
3571
|
E.key
|
|
@@ -3572,7 +3573,7 @@ function er({
|
|
|
3572
3573
|
] })
|
|
3573
3574
|
] });
|
|
3574
3575
|
}
|
|
3575
|
-
function
|
|
3576
|
+
function ar({ size: t = 28 }) {
|
|
3576
3577
|
return /* @__PURE__ */ l("svg", { width: t, height: t, viewBox: "0 0 40 40", fill: "none", children: [
|
|
3577
3578
|
/* @__PURE__ */ e("circle", { cx: "20", cy: "20", r: "18", stroke: "var(--t-text-secondary)", strokeWidth: "1.5", fill: "none" }),
|
|
3578
3579
|
/* @__PURE__ */ e("ellipse", { cx: "20", cy: "20", rx: "9", ry: "18", stroke: "var(--t-text-secondary)", strokeWidth: "1.5", fill: "none" }),
|
|
@@ -3580,7 +3581,7 @@ function tr({ size: t = 28 }) {
|
|
|
3580
3581
|
/* @__PURE__ */ e("path", { d: "M5 12h30M5 28h30", stroke: "var(--t-text-secondary)", strokeWidth: "1.2" })
|
|
3581
3582
|
] });
|
|
3582
3583
|
}
|
|
3583
|
-
function
|
|
3584
|
+
function nr({
|
|
3584
3585
|
onClose: t,
|
|
3585
3586
|
onSelect: a,
|
|
3586
3587
|
assetBaseUrl: n = "",
|
|
@@ -3602,12 +3603,12 @@ function ar({
|
|
|
3602
3603
|
(i) => i.name.toLowerCase().includes(d) || i.code.includes(d) || i.defaultFiat.toLowerCase().includes(d)
|
|
3603
3604
|
);
|
|
3604
3605
|
}, [s, r]);
|
|
3605
|
-
return /* @__PURE__ */ l(
|
|
3606
|
+
return /* @__PURE__ */ l(Y, { children: [
|
|
3606
3607
|
/* @__PURE__ */ l("div", { className: "relative shrink-0", style: { height: 128, background: "var(--t-header-bg)", backdropFilter: "blur(var(--t-header-blur))", WebkitBackdropFilter: "blur(var(--t-header-blur))" }, children: [
|
|
3607
3608
|
/* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(we, { width: 46 }) }),
|
|
3608
3609
|
/* @__PURE__ */ e("p", { className: "absolute text-[16px] text-center truncate", style: { top: 28, left: 64, right: 64, color: "var(--t-text)", lineHeight: "24px" }, children: o("modal.selectCountry") }),
|
|
3609
3610
|
/* @__PURE__ */ e("div", { className: "absolute", style: { right: 12, top: 20 }, children: /* @__PURE__ */ e(Be, { onClick: t }) }),
|
|
3610
|
-
/* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(
|
|
3611
|
+
/* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Xe, { value: s, onChange: u, inline: !0 }) })
|
|
3611
3612
|
] }),
|
|
3612
3613
|
/* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-3", children: [
|
|
3613
3614
|
c.map((d) => {
|
|
@@ -3619,7 +3620,7 @@ function ar({
|
|
|
3619
3620
|
className: "flex items-center w-full card-press",
|
|
3620
3621
|
style: { gap: 16 },
|
|
3621
3622
|
children: [
|
|
3622
|
-
/* @__PURE__ */ e(
|
|
3623
|
+
/* @__PURE__ */ e(rr, { code: d.code, size: 32, baseUrl: n }),
|
|
3623
3624
|
/* @__PURE__ */ l("div", { className: "flex-1 flex items-center", style: { borderBottom: "1px solid var(--t-card-border)", paddingTop: 20, paddingBottom: 20, gap: 10 }, children: [
|
|
3624
3625
|
/* @__PURE__ */ e("span", { className: "flex-1 text-[18px] text-left", style: { color: "var(--t-text)", lineHeight: "20px" }, children: d.name }),
|
|
3625
3626
|
i && /* @__PURE__ */ e("div", { style: { width: 40, height: 20, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
|
|
@@ -3642,7 +3643,7 @@ function ar({
|
|
|
3642
3643
|
] })
|
|
3643
3644
|
] });
|
|
3644
3645
|
}
|
|
3645
|
-
function
|
|
3646
|
+
function rr({ code: t, size: a = 32, baseUrl: n = "" }) {
|
|
3646
3647
|
const [r, o] = b(!1);
|
|
3647
3648
|
return r ? /* @__PURE__ */ e(
|
|
3648
3649
|
"div",
|
|
@@ -3672,7 +3673,7 @@ function nr({ code: t, size: a = 32, baseUrl: n = "" }) {
|
|
|
3672
3673
|
}
|
|
3673
3674
|
);
|
|
3674
3675
|
}
|
|
3675
|
-
function
|
|
3676
|
+
function or({
|
|
3676
3677
|
onClose: t,
|
|
3677
3678
|
onSelect: a,
|
|
3678
3679
|
selectedCode: n
|
|
@@ -3693,12 +3694,12 @@ function rr({
|
|
|
3693
3694
|
(d) => d.name.toLowerCase().includes(c) || d.english.toLowerCase().includes(c) || d.code.includes(c)
|
|
3694
3695
|
);
|
|
3695
3696
|
}, [o, n]);
|
|
3696
|
-
return /* @__PURE__ */ l(
|
|
3697
|
+
return /* @__PURE__ */ l(Y, { children: [
|
|
3697
3698
|
/* @__PURE__ */ l("div", { className: "relative shrink-0", style: { height: 128, background: "var(--t-header-bg)", backdropFilter: "blur(var(--t-header-blur))", WebkitBackdropFilter: "blur(var(--t-header-blur))" }, children: [
|
|
3698
3699
|
/* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(we, { width: 46 }) }),
|
|
3699
3700
|
/* @__PURE__ */ e("p", { className: "absolute text-[16px] text-center truncate", style: { top: 28, left: 64, right: 64, color: "var(--t-text)", lineHeight: "24px" }, children: r("modal.selectLanguage") }),
|
|
3700
3701
|
/* @__PURE__ */ e("div", { className: "absolute", style: { right: 12, top: 20 }, children: /* @__PURE__ */ e(Be, { onClick: t }) }),
|
|
3701
|
-
/* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(
|
|
3702
|
+
/* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Xe, { value: o, onChange: s, inline: !0 }) })
|
|
3702
3703
|
] }),
|
|
3703
3704
|
/* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-3", children: [
|
|
3704
3705
|
u.map((c) => {
|
|
@@ -3731,7 +3732,7 @@ function rr({
|
|
|
3731
3732
|
] })
|
|
3732
3733
|
] });
|
|
3733
3734
|
}
|
|
3734
|
-
function
|
|
3735
|
+
function ir({
|
|
3735
3736
|
tab: t,
|
|
3736
3737
|
onTabSwitch: a,
|
|
3737
3738
|
showFlowToggle: n,
|
|
@@ -3795,12 +3796,12 @@ function or({
|
|
|
3795
3796
|
]
|
|
3796
3797
|
}
|
|
3797
3798
|
) : /* @__PURE__ */ e("div", {}),
|
|
3798
|
-
/* @__PURE__ */ e("div", { style: { width: 40, display: "flex", alignItems: "center", justifyContent: "flex-end" }, children: r ? /* @__PURE__ */ e(
|
|
3799
|
+
/* @__PURE__ */ e("div", { style: { width: 40, display: "flex", alignItems: "center", justifyContent: "flex-end" }, children: r ? /* @__PURE__ */ e(Kn, { onClick: o }) : /* @__PURE__ */ e("div", { style: { width: 40 } }) })
|
|
3799
3800
|
]
|
|
3800
3801
|
}
|
|
3801
3802
|
);
|
|
3802
3803
|
}
|
|
3803
|
-
function
|
|
3804
|
+
function lr({
|
|
3804
3805
|
amount: t,
|
|
3805
3806
|
onAmountChange: a,
|
|
3806
3807
|
currencyCode: n,
|
|
@@ -3818,9 +3819,9 @@ function ir({
|
|
|
3818
3819
|
focused: k,
|
|
3819
3820
|
onFocus: N
|
|
3820
3821
|
}) {
|
|
3821
|
-
var E, V,
|
|
3822
|
+
var E, V, X;
|
|
3822
3823
|
const y = O();
|
|
3823
|
-
return /* @__PURE__ */ l(
|
|
3824
|
+
return /* @__PURE__ */ l(Y, { children: [
|
|
3824
3825
|
/* @__PURE__ */ l(
|
|
3825
3826
|
"div",
|
|
3826
3827
|
{
|
|
@@ -3900,9 +3901,9 @@ function ir({
|
|
|
3900
3901
|
backdropFilter: "blur(4px)",
|
|
3901
3902
|
WebkitBackdropFilter: "blur(4px)"
|
|
3902
3903
|
},
|
|
3903
|
-
disabled: !!((
|
|
3904
|
+
disabled: !!((X = c == null ? void 0 : c.destinationCurrency) != null && X.locked),
|
|
3904
3905
|
children: [
|
|
3905
|
-
/* @__PURE__ */ e(
|
|
3906
|
+
/* @__PURE__ */ e(Ra, { ticker: n, size: 24, baseUrl: s }),
|
|
3906
3907
|
/* @__PURE__ */ e("span", { className: "text-[14px] font-semibold", style: { color: "var(--t-text)", letterSpacing: "0.14px", lineHeight: "24px" }, children: n }),
|
|
3907
3908
|
/* @__PURE__ */ e(De, {})
|
|
3908
3909
|
]
|
|
@@ -3930,19 +3931,19 @@ function ir({
|
|
|
3930
3931
|
u && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 text-center", style: { color: "var(--t-error)" }, children: u })
|
|
3931
3932
|
] });
|
|
3932
3933
|
}
|
|
3933
|
-
function
|
|
3934
|
+
function cr({ char: t, height: a = 38 }) {
|
|
3934
3935
|
const n = "0123456789", r = n.indexOf(t);
|
|
3935
3936
|
return r === -1 ? /* @__PURE__ */ e("span", { style: { display: "inline-block", textAlign: "center" }, children: t }) : /* @__PURE__ */ e("span", { className: "digit-slot", style: { height: a, lineHeight: `${a}px`, textAlign: "center" }, children: /* @__PURE__ */ e("span", { className: "digit-slot-inner block", style: { transform: `translateY(-${r * a}px)` }, children: n.split("").map((o) => /* @__PURE__ */ e("span", { className: "block", style: { height: a, lineHeight: `${a}px` }, children: o }, o)) }) });
|
|
3936
3937
|
}
|
|
3937
|
-
function
|
|
3938
|
+
function sr({
|
|
3938
3939
|
value: t,
|
|
3939
3940
|
height: a = 38,
|
|
3940
3941
|
className: n = "",
|
|
3941
3942
|
style: r = {}
|
|
3942
3943
|
}) {
|
|
3943
|
-
return /* @__PURE__ */ e("span", { className: n, style: { display: "inline-flex", fontVariantNumeric: "tabular-nums", ...r }, children: t.split("").map((o, s) => /* @__PURE__ */ e(
|
|
3944
|
+
return /* @__PURE__ */ e("span", { className: n, style: { display: "inline-flex", fontVariantNumeric: "tabular-nums", ...r }, children: t.split("").map((o, s) => /* @__PURE__ */ e(cr, { char: o, height: a }, s)) });
|
|
3944
3945
|
}
|
|
3945
|
-
function
|
|
3946
|
+
function dr({
|
|
3946
3947
|
amount: t,
|
|
3947
3948
|
currencyCode: a,
|
|
3948
3949
|
chainCode: n,
|
|
@@ -3975,7 +3976,7 @@ function sr({
|
|
|
3975
3976
|
/* @__PURE__ */ l("div", { className: "flex flex-col gap-[8px]", children: [
|
|
3976
3977
|
/* @__PURE__ */ l("div", { className: "flex items-start justify-between", children: [
|
|
3977
3978
|
/* @__PURE__ */ e("div", { className: k ? "rate-flash" : "", children: /* @__PURE__ */ e(
|
|
3978
|
-
|
|
3979
|
+
sr,
|
|
3979
3980
|
{
|
|
3980
3981
|
value: p > 0 ? t : "0",
|
|
3981
3982
|
height: 32,
|
|
@@ -4004,7 +4005,7 @@ function sr({
|
|
|
4004
4005
|
},
|
|
4005
4006
|
disabled: !!((y = h == null ? void 0 : h.destinationCurrency) != null && y.locked),
|
|
4006
4007
|
children: [
|
|
4007
|
-
/* @__PURE__ */ e(
|
|
4008
|
+
/* @__PURE__ */ e(Ra, { ticker: a, size: 24, baseUrl: c }),
|
|
4008
4009
|
/* @__PURE__ */ e("span", { className: "text-[14px] font-semibold", style: { color: "var(--t-text)", letterSpacing: "0.14px", lineHeight: "24px" }, children: a }),
|
|
4009
4010
|
/* @__PURE__ */ e(De, {})
|
|
4010
4011
|
]
|
|
@@ -4035,10 +4036,10 @@ function sr({
|
|
|
4035
4036
|
)
|
|
4036
4037
|
] }),
|
|
4037
4038
|
/* @__PURE__ */ l("div", { className: "flex items-center justify-between", children: [
|
|
4038
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-[4px]", children: d && !g ? /* @__PURE__ */ l(
|
|
4039
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-[4px]", children: d && !g ? /* @__PURE__ */ l(Y, { children: [
|
|
4039
4040
|
/* @__PURE__ */ e(Se, { size: 12 }),
|
|
4040
4041
|
/* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { color: "var(--t-text-muted)", letterSpacing: "0.22px", lineHeight: "12px" }, children: N("receive.fetchingRate") })
|
|
4041
|
-
] }) : /* @__PURE__ */ l(
|
|
4042
|
+
] }) : /* @__PURE__ */ l(Y, { children: [
|
|
4042
4043
|
/* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { color: "var(--t-text-muted)", letterSpacing: "0.22px", lineHeight: "12px" }, children: u || " " }),
|
|
4043
4044
|
u && /* @__PURE__ */ e(
|
|
4044
4045
|
"button",
|
|
@@ -4069,7 +4070,7 @@ function sr({
|
|
|
4069
4070
|
}
|
|
4070
4071
|
);
|
|
4071
4072
|
}
|
|
4072
|
-
function
|
|
4073
|
+
function ur({
|
|
4073
4074
|
selectedMethod: t,
|
|
4074
4075
|
onOpenModal: a,
|
|
4075
4076
|
getMethodIcon: n,
|
|
@@ -4093,7 +4094,7 @@ function dr({
|
|
|
4093
4094
|
children: [
|
|
4094
4095
|
/* @__PURE__ */ e("span", { className: "text-[13px] flex-1", style: { color: "var(--t-text-secondary)", letterSpacing: "0.13px", lineHeight: "20px" }, children: o("payment.label") }),
|
|
4095
4096
|
/* @__PURE__ */ l("span", { className: "flex items-center gap-[6px]", children: [
|
|
4096
|
-
t && /* @__PURE__ */ l(
|
|
4097
|
+
t && /* @__PURE__ */ l(Y, { children: [
|
|
4097
4098
|
/* @__PURE__ */ e("span", { className: "flex items-center justify-center", style: { width: 20, height: 20 }, children: n(t.id, t.icon, 20) }),
|
|
4098
4099
|
/* @__PURE__ */ e("span", { className: "text-[14px] font-semibold", style: { color: "var(--t-text)", letterSpacing: "0.14px", lineHeight: "16px" }, children: r(t.id, t.name) })
|
|
4099
4100
|
] }),
|
|
@@ -4104,7 +4105,7 @@ function dr({
|
|
|
4104
4105
|
}
|
|
4105
4106
|
);
|
|
4106
4107
|
}
|
|
4107
|
-
function
|
|
4108
|
+
function mr({
|
|
4108
4109
|
address: t,
|
|
4109
4110
|
onChange: a,
|
|
4110
4111
|
placeholder: n,
|
|
@@ -4186,7 +4187,7 @@ function ur({
|
|
|
4186
4187
|
r && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 text-center", style: { color: "var(--t-error)" }, children: r })
|
|
4187
4188
|
] });
|
|
4188
4189
|
}
|
|
4189
|
-
function
|
|
4190
|
+
function pr({ label: t, disabled: a, loading: n, onClick: r }) {
|
|
4190
4191
|
return /* @__PURE__ */ e(
|
|
4191
4192
|
"button",
|
|
4192
4193
|
{
|
|
@@ -4217,14 +4218,14 @@ function mr({ label: t, disabled: a, loading: n, onClick: r }) {
|
|
|
4217
4218
|
}
|
|
4218
4219
|
);
|
|
4219
4220
|
}
|
|
4220
|
-
function
|
|
4221
|
+
function hr() {
|
|
4221
4222
|
const t = O();
|
|
4222
4223
|
return /* @__PURE__ */ l("div", { className: "text-center py-3", style: { height: 16, lineHeight: "16px" }, children: [
|
|
4223
4224
|
/* @__PURE__ */ e("span", { style: { fontSize: 9, opacity: 0.5, color: "var(--t-text)", letterSpacing: "0.27px" }, children: t("footer.poweredBy") }),
|
|
4224
4225
|
/* @__PURE__ */ e("span", { style: { fontSize: 9, opacity: 0.65, color: "var(--t-text)", letterSpacing: "0.27px" }, children: t("footer.brand") })
|
|
4225
4226
|
] });
|
|
4226
4227
|
}
|
|
4227
|
-
function
|
|
4228
|
+
function fr({
|
|
4228
4229
|
quote: t,
|
|
4229
4230
|
isOpen: a,
|
|
4230
4231
|
onClose: n,
|
|
@@ -4240,7 +4241,7 @@ function hr({
|
|
|
4240
4241
|
};
|
|
4241
4242
|
return /* @__PURE__ */ l("div", { className: "px-5 py-5", children: [
|
|
4242
4243
|
/* @__PURE__ */ l("div", { className: "flex items-center justify-between mb-3", children: [
|
|
4243
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: o ? /* @__PURE__ */ e(Se, { size: 16 }) : /* @__PURE__ */ l(
|
|
4244
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: o ? /* @__PURE__ */ e(Se, { size: 16 }) : /* @__PURE__ */ l(Y, { children: [
|
|
4244
4245
|
/* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: s("rate.updatesInLabel") }),
|
|
4245
4246
|
/* @__PURE__ */ l(
|
|
4246
4247
|
"span",
|
|
@@ -4325,7 +4326,7 @@ function hr({
|
|
|
4325
4326
|
] }) : /* @__PURE__ */ e("div", { className: "text-[13px] py-4 text-center", style: { color: "var(--t-text-muted)" }, children: s("rate.noQuote") })
|
|
4326
4327
|
] });
|
|
4327
4328
|
}
|
|
4328
|
-
function
|
|
4329
|
+
function yr({
|
|
4329
4330
|
className: t = "",
|
|
4330
4331
|
theme: a = "dark",
|
|
4331
4332
|
skinId: n = "mono",
|
|
@@ -4345,7 +4346,7 @@ function fr({
|
|
|
4345
4346
|
showThemeToggle: y = !0,
|
|
4346
4347
|
autoRedirect: E = !1,
|
|
4347
4348
|
explorerUrl: V,
|
|
4348
|
-
doneButtonText:
|
|
4349
|
+
doneButtonText: X,
|
|
4349
4350
|
supportEmail: z,
|
|
4350
4351
|
stablecoinParity: ie,
|
|
4351
4352
|
partnerName: J,
|
|
@@ -4375,7 +4376,7 @@ function fr({
|
|
|
4375
4376
|
selectionUnsupported: he,
|
|
4376
4377
|
quotesEmpty: j,
|
|
4377
4378
|
bestUnavailableReason: He
|
|
4378
|
-
} =
|
|
4379
|
+
} = Ye(), { locale: Qe, setLocale: gt } = Pt(), [se, Pe] = b(a === "dark"), [Ee, xt] = b(n), [ue, W] = b(null), [it, G] = b(!1), [vt, ze] = b(!1), [Re, lt] = b(!1), [Oe, Je] = b(!1), [qe, Ae] = b(null), [et, Ct] = b(!0), [bt, ct] = b(!1), [v, A] = b(!1), [T, F] = b(null), [U, Z] = b(!1), [Ke, Te] = b(30), [Aa, jt] = b(!1), [Ta, Wt] = b(!1), [La, Gt] = b(!1), Fa = M(null), St = M(), wt = M(S.flowType), Ua = ee ?? 640;
|
|
4379
4380
|
H(() => {
|
|
4380
4381
|
Pe(a === "dark");
|
|
4381
4382
|
}, [a]), H(() => {
|
|
@@ -4389,7 +4390,7 @@ function fr({
|
|
|
4389
4390
|
}
|
|
4390
4391
|
wt.current = S.flowType;
|
|
4391
4392
|
}, [S.flowType, et]);
|
|
4392
|
-
const st = S.flowType, B = st === "buy", re = S.cryptoCurrency || "BTC", fe = S.fiatCurrency || "USD", kt = B ? S.fiatAmount : S.cryptoAmount, oe =
|
|
4393
|
+
const st = S.flowType, B = st === "buy", re = S.cryptoCurrency || "BTC", fe = S.fiatCurrency || "USD", kt = B ? S.fiatAmount : S.cryptoAmount, oe = Rn(kt), ve = (na = R == null ? void 0 : R.bestQuote) != null && na.exchangeRate ? parseFloat(R.bestQuote.exchangeRate) : null, tt = M(null);
|
|
4393
4394
|
ve && re && fe && (tt.current = { rate: ve, crypto: re, fiat: fe }), H(() => {
|
|
4394
4395
|
(j || ae) && (tt.current = null);
|
|
4395
4396
|
}, [j, ae]);
|
|
@@ -4408,7 +4409,7 @@ function fr({
|
|
|
4408
4409
|
}
|
|
4409
4410
|
Nt.current = Le;
|
|
4410
4411
|
}, [Le]);
|
|
4411
|
-
const at = !!(ie && J && B &&
|
|
4412
|
+
const at = !!(ie && J && B && Na(re) && ve), Ia = at && re.toUpperCase().includes(fe.toUpperCase()), Zt = at && oe > 0 ? It(Ia ? oe : oe / ve) : null, Ma = at && Zt ? Zt : Le, Da = _(() => {
|
|
4412
4413
|
var $, Ue, je;
|
|
4413
4414
|
const x = ve || (($ = tt.current) == null ? void 0 : $.rate), C = ve ? re : (Ue = tt.current) == null ? void 0 : Ue.crypto, K = ve ? fe : (je = tt.current) == null ? void 0 : je.fiat;
|
|
4414
4415
|
return !x || !C || !K ? "" : `1 ${C} ≈ ${x.toFixed(2)} ${K}`;
|
|
@@ -4434,8 +4435,8 @@ function fr({
|
|
|
4434
4435
|
Ae(!0), D({ type: "SET_WALLET_ERROR", message: "" });
|
|
4435
4436
|
else {
|
|
4436
4437
|
Ae(!1);
|
|
4437
|
-
const
|
|
4438
|
-
D({ type: "SET_WALLET_ERROR", message:
|
|
4438
|
+
const Ja = ((Ue = Lt.errors) == null ? void 0 : Ue[0]) || ((je = Lt.details) == null ? void 0 : je.formatMessage) || L("wallet.invalidServer");
|
|
4439
|
+
D({ type: "SET_WALLET_ERROR", message: Ja });
|
|
4439
4440
|
}
|
|
4440
4441
|
} catch (At) {
|
|
4441
4442
|
if (At instanceof DOMException && At.name === "AbortError") return;
|
|
@@ -4447,39 +4448,39 @@ function fr({
|
|
|
4447
4448
|
clearTimeout(St.current), K.abort();
|
|
4448
4449
|
};
|
|
4449
4450
|
}, [S.walletAddress, S.network, ce.apiUrl]);
|
|
4450
|
-
const Et = !kt || oe === 0,
|
|
4451
|
+
const Et = !kt || oe === 0, Yt = oe > 0 && (B ? oe < ma : oe < pa), Xt = !!xe || Yt || it && Et, Ba = oe > 0 && !xe && !Yt, $t = S.walletAddress.trim().length >= 10 && qe !== !1 && !Oe, Qt = Ba && $t && !!S.cryptoCurrency && !!S.network, Ha = (x) => {
|
|
4451
4452
|
let C = x.target.value.replace(/[^0-9.,]/g, "");
|
|
4452
4453
|
const K = B ? 2 : 6, $ = C.indexOf(".");
|
|
4453
4454
|
$ !== -1 && C.length - $ - 1 > K && (C = C.slice(0, $ + K + 1)), D(B ? { type: "SET_FIAT_AMOUNT", amount: C } : { type: "SET_CRYPTO_AMOUNT", amount: C });
|
|
4454
|
-
},
|
|
4455
|
+
}, Pa = (x) => {
|
|
4455
4456
|
x !== st && D({ type: "SET_FLOW_TYPE", flowType: x, fieldLocks: le });
|
|
4456
|
-
},
|
|
4457
|
+
}, Oa = P(
|
|
4457
4458
|
(x) => {
|
|
4458
4459
|
D({ type: "SET_FIAT_CURRENCY", currency: x });
|
|
4459
4460
|
},
|
|
4460
4461
|
[D]
|
|
4461
|
-
),
|
|
4462
|
+
), Ka = P(
|
|
4462
4463
|
(x, C) => {
|
|
4463
4464
|
D({ type: "SET_CRYPTO_CURRENCY", currency: x }), D({ type: "SET_CRYPTO_CHAIN", chain: C });
|
|
4464
4465
|
},
|
|
4465
4466
|
[D]
|
|
4466
|
-
),
|
|
4467
|
+
), _a = P(
|
|
4467
4468
|
(x) => {
|
|
4468
4469
|
D({ type: "SET_PAYMENT_METHOD", methodId: x });
|
|
4469
4470
|
},
|
|
4470
4471
|
[D]
|
|
4471
|
-
),
|
|
4472
|
+
), Va = P(
|
|
4472
4473
|
(x) => {
|
|
4473
4474
|
D({ type: "SET_COUNTRY", country: x }), W(null);
|
|
4474
4475
|
},
|
|
4475
4476
|
[D]
|
|
4476
|
-
),
|
|
4477
|
+
), ja = P(() => {
|
|
4477
4478
|
W(null), setTimeout(() => W("country"), 280);
|
|
4478
|
-
}, []),
|
|
4479
|
+
}, []), Wa = P(() => {
|
|
4479
4480
|
W(null), setTimeout(() => W("language"), 280);
|
|
4480
|
-
}, []),
|
|
4481
|
+
}, []), Ga = S.country ? (ra = Bt[S.country.toLowerCase()]) == null ? void 0 : ra.name : void 0, Za = () => {
|
|
4481
4482
|
if (!Qt) {
|
|
4482
|
-
(
|
|
4483
|
+
(Xt || Et) && (G(!0), Wt(!0), setTimeout(() => Wt(!1), 400));
|
|
4483
4484
|
return;
|
|
4484
4485
|
}
|
|
4485
4486
|
A(!0), me();
|
|
@@ -4520,10 +4521,10 @@ function fr({
|
|
|
4520
4521
|
}, [U, _e, me]), H(() => {
|
|
4521
4522
|
U && _e && !w && Te(30);
|
|
4522
4523
|
}, [w, U, _e]);
|
|
4523
|
-
const Jt = se ? "theme-dark" : "theme-light", dt = da.find((x) => x.id === Ee) || da[0],
|
|
4524
|
+
const Jt = se ? "theme-dark" : "theme-light", dt = da.find((x) => x.id === Ee) || da[0], Ya = dt.accent === null, Xa = r ? ye(r) : !1, qt = (x) => {
|
|
4524
4525
|
const C = x.replace("#", ""), K = parseInt(C.substring(0, 2), 16), $ = parseInt(C.substring(2, 4), 16), Ue = parseInt(C.substring(4, 6), 16);
|
|
4525
4526
|
return (0.299 * K + 0.587 * $ + 0.114 * Ue) / 255 > 0.5 ? "#000000" : "#ffffff";
|
|
4526
|
-
}, ea = Xa ? { "--t-accent": r, "--t-cta-bg": r, "--t-cta-text": qt(r) } :
|
|
4527
|
+
}, ea = Xa ? { "--t-accent": r, "--t-cta-bg": r, "--t-cta-text": qt(r) } : Ya ? {
|
|
4527
4528
|
"--t-accent": se ? "#ffffff" : "#111111",
|
|
4528
4529
|
"--t-cta-bg": se ? "#ffffff" : "#111111",
|
|
4529
4530
|
"--t-cta-text": se ? "#000000" : "#ffffff"
|
|
@@ -4537,14 +4538,14 @@ function fr({
|
|
|
4537
4538
|
o && ye(o) ? Fe.backgroundColor = o : Fe.backgroundColor = "var(--t-bg)", s && (s.startsWith("https://") || s.startsWith("data:image/")) && (Fe.backgroundImage = `url(${s})`, Fe.backgroundSize = "cover", Fe.backgroundPosition = "center");
|
|
4538
4539
|
const ut = {};
|
|
4539
4540
|
u && ye(u) && (ut.border = `1px solid ${u}`), c && (ut.borderRadius = c);
|
|
4540
|
-
const nt = S.network, Ve = nt ? ht(nt) : null, ta = (Ve == null ? void 0 : Ve.shortName) || (Ve == null ? void 0 : Ve.name) || nt,
|
|
4541
|
+
const nt = S.network, Ve = nt ? ht(nt) : null, ta = (Ve == null ? void 0 : Ve.shortName) || (Ve == null ? void 0 : Ve.name) || nt, $a = it && Xt ? xe || (Et ? L("error.amountZero") : B ? L("error.minAmountFiat", { min: String(ma), currency: fe }) : L("error.minAmountCrypto", { min: String(pa), currency: re })) : void 0, Qa = S.walletError ? S.walletError : vt && !$t && !Oe ? L("wallet.invalid") : void 0, Rt = ne.filter((x) => x.supportedFiats.includes(S.fiatCurrency)), za = Rt.find((x) => x.id === S.paymentMethodId) || Rt[0], aa = S.step === "checkout" ? /* @__PURE__ */ e(xn, { autoRedirect: E }) : S.step === "processing" ? /* @__PURE__ */ e(Cn, {}) : S.step === "complete" ? /* @__PURE__ */ e(bn, { explorerUrl: V, doneButtonText: X, onDone: te }) : S.step === "error" ? /* @__PURE__ */ e(Sn, { supportEmail: z, onDone: te, doneButtonText: X }) : S.step === "confirm" ? /* @__PURE__ */ e(Tn, { stablecoinParity: at, partnerName: J }) : null;
|
|
4541
4542
|
return aa ? /* @__PURE__ */ e(
|
|
4542
4543
|
"div",
|
|
4543
4544
|
{
|
|
4544
4545
|
className: `${Jt} relative w-full max-w-[390px] overflow-hidden flex flex-col select-none transition-colors duration-[400ms] ${t}`,
|
|
4545
4546
|
style: {
|
|
4546
4547
|
fontFamily: "'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
|
|
4547
|
-
height:
|
|
4548
|
+
height: Ua,
|
|
4548
4549
|
borderRadius: "var(--t-container-radius)",
|
|
4549
4550
|
...Fe,
|
|
4550
4551
|
...ea,
|
|
@@ -4568,50 +4569,50 @@ function fr({
|
|
|
4568
4569
|
},
|
|
4569
4570
|
children: [
|
|
4570
4571
|
/* @__PURE__ */ e(
|
|
4571
|
-
|
|
4572
|
+
ir,
|
|
4572
4573
|
{
|
|
4573
4574
|
tab: st,
|
|
4574
|
-
onTabSwitch:
|
|
4575
|
+
onTabSwitch: Pa,
|
|
4575
4576
|
showFlowToggle: k,
|
|
4576
4577
|
showSettings: N,
|
|
4577
4578
|
onOpenSettings: () => W("settings"),
|
|
4578
4579
|
darkMode: se
|
|
4579
4580
|
}
|
|
4580
4581
|
),
|
|
4581
|
-
et || bt || I ? /* @__PURE__ */ e("div", { className: "pt-[80px] px-3 flex-1 flex flex-col", children: I ? /* @__PURE__ */ e(
|
|
4582
|
+
et || bt || I ? /* @__PURE__ */ e("div", { className: "pt-[80px] px-3 flex-1 flex flex-col", children: I ? /* @__PURE__ */ e(Ln, {}) : /* @__PURE__ */ e(Wn, {}) }) : /* @__PURE__ */ l("div", { className: "flex-1 overflow-hidden pt-[80px] px-3 flex flex-col gap-1 tab-fade-in", children: [
|
|
4582
4583
|
/* @__PURE__ */ e(
|
|
4583
|
-
|
|
4584
|
+
lr,
|
|
4584
4585
|
{
|
|
4585
4586
|
amount: kt,
|
|
4586
|
-
onAmountChange:
|
|
4587
|
+
onAmountChange: Ha,
|
|
4587
4588
|
currencyCode: B ? fe : re,
|
|
4588
4589
|
isBuy: B,
|
|
4589
4590
|
onOpenModal: () => W(B ? "fiat" : "crypto"),
|
|
4590
4591
|
assetBaseUrl: q,
|
|
4591
|
-
error:
|
|
4592
|
+
error: $a,
|
|
4592
4593
|
fieldLocks: le,
|
|
4593
4594
|
onFocus: () => Gt(!0),
|
|
4594
4595
|
onBlur: () => {
|
|
4595
4596
|
Gt(!1), G(!0);
|
|
4596
4597
|
},
|
|
4597
|
-
inputRef:
|
|
4598
|
+
inputRef: Fa,
|
|
4598
4599
|
chainCode: B ? void 0 : nt,
|
|
4599
4600
|
chainDisplay: B ? void 0 : ta,
|
|
4600
4601
|
getChainIconUrl: B ? void 0 : Ut,
|
|
4601
|
-
shaking:
|
|
4602
|
-
focused:
|
|
4602
|
+
shaking: Ta,
|
|
4603
|
+
focused: La
|
|
4603
4604
|
}
|
|
4604
4605
|
),
|
|
4605
4606
|
/* @__PURE__ */ e(
|
|
4606
|
-
|
|
4607
|
+
dr,
|
|
4607
4608
|
{
|
|
4608
|
-
amount:
|
|
4609
|
+
amount: Ma,
|
|
4609
4610
|
currencyCode: B ? re : fe,
|
|
4610
4611
|
chainCode: B ? nt : void 0,
|
|
4611
4612
|
chainDisplay: B ? ta : void 0,
|
|
4612
4613
|
isBuy: B,
|
|
4613
4614
|
onOpenModal: () => W(B ? "crypto" : "fiat"),
|
|
4614
|
-
displayRate:
|
|
4615
|
+
displayRate: Da,
|
|
4615
4616
|
assetBaseUrl: q,
|
|
4616
4617
|
quotesLoading: w,
|
|
4617
4618
|
onOpenRateBreakdown: () => Z(!0),
|
|
@@ -4619,7 +4620,7 @@ function fr({
|
|
|
4619
4620
|
spendNumeric: oe,
|
|
4620
4621
|
getChainIconUrl: B ? Ut : void 0,
|
|
4621
4622
|
autoSelectPending: v,
|
|
4622
|
-
rateFlash:
|
|
4623
|
+
rateFlash: Aa
|
|
4623
4624
|
}
|
|
4624
4625
|
),
|
|
4625
4626
|
j && oe > 0 && /* @__PURE__ */ e(
|
|
@@ -4645,9 +4646,9 @@ function fr({
|
|
|
4645
4646
|
}
|
|
4646
4647
|
),
|
|
4647
4648
|
(ne.length > 0 || (m == null ? void 0 : m.paymentMethods) && m.paymentMethods.length > 0) && (Rt.length > 0 ? /* @__PURE__ */ e(
|
|
4648
|
-
|
|
4649
|
+
ur,
|
|
4649
4650
|
{
|
|
4650
|
-
selectedMethod:
|
|
4651
|
+
selectedMethod: za,
|
|
4651
4652
|
onOpenModal: () => W("payment"),
|
|
4652
4653
|
darkMode: se,
|
|
4653
4654
|
getMethodIcon: Vt,
|
|
@@ -4666,13 +4667,13 @@ function fr({
|
|
|
4666
4667
|
}
|
|
4667
4668
|
)),
|
|
4668
4669
|
/* @__PURE__ */ e(
|
|
4669
|
-
|
|
4670
|
+
mr,
|
|
4670
4671
|
{
|
|
4671
4672
|
address: S.walletAddress,
|
|
4672
4673
|
onChange: (x) => D({ type: "SET_WALLET_ADDRESS", address: x }),
|
|
4673
4674
|
placeholder: L(B ? "wallet.placeholderBuy" : "wallet.placeholderSell"),
|
|
4674
4675
|
isBuy: B,
|
|
4675
|
-
error:
|
|
4676
|
+
error: Qa,
|
|
4676
4677
|
validating: Oe,
|
|
4677
4678
|
disabled: !!((oa = le == null ? void 0 : le.destinationAddress) != null && oa.locked),
|
|
4678
4679
|
onFocus: () => lt(!0),
|
|
@@ -4686,19 +4687,19 @@ function fr({
|
|
|
4686
4687
|
he && /* @__PURE__ */ e("div", { className: "text-[12px] text-center mb-2", style: { color: "var(--t-error)" }, children: L(B ? "error.currencyUnavailableBuy" : "error.currencyUnavailableSell") }),
|
|
4687
4688
|
/* @__PURE__ */ l("div", { className: "flex flex-col gap-3 pb-3", children: [
|
|
4688
4689
|
/* @__PURE__ */ e(
|
|
4689
|
-
|
|
4690
|
+
pr,
|
|
4690
4691
|
{
|
|
4691
4692
|
label: B ? L("cta.buy", { crypto: re }) : L("cta.sell", { crypto: re }),
|
|
4692
4693
|
disabled: !Qt || Ne || v || he || j,
|
|
4693
4694
|
loading: Ne || v,
|
|
4694
|
-
onClick:
|
|
4695
|
+
onClick: Za
|
|
4695
4696
|
}
|
|
4696
4697
|
),
|
|
4697
|
-
/* @__PURE__ */ e(
|
|
4698
|
+
/* @__PURE__ */ e(hr, {})
|
|
4698
4699
|
] })
|
|
4699
4700
|
] }, st),
|
|
4700
4701
|
T && /* @__PURE__ */ e(
|
|
4701
|
-
|
|
4702
|
+
jn,
|
|
4702
4703
|
{
|
|
4703
4704
|
type: T.type,
|
|
4704
4705
|
title: T.title,
|
|
@@ -4707,8 +4708,8 @@ function fr({
|
|
|
4707
4708
|
onDismiss: () => F(null)
|
|
4708
4709
|
}
|
|
4709
4710
|
),
|
|
4710
|
-
/* @__PURE__ */ e(
|
|
4711
|
-
|
|
4711
|
+
/* @__PURE__ */ e(Gn, { isOpen: U, onClose: () => Z(!1), children: /* @__PURE__ */ e(
|
|
4712
|
+
fr,
|
|
4712
4713
|
{
|
|
4713
4714
|
quote: (R == null ? void 0 : R.bestQuote) || null,
|
|
4714
4715
|
isOpen: U,
|
|
@@ -4718,11 +4719,11 @@ function fr({
|
|
|
4718
4719
|
}
|
|
4719
4720
|
) }),
|
|
4720
4721
|
/* @__PURE__ */ e(Ge, { isOpen: ue === "fiat", onClose: () => W(null), children: (x) => /* @__PURE__ */ e(
|
|
4721
|
-
|
|
4722
|
+
Yn,
|
|
4722
4723
|
{
|
|
4723
4724
|
onClose: x,
|
|
4724
4725
|
onSelect: (C) => {
|
|
4725
|
-
|
|
4726
|
+
Oa(C), x();
|
|
4726
4727
|
},
|
|
4727
4728
|
currencies: pe.map((C) => ({ code: C.code, name: C.code })),
|
|
4728
4729
|
assetBaseUrl: q,
|
|
@@ -4734,7 +4735,7 @@ function fr({
|
|
|
4734
4735
|
{
|
|
4735
4736
|
onClose: x,
|
|
4736
4737
|
onSelect: (C, K) => {
|
|
4737
|
-
|
|
4738
|
+
Ka(C, K), x();
|
|
4738
4739
|
},
|
|
4739
4740
|
cryptos: $e.map((C) => {
|
|
4740
4741
|
var K;
|
|
@@ -4750,18 +4751,18 @@ function fr({
|
|
|
4750
4751
|
}
|
|
4751
4752
|
) }),
|
|
4752
4753
|
/* @__PURE__ */ e(Ge, { isOpen: ue === "payment", onClose: () => W(null), children: (x) => /* @__PURE__ */ e(
|
|
4753
|
-
|
|
4754
|
+
Jn,
|
|
4754
4755
|
{
|
|
4755
4756
|
methods: ne,
|
|
4756
4757
|
selectedId: S.paymentMethodId,
|
|
4757
4758
|
onSelect: (C) => {
|
|
4758
|
-
|
|
4759
|
+
_a(C), x();
|
|
4759
4760
|
},
|
|
4760
4761
|
onClose: x
|
|
4761
4762
|
}
|
|
4762
4763
|
) }),
|
|
4763
4764
|
/* @__PURE__ */ e(Ge, { isOpen: ue === "settings", onClose: () => W(null), children: (x) => /* @__PURE__ */ e(
|
|
4764
|
-
|
|
4765
|
+
tr,
|
|
4765
4766
|
{
|
|
4766
4767
|
onClose: x,
|
|
4767
4768
|
darkMode: se,
|
|
@@ -4772,25 +4773,25 @@ function fr({
|
|
|
4772
4773
|
},
|
|
4773
4774
|
showThemeToggle: y,
|
|
4774
4775
|
country: S.country,
|
|
4775
|
-
countryName:
|
|
4776
|
-
onLocationPress:
|
|
4777
|
-
onLanguagePress:
|
|
4776
|
+
countryName: Ga,
|
|
4777
|
+
onLocationPress: ja,
|
|
4778
|
+
onLanguagePress: Wa,
|
|
4778
4779
|
assetBaseUrl: q
|
|
4779
4780
|
}
|
|
4780
4781
|
) }),
|
|
4781
4782
|
/* @__PURE__ */ e(Ge, { isOpen: ue === "country", onClose: () => W(null), children: (x) => /* @__PURE__ */ e(
|
|
4782
|
-
|
|
4783
|
+
nr,
|
|
4783
4784
|
{
|
|
4784
4785
|
onClose: x,
|
|
4785
4786
|
onSelect: (C) => {
|
|
4786
|
-
|
|
4787
|
+
Va(C), x();
|
|
4787
4788
|
},
|
|
4788
4789
|
assetBaseUrl: q,
|
|
4789
4790
|
selectedCode: S.country
|
|
4790
4791
|
}
|
|
4791
4792
|
) }),
|
|
4792
4793
|
/* @__PURE__ */ e(Ge, { isOpen: ue === "language", onClose: () => W(null), children: (x) => /* @__PURE__ */ e(
|
|
4793
|
-
|
|
4794
|
+
or,
|
|
4794
4795
|
{
|
|
4795
4796
|
onClose: x,
|
|
4796
4797
|
onSelect: (C) => {
|
|
@@ -4803,7 +4804,7 @@ function fr({
|
|
|
4803
4804
|
}
|
|
4804
4805
|
);
|
|
4805
4806
|
}
|
|
4806
|
-
function
|
|
4807
|
+
function gr({
|
|
4807
4808
|
projectId: t,
|
|
4808
4809
|
apiUrl: a,
|
|
4809
4810
|
assetBaseUrl: n,
|
|
@@ -4823,7 +4824,7 @@ function yr({
|
|
|
4823
4824
|
statusPollInterval: y,
|
|
4824
4825
|
onComplete: E,
|
|
4825
4826
|
onError: V,
|
|
4826
|
-
className:
|
|
4827
|
+
className: X,
|
|
4827
4828
|
theme: z,
|
|
4828
4829
|
skinId: ie,
|
|
4829
4830
|
accentColor: J,
|
|
@@ -4851,7 +4852,7 @@ function yr({
|
|
|
4851
4852
|
onDone: he
|
|
4852
4853
|
}) {
|
|
4853
4854
|
return /* @__PURE__ */ e(
|
|
4854
|
-
|
|
4855
|
+
fn,
|
|
4855
4856
|
{
|
|
4856
4857
|
projectId: t,
|
|
4857
4858
|
apiUrl: a,
|
|
@@ -4872,10 +4873,10 @@ function yr({
|
|
|
4872
4873
|
statusPollInterval: y,
|
|
4873
4874
|
onComplete: E,
|
|
4874
4875
|
onError: V,
|
|
4875
|
-
children: /* @__PURE__ */ e(
|
|
4876
|
-
|
|
4876
|
+
children: /* @__PURE__ */ e(yn, { defaultLocale: ne || "en", children: /* @__PURE__ */ e(
|
|
4877
|
+
yr,
|
|
4877
4878
|
{
|
|
4878
|
-
className:
|
|
4879
|
+
className: X,
|
|
4879
4880
|
theme: z,
|
|
4880
4881
|
skinId: ie,
|
|
4881
4882
|
accentColor: J,
|
|
@@ -4905,14 +4906,14 @@ function yr({
|
|
|
4905
4906
|
}
|
|
4906
4907
|
);
|
|
4907
4908
|
}
|
|
4908
|
-
function
|
|
4909
|
+
function Hr({
|
|
4909
4910
|
submitButtonText: t,
|
|
4910
4911
|
rateRefreshInterval: a,
|
|
4911
4912
|
...n
|
|
4912
4913
|
}) {
|
|
4913
|
-
return /* @__PURE__ */ e(
|
|
4914
|
+
return /* @__PURE__ */ e(gr, { ...n });
|
|
4914
4915
|
}
|
|
4915
|
-
function
|
|
4916
|
+
function Pr({
|
|
4916
4917
|
skin: t,
|
|
4917
4918
|
active: a,
|
|
4918
4919
|
onClick: n,
|
|
@@ -4945,14 +4946,14 @@ function Hr({
|
|
|
4945
4946
|
}
|
|
4946
4947
|
);
|
|
4947
4948
|
}
|
|
4948
|
-
function
|
|
4949
|
+
function xr({ quote: t }) {
|
|
4949
4950
|
const a = O();
|
|
4950
4951
|
return t.isBestRate ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: a("modal.bestPrice") }) : t.isRecommended ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: a("modal.recommended") }) : t.rank && t.rank <= 3 ? /* @__PURE__ */ l("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: [
|
|
4951
4952
|
"#",
|
|
4952
4953
|
t.rank
|
|
4953
4954
|
] }) : null;
|
|
4954
4955
|
}
|
|
4955
|
-
function
|
|
4956
|
+
function vr({ quote: t }) {
|
|
4956
4957
|
return t.gatewayLogo ? /* @__PURE__ */ e(
|
|
4957
4958
|
"img",
|
|
4958
4959
|
{
|
|
@@ -4965,7 +4966,7 @@ function xr({ quote: t }) {
|
|
|
4965
4966
|
}
|
|
4966
4967
|
) : /* @__PURE__ */ e(Kt, { size: 36 });
|
|
4967
4968
|
}
|
|
4968
|
-
function
|
|
4969
|
+
function Cr() {
|
|
4969
4970
|
return /* @__PURE__ */ e("div", { className: "space-y-2", children: [0, 1, 2].map((t) => /* @__PURE__ */ l(
|
|
4970
4971
|
"div",
|
|
4971
4972
|
{
|
|
@@ -4992,7 +4993,7 @@ function vr() {
|
|
|
4992
4993
|
t
|
|
4993
4994
|
)) });
|
|
4994
4995
|
}
|
|
4995
|
-
function
|
|
4996
|
+
function Or({
|
|
4996
4997
|
onClose: t,
|
|
4997
4998
|
onSelect: a,
|
|
4998
4999
|
quotes: n,
|
|
@@ -5004,7 +5005,7 @@ function Pr({
|
|
|
5004
5005
|
const i = u.trim().toLowerCase();
|
|
5005
5006
|
return i ? n.quotes.filter((h) => h.gatewayName.toLowerCase().includes(i)) : n.quotes;
|
|
5006
5007
|
}, [n, u]);
|
|
5007
|
-
return /* @__PURE__ */ l(
|
|
5008
|
+
return /* @__PURE__ */ l(Y, { children: [
|
|
5008
5009
|
/* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Be, { onClick: t }) }),
|
|
5009
5010
|
/* @__PURE__ */ e(
|
|
5010
5011
|
"h2",
|
|
@@ -5014,9 +5015,9 @@ function Pr({
|
|
|
5014
5015
|
children: s("modal.chooseRamp")
|
|
5015
5016
|
}
|
|
5016
5017
|
),
|
|
5017
|
-
/* @__PURE__ */ e(
|
|
5018
|
+
/* @__PURE__ */ e(Xe, { value: u, onChange: c }),
|
|
5018
5019
|
/* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-5 space-y-2", children: [
|
|
5019
|
-
r ? /* @__PURE__ */ e(
|
|
5020
|
+
r ? /* @__PURE__ */ e(Cr, {}) : d.length === 0 ? /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: n && n.quotes.length === 0 ? s("modal.noQuotes") : s("modal.noProvidersFound") }) : d.map((i, h) => {
|
|
5020
5021
|
const p = h === 0, f = parseFloat(i.cryptoAmount), g = f >= 1 ? f.toFixed(4) : f.toPrecision(6);
|
|
5021
5022
|
return /* @__PURE__ */ l(
|
|
5022
5023
|
"button",
|
|
@@ -5032,10 +5033,10 @@ function Pr({
|
|
|
5032
5033
|
background: p ? "transparent" : "var(--t-surface)"
|
|
5033
5034
|
},
|
|
5034
5035
|
children: [
|
|
5035
|
-
/* @__PURE__ */ e(
|
|
5036
|
+
/* @__PURE__ */ e(vr, { quote: i }),
|
|
5036
5037
|
/* @__PURE__ */ l("div", { className: "text-left flex-1 min-w-0", children: [
|
|
5037
5038
|
/* @__PURE__ */ e("div", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: i.gatewayName }),
|
|
5038
|
-
/* @__PURE__ */ e(
|
|
5039
|
+
/* @__PURE__ */ e(xr, { quote: i })
|
|
5039
5040
|
] }),
|
|
5040
5041
|
/* @__PURE__ */ l("div", { className: "text-right shrink-0", children: [
|
|
5041
5042
|
/* @__PURE__ */ e("div", { className: "text-[11px]", style: { color: "var(--t-text-secondary)" }, children: s("receive.label") }),
|
|
@@ -5066,94 +5067,94 @@ function Pr({
|
|
|
5066
5067
|
] });
|
|
5067
5068
|
}
|
|
5068
5069
|
export {
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5070
|
+
cr as AnimatedDigit,
|
|
5071
|
+
sr as AnimatedNumber,
|
|
5072
|
+
Rr as ApplePayIcon,
|
|
5073
|
+
Dr as ArrowUpIcon,
|
|
5073
5074
|
rt as BLOCKCHAINS,
|
|
5074
|
-
|
|
5075
|
-
|
|
5075
|
+
Er as BankIcon,
|
|
5076
|
+
Gn as BottomSheet,
|
|
5076
5077
|
pt as COUNTRIES,
|
|
5077
5078
|
Bt as COUNTRY_MAP,
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5079
|
+
An as CRYPTO_CHAIN_COMBOS,
|
|
5080
|
+
wa as CRYPTO_CURRENCIES,
|
|
5081
|
+
Tr as CardIcon,
|
|
5082
|
+
_n as CheckmarkIcon,
|
|
5083
|
+
Hr as CheckoutForm,
|
|
5084
|
+
xn as CheckoutStep,
|
|
5084
5085
|
De as ChevronDown,
|
|
5085
|
-
|
|
5086
|
-
|
|
5086
|
+
Dn as ChevronRight,
|
|
5087
|
+
Or as ChooseRampModal,
|
|
5087
5088
|
Be as CloseButton,
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5089
|
+
Lr as CoinifyIcon,
|
|
5090
|
+
bn as CompleteStep,
|
|
5091
|
+
Tn as ConfirmStep,
|
|
5092
|
+
nr as CountryPickerModal,
|
|
5092
5093
|
Xn as CryptoCurrencyModal,
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5094
|
+
Ra as CryptoIcon,
|
|
5095
|
+
pr as CtaButton,
|
|
5096
|
+
Ur as DarkModeIcon,
|
|
5097
|
+
Sn as ErrorStep,
|
|
5097
5098
|
sa as FIAT_CURRENCIES,
|
|
5098
|
-
|
|
5099
|
-
|
|
5099
|
+
kn as FIAT_TO_COUNTRY,
|
|
5100
|
+
Yn as FiatCurrencyModal,
|
|
5100
5101
|
Ot as FiatFlag,
|
|
5101
|
-
|
|
5102
|
-
|
|
5102
|
+
hr as Footer,
|
|
5103
|
+
Ln as FormSkeleton,
|
|
5103
5104
|
Kt as GenericCoinIcon,
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5105
|
+
Ar as GooglePayIcon,
|
|
5106
|
+
ir as HeaderBar,
|
|
5107
|
+
yn as I18nProvider,
|
|
5107
5108
|
Mt as InfoIcon,
|
|
5108
5109
|
Ze as LANGUAGES,
|
|
5109
|
-
|
|
5110
|
+
Wn as LoadingScreen,
|
|
5110
5111
|
ua as MOCK_RATES,
|
|
5111
|
-
|
|
5112
|
+
Fr as MenuIcon,
|
|
5112
5113
|
Ge as Modal,
|
|
5113
|
-
|
|
5114
|
+
Kn as MoreDotsIcon,
|
|
5114
5115
|
we as NRLogo,
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5116
|
+
Ir as NRLogoIcon,
|
|
5117
|
+
Un as PayPalIcon,
|
|
5118
|
+
Pn as PaymentAppleIcon,
|
|
5119
|
+
Bn as PaymentBankIcon,
|
|
5120
|
+
ur as PaymentCard,
|
|
5121
|
+
Hn as PaymentCardsIcon,
|
|
5122
|
+
On as PaymentGoogleIcon,
|
|
5123
|
+
Br as PaymentMethodSelector,
|
|
5124
|
+
Cn as ProcessingStep,
|
|
5125
|
+
gr as RampForm,
|
|
5126
|
+
fn as RampProvider,
|
|
5127
|
+
fr as RateBreakdown,
|
|
5128
|
+
dr as ReceiveCard,
|
|
5129
|
+
gn as RedirectScreen,
|
|
5130
|
+
Fn as RevolutIcon,
|
|
5130
5131
|
da as SKINS,
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5132
|
+
Mr as SearchIcon,
|
|
5133
|
+
Xe as SearchInput,
|
|
5134
|
+
tr as SettingsScreen,
|
|
5134
5135
|
Q as Skeleton,
|
|
5135
|
-
|
|
5136
|
-
|
|
5136
|
+
Pr as SkinSwatch,
|
|
5137
|
+
lr as SpendCard,
|
|
5137
5138
|
Se as Spinner,
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5139
|
+
jn as Toast,
|
|
5140
|
+
qn as ToggleSwitch,
|
|
5141
|
+
mr as WalletCard,
|
|
5141
5142
|
Dt as XIcon,
|
|
5142
5143
|
It as formatOutput,
|
|
5143
5144
|
Ut as getChainIconUrl,
|
|
5144
|
-
|
|
5145
|
+
ka as getCryptoIconUrl,
|
|
5145
5146
|
Ft as getDefaultFiatForCountry,
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5147
|
+
Nn as getFiatFlagUrl,
|
|
5148
|
+
Nr as getMockRate,
|
|
5149
|
+
Vn as getPaymentIcon,
|
|
5150
|
+
Na as isStablecoin,
|
|
5151
|
+
Rn as parseAmount,
|
|
5152
|
+
an as useCheckoutIntent,
|
|
5152
5153
|
Pt as useI18n,
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5154
|
+
tn as useQuotes,
|
|
5155
|
+
Ye as useRamp,
|
|
5156
|
+
en as useRampConfig,
|
|
5156
5157
|
O as useT,
|
|
5157
|
-
|
|
5158
|
+
nn as useTransaction
|
|
5158
5159
|
};
|
|
5159
5160
|
//# sourceMappingURL=index.js.map
|