@miden-npm/react 2.1.7 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +727 -373
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +3 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +727 -373
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -575,88 +575,30 @@ var validateGroup = (values, rulesMap, prettyLabels) => {
|
|
|
575
575
|
};
|
|
576
576
|
|
|
577
577
|
// src/utils/card-scheme.util.ts
|
|
578
|
-
var CardSchemes = /* @__PURE__ */ ((CardSchemes2) => {
|
|
579
|
-
CardSchemes2[CardSchemes2["Visa"] = 1] = "Visa";
|
|
580
|
-
CardSchemes2[CardSchemes2["MasterCard"] = 2] = "MasterCard";
|
|
581
|
-
CardSchemes2[CardSchemes2["Verve"] = 3] = "Verve";
|
|
582
|
-
CardSchemes2[CardSchemes2["MastercardAndVisa"] = 4] = "MastercardAndVisa";
|
|
583
|
-
CardSchemes2[CardSchemes2["AmericanExpress"] = 5] = "AmericanExpress";
|
|
584
|
-
CardSchemes2[CardSchemes2["Discover"] = 6] = "Discover";
|
|
585
|
-
CardSchemes2[CardSchemes2["JCB"] = 7] = "JCB";
|
|
586
|
-
CardSchemes2[CardSchemes2["DinersClub"] = 8] = "DinersClub";
|
|
587
|
-
CardSchemes2[CardSchemes2["Maestro"] = 9] = "Maestro";
|
|
588
|
-
CardSchemes2[CardSchemes2["UnionPay"] = 10] = "UnionPay";
|
|
589
|
-
CardSchemes2[CardSchemes2["UnionPay3DS"] = 11] = "UnionPay3DS";
|
|
590
|
-
CardSchemes2[CardSchemes2["UnionPayNon3DS"] = 12] = "UnionPayNon3DS";
|
|
591
|
-
CardSchemes2[CardSchemes2["UATP"] = 13] = "UATP";
|
|
592
|
-
CardSchemes2[CardSchemes2["PayPak"] = 14] = "PayPak";
|
|
593
|
-
CardSchemes2[CardSchemes2["Jaywan"] = 15] = "Jaywan";
|
|
594
|
-
CardSchemes2[CardSchemes2["Mada"] = 16] = "Mada";
|
|
595
|
-
CardSchemes2[CardSchemes2["MadaVisa"] = 17] = "MadaVisa";
|
|
596
|
-
CardSchemes2[CardSchemes2["MadaMastercard"] = 18] = "MadaMastercard";
|
|
597
|
-
CardSchemes2[CardSchemes2["Unknown"] = 19] = "Unknown";
|
|
598
|
-
return CardSchemes2;
|
|
599
|
-
})(CardSchemes || {});
|
|
600
|
-
var VISA_RE = /^4\d{12}(\d{3}){0,2}$/;
|
|
601
|
-
var MC_RE = /^(?:5[1-5]\d{14}|2(?:2(?:2[1-9]|[3-9]\d)|[3-6]\d{2}|7(?:[01]\d|20))\d{12})(?:\d{0,3})?$/;
|
|
602
|
-
var AMEX_RE = /^(34|37)\d{13}$/;
|
|
603
|
-
var DISCOVER_RE = /^(?:6011|65|64[4-9]|622(?:12[6-9]|1[3-9]\d|[2-8]\d{2}|9(?:0\d|1\d|2[0-5])))\d{12,15}$/;
|
|
604
|
-
var JCB_RE = /^(?:35(?:2[8-9]|[3-8]\d))\d{12,15}$/;
|
|
605
|
-
var DINERS_RE = /^(?:3(?:0[0-5]\d|095|6\d|[89]\d))\d{11,13}$/;
|
|
606
|
-
var MAESTRO_RE = /^(?:50|5[6-9]|6[0-9])\d{10,17}$/;
|
|
607
|
-
var UNIONPAY_RE = /^62\d{14,17}$/;
|
|
608
|
-
var UATP_RE = /^1\d{14}$/;
|
|
609
|
-
var VERVE_BIN6_RANGES = [
|
|
610
|
-
[506099, 506198],
|
|
611
|
-
[650002, 650027]
|
|
612
|
-
];
|
|
613
|
-
var VERVE_BIN6_SINGLES = /* @__PURE__ */ new Set([507865, 507866]);
|
|
614
|
-
var PAYPAK_BIN6 = /* @__PURE__ */ new Set([220545, 220543]);
|
|
615
|
-
var JAYWAN_BIN7 = /* @__PURE__ */ new Set([6690109]);
|
|
616
|
-
var MADA_ONLY_BIN6 = /* @__PURE__ */ new Set([968209, 873646]);
|
|
617
|
-
var MADA_VISA_BIN6 = /* @__PURE__ */ new Set([422818, 486094]);
|
|
618
|
-
var MADA_MC_BIN6 = /* @__PURE__ */ new Set([529741, 543357]);
|
|
619
|
-
var UNIONPAY_3DS_BIN6 = /* @__PURE__ */ new Set([620108]);
|
|
620
|
-
var UNIONPAY_NON3DS_BIN6 = /* @__PURE__ */ new Set([621423]);
|
|
621
578
|
function cardTypeHandler(cardNumber) {
|
|
622
|
-
const
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
function detect(cardNumber) {
|
|
626
|
-
if (!cardNumber || !cardNumber.trim()) return 19 /* Unknown */;
|
|
627
|
-
const digits = cardNumber.replace(/\D/g, "");
|
|
628
|
-
if (digits.length < 12 || digits.length > 19) return 19 /* Unknown */;
|
|
629
|
-
if (digits.length >= 6) {
|
|
630
|
-
const bin6 = parseInt(digits.slice(0, 6), 10);
|
|
631
|
-
if (MADA_ONLY_BIN6.has(bin6) && digits.length >= 16 && digits.length <= 19)
|
|
632
|
-
return 16 /* Mada */;
|
|
633
|
-
if (MADA_VISA_BIN6.has(bin6) && VISA_RE.test(digits)) return 17 /* MadaVisa */;
|
|
634
|
-
if (MADA_MC_BIN6.has(bin6) && MC_RE.test(digits)) return 18 /* MadaMastercard */;
|
|
635
|
-
if (PAYPAK_BIN6.has(bin6) && digits.length === 16) return 14 /* PayPak */;
|
|
636
|
-
if (UNIONPAY_3DS_BIN6.has(bin6) && UNIONPAY_RE.test(digits)) return 11 /* UnionPay3DS */;
|
|
637
|
-
if (UNIONPAY_NON3DS_BIN6.has(bin6) && UNIONPAY_RE.test(digits))
|
|
638
|
-
return 12 /* UnionPayNon3DS */;
|
|
639
|
-
if (isVerve(bin6, digits.length)) return 3 /* Verve */;
|
|
579
|
+
const cleanNumber = cardNumber.replace(/\s/g, "").replace(/\D/g, "");
|
|
580
|
+
if (/^4/.test(cleanNumber)) {
|
|
581
|
+
return "Visa";
|
|
640
582
|
}
|
|
641
|
-
if (
|
|
642
|
-
|
|
643
|
-
if (JAYWAN_BIN7.has(bin7) && digits.length === 16) return 15 /* Jaywan */;
|
|
583
|
+
if (/^5[1-5]/.test(cleanNumber) || /^2[2-7]/.test(cleanNumber)) {
|
|
584
|
+
return "MasterCard";
|
|
644
585
|
}
|
|
645
|
-
if (
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
if (
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
if (
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
if (
|
|
658
|
-
|
|
659
|
-
|
|
586
|
+
if (/^3[47]/.test(cleanNumber)) {
|
|
587
|
+
return "AmericanExpress";
|
|
588
|
+
}
|
|
589
|
+
if (/^6(?:011|5)/.test(cleanNumber)) {
|
|
590
|
+
return "Discover";
|
|
591
|
+
}
|
|
592
|
+
if (/^35/.test(cleanNumber)) {
|
|
593
|
+
return "JCB";
|
|
594
|
+
}
|
|
595
|
+
if (/^3[0689]/.test(cleanNumber)) {
|
|
596
|
+
return "DinersClub";
|
|
597
|
+
}
|
|
598
|
+
if (/^506/.test(cleanNumber)) {
|
|
599
|
+
return "Verve";
|
|
600
|
+
}
|
|
601
|
+
return "Unknown";
|
|
660
602
|
}
|
|
661
603
|
|
|
662
604
|
// src/apis/checkout.api.ts
|
|
@@ -710,7 +652,7 @@ async function validateCardPaymentOtp(environment, { merchantId, ...rest }, call
|
|
|
710
652
|
const baseUrl = getBaseUrl(environment, caller);
|
|
711
653
|
const apiKey = {
|
|
712
654
|
buzapay: "api/v1/checkout/card-payment/validate-otp",
|
|
713
|
-
miden: ""
|
|
655
|
+
miden: "api/v1/accrual/card/validate-otp"
|
|
714
656
|
};
|
|
715
657
|
const res = await fetch(`${baseUrl}/${apiKey[caller]}`, {
|
|
716
658
|
method: "POST",
|
|
@@ -731,7 +673,7 @@ async function resendCardPaymentOtp(environment, { merchantId, ...rest }, caller
|
|
|
731
673
|
const baseUrl = getBaseUrl(environment, caller);
|
|
732
674
|
const apiKey = {
|
|
733
675
|
buzapay: "api/v1/checkout/card-payment/resend-otp",
|
|
734
|
-
miden: ""
|
|
676
|
+
miden: "api/v1/accrual/card/resend-otp"
|
|
735
677
|
};
|
|
736
678
|
const res = await fetch(`${baseUrl}/${apiKey[caller]}`, {
|
|
737
679
|
method: "POST",
|
|
@@ -1602,8 +1544,403 @@ function IconQrCode({
|
|
|
1602
1544
|
);
|
|
1603
1545
|
}
|
|
1604
1546
|
|
|
1547
|
+
// src/components/icons/card-types/icon-amex.tsx
|
|
1548
|
+
import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1549
|
+
function IconAmex() {
|
|
1550
|
+
return /* @__PURE__ */ jsxs11(
|
|
1551
|
+
"svg",
|
|
1552
|
+
{
|
|
1553
|
+
width: "22",
|
|
1554
|
+
height: "22",
|
|
1555
|
+
viewBox: "0 -10.769 60 60",
|
|
1556
|
+
"enable-background": "new 0 0 780 500",
|
|
1557
|
+
version: "1.1",
|
|
1558
|
+
xmlSpace: "preserve",
|
|
1559
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1560
|
+
children: [
|
|
1561
|
+
/* @__PURE__ */ jsx20("path", { width: "780", height: "500", fill: "#2557D6", d: "M0 0h60v38.462H0z" }),
|
|
1562
|
+
/* @__PURE__ */ jsx20(
|
|
1563
|
+
"path",
|
|
1564
|
+
{
|
|
1565
|
+
d: "M0.019 18.13h2.88l0.649 -1.501h1.454l0.647 1.501h5.667v-1.147l0.506 1.153h2.942l0.506 -1.169v1.165h14.083l-0.006 -2.463h0.273c0.191 0.006 0.246 0.023 0.246 0.325v2.139h7.284v-0.574c0.588 0.301 1.502 0.574 2.704 0.574h3.064l0.656 -1.501h1.454l0.641 1.501h5.905v-1.425l0.894 1.425h4.732V8.706h-4.683v1.113l-0.655 -1.113h-4.806v1.113l-0.602 -1.113H39.965c-1.087 0 -2.042 0.145 -2.813 0.55v-0.55h-4.479v0.55c-0.491 -0.417 -1.16 -0.55 -1.904 -0.55H14.405l-1.098 2.434 -1.127 -2.434H7.022v1.113l-0.567 -1.113H2.061L0.019 13.187zm18.18 -1.359h-1.728l-0.006 -5.292 -2.444 5.292h-1.48l-2.45 -5.296v5.296h-3.429l-0.647 -1.507h-3.51l-0.654 1.507H0.019l3.018 -6.756h2.505l2.867 6.397V10.014h2.751l2.206 4.583 2.026 -4.583h2.807zm-12.761 -2.909 -1.154 -2.694 -1.147 2.694zm19.639 2.909H19.445V10.014h5.631v1.407h-3.946v1.218h3.851v1.385h-3.851v1.349h3.946zm7.936 -4.937a1.905 1.905 0 0 1 -1.188 1.801c0.369 0.135 0.684 0.372 0.834 0.569 0.238 0.336 0.279 0.636 0.279 1.24v1.327h-1.7l-0.006 -0.852c0 -0.406 0.041 -0.991 -0.266 -1.317 -0.246 -0.237 -0.622 -0.289 -1.228 -0.289h-1.81v2.458h-1.685V10.014h3.877c0.862 0 1.496 0.022 2.041 0.324 0.533 0.302 0.853 0.743 0.853 1.496m-2.131 1.003c-0.232 0.135 -0.505 0.139 -0.834 0.139H28v-1.501h2.075c0.293 0 0.601 0.013 0.799 0.122 0.218 0.099 0.354 0.308 0.354 0.598 0 0.295 -0.129 0.533 -0.347 0.642m4.834 3.933h-1.72V10.014h1.72zm19.966 0h-2.389l-3.195 -5.072V16.77H46.665l-0.656 -1.507h-3.502l-0.636 1.507h-1.973c-0.819 0 -1.857 -0.173 -2.444 -0.748 -0.593 -0.574 -0.9 -1.351 -0.9 -2.579 0 -1.002 0.184 -1.918 0.908 -2.642 0.545 -0.539 1.399 -0.788 2.56 -0.788h1.632v1.448h-1.599c-0.615 0 -0.963 0.087 -1.297 0.4 -0.287 0.284 -0.484 0.823 -0.484 1.53 0 0.724 0.15 1.246 0.464 1.587 0.26 0.268 0.731 0.348 1.175 0.348h0.757l2.376 -5.314h2.526l2.854 6.391V10.014h2.567l2.963 4.705v-4.705h1.726zm-10.246 -2.909 -1.167 -2.693 -1.16 2.693zm14.541 13.698c-0.409 0.574 -1.207 0.865 -2.288 0.865h-3.256V26.975h3.242c0.322 0 0.546 -0.041 0.682 -0.168a0.585 0.585 0 0 0 0.2 -0.441c0 -0.197 -0.082 -0.353 -0.206 -0.447 -0.122 -0.103 -0.3 -0.15 -0.594 -0.15 -1.583 -0.051 -3.557 0.047 -3.557 -2.092 0 -0.98 0.649 -2.012 2.418 -2.012h3.357v-1.345h-3.12c-0.942 0 -1.625 0.216 -2.11 0.552v-0.552h-4.614c-0.738 0 -1.604 0.175 -2.014 0.552v-0.552h-8.24v0.552c-0.655 -0.453 -1.762 -0.552 -2.273 -0.552h-5.435v0.552c-0.519 -0.481 -1.673 -0.552 -2.376 -0.552H23.712l-1.392 1.444 -1.304 -1.444H11.93v9.43H20.845l1.435 -1.466 1.351 1.466 5.495 0.004v-2.219h0.54c0.729 0.011 1.589 -0.018 2.348 -0.332v2.545h4.533v-2.458h0.218c0.279 0 0.306 0.011 0.306 0.278v2.179h13.77c0.874 0 1.788 -0.214 2.294 -0.604v0.604h4.367c0.909 0 1.796 -0.122 2.472 -0.434v-1.757zm-27.303 -3.627c0 1.877 -1.462 2.265 -2.936 2.265H27.635v2.267h-3.276l-2.075 -2.237 -2.157 2.237H13.45V21.706h6.779l2.074 2.216 2.144 -2.216h5.386c1.337 0 2.841 0.355 2.841 2.227m-13.402 3.111h-4.144v-1.345h3.701v-1.379h-3.701V23.09h4.226l1.844 1.97zm6.678 0.774 -2.588 -2.753 2.588 -2.666zm3.828 -3.005h-2.179v-1.721h2.198c0.609 0 1.031 0.237 1.031 0.829 0 0.585 -0.403 0.892 -1.05 0.892m11.412 -3.106h5.626v1.397h-3.947v1.228h3.851v1.379h-3.851v1.345l3.947 0.006v1.403H41.189zm-2.163 3.618c0.375 0.133 0.682 0.37 0.826 0.568 0.238 0.33 0.273 0.638 0.28 1.234v1.34h-1.692v-0.846c0 -0.406 0.041 -1.008 -0.273 -1.323 -0.246 -0.242 -0.622 -0.3 -1.236 -0.3h-1.802v2.469h-1.694V21.706h3.892c0.854 0 1.475 0.036 2.028 0.319 0.532 0.308 0.867 0.73 0.867 1.501a1.895 1.895 0 0 1 -1.194 1.798m-0.953 -0.855c-0.226 0.128 -0.504 0.14 -0.832 0.14h-2.048v-1.518h2.075c0.3 0 0.601 0.006 0.804 0.122 0.218 0.11 0.349 0.319 0.349 0.608s-0.131 0.522 -0.349 0.648m15.217 0.43c0.329 0.326 0.504 0.736 0.504 1.432 0 1.454 -0.948 2.132 -2.648 2.132h-3.283V27.015h3.27c0.32 0 0.546 -0.041 0.689 -0.168 0.116 -0.104 0.199 -0.257 0.199 -0.441 0 -0.197 -0.09 -0.353 -0.206 -0.447 -0.129 -0.103 -0.306 -0.15 -0.6 -0.15 -1.577 -0.051 -3.55 0.047 -3.55 -2.091 0 -0.981 0.642 -2.012 2.41 -2.012h3.38v1.438h-3.092c-0.306 0 -0.506 0.011 -0.675 0.122 -0.184 0.11 -0.253 0.272 -0.253 0.486 0 0.255 0.157 0.428 0.369 0.503 0.178 0.059 0.369 0.076 0.656 0.076l0.907 0.024c0.915 0.021 1.543 0.173 1.925 0.543m6.689 -1.809h-3.072c-0.306 0 -0.51 0.011 -0.682 0.122 -0.178 0.11 -0.246 0.272 -0.246 0.486 0 0.255 0.15 0.428 0.368 0.503 0.178 0.059 0.369 0.076 0.649 0.076l0.913 0.024c0.922 0.022 1.537 0.173 1.913 0.544 0.069 0.051 0.11 0.11 0.157 0.168z",
|
|
1566
|
+
fill: "#fff"
|
|
1567
|
+
}
|
|
1568
|
+
)
|
|
1569
|
+
]
|
|
1570
|
+
}
|
|
1571
|
+
);
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
// src/components/icons/card-types/icon-diners.tsx
|
|
1575
|
+
import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1576
|
+
function IconDiners() {
|
|
1577
|
+
return /* @__PURE__ */ jsxs12(
|
|
1578
|
+
"svg",
|
|
1579
|
+
{
|
|
1580
|
+
version: "1.1",
|
|
1581
|
+
id: "Layer_1",
|
|
1582
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1583
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1584
|
+
width: "22",
|
|
1585
|
+
height: "22",
|
|
1586
|
+
viewBox: "0 0 1.8 1.8",
|
|
1587
|
+
"enable-background": "new 0 0 24 24",
|
|
1588
|
+
xmlSpace: "preserve",
|
|
1589
|
+
children: [
|
|
1590
|
+
/* @__PURE__ */ jsx21(
|
|
1591
|
+
"path",
|
|
1592
|
+
{
|
|
1593
|
+
fill: "#FAFAFA",
|
|
1594
|
+
d: "M1.5 1.5H0.3c-0.083 0 -0.15 -0.068 -0.15 -0.15V0.45c0 -0.083 0.068 -0.15 0.15 -0.15h1.2c0.083 0 0.15 0.068 0.15 0.15v0.9c0 0.083 -0.068 0.15 -0.15 0.15"
|
|
1595
|
+
}
|
|
1596
|
+
),
|
|
1597
|
+
/* @__PURE__ */ jsx21(
|
|
1598
|
+
"path",
|
|
1599
|
+
{
|
|
1600
|
+
opacity: "0.12",
|
|
1601
|
+
fill: "#020202",
|
|
1602
|
+
d: "M1.5 0.3H0.3c-0.083 0 -0.15 0.068 -0.15 0.15v0.9c0 0.083 0.068 0.15 0.15 0.15h1.2c0.083 0 0.15 -0.068 0.15 -0.15V0.45c0 -0.083 -0.068 -0.15 -0.15 -0.15m0.075 1.05c0 0.045 -0.03 0.075 -0.075 0.075H0.3c-0.045 0 -0.075 -0.03 -0.075 -0.075V0.45c0 -0.045 0.03 -0.075 0.075 -0.075h1.2c0.045 0 0.075 0.03 0.075 0.075z"
|
|
1603
|
+
}
|
|
1604
|
+
),
|
|
1605
|
+
/* @__PURE__ */ jsx21(
|
|
1606
|
+
"path",
|
|
1607
|
+
{
|
|
1608
|
+
"fill-rule": "evenodd",
|
|
1609
|
+
"clip-rule": "evenodd",
|
|
1610
|
+
fill: "#303F9F",
|
|
1611
|
+
d: "M1.05 1.125h-0.3c-0.128 0 -0.225 -0.098 -0.225 -0.225s0.098 -0.225 0.225 -0.225h0.3c0.128 0 0.225 0.098 0.225 0.225s-0.098 0.225 -0.225 0.225"
|
|
1612
|
+
}
|
|
1613
|
+
),
|
|
1614
|
+
/* @__PURE__ */ jsx21(
|
|
1615
|
+
"path",
|
|
1616
|
+
{
|
|
1617
|
+
"fill-rule": "evenodd",
|
|
1618
|
+
"clip-rule": "evenodd",
|
|
1619
|
+
fill: "#FFFFFF",
|
|
1620
|
+
d: "M0.75 0.75c-0.083 0 -0.15 0.068 -0.15 0.15s0.068 0.15 0.15 0.15 0.15 -0.068 0.15 -0.15 -0.068 -0.15 -0.15 -0.15m0 0.225c-0.045 0 -0.075 -0.03 -0.075 -0.075s0.03 -0.075 0.075 -0.075 0.075 0.03 0.075 0.075 -0.03 0.075 -0.075 0.075"
|
|
1621
|
+
}
|
|
1622
|
+
)
|
|
1623
|
+
]
|
|
1624
|
+
}
|
|
1625
|
+
);
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
// src/components/icons/card-types/icon-discover.tsx
|
|
1629
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1630
|
+
function IconDiscover() {
|
|
1631
|
+
return /* @__PURE__ */ jsx22(
|
|
1632
|
+
"svg",
|
|
1633
|
+
{
|
|
1634
|
+
fill: "#000000",
|
|
1635
|
+
width: "22",
|
|
1636
|
+
height: "22",
|
|
1637
|
+
viewBox: "0 -0.45 2.7 2.7",
|
|
1638
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1639
|
+
children: /* @__PURE__ */ jsx22("path", { d: "M2.52 1.8H0.18A0.18 0.18 0 0 1 0 1.62V0.18A0.18 0.18 0 0 1 0.18 0h2.34A0.18 0.18 0 0 1 2.7 0.18v1.44a0.18 0.18 0 0 1 -0.18 0.18M1.433 0.72a0.193 0.193 0 1 0 0 0.386 0.193 0.193 0 0 0 0 -0.386m0.175 0.011 0.153 0.369h0.038l0.155 -0.369h-0.076l-0.097 0.241 -0.096 -0.241h-0.076zm-0.898 0.256 -0.045 0.044c0.025 0.041 0.069 0.068 0.12 0.068l0.005 0h0q0.004 0 0.008 0c0.064 0 0.116 -0.052 0.116 -0.116v-0.003c0 -0.057 -0.024 -0.083 -0.103 -0.112 -0.042 -0.016 -0.054 -0.026 -0.054 -0.045 0 -0.023 0.022 -0.04 0.052 -0.04a0.073 0.073 0 0 1 0.056 0.029l0 0 0.037 -0.048a0.155 0.155 0 0 0 -0.104 -0.04h-0.002l-0.007 0c-0.057 0 -0.104 0.046 -0.105 0.103v0c0 0.05 0.022 0.075 0.088 0.099 0.019 0.006 0.035 0.013 0.05 0.021l-0.002 -0.001a0.043 0.043 0 0 1 0.021 0.037v0a0.051 0.051 0 0 1 -0.051 0.051l-0.004 0h0c-0.033 0 -0.062 -0.019 -0.075 -0.047l0 -0.001zm0.417 -0.264h-0.001a0.191 0.191 0 0 0 -0.134 0.055 0.187 0.187 0 0 0 0.132 0.32h0.002c0.032 0 0.062 -0.008 0.089 -0.021l-0.001 0.001v-0.082c-0.021 0.024 -0.051 0.039 -0.085 0.039l-0.004 0a0.117 0.117 0 0 1 -0.117 -0.124v0l0 -0.004c0 -0.065 0.052 -0.118 0.117 -0.119H1.125c0.035 0 0.066 0.016 0.088 0.04l0 0v-0.083a0.176 0.176 0 0 0 -0.086 -0.022h-0.001zm1.174 0.223h0.009l0.097 0.144h0.086l-0.113 -0.151a0.096 0.096 0 0 0 0.082 -0.102v0c0 -0.067 -0.046 -0.106 -0.127 -0.106h-0.104v0.359h0.07v-0.144zM1.986 0.731v0.359h0.199v-0.061H2.056v-0.097h0.124v-0.061H2.056v-0.08h0.129v-0.061zm-1.417 0v0.359h0.07V0.731zm-0.329 0v0.359h0.103q0.005 0 0.01 0a0.188 0.188 0 0 0 0.118 -0.042l0 0a0.181 0.181 0 0 0 0.065 -0.138v-0.002a0.178 0.178 0 0 0 -0.194 -0.178l0.001 0zm0.089 0.299h-0.019v-0.238h0.019a0.128 0.128 0 0 1 0.096 0.029l0 0c0.024 0.022 0.039 0.054 0.039 0.089v0.001c0 0.035 -0.015 0.067 -0.039 0.09l0 0a0.132 0.132 0 0 1 -0.097 0.029l0.001 0zm1.992 -0.133h-0.02v-0.109h0.022c0.044 0 0.067 0.018 0.067 0.053 0 0.036 -0.024 0.056 -0.069 0.056z" })
|
|
1640
|
+
}
|
|
1641
|
+
);
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
// src/components/icons/card-types/icon-jcb.tsx
|
|
1645
|
+
import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1646
|
+
function IconJcb() {
|
|
1647
|
+
return /* @__PURE__ */ jsxs13(
|
|
1648
|
+
"svg",
|
|
1649
|
+
{
|
|
1650
|
+
version: "1.1",
|
|
1651
|
+
id: "Layer_1",
|
|
1652
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1653
|
+
width: "22",
|
|
1654
|
+
height: "22",
|
|
1655
|
+
viewBox: "0 0 56.25 35.325",
|
|
1656
|
+
"enable-background": "new 0 0 750 471",
|
|
1657
|
+
xmlSpace: "preserve",
|
|
1658
|
+
children: [
|
|
1659
|
+
/* @__PURE__ */ jsx23("title", { children: "Slice 1" }),
|
|
1660
|
+
/* @__PURE__ */ jsx23("desc", { children: "Created with Sketch." }),
|
|
1661
|
+
/* @__PURE__ */ jsxs13("g", { children: [
|
|
1662
|
+
/* @__PURE__ */ jsx23(
|
|
1663
|
+
"path",
|
|
1664
|
+
{
|
|
1665
|
+
id: "path3494",
|
|
1666
|
+
fill: "#FFFFFF",
|
|
1667
|
+
d: "M46.293 26.007c0 3.121 -2.53 5.652 -5.652 5.652H9.957V9.318c0 -3.122 2.53 -5.653 5.652 -5.653h30.684v22.342z"
|
|
1668
|
+
}
|
|
1669
|
+
),
|
|
1670
|
+
/* @__PURE__ */ jsxs13(
|
|
1671
|
+
"path",
|
|
1672
|
+
{
|
|
1673
|
+
id: "path3496_1_",
|
|
1674
|
+
gradientUnits: "userSpaceOnUse",
|
|
1675
|
+
x1: "824.7424",
|
|
1676
|
+
y1: "333.7813",
|
|
1677
|
+
x2: "825.7424",
|
|
1678
|
+
y2: "333.7813",
|
|
1679
|
+
gradientTransform: "matrix(132.8743 0 0 -323.0226 -109129.531 108054.602)",
|
|
1680
|
+
d: "",
|
|
1681
|
+
children: [
|
|
1682
|
+
/* @__PURE__ */ jsx23("stop", { offset: "0", style: { stopColor: "#007b40" } }),
|
|
1683
|
+
/* @__PURE__ */ jsx23("stop", { offset: "1", style: { stopColor: "#55b330" } })
|
|
1684
|
+
]
|
|
1685
|
+
}
|
|
1686
|
+
),
|
|
1687
|
+
/* @__PURE__ */ jsx23(
|
|
1688
|
+
"path",
|
|
1689
|
+
{
|
|
1690
|
+
id: "path3496",
|
|
1691
|
+
fill: "url(#path3496_1_)",
|
|
1692
|
+
d: "M36.289 18.153c0.876 0.019 1.758 -0.039 2.631 0.03 0.884 0.165 1.097 1.503 0.312 1.942 -0.536 0.289 -1.172 0.108 -1.753 0.158H36.289zm3.138 -2.411c0.195 0.687 -0.468 1.304 -1.13 1.21h-2.008c0.014 -0.648 -0.028 -1.352 0.02 -1.966 0.804 0.023 1.616 -0.046 2.416 0.036 0.343 0.086 0.631 0.369 0.701 0.72m4.832 -10.193c0.037 1.313 0.005 2.695 0.016 4.034 -0.002 5.445 0.005 10.89 -0.004 16.334 -0.035 2.041 -1.844 3.814 -3.87 3.854 -2.028 0.008 -4.057 0.001 -6.086 0.004v-8.231c2.21 -0.011 4.422 0.023 6.631 -0.017 1.025 -0.064 2.148 -0.741 2.195 -1.869 0.121 -1.133 -0.947 -1.916 -1.961 -2.04 -0.39 -0.01 -0.378 -0.114 0 -0.159 0.967 -0.209 1.727 -1.21 1.442 -2.212 -0.243 -1.054 -1.408 -1.462 -2.377 -1.46 -1.976 -0.013 -3.953 -0.002 -5.93 -0.006 0.013 -1.537 -0.027 -3.075 0.021 -4.611 0.157 -2.004 2.011 -3.656 4.009 -3.62q2.957 0 5.914 0"
|
|
1693
|
+
}
|
|
1694
|
+
),
|
|
1695
|
+
/* @__PURE__ */ jsxs13(
|
|
1696
|
+
"path",
|
|
1697
|
+
{
|
|
1698
|
+
id: "path3498_1_",
|
|
1699
|
+
gradientUnits: "userSpaceOnUse",
|
|
1700
|
+
x1: "824.7551",
|
|
1701
|
+
y1: "333.7822",
|
|
1702
|
+
x2: "825.7484",
|
|
1703
|
+
y2: "333.7822",
|
|
1704
|
+
gradientTransform: "matrix(133.4307 0 0 -323.0203 -109887.688 108053.82)",
|
|
1705
|
+
d: "",
|
|
1706
|
+
children: [
|
|
1707
|
+
/* @__PURE__ */ jsx23("stop", { offset: "0", style: { stopColor: "#1d2970" } }),
|
|
1708
|
+
/* @__PURE__ */ jsx23("stop", { offset: "1", style: { stopColor: "#006dba" } })
|
|
1709
|
+
]
|
|
1710
|
+
}
|
|
1711
|
+
),
|
|
1712
|
+
/* @__PURE__ */ jsx23(
|
|
1713
|
+
"path",
|
|
1714
|
+
{
|
|
1715
|
+
id: "path3498",
|
|
1716
|
+
fill: "url(#path3498_1_)",
|
|
1717
|
+
d: "M11.981 9.378c0.05 -2.037 1.867 -3.796 3.89 -3.826 2.021 -0.006 4.042 -0.001 6.063 -0.003 -0.006 6.816 0.011 13.633 -0.008 20.449 -0.078 2.013 -1.874 3.738 -3.876 3.773 -2.025 0.007 -4.05 0.001 -6.074 0.003V21.266c1.967 0.465 4.029 0.662 6.036 0.354 1.199 -0.193 2.512 -0.782 2.918 -2.026 0.299 -1.064 0.131 -2.184 0.175 -3.277v-2.537h-3.472c-0.016 1.678 0.032 3.359 -0.025 5.034 -0.094 1.03 -1.114 1.685 -2.085 1.65 -1.205 0.013 -3.592 -0.873 -3.592 -0.873 -0.006 -3.144 0.035 -7.08 0.052 -10.213"
|
|
1718
|
+
}
|
|
1719
|
+
),
|
|
1720
|
+
/* @__PURE__ */ jsxs13(
|
|
1721
|
+
"path",
|
|
1722
|
+
{
|
|
1723
|
+
id: "path3500_1_",
|
|
1724
|
+
gradientUnits: "userSpaceOnUse",
|
|
1725
|
+
x1: "824.7424",
|
|
1726
|
+
y1: "333.7813",
|
|
1727
|
+
x2: "825.741",
|
|
1728
|
+
y2: "333.7813",
|
|
1729
|
+
gradientTransform: "matrix(132.9583 0 0 -323.0276 -109347.922 108056.266)",
|
|
1730
|
+
d: "",
|
|
1731
|
+
children: [
|
|
1732
|
+
/* @__PURE__ */ jsx23("stop", { offset: "0", style: { stopColor: "#6e2b2f" } }),
|
|
1733
|
+
/* @__PURE__ */ jsx23("stop", { offset: "1", style: { stopColor: "#e30138" } })
|
|
1734
|
+
]
|
|
1735
|
+
}
|
|
1736
|
+
),
|
|
1737
|
+
/* @__PURE__ */ jsx23(
|
|
1738
|
+
"path",
|
|
1739
|
+
{
|
|
1740
|
+
id: "path3500",
|
|
1741
|
+
fill: "url(#path3500_1_)",
|
|
1742
|
+
d: "M23.229 14.804c-0.183 0.039 -0.037 -0.623 -0.084 -0.873 0.012 -1.586 -0.026 -3.174 0.021 -4.759 0.156 -2.012 2.024 -3.669 4.03 -3.622h5.908c-0.006 6.816 0.011 13.633 -0.008 20.449 -0.078 2.013 -1.874 3.737 -3.876 3.773 -2.025 0.008 -4.05 0.001 -6.075 0.003V20.453c1.383 1.135 3.262 1.311 4.985 1.314 1.299 0 2.59 -0.201 3.851 -0.5V19.559c-1.421 0.708 -3.093 1.158 -4.668 0.751 -1.099 -0.274 -1.897 -1.336 -1.879 -2.47 -0.127 -1.18 0.564 -2.425 1.723 -2.776 1.439 -0.451 3.008 -0.106 4.357 0.48 0.289 0.151 0.582 0.339 0.467 -0.144v-1.342c-2.256 -0.537 -4.658 -0.734 -6.925 -0.15 -0.656 0.185 -1.295 0.466 -1.828 0.897"
|
|
1743
|
+
}
|
|
1744
|
+
)
|
|
1745
|
+
] })
|
|
1746
|
+
]
|
|
1747
|
+
}
|
|
1748
|
+
);
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
// src/components/icons/card-types/icon-mastercard.tsx
|
|
1752
|
+
import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1753
|
+
function IconMastercard() {
|
|
1754
|
+
return /* @__PURE__ */ jsxs14(
|
|
1755
|
+
"svg",
|
|
1756
|
+
{
|
|
1757
|
+
width: "22",
|
|
1758
|
+
height: "22",
|
|
1759
|
+
viewBox: "0 -4.069 36.188 36.188",
|
|
1760
|
+
id: "Layer_1",
|
|
1761
|
+
"data-name": "Layer 1",
|
|
1762
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1763
|
+
children: [
|
|
1764
|
+
/* @__PURE__ */ jsx24("title", { children: "mastercard" }),
|
|
1765
|
+
/* @__PURE__ */ jsxs14("g", { children: [
|
|
1766
|
+
/* @__PURE__ */ jsx24("path", { d: "M6.554 27.988v-1.864c0 -0.715 -0.435 -1.18 -1.149 -1.18 -0.375 0 -0.776 0.124 -1.056 0.525 -0.217 -0.342 -0.525 -0.525 -0.994 -0.525a1.055 1.055 0 0 0 -0.9 0.435v-0.375h-0.59v2.982h0.59v-1.706c0 -0.525 0.31 -0.776 0.745 -0.776s0.683 0.28 0.683 0.776v1.709h0.59v-1.709c0 -0.525 0.31 -0.776 0.745 -0.776s0.683 0.28 0.683 0.776v1.709Zm9.691 -2.951h-1.087v-0.9h-0.589v0.9h-0.621v0.525h0.621v1.401c0 0.683 0.248 1.087 0.994 1.087a1.74 1.74 0 0 0 0.806 -0.217l-0.187 -0.525a1.022 1.022 0 0 1 -0.559 0.155c-0.31 0 -0.466 -0.187 -0.466 -0.497V25.537h1.087v-0.497Zm5.529 -0.093a0.929 0.929 0 0 0 -0.808 0.435v-0.375h-0.59v2.982h0.59v-1.675c0 -0.497 0.248 -0.808 0.652 -0.808a1.815 1.815 0 0 1 0.403 0.062l0.187 -0.559a2.1 2.1 0 0 0 -0.435 -0.062m-8.356 0.31c-0.31 -0.217 -0.745 -0.31 -1.211 -0.31 -0.745 0 -1.211 0.342 -1.211 0.932 0 0.497 0.342 0.776 0.994 0.87l0.31 0.031c0.342 0.062 0.559 0.187 0.559 0.342 0 0.217 -0.248 0.375 -0.715 0.375a1.638 1.638 0 0 1 -0.994 -0.31l-0.31 0.466c0.435 0.31 0.963 0.375 1.275 0.375 0.87 0 1.336 -0.403 1.336 -0.963 0 -0.525 -0.375 -0.776 -1.025 -0.87l-0.31 -0.031c-0.28 -0.031 -0.525 -0.124 -0.525 -0.31 0 -0.217 0.248 -0.375 0.59 -0.375 0.375 0 0.745 0.155 0.932 0.248Zm9.008 1.243c0 0.9 0.59 1.553 1.553 1.553 0.435 0 0.745 -0.093 1.056 -0.342l-0.31 -0.466a1.255 1.255 0 0 1 -0.776 0.28c-0.525 0 -0.932 -0.403 -0.932 -0.994s0.402 -0.991 0.932 -0.991a1.255 1.255 0 0 1 0.776 0.28l0.31 -0.466c-0.31 -0.248 -0.621 -0.342 -1.056 -0.342 -0.932 -0.062 -1.553 0.59 -1.553 1.491Zm-4.162 -1.553c-0.87 0 -1.46 0.621 -1.46 1.553S17.425 28.05 18.326 28.05a1.9 1.9 0 0 0 1.211 -0.403l-0.31 -0.435a1.485 1.485 0 0 1 -0.87 0.31c-0.403 0 -0.838 -0.248 -0.9 -0.776h2.206v-0.248c0 -0.932 -0.559 -1.553 -1.398 -1.553Zm-0.031 0.559c0.435 0 0.745 0.28 0.776 0.745h-1.615c0.093 -0.435 0.375 -0.745 0.838 -0.745m-8.045 0.994v-1.491h-0.59v0.375c-0.217 -0.28 -0.525 -0.435 -0.963 -0.435 -0.838 0 -1.46 0.652 -1.46 1.553s0.621 1.553 1.46 1.553c0.435 0 0.745 -0.155 0.963 -0.435v0.375h0.59zm-2.392 0c0 -0.559 0.342 -0.994 0.932 -0.994 0.559 0 0.9 0.435 0.9 0.994 0 0.59 -0.375 0.994 -0.9 0.994 -0.59 0.031 -0.932 -0.435 -0.932 -0.994m22.956 -1.553a0.929 0.929 0 0 0 -0.808 0.435v-0.375h-0.59v2.982h0.59v-1.675c0 -0.497 0.248 -0.808 0.652 -0.808a1.815 1.815 0 0 1 0.403 0.062l0.187 -0.559a2.1 2.1 0 0 0 -0.435 -0.062Zm-2.299 1.553v-1.491h-0.59v0.375c-0.217 -0.28 -0.525 -0.435 -0.963 -0.435 -0.838 0 -1.46 0.652 -1.46 1.553s0.621 1.553 1.46 1.553c0.435 0 0.745 -0.155 0.963 -0.435v0.375h0.59zm-2.392 0c0 -0.559 0.342 -0.994 0.932 -0.994 0.559 0 0.9 0.435 0.9 0.994 0 0.59 -0.375 0.994 -0.9 0.994 -0.59 0.031 -0.932 -0.435 -0.932 -0.994m8.387 0v-2.671h-0.59v1.553c-0.217 -0.28 -0.525 -0.435 -0.963 -0.435 -0.838 0 -1.46 0.652 -1.46 1.553S32.057 28.05 32.896 28.05c0.435 0 0.745 -0.155 0.963 -0.435v0.375h0.59zm-2.392 0c0 -0.559 0.342 -0.994 0.932 -0.994 0.559 0 0.9 0.435 0.9 0.994 0 0.59 -0.375 0.994 -0.9 0.994 -0.591 0.032 -0.933 -0.434 -0.933 -0.994Z" }),
|
|
1767
|
+
/* @__PURE__ */ jsxs14("g", { children: [
|
|
1768
|
+
/* @__PURE__ */ jsx24(
|
|
1769
|
+
"path",
|
|
1770
|
+
{
|
|
1771
|
+
x: "169.81",
|
|
1772
|
+
y: "31.89",
|
|
1773
|
+
width: "143.72",
|
|
1774
|
+
height: "234.42",
|
|
1775
|
+
fill: "#ff5f00",
|
|
1776
|
+
d: "M12.736 2.392H23.515V19.973H12.736V2.392z"
|
|
1777
|
+
}
|
|
1778
|
+
),
|
|
1779
|
+
/* @__PURE__ */ jsx24(
|
|
1780
|
+
"path",
|
|
1781
|
+
{
|
|
1782
|
+
d: "M13.823 11.182a11.213 11.213 0 0 1 4.255 -8.791 11.182 11.182 0 1 0 0 17.581 11.213 11.213 0 0 1 -4.255 -8.791",
|
|
1783
|
+
fill: "#eb001b"
|
|
1784
|
+
}
|
|
1785
|
+
),
|
|
1786
|
+
/* @__PURE__ */ jsx24(
|
|
1787
|
+
"path",
|
|
1788
|
+
{
|
|
1789
|
+
d: "M36.189 11.182a11.171 11.171 0 0 1 -18.075 8.791 11.207 11.207 0 0 0 0 -17.581 11.171 11.171 0 0 1 18.075 8.791",
|
|
1790
|
+
fill: "#f79e1b"
|
|
1791
|
+
}
|
|
1792
|
+
)
|
|
1793
|
+
] })
|
|
1794
|
+
] })
|
|
1795
|
+
]
|
|
1796
|
+
}
|
|
1797
|
+
);
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
// src/components/icons/card-types/icon-verve.tsx
|
|
1801
|
+
import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1802
|
+
function IconVerve() {
|
|
1803
|
+
return /* @__PURE__ */ jsxs15(
|
|
1804
|
+
"svg",
|
|
1805
|
+
{
|
|
1806
|
+
width: "22",
|
|
1807
|
+
height: "22",
|
|
1808
|
+
viewBox: "0 -10.463 56.25 56.25",
|
|
1809
|
+
version: "1.1",
|
|
1810
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1811
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1812
|
+
children: [
|
|
1813
|
+
/* @__PURE__ */ jsx25("desc", { children: "Created with Sketch." }),
|
|
1814
|
+
/* @__PURE__ */ jsx25("defs", {}),
|
|
1815
|
+
/* @__PURE__ */ jsx25(
|
|
1816
|
+
"g",
|
|
1817
|
+
{
|
|
1818
|
+
id: "Page-1",
|
|
1819
|
+
stroke: "none",
|
|
1820
|
+
"stroke-width": "1",
|
|
1821
|
+
fill: "none",
|
|
1822
|
+
"fill-rule": "evenodd",
|
|
1823
|
+
children: /* @__PURE__ */ jsxs15("g", { id: "verve", "fill-rule": "nonzero", children: [
|
|
1824
|
+
/* @__PURE__ */ jsx25(
|
|
1825
|
+
"path",
|
|
1826
|
+
{
|
|
1827
|
+
id: "Rectangle-path",
|
|
1828
|
+
fill: "#00425F",
|
|
1829
|
+
x: "0",
|
|
1830
|
+
y: "0",
|
|
1831
|
+
width: "750",
|
|
1832
|
+
height: "471",
|
|
1833
|
+
rx: "40",
|
|
1834
|
+
d: "M3 0H53.25A3 3 0 0 1 56.25 3V32.325A3 3 0 0 1 53.25 35.325H3A3 3 0 0 1 0 32.325V3A3 3 0 0 1 3 0z"
|
|
1835
|
+
}
|
|
1836
|
+
),
|
|
1837
|
+
/* @__PURE__ */ jsx25(
|
|
1838
|
+
"path",
|
|
1839
|
+
{
|
|
1840
|
+
id: "Oval",
|
|
1841
|
+
fill: "#EE312A",
|
|
1842
|
+
cx: "156.26347",
|
|
1843
|
+
cy: "215.5",
|
|
1844
|
+
r: "115.26347",
|
|
1845
|
+
d: "M20.365 16.162A8.645 8.645 0 0 1 11.72 24.807A8.645 8.645 0 0 1 3.075 16.162A8.645 8.645 0 0 1 20.365 16.162z"
|
|
1846
|
+
}
|
|
1847
|
+
),
|
|
1848
|
+
/* @__PURE__ */ jsx25(
|
|
1849
|
+
"path",
|
|
1850
|
+
{
|
|
1851
|
+
d: "M11.72 19.865c-1.933 -4.383 -3.351 -8.477 -3.351 -8.477H5.404s1.804 5.255 5.156 11.827h2.32c3.351 -6.572 5.156 -11.827 5.156 -11.827h-2.964s-1.418 4.094 -3.351 8.477",
|
|
1852
|
+
id: "Shape",
|
|
1853
|
+
fill: "#FFFFFF"
|
|
1854
|
+
}
|
|
1855
|
+
),
|
|
1856
|
+
/* @__PURE__ */ jsx25(
|
|
1857
|
+
"path",
|
|
1858
|
+
{
|
|
1859
|
+
d: "M53.103 19.32h-5.8s0.129 1.933 2.707 1.933c1.289 0 2.578 -0.387 2.578 -0.387l0.258 2.062s-1.289 0.516 -3.093 0.516c-2.578 0 -4.897 -1.289 -4.897 -4.897 0 -2.835 1.804 -4.64 4.382 -4.64 3.866 0 4.124 3.866 3.866 5.413m-3.995 -3.609c-1.675 0 -1.804 1.804 -1.804 1.804h3.609s-0.129 -1.804 -1.804 -1.804",
|
|
1860
|
+
id: "Shape",
|
|
1861
|
+
fill: "#FFFFFF"
|
|
1862
|
+
}
|
|
1863
|
+
),
|
|
1864
|
+
/* @__PURE__ */ jsx25(
|
|
1865
|
+
"path",
|
|
1866
|
+
{
|
|
1867
|
+
d: "m33.175 16.256 0.387 -2.062s-2.986 -0.906 -5.413 0.773v8.248h2.578l0 -6.702c1.031 -0.773 2.449 -0.258 2.449 -0.258",
|
|
1868
|
+
id: "Shape",
|
|
1869
|
+
fill: "#FFFFFF"
|
|
1870
|
+
}
|
|
1871
|
+
),
|
|
1872
|
+
/* @__PURE__ */ jsx25(
|
|
1873
|
+
"path",
|
|
1874
|
+
{
|
|
1875
|
+
d: "M26.131 19.32h-5.8s0.129 1.933 2.707 1.933c1.289 0 2.578 -0.387 2.578 -0.387l0.258 2.062s-1.289 0.516 -3.093 0.516c-2.578 0 -4.897 -1.289 -4.897 -4.897 0 -2.835 1.804 -4.64 4.382 -4.64 3.866 0 4.124 3.866 3.866 5.413m-3.995 -3.609c-1.675 0 -1.804 1.804 -1.804 1.804h3.609s-0.129 -1.804 -1.804 -1.804",
|
|
1876
|
+
id: "Shape",
|
|
1877
|
+
fill: "#FFFFFF"
|
|
1878
|
+
}
|
|
1879
|
+
),
|
|
1880
|
+
/* @__PURE__ */ jsx25(
|
|
1881
|
+
"path",
|
|
1882
|
+
{
|
|
1883
|
+
d: "M39.435 20.124a40.102 40.102 0 0 1 -1.933 -6.008l-2.577 0s1.289 4.976 3.48 9.099h2.062c2.191 -4.123 3.48 -9.098 3.48 -9.098H41.369a40.125 40.125 0 0 1 -1.933 6.006",
|
|
1884
|
+
id: "Shape",
|
|
1885
|
+
fill: "#FFFFFF"
|
|
1886
|
+
}
|
|
1887
|
+
)
|
|
1888
|
+
] })
|
|
1889
|
+
}
|
|
1890
|
+
)
|
|
1891
|
+
]
|
|
1892
|
+
}
|
|
1893
|
+
);
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
// src/components/icons/card-types/icon-visa.tsx
|
|
1897
|
+
import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1898
|
+
function IconVisa() {
|
|
1899
|
+
return /* @__PURE__ */ jsx26(
|
|
1900
|
+
"svg",
|
|
1901
|
+
{
|
|
1902
|
+
width: 22,
|
|
1903
|
+
height: 22,
|
|
1904
|
+
viewBox: "0 0 56.25 35.325",
|
|
1905
|
+
fill: "none",
|
|
1906
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1907
|
+
children: /* @__PURE__ */ jsxs16("g", { children: [
|
|
1908
|
+
/* @__PURE__ */ jsx26(
|
|
1909
|
+
"path",
|
|
1910
|
+
{
|
|
1911
|
+
fill: "#0E4595",
|
|
1912
|
+
d: "m20.865 25.067 2.502 -14.682h4.002l-2.504 14.682z"
|
|
1913
|
+
}
|
|
1914
|
+
),
|
|
1915
|
+
/* @__PURE__ */ jsx26(
|
|
1916
|
+
"path",
|
|
1917
|
+
{
|
|
1918
|
+
fill: "#0E4595",
|
|
1919
|
+
d: "M39.323 10.702c-0.793 -0.297 -2.035 -0.617 -3.587 -0.617 -3.954 0 -6.74 1.991 -6.764 4.845 -0.022 2.11 1.989 3.287 3.507 3.989 1.558 0.72 2.081 1.179 2.074 1.821 -0.01 0.984 -1.244 1.434 -2.394 1.434 -1.602 0 -2.453 -0.223 -3.767 -0.771l-0.516 -0.233 -0.562 3.287c0.935 0.41 2.663 0.765 4.458 0.783 4.207 0 6.938 -1.969 6.969 -5.016 0.015 -1.67 -1.051 -2.941 -3.36 -3.989 -1.399 -0.679 -2.255 -1.132 -2.246 -1.82 0 -0.61 0.725 -1.263 2.292 -1.263 1.309 -0.02 2.257 0.265 2.995 0.563l0.359 0.169z"
|
|
1920
|
+
}
|
|
1921
|
+
),
|
|
1922
|
+
/* @__PURE__ */ jsx26(
|
|
1923
|
+
"path",
|
|
1924
|
+
{
|
|
1925
|
+
fill: "#0E4595",
|
|
1926
|
+
d: "M49.621 10.385h-3.092c-0.958 0 -1.675 0.261 -2.096 1.218L38.49 25.058h4.202s0.687 -1.809 0.842 -2.206c0.459 0 4.542 0.006 5.125 0.006 0.12 0.514 0.487 2.2 0.487 2.2h3.713zm-4.906 9.481c0.331 -0.846 1.595 -4.104 1.595 -4.104 -0.024 0.039 0.329 -0.85 0.531 -1.401l0.271 1.266s0.766 3.505 0.926 4.24h-3.322z"
|
|
1927
|
+
}
|
|
1928
|
+
),
|
|
1929
|
+
/* @__PURE__ */ jsx26(
|
|
1930
|
+
"path",
|
|
1931
|
+
{
|
|
1932
|
+
fill: "#0E4595",
|
|
1933
|
+
fillOpacity: 1,
|
|
1934
|
+
d: "m3.441 10.385 -0.051 0.305c1.582 0.383 2.995 0.937 4.232 1.627l3.551 12.727 4.234 -0.005 6.3 -14.654h-4.239L13.55 20.397l-0.417 -2.035a6.6 6.6 0 0 0 -0.063 -0.189l-1.362 -6.549c-0.242 -0.93 -0.945 -1.207 -1.814 -1.24z"
|
|
1935
|
+
}
|
|
1936
|
+
)
|
|
1937
|
+
] })
|
|
1938
|
+
}
|
|
1939
|
+
);
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1605
1942
|
// src/components/base/button.tsx
|
|
1606
|
-
import { Fragment, jsx as
|
|
1943
|
+
import { Fragment, jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1607
1944
|
function getButtonBgClass(type, disabled, caller) {
|
|
1608
1945
|
if (disabled)
|
|
1609
1946
|
return "bg-gray-200 text-gray-400 cursor-not-allowed border-gray-200";
|
|
@@ -1659,7 +1996,7 @@ function BaseButton({
|
|
|
1659
1996
|
const handleClick = () => {
|
|
1660
1997
|
if (!isDisabled) onClick?.();
|
|
1661
1998
|
};
|
|
1662
|
-
return /* @__PURE__ */
|
|
1999
|
+
return /* @__PURE__ */ jsxs17(
|
|
1663
2000
|
"button",
|
|
1664
2001
|
{
|
|
1665
2002
|
className: `flex items-center justify-center gap-2 py-3 border font-normal text-input-grey transition-colors duration-300 ease-in-out ${getButtonBgClass(
|
|
@@ -1672,7 +2009,7 @@ function BaseButton({
|
|
|
1672
2009
|
onClick: handleClick,
|
|
1673
2010
|
children: [
|
|
1674
2011
|
prefix,
|
|
1675
|
-
loading ? /* @__PURE__ */
|
|
2012
|
+
loading ? /* @__PURE__ */ jsx27(IconLoader, {}) : /* @__PURE__ */ jsx27("div", { children: label ? /* @__PURE__ */ jsx27("p", { className: `mb-0 ${getLabelSizeClass(size)}`, children: label }) : /* @__PURE__ */ jsx27(Fragment, { children }) }),
|
|
1676
2013
|
suffix
|
|
1677
2014
|
]
|
|
1678
2015
|
}
|
|
@@ -1680,16 +2017,16 @@ function BaseButton({
|
|
|
1680
2017
|
}
|
|
1681
2018
|
|
|
1682
2019
|
// src/components/base/back.tsx
|
|
1683
|
-
import { jsx as
|
|
2020
|
+
import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1684
2021
|
function BaseBack({ back }) {
|
|
1685
|
-
return /* @__PURE__ */
|
|
1686
|
-
/* @__PURE__ */
|
|
1687
|
-
/* @__PURE__ */
|
|
2022
|
+
return /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2 cursor-pointer", onClick: back, children: [
|
|
2023
|
+
/* @__PURE__ */ jsx28(IconChevronLeft, {}),
|
|
2024
|
+
/* @__PURE__ */ jsx28("p", { className: "mb-0 text-body-xs font-normal", children: "Back" })
|
|
1688
2025
|
] });
|
|
1689
2026
|
}
|
|
1690
2027
|
|
|
1691
2028
|
// src/components/base/card.tsx
|
|
1692
|
-
import { jsx as
|
|
2029
|
+
import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1693
2030
|
function BaseCard({
|
|
1694
2031
|
showBackButton = false,
|
|
1695
2032
|
onBack,
|
|
@@ -1697,34 +2034,34 @@ function BaseCard({
|
|
|
1697
2034
|
onClose,
|
|
1698
2035
|
caller = "buzapay"
|
|
1699
2036
|
}) {
|
|
1700
|
-
return caller === "buzapay" ? /* @__PURE__ */
|
|
1701
|
-
showBackButton && /* @__PURE__ */
|
|
1702
|
-
/* @__PURE__ */
|
|
1703
|
-
/* @__PURE__ */
|
|
1704
|
-
/* @__PURE__ */
|
|
1705
|
-
/* @__PURE__ */
|
|
1706
|
-
/* @__PURE__ */
|
|
1707
|
-
/* @__PURE__ */
|
|
2037
|
+
return caller === "buzapay" ? /* @__PURE__ */ jsx29("div", { className: "checkout-card-miden w-full h-screen flex flex-col items-center justify-center text-white", children: /* @__PURE__ */ jsxs19("div", { className: "flex w-[95%] sm:w-[85%] md:w-[70%] lg:w-[60%] xl:w-1/2", children: [
|
|
2038
|
+
showBackButton && /* @__PURE__ */ jsx29(BaseBack, { back: () => onBack?.() }),
|
|
2039
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex gap-2 w-full", children: [
|
|
2040
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-8 w-full", children: [
|
|
2041
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-off-white rounded-xl", children }),
|
|
2042
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2 justify-center", children: [
|
|
2043
|
+
/* @__PURE__ */ jsx29("p", { className: "text-light-white-100 text-body-2xs font-regular", children: "Powered by Buzapay" }),
|
|
2044
|
+
/* @__PURE__ */ jsx29(IconBuzapayIcon, { color: "#E8F4FF" })
|
|
1708
2045
|
] })
|
|
1709
2046
|
] }),
|
|
1710
|
-
/* @__PURE__ */
|
|
2047
|
+
/* @__PURE__ */ jsx29(
|
|
1711
2048
|
"div",
|
|
1712
2049
|
{
|
|
1713
2050
|
onClick: onClose,
|
|
1714
2051
|
className: "hidden sm:flex close-icon flex-col items-center justify-center self-start cursor-pointer hover:bg-gray-500",
|
|
1715
|
-
children: /* @__PURE__ */
|
|
2052
|
+
children: /* @__PURE__ */ jsx29("p", { className: "text-white", children: "x" })
|
|
1716
2053
|
}
|
|
1717
2054
|
)
|
|
1718
2055
|
] })
|
|
1719
|
-
] }) }) : /* @__PURE__ */
|
|
1720
|
-
showBackButton && /* @__PURE__ */
|
|
1721
|
-
/* @__PURE__ */
|
|
1722
|
-
/* @__PURE__ */
|
|
1723
|
-
/* @__PURE__ */
|
|
1724
|
-
/* @__PURE__ */
|
|
1725
|
-
/* @__PURE__ */
|
|
2056
|
+
] }) }) : /* @__PURE__ */ jsx29("div", { className: "checkout-card-miden w-full h-screen flex flex-col items-center justify-center text-white", children: /* @__PURE__ */ jsxs19("div", { className: "flex w-[95%] sm:w-[85%] md:w-[70%] lg:w-[60%] xl:w-1/2", children: [
|
|
2057
|
+
showBackButton && /* @__PURE__ */ jsx29(BaseBack, { back: () => onBack?.() }),
|
|
2058
|
+
/* @__PURE__ */ jsx29("div", { className: "flex gap-2 w-full", children: /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-8 w-full", children: [
|
|
2059
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-white rounded-xl", children }),
|
|
2060
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-4 justify-center", children: [
|
|
2061
|
+
/* @__PURE__ */ jsx29(IconLock, { color: "#E8F4FF" }),
|
|
2062
|
+
/* @__PURE__ */ jsxs19("p", { className: "text-light-white-100 text-body-2xs font-regular", children: [
|
|
1726
2063
|
"Secured by ",
|
|
1727
|
-
/* @__PURE__ */
|
|
2064
|
+
/* @__PURE__ */ jsx29("span", { className: "font-semibold", children: "Miden" })
|
|
1728
2065
|
] })
|
|
1729
2066
|
] })
|
|
1730
2067
|
] }) })
|
|
@@ -1733,7 +2070,7 @@ function BaseCard({
|
|
|
1733
2070
|
|
|
1734
2071
|
// src/components/base/radio-group.tsx
|
|
1735
2072
|
import { useEffect, useState } from "react";
|
|
1736
|
-
import { jsx as
|
|
2073
|
+
import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1737
2074
|
var BaseRadioGroup = ({
|
|
1738
2075
|
options,
|
|
1739
2076
|
type = "vertical",
|
|
@@ -1757,7 +2094,7 @@ var BaseRadioGroup = ({
|
|
|
1757
2094
|
selectedChange?.(v);
|
|
1758
2095
|
};
|
|
1759
2096
|
const containerLayout = type === "horizontal" ? "flex-row gap-5" : "flex-col gap-6";
|
|
1760
|
-
return caller === "buzapay" ? /* @__PURE__ */
|
|
2097
|
+
return caller === "buzapay" ? /* @__PURE__ */ jsx30(
|
|
1761
2098
|
"div",
|
|
1762
2099
|
{
|
|
1763
2100
|
className: `flex ${containerLayout} ${className}`,
|
|
@@ -1766,7 +2103,7 @@ var BaseRadioGroup = ({
|
|
|
1766
2103
|
tabIndex: 0,
|
|
1767
2104
|
children: options.map((option) => {
|
|
1768
2105
|
const isActive = selected === option.value;
|
|
1769
|
-
return /* @__PURE__ */
|
|
2106
|
+
return /* @__PURE__ */ jsxs20(
|
|
1770
2107
|
"div",
|
|
1771
2108
|
{
|
|
1772
2109
|
role: "radio",
|
|
@@ -1775,24 +2112,24 @@ var BaseRadioGroup = ({
|
|
|
1775
2112
|
onClick: () => setSelected(option.value),
|
|
1776
2113
|
className: "flex items-center gap-2 cursor-pointer transition-colors duration-200",
|
|
1777
2114
|
children: [
|
|
1778
|
-
/* @__PURE__ */
|
|
2115
|
+
/* @__PURE__ */ jsx30(
|
|
1779
2116
|
"div",
|
|
1780
2117
|
{
|
|
1781
2118
|
className: [
|
|
1782
2119
|
"w-4 h-4 rounded-full border flex items-center justify-center",
|
|
1783
2120
|
isActive ? "bg-orange-500 border-orange-500" : "bg-white border-grey-200"
|
|
1784
2121
|
].join(" "),
|
|
1785
|
-
children: isActive && /* @__PURE__ */
|
|
2122
|
+
children: isActive && /* @__PURE__ */ jsx30("div", { className: "bg-white w-2 h-2 rounded-full" })
|
|
1786
2123
|
}
|
|
1787
2124
|
),
|
|
1788
|
-
/* @__PURE__ */
|
|
2125
|
+
/* @__PURE__ */ jsx30("p", { className: "mb-0 text-body-2xs font-medium text-heading-text", children: option.label })
|
|
1789
2126
|
]
|
|
1790
2127
|
},
|
|
1791
2128
|
option.value
|
|
1792
2129
|
);
|
|
1793
2130
|
})
|
|
1794
2131
|
}
|
|
1795
|
-
) : /* @__PURE__ */
|
|
2132
|
+
) : /* @__PURE__ */ jsx30(
|
|
1796
2133
|
"div",
|
|
1797
2134
|
{
|
|
1798
2135
|
className: `flex ${containerLayout} ${className}`,
|
|
@@ -1801,7 +2138,7 @@ var BaseRadioGroup = ({
|
|
|
1801
2138
|
tabIndex: 0,
|
|
1802
2139
|
children: options.map((option) => {
|
|
1803
2140
|
const isActive = selected === option.value;
|
|
1804
|
-
return /* @__PURE__ */
|
|
2141
|
+
return /* @__PURE__ */ jsxs20(
|
|
1805
2142
|
"div",
|
|
1806
2143
|
{
|
|
1807
2144
|
role: "radio",
|
|
@@ -1813,25 +2150,25 @@ var BaseRadioGroup = ({
|
|
|
1813
2150
|
selected === option.value ? "border-r-4 border-white" : ""
|
|
1814
2151
|
].join(" "),
|
|
1815
2152
|
children: [
|
|
1816
|
-
option.value === "CARD" && /* @__PURE__ */
|
|
2153
|
+
option.value === "CARD" && /* @__PURE__ */ jsx30(
|
|
1817
2154
|
IconCards,
|
|
1818
2155
|
{
|
|
1819
2156
|
color: selected === option.value ? "#ffffff" : "#8FAECA"
|
|
1820
2157
|
}
|
|
1821
2158
|
),
|
|
1822
|
-
option.value === "BANK_TRANSFER" && /* @__PURE__ */
|
|
2159
|
+
option.value === "BANK_TRANSFER" && /* @__PURE__ */ jsx30(
|
|
1823
2160
|
IconCourthouse,
|
|
1824
2161
|
{
|
|
1825
2162
|
color: selected === option.value ? "#ffffff" : "#8FAECA"
|
|
1826
2163
|
}
|
|
1827
2164
|
),
|
|
1828
|
-
option.value === "STABLE_COIN" && /* @__PURE__ */
|
|
2165
|
+
option.value === "STABLE_COIN" && /* @__PURE__ */ jsx30(
|
|
1829
2166
|
IconCoin,
|
|
1830
2167
|
{
|
|
1831
2168
|
color: selected === option.value ? "#ffffff" : "#8FAECA"
|
|
1832
2169
|
}
|
|
1833
2170
|
),
|
|
1834
|
-
/* @__PURE__ */
|
|
2171
|
+
/* @__PURE__ */ jsx30(
|
|
1835
2172
|
"p",
|
|
1836
2173
|
{
|
|
1837
2174
|
className: [
|
|
@@ -1851,7 +2188,7 @@ var BaseRadioGroup = ({
|
|
|
1851
2188
|
};
|
|
1852
2189
|
|
|
1853
2190
|
// src/components/base/image.tsx
|
|
1854
|
-
import { jsx as
|
|
2191
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1855
2192
|
function BaseImage({
|
|
1856
2193
|
src,
|
|
1857
2194
|
height = 50,
|
|
@@ -1861,7 +2198,7 @@ function BaseImage({
|
|
|
1861
2198
|
isFullWidth,
|
|
1862
2199
|
onClick
|
|
1863
2200
|
}) {
|
|
1864
|
-
return /* @__PURE__ */
|
|
2201
|
+
return /* @__PURE__ */ jsx31(
|
|
1865
2202
|
"img",
|
|
1866
2203
|
{
|
|
1867
2204
|
src,
|
|
@@ -1875,7 +2212,7 @@ function BaseImage({
|
|
|
1875
2212
|
}
|
|
1876
2213
|
|
|
1877
2214
|
// src/components/base/copy.tsx
|
|
1878
|
-
import { jsx as
|
|
2215
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1879
2216
|
function BaseCopy({ copyText, color }) {
|
|
1880
2217
|
const copyToClipboard = (text) => {
|
|
1881
2218
|
return navigator.clipboard.writeText(text);
|
|
@@ -1885,7 +2222,7 @@ function BaseCopy({ copyText, color }) {
|
|
|
1885
2222
|
}).catch((err) => {
|
|
1886
2223
|
});
|
|
1887
2224
|
};
|
|
1888
|
-
return /* @__PURE__ */
|
|
2225
|
+
return /* @__PURE__ */ jsx32(
|
|
1889
2226
|
IconCopySuccess,
|
|
1890
2227
|
{
|
|
1891
2228
|
className: "cursor-pointer",
|
|
@@ -1896,7 +2233,7 @@ function BaseCopy({ copyText, color }) {
|
|
|
1896
2233
|
}
|
|
1897
2234
|
|
|
1898
2235
|
// src/components/base/label-info.tsx
|
|
1899
|
-
import { jsx as
|
|
2236
|
+
import { jsx as jsx33, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1900
2237
|
var BaseLabelInfo = ({
|
|
1901
2238
|
type = "vertical",
|
|
1902
2239
|
label = "",
|
|
@@ -1912,14 +2249,14 @@ var BaseLabelInfo = ({
|
|
|
1912
2249
|
const showPrefixImg = valueImageSrc && valueImagePosition === "prefix";
|
|
1913
2250
|
const showSuffixImg = valueImageSrc && valueImagePosition === "suffix";
|
|
1914
2251
|
if (type === "vertical") {
|
|
1915
|
-
return /* @__PURE__ */
|
|
2252
|
+
return /* @__PURE__ */ jsxs21(
|
|
1916
2253
|
"div",
|
|
1917
2254
|
{
|
|
1918
2255
|
className: `flex flex-col gap-1 ${alignRight ? "text-right items-end" : ""}`,
|
|
1919
2256
|
children: [
|
|
1920
|
-
/* @__PURE__ */
|
|
1921
|
-
/* @__PURE__ */
|
|
1922
|
-
showPrefixImg && /* @__PURE__ */
|
|
2257
|
+
/* @__PURE__ */ jsx33("p", { className: labelCustomClass, children: label.toUpperCase() }),
|
|
2258
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-1", children: [
|
|
2259
|
+
showPrefixImg && /* @__PURE__ */ jsx33(
|
|
1923
2260
|
BaseImage,
|
|
1924
2261
|
{
|
|
1925
2262
|
src: valueImageSrc,
|
|
@@ -1928,9 +2265,9 @@ var BaseLabelInfo = ({
|
|
|
1928
2265
|
customClass: valueImageCustomClass
|
|
1929
2266
|
}
|
|
1930
2267
|
),
|
|
1931
|
-
!hasValueCopy ? /* @__PURE__ */
|
|
1932
|
-
hasValueCopy && /* @__PURE__ */
|
|
1933
|
-
showSuffixImg && /* @__PURE__ */
|
|
2268
|
+
!hasValueCopy ? /* @__PURE__ */ jsx33("p", { className: valueCustomClass, children: value }) : /* @__PURE__ */ jsx33("p", { className: `${valueCustomClass} truncate`, children: truncateString(value, 40) }),
|
|
2269
|
+
hasValueCopy && /* @__PURE__ */ jsx33(BaseCopy, { copyText: value, color: "#9DBFDE" }),
|
|
2270
|
+
showSuffixImg && /* @__PURE__ */ jsx33(
|
|
1934
2271
|
BaseImage,
|
|
1935
2272
|
{
|
|
1936
2273
|
src: valueImageSrc,
|
|
@@ -1944,10 +2281,10 @@ var BaseLabelInfo = ({
|
|
|
1944
2281
|
}
|
|
1945
2282
|
);
|
|
1946
2283
|
}
|
|
1947
|
-
return /* @__PURE__ */
|
|
1948
|
-
/* @__PURE__ */
|
|
1949
|
-
/* @__PURE__ */
|
|
1950
|
-
showPrefixImg && /* @__PURE__ */
|
|
2284
|
+
return /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between", children: [
|
|
2285
|
+
/* @__PURE__ */ jsx33("p", { className: labelCustomClass, children: label.toUpperCase() }),
|
|
2286
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-1", children: [
|
|
2287
|
+
showPrefixImg && /* @__PURE__ */ jsx33(
|
|
1951
2288
|
BaseImage,
|
|
1952
2289
|
{
|
|
1953
2290
|
src: valueImageSrc,
|
|
@@ -1956,9 +2293,9 @@ var BaseLabelInfo = ({
|
|
|
1956
2293
|
customClass: valueImageCustomClass
|
|
1957
2294
|
}
|
|
1958
2295
|
),
|
|
1959
|
-
/* @__PURE__ */
|
|
1960
|
-
hasValueCopy && /* @__PURE__ */
|
|
1961
|
-
showSuffixImg && /* @__PURE__ */
|
|
2296
|
+
/* @__PURE__ */ jsx33("p", { className: valueCustomClass, children: value }),
|
|
2297
|
+
hasValueCopy && /* @__PURE__ */ jsx33(BaseCopy, { copyText: value, color: "#9DBFDE" }),
|
|
2298
|
+
showSuffixImg && /* @__PURE__ */ jsx33(
|
|
1962
2299
|
BaseImage,
|
|
1963
2300
|
{
|
|
1964
2301
|
src: valueImageSrc,
|
|
@@ -1972,7 +2309,7 @@ var BaseLabelInfo = ({
|
|
|
1972
2309
|
};
|
|
1973
2310
|
|
|
1974
2311
|
// src/components/base/success.tsx
|
|
1975
|
-
import { jsx as
|
|
2312
|
+
import { jsx as jsx34, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1976
2313
|
var BaseSuccess = ({
|
|
1977
2314
|
amount,
|
|
1978
2315
|
currency,
|
|
@@ -1993,17 +2330,17 @@ var BaseSuccess = ({
|
|
|
1993
2330
|
month: "long",
|
|
1994
2331
|
day: "2-digit"
|
|
1995
2332
|
}) : "---";
|
|
1996
|
-
return /* @__PURE__ */
|
|
1997
|
-
/* @__PURE__ */
|
|
1998
|
-
/* @__PURE__ */
|
|
1999
|
-
/* @__PURE__ */
|
|
2000
|
-
/* @__PURE__ */
|
|
2001
|
-
/* @__PURE__ */
|
|
2002
|
-
/* @__PURE__ */
|
|
2333
|
+
return /* @__PURE__ */ jsxs22("div", { className: "flex flex-col gap-8 p-16", children: [
|
|
2334
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex flex-col gap-8", children: [
|
|
2335
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex flex-col gap-8", children: [
|
|
2336
|
+
/* @__PURE__ */ jsx34(IconCheckCircle, { color: "#F47A1F", className: "mx-auto" }),
|
|
2337
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex flex-col text-center", style: { gap: "2px" }, children: [
|
|
2338
|
+
/* @__PURE__ */ jsx34("p", { className: "text-heading-text font-medium text-header-2xl", children: formatAmountHandler }),
|
|
2339
|
+
/* @__PURE__ */ jsx34("p", { className: "text-sub-copy font-regular text-body-3xs", children: "Has been paid successfully" })
|
|
2003
2340
|
] })
|
|
2004
2341
|
] }),
|
|
2005
|
-
/* @__PURE__ */
|
|
2006
|
-
/* @__PURE__ */
|
|
2342
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex flex-col", children: [
|
|
2343
|
+
/* @__PURE__ */ jsx34("div", { className: "py-4 border-b border-grey-100", children: /* @__PURE__ */ jsx34(
|
|
2007
2344
|
BaseLabelInfo,
|
|
2008
2345
|
{
|
|
2009
2346
|
type: "horizontal",
|
|
@@ -2012,7 +2349,7 @@ var BaseSuccess = ({
|
|
|
2012
2349
|
}
|
|
2013
2350
|
) }),
|
|
2014
2351
|
successObject.paymentDate,
|
|
2015
|
-
/* @__PURE__ */
|
|
2352
|
+
/* @__PURE__ */ jsx34("div", { className: "py-4", children: /* @__PURE__ */ jsx34(
|
|
2016
2353
|
BaseLabelInfo,
|
|
2017
2354
|
{
|
|
2018
2355
|
type: "horizontal",
|
|
@@ -2022,7 +2359,7 @@ var BaseSuccess = ({
|
|
|
2022
2359
|
) })
|
|
2023
2360
|
] })
|
|
2024
2361
|
] }),
|
|
2025
|
-
/* @__PURE__ */
|
|
2362
|
+
/* @__PURE__ */ jsx34("div", { className: "mx-auto", style: { width: "80%" }, children: /* @__PURE__ */ jsx34(
|
|
2026
2363
|
BaseButton,
|
|
2027
2364
|
{
|
|
2028
2365
|
label: "Return to Merchant Website",
|
|
@@ -2036,14 +2373,14 @@ var BaseSuccess = ({
|
|
|
2036
2373
|
};
|
|
2037
2374
|
|
|
2038
2375
|
// src/components/base/hint.tsx
|
|
2039
|
-
import { jsx as
|
|
2376
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2040
2377
|
function BaseHint({ hint }) {
|
|
2041
|
-
return /* @__PURE__ */
|
|
2378
|
+
return /* @__PURE__ */ jsx35("p", { className: "mb-0 text-body-3xs font-medium text-orange-500", children: hint });
|
|
2042
2379
|
}
|
|
2043
2380
|
|
|
2044
2381
|
// src/components/base/select.tsx
|
|
2045
2382
|
import React3 from "react";
|
|
2046
|
-
import { jsx as
|
|
2383
|
+
import { jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2047
2384
|
var BaseSelect = ({
|
|
2048
2385
|
options,
|
|
2049
2386
|
value,
|
|
@@ -2209,12 +2546,12 @@ var BaseSelect = ({
|
|
|
2209
2546
|
};
|
|
2210
2547
|
const containerBg = disabled ? "bg-grey-100 cursor-not-allowed" : "bg-white";
|
|
2211
2548
|
const containerBorder = validationError ? "border-red-300 bg-red-50" : "border-grey-100 bg-white";
|
|
2212
|
-
return /* @__PURE__ */
|
|
2213
|
-
label ? /* @__PURE__ */
|
|
2549
|
+
return /* @__PURE__ */ jsxs23("div", { className: `flex flex-col gap-2 relative ${className}`, children: [
|
|
2550
|
+
label ? /* @__PURE__ */ jsxs23("p", { className: "mb-0 text-body-2xs font-normal text-heading-text", children: [
|
|
2214
2551
|
label,
|
|
2215
|
-
required && /* @__PURE__ */
|
|
2552
|
+
required && /* @__PURE__ */ jsx36("span", { className: "text-orange-required", children: " *" })
|
|
2216
2553
|
] }) : null,
|
|
2217
|
-
/* @__PURE__ */
|
|
2554
|
+
/* @__PURE__ */ jsxs23(
|
|
2218
2555
|
"div",
|
|
2219
2556
|
{
|
|
2220
2557
|
ref: triggerRef,
|
|
@@ -2229,10 +2566,10 @@ var BaseSelect = ({
|
|
|
2229
2566
|
onClick: toggleMenu,
|
|
2230
2567
|
onKeyDown: onTriggerKeyDown,
|
|
2231
2568
|
children: [
|
|
2232
|
-
/* @__PURE__ */
|
|
2569
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2", children: [
|
|
2233
2570
|
prefix,
|
|
2234
|
-
/* @__PURE__ */
|
|
2235
|
-
selected && itemImageType === "country" && selected.countryCode && /* @__PURE__ */
|
|
2571
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2", children: [
|
|
2572
|
+
selected && itemImageType === "country" && selected.countryCode && /* @__PURE__ */ jsx36(
|
|
2236
2573
|
BaseImage,
|
|
2237
2574
|
{
|
|
2238
2575
|
src: `https://flagcdn.com/w40/${selected.countryCode.toLowerCase()}.png`,
|
|
@@ -2241,7 +2578,7 @@ var BaseSelect = ({
|
|
|
2241
2578
|
customClass: "rounded-lg"
|
|
2242
2579
|
}
|
|
2243
2580
|
),
|
|
2244
|
-
/* @__PURE__ */
|
|
2581
|
+
/* @__PURE__ */ jsx36(
|
|
2245
2582
|
"p",
|
|
2246
2583
|
{
|
|
2247
2584
|
className: `text-body-2xs font-normal mb-0 ${selected?.label ? "text-sub-copy" : "text-grey-500"}`,
|
|
@@ -2252,12 +2589,12 @@ var BaseSelect = ({
|
|
|
2252
2589
|
] }),
|
|
2253
2590
|
loading ? (
|
|
2254
2591
|
// Loader (replace with your own IconLoader if you have one)
|
|
2255
|
-
/* @__PURE__ */
|
|
2256
|
-
) : open ? /* @__PURE__ */
|
|
2592
|
+
/* @__PURE__ */ jsx36("span", { className: "inline-block h-4 w-4 border-2 border-current border-t-transparent rounded-full animate-spin" })
|
|
2593
|
+
) : open ? /* @__PURE__ */ jsx36(IconChevronUp, { color: "#8FAECA" }) : /* @__PURE__ */ jsx36(IconChevronDown, { color: "#8FAECA" })
|
|
2257
2594
|
]
|
|
2258
2595
|
}
|
|
2259
2596
|
),
|
|
2260
|
-
open && /* @__PURE__ */
|
|
2597
|
+
open && /* @__PURE__ */ jsxs23(
|
|
2261
2598
|
"div",
|
|
2262
2599
|
{
|
|
2263
2600
|
ref: menuRef,
|
|
@@ -2268,7 +2605,7 @@ var BaseSelect = ({
|
|
|
2268
2605
|
style: { position: "absolute", top: "100%", zIndex: 10 },
|
|
2269
2606
|
onKeyDown: onMenuKeyDown,
|
|
2270
2607
|
children: [
|
|
2271
|
-
hasSearch && /* @__PURE__ */
|
|
2608
|
+
hasSearch && /* @__PURE__ */ jsx36("div", { className: "px-4 pt-2 pb-1", children: /* @__PURE__ */ jsx36(
|
|
2272
2609
|
"input",
|
|
2273
2610
|
{
|
|
2274
2611
|
ref: searchRef,
|
|
@@ -2281,7 +2618,7 @@ var BaseSelect = ({
|
|
|
2281
2618
|
) }),
|
|
2282
2619
|
filtered.map((opt, i) => {
|
|
2283
2620
|
const selectedOpt = selected?.value === opt.value;
|
|
2284
|
-
return /* @__PURE__ */
|
|
2621
|
+
return /* @__PURE__ */ jsxs23(
|
|
2285
2622
|
"div",
|
|
2286
2623
|
{
|
|
2287
2624
|
onClick: () => commit(opt.value),
|
|
@@ -2291,7 +2628,7 @@ var BaseSelect = ({
|
|
|
2291
2628
|
"aria-selected": selectedOpt,
|
|
2292
2629
|
className: `px-4 py-3 first:pt-0 hover:bg-gray-100 flex items-center gap-2 cursor-pointer ${i === activeIndex ? "bg-gray-100" : ""}`,
|
|
2293
2630
|
children: [
|
|
2294
|
-
itemImageType === "country" && opt.countryCode && /* @__PURE__ */
|
|
2631
|
+
itemImageType === "country" && opt.countryCode && /* @__PURE__ */ jsx36(
|
|
2295
2632
|
BaseImage,
|
|
2296
2633
|
{
|
|
2297
2634
|
src: `https://flagcdn.com/w40/${opt.countryCode.toLowerCase()}.png`,
|
|
@@ -2300,7 +2637,7 @@ var BaseSelect = ({
|
|
|
2300
2637
|
customClass: "rounded-lg"
|
|
2301
2638
|
}
|
|
2302
2639
|
),
|
|
2303
|
-
/* @__PURE__ */
|
|
2640
|
+
/* @__PURE__ */ jsx36("p", { className: "mb-0 text-body-2xs font-medium", children: opt.label })
|
|
2304
2641
|
]
|
|
2305
2642
|
},
|
|
2306
2643
|
opt.value
|
|
@@ -2309,13 +2646,13 @@ var BaseSelect = ({
|
|
|
2309
2646
|
]
|
|
2310
2647
|
}
|
|
2311
2648
|
),
|
|
2312
|
-
hint && showBottomText && /* @__PURE__ */
|
|
2313
|
-
validationError && showBottomText && /* @__PURE__ */
|
|
2649
|
+
hint && showBottomText && /* @__PURE__ */ jsx36(BaseHint, { hint }),
|
|
2650
|
+
validationError && showBottomText && /* @__PURE__ */ jsx36(BaseInputError, { errorMessage: validationError })
|
|
2314
2651
|
] });
|
|
2315
2652
|
};
|
|
2316
2653
|
|
|
2317
2654
|
// src/components/base/currency-amount.tsx
|
|
2318
|
-
import { jsx as
|
|
2655
|
+
import { jsx as jsx37, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2319
2656
|
var BaseCurrencyAmount = ({
|
|
2320
2657
|
currency,
|
|
2321
2658
|
amount,
|
|
@@ -2326,10 +2663,10 @@ var BaseCurrencyAmount = ({
|
|
|
2326
2663
|
}) => {
|
|
2327
2664
|
const cur = currency?.toUpperCase();
|
|
2328
2665
|
if (cur !== "USDT" && cur !== "USDC") {
|
|
2329
|
-
return /* @__PURE__ */
|
|
2666
|
+
return /* @__PURE__ */ jsx37("p", { className: textClass, children: formatAmount(amount, cur) });
|
|
2330
2667
|
}
|
|
2331
|
-
return /* @__PURE__ */
|
|
2332
|
-
cur === "USDT" && /* @__PURE__ */
|
|
2668
|
+
return /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-1", children: [
|
|
2669
|
+
cur === "USDT" && /* @__PURE__ */ jsx37(
|
|
2333
2670
|
IconUsdt,
|
|
2334
2671
|
{
|
|
2335
2672
|
width: iconWidth,
|
|
@@ -2337,7 +2674,7 @@ var BaseCurrencyAmount = ({
|
|
|
2337
2674
|
color: iconColorClass
|
|
2338
2675
|
}
|
|
2339
2676
|
),
|
|
2340
|
-
cur === "USDC" && /* @__PURE__ */
|
|
2677
|
+
cur === "USDC" && /* @__PURE__ */ jsx37(
|
|
2341
2678
|
IconUsdc,
|
|
2342
2679
|
{
|
|
2343
2680
|
width: iconWidth,
|
|
@@ -2345,14 +2682,14 @@ var BaseCurrencyAmount = ({
|
|
|
2345
2682
|
color: iconColorClass
|
|
2346
2683
|
}
|
|
2347
2684
|
),
|
|
2348
|
-
/* @__PURE__ */
|
|
2685
|
+
/* @__PURE__ */ jsx37("p", { className: textClass, children: formatAmount(amount) })
|
|
2349
2686
|
] });
|
|
2350
2687
|
};
|
|
2351
2688
|
|
|
2352
2689
|
// src/components/base/input.tsx
|
|
2353
2690
|
import React4 from "react";
|
|
2354
2691
|
import { IMaskInput } from "react-imask";
|
|
2355
|
-
import { Fragment as Fragment2, jsx as
|
|
2692
|
+
import { Fragment as Fragment2, jsx as jsx38, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2356
2693
|
var BaseInput = ({
|
|
2357
2694
|
label = "",
|
|
2358
2695
|
type = "text",
|
|
@@ -2419,18 +2756,18 @@ var BaseInput = ({
|
|
|
2419
2756
|
setLocalError("Failed to copy text to clipboard");
|
|
2420
2757
|
});
|
|
2421
2758
|
};
|
|
2422
|
-
return /* @__PURE__ */
|
|
2423
|
-
label ? /* @__PURE__ */
|
|
2759
|
+
return /* @__PURE__ */ jsxs25("div", { className: `flex flex-col gap-2 ${className}`, children: [
|
|
2760
|
+
label ? /* @__PURE__ */ jsxs25("p", { className: "mb-0 text-body-2xs font-normal text-heading-text", children: [
|
|
2424
2761
|
label,
|
|
2425
|
-
required && /* @__PURE__ */
|
|
2762
|
+
required && /* @__PURE__ */ jsx38("span", { className: "text-orange-required", children: " *" })
|
|
2426
2763
|
] }) : null,
|
|
2427
|
-
/* @__PURE__ */
|
|
2764
|
+
/* @__PURE__ */ jsxs25(
|
|
2428
2765
|
"div",
|
|
2429
2766
|
{
|
|
2430
2767
|
className: `border-c px-3 py-2 flex items-center justify-between rounded-md h-12 ${containerBg} ${containerBorder}`,
|
|
2431
2768
|
children: [
|
|
2432
2769
|
prefix,
|
|
2433
|
-
/* @__PURE__ */
|
|
2770
|
+
/* @__PURE__ */ jsx38(
|
|
2434
2771
|
IMaskInput,
|
|
2435
2772
|
{
|
|
2436
2773
|
type,
|
|
@@ -2446,9 +2783,9 @@ var BaseInput = ({
|
|
|
2446
2783
|
className: "search-input bg-transparent outline-none border-none focus:outline-none focus:ring-0 text-body-2xs text-light-copy font-normal w-full"
|
|
2447
2784
|
}
|
|
2448
2785
|
),
|
|
2449
|
-
!loading ? /* @__PURE__ */
|
|
2786
|
+
!loading ? /* @__PURE__ */ jsxs25(Fragment2, { children: [
|
|
2450
2787
|
suffix,
|
|
2451
|
-
showCopyIcon && rawValue && rawValue.trim() !== "" && /* @__PURE__ */
|
|
2788
|
+
showCopyIcon && rawValue && rawValue.trim() !== "" && /* @__PURE__ */ jsx38(
|
|
2452
2789
|
BaseImage,
|
|
2453
2790
|
{
|
|
2454
2791
|
src: "assets/images/copyIcon.svg",
|
|
@@ -2459,18 +2796,18 @@ var BaseInput = ({
|
|
|
2459
2796
|
onClick: copyHandler
|
|
2460
2797
|
}
|
|
2461
2798
|
)
|
|
2462
|
-
] }) : /* @__PURE__ */
|
|
2799
|
+
] }) : /* @__PURE__ */ jsx38("div", { className: "animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full" })
|
|
2463
2800
|
]
|
|
2464
2801
|
}
|
|
2465
2802
|
),
|
|
2466
|
-
(hint || localHint) && showBottomText && /* @__PURE__ */
|
|
2467
|
-
(validationError || localError) && showBottomText && /* @__PURE__ */
|
|
2803
|
+
(hint || localHint) && showBottomText && /* @__PURE__ */ jsx38("p", { className: "text-body-3xs text-light-copy", children: localHint || hint }),
|
|
2804
|
+
(validationError || localError) && showBottomText && /* @__PURE__ */ jsx38("p", { className: "text-body-3xs text-red-500", children: localError || validationError })
|
|
2468
2805
|
] });
|
|
2469
2806
|
};
|
|
2470
2807
|
|
|
2471
2808
|
// src/components/base/circular-countdown.tsx
|
|
2472
2809
|
import { useMemo as useMemo2 } from "react";
|
|
2473
|
-
import { jsx as
|
|
2810
|
+
import { jsx as jsx39, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2474
2811
|
function BaseCircularCountdown({
|
|
2475
2812
|
value = 0,
|
|
2476
2813
|
total = 100,
|
|
@@ -2490,7 +2827,7 @@ function BaseCircularCountdown({
|
|
|
2490
2827
|
() => circumference * (1 - percentLeft / 100),
|
|
2491
2828
|
[circumference, percentLeft]
|
|
2492
2829
|
);
|
|
2493
|
-
return /* @__PURE__ */
|
|
2830
|
+
return /* @__PURE__ */ jsxs26(
|
|
2494
2831
|
"div",
|
|
2495
2832
|
{
|
|
2496
2833
|
style: {
|
|
@@ -2501,7 +2838,7 @@ function BaseCircularCountdown({
|
|
|
2501
2838
|
color
|
|
2502
2839
|
},
|
|
2503
2840
|
children: [
|
|
2504
|
-
/* @__PURE__ */
|
|
2841
|
+
/* @__PURE__ */ jsxs26(
|
|
2505
2842
|
"svg",
|
|
2506
2843
|
{
|
|
2507
2844
|
width: size,
|
|
@@ -2509,7 +2846,7 @@ function BaseCircularCountdown({
|
|
|
2509
2846
|
viewBox: `0 0 ${size} ${size}`,
|
|
2510
2847
|
"aria-hidden": "true",
|
|
2511
2848
|
children: [
|
|
2512
|
-
/* @__PURE__ */
|
|
2849
|
+
/* @__PURE__ */ jsx39(
|
|
2513
2850
|
"circle",
|
|
2514
2851
|
{
|
|
2515
2852
|
cx: size / 2,
|
|
@@ -2520,7 +2857,7 @@ function BaseCircularCountdown({
|
|
|
2520
2857
|
style: { stroke: "rgba(0, 0, 0, 0.12)" }
|
|
2521
2858
|
}
|
|
2522
2859
|
),
|
|
2523
|
-
/* @__PURE__ */
|
|
2860
|
+
/* @__PURE__ */ jsx39(
|
|
2524
2861
|
"circle",
|
|
2525
2862
|
{
|
|
2526
2863
|
cx: size / 2,
|
|
@@ -2542,7 +2879,7 @@ function BaseCircularCountdown({
|
|
|
2542
2879
|
]
|
|
2543
2880
|
}
|
|
2544
2881
|
),
|
|
2545
|
-
/* @__PURE__ */
|
|
2882
|
+
/* @__PURE__ */ jsx39(
|
|
2546
2883
|
"div",
|
|
2547
2884
|
{
|
|
2548
2885
|
className: "text-light-copy text-body-3xs",
|
|
@@ -2561,9 +2898,24 @@ function BaseCircularCountdown({
|
|
|
2561
2898
|
);
|
|
2562
2899
|
}
|
|
2563
2900
|
|
|
2901
|
+
// src/components/base/card-type.tsx
|
|
2902
|
+
import { jsx as jsx40, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2903
|
+
function BaseCardType({ cardType }) {
|
|
2904
|
+
if (!cardType) return null;
|
|
2905
|
+
return /* @__PURE__ */ jsxs27("div", { className: "bg-white p-1 rounded border flex justify-center items-center text-center", children: [
|
|
2906
|
+
cardType === "americanexpress" && /* @__PURE__ */ jsx40(IconAmex, {}),
|
|
2907
|
+
cardType === "mastercard" && /* @__PURE__ */ jsx40(IconMastercard, {}),
|
|
2908
|
+
cardType === "visa" && /* @__PURE__ */ jsx40(IconVisa, {}),
|
|
2909
|
+
cardType === "discover" && /* @__PURE__ */ jsx40(IconDiscover, {}),
|
|
2910
|
+
cardType === "jcb" && /* @__PURE__ */ jsx40(IconJcb, {}),
|
|
2911
|
+
cardType === "verve" && /* @__PURE__ */ jsx40(IconVerve, {}),
|
|
2912
|
+
cardType === "dinersclub" && /* @__PURE__ */ jsx40(IconDiners, {})
|
|
2913
|
+
] });
|
|
2914
|
+
}
|
|
2915
|
+
|
|
2564
2916
|
// src/buzapay-checkout/checkout-iframe.tsx
|
|
2565
2917
|
import { useCallback as useCallback2, useEffect as useEffect2, useRef, useState as useState2 } from "react";
|
|
2566
|
-
import { jsx as
|
|
2918
|
+
import { jsx as jsx41, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2567
2919
|
function BzpCheckoutIframe({
|
|
2568
2920
|
style = {
|
|
2569
2921
|
width: "100%",
|
|
@@ -2651,14 +3003,14 @@ function BzpCheckoutIframe({
|
|
|
2651
3003
|
if (!containerRef.current) return;
|
|
2652
3004
|
generatePaymentLinkHandler();
|
|
2653
3005
|
}, []);
|
|
2654
|
-
return /* @__PURE__ */
|
|
2655
|
-
/* @__PURE__ */
|
|
2656
|
-
loading && /* @__PURE__ */
|
|
3006
|
+
return /* @__PURE__ */ jsxs28("div", { className: "relative", style, children: [
|
|
3007
|
+
/* @__PURE__ */ jsx41("div", { ref: containerRef, className: "w-full h-full" }),
|
|
3008
|
+
loading && /* @__PURE__ */ jsx41("div", { className: "absolute inset-0 grid place-items-center bg-white/60", children: /* @__PURE__ */ jsx41(IconLoader, {}) })
|
|
2657
3009
|
] });
|
|
2658
3010
|
}
|
|
2659
3011
|
|
|
2660
3012
|
// src/buzapay-checkout/checkout-button.tsx
|
|
2661
|
-
import { jsx as
|
|
3013
|
+
import { jsx as jsx42, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2662
3014
|
function BzpCheckoutButton({
|
|
2663
3015
|
secretKey,
|
|
2664
3016
|
environment = "sandbox",
|
|
@@ -2715,15 +3067,15 @@ function BzpCheckoutButton({
|
|
|
2715
3067
|
setLoading(false);
|
|
2716
3068
|
}
|
|
2717
3069
|
};
|
|
2718
|
-
return urlLaunchUrl && mode === "iframe" ? /* @__PURE__ */
|
|
3070
|
+
return urlLaunchUrl && mode === "iframe" ? /* @__PURE__ */ jsx42(
|
|
2719
3071
|
BzpCheckoutIframe,
|
|
2720
3072
|
{
|
|
2721
3073
|
url: urlLaunchUrl,
|
|
2722
3074
|
secretKey,
|
|
2723
3075
|
environment
|
|
2724
3076
|
}
|
|
2725
|
-
) : /* @__PURE__ */
|
|
2726
|
-
/* @__PURE__ */
|
|
3077
|
+
) : /* @__PURE__ */ jsxs29("div", { children: [
|
|
3078
|
+
/* @__PURE__ */ jsx42(
|
|
2727
3079
|
BaseButton,
|
|
2728
3080
|
{
|
|
2729
3081
|
label: "Pay",
|
|
@@ -2733,7 +3085,7 @@ function BzpCheckoutButton({
|
|
|
2733
3085
|
onClick: generatePaymentLinkHandler
|
|
2734
3086
|
}
|
|
2735
3087
|
),
|
|
2736
|
-
/* @__PURE__ */
|
|
3088
|
+
/* @__PURE__ */ jsx42(BaseInputError, { errorMessage: message })
|
|
2737
3089
|
] });
|
|
2738
3090
|
}
|
|
2739
3091
|
|
|
@@ -2745,7 +3097,7 @@ import { useEffect as useEffect4, useRef as useRef2, useState as useState4 } fro
|
|
|
2745
3097
|
|
|
2746
3098
|
// src/components/base/phone-number-input.tsx
|
|
2747
3099
|
import React5, { useEffect as useEffect3 } from "react";
|
|
2748
|
-
import { jsx as
|
|
3100
|
+
import { jsx as jsx43, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2749
3101
|
var BasePhoneNumberInput = ({
|
|
2750
3102
|
phoneCodeOptions,
|
|
2751
3103
|
value,
|
|
@@ -2784,13 +3136,13 @@ var BasePhoneNumberInput = ({
|
|
|
2784
3136
|
setSelectedCode(nextValue);
|
|
2785
3137
|
onCodeChange?.(getFormattedCode(nextValue));
|
|
2786
3138
|
}, [defaultCountryCode]);
|
|
2787
|
-
return /* @__PURE__ */
|
|
2788
|
-
label ? /* @__PURE__ */
|
|
3139
|
+
return /* @__PURE__ */ jsxs30("div", { className: `flex flex-col gap-2`, children: [
|
|
3140
|
+
label ? /* @__PURE__ */ jsxs30("p", { className: "mb-0 text-body-2xs font-normal text-heading-text", children: [
|
|
2789
3141
|
label,
|
|
2790
|
-
required && /* @__PURE__ */
|
|
3142
|
+
required && /* @__PURE__ */ jsx43("span", { className: "text-orange-required", children: " *" })
|
|
2791
3143
|
] }) : null,
|
|
2792
|
-
/* @__PURE__ */
|
|
2793
|
-
/* @__PURE__ */
|
|
3144
|
+
/* @__PURE__ */ jsxs30("div", { className: `flex items-center gap-2 ${containerClassName}`, children: [
|
|
3145
|
+
/* @__PURE__ */ jsx43("div", { className: "w-1/3", children: /* @__PURE__ */ jsx43(
|
|
2794
3146
|
BaseSelect,
|
|
2795
3147
|
{
|
|
2796
3148
|
required: true,
|
|
@@ -2803,7 +3155,7 @@ var BasePhoneNumberInput = ({
|
|
|
2803
3155
|
placeholder: "+234"
|
|
2804
3156
|
}
|
|
2805
3157
|
) }),
|
|
2806
|
-
/* @__PURE__ */
|
|
3158
|
+
/* @__PURE__ */ jsx43("div", { className: "w-2/3", children: /* @__PURE__ */ jsx43(
|
|
2807
3159
|
BaseInput,
|
|
2808
3160
|
{
|
|
2809
3161
|
className: inputClassName,
|
|
@@ -2822,14 +3174,14 @@ var BasePhoneNumberInput = ({
|
|
|
2822
3174
|
}
|
|
2823
3175
|
) })
|
|
2824
3176
|
] }),
|
|
2825
|
-
hint && /* @__PURE__ */
|
|
2826
|
-
validationError && /* @__PURE__ */
|
|
3177
|
+
hint && /* @__PURE__ */ jsx43("p", { className: "text-body-3xs text-light-copy", children: hint }),
|
|
3178
|
+
validationError && /* @__PURE__ */ jsx43("p", { className: "text-body-3xs text-red-500", children: validationError })
|
|
2827
3179
|
] });
|
|
2828
3180
|
};
|
|
2829
3181
|
|
|
2830
3182
|
// src/components/pay-by-card.tsx
|
|
2831
3183
|
import toast, { Toaster } from "react-hot-toast";
|
|
2832
|
-
import { jsx as
|
|
3184
|
+
import { jsx as jsx44, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2833
3185
|
function PayByCard({
|
|
2834
3186
|
secretKey,
|
|
2835
3187
|
paymentObject,
|
|
@@ -2899,8 +3251,7 @@ function PayByCard({
|
|
|
2899
3251
|
cardNo: "required|num_spaces",
|
|
2900
3252
|
expireDate: "required",
|
|
2901
3253
|
cvv: "required|numeric",
|
|
2902
|
-
cardPin:
|
|
2903
|
-
// optional unless Verve
|
|
3254
|
+
cardPin: paymentObject.currency === "NGN" ? "required|numeric" : ""
|
|
2904
3255
|
};
|
|
2905
3256
|
const otpRules = {
|
|
2906
3257
|
otp: "required"
|
|
@@ -3068,7 +3419,9 @@ function PayByCard({
|
|
|
3068
3419
|
cvv: payForm.cvv ?? "",
|
|
3069
3420
|
cardScheme: cardType,
|
|
3070
3421
|
nameOnCard: payForm.customerName ?? "",
|
|
3071
|
-
...
|
|
3422
|
+
...paymentObject.currency === "NGN" && {
|
|
3423
|
+
pin: payForm.cardPin ?? ""
|
|
3424
|
+
}
|
|
3072
3425
|
};
|
|
3073
3426
|
const billingDetails = {
|
|
3074
3427
|
address1: billingForm.address1 ?? "",
|
|
@@ -3338,7 +3691,6 @@ function PayByCard({
|
|
|
3338
3691
|
};
|
|
3339
3692
|
const cardNumberInputHandler = (event) => {
|
|
3340
3693
|
setCardType(cardTypeHandler(event));
|
|
3341
|
-
payRules.cardPin = cardType === "Verve" ? "required|numeric" : "";
|
|
3342
3694
|
};
|
|
3343
3695
|
useEffect4(() => {
|
|
3344
3696
|
(async () => {
|
|
@@ -3356,7 +3708,7 @@ function PayByCard({
|
|
|
3356
3708
|
setPhoneCodeOptions(codeOptions);
|
|
3357
3709
|
})();
|
|
3358
3710
|
}, []);
|
|
3359
|
-
return threeDSOpen ? /* @__PURE__ */
|
|
3711
|
+
return threeDSOpen ? /* @__PURE__ */ jsx44("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-white p-4", children: /* @__PURE__ */ jsx44(
|
|
3360
3712
|
"iframe",
|
|
3361
3713
|
{
|
|
3362
3714
|
title: "Miden 3DS",
|
|
@@ -3364,11 +3716,11 @@ function PayByCard({
|
|
|
3364
3716
|
className: "w-full h-full",
|
|
3365
3717
|
sandbox: "allow-forms allow-scripts allow-same-origin allow-top-navigation"
|
|
3366
3718
|
}
|
|
3367
|
-
) }) : /* @__PURE__ */
|
|
3368
|
-
/* @__PURE__ */
|
|
3369
|
-
/* @__PURE__ */
|
|
3370
|
-
formIndex === 0 && /* @__PURE__ */
|
|
3371
|
-
/* @__PURE__ */
|
|
3719
|
+
) }) : /* @__PURE__ */ jsxs31("div", { children: [
|
|
3720
|
+
/* @__PURE__ */ jsx44(Toaster, {}),
|
|
3721
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-6", children: [
|
|
3722
|
+
formIndex === 0 && /* @__PURE__ */ jsxs31("div", { className: "grid grid-cols-2 gap-6 overflow-y-auto", children: [
|
|
3723
|
+
/* @__PURE__ */ jsx44("div", { className: "col-span-2", children: /* @__PURE__ */ jsx44(
|
|
3372
3724
|
BaseInput,
|
|
3373
3725
|
{
|
|
3374
3726
|
label: "Address Line 1",
|
|
@@ -3383,7 +3735,7 @@ function PayByCard({
|
|
|
3383
3735
|
validationError: billingErrors.address1 ?? ""
|
|
3384
3736
|
}
|
|
3385
3737
|
) }),
|
|
3386
|
-
/* @__PURE__ */
|
|
3738
|
+
/* @__PURE__ */ jsx44("div", { className: "col-span-2", children: /* @__PURE__ */ jsx44(
|
|
3387
3739
|
BaseInput,
|
|
3388
3740
|
{
|
|
3389
3741
|
label: "Address Line 2",
|
|
@@ -3392,7 +3744,7 @@ function PayByCard({
|
|
|
3392
3744
|
validationError: billingErrors.address2 ?? ""
|
|
3393
3745
|
}
|
|
3394
3746
|
) }),
|
|
3395
|
-
/* @__PURE__ */
|
|
3747
|
+
/* @__PURE__ */ jsx44("div", { className: "col-span-2 sm:col-span-1", children: /* @__PURE__ */ jsx44(
|
|
3396
3748
|
BaseSelect,
|
|
3397
3749
|
{
|
|
3398
3750
|
label: "Select Country",
|
|
@@ -3418,7 +3770,7 @@ function PayByCard({
|
|
|
3418
3770
|
validationError: billingErrors.country ?? ""
|
|
3419
3771
|
}
|
|
3420
3772
|
) }),
|
|
3421
|
-
/* @__PURE__ */
|
|
3773
|
+
/* @__PURE__ */ jsx44("div", { className: "col-span-2 sm:col-span-1", children: /* @__PURE__ */ jsx44(
|
|
3422
3774
|
BaseSelect,
|
|
3423
3775
|
{
|
|
3424
3776
|
label: "Select State",
|
|
@@ -3435,7 +3787,7 @@ function PayByCard({
|
|
|
3435
3787
|
validationError: billingErrors.state ?? ""
|
|
3436
3788
|
}
|
|
3437
3789
|
) }),
|
|
3438
|
-
/* @__PURE__ */
|
|
3790
|
+
/* @__PURE__ */ jsx44("div", { className: "col-span-2 sm:col-span-1", children: /* @__PURE__ */ jsx44(
|
|
3439
3791
|
BaseInput,
|
|
3440
3792
|
{
|
|
3441
3793
|
label: "City",
|
|
@@ -3450,7 +3802,7 @@ function PayByCard({
|
|
|
3450
3802
|
validationError: billingErrors.city ?? ""
|
|
3451
3803
|
}
|
|
3452
3804
|
) }),
|
|
3453
|
-
/* @__PURE__ */
|
|
3805
|
+
/* @__PURE__ */ jsx44("div", { className: "col-span-2 sm:col-span-1", children: /* @__PURE__ */ jsx44(
|
|
3454
3806
|
BaseInput,
|
|
3455
3807
|
{
|
|
3456
3808
|
label: "Postal Code",
|
|
@@ -3465,7 +3817,7 @@ function PayByCard({
|
|
|
3465
3817
|
validationError: billingErrors.postalCode ?? ""
|
|
3466
3818
|
}
|
|
3467
3819
|
) }),
|
|
3468
|
-
/* @__PURE__ */
|
|
3820
|
+
/* @__PURE__ */ jsx44("div", { className: "col-span-2", children: /* @__PURE__ */ jsx44(
|
|
3469
3821
|
BaseInput,
|
|
3470
3822
|
{
|
|
3471
3823
|
label: "Email",
|
|
@@ -3480,7 +3832,7 @@ function PayByCard({
|
|
|
3480
3832
|
validationError: billingErrors.emailAddress ?? ""
|
|
3481
3833
|
}
|
|
3482
3834
|
) }),
|
|
3483
|
-
/* @__PURE__ */
|
|
3835
|
+
/* @__PURE__ */ jsx44("div", { className: "col-span-2", children: /* @__PURE__ */ jsx44(
|
|
3484
3836
|
BasePhoneNumberInput,
|
|
3485
3837
|
{
|
|
3486
3838
|
label: "Phone Number",
|
|
@@ -3505,13 +3857,13 @@ function PayByCard({
|
|
|
3505
3857
|
}
|
|
3506
3858
|
) })
|
|
3507
3859
|
] }),
|
|
3508
|
-
formIndex === 1 && /* @__PURE__ */
|
|
3860
|
+
formIndex === 1 && /* @__PURE__ */ jsxs31(
|
|
3509
3861
|
"div",
|
|
3510
3862
|
{
|
|
3511
3863
|
className: "grid grid-cols-2 gap-6 overflow-y-auto",
|
|
3512
3864
|
style: { maxHeight: 320 },
|
|
3513
3865
|
children: [
|
|
3514
|
-
/* @__PURE__ */
|
|
3866
|
+
/* @__PURE__ */ jsx44("div", { className: "col-span-2", children: /* @__PURE__ */ jsx44(
|
|
3515
3867
|
BaseInput,
|
|
3516
3868
|
{
|
|
3517
3869
|
label: "Card Name",
|
|
@@ -3526,7 +3878,7 @@ function PayByCard({
|
|
|
3526
3878
|
validationError: payErrors.customerName ?? ""
|
|
3527
3879
|
}
|
|
3528
3880
|
) }),
|
|
3529
|
-
/* @__PURE__ */
|
|
3881
|
+
/* @__PURE__ */ jsx44("div", { className: "col-span-2", children: /* @__PURE__ */ jsx44(
|
|
3530
3882
|
BaseInput,
|
|
3531
3883
|
{
|
|
3532
3884
|
label: "Card Number",
|
|
@@ -3542,10 +3894,11 @@ function PayByCard({
|
|
|
3542
3894
|
setPayErrors((er) => ({ ...er, cardNo: "" }));
|
|
3543
3895
|
cardNumberInputHandler(e);
|
|
3544
3896
|
},
|
|
3545
|
-
validationError: payErrors.cardNo ?? ""
|
|
3897
|
+
validationError: payErrors.cardNo ?? "",
|
|
3898
|
+
suffix: /* @__PURE__ */ jsx44(BaseCardType, { cardType: cardType.toLowerCase() })
|
|
3546
3899
|
}
|
|
3547
3900
|
) }),
|
|
3548
|
-
/* @__PURE__ */
|
|
3901
|
+
/* @__PURE__ */ jsx44(
|
|
3549
3902
|
BaseInput,
|
|
3550
3903
|
{
|
|
3551
3904
|
label: "Expiry Date",
|
|
@@ -3561,7 +3914,7 @@ function PayByCard({
|
|
|
3561
3914
|
validationError: payErrors.expireDate ?? ""
|
|
3562
3915
|
}
|
|
3563
3916
|
),
|
|
3564
|
-
/* @__PURE__ */
|
|
3917
|
+
/* @__PURE__ */ jsx44(
|
|
3565
3918
|
BaseInput,
|
|
3566
3919
|
{
|
|
3567
3920
|
label: "CVV",
|
|
@@ -3577,7 +3930,7 @@ function PayByCard({
|
|
|
3577
3930
|
validationError: payErrors.cvv ?? ""
|
|
3578
3931
|
}
|
|
3579
3932
|
),
|
|
3580
|
-
|
|
3933
|
+
paymentObject.currency === "NGN" && /* @__PURE__ */ jsx44(
|
|
3581
3934
|
BaseInput,
|
|
3582
3935
|
{
|
|
3583
3936
|
label: "Card Pin",
|
|
@@ -3598,13 +3951,13 @@ function PayByCard({
|
|
|
3598
3951
|
]
|
|
3599
3952
|
}
|
|
3600
3953
|
),
|
|
3601
|
-
formIndex === 2 && /* @__PURE__ */
|
|
3954
|
+
formIndex === 2 && /* @__PURE__ */ jsx44(
|
|
3602
3955
|
"div",
|
|
3603
3956
|
{
|
|
3604
3957
|
className: "grid grid-cols-2 gap-6 overflow-y-auto",
|
|
3605
3958
|
style: { maxHeight: 320 },
|
|
3606
|
-
children: /* @__PURE__ */
|
|
3607
|
-
/* @__PURE__ */
|
|
3959
|
+
children: /* @__PURE__ */ jsxs31("div", { className: "col-span-2", children: [
|
|
3960
|
+
/* @__PURE__ */ jsx44(
|
|
3608
3961
|
BaseInput,
|
|
3609
3962
|
{
|
|
3610
3963
|
label: "OTP",
|
|
@@ -3619,9 +3972,9 @@ function PayByCard({
|
|
|
3619
3972
|
validationError: otpErrors.otp ?? ""
|
|
3620
3973
|
}
|
|
3621
3974
|
),
|
|
3622
|
-
/* @__PURE__ */
|
|
3975
|
+
/* @__PURE__ */ jsxs31("p", { className: "text-primary text-sm mt-2", children: [
|
|
3623
3976
|
"Didn't get OTP?",
|
|
3624
|
-
/* @__PURE__ */
|
|
3977
|
+
/* @__PURE__ */ jsx44(
|
|
3625
3978
|
"span",
|
|
3626
3979
|
{
|
|
3627
3980
|
className: isSendingOtp ? "ml-1" : "ml-1 underline cursor-pointer",
|
|
@@ -3636,8 +3989,8 @@ function PayByCard({
|
|
|
3636
3989
|
] })
|
|
3637
3990
|
}
|
|
3638
3991
|
),
|
|
3639
|
-
/* @__PURE__ */
|
|
3640
|
-
formIndex < 2 && /* @__PURE__ */
|
|
3992
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-between gap-4 mt-6", children: [
|
|
3993
|
+
formIndex < 2 && /* @__PURE__ */ jsx44(
|
|
3641
3994
|
BaseButton,
|
|
3642
3995
|
{
|
|
3643
3996
|
label: "Previous",
|
|
@@ -3647,7 +4000,7 @@ function PayByCard({
|
|
|
3647
4000
|
onClick: goBack
|
|
3648
4001
|
}
|
|
3649
4002
|
),
|
|
3650
|
-
formIndex < 2 && /* @__PURE__ */
|
|
4003
|
+
formIndex < 2 && /* @__PURE__ */ jsx44(
|
|
3651
4004
|
BaseButton,
|
|
3652
4005
|
{
|
|
3653
4006
|
label: formIndex === 0 ? "Proceed" : `Pay ${formatAmountHandler}`,
|
|
@@ -3659,7 +4012,7 @@ function PayByCard({
|
|
|
3659
4012
|
disabled: isMakingPayment
|
|
3660
4013
|
}
|
|
3661
4014
|
),
|
|
3662
|
-
formIndex === 2 && /* @__PURE__ */
|
|
4015
|
+
formIndex === 2 && /* @__PURE__ */ jsx44("div", { className: "w-full", children: /* @__PURE__ */ jsx44(
|
|
3663
4016
|
BaseButton,
|
|
3664
4017
|
{
|
|
3665
4018
|
label: "Validate OTP",
|
|
@@ -3682,7 +4035,7 @@ import {
|
|
|
3682
4035
|
useRef as useRef3,
|
|
3683
4036
|
useState as useState5
|
|
3684
4037
|
} from "react";
|
|
3685
|
-
import { jsx as
|
|
4038
|
+
import { jsx as jsx45, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3686
4039
|
var PayByTransfer = ({
|
|
3687
4040
|
secretKey,
|
|
3688
4041
|
paymentObject,
|
|
@@ -3913,9 +4266,9 @@ var PayByTransfer = ({
|
|
|
3913
4266
|
stopTimer();
|
|
3914
4267
|
}
|
|
3915
4268
|
}, [remainingSeconds]);
|
|
3916
|
-
return /* @__PURE__ */
|
|
3917
|
-
formIndex === 0 && /* @__PURE__ */
|
|
3918
|
-
/* @__PURE__ */
|
|
4269
|
+
return /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-10", children: [
|
|
4270
|
+
formIndex === 0 && /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-10", children: [
|
|
4271
|
+
/* @__PURE__ */ jsx45(
|
|
3919
4272
|
BaseInput,
|
|
3920
4273
|
{
|
|
3921
4274
|
label: "Customer Name",
|
|
@@ -3930,7 +4283,7 @@ var PayByTransfer = ({
|
|
|
3930
4283
|
validationError: transferErrors.customerName ?? ""
|
|
3931
4284
|
}
|
|
3932
4285
|
),
|
|
3933
|
-
/* @__PURE__ */
|
|
4286
|
+
/* @__PURE__ */ jsx45(
|
|
3934
4287
|
BaseButton,
|
|
3935
4288
|
{
|
|
3936
4289
|
label: `Pay ${formatAmountHandler}`,
|
|
@@ -3942,8 +4295,8 @@ var PayByTransfer = ({
|
|
|
3942
4295
|
}
|
|
3943
4296
|
)
|
|
3944
4297
|
] }),
|
|
3945
|
-
formIndex === 1 && /* @__PURE__ */
|
|
3946
|
-
/* @__PURE__ */
|
|
4298
|
+
formIndex === 1 && /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-10", children: [
|
|
4299
|
+
/* @__PURE__ */ jsxs32(
|
|
3947
4300
|
"div",
|
|
3948
4301
|
{
|
|
3949
4302
|
className: [
|
|
@@ -3951,29 +4304,29 @@ var PayByTransfer = ({
|
|
|
3951
4304
|
caller === "miden" ? "bg-[#FAFDFF] border border-[#F0FAFF]" : "bg-[#EFF7FF]"
|
|
3952
4305
|
].join(" "),
|
|
3953
4306
|
children: [
|
|
3954
|
-
/* @__PURE__ */
|
|
4307
|
+
/* @__PURE__ */ jsx45(
|
|
3955
4308
|
BaseLabelInfo,
|
|
3956
4309
|
{
|
|
3957
4310
|
label: "Bank Name",
|
|
3958
4311
|
value: paymentAccountDetails?.bank
|
|
3959
4312
|
}
|
|
3960
4313
|
),
|
|
3961
|
-
/* @__PURE__ */
|
|
4314
|
+
/* @__PURE__ */ jsx45(
|
|
3962
4315
|
BaseLabelInfo,
|
|
3963
4316
|
{
|
|
3964
4317
|
label: "Account Name",
|
|
3965
4318
|
value: paymentAccountDetails?.accountName
|
|
3966
4319
|
}
|
|
3967
4320
|
),
|
|
3968
|
-
/* @__PURE__ */
|
|
3969
|
-
/* @__PURE__ */
|
|
4321
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center justify-between", children: [
|
|
4322
|
+
/* @__PURE__ */ jsx45(
|
|
3970
4323
|
BaseLabelInfo,
|
|
3971
4324
|
{
|
|
3972
4325
|
label: "Account Number",
|
|
3973
4326
|
value: paymentAccountDetails?.accountNumber
|
|
3974
4327
|
}
|
|
3975
4328
|
),
|
|
3976
|
-
/* @__PURE__ */
|
|
4329
|
+
/* @__PURE__ */ jsx45(
|
|
3977
4330
|
BaseCopy,
|
|
3978
4331
|
{
|
|
3979
4332
|
color: "#9DBFDE",
|
|
@@ -3981,20 +4334,20 @@ var PayByTransfer = ({
|
|
|
3981
4334
|
}
|
|
3982
4335
|
)
|
|
3983
4336
|
] }),
|
|
3984
|
-
/* @__PURE__ */
|
|
3985
|
-
/* @__PURE__ */
|
|
3986
|
-
/* @__PURE__ */
|
|
4337
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center justify-between", children: [
|
|
4338
|
+
/* @__PURE__ */ jsx45(BaseLabelInfo, { label: "Amount", value: formatAmountHandler }),
|
|
4339
|
+
/* @__PURE__ */ jsx45(BaseCopy, { color: "#9DBFDE", copyText: formatAmountHandler })
|
|
3987
4340
|
] })
|
|
3988
4341
|
]
|
|
3989
4342
|
}
|
|
3990
4343
|
),
|
|
3991
|
-
caller === "buzapay" && /* @__PURE__ */
|
|
4344
|
+
caller === "buzapay" && /* @__PURE__ */ jsxs32("p", { className: "w-2/3 mx-auto text-center text-body-2xs font-medium text-sub-copy", children: [
|
|
3992
4345
|
"This account is for this transaction only and expires in",
|
|
3993
4346
|
" ",
|
|
3994
|
-
/* @__PURE__ */
|
|
4347
|
+
/* @__PURE__ */ jsx45("span", { className: "text-orange-500", children: remainingSeconds >= 0 ? countDownTime : "00:00" })
|
|
3995
4348
|
] }),
|
|
3996
|
-
caller === "miden" && /* @__PURE__ */
|
|
3997
|
-
/* @__PURE__ */
|
|
4349
|
+
caller === "miden" && /* @__PURE__ */ jsxs32("div", { className: "p-4 rounded-lg bg-[#FAFDFF] flex items-center gap-3", children: [
|
|
4350
|
+
/* @__PURE__ */ jsx45(
|
|
3998
4351
|
BaseCircularCountdown,
|
|
3999
4352
|
{
|
|
4000
4353
|
value: remainingSeconds,
|
|
@@ -4005,16 +4358,16 @@ var PayByTransfer = ({
|
|
|
4005
4358
|
color: "#3b82f6"
|
|
4006
4359
|
}
|
|
4007
4360
|
),
|
|
4008
|
-
/* @__PURE__ */
|
|
4361
|
+
/* @__PURE__ */ jsxs32("p", { className: "text-body-3xs font-medium text-light-copy", children: [
|
|
4009
4362
|
"This account is for this transaction only and expires in",
|
|
4010
|
-
/* @__PURE__ */
|
|
4363
|
+
/* @__PURE__ */ jsxs32("span", { className: "text-[#1383E8] ml-2", children: [
|
|
4011
4364
|
countDownTime,
|
|
4012
4365
|
"..."
|
|
4013
4366
|
] })
|
|
4014
4367
|
] })
|
|
4015
4368
|
] }),
|
|
4016
|
-
/* @__PURE__ */
|
|
4017
|
-
/* @__PURE__ */
|
|
4369
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-4", children: [
|
|
4370
|
+
/* @__PURE__ */ jsx45(
|
|
4018
4371
|
BaseButton,
|
|
4019
4372
|
{
|
|
4020
4373
|
label: "I have paid the money",
|
|
@@ -4025,7 +4378,7 @@ var PayByTransfer = ({
|
|
|
4025
4378
|
onClick: getReferenceDetails
|
|
4026
4379
|
}
|
|
4027
4380
|
),
|
|
4028
|
-
/* @__PURE__ */
|
|
4381
|
+
/* @__PURE__ */ jsx45(
|
|
4029
4382
|
"button",
|
|
4030
4383
|
{
|
|
4031
4384
|
type: "button",
|
|
@@ -4041,7 +4394,7 @@ var PayByTransfer = ({
|
|
|
4041
4394
|
|
|
4042
4395
|
// src/components/pay-by-stable-coin.tsx
|
|
4043
4396
|
import { useEffect as useEffect6, useState as useState6 } from "react";
|
|
4044
|
-
import { Fragment as Fragment3, jsx as
|
|
4397
|
+
import { Fragment as Fragment3, jsx as jsx46, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4045
4398
|
var PayByStableCoin = ({
|
|
4046
4399
|
secretKey,
|
|
4047
4400
|
paymentObject,
|
|
@@ -4140,9 +4493,10 @@ var PayByStableCoin = ({
|
|
|
4140
4493
|
environment,
|
|
4141
4494
|
caller
|
|
4142
4495
|
);
|
|
4496
|
+
const newResponse = caller === "buzapay" ? response.data : response.stableCoins;
|
|
4143
4497
|
if (response?.isSuccessful) {
|
|
4144
4498
|
setStableCoins(
|
|
4145
|
-
|
|
4499
|
+
newResponse?.map((c) => ({
|
|
4146
4500
|
label: c.name,
|
|
4147
4501
|
value: c.name
|
|
4148
4502
|
})) ?? []
|
|
@@ -4268,10 +4622,10 @@ var PayByStableCoin = ({
|
|
|
4268
4622
|
await getAllStableCoins();
|
|
4269
4623
|
})();
|
|
4270
4624
|
}, []);
|
|
4271
|
-
return /* @__PURE__ */
|
|
4272
|
-
formIndex === 0 && /* @__PURE__ */
|
|
4273
|
-
/* @__PURE__ */
|
|
4274
|
-
/* @__PURE__ */
|
|
4625
|
+
return /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-6", children: [
|
|
4626
|
+
formIndex === 0 && /* @__PURE__ */ jsxs33(Fragment3, { children: [
|
|
4627
|
+
/* @__PURE__ */ jsxs33("div", { className: "grid grid-cols-1 gap-6", children: [
|
|
4628
|
+
/* @__PURE__ */ jsx46(
|
|
4275
4629
|
BaseSelect,
|
|
4276
4630
|
{
|
|
4277
4631
|
label: "Select Crypto",
|
|
@@ -4289,7 +4643,7 @@ var PayByStableCoin = ({
|
|
|
4289
4643
|
validationError: stableCoinErrors.stableCoin ?? ""
|
|
4290
4644
|
}
|
|
4291
4645
|
),
|
|
4292
|
-
/* @__PURE__ */
|
|
4646
|
+
/* @__PURE__ */ jsx46(
|
|
4293
4647
|
BaseSelect,
|
|
4294
4648
|
{
|
|
4295
4649
|
label: "Select Network",
|
|
@@ -4307,7 +4661,7 @@ var PayByStableCoin = ({
|
|
|
4307
4661
|
}
|
|
4308
4662
|
)
|
|
4309
4663
|
] }),
|
|
4310
|
-
/* @__PURE__ */
|
|
4664
|
+
/* @__PURE__ */ jsx46(
|
|
4311
4665
|
BaseButton,
|
|
4312
4666
|
{
|
|
4313
4667
|
label: `Pay ${formatAmountHandler}`,
|
|
@@ -4319,22 +4673,22 @@ var PayByStableCoin = ({
|
|
|
4319
4673
|
}
|
|
4320
4674
|
)
|
|
4321
4675
|
] }),
|
|
4322
|
-
formIndex === 1 && /* @__PURE__ */
|
|
4323
|
-
caller === "buzapay" && /* @__PURE__ */
|
|
4324
|
-
/* @__PURE__ */
|
|
4325
|
-
/* @__PURE__ */
|
|
4326
|
-
/* @__PURE__ */
|
|
4676
|
+
formIndex === 1 && /* @__PURE__ */ jsxs33("div", { children: [
|
|
4677
|
+
caller === "buzapay" && /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-6", children: [
|
|
4678
|
+
/* @__PURE__ */ jsxs33("div", { className: "mx-auto", children: [
|
|
4679
|
+
/* @__PURE__ */ jsx46(IconQrCode, {}),
|
|
4680
|
+
/* @__PURE__ */ jsx46("p", { className: "mb-0 text-body-4xs text-light-copy font-normal text-center", children: generateAddressPayload?.currency })
|
|
4327
4681
|
] }),
|
|
4328
|
-
/* @__PURE__ */
|
|
4329
|
-
/* @__PURE__ */
|
|
4330
|
-
/* @__PURE__ */
|
|
4331
|
-
/* @__PURE__ */
|
|
4332
|
-
/* @__PURE__ */
|
|
4333
|
-
/* @__PURE__ */
|
|
4334
|
-
/* @__PURE__ */
|
|
4335
|
-
/* @__PURE__ */
|
|
4336
|
-
/* @__PURE__ */
|
|
4337
|
-
/* @__PURE__ */
|
|
4682
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-6 border-c border-grey-100 p-4 rounded-2xl bg-light-white-50", children: [
|
|
4683
|
+
/* @__PURE__ */ jsxs33("div", { className: "border-b border-grey-border pb-4 flex flex-col gap-2", children: [
|
|
4684
|
+
/* @__PURE__ */ jsx46("p", { className: "mb-0 text-body-3xs text-light-copy font-normal", children: "Network" }),
|
|
4685
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex justify-between", children: [
|
|
4686
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-1", children: [
|
|
4687
|
+
/* @__PURE__ */ jsx46("p", { className: "mb-0 text-body-2xs font-medium text-sub-copy", children: addressDetails?.chain }),
|
|
4688
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-2", children: [
|
|
4689
|
+
/* @__PURE__ */ jsx46("p", { className: "mb-0 text-body-3xs text-light-copy font-normal", children: "*Est. arrival = 3 mins" }),
|
|
4690
|
+
/* @__PURE__ */ jsx46("p", { className: "mb-0 text-body-3xs text-light-copy font-normal", children: "|" }),
|
|
4691
|
+
/* @__PURE__ */ jsx46(
|
|
4338
4692
|
BaseCurrencyAmount,
|
|
4339
4693
|
{
|
|
4340
4694
|
currency: generateAddressPayload?.currency ?? "",
|
|
@@ -4347,21 +4701,21 @@ var PayByStableCoin = ({
|
|
|
4347
4701
|
)
|
|
4348
4702
|
] })
|
|
4349
4703
|
] }),
|
|
4350
|
-
/* @__PURE__ */
|
|
4704
|
+
/* @__PURE__ */ jsx46(IconArrowSwap, {})
|
|
4351
4705
|
] })
|
|
4352
4706
|
] }),
|
|
4353
|
-
/* @__PURE__ */
|
|
4354
|
-
/* @__PURE__ */
|
|
4355
|
-
/* @__PURE__ */
|
|
4356
|
-
/* @__PURE__ */
|
|
4357
|
-
/* @__PURE__ */
|
|
4707
|
+
/* @__PURE__ */ jsxs33("div", { className: "pb-4 flex flex-col gap-2", children: [
|
|
4708
|
+
/* @__PURE__ */ jsx46("p", { className: "mb-0 text-body-3xs text-light-copy font-normal", children: "Deposit Address >" }),
|
|
4709
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex justify-between", children: [
|
|
4710
|
+
/* @__PURE__ */ jsx46("p", { className: "mb-0 text-body-2xs font-medium text-sub-copy w-2/3 break-words", children: addressDetails?.walletAddress }),
|
|
4711
|
+
/* @__PURE__ */ jsx46(BaseCopy, { copyText: addressDetails?.walletAddress ?? "" })
|
|
4358
4712
|
] })
|
|
4359
4713
|
] })
|
|
4360
4714
|
] }),
|
|
4361
|
-
/* @__PURE__ */
|
|
4362
|
-
/* @__PURE__ */
|
|
4363
|
-
/* @__PURE__ */
|
|
4364
|
-
/* @__PURE__ */
|
|
4715
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-2", children: [
|
|
4716
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-between border-b border-grey-border py-3", children: [
|
|
4717
|
+
/* @__PURE__ */ jsx46("p", { className: "mb-0 text-body-2xs font-medium text-primary-black", children: "Network fee" }),
|
|
4718
|
+
/* @__PURE__ */ jsx46(
|
|
4365
4719
|
BaseCurrencyAmount,
|
|
4366
4720
|
{
|
|
4367
4721
|
currency: generateAddressPayload?.currency ?? "",
|
|
@@ -4371,9 +4725,9 @@ var PayByStableCoin = ({
|
|
|
4371
4725
|
}
|
|
4372
4726
|
)
|
|
4373
4727
|
] }),
|
|
4374
|
-
/* @__PURE__ */
|
|
4375
|
-
/* @__PURE__ */
|
|
4376
|
-
/* @__PURE__ */
|
|
4728
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-between py-4", children: [
|
|
4729
|
+
/* @__PURE__ */ jsx46("p", { className: "mb-0 text-body-lg font-semibold text-primary-black", children: "Pay" }),
|
|
4730
|
+
/* @__PURE__ */ jsx46(
|
|
4377
4731
|
BaseCurrencyAmount,
|
|
4378
4732
|
{
|
|
4379
4733
|
currency: generateAddressPayload?.currency ?? "",
|
|
@@ -4386,7 +4740,7 @@ var PayByStableCoin = ({
|
|
|
4386
4740
|
)
|
|
4387
4741
|
] })
|
|
4388
4742
|
] }),
|
|
4389
|
-
/* @__PURE__ */
|
|
4743
|
+
/* @__PURE__ */ jsx46("div", { className: "flex flex-col gap-6", children: /* @__PURE__ */ jsx46(
|
|
4390
4744
|
BaseButton,
|
|
4391
4745
|
{
|
|
4392
4746
|
label: "Confirm Payment",
|
|
@@ -4398,17 +4752,17 @@ var PayByStableCoin = ({
|
|
|
4398
4752
|
}
|
|
4399
4753
|
) })
|
|
4400
4754
|
] }),
|
|
4401
|
-
caller === "miden" && /* @__PURE__ */
|
|
4402
|
-
/* @__PURE__ */
|
|
4403
|
-
/* @__PURE__ */
|
|
4404
|
-
/* @__PURE__ */
|
|
4755
|
+
caller === "miden" && /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-6", children: [
|
|
4756
|
+
/* @__PURE__ */ jsxs33("div", { className: "p-4 rounded-lg flex flex-col gap-6 bg-[#FAFDFF] border border-[#F0FAFF]", children: [
|
|
4757
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-between", children: [
|
|
4758
|
+
/* @__PURE__ */ jsx46(
|
|
4405
4759
|
BaseLabelInfo,
|
|
4406
4760
|
{
|
|
4407
4761
|
label: "Chain",
|
|
4408
4762
|
value: addressDetails?.chain ?? ""
|
|
4409
4763
|
}
|
|
4410
4764
|
),
|
|
4411
|
-
/* @__PURE__ */
|
|
4765
|
+
/* @__PURE__ */ jsx46(
|
|
4412
4766
|
BaseCopy,
|
|
4413
4767
|
{
|
|
4414
4768
|
color: "#9DBFDE",
|
|
@@ -4416,15 +4770,15 @@ var PayByStableCoin = ({
|
|
|
4416
4770
|
}
|
|
4417
4771
|
)
|
|
4418
4772
|
] }),
|
|
4419
|
-
/* @__PURE__ */
|
|
4420
|
-
/* @__PURE__ */
|
|
4773
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-between", children: [
|
|
4774
|
+
/* @__PURE__ */ jsx46(
|
|
4421
4775
|
BaseLabelInfo,
|
|
4422
4776
|
{
|
|
4423
4777
|
label: "Wallet Address",
|
|
4424
4778
|
value: addressDetails?.walletAddress ?? ""
|
|
4425
4779
|
}
|
|
4426
4780
|
),
|
|
4427
|
-
/* @__PURE__ */
|
|
4781
|
+
/* @__PURE__ */ jsx46(
|
|
4428
4782
|
BaseCopy,
|
|
4429
4783
|
{
|
|
4430
4784
|
color: "#9DBFDE",
|
|
@@ -4432,9 +4786,9 @@ var PayByStableCoin = ({
|
|
|
4432
4786
|
}
|
|
4433
4787
|
)
|
|
4434
4788
|
] }),
|
|
4435
|
-
/* @__PURE__ */
|
|
4436
|
-
/* @__PURE__ */
|
|
4437
|
-
/* @__PURE__ */
|
|
4789
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex flex-col", children: [
|
|
4790
|
+
/* @__PURE__ */ jsx46("p", { className: "mb-1 text-body-4xs font-medium text-light-copy uppercase", children: "Amount" }),
|
|
4791
|
+
/* @__PURE__ */ jsx46(
|
|
4438
4792
|
BaseCurrencyAmount,
|
|
4439
4793
|
{
|
|
4440
4794
|
currency: generateAddressPayload?.currency ?? "",
|
|
@@ -4446,17 +4800,17 @@ var PayByStableCoin = ({
|
|
|
4446
4800
|
}
|
|
4447
4801
|
)
|
|
4448
4802
|
] }),
|
|
4449
|
-
/* @__PURE__ */
|
|
4450
|
-
/* @__PURE__ */
|
|
4451
|
-
/* @__PURE__ */
|
|
4452
|
-
/* @__PURE__ */
|
|
4803
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex gap-4 items-center justify-center", children: [
|
|
4804
|
+
/* @__PURE__ */ jsx46("div", { className: "w-24 border border-[#E1EBF5]" }),
|
|
4805
|
+
/* @__PURE__ */ jsx46("p", { className: "mb-2 text-body-2xs text-[#5F738C] font-normal", children: "Or" }),
|
|
4806
|
+
/* @__PURE__ */ jsx46("div", { className: "w-24 border border-[#E1EBF5]" })
|
|
4453
4807
|
] }),
|
|
4454
|
-
/* @__PURE__ */
|
|
4455
|
-
/* @__PURE__ */
|
|
4456
|
-
/* @__PURE__ */
|
|
4808
|
+
/* @__PURE__ */ jsxs33("div", { className: "mx-auto", children: [
|
|
4809
|
+
/* @__PURE__ */ jsx46("p", { className: "mb-2 text-body-xs text-primary font-semibold text-center", children: "Scan to Pay" }),
|
|
4810
|
+
/* @__PURE__ */ jsx46(IconQrCode, {})
|
|
4457
4811
|
] })
|
|
4458
4812
|
] }),
|
|
4459
|
-
/* @__PURE__ */
|
|
4813
|
+
/* @__PURE__ */ jsx46("div", { className: "flex flex-col gap-6", children: /* @__PURE__ */ jsx46(
|
|
4460
4814
|
BaseButton,
|
|
4461
4815
|
{
|
|
4462
4816
|
label: "I have made this payment",
|
|
@@ -4474,7 +4828,7 @@ var PayByStableCoin = ({
|
|
|
4474
4828
|
|
|
4475
4829
|
// src/buzapay-checkout/checkout-card.tsx
|
|
4476
4830
|
import toast2, { Toaster as Toaster2 } from "react-hot-toast";
|
|
4477
|
-
import { jsx as
|
|
4831
|
+
import { jsx as jsx47, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4478
4832
|
function BzpCheckoutCard({
|
|
4479
4833
|
secretKey,
|
|
4480
4834
|
environment = "sandbox",
|
|
@@ -4552,12 +4906,12 @@ function BzpCheckoutCard({
|
|
|
4552
4906
|
setPaymentType(filteredPaymentTypeOptions[0].value);
|
|
4553
4907
|
}
|
|
4554
4908
|
}, [filteredPaymentTypeOptions]);
|
|
4555
|
-
return /* @__PURE__ */
|
|
4556
|
-
/* @__PURE__ */
|
|
4557
|
-
/* @__PURE__ */
|
|
4558
|
-
checkoutState === "PENDING" && /* @__PURE__ */
|
|
4559
|
-
/* @__PURE__ */
|
|
4560
|
-
/* @__PURE__ */
|
|
4909
|
+
return /* @__PURE__ */ jsxs34(BaseCard, { children: [
|
|
4910
|
+
/* @__PURE__ */ jsx47(Toaster2, {}),
|
|
4911
|
+
/* @__PURE__ */ jsxs34("div", { className: "grid grid-cols-3", children: [
|
|
4912
|
+
checkoutState === "PENDING" && /* @__PURE__ */ jsxs34("div", { className: "bg-[#EFF7FF] px-6 py-8 flex flex-col gap-5 col-span-1 rounded-l-xl", children: [
|
|
4913
|
+
/* @__PURE__ */ jsx47("p", { className: "text-heading-text text-body-xs font-semibold", children: "Pay with" }),
|
|
4914
|
+
/* @__PURE__ */ jsx47(
|
|
4561
4915
|
BaseRadioGroup,
|
|
4562
4916
|
{
|
|
4563
4917
|
options: filteredPaymentTypeOptions,
|
|
@@ -4565,13 +4919,13 @@ function BzpCheckoutCard({
|
|
|
4565
4919
|
}
|
|
4566
4920
|
)
|
|
4567
4921
|
] }),
|
|
4568
|
-
/* @__PURE__ */
|
|
4922
|
+
/* @__PURE__ */ jsxs34(
|
|
4569
4923
|
"div",
|
|
4570
4924
|
{
|
|
4571
4925
|
className: checkoutState === "SUCCESS" || checkoutState === "USED" && paymentType === "BANK_TRANSFER" ? "col-span-3" : "col-span-2",
|
|
4572
4926
|
children: [
|
|
4573
|
-
checkoutState === "PENDING" && /* @__PURE__ */
|
|
4574
|
-
paymentObject.logoUrl ? /* @__PURE__ */
|
|
4927
|
+
checkoutState === "PENDING" && /* @__PURE__ */ jsxs34("div", { className: "flex flex-col gap-6 sm:flex-row sm:items-center justify-between p-6 sm:px-10 sm:py-8", children: [
|
|
4928
|
+
paymentObject.logoUrl ? /* @__PURE__ */ jsx47(
|
|
4575
4929
|
BaseImage,
|
|
4576
4930
|
{
|
|
4577
4931
|
src: paymentObject.logoUrl ?? "",
|
|
@@ -4580,24 +4934,24 @@ function BzpCheckoutCard({
|
|
|
4580
4934
|
height: 52,
|
|
4581
4935
|
customClass: "rounded-lg object-fit"
|
|
4582
4936
|
}
|
|
4583
|
-
) : /* @__PURE__ */
|
|
4937
|
+
) : /* @__PURE__ */ jsx47(
|
|
4584
4938
|
"div",
|
|
4585
4939
|
{
|
|
4586
4940
|
className: "bg-heading-text rounded flex flex-col justify-center",
|
|
4587
4941
|
style: { width: "52px", height: "52px" },
|
|
4588
|
-
children: /* @__PURE__ */
|
|
4942
|
+
children: /* @__PURE__ */ jsx47("p", { className: "text-white text-center text-body-2xs font-medium", children: "Logo" })
|
|
4589
4943
|
}
|
|
4590
4944
|
),
|
|
4591
|
-
/* @__PURE__ */
|
|
4592
|
-
/* @__PURE__ */
|
|
4593
|
-
/* @__PURE__ */
|
|
4945
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex flex-col gap-1", children: [
|
|
4946
|
+
/* @__PURE__ */ jsx47("p", { className: "text-body-2xs font-regular text-sub-copy sm:text-right", children: paymentObject.merchantName }),
|
|
4947
|
+
/* @__PURE__ */ jsxs34("p", { className: "text-body-2xs font-regular text-sub-copy sm:text-right", children: [
|
|
4594
4948
|
"Pay:",
|
|
4595
4949
|
" ",
|
|
4596
|
-
/* @__PURE__ */
|
|
4950
|
+
/* @__PURE__ */ jsx47("span", { className: "text-orange-500 font-extrabold", children: formatAmount(paymentObject.amount, paymentObject.currency) })
|
|
4597
4951
|
] })
|
|
4598
4952
|
] })
|
|
4599
4953
|
] }),
|
|
4600
|
-
checkoutState === "PENDING" && /* @__PURE__ */
|
|
4954
|
+
checkoutState === "PENDING" && /* @__PURE__ */ jsx47("div", { className: "max-h-[32rem] overflow-y-scroll px-6 sm:px-10 pb-10 pt-2", children: paymentType === "CARD" ? /* @__PURE__ */ jsx47(
|
|
4601
4955
|
PayByCard,
|
|
4602
4956
|
{
|
|
4603
4957
|
secretKey,
|
|
@@ -4606,7 +4960,7 @@ function BzpCheckoutCard({
|
|
|
4606
4960
|
onPaymentAuthorized: setSuccess,
|
|
4607
4961
|
onError: onErrorHandler
|
|
4608
4962
|
}
|
|
4609
|
-
) : paymentType === "BANK_TRANSFER" ? /* @__PURE__ */
|
|
4963
|
+
) : paymentType === "BANK_TRANSFER" ? /* @__PURE__ */ jsx47(
|
|
4610
4964
|
PayByTransfer,
|
|
4611
4965
|
{
|
|
4612
4966
|
secretKey,
|
|
@@ -4615,7 +4969,7 @@ function BzpCheckoutCard({
|
|
|
4615
4969
|
onPaymentAuthorized: setSuccess,
|
|
4616
4970
|
onError: onErrorHandler
|
|
4617
4971
|
}
|
|
4618
|
-
) : /* @__PURE__ */
|
|
4972
|
+
) : /* @__PURE__ */ jsx47(
|
|
4619
4973
|
PayByStableCoin,
|
|
4620
4974
|
{
|
|
4621
4975
|
secretKey,
|
|
@@ -4625,7 +4979,7 @@ function BzpCheckoutCard({
|
|
|
4625
4979
|
onError: onErrorHandler
|
|
4626
4980
|
}
|
|
4627
4981
|
) }),
|
|
4628
|
-
(checkoutState === "SUCCESS" || checkoutState === "USED" && paymentType === "BANK_TRANSFER") && /* @__PURE__ */
|
|
4982
|
+
(checkoutState === "SUCCESS" || checkoutState === "USED" && paymentType === "BANK_TRANSFER") && /* @__PURE__ */ jsx47(
|
|
4629
4983
|
BaseSuccess,
|
|
4630
4984
|
{
|
|
4631
4985
|
amount: paymentObject.amount,
|
|
@@ -4646,7 +5000,7 @@ import { useState as useState9 } from "react";
|
|
|
4646
5000
|
|
|
4647
5001
|
// src/miden-checkout/checkout-iframe.tsx
|
|
4648
5002
|
import { useCallback as useCallback4, useEffect as useEffect8, useRef as useRef4, useState as useState8 } from "react";
|
|
4649
|
-
import { jsx as
|
|
5003
|
+
import { jsx as jsx48, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4650
5004
|
function MidenCheckoutIframe({
|
|
4651
5005
|
style = {
|
|
4652
5006
|
width: "100%",
|
|
@@ -4734,14 +5088,14 @@ function MidenCheckoutIframe({
|
|
|
4734
5088
|
if (!containerRef.current) return;
|
|
4735
5089
|
generatePaymentLinkHandler();
|
|
4736
5090
|
}, []);
|
|
4737
|
-
return /* @__PURE__ */
|
|
4738
|
-
/* @__PURE__ */
|
|
4739
|
-
loading && /* @__PURE__ */
|
|
5091
|
+
return /* @__PURE__ */ jsxs35("div", { className: "relative", style, children: [
|
|
5092
|
+
/* @__PURE__ */ jsx48("div", { ref: containerRef, className: "w-full h-full" }),
|
|
5093
|
+
loading && /* @__PURE__ */ jsx48("div", { className: "absolute inset-0 grid place-items-center bg-white/60", children: /* @__PURE__ */ jsx48(IconLoader, {}) })
|
|
4740
5094
|
] });
|
|
4741
5095
|
}
|
|
4742
5096
|
|
|
4743
5097
|
// src/miden-checkout/checkout-button.tsx
|
|
4744
|
-
import { jsx as
|
|
5098
|
+
import { jsx as jsx49, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4745
5099
|
function MidenCheckoutButton({
|
|
4746
5100
|
secretKey,
|
|
4747
5101
|
environment = "sandbox",
|
|
@@ -4798,15 +5152,15 @@ function MidenCheckoutButton({
|
|
|
4798
5152
|
setLoading(false);
|
|
4799
5153
|
}
|
|
4800
5154
|
};
|
|
4801
|
-
return urlLaunchUrl && mode === "iframe" ? /* @__PURE__ */
|
|
5155
|
+
return urlLaunchUrl && mode === "iframe" ? /* @__PURE__ */ jsx49(
|
|
4802
5156
|
MidenCheckoutIframe,
|
|
4803
5157
|
{
|
|
4804
5158
|
url: urlLaunchUrl,
|
|
4805
5159
|
secretKey,
|
|
4806
5160
|
environment
|
|
4807
5161
|
}
|
|
4808
|
-
) : /* @__PURE__ */
|
|
4809
|
-
/* @__PURE__ */
|
|
5162
|
+
) : /* @__PURE__ */ jsxs36("div", { children: [
|
|
5163
|
+
/* @__PURE__ */ jsx49(
|
|
4810
5164
|
BaseButton,
|
|
4811
5165
|
{
|
|
4812
5166
|
label: "Pay",
|
|
@@ -4817,14 +5171,14 @@ function MidenCheckoutButton({
|
|
|
4817
5171
|
onClick: generatePaymentLinkHandler
|
|
4818
5172
|
}
|
|
4819
5173
|
),
|
|
4820
|
-
/* @__PURE__ */
|
|
5174
|
+
/* @__PURE__ */ jsx49(BaseInputError, { errorMessage: message })
|
|
4821
5175
|
] });
|
|
4822
5176
|
}
|
|
4823
5177
|
|
|
4824
5178
|
// src/miden-checkout/checkout-card.tsx
|
|
4825
5179
|
import { useEffect as useEffect9, useState as useState10 } from "react";
|
|
4826
5180
|
import toast3, { Toaster as Toaster3 } from "react-hot-toast";
|
|
4827
|
-
import { jsx as
|
|
5181
|
+
import { jsx as jsx50, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4828
5182
|
function MidenCheckoutCard({
|
|
4829
5183
|
secretKey,
|
|
4830
5184
|
options,
|
|
@@ -4909,12 +5263,12 @@ function MidenCheckoutCard({
|
|
|
4909
5263
|
setPaymentType(filteredPaymentTypeOptions[0].value);
|
|
4910
5264
|
}
|
|
4911
5265
|
}, [filteredPaymentTypeOptions]);
|
|
4912
|
-
return /* @__PURE__ */
|
|
4913
|
-
/* @__PURE__ */
|
|
4914
|
-
/* @__PURE__ */
|
|
4915
|
-
checkoutState === "PENDING" && /* @__PURE__ */
|
|
4916
|
-
/* @__PURE__ */
|
|
4917
|
-
/* @__PURE__ */
|
|
5266
|
+
return /* @__PURE__ */ jsxs37(BaseCard, { caller: "miden", children: [
|
|
5267
|
+
/* @__PURE__ */ jsx50(Toaster3, {}),
|
|
5268
|
+
/* @__PURE__ */ jsxs37("div", { className: "grid grid-cols-3", children: [
|
|
5269
|
+
checkoutState === "PENDING" && /* @__PURE__ */ jsxs37("div", { className: "bg-[#0A0032] py-6 flex flex-col gap-5 col-span-1 rounded-l-xl", children: [
|
|
5270
|
+
/* @__PURE__ */ jsx50("p", { className: "text-white text-body-xs font-semibold px-6", children: "Pay with" }),
|
|
5271
|
+
/* @__PURE__ */ jsx50(
|
|
4918
5272
|
BaseRadioGroup,
|
|
4919
5273
|
{
|
|
4920
5274
|
caller: "miden",
|
|
@@ -4923,27 +5277,27 @@ function MidenCheckoutCard({
|
|
|
4923
5277
|
}
|
|
4924
5278
|
)
|
|
4925
5279
|
] }),
|
|
4926
|
-
/* @__PURE__ */
|
|
5280
|
+
/* @__PURE__ */ jsxs37(
|
|
4927
5281
|
"div",
|
|
4928
5282
|
{
|
|
4929
5283
|
className: checkoutState === "SUCCESS" || checkoutState === "USED" && paymentType === "BANK_TRANSFER" ? "col-span-3" : "col-span-2",
|
|
4930
5284
|
children: [
|
|
4931
|
-
checkoutState === "PENDING" && /* @__PURE__ */
|
|
4932
|
-
/* @__PURE__ */
|
|
4933
|
-
/* @__PURE__ */
|
|
5285
|
+
checkoutState === "PENDING" && /* @__PURE__ */ jsxs37("div", { className: "flex items-center justify-between p-6", children: [
|
|
5286
|
+
/* @__PURE__ */ jsx50(IconMidenLogo, {}),
|
|
5287
|
+
/* @__PURE__ */ jsx50(IconClose, { color: "black", className: "cursor-pointer" })
|
|
4934
5288
|
] }),
|
|
4935
|
-
checkoutState === "PENDING" && /* @__PURE__ */
|
|
4936
|
-
/* @__PURE__ */
|
|
4937
|
-
/* @__PURE__ */
|
|
5289
|
+
checkoutState === "PENDING" && /* @__PURE__ */ jsxs37("div", { className: "px-6 md:px-10 lg:px-14 pt-4 pb-8 flex flex-col gap-6 max-h-[32rem] overflow-y-scroll", children: [
|
|
5290
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex items-center justify-between py-3 px-4 bg-[#F8FDFF] border border-[#DAE4E8] rounded-lg", children: [
|
|
5291
|
+
/* @__PURE__ */ jsx50(
|
|
4938
5292
|
BaseLabelInfo,
|
|
4939
5293
|
{
|
|
4940
5294
|
label: "Amount Due",
|
|
4941
5295
|
value: formatAmountHandler()
|
|
4942
5296
|
}
|
|
4943
5297
|
),
|
|
4944
|
-
/* @__PURE__ */
|
|
5298
|
+
/* @__PURE__ */ jsx50(BaseLabelInfo, { label: "Charges", value: formatChargeHandler() })
|
|
4945
5299
|
] }),
|
|
4946
|
-
/* @__PURE__ */
|
|
5300
|
+
/* @__PURE__ */ jsx50("div", { children: paymentType === "CARD" ? /* @__PURE__ */ jsx50(
|
|
4947
5301
|
PayByCard,
|
|
4948
5302
|
{
|
|
4949
5303
|
secretKey,
|
|
@@ -4953,7 +5307,7 @@ function MidenCheckoutCard({
|
|
|
4953
5307
|
onPaymentAuthorized: setSuccess,
|
|
4954
5308
|
onError: onErrorHandler
|
|
4955
5309
|
}
|
|
4956
|
-
) : paymentType === "BANK_TRANSFER" ? /* @__PURE__ */
|
|
5310
|
+
) : paymentType === "BANK_TRANSFER" ? /* @__PURE__ */ jsx50(
|
|
4957
5311
|
PayByTransfer,
|
|
4958
5312
|
{
|
|
4959
5313
|
secretKey,
|
|
@@ -4963,7 +5317,7 @@ function MidenCheckoutCard({
|
|
|
4963
5317
|
onPaymentAuthorized: setSuccess,
|
|
4964
5318
|
onError: onErrorHandler
|
|
4965
5319
|
}
|
|
4966
|
-
) : /* @__PURE__ */
|
|
5320
|
+
) : /* @__PURE__ */ jsx50(
|
|
4967
5321
|
PayByStableCoin,
|
|
4968
5322
|
{
|
|
4969
5323
|
secretKey,
|
|
@@ -4975,7 +5329,7 @@ function MidenCheckoutCard({
|
|
|
4975
5329
|
}
|
|
4976
5330
|
) })
|
|
4977
5331
|
] }),
|
|
4978
|
-
(checkoutState === "SUCCESS" || checkoutState === "USED" && paymentType === "BANK_TRANSFER") && /* @__PURE__ */
|
|
5332
|
+
(checkoutState === "SUCCESS" || checkoutState === "USED" && paymentType === "BANK_TRANSFER") && /* @__PURE__ */ jsx50(
|
|
4979
5333
|
BaseSuccess,
|
|
4980
5334
|
{
|
|
4981
5335
|
amount: paymentObject.amount,
|