@nowramp/form 0.1.78 → 0.1.79

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.js CHANGED
@@ -8,119 +8,119 @@
8
8
  }`;
9
9
  document.head.appendChild(s);
10
10
  })();
11
- import { jsx as e, jsxs as o, Fragment as J } from "react/jsx-runtime";
12
- import de, { useState as v, useRef as O, useCallback as P, useEffect as Y, useMemo as Z, useReducer as ua, useContext as ma, createContext as fa } from "react";
13
- import { RampApi as ze } from "@nowramp/sdk";
14
- import { createPortal as Ut } from "react-dom";
15
- function ha(t, a, n) {
16
- const [r, l] = v(null), [c, m] = v(!0), [s, u] = v(null), f = O(null);
17
- (!f.current || f.current !== t) && (f.current = new ze({ apiKey: "", ...t }));
11
+ import { jsx as e, jsxs as l, Fragment as q } from "react/jsx-runtime";
12
+ import ye, { useState as N, useRef as I, useCallback as P, useEffect as Z, useMemo as $, useReducer as Ca, useContext as ga, createContext as xa } from "react";
13
+ import { RampApi as et } from "@nowramp/sdk";
14
+ import { createPortal as Ot } from "react-dom";
15
+ function va(t, a, n) {
16
+ const [r, o] = N(null), [d, u] = N(!0), [i, s] = N(null), m = I(null);
17
+ (!m.current || m.current !== t) && (m.current = new et({ apiKey: "", ...t }));
18
18
  const h = P(async () => {
19
19
  if (!t.projectId) {
20
- u(new Error("projectId is required")), m(!1);
20
+ s(new Error("projectId is required")), u(!1);
21
21
  return;
22
22
  }
23
- m(!0), u(null);
23
+ u(!0), s(null);
24
24
  try {
25
- const d = {};
26
- a && (d.orderType = a), n && (d.country = n);
27
- const p = await f.current.getSupported(d);
28
- l(p);
29
- } catch (d) {
30
- u(d instanceof Error ? d : new Error("Failed to fetch config"));
25
+ const f = {};
26
+ a && (f.orderType = a), n && (f.country = n);
27
+ const p = await m.current.getSupported(f);
28
+ o(p);
29
+ } catch (f) {
30
+ s(f instanceof Error ? f : new Error("Failed to fetch config"));
31
31
  } finally {
32
- m(!1);
32
+ u(!1);
33
33
  }
34
34
  }, [t.projectId, a, n]);
35
- return Y(() => {
35
+ return Z(() => {
36
36
  h();
37
- }, [h]), { config: r, loading: c, error: s, refetch: h };
38
- }
39
- function pa(t, a) {
40
- const [n, r] = v(null), [l, c] = v(!1), [m, s] = v(null), u = O(null), f = O(""), h = `${t.apiUrl}|${t.projectId}`;
41
- (!u.current || f.current !== h) && (u.current = new ze({ apiKey: "", ...t }), f.current = h);
42
- const d = O(0);
43
- Y(() => {
44
- const g = ++d.current;
37
+ }, [h]), { config: r, loading: d, error: i, refetch: h };
38
+ }
39
+ function Sa(t, a) {
40
+ const [n, r] = N(null), [o, d] = N(!1), [u, i] = N(null), s = I(null), m = I(""), h = `${t.apiUrl}|${t.projectId}`;
41
+ (!s.current || m.current !== h) && (s.current = new et({ apiKey: "", ...t }), m.current = h);
42
+ const f = I(0);
43
+ Z(() => {
44
+ const x = ++f.current;
45
45
  if (!a || !t.projectId) {
46
- r(null), c(!1);
46
+ r(null), d(!1);
47
47
  return;
48
48
  }
49
- c(!0), s(null), u.current.getQuotes(a).then(
50
- (A) => {
51
- d.current === g && (r(A), c(!1));
49
+ d(!0), i(null), s.current.getQuotes(a).then(
50
+ (C) => {
51
+ f.current === x && (r(C), d(!1));
52
52
  },
53
- (A) => {
54
- d.current === g && (s(A instanceof Error ? A : new Error("Failed to fetch quotes")), r(null), c(!1));
53
+ (C) => {
54
+ f.current === x && (i(C instanceof Error ? C : new Error("Failed to fetch quotes")), r(null), d(!1));
55
55
  }
56
56
  );
57
57
  }, [t.projectId, a == null ? void 0 : a.fiatCurrency, a == null ? void 0 : a.fiatAmount, a == null ? void 0 : a.cryptoAmount, a == null ? void 0 : a.cryptoCurrency, a == null ? void 0 : a.network, a == null ? void 0 : a.paymentMethodId, a == null ? void 0 : a.country, a == null ? void 0 : a.orderType]);
58
58
  const p = P(async () => {
59
59
  if (!(!a || !t.projectId)) {
60
- c(!0), s(null);
60
+ d(!0), i(null);
61
61
  try {
62
- const g = await u.current.getQuotes(a);
63
- r(g);
64
- } catch (g) {
65
- s(g instanceof Error ? g : new Error("Failed to fetch quotes"));
62
+ const x = await s.current.getQuotes(a);
63
+ r(x);
64
+ } catch (x) {
65
+ i(x instanceof Error ? x : new Error("Failed to fetch quotes"));
66
66
  } finally {
67
- c(!1);
67
+ d(!1);
68
68
  }
69
69
  }
70
70
  }, [t.projectId, a]);
71
- return { quotes: n, loading: l, error: m, refetch: p };
71
+ return { quotes: n, loading: o, error: u, refetch: p };
72
72
  }
73
- function ya(t) {
74
- const [a, n] = v(null), [r, l] = v(!1), [c, m] = v(null), s = O(null), u = O(""), f = `${t.apiUrl}|${t.projectId}`;
75
- (!s.current || u.current !== f) && (s.current = new ze({ apiKey: "", ...t }), u.current = f);
73
+ function ba(t) {
74
+ const [a, n] = N(null), [r, o] = N(!1), [d, u] = N(null), i = I(null), s = I(""), m = `${t.apiUrl}|${t.projectId}`;
75
+ (!i.current || s.current !== m) && (i.current = new et({ apiKey: "", ...t }), s.current = m);
76
76
  const h = P(async (p) => {
77
- l(!0), m(null);
77
+ o(!0), u(null);
78
78
  try {
79
- const g = await s.current.createCheckoutIntent(p);
80
- return n(g), g;
81
- } catch (g) {
82
- const A = g instanceof Error ? g : new Error("Failed to create checkout intent");
83
- throw m(A), A;
79
+ const x = await i.current.createCheckoutIntent(p);
80
+ return n(x), x;
81
+ } catch (x) {
82
+ const C = x instanceof Error ? x : new Error("Failed to create checkout intent");
83
+ throw u(C), C;
84
84
  } finally {
85
- l(!1);
85
+ o(!1);
86
86
  }
87
- }, []), d = P(() => {
88
- n(null), m(null);
87
+ }, []), f = P(() => {
88
+ n(null), u(null);
89
89
  }, []);
90
- return { order: a, loading: r, error: c, createOrder: h, reset: d };
90
+ return { order: a, loading: r, error: d, createOrder: h, reset: f };
91
91
  }
92
- function xa(t, a, n) {
93
- const [r, l] = v(null), [c, m] = v(!1), [s, u] = v(null), f = O(null);
94
- f.current || (f.current = new ze({ apiKey: "", projectId: "", ...t }));
92
+ function Na(t, a, n) {
93
+ const [r, o] = N(null), [d, u] = N(!1), [i, s] = N(null), m = I(null);
94
+ m.current || (m.current = new et({ apiKey: "", projectId: "", ...t }));
95
95
  const h = P(async () => {
96
96
  if (a) {
97
- m(!0), u(null);
97
+ u(!0), s(null);
98
98
  try {
99
- const d = await f.current.getTransaction(a);
100
- l(d);
101
- } catch (d) {
102
- u(d instanceof Error ? d : new Error("Failed to fetch status"));
99
+ const f = await m.current.getTransaction(a);
100
+ o(f);
101
+ } catch (f) {
102
+ s(f instanceof Error ? f : new Error("Failed to fetch status"));
103
103
  } finally {
104
- m(!1);
104
+ u(!1);
105
105
  }
106
106
  }
107
107
  }, [a]);
108
- return Y(() => {
108
+ return Z(() => {
109
109
  if (!a) return;
110
- const d = (n == null ? void 0 : n.initialDelay) ?? 0;
111
- if (d > 0) {
112
- const p = setTimeout(h, d);
110
+ const f = (n == null ? void 0 : n.initialDelay) ?? 0;
111
+ if (f > 0) {
112
+ const p = setTimeout(h, f);
113
113
  return () => clearTimeout(p);
114
114
  }
115
115
  h();
116
- }, [h, a, n == null ? void 0 : n.initialDelay]), Y(() => {
116
+ }, [h, a, n == null ? void 0 : n.initialDelay]), Z(() => {
117
117
  if (!a || !(n != null && n.pollInterval) || !r || ["completed", "failed", "cancelled", "expired", "refunded"].includes(r.status))
118
118
  return;
119
119
  const p = setInterval(h, n.pollInterval);
120
120
  return () => clearInterval(p);
121
- }, [a, n == null ? void 0 : n.pollInterval, r == null ? void 0 : r.status, h]), { status: r, loading: c, error: s, refetch: h };
121
+ }, [a, n == null ? void 0 : n.pollInterval, r == null ? void 0 : r.status, h]), { status: r, loading: d, error: i, refetch: h };
122
122
  }
123
- const Ze = [
123
+ const Je = [
124
124
  { code: "ad", name: "Andorra", defaultFiat: "EUR" },
125
125
  { code: "ae", name: "United Arab Emirates", defaultFiat: "AED" },
126
126
  { code: "af", name: "Afghanistan", defaultFiat: "USD" },
@@ -312,22 +312,112 @@ const Ze = [
312
312
  { code: "za", name: "South Africa", defaultFiat: "ZAR" },
313
313
  { code: "zm", name: "Zambia", defaultFiat: "USD" },
314
314
  { code: "zw", name: "Zimbabwe", defaultFiat: "USD" }
315
- ], st = Object.fromEntries(
316
- Ze.map((t) => [t.code, t])
315
+ ], ht = Object.fromEntries(
316
+ Je.map((t) => [t.code, t])
317
317
  );
318
- function ot(t, a) {
318
+ function dt(t, a) {
319
319
  if (!t) return "USD";
320
- const n = st[t.toLowerCase()], r = (n == null ? void 0 : n.defaultFiat) || "USD";
320
+ const n = ht[t.toLowerCase()], r = (n == null ? void 0 : n.defaultFiat) || "USD";
321
321
  return !a || a.length === 0 || a.includes(r) ? r : a.includes("USD") ? "USD" : a[0] || "USD";
322
322
  }
323
- function Dt(t, a) {
323
+ const tt = !0;
324
+ function pt(t, a, n = tt) {
325
+ return t === void 0 || a === void 0 ? n : t.length === 0 || a.length === 0 ? !1 : t.some((r) => a.includes(r));
326
+ }
327
+ function wa(t, a, n = tt) {
328
+ return t.filter((r) => pt(r.providers, a, n));
329
+ }
330
+ function Ea(t, a, n = tt) {
331
+ const r = [];
332
+ for (const o of t) {
333
+ const d = o.networks.filter(
334
+ (u) => pt(u.providers, a, n)
335
+ );
336
+ d.length > 0 && r.push(
337
+ d.length === o.networks.length ? o : { ...o, networks: d }
338
+ );
339
+ }
340
+ return r;
341
+ }
342
+ function Aa(t, a, n, r = tt) {
343
+ return n ? t.filter(
344
+ (o) => o.supportedFiats.includes(n) && pt(o.providers, a, r)
345
+ ) : [];
346
+ }
347
+ function Ra(t, a, n) {
348
+ const r = {};
349
+ let o = !1;
350
+ if (!n.cryptoLocked && !n.networkLocked) {
351
+ if (!(t.cryptoCurrency && a.availableCryptos.some(
352
+ (i) => i.code === t.cryptoCurrency && i.networks.some((s) => s.id === t.network)
353
+ )) && a.availableCryptos.length > 0) {
354
+ const i = a.availableCryptos[0], s = i.networks.find((m) => m.isDefault) || i.networks[0];
355
+ i.code !== t.cryptoCurrency && (r.cryptoCurrency = i.code, o = !0), s && s.id !== t.network && (r.network = s.id, o = !0);
356
+ }
357
+ } else if (!n.cryptoLocked && n.networkLocked) {
358
+ if (!(t.cryptoCurrency && a.availableCryptos.some(
359
+ (i) => i.code === t.cryptoCurrency && i.networks.some((s) => s.id === t.network)
360
+ ))) {
361
+ const i = a.availableCryptos.find(
362
+ (s) => s.networks.some((m) => m.id === t.network)
363
+ );
364
+ i && i.code !== t.cryptoCurrency && (r.cryptoCurrency = i.code, o = !0);
365
+ }
366
+ } else if (n.cryptoLocked && !n.networkLocked) {
367
+ const u = a.availableCryptos.find(
368
+ (i) => i.code === t.cryptoCurrency
369
+ );
370
+ if (u && !u.networks.some(
371
+ (s) => s.id === t.network
372
+ ) && u.networks.length > 0) {
373
+ const s = u.networks.find((m) => m.isDefault) || u.networks[0];
374
+ s.id !== t.network && (r.network = s.id, o = !0);
375
+ }
376
+ }
377
+ if (!n.fiatLocked && !(t.fiatCurrency && a.availableFiats.some((i) => i.code === t.fiatCurrency)) && a.availableFiats.length > 0) {
378
+ const s = a.availableFiats.find((m) => m.code === "USD") || a.availableFiats[0];
379
+ s.code !== t.fiatCurrency && (r.fiatCurrency = s.code, o = !0);
380
+ }
381
+ if (!(t.paymentMethodId && a.availablePaymentMethods.some(
382
+ (u) => u.id === t.paymentMethodId
383
+ )) && a.availablePaymentMethods.length > 0) {
384
+ const i = a.availablePaymentMethods.find(
385
+ (s) => s.id.includes("card") || s.id.includes("debit")
386
+ ) || a.availablePaymentMethods[0];
387
+ i.id !== t.paymentMethodId && (r.paymentMethodId = i.id, o = !0);
388
+ }
389
+ return o ? r : null;
390
+ }
391
+ function ka(t, a, n, r) {
392
+ var o, d, u;
393
+ if (n.cryptoLocked) {
394
+ const i = (o = t.cryptos) == null ? void 0 : o.find(
395
+ (m) => m.code === a.cryptoCurrency
396
+ );
397
+ if (!i) return !0;
398
+ const s = (d = i.networks) == null ? void 0 : d.find((m) => m.id === a.network);
399
+ if (!s || s.providers !== void 0 && s.providers.length === 0 || s.providers !== void 0 && (r.availableFiats.length === 0 || r.availablePaymentMethods.length === 0))
400
+ return !0;
401
+ }
402
+ if (n.networkLocked && !n.cryptoLocked && !r.availableCryptos.some(
403
+ (s) => s.networks.some((m) => m.id === a.network)
404
+ ))
405
+ return !0;
406
+ if (n.fiatLocked) {
407
+ const i = (u = t.fiats) == null ? void 0 : u.find((s) => s.code === a.fiatCurrency);
408
+ if (!i || i.providers !== void 0 && i.providers.length === 0 || i.providers !== void 0 && r.availableCryptos.length === 0)
409
+ return !0;
410
+ }
411
+ return !1;
412
+ }
413
+ function Ht(t, a) {
324
414
  if (!t) return t;
325
415
  const n = t.indexOf(".");
326
416
  if (n === -1) return t;
327
417
  let r = t;
328
418
  return r.length - n - 1 > a && (r = r.slice(0, n + a + 1)), r = r.replace(/0+$/, "").replace(/\.$/, ""), r;
329
419
  }
330
- const Vt = {
420
+ const Yt = {
331
421
  step: "amount",
332
422
  flowType: "buy",
333
423
  fiatCurrency: "USD",
@@ -346,7 +436,8 @@ const Vt = {
346
436
  countrySource: "",
347
437
  errorMessage: null
348
438
  };
349
- function ga(t, a) {
439
+ function Ta(t, a) {
440
+ var n, r, o, d, u, i, s, m;
350
441
  switch (a.type) {
351
442
  case "SET_STEP":
352
443
  return { ...t, step: a.step, errorMessage: null };
@@ -356,6 +447,9 @@ function ga(t, a) {
356
447
  flowType: a.flowType,
357
448
  fiatAmount: "",
358
449
  cryptoAmount: "",
450
+ fiatCurrency: (r = (n = a.fieldLocks) == null ? void 0 : n.sourceCurrency) != null && r.locked ? t.fiatCurrency : "",
451
+ cryptoCurrency: (d = (o = a.fieldLocks) == null ? void 0 : o.destinationCurrency) != null && d.locked ? t.cryptoCurrency : "",
452
+ network: (i = (u = a.fieldLocks) == null ? void 0 : u.network) != null && i.locked || (m = (s = a.fieldLocks) == null ? void 0 : s.destinationCurrency) != null && m.locked ? t.network : "",
359
453
  paymentMethodId: "",
360
454
  selectedQuote: null,
361
455
  selectedProvider: null,
@@ -398,238 +492,301 @@ function ga(t, a) {
398
492
  case "CLEAR_ERROR":
399
493
  return { ...t, errorMessage: null };
400
494
  case "RESET":
401
- return Vt;
495
+ return Yt;
402
496
  default:
403
497
  return t;
404
498
  }
405
499
  }
406
- const jt = fa(null);
407
- function Ca({
500
+ const Zt = xa(null);
501
+ function La({
408
502
  projectId: t,
409
503
  apiUrl: a = "https://api.nowramp.com",
410
504
  assetBaseUrl: n = "",
411
505
  flowType: r = "buy",
412
- customerId: l = "",
413
- brandId: c,
414
- defaultFiatCurrency: m = "USD",
415
- defaultCryptoCurrency: s = "BTC",
416
- defaultNetwork: u = "",
417
- defaultFiatAmount: f = "",
506
+ customerId: o = "",
507
+ brandId: d,
508
+ defaultFiatCurrency: u = "USD",
509
+ defaultCryptoCurrency: i = "BTC",
510
+ defaultNetwork: s = "",
511
+ defaultFiatAmount: m = "",
418
512
  defaultCryptoAmount: h = "",
419
- defaultWalletAddress: d = "",
513
+ defaultWalletAddress: f = "",
420
514
  defaultGateway: p,
421
- defaultCountry: g,
422
- fieldLocks: A,
515
+ defaultCountry: x,
516
+ fieldLocks: C,
423
517
  statusPollInterval: E = 5e3,
424
- onComplete: R,
518
+ onComplete: k,
425
519
  onError: _,
426
- children: ae
520
+ children: re
427
521
  }) {
428
- const j = Z(() => ({ apiUrl: a, projectId: t }), [a, t]), Q = u || (s ? s.toLowerCase() : ""), q = r === "sell", $ = q ? !!h : !!f, y = (q ? !!($ && s && Q) : !!($ && s && Q && d)) && p ? "confirm" : "amount", k = f || (r === "buy" ? "250" : ""), [i, I] = ua(ga, {
429
- ...Vt,
430
- step: y,
522
+ const j = $(() => ({ apiUrl: a, projectId: t }), [a, t]), Q = s || (i ? i.toLowerCase() : ""), ee = r === "sell", W = ee ? !!h : !!m, v = (ee ? !!(W && i && Q) : !!(W && i && Q && f)) && p ? "confirm" : "amount", L = m || (r === "buy" ? "250" : ""), [c, U] = Ca(Ta, {
523
+ ...Yt,
524
+ step: v,
431
525
  flowType: r,
432
- fiatCurrency: m,
433
- cryptoCurrency: s,
526
+ fiatCurrency: u,
527
+ cryptoCurrency: i,
434
528
  network: Q,
435
- fiatAmount: Dt(k, 2),
436
- cryptoAmount: Dt(h, 6),
437
- walletAddress: d,
438
- customerId: l,
529
+ fiatAmount: Ht(L, 2),
530
+ cryptoAmount: Ht(h, 6),
531
+ walletAddress: f,
532
+ customerId: o,
439
533
  // If defaultCountry is provided, set it immediately with 'manual' source to skip auto-detection
440
- ...g ? { country: g.toLowerCase(), countrySource: "manual" } : {}
441
- }), b = i.flowType === "sell", {
534
+ ...x ? { country: x.toLowerCase(), countrySource: "manual" } : {}
535
+ }), w = c.flowType === "sell", {
442
536
  config: S,
443
- loading: ge,
444
- error: Ce
445
- } = ha(j, i.flowType, i.country || void 0), Se = O(!1);
446
- de.useEffect(() => {
447
- var U;
448
- if (Se.current || !(S != null && S.detectedCountry) || i.country) return;
449
- Se.current = !0;
450
- const C = S.detectedCountry.toLowerCase();
451
- I({ type: "SET_COUNTRY_AUTO", country: C });
452
- const w = (U = S.fiats) == null ? void 0 : U.map((D) => D.code), L = ot(C, w);
453
- L !== i.fiatCurrency && I({ type: "SET_FIAT_CURRENCY", currency: L });
454
- }, [S, i.country, i.fiatCurrency]);
455
- const oe = O(!1);
456
- de.useEffect(() => {
457
- var L;
458
- if (oe.current || !g || !((L = S == null ? void 0 : S.fiats) != null && L.length)) return;
459
- oe.current = !0;
460
- const C = S.fiats.map((U) => U.code), w = ot(g, C);
461
- w !== i.fiatCurrency && I({ type: "SET_FIAT_CURRENCY", currency: w });
462
- }, [g, S, i.fiatCurrency]);
463
- const me = O(i.country);
464
- de.useEffect(() => {
465
- var L;
466
- if (i.country === me.current || (me.current = i.country, i.countrySource === "manual" && (ie.current = !1), i.countrySource !== "manual") || !((L = S == null ? void 0 : S.fiats) != null && L.length)) return;
467
- const C = S.fiats.map((U) => U.code), w = ot(i.country, C);
468
- w !== i.fiatCurrency && I({ type: "SET_FIAT_CURRENCY", currency: w });
469
- }, [i.country, i.countrySource, S, i.fiatCurrency]);
470
- const M = O(i.fiatCurrency);
471
- de.useEffect(() => {
472
- var U;
473
- if (i.fiatCurrency === M.current || (M.current = i.fiatCurrency, b || !((U = S == null ? void 0 : S.fiats) != null && U.length) || !i.fiatAmount)) return;
474
- const C = S.fiats.find((D) => D.code === i.fiatCurrency);
475
- if (!(C != null && C.minAmount)) return;
476
- const w = parseFloat(i.fiatAmount), L = parseFloat(C.minAmount);
477
- !isNaN(w) && !isNaN(L) && w < L && I({ type: "SET_FIAT_AMOUNT", amount: String(Math.ceil(L)) });
478
- }, [i.fiatCurrency, i.fiatAmount, S, b]), de.useEffect(() => {
479
- var L, U, D;
480
- if (!S || !i.cryptoCurrency || i.network) return;
481
- const C = (L = S.cryptos) == null ? void 0 : L.find((F) => F.code === i.cryptoCurrency), w = ((U = C == null ? void 0 : C.networks) == null ? void 0 : U.find((F) => F.isDefault)) || ((D = C == null ? void 0 : C.networks) == null ? void 0 : D[0]);
482
- w != null && w.id && I({ type: "SET_NETWORK", network: w.id });
483
- }, [S, i.cryptoCurrency, i.network]), de.useEffect(() => {
484
- var D, F;
485
- if (!((D = S == null ? void 0 : S.paymentMethods) != null && D.length)) return;
486
- const C = i.fiatCurrency, w = S.paymentMethods;
487
- if (i.paymentMethodId && w.some(
488
- (W) => W.id === i.paymentMethodId && W.supportedFiats.includes(C)
489
- ))
490
- return;
491
- const U = w.find(
492
- (B) => B.supportedFiats.includes(C) && (B.id.includes("card") || B.id.includes("debit"))
493
- ) || w.find((B) => B.supportedFiats.includes(C));
494
- I({ type: "SET_PAYMENT_METHOD", methodId: (U == null ? void 0 : U.id) || ((F = w[0]) == null ? void 0 : F.id) || "" });
495
- }, [S, i.fiatCurrency, i.paymentMethodId]);
496
- const ee = Z(() => {
497
- if (b) {
498
- if (!i.cryptoAmount) return null;
499
- const D = parseFloat(i.cryptoAmount);
500
- return isNaN(D) || D <= 0 ? "Enter a valid amount" : null;
537
+ loading: te,
538
+ error: xe
539
+ } = va(j, c.flowType, c.country || void 0), ve = I(!1);
540
+ ye.useEffect(() => {
541
+ var F;
542
+ if (ve.current || !(S != null && S.detectedCountry) || c.country) return;
543
+ ve.current = !0;
544
+ const y = S.detectedCountry.toLowerCase();
545
+ U({ type: "SET_COUNTRY_AUTO", country: y });
546
+ const A = (F = S.fiats) == null ? void 0 : F.map((M) => M.code), R = dt(y, A);
547
+ R !== c.fiatCurrency && U({ type: "SET_FIAT_CURRENCY", currency: R });
548
+ }, [S, c.country, c.fiatCurrency]);
549
+ const le = I(!1);
550
+ ye.useEffect(() => {
551
+ var R;
552
+ if (le.current || !x || !((R = S == null ? void 0 : S.fiats) != null && R.length)) return;
553
+ le.current = !0;
554
+ const y = S.fiats.map((F) => F.code), A = dt(x, y);
555
+ A !== c.fiatCurrency && U({ type: "SET_FIAT_CURRENCY", currency: A });
556
+ }, [x, S, c.fiatCurrency]);
557
+ const he = I(c.country);
558
+ ye.useEffect(() => {
559
+ var R;
560
+ if (c.country === he.current || (he.current = c.country, c.countrySource === "manual" && (se.current = !1), c.countrySource !== "manual") || !((R = S == null ? void 0 : S.fiats) != null && R.length)) return;
561
+ const y = S.fiats.map((F) => F.code), A = dt(c.country, y);
562
+ A !== c.fiatCurrency && U({ type: "SET_FIAT_CURRENCY", currency: A });
563
+ }, [c.country, c.countrySource, S, c.fiatCurrency]);
564
+ const D = I(c.fiatCurrency);
565
+ ye.useEffect(() => {
566
+ var F;
567
+ if (c.fiatCurrency === D.current || (D.current = c.fiatCurrency, w || !((F = S == null ? void 0 : S.fiats) != null && F.length) || !c.fiatAmount)) return;
568
+ const y = S.fiats.find((M) => M.code === c.fiatCurrency);
569
+ if (!(y != null && y.minAmount)) return;
570
+ const A = parseFloat(c.fiatAmount), R = parseFloat(y.minAmount);
571
+ !isNaN(A) && !isNaN(R) && A < R && U({ type: "SET_FIAT_AMOUNT", amount: String(Math.ceil(R)) });
572
+ }, [c.fiatCurrency, c.fiatAmount, S, w]);
573
+ const { availableFiats: ae, availableCryptos: B, availablePaymentMethods: ce } = $(() => {
574
+ var R, F, M;
575
+ if (!S)
576
+ return { availableFiats: [], availableCryptos: [], availablePaymentMethods: [] };
577
+ let y;
578
+ if (c.cryptoCurrency && c.network) {
579
+ const T = (R = S.cryptos) == null ? void 0 : R.find((X) => X.code === c.cryptoCurrency), H = (F = T == null ? void 0 : T.networks) == null ? void 0 : F.find((X) => X.id === c.network);
580
+ !T || !H ? y = [] : y = H.providers;
581
+ }
582
+ let A;
583
+ if (c.fiatCurrency) {
584
+ const T = (M = S.fiats) == null ? void 0 : M.find((H) => H.code === c.fiatCurrency);
585
+ T ? A = T.providers : A = [];
501
586
  }
502
- if (!S || !i.fiatAmount) return null;
503
- const C = parseFloat(i.fiatAmount);
504
- if (isNaN(C)) return null;
505
- const w = S.fiats.find((D) => D.code === i.fiatCurrency);
506
- if (!w) return null;
507
- const L = parseFloat(w.minAmount), U = parseFloat(w.maxAmount);
508
- return !isNaN(L) && C < L ? `Minimum amount is ${w.minAmount} ${i.fiatCurrency}` : !isNaN(U) && C > U ? `Maximum amount is ${w.maxAmount} ${i.fiatCurrency}` : null;
509
- }, [S, i.fiatAmount, i.fiatCurrency, i.cryptoAmount, b]), G = Z(() => {
510
- const C = b ? !!i.cryptoAmount : !!i.fiatAmount;
511
- return !S || !C || !i.cryptoCurrency || !i.network || ee || S.detectedCountry && i.countrySource === "" && !g ? null : {
512
- fiatCurrency: i.fiatCurrency,
513
- ...b ? { cryptoAmount: i.cryptoAmount } : { fiatAmount: i.fiatAmount },
514
- cryptoCurrency: i.cryptoCurrency,
515
- network: i.network,
516
- paymentMethodId: i.paymentMethodId || void 0,
517
- country: i.country || void 0,
518
- orderType: i.flowType
587
+ return {
588
+ availableFiats: wa(S.fiats ?? [], y),
589
+ availableCryptos: Ea(S.cryptos ?? [], A),
590
+ availablePaymentMethods: Aa(
591
+ S.paymentMethods ?? [],
592
+ y,
593
+ c.fiatCurrency
594
+ )
519
595
  };
520
- }, [S, i.fiatCurrency, i.fiatAmount, i.cryptoAmount, i.cryptoCurrency, i.network, i.paymentMethodId, i.country, i.countrySource, ee, b, i.flowType, g]), {
521
- quotes: X,
522
- loading: fe,
523
- error: he,
524
- refetch: Le
525
- } = pa(j, G), ie = O(!1);
526
- de.useEffect(() => {
527
- ie.current || i.countrySource === "auto" && (fe || !G || he || !X || X.bestQuote || i.fiatCurrency !== "USD" && (ie.current = !0, I({ type: "SET_FIAT_CURRENCY", currency: "USD" }), I({ type: "SET_FIAT_AMOUNT", amount: "250" })));
528
- }, [X, fe, he, G, i.countrySource, i.fiatCurrency]);
596
+ }, [S, c.cryptoCurrency, c.network, c.fiatCurrency]), De = $(() => {
597
+ var y, A, R;
598
+ return te || !S ? !1 : ka(
599
+ S,
600
+ { cryptoCurrency: c.cryptoCurrency, network: c.network, fiatCurrency: c.fiatCurrency },
601
+ {
602
+ cryptoLocked: !!((y = C == null ? void 0 : C.destinationCurrency) != null && y.locked),
603
+ networkLocked: !!((A = C == null ? void 0 : C.network) != null && A.locked),
604
+ fiatLocked: !!((R = C == null ? void 0 : C.sourceCurrency) != null && R.locked)
605
+ },
606
+ { availableFiats: ae, availableCryptos: B, availablePaymentMethods: ce }
607
+ );
608
+ }, [
609
+ te,
610
+ S,
611
+ C,
612
+ c.cryptoCurrency,
613
+ c.network,
614
+ c.fiatCurrency,
615
+ ae,
616
+ B,
617
+ ce
618
+ ]);
619
+ ye.useEffect(() => {
620
+ var A, R, F;
621
+ if (te || ae.length === 0 && B.length === 0) return;
622
+ const y = Ra(
623
+ {
624
+ cryptoCurrency: c.cryptoCurrency,
625
+ network: c.network,
626
+ fiatCurrency: c.fiatCurrency,
627
+ paymentMethodId: c.paymentMethodId
628
+ },
629
+ { availableFiats: ae, availableCryptos: B, availablePaymentMethods: ce },
630
+ {
631
+ cryptoLocked: !!((A = C == null ? void 0 : C.destinationCurrency) != null && A.locked),
632
+ networkLocked: !!((R = C == null ? void 0 : C.network) != null && R.locked),
633
+ fiatLocked: !!((F = C == null ? void 0 : C.sourceCurrency) != null && F.locked)
634
+ }
635
+ );
636
+ y && (y.cryptoCurrency !== void 0 && U({ type: "SET_CRYPTO_CURRENCY", currency: y.cryptoCurrency }), y.network !== void 0 && U({ type: "SET_NETWORK", network: y.network }), y.fiatCurrency !== void 0 && U({ type: "SET_FIAT_CURRENCY", currency: y.fiatCurrency }), y.paymentMethodId !== void 0 && U({ type: "SET_PAYMENT_METHOD", methodId: y.paymentMethodId }));
637
+ }, [
638
+ te,
639
+ ae,
640
+ B,
641
+ ce,
642
+ c.cryptoCurrency,
643
+ c.network,
644
+ c.fiatCurrency,
645
+ c.paymentMethodId,
646
+ C,
647
+ U
648
+ ]);
649
+ const Y = $(() => {
650
+ if (w) {
651
+ if (!c.cryptoAmount) return null;
652
+ const M = parseFloat(c.cryptoAmount);
653
+ return isNaN(M) || M <= 0 ? "Enter a valid amount" : null;
654
+ }
655
+ if (!S || !c.fiatAmount) return null;
656
+ const y = parseFloat(c.fiatAmount);
657
+ if (isNaN(y)) return null;
658
+ const A = S.fiats.find((M) => M.code === c.fiatCurrency);
659
+ if (!A) return null;
660
+ const R = parseFloat(A.minAmount), F = parseFloat(A.maxAmount);
661
+ return !isNaN(R) && y < R ? `Minimum amount is ${A.minAmount} ${c.fiatCurrency}` : !isNaN(F) && y > F ? `Maximum amount is ${A.maxAmount} ${c.fiatCurrency}` : null;
662
+ }, [S, c.fiatAmount, c.fiatCurrency, c.cryptoAmount, w]), oe = $(() => {
663
+ const y = w ? !!c.cryptoAmount : !!c.fiatAmount;
664
+ return !S || !y || !c.fiatCurrency || !c.cryptoCurrency || !c.network || Y || S.detectedCountry && c.countrySource === "" && !x ? null : {
665
+ fiatCurrency: c.fiatCurrency,
666
+ ...w ? { cryptoAmount: c.cryptoAmount } : { fiatAmount: c.fiatAmount },
667
+ cryptoCurrency: c.cryptoCurrency,
668
+ network: c.network,
669
+ paymentMethodId: c.paymentMethodId || void 0,
670
+ country: c.country || void 0,
671
+ orderType: c.flowType
672
+ };
673
+ }, [S, c.fiatCurrency, c.fiatAmount, c.cryptoAmount, c.cryptoCurrency, c.network, c.paymentMethodId, c.country, c.countrySource, Y, w, c.flowType, x]), {
674
+ quotes: z,
675
+ loading: Ee,
676
+ error: Ae,
677
+ refetch: at
678
+ } = Sa(j, oe), se = I(!1);
679
+ ye.useEffect(() => {
680
+ se.current || c.countrySource === "auto" && (Ee || !oe || Ae || !z || z.bestQuote || c.fiatCurrency !== "USD" && (se.current = !0, U({ type: "SET_FIAT_CURRENCY", currency: "USD" }), U({ type: "SET_FIAT_AMOUNT", amount: "250" })));
681
+ }, [z, Ee, Ae, oe, c.countrySource, c.fiatCurrency]);
529
682
  const {
530
- order: H,
531
- loading: Ue,
532
- error: Ee,
533
- createOrder: De
534
- } = ya(j), Ke = 15e3, {
535
- status: ne,
536
- loading: _e
537
- } = xa(
683
+ order: O,
684
+ loading: Me,
685
+ error: Re,
686
+ createOrder: Ie
687
+ } = ba(j), je = 15e3, {
688
+ status: ie,
689
+ loading: Ge
690
+ } = Na(
538
691
  { apiUrl: a },
539
- (H == null ? void 0 : H.orderId) ?? null,
540
- { pollInterval: E, initialDelay: Ke }
692
+ (O == null ? void 0 : O.orderId) ?? null,
693
+ { pollInterval: E, initialDelay: je }
541
694
  );
542
- de.useEffect(() => {
543
- (ne == null ? void 0 : ne.status) === "completed" && R && R(ne);
544
- }, [ne == null ? void 0 : ne.status, R]), de.useEffect(() => {
545
- const C = Ce || Ee;
546
- C && _ && _(C);
547
- }, [Ce, Ee, _]);
548
- const ve = p || (S == null ? void 0 : S.defaultGateway) || null, Fe = O(ve);
549
- Fe.current = ve;
550
- const Ve = O(X);
551
- Ve.current = X;
552
- const le = O(c);
553
- le.current = c;
554
- const Me = P(async () => {
555
- var w, L, U;
556
- const C = ((w = i.selectedQuote) == null ? void 0 : w.gatewayId) || ((U = (L = Ve.current) == null ? void 0 : L.bestQuote) == null ? void 0 : U.gatewayId) || Fe.current;
557
- if (!C || !i.walletAddress) {
558
- const D = [!C && "gateway", !i.walletAddress && "walletAddress"].filter(Boolean).join(", ");
559
- I({ type: "SET_ERROR", message: `Missing required fields: ${D}` });
695
+ ye.useEffect(() => {
696
+ (ie == null ? void 0 : ie.status) === "completed" && k && k(ie);
697
+ }, [ie == null ? void 0 : ie.status, k]), ye.useEffect(() => {
698
+ const y = xe || Re;
699
+ y && _ && _(y);
700
+ }, [xe, Re, _]);
701
+ const Se = p || (S == null ? void 0 : S.defaultGateway) || null, Be = I(Se);
702
+ Be.current = Se;
703
+ const $e = I(z);
704
+ $e.current = z;
705
+ const de = I(d);
706
+ de.current = d;
707
+ const Oe = P(async () => {
708
+ var A, R, F;
709
+ const y = ((A = c.selectedQuote) == null ? void 0 : A.gatewayId) || ((F = (R = $e.current) == null ? void 0 : R.bestQuote) == null ? void 0 : F.gatewayId) || Be.current;
710
+ if (!y || !c.walletAddress) {
711
+ const M = [!y && "gateway", !c.walletAddress && "walletAddress"].filter(Boolean).join(", ");
712
+ U({ type: "SET_ERROR", message: `Missing required fields: ${M}` });
560
713
  return;
561
714
  }
562
715
  try {
563
- await De({
564
- gateway: C,
565
- customerId: i.customerId || void 0,
566
- fiatCurrency: i.fiatCurrency,
567
- ...b ? { cryptoAmount: i.cryptoAmount } : { fiatAmount: i.fiatAmount },
568
- cryptoCurrency: i.cryptoCurrency,
569
- network: i.network,
570
- walletAddress: i.walletAddress,
571
- paymentMethodId: i.paymentMethodId || void 0,
572
- email: i.email || void 0,
573
- orderType: i.flowType,
574
- ...le.current ? { metadata: { brand: le.current } } : {}
575
- }), I({ type: "SET_STEP", step: "checkout" });
576
- } catch (D) {
577
- const F = D instanceof Error ? D.message : "Failed to create order";
578
- /wallet|address/i.test(F) ? I({ type: "SET_WALLET_ERROR", message: F.replace(/^Failed to create checkout intent:\s*/i, "") }) : I({ type: "SET_ERROR", message: F });
716
+ await Ie({
717
+ gateway: y,
718
+ customerId: c.customerId || void 0,
719
+ fiatCurrency: c.fiatCurrency,
720
+ ...w ? { cryptoAmount: c.cryptoAmount } : { fiatAmount: c.fiatAmount },
721
+ cryptoCurrency: c.cryptoCurrency,
722
+ network: c.network,
723
+ walletAddress: c.walletAddress,
724
+ paymentMethodId: c.paymentMethodId || void 0,
725
+ email: c.email || void 0,
726
+ orderType: c.flowType,
727
+ ...de.current ? { metadata: { brand: de.current } } : {}
728
+ }), U({ type: "SET_STEP", step: "checkout" });
729
+ } catch (M) {
730
+ const T = M instanceof Error ? M.message : "Failed to create order";
731
+ /wallet|address/i.test(T) ? U({ type: "SET_WALLET_ERROR", message: T.replace(/^Failed to create checkout intent:\s*/i, "") }) : U({ type: "SET_ERROR", message: T });
579
732
  }
580
- }, [i, De, b]), Je = P((C) => {
581
- I({ type: "SET_STEP", step: C });
582
- }, []), qe = P(() => {
583
- const C = ["confirm", "amount", "quotes", "wallet", "checkout", "processing", "complete"], w = C.indexOf(i.step);
584
- w > 0 && I({ type: "SET_STEP", step: C[w - 1] });
585
- }, [i.step, b]), je = Z(() => {
586
- const C = b ? !!i.cryptoAmount : !!i.fiatAmount;
587
- switch (i.step) {
733
+ }, [c, Ie, w]), nt = P((y) => {
734
+ U({ type: "SET_STEP", step: y });
735
+ }, []), rt = P(() => {
736
+ const y = ["confirm", "amount", "quotes", "wallet", "checkout", "processing", "complete"], A = y.indexOf(c.step);
737
+ A > 0 && U({ type: "SET_STEP", step: y[A - 1] });
738
+ }, [c.step, w]), We = $(() => {
739
+ const y = w ? !!c.cryptoAmount : !!c.fiatAmount;
740
+ switch (c.step) {
588
741
  case "confirm":
589
- return !!(C && i.cryptoCurrency && i.network && i.walletAddress && !ee);
742
+ return !!(y && c.cryptoCurrency && c.network && c.walletAddress && !Y);
590
743
  case "amount":
591
- return !!(C && i.cryptoCurrency && i.network && !ee);
744
+ return !!(y && c.cryptoCurrency && c.network && !Y);
592
745
  case "quotes":
593
- return !!i.selectedQuote;
746
+ return !!c.selectedQuote;
594
747
  case "wallet":
595
- return !!i.walletAddress;
748
+ return !!c.walletAddress;
596
749
  default:
597
750
  return !1;
598
751
  }
599
- }, [i, ee, b]), ce = {
752
+ }, [c, Y, w]), ue = {
600
753
  apiConfig: j,
601
754
  assetBaseUrl: n,
602
755
  config: S,
603
- configLoading: ge,
604
- configError: Ce,
605
- state: i,
606
- dispatch: I,
607
- quotes: X,
608
- quotesLoading: fe,
609
- quotesError: he,
610
- fetchQuotes: Le,
611
- order: H,
612
- orderLoading: Ue,
613
- orderError: Ee,
614
- createOrder: Me,
615
- orderStatus: ne,
616
- orderStatusLoading: _e,
617
- fieldLocks: A || null,
618
- defaultGateway: ve,
619
- amountError: ee,
620
- goToStep: Je,
621
- goBack: qe,
622
- canProceed: je
756
+ configLoading: te,
757
+ configError: xe,
758
+ state: c,
759
+ dispatch: U,
760
+ quotes: z,
761
+ quotesLoading: Ee,
762
+ quotesError: Ae,
763
+ fetchQuotes: at,
764
+ order: O,
765
+ orderLoading: Me,
766
+ orderError: Re,
767
+ createOrder: Oe,
768
+ orderStatus: ie,
769
+ orderStatusLoading: Ge,
770
+ fieldLocks: C || null,
771
+ defaultGateway: Se,
772
+ availableFiats: ae,
773
+ availableCryptos: B,
774
+ availablePaymentMethods: ce,
775
+ selectionUnsupported: De,
776
+ amountError: Y,
777
+ goToStep: nt,
778
+ goBack: rt,
779
+ canProceed: We
623
780
  };
624
- return /* @__PURE__ */ e(jt.Provider, { value: ce, children: ae });
781
+ return /* @__PURE__ */ e(Zt.Provider, { value: ue, children: re });
625
782
  }
626
- function Te() {
627
- const t = ma(jt);
783
+ function Ue() {
784
+ const t = ga(Zt);
628
785
  if (!t)
629
786
  throw new Error("useRamp must be used within a RampProvider");
630
787
  return t;
631
788
  }
632
- const Be = {
789
+ const Pe = {
633
790
  // Canonical IDs (returned by the API — lowercase full names)
634
791
  // These cover cases where the canonical ID differs from the legacy uppercase key
635
792
  ethereum: { name: "Ethereum (ERC20)", shortName: "Ethereum", icon: "eth" },
@@ -791,7 +948,7 @@ const Be = {
791
948
  OKC: { name: "OKX Chain", icon: "eth" },
792
949
  UNI_CHAIN: { name: "UNI", icon: "uni" },
793
950
  ZEC: { name: "ZCash", icon: "zec" }
794
- }, Gt = [
951
+ }, Qt = [
795
952
  // --- Popular / Top coins ---
796
953
  { code: "BTC", name: "Bitcoin", chains: ["BTC", "LN"], popular: !0 },
797
954
  { code: "ETH", name: "Ethereum", chains: ["ETH", "ARB", "BASE", "BSC", "OPTIMISM", "LINEA", "ZKSYNC", "LRC", "STARK", "APE", "ECLIPSE", "FUEL", "INK", "SOPHON", "UNICHAIN", "WLD"], popular: !0 },
@@ -984,9 +1141,9 @@ const Be = {
984
1141
  { code: "ZCHF", name: "Frankencoin", chains: ["ETH"], popular: !1 },
985
1142
  { code: "ZETA", name: "Zeta", chains: ["ETH", "ZETACHAIN"], popular: !1 },
986
1143
  { code: "ZTG", name: "Zeitgeist", chains: ["ZTG"], popular: !1 }
987
- ], Sa = Object.fromEntries(
988
- Gt.map((t) => [t.code, t.name])
989
- ), va = {
1144
+ ], Ua = Object.fromEntries(
1145
+ Qt.map((t) => [t.code, t.name])
1146
+ ), Fa = {
990
1147
  AED: "ae",
991
1148
  ALL: "al",
992
1149
  ARS: "ar",
@@ -1021,21 +1178,21 @@ const Be = {
1021
1178
  VND: "vn",
1022
1179
  ZAR: "za"
1023
1180
  };
1024
- function $t(t, a = "") {
1181
+ function zt(t, a = "") {
1025
1182
  return `${a}/crypto-icons/${t.toLowerCase()}.svg`;
1026
1183
  }
1027
- function ba(t, a = "") {
1028
- const n = va[t] || "us";
1184
+ function Da(t, a = "") {
1185
+ const n = Fa[t] || "us";
1029
1186
  return `${a}/flags/${n}.svg`;
1030
1187
  }
1031
- function Qe(t) {
1032
- return Be[t] || Be[t.toLowerCase()] || Be[t.toUpperCase()] || Be[t.toUpperCase().replace(/-/g, "_")] || Be[t.toLowerCase().replace(/-/g, "_")];
1188
+ function qe(t) {
1189
+ return Pe[t] || Pe[t.toLowerCase()] || Pe[t.toUpperCase()] || Pe[t.toUpperCase().replace(/-/g, "_")] || Pe[t.toLowerCase().replace(/-/g, "_")];
1033
1190
  }
1034
- function it(t, a = "") {
1035
- const n = Qe(t);
1191
+ function ut(t, a = "") {
1192
+ const n = qe(t);
1036
1193
  return n ? `${a}/crypto-icons/${n.icon}.svg` : `${a}/crypto-icons/${t.toLowerCase()}.svg`;
1037
1194
  }
1038
- const Ft = [
1195
+ const Pt = [
1039
1196
  { code: "ALL", name: "Albania Lek" },
1040
1197
  { code: "ARS", name: "Argentina Peso" },
1041
1198
  { code: "AUD", name: "Australian Dollar" },
@@ -1048,14 +1205,14 @@ const Ft = [
1048
1205
  { code: "CHF", name: "Swiss Franc" },
1049
1206
  { code: "MXN", name: "Mexican Peso" },
1050
1207
  { code: "INR", name: "Indian Rupee" }
1051
- ], Mt = [
1208
+ ], Kt = [
1052
1209
  { id: "blue", name: "Blue", accent: "#0077FF" },
1053
1210
  { id: "violet", name: "Violet", accent: "#7C3AED" },
1054
1211
  { id: "green", name: "Green", accent: "#10B981" },
1055
1212
  { id: "orange", name: "Orange", accent: "#F59E0B" },
1056
1213
  { id: "rose", name: "Rose", accent: "#F43F5E" },
1057
1214
  { id: "mono", name: "Mono", accent: null }
1058
- ], It = {
1215
+ ], _t = {
1059
1216
  USDC: { USD: 0.9962, EUR: 1.0814, GBP: 1.2573, JPY: 667e-5, CAD: 0.7198, AUD: 0.6384, BRL: 0.1726, CHF: 1.1306, MXN: 0.0487, INR: 0.01187, ARS: 855e-6, ALL: 0.01058 },
1060
1217
  USDT: { USD: 0.9958, EUR: 1.081, GBP: 1.2568, JPY: 666e-5, CAD: 0.7194, AUD: 0.638, BRL: 0.1724, CHF: 1.1301, MXN: 0.0486, INR: 0.01186, ARS: 854e-6, ALL: 0.01057 },
1061
1218
  BTC: { USD: 104e-7, EUR: 1129e-8, GBP: 1313e-8, JPY: 696e-10, CAD: 751e-8, AUD: 666e-8, BRL: 18e-7, CHF: 118e-7, MXN: 508e-9, INR: 124e-9, ARS: 892e-11, ALL: 11e-8 },
@@ -1064,7 +1221,7 @@ const Ft = [
1064
1221
  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 },
1065
1222
  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 },
1066
1223
  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 }
1067
- }, Na = /* @__PURE__ */ new Set([
1224
+ }, Ma = /* @__PURE__ */ new Set([
1068
1225
  "USDC",
1069
1226
  "USDT",
1070
1227
  "DAI",
@@ -1091,17 +1248,17 @@ const Ft = [
1091
1248
  "EURR",
1092
1249
  "ZCHF"
1093
1250
  ]);
1094
- function Xt(t) {
1095
- return Na.has(t.toUpperCase());
1251
+ function Jt(t) {
1252
+ return Ma.has(t.toUpperCase());
1096
1253
  }
1097
- function hn(t, a) {
1254
+ function En(t, a) {
1098
1255
  var n, r;
1099
- return ((n = It[t]) == null ? void 0 : n[a]) ?? ((r = It.USDC) == null ? void 0 : r[a]) ?? 1;
1256
+ return ((n = _t[t]) == null ? void 0 : n[a]) ?? ((r = _t.USDC) == null ? void 0 : r[a]) ?? 1;
1100
1257
  }
1101
- function Ea(t) {
1258
+ function Ia(t) {
1102
1259
  return parseFloat(t.replace(/,/g, "")) || 0;
1103
1260
  }
1104
- function lt(t) {
1261
+ function mt(t) {
1105
1262
  if (t === 0) return "0";
1106
1263
  if (t >= 1e3) return t.toLocaleString("en-US", { maximumFractionDigits: 2 });
1107
1264
  if (t >= 1) return t.toFixed(2);
@@ -1109,37 +1266,37 @@ function lt(t) {
1109
1266
  const a = t.toPrecision(4);
1110
1267
  return parseFloat(a).toString();
1111
1268
  }
1112
- const ue = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), Bt = 10, Ot = 1e-4, wa = (() => {
1269
+ const fe = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), Vt = 10, jt = 1e-4, Ba = (() => {
1113
1270
  const t = [];
1114
- for (const a of Gt)
1271
+ for (const a of Qt)
1115
1272
  for (const n of a.chains)
1116
1273
  t.push({ code: a.code, name: a.name, chain: n, popular: a.popular });
1117
1274
  return t;
1118
1275
  })();
1119
- function Wt({
1276
+ function qt({
1120
1277
  src: t,
1121
1278
  alt: a,
1122
1279
  size: n,
1123
1280
  className: r = "",
1124
- background: l
1281
+ background: o
1125
1282
  }) {
1126
- const [c, m] = v(!1), [s, u] = v(!1), f = O(t);
1127
- f.current !== t && (f.current = t, m(!1), u(!1));
1128
- const h = P(() => m(!0), []), d = P(() => u(!0), []);
1129
- return /* @__PURE__ */ o(
1283
+ const [d, u] = N(!1), [i, s] = N(!1), m = I(t);
1284
+ m.current !== t && (m.current = t, u(!1), s(!1));
1285
+ const h = P(() => u(!0), []), f = P(() => s(!0), []);
1286
+ return /* @__PURE__ */ l(
1130
1287
  "div",
1131
1288
  {
1132
1289
  className: `relative rounded-full shrink-0 ${r}`,
1133
- style: { width: n, height: n, background: l },
1290
+ style: { width: n, height: n, background: o },
1134
1291
  children: [
1135
- !c && !s && /* @__PURE__ */ e(
1292
+ !d && !i && /* @__PURE__ */ e(
1136
1293
  "div",
1137
1294
  {
1138
1295
  className: "absolute inset-0 rounded-full animate-pulse",
1139
1296
  style: { background: "var(--t-pill-bg, #333)" }
1140
1297
  }
1141
1298
  ),
1142
- s ? /* @__PURE__ */ e(
1299
+ i ? /* @__PURE__ */ e(
1143
1300
  "div",
1144
1301
  {
1145
1302
  className: "absolute inset-0 rounded-full flex items-center justify-center font-bold",
@@ -1158,8 +1315,8 @@ function Wt({
1158
1315
  width: n,
1159
1316
  height: n,
1160
1317
  onLoad: h,
1161
- onError: d,
1162
- className: `rounded-full ${c ? "opacity-100" : "opacity-0"}`,
1318
+ onError: f,
1319
+ className: `rounded-full ${d ? "opacity-100" : "opacity-0"}`,
1163
1320
  style: { width: n, height: n, transition: "opacity 0.15s ease-in" }
1164
1321
  }
1165
1322
  )
@@ -1167,40 +1324,40 @@ function Wt({
1167
1324
  }
1168
1325
  );
1169
1326
  }
1170
- function Ht({ ticker: t, size: a = 32, baseUrl: n = "" }) {
1327
+ function Gt({ ticker: t, size: a = 32, baseUrl: n = "" }) {
1171
1328
  return /* @__PURE__ */ e(
1172
- Wt,
1329
+ qt,
1173
1330
  {
1174
- src: $t(t, n),
1331
+ src: zt(t, n),
1175
1332
  alt: t,
1176
1333
  size: a,
1177
1334
  background: "#ffffff"
1178
1335
  }
1179
1336
  );
1180
1337
  }
1181
- function ct({ currencyCode: t, size: a = 16, baseUrl: n = "" }) {
1338
+ function ft({ currencyCode: t, size: a = 16, baseUrl: n = "" }) {
1182
1339
  return /* @__PURE__ */ e(
1183
- Wt,
1340
+ qt,
1184
1341
  {
1185
- src: ba(t, n),
1342
+ src: Da(t, n),
1186
1343
  alt: t,
1187
1344
  size: a
1188
1345
  }
1189
1346
  );
1190
1347
  }
1191
- function dt({ size: t = 32, color: a = "#888" }) {
1192
- return /* @__PURE__ */ o("svg", { width: t, height: t, viewBox: "0 0 32 32", fill: "none", children: [
1348
+ function yt({ size: t = 32, color: a = "#888" }) {
1349
+ return /* @__PURE__ */ l("svg", { width: t, height: t, viewBox: "0 0 32 32", fill: "none", children: [
1193
1350
  /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "16", fill: a }),
1194
1351
  /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "8", stroke: "white", strokeWidth: "1.5", fill: "none" })
1195
1352
  ] });
1196
1353
  }
1197
- function Aa({ size: t = 24 }) {
1354
+ function Oa({ size: t = 24 }) {
1198
1355
  return /* @__PURE__ */ e(
1199
1356
  "div",
1200
1357
  {
1201
1358
  className: "rounded-full flex items-center justify-center shrink-0",
1202
1359
  style: { width: t, height: t, background: "var(--t-card-icon-bg)" },
1203
- children: /* @__PURE__ */ o("svg", { width: t * 0.6, height: t * 0.58, viewBox: "0 0 25 24", fill: "none", children: [
1360
+ children: /* @__PURE__ */ l("svg", { width: t * 0.6, height: t * 0.58, viewBox: "0 0 25 24", fill: "none", children: [
1204
1361
  /* @__PURE__ */ e("path", { d: "M23.292 7.5H1.70801L12.5 0.592773L23.292 7.5Z", stroke: "var(--t-card-icon-stroke)", strokeWidth: "1" }),
1205
1362
  /* @__PURE__ */ e("rect", { x: "3", y: "10", width: "1.5", height: "11", fill: "var(--t-card-icon-stroke)" }),
1206
1363
  /* @__PURE__ */ e("rect", { x: "9", y: "10", width: "1.5", height: "11", fill: "var(--t-card-icon-stroke)" }),
@@ -1211,7 +1368,7 @@ function Aa({ size: t = 24 }) {
1211
1368
  }
1212
1369
  );
1213
1370
  }
1214
- function Ra({ size: t = 32 }) {
1371
+ function Ha({ size: t = 32 }) {
1215
1372
  return /* @__PURE__ */ e(
1216
1373
  "div",
1217
1374
  {
@@ -1221,7 +1378,7 @@ function Ra({ size: t = 32 }) {
1221
1378
  }
1222
1379
  );
1223
1380
  }
1224
- function Ta({ size: t = 32 }) {
1381
+ function Pa({ size: t = 32 }) {
1225
1382
  return /* @__PURE__ */ e(
1226
1383
  "div",
1227
1384
  {
@@ -1237,13 +1394,13 @@ function Ta({ size: t = 32 }) {
1237
1394
  }
1238
1395
  );
1239
1396
  }
1240
- function ka({ size: t = 32 }) {
1397
+ function Ka({ size: t = 32 }) {
1241
1398
  return /* @__PURE__ */ e(
1242
1399
  "div",
1243
1400
  {
1244
1401
  className: "flex items-center justify-center shrink-0",
1245
1402
  style: { width: t, height: t, background: "#3C4043", borderRadius: t * 0.2 },
1246
- children: /* @__PURE__ */ o("svg", { width: t * 0.72, height: t * 0.296, viewBox: "0 0 51 21", fill: "none", children: [
1403
+ children: /* @__PURE__ */ l("svg", { width: t * 0.72, height: t * 0.296, viewBox: "0 0 51 21", fill: "none", children: [
1247
1404
  /* @__PURE__ */ e("path", { d: "M50.9156 5.87122L44.6406 20.2837H42.6992L45.0289 15.2416L40.9009 5.87122H42.9451L45.929 13.0573H45.9689L48.8714 5.87122H50.9156Z", fill: "white" }),
1248
1405
  /* @__PURE__ */ e("path", { d: "M39.3906 6.65832C38.5866 5.91563 37.4895 5.54547 36.0995 5.54547C34.314 5.54547 32.9657 6.19816 32.0513 7.50532L33.7084 8.54664C34.3211 7.66089 35.1512 7.21951 36.2011 7.21951C36.8967 7.21951 37.5008 7.44661 38.0194 7.9023C38.538 8.35948 38.7964 8.91352 38.7964 9.5665V9.99507C38.0751 9.58796 37.1536 9.38381 36.0366 9.38381C34.7297 9.38381 33.6839 9.68959 32.8998 10.3023C32.1172 10.9151 31.7256 11.738 31.7256 12.7706C31.7256 13.8033 32.0969 14.5675 32.8396 15.2216C33.5808 15.8758 34.5065 16.2016 35.6092 16.2016C36.9033 16.2016 37.9389 15.6302 38.7147 14.4876H38.7976V15.8761H40.5944V9.70955C40.5944 8.4167 40.1944 7.39982 39.3903 6.65862L39.3906 6.65832ZM37.8665 13.6501C37.2451 14.2343 36.5424 14.5272 35.7511 14.5272C35.1926 14.5272 34.7068 14.3645 34.2913 14.0387C33.8741 13.7103 33.6673 13.3032 33.6673 12.8132C33.6673 12.2675 33.923 11.8134 34.4344 11.4462C34.9443 11.079 35.5815 10.8948 36.3442 10.8948C37.3926 10.8948 38.211 11.1249 38.7967 11.5889C38.7967 12.3775 38.4867 13.0645 37.8668 13.6501H37.8665Z", fill: "white" }),
1249
1406
  /* @__PURE__ */ e("path", { d: "M30.4166 2.52282C29.5296 1.67999 28.4552 1.25739 27.1883 1.25739H22.2017V15.8758H24.0813V9.95362H27.188C28.4678 9.95362 29.5448 9.53936 30.4163 8.70815C31.3175 7.87962 31.7661 6.84397 31.7661 5.60565C31.7661 4.36733 31.3175 3.36744 30.4163 2.52312L30.4166 2.52282ZM29.0895 7.40248C28.598 7.90525 27.9781 8.15798 27.2297 8.15798H24.0816V3.05272H27.2297C27.9781 3.05272 28.5983 3.31141 29.0895 3.82849C29.5937 4.33276 29.845 4.92554 29.845 5.60535C29.845 6.28516 29.5934 6.8994 29.0895 7.40218V7.40248Z", fill: "white" }),
@@ -1252,7 +1409,7 @@ function ka({ size: t = 32 }) {
1252
1409
  }
1253
1410
  );
1254
1411
  }
1255
- function La({ size: t = 32 }) {
1412
+ function _a({ size: t = 32 }) {
1256
1413
  return /* @__PURE__ */ e(
1257
1414
  "div",
1258
1415
  {
@@ -1262,13 +1419,13 @@ function La({ size: t = 32 }) {
1262
1419
  }
1263
1420
  );
1264
1421
  }
1265
- function Ua({ size: t = 32 }) {
1422
+ function Va({ size: t = 32 }) {
1266
1423
  return /* @__PURE__ */ e(
1267
1424
  "div",
1268
1425
  {
1269
1426
  className: "flex items-center justify-center shrink-0",
1270
1427
  style: { width: t, height: t, background: "#1A1F71", borderRadius: t * 0.2 },
1271
- children: /* @__PURE__ */ o("svg", { width: t * 0.72, height: t * 0.234, viewBox: "0 0 43 14", fill: "none", children: [
1428
+ children: /* @__PURE__ */ l("svg", { width: t * 0.72, height: t * 0.234, viewBox: "0 0 43 14", fill: "none", children: [
1272
1429
  /* @__PURE__ */ e("path", { d: "M18.3629 13.5165H14.9302L17.0772 0.240662H20.5097L18.3629 13.5165Z", fill: "white" }),
1273
1430
  /* @__PURE__ */ e("path", { d: "M30.806 0.565203C30.1289 0.296586 29.055 0 27.7271 0C24.3372 0 21.95 1.80767 21.9354 4.3921C21.9072 6.29889 23.6445 7.35796 24.9439 7.99375C26.2719 8.64342 26.7234 9.06747 26.7234 9.64656C26.7099 10.5359 25.6502 10.9459 24.6619 10.9459C23.2914 10.9459 22.5571 10.7345 21.4412 10.2397L20.9891 10.0276L20.5088 13.0077C21.3139 13.3745 22.7972 13.7 24.3372 13.7143C27.939 13.7143 30.2839 11.9346 30.3117 9.18047C30.3254 7.66919 29.4081 6.51119 27.4303 5.56493C26.2297 4.95749 25.4944 4.54791 25.4944 3.92639C25.5085 3.36137 26.1163 2.78265 27.4716 2.78265C28.5876 2.75431 29.4075 3.02255 30.0286 3.29098L30.3391 3.43195L30.806 0.565203Z", fill: "white" }),
1274
1431
  /* @__PURE__ */ e("path", { d: "M35.3681 8.81332C35.6508 8.05064 36.7386 5.09886 36.7386 5.09886C36.7243 5.1272 37.0207 4.3221 37.1902 3.82785L37.4301 4.97178C37.4301 4.97178 38.0802 8.14956 38.2213 8.81332C37.6848 8.81332 36.0461 8.81332 35.3681 8.81332ZM39.6053 0.240662H36.9501C36.1313 0.240662 35.5092 0.480559 35.156 1.34216L30.0571 13.5163H33.659C33.659 13.5163 34.2519 11.8777 34.3794 11.5248C34.7745 11.5248 38.2784 11.5248 38.7867 11.5248C38.8853 11.9909 39.1963 13.5163 39.1963 13.5163H42.3747L39.6053 0.240662Z", fill: "white" }),
@@ -1278,14 +1435,14 @@ function Ua({ size: t = 32 }) {
1278
1435
  }
1279
1436
  );
1280
1437
  }
1281
- function Da({ size: t = 32 }) {
1438
+ function ja({ size: t = 32 }) {
1282
1439
  const a = t * 0.8;
1283
1440
  return /* @__PURE__ */ e(
1284
1441
  "div",
1285
1442
  {
1286
1443
  className: "flex items-center justify-center shrink-0",
1287
1444
  style: { width: t, height: t },
1288
- children: /* @__PURE__ */ o("svg", { width: a, height: a * 0.625, viewBox: "0 0 48 30", fill: "none", children: [
1445
+ children: /* @__PURE__ */ l("svg", { width: a, height: a * 0.625, viewBox: "0 0 48 30", fill: "none", children: [
1289
1446
  /* @__PURE__ */ e("circle", { cx: "18", cy: "15", r: "14", fill: "#EB001B" }),
1290
1447
  /* @__PURE__ */ e("circle", { cx: "30", cy: "15", r: "14", fill: "#F79E1B" }),
1291
1448
  /* @__PURE__ */ e("path", { d: "M24 2.35A14 14 0 0 1 24 27.65A14 14 0 0 1 24 2.35Z", fill: "#FF5F00" })
@@ -1293,9 +1450,9 @@ function Da({ size: t = 32 }) {
1293
1450
  }
1294
1451
  );
1295
1452
  }
1296
- function Fa({ size: t = 32 }) {
1297
- const a = t * 0.56, n = a * 0.65, r = Math.max(2, a * 0.1), l = a * 0.2;
1298
- return /* @__PURE__ */ o("div", { className: "flex items-center justify-center shrink-0", style: { width: t, height: t }, children: [
1453
+ function Ga({ size: t = 32 }) {
1454
+ const a = t * 0.56, n = a * 0.65, r = Math.max(2, a * 0.1), o = a * 0.2;
1455
+ return /* @__PURE__ */ l("div", { className: "flex items-center justify-center shrink-0", style: { width: t, height: t }, children: [
1299
1456
  /* @__PURE__ */ e(
1300
1457
  "div",
1301
1458
  {
@@ -1310,7 +1467,7 @@ function Fa({ size: t = 32 }) {
1310
1467
  alignItems: "center",
1311
1468
  justifyContent: "center"
1312
1469
  },
1313
- children: /* @__PURE__ */ o("svg", { width: a * 0.7, height: n * 0.35, viewBox: "0 0 43 14", fill: "none", children: [
1470
+ children: /* @__PURE__ */ l("svg", { width: a * 0.7, height: n * 0.35, viewBox: "0 0 43 14", fill: "none", children: [
1314
1471
  /* @__PURE__ */ e("path", { d: "M18.3629 13.5165H14.9302L17.0772 0.240662H20.5097L18.3629 13.5165Z", fill: "white" }),
1315
1472
  /* @__PURE__ */ e("path", { d: "M12.0629 0.240662L8.70119 9.29349L8.33383 7.45747C7.71232 5.33894 5.76311 3.03721 3.58789 1.89272L6.66713 13.5024H10.2971L15.6927 0.240662H12.0629Z", fill: "white" }),
1316
1473
  /* @__PURE__ */ e("path", { d: "M5.57939 0.240662H0.0565013L0 0.508903C4.3082 1.61059 7.16143 4.26616 8.3337 7.45803L7.13309 1.35661C6.93542 0.508715 6.32798 0.268631 5.57939 0.240662Z", fill: "white" }),
@@ -1327,7 +1484,7 @@ function Fa({ size: t = 32 }) {
1327
1484
  height: n,
1328
1485
  background: "#252525",
1329
1486
  borderRadius: r,
1330
- marginLeft: -l,
1487
+ marginLeft: -o,
1331
1488
  position: "relative",
1332
1489
  zIndex: 1,
1333
1490
  display: "flex",
@@ -1335,7 +1492,7 @@ function Fa({ size: t = 32 }) {
1335
1492
  justifyContent: "center",
1336
1493
  overflow: "hidden"
1337
1494
  },
1338
- children: /* @__PURE__ */ o("svg", { width: n * 0.85, height: n * 0.6, viewBox: "0 0 48 30", fill: "none", children: [
1495
+ children: /* @__PURE__ */ l("svg", { width: n * 0.85, height: n * 0.6, viewBox: "0 0 48 30", fill: "none", children: [
1339
1496
  /* @__PURE__ */ e("circle", { cx: "18", cy: "15", r: "14", fill: "#EB001B" }),
1340
1497
  /* @__PURE__ */ e("circle", { cx: "30", cy: "15", r: "14", fill: "#F79E1B" }),
1341
1498
  /* @__PURE__ */ e("path", { d: "M24 2.35A14 14 0 0 1 24 27.65A14 14 0 0 1 24 2.35Z", fill: "#FF5F00" })
@@ -1344,7 +1501,7 @@ function Fa({ size: t = 32 }) {
1344
1501
  )
1345
1502
  ] });
1346
1503
  }
1347
- function pn({ size: t = 18 }) {
1504
+ function An({ size: t = 18 }) {
1348
1505
  return /* @__PURE__ */ e(
1349
1506
  "div",
1350
1507
  {
@@ -1354,13 +1511,13 @@ function pn({ size: t = 18 }) {
1354
1511
  }
1355
1512
  );
1356
1513
  }
1357
- function He() {
1514
+ function _e() {
1358
1515
  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" }) });
1359
1516
  }
1360
- function Pt() {
1517
+ function $t() {
1361
1518
  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" }) });
1362
1519
  }
1363
- function Ma({ onClick: t }) {
1520
+ function $a({ onClick: t }) {
1364
1521
  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(
1365
1522
  "path",
1366
1523
  {
@@ -1369,42 +1526,42 @@ function Ma({ onClick: t }) {
1369
1526
  }
1370
1527
  ) }) });
1371
1528
  }
1372
- function Ia({ size: t = 40 }) {
1529
+ function Wa({ size: t = 40 }) {
1373
1530
  return /* @__PURE__ */ e(
1374
1531
  "div",
1375
1532
  {
1376
1533
  className: "rounded-full flex items-center justify-center shrink-0",
1377
1534
  style: { width: t, height: t, background: "var(--t-surface)" },
1378
- children: /* @__PURE__ */ o("svg", { width: t * 0.5, height: t * 0.5, viewBox: "0 0 20 20", fill: "none", children: [
1535
+ children: /* @__PURE__ */ l("svg", { width: t * 0.5, height: t * 0.5, viewBox: "0 0 20 20", fill: "none", children: [
1379
1536
  /* @__PURE__ */ e("circle", { cx: "10", cy: "10", r: "7.5", stroke: "var(--t-text)", strokeWidth: "1.5" }),
1380
1537
  /* @__PURE__ */ e("path", { d: "M10 2.5A7.5 7.5 0 0 1 10 17.5", fill: "var(--t-text)" })
1381
1538
  ] })
1382
1539
  }
1383
1540
  );
1384
1541
  }
1385
- function Ba(t, a = 32) {
1542
+ function Xa(t, a = 32) {
1386
1543
  switch (t) {
1387
1544
  case "revolut":
1388
- return /* @__PURE__ */ e(Ra, { size: a });
1545
+ return /* @__PURE__ */ e(Ha, { size: a });
1389
1546
  case "applepay":
1390
- return /* @__PURE__ */ e(Ta, { size: a });
1547
+ return /* @__PURE__ */ e(Pa, { size: a });
1391
1548
  case "card":
1392
- return /* @__PURE__ */ e(Fa, { size: a });
1549
+ return /* @__PURE__ */ e(Ga, { size: a });
1393
1550
  case "googlepay":
1394
- return /* @__PURE__ */ e(ka, { size: a });
1551
+ return /* @__PURE__ */ e(Ka, { size: a });
1395
1552
  case "paypal":
1396
- return /* @__PURE__ */ e(La, { size: a });
1553
+ return /* @__PURE__ */ e(_a, { size: a });
1397
1554
  case "bank":
1398
- return /* @__PURE__ */ e(Aa, { size: a });
1555
+ return /* @__PURE__ */ e(Oa, { size: a });
1399
1556
  case "visa":
1400
- return /* @__PURE__ */ e(Ua, { size: a });
1557
+ return /* @__PURE__ */ e(Va, { size: a });
1401
1558
  case "mastercard":
1402
- return /* @__PURE__ */ e(Da, { size: a });
1559
+ return /* @__PURE__ */ e(ja, { size: a });
1403
1560
  default:
1404
- return /* @__PURE__ */ e(dt, { size: a });
1561
+ return /* @__PURE__ */ e(yt, { size: a });
1405
1562
  }
1406
1563
  }
1407
- const Oa = {
1564
+ const Ya = {
1408
1565
  "debit-credit-card": "card",
1409
1566
  "bank-transfer": "bank",
1410
1567
  "ach-bank-transfer": "bank",
@@ -1415,7 +1572,7 @@ const Oa = {
1415
1572
  "google-pay": "googlepay",
1416
1573
  paypal: "paypal",
1417
1574
  revolut: "revolut"
1418
- }, Ha = {
1575
+ }, Za = {
1419
1576
  "debit-credit-card": "Card",
1420
1577
  "bank-transfer": "Bank Transfer",
1421
1578
  "ach-bank-transfer": "ACH",
@@ -1425,24 +1582,24 @@ const Oa = {
1425
1582
  paypal: "PayPal",
1426
1583
  revolut: "Revolut"
1427
1584
  };
1428
- function Yt(t, a) {
1429
- return Ha[t] || a;
1585
+ function ea(t, a) {
1586
+ return Za[t] || a;
1430
1587
  }
1431
- function Zt(t, a, n = 24) {
1432
- const r = Oa[t];
1433
- return r ? Ba(r, n) : a ? /* @__PURE__ */ e("img", { src: a, alt: "", width: n, height: n, style: { borderRadius: "50%" } }) : /* @__PURE__ */ e(dt, { size: n });
1588
+ function ta(t, a, n = 24) {
1589
+ const r = Ya[t];
1590
+ return r ? Xa(r, n) : a ? /* @__PURE__ */ e("img", { src: a, alt: "", width: n, height: n, style: { borderRadius: "50%" } }) : /* @__PURE__ */ e(yt, { size: n });
1434
1591
  }
1435
- function Pa({
1592
+ function Qa({
1436
1593
  methods: t,
1437
1594
  selectedId: a,
1438
1595
  onOpenModal: n,
1439
1596
  fiatCurrency: r
1440
1597
  }) {
1441
- const l = Z(
1442
- () => t.filter((m) => m.supportedFiats.includes(r)),
1598
+ const o = $(
1599
+ () => t.filter((u) => u.supportedFiats.includes(r)),
1443
1600
  [t, r]
1444
- ), c = l.find((m) => m.id === a) || l[0];
1445
- return l.length === 0 ? /* @__PURE__ */ e(
1601
+ ), d = o.find((u) => u.id === a) || o[0];
1602
+ return o.length === 0 ? /* @__PURE__ */ e(
1446
1603
  "div",
1447
1604
  {
1448
1605
  className: "flex items-center justify-between px-[18px] pt-[12px] pb-[14px]",
@@ -1451,19 +1608,19 @@ function Pa({
1451
1608
  borderBottomLeftRadius: 5,
1452
1609
  borderBottomRightRadius: 5
1453
1610
  },
1454
- children: /* @__PURE__ */ o("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: [
1611
+ children: /* @__PURE__ */ l("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: [
1455
1612
  "No payment methods available for ",
1456
1613
  r
1457
1614
  ] })
1458
1615
  }
1459
- ) : /* @__PURE__ */ e(J, { children: /* @__PURE__ */ o(
1616
+ ) : /* @__PURE__ */ e(q, { children: /* @__PURE__ */ l(
1460
1617
  "div",
1461
1618
  {
1462
1619
  role: "button",
1463
1620
  tabIndex: 0,
1464
1621
  onClick: n,
1465
- onKeyDown: (m) => {
1466
- (m.key === "Enter" || m.key === " ") && n();
1622
+ onKeyDown: (u) => {
1623
+ (u.key === "Enter" || u.key === " ") && n();
1467
1624
  },
1468
1625
  className: "flex items-center justify-between w-full px-[18px] transition-colors",
1469
1626
  style: {
@@ -1475,38 +1632,38 @@ function Pa({
1475
1632
  },
1476
1633
  children: [
1477
1634
  /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Payment method" }),
1478
- /* @__PURE__ */ o("span", { className: "flex items-center gap-2", children: [
1479
- /* @__PURE__ */ e("span", { className: "flex items-center justify-center", style: { width: 20, height: 20 }, children: c && Zt(c.id, c.icon, 20) }),
1480
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: c ? Yt(c.id, c.name) : "Select" }),
1481
- /* @__PURE__ */ e(He, {})
1635
+ /* @__PURE__ */ l("span", { className: "flex items-center gap-2", children: [
1636
+ /* @__PURE__ */ e("span", { className: "flex items-center justify-center", style: { width: 20, height: 20 }, children: d && ta(d.id, d.icon, 20) }),
1637
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: d ? ea(d.id, d.name) : "Select" }),
1638
+ /* @__PURE__ */ e(_e, {})
1482
1639
  ] })
1483
1640
  ]
1484
1641
  }
1485
1642
  ) });
1486
1643
  }
1487
- function Ka({
1644
+ function za({
1488
1645
  className: t = "",
1489
1646
  autoRedirect: a = !1,
1490
1647
  redirectDelay: n = 3e3
1491
1648
  }) {
1492
1649
  var p;
1493
- const { order: r, orderStatus: l, goToStep: c, goBack: m } = Te(), [s, u] = v(!1), [f, h] = v(null), d = r != null && r.checkout.expiresAt ? Date.now() > r.checkout.expiresAt : !1;
1494
- if (Y(() => {
1495
- if ((r == null ? void 0 : r.checkout.method) === "redirect" && a && !d) {
1650
+ const { order: r, orderStatus: o, goToStep: d, goBack: u } = Ue(), [i, s] = N(!1), [m, h] = N(null), f = r != null && r.checkout.expiresAt ? Date.now() > r.checkout.expiresAt : !1;
1651
+ if (Z(() => {
1652
+ if ((r == null ? void 0 : r.checkout.method) === "redirect" && a && !f) {
1496
1653
  h(Math.ceil(n / 1e3));
1497
- const g = setTimeout(() => {
1654
+ const x = setTimeout(() => {
1498
1655
  window.location.href = r.checkout.url;
1499
- }, n), A = setInterval(() => {
1656
+ }, n), C = setInterval(() => {
1500
1657
  h((E) => E && E > 1 ? E - 1 : null);
1501
1658
  }, 1e3);
1502
1659
  return () => {
1503
- clearTimeout(g), clearInterval(A);
1660
+ clearTimeout(x), clearInterval(C);
1504
1661
  };
1505
1662
  }
1506
- }, [r, a, n, d]), Y(() => {
1507
- l && (l.status === "completed" ? c("complete") : ["failed", "cancelled", "expired"].includes(l.status) && c("error"));
1508
- }, [l == null ? void 0 : l.status, c]), !r)
1509
- return /* @__PURE__ */ o(
1663
+ }, [r, a, n, f]), Z(() => {
1664
+ o && (o.status === "completed" ? d("complete") : ["failed", "cancelled", "expired"].includes(o.status) && d("error"));
1665
+ }, [o == null ? void 0 : o.status, d]), !r)
1666
+ return /* @__PURE__ */ l(
1510
1667
  "div",
1511
1668
  {
1512
1669
  className: `flex flex-col items-center justify-center p-8 ${t}`,
@@ -1525,15 +1682,15 @@ function Ka({
1525
1682
  paddingLeft: 24,
1526
1683
  paddingRight: 24
1527
1684
  },
1528
- onClick: m,
1685
+ onClick: u,
1529
1686
  children: "Go Back"
1530
1687
  }
1531
1688
  )
1532
1689
  ]
1533
1690
  }
1534
1691
  );
1535
- if (d)
1536
- return /* @__PURE__ */ o(
1692
+ if (f)
1693
+ return /* @__PURE__ */ l(
1537
1694
  "div",
1538
1695
  {
1539
1696
  className: `flex flex-col items-center justify-center p-8 text-center ${t}`,
@@ -1551,7 +1708,7 @@ function Ka({
1551
1708
  background: "var(--t-cta-bg)",
1552
1709
  color: "var(--t-cta-text)"
1553
1710
  },
1554
- onClick: m,
1711
+ onClick: u,
1555
1712
  children: "Start over"
1556
1713
  }
1557
1714
  )
@@ -1559,9 +1716,9 @@ function Ka({
1559
1716
  }
1560
1717
  );
1561
1718
  if (r.checkout.method === "iframe") {
1562
- const g = r.checkout.url, A = ((p = r.checkout.allowedFeatures) == null ? void 0 : p.join("; ")) || "payment; camera; microphone; geolocation; clipboard-read; clipboard-write; accelerometer; gyroscope; magnetometer; fullscreen; autoplay; encrypted-media; web-share";
1563
- return Ut(
1564
- /* @__PURE__ */ o(
1719
+ const x = r.checkout.url, C = ((p = r.checkout.allowedFeatures) == null ? void 0 : p.join("; ")) || "payment; camera; microphone; geolocation; clipboard-read; clipboard-write; accelerometer; gyroscope; magnetometer; fullscreen; autoplay; encrypted-media; web-share";
1720
+ return Ot(
1721
+ /* @__PURE__ */ l(
1565
1722
  "div",
1566
1723
  {
1567
1724
  style: {
@@ -1585,10 +1742,10 @@ function Ka({
1585
1742
  background: "#111",
1586
1743
  flexShrink: 0
1587
1744
  },
1588
- children: /* @__PURE__ */ o(
1745
+ children: /* @__PURE__ */ l(
1589
1746
  "button",
1590
1747
  {
1591
- onClick: m,
1748
+ onClick: u,
1592
1749
  style: {
1593
1750
  display: "flex",
1594
1751
  alignItems: "center",
@@ -1610,8 +1767,8 @@ function Ka({
1610
1767
  )
1611
1768
  }
1612
1769
  ),
1613
- /* @__PURE__ */ o("div", { style: { flex: 1, position: "relative", overflow: "hidden" }, children: [
1614
- !s && /* @__PURE__ */ o(
1770
+ /* @__PURE__ */ l("div", { style: { flex: 1, position: "relative", overflow: "hidden" }, children: [
1771
+ !i && /* @__PURE__ */ l(
1615
1772
  "div",
1616
1773
  {
1617
1774
  style: {
@@ -1631,15 +1788,15 @@ function Ka({
1631
1788
  /* @__PURE__ */ e(
1632
1789
  "iframe",
1633
1790
  {
1634
- src: g,
1791
+ src: x,
1635
1792
  style: {
1636
- display: s ? "block" : "none",
1793
+ display: i ? "block" : "none",
1637
1794
  width: "100%",
1638
1795
  height: "100%",
1639
1796
  border: "none"
1640
1797
  },
1641
- allow: A,
1642
- onLoad: () => u(!0),
1798
+ allow: C,
1799
+ onLoad: () => s(!0),
1643
1800
  title: "Provider Checkout"
1644
1801
  }
1645
1802
  )
@@ -1651,7 +1808,7 @@ function Ka({
1651
1808
  );
1652
1809
  }
1653
1810
  if (r.checkout.method === "redirect")
1654
- return /* @__PURE__ */ o(
1811
+ return /* @__PURE__ */ l(
1655
1812
  "div",
1656
1813
  {
1657
1814
  className: `flex flex-col items-center justify-center p-8 text-center ${t}`,
@@ -1659,17 +1816,17 @@ function Ka({
1659
1816
  children: [
1660
1817
  /* @__PURE__ */ e("div", { className: "text-[48px] mb-4", children: "🔗" }),
1661
1818
  /* @__PURE__ */ e("h3", { className: "text-[18px] font-semibold mb-2", children: "Complete Payment" }),
1662
- /* @__PURE__ */ o("p", { className: "text-[14px] mb-4", style: { color: "var(--t-text-secondary)" }, children: [
1819
+ /* @__PURE__ */ l("p", { className: "text-[14px] mb-4", style: { color: "var(--t-text-secondary)" }, children: [
1663
1820
  "You'll be redirected to ",
1664
1821
  r.gateway,
1665
1822
  " to complete your payment."
1666
1823
  ] }),
1667
- f !== null && /* @__PURE__ */ o("p", { className: "text-[13px] mb-4", style: { color: "var(--t-text-muted)" }, children: [
1824
+ m !== null && /* @__PURE__ */ l("p", { className: "text-[13px] mb-4", style: { color: "var(--t-text-muted)" }, children: [
1668
1825
  "Redirecting in ",
1669
- f,
1826
+ m,
1670
1827
  "..."
1671
1828
  ] }),
1672
- /* @__PURE__ */ o(
1829
+ /* @__PURE__ */ l(
1673
1830
  "a",
1674
1831
  {
1675
1832
  href: r.checkout.url,
@@ -1699,7 +1856,7 @@ function Ka({
1699
1856
  background: "var(--t-surface)",
1700
1857
  color: "var(--t-text)"
1701
1858
  },
1702
- onClick: m,
1859
+ onClick: u,
1703
1860
  children: "Cancel"
1704
1861
  }
1705
1862
  )
@@ -1707,9 +1864,9 @@ function Ka({
1707
1864
  }
1708
1865
  );
1709
1866
  if (r.checkout.method === "widget" && r.widgetConfig) {
1710
- const g = _a(r.checkout.url, r.widgetConfig);
1711
- return Ut(
1712
- /* @__PURE__ */ o(
1867
+ const x = Ja(r.checkout.url, r.widgetConfig);
1868
+ return Ot(
1869
+ /* @__PURE__ */ l(
1713
1870
  "div",
1714
1871
  {
1715
1872
  style: {
@@ -1733,10 +1890,10 @@ function Ka({
1733
1890
  background: "#111",
1734
1891
  flexShrink: 0
1735
1892
  },
1736
- children: /* @__PURE__ */ o(
1893
+ children: /* @__PURE__ */ l(
1737
1894
  "button",
1738
1895
  {
1739
- onClick: m,
1896
+ onClick: u,
1740
1897
  style: {
1741
1898
  display: "flex",
1742
1899
  alignItems: "center",
@@ -1758,8 +1915,8 @@ function Ka({
1758
1915
  )
1759
1916
  }
1760
1917
  ),
1761
- /* @__PURE__ */ o("div", { style: { flex: 1, position: "relative", overflow: "hidden" }, children: [
1762
- !s && /* @__PURE__ */ o(
1918
+ /* @__PURE__ */ l("div", { style: { flex: 1, position: "relative", overflow: "hidden" }, children: [
1919
+ !i && /* @__PURE__ */ l(
1763
1920
  "div",
1764
1921
  {
1765
1922
  style: {
@@ -1779,15 +1936,15 @@ function Ka({
1779
1936
  /* @__PURE__ */ e(
1780
1937
  "iframe",
1781
1938
  {
1782
- src: g,
1939
+ src: x,
1783
1940
  style: {
1784
- display: s ? "block" : "none",
1941
+ display: i ? "block" : "none",
1785
1942
  width: "100%",
1786
1943
  height: "100%",
1787
1944
  border: "none"
1788
1945
  },
1789
1946
  allow: "payment; camera; microphone; geolocation; clipboard-read; clipboard-write; accelerometer; gyroscope; magnetometer; fullscreen; autoplay; encrypted-media; web-share",
1790
- onLoad: () => u(!0),
1947
+ onLoad: () => s(!0),
1791
1948
  title: "Payment Checkout"
1792
1949
  }
1793
1950
  )
@@ -1798,7 +1955,7 @@ function Ka({
1798
1955
  document.body
1799
1956
  );
1800
1957
  }
1801
- return /* @__PURE__ */ o(
1958
+ return /* @__PURE__ */ l(
1802
1959
  "div",
1803
1960
  {
1804
1961
  className: `flex flex-col items-center justify-center p-8 ${t}`,
@@ -1817,7 +1974,7 @@ function Ka({
1817
1974
  paddingLeft: 24,
1818
1975
  paddingRight: 24
1819
1976
  },
1820
- onClick: m,
1977
+ onClick: u,
1821
1978
  children: "Go Back"
1822
1979
  }
1823
1980
  )
@@ -1825,18 +1982,18 @@ function Ka({
1825
1982
  }
1826
1983
  );
1827
1984
  }
1828
- function _a(t, a) {
1985
+ function Ja(t, a) {
1829
1986
  const n = new URL("/en/partner/widget", t);
1830
- for (const [r, l] of Object.entries(a))
1831
- l != null && l !== "" && n.searchParams.set(r, String(l));
1987
+ for (const [r, o] of Object.entries(a))
1988
+ o != null && o !== "" && n.searchParams.set(r, String(o));
1832
1989
  return n.toString();
1833
1990
  }
1834
- function Va({ className: t = "" }) {
1835
- const { orderStatus: a, orderStatusLoading: n, goToStep: r } = Te();
1836
- Y(() => {
1991
+ function qa({ className: t = "" }) {
1992
+ const { orderStatus: a, orderStatusLoading: n, goToStep: r } = Ue();
1993
+ Z(() => {
1837
1994
  a && (a.status === "completed" ? r("complete") : ["failed", "cancelled", "expired", "refunded"].includes(a.status) && r("error"));
1838
1995
  }, [a == null ? void 0 : a.status, r]);
1839
- const l = () => {
1996
+ const o = () => {
1840
1997
  if (!a) return "Processing your order...";
1841
1998
  switch (a.status) {
1842
1999
  case "pending":
@@ -1847,30 +2004,30 @@ function Va({ className: t = "" }) {
1847
2004
  return "Processing...";
1848
2005
  }
1849
2006
  };
1850
- return /* @__PURE__ */ o("div", { className: `flex flex-col items-center justify-center px-8 py-12 text-center ${t}`, children: [
2007
+ return /* @__PURE__ */ l("div", { className: `flex flex-col items-center justify-center px-8 py-12 text-center ${t}`, children: [
1851
2008
  /* @__PURE__ */ e("div", { className: "mb-6", children: /* @__PURE__ */ e("div", { className: "nramp-spinner-large nramp-spinner" }) }),
1852
- /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-3", style: { color: "var(--t-text)" }, children: l() }),
2009
+ /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-3", style: { color: "var(--t-text)" }, children: o() }),
1853
2010
  n && /* @__PURE__ */ e("p", { className: "text-[13px] mb-4", style: { color: "var(--t-text-muted)" }, children: "Checking status..." }),
1854
- a && /* @__PURE__ */ o("div", { className: "w-full mt-6 text-left", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
1855
- /* @__PURE__ */ e(Re, { label: "Order ID", value: a.orderId, mono: !0 }),
1856
- /* @__PURE__ */ e(Re, { label: "Provider", value: a.gateway }),
2011
+ a && /* @__PURE__ */ l("div", { className: "w-full mt-6 text-left", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
2012
+ /* @__PURE__ */ e(Le, { label: "Order ID", value: a.orderId, mono: !0 }),
2013
+ /* @__PURE__ */ e(Le, { label: "Provider", value: a.gateway }),
1857
2014
  /* @__PURE__ */ e(
1858
- Re,
2015
+ Le,
1859
2016
  {
1860
2017
  label: "Amount",
1861
2018
  value: `${a.fiatAmount} ${a.fiatCurrency}`
1862
2019
  }
1863
2020
  ),
1864
2021
  /* @__PURE__ */ e(
1865
- Re,
2022
+ Le,
1866
2023
  {
1867
2024
  label: "Receiving",
1868
2025
  value: `${a.cryptoAmount || "..."} ${a.cryptoCurrency}`
1869
2026
  }
1870
2027
  ),
1871
- /* @__PURE__ */ e(Re, { label: "Network", value: a.network }),
2028
+ /* @__PURE__ */ e(Le, { label: "Network", value: a.network }),
1872
2029
  /* @__PURE__ */ e(
1873
- Re,
2030
+ Le,
1874
2031
  {
1875
2032
  label: "To Address",
1876
2033
  value: `${a.walletAddress.slice(0, 10)}...${a.walletAddress.slice(-8)}`,
@@ -1878,14 +2035,14 @@ function Va({ className: t = "" }) {
1878
2035
  }
1879
2036
  )
1880
2037
  ] }),
1881
- /* @__PURE__ */ o("div", { className: "mt-6", children: [
2038
+ /* @__PURE__ */ l("div", { className: "mt-6", children: [
1882
2039
  /* @__PURE__ */ e("p", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: "This usually takes a few minutes." }),
1883
2040
  /* @__PURE__ */ e("p", { className: "text-[12px] mt-1", style: { color: "var(--t-text-muted)" }, children: "You can safely close this page - we'll send you an email when complete." })
1884
2041
  ] })
1885
2042
  ] });
1886
2043
  }
1887
- function Re({ label: t, value: a, mono: n }) {
1888
- return /* @__PURE__ */ o(
2044
+ function Le({ label: t, value: a, mono: n }) {
2045
+ return /* @__PURE__ */ l(
1889
2046
  "div",
1890
2047
  {
1891
2048
  className: "flex justify-between items-center py-2",
@@ -1904,16 +2061,16 @@ function Re({ label: t, value: a, mono: n }) {
1904
2061
  }
1905
2062
  );
1906
2063
  }
1907
- function ja({
2064
+ function en({
1908
2065
  className: t = "",
1909
2066
  explorerUrl: a,
1910
2067
  onDone: n,
1911
2068
  doneButtonText: r = "Done"
1912
2069
  }) {
1913
- const { orderStatus: l, state: c, dispatch: m } = Te(), s = c.flowType === "sell", u = () => {
1914
- if (!(l != null && l.transactionHash)) return null;
2070
+ const { orderStatus: o, state: d, dispatch: u } = Ue(), i = d.flowType === "sell", s = () => {
2071
+ if (!(o != null && o.transactionHash)) return null;
1915
2072
  if (!a) {
1916
- const d = {
2073
+ const f = {
1917
2074
  ethereum: "https://etherscan.io/tx/{txHash}",
1918
2075
  polygon: "https://polygonscan.com/tx/{txHash}",
1919
2076
  arbitrum: "https://arbiscan.io/tx/{txHash}",
@@ -1924,13 +2081,13 @@ function ja({
1924
2081
  avalanche: "https://snowtrace.io/tx/{txHash}",
1925
2082
  fantom: "https://ftmscan.com/tx/{txHash}"
1926
2083
  };
1927
- return (d[c.network] || d.ethereum).replace("{txHash}", l.transactionHash);
2084
+ return (f[d.network] || f.ethereum).replace("{txHash}", o.transactionHash);
1928
2085
  }
1929
- return a.replace("{txHash}", l.transactionHash);
1930
- }, f = () => {
1931
- n ? n() : m({ type: "RESET" });
1932
- }, h = u();
1933
- return /* @__PURE__ */ o("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
2086
+ return a.replace("{txHash}", o.transactionHash);
2087
+ }, m = () => {
2088
+ n ? n() : u({ type: "RESET" });
2089
+ }, h = s();
2090
+ return /* @__PURE__ */ l("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
1934
2091
  /* @__PURE__ */ e(
1935
2092
  "div",
1936
2093
  {
@@ -1939,52 +2096,52 @@ function ja({
1939
2096
  children: /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", width: "32", height: "32", fill: "white", children: /* @__PURE__ */ e("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z" }) })
1940
2097
  }
1941
2098
  ),
1942
- /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: s ? "Sale Complete!" : "Purchase Complete!" }),
1943
- /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: s ? `Your ${(l == null ? void 0 : l.fiatCurrency) || c.fiatCurrency} payout is being processed.` : `Your ${(l == null ? void 0 : l.cryptoCurrency) || c.cryptoCurrency} has been sent to your wallet.` }),
1944
- l && /* @__PURE__ */ o("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
2099
+ /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: i ? "Sale Complete!" : "Purchase Complete!" }),
2100
+ /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: i ? `Your ${(o == null ? void 0 : o.fiatCurrency) || d.fiatCurrency} payout is being processed.` : `Your ${(o == null ? void 0 : o.cryptoCurrency) || d.cryptoCurrency} has been sent to your wallet.` }),
2101
+ o && /* @__PURE__ */ l("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
1945
2102
  /* @__PURE__ */ e(
1946
- ye,
2103
+ Ce,
1947
2104
  {
1948
- label: s ? "Amount Sold" : "Amount Received",
1949
- value: `${l.cryptoAmount} ${l.cryptoCurrency}`,
2105
+ label: i ? "Amount Sold" : "Amount Received",
2106
+ value: `${o.cryptoAmount} ${o.cryptoCurrency}`,
1950
2107
  highlight: !0
1951
2108
  }
1952
2109
  ),
1953
2110
  /* @__PURE__ */ e(
1954
- ye,
2111
+ Ce,
1955
2112
  {
1956
- label: s ? "Payout Amount" : "Amount Paid",
1957
- value: `${l.fiatAmount} ${l.fiatCurrency}`
2113
+ label: i ? "Payout Amount" : "Amount Paid",
2114
+ value: `${o.fiatAmount} ${o.fiatCurrency}`
1958
2115
  }
1959
2116
  ),
1960
- /* @__PURE__ */ e(ye, { label: "Network", value: l.network }),
2117
+ /* @__PURE__ */ e(Ce, { label: "Network", value: o.network }),
1961
2118
  /* @__PURE__ */ e(
1962
- ye,
2119
+ Ce,
1963
2120
  {
1964
2121
  label: "Wallet",
1965
- value: `${l.walletAddress.slice(0, 10)}...${l.walletAddress.slice(-8)}`,
2122
+ value: `${o.walletAddress.slice(0, 10)}...${o.walletAddress.slice(-8)}`,
1966
2123
  mono: !0
1967
2124
  }
1968
2125
  ),
1969
- l.transactionHash && /* @__PURE__ */ e(
1970
- ye,
2126
+ o.transactionHash && /* @__PURE__ */ e(
2127
+ Ce,
1971
2128
  {
1972
2129
  label: "Transaction",
1973
- value: `${l.transactionHash.slice(0, 10)}...${l.transactionHash.slice(-8)}`,
2130
+ value: `${o.transactionHash.slice(0, 10)}...${o.transactionHash.slice(-8)}`,
1974
2131
  mono: !0
1975
2132
  }
1976
2133
  ),
1977
- /* @__PURE__ */ e(ye, { label: "Provider", value: l.gateway }),
1978
- /* @__PURE__ */ e(ye, { label: "Order ID", value: l.orderId, mono: !0 }),
1979
- l.completedAt && /* @__PURE__ */ e(
1980
- ye,
2134
+ /* @__PURE__ */ e(Ce, { label: "Provider", value: o.gateway }),
2135
+ /* @__PURE__ */ e(Ce, { label: "Order ID", value: o.orderId, mono: !0 }),
2136
+ o.completedAt && /* @__PURE__ */ e(
2137
+ Ce,
1981
2138
  {
1982
2139
  label: "Completed",
1983
- value: new Date(l.completedAt).toLocaleString()
2140
+ value: new Date(o.completedAt).toLocaleString()
1984
2141
  }
1985
2142
  )
1986
2143
  ] }),
1987
- /* @__PURE__ */ o("div", { className: "w-full flex flex-col gap-2", children: [
2144
+ /* @__PURE__ */ l("div", { className: "w-full flex flex-col gap-2", children: [
1988
2145
  h && /* @__PURE__ */ e(
1989
2146
  "a",
1990
2147
  {
@@ -2001,15 +2158,15 @@ function ja({
2001
2158
  {
2002
2159
  className: "w-full font-semibold text-[16px] transition-all",
2003
2160
  style: { height: 60, borderRadius: 5, background: "var(--t-cta-bg)", color: "var(--t-cta-text)" },
2004
- onClick: f,
2161
+ onClick: m,
2005
2162
  children: r
2006
2163
  }
2007
2164
  )
2008
2165
  ] })
2009
2166
  ] });
2010
2167
  }
2011
- function ye({ label: t, value: a, mono: n, highlight: r }) {
2012
- return /* @__PURE__ */ o(
2168
+ function Ce({ label: t, value: a, mono: n, highlight: r }) {
2169
+ return /* @__PURE__ */ l(
2013
2170
  "div",
2014
2171
  {
2015
2172
  className: "flex justify-between items-center py-2",
@@ -2028,14 +2185,14 @@ function ye({ label: t, value: a, mono: n, highlight: r }) {
2028
2185
  }
2029
2186
  );
2030
2187
  }
2031
- function Ga({
2188
+ function tn({
2032
2189
  className: t = "",
2033
2190
  onRetry: a,
2034
2191
  supportEmail: n = "support@nowramp.com"
2035
2192
  }) {
2036
- const { state: r, orderStatus: l, dispatch: c, goToStep: m } = Te(), s = r.flowType === "sell", u = () => {
2037
- if (l)
2038
- switch (l.status) {
2193
+ const { state: r, orderStatus: o, dispatch: d, goToStep: u } = Ue(), i = r.flowType === "sell", s = () => {
2194
+ if (o)
2195
+ switch (o.status) {
2039
2196
  case "failed":
2040
2197
  return "Payment Failed";
2041
2198
  case "cancelled":
@@ -2048,28 +2205,28 @@ function Ga({
2048
2205
  return "Something Went Wrong";
2049
2206
  }
2050
2207
  return "Something Went Wrong";
2051
- }, f = () => {
2208
+ }, m = () => {
2052
2209
  if (r.errorMessage) return r.errorMessage;
2053
- if (l)
2054
- switch (l.status) {
2210
+ if (o)
2211
+ switch (o.status) {
2055
2212
  case "failed":
2056
- return s ? "Your sale could not be processed. Please try again." : "Your payment could not be processed. Please try again or use a different payment method.";
2213
+ return i ? "Your sale could not be processed. Please try again." : "Your payment could not be processed. Please try again or use a different payment method.";
2057
2214
  case "cancelled":
2058
- return s ? "Your sale was cancelled. No crypto was transferred." : "Your order was cancelled. No payment was processed.";
2215
+ return i ? "Your sale was cancelled. No crypto was transferred." : "Your order was cancelled. No payment was processed.";
2059
2216
  case "expired":
2060
- return s ? "Your order has expired. Please start a new sale." : "Your order has expired. Please start a new purchase.";
2217
+ return i ? "Your order has expired. Please start a new sale." : "Your order has expired. Please start a new purchase.";
2061
2218
  case "refunded":
2062
- return s ? "Your crypto has been returned. The funds should appear in your wallet shortly." : "Your payment has been refunded. The funds should appear in your account within 5-10 business days.";
2219
+ return i ? "Your crypto has been returned. The funds should appear in your wallet shortly." : "Your payment has been refunded. The funds should appear in your account within 5-10 business days.";
2063
2220
  default:
2064
2221
  return "An unexpected error occurred. Please try again.";
2065
2222
  }
2066
2223
  return "An unexpected error occurred. Please try again.";
2067
2224
  }, h = () => {
2068
- c({ type: "CLEAR_ERROR" }), a ? a() : (c({ type: "RESET" }), m("amount"));
2069
- }, d = () => {
2070
- c({ type: "RESET" }), m("amount");
2225
+ d({ type: "CLEAR_ERROR" }), a ? a() : (d({ type: "RESET" }), u("amount"));
2226
+ }, f = () => {
2227
+ d({ type: "RESET" }), u("amount");
2071
2228
  };
2072
- return /* @__PURE__ */ o("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
2229
+ return /* @__PURE__ */ l("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
2073
2230
  /* @__PURE__ */ e(
2074
2231
  "div",
2075
2232
  {
@@ -2078,13 +2235,13 @@ function Ga({
2078
2235
  children: /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", width: "32", height: "32", fill: "white", children: /* @__PURE__ */ e("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" }) })
2079
2236
  }
2080
2237
  ),
2081
- /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: u() }),
2082
- /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: f() }),
2083
- l && /* @__PURE__ */ e("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: /* @__PURE__ */ o("div", { className: "flex justify-between items-center py-2", children: [
2238
+ /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: s() }),
2239
+ /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: m() }),
2240
+ o && /* @__PURE__ */ e("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: /* @__PURE__ */ l("div", { className: "flex justify-between items-center py-2", children: [
2084
2241
  /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: "Order ID" }),
2085
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium font-mono", style: { color: "var(--t-text)" }, children: l.orderId })
2242
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium font-mono", style: { color: "var(--t-text)" }, children: o.orderId })
2086
2243
  ] }) }),
2087
- /* @__PURE__ */ o("div", { className: "w-full flex flex-col gap-2", children: [
2244
+ /* @__PURE__ */ l("div", { className: "w-full flex flex-col gap-2", children: [
2088
2245
  /* @__PURE__ */ e(
2089
2246
  "button",
2090
2247
  {
@@ -2099,13 +2256,13 @@ function Ga({
2099
2256
  {
2100
2257
  className: "w-full font-semibold text-[14px] transition-all",
2101
2258
  style: { height: 48, borderRadius: 5, background: "var(--t-surface)", color: "var(--t-text)" },
2102
- onClick: d,
2259
+ onClick: f,
2103
2260
  children: "Start Over"
2104
2261
  }
2105
2262
  )
2106
2263
  ] }),
2107
- /* @__PURE__ */ o("div", { className: "mt-6", children: [
2108
- /* @__PURE__ */ o("p", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: [
2264
+ /* @__PURE__ */ l("div", { className: "mt-6", children: [
2265
+ /* @__PURE__ */ l("p", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: [
2109
2266
  "Need help? Contact",
2110
2267
  " ",
2111
2268
  /* @__PURE__ */ e(
@@ -2118,74 +2275,74 @@ function Ga({
2118
2275
  }
2119
2276
  )
2120
2277
  ] }),
2121
- l && /* @__PURE__ */ o("p", { className: "text-[12px] mt-1", style: { color: "var(--t-text-muted)" }, children: [
2278
+ o && /* @__PURE__ */ l("p", { className: "text-[12px] mt-1", style: { color: "var(--t-text-muted)" }, children: [
2122
2279
  "Reference: ",
2123
- l.orderId
2280
+ o.orderId
2124
2281
  ] })
2125
2282
  ] })
2126
2283
  ] });
2127
2284
  }
2128
- function Kt(t) {
2285
+ function Wt(t) {
2129
2286
  return t.length <= 12 ? t : `${t.slice(0, 6)}...${t.slice(-6)}`;
2130
2287
  }
2131
- function $a({ className: t = "", stablecoinParity: a, partnerName: n }) {
2132
- var q;
2288
+ function an({ className: t = "", stablecoinParity: a, partnerName: n }) {
2289
+ var ee;
2133
2290
  const {
2134
2291
  config: r,
2135
- configLoading: l,
2136
- state: c,
2137
- defaultGateway: m,
2138
- quotes: s,
2139
- fetchQuotes: u,
2140
- createOrder: f,
2292
+ configLoading: o,
2293
+ state: d,
2294
+ defaultGateway: u,
2295
+ quotes: i,
2296
+ fetchQuotes: s,
2297
+ createOrder: m,
2141
2298
  orderLoading: h
2142
- } = Te(), d = c.flowType === "sell", [p, g] = v(null), A = r == null ? void 0 : r.gateways.find(($) => $.id === m), E = (q = s == null ? void 0 : s.bestQuote) != null && q.exchangeRate ? parseFloat(s.bestQuote.exchangeRate) : null, R = parseFloat(c.fiatAmount) || 0, _ = !!(a && n && !d && Xt(c.cryptoCurrency) && E), ae = _ && c.cryptoCurrency.toUpperCase().includes(c.fiatCurrency.toUpperCase()), j = _ && R > 0 ? lt(ae ? R : R / E) : null, Q = async () => {
2143
- g(null);
2299
+ } = Ue(), f = d.flowType === "sell", [p, x] = N(null), C = r == null ? void 0 : r.gateways.find((W) => W.id === u), E = (ee = i == null ? void 0 : i.bestQuote) != null && ee.exchangeRate ? parseFloat(i.bestQuote.exchangeRate) : null, k = parseFloat(d.fiatAmount) || 0, _ = !!(a && n && !f && Jt(d.cryptoCurrency) && E), re = _ && d.cryptoCurrency.toUpperCase().includes(d.fiatCurrency.toUpperCase()), j = _ && k > 0 ? mt(re ? k : k / E) : null, Q = async () => {
2300
+ x(null);
2144
2301
  try {
2145
- u(), await f();
2146
- } catch ($) {
2147
- const xe = $ instanceof Error ? $.message : "Failed to create order";
2148
- g(xe);
2302
+ s(), await m();
2303
+ } catch (W) {
2304
+ const ge = W instanceof Error ? W.message : "Failed to create order";
2305
+ x(ge);
2149
2306
  }
2150
2307
  };
2151
- return l ? /* @__PURE__ */ o("div", { className: `flex flex-col items-center justify-center p-12 ${t}`, children: [
2308
+ return o ? /* @__PURE__ */ l("div", { className: `flex flex-col items-center justify-center p-12 ${t}`, children: [
2152
2309
  /* @__PURE__ */ e("div", { className: "nramp-spinner" }),
2153
2310
  /* @__PURE__ */ e("p", { className: "text-[14px] mt-4", style: { color: "var(--t-text-secondary)" }, children: "Loading..." })
2154
- ] }) : /* @__PURE__ */ o("div", { className: `flex flex-col items-center px-8 py-12 ${t}`, children: [
2155
- /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-6", style: { color: "var(--t-text)" }, children: d ? "Confirm Sale" : "Confirm Purchase" }),
2156
- /* @__PURE__ */ o("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
2157
- A && /* @__PURE__ */ o("div", { className: "flex justify-between items-center py-2", style: { borderBottom: "1px solid var(--t-divider)" }, children: [
2311
+ ] }) : /* @__PURE__ */ l("div", { className: `flex flex-col items-center px-8 py-12 ${t}`, children: [
2312
+ /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-6", style: { color: "var(--t-text)" }, children: f ? "Confirm Sale" : "Confirm Purchase" }),
2313
+ /* @__PURE__ */ l("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
2314
+ C && /* @__PURE__ */ l("div", { className: "flex justify-between items-center py-2", style: { borderBottom: "1px solid var(--t-divider)" }, children: [
2158
2315
  /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: "Provider" }),
2159
- /* @__PURE__ */ o("span", { className: "flex items-center gap-2", children: [
2160
- A.logo && /* @__PURE__ */ e("img", { src: A.logo, alt: A.name, width: 20, height: 20, style: { borderRadius: 4 } }),
2161
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: A.name })
2316
+ /* @__PURE__ */ l("span", { className: "flex items-center gap-2", children: [
2317
+ C.logo && /* @__PURE__ */ e("img", { src: C.logo, alt: C.name, width: 20, height: 20, style: { borderRadius: 4 } }),
2318
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: C.name })
2162
2319
  ] })
2163
2320
  ] }),
2164
- d ? /* @__PURE__ */ o(J, { children: [
2165
- /* @__PURE__ */ e(Ne, { label: "You sell", value: `${c.cryptoAmount} ${c.cryptoCurrency}`, highlight: !0 }),
2166
- /* @__PURE__ */ e(Ne, { label: "You receive", value: `${c.fiatCurrency} payout` })
2167
- ] }) : /* @__PURE__ */ o(J, { children: [
2168
- /* @__PURE__ */ e(Ne, { label: "You pay", value: `${c.fiatAmount} ${c.fiatCurrency}`, highlight: !0 }),
2321
+ f ? /* @__PURE__ */ l(q, { children: [
2322
+ /* @__PURE__ */ e(we, { label: "You sell", value: `${d.cryptoAmount} ${d.cryptoCurrency}`, highlight: !0 }),
2323
+ /* @__PURE__ */ e(we, { label: "You receive", value: `${d.fiatCurrency} payout` })
2324
+ ] }) : /* @__PURE__ */ l(q, { children: [
2325
+ /* @__PURE__ */ e(we, { label: "You pay", value: `${d.fiatAmount} ${d.fiatCurrency}`, highlight: !0 }),
2169
2326
  /* @__PURE__ */ e(
2170
- Ne,
2327
+ we,
2171
2328
  {
2172
2329
  label: "You receive",
2173
- value: j ? `${j} ${c.cryptoCurrency}` : `${c.cryptoCurrency} on ${c.network}`
2330
+ value: j ? `${j} ${d.cryptoCurrency}` : `${d.cryptoCurrency} on ${d.network}`
2174
2331
  }
2175
2332
  ),
2176
- /* @__PURE__ */ e(Ne, { label: "Wallet", value: Kt(c.walletAddress), mono: !0 }),
2177
- _ && j && /* @__PURE__ */ o("div", { className: "py-2 text-[11px]", style: { color: "var(--t-text-muted)", lineHeight: "15px" }, children: [
2333
+ /* @__PURE__ */ e(we, { label: "Wallet", value: Wt(d.walletAddress), mono: !0 }),
2334
+ _ && j && /* @__PURE__ */ l("div", { className: "py-2 text-[11px]", style: { color: "var(--t-text-muted)", lineHeight: "15px" }, children: [
2178
2335
  "Charged amount from provider may differ. The rest up to ",
2179
2336
  j,
2180
2337
  " ",
2181
- c.cryptoCurrency,
2338
+ d.cryptoCurrency,
2182
2339
  " will be credited to your ",
2183
2340
  n,
2184
2341
  " account."
2185
2342
  ] })
2186
2343
  ] }),
2187
- /* @__PURE__ */ e(Ne, { label: "Network", value: c.network }),
2188
- d && c.walletAddress && /* @__PURE__ */ e(Ne, { label: "Refund address", value: Kt(c.walletAddress), mono: !0 })
2344
+ /* @__PURE__ */ e(we, { label: "Network", value: d.network }),
2345
+ f && d.walletAddress && /* @__PURE__ */ e(we, { label: "Refund address", value: Wt(d.walletAddress), mono: !0 })
2189
2346
  ] }),
2190
2347
  p && /* @__PURE__ */ e("p", { className: "text-[12px] mb-4", style: { color: "#EF4444" }, children: p }),
2191
2348
  /* @__PURE__ */ e(
@@ -2195,16 +2352,16 @@ function $a({ className: t = "", stablecoinParity: a, partnerName: n }) {
2195
2352
  style: { height: 60, borderRadius: 5, background: "var(--t-cta-bg)", color: "var(--t-cta-text)", opacity: h ? 0.7 : 1 },
2196
2353
  disabled: h,
2197
2354
  onClick: Q,
2198
- children: h ? /* @__PURE__ */ o(J, { children: [
2355
+ children: h ? /* @__PURE__ */ l(q, { children: [
2199
2356
  /* @__PURE__ */ e("span", { className: "nramp-spinner-inline" }),
2200
2357
  "Processing..."
2201
- ] }) : d ? "Confirm & Sell" : "Confirm & Pay"
2358
+ ] }) : f ? "Confirm & Sell" : "Confirm & Pay"
2202
2359
  }
2203
2360
  )
2204
2361
  ] });
2205
2362
  }
2206
- function Ne({ label: t, value: a, mono: n, highlight: r }) {
2207
- return /* @__PURE__ */ o("div", { className: "flex justify-between items-center py-2", style: { borderBottom: "1px solid var(--t-divider)" }, children: [
2363
+ function we({ label: t, value: a, mono: n, highlight: r }) {
2364
+ return /* @__PURE__ */ l("div", { className: "flex justify-between items-center py-2", style: { borderBottom: "1px solid var(--t-divider)" }, children: [
2208
2365
  /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: t }),
2209
2366
  /* @__PURE__ */ e(
2210
2367
  "span",
@@ -2216,57 +2373,57 @@ function Ne({ label: t, value: a, mono: n, highlight: r }) {
2216
2373
  )
2217
2374
  ] });
2218
2375
  }
2219
- function Oe({
2376
+ function Ke({
2220
2377
  isOpen: t,
2221
2378
  onClose: a,
2222
2379
  children: n
2223
2380
  }) {
2224
- const [r, l] = v(!1), [c, m] = v(!1);
2225
- Y(() => {
2381
+ const [r, o] = N(!1), [d, u] = N(!1);
2382
+ Z(() => {
2226
2383
  if (t)
2227
- l(!0), requestAnimationFrame(() => requestAnimationFrame(() => m(!0)));
2384
+ o(!0), requestAnimationFrame(() => requestAnimationFrame(() => u(!0)));
2228
2385
  else if (r) {
2229
- m(!1);
2230
- const u = setTimeout(() => l(!1), 250);
2231
- return () => clearTimeout(u);
2386
+ u(!1);
2387
+ const s = setTimeout(() => o(!1), 250);
2388
+ return () => clearTimeout(s);
2232
2389
  }
2233
2390
  }, [t]);
2234
- const s = P(() => {
2235
- m(!1), setTimeout(() => a(), 250);
2391
+ const i = P(() => {
2392
+ u(!1), setTimeout(() => a(), 250);
2236
2393
  }, [a]);
2237
- return Y(() => {
2394
+ return Z(() => {
2238
2395
  if (!t) return;
2239
- const u = (f) => {
2240
- f.key === "Escape" && s();
2396
+ const s = (m) => {
2397
+ m.key === "Escape" && i();
2241
2398
  };
2242
- return window.addEventListener("keydown", u), () => window.removeEventListener("keydown", u);
2243
- }, [t, s]), r ? /* @__PURE__ */ e(
2399
+ return window.addEventListener("keydown", s), () => window.removeEventListener("keydown", s);
2400
+ }, [t, i]), r ? /* @__PURE__ */ e(
2244
2401
  "div",
2245
2402
  {
2246
2403
  className: "absolute inset-0 z-20 transition-opacity duration-250",
2247
- style: { opacity: c ? 1 : 0 },
2404
+ style: { opacity: d ? 1 : 0 },
2248
2405
  children: /* @__PURE__ */ e(
2249
2406
  "div",
2250
2407
  {
2251
2408
  className: "absolute inset-0 flex flex-col transition-transform duration-250 ease-out",
2252
- style: { background: "var(--t-modal-bg)", transform: c ? "translateY(0)" : "translateY(24px)" },
2253
- children: typeof n == "function" ? n(s) : n
2409
+ style: { background: "var(--t-modal-bg)", transform: d ? "translateY(0)" : "translateY(24px)" },
2410
+ children: typeof n == "function" ? n(i) : n
2254
2411
  }
2255
2412
  )
2256
2413
  }
2257
2414
  ) : null;
2258
2415
  }
2259
- function Xa({ char: t, height: a = 38 }) {
2416
+ function nn({ char: t, height: a = 38 }) {
2260
2417
  const n = "0123456789", r = n.indexOf(t);
2261
- return r === -1 ? /* @__PURE__ */ e("span", { children: t }) : /* @__PURE__ */ e("span", { className: "digit-slot", style: { height: a, lineHeight: `${a}px` }, children: /* @__PURE__ */ e("span", { className: "digit-slot-inner block", style: { transform: `translateY(-${r * a}px)` }, children: n.split("").map((l) => /* @__PURE__ */ e("span", { className: "block", style: { height: a, lineHeight: `${a}px` }, children: l }, l)) }) });
2418
+ return r === -1 ? /* @__PURE__ */ e("span", { children: t }) : /* @__PURE__ */ e("span", { className: "digit-slot", style: { height: a, lineHeight: `${a}px` }, 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)) }) });
2262
2419
  }
2263
- function Wa({
2420
+ function rn({
2264
2421
  value: t,
2265
2422
  height: a = 38,
2266
2423
  className: n = "",
2267
2424
  style: r = {}
2268
2425
  }) {
2269
- return /* @__PURE__ */ e("span", { className: n, style: { display: "inline-flex", ...r }, children: t.split("").map((l, c) => /* @__PURE__ */ e(Xa, { char: l, height: a }, c)) });
2426
+ return /* @__PURE__ */ e("span", { className: n, style: { display: "inline-flex", ...r }, children: t.split("").map((o, d) => /* @__PURE__ */ e(nn, { char: o, height: a }, d)) });
2270
2427
  }
2271
2428
  function V({
2272
2429
  w: t,
@@ -2275,27 +2432,27 @@ function V({
2275
2432
  }) {
2276
2433
  return /* @__PURE__ */ e("div", { className: `skeleton ${n}`, style: { width: t, height: a } });
2277
2434
  }
2278
- function Ya() {
2279
- return /* @__PURE__ */ o("div", { className: "flex-1 px-5 flex flex-col", children: [
2280
- /* @__PURE__ */ o("div", { className: "px-[18px] pt-[14px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5 }, children: [
2435
+ function on() {
2436
+ return /* @__PURE__ */ l("div", { className: "flex-1 px-5 flex flex-col", children: [
2437
+ /* @__PURE__ */ l("div", { className: "px-[18px] pt-[14px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5 }, children: [
2281
2438
  /* @__PURE__ */ e(V, { w: 70, h: 14, className: "mb-3" }),
2282
- /* @__PURE__ */ o("div", { className: "flex justify-between items-center", children: [
2439
+ /* @__PURE__ */ l("div", { className: "flex justify-between items-center", children: [
2283
2440
  /* @__PURE__ */ e(V, { w: 120, h: 32 }),
2284
2441
  /* @__PURE__ */ e(V, { w: 75, h: 32 })
2285
2442
  ] })
2286
2443
  ] }),
2287
- /* @__PURE__ */ o("div", { className: "px-[18px] pt-[12px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5, marginTop: 4 }, children: [
2444
+ /* @__PURE__ */ l("div", { className: "px-[18px] pt-[12px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5, marginTop: 4 }, children: [
2288
2445
  /* @__PURE__ */ e(V, { w: 50, h: 14, className: "mb-3" }),
2289
- /* @__PURE__ */ o("div", { className: "flex justify-between items-center", children: [
2446
+ /* @__PURE__ */ l("div", { className: "flex justify-between items-center", children: [
2290
2447
  /* @__PURE__ */ e(V, { w: 180, h: 32 }),
2291
2448
  /* @__PURE__ */ e(V, { w: 85, h: 32 })
2292
2449
  ] })
2293
2450
  ] }),
2294
- /* @__PURE__ */ o("div", { className: "flex justify-between mt-3 px-[2px]", children: [
2451
+ /* @__PURE__ */ l("div", { className: "flex justify-between mt-3 px-[2px]", children: [
2295
2452
  /* @__PURE__ */ e(V, { w: 140, h: 12 }),
2296
2453
  /* @__PURE__ */ e(V, { w: 90, h: 12 })
2297
2454
  ] }),
2298
- /* @__PURE__ */ o("div", { className: "mt-8", children: [
2455
+ /* @__PURE__ */ l("div", { className: "mt-8", children: [
2299
2456
  /* @__PURE__ */ e(V, { w: 65, h: 14, className: "mb-2.5" }),
2300
2457
  /* @__PURE__ */ e(V, { w: "100%", h: 47 })
2301
2458
  ] }),
@@ -2304,7 +2461,7 @@ function Ya() {
2304
2461
  /* @__PURE__ */ e("div", { className: "text-center py-3", children: /* @__PURE__ */ e("span", { className: "text-[11px]", style: { color: "var(--t-text-tertiary)" }, children: "Powered by NowRamp" }) })
2305
2462
  ] });
2306
2463
  }
2307
- function ke({ onClick: t }) {
2464
+ function Fe({ onClick: t }) {
2308
2465
  return /* @__PURE__ */ e(
2309
2466
  "button",
2310
2467
  {
@@ -2317,21 +2474,21 @@ function ke({ onClick: t }) {
2317
2474
  }
2318
2475
  );
2319
2476
  }
2320
- function Pe({
2477
+ function Ve({
2321
2478
  value: t,
2322
2479
  onChange: a,
2323
2480
  placeholder: n = ""
2324
2481
  }) {
2325
- const [r, l] = v(!1);
2326
- return /* @__PURE__ */ o("div", { className: "relative mx-5 mb-5", children: [
2482
+ const [r, o] = N(!1);
2483
+ return /* @__PURE__ */ l("div", { className: "relative mx-5 mb-5", children: [
2327
2484
  /* @__PURE__ */ e(
2328
2485
  "input",
2329
2486
  {
2330
2487
  type: "text",
2331
2488
  value: t,
2332
- onChange: (c) => a(c.target.value),
2333
- onFocus: () => l(!0),
2334
- onBlur: () => l(!1),
2489
+ onChange: (d) => a(d.target.value),
2490
+ onFocus: () => o(!0),
2491
+ onBlur: () => o(!1),
2335
2492
  placeholder: n,
2336
2493
  style: { height: 47, borderRadius: 4.5, border: `1px solid ${r ? "var(--t-border-focus)" : "var(--t-border)"}`, outline: "none", boxShadow: "none", color: "var(--t-text)", padding: `0 ${t ? 40 : 14}px 0 14px`, fontSize: 14, backgroundColor: "transparent" },
2337
2494
  className: "w-full outline-none transition-colors"
@@ -2348,38 +2505,38 @@ function Pe({
2348
2505
  )
2349
2506
  ] });
2350
2507
  }
2351
- function Za({
2508
+ function ln({
2352
2509
  onClose: t,
2353
2510
  onSelect: a,
2354
2511
  currencies: n,
2355
2512
  assetBaseUrl: r = "",
2356
- selectedCode: l
2513
+ selectedCode: o
2357
2514
  }) {
2358
- const [c, m] = v(""), s = Z(() => {
2359
- if (!n || n.length === 0) return Ft;
2360
- const f = new Map(Ft.map((h) => [h.code, h.name]));
2515
+ const [d, u] = N(""), i = $(() => {
2516
+ if (!n || n.length === 0) return Pt;
2517
+ const m = new Map(Pt.map((h) => [h.code, h.name]));
2361
2518
  return n.map((h) => ({
2362
2519
  code: h.code,
2363
- name: h.name || f.get(h.code) || h.code
2520
+ name: h.name || m.get(h.code) || h.code
2364
2521
  }));
2365
- }, [n]), u = Z(() => {
2366
- const f = c.trim().toLowerCase();
2367
- if (!f) {
2368
- if (l) {
2369
- const h = s.find((d) => d.code === l);
2522
+ }, [n]), s = $(() => {
2523
+ const m = d.trim().toLowerCase();
2524
+ if (!m) {
2525
+ if (o) {
2526
+ const h = i.find((f) => f.code === o);
2370
2527
  if (h) {
2371
- const d = s.filter((p) => p.code !== l);
2372
- return [h, ...d];
2528
+ const f = i.filter((p) => p.code !== o);
2529
+ return [h, ...f];
2373
2530
  }
2374
2531
  }
2375
- return s;
2532
+ return i;
2376
2533
  }
2377
- return s.filter(
2378
- (h) => h.code.toLowerCase().includes(f) || h.name.toLowerCase().includes(f)
2534
+ return i.filter(
2535
+ (h) => h.code.toLowerCase().includes(m) || h.name.toLowerCase().includes(m)
2379
2536
  );
2380
- }, [s, c, l]);
2381
- return /* @__PURE__ */ o(J, { children: [
2382
- /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(ke, { onClick: t }) }),
2537
+ }, [i, d, o]);
2538
+ return /* @__PURE__ */ l(q, { children: [
2539
+ /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Fe, { onClick: t }) }),
2383
2540
  /* @__PURE__ */ e(
2384
2541
  "h2",
2385
2542
  {
@@ -2394,22 +2551,22 @@ function Za({
2394
2551
  children: "Select fiat currency"
2395
2552
  }
2396
2553
  ),
2397
- /* @__PURE__ */ e(Pe, { value: c, onChange: m }),
2398
- /* @__PURE__ */ o("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2399
- u.map((f, h) => {
2400
- const d = f.name !== f.code ? f.name : "", p = l === f.code;
2401
- return /* @__PURE__ */ o("div", { children: [
2402
- /* @__PURE__ */ o(
2554
+ /* @__PURE__ */ e(Ve, { value: d, onChange: u }),
2555
+ /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2556
+ s.map((m, h) => {
2557
+ const f = m.name !== m.code ? m.name : "", p = o === m.code;
2558
+ return /* @__PURE__ */ l("div", { children: [
2559
+ /* @__PURE__ */ l(
2403
2560
  "button",
2404
2561
  {
2405
- onClick: () => a(f.code),
2562
+ onClick: () => a(m.code),
2406
2563
  className: "flex items-center w-full transition-colors rounded-lg hover-item",
2407
2564
  style: { color: "var(--t-text)", gap: 14, padding: "18px 8px", margin: "0 -8px" },
2408
2565
  children: [
2409
- /* @__PURE__ */ e(ct, { currencyCode: f.code, size: 32, baseUrl: r }),
2410
- /* @__PURE__ */ o("div", { className: "text-left flex-1 flex items-center gap-2", children: [
2411
- /* @__PURE__ */ e("span", { className: "font-semibold text-[15px]", children: f.code }),
2412
- d && /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: d })
2566
+ /* @__PURE__ */ e(ft, { currencyCode: m.code, size: 32, baseUrl: r }),
2567
+ /* @__PURE__ */ l("div", { className: "text-left flex-1 flex items-center gap-2", children: [
2568
+ /* @__PURE__ */ e("span", { className: "font-semibold text-[15px]", children: m.code }),
2569
+ f && /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: f })
2413
2570
  ] }),
2414
2571
  p && /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "shrink-0", children: /* @__PURE__ */ e(
2415
2572
  "path",
@@ -2424,31 +2581,31 @@ function Za({
2424
2581
  ]
2425
2582
  }
2426
2583
  ),
2427
- h < u.length - 1 && /* @__PURE__ */ e(
2584
+ h < s.length - 1 && /* @__PURE__ */ e(
2428
2585
  "div",
2429
2586
  {
2430
2587
  style: { height: 1, background: "var(--t-divider, rgba(255,255,255,0.08))" }
2431
2588
  }
2432
2589
  )
2433
- ] }, f.code);
2590
+ ] }, m.code);
2434
2591
  }),
2435
- u.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: "No currencies found" })
2592
+ s.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: "No currencies found" })
2436
2593
  ] })
2437
2594
  ] });
2438
2595
  }
2439
- function _t({ src: t, alt: a, size: n, className: r, style: l }) {
2440
- const [c, m] = v(!1), [s, u] = v(!1), f = O(t);
2441
- f.current !== t && (f.current = t, m(!1), u(!1));
2442
- const h = P(() => m(!0), []), d = P(() => u(!0), []);
2443
- return /* @__PURE__ */ o("div", { className: r, style: { ...l, width: n, height: n, position: "relative" }, children: [
2444
- !c && !s && /* @__PURE__ */ e(
2596
+ function Xt({ src: t, alt: a, size: n, className: r, style: o }) {
2597
+ const [d, u] = N(!1), [i, s] = N(!1), m = I(t);
2598
+ m.current !== t && (m.current = t, u(!1), s(!1));
2599
+ const h = P(() => u(!0), []), f = P(() => s(!0), []);
2600
+ return /* @__PURE__ */ l("div", { className: r, style: { ...o, width: n, height: n, position: "relative" }, children: [
2601
+ !d && !i && /* @__PURE__ */ e(
2445
2602
  "div",
2446
2603
  {
2447
2604
  className: "absolute inset-0 rounded-full animate-pulse",
2448
2605
  style: { background: "var(--t-pill-bg, #333)" }
2449
2606
  }
2450
2607
  ),
2451
- s ? /* @__PURE__ */ e(
2608
+ i ? /* @__PURE__ */ e(
2452
2609
  "div",
2453
2610
  {
2454
2611
  className: "absolute inset-0 rounded-full flex items-center justify-center text-[10px] font-bold",
@@ -2463,58 +2620,58 @@ function _t({ src: t, alt: a, size: n, className: r, style: l }) {
2463
2620
  width: n,
2464
2621
  height: n,
2465
2622
  onLoad: h,
2466
- onError: d,
2467
- className: `rounded-full ${c ? "opacity-100" : "opacity-0"}`,
2623
+ onError: f,
2624
+ className: `rounded-full ${d ? "opacity-100" : "opacity-0"}`,
2468
2625
  style: { width: n, height: n, transition: "opacity 0.15s ease-in" }
2469
2626
  }
2470
2627
  )
2471
2628
  ] });
2472
2629
  }
2473
- function Qa({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selectedCode: l, selectedChain: c }) {
2474
- const [m, s] = v(""), u = Z(() => {
2475
- if (!n || n.length === 0) return wa;
2476
- const d = [];
2630
+ function cn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selectedCode: o, selectedChain: d }) {
2631
+ const [u, i] = N(""), s = $(() => {
2632
+ if (!n || n.length === 0) return Ba;
2633
+ const f = [];
2477
2634
  for (const p of n) {
2478
- const g = p.networks || [], A = p.name || Sa[p.code] || p.code;
2479
- if (g.length === 0)
2480
- d.push({ code: p.code, name: A, chain: p.code, popular: !1 });
2635
+ const x = p.networks || [], C = p.name || Ua[p.code] || p.code;
2636
+ if (x.length === 0)
2637
+ f.push({ code: p.code, name: C, chain: p.code, popular: !1 });
2481
2638
  else
2482
- for (const E of g) {
2483
- const R = E.code || E.id || E.name || p.code;
2484
- d.push({
2639
+ for (const E of x) {
2640
+ const k = E.code || E.id || E.name || p.code;
2641
+ f.push({
2485
2642
  code: p.code,
2486
- name: A,
2487
- chain: R,
2643
+ name: C,
2644
+ chain: k,
2488
2645
  chainName: E.name,
2489
2646
  popular: !1
2490
2647
  });
2491
2648
  }
2492
2649
  }
2493
- return d;
2494
- }, [n]), f = P((d, p) => l === d && c === p, [l, c]), h = Z(() => {
2495
- var A;
2496
- const d = m.trim().toLowerCase();
2497
- if (!d) {
2498
- if (l && c) {
2499
- const E = u.find((R) => R.code === l && R.chain === c);
2650
+ return f;
2651
+ }, [n]), m = P((f, p) => o === f && d === p, [o, d]), h = $(() => {
2652
+ var C;
2653
+ const f = u.trim().toLowerCase();
2654
+ if (!f) {
2655
+ if (o && d) {
2656
+ const E = s.find((k) => k.code === o && k.chain === d);
2500
2657
  if (E) {
2501
- const R = u.filter((_) => !(_.code === l && _.chain === c));
2502
- return [E, ...R];
2658
+ const k = s.filter((_) => !(_.code === o && _.chain === d));
2659
+ return [E, ...k];
2503
2660
  }
2504
2661
  }
2505
- return u;
2662
+ return s;
2506
2663
  }
2507
- const p = d.split(/\s+/), g = [];
2508
- for (const E of u) {
2509
- const R = Qe(E.chain), _ = R ? R.name.toLowerCase() : "", ae = ((A = R == null ? void 0 : R.shortName) == null ? void 0 : A.toLowerCase()) || "", j = E.chain.toLowerCase(), Q = E.code.toLowerCase(), q = E.name.toLowerCase(), $ = [Q, q, _, ae, j];
2510
- if (!p.every((k) => $.some((i) => i.includes(k)))) continue;
2511
- let y = 0;
2512
- Q === d ? y += 100 : Q.startsWith(p[0]) && (y += 50), E.popular && (y += 10), p.length > 1 && (_.includes(p[1]) || ae.includes(p[1]) || j.includes(p[1])) && (y += 25), g.push({ item: E, score: y });
2664
+ const p = f.split(/\s+/), x = [];
2665
+ for (const E of s) {
2666
+ const k = qe(E.chain), _ = k ? k.name.toLowerCase() : "", re = ((C = k == null ? void 0 : k.shortName) == null ? void 0 : C.toLowerCase()) || "", j = E.chain.toLowerCase(), Q = E.code.toLowerCase(), ee = E.name.toLowerCase(), W = [Q, ee, _, re, j];
2667
+ if (!p.every((L) => W.some((c) => c.includes(L)))) continue;
2668
+ let v = 0;
2669
+ Q === f ? v += 100 : Q.startsWith(p[0]) && (v += 50), E.popular && (v += 10), p.length > 1 && (_.includes(p[1]) || re.includes(p[1]) || j.includes(p[1])) && (v += 25), x.push({ item: E, score: v });
2513
2670
  }
2514
- return g.sort((E, R) => R.score - E.score), g.map((E) => E.item);
2515
- }, [u, m, l, c]);
2516
- return /* @__PURE__ */ o(J, { children: [
2517
- /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(ke, { onClick: t }) }),
2671
+ return x.sort((E, k) => k.score - E.score), x.map((E) => E.item);
2672
+ }, [s, u, o, d]);
2673
+ return /* @__PURE__ */ l(q, { children: [
2674
+ /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Fe, { onClick: t }) }),
2518
2675
  /* @__PURE__ */ e(
2519
2676
  "h2",
2520
2677
  {
@@ -2523,29 +2680,29 @@ function Qa({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
2523
2680
  children: "Select crypto currency"
2524
2681
  }
2525
2682
  ),
2526
- /* @__PURE__ */ e(Pe, { value: m, onChange: s }),
2527
- /* @__PURE__ */ o("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2528
- h.map((d, p) => {
2529
- const g = Qe(d.chain), A = (g == null ? void 0 : g.name) || d.chainName || d.chain, E = d.name !== d.code ? d.name : "", R = f(d.code, d.chain);
2530
- return /* @__PURE__ */ o("div", { children: [
2531
- /* @__PURE__ */ o(
2683
+ /* @__PURE__ */ e(Ve, { value: u, onChange: i }),
2684
+ /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2685
+ h.map((f, p) => {
2686
+ const x = qe(f.chain), C = (x == null ? void 0 : x.name) || f.chainName || f.chain, E = f.name !== f.code ? f.name : "", k = m(f.code, f.chain);
2687
+ return /* @__PURE__ */ l("div", { children: [
2688
+ /* @__PURE__ */ l(
2532
2689
  "button",
2533
2690
  {
2534
- onClick: () => a(d.code, d.chain),
2691
+ onClick: () => a(f.code, f.chain),
2535
2692
  className: "flex items-center w-full transition-colors rounded-lg hover-item",
2536
2693
  style: { gap: 14, padding: "18px 8px", margin: "0 -8px" },
2537
2694
  children: [
2538
- /* @__PURE__ */ o("div", { className: "relative shrink-0", style: { width: 40, height: 40 }, children: [
2695
+ /* @__PURE__ */ l("div", { className: "relative shrink-0", style: { width: 40, height: 40 }, children: [
2539
2696
  /* @__PURE__ */ e(
2540
2697
  "div",
2541
2698
  {
2542
2699
  className: "absolute top-0 left-0",
2543
2700
  style: { background: "#ffffff", borderRadius: "50%" },
2544
2701
  children: /* @__PURE__ */ e(
2545
- _t,
2702
+ Xt,
2546
2703
  {
2547
- src: $t(d.code, r),
2548
- alt: d.code,
2704
+ src: zt(f.code, r),
2705
+ alt: f.code,
2549
2706
  size: 32
2550
2707
  }
2551
2708
  )
@@ -2563,23 +2720,23 @@ function Qa({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
2563
2720
  background: "#ffffff"
2564
2721
  },
2565
2722
  children: /* @__PURE__ */ e(
2566
- _t,
2723
+ Xt,
2567
2724
  {
2568
- src: it(d.chain, r),
2569
- alt: d.chain,
2725
+ src: ut(f.chain, r),
2726
+ alt: f.chain,
2570
2727
  size: 16
2571
2728
  }
2572
2729
  )
2573
2730
  }
2574
2731
  )
2575
2732
  ] }),
2576
- /* @__PURE__ */ e("div", { className: "text-left flex-1 min-w-0", children: /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
2733
+ /* @__PURE__ */ e("div", { className: "text-left flex-1 min-w-0", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
2577
2734
  /* @__PURE__ */ e(
2578
2735
  "span",
2579
2736
  {
2580
2737
  className: "font-semibold text-[15px]",
2581
2738
  style: { color: "var(--t-text)" },
2582
- children: d.code
2739
+ children: f.code
2583
2740
  }
2584
2741
  ),
2585
2742
  E && /* @__PURE__ */ e(
@@ -2591,9 +2748,9 @@ function Qa({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
2591
2748
  }
2592
2749
  )
2593
2750
  ] }) }),
2594
- /* @__PURE__ */ o("div", { className: "flex items-center gap-2 shrink-0", children: [
2595
- /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: A }),
2596
- R && /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
2751
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-2 shrink-0", children: [
2752
+ /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: C }),
2753
+ k && /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
2597
2754
  "path",
2598
2755
  {
2599
2756
  d: "M13.5 4.5L6 12L2.5 8.5",
@@ -2608,36 +2765,36 @@ function Qa({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
2608
2765
  }
2609
2766
  ),
2610
2767
  p < h.length - 1 && /* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider, rgba(255,255,255,0.08))" } })
2611
- ] }, `${d.code}-${d.chain}`);
2768
+ ] }, `${f.code}-${f.chain}`);
2612
2769
  }),
2613
2770
  h.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: "No currencies found" })
2614
2771
  ] })
2615
2772
  ] });
2616
2773
  }
2617
- function za({
2774
+ function sn({
2618
2775
  methods: t,
2619
2776
  selectedId: a,
2620
2777
  onSelect: n,
2621
2778
  onClose: r
2622
2779
  }) {
2623
- const [l, c] = v(""), m = Z(() => {
2624
- const s = l.trim().toLowerCase();
2625
- if (!s) {
2780
+ const [o, d] = N(""), u = $(() => {
2781
+ const i = o.trim().toLowerCase();
2782
+ if (!i) {
2626
2783
  if (a) {
2627
- const u = t.find((f) => f.id === a);
2628
- if (u) {
2629
- const f = t.filter((h) => h.id !== a);
2630
- return [u, ...f];
2784
+ const s = t.find((m) => m.id === a);
2785
+ if (s) {
2786
+ const m = t.filter((h) => h.id !== a);
2787
+ return [s, ...m];
2631
2788
  }
2632
2789
  }
2633
2790
  return t;
2634
2791
  }
2635
2792
  return t.filter(
2636
- (u) => u.id.toLowerCase().includes(s) || u.name.toLowerCase().includes(s) || u.description && u.description.toLowerCase().includes(s)
2793
+ (s) => s.id.toLowerCase().includes(i) || s.name.toLowerCase().includes(i) || s.description && s.description.toLowerCase().includes(i)
2637
2794
  );
2638
- }, [t, l, a]);
2639
- return /* @__PURE__ */ o(J, { children: [
2640
- /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(ke, { onClick: r }) }),
2795
+ }, [t, o, a]);
2796
+ return /* @__PURE__ */ l(q, { children: [
2797
+ /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Fe, { onClick: r }) }),
2641
2798
  /* @__PURE__ */ e(
2642
2799
  "h2",
2643
2800
  {
@@ -2646,27 +2803,27 @@ function za({
2646
2803
  children: "Choose payment method"
2647
2804
  }
2648
2805
  ),
2649
- /* @__PURE__ */ e(Pe, { value: l, onChange: c }),
2650
- /* @__PURE__ */ o("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2651
- m.map((s, u) => {
2652
- const f = s.id === a, h = Yt(s.id, s.name);
2653
- return /* @__PURE__ */ o("div", { children: [
2654
- /* @__PURE__ */ o(
2806
+ /* @__PURE__ */ e(Ve, { value: o, onChange: d }),
2807
+ /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2808
+ u.map((i, s) => {
2809
+ const m = i.id === a, h = ea(i.id, i.name);
2810
+ return /* @__PURE__ */ l("div", { children: [
2811
+ /* @__PURE__ */ l(
2655
2812
  "button",
2656
2813
  {
2657
- onClick: () => n(s.id),
2658
- className: `flex w-full transition-colors rounded-lg hover-item ${s.description ? "items-start" : "items-center"}`,
2814
+ onClick: () => n(i.id),
2815
+ className: `flex w-full transition-colors rounded-lg hover-item ${i.description ? "items-start" : "items-center"}`,
2659
2816
  style: { color: "var(--t-text)", gap: 14, padding: "18px 8px", margin: "0 -8px" },
2660
2817
  children: [
2661
2818
  /* @__PURE__ */ e(
2662
2819
  "span",
2663
2820
  {
2664
- className: `flex items-center justify-center shrink-0 ${s.description ? "mt-0.5" : ""}`,
2821
+ className: `flex items-center justify-center shrink-0 ${i.description ? "mt-0.5" : ""}`,
2665
2822
  style: { width: 32, height: 32 },
2666
- children: Zt(s.id, s.icon, 32)
2823
+ children: ta(i.id, i.icon, 32)
2667
2824
  }
2668
2825
  ),
2669
- /* @__PURE__ */ o("div", { className: "text-left flex-1", children: [
2826
+ /* @__PURE__ */ l("div", { className: "text-left flex-1", children: [
2670
2827
  /* @__PURE__ */ e(
2671
2828
  "div",
2672
2829
  {
@@ -2675,16 +2832,16 @@ function za({
2675
2832
  children: h
2676
2833
  }
2677
2834
  ),
2678
- s.description && /* @__PURE__ */ e(
2835
+ i.description && /* @__PURE__ */ e(
2679
2836
  "div",
2680
2837
  {
2681
2838
  className: "text-[13px] leading-snug mt-1",
2682
2839
  style: { color: "var(--t-text-secondary)" },
2683
- children: s.description
2840
+ children: i.description
2684
2841
  }
2685
2842
  )
2686
2843
  ] }),
2687
- f && /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "shrink-0 mt-1", children: /* @__PURE__ */ e(
2844
+ m && /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "shrink-0 mt-1", children: /* @__PURE__ */ e(
2688
2845
  "path",
2689
2846
  {
2690
2847
  d: "M13.5 4.5L6 12L2.5 8.5",
@@ -2697,14 +2854,14 @@ function za({
2697
2854
  ]
2698
2855
  }
2699
2856
  ),
2700
- u < m.length - 1 && /* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider, rgba(255,255,255,0.08))" } })
2701
- ] }, s.id);
2857
+ s < u.length - 1 && /* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider, rgba(255,255,255,0.08))" } })
2858
+ ] }, i.id);
2702
2859
  }),
2703
- m.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: "No payment methods found" })
2860
+ u.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: "No payment methods found" })
2704
2861
  ] })
2705
2862
  ] });
2706
2863
  }
2707
- function Ja({
2864
+ function dn({
2708
2865
  checked: t,
2709
2866
  onChange: a,
2710
2867
  accentColor: n = "var(--t-accent)"
@@ -2734,47 +2891,47 @@ function Ja({
2734
2891
  }
2735
2892
  );
2736
2893
  }
2737
- const qa = [
2894
+ const un = [
2738
2895
  { label: "Privacy policy", href: "https://nowramp.com/privacy-policy" },
2739
2896
  { label: "Terms of use", href: "https://nowramp.com/terms-and-conditions" }
2740
2897
  ];
2741
- function en({
2898
+ function mn({
2742
2899
  onClose: t,
2743
2900
  darkMode: a,
2744
2901
  onToggleDarkMode: n,
2745
2902
  skinId: r,
2746
- onSelectSkin: l,
2747
- showThemeToggle: c = !0,
2748
- country: m,
2749
- countryName: s,
2750
- onLocationPress: u,
2751
- assetBaseUrl: f = ""
2903
+ onSelectSkin: o,
2904
+ showThemeToggle: d = !0,
2905
+ country: u,
2906
+ countryName: i,
2907
+ onLocationPress: s,
2908
+ assetBaseUrl: m = ""
2752
2909
  }) {
2753
- const [h, d] = v(!1);
2754
- return /* @__PURE__ */ o(J, { children: [
2755
- /* @__PURE__ */ e("div", { className: "flex justify-end items-center px-5 pt-5", children: /* @__PURE__ */ e(ke, { onClick: t }) }),
2756
- /* @__PURE__ */ o("div", { className: "px-5 flex-1 pt-6 overflow-y-auto custom-scroll", children: [
2757
- u && /* @__PURE__ */ o(J, { children: [
2758
- /* @__PURE__ */ e("div", { style: { borderTop: "1px solid var(--t-divider)" }, children: /* @__PURE__ */ o(
2910
+ const [h, f] = N(!1);
2911
+ return /* @__PURE__ */ l(q, { children: [
2912
+ /* @__PURE__ */ e("div", { className: "flex justify-end items-center px-5 pt-5", children: /* @__PURE__ */ e(Fe, { onClick: t }) }),
2913
+ /* @__PURE__ */ l("div", { className: "px-5 flex-1 pt-6 overflow-y-auto custom-scroll", children: [
2914
+ s && /* @__PURE__ */ l(q, { children: [
2915
+ /* @__PURE__ */ e("div", { style: { borderTop: "1px solid var(--t-divider)" }, children: /* @__PURE__ */ l(
2759
2916
  "button",
2760
2917
  {
2761
- onClick: u,
2918
+ onClick: s,
2762
2919
  className: "flex items-center justify-between w-full py-5 transition-colors",
2763
2920
  style: { color: "inherit", background: "none", border: "none", cursor: "pointer", padding: "20px 0" },
2764
2921
  children: [
2765
- /* @__PURE__ */ o("div", { className: "flex items-center gap-3.5", children: [
2766
- m && !h ? /* @__PURE__ */ e(
2922
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-3.5", children: [
2923
+ u && !h ? /* @__PURE__ */ e(
2767
2924
  "img",
2768
2925
  {
2769
- src: `${f}/flags/${m.toLowerCase()}.svg`,
2770
- alt: m,
2926
+ src: `${m}/flags/${u.toLowerCase()}.svg`,
2927
+ alt: u,
2771
2928
  width: 40,
2772
2929
  height: 40,
2773
2930
  style: { width: 40, height: 40, borderRadius: "50%", objectFit: "cover" },
2774
- onError: () => d(!0)
2931
+ onError: () => f(!0)
2775
2932
  }
2776
- ) : /* @__PURE__ */ e(tn, { size: 40 }),
2777
- /* @__PURE__ */ o("div", { className: "text-left", children: [
2933
+ ) : /* @__PURE__ */ e(fn, { size: 40 }),
2934
+ /* @__PURE__ */ l("div", { className: "text-left", children: [
2778
2935
  /* @__PURE__ */ e(
2779
2936
  "span",
2780
2937
  {
@@ -2783,26 +2940,26 @@ function en({
2783
2940
  children: "Location"
2784
2941
  }
2785
2942
  ),
2786
- s && /* @__PURE__ */ e(
2943
+ i && /* @__PURE__ */ e(
2787
2944
  "span",
2788
2945
  {
2789
2946
  className: "text-[13px]",
2790
2947
  style: { color: "var(--t-text-secondary)" },
2791
- children: s
2948
+ children: i
2792
2949
  }
2793
2950
  )
2794
2951
  ] })
2795
2952
  ] }),
2796
- /* @__PURE__ */ e(Pt, {})
2953
+ /* @__PURE__ */ e($t, {})
2797
2954
  ]
2798
2955
  }
2799
2956
  ) }),
2800
2957
  /* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider)" } })
2801
2958
  ] }),
2802
- c && /* @__PURE__ */ o(J, { children: [
2803
- /* @__PURE__ */ e("div", { style: { borderTop: u ? "none" : "1px solid var(--t-divider)" }, children: /* @__PURE__ */ o("div", { className: "flex items-center justify-between w-full py-5", children: [
2804
- /* @__PURE__ */ o("div", { className: "flex items-center gap-3.5", children: [
2805
- /* @__PURE__ */ e(Ia, { size: 40 }),
2959
+ d && /* @__PURE__ */ l(q, { children: [
2960
+ /* @__PURE__ */ e("div", { style: { borderTop: s ? "none" : "1px solid var(--t-divider)" }, children: /* @__PURE__ */ l("div", { className: "flex items-center justify-between w-full py-5", children: [
2961
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-3.5", children: [
2962
+ /* @__PURE__ */ e(Wa, { size: 40 }),
2806
2963
  /* @__PURE__ */ e(
2807
2964
  "span",
2808
2965
  {
@@ -2812,12 +2969,12 @@ function en({
2812
2969
  }
2813
2970
  )
2814
2971
  ] }),
2815
- /* @__PURE__ */ e(Ja, { checked: a, onChange: n, accentColor: "#4CD964" })
2972
+ /* @__PURE__ */ e(dn, { checked: a, onChange: n, accentColor: "#4CD964" })
2816
2973
  ] }) }),
2817
2974
  /* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider)" } })
2818
2975
  ] }),
2819
- qa.map((p) => /* @__PURE__ */ o("div", { children: [
2820
- /* @__PURE__ */ o(
2976
+ un.map((p) => /* @__PURE__ */ l("div", { children: [
2977
+ /* @__PURE__ */ l(
2821
2978
  "a",
2822
2979
  {
2823
2980
  href: p.href,
@@ -2834,7 +2991,7 @@ function en({
2834
2991
  children: p.label
2835
2992
  }
2836
2993
  ),
2837
- /* @__PURE__ */ e(Pt, {})
2994
+ /* @__PURE__ */ e($t, {})
2838
2995
  ]
2839
2996
  }
2840
2997
  ),
@@ -2843,38 +3000,38 @@ function en({
2843
3000
  ] })
2844
3001
  ] });
2845
3002
  }
2846
- function tn({ size: t = 40 }) {
2847
- return /* @__PURE__ */ o("svg", { width: t, height: t, viewBox: "0 0 40 40", fill: "none", children: [
3003
+ function fn({ size: t = 40 }) {
3004
+ return /* @__PURE__ */ l("svg", { width: t, height: t, viewBox: "0 0 40 40", fill: "none", children: [
2848
3005
  /* @__PURE__ */ e("circle", { cx: "20", cy: "20", r: "18", stroke: "var(--t-text-secondary)", strokeWidth: "1.5", fill: "none" }),
2849
3006
  /* @__PURE__ */ e("ellipse", { cx: "20", cy: "20", rx: "9", ry: "18", stroke: "var(--t-text-secondary)", strokeWidth: "1.5", fill: "none" }),
2850
3007
  /* @__PURE__ */ e("line", { x1: "2", y1: "20", x2: "38", y2: "20", stroke: "var(--t-text-secondary)", strokeWidth: "1.5" }),
2851
3008
  /* @__PURE__ */ e("path", { d: "M5 12h30M5 28h30", stroke: "var(--t-text-secondary)", strokeWidth: "1.2" })
2852
3009
  ] });
2853
3010
  }
2854
- function an({
3011
+ function hn({
2855
3012
  onClose: t,
2856
3013
  onSelect: a,
2857
3014
  assetBaseUrl: n = "",
2858
3015
  selectedCode: r
2859
3016
  }) {
2860
- const [l, c] = v(""), m = Z(() => {
2861
- const s = l.trim().toLowerCase();
2862
- if (!s) {
3017
+ const [o, d] = N(""), u = $(() => {
3018
+ const i = o.trim().toLowerCase();
3019
+ if (!i) {
2863
3020
  if (r) {
2864
- const u = r.toLowerCase(), f = st[u];
2865
- if (f) {
2866
- const h = Ze.filter((d) => d.code !== u);
2867
- return [f, ...h];
3021
+ const s = r.toLowerCase(), m = ht[s];
3022
+ if (m) {
3023
+ const h = Je.filter((f) => f.code !== s);
3024
+ return [m, ...h];
2868
3025
  }
2869
3026
  }
2870
- return Ze;
3027
+ return Je;
2871
3028
  }
2872
- return Ze.filter(
2873
- (u) => u.name.toLowerCase().includes(s) || u.code.includes(s) || u.defaultFiat.toLowerCase().includes(s)
3029
+ return Je.filter(
3030
+ (s) => s.name.toLowerCase().includes(i) || s.code.includes(i) || s.defaultFiat.toLowerCase().includes(i)
2874
3031
  );
2875
- }, [l, r]);
2876
- return /* @__PURE__ */ o(J, { children: [
2877
- /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(ke, { onClick: t }) }),
3032
+ }, [o, r]);
3033
+ return /* @__PURE__ */ l(q, { children: [
3034
+ /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Fe, { onClick: t }) }),
2878
3035
  /* @__PURE__ */ e(
2879
3036
  "h2",
2880
3037
  {
@@ -2889,24 +3046,24 @@ function an({
2889
3046
  children: "Select your country"
2890
3047
  }
2891
3048
  ),
2892
- /* @__PURE__ */ e(Pe, { value: l, onChange: c }),
2893
- /* @__PURE__ */ o("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2894
- m.map((s, u) => {
2895
- const f = (r == null ? void 0 : r.toLowerCase()) === s.code;
2896
- return /* @__PURE__ */ o("div", { children: [
2897
- /* @__PURE__ */ o(
3049
+ /* @__PURE__ */ e(Ve, { value: o, onChange: d }),
3050
+ /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
3051
+ u.map((i, s) => {
3052
+ const m = (r == null ? void 0 : r.toLowerCase()) === i.code;
3053
+ return /* @__PURE__ */ l("div", { children: [
3054
+ /* @__PURE__ */ l(
2898
3055
  "button",
2899
3056
  {
2900
- onClick: () => a(s.code),
3057
+ onClick: () => a(i.code),
2901
3058
  className: "flex items-center w-full transition-colors rounded-lg hover-item",
2902
3059
  style: { color: "var(--t-text)", gap: 14, padding: "18px 8px", margin: "0 -8px" },
2903
3060
  children: [
2904
- /* @__PURE__ */ e(nn, { code: s.code, size: 32, baseUrl: n }),
2905
- /* @__PURE__ */ o("div", { className: "text-left flex-1", children: [
2906
- /* @__PURE__ */ e("span", { className: "font-semibold text-[15px]", children: s.name }),
2907
- /* @__PURE__ */ e("span", { className: "text-[13px] ml-2", style: { color: "var(--t-text-secondary)" }, children: s.defaultFiat })
3061
+ /* @__PURE__ */ e(pn, { code: i.code, size: 32, baseUrl: n }),
3062
+ /* @__PURE__ */ l("div", { className: "text-left flex-1", children: [
3063
+ /* @__PURE__ */ e("span", { className: "font-semibold text-[15px]", children: i.name }),
3064
+ /* @__PURE__ */ e("span", { className: "text-[13px] ml-2", style: { color: "var(--t-text-secondary)" }, children: i.defaultFiat })
2908
3065
  ] }),
2909
- f && /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "shrink-0", children: /* @__PURE__ */ e(
3066
+ m && /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "shrink-0", children: /* @__PURE__ */ e(
2910
3067
  "path",
2911
3068
  {
2912
3069
  d: "M13.5 4.5L6 12L2.5 8.5",
@@ -2919,20 +3076,20 @@ function an({
2919
3076
  ]
2920
3077
  }
2921
3078
  ),
2922
- u < m.length - 1 && /* @__PURE__ */ e(
3079
+ s < u.length - 1 && /* @__PURE__ */ e(
2923
3080
  "div",
2924
3081
  {
2925
3082
  style: { height: 1, background: "var(--t-divider, rgba(255,255,255,0.08))" }
2926
3083
  }
2927
3084
  )
2928
- ] }, s.code);
3085
+ ] }, i.code);
2929
3086
  }),
2930
- m.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: "No countries found" })
3087
+ u.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: "No countries found" })
2931
3088
  ] })
2932
3089
  ] });
2933
3090
  }
2934
- function nn({ code: t, size: a = 32, baseUrl: n = "" }) {
2935
- const [r, l] = v(!1);
3091
+ function pn({ code: t, size: a = 32, baseUrl: n = "" }) {
3092
+ const [r, o] = N(!1);
2936
3093
  return r ? /* @__PURE__ */ e(
2937
3094
  "div",
2938
3095
  {
@@ -2957,228 +3114,232 @@ function nn({ code: t, size: a = 32, baseUrl: n = "" }) {
2957
3114
  width: a,
2958
3115
  height: a,
2959
3116
  style: { width: a, height: a, borderRadius: "50%", objectFit: "cover" },
2960
- onError: () => l(!0)
3117
+ onError: () => o(!0)
2961
3118
  }
2962
3119
  );
2963
3120
  }
2964
- function rn({
3121
+ function yn({
2965
3122
  className: t = "",
2966
3123
  theme: a = "dark",
2967
3124
  skinId: n = "mono",
2968
3125
  accentColor: r,
2969
- bgColor: l,
2970
- bgImage: c,
2971
- borderColor: m,
2972
- borderRadius: s,
2973
- surfaceColor: u,
2974
- inputBgColor: f,
3126
+ bgColor: o,
3127
+ bgImage: d,
3128
+ borderColor: u,
3129
+ borderRadius: i,
3130
+ surfaceColor: s,
3131
+ inputBgColor: m,
2975
3132
  textColor: h,
2976
- textSecondaryColor: d,
3133
+ textSecondaryColor: f,
2977
3134
  textMutedColor: p,
2978
- successColor: g,
2979
- showFlowToggle: A = !0,
3135
+ successColor: x,
3136
+ showFlowToggle: C = !0,
2980
3137
  showSettings: E = !0,
2981
- showThemeToggle: R = !0,
3138
+ showThemeToggle: k = !0,
2982
3139
  autoRedirect: _ = !1,
2983
- explorerUrl: ae,
3140
+ explorerUrl: re,
2984
3141
  doneButtonText: j = "Done",
2985
3142
  supportEmail: Q,
2986
- stablecoinParity: q,
2987
- partnerName: $,
2988
- onDone: xe
3143
+ stablecoinParity: ee,
3144
+ partnerName: W,
3145
+ onDone: ge
2989
3146
  }) {
2990
- var bt, Nt, Et, wt, At, Rt, Tt, kt, Lt;
3147
+ var kt, Tt, Lt, Ut, Ft, Dt, Mt, It, Bt;
2991
3148
  const {
2992
- state: y,
2993
- dispatch: k,
2994
- config: i,
2995
- configLoading: I,
2996
- quotes: b,
3149
+ state: v,
3150
+ dispatch: L,
3151
+ config: c,
3152
+ configLoading: U,
3153
+ quotes: w,
2997
3154
  quotesLoading: S,
2998
- quotesError: ge,
2999
- fetchQuotes: Ce,
3000
- createOrder: Se,
3001
- orderLoading: oe,
3002
- amountError: me,
3003
- fieldLocks: M,
3004
- apiConfig: ee,
3005
- assetBaseUrl: G
3006
- } = Te(), [X, fe] = v(a === "dark"), [he, Le] = v(n), [ie, H] = v(null), [Ue, Ee] = v(!1), [De, Ke] = v(!1), [ne, _e] = v(!1), [ve, Fe] = v(!1), [Ve, le] = v(null), [Me, Je] = v(!0), [qe, je] = v(!1), [ce, C] = v(!1), w = O(null), L = O(), U = O(y.flowType);
3007
- Y(() => {
3008
- fe(a === "dark");
3009
- }, [a]), Y(() => {
3010
- const x = setTimeout(() => Je(!1), I ? 0 : 800);
3011
- return () => clearTimeout(x);
3012
- }, [I]), Y(() => {
3013
- if (U.current !== y.flowType && !Me) {
3014
- U.current = y.flowType, je(!0), Ee(!1), Ke(!1);
3015
- const x = setTimeout(() => je(!1), 350);
3016
- return () => clearTimeout(x);
3155
+ quotesError: te,
3156
+ fetchQuotes: xe,
3157
+ createOrder: ve,
3158
+ orderLoading: le,
3159
+ amountError: he,
3160
+ fieldLocks: D,
3161
+ apiConfig: ae,
3162
+ assetBaseUrl: B,
3163
+ availableFiats: ce,
3164
+ availableCryptos: De,
3165
+ availablePaymentMethods: Y,
3166
+ selectionUnsupported: oe
3167
+ } = Ue(), [z, Ee] = N(a === "dark"), [Ae, at] = N(n), [se, O] = N(null), [Me, Re] = N(!1), [Ie, je] = N(!1), [ie, Ge] = N(!1), [Se, Be] = N(!1), [$e, de] = N(null), [Oe, nt] = N(!0), [rt, We] = N(!1), [ue, y] = N(!1), A = I(null), R = I(), F = I(v.flowType);
3168
+ Z(() => {
3169
+ Ee(a === "dark");
3170
+ }, [a]), Z(() => {
3171
+ const g = setTimeout(() => nt(!1), U ? 0 : 800);
3172
+ return () => clearTimeout(g);
3173
+ }, [U]), Z(() => {
3174
+ if (F.current !== v.flowType && !Oe) {
3175
+ F.current = v.flowType, We(!0), Re(!1), je(!1);
3176
+ const g = setTimeout(() => We(!1), 350);
3177
+ return () => clearTimeout(g);
3017
3178
  }
3018
- U.current = y.flowType;
3019
- }, [y.flowType, Me]);
3020
- const D = y.flowType, F = D === "buy", B = y.cryptoCurrency || "BTC", W = y.fiatCurrency || "USD", et = F ? y.fiatAmount : y.cryptoAmount, z = Ea(et), pe = (bt = b == null ? void 0 : b.bestQuote) != null && bt.exchangeRate ? parseFloat(b.bestQuote.exchangeRate) : null, Ge = O(null);
3021
- pe && B && W && (Ge.current = { rate: pe, crypto: B, fiat: W });
3022
- const ut = Z(() => {
3023
- if (b != null && b.bestQuote) {
3024
- const x = F ? b.bestQuote.cryptoAmount : b.bestQuote.fiatAmount;
3025
- if (x) return x;
3179
+ F.current = v.flowType;
3180
+ }, [v.flowType, Oe]);
3181
+ const M = v.flowType, T = M === "buy", H = v.cryptoCurrency || "BTC", X = v.fiatCurrency || "USD", ot = T ? v.fiatAmount : v.cryptoAmount, J = Ia(ot), pe = (kt = w == null ? void 0 : w.bestQuote) != null && kt.exchangeRate ? parseFloat(w.bestQuote.exchangeRate) : null, Xe = I(null);
3182
+ pe && H && X && (Xe.current = { rate: pe, crypto: H, fiat: X });
3183
+ const Ct = $(() => {
3184
+ if (w != null && w.bestQuote) {
3185
+ const g = T ? w.bestQuote.cryptoAmount : w.bestQuote.fiatAmount;
3186
+ if (g) return g;
3026
3187
  }
3027
3188
  return "0";
3028
- }, [b, F]), Ie = !!(q && $ && F && Xt(B) && pe), Qt = Ie && B.toUpperCase().includes(W.toUpperCase()), mt = Ie && z > 0 ? lt(Qt ? z : z / pe) : null, zt = Ie && mt ? mt : ut, Jt = Z(() => {
3029
- var K, re, Ae;
3030
- const x = pe || ((K = Ge.current) == null ? void 0 : K.rate), N = pe ? B : (re = Ge.current) == null ? void 0 : re.crypto, T = pe ? W : (Ae = Ge.current) == null ? void 0 : Ae.fiat;
3031
- return !x || !N || !T ? "" : `1 ${N} ≈ ${x.toFixed(2)} ${T}`;
3032
- }, [B, W, pe]);
3033
- Y(() => {
3034
- const x = y.walletAddress.trim(), N = y.network;
3035
- if (!x || x.length < 10) {
3036
- le(null), k({ type: "SET_WALLET_ERROR", message: "" });
3189
+ }, [w, T]), He = !!(ee && W && T && Jt(H) && pe), aa = He && H.toUpperCase().includes(X.toUpperCase()), gt = He && J > 0 ? mt(aa ? J : J / pe) : null, na = He && gt ? gt : Ct, ra = $(() => {
3190
+ var G, Ne, Te;
3191
+ const g = pe || ((G = Xe.current) == null ? void 0 : G.rate), b = pe ? H : (Ne = Xe.current) == null ? void 0 : Ne.crypto, K = pe ? X : (Te = Xe.current) == null ? void 0 : Te.fiat;
3192
+ return !g || !b || !K ? "" : `1 ${b} ≈ ${g.toFixed(2)} ${K}`;
3193
+ }, [H, X, pe]);
3194
+ Z(() => {
3195
+ const g = v.walletAddress.trim(), b = v.network;
3196
+ if (!g || g.length < 10) {
3197
+ de(null), L({ type: "SET_WALLET_ERROR", message: "" });
3037
3198
  return;
3038
3199
  }
3039
- Fe(!0), le(null);
3040
- const T = new AbortController();
3041
- return clearTimeout(L.current), L.current = setTimeout(async () => {
3042
- var K, re, Ae;
3200
+ Be(!0), de(null);
3201
+ const K = new AbortController();
3202
+ return clearTimeout(R.current), R.current = setTimeout(async () => {
3203
+ var G, Ne, Te;
3043
3204
  try {
3044
- const nt = await (await fetch(`${ee.apiUrl}/public/validate/address`, {
3205
+ const ct = await (await fetch(`${ae.apiUrl}/public/validate/address`, {
3045
3206
  method: "POST",
3046
3207
  headers: { "Content-Type": "application/json" },
3047
- body: JSON.stringify({ address: x, ...N ? { network: N } : {} }),
3048
- signal: T.signal
3049
- })).json(), rt = ((K = nt.data) == null ? void 0 : K.attributes) || nt.data || nt;
3050
- if (rt.isValid)
3051
- le(!0), k({ type: "SET_WALLET_ERROR", message: "" });
3208
+ body: JSON.stringify({ address: g, ...b ? { network: b } : {} }),
3209
+ signal: K.signal
3210
+ })).json(), st = ((G = ct.data) == null ? void 0 : G.attributes) || ct.data || ct;
3211
+ if (st.isValid)
3212
+ de(!0), L({ type: "SET_WALLET_ERROR", message: "" });
3052
3213
  else {
3053
- le(!1);
3054
- const da = ((re = rt.errors) == null ? void 0 : re[0]) || ((Ae = rt.details) == null ? void 0 : Ae.formatMessage) || "Invalid wallet address";
3055
- k({ type: "SET_WALLET_ERROR", message: da });
3214
+ de(!1);
3215
+ const ya = ((Ne = st.errors) == null ? void 0 : Ne[0]) || ((Te = st.details) == null ? void 0 : Te.formatMessage) || "Invalid wallet address";
3216
+ L({ type: "SET_WALLET_ERROR", message: ya });
3056
3217
  }
3057
- } catch (at) {
3058
- if (at instanceof DOMException && at.name === "AbortError") return;
3059
- le(null);
3218
+ } catch (lt) {
3219
+ if (lt instanceof DOMException && lt.name === "AbortError") return;
3220
+ de(null);
3060
3221
  } finally {
3061
- T.signal.aborted || Fe(!1);
3222
+ K.signal.aborted || Be(!1);
3062
3223
  }
3063
3224
  }, 500), () => {
3064
- clearTimeout(L.current), T.abort();
3225
+ clearTimeout(R.current), K.abort();
3065
3226
  };
3066
- }, [y.walletAddress, y.network, ee.apiUrl]);
3067
- const ft = !et || z === 0, ht = z > 0 && (F ? z < Bt : z < Ot), pt = !!me || ht || Ue && ft, qt = z > 0 && !me && !ht, tt = y.walletAddress.trim().length >= 10 && Ve !== !1 && !ve, $e = qt && tt && !!y.cryptoCurrency && !!y.network, ea = (x) => {
3068
- let N = x.target.value.replace(/[^0-9.,]/g, "");
3069
- const T = F ? 2 : 6, K = N.indexOf(".");
3070
- K !== -1 && N.length - K - 1 > T && (N = N.slice(0, K + T + 1)), k(F ? { type: "SET_FIAT_AMOUNT", amount: N } : { type: "SET_CRYPTO_AMOUNT", amount: N });
3071
- }, yt = (x) => {
3072
- x !== D && k({ type: "SET_FLOW_TYPE", flowType: x });
3073
- }, ta = P(
3074
- (x) => {
3075
- k({ type: "SET_FIAT_CURRENCY", currency: x });
3227
+ }, [v.walletAddress, v.network, ae.apiUrl]);
3228
+ const xt = !ot || J === 0, vt = J > 0 && (T ? J < Vt : J < jt), St = !!he || vt || Me && xt, oa = J > 0 && !he && !vt, it = v.walletAddress.trim().length >= 10 && $e !== !1 && !Se, Ye = oa && it && !!v.cryptoCurrency && !!v.network, ia = (g) => {
3229
+ let b = g.target.value.replace(/[^0-9.,]/g, "");
3230
+ const K = T ? 2 : 6, G = b.indexOf(".");
3231
+ G !== -1 && b.length - G - 1 > K && (b = b.slice(0, G + K + 1)), L(T ? { type: "SET_FIAT_AMOUNT", amount: b } : { type: "SET_CRYPTO_AMOUNT", amount: b });
3232
+ }, bt = (g) => {
3233
+ g !== M && L({ type: "SET_FLOW_TYPE", flowType: g, fieldLocks: D });
3234
+ }, la = P(
3235
+ (g) => {
3236
+ L({ type: "SET_FIAT_CURRENCY", currency: g });
3076
3237
  },
3077
- [k]
3078
- ), aa = P(
3079
- (x, N) => {
3080
- k({ type: "SET_CRYPTO_CURRENCY", currency: x }), k({ type: "SET_CRYPTO_CHAIN", chain: N });
3238
+ [L]
3239
+ ), ca = P(
3240
+ (g, b) => {
3241
+ L({ type: "SET_CRYPTO_CURRENCY", currency: g }), L({ type: "SET_CRYPTO_CHAIN", chain: b });
3081
3242
  },
3082
- [k]
3083
- ), na = P(
3084
- (x) => {
3085
- k({ type: "SET_PAYMENT_METHOD", methodId: x });
3243
+ [L]
3244
+ ), sa = P(
3245
+ (g) => {
3246
+ L({ type: "SET_PAYMENT_METHOD", methodId: g });
3086
3247
  },
3087
- [k]
3088
- ), ra = P(
3089
- (x) => {
3090
- k({ type: "SET_COUNTRY", country: x }), H(null);
3248
+ [L]
3249
+ ), da = P(
3250
+ (g) => {
3251
+ L({ type: "SET_COUNTRY", country: g }), O(null);
3091
3252
  },
3092
- [k]
3093
- ), oa = P(() => {
3094
- H(null), setTimeout(() => H("country"), 280);
3095
- }, []), ia = y.country ? (Nt = st[y.country.toLowerCase()]) == null ? void 0 : Nt.name : void 0, la = () => {
3096
- $e && (C(!0), Ce());
3253
+ [L]
3254
+ ), ua = P(() => {
3255
+ O(null), setTimeout(() => O("country"), 280);
3256
+ }, []), ma = v.country ? (Tt = ht[v.country.toLowerCase()]) == null ? void 0 : Tt.name : void 0, fa = () => {
3257
+ Ye && (y(!0), xe());
3097
3258
  };
3098
- Y(() => {
3099
- var x;
3100
- if (!(!ce || S)) {
3101
- if (b != null && b.bestQuote)
3102
- C(!1), k({ type: "SELECT_QUOTE", quote: b.bestQuote }), Se().catch(() => {
3259
+ Z(() => {
3260
+ var g;
3261
+ if (!(!ue || S)) {
3262
+ if (w != null && w.bestQuote)
3263
+ y(!1), L({ type: "SELECT_QUOTE", quote: w.bestQuote }), ve().catch(() => {
3103
3264
  });
3104
- else if (ge)
3105
- C(!1), k({ type: "SET_ERROR", message: ge.message || "No quotes available" });
3106
- else if (b && !b.bestQuote) {
3107
- C(!1);
3108
- const N = (x = b.unavailableGateways) == null ? void 0 : x.map((K) => K.reason).filter(Boolean), T = N != null && N.length ? `No providers available: ${N.join("; ")}` : "No providers available for this currency/network combination";
3109
- k({ type: "SET_ERROR", message: T });
3265
+ else if (te)
3266
+ y(!1), L({ type: "SET_ERROR", message: te.message || "No quotes available" });
3267
+ else if (w && !w.bestQuote) {
3268
+ y(!1);
3269
+ const b = (g = w.unavailableGateways) == null ? void 0 : g.map((G) => G.reason).filter(Boolean), K = b != null && b.length ? `No providers available: ${b.join("; ")}` : "No providers available for this currency/network combination";
3270
+ L({ type: "SET_ERROR", message: K });
3110
3271
  }
3111
3272
  }
3112
- }, [ce, b, S, ge, k, Se]);
3113
- const xt = X ? "theme-dark" : "theme-light", Xe = Mt.find((x) => x.id === he) || Mt[0], ca = Xe.accent === null, sa = r ? ue(r) : !1, gt = (x) => {
3114
- const N = x.replace("#", ""), T = parseInt(N.substring(0, 2), 16), K = parseInt(N.substring(2, 4), 16), re = parseInt(N.substring(4, 6), 16);
3115
- return (0.299 * T + 0.587 * K + 0.114 * re) / 255 > 0.5 ? "#000000" : "#ffffff";
3116
- }, Ct = sa ? { "--t-accent": r, "--t-cta-bg": r, "--t-cta-text": gt(r) } : ca ? {
3117
- "--t-accent": X ? "#ffffff" : "#111111",
3118
- "--t-cta-bg": X ? "#ffffff" : "#111111",
3119
- "--t-cta-text": X ? "#000000" : "#ffffff"
3273
+ }, [ue, w, S, te, L, ve]);
3274
+ const Nt = z ? "theme-dark" : "theme-light", Ze = Kt.find((g) => g.id === Ae) || Kt[0], ha = Ze.accent === null, pa = r ? fe(r) : !1, wt = (g) => {
3275
+ const b = g.replace("#", ""), K = parseInt(b.substring(0, 2), 16), G = parseInt(b.substring(2, 4), 16), Ne = parseInt(b.substring(4, 6), 16);
3276
+ return (0.299 * K + 0.587 * G + 0.114 * Ne) / 255 > 0.5 ? "#000000" : "#ffffff";
3277
+ }, Et = pa ? { "--t-accent": r, "--t-cta-bg": r, "--t-cta-text": wt(r) } : ha ? {
3278
+ "--t-accent": z ? "#ffffff" : "#111111",
3279
+ "--t-cta-bg": z ? "#ffffff" : "#111111",
3280
+ "--t-cta-text": z ? "#000000" : "#ffffff"
3120
3281
  } : {
3121
- "--t-accent": Xe.accent,
3122
- "--t-cta-bg": Xe.accent,
3123
- "--t-cta-text": gt(Xe.accent)
3124
- }, te = {};
3125
- u && ue(u) && (te["--t-surface"] = u, te["--t-modal-bg"] = u), f && ue(f) && (te["--t-pill-bg"] = f, te["--t-close-bg"] = f), h && ue(h) && (te["--t-text"] = h), d && ue(d) && (te["--t-text-secondary"] = d), p && ue(p) && (te["--t-text-muted"] = p, te["--t-text-tertiary"] = p), g && ue(g) && (te["--t-success"] = g);
3282
+ "--t-accent": Ze.accent,
3283
+ "--t-cta-bg": Ze.accent,
3284
+ "--t-cta-text": wt(Ze.accent)
3285
+ }, ne = {};
3286
+ s && fe(s) && (ne["--t-surface"] = s, ne["--t-modal-bg"] = s), m && fe(m) && (ne["--t-pill-bg"] = m, ne["--t-close-bg"] = m), h && fe(h) && (ne["--t-text"] = h), f && fe(f) && (ne["--t-text-secondary"] = f), p && fe(p) && (ne["--t-text-muted"] = p, ne["--t-text-tertiary"] = p), x && fe(x) && (ne["--t-success"] = x);
3126
3287
  const be = {};
3127
- l && ue(l) ? be.backgroundColor = l : be.backgroundColor = "var(--t-bg)", c && (c.startsWith("https://") || c.startsWith("data:image/")) && (be.backgroundImage = `url(${c})`, be.backgroundSize = "cover", be.backgroundPosition = "center");
3128
- const We = X ? "#ffffff" : "#111111", Ye = {};
3129
- m && ue(m) && (Ye.border = `1px solid ${m}`), s && (Ye.borderRadius = s);
3130
- const St = y.step === "checkout" ? /* @__PURE__ */ e(Ka, { autoRedirect: _ }) : y.step === "processing" ? /* @__PURE__ */ e(Va, {}) : y.step === "complete" ? /* @__PURE__ */ e(ja, { explorerUrl: ae, doneButtonText: j, onDone: xe }) : y.step === "error" ? /* @__PURE__ */ e(Ga, { supportEmail: Q }) : y.step === "confirm" ? /* @__PURE__ */ e($a, { stablecoinParity: Ie, partnerName: $ }) : null;
3131
- if (St)
3288
+ o && fe(o) ? be.backgroundColor = o : be.backgroundColor = "var(--t-bg)", d && (d.startsWith("https://") || d.startsWith("data:image/")) && (be.backgroundImage = `url(${d})`, be.backgroundSize = "cover", be.backgroundPosition = "center");
3289
+ const Qe = z ? "#ffffff" : "#111111", ze = {};
3290
+ u && fe(u) && (ze.border = `1px solid ${u}`), i && (ze.borderRadius = i);
3291
+ const At = v.step === "checkout" ? /* @__PURE__ */ e(za, { autoRedirect: _ }) : v.step === "processing" ? /* @__PURE__ */ e(qa, {}) : v.step === "complete" ? /* @__PURE__ */ e(en, { explorerUrl: re, doneButtonText: j, onDone: ge }) : v.step === "error" ? /* @__PURE__ */ e(tn, { supportEmail: Q }) : v.step === "confirm" ? /* @__PURE__ */ e(an, { stablecoinParity: He, partnerName: W }) : null;
3292
+ if (At)
3132
3293
  return /* @__PURE__ */ e(
3133
3294
  "div",
3134
3295
  {
3135
- className: `${xt} relative w-full max-w-[390px] h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
3296
+ className: `${Nt} relative w-full max-w-[390px] h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
3136
3297
  style: {
3137
3298
  fontFamily: "'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
3138
3299
  ...be,
3139
- ...Ct,
3140
- ...te,
3141
- ...Ye
3300
+ ...Et,
3301
+ ...ne,
3302
+ ...ze
3142
3303
  },
3143
- children: St
3304
+ children: At
3144
3305
  }
3145
3306
  );
3146
- const se = y.network, we = se ? Qe(se) : null, vt = (we == null ? void 0 : we.shortName) || (we == null ? void 0 : we.name) || se;
3147
- return /* @__PURE__ */ o(
3307
+ const me = v.network, ke = me ? qe(me) : null, Rt = (ke == null ? void 0 : ke.shortName) || (ke == null ? void 0 : ke.name) || me;
3308
+ return /* @__PURE__ */ l(
3148
3309
  "div",
3149
3310
  {
3150
- className: `${xt} relative w-full max-w-[390px] min-h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
3311
+ className: `${Nt} relative w-full max-w-[390px] min-h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
3151
3312
  style: {
3152
3313
  fontFamily: "'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
3153
3314
  ...be,
3154
- ...Ct,
3155
- ...te,
3156
- ...Ye
3315
+ ...Et,
3316
+ ...ne,
3317
+ ...ze
3157
3318
  },
3158
3319
  children: [
3159
- E && /* @__PURE__ */ e("div", { className: `flex justify-end items-center px-5 pt-3 ${A ? "pb-1" : "pb-5"}`, children: /* @__PURE__ */ e(Ma, { onClick: () => H("settings") }) }),
3160
- A ? /* @__PURE__ */ o("div", { className: "flex flex-col items-center pt-3 pb-5", children: [
3161
- /* @__PURE__ */ o("div", { className: "flex", style: { width: 165 }, children: [
3320
+ E && /* @__PURE__ */ e("div", { className: `flex justify-end items-center px-5 pt-3 ${C ? "pb-1" : "pb-5"}`, children: /* @__PURE__ */ e($a, { onClick: () => O("settings") }) }),
3321
+ C ? /* @__PURE__ */ l("div", { className: "flex flex-col items-center pt-3 pb-5", children: [
3322
+ /* @__PURE__ */ l("div", { className: "flex", style: { width: 165 }, children: [
3162
3323
  /* @__PURE__ */ e(
3163
3324
  "button",
3164
3325
  {
3165
- onClick: () => yt("buy"),
3326
+ onClick: () => bt("buy"),
3166
3327
  className: "flex-1 pb-2.5 text-[16px] font-medium text-center transition-colors duration-200",
3167
- style: { color: D === "buy" ? "var(--t-text)" : "var(--t-text-secondary)" },
3328
+ style: { color: M === "buy" ? "var(--t-text)" : "var(--t-text-secondary)" },
3168
3329
  children: "Buy"
3169
3330
  }
3170
3331
  ),
3171
3332
  /* @__PURE__ */ e(
3172
3333
  "button",
3173
3334
  {
3174
- onClick: () => yt("sell"),
3335
+ onClick: () => bt("sell"),
3175
3336
  className: "flex-1 pb-2.5 text-[16px] font-medium text-center transition-colors duration-200",
3176
- style: { color: D === "sell" ? "var(--t-text)" : "var(--t-text-secondary)" },
3337
+ style: { color: M === "sell" ? "var(--t-text)" : "var(--t-text-secondary)" },
3177
3338
  children: "Sell"
3178
3339
  }
3179
3340
  )
3180
3341
  ] }),
3181
- /* @__PURE__ */ o("div", { className: "relative", style: { width: 165, height: 1 }, children: [
3342
+ /* @__PURE__ */ l("div", { className: "relative", style: { width: 165, height: 1 }, children: [
3182
3343
  /* @__PURE__ */ e("div", { className: "absolute inset-0", style: { background: "var(--t-divider)" } }),
3183
3344
  /* @__PURE__ */ e(
3184
3345
  "div",
@@ -3186,46 +3347,46 @@ function rn({
3186
3347
  className: "absolute top-0 h-full transition-all duration-300 ease-in-out",
3187
3348
  style: {
3188
3349
  width: "50%",
3189
- left: D === "buy" ? "0%" : "50%",
3350
+ left: M === "buy" ? "0%" : "50%",
3190
3351
  background: "var(--t-accent)"
3191
3352
  }
3192
3353
  }
3193
3354
  )
3194
3355
  ] })
3195
3356
  ] }) : null,
3196
- Me || qe || I ? /* @__PURE__ */ e(Ya, {}) : /* @__PURE__ */ o("div", { className: "flex-1 overflow-hidden px-5 flex flex-col tab-fade-in", children: [
3197
- /* @__PURE__ */ o(
3357
+ Oe || rt || U ? /* @__PURE__ */ e(on, {}) : /* @__PURE__ */ l("div", { className: "flex-1 overflow-hidden px-5 flex flex-col tab-fade-in", children: [
3358
+ /* @__PURE__ */ l(
3198
3359
  "div",
3199
3360
  {
3200
3361
  className: "px-[18px] pt-[14px] pb-[18px]",
3201
3362
  style: {
3202
3363
  background: "var(--t-surface)",
3203
3364
  borderRadius: 5,
3204
- border: Ue && pt ? "1px solid #EF4444" : "1px solid transparent",
3365
+ border: Me && St ? "1px solid #EF4444" : "1px solid transparent",
3205
3366
  minHeight: 102
3206
3367
  },
3207
3368
  children: [
3208
3369
  /* @__PURE__ */ e("div", { className: "text-[13px] mb-2.5", style: { color: "var(--t-text-secondary)" }, children: "You spend" }),
3209
- /* @__PURE__ */ o("div", { className: "flex items-center justify-between", children: [
3370
+ /* @__PURE__ */ l("div", { className: "flex items-center justify-between", children: [
3210
3371
  /* @__PURE__ */ e(
3211
3372
  "input",
3212
3373
  {
3213
- ref: w,
3374
+ ref: A,
3214
3375
  type: "text",
3215
- value: et,
3216
- onChange: ea,
3217
- onBlur: () => Ee(!0),
3218
- placeholder: F ? "250" : "0.01",
3376
+ value: ot,
3377
+ onChange: ia,
3378
+ onBlur: () => Re(!0),
3379
+ placeholder: T ? "250" : "0.01",
3219
3380
  className: "bg-transparent outline-none w-0 flex-1 mr-3",
3220
3381
  style: { color: "var(--t-text)", fontSize: 24, fontWeight: 600, lineHeight: "32px", padding: 0, border: "none", borderRadius: 0, backgroundColor: "transparent", height: "auto", width: 0 },
3221
3382
  inputMode: "decimal",
3222
- disabled: !!((Et = M == null ? void 0 : M.sourceAmount) != null && Et.locked)
3383
+ disabled: !!((Lt = D == null ? void 0 : D.sourceAmount) != null && Lt.locked)
3223
3384
  }
3224
3385
  ),
3225
- F ? /* @__PURE__ */ o(
3386
+ T ? /* @__PURE__ */ l(
3226
3387
  "button",
3227
3388
  {
3228
- onClick: () => H("fiat"),
3389
+ onClick: () => O("fiat"),
3229
3390
  className: "flex items-center gap-1.5 shrink-0 transition-colors",
3230
3391
  style: {
3231
3392
  background: "var(--t-pill-bg)",
@@ -3234,18 +3395,18 @@ function rn({
3234
3395
  paddingLeft: 10,
3235
3396
  paddingRight: 10
3236
3397
  },
3237
- disabled: !!((wt = M == null ? void 0 : M.sourceCurrency) != null && wt.locked),
3398
+ disabled: !!((Ut = D == null ? void 0 : D.sourceCurrency) != null && Ut.locked),
3238
3399
  children: [
3239
- /* @__PURE__ */ e(ct, { currencyCode: W, size: 16, baseUrl: G }),
3240
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: We }, children: W }),
3241
- /* @__PURE__ */ e(He, {})
3400
+ /* @__PURE__ */ e(ft, { currencyCode: X, size: 16, baseUrl: B }),
3401
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: Qe }, children: X }),
3402
+ /* @__PURE__ */ e(_e, {})
3242
3403
  ]
3243
3404
  }
3244
- ) : /* @__PURE__ */ o("div", { className: "flex flex-col items-end shrink-0", children: [
3245
- /* @__PURE__ */ o(
3405
+ ) : /* @__PURE__ */ l("div", { className: "flex flex-col items-end shrink-0", children: [
3406
+ /* @__PURE__ */ l(
3246
3407
  "button",
3247
3408
  {
3248
- onClick: () => H("crypto"),
3409
+ onClick: () => O("crypto"),
3249
3410
  className: "flex items-center gap-1.5 transition-colors",
3250
3411
  style: {
3251
3412
  background: "var(--t-pill-bg)",
@@ -3254,35 +3415,35 @@ function rn({
3254
3415
  paddingLeft: 10,
3255
3416
  paddingRight: 10
3256
3417
  },
3257
- disabled: !!((At = M == null ? void 0 : M.destinationCurrency) != null && At.locked),
3418
+ disabled: !!((Ft = D == null ? void 0 : D.destinationCurrency) != null && Ft.locked),
3258
3419
  children: [
3259
- /* @__PURE__ */ e(Ht, { ticker: B, size: 16, baseUrl: G }),
3260
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: We }, children: B }),
3261
- /* @__PURE__ */ e(He, {})
3420
+ /* @__PURE__ */ e(Gt, { ticker: H, size: 16, baseUrl: B }),
3421
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: Qe }, children: H }),
3422
+ /* @__PURE__ */ e(_e, {})
3262
3423
  ]
3263
3424
  }
3264
3425
  ),
3265
- se && /* @__PURE__ */ o("div", { className: "flex items-center gap-1 mt-1.5 mr-0.5", children: [
3426
+ me && /* @__PURE__ */ l("div", { className: "flex items-center gap-1 mt-1.5 mr-0.5", children: [
3266
3427
  /* @__PURE__ */ e("div", { className: "rounded-full", style: { width: 14, height: 14, background: "#ffffff" }, children: /* @__PURE__ */ e(
3267
3428
  "img",
3268
3429
  {
3269
- src: it(se, G),
3270
- alt: se,
3430
+ src: ut(me, B),
3431
+ alt: me,
3271
3432
  width: 14,
3272
3433
  height: 14,
3273
3434
  className: "rounded-full",
3274
3435
  style: { width: 14, height: 14 }
3275
3436
  }
3276
3437
  ) }),
3277
- /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: vt })
3438
+ /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: Rt })
3278
3439
  ] })
3279
3440
  ] })
3280
3441
  ] })
3281
3442
  ]
3282
3443
  }
3283
3444
  ),
3284
- Ue && pt && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 px-[2px]", style: { color: "#EF4444" }, children: me || (ft ? "Amount should be more than 0" : F ? `Minimum amount is ${Bt} ${W}` : `Minimum amount is ${Ot} ${B}`) }),
3285
- /* @__PURE__ */ o(
3445
+ Me && St && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 px-[2px]", style: { color: "#EF4444" }, children: he || (xt ? "Amount should be more than 0" : T ? `Minimum amount is ${Vt} ${X}` : `Minimum amount is ${jt} ${H}`) }),
3446
+ /* @__PURE__ */ l(
3286
3447
  "div",
3287
3448
  {
3288
3449
  className: "px-[18px] pt-[12px] pb-[14px]",
@@ -3297,21 +3458,21 @@ function rn({
3297
3458
  },
3298
3459
  children: [
3299
3460
  /* @__PURE__ */ e("div", { className: "text-[13px] mb-2.5", style: { color: "var(--t-text-secondary)" }, children: "You get" }),
3300
- /* @__PURE__ */ o("div", { className: "flex items-start justify-between", children: [
3301
- S && !ce ? /* @__PURE__ */ e(V, { w: 180, h: 32 }) : /* @__PURE__ */ e(
3302
- Wa,
3461
+ /* @__PURE__ */ l("div", { className: "flex items-start justify-between", children: [
3462
+ S && !ue ? /* @__PURE__ */ e(V, { w: 180, h: 32 }) : /* @__PURE__ */ e(
3463
+ rn,
3303
3464
  {
3304
- value: z > 0 ? zt : "0",
3465
+ value: J > 0 ? na : "0",
3305
3466
  height: 32,
3306
3467
  className: "font-semibold",
3307
- style: { color: z > 0 ? "var(--t-text)" : "var(--t-text-muted)", fontSize: 24 }
3468
+ style: { color: J > 0 ? "var(--t-text)" : "var(--t-text-muted)", fontSize: 24 }
3308
3469
  }
3309
3470
  ),
3310
- F ? /* @__PURE__ */ o("div", { className: "flex flex-col items-end shrink-0", children: [
3311
- /* @__PURE__ */ o(
3471
+ T ? /* @__PURE__ */ l("div", { className: "flex flex-col items-end shrink-0", children: [
3472
+ /* @__PURE__ */ l(
3312
3473
  "button",
3313
3474
  {
3314
- onClick: () => H("crypto"),
3475
+ onClick: () => O("crypto"),
3315
3476
  className: "flex items-center gap-1.5 transition-colors",
3316
3477
  style: {
3317
3478
  background: "var(--t-pill-bg)",
@@ -3320,32 +3481,32 @@ function rn({
3320
3481
  paddingLeft: 10,
3321
3482
  paddingRight: 10
3322
3483
  },
3323
- disabled: !!((Rt = M == null ? void 0 : M.destinationCurrency) != null && Rt.locked),
3484
+ disabled: !!((Dt = D == null ? void 0 : D.destinationCurrency) != null && Dt.locked),
3324
3485
  children: [
3325
- /* @__PURE__ */ e(Ht, { ticker: B, size: 16, baseUrl: G }),
3326
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: We }, children: B }),
3327
- /* @__PURE__ */ e(He, {})
3486
+ /* @__PURE__ */ e(Gt, { ticker: H, size: 16, baseUrl: B }),
3487
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: Qe }, children: H }),
3488
+ /* @__PURE__ */ e(_e, {})
3328
3489
  ]
3329
3490
  }
3330
3491
  ),
3331
- se && /* @__PURE__ */ o("div", { className: "flex items-center gap-1 mt-1.5 mr-0.5", children: [
3492
+ me && /* @__PURE__ */ l("div", { className: "flex items-center gap-1 mt-1.5 mr-0.5", children: [
3332
3493
  /* @__PURE__ */ e("div", { className: "rounded-full", style: { width: 14, height: 14, background: "#ffffff" }, children: /* @__PURE__ */ e(
3333
3494
  "img",
3334
3495
  {
3335
- src: it(se, G),
3336
- alt: se,
3496
+ src: ut(me, B),
3497
+ alt: me,
3337
3498
  width: 14,
3338
3499
  height: 14,
3339
3500
  className: "rounded-full",
3340
3501
  style: { width: 14, height: 14 }
3341
3502
  }
3342
3503
  ) }),
3343
- /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: vt })
3504
+ /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: Rt })
3344
3505
  ] })
3345
- ] }) : /* @__PURE__ */ o(
3506
+ ] }) : /* @__PURE__ */ l(
3346
3507
  "button",
3347
3508
  {
3348
- onClick: () => H("fiat"),
3509
+ onClick: () => O("fiat"),
3349
3510
  className: "flex items-center gap-1.5 shrink-0 transition-colors",
3350
3511
  style: {
3351
3512
  background: "var(--t-pill-bg)",
@@ -3354,11 +3515,11 @@ function rn({
3354
3515
  paddingLeft: 10,
3355
3516
  paddingRight: 10
3356
3517
  },
3357
- disabled: !!((Tt = M == null ? void 0 : M.sourceCurrency) != null && Tt.locked),
3518
+ disabled: !!((Mt = D == null ? void 0 : D.sourceCurrency) != null && Mt.locked),
3358
3519
  children: [
3359
- /* @__PURE__ */ e(ct, { currencyCode: W, size: 16, baseUrl: G }),
3360
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: We }, children: W }),
3361
- /* @__PURE__ */ e(He, {})
3520
+ /* @__PURE__ */ e(ft, { currencyCode: X, size: 16, baseUrl: B }),
3521
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: Qe }, children: X }),
3522
+ /* @__PURE__ */ e(_e, {})
3362
3523
  ]
3363
3524
  }
3364
3525
  )
@@ -3366,27 +3527,27 @@ function rn({
3366
3527
  ]
3367
3528
  }
3368
3529
  ),
3369
- Ie && z > 0 && (b == null ? void 0 : b.bestQuote) && /* @__PURE__ */ o(
3530
+ He && J > 0 && (w == null ? void 0 : w.bestQuote) && /* @__PURE__ */ l(
3370
3531
  "div",
3371
3532
  {
3372
3533
  className: "flex items-start gap-2 mt-[2px] px-[14px] py-[10px]",
3373
3534
  style: { background: "var(--t-surface)", fontSize: 12, color: "var(--t-text-secondary)", lineHeight: "16px" },
3374
3535
  children: [
3375
- /* @__PURE__ */ o("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", style: { flexShrink: 0, marginTop: 1 }, children: [
3536
+ /* @__PURE__ */ l("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", style: { flexShrink: 0, marginTop: 1 }, children: [
3376
3537
  /* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "7", stroke: "currentColor", strokeWidth: "1.5" }),
3377
3538
  /* @__PURE__ */ e("path", { d: "M8 7v4M8 5.5v-.01", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
3378
3539
  ] }),
3379
- /* @__PURE__ */ o("span", { children: [
3540
+ /* @__PURE__ */ l("span", { children: [
3380
3541
  "You will be charged for ",
3381
- ut,
3542
+ Ct,
3382
3543
  " ",
3383
- B,
3544
+ H,
3384
3545
  ", the rest up to ",
3385
- lt(z),
3546
+ mt(J),
3386
3547
  " ",
3387
- W,
3548
+ X,
3388
3549
  " will be credited to your ",
3389
- $,
3550
+ W,
3390
3551
  " account"
3391
3552
  ] })
3392
3553
  ]
@@ -3398,38 +3559,49 @@ function rn({
3398
3559
  className: "flex items-center justify-between mt-[2px] px-[18px] pt-[12px] pb-[14px]",
3399
3560
  style: {
3400
3561
  background: "var(--t-surface)",
3401
- ...(kt = i == null ? void 0 : i.paymentMethods) != null && kt.length ? {} : { borderBottomLeftRadius: 5, borderBottomRightRadius: 5 }
3562
+ ...!Y.length && !((It = c == null ? void 0 : c.paymentMethods) != null && It.length) ? { borderBottomLeftRadius: 5, borderBottomRightRadius: 5 } : {}
3402
3563
  },
3403
- children: /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: g ? "var(--t-success)" : "var(--t-text-secondary)" }, children: Jt || " " })
3564
+ children: /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: x ? "var(--t-success)" : "var(--t-text-secondary)" }, children: ra || " " })
3404
3565
  }
3405
3566
  ),
3406
- (i == null ? void 0 : i.paymentMethods) && i.paymentMethods.length > 0 && /* @__PURE__ */ e("div", { className: "mt-[2px]", children: /* @__PURE__ */ e(
3407
- Pa,
3567
+ (Y.length > 0 || (c == null ? void 0 : c.paymentMethods) && c.paymentMethods.length > 0) && /* @__PURE__ */ e("div", { className: "mt-[2px]", children: Y.length > 0 ? /* @__PURE__ */ e(
3568
+ Qa,
3408
3569
  {
3409
- methods: i.paymentMethods,
3410
- selectedId: y.paymentMethodId,
3411
- onOpenModal: () => H("payment"),
3412
- fiatCurrency: y.fiatCurrency
3570
+ methods: Y,
3571
+ selectedId: v.paymentMethodId,
3572
+ onOpenModal: () => O("payment"),
3573
+ fiatCurrency: v.fiatCurrency
3574
+ }
3575
+ ) : /* @__PURE__ */ e(
3576
+ "div",
3577
+ {
3578
+ className: "flex items-center justify-between px-[18px] pt-[12px] pb-[14px]",
3579
+ style: {
3580
+ background: "var(--t-surface)",
3581
+ borderBottomLeftRadius: 5,
3582
+ borderBottomRightRadius: 5
3583
+ },
3584
+ children: /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: "No payment methods for this pair" })
3413
3585
  }
3414
3586
  ) }),
3415
- /* @__PURE__ */ o("div", { className: "mt-8", children: [
3416
- /* @__PURE__ */ e("div", { className: "text-[13px] mb-2.5", style: { color: "var(--t-text-secondary)" }, children: F ? "Receiving wallet address" : "Sending wallet address" }),
3587
+ /* @__PURE__ */ l("div", { className: "mt-8", children: [
3588
+ /* @__PURE__ */ e("div", { className: "text-[13px] mb-2.5", style: { color: "var(--t-text-secondary)" }, children: T ? "Receiving wallet address" : "Sending wallet address" }),
3417
3589
  /* @__PURE__ */ e(
3418
3590
  "input",
3419
3591
  {
3420
3592
  type: "text",
3421
- value: y.walletAddress,
3422
- onChange: (x) => k({ type: "SET_WALLET_ADDRESS", address: x.target.value }),
3423
- onFocus: () => _e(!0),
3593
+ value: v.walletAddress,
3594
+ onChange: (g) => L({ type: "SET_WALLET_ADDRESS", address: g.target.value }),
3595
+ onFocus: () => Ge(!0),
3424
3596
  onBlur: () => {
3425
- _e(!1), Ke(!0);
3597
+ Ge(!1), je(!0);
3426
3598
  },
3427
- placeholder: F ? "Enter your receiving address" : "Enter your sending address",
3599
+ placeholder: T ? "Enter your receiving address" : "Enter your sending address",
3428
3600
  spellCheck: !1,
3429
3601
  autoComplete: "off",
3430
3602
  className: "w-full bg-transparent text-[13px] outline-none transition-colors",
3431
3603
  style: {
3432
- border: y.walletError || De && !tt ? "1px solid #EF4444" : ne ? "1px solid var(--t-border-focus)" : "1px solid var(--t-border)",
3604
+ border: v.walletError || Ie && !it ? "1px solid #EF4444" : ie ? "1px solid var(--t-border-focus)" : "1px solid var(--t-border)",
3433
3605
  outline: "none",
3434
3606
  boxShadow: "none",
3435
3607
  borderRadius: 3.5,
@@ -3439,242 +3611,238 @@ function rn({
3439
3611
  fontSize: 13,
3440
3612
  backgroundColor: "transparent"
3441
3613
  },
3442
- disabled: !!((Lt = M == null ? void 0 : M.destinationAddress) != null && Lt.locked)
3614
+ disabled: !!((Bt = D == null ? void 0 : D.destinationAddress) != null && Bt.locked)
3443
3615
  }
3444
3616
  ),
3445
- y.walletError ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: y.walletError }) : De && !tt && !ve ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: "Enter a valid wallet address" }) : ve && y.walletAddress.trim().length >= 10 ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "var(--t-text-muted)" }, children: "Validating address..." }) : null
3617
+ v.walletError ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: v.walletError }) : Ie && !it && !Se ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: "Enter a valid wallet address" }) : Se && v.walletAddress.trim().length >= 10 ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "var(--t-text-muted)" }, children: "Validating address..." }) : null
3446
3618
  ] }),
3447
3619
  /* @__PURE__ */ e("div", { className: "flex-1", style: { minHeight: 16 } }),
3620
+ oe && /* @__PURE__ */ l("div", { className: "text-[12px] text-center mb-2", style: { color: "#EF4444" }, children: [
3621
+ "This currency is not available for ",
3622
+ T ? "buy" : "sell",
3623
+ " orders"
3624
+ ] }),
3448
3625
  /* @__PURE__ */ e(
3449
3626
  "button",
3450
3627
  {
3451
- disabled: !$e || oe || ce,
3452
- onClick: la,
3628
+ disabled: !Ye || le || ue || oe,
3629
+ onClick: fa,
3453
3630
  className: "w-full font-semibold text-[16px] transition-all",
3454
3631
  style: {
3455
3632
  height: 60,
3456
3633
  borderRadius: 5,
3457
3634
  background: "var(--t-cta-bg)",
3458
3635
  color: "var(--t-cta-text)",
3459
- opacity: $e && !oe && !ce ? 1 : 0.4,
3460
- cursor: $e && !oe && !ce ? "pointer" : "not-allowed"
3636
+ opacity: Ye && !le && !ue && !oe ? 1 : 0.4,
3637
+ cursor: Ye && !le && !ue && !oe ? "pointer" : "not-allowed"
3461
3638
  },
3462
- children: ce ? "Getting best price..." : oe ? "Processing..." : F ? `Buy ${B}` : `Sell ${B}`
3639
+ children: ue ? "Getting best price..." : le ? "Processing..." : T ? `Buy ${H}` : `Sell ${H}`
3463
3640
  }
3464
3641
  ),
3465
3642
  /* @__PURE__ */ e("div", { className: "text-center py-3", children: /* @__PURE__ */ e("span", { className: "text-[11px]", style: { color: "var(--t-text-tertiary)" }, children: "Powered by NowRamp" }) })
3466
- ] }, D),
3467
- /* @__PURE__ */ e(Oe, { isOpen: ie === "fiat", onClose: () => H(null), children: (x) => {
3468
- var N;
3469
- return /* @__PURE__ */ e(
3470
- Za,
3471
- {
3472
- onClose: x,
3473
- onSelect: (T) => {
3474
- ta(T), x();
3475
- },
3476
- currencies: (N = i == null ? void 0 : i.fiats) == null ? void 0 : N.map((T) => ({ code: T.code, name: T.code })),
3477
- assetBaseUrl: G,
3478
- selectedCode: y.fiatCurrency
3479
- }
3480
- );
3481
- } }),
3482
- /* @__PURE__ */ e(Oe, { isOpen: ie === "crypto", onClose: () => H(null), children: (x) => {
3483
- var N;
3484
- return /* @__PURE__ */ e(
3485
- Qa,
3486
- {
3487
- onClose: x,
3488
- onSelect: (T, K) => {
3489
- aa(T, K), x();
3490
- },
3491
- cryptos: (N = i == null ? void 0 : i.cryptos) == null ? void 0 : N.map((T) => {
3492
- var K;
3493
- return {
3494
- code: T.code,
3495
- name: T.code,
3496
- networks: (K = T.networks) == null ? void 0 : K.map((re) => ({ code: re.id, name: re.name }))
3497
- };
3498
- }),
3499
- assetBaseUrl: G,
3500
- selectedCode: y.cryptoCurrency,
3501
- selectedChain: y.network
3502
- }
3503
- );
3504
- } }),
3505
- /* @__PURE__ */ e(Oe, { isOpen: ie === "payment", onClose: () => H(null), children: (x) => {
3506
- var N;
3507
- return /* @__PURE__ */ e(
3508
- za,
3509
- {
3510
- methods: ((N = i == null ? void 0 : i.paymentMethods) == null ? void 0 : N.filter((T) => T.supportedFiats.includes(y.fiatCurrency))) || [],
3511
- selectedId: y.paymentMethodId,
3512
- onSelect: (T) => {
3513
- na(T), x();
3514
- },
3515
- onClose: x
3516
- }
3517
- );
3518
- } }),
3519
- /* @__PURE__ */ e(Oe, { isOpen: ie === "settings", onClose: () => H(null), children: (x) => /* @__PURE__ */ e(
3520
- en,
3643
+ ] }, M),
3644
+ /* @__PURE__ */ e(Ke, { isOpen: se === "fiat", onClose: () => O(null), children: (g) => /* @__PURE__ */ e(
3645
+ ln,
3646
+ {
3647
+ onClose: g,
3648
+ onSelect: (b) => {
3649
+ la(b), g();
3650
+ },
3651
+ currencies: ce.map((b) => ({ code: b.code, name: b.code })),
3652
+ assetBaseUrl: B,
3653
+ selectedCode: v.fiatCurrency
3654
+ }
3655
+ ) }),
3656
+ /* @__PURE__ */ e(Ke, { isOpen: se === "crypto", onClose: () => O(null), children: (g) => /* @__PURE__ */ e(
3657
+ cn,
3521
3658
  {
3522
- onClose: x,
3523
- darkMode: X,
3524
- onToggleDarkMode: fe,
3525
- skinId: he,
3526
- onSelectSkin: (N) => {
3527
- Le(N);
3659
+ onClose: g,
3660
+ onSelect: (b, K) => {
3661
+ ca(b, K), g();
3528
3662
  },
3529
- showThemeToggle: R,
3530
- country: y.country,
3531
- countryName: ia,
3532
- onLocationPress: oa,
3533
- assetBaseUrl: G
3663
+ cryptos: De.map((b) => {
3664
+ var K;
3665
+ return {
3666
+ code: b.code,
3667
+ name: b.code,
3668
+ networks: (K = b.networks) == null ? void 0 : K.map((G) => ({ code: G.id, name: G.name }))
3669
+ };
3670
+ }),
3671
+ assetBaseUrl: B,
3672
+ selectedCode: v.cryptoCurrency,
3673
+ selectedChain: v.network
3534
3674
  }
3535
3675
  ) }),
3536
- /* @__PURE__ */ e(Oe, { isOpen: ie === "country", onClose: () => H(null), children: (x) => /* @__PURE__ */ e(
3537
- an,
3676
+ /* @__PURE__ */ e(Ke, { isOpen: se === "payment", onClose: () => O(null), children: (g) => /* @__PURE__ */ e(
3677
+ sn,
3538
3678
  {
3539
- onClose: x,
3540
- onSelect: (N) => {
3541
- ra(N), x();
3679
+ methods: Y,
3680
+ selectedId: v.paymentMethodId,
3681
+ onSelect: (b) => {
3682
+ sa(b), g();
3542
3683
  },
3543
- assetBaseUrl: G,
3544
- selectedCode: y.country
3684
+ onClose: g
3685
+ }
3686
+ ) }),
3687
+ /* @__PURE__ */ e(Ke, { isOpen: se === "settings", onClose: () => O(null), children: (g) => /* @__PURE__ */ e(
3688
+ mn,
3689
+ {
3690
+ onClose: g,
3691
+ darkMode: z,
3692
+ onToggleDarkMode: Ee,
3693
+ skinId: Ae,
3694
+ onSelectSkin: (b) => {
3695
+ at(b);
3696
+ },
3697
+ showThemeToggle: k,
3698
+ country: v.country,
3699
+ countryName: ma,
3700
+ onLocationPress: ua,
3701
+ assetBaseUrl: B
3702
+ }
3703
+ ) }),
3704
+ /* @__PURE__ */ e(Ke, { isOpen: se === "country", onClose: () => O(null), children: (g) => /* @__PURE__ */ e(
3705
+ hn,
3706
+ {
3707
+ onClose: g,
3708
+ onSelect: (b) => {
3709
+ da(b), g();
3710
+ },
3711
+ assetBaseUrl: B,
3712
+ selectedCode: v.country
3545
3713
  }
3546
3714
  ) })
3547
3715
  ]
3548
3716
  }
3549
3717
  );
3550
3718
  }
3551
- function on({
3719
+ function Cn({
3552
3720
  projectId: t,
3553
3721
  apiUrl: a,
3554
3722
  assetBaseUrl: n,
3555
3723
  flowType: r,
3556
- customerId: l,
3557
- brandId: c,
3558
- defaultFiatCurrency: m,
3559
- defaultCryptoCurrency: s,
3560
- defaultNetwork: u,
3561
- defaultFiatAmount: f,
3724
+ customerId: o,
3725
+ brandId: d,
3726
+ defaultFiatCurrency: u,
3727
+ defaultCryptoCurrency: i,
3728
+ defaultNetwork: s,
3729
+ defaultFiatAmount: m,
3562
3730
  defaultCryptoAmount: h,
3563
- defaultWalletAddress: d,
3731
+ defaultWalletAddress: f,
3564
3732
  defaultGateway: p,
3565
- defaultCountry: g,
3566
- fieldLocks: A,
3733
+ defaultCountry: x,
3734
+ fieldLocks: C,
3567
3735
  statusPollInterval: E,
3568
- onComplete: R,
3736
+ onComplete: k,
3569
3737
  onError: _,
3570
- className: ae,
3738
+ className: re,
3571
3739
  theme: j,
3572
3740
  skinId: Q,
3573
- accentColor: q,
3574
- bgColor: $,
3575
- bgImage: xe,
3576
- borderColor: y,
3577
- borderRadius: k,
3578
- surfaceColor: i,
3579
- inputBgColor: I,
3580
- textColor: b,
3741
+ accentColor: ee,
3742
+ bgColor: W,
3743
+ bgImage: ge,
3744
+ borderColor: v,
3745
+ borderRadius: L,
3746
+ surfaceColor: c,
3747
+ inputBgColor: U,
3748
+ textColor: w,
3581
3749
  textSecondaryColor: S,
3582
- textMutedColor: ge,
3583
- successColor: Ce,
3584
- showFlowToggle: Se,
3585
- showSettings: oe,
3586
- showThemeToggle: me,
3587
- autoRedirect: M,
3588
- explorerUrl: ee,
3589
- doneButtonText: G,
3590
- supportEmail: X,
3591
- stablecoinParity: fe,
3592
- partnerName: he,
3593
- onDone: Le
3750
+ textMutedColor: te,
3751
+ successColor: xe,
3752
+ showFlowToggle: ve,
3753
+ showSettings: le,
3754
+ showThemeToggle: he,
3755
+ autoRedirect: D,
3756
+ explorerUrl: ae,
3757
+ doneButtonText: B,
3758
+ supportEmail: ce,
3759
+ stablecoinParity: De,
3760
+ partnerName: Y,
3761
+ onDone: oe
3594
3762
  }) {
3595
3763
  return /* @__PURE__ */ e(
3596
- Ca,
3764
+ La,
3597
3765
  {
3598
3766
  projectId: t,
3599
3767
  apiUrl: a,
3600
3768
  assetBaseUrl: n,
3601
3769
  flowType: r,
3602
- customerId: l,
3603
- brandId: c,
3604
- defaultFiatCurrency: m,
3605
- defaultCryptoCurrency: s,
3606
- defaultNetwork: u,
3607
- defaultFiatAmount: f,
3770
+ customerId: o,
3771
+ brandId: d,
3772
+ defaultFiatCurrency: u,
3773
+ defaultCryptoCurrency: i,
3774
+ defaultNetwork: s,
3775
+ defaultFiatAmount: m,
3608
3776
  defaultCryptoAmount: h,
3609
- defaultWalletAddress: d,
3777
+ defaultWalletAddress: f,
3610
3778
  defaultGateway: p,
3611
- defaultCountry: g,
3612
- fieldLocks: A,
3779
+ defaultCountry: x,
3780
+ fieldLocks: C,
3613
3781
  statusPollInterval: E,
3614
- onComplete: R,
3782
+ onComplete: k,
3615
3783
  onError: _,
3616
3784
  children: /* @__PURE__ */ e(
3617
- rn,
3785
+ yn,
3618
3786
  {
3619
- className: ae,
3787
+ className: re,
3620
3788
  theme: j,
3621
3789
  skinId: Q,
3622
- accentColor: q,
3623
- bgColor: $,
3624
- bgImage: xe,
3625
- borderColor: y,
3626
- borderRadius: k,
3627
- surfaceColor: i,
3628
- inputBgColor: I,
3629
- textColor: b,
3790
+ accentColor: ee,
3791
+ bgColor: W,
3792
+ bgImage: ge,
3793
+ borderColor: v,
3794
+ borderRadius: L,
3795
+ surfaceColor: c,
3796
+ inputBgColor: U,
3797
+ textColor: w,
3630
3798
  textSecondaryColor: S,
3631
- textMutedColor: ge,
3632
- successColor: Ce,
3633
- showFlowToggle: Se,
3634
- showSettings: oe,
3635
- showThemeToggle: me,
3636
- autoRedirect: M,
3637
- explorerUrl: ee,
3638
- doneButtonText: G,
3639
- supportEmail: X,
3640
- stablecoinParity: fe,
3641
- partnerName: he,
3642
- onDone: Le
3799
+ textMutedColor: te,
3800
+ successColor: xe,
3801
+ showFlowToggle: ve,
3802
+ showSettings: le,
3803
+ showThemeToggle: he,
3804
+ autoRedirect: D,
3805
+ explorerUrl: ae,
3806
+ doneButtonText: B,
3807
+ supportEmail: ce,
3808
+ stablecoinParity: De,
3809
+ partnerName: Y,
3810
+ onDone: oe
3643
3811
  }
3644
3812
  )
3645
3813
  }
3646
3814
  );
3647
3815
  }
3648
- function yn({
3816
+ function Rn({
3649
3817
  submitButtonText: t,
3650
3818
  rateRefreshInterval: a,
3651
3819
  ...n
3652
3820
  }) {
3653
- return /* @__PURE__ */ e(on, { ...n });
3821
+ return /* @__PURE__ */ e(Cn, { ...n });
3654
3822
  }
3655
- function xn({
3823
+ function kn({
3656
3824
  skin: t,
3657
3825
  active: a,
3658
3826
  onClick: n,
3659
3827
  darkMode: r,
3660
- dimmed: l
3828
+ dimmed: o
3661
3829
  }) {
3662
- const c = t.accent === null, m = 32;
3663
- return /* @__PURE__ */ o(
3830
+ const d = t.accent === null, u = 32;
3831
+ return /* @__PURE__ */ l(
3664
3832
  "button",
3665
3833
  {
3666
3834
  onClick: n,
3667
3835
  className: "relative shrink-0",
3668
- style: { width: m, height: m, opacity: l ? 0.4 : 1, transition: "opacity 0.2s" },
3836
+ style: { width: u, height: u, opacity: o ? 0.4 : 1, transition: "opacity 0.2s" },
3669
3837
  children: [
3670
- c ? /* @__PURE__ */ o("svg", { width: m, height: m, viewBox: "0 0 32 32", children: [
3838
+ d ? /* @__PURE__ */ l("svg", { width: u, height: u, viewBox: "0 0 32 32", children: [
3671
3839
  /* @__PURE__ */ e("clipPath", { id: "mono-left", children: /* @__PURE__ */ e("rect", { x: "0", y: "0", width: "16", height: "32" }) }),
3672
3840
  /* @__PURE__ */ e("clipPath", { id: "mono-right", children: /* @__PURE__ */ e("rect", { x: "16", y: "0", width: "16", height: "32" }) }),
3673
3841
  /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "15", fill: "#111111", clipPath: "url(#mono-left)" }),
3674
3842
  /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "15", fill: "#ffffff", clipPath: "url(#mono-right)" }),
3675
3843
  /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "15", fill: "none", stroke: r ? "rgba(255,255,255,0.15)" : "rgba(0,0,0,0.1)", strokeWidth: "1" })
3676
- ] }) : /* @__PURE__ */ e("svg", { width: m, height: m, viewBox: "0 0 32 32", children: /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "15", fill: t.accent }) }),
3677
- a && !l && /* @__PURE__ */ e(
3844
+ ] }) : /* @__PURE__ */ e("svg", { width: u, height: u, viewBox: "0 0 32 32", children: /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "15", fill: t.accent }) }),
3845
+ a && !o && /* @__PURE__ */ e(
3678
3846
  "div",
3679
3847
  {
3680
3848
  className: "absolute inset-0 rounded-full",
@@ -3685,13 +3853,13 @@ function xn({
3685
3853
  }
3686
3854
  );
3687
3855
  }
3688
- function ln({ quote: t }) {
3689
- return t.isBestRate ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Best price" }) : t.isRecommended ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Recommended" }) : t.rank && t.rank <= 3 ? /* @__PURE__ */ o("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: [
3856
+ function gn({ quote: t }) {
3857
+ return t.isBestRate ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Best price" }) : t.isRecommended ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Recommended" }) : t.rank && t.rank <= 3 ? /* @__PURE__ */ l("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: [
3690
3858
  "#",
3691
3859
  t.rank
3692
3860
  ] }) : null;
3693
3861
  }
3694
- function cn({ quote: t }) {
3862
+ function xn({ quote: t }) {
3695
3863
  return t.gatewayLogo ? /* @__PURE__ */ e(
3696
3864
  "img",
3697
3865
  {
@@ -3702,10 +3870,10 @@ function cn({ quote: t }) {
3702
3870
  className: "rounded-full shrink-0",
3703
3871
  style: { width: 36, height: 36 }
3704
3872
  }
3705
- ) : /* @__PURE__ */ e(dt, { size: 36 });
3873
+ ) : /* @__PURE__ */ e(yt, { size: 36 });
3706
3874
  }
3707
- function sn() {
3708
- return /* @__PURE__ */ e("div", { className: "space-y-2", children: [0, 1, 2].map((t) => /* @__PURE__ */ o(
3875
+ function vn() {
3876
+ return /* @__PURE__ */ e("div", { className: "space-y-2", children: [0, 1, 2].map((t) => /* @__PURE__ */ l(
3709
3877
  "div",
3710
3878
  {
3711
3879
  className: "w-full flex items-center gap-3.5",
@@ -3718,11 +3886,11 @@ function sn() {
3718
3886
  },
3719
3887
  children: [
3720
3888
  /* @__PURE__ */ e(V, { w: 36, h: 36, className: "rounded-full shrink-0" }),
3721
- /* @__PURE__ */ o("div", { className: "flex-1", children: [
3889
+ /* @__PURE__ */ l("div", { className: "flex-1", children: [
3722
3890
  /* @__PURE__ */ e(V, { w: 90, h: 14, className: "mb-1.5" }),
3723
3891
  /* @__PURE__ */ e(V, { w: 60, h: 12 })
3724
3892
  ] }),
3725
- /* @__PURE__ */ o("div", { className: "text-right", children: [
3893
+ /* @__PURE__ */ l("div", { className: "text-right", children: [
3726
3894
  /* @__PURE__ */ e(V, { w: 40, h: 10, className: "mb-1.5" }),
3727
3895
  /* @__PURE__ */ e(V, { w: 80, h: 14 })
3728
3896
  ] })
@@ -3731,20 +3899,20 @@ function sn() {
3731
3899
  t
3732
3900
  )) });
3733
3901
  }
3734
- function gn({
3902
+ function Tn({
3735
3903
  onClose: t,
3736
3904
  onSelect: a,
3737
3905
  quotes: n,
3738
3906
  quotesLoading: r,
3739
- cryptoCurrency: l
3907
+ cryptoCurrency: o
3740
3908
  }) {
3741
- const [c, m] = v(""), s = Z(() => {
3909
+ const [d, u] = N(""), i = $(() => {
3742
3910
  if (!(n != null && n.quotes)) return [];
3743
- const u = c.trim().toLowerCase();
3744
- return u ? n.quotes.filter((f) => f.gatewayName.toLowerCase().includes(u)) : n.quotes;
3745
- }, [n, c]);
3746
- return /* @__PURE__ */ o(J, { children: [
3747
- /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(ke, { onClick: t }) }),
3911
+ const s = d.trim().toLowerCase();
3912
+ return s ? n.quotes.filter((m) => m.gatewayName.toLowerCase().includes(s)) : n.quotes;
3913
+ }, [n, d]);
3914
+ return /* @__PURE__ */ l(q, { children: [
3915
+ /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Fe, { onClick: t }) }),
3748
3916
  /* @__PURE__ */ e(
3749
3917
  "h2",
3750
3918
  {
@@ -3753,14 +3921,14 @@ function gn({
3753
3921
  children: "Choose Ramp"
3754
3922
  }
3755
3923
  ),
3756
- /* @__PURE__ */ e(Pe, { value: c, onChange: m }),
3757
- /* @__PURE__ */ o("div", { className: "flex-1 overflow-y-auto custom-scroll px-5 space-y-2", children: [
3758
- r ? /* @__PURE__ */ e(sn, {}) : s.length === 0 ? /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: n && n.quotes.length === 0 ? "No quotes available for this request" : "No providers found" }) : s.map((u, f) => {
3759
- const h = f === 0, d = parseFloat(u.cryptoAmount), p = d >= 1 ? d.toFixed(4) : d.toPrecision(6);
3760
- return /* @__PURE__ */ o(
3924
+ /* @__PURE__ */ e(Ve, { value: d, onChange: u }),
3925
+ /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-5 space-y-2", children: [
3926
+ r ? /* @__PURE__ */ e(vn, {}) : i.length === 0 ? /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: n && n.quotes.length === 0 ? "No quotes available for this request" : "No providers found" }) : i.map((s, m) => {
3927
+ const h = m === 0, f = parseFloat(s.cryptoAmount), p = f >= 1 ? f.toFixed(4) : f.toPrecision(6);
3928
+ return /* @__PURE__ */ l(
3761
3929
  "button",
3762
3930
  {
3763
- onClick: () => a(u),
3931
+ onClick: () => a(s),
3764
3932
  className: "w-full flex items-center gap-3.5 transition-colors",
3765
3933
  style: {
3766
3934
  borderRadius: h ? 4.5 : 5,
@@ -3771,99 +3939,99 @@ function gn({
3771
3939
  background: h ? "transparent" : "var(--t-surface)"
3772
3940
  },
3773
3941
  children: [
3774
- /* @__PURE__ */ e(cn, { quote: u }),
3775
- /* @__PURE__ */ o("div", { className: "text-left flex-1 min-w-0", children: [
3776
- /* @__PURE__ */ e("div", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: u.gatewayName }),
3777
- /* @__PURE__ */ e(ln, { quote: u })
3942
+ /* @__PURE__ */ e(xn, { quote: s }),
3943
+ /* @__PURE__ */ l("div", { className: "text-left flex-1 min-w-0", children: [
3944
+ /* @__PURE__ */ e("div", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: s.gatewayName }),
3945
+ /* @__PURE__ */ e(gn, { quote: s })
3778
3946
  ] }),
3779
- /* @__PURE__ */ o("div", { className: "text-right shrink-0", children: [
3947
+ /* @__PURE__ */ l("div", { className: "text-right shrink-0", children: [
3780
3948
  /* @__PURE__ */ e("div", { className: "text-[11px]", style: { color: "var(--t-text-secondary)" }, children: "You get" }),
3781
- /* @__PURE__ */ o("div", { className: "font-medium text-[14px]", style: { color: "var(--t-text)" }, children: [
3782
- l,
3949
+ /* @__PURE__ */ l("div", { className: "font-medium text-[14px]", style: { color: "var(--t-text)" }, children: [
3950
+ o,
3783
3951
  " ",
3784
3952
  p
3785
3953
  ] })
3786
3954
  ] })
3787
3955
  ]
3788
3956
  },
3789
- u.gatewayId
3957
+ s.gatewayId
3790
3958
  );
3791
3959
  }),
3792
- !r && (n == null ? void 0 : n.unavailableGateways) && n.unavailableGateways.length > 0 && /* @__PURE__ */ e("div", { className: "pt-3", children: n.unavailableGateways.map((u) => /* @__PURE__ */ o(
3960
+ !r && (n == null ? void 0 : n.unavailableGateways) && n.unavailableGateways.length > 0 && /* @__PURE__ */ e("div", { className: "pt-3", children: n.unavailableGateways.map((s) => /* @__PURE__ */ l(
3793
3961
  "div",
3794
3962
  {
3795
3963
  className: "flex items-center justify-between py-2 text-[12px]",
3796
3964
  style: { color: "var(--t-text-muted)" },
3797
3965
  children: [
3798
- /* @__PURE__ */ e("span", { children: u.gatewayName }),
3799
- /* @__PURE__ */ e("span", { children: u.reason })
3966
+ /* @__PURE__ */ e("span", { children: s.gatewayName }),
3967
+ /* @__PURE__ */ e("span", { children: s.reason })
3800
3968
  ]
3801
3969
  },
3802
- u.gatewayId
3970
+ s.gatewayId
3803
3971
  )) })
3804
3972
  ] })
3805
3973
  ] });
3806
3974
  }
3807
3975
  export {
3808
- Xa as AnimatedDigit,
3809
- Wa as AnimatedNumber,
3810
- Ta as ApplePayIcon,
3811
- Be as BLOCKCHAINS,
3812
- Aa as BankIcon,
3813
- Ze as COUNTRIES,
3814
- st as COUNTRY_MAP,
3815
- wa as CRYPTO_CHAIN_COMBOS,
3816
- Gt as CRYPTO_CURRENCIES,
3817
- Fa as CardIcon,
3818
- yn as CheckoutForm,
3819
- Ka as CheckoutStep,
3820
- He as ChevronDown,
3821
- Pt as ChevronRight,
3822
- gn as ChooseRampModal,
3823
- ke as CloseButton,
3824
- pn as CoinifyIcon,
3825
- ja as CompleteStep,
3826
- $a as ConfirmStep,
3827
- an as CountryPickerModal,
3828
- Qa as CryptoCurrencyModal,
3829
- Ht as CryptoIcon,
3830
- Ia as DarkModeIcon,
3831
- Ga as ErrorStep,
3832
- Ft as FIAT_CURRENCIES,
3833
- va as FIAT_TO_COUNTRY,
3834
- Za as FiatCurrencyModal,
3835
- ct as FiatFlag,
3836
- Ya as FormSkeleton,
3837
- dt as GenericCoinIcon,
3838
- ka as GooglePayIcon,
3839
- It as MOCK_RATES,
3840
- Ma as MenuIcon,
3841
- Oe as Modal,
3842
- La as PayPalIcon,
3843
- Pa as PaymentMethodSelector,
3844
- Va as ProcessingStep,
3845
- on as RampForm,
3846
- Ca as RampProvider,
3847
- Ra as RevolutIcon,
3848
- Mt as SKINS,
3849
- Pe as SearchInput,
3850
- en as SettingsScreen,
3976
+ nn as AnimatedDigit,
3977
+ rn as AnimatedNumber,
3978
+ Pa as ApplePayIcon,
3979
+ Pe as BLOCKCHAINS,
3980
+ Oa as BankIcon,
3981
+ Je as COUNTRIES,
3982
+ ht as COUNTRY_MAP,
3983
+ Ba as CRYPTO_CHAIN_COMBOS,
3984
+ Qt as CRYPTO_CURRENCIES,
3985
+ Ga as CardIcon,
3986
+ Rn as CheckoutForm,
3987
+ za as CheckoutStep,
3988
+ _e as ChevronDown,
3989
+ $t as ChevronRight,
3990
+ Tn as ChooseRampModal,
3991
+ Fe as CloseButton,
3992
+ An as CoinifyIcon,
3993
+ en as CompleteStep,
3994
+ an as ConfirmStep,
3995
+ hn as CountryPickerModal,
3996
+ cn as CryptoCurrencyModal,
3997
+ Gt as CryptoIcon,
3998
+ Wa as DarkModeIcon,
3999
+ tn as ErrorStep,
4000
+ Pt as FIAT_CURRENCIES,
4001
+ Fa as FIAT_TO_COUNTRY,
4002
+ ln as FiatCurrencyModal,
4003
+ ft as FiatFlag,
4004
+ on as FormSkeleton,
4005
+ yt as GenericCoinIcon,
4006
+ Ka as GooglePayIcon,
4007
+ _t as MOCK_RATES,
4008
+ $a as MenuIcon,
4009
+ Ke as Modal,
4010
+ _a as PayPalIcon,
4011
+ Qa as PaymentMethodSelector,
4012
+ qa as ProcessingStep,
4013
+ Cn as RampForm,
4014
+ La as RampProvider,
4015
+ Ha as RevolutIcon,
4016
+ Kt as SKINS,
4017
+ Ve as SearchInput,
4018
+ mn as SettingsScreen,
3851
4019
  V as Skeleton,
3852
- xn as SkinSwatch,
3853
- Ja as ToggleSwitch,
3854
- lt as formatOutput,
3855
- it as getChainIconUrl,
3856
- $t as getCryptoIconUrl,
3857
- ot as getDefaultFiatForCountry,
3858
- ba as getFiatFlagUrl,
3859
- hn as getMockRate,
3860
- Ba as getPaymentIcon,
3861
- Xt as isStablecoin,
3862
- Ea as parseAmount,
3863
- ya as useCheckoutIntent,
3864
- pa as useQuotes,
3865
- Te as useRamp,
3866
- ha as useRampConfig,
3867
- xa as useTransaction
4020
+ kn as SkinSwatch,
4021
+ dn as ToggleSwitch,
4022
+ mt as formatOutput,
4023
+ ut as getChainIconUrl,
4024
+ zt as getCryptoIconUrl,
4025
+ dt as getDefaultFiatForCountry,
4026
+ Da as getFiatFlagUrl,
4027
+ En as getMockRate,
4028
+ Xa as getPaymentIcon,
4029
+ Jt as isStablecoin,
4030
+ Ia as parseAmount,
4031
+ ba as useCheckoutIntent,
4032
+ Sa as useQuotes,
4033
+ Ue as useRamp,
4034
+ va as useRampConfig,
4035
+ Na as useTransaction
3868
4036
  };
3869
4037
  //# sourceMappingURL=index.js.map