1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PrivacyPolicy-Ct8LmYOy.js","assets/vendor-react-Dw7X3JZT.js","assets/vendor-framer-motion-CpxrKHsN.js","assets/vendor-CZR7Gm73.js","assets/vendor-ui-ODtAki8E.js","assets/vendor-utils-WadUx6vN.js","assets/AboutPage-BJT8_o1A.js","assets/ContactPage-XAmPQWgz.js","assets/TermsPage-D762thKO.js","assets/FaqPage-D7IL7fAx.js","assets/WhatsNewPage-BU_vfiRI.js","assets/Login-B8UuiUq9.js","assets/auth-BKUOP0E3.js","assets/SideImage--xG-UFQG.js","assets/Register-B0Waa9uz.js","assets/VerifyAccount-Bmzyo4FN.js","assets/DeviceVerification-D4rL2MK_.js","assets/ForgetPassword-DDK9j6fb.js","assets/ResetPassword-BQeKy7gZ.js","assets/SocialCallback-Zg09bNdD.js","assets/Home-WNbsn_ss.js","assets/badge-Bo7ywC78.js","assets/checkbox-B5VwnM8L.js","assets/DataBundleCard-BAsNghu9.js","assets/remote-image-Qvi3M5xL.js","assets/tabs-CRShrmdz.js","assets/skeleton-BvL8Xyo9.js","assets/TransactionDetailsModal-DTJxOyXn.js","assets/Wallet-D67NcFTQ.js","assets/SecurityPinModal-DJEzt9SD.js","assets/ScheduleTimeModal-CvGbRe9U.js","assets/Products-C9EMndn6.js","assets/RequireAuth-DL2P4m1E.js","assets/VirtualCards-AB8eYqjM.js","assets/skeleton-loaders-pVqElXJZ.js","assets/Transactions-CR6c4CoC.js","assets/ReferEarn-Bs3qOjM6.js","assets/Rewards-Bi5oxH95.js","assets/Settings-37zofBNn.js","assets/Support-D9qsNSxL.js","assets/Crypto-BBoMVGEL.js","assets/CryptoSwapPage-BvBe66AY.js","assets/CryptoMarketPage-QIHIffLU.js","assets/CryptoHistoryPage-Er1j4R85.js","assets/Profile-D3IgTUv5.js","assets/Tiers-mPqgx1LR.js","assets/progress-DbbMAUoP.js","assets/PayPalPage-CSCNrK-7.js","assets/PayPalSetupPage-EnlAH8VY.js","assets/PayPalLOAPage-IenpTClL.js","assets/NotificationPage-aCiH2wQf.js","assets/KycPage-D6GFVGr4.js","assets/Invoices-CD_zPP2C.js","assets/safe-external-link-CEs-L7G1.js","assets/PaymentLinksPage-7TGw0I0v.js","assets/CreatePaymentLinkPage-nVd5kK2l.js","assets/PaymentLinkDetailsPage-Bmg2ZLdV.js","assets/EvidenceRequestsPage-B4Fp4pqU.js","assets/evidence-utils-BOdi06X0.js","assets/EvidenceRequestDetailsPage-26s4re8B.js"])))=>i.map(i=>d[i]); 2import{r as u,j as t,O as Nt,L as U,u as fs,N as Ma,h as Et,i as Va,k as Ba,l as Fa,m as Ua,n as Wa,R as $a,o as Ha}from"./vendor-react-Dw7X3JZT.js";import{Q as Ya,a as M,k as za,c as gs,_ as w,u as Ka,A as qa,b as Ga,d as Qa}from"./vendor-utils-WadUx6vN.js";import{a6 as Xa,a7 as Za,a8 as Xe,a9 as Gt,aa as ze,ab as Ja}from"./vendor-CZR7Gm73.js";import{X,C as ae,a as ot,S as er,M as ys,b as Qt,A as Xt,L as xs,c as _t,d as Ke,e as it,O as ws,P as tr,f as vs,g as sr,T as bs,D as Ss,R as ar,h as rr,i as ct,H as jt,W as nr,j as or,k as ir,l as cr,F as lr,B as dr,G as ur,U as pr,m as mr,n as Ns,I as Es,o as _s,p as hr,q as Tt,r as fr,s as gr,t as yr,u as js,v as he,w as xr,x as wr,y as Zt,z as Ts,E as Jt,J as As,K as Cs,N as Rs,Q as vr,V as Is,Y as br,Z as Ps,_ as Sr,$ as Ls,a0 as Nr,a1 as Ds,a2 as ks,a3 as Er,a4 as _r,a5 as Os,a6 as jr,a7 as Tr,a8 as Ar,a9 as Cr,aa as Rr,ab as Ir,ac as Pr}from"./vendor-ui-ODtAki8E.js";import{m as _}from"./vendor-framer-motion-CpxrKHsN.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))r(n);new MutationObserver(n=>{for(const o of n)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function s(n){const o={};return n.integrity&&(o.integrity=n.integrity),n.referrerPolicy&&(o.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?o.credentials="include":n.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(n){if(n.ep)return;n.ep=!0;const o=s(n);fetch(n.href,o)}})();const At=new Ya({defaultOptions:{queries:{staleTime:300*1e3,gcTime:600*1e3,retry:1,refetchOnWindowFocus:!1,placeholderData:e=>e}}});function T(...e){return Xa(Za(e))}function Po(e,a="NGN"){const s=typeof e=="string"?parseFloat(e):e;if(isNaN(s))return String(e);try{return new Intl.NumberFormat("en-NG",{style:"currency",currency:a,minimumFractionDigits:2,maximumFractionDigits:2}).format(s)}
2catch{return`${s.toLocaleString("en-NG",{minimumFractionDigits:2,maximumFractionDigits:8})} ${a}`}}const Lr=Xe("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-white text-foreground",destructive:"destructive group border-red-200 bg-red-50 text-red-800 dark:border-red-800 dark:bg-red-900 dark:text-red-50",success:"border-green-200 bg-green-50 text-green-800 dark:border-green-800 dark:bg-green-900 dark:text-green-200",warning:"border-orange-200 bg-orange-50 text-orange-800 dark:border-orange-800 dark:bg-orange-900 dark:text-orange-200"}},defaultVariants:{variant:"default"}}),Ms=u.forwardRef(({className:e,variant:a,...s},r)=>t.jsx("div",{ref:r,className:T(Lr({variant:a}),e),...s}));Ms.displayName="Toast";const Dr=u.forwardRef(({className:e,...a},s)=>t.jsx("button",{ref:s,className:T("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...a}));Dr.displayName="ToastAction";const Vs=u.forwardRef(({className:e,...a},s)=>t.jsx("button",{ref:s,className:T("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-600 group-[.destructive]:hover:text-red-900 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-100",e),"toast-close":"",...a,children:t.jsx(X,{className:"h-4 w-4"})}));Vs.displayName="ToastClose";const Bs=u.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:T("text-sm font-semibold",e),...a}));Bs.displayName="ToastTitle";const Fs=u.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:T("text-sm opacity-90",e),...a}));Fs.displayName="ToastDescription";const Us=u.createContext(void 0),kr=({children:e})=>{const[a,s]=u.useState([]),r=u.useCallback(o=>{const l=Math.random().toString(36).substr(2,9),d={...o,id:l};s(m=>[...m,d]),setTimeout(()=>{s(m=>m.filter(p=>p.id!==l))},o.duration||5e3)},[]),n=u.useCallback(o=>{s(l=>l.filter(d=>d.id!==o))},[]);return t.jsxs(Us.Provider,{value:{toasts:a,addToast:r,removeToast:n},children:[e,t.jsx("div",{className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",children:a.map(o=>t.jsxs(Ms,{variant:o.variant,className:"mb-2",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[o.variant==="success"&&t.jsx(ae,{className:"h-4 w-4"}),o.variant==="destructive"&&t.jsx(ot,{className:"h-4 w-4"}),o.variant==="warning"&&t.jsx(ot,{className:"h-4 w-4 text-orange-600"}),t.jsxs("div",{className:"grid gap-1",children:[o.title&&t.jsx(Bs,{children:o.title}),o.description&&t.jsx(Fs,{children:o.description})]})]}),t.jsx(Vs,{onClick:()=>n(o.id)})]},o.id))})]})},Ws=()=>{const e=u.useContext(Us);if(!e)throw new Error("useToast must be used within a ToastProvider");return e},E=()=>t.jsx("div",{className:"loader-container",children:t.jsxs("div",{className:"sendbit-loader",children:[t.jsx("div",{className:"logo-circle",children:t.jsx("div",{className:"logo-inner",children:t.jsx("div",{className:"logo-arrow"})})}),t.jsx("div",{className:"loader-text",children:"SendBit"})]})}),Or=()=>t.jsx("div",{children:t.jsx(Nt,{})}),Mr=Xe("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),C=u.forwardRef(({className:e,variant:a,size:s,asChild:r=!1,...n},o)=>{const l=r?er:"button";return t.jsx(l,{className:T(Mr({variant:a,size:s,className:e})),ref:o,...n})});C.displayName="Button";const $s="/assets/main-logo-AMorw7X2.svg",Vr=({showAuthButtons:e
2=!0,variant:a="landing"})=>{const[s,r]=u.useState(!1),[n,o]=u.useState(!1);u.useEffect(()=>{const d=()=>{const m=window.scrollY;o(m>50)};return window.addEventListener("scroll",d),()=>window.removeEventListener("scroll",d)},[]);const l=["Blog","About","Contact"];return t.jsx(_.nav,{initial:{y:-100},animate:{y:0},className:`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${n?"bg-white border-b border-gray-200 shadow-sm":"bg-transparent"}`,children:t.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[t.jsxs("div",{className:"flex justify-between items-center h-20",children:[t.jsx(_.div,{className:"flex items-center",whileHover:{scale:1.05},transition:{duration:.2},children:t.jsx(U,{to:"/",children:t.jsx("img",{src:$s,alt:"SendBit",className:"h-10 w-auto"})})}),a==="landing"&&t.jsx("div",{className:"hidden lg:block",children:t.jsx("div",{className:"flex items-center space-x-8",children:l.map((d,m)=>d==="About"?t.jsxs(U,{to:"/about",className:"text-gray-700 hover:text-[#5C2B90] font-medium transition-all duration-300 relative group",children:[d,t.jsx("span",{className:"absolute -bottom-1 left-0 w-0 h-0.5 bg-[#5C2B90] group-hover:w-full transition-all duration-300"})]},d):d==="Blog"?t.jsxs("a",{href:"https://blog.mysendbit.com/",target:"_blank",rel:"noopener noreferrer",className:"text-gray-700 hover:text-[#5C2B90] font-medium transition-all duration-300 relative group",children:[d,t.jsx("span",{className:"absolute -bottom-1 left-0 w-0 h-0.5 bg-[#5C2B90] group-hover:w-full transition-all duration-300"})]},d):d==="Contact"?t.jsxs(U,{to:"/contact",className:"text-gray-700 hover:text-[#5C2B90] font-medium transition-all duration-300 relative group",children:[d,t.jsx("span",{className:"absolute -bottom-1 left-0 w-0 h-0.5 bg-[#5C2B90] group-hover:w-full transition-all duration-300"})]},d):t.jsxs(_.a,{href:`#${d.toLowerCase().replace(" ","-")}`,className:"text-gray-700 hover:text-[#5C2B90] font-medium transition-all duration-300 relative group",whileHover:{y:-2},initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{delay:m*.1},onClick:p=>{p.preventDefault();const h=d.toLowerCase().replace(" ","-"),x=document.getElementById(h);x&&x.scrollIntoView({behavior:"smooth",block:"start"})},children:[d,t.jsx("span",{className:"absolute -bottom-1 left-0 w-0 h-0.5 bg-[#5C2B90] group-hover:w-full transition-all duration-300"})]},d))})}),e&&t.jsxs("div",{className:"hidden md:flex items-center space-x-4",children:[t.jsx(U,{to:"/auth/login",children:t.jsx(_.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:t.jsx(C,{variant:"ghost",className:"text-gray-700 hover:text-[#5C2B90] font-medium",children:"Sign In"})})}),t.jsx(U,{to:"/auth/register",children:t.jsx(_.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:t.jsx(C,{className:"bg-[#5C2B90] hover:bg-[#4a1f75] text-white font-medium px-6 py-2 rounded-full shadow-sm",children:"Create free account"})})})]}),t.jsx("div",{className:"md:hidden",children:t.jsx(_.button,{onClick:()=>r(!s),className:"text-gray-700 hover:text-[#5C2B90] p-2",whileTap:{scale:.95},children:s?t.jsx(X,{className:"w-6 h-6"}):t.jsx(ys,{className:"w-6 h-6"})})})]}),s&&t.jsx(_.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"md:hidden border-t border-gray-200 transition-all duration-300 bg-white",children:t.jsxs("div",{className:"px-2 pt-2 pb-3 space-y-1",children:[a==="landing"&&l.map(d=>d==="About"?t.jsx(U,{to:"/about",className:"block px-3 py-2 text-gray-700 hover:text-[#5C2B90] font-medium",onClick:()=>r(!1),children:d},d):d==="Blog"?t.jsx("a",{href:"https://blog.mysendbit.com/",target:"_blank",rel:"noopener noreferrer",className:"block px-3 py-2 text-gray-700 hover:text-[#5C2B90] font-medium",onClick:()=>r(!1),children:d},d):d==="Contact"?t.jsx(U,{to:"/contact",className:"block px-3 py-2 text-gray-700 hover:text-[#5C2B90] font-medium",onClick:()=>r(!1),children:d},d):t.jsx("a",{href:`#${d.toLowerCase().replace(" ","-")}`,className:"block px-3 py-2 text-gray-700 hover:text-[#5C2B90] font-medium",onClick:m=>{m.preventDefault(),r(!1);const p=d.toLowerCase().replace(" ","-"),h=document.getElementById(p);h&&h.scrollIntoView({behavior:"smooth",block:"start"})},children:d},d)),e&&t.jsxs("div",{className:"flex flex-col space-y-2 pt-4",children:[t.jsx(U,{to:"/auth/login",onClick:()=>r(!1),children:t.jsx(C,{variant:"ghost",className:"w-full text-gray-700 hover:text-[#5C2B90]",children:"Sign In"})}),t.jsx(U,{to:"/auth/register",onClick:()=>r(!1),children:t.jsx(C,{className:"w-full bg-[#5C2B90] hover:bg-[#4a1f75] text-white font-medium",children:"Create free account"})})]})]})})]})})},Br="/assets/footerbg-Cy9oL-Yf.png",Fr=()=>t.jsx("footer",{className:"bg-gray-900 text-white py-20",children:t.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[t.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-12",children:[t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"flex items-center space-x-3",children:t.jsx(U,{to:"/",children:t.jsx("img",{src:Br,alt:"SendBit",className:"h-10 w-auto"})})}),t.jsx("p",{className:"text-gray-400 leading-relaxed",children:"SendBit is y
2our fast pay spot, enabling you to accept PayPal payments, purchase airtime and data bundles in single or in bulk, trade gift cards, and more. Experience the convenience of managing all these services seamlessly within the SendBit platform."}),t.jsxs("div",{className:"flex space-x-4",children:[t.jsx("a",{href:"https://www.facebook.com/profile.php?id=100083555498791",target:"_blank",rel:"noopener noreferrer",className:"w-10 h-10 bg-gray-800 rounded-full flex items-center justify-center hover:bg-purple-600 transition-colors cursor-pointer",children:t.jsx("svg",{className:"w-5 h-5 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})})}),t.jsx("a",{href:"https://x.com/mysendbit",target:"_blank",rel:"noopener noreferrer",className:"w-10 h-10 bg-gray-800 rounded-full flex items-center justify-center hover:bg-purple-600 transition-colors cursor-pointer",children:t.jsx("svg",{className:"w-5 h-5 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}),t.jsx("a",{href:"https://www.instagram.com/mysendbit",target:"_blank",rel:"noopener noreferrer",className:"w-10 h-10 bg-gray-800 rounded-full flex items-center justify-center hover:bg-purple-600 transition-colors cursor-pointer",children:t.jsxs("svg",{className:"w-5 h-5 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:[t.jsx("path",{d:"M12.017 0C5.396 0 .029 5.367.029 11.987c0 6.62 5.367 11.987 11.988 11.987c6.62 0 11.987-5.367 11.987-11.987C24.014 5.367 18.637.001 12.017.001zM8.449 16.988c-1.297 0-2.448-.49-3.323-1.297C4.198 14.895 3.708 13.744 3.708 12.447s.49-2.448 1.418-3.323C6.001 8.198 7.152 7.708 8.449 7.708s2.448.49 3.323 1.416c.875.926 1.365 2.077 1.365 3.374s-.49 2.448-1.365 3.323c-.875.875-2.026 1.167-3.323 1.167zm7.718 0c-1.297 0-2.448-.49-3.323-1.297-.875-.926-1.365-2.077-1.365-3.374s.49-2.448 1.365-3.323c.875-.926 2.026-1.416 3.323-1.416s2.448.49 3.323 1.416c.875.875 1.365 2.026 1.365 3.323s-.49 2.448-1.365 3.374c-.875.875-2.026 1.297-3.323 1.297z"}),t.jsx("path",{d:"M12 7.678c-2.386 0-4.322 1.936-4.322 4.322 0 2.386 1.936 4.322 4.322 4.322 2.386 0 4.322-1.936 4.322-4.322 0-2.386-1.936-4.322-4.322-4.322zM12 14.644A2.646 2.646 0 019.356 12c0-1.459 1.185-2.644 2.644-2.644A2.646 2.646 0 0114.644 12c0 1.459-1.185 2.644-2.644 2.644zM17.018 7.435c-.559 0-1.011-.452-1.011-1.011s.452-1.011 1.011-1.011 1.011.452 1.011 1.011-.452 1.011-1.011 1.011z"})]})})]})]}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-bold font-montserrat mb-6",children:"Product"}),t.jsx("ul",{className:"space-y-3",children:["Send Money","Receive Money","Mobile App","Business","API"].map(e=>t.jsx("li",{children:t.jsx("a",{href:"#",className:"text-gray-400 hover:text-white transition-colors",children:e})},e))})]}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-bold font-montserrat mb-6",children:"Company"}),t.jsx("ul",{className:"space-y-3",children:["About Us","Careers","Press","Blog","Partners"].map(e=>t.jsx("li",{children:t.jsx("a",{href:"#",className:"text-gray-400 hover:text-white transition-colors",children:e})},e))})]}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-bold font-montserrat mb-6",children:"Support"}),t.jsxs("ul",{className:"space-y-3",children:[t.jsx("li",{children:t.jsx("a",{href:"#",className:"text-gray-400 hover:text-white transition-colors",children:"Help Center"})}),t.jsx("li",{children:t.jsx("a",{href:"#",className:"text-gray-400 hover:text-white transition-colors",children:"Contact Us"})}),t.jsx("li",{children:t.jsx("a",{href:"#",className:"text-gray-400 hover:text-white transition-colors",children:"Security"})}),t.jsx("li",{children:t.jsx(U,{to:"/privacy-policy",className:"text-gray-400 hover:text-white transition-colors",children:"Privacy Policy"})}),t.jsx("li",{children:t.jsx("a",{href:"#",className:"text-gray-400 hover:text-white transition-colors",children:"Terms of Service"})})]})]})]}),t.jsx("div",{className:"border-t border-gray-800 mt-16 pt-8 flex flex-col md:flex-row justify-between items-center",children:t.jsxs("p",{className:"text-gray-400 text-sm",children:["© ",new Date().getFullYear()," SendBit. All rights reserved."]})})]})}
2),es="/assets/get-it-on-google-play-vDtZ3H1P.png",ts="/assets/applestore-Ma009pc1.png",Ur="/assets/hero1-s_SUHeNk.svg",Wr="/assets/hiw1-DeHu1rqV.png",$r="/assets/hiw2-CRNsLKfg.png",Hr="/assets/card-DFgLxxQ0.svg",Yr="/assets/service-aEYhObF_.svg",zr="/assets/invoice-Qw9VzUx3.svg",Kr="/assets/transaction-Bv_jC4Hz.svg",qr="/assets/crypto-CwgYqPKZ.svg",Gr=()=>{const[e,a]=u.useState(0),[s,r]=u.useState(0),n=["Remote employees","Freelancers","Bloggers"];u.useEffect(()=>{const g=setInterval(()=>{r(f=>(f+1)%n.length)},2e3);return()=>clearInterval(g)},[n.length]);const o=[{name:"Martina Eke",role:"Nigeria",content:"Best app for money transaction and buying of data. Convenient, fast and reliable. It's very easy to use and understandable. I recommend SendBit for easy buying of data and money transaction.",avatar:"M",rating:5},{name:"Bright Brains",role:"USA",content:"The SendBit app is indeed focused on PayPal services. If you are looking for a tool to manage PayPal transactions, this app is a good choice. It is convenient for handling various PayPal services efficiently.",avatar:"B",rating:5},{name:"Victor Sike",role:"Nigeria",content:"Simple interface and very easy and simple features to use. Very nice",avatar:"V",rating:5},{name:"Agoha Chidiinna",role:"Nigeria",content:"Great app and very easy to use. I recommend this great app.",avatar:"A",rating:5},{name:"muhammad yeqoob",role:"Nigeria",content:"The best app I ever found regarding online account transactions. Love all the options available. Recommend everyone to use it.",avatar:"M",rating:5},{name:"Molly Achieng Odongo",role:"Nigeria",content:"SendBit is more reliable and easier to use especially with Paypal mode of money transfer",avatar:"M",rating:5}],l=3,d=Math.ceil(o.length/l),m=()=>{a(g=>(g+1)%d)},p=()=>{a(g=>(g-1+d)%d)},h={hidden:{opacity:0},visible:{opacity:1,transition:{delayChildren:.3,staggerChildren:.15}}},x={hidden:{y:30,opacity:0},visible:{y:0,opacity:1,transition:{duration:.6,ease:"easeOut"}}},v=[{step:"01",title:"Create an account",illustration:Wr,description:"Provide your basic details and complete our streamlined verification process.",icon:t.jsx("div",{className:"w-16 h-16 bg-[#f3f0f7] rounded-xl flex items-center justify-center",children:t.jsx("svg",{className:"w-8 h-8 text-[#5C2B90]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})})},{step:"02",title:"Verify your account",illustration:$r,description:"Complete identity verification with your ID and phone number for security.",icon:t.jsx("div",{className:"w-16 h-16 bg-[#f3f0f7] rounded-xl flex items-center justify-center",children:t.jsx("svg",{className:"w-8 h-8 text-[#5C2B90]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})})},{step:"03",title:"Start transaction",illustration:Kr,description:"Start transaction immediately with your new account",icon:t.jsx("div",{className:"w-16 h-16 bg-[#f3f0f7] rounded-xl flex items-center justify-center",children:t.jsx("svg",{className:"w-8 h-8 text-[#5C2B90]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"})})})}],y=[{label:"Fast payouts",position:"left-[3%] top-16",color:"bg-[#FFE29A] text-[#5C4000] border-[#FFEAB8]",rotate:"-rotate-3"},{label:"Great rates",position:"right-[4%] top-20",color:"bg-[#AEEAF2] text-[#124D55] border-[#D6F6FA]",rotate:"rotate-3"},{label:"PayPal payments",position:"left-[8%] top-[40%]",color:"bg-[#BFD8FF] text-[#173F77] border-[#DCEAFF]",rotate:"rotate-2"},{label:"Secure",position:"left-[9%] top-[62%]",color:"bg-[#BDECCB] text-[#185C2D] border-[#DCF6E4]",rotate:"-rotate-2"},{label:"Reliable",position:"left-[5%] bottom-16",color:"bg-[#F7C2DD] text-[#713253] border-[#FBE0EE]",rotate:"rotate-3"},{label:"Global access",position:"right-[10%] bottom-20",color:"bg-[#FFC7A8] text-[#713514] border-[#FFE0CF]",rotate:"-rotate-3"},{label:"USD cards",position:"left-[20%] top-10",color:"bg-[#D8C4F0] text-[#4B276B] border-[#
2E9DDF7]",rotate:"rotate-2"},{label:"Easy transfers",position:"right-[20%] bottom-10",color:"bg-[#FFF0B8] text-[#644D00] border-[#FFF6D6]",rotate:"-rotate-2"}];return t.jsxs("div",{className:"min-h-screen bg-white overflow-x-hidden",children:[t.jsx(Vr,{showAuthButtons:!0,variant:"landing"}),t.jsxs("section",{className:"relative px-4 sm:px-6 lg:px-8 pt-16 sm:pt-20 pb-20 sm:pb-32 overflow-hidden",children:[t.jsx("div",{className:"absolute inset-0 bg-[#f7f5fa]"}),t.jsx("div",{"aria-hidden":"true",className:"absolute top-20 left-[5%] h-3 w-3 rounded-full bg-[#5C2B90]/35"}),t.jsx("div",{"aria-hidden":"true",className:"absolute top-36 right-[7%] h-16 w-16 rotate-12 rounded-2xl border border-[#5C2B90]/20"}),t.jsx("div",{"aria-hidden":"true",className:"absolute bottom-20 left-[45%] h-10 w-10 rounded-full bg-[#5C2B90]/10"}),t.jsx("div",{className:"max-w-7xl mx-auto relative",children:t.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 lg:gap-16 items-center",children:[t.jsxs(_.div,{variants:h,initial:"hidden",animate:"visible",className:"space-y-6 sm:space-y-8 pt-6 lg:pt-0 text-center lg:text-left",children:[t.jsxs(_.div,{variants:x,className:"space-y-4 sm:space-y-6",children:[t.jsxs(_.div,{className:"inline-flex items-center px-3 sm:px-4 py-2 bg-white rounded-full text-xs sm:text-sm font-medium text-[#5C2B90] border border-[#d8cce4]",whileHover:{scale:1.05},children:[t.jsx(Qt,{className:"w-3 sm:w-4 h-3 sm:h-4 mr-2 fill-current"}),"Trusted by 500k+ users in africa"]}),t.jsxs("h1",{className:"text-3xl sm:text-4xl md:text-5xl lg:text-6xl xl:text-7xl font-bold font-montserrat leading-tight",children:[t.jsx("span",{className:"text-gray-950",children:"Your Fast"}),t.jsx("br",{}),t.jsx("span",{className:"text-[#5C2B90]",children:"Pay Spot"})]}),t.jsx("p",{className:"text-base sm:text-lg lg:text-xl text-gray-600 leading-relaxed max-w-2xl mx-auto lg:mx-0",children:"Accept payment around the globe through invoice, paypal invoice, international accounts (USD, GBP, EURO). Additional Access USD virtual debit card for all your international purchases and expense."})]}),t.jsxs(_.div,{variants:x,className:"flex flex-col gap-4 sm:gap-6",children:[t.jsx(U,{to:"/auth/register",className:"w-full sm:w-auto",children:t.jsx(_.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:t.jsxs(C,{className:"w-[40%] sm:w-auto bg-[#5C2B90] hover:bg-[#4a1f75] text-white font-semibold px-4 sm:px-8 py-2 sm:py-4 rounded-full text-sm sm:text-lg shadow-sm transition-colors duration-200",children:["Start Here",t.jsx(Xt,{className:"ml-2 w-3 sm:w-5 h-3 sm:h-5"})]})})}),t.jsxs("div",{className:"flex sm:flex-row sm:gap-2 items-center justify-center lg:justify-start w-full",children:[t.jsx(_.a,{href:"https://apps.apple.com/us/app/sendbit-app/id6450464034",whileHover:{scale:1.05},whileTap:{scale:.95},className:"inline-block w-full sm:w-auto max-w-[200px] sm:max-w-none",children:t.jsx("img",{src:ts,alt:"Download on the App Store",className:"h-10 sm:h-14 w-auto hover:opacity-90 transition-opacity duration-300 mx-auto",fetchPriority:"high"})}),t.jsx(_.a,{href:"https://play.google.com/store/apps/details?id=com.techibytesmedia.sendbit",whileHover:{scale:1.05},whileTap:{scale:.95},className:"inline-block w-full sm:w-auto max-w-[200px] sm:max-w-none",children:t.jsx("img",{src:es,alt:"Get it on Google Play",className:"h-10 sm:h-14 w-auto hover:opacity-90 transition-opacity duration-300 mx-auto",fetchPriority:"high"})})]})]})]}),t.jsxs(_.div,{className:"hidden md:flex relative mt-8 lg:mt-0 order-first lg:order-last",variants:x,initial:"hidden",animate:"visible",children:[t.jsx("div",{"aria-hidden":"true",className:"absolute -top-5 -right-5 h-20 w-20 rotate-6 rounded-2xl border-2 border-[#5C2B90]/20"}),t.jsx("div",{"aria-hidden":"true",className:"absolute -bottom-4 -left-4 h-12 w-12 rounded-full bg-[#5C2B90]/15"}),t.jsx(_.div,{className:"relative z-10",children:t.jsx("div",{className:"relative w-full h-[300px] sm:h-[350px] md:h-[400px] lg:h-[450px] rounded-2xl overflow-hidden border border-gray-200 shadow-sm",children:t.jsx("img",{src:Ur,alt:"SendBit Hero Image",className:"w-full h-full object-cover object-center",fetchPriority:"high"})})})]})]})})]}),t.jsx("section",{className:"py-20",children:t.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:t.jsxs(_.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"space-y-12",children:[t.jsxs("div",{className:"space-y-4",children:[t.jsxs(_.h2,{className:"text-4xl lg:text-5xl font-bold font-montserrat text-gray-900",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.2},children:["Trusted by",t.jsx("br",{}),t.jsxs("span",{className:"text-[#5C2B90]",children:["500k+ ",t.jsx(_.span,{initial:{opacity:0,y:20}
2,animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.5},className:"inline-block",children:n[s]},s)]})]}),t.jsx(_.p,{className:"text-xl text-gray-600 max-w-3xl mx-auto leading-relaxed",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.4},children:"SendBit offers African professionals a fast and fully functional way to receive payments from international clients with greater efficiency."})]}),t.jsx(_.div,{className:"grid grid-cols-6 lg:grid-cols-12 gap-4 lg:gap-6 max-w-5xl mx-auto",initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.8,delay:.6},children:[{emoji:"ð¨ð¿âð¼",delay:.1},{emoji:"ð©ð¾âð»",delay:.2},{emoji:"ð¨ð¾âð¨",delay:.3},{emoji:"ð©ð¿âð¬",delay:.4},{emoji:"ð¨ð½âð»",delay:.5},{emoji:"ð©ð¾âð¨",delay:.6},{emoji:"ð¨ð¿âð¬",delay:.7},{emoji:"ð©ð½âð¼",delay:.8},{emoji:"ð¨ð¾âð¤",delay:.9},{emoji:"ð©ð¿âð»",delay:1},{emoji:"ð¨ð½âð¨",delay:1.1},{emoji:"ð©ð¾âð¬",delay:1.2},{emoji:"ð¨ð¿âð»",delay:.2},{emoji:"ð©ð½âð¨",delay:.3},{emoji:"ð¨ð¾âð¼",delay:.4},{emoji:"ð©ð¿âð¤",delay:.5},{emoji:"ð¨ð½âð¬",delay:.6},{emoji:"ð©ð¾âð»",delay:.7},{emoji:"ð¨ð¿âð¨",delay:.8},{emoji:"ð©ð½âð¼",delay:.9},{emoji:"ð¨ð¾âð¬",delay:1},{emoji:"ð©ð¿âð¨",delay:1.1},{emoji:"ð¨ð½âð¤",delay:1.2},{emoji:"ð©ð¾âð¼",delay:1.3}].map((g,f)=>t.jsxs(_.div,{className:"relative group cursor-pointer",initial:{opacity:0,scale:0,y:50},whileInView:{opacity:1,scale:1,y:0,transition:{duration:.5,delay:g.delay,type:"spring",stiffness:100}},viewport:{once:!0},whileHover:{scale:1.2,y:-10,transition:{duration:.2}},animate:{y:[0,-5,0],transition:{duration:3+f%3,repeat:1/0,ease:Gt,delay:f*.2}},children:[t.jsxs("div",{className:"w-16 h-16 lg:w-20 lg:h-20 bg-white rounded-full shadow-lg border-4 border-white group-hover:border-[#c4b5fd] transition-all duration-300 flex items-center justify-center text-2xl lg:text-3xl overflow-hidden",children:[t.jsx("div",{className:"absolute inset-0 bg-[#f3f0ff] opacity-0 group-hover:opacity-100 transition-opacity duration-300 rounded-full"}),t.jsx("span",{className:"relative z-10",children:g.emoji})]}),t.jsx(_.div,{className:"absolute -top-1 -right-1 w-3 h-3 bg-[#5C2B90] rounded-full opacity-0 group-hover:opacity-100",animate:{scale:[0,1,0],opacity:[0,1,0]},transition:{duration:2,repeat:1/0,delay:f*.1}})]},f))})]})})}),t.jsx("section",{id:"security",className:"py-16 bg-gray-50",children:t.jsx("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8",children:t.jsx("div",{className:"bg-white rounded-2xl p-8 shadow-sm border border-gray-100",children:t.jsxs("div",{className:"flex items-start space-x-6",children:[t.jsx("div",{className:"flex-shrink-0",children:t.jsx("div",{className:"w-12 h-12 bg-black rounded-lg flex items-center justify-center",children:t.jsx(xs,{className:"w-6 h-6 text-white"})})}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Your security is our priority"}),t.jsx("p",{className:"text-gray-600 leading-relaxed mb-6",children:"Sendbit uses the highest level of Internet Security and it is secured by 256 bits SSL security encryption to ensure that your information is completely protected from fraud."}),t.jsxs("a",{href:"#",className:"inline-flex items-center text-gray-700 hover:text-gray-900 transition-colors",children:[t.jsx("svg",{className:"w-4 h-4 mr-2 transform rotate-90",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 14l-7 7m0 0l-7-7m7 7V3"})}),"More on our security measures"]})]})]})})})}),t.jsx("section",{id:"how-it-works",className:"py-20 bg-gray-900",children:t.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8",children:[t.jsxs(_.div,{className:"text-center mb-16",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[t.jsx("div",{className:"inline-flex items-center px-3 py-1 bg-[#5C2B90] rounded-full text-xs font-medium text-white mb-4",children:"HOW IT WORKS"}),t.jsxs("h2",{className:"text-4xl md:text-5xl font-bold text-white mb-4",children:[t.jsx("span",{className:"text-[#bfa6d5]",children:"3 simple steps"})," to set up your",t.jsx("br",{}),"SendBit account"]})]}),t.jsx("div",{className:"grid md:grid-cols-1 gap-8",children:v.map((g,f)=>t.jsxs(_.div,{className:"bg-white rounded-2xl p-8 text-left relative overflow-hidden group hover:shadow-xl transition-all duration-300",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:f*.2},whileHover:{y:-5},children:[t.jsx("div",{className:"absolute top-4 right-4 w-8 h-8 bg-[#f3f0f7] rounded-full flex items-center justify-center",children:t.jsx("span",{className:"text-sm font-bold text-[#5C2B90]",children:g.step})}),t.jsxs("div",{className:"flex",children:[t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:"mb-6",children:g.icon}),t.jsxs("div",{className:"w-full flex flex-col",children:[t.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-4",children:g.title}),t.jsx("p",{className:"text-gray-600 text-sm",children:g.description})]})]}),t.jsx("div",{className:"hidden flex-1 md:flex justify-center items-center",children:t.jsx("img",{src:g.illustration,alt:g.title,className:"w-[15rem] h-auto",loading:"lazy"})})]}),t.jsx("div",{className:"absolute -bottom-4 -right-4 w-16 h-16 bg-[#f3f0f7] rounded-full opacity-70"}),t.jsx("div",{className:"absolute -top-2 -left-2 w-8 h-8 bg-[#5C2B90] rounded-full opacity-10"})]},f))}),t.jsxs(_.div,{className:"text-center mt-12",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.8},children:[t.jsx("p",{className:"text-gray-400 text-sm mb-6",children:"Loved by freelancers, creators and remote workers at"}),t.jsxs("div",{className:"flex justify-center items-center space-x-12 opacity-70",children:[t.jsx("div",{className:"text-white font-semibold text-lg tracking-wide",children:"Upwork"}),t.jsx("div",{className:"text-white font-semibold text-lg tracking-wide",children:"framer"}),t.jsx("div",{className:"flex items-center text-white font-semibold text-lg tracking-wide",children:"Tiktok"}),t.jsx("div",{className:"text-white font-semibold text-lg tracking-wide",children:"fiverr."}),t.jsxs("div",{className:"text-white font-semibold text-lg tracking-wide",children:["amazon",t.jsx("span",{className:"text-orange-400",children:"kindle"})]})]})]})]})}),t.jsx("section",{className:"py-24 bg-white overflow-hidden",id:"features",children:t.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[t.jsxs(_.div,{className:"text-center mb-20",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[t.jsx("div",{className:"inline-flex items-center px-4 py-2 bg-[#f3f0ff] text-[#5C2B90] rounded-full text-sm font-medium mb-6",children:"WHAT MAKES US DIFFERENT"}),t.jsxs("h2",{className:"text-4xl md:text-5xl font-bold font-montserrat text-gray-900 mb-6",children:["Why choose ",t.jsx("span",{className:"text-[#5C2B90]",children:"SendBit"})]}),t.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto leading-relaxed",children:"Discover the features that set us apart and make SendBit the preferred choice for digital payments"})]}),t.jsx("div",{className:"space-y-8",children:[{title:"Smart Invoice System",description:"Create professional invoices effortlessly and track payments in real-time. Focus on your business while we handle the billing.",features:["Auto-tracking","Invoice template"],textLeft:!0,illustration:zr},{title:"USD Virtual Card",description:"Shop globally with instant USD virtual cards. Freeze, unfreeze, and manage your spending with complete control.",features:["Instant","Secure"],textLeft:!1,illustration:Hr},{title:"Secure Crypto Payments",description:"Seamlessly transact with major cryptocurrencies including Bitcoin, Ethereum, and USDT. Experience fast, secure, and low-cost crypto payments with real-time processing.",features:["Sell Bitcoin","Sell Ethereum & USDT","Rates in Real-time processing"],textLeft:!0,illustration:qr},{title:"Bulk Services",description:"Purchase airtime and data bundles for single or multiple phone numbers. Stay connected with convenient bulk top-up options.",features:["Bulk airtime","Bulk data","Convenient"],textLeft:!1,illustration:Yr}].map((g,f)=>t.jsx(_.div,{initial:{opacity:0,y:60},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-100px"},transition:{duration:.8,delay:f*.2,type:"spring",stiffness:100},className:"relative",children:t.jsx("div",{className:"bg-white rounded-2xl p-8 md:p-12 border border-gray-200 shadow-sm hover:border-[#cfc0dc] transition-colors duration-200",children:t.jsxs("div",{className:`grid md:grid-cols-2 gap-12 items-center ${g.textLeft?"":"md:grid-flow-col-dense"}`,children:[t.jsxs(_.div,{className:`space-y-6 ${g.textLeft?"":"md:col-start-2"}`,initial:{opacity:0,x:g.textLeft?-30:30},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.6,delay:.3},children:[t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"w-8 h-8 bg-[#5C2B90] rounded-full flex items-center justify-center text-white font-bold text-sm",children:f+1}),t.jsx("div",{className:"h-px bg-gray-200 flex-1"})]}),t.jsx("h3",{className:"text-2xl md:text-3xl font-bold font-montserrat text-gray-900",children:g.title}),t.jsx("p",{className:"text-gray-600 leading-relaxed text-lg",children:g.description})]}),t.jsx("div",{className:"space-y-3",children:g.features.map((S,N)=>t.jsxs(_.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.4,delay:.5+N*.1},className:"flex items-center space-x-3",children:[t.jsx("div",{className:"w-5 h-5 bg-green-100 rounded-full flex items-center justify-center",children:t.jsx("svg",{className:"w-3 h-3 text-green-600",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),t.jsx("span",{className:"text-gray-700 font-medium",children:S})]},N))})]}),t.jsx(_.div,{className:`${g.textLeft?"":"md:col-start-1"} flex justify-center items-center`,initial:{opacity:0,x:g.textLeft?30:-30},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.6,delay:.4},children:t.jsx("div",{className:"relative",children:t.jsx("img",{src:g.illustration,alt:"illustration",className:"w-[20rem] h-full object-cover rounded-24",loading:"lazy"})})})]})})},f))})]})}),t.jsx("section",{className:"py-32 bg-gray-50",children:t.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[t.jsxs(_.div,{className:"text-center mb-20",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[t.jsx("div",{className:"inline-block px-4 py-2 bg-[#f3f0ff] text-[#5C2B90] rounded-full text-sm font-semibold mb-4",children:"TESTIMONIALS"}),t.jsx("h2",{className:"text-5xl font-bold font-montserrat text-gray-900 mb-6",children:"Magnificent words from our customers"})]}),t.jsxs("div",{className:"relative max-w-7xl mx-auto",children:[t.jsx("div",{className:"overflow-hidden",children:t.jsx(_.div,{className:"flex transition-transform duration-500 ease-in-out",animate:{x:`-${e*100}%`},transition:{type:"spring",stiffness:300,damping:30},children:Array.from({length:d}).map((g,f)=>t.jsx("div",{className:"w-full flex-shrink-0",children:t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 px-4",children:o.slice(f*l,(f+1)*l).map((S,N)=>{const b=f*l+N;return t.jsxs(_.div,{initial:{opacity:0,y:50},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:N*.1},className:"bg-white rounded-2xl p-6 border border-gray-200 shadow-sm hover:border-[#cfc0dc] transition-colors duration-200",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("div",{className:"w-10 h-10 bg-[#5C2B90] rounded-full flex items-center justify-center text-white font-bold text-sm",children:S.avatar}),t.jsx("div",{className:"flex",children:[1,2,3,4,5].map(D=>t.jsx(Qt,{className:"w-4 h-4 fill-yellow-400 text-yellow-400"},D))})]}),t.jsxs("div",{className:"mb-4",children:[t.jsx("h3",{className:"font-bold text-gray-900 text-base",children:S.name}),t.jsx("p",{className:"text-gray-600 text-sm",children:S.role})]}),t.jsxs("blockquote",{className:"text-gray-700 text-sm leading-relaxed",children:['"',S.content,'"']})]},b)})})},f))})}),t.jsxs("div",{className:"flex justify-center mt-12 space-x-4",children:[t.jsx("button",{onClick:p,disabled:e===0,className:"w-12 h-12 bg-white rounded-full shadow-lg flex items-center justify-center hover:bg-gray-50 transition-colors duration-200 disabled:opacity-50 disabled:cursor-not-allowed",children:t.jsx(_t,{className:"w-5 h-5 text-gray-600"})}),t.jsx("button",{onClick:m,disabled:e===d-1,className:"w-12 h-12 bg-white rounded-full shadow-lg flex items-center justify-center hover:bg-gray-50 transition-colors duration-200 disabled:opacity-50 disabled:cursor-not-allowed",children:t.jsx(Ke,{className:"w-5 h-5 text-gray-600"})})]}),t.jsx("div",{className:"flex justify-center mt-6 space-x-2",children:Array.from({length:d}).map((g,f)=>t.jsx("button",{onClick:()=>a(f),className:`w-3 h-3 rounded-full transition-all duration-300 ${f===e?"bg-[#5C2B90] w-8":"bg-gray-300 hover:bg-gray-400"}`},f))})]})]})}),t.jsxs("section",{className:"py-32 bg-[#3c1361] relative overflow-hidden",children:[y.map((g,f)=>t.jsx(_.div,{"aria-hidden":"true",className:`hidden lg:block absolute z-0 rounded-full border px-4 py-2 text-sm font-medium shadow-sm ${g.position} ${g.color} ${g.rotate}`,animate:{y:[0,-8,0]},transition:{duration:4+f%3,repeat:1/0,ease:Gt,delay:f*.2},children:g.label},g.label)),t.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:t.jsx("div",{className:"text-center",children:t.jsxs(_.div,{initial:{opacity:0,y:50},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8},className:"space-y-8",children:[t.jsxs("div",{className:"inline-flex items-center px-4 py-2 bg-white/10 rounded-full text-sm font-medium text-white border border-white/30",children:[t.jsx(it,{className:"w-4 h-4 mr-2"}),"DOWNLOAD"]}),t.jsxs("h1",{className:"text-4xl lg:text-6xl font-bold font-montserrat text-white leading-tight mb-6",children:["Global banking for",t.jsx("br",{}),"Africa's Professionals"]}),t.jsx("p",{className:"text-lg lg:text-xl text-white/90 mb-12 max-w-3xl mx-auto",children:"Accept payment around the globe through invoice, paypal invoice, international accounts (USD, GBP, EURO). Sell for your Crypto to Naira and other local currency and Additional Access USD virtual debit card for all your international purchases and expense."}),t.jsxs("div",{className:"flex sm:flex-row gap-4 justify-center mb-8",children:[t.jsx(_.a,{href:"https://play.google.com/store/apps/details?id=com.techibytesmedia.sendbit",className:"inline-flex items-center justify-center w-[155px] h-[46px] bg-black text-white rounded-xl transition-all duration-300 hover:bg-gray-800 hover:scale-105 hover:shadow-2xl transform",initial:{y:-100,opacity:0,rotateX:-90},whileInView:{y:0,opacity:1,rotateX:0},viewport:{once:!0},transition:{duration:.8,delay:.3,type:"spring",stiffness:100,damping:15},whileHover:{y:-5,transition:{duration:.2}},children:t.jsx("img",{src:es,alt:"Get it on Google Play",className:"w-[155px] h-[46px]"})}),t.jsx(_.a,{href:"https://apps.apple.com/us/app/sendbit-app/id6450464034",className:"inline-flex items-center justify-center w-[155px] h-[46px] bg-black text-white rounded-xl transition-all duration-300 hover:bg-gray-800 hover:scale-105 hover:shadow-2xl transform",initial:{y:-100,opacity:0,rotateX:-90},whileInView:{y:0,opacity:1,rotateX:0},viewport:{once:!0},transition:{duration:.8,delay:.5,type:"spring",stiffness:100,damping:15},whileHover:{y:-5,transition:{duration:.2}},children:t.jsx("img",{src:ts,alt:"Download on the App Store",className:"w-[155px] h-[46px]"})})]})]})})})]}),t.jsx("section",{className:"py-2
24 bg-gray-50",children:t.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[t.jsxs(_.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[t.jsx("div",{className:"inline-flex items-center px-4 py-2 bg-[#f3f0ff] text-[#5C2B90] rounded-full text-sm font-medium mb-6",children:"FAQ's"}),t.jsxs("h2",{className:"text-4xl md:text-5xl font-bold font-montserrat text-gray-900 mb-6",children:["If you have questions, we have some",t.jsx("span",{className:"block text-[#5C2B90]",children:"answers"})]}),t.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto leading-relaxed",children:"Get answers to all questions you have and boost your knowledge, so that we can serve you better. Have more questions? Contact us"})]}),t.jsx("div",{className:"space-y-4",children:[{question:"What is SendBit?",answer:"SendBit is your fast pay spot, enabling you to accept PayPal payments, purchase airtime and data bundles in single or in bulk, trade gift cards, and more. Experience the convenience of managing all these services seamlessly within the SendBit platform."},{question:"How can I accept PayPal payments with SendBit?",answer:"With SendBit, accepting PayPal payments has never been easier. Just send your bill or payment request to your recipient, along with the details of the specific services you are providing. Once your recipient makes the payment using their PayPal account, you will receive an email with a unique confirmation code sent to their PayPal email address. In case your recipient hasn't confirmed the payment within 6 hours of making the payment, the confirmation code will be made available to you. This process ensures smooth and secure payment handling, making it convenient for both you and your recipients. After confirming the PayPal payment, the corresponding Naira amount will be deposited into your Naira wallet. From there, you can easily transfer the funds to your Naira bank account, ensuring a seamless transfer process."},{question:"Can I purchase airtime and data bundles on SendBit?",answer:"Absolutely! SendBit offers the convenience of buying airtime and data bundles in for single phone numbers or even in BULK. You can easily top up your airtime credit or purchase data packages to stay connected to the internet. With the Bulk airtime and data bundle feature, you can easily and swiftly top up airtime credit in larger quantities, catering to your specific needs."},{question:"Can I use SendBit for bill payments in Nigeria?",answer:"Yes, SendBit offers a convenient solution for bill payments, including electricity bills and cable TV subscriptions. You can easily pay for services such as electricity in Nigeria and cable TV subscriptions for providers like DSTV, GOTV, and StarTimes."},{question:"How does gift card trading work on SendBit?",answer:"SendBit provides a platform for trading gift cards, allowing you to buy, sell, or exchange gift cards with ease. Simply list your gift cards or browse available listings to find the perfect deal."},{question:"How can I get started with SendBit?",answer:"Getting started is quick and easy. Simply sign up for free and verify your identity to start using SendBit. Enjoy the benefits of fast PayPal payments, airtime and data purchases, gift card trading, and more."},{question:"Does SendBit store my payment information?",answer:"At SendBit, we prioritize the security and privacy of your payment information. We follow strict data protection policies and do not store your payment information on our servers. Your payment details are processed securely through our trusted payment partners."},{question:"Can I track my transactions and payment history on SendBit?",answer:"Certainly! SendBit provides you with the ability to track your transactions and payment history within the platform. This allows you to monitor your financial activities and stay updated."},{question:"Is my cash and personal information safe with SendBit?",answer:"Yes, security is a top priority at SendBit. Your cash and personal information are protected through robust security measures and encryption protocols, ensuring a safe and secure experience."},{question:"How does SendBit handle disputes or fraudulent activities?",answer:"SendBit takes dis
2putes and fraudulent activities seriously. If you encounter any suspicious or fraudulent activities on the platform, please report them immediately to our customer service team. We have dedicated procedures in place to investigate and address such incidents promptly."}].map((g,f)=>t.jsx(_.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.5,delay:f*.1},viewport:{once:!0},className:"bg-white rounded-2xl shadow-sm border border-gray-100 overflow-hidden",children:t.jsxs("details",{className:"group",children:[t.jsxs("summary",{className:"flex items-center justify-between p-6 cursor-pointer hover:bg-gray-50 transition-colors",children:[t.jsx("h3",{className:"text-lg font-semibold font-montserrat text-gray-900 pr-4",children:g.question}),t.jsx("div",{className:"flex-shrink-0",children:t.jsx("div",{className:"w-8 h-8 bg-[#f3f0f7] rounded-full flex items-center justify-center group-open:bg-[#5C2B90] transition-colors",children:t.jsx("svg",{className:"w-4 h-4 text-[#5C2B90] group-open:text-white transition-all group-open:rotate-45",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})})})})]}),t.jsx("div",{className:"px-6 pb-6",children:t.jsx("p",{className:"text-gray-600 leading-relaxed",children:g.answer})})]})},f))}),t.jsx(_.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6,delay:.3},viewport:{once:!0},className:"text-center mt-16",children:t.jsxs("div",{className:"bg-[#5C2B90] rounded-2xl p-8 text-white",children:[t.jsx("h3",{className:"text-2xl font-bold font-montserrat mb-4",children:"Still have questions?"}),t.jsx("p",{className:"text-white/80 mb-6 max-w-2xl mx-auto",children:"Can't find the answer you're looking for? Our friendly customer support team is here to help."}),t.jsx(U,{to:"/contact",children:t.jsx(_.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:t.jsxs(C,{className:"bg-white text-[#5C2B90] hover:bg-gray-100 font-bold px-8 py-3 rounded-full",children:["Contact Support",t.jsx(Xt,{className:"ml-2 w-4 h-4"})]})})})]})})]})}),t.jsx(Fr,{})]})},q=e=>{const a=typeof e=="string"?parseFloat(e):e;return isNaN(a)?0:Math.round(a*100)},V=e=>{const a=typeof e=="string"?parseFloat(e):e;return isNaN(a)?0:a/100},Qr=new Set(["BTC","ETH","USDT","USDC"]),pe=(e,a)=>{const s=typeof e=="string"?parseFloat(e):e;return isNaN(s)?0:Qr.has((a??"").toUpperCase())?s:s/100},Xr=e=>{const s=e.replace(/[^0-9.]/g,"").split(".");return s.length>2?e:(s[0]=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),s.join("."))},ss=e=>parseFloat(e.replace(/,/g,""))||0,Zr=e=>{const a=new FormData;return a.append("category",e.category),a.append("description",e.description),a.append("merchant_declaration",e.merchant_declaration?"1":"0"),e.supporting_urls.forEach((s,r)=>a.append(`supporting_urls[${r}]`,s)),e.files.forEach((s,r)=>a.append(`files[${r}]`,s)),e.activity_log_entries?.forEach((s,r)=>{a.append(`activity_log_entries[${r}][occurred_at]`,s.occurred_at),a.append(`activity_log_entries[${r}][event_type]`,s.event_type),a.append(`activity_log_entries[${r}][description]`,s.description),a.append(`activity_log_entries[${r}][ip_address]`,s.ip_address),s.customer_identifier&&a.append(`activity_log_entries[${r}][customer_identifier]`,s.customer_identifier),a.append(`activity_log_entries[${r}][resource]`,s.resource),a.append(`activity_log_entries[${r}][source]`,s.source)}),e.customer_contact&&(a.append("customer_contact[name]",e.customer_contact.name),e.customer_contact.phone&&a.append("customer_contact[phone]",e.customer_contact.phone),e.customer_contact.email&&a.append("customer_contact[email]",e.customer_contact.email),a.append("customer_contact[source]",e.customer_contact.source),a.append("customer_contact[contact_permission]",e.customer_contact.contact_permission?"1":"0")),a},lt=e=>{if(Array.isArray(e)){const a=e.map(s=>typeof s=="object"&&s!==null?lt(s):s).filter(s=>s!==null&&s!==""&&s!==!1&&s!==void 0);return a.length>0?a:null}if(typeof e=="object"&&e!==null){const a=Object.entries(e).reduce((s,[r,n])=>{const o=typeof n=="object"&&n!==null?lt(n):n;return o!==null&&o!==""&&o!==!1&&o!==void 0&&(s[r]=o),s},{});return Object.keys(a).length>0?a:null}return e===null||e===""||e===!1||e===void 0?null:e},dt=e=>Array.isArray(e)?e.map(a=>typeof a=="object"&&a!==null?dt(a):a):typeof e=="object"&&e!==null?Ob
2ject.keys(e).sort().reduce((a,s)=>{const r=e[s];return a[s]=typeof r=="object"&&r!==null?dt(r):r,a},{}):e,Jr=e=>{const a=[],s=(r,n)=>{if(Array.isArray(r)){r.forEach((o,l)=>s(o,`${n}[${l}]`));return}if(typeof r=="object"&&r!==null){Object.keys(r).forEach(o=>{const l=n?`${n}[${o}]`:o;s(r[o],l)});return}a.push(`${encodeURIComponent(n)}=${encodeURIComponent(String(r))}`)};if(e&&typeof e=="object"){const r=lt(e);if(r){const n=dt(r);Object.keys(n).sort().forEach(o=>s(n[o],o))}}return a.join("&")},en=e=>e.endsWith("[]")?{key:e.slice(0,-2),isArray:!0}:{key:e,isArray:!1},tn=(e,a,s,r)=>{const n=e[a];if(r){if(Array.isArray(n)){n.push(s),e[a]=n;return}e[a]=n===void 0?[s]:[n,s];return}if(n===void 0){e[a]=s;return}if(Array.isArray(n)){n.push(s),e[a]=n;return}e[a]=[n,s]},sn=()=>ze.lib.WordArray.random(16).toString(ze.enc.Hex),re=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const a=Math.random()*16|0;return(e==="x"?a:a&3|8).toString(16)}),Le=()=>Intl.DateTimeFormat().resolvedOptions().timeZone,an="sendbit_signing_key_id",rn="sendbit_signing_secret";let Ct=null,Rt=null;try{localStorage.removeItem(an),localStorage.removeItem(rn)}catch{}const Hs=e=>{Ct=e},nn=()=>Ct,Ys=e=>{Rt=e},on=()=>Rt,se=()=>{Ct=null,Rt=null},be=()=>{try{const e=navigator.userAgent,a=navigator.platform;let s="Unknown OS";if(e.includes("Windows NT")){const h=e.match(/Windows NT ([\d.]+)/),x=h?h[1]:"";s=`Windows ${{"10.0":"10/11","6.3":"8.1","6.2":"8","6.1":"7"}[x]||x}`}else if(e.includes("Intel Mac OS X")||e.includes("PPC Mac OS X")){const h=e.match(/Mac OS X ([\d_]+)/);s=`macOS ${h?h[1].replace(/_/g,"."):""}`}else if(e.includes("Linux")&&!e.includes("Android"))e.includes("Ubuntu")?s="Ubuntu Linux":e.includes("CrOS")?s="Chrome OS":s="Linux";else if(e.includes("Android")){const h=e.match(/Android ([\d.]+)/);s=`Android ${h?h[1]:""}`}else if(e.includes("iPhone")||e.includes("iPad")){const h=e.match(/OS ([\d_]+)/),x=h?h[1].replace(/_/g,"."):"",v=e.includes("iPad")?"iPad":"iPhone";s=`iOS ${x} (${v})`}let r="Unknown Browser";if(e.includes("Edg/")){const h=e.match(/Edg\/([\d.]+)/);r=`Microsoft Edge ${h?h[1]:""}`}else if(e.includes("Chrome/")&&!e.includes("Edg/")){const h=e.match(/Chrome\/([\d.]+)/),x=h?h[1]:"";if(e.includes("OPR/")){const v=e.match(/OPR\/([\d.]+)/);r=`Opera ${v?v[1]:""}`}else r=`Chrome ${x}`}else if(e.includes("Firefox/")){const h=e.match(/Firefox\/([\d.]+)/);r=`Firefox ${h?h[1]:""}`}else if(e.includes("Safari/")&&!e.includes("Chrome")&&!e.includes("Edg/")){const h=e.match(/Version\/([\d.]+)/);r=`Safari ${h?h[1]:""}`}else if(e.includes("Trident/")){const h=e.match(/rv:([\d.]+)/);r=`Internet Explorer ${h?h[1]:""}`}let n="Desktop";e.includes("Mobile")||e.includes("Android")?n="Mobile":(e.includes("Tablet")||e.includes("iPad"))&&(n="Tablet");const o=`${screen.width}x${screen.height}`,l=window.devicePixelRatio||1,d=l>1?`${o}@${l}x`:o,m=Intl.DateTimeFormat().resolvedOptions().timeZone;return`${n} | ${s} | ${r} | ${d} | ${m}`}catch{return"SendBit Web Client"}},cn=async e=>{const a=await e.arrayBuffer(),s=await crypto.subtle.digest("SHA-256",a);return Array.from(new Uint8Array(s)).map(r=>r.toString(16).padStart(2,"0")).join("")},ln=async(e,a)=>{let s="",r={};if(e.body)try{if(typeof FormData<"u"&&e.body instanceof FormData){const l=Array.from(e.body.entries());for(const[d,m]of l)if(typeof m=="string"){const p=en(d);tn(r,p.key,m,p.isArray)}else(m instanceof File||m instanceof Blob)&&(r[`${d}_hash`]=await cn(m))}else if(typeof e.body=="string")try{r=JSON.parse(e.body)}catch{r={}}else typeof e.body=="object"&&e.body!==null?r=e.body:r={}}catch{}try{const l=new URL(e.url.startsWith("http")?e.url:`http://localhost${e.url}`);new URLSearchParams(l.search).forEach((m,p)=>{r[p]=m})}catch{}s=Jr(r);let n=e.url.trim().replace(/^https?:\/\/[^/]+/,"");n=n.split("?")[0],n.startsWith("/")||(n="/"+n),n===""&&(n="/");const o=`${e.method.toUpperCase()}.${n}.${e.timestamp}.${e.nonce}.${s}`;return ze.HmacSHA256(o,a).toString(ze.enc.Hex).toLowerCase()},zs=async(e,a="GET",s="",r,n=!0)=>{if(!e.clientSecret)throw new Error("A request-signing secret is required to generate HMAC headers.");const o=Math.floor(Date.now()/1e3).toString(),l=sn(),d={method:a.toUpperCase(),url:s,body:r||null,timestamp:o,nonce:l},m=await ln(d,e.clientSecret),p={"Client-ID":e.clientId,Nonce:l,Signature:m,Timestamp:o};n&&(p["Device-Name"]=e.deviceName||be(),p["Request-ID"]=re(),p.Timezone=Le(),p["Idempotency-Key"]=re());const h=nn();return h&&(p["Signing-Key-ID"]=h),p},dn=()=>{const e="sendbit_F7Rr6QEZz3OYHrZes2Gx",a=be();return{clientId:e,deviceName:a}}
2,i={AUTH:{LOGIN:"/auth/login",REGISTER:"/auth/register",LOGOUT:"/auth/logout",VERIFY_ACCOUNT:"/auth/verify-otp",FORGOT_PASSWORD:"/auth/forgot-password",RESET_PASSWORD:"/auth/reset-password",RESEND_OTP:"/auth/otp/resend",REFRESH_TOKEN:"/auth/refresh-token",CHANGE_PASSWORD:"/auth/change-password",SEND_EMAIL_OTP:"/user/email/send-otp",VERIFY_EMAIL_OTP:"/user/email/verify-otp",SEND_PHONE_OTP:"/user/phone/send-otp",VERIFY_PHONE_OTP:"/user/phone/verify-otp",UPDATE_PHONE_NUMBER:"/auth/update-phone-number",CSRF_TOKEN:"/auth/csrf-token",BOOTSTRAP_SIGNING:"/auth/signing/bootstrap"},SOCIAL:{REDIRECT:e=>`/auth/social/${e}/redirect`,EXCHANGE:"/auth/social/exchange"},AVATARS:{DEFAULT:"/avatars/default"},USER:{DETAILS:"/user",PROFILE:"/user/profile",UPDATE_PROFILE:"/user/profile-update",UPLOAD_AVATAR:"/user/avatar",REMOVE_AVATAR:"/user/avatar",DELETE_ACCOUNT:"/user/delete",PREFERENCES:"/user/preferences",PUSH_TOKEN:"/user/push-token",CHANGE_PASSWORD:"/user/change-password",SECURITY_PIN:"/user/security-pin",SECURITY_PIN_VERIFY:"/user/security-pin/verify",VIRTUAL_ACCOUNTS:"/user/virtual-accounts",CREATE_VIRTUAL_ACCOUNT:"/user/virtual-accounts/create",REGENERATE_VIRTUAL_ACCOUNT:"/user/virtual-accounts/regenerate",SIMULATE_DEPOSIT:"/user/virtual-accounts/test/deposit",TIERS:"/user/tiers",VERIFICATION_STATUS:"/user/verification-status",SERVICE_STATUS:"/user/service-status",DASHBOARD_MESSAGES:"/user/dashboard-messages",LIMITS:"/user/limits",ACTIVITIES:"/user/activities",ACTIVITIES_EXPORT:"/user/activities/export",ACCOUNT_DELETION_ELIGIBILITY:"/user/account-deletion/eligibility"},WALLET:{BALANCE:"/wallet/balance",FUND:"/wallet/fund",WITHDRAW:"/wallet/withdraw",HISTORY:"/wallet/history",BANKS:"/wallet/banks",VERIFY_BANK:"/wallet/verify-bank"},USER_WALLETS:{LIST:"/user/wallets"},TRANSACTIONS:{LIST:"/transactions",SEND:"/transactions/send",DETAILS:e=>`/transactions/${e}`,CANCEL:e=>`/transactions/${e}/cancel`,RECEIPT:e=>`/transactions/${e}/receipt`,RATES:"/transactions/rates",CATEGORIES:"/transactions/categories",STATEMENT:"/transactions/statement",STATEMENT_SETTINGS:"/transactions/statement/settings",RECEIPT_SHARE:e=>`/transactions/${e}/receipt/share`,RECEIPT_REVOKE:e=>`/transactions/${e}/receipt/share`,RECENT_RECIPIENTS:"/transactions/recent-recipients"},TRANSFERS:{BANKS:"/transfers/banks",RESOLVE_ACCOUNT:"/transfers/banks/resolve",QUOTE:"/transfers/quote",SEND_MONEY:"/transfers/send-money",SEND_TAGS:"/transfers/send-tags",SCHEDULED:"/transfers/scheduled",BENEFICIARIES:"/transfers/beneficiaries",BENEFICIARIES_UPDATE_LABEL:e=>`/transfers/beneficiaries/${e}/label`,BENEFICIARIES_SET_DEFAULT:e=>`/transfers/beneficiaries/${e}/default`,BENEFICIARIES_DELETE:e=>`/transfers/beneficiaries/${e}`,WITHDRAWALS:"/transfers/withdrawals"},PAYPAL:{TERMS:"/paypal/terms",ACCEPT_TERMS:"/paypal/terms/accept",SERVICE_VERIFICATION:"/paypal/service-verification",LETTER_OF_ACKNOWLEDGEMENT:"/paypal/letter-of-acknowledgement",LETTER_OF_ACKNOWLEDGEMENT_TEMPLATE:"/paypal/letter-of-acknowledgement/template",PAYMENTS:"/paypal/payments",WEBHOOK:"/paypal/webhook",HOLD_BALANCE:"/paypal/hold-balance",HELD_FUNDS:"/paypal/held-funds"},CARDS:{ONBOARDING:"/virtual-cards/onboarding",TERMS:"/virtual-cards/terms",ACCEPT_TERMS:"/virtual-cards/terms/accept",LIST:"/virtual-cards",CREATE:"/virtual-cards",DETAILS:e=>`/virtual-cards/${e}`,REVEAL:e=>`/virtual-cards/${e}/reveal`,FUND:e=>`/virtual-cards/${e}/fund`,WITHDRAW:e=>`/virtual-cards/${e}/withdraw`,FREEZE:e=>`/virtual-cards/${e}/freeze`,UNFREEZE:e=>`/virtual-cards/${e}/unfreeze`,DELETE:e=>`/virtual-cards/${e}`,TRANSACTIONS:e=>`/virtual-cards/${e}/transactions`,PROFILE:"/virtual-cards/profile",PAY_OUTSTANDING_FEES:"/virtual-cards/outstanding-fees/pay"},INVOICES:{TERMS:"/invoices/terms",ACCEPT_TERMS:"/invoices/terms/accept",QUOTE:"/invoices/quote",UPLOAD_LOGO:"/invoices/business-logo",LIST:"/invoices",CREATE:"/invoices",GET:e=>`/invoices/${e}`,UPDATE:e=>`/invoices/${e}`,SEND:e=>`/invoices/${e}/send`,REMIND:e=>`/invoices/${e}/remind`,CANCEL:e=>`/invoices/${e}/cancel`,HOLD_BALANCE:"/invoices/hold-balance",HOLD_WALLET:"/invoices/hold-wallet",HELD_FUNDS:"/invoices/held-funds",INVOICE_HELD_FUNDS:e=>`/invoices/${e}/held-funds`},NOTIFICATIONS:{LIST:"/user/notifications",MARK_READ:e=>`/user/notifications/${e}/read`,MARK_ALL_READ:"/user/notifications/read-all",EVENTS:"/user/notifications/events",PUSH_PREFERENCE:"/user/notifications/push"},PAYMENT_LINKS:{TERMS:"/payment-links/terms",ACCEPT_TERMS:"/payment-links/terms/accept",QUOTE:"/payment-links/quote",LIST:"/payment-links",CREATE:"/payment-links",DETAILS:e=>`/payment-links/${e}`,UPDATE:e=>`/payment-links/${e}`,REVOKE:e=>`/payment-links/${e}/revoke`},EVIDENCE_REQUESTS:{LIST:"/evidence-requests",DETAILS:e=>`/evidence-requests/${encodeURIComponent(e)}`,SUBMIT:e=>`/evidence-requests/${encodeURIComponent(e)}/submit`},SUPPORT:{TICKETS:"/support/tickets",CREATE_TICKET:"/support/tickets",TICKET_DETAILS:e=>`/support/tickets/${e}`,REPLY:e=>`/support/tickets/${e}/reply`,FAQ:"/support/faq",FEEDBACK:"/support/feedback"},REWARDS:{SUMMARY:"/rewards",ACTIVITY:"/rewards/activity",MISSIONS:"/rewards/missions",TIER:"/rewards/tier",REDEMPTIONS:"/rewards/redemptions",REDEEM:e=>`/rewards/redemptions/${e}`},SETTINGS:{SECURITY:"/settings/security",PIN:"/settings/pin",TWO_FA:"/settings/2fa",TWO_FA_VERIFY:"/settings/2fa/verify",PRIVACY:"/settings/privacy",PREFERENCES:"/settings/preferences"},DEVICE:{VERIFY_NEW_DEVICE:"/auth/verify-device",LIST_DEVICES:"/device/list",REMOVE_DEVICE:e=>`/device/${e}/remove`,TRUST_DEVICE:e=>`/device/${e}/trust`},REFERRAL:{LIST:"/referrals"},KYC:{STATUS:"/kyc/status",SUBMIT:"/kyc/submit",DOCUMENTS:"/kyc/documents",VERIFY:"/kyc/verify",SUBMIT_BVN:"/kyc/bvn",SUBMIT_NIN:"/kyc/nin",PROOF_OF_ADDRESS:"/kyc/proof-of-address",GOVERNMENT_ID:"/kyc/government-id",LIVENESS:"/kyc/liveness"},SYSTEM:{TRANSACTION_POLICY:"/system/transactions/policy",EXCHANGE_RATES:"/system/exchange-rates",TERMS:"/system/terms",PRIVACY_POLICY:"/system/privacy-policy",ABOUT:"/system/about",FAQ:"/system/faq",WHATS_NEW:"/system/whats-new",SERVICE_AVAILABILITY:"/system/service-availability",CLIENT_SETTINGS:"/system/settings"},SOCIAL_LINKS:"/sendbit-social-links-and-data",TESTING:{VIRTUAL_ACCOUNT_DEPOSIT:"/testing/virtual-accounts/deposit",VIRTUAL_CARDS_TRANSACTION:"/testing/virtual-cards/transaction",CRYPTO_DEPOSIT:"/testing/crypto/deposit"},ADMIN:{USERS:"/admin/users",TRANSACTIONS:"/admin/transactions",REPORTS:"/admin/reports",SETTINGS:"/admin/settings"},CRYPTO:{WALLET_ADDRESSES:"/crypto/wallet-addresses",WALLETS:"/crypto/wallets",BALANCES:"/crypto/balances",HISTORY:"/crypto/history",CREATE_ACCOUNT:"/crypto/create/account",CREATE_WALLET:"/crypto/create/wallet",STATUS:"/crypto/status",SIMULATE_DEPOSIT:"/crypto/test/deposit",SWAP_QUOTE:"/crypto/swap/quote",SWAP_REFRESH:"/crypto/swap/refresh",SWAP_CONFIRM:"/crypto/swap/confirm",SWAP_CANCEL:"/crypto/swap/cancel",MARKET:"/crypto/market",MARKET_KLINE:e=>`/crypto/market/${e}/k`,MARKET_ORDER_BOOK:e=>`/crypto/market/${e}/order-book`},DATA_BUNDLE:{NETWORKS:"/databundle/networks",PLANS:"/databundle/plans",PURCHASE:"/databundle/purchase",BULK_PURCHASE:"/databundle/bulk-purchase"},CABLE_TV:{PROVIDERS:"/cable/providers",PACKAGES:"/cable/packages",VALIDATE:"/cable/validate",PURCHASE:"/cable/purchase"}
2,ELECTRICITY:{PROVIDERS:"/electricity/providers",VALIDATE:"/electricity/validate",PURCHASE:"/electricity/purchase"}},Ks=e=>{const a=new URLSearchParams;Object.entries(e).forEach(([r,n])=>{n!=null&&n!==""&&a.append(r,String(n))});const s=a.toString();return s?`?${s}`:""},un="https://api.mysendbit.com/api/v1",de=un;let $=null;const pn=()=>{try{$=dn()}catch{$=null}},De=3e4,H=M.create({baseURL:de,timeout:De,withCredentials:!0,headers:{"Content-Type":"application/json",Accept:"application/json"}});pn();const qs=900,It=6e4;let ce=null,G=null,ye=null,_e=null,ut=0,Ee=null;const qe="sendbit-logout-state",xe=()=>{try{return localStorage.getItem(qe)}catch{return null}};let ke=xe()!==null,Oe=xe()==="pending",pt=Oe,Y=0,ie=null,mt=null;const ht=e=>{Oe=e==="pending";try{e===null?localStorage.removeItem(qe):localStorage.setItem(qe,e)}catch{}},ne=()=>ke||xe()!==null,Pt=()=>Oe||xe()==="pending",We=()=>pt&&Pt(),J=e=>{if(e!==Y||ne())throw new M.CanceledError("The session has ended. Please sign in again.")},mn=["auth_token","refresh_token","token_expires_at"];try{mn.forEach(e=>localStorage.removeItem(e))}catch{}const hn=new Set([i.AUTH.LOGIN,i.AUTH.VERIFY_ACCOUNT,i.AUTH.REFRESH_TOKEN,i.AUTH.LOGOUT,i.DEVICE.VERIFY_NEW_DEVICE,i.SOCIAL.EXCHANGE]),Gs=e=>{if(!e)return"";try{return new URL(e,de).pathname.replace(/^\/api\/v1/,"")}catch{return e.split("?")[0]}},fn=e=>(e.method?.toUpperCase()||"GET")!=="GET"&&hn.has(Gs(e.url)),gn=e=>{const a=typeof e=="number"&&e>0?e:qs;ye=Date.now()+a*1e3},yn=e=>{ce&&(clearTimeout(ce),ce=null);const a=(typeof e=="number"&&e>0?e:qs)*1e3,s=Math.max(a-It,5e3);ce=setTimeout(async()=>{try{await Je()}catch{}},s)},xn=()=>{ce&&(clearTimeout(ce),ce=null)},we=async(e=!1)=>{const a=_e&&Date.now()<ut-3e4;if(!e&&a)return _e;if(!e&&Ee)return Ee;if(!$)throw new Error("SendBit Client-ID is not configured.");Ee=(async()=>{const s=`${de}${i.AUTH.CSRF_TOKEN}`,r=await M.get(s,{withCredentials:!0,timeout:De,headers:{Accept:"application/json","Client-ID":$.clientId,"Device-Name":$.deviceName||be(),"Request-ID":re(),Timezone:Le()}}),n=r.data?.data||r.data;if(!n?.csrf_token)throw new Error("CSRF bootstrap response did not contain a token.");return _e=n.csrf_token,ut=Date.now()+Math.max(n.expires_in||3600,60)*1e3,_e})();try{return await Ee}finally{Ee=null}};H.interceptors.request.use(async e=>{const a=e,s=a._authGeneration??Y;if(a._authGeneration=s,s!==Y)throw new M.CanceledError("Session changed");const r=G;r&&J(s),r&&e.headers&&(e.headers.Authorization=`Bearer ${r}`),fn(e)&&e.headers&&(e.headers["X-XSRF-TOKEN"]=await we());try{if(!(!!e.url&&e.url.includes(i.AUTH.REFRESH_TOKEN))&&r&&ye&&Date.now()>=ye-It)if(Te)await new Promise((o,l)=>{Re.push({resolve:o,reject:l})}).then(o=>{e.headers&&(e.headers.Authorization=`Bearer ${o}`)});else{const o=await Je();e.headers&&(e.headers.Authorization=`Bearer ${o}`)}}catch(n){if(M.isCancel(n))throw n}if($)try{const n=e.method?.toUpperCase()||"GET",o=e.url||"",l=e?.baseURL||de;let d=o.startsWith("http")?o:`${l}${o}`;const m=e.params;if(m&&typeof m=="object"){const y=Object.entries(m).filter(([,g])=>g!=null);if(y.length>0){const g=y.map(([f,S])=>`${encodeURIComponent(f)}=${encodeURIComponent(String(S))}`).join("&");d=`${d}${d.includes("?")?"&":"?"}${g}`}}const p=e.data||void 0,h=on();if(e.headers["Client-ID"]=$.clientId,!h){if(s!==Y)throw new M.CanceledError("Session changed");return e}const x={...$,clientSecret:h},v=await zs(x,n,d,p);Object.entries(v).forEach(([y,g])=>{g&&(e.headers[y]=g)})}catch(n){if(M.isCancel(n))throw n}if(s!==Y)throw new M.CanceledError("Session changed");return e},e=>Promise.reject(e));let Te=!1,Re=[];const ft=(e,a=null)=>{Re.forEach(({resolve:s,reject:r})=>{e?r(e):s(a)}),Re=[]},Ge=typeof BroadcastChannel<"u"?new BroadcastChannel("sendbit-auth-session"):null,Ae=(e,a=!0)=>{if(J(Y),!e.access_token)throw new Error("Authentication response missing access_token");G=e.access_token,gn(e.expires_in),yn(e.expires_in),H.defaults.headers.common.Authorization=`Bearer ${e.access_token}`,se();const s=e.request_signing?.key_id,r=e.request_signing?.secret;s&&Hs(s),r&&Ys(r),a&&Ge?.postMessage({type:"session",payload:e})}
2,Ze=(e=!1)=>{Y+=1,ft(new M.CanceledError("Session ended")),G=null,ye=null,_e=null,ut=0,xn(),se(),delete H.defaults.headers.common.Authorization,e&&Ge?.postMessage({type:"logout"})};Ge&&(Ge.onmessage=e=>{if(e.data?.type==="session"){if(ne())return;Ae(e.data.payload,!1),window.dispatchEvent(new CustomEvent("auth:session-synchronized"))}else e.data?.type==="logout"&&(ke=!0,Ze(!1),window.dispatchEvent(new CustomEvent("auth:remote-logout")))});window.addEventListener("storage",e=>{e.key===qe&&e.newValue&&(Oe=e.newValue==="pending",ke=!0,Ze(!1),window.dispatchEvent(new CustomEvent("auth:remote-logout")))});const Qs=e=>M.isAxiosError(e)?e.response?.status===403&&e.response?.data?.errors?.error_code==="INVALID_CSRF_TOKEN":!1,Je=async(e={})=>{const a=Y;if(J(a),Te)return new Promise((n,o)=>{Re.push({resolve:n,reject:o})});const s=G;Te=!0;let r;mt=new Promise(n=>{r=n});try{const n=i.AUTH.REFRESH_TOKEN,o=n.startsWith("http")?n:`${de}${n}`,l=$?.clientId||"sendbit_F7Rr6QEZz3OYHrZes2Gx",d=re(),m={"Client-ID":l,"Device-Name":$?.deviceName||be(),"Request-ID":re(),"Idempotency-Key":d,Timezone:Le()},p=v=>(J(a),M.post(o,{},{withCredentials:!0,headers:{"Content-Type":"application/json",Accept:"application/json",...m,"X-XSRF-TOKEN":v},timeout:De})),h=async()=>{if(J(a),G&&G!==s&&ye&&ye>Date.now()+It)return G;let v=await we(),y;try{y=await p(v)}catch(S){if(Qs(S))v=await we(!0),y=await p(v);else if(M.isAxiosError(S)&&!S.response)y=await p(v);else throw S}J(a);const g=y.data?.data||y.data,f=g?.access_token;if(!f)throw new Error("Refresh response missing access_token");return Ae(g),f},x=navigator.locks?await navigator.locks.request("sendbit-refresh-cookie",h):await h();return J(a),ft(null,x),x}catch(n){throw ft(n,null),M.isAxiosError(n)&&Gs(n.config?.url)===i.AUTH.REFRESH_TOKEN&&n.response?.status===401&&n.response?.data?.errors?.error_code==="INVALID_REFRESH_TOKEN"&&a===Y&&!ne()&&(Ze(),e.silent||window.dispatchEvent(new CustomEvent("auth:session-expired"))),n}finally{Te=!1,r(),mt=null}},Xs=()=>{if(ie)return ie;pt=!1,ke=!0,ht("pending"),window.dispatchEvent(new CustomEvent("auth:logout-started"));const e=xe()==="pending";return gt.removeToken(),window.dispatchEvent(new CustomEvent("auth:remote-logout")),ie=(async()=>{await mt;const a=async()=>{if(e&&xe()!=="pending"){Oe=!1,window.dispatchEvent(new CustomEvent("auth:logout-complete"));return}const{keyId:s,secret:r}=await Js(),n=re(),o=`${de}${i.AUTH.LOGOUT}`,l=async m=>{const p=await zs({...$,clientSecret:r},"POST",o,{});return M.post(o,{},{withCredentials:!0,timeout:De,headers:{Accept:"application/json","Content-Type":"application/json",...p,"Signing-Key-ID":s,"Client-ID":$?.clientId||"","Device-Name":$?.deviceName||be(),"Request-ID":re(),"Idempotency-Key":n,"X-XSRF-TOKEN":m,Timezone:Le()}})};let d;try{d=await l(await we())}catch(m){if(!Qs(m))throw m;d=await l(await we(!0))}if(d.data?.success!==!0)throw new Error("Server logout was not confirmed.");ht("complete"),window.dispatchEvent(new CustomEvent("auth:logout-complete"))};navigator.locks?await navigator.locks.request("sendbit-refresh-cookie",a):await a()})().catch(a=>{throw pt=!0,window.dispatchEvent(new CustomEvent("auth:logout-failed")),a}).finally(()=>{ie=null}),ie},Zs=async()=>{ie?await ie:Pt()&&await Xs()};H.interceptors.response.use(e=>{if(e.config.headers.Authorization&&ne())throw new M.CanceledError("Session ended");const a=e.config._authGeneration;if(a!==void 0&&a!==Y)throw new M.CanceledError("Session changed");return e},async e=>{const a=e.config,s=!!a?.url&&a.url.includes(i.AUTH.REFRESH_TOKEN),r=a?._authGeneration;if(r!==void 0&&r!==Y)return Promise.reject(new M.CanceledError("Session changed"));if(e.response){const{status:n,data:o}=e.response;switch(n){case 401:if(!ne()&&G&&a&&!a._retry&&!s){if(a._retry=!0,Te)return new Promise((l,d)=>{Re.push({resolve:l,reject:d})}).then(l=>(a.headers&&(a.headers.Authorization=`Bearer ${l}`),H(a))).catch(l=>Promise.reject(l));try{const l=await Je();return a.headers&&(a.headers.Authorization=`Bearer ${l}`),H(a)}catch(l){return Promise.reject(l)}}break;case 403:if(o?.errors?.error_code==="INVALID_CSRF_TOKEN"&&a&&!a._csrfRetry&&!s){a._csrfRetry=!0;const l=await we(!0);return a.headers["X-XSRF-TOKEN"]=l,H(a)}break}}return Promise.reject(e)});const c={get:(e,a)=>H.get(e,a),post:(e,a,s)=>H.post(e,a,s),put:(e,a,s)=>H.put(e,a,s),patch:(e,a,s)=>H.patch(e,a,s),delete:(e,a)=>H.delete(e,a),upload:(e,a,s)=>H.post(e,a,{...s,headers:{...s?.headers,"Content-Type":null}})},gt={setToken:e=>{J(Y),G=e,H.defaults.headers.common.Authorization=`Bearer ${e}`},getToken:()=>ne()?null:G,removeToken:()=>{Ze(!0);try{localStorage.removeItem("user_data"),localStorage.removeItem("userEmail"),localStorage.removeItem("pendingVerificationEmail")}catch{}},isAuthenticated:()=>!!G&&!ne()},Js=async()=>
2{if(!$)throw new Error("SendBit Client-ID is not configured.");const e=`${de}${i.AUTH.BOOTSTRAP_SIGNING}`,a=await M.post(e,{},{withCredentials:!0,headers:{Accept:"application/json","Content-Type":"application/json","Client-ID":$.clientId,"Device-Name":$.deviceName||be(),"Request-ID":re(),Timezone:Le()},timeout:De}),s=a.data?.data||a.data,r=s?.request_signing?.key_id??s?.key_id,n=s?.request_signing?.secret??s?.secret;if(r&&n)return{keyId:r,secret:n};throw new Error("Signing bootstrap response did not contain key_id and secret.")},me=async()=>{await Zs(),ke=!1,ht(null);const e=Y,{keyId:a,secret:s}=await Js();J(e),Hs(a),Ys(s)},wn=async()=>{try{return ne()?(await Zs(),!1):(await Je({silent:!0}),!0)}catch{return!1}},vn=async e=>{const a=await c.post(i.AUTH.UPDATE_PHONE_NUMBER,e,{headers:{Accept:"application/json","Content-Type":"application/json"}});return{success:a.data.success,message:a.data.message,data:null}},ea=async e=>{const a=await c.post(i.USER.PUSH_TOKEN,e,{headers:{Accept:"application/json","Content-Type":"application/json"}});return{success:a.data.success,message:a.data.message,data:null}},bn=async e=>{const a=await c.put(i.USER.SECURITY_PIN,e,{headers:{Accept:"application/json","Content-Type":"application/json"}});return{success:a.data.success,message:a.data.message,data:null}},Sn=async e=>{const a=await c.post(i.USER.CHANGE_PASSWORD,e,{headers:{Accept:"application/json","Content-Type":"application/json"}});return{success:a.data.success,message:a.data.message,data:null}},Ie={login:async(e,a)=>(await c.post(i.AUTH.LOGIN,{email:e,password:a})).data,register:async e=>(await c.post(i.AUTH.REGISTER,{firstname:e.firstname,lastname:e.lastname,username:e.username,email:e.email,phone_number:e.phone_number,password:e.password,password_confirmation:e.password})).data,verifyAccount:async(e,a)=>(await c.post(i.AUTH.VERIFY_ACCOUNT,{email:e,otp:a})).data,forgotPassword:async e=>(await c.post(i.AUTH.FORGOT_PASSWORD,{email:e})).data,resetPassword:async(e,a,s,r)=>(await c.post(i.AUTH.RESET_PASSWORD,{email:e,token:a,password:s,password_confirmation:r})).data,resendOtp:async(e,a="sms")=>(await c.post(i.AUTH.RESEND_OTP,{email:e,channel:a})).data,sendEmailOtp:async e=>(await c.post(i.AUTH.SEND_EMAIL_OTP,{email:e})).data,verifyEmailOtp:async(e,a)=>(await c.post(i.AUTH.VERIFY_EMAIL_OTP,{email:e,otp_code:a})).data,sendPhoneOtp:async e=>(await c.post(i.AUTH.SEND_PHONE_OTP,{phone_number:e})).data,verifyPhoneOtp:async(e,a)=>(await c.post(i.AUTH.VERIFY_PHONE_OTP,{phone_number:e,otp_code:a})).data,resendPhoneVerificationOtp:async(e,a="sms")=>(await c.post(i.AUTH.RESEND_OTP,{email:e,channel:a})).data,verifyPhoneVerificationOtp:async(e,a)=>(await c.post(i.AUTH.VERIFY_ACCOUNT,{email:e,otp:a})).data,changePassword:async(e,a,s)=>(await c.post(i.AUTH.CHANGE_PASSWORD,{current_password:e,new_password:a,new_password_confirmation:s})).data,refreshToken:async()=>(await c.post(i.AUTH.REFRESH_TOKEN,{})).data,logout:async()=>(await Xs(),{success:!0,message:"Logged out successfully",data:null}),getSocialRedirectUrl:(e,a="login",s)=>{const r="https://api.mysendbit.com/api/v1",n="sendbit_F7Rr6QEZz3OYHrZes2Gx",o=`${window.location.origin}/auth/social/callback`,l=new URLSearchParams({client_id:n,intent:a,redirect_uri:o});return s?.phoneNumber&&l.set("phone_number",s.phoneNumber),s?.referralCode&&l.set("referral_code",s.referralCode),`${r}${i.SOCIAL.REDIRECT(e)}?${l.toString()}`},exchangeSocialCode:async e=>(await c.post(i.SOCIAL.EXCHANGE,{code:e})).data},et={getUserDetails:async()=>(await c.get(i.USER.DETAILS)).data.data,getProfile:async()=>(await c.get(i.USER.DETAILS)).data.data,getDashboardMessages:async()=>{const a=(await c.get(i.USER.DASHBOARD_MESSAGES)).data.data;return a.evidence_action?{...a,evidence_action:{...a.evidence_action,affected_transaction_count:a.evidence_action.affected_transaction_count??0}}:a},getVerificationStatus:async()=>(await c.get(i.USER.VERIFICATION_STATUS)).data.data,getServiceStatus:async()=>(await c.get(i.USER.SERVICE_STATUS)).data.data,updateProfile:async e=>{const a={firstname:e.firstname,lastname:e.lastname};return(await c.put(i.USER.UPDATE_PROFILE,a)).data.data},uploadAvatar:async e=>{const a=new FormData;return a.append("avatar",e),(await c.upload(i.USER.UPLOAD_AVATAR,a)).data.data},removeAvatar:async()=>(await c.delete(i.USER.REMOVE_AVATAR)).data.data,getUserLimits:async()=>(await c.get(i.USER.LIMITS)).data.data,getUserActivities:async e=>(await c.get(i.USER.ACTIVITIES,{params:e})).data.data,exportUserActivities:async e=>(await c.post(i.USER.ACTIVITIES_EXPORT,e)).data.data,checkAccountDeleti
2onEligibility:async()=>(await c.get(i.USER.ACCOUNT_DELETION_ELIGIBILITY)).data.data,getDefaultAvatar:async(e,a)=>{const s=new URLSearchParams;e&&s.append("initials",e),a&&s.append("seed",a);const r=s.toString()?`?${s.toString()}`:"";return(await H.get(`${i.AVATARS.DEFAULT}${r}`,{headers:{Accept:"image/svg+xml; charset=UTF-8, application/json"},responseType:"text"})).data},getUserTiers:async()=>(await c.get(i.USER.TIERS)).data.data},le={getBalance:async()=>{const e=await c.get(i.WALLET.BALANCE);return{...e.data.data,balance:V(e.data.data.balance),lockedBalance:e.data.data.lockedBalance?V(e.data.data.lockedBalance):0}},getUserWallets:async()=>(await c.get(i.USER_WALLETS.LIST)).data.data.map(a=>({...a,balance_integer:V(a.balance_integer),balance_float:V(a.balance_float)})),getUserVirtualAccounts:async()=>(await c.get(i.USER.VIRTUAL_ACCOUNTS)).data.data,createVirtualAccount:async()=>(await c.post(i.USER.CREATE_VIRTUAL_ACCOUNT)).data.data,regenerateVirtualAccount:async()=>(await c.post(i.USER.REGENERATE_VIRTUAL_ACCOUNT)).data.data,simulateDeposit:async e=>{throw new Error("Deposit simulation is disabled in production.")},fundWallet:async(e,a)=>(await c.post(i.WALLET.FUND,{amount:q(e),payment_method:a})).data.data,withdrawFromWallet:async(e,a)=>(await c.post(i.WALLET.WITHDRAW,{amount:q(e),bank_account_id:a})).data.data,withdrawToBank:async e=>{const a=await c.post(i.TRANSFERS.WITHDRAWALS,{...e,amount:q(e.amount)});return{success:a.data.success,message:a.data.message}},getBanks:async()=>(await c.get(i.WALLET.BANKS)).data.data,verifyBankAccount:async e=>(await c.post(i.WALLET.VERIFY_BANK,e)).data.data},Qe={getWalletAddresses:async()=>(await c.get(i.CRYPTO.WALLET_ADDRESSES)).data.data,getCryptoStatus:async()=>(await c.get(i.CRYPTO.STATUS)).data.data,createCryptoAccount:async()=>{const a=(await c.post(i.CRYPTO.CREATE_ACCOUNT)).data;return{success:!!a.success,message:a.message}},simulateCryptoDeposit:async e=>{throw new Error("Deposit simulation is disabled in production.")},getCryptoSwapQuote:async e=>{const a=await c.post(i.CRYPTO.SWAP_QUOTE,e);return{success:a.data.success,message:a.data.message,data:a.data.data}},refreshCryptoSwapQuote:async e=>{const a=await c.post(i.CRYPTO.SWAP_REFRESH,e);return{success:a.data.success,message:a.data.message,data:a.data.data}},confirmCryptoSwap:async e=>{const a=await c.post(i.CRYPTO.SWAP_CONFIRM,e);return{success:a.data.success,message:a.data.message,data:a.data.data}},cancelCryptoSwap:async e=>{const a=await c.post(i.CRYPTO.SWAP_CANCEL,e);return{success:a.data.success,message:a.data.message,data:null}},getCryptoWallets:async()=>{const a=(await c.get(i.CRYPTO.WALLETS)).data.data;return Array.isArray(a)?a:[]},getCryptoHistory:async e=>{const a=new URLSearchParams;e?.page&&a.set("page",String(e.page)),e?.per_page&&a.set("per_page",String(e.per_page)),e?.type&&a.set("type",e.type);const s=a.toString();return(await c.get(`${i.CRYPTO.HISTORY}${s?`?${s}`:""}`)).data.data},getCryptoMarket:async()=>{const s=(await c.get(i.CRYPTO.MARKET)).data.data.items;return Array.isArray(s)?s:[]},getCryptoMarketKline:async(e,a)=>{const s=new URLSearchParams;a?.period&&s.set("period",a.period),a?.limit&&s.set("limit",String(a.limit));const r=s.toString(),o=(await c.get(`${i.CRYPTO.MARKET_KLINE(e)}${r?`?${r}`:""}`)).data.data;return Array.isArray(o)?o:[]},createCryptoWallet:async e=>{const a=await c.post(i.CRYPTO.CREATE_WALLET,{currency:e});return{success:!!a.data.success,message:a.data.message}}},Lt={getTransactions:async e=>{const a=new URLSearchParams;e&&(e.page&&a.append("page",e.page.toString()),e.per_page&&a.append("per_page",e.per_page.toString()),e.status&&a.append("status",e.status),e.from&&a.append("from",e.from),e.to&&a.append("to",e.to),e.category&&(Array.isArray(e.category)?e.category.forEach(l=>a.append("category[]",l)):a.append("category",e.category)));const s=a.toString()?`?${a.toString()}`:"",r=await c.get(`${i.TRANSACTIONS.LIST}${s}`),n=r.data.data,o=l=>({...l,amount:String(pe(l.amount,l.currency)),fees:String(pe(l.fees,l.currency)),settlement_amount:String(pe(l.settlement_amount,l.currency))});return{success:r.data.success,message:r.data.message,data:n.items.map(o),meta:{current_page:n.pagination.current_page,last_page:n.pagination.last_page,per_page:n.pagination.per_page,total:n.pagination.total}}}
2,getTransactionDetails:async e=>{const s=(await c.get(i.TRANSACTIONS.DETAILS(e))).data.data;return{...s,amount:String(pe(s.amount,s.currency)),fees:String(pe(s.fees,s.currency)),settlement_amount:String(pe(s.settlement_amount,s.currency))}},getTransactionCategories:async()=>(await c.get(i.TRANSACTIONS.CATEGORIES)).data.data.items,getTransactionPolicy:async()=>(await c.get(i.SYSTEM.TRANSACTION_POLICY)).data.data,downloadReceipt:async e=>(await c.get(i.TRANSACTIONS.RECEIPT(e),{responseType:"blob",headers:{Accept:"application/pdf, application/json"}})).data,shareReceipt:async e=>(await c.post(i.TRANSACTIONS.RECEIPT_SHARE(e))).data.data,revokeReceiptShare:async e=>{const a=await c.delete(i.TRANSACTIONS.RECEIPT_REVOKE(e));return{success:a.data.success,message:a.data.message}},requestStatement:async e=>(await c.post(i.TRANSACTIONS.STATEMENT,e)).data.message,getStatementSettings:async()=>(await c.get(i.TRANSACTIONS.STATEMENT_SETTINGS)).data.data,updateStatementSettings:async e=>(await c.put(i.TRANSACTIONS.STATEMENT_SETTINGS,e)).data.data,getRecentRecipients:async e=>{const a=new URLSearchParams;e&&(e.group&&a.append("group",e.group),e.limit&&a.append("limit",e.limit.toString()),e.category&&(Array.isArray(e.category)?e.category.forEach(n=>a.append("category[]",n)):a.append("category",e.category)));const s=a.toString()?`?${a.toString()}`:"";return(await c.get(`${i.TRANSACTIONS.RECENT_RECIPIENTS}${s}`)).data.data.items},sendMoney:async e=>(await c.post(i.TRANSACTIONS.SEND,{...e,amount:q(e.amount)})).data.data,cancelTransaction:async e=>(await c.post(i.TRANSACTIONS.CANCEL(e))).data,getExchangeRates:async(e,a)=>(await c.get(`${i.TRANSACTIONS.RATES}?from=${e}&to=${a}`)).data.data},ta={getTerms:async()=>(await c.get(i.SYSTEM.TERMS)).data.data,getPrivacyPolicy:async()=>(await c.get(i.SYSTEM.PRIVACY_POLICY)).data.data,getAbout:async()=>(await c.get(i.SYSTEM.ABOUT)).data.data,getFaq:async()=>(await c.get(i.SYSTEM.FAQ)).data.data,getWhatsNew:async()=>(await c.get(i.SYSTEM.WHATS_NEW)).data.data,getSocialLinks:async()=>(await c.get(i.SOCIAL_LINKS)).data.data,getServiceAvailability:async()=>(await c.get(i.SYSTEM.SERVICE_AVAILABILITY)).data.data.services,getClientSettings:async()=>(await c.get(i.SYSTEM.CLIENT_SETTINGS)).data.data,getExchangeRates:async()=>(await c.get(i.SYSTEM.EXCHANGE_RATES)).data.data,getTransactionPolicy:async()=>(await c.get(i.SYSTEM.TRANSACTION_POLICY)).data.data},sa=[{value:"personal_transfer",label:"Personal Transfer"},{value:"business_payment",label:"Business Payment"},{value:"family_support",label:"Family Support"},{value:"school_fees",label:"School Fees"},{value:"investment",label:"Investment"},{value:"loan_repayment",label:"Loan Repayment"},{value:"gift",label:"Gift"},{value:"services",label:"Services"},{value:"other",label:"Other"}],Dt={getBanks:async()=>(await c.get(i.TRANSFERS.BANKS)).data.data,getBeneficiaries:async()=>{const a=(await c.get(i.TRANSFERS.BENEFICIARIES)).data.data;return Array.isArray(a)?a:Array.isArray(a?.items)?a.items:[]},resolveAccount:async(e,a)=>(await c.post(i.TRANSFERS.RESOLVE_ACCOUNT,{bank_code:e,account_number:a})).data.data,getQuote:async e=>{const s=(await c.post(i.TRANSFERS.QUOTE,{...e,amount:q(e.amount)})).data.data;return{...s,fee:V(s.fee),total_debit:V(s.total_debit)}},sendMoney:async e=>(await c.post(i.TRANSFERS.SEND_MONEY,{...e,amount:q(e.amount)})).data.data,sendTagTransfer:async e=>(await c.post(i.TRANSFERS.SEND_TAGS,{...e,amount:q(e.amount)})).data.data,saveBeneficiary:async e=>(await c.post(i.TRANSFERS.BENEFICIARIES,e)).data.data,updateBeneficiaryLabel:async(e,a)=>(await c.patch(i.TRANSFERS.BENEFICIARIES_UPDATE_LABEL(e),{label:a})).data.data,setDefaultBeneficiary:async e=>(await c.patch(i.TRANSFERS.BENEFICIARIES_SET_DEFAULT(e))).data.data,deleteBeneficiary:async e=>(await c.delete(i.TRANSFERS.BENEFICIARIES_DELETE(e))).data,scheduleTransfer:{create:async e=>(await c.post(i.TRANSFERS.SCHEDULED,{...e,amount:q(e.amount)})).data.data,list:async()=>((await c.get(i.TRANSFERS.SCHEDULED)).data.data.items||[]).map(s=>({...s,amount:V(s.amount),fees:V(s.fees),settlement_amount:V(s.settlement_amount)})),update:async(e,a)=>(await c.patch(`${i.TRANSFERS.SCHEDULED}/${e}`,a)).data.data,cancel:async e=>{await c.delete(`${i.TRANSFERS.SCHEDULED}/${e}`)}}},Nn={list:async e=>{const s=(await c.get(i.REFERRAL.LIST,{params:e})).data.data;return{summary:{...s.summary,pending_earnings:V(s.summary.pending_earnings),total_earnings:V(s.summary.total_earnings)},items:s.items.map(r=>({...r,referrer_reward_amount:V(r.referrer_reward_amount),referred_user_reward_amount:V(r.referred_user_reward_amount)})),pagination:s.pagination}}},aa={getTerms:async()=>(await c.get(i.PAYPAL.TERMS)).data.data,acceptTerms:async e=>(await c.post(i.PAYPAL.ACCEPT_TERMS,{accept_terms:!0,terms_version:e})).data.data,getServiceVerification:async()=>(await c.get(i.PAYPAL.SERVICE_VERIFICATION)).data.data,submitServiceVerification:async(e,a)=>{const s=new FormData;return s.append("service_description",e.service_description),s.append("usage_reason",e.usage_reason),s.append("accept_hold_terms",String(e.accept_hold_terms)),e.portfolio_links&&e.portfolio_links.length>0&&e.portfolio_links.forEach(n=>
2{n.trim()&&s.append("portfolio_links[]",n)}),e.proof_files&&e.proof_files.length>0&&e.proof_files.forEach(n=>{s.append("proof_files[]",n)}),(await c.upload(i.PAYPAL.SERVICE_VERIFICATION,s,{onUploadProgress:a})).data.data},downloadLetterOfAcknowledgement:async()=>(await c.get(i.PAYPAL.LETTER_OF_ACKNOWLEDGEMENT,{responseType:"blob",headers:{Accept:"application/pdf, application/json"}})).data,getLetterOfAcknowledgementTemplate:async()=>(await c.get(i.PAYPAL.LETTER_OF_ACKNOWLEDGEMENT_TEMPLATE)).data.data,submitLetterOfAcknowledgement:async(e,a)=>{const s=new FormData;return s.append("letter_file",e),(await c.upload(i.PAYPAL.LETTER_OF_ACKNOWLEDGEMENT,s,{onUploadProgress:a})).data.data},getPayments:async e=>{const a=e?Ks(e):"",r=(await c.get(`${i.PAYPAL.PAYMENTS}${a}`)).data;return r.data&&(r.data=r.data.map(n=>({...n,amount:n.amount?V(n.amount):n.amount}))),r},getHoldBalance:async()=>(await c.get(i.PAYPAL.HOLD_BALANCE)).data.data,getHeldFunds:async e=>{const a=new URLSearchParams;e?.status&&e.status.forEach(n=>a.append("status[]",n)),e?.from&&a.append("from",e.from),e?.to&&a.append("to",e.to),e?.per_page&&a.append("per_page",String(e.per_page));const s=a.toString();return(await c.get(`${i.PAYPAL.HELD_FUNDS}${s?`?${s}`:""}`)).data}},ra={updateSecuritySettings:async e=>(await c.put(i.SETTINGS.SECURITY,e)).data,updatePin:async(e,a)=>(await c.put(i.SETTINGS.PIN,{current_pin:e,new_pin:a})).data,enable2FA:async()=>(await c.post(i.SETTINGS.TWO_FA)).data.data,verify2FA:async e=>(await c.post(i.SETTINGS.TWO_FA_VERIFY,{code:e})).data},kt={list:async e=>(await c.get(i.NOTIFICATIONS.LIST,{params:e})).data.data,markAsRead:async e=>(await c.patch(i.NOTIFICATIONS.MARK_READ(e))).data.data,markAllAsRead:async()=>(await c.patch(i.NOTIFICATIONS.MARK_ALL_READ)).data.data,getEvents:async()=>(await c.get(i.NOTIFICATIONS.EVENTS)).data.data,updatePushPreference:async e=>{await c.patch(i.NOTIFICATIONS.PUSH_PREFERENCE,{enabled:e})}},Ot={verifyNewDevice:async e=>{const a=await c.post(i.DEVICE.VERIFY_NEW_DEVICE,e);return{success:a.data.success,message:a.data.message,data:{access_token:a.data.data?.access_token||"",expires_in:a.data.data?.expires_in||0,request_signing:a.data.data?.request_signing,user:{firstname:a.data.data?.user?.firstname||"",lastname:a.data.data?.user?.lastname||"",username:a.data.data?.user?.email||"",email:a.data.data?.user?.email||""}}}},listDevices:async()=>(await c.get(i.DEVICE.LIST_DEVICES)).data.data,removeDevice:async e=>(await c.delete(i.DEVICE.REMOVE_DEVICE(e))).data,trustDevice:async e=>(await c.put(i.DEVICE.TRUST_DEVICE(e))).data},na={submitBvn:async e=>{const a=await c.post(i.KYC.SUBMIT_BVN,e);return{success:a.data.success,message:a.data.message,data:a.data.data}},submitNin:async e=>{const a=await c.post(i.KYC.SUBMIT_NIN,e);return{success:a.data.success,message:a.data.message,data:a.data.data}},submitProofOfAddress:async(e,a)=>{const s=new FormData;return s.append("street",e.street),s.append("city",e.city),s.append("state",e.state),s.append("country",e.country),s.append("postal_code",e.postalCode),s.append("document_type",e.documentType),s.append("document",e.documentFile),(await c.upload(i.KYC.PROOF_OF_ADDRESS,s,{onUploadProgress:a?.onUploadProgress})).data},submitGovernmentId:async(e,a)=>{const s=new FormData;return s.append("document_type",e.document_type),s.append("document",e.document),(await c.upload(i.KYC.GOVERNMENT_ID,s,{onUploadProgress:a?.onUploadProgress})).data},submitLiveness:async e=>(await c.post(i.KYC.LIVENESS,{image:e.image})).data,getKycStatus:async()=>(await c.get(i.KYC.STATUS)).data.data,submitKycDocuments:async e=>(await c.upload(i.KYC.SUBMIT,e)).data,verifyKyc:async e=>(await c.post(i.KYC.VERIFY,e)).data},Mt={setupPin:async e=>{const a=await c.post(i.USER.SECURITY_PIN,e);return{success:a.data.success,message:a.data.message,data:a.data.data}},verifyPin:async e=>{const a=await c.post(i.USER.SECURITY_PIN_VERIFY,e);return{success:a.data.success,message:a.data.message,data:a.data.data}}},fe={getNetworks:async()=>(await c.get(i.DATA_BUNDLE.NETWORKS)).data.data,getPlans:async()=>(await c.get(i.DATA_BUNDLE.PLANS)).data.data.map(a=>({...a,amount:V(a.amount)})),purchaseDataBundle:async e=>{const s=(await c.post(i.DATA_BUNDLE.PURCHASE,{...e,amount:q(e.amount)})).data;return s.data.amount=V(s.data.amount),s},purchaseBulkDataBundle:async e=>(await c.post(i.DATA_BUNDLE.BULK_PURCHASE,{...e,items:e.items.map(s=>({...s,amount:q(s.amount)}))}
2)).data.data},ge={getProviders:async()=>(await c.get(i.CABLE_TV.PROVIDERS)).data.data,getPackages:async e=>(await c.get(`${i.CABLE_TV.PACKAGES}?service=${e}`)).data.data.map(s=>({...s,price:V(s.price).toString()})),validateAccount:async e=>(await c.post(i.CABLE_TV.VALIDATE,e)).data.data,purchaseSubscription:async e=>{const a=await c.post(i.CABLE_TV.PURCHASE,e);return{...a.data.data,amount:V(a.data.data.amount)}}},Ce={getProviders:async()=>(await c.get(i.ELECTRICITY.PROVIDERS)).data.data,validateAccount:async e=>(await c.post(i.ELECTRICITY.VALIDATE,e)).data.data,purchaseToken:async e=>{const a=await c.post(i.ELECTRICITY.PURCHASE,{...e,amount:q(e.amount)});return{...a.data.data,amount:V(a.data.data.amount)}}},Vt={getAccountVerificationStatus:async()=>{const e=await c.get(i.USER.VERIFICATION_STATUS);return{success:e.data.success,message:e.data.message,data:e.data.data}}},oa={submitFeedback:async e=>{const a=new FormData;return a.append("type",e.type),a.append("rating",String(e.rating)),a.append("message",e.message),(e.platform==="android"||e.platform==="ios")&&a.append("platform",e.platform),e.app_version&&a.append("app_version",e.app_version),e.build_number&&a.append("build_number",e.build_number),e.device_model&&a.append("device_model",e.device_model),e.os_version&&a.append("os_version",e.os_version),e.screen_name&&a.append("screen_name",e.screen_name),e.screenshot&&a.append("screenshot",e.screenshot),e.metadata&&a.append("metadata",e.metadata),(await c.upload(i.SUPPORT.FEEDBACK,a)).data.data}},as=["payment_stage","deliverables","expected_delivery_at","delivery_method","delivery_method_details","refund_policy"],En=e=>{const a=as.filter(s=>e[s]!==void 0);if(a.length>0&&a.length!==as.length)throw new Error("Payment link agreement updates must include all core agreement fields.");if(e.delivery_method==="other"){const s=e.delivery_method_details?.trim().length||0;if(s<10||s>1e3)throw new Error("Delivery method details must be between 10 and 1,000 characters.")}else if(e.delivery_method&&e.delivery_method_details!==null)throw new Error("Delivery method details must be null for standard delivery methods.")},_n={getTerms:async()=>(await c.get(i.PAYMENT_LINKS.TERMS)).data.data,acceptTerms:async e=>(await c.post(i.PAYMENT_LINKS.ACCEPT_TERMS,{accepted:!0,version:e})).data.data,getQuote:async(e,a)=>(await c.post(i.PAYMENT_LINKS.QUOTE,{amount:e,currency:a})).data.data,listPaymentLinks:async e=>{const a=Ks(e||{});return(await c.get(`${i.PAYMENT_LINKS.LIST}${a}`)).data.data},createPaymentLink:async e=>(await c.post(i.PAYMENT_LINKS.CREATE,e)).data.data,getPaymentLink:async e=>(await c.get(i.PAYMENT_LINKS.DETAILS(e))).data.data,updatePaymentLink:async(e,a)=>(En(a),(await c.patch(i.PAYMENT_LINKS.UPDATE(e),a)).data.data),revokePaymentLink:async(e,a)=>{await c.post(i.PAYMENT_LINKS.REVOKE(e),{security_pin:a})}},ia={getSummary:async()=>(await c.get(i.REWARDS.SUMMARY)).data.data,getActivity:async e=>{const a=new URLSearchParams;e?.page&&a.append("page",String(e.page)),e?.per_page&&a.append("per_page",String(e.per_page)),e?.type&&e.type.length>0&&e.type.forEach(n=>a.append("type[]",n));const s=a.toString()?`?${a.toString()}`:"";return(await c.get(`${i.REWARDS.ACTIVITY}${s}`)).data.data},getMissions:async()=>(await c.get(i.REWARDS.MISSIONS)).data.data.items,getTier:async()=>(await c.get(i.REWARDS.TIER)).data.data,getRedemptions:async()=>(await c.get(i.REWARDS.REDEMPTIONS)).data.data.items,redeemReward:async e=>(await c.post(i.REWARDS.REDEEM(e))).data.data},Bt={getOnboardingStatus:async()=>(await c.get(i.CARDS.ONBOARDING)).data.data,getTerms:async()=>(await c.get(i.CARDS.TERMS)).data.data,acceptTerms:async e=>(await c.post(i.CARDS.ACCEPT_TERMS,{accepted:!0,version:e})).data.data,list:async e=>(await c.get(i.CARDS.LIST,{params:e})).data.data,create:async e=>(await c.post(i.CARDS.CREATE,e)).data.data,getDetails:async e=>(await c.get(i.CARDS.DETAILS(e))).data.data,reveal:async e=>(await c.get(i.CARDS.REVEAL(e))).data.data,terminate:async e=>(await c.delete(i.CARDS.DELETE(e))).data.data,getTransactions:async(e,a)=>(await c.get(i.CARDS.TRANSACTIONS(e),{params:a})).data.data,fund:async(e,a)=>(await c.post(i.CARDS.FUND(e),{amount:a})).data.data,withdraw:async(e,a)=>(await c.post(i.CARDS.WITHDRAW(e),{amount:a})).data.data,freeze:async e=>(await c.patch(i.CARDS.FREEZE(e))).data.data,unfreeze:async e=>(await c.patch(i.CARDS.UNFREEZE(e))).data.data,updateProfile:async e=>(await c.patch(i.CARDS.PROFILE,e)).data.data,payOutstandingFees:async()=>
2(await c.post(i.CARDS.PAY_OUTSTANDING_FEES)).data.data,getTransactionPolicy:async()=>(await c.get(i.SYSTEM.TRANSACTION_POLICY)).data.data},rs=["payment_stage","deliverables","expected_delivery_at","delivery_method","refund_policy"],jn=e=>{const a=rs.filter(r=>e[r]!==void 0);if((a.length>0||e.delivery_method_details!==void 0)&&a.length!==rs.length)throw new Error("Invoice agreement updates must include all five core agreement fields.");if(e.delivery_method==="other"){const r=e.delivery_method_details?.trim().length||0;if(r<10||r>1e3)throw new Error("Delivery method details must be between 10 and 1,000 characters.")}else if(e.delivery_method&&e.delivery_method_details!==null)throw new Error("Delivery method details must be null for standard delivery methods.")},ca={getTerms:async()=>(await c.get(i.INVOICES.TERMS)).data.data,acceptTerms:async e=>(await c.post(i.INVOICES.ACCEPT_TERMS,e)).data.data,getQuote:async e=>(await c.post(i.INVOICES.QUOTE,e)).data.data,uploadLogo:async e=>{const a=new FormData;return a.append("logo",e),(await c.upload(i.INVOICES.UPLOAD_LOGO,a)).data.data},list:async e=>{const a=e?`?${new URLSearchParams(e).toString()}`:"";return(await c.get(`${i.INVOICES.LIST}${a}`)).data.data},create:async e=>(await c.post(i.INVOICES.CREATE,e)).data.data,get:async e=>(await c.get(i.INVOICES.GET(e))).data.data,update:async(e,a)=>(jn(a),(await c.patch(i.INVOICES.UPDATE(e),a)).data.data),send:async(e,a)=>(await c.post(i.INVOICES.SEND(e),a)).data.data,remind:async(e,a)=>(await c.post(i.INVOICES.REMIND(e),a)).data.data,cancel:async(e,a)=>(await c.post(i.INVOICES.CANCEL(e),a)).data.data,getHoldBalance:async()=>(await c.get(i.INVOICES.HOLD_BALANCE)).data.data,getHoldWallet:async()=>(await c.get(i.INVOICES.HOLD_WALLET)).data.data,listHeldFunds:async e=>(await c.get(i.INVOICES.HELD_FUNDS,{params:e})).data.data,getInvoiceHeldFunds:async e=>(await c.get(i.INVOICES.INVOICE_HELD_FUNDS(e))).data.data},la={list:async(e={})=>(await c.get(i.EVIDENCE_REQUESTS.LIST,{params:e})).data.data,get:async e=>(await c.get(i.EVIDENCE_REQUESTS.DETAILS(e))).data.data,submit:async(e,a,s)=>{const r=Zr(a);return(await c.upload(i.EVIDENCE_REQUESTS.SUBMIT(e),r,{onUploadProgress:s})).data.data}},da={simulateVirtualCardTransaction:async e=>{throw new Error("Transaction simulation is disabled in production.")},simulateCryptoDeposit:async e=>{throw new Error("Deposit simulation is disabled in production.")}},Q={auth:Ie,user:et,wallet:le,crypto:Qe,transaction:Lt,system:ta,transfer:Dt,paypal:aa,settings:ra,notification:kt,device:Ot,kyc:na,securityPin:Mt,verification:Vt,dataBundle:fe,cableTv:ge,electricity:Ce,invoice:ca,evidenceRequest:la,supportFeedback:oa,rewards:ia,testing:da},O=Object.freeze(Object.defineProperty({__proto__:null,TRANSFER_REASONS:sa,apiServices:Q,authService:Ie,cableTvService:ge,cardService:Bt,changePassword:Sn,changePin:bn,cryptoService:Qe,dataBundleService:fe,default:Q,deviceService:Ot,electricityService:Ce,evidenceRequestService:la,invoiceService:ca,kycService:na,notificationService:kt,paymentLinksService:_n,paypalService:aa,referralService:Nn,rewardsService:ia,securityPinService:Mt,settingsService:ra,supportFeedbackService:oa,systemService:ta,testingService:da,transactionService:Lt,transferService:Dt,updatePhoneNumber:vn,updatePushToken:ea,userService:et,verificationService:Vt,walletService:le},Symbol.toStringTag,{value:"Module"})),Se={wallets:["user","wallets"],virtualAccounts:["user","virtual-accounts"],tiers:["user","tiers"],banks:["system","banks"],cardOnboarding:["cards","onboarding"],cards:["cards","list"]},Tn=()=>({queryKey:Se.wallets,queryFn:()=>le.getUserWallets(),staleTime:6e4,refetchInterval:6e4,refetchIntervalInBackground:!1}),An=()=>({queryKey:Se.virtualAccounts,queryFn:()=>le.getUserVirtualAccounts(),staleTime:120*1e3}),Cn=()=>({queryKey:Se.banks,queryFn:()=>Dt.getBanks(),staleTime:1440*60*1e3,gcTime:1440*60*1e3}),Rn=()=>({queryKey:Se.tiers,queryFn:()=>et.getUserTiers(),staleTime:300*1e3}),Lo=()=>({queryKey:Se.cardOnboarding,queryFn:()=>Bt.getOnboardingStatus(),staleTime:300*1e3}),In=()=>({queryKey:Se.cards,queryFn:()=>Bt.list(),staleTime:120*1e3}),Do=e=>({queryKey:["transactions",e??{}],queryFn:()=>Lt.getTransactions(e),staleTime:3e4,placeholderData:za}),ua={PHONE:"phone_verification_status",EMAIL:"email_verification_status",BVN:"bvn_verification_status",NIN:"nin_verification_status",PROOF_OF_ADDRESS:"proof_of_address_verification_status",LIVENESS_PHOTO:"liveness_photo_check_verification_status",GOVERNMENT_ID:"government_id_verification_status",SECURITY_PIN:"security_pin_status"},ve=["phone_verification_status","email_verification_status","bvn_verification_status","nin_verification_status"],pa=async()=>{try{const e=await Vt.getAccountVerificationStatus();if(e.success&&e.data){const a=e.data,s=a.verifications||[],r=new Map;
2s.forEach(l=>{const d=l.is_verified||l.status==="verified";r.set(l.indicator,d),Object.values(ua).includes(l.indicator)&&localStorage.setItem(l.indicator,String(d))});const n=ve.filter(l=>!r.get(l));return{isFullyVerified:n.length===0,verificationStatus:a,missingVerifications:n,verificationItems:s}}throw new Error(e.message||"Failed to fetch verification status")}catch{return{isFullyVerified:!1,verificationStatus:null,missingVerifications:ve.slice(),verificationItems:[]}}},ma=()=>{try{const e=new Map,a=[];Object.entries(ua).forEach(([o,l])=>{const d=localStorage.getItem(l)==="true";e.set(l,d),a.push({indicator:l,label:Pn(l),description:Ln(l),status:d?"verified":"missing",is_verified:d})});const s={verifications:a},r=ve.filter(o=>!e.get(o));return{isFullyVerified:r.length===0,verificationStatus:s,missingVerifications:r,verificationItems:a}}catch{return{isFullyVerified:!1,verificationStatus:null,missingVerifications:ve.slice(),verificationItems:[]}}},Pn=e=>({phone_verification_status:"Verify your phone number",email_verification_status:"Verify your email address",bvn_verification_status:"Submit your BVN",nin_verification_status:"Submit your NIN",proof_of_address_verification_status:"Upload proof of address",liveness_photo_check_verification_status:"Complete liveness check",government_id_verification_status:"Upload government ID",security_pin_status:"Set up your Security PIN"})[e]||"Complete verification",Ln=e=>({phone_verification_status:"Confirm your mobile number with the OTP we send to unlock account basics.",email_verification_status:"Confirm your email to receive notifications and secure your SendBit account.",bvn_verification_status:"Provide your Bank Verification Number so we can verify your identity.",nin_verification_status:"Provide your National Identification Number to increase your trust level.",proof_of_address_verification_status:"Upload a recent utility bill or bank statement that confirms your residential address.",liveness_photo_check_verification_status:"Complete a quick selfie and motion check so we know it is really you.",government_id_verification_status:"Upload a recent government ID that confirms your identity.",security_pin_status:"Create a secure 4-digit PIN required for sensitive actions like swaps and withdrawals."})[e]||"Complete this verification step.",ns=e=>{if(!e||!e.verifications)return{canAccess:!1,missingVerifications:ve.slice()};const a=new Map;e.verifications.forEach(r=>{a.set(r.indicator,r.is_verified)});const s=ve.filter(r=>!a.get(r));return{canAccess:s.length===0,missingVerifications:s}},Dn=e=>{const a={phone_verification_status:"Phone number verification",email_verification_status:"Email address verification",bvn_verification_status:"BVN (Bank Verification Number) verification",nin_verification_status:"NIN (National Identification Number) verification"};return e.map(s=>a[s]||s)},oe=ar,kn=rr,On=tr,ha=u.forwardRef(({className:e,...a},s)=>t.jsx(ws,{ref:s,className:T("fixed inset-0 overflow-y-auto z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...a}));ha.displayName=ws.displayName;const ee=u.forwardRef(({className:e,children:a,...s},r)=>t.jsxs(On,{children:[t.jsx(ha,{}),t.jsxs(vs,{ref:r,className:T("fixed left-[50%] top-[50%] bg-white overflow-y-auto z-50 grid w-[calc(100%-2rem)] sm:w-full max-w-lg max-h-[85vh] translate-x-[-50%] translate-y-[-50%] gap-4 p-6 shadow-xl rounded-2xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",e),...s,children:[a,t.jsxs(sr,{className:"absolute right-4 top-4 roun
2ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[t.jsx(X,{className:"h-4 w-4"}),t.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ee.displayName=vs.displayName;const Ne=({className:e,...a})=>t.jsx("div",{className:T("flex flex-col space-y-1.5 text-center sm:text-left",e),...a});Ne.displayName="DialogHeader";const Mn=({className:e,...a})=>t.jsx("div",{className:T("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...a});Mn.displayName="DialogFooter";const ue=u.forwardRef(({className:e,...a},s)=>t.jsx(bs,{ref:s,className:T("text-lg font-semibold leading-none tracking-tight",e),...a}));ue.displayName=bs.displayName;const fa=u.forwardRef(({className:e,...a},s)=>t.jsx(Ss,{ref:s,className:T("text-sm text-muted-foreground",e),...a}));fa.displayName=Ss.displayName;const Vn=({isOpen:e,onClose:a,missingVerifications:s,onVerifyClick:r})=>{const n=Dn(s);return t.jsx(oe,{open:e,onOpenChange:a,children:t.jsxs(ee,{className:"sm:max-w-md",children:[t.jsx(Ne,{children:t.jsxs(ue,{className:"flex items-center gap-2 text-orange-600",children:[t.jsx(ct,{className:"h-5 w-5"}),"Verification Required"]})}),t.jsxs("div",{className:"space-y-4",children:[t.jsx("p",{className:"text-gray-600",children:"To access this feature, you need to complete the following verifications:"}),t.jsx("div",{className:"space-y-2",children:n.map((o,l)=>t.jsxs("div",{className:"flex items-center gap-2 p-2 bg-orange-50 rounded-lg",children:[t.jsx(ct,{className:"h-4 w-4 text-orange-500 flex-shrink-0"}),t.jsx("span",{className:"text-sm text-orange-700",children:o})]},l))}),t.jsxs("div",{className:"flex items-center gap-2 p-2 bg-green-50 rounded-lg",children:[t.jsx(ae,{className:"h-4 w-4 text-green-500 flex-shrink-0"}),t.jsx("span",{className:"text-sm text-green-700",children:"Complete these verifications to unlock all features"})]})]}),t.jsxs("div",{className:"flex gap-2 mt-6",children:[t.jsx(C,{variant:"outline",onClick:a,className:"flex-1",children:"Cancel"}),t.jsx(C,{onClick:()=>{r?.(),a()},className:"flex-1 bg-purple-600 hover:bg-purple-700 text-white",children:"Start Verification"})]})]})})},B=gs((e,a)=>({user:null,dashboardMessages:[],evidenceAction:null,rewardHighlight:null,dashboardServerTime:null,verificationStatusResponse:null,serviceStatus:[],wallet:{balance:0,currency:"NGN",payPoints:0,userWallets:[],isBalanceVisible:!0,isLoading:!1,error:null,slug:"",balance_string:"0.00",balance_integer:0,balance_float:0,lastFetchedAt:null},bankTransfer:{bankName:"",accountNumber:""},notifications:[],transactions:[],isTransactionsLoading:!1,transactionsLastFetchedAt:null,transactionFilters:{status:"",category:"",from:"",to:""},transactionCategories:[],isLoadingCategories:!1,showStatementModal:!1,recentRecipients:[],isLoadingRecentRecipients:!1,transactionPagination:{currentPage:1,itemsPerPage:10,totalItems:0,totalPages:0},modals:{pinModal:!1,successModal:!1,showUpgradeTierModal:!1,showPinSetupModal:!1,showPinConfirmModal:!1,showPinSuccessModal:!1,pinSetupComplete:!1,tempPin:"",showRatesModal:!1,showSendMoneyModal:!1,showAmountModal:!1,showBeneficiaryModal:!1,showSecurityPinModal:!1,showTransactionSuccessModal:!1,showSendBitTagModal:!1,showScheduleTimeModal:!1,showFundWalletModal:!1,showFundWalletPinModal:!1,showFundWalletSuccessModal:!1,showWithdrawWalletModal:!1,showWithdrawWalletPinModal:!1,showWithdrawWalletSuccessModal:!1,showWithdrawAmountModal:!1,showWithdrawBankModal:!1,showEmailVerificationModal:!1,showDeviceVerificationModal:!1,showBvnNinVerificationModal:!1,showCryptoBuyModal:!1,showCryptoSellModal:!1,showCryptoInvoiceModal:!1,showCryptoTransactionSuccessModal:!1,showTransferQuoteModal:!1,showPayPalPaymentsModal:!1,showPayPalVerificationsModal:!1,showPayPalProofOfResidencyModal:!1,showPayPalAddressVerificationModal:!1,showPayPalInvoicePage:!1},isEmailVerified:!1,isDeviceVerified:!1,isBvnVerified:!1,isNinVerified:!1,isPayPalVerified:!1,verificationRefreshKey:0,modalData:{pinModal:{},successModal:{},upgradeTierModal:{}},currentTransaction:null,currentFundTransaction:null,currentWithdrawTransaction:null,transferType:null,setTransferType:s=>e({transferType:s}),cryptoData:[],cryptoInvoices:[],cryptoTransactions:[],selectedCrypto:"BTC",currentCryptoTransaction:null,paypalVerificationStatus:null,setPaypalVerificationStatus:s=>e({paypalVerificationStatus:s}),setUser:s=>e({user:s}),updateWalletBalance:s=>e(r=>({wallet:{...r.wallet,balance:s}})),updatePayPoints:s=>e(r=>({wallet:{...r.wallet,payPoints:s}})),setUserWallets:s=>e(r=>({wallet:{...r.wallet,userWallets:s}})),toggleBalanceVisibility:()=>e(s=>({wallet:{...s.wallet,isBalanceVisible:!s.wallet.isBalanceVisible}})),setWalletLoading:s=>e(r=>({wallet:{...r.wallet,isLoading:s}})),setWalletError:s=>e(r=>({wallet:{...r.wallet,error:s}})),fetchUserWallets:async()=>{const{wallet:r}=a();if(r.lastFetchedAt&&Date.now()-r.lastFetchedAt<6e4)return;const{setWalletLoading:n,setWalletError:o,setUserWallets:l}=a();n(!0),o(null);try{const{walletService:d}=await w(async()=>{const{walletService:p}=await Promise.resolve().then(()=>O);return{walletService:p}},void 0),m=await d.getUserWallets();l(m),e(p=>({wallet:{...p.wallet,lastFetchedAt:Date.now()}}))}catch(d){o(d instanceof Error?d.message:"Failed to fetch wallets")}finally{n(!1)}},forceRefreshWallets:async()=>{const{setWalletLoading:s,setWalletError:r,setUserWallets:n}=a();s(!0),r(null);try{const{walletService:o}=await w(async()=>{const{walletService:d}=await Promise.resolve().then(()=>O);return{walletService:d}},void 0),l=await o.getUserWallets();return n(l),e(d=>({wallet:{...d.wallet,lastFetchedAt:Date.now()}})),l}catch(o){return r(o instanceof Error?o.message:"Failed to fetch wallets"),[]}finally{s(!1)}},fetchUserVirtualAccounts:async()=>{try{const{walletService:s}=await w(async()=>{const{walletService:n}=await Promise.resolve().then(()=>O);return{walletService:n}},void 0),r=await s.getUserVirtualAccounts();r&&r.length>0&&e({bankTransfer:{bankName:r[0].bank_name,accountNumber:r[0].account_number}})}catch{}},fetchUserTier:async()=>{try{const{userService:s}=await w(async()=>{const{userService:o}=await Promise.resolve().then(()=>O);return{userService:o}},void 0),n=(await s.getUserTiers()).find(o=>o.is_current);n&&e(o=>o.user?{user:{...o.user,tier:n}}:o)}catch{}},fetchDashboardMessages:async()=>{try{const{userService:s}=await w(async()=>{const{userService:n}=await Promise.resolve().then(()=>O);return{userService:n}},void 0),r=await s.getDashboardMessages();
2e({dashboardMessages:r.items||[],evidenceAction:r.evidence_action?.required?r.evidence_action:null,rewardHighlight:r.reward_highlight??null,dashboardServerTime:r.server_time??null})}catch{}},fetchVerificationStatus:async()=>{try{const{userService:s}=await w(async()=>{const{userService:n}=await Promise.resolve().then(()=>O);return{userService:n}},void 0),r=await s.getVerificationStatus();e({verificationStatusResponse:r})}catch{}},fetchServiceStatus:async()=>{try{const{userService:s}=await w(async()=>{const{userService:n}=await Promise.resolve().then(()=>O);return{userService:n}},void 0),r=await s.getServiceStatus();e({serviceStatus:r.services||[]})}catch{}},addNotification:s=>e(r=>({notifications:[...r.notifications,{...s,id:Date.now().toString()}]})),dismissNotification:s=>e(r=>({notifications:r.notifications.map(n=>n.id===s?{...n,isVisible:!1}:n)})),setBankTransfer:s=>e({bankTransfer:s}),getActiveNotifications:()=>{const{verificationStatus:s}=ma();if(!s)return[];const r=l=>s.verifications.find(d=>d.indicator===l)?.is_verified??!1;return r("email_verification_status")?["bvn_verification_status","nin_verification_status","proof_of_address_verification_status","liveness_photo_check_verification_status","government_id_verification_status"].some(l=>!r(l))?[{id:"kyc-verification",type:"warning",title:"Complete your KYC to upgrade your account",message:"Complete your KYC verification and unlock all features",isVisible:!0,link:"/dashboard/kyc"}]:r("security_pin_status")?[]:[{id:"security-pin",type:"warning",title:"Setup your Security PIN",message:"Secure every transaction on your account",isVisible:!0}]:[{id:"email-verification",type:"warning",title:"Verify Email",message:"Verify your email address to continue with account setup and security.",isVisible:!0}]},showPinModal:s=>e(r=>({modals:{...r.modals,pinModal:!0},modalData:{...r.modalData,pinModal:{...r.modalData.pinModal,...s}}})),hidePinModal:()=>e(s=>({modals:{...s.modals,pinModal:!1},modalData:{...s.modalData,pinModal:{}}})),showSuccessModal:s=>e(r=>({modals:{...r.modals,successModal:!0},modalData:{...r.modalData,successModal:{...r.modalData.successModal,...s}}})),hideSuccessModal:()=>e(s=>({modals:{...s.modals,successModal:!1},modalData:{...s.modalData,successModal:{}}})),showUpgradeTierModal:s=>e(r=>({modals:{...r.modals,showUpgradeTierModal:!0},modalData:{...r.modalData,upgradeTierModal:{...r.modalData.upgradeTierModal,...s}}})),hideUpgradeTierModal:()=>e(s=>({modals:{...s.modals,showUpgradeTierModal:!1},modalData:{...s.modalData,upgradeTierModal:{}}})),setShowWithdrawAmountModal:s=>e(r=>({modals:{...r.modals,showWithdrawAmountModal:s}})),setShowWithdrawBankModal:s=>e(r=>({modals:{...r.modals,showWithdrawBankModal:s}})),setShowPinSetupModal:s=>e(r=>({modals:{...r.modals,showPinSetupModal:s}})),setShowPinConfirmModal:s=>e(r=>({modals:{...r.modals,showPinConfirmModal:s}})),setShowPinSuccessModal:s=>e(r=>({modals:{...r.modals,showPinSuccessModal:s}})),setPinSetupComplete:s=>e(r=>(s&&localStorage.setItem("security_pin_status","true"),{modals:{...r.modals,pinSetupComplete:s},verificationRefreshKey:s?r.verificationRefreshKey+1:r.verificationRefreshKey,notifications:s?r.notifications.map(n=>n.title==="Setup your Security PIN"?{...n,isVisible:!1}:n):r.notifications})),setTempPin:s=>e(r=>({modals:{...r.modals,tempPin:s}})),setShowRatesModal:s=>e(r=>({modals:{...r.modals,showRatesModal:s}})),setShowSendMoneyModal:s=>e(r=>({modals:{...r.modals,showSendMoneyModal:s}})),setShowSendBitTagModal:s=>e(r=>({modals:{...r.modals,showSendBitTagModal:s}})),setShowAmountModal:s=>e(r=>({modals:{...r.modals,showAmountModal:s}})),setShowBeneficiaryModal:s=>e(r=>({modals:{...r.modals,showBeneficiaryModal:s}})),setShowSecurityPinModal:s=>e(r=>({modals:{...r.modals,showSecurityPinModal:s}})),scheduledTransfers:[],setScheduledTransfers:s=>e({scheduledTransfers:s}),fetchScheduledTransfers:async()=>{try{const{transferService:s}=await w(async()=>{const{transferService:n}=await Promise.resolve().then(()=>O);return{transferService:n}},void 0),r=await s.scheduleTransfer.list();e({scheduledTransfers:r||[]})}catch{}},setShowScheduleTimeModal:s=>e(r=>({modals:{...r.modals,showScheduleTimeModal:s}})),setShowTransferQuoteModal:s=>e(r=>({modals:{...r.modals,showTransferQuoteModal:s}})),setShowTransactionSuccessModal:s=>e(r=>({modals:{...r.modals,showTransactionSuccessModal:s}})),setCurrentTransaction:s=>e({currentTransaction:s}),resetSendMoneyModals:()=>e(s=>({modals:{...s.modals,showSendMoneyModal:!1,showAmountModal:!1,showBeneficiaryModal:!1,showTransferQuoteModal:!1,showSecurityPinModal:!1,showTransactionSuccessModal:!1},currentTransaction:null})),setShowFundWalletModal:s=>e(r=>({modals:{...r.modals,showFundWalletModal:s}})),setShowFundWalletPinModal:s=>e(r=>({modals:{...r.modals,showFundWalletPinModal:s}})),setShowFundWalletSuccessModal:s=>e(r=>({modals:{...r.modals,showFundWalletSuccessModal:s}})),setCurrentFundTransaction:s=>e({currentFundTransaction:s}),resetFundWalletModals:()=>e(s=>({modals:{...s.modals,showFundWalletModal:!1,showFundWalletPinModal:!1,showFundWalletSuccessModal:!1},currentFundTransaction:null})),setShowWithdrawWalletModal:s=>e(r=>({modals:{...r.modals,showWithdrawWalletModal:s}})),setShowWithdrawWalletPinModal:s=>e(r=>({modals:{...r.modals,showWithdrawWalletPinModal:s}})),setShowWithdrawWalletSuccessModal:s=>e(r=>({modals:{...r.modals,showWithdrawWalletSuccessModal:s}})),setCurrentWithdrawTransaction:s=>e({currentWithdrawTransaction:s}),resetWithdrawWalletModals:()=>e(s=>({modals:{...s.modals,showWithdrawWalletModal:!1,showWithdrawWalletPinModal:!1,showWithdrawWalletSuccessModal:!1},currentWithdrawTransaction:null})),fetchTransactions:async(s={})=>{const n=!s.page&&!s.status&&!s.category&&!s.from&&!s.to,{transactionsLastFetchedAt:o,transactions:l}=a();if(!(n&&l.length>0&&o&&Date.now()-o<6e4))try{e({isTransactionsLoading:!0});const{transactionService:d}=await w(async()=>{const{transactionService:h}=await Promise.resolve().then(()=>O);return{transactionService:h}},void 0),{transactionPagination:m}=a(),p=await d.getTransactions({page:s.page,per_page:s.per_page||m.itemsPerPage,status:s.status,category:s.category,from:s.from,to:s.to});p.success&&p.data&&e(h=>({transactions:p.data,transactionsLastFetchedAt:Date.now(),transactionPagination:{...h.transactionPagination,currentPage:p.meta.current_page,itemsPerPage:p.meta.per_page,totalItems:p.meta.total,totalPages:p.meta.last_page}}))}catch{}finally{e({isTransactionsLoading:!1})}},getFilteredTransactions:()=>{const{transactions:s}=a();return s},getPaginatedTransactions:()=>{const{transactions:s}=a();return s},setTransactionFilters:s=>{e(n=>({transactionFilters:{...n.transactionFilters,...s}}));const r=a();a().fetchTransactions({page:1,status:r.transactionFilters.status,category:r.transactionFilters.category,from:r.transactionFilters.from,to:r.transactionFilters.to}
2)},setCurrentPage:s=>{e(n=>({transactionPagination:{...n.transactionPagination,currentPage:s}}));const r=a();a().fetchTransactions({page:s,status:r.transactionFilters.status,category:r.transactionFilters.category,from:r.transactionFilters.from,to:r.transactionFilters.to})},setItemsPerPage:s=>{e(n=>({transactionPagination:{...n.transactionPagination,itemsPerPage:s}}));const r=a();a().fetchTransactions({page:1,per_page:s,status:r.transactionFilters.status})},addTransaction:s=>{a().fetchTransactions()},resetTransactionFilters:()=>{e({transactionFilters:{status:"",category:"",from:"",to:""}}),a().fetchTransactions({page:1})},fetchTransactionCategories:async()=>{e({isLoadingCategories:!0});try{const{transactionService:s}=await w(async()=>{const{transactionService:n}=await Promise.resolve().then(()=>O);return{transactionService:n}},void 0),r=await s.getTransactionCategories();e({transactionCategories:r,isLoadingCategories:!1})}catch{e({isLoadingCategories:!1})}},setShowStatementModal:s=>e({showStatementModal:s}),fetchRecentRecipients:async s=>{e({isLoadingRecentRecipients:!0});try{const{transactionService:r}=await w(async()=>{const{transactionService:o}=await Promise.resolve().then(()=>O);return{transactionService:o}},void 0),n=await r.getRecentRecipients(s);e({recentRecipients:n,isLoadingRecentRecipients:!1})}catch{e({isLoadingRecentRecipients:!1})}},setShowEmailVerificationModal:s=>e(r=>({modals:{...r.modals,showEmailVerificationModal:s}})),setShowDeviceVerificationModal:s=>e(r=>({modals:{...r.modals,showDeviceVerificationModal:s}})),setShowBvnNinVerificationModal:s=>e(r=>({modals:{...r.modals,showBvnNinVerificationModal:s}})),setShowPayPalPaymentsModal:s=>e(r=>({modals:{...r.modals,showPayPalPaymentsModal:s}})),setShowPayPalVerificationsModal:s=>e(r=>({modals:{...r.modals,showPayPalVerificationsModal:s}})),setShowPayPalProofOfResidencyModal:s=>e(r=>({modals:{...r.modals,showPayPalProofOfResidencyModal:s}})),setShowPayPalAddressVerificationModal:s=>e(r=>({modals:{...r.modals,showPayPalAddressVerificationModal:s}})),setShowPayPalInvoicePage:s=>e(r=>({modals:{...r.modals,showPayPalInvoicePage:s}})),resetPayPalModals:()=>e(s=>({modals:{...s.modals,showPayPalPaymentsModal:!1,showPayPalVerificationsModal:!1,showPayPalProofOfResidencyModal:!1,showPayPalAddressVerificationModal:!1,showPayPalInvoicePage:!1}})),setEmailVerified:s=>e(r=>(s&&localStorage.setItem("email_verification_status","true"),{isEmailVerified:s,verificationRefreshKey:r.verificationRefreshKey+1})),setDeviceVerified:s=>e({isDeviceVerified:s}),setBvnVerified:s=>e(r=>(s&&localStorage.setItem("bvn_verification_status","true"),{isBvnVerified:s,verificationRefreshKey:r.verificationRefreshKey+1})),setNinVerified:s=>e(r=>(s&&localStorage.setItem("nin_verification_status","true"),{isNinVerified:s,verificationRefreshKey:r.verificationRefreshKey+1})),setPayPalVerified:s=>e({isPayPalVerified:s}),setCryptoData:s=>e({cryptoData:s}),updateCryptoPrice:(s,r,n)=>e(o=>({cryptoData:o.cryptoData.map(l=>l.symbol===s?{...l,price:r,change24h:n}:l)})),updateCryptoBalance:(s,r)=>e(n=>({cryptoData:n.cryptoData.map(o=>o.symbol===s?{...o,balance:r}:o)})),updateCryptoPriceAndBalance:s=>e(r=>({cryptoData:r.cryptoData.map(n=>{const o=s[n.symbol.toLowerCase()];return o?{...n,...o}:n})})),setSelectedCrypto:s=>e({selectedCrypto:s}),setShowCryptoBuyModal:s=>e(r=>({modals:{...r.modals,showCryptoBuyModal:s}})),setShowCryptoSellModal:s=>e(r=>({modals:{...r.modals,showCryptoSellModal:s}})),setShowCryptoInvoiceModal:s=>e(r=>({modals:{...r.modals,showCryptoInvoiceModal:s}})),setShowCryptoTransactionSuccessModal:s=>e(r=>({modals:{...r.modals,showCryptoTransactionSuccessModal:s}})),setCurrentCryptoTransaction:s=>e({currentCryptoTransaction:s}),resetCryptoModals:()=>e(s=>({modals:{...s.modals,showCryptoBuyModal:!1,showCryptoSellModal:!1,showCryptoInvoiceModal:!1,showCryptoTransactionSuccessModal:!1},currentCryptoTransaction:null})),addCryptoTransaction:s=>e(r=>({cryptoTransactions:[{...s,id:`CRY${Date.now().toString().slice(-6)}`,timestamp:new Date().toISOString()},...r.cryptoTransactions]})),addCryptoInvoice:s=>e(r=>({cryptoInvoices:[{...s,id:`INV${Date.now().toString().slice(-6)}`,createdAt:new Date().toISOString()},...r.cryptoInvoices]})),updateCryptoInvoiceStatus:(s,r)=>e(n=>
2({cryptoInvoices:n.cryptoInvoices.map(o=>o.id===s?{...o,status:r}:o)}))})),$e=Object.freeze(Object.defineProperty({__proto__:null,useDashboardStore:B},Symbol.toStringTag,{value:"Module"})),ko=e=>e?.type==="evidence_requests_list"?"/dashboard/evidence-requests":e?.type==="evidence_request_details"&&e.reference?`/dashboard/evidence-requests/${encodeURIComponent(e.reference)}`:null,Bn=e=>!e?.required||!Number.isInteger(e.open_count)||e.open_count<=0?0:e.open_count,Fn=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,Oo=(e,a)=>{if(!a||!Fn.test(a))return null;const s=encodeURIComponent(a);return e==="payment_link"?`/dashboard/payment-links/${s}`:e==="invoice"?`/dashboard/invoices/${s}`:null},Mo=e=>e==="payment_link"?"View payment link":e==="invoice"?"View invoice":null,Un=[{name:"Home",path:"/dashboard/home",icon:jt,requiresVerification:!1},{name:"Wallet",path:"/dashboard/wallet",icon:nr,requiresVerification:!1},{name:"Products",path:"/dashboard/products",icon:or,requiresVerification:!1},{name:"Virtual Cards",path:"/dashboard/virtual-cards",icon:ir,requiresVerification:!1},{name:"Transactions",path:"/dashboard/transactions",icon:cr,requiresVerification:!1},{name:"Evidence Requests",path:"/dashboard/evidence-requests",icon:lr,requiresVerification:!1},{name:"Crypto",path:"/dashboard/crypto",icon:dr,requiresVerification:!1},{name:"Rewards",path:"/dashboard/rewards",icon:ur,requiresVerification:!1},{name:"Refer & Earn",path:"/dashboard/refer-earn",icon:pr,requiresVerification:!1},{name:"Support",path:"/dashboard/support",icon:mr,requiresVerification:!1}],Wn=()=>{const e=fs(),{addToast:a}=Ws(),s=Ka(),[r,n]=u.useState(!1),[o,l]=u.useState([]),[d,m]=u.useState(null),p=B(y=>Bn(y.evidenceAction));u.useEffect(()=>{const y=ma();m(y)},[]);const h=(y,g)=>{if(g.requiresVerification&&d?.verificationStatus){const f=ns(d.verificationStatus);if(!f.canAccess){y.preventDefault(),l(f.missingVerifications),n(!0);return}}},x=()=>{},v=y=>{y.includes("wallet")?(s.prefetchQuery(Tn()),s.prefetchQuery(An())):y.includes("tiers")?s.prefetchQuery(Rn()):y.includes("virtual-cards")&&s.prefetchQuery(In())};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-64 bg-white shadow-lg h-full",children:[t.jsx("div",{className:"p-6",children:t.jsx(U,{to:"/",children:t.jsx("h2",{className:"text-2xl font-bold text-gray-800",children:"SendBit"})})}),t.jsx("nav",{className:"mt-6",children:t.jsx("ul",{className:"space-y-2 px-4",children:Un.map(y=>{const g=y.icon,f=e.pathname===y.path||e.pathname.startsWith(`${y.path}/`),S=y.requiresVerification?ns(d?.verificationStatus||null):{canAccess:!0},N=y.requiresVerification&&!S.canAccess;return t.jsx("li",{children:t.jsxs(Ma,{to:y.path,onClick:b=>h(b,y),onMouseEnter:()=>v(y.path),className:`flex items-center px-4 py-3 rounded-lg transition-colors duration-200 ${f?"bg-purple-100 text-purple-700 border-r-4 border-purple-700":N?"text-gray-400 cursor-not-allowed":"text-gray-600 hover:bg-gray-100 hover:text-gray-800"}`,children:[t.jsx(g,{className:"w-5 h-5 mr-3"}),t.jsx("span",{className:"font-medium",children:y.name}),y.path==="/dashboard/evidence-requests"&&p>0&&t.jsx("span",{className:"ml-auto min-w-6 rounded-full bg-red-600 px-1.5 py-0.5 text-center text-xs font-semibold text-white","aria-label":`${p} open evidence requests`,children:p>99?"99+":p}),N&&t.jsx(xs,{className:"w-4 h-4 ml-auto text-gray-400"})]})},y.name)})})})]}),t.jsx(Vn,{isOpen:r,onClose:()=>n(!1),missingVerifications:o,onVerifyClick:x})]})},ga=e=>Array.from(e).some(a=>{const s=a.charCodeAt(0);return s<=32||s>=127&&s<=159||a==="\\"}),ya=e=>{if(typeof e!="string"||!e||ga(e)||!/^https:\/\//i.test(e))return null;try{const a=new URL(e);return!a.hostname||a.username||a.password||a.protocol!=="https:"?null:e}catch{return null}},$n=e=>{if(!(typeof e!="string"||ga(e)))return e.startsWith("/")&&!e.startsWith("//")?e:ya(e)??void 0},Vo=e=>{const a=ya(e);return a?(window.open(a,"_blank","noopener,noreferrer"),!0):!1},Bo=e=>{if(!["image/jpeg","image/png","application/pdf"].includes(e.type))return null;const a=URL.createObjectURL(new Blob([e],{type:e.type}));let s=!1;return{url:a,open:()=>s?!1:(window.open(a,"_blank","noopener,noreferrer"),!0),revoke:()=>{s||URL.revokeObjectURL(a),s=!0}}},xa=u.forwardRef(({className:e,...a},s)=>t.jsx(Ns,{ref:s,className:T("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...a}));xa.displayName=Ns.displayName;const wa=u.forwardRef(({className:e,src:a,srcSet:s,referrerPolicy:r,...n},o)=>t.jsx(Es,{ref:o,className:T("aspect-square h-full w-full",e),...n,src:$n(a),referrerPolicy:"no-referrer"}));wa.displayName=Es.displayName;const va=u.forwardRef(({className:e,...a},s)=>t.jsx(_s,{ref:s,className:T("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...a}));va.displayName=_s.displayName;const Hn=["sendbit-user-"],Ft=async()=>
2{if(!(typeof window>"u"||!("caches"in window)))try{const a=(await window.caches.keys()).filter(s=>Hn.some(r=>s.startsWith(r)));await Promise.all(a.map(s=>window.caches.delete(s)))}catch{}},R=e=>{if(e.response){const{status:a,data:s}=e.response;if(a===409)throw e;if(s&&typeof s=="object"){const r=s;if(r.message)return r.message;if(r.errors&&typeof r.errors=="object"){const n=Object.values(r.errors)[0];if(Array.isArray(n)&&n.length>0)return n[0]}if(r.error&&typeof r.error=="string")return r.error}switch(a){case 400:return"Bad request. Please check your input.";case 401:return"Authentication failed. Please check your credentials.";case 403:return"Access denied. You do not have permission to perform this action.";case 404:return"Resource not found.";case 422:return"Validation error. Please check your input.";case 429:return"Too many requests. Please try again later.";case 500:return"Server error. Please try again later.";default:return`HTTP ${a}: ${e.message}`}}else return e.request?"Network error: Please check your internet connection and try again.":"An unexpected error occurred. Please try again."};let He=null;const L=gs((e,a)=>({isLoading:!1,isAuthLoading:!1,isAuthInitialized:!1,isTransactionLoading:!1,isWalletLoading:!1,error:null,authError:null,successMessage:null,user:null,isAuthenticated:gt.isAuthenticated(),cryptoWallets:[],cryptoStatus:null,walletBalance:null,transactions:[],dataBundleNetworks:[],dataBundlePlans:[],isDataBundleLoading:!1,cableTvProviders:[],cableTvPackages:[],isCableTvLoading:!1,electricityProviders:[],isElectricityLoading:!1,serviceAvailability:[],clientSettings:[],isServiceAvailabilityLoaded:!1,exchangeRates:null,transactionPolicy:null,setLoading:s=>e({isLoading:s}),setAuthLoading:s=>e({isAuthLoading:s}),setTransactionLoading:s=>e({isTransactionLoading:s}),setWalletLoading:s=>e({isWalletLoading:s}),setError:s=>e({error:s}),setAuthError:s=>e({authError:s}),setSuccessMessage:s=>e({successMessage:s}),setUser:s=>e({user:s}),setAuthenticated:s=>e({isAuthenticated:s}),clearErrors:()=>e({error:null,authError:null}),initializeSession:async()=>{a().isAuthInitialized||(He||(He=(async()=>{const s=await wn()&>.isAuthenticated();e({isAuthenticated:s,isAuthInitialized:!0}),s&&await a().fetchUserProfile()})().finally(()=>{He=null})),await He)},login:async(s,r)=>{e({isAuthLoading:!0,authError:null});try{se(),await me();const{authService:n}=await w(async()=>{const{authService:l}=await Promise.resolve().then(()=>O);return{authService:l}},void 0),o=await n.login(s,r);if(o.success&&o.data&&o.data.access_token){Ae(o.data),localStorage.setItem("userEmail",o.data.user.email||""),e({user:o.data.user,isAuthenticated:!0,isAuthInitialized:!0,successMessage:o.message||"Login successful!"});const{useDashboardStore:l}=await w(async()=>{const{useDashboardStore:d}=await Promise.resolve().then(()=>$e);return{useDashboardStore:d}},void 0);return l.getState().setUser(o.data.user),{success:!0,message:o.message||"Login successful!",data:o.data}}return e({authError:o.message||"Invalid response from server"}),{success:!1,message:o.message||"Invalid response from server",errors:o.errors,data:o.data}}catch(n){if(n instanceof qa&&n.response){if(n.response.status===409)return{success:!1,message:n.response.data?.message||"Account verification required.",errors:n.response.data?.errors,data:n.response.data,requiresOtpVerification:!0};if(n.response.status===403)return localStorage.setItem("pendingVerificationEmail",s),{success:!1,message:"Device verification required.",errors:n.response.data?.errors,data:n.response.data,requiresVerification:!0}}const o=R(n);e({authError:o});let l=n.response?.data||{};return{success:l.success??!1,message:l.message||o,errors:l.errors,data:l.data}}finally{e({isAuthLoading:!1})}},handleSocialAuthResponse:async s=>{e({isAuthLoading:!0,authError:null});try{if(s.success&&s.data&&s.data.access_token){Ae(s.data),s.data.user?.email&&localStorage.setItem("userEmail",s.data.user.email),e({user:s.data.user,isAuthenticated:!0,isAuthInitialized:!0,successMessage:s.message||"Login successful!"});const{useDashboardStore:n}=await w(async()=>{const{useDashboardStore:o}=await Promise.resolve().then(()=>$e);return{useDashboardStore:o}},void 0);return n.getState().setUser(s.data.user),{success:!0,message:s.message||"Login successful!",data:s.data}}const r=s.message||"Social login failed";return e({authError:r}),{success:!1,message:r,errors:s.errors}}catch(r){const n=R(r);return e({authError:n}),{success:!1,message:n}}finally{e({isAuthLoading:!1})}},register:async s=>{e({isAuthLoading:!0,authError:null});try{se(),await me();const r={firstname:s.firstname,lastname:s.lastname,username:s.username,email:s.email,phone_number:s.phone_number,gender:s.gender,password:s.password,password_confirmation:s.password_confirmation||s.password};s.referral_code&&(r.referral_code=s.referral_code);const n=await c.post("/auth/register",r),{success:o,message:l,errors:d,data:m}=n.data;return e({successMessage:l}),{success:o,message:l,errors:d,data:m}}catch(r){let n=r.response?.data||{};const o={success:n.success??!1,message:n.message||R(r),errors:n.errors,data:n.data};return e({authError:o.message}),o}finally{e({isAuthLoading:!1})}},logout:async()=>{const s=Ie.logout();At.clear(),B.setState(B.getInitialState()),e({user:null,cryptoWallets:[],cryptoStatus:null,walletBalance:null,transactions:[],isAuthenticated:!1,isAuthInitialized:!0,successMessage:null,authError:null}
2),Ft();try{return await s,e({successMessage:"Logged out successfully",authError:null}),!0}catch{return e({successMessage:null,authError:"Signed out locally, but server logout could not be confirmed. Please retry when online."}),!1}},verifyAccount:async(s,r)=>{e({isAuthLoading:!0,authError:null});try{se(),await me();const n=await c.post("/auth/verify-otp",{email:s,otp:r});if(n.data.success){const{user:o}=n.data.data;Ae(n.data.data),e({user:o,isAuthenticated:!0,isAuthInitialized:!0,successMessage:n.data.message||"Your account has been successfully verified."});const{useDashboardStore:l}=await w(async()=>{const{useDashboardStore:d}=await Promise.resolve().then(()=>$e);return{useDashboardStore:d}},void 0);return l.getState().setUser(o),!0}return!1}catch(n){const o=R(n);return e({authError:o}),!1}finally{e({isAuthLoading:!1})}},forgotPassword:async s=>{e({isAuthLoading:!0,authError:null});try{se(),await me();const{authService:r}=await w(async()=>{const{authService:o}=await Promise.resolve().then(()=>O);return{authService:o}},void 0),n=await r.forgotPassword(s);return n.success?(e({successMessage:n.message||"A password reset code has been sent to your email."}),!0):(e({authError:n.message||"Failed to send password reset code"}),!1)}catch(r){const n=R(r);return e({authError:n}),!1}finally{e({isAuthLoading:!1})}},resetPassword:async(s,r,n,o)=>{e({isAuthLoading:!0,authError:null});try{se(),await me();const{authService:l}=await w(async()=>{const{authService:m}=await Promise.resolve().then(()=>O);return{authService:m}},void 0),d=await l.resetPassword(s,r,n,o);return d.success?(e({successMessage:d.message||"Password reset successfully!"}),!0):(e({authError:d.message||"Failed to reset password"}),!1)}catch(l){const d=R(l);return e({authError:d}),!1}finally{e({isAuthLoading:!1})}},resendOtp:async(s,r="sms")=>{e({isAuthLoading:!0,authError:null});try{se(),await me();const{authService:n}=await w(async()=>{const{authService:l}=await Promise.resolve().then(()=>O);return{authService:l}},void 0),o=await n.resendOtp(s,r);if(o.success){const l=r==="whatsapp"?"WhatsApp":"SMS";return e({successMessage:o.message||`OTP sent successfully via ${l}`,isAuthLoading:!1}),!0}else return e({authError:o.message||"Failed to resend OTP",isAuthLoading:!1}),!1}catch(n){const o=R(n);return e({authError:o,isAuthLoading:!1}),!1}},fetchUserProfile:async()=>{e({isLoading:!0,error:null});try{const s=await c.get(i.USER.DETAILS),r=s.data.data?s.data.data:s.data;e({user:r});const{useDashboardStore:n}=await w(async()=>{const{useDashboardStore:o}=await Promise.resolve().then(()=>$e);return{useDashboardStore:o}},void 0);n.getState().setUser(r)}catch(s){const r=R(s);e({error:r})}finally{e({isLoading:!1})}},updateProfile:async s=>{e({isLoading:!0,error:null});try{const r=await c.put(i.USER.UPDATE_PROFILE,s),{data:n}=r.data;return e({user:n,successMessage:"Profile updated successfully!"}),!0}catch(r){const n=R(r);return e({error:n}),!1}finally{e({isLoading:!1})}},fetchWalletBalance:async()=>{e({isWalletLoading:!0,error:null});try{const s=await c.get("/wallet/balance"),{data:r}=s.data;e({walletBalance:r})}catch(s){const r=R(s);e({error:r})}finally{e({isWalletLoading:!1})}},fundWallet:async(s,r)=>{e({isWalletLoading:!0,error:null});try{const n=await c.post("/wallet/fund",{amount:s,payment_method:r});return e({successMessage:"Wallet funded successfully!"}),!0}catch(n){const o=R(n);return e({error:o}),!1}finally{e({isWalletLoading:!1})}},withdrawFromWallet:async(s,r)=>{e({isWalletLoading:!0,error:null});try{const n=await c.post("/wallet/withdraw",{amount:s,bank_details:r});return e({successMessage:"Withdrawal request submitted successfully!"}),!0}catch(n){const o=R(n);return e({error:o}),!1}finally{e({isWalletLoading:!1})}},fetchTransactions:async(s=1,r={})=>{e({isTransactionLoading:!0,error:null});try{const n=await c.get("/transactions",{params:{page:s,...r}}),{data:o}=n.data;e({transactions:o?.items??o??[]})}catch(n){const o=R(n);e({error:o})}finally{e({isTransactionLoading:!1})}},sendMoney:async s=>{e({isTransactionLoading:!0,error:null});try{const r=await c.post("/transactions/send",s);return e({successMessage:"Money sent successfully!"}),!0}catch(r){const n=R(r);return e({error:n}),!1}finally{e({isTransactionLoading:!1})}},verifyPayPal:async s=>{e({isLoading:!0,error:null});try{const r=await c.post("/paypal/verify",s);return e({successMessage:"PayPal verification submitted successfully!"}),!0}catch(r){const n=R(r);return e({error:n}),!1}finally{e({isLoading:!1})}},submitPayPalDocuments:async s=>{e({isLoading:!0,error:null});try{const r=await c.upload("/paypal/documents",s);return e({successMessage:"Documents uploaded successfully!"}),!0}catch(r){const n=R(r);return e({error:n}),!1}finally{e({isLoading:!1})}},getAirtimeCatalog:async()=>{e({isLoading:!0,error:null});try{const s=await c.get("/airtime/catalog"),{data:r}=s.data;return s.data}catch(s){const r=R(s);return e({error:r}),{success:!1,message:r}}finally{e({isLoading:!1})}},purchaseAirtime:async s=>{e({isLoading:!0,error:null});try{const r=await c.post("/airtime/purchase",s),{data:n}=r.data;return r.data}catch(r){const n=R(r);return e({error:n}),{success:!1,message:n}}finally{e({isLoading:!1})}},purchaseBulkAirtime:async s=>{e({isLoading:!0,error:null});try{const r=await c.post("/airtime/bulk-purchase",s),{data:n}=r.data;return r.data}catch(r){const n=R(r);return e({error:n}),{success:!1,message:n}}finally{e({isLoading:!1})}},fetchCryptoWallets:async()=>{e({isLoading:!0,error:null});try{const s=await Qe.getWalletAddresses();e({cryptoWallets:s})}catch(s){R(s)}finally{e({isLoading:!1})}},fetchCryptoStatus:async()=>{try{const s=await Qe.getCryptoStatus();e({cryptoStatus:s}),s.wallets&&Array.isArray(s.wallets)?e({cryptoWallets:s.wallets}):s.has_crypto_account&&a().fetchCryptoWallets()}catch{}},fetchDataBundleNetworks:async()=>{e({isDataBundleLoading:!0,error:null});try{const s=await fe.getNetworks();e({dataBundleNetworks:s})}catch{}finally{e({isDataBundleLoading:!1})}},fetchDataBundlePlans:async()=>
2{if(!(a().dataBundlePlans.length>0)){e({isDataBundleLoading:!0,error:null});try{const r=await fe.getPlans();e({dataBundlePlans:r})}catch{}finally{e({isDataBundleLoading:!1})}}},purchaseDataBundle:async s=>{e({isDataBundleLoading:!0,error:null});try{const r=await fe.purchaseDataBundle(s);return e({successMessage:r.message||"Data bundle purchase successful!"}),r}catch(r){const n=R(r);throw e({error:n}),r}finally{e({isDataBundleLoading:!1})}},purchaseBulkDataBundle:async s=>{e({isDataBundleLoading:!0,error:null});try{const r=await fe.purchaseBulkDataBundle(s);return e({successMessage:r.message||"Bulk data bundle purchase successful!"}),r}catch(r){const n=R(r);throw e({error:n}),r}finally{e({isDataBundleLoading:!1})}},getUserTiers:async()=>{e({isLoading:!0,error:null});try{return{success:!0,data:await et.getUserTiers()}}catch(s){const r=R(s);return e({error:r}),{success:!1,data:[]}}finally{e({isLoading:!1})}},fetchCableTvProviders:async()=>{e({isCableTvLoading:!0,error:null});try{const s=await ge.getProviders();e({cableTvProviders:s})}catch{}finally{e({isCableTvLoading:!1})}},fetchCableTvPackages:async s=>{e({isCableTvLoading:!0,error:null});try{const r=await ge.getPackages(s);e({cableTvPackages:r})}catch{}finally{e({isCableTvLoading:!1})}},validateCableTvAccount:async s=>{e({isCableTvLoading:!0,error:null});try{return await ge.validateAccount(s)}catch(r){const n=R(r);throw e({error:n}),r}finally{e({isCableTvLoading:!1})}},purchaseCableTvSubscription:async s=>{e({isCableTvLoading:!0,error:null});try{const r=await ge.purchaseSubscription(s);return e({successMessage:"Cable TV subscription successful!"}),r}catch(r){const n=R(r);throw e({error:n}),r}finally{e({isCableTvLoading:!1})}},fetchElectricityProviders:async()=>{e({isElectricityLoading:!0,error:null});try{const s=await Ce.getProviders();e({electricityProviders:s})}catch{}finally{e({isElectricityLoading:!1})}},validateElectricityAccount:async s=>{e({isElectricityLoading:!0,error:null});try{return await Ce.validateAccount(s)}catch(r){const n=R(r);throw e({error:n}),r}finally{e({isElectricityLoading:!1})}},purchaseElectricity:async s=>{e({isElectricityLoading:!0,error:null});try{const r=await Ce.purchaseToken(s);return e({successMessage:"Electricity token purchased successfully!"}),r}catch(r){const n=R(r);throw e({error:n}),r}finally{e({isElectricityLoading:!1})}},virtualAccounts:[],isVirtualAccountLoading:!1,virtualAccountsLastFetchedAt:null,fetchVirtualAccounts:async()=>{const{virtualAccountsLastFetchedAt:r,virtualAccounts:n}=a();if(!(n.length>0&&r&&Date.now()-r<12e4)){e({isVirtualAccountLoading:!0,error:null});try{const o=await le.getUserVirtualAccounts();e({virtualAccounts:o,virtualAccountsLastFetchedAt:Date.now()})}catch{}finally{e({isVirtualAccountLoading:!1})}}},createVirtualAccount:async()=>{e({isVirtualAccountLoading:!0,error:null});try{const s=await le.createVirtualAccount(),r=a().virtualAccounts;e({virtualAccounts:[...r,s],successMessage:"Virtual account created successfully!"})}catch(s){const r=R(s);e({error:r})}finally{e({isVirtualAccountLoading:!1})}},regenerateVirtualAccount:async()=>{e({isVirtualAccountLoading:!0,error:null});try{const s=await le.regenerateVirtualAccount(),n=a().virtualAccounts.map(o=>o.wallet_slug===s.wallet_slug?s:o);e({virtualAccounts:n,successMessage:"Virtual account regenerated successfully!"})}catch(s){const r=R(s);e({error:r})}finally{e({isVirtualAccountLoading:!1})}},simulateDeposit:async s=>{throw new Error("Deposit simulation is disabled in production.")},fetchServiceAvailability:async()=>{try{const{systemService:s}=await w(async()=>{const{systemService:n}=await Promise.resolve().then(()=>O);return{systemService:n}},void 0),r=await s.getServiceAvailability();e({serviceAvailability:r,isServiceAvailabilityLoaded:!0})}catch{}},fetchClientSettings:async()=>{try{const{systemService:s}=await w(async()=>{const{systemService:n}=await Promise.resolve().then(()=>O);return{systemService:n}},void 0),r=await s.getClientSettings();e({clientSettings:r})}catch{}},isServiceEnabled:s=>{const{serviceAvailability:r}=a();if(r.length===0)return!0;const n=r.find(o=>o.indicator===s);return n?n.is_enabled:!0},fetchExchangeRates:async()=>{try{const{systemService:s}=await w(async()=>{const{systemService:n}=await Promise.resolve().then(()=>O);return{systemService:n}},void 0),r=await s.getExchangeRates();e({exchangeRates:r})}catch{}},fetchTransactionPolicy:async()=>{try{const{systemService:s}=await w(async()=>{const{systemService:n}=await Promise.resolve().then(()=>O);return{systemService:n}},void 0),r=await s.getTransactionPolicy();e({transactionPolicy:r})}catch{}}})),Yn=()=>t.jsx("div",{children:t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M19 9L6.65856 9
2C5.65277 9 5.14987 9 5.02472 8.69134C4.89957 8.38268 5.25517 8.01942 5.96637 7.29289L8.21091 5",stroke:"#5C2B90","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),t.jsx("path",{d:"M5 15L17.3414 15C18.3472 15 18.8501 15 18.9753 15.3087C19.1004 15.6173 18.7448 15.9806 18.0336 16.7071L15.7891 19",stroke:"#5C2B90","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]})}),zn=({sidebarOpen:e,setSidebarOpen:a})=>{const{user:s,setShowRatesModal:r}=B(),{logout:n}=L(),o=Et(),[l,d]=u.useState(!1),m=u.useRef(null),[p,h]=u.useState(0),x=u.useCallback(async()=>{if(L.getState().isAuthenticated)try{const b=await kt.list({per_page:1});h(b.summary?.unread_notifications_count??0)}catch{}},[]);u.useEffect(()=>{x();const b=setInterval(x,6e4);return()=>clearInterval(b)},[x]);const v=()=>{const b=new Date().getHours();return b<12?"Good Morning":b<18?"Good Afternoon":"Good Evening"};u.useEffect(()=>{const b=D=>{m.current&&!m.current.contains(D.target)&&d(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b)}},[]);const y=()=>{r(!0)},g=()=>{d(!1),o("/dashboard/settings")},f=()=>{d(!1),o("/dashboard/tiers")},S=async()=>{d(!1);try{await n(),o("/")}catch{o("/")}},N=b=>b?b.split(" ").map(D=>D.charAt(0)).join("").toUpperCase().slice(0,2):"";return t.jsx("header",{className:"bg-white border-b border-gray-200 px-4 lg:px-6 py-4",children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(C,{variant:"ghost",size:"icon",className:"lg:hidden",onClick:()=>a(!e),children:e?t.jsx(X,{className:"h-6 w-6"}):t.jsx(ys,{className:"h-6 w-6"})}),t.jsxs("div",{className:"hidden md:flex items-center space-x-2",children:[t.jsx("span",{className:"text-xl lg:text-2xl",children:"ð"}),t.jsxs("h1",{className:"text-lg lg:text-xl font-semibold text-gray-900",children:[t.jsxs("span",{className:"hidden sm:inline",children:[v(),", "]}),t.jsx("span",{className:"sm:hidden",children:"Hi, "}),s?.firstname||""," ",s?.lastname||""]})]})]}),t.jsxs("div",{className:"flex items-center space-x-2 lg:space-x-4",children:[t.jsxs("button",{onClick:()=>o("/dashboard/notifications"),className:"relative p-2 text-gray-500 hover:text-purple-700 hover:bg-purple-50 rounded-full transition-all duration-200 group","aria-label":"Notifications",children:[t.jsx(hr,{className:"h-5 w-5 group-hover:scale-110 transition-transform duration-200"}),p>0&&t.jsx("span",{className:"absolute -top-0.5 -right-0.5 flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full bg-red-500 text-white text-[10px] font-bold leading-none shadow-sm",children:p>99?"99+":p})]}),t.jsxs("button",{onClick:y,className:"flex text-purple-700 items-center space-x-1 lg:space-x-2 text-xs lg:text-sm px-2 lg:px-4 hover:bg-gray-100 rounded-lg transition-colors",children:[t.jsx(Yn,{}),t.jsx("span",{className:"hidden sm:inline",children:"Sendbit Rates"}),t.jsx("span",{className:"sm:hidden",children:"Rates"})]}),t.jsxs("div",{className:"relative",ref:m,children:[t.jsxs("button",{onClick:()=>d(!l),className:"flex items-center space-x-2 lg:space-x-3 hover:bg-gray-100 rounded-lg p-1 transition-colors",children:[t.jsxs(xa,{className:"h-7 w-7 lg:h-8 lg:w-8",children:[t.jsx(wa,{src:s?.profile?.avatar_url,alt:`${s?.firstname||""} ${s?.lastname||""}`}),t.jsx(va,{className:"bg-purple-100 text-purple-700 font-semibold",children:N(`${s?.firstname||""} ${s?.lastname||""}`.trim())})]}),t.jsx(Tt,{className:`h-3 w-3 lg:h-4 lg:w-4 text-gray-400 transition-transform ${l?"rotate-180":""}`})]}),l&&t.jsxs("div",{className:"absolute right-0 mt-2 w-48 bg-white rounded-lg shadow-lg border border-gray-200 py-2 z-50",children:[t.jsxs("button",{onClick:f,className:"flex items-center space-x-3 w-full px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 transition-colors",children:[t.jsx(fr,{className:"h-4 w-4"}),t.jsx("span",{children:"Tiers"})]}),t.jsxs("button",{onClick:g,className:"flex items-center space-x-3 w-full px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 transition-colors",children:[t.jsx(gr,{className:"h-4 w-4"}),t.jsx("span",{children:"Settings"})]}),t.jsxs("button",{onClick:S,className:"flex items-center space-x-3 w-full px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 transition-colors",children:[t.jsx(yr,{className:"h-4 w-4"}),t.jsx("span",{children:"Logout"})]})]})]})]})]})})},os={USD:"ðºð¸",EUR:"ðªðº",GBP:"ð¬ð§",CAD:"ð¨ð¦",NGN:"ð³ð¬"},Kn={USD:"Dollar Rate",EUR:"Euro Rate",GBP:"Pounds Rate",CAD:"Canadian Rate"},qn=()=>{const{modals:e,setShowRatesModal:a}=B(),{exchangeRates:s,transactionPolicy:r,fetchExchangeRates:n,fetchTransactionPolicy:o}=L(),l=()=>{n(),o()},d=()=>a(!1);if(!e.showRatesModal)return null;const m=r,p=s,h=[m?.paypal?.exchange_rate_usd_to_ngn?{name:"PayPal Rate",from:"1 USD",fromFlag:"ðºð¸",to:`NGN ${m.paypal.exchange_rate_usd_to_ngn.value.toLocaleStr
2ing("en-NG",{minimumFractionDigits:2})}`,toFlag:"ð³ð¬"}:null,m?.virtual_cards?.buy_rate_usd_to_ngn?{name:"Card Buy Rate",from:"1 USD",fromFlag:"ðºð¸",to:`NGN ${m.virtual_cards.buy_rate_usd_to_ngn.value.toLocaleString("en-NG",{minimumFractionDigits:2})}`,toFlag:"ð³ð¬"}:null,m?.virtual_cards?.sell_rate_usd_to_ngn?{name:"Card Sell Rate",from:"1 USD",fromFlag:"ðºð¸",to:`NGN ${m.virtual_cards.sell_rate_usd_to_ngn.value.toLocaleString("en-NG",{minimumFractionDigits:2})}`,toFlag:"ð³ð¬"}:null].filter(f=>f!==null),x=p?Object.entries(p.rates).map(([f,S])=>({name:Kn[f]??`${f} Rate`,from:`1 ${f}`,fromFlag:os[f]??"ð",to:`${p.target_currency} ${S.rate.toLocaleString("en-NG",{minimumFractionDigits:2})}`,toFlag:os[p.target_currency]??"ð"})):[],v=!m&&!p,y=p?.meta?.status==="fresh"?"Live":p?.meta?.status??null,g=p?.fetched_at?Ja(new Date(p.fetched_at),"MMM d, h:mm a"):null;return t.jsx("div",{className:"fixed inset-0 bg-black/15 flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:"bg-white rounded-lg p-6 w-full max-w-lg mx-auto max-h-[90vh] overflow-y-auto",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"SendBit Rates"}),g&&t.jsxs("p",{className:"text-xs text-gray-400 mt-0.5",children:["Updated ",g,y&&t.jsx("span",{className:"ml-2 inline-flex items-center px-1.5 py-0.5 rounded-full bg-green-100 text-green-700 text-[10px] font-medium",children:y})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("button",{onClick:l,className:"text-gray-400 hover:text-purple-600 transition-colors p-1",title:"Refresh rates",children:t.jsx(js,{className:"h-4 w-4"})}),t.jsx("button",{onClick:d,className:"text-gray-400 hover:text-gray-600 transition-colors",children:t.jsx(X,{className:"h-5 w-5"})})]})]}),t.jsx("p",{className:"text-gray-500 text-sm mb-6",children:"Real-time exchange rates used by SendBit for settlement previews and transaction quotes."}),v?t.jsx("div",{className:"flex justify-center items-center py-12",children:t.jsx(he,{className:"h-6 w-6 animate-spin text-purple-600"})}):t.jsxs(t.Fragment,{children:[h.length>0&&t.jsx("div",{className:"space-y-3 mb-8",children:h.map((f,S)=>t.jsxs("div",{className:"flex items-center justify-between p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[t.jsx("span",{className:"font-medium text-gray-900",children:f.name}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsxs("div",{className:"flex items-center space-x-1 text-sm text-gray-600",children:[t.jsx("span",{className:"text-xs",children:f.fromFlag}),t.jsx("span",{children:f.from})]}),t.jsx(Ke,{className:"h-4 w-4 text-gray-400"}),t.jsxs("div",{className:"flex items-center space-x-1 text-sm font-medium text-gray-900",children:[t.jsx("span",{className:"text-xs",children:f.toFlag}),t.jsx("span",{children:f.to})]})]})]},S))}),x.length>0&&t.jsxs("div",{children:[t.jsx("h3",{className:"text-base font-semibold text-gray-900 mb-4",children:"Exchange Rates"}),t.jsx("div",{className:"space-y-3",children:x.map((f,S)=>t.jsxs("div",{className:"flex items-center justify-between p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[t.jsx("span",{className:"font-medium text-gray-900",children:f.name}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsxs("div",{className:"flex items-center space-x-1 text-sm text-gray-600",children:[t.jsx("span",{className:"text-xs",children:f.fromFlag}),t.jsx("span",{children:f.from})]}),t.jsx(Ke,{className:"h-4 w-4 text-gray-400"}),t.jsxs("div",{className:"flex items-center space-x-1 text-sm font-medium text-gray-900",children:[t.jsx("span",{className:"text-xs",children:f.toFlag}),t.jsx("span",{children:f.to})]})]})]},S))})]}),h.length===0&&x.length===0&&t.jsx("p",{className:"text-center text-gray-400 py-8 text-sm",children:"No rate data available. Try refreshing."})]})]})})},is={PROPERTY_ID:"6a092f35c744531c43732329",WIDGET_ID:"1jopu0qma"},Gn=(e=is.PROPERTY_ID,a=is.WIDGET_ID)=>!e||!a||!/^[a-f\d]{24}$/i.test(e)||!/^[a-z\d]+$/i.test(a)?null:`https://tawk.to/chat/${e}/${a}`,Qn=({className:e})=>{const a=Gn();return a?t.jsxs(oe,{children:[t.jsx(kn,{asChild:!0,children:t.jsxs("button",{type:"button","aria-label":"Chat with support",className:T("fixed bottom-5 right-5 z-40 inline-flex cursor-pointer items-center gap-2 rounded-full bg-purple-600 px-4 py-3 text-sm font-semibold text-white shadow-lg transition-colors hover:bg-purple-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-600 focus-visible:ring-offset-2",e),children:[t.jsx(xr,{className:"h-5 w-5","aria-hidden":"true"}),t.jsx("span",{children:"Chat with support"})]})}),t.jsxs(ee,{className:"flex h-[min(640px,85dvh)] max-w-md flex-col gap-0 overflow-hidden p-0 sm:bottom-5 sm:left-auto sm:right-5 sm:top-auto sm:translate-x-0 sm:translate-y-0",children:[t.jsxs("div",{className:"border-b px-5 py-4 pr-12",children:[t.jsx(ue,{children:"Chat with support"}),t.jsx(fa,{className:"mt-1 text-xs",children:"Powered by Tawk.to. Never share your password, PIN or OTP."})]}),t.jsx("iframe",{src:a,title:"SendBit support chat",referrerPolicy:"no-referrer",sandbox:"allow-scripts allow-same-origin allow-forms allow-downloads",className:"min-h-0 w-full flex-1 border-0 bg-white"})]})]}):null},Xn=Xe("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>
2svg]:text-destructive",warning:"border-[#E99200] bg-[#E99200]/20 text-orange-800 dark:border-orange-500 dark:bg-[#E99200]/20 dark:text-[#2B2F38] [&>svg]:text-orange-600"}},defaultVariants:{variant:"default"}}),ba=u.forwardRef(({className:e,variant:a,...s},r)=>t.jsx("div",{ref:r,role:"alert",className:T(Xn({variant:a}),e),...s}));ba.displayName="Alert";const Sa=u.forwardRef(({className:e,...a},s)=>t.jsx("h5",{ref:s,className:T("mb-1 font-medium leading-none tracking-tight",e),...a}));Sa.displayName="AlertTitle";const Na=u.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:T("text-sm [&_p]:leading-relaxed",e),...a}));Na.displayName="AlertDescription";const Zn=()=>t.jsx("div",{children:t.jsxs("svg",{width:"67",height:"67",viewBox:"0 0 67 67",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("circle",{cx:"33.5",cy:"33.5",r:"33.5",fill:"#E99200"}),t.jsx("path",{d:"M42 41C42 38.7909 37.9706 37 33 37C28.0294 37 24 38.7909 24 41C24 43.2091 28.0294 45 33 45C37.9706 45 42 43.2091 42 41Z",stroke:"#F0F1F3","stroke-width":"1.5"}),t.jsx("path",{d:"M41.5 39.5L37.1561 30.3941C35.3427 26.798 34.436 25 33 25C31.564 25 30.6573 26.798 28.8439 30.3941L24.5 39.5",stroke:"#F0F1F3","stroke-width":"1.5","stroke-linecap":"round"})]})}),Jn=()=>{const e=Et(),{modals:a,modalData:s,hideUpgradeTierModal:r}=B(),n=s.upgradeTierModal||{},o=n.title||"Upgrade your tier",l=n.actionLabel||"this action",d=n.currentTierName||"current tier",m=n.requiredTierName||"higher tier",p=n.message||`To use ${l}, upgrade from ${d} to ${m}.`;return t.jsx(oe,{open:a.showUpgradeTierModal,onOpenChange:h=>!h&&r(),children:t.jsxs(ee,{className:"sm:max-w-md",children:[t.jsx(Ne,{children:t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(wr,{className:"h-5 w-5 text-purple-600"}),t.jsx(ue,{children:o})]})}),t.jsxs("div",{className:"space-y-3",children:[t.jsx("p",{className:"text-sm text-gray-600",children:p}),t.jsxs("div",{className:"bg-gray-50 p-3 rounded-md text-sm text-gray-700",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"font-medium",children:"Current:"}),t.jsx("span",{children:d})]}),t.jsxs("div",{className:"flex items-center justify-between mt-1",children:[t.jsx("span",{className:"font-medium",children:"Required:"}),t.jsx("span",{children:m})]})]}),t.jsxs("div",{className:"flex gap-3 pt-2",children:[t.jsx(C,{className:"flex-1 bg-purple-600 hover:bg-purple-700 text-white",onClick:()=>{r(),e("/dashboard/kyc")},children:"Go to KYC"}),t.jsx(C,{variant:"ghost",className:"flex-1",onClick:()=>r(),children:"Not now"})]})]})]})})},Me=({length:e=4,value:a,onChange:s,masked:r=!1,hasError:n=!1,onComplete:o,disabled:l=!1,autoFocus:d=!1})=>{const m=u.useRef([]);u.useEffect(()=>{if(d){const v=setTimeout(()=>m.current[0]?.focus(),100);return()=>clearTimeout(v)}},[d]);const p=(v,y)=>{const g=y.replace(/[^0-9]/g,"").slice(-1),f=[...a];f[v]=g,s(f),g&&v<e-1&&m.current[v+1]?.focus(),g&&f.filter(Boolean).length===e&&o?.(f.join(""))},h=(v,y)=>{y.key==="Backspace"&&!a[v]&&v>0&&m.current[v-1]?.focus()},x=["text-center font-semibold rounded-xl border-2 transition-colors outline-none","focus:ring-2 shrink-0 disabled:opacity-50 disabled:cursor-not-allowed",e===6?"w-10 h-12 sm:w-12 sm:h-13 text-base":"w-12 h-12 sm:w-14 sm:h-14 text-lg",n?"border-red-400 bg-red-50 focus:border-red-500 focus:ring-red-100":"border-gray-200 bg-gray-50 focus:border-purple-600 focus:ring-purple-100"].join(" ");return t.jsx("div",{className:"flex justify-center gap-2 sm:gap-3",children:Array.from({length:e}).map((v,y)=>t.jsx("input",{ref:g=>{m.current[y]=g},type:r?"password":"text",inputMode:"numeric",maxLength:1,value:a[y]??"",onChange:g=>p(y,g.target.value),onKeyDown:g=>h(y,g),disabled:l,className:x,autoComplete:"one-time-code"},y))})},eo=({isOpen:e,onClose:a})=>{const[s,r]=u.useState("send"),[n,o]=u.useState(["","","",""]),[l,d]=u.useState(!1),[m,p]=u.useState(""),[h,x]=u.useState(""),[v,y]=u.useState(!1),[g,f]=u.useState(60),{setEmailVerified:S}=B(),{user:N}=L(),b=()=>{y(!1),f(60);const I=setInterval(()=>{f(k=>k<=1?(clearInterval(I),y(!0),0):k-1)},1e3)},D=async()=>
2{if(!N?.email){p("User email not found. Please log in again.");return}d(!0),p(""),x("");try{const I=await Ie.sendEmailOtp(N.email);I.success?(x(I.message||"OTP sent successfully to your email"),r("verify"),b()):p(I.message||"Failed to send OTP")}catch(I){const k=I;p(k.response?.data?.message||k.message||"Failed to send OTP")}finally{d(!1)}},F=async I=>{if(!N?.email){p("User email not found. Please log in again.");return}const k=I??n.join("");if(k.length!==4){p("Please enter a valid 4-digit OTP");return}d(!0),p(""),x("");try{const W=await Ie.verifyEmailOtp(N.email,k);W.success?(x(W.message||"Email verified successfully!"),S(!0),setTimeout(()=>{a(),r("send"),o(["","","",""]),p(""),x("")},2e3)):p(W.message||"Invalid OTP. Please try again.")}catch(W){const te=W;p(te.response?.data?.message||te.message||"Failed to verify OTP")}finally{d(!1)}},P=()=>{r("send"),o(["","","",""]),p(""),x(""),y(!1),f(60),a()};return t.jsx(oe,{open:e,onOpenChange:I=>!I&&P(),children:t.jsxs(ee,{className:"sm:max-w-md",children:[t.jsx(Ne,{children:t.jsxs(ue,{className:"flex items-center gap-3 text-xl font-semibold",children:[t.jsx("div",{className:"w-9 h-9 bg-purple-100 rounded-full flex items-center justify-center shrink-0",children:t.jsx(Zt,{className:"w-5 h-5 text-purple-600"})}),"Email Verification"]})}),t.jsx("div",{className:"space-y-5",children:s==="send"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"text-center space-y-3",children:[t.jsx("div",{className:"w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mx-auto",children:t.jsx(Ts,{className:"w-8 h-8 text-purple-600"})}),t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-medium text-gray-900",children:"Verify Your Email Address"}),t.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:["We'll send a 4-digit code to ",t.jsx("strong",{children:N?.email})]})]})]}),m&&t.jsx("div",{className:"bg-red-50 border border-red-200 rounded-xl p-3",children:t.jsx("p",{className:"text-red-600 text-sm",children:m})}),t.jsx(C,{onClick:D,disabled:l,className:"w-full bg-purple-700 hover:bg-purple-800 text-white rounded-full py-5",children:l?"Sending...":"Send Verification Code"})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"text-center space-y-3",children:[t.jsx("div",{className:"w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mx-auto",children:t.jsx(Zt,{className:"w-8 h-8 text-purple-600"})}),t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-medium text-gray-900",children:"Enter Verification Code"}),t.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:["We've sent a 4-digit code to ",t.jsx("strong",{children:N?.email})]})]})]}),t.jsx(Me,{length:4,value:n,onChange:o,hasError:!!m,onComplete:I=>F(I),autoFocus:s==="verify"}),m&&t.jsx("div",{className:"bg-red-50 border border-red-200 rounded-xl p-3",children:t.jsx("p",{className:"text-red-600 text-sm",children:m})}),h&&t.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-xl p-3 flex items-center gap-2",children:[t.jsx(ae,{className:"w-4 h-4 text-green-600 shrink-0"}),t.jsx("p",{className:"text-green-600 text-sm",children:h})]}),t.jsx(C,{onClick:()=>F(),disabled:l||n.join("").length!==4,className:"w-full bg-purple-700 hover:bg-purple-800 text-white rounded-full py-5",children:l?"Verifying...":"Verify Code"}),t.jsxs("div",{className:"flex items-center justify-between text-sm",children:[t.jsx("button",{onClick:()=>{r("send"),o(["","","",""]),p(""),x("")},className:"text-gray-500 hover:text-gray-700 transition-colors",children:"Change email"}),t.jsx("button",{onClick:D,disabled:!v||l,className:"text-purple-700 hover:text-purple-800 disabled:text-gray-400 disabled:cursor-not-allowed font-medium transition-colors",children:v?"Resend Code":`Resend in ${g}s`})]})]})})]})})},to=({isOpen:e,onClose:a})=>{const[s,r]=u.useState(1),[n,o]=u.useState(!1),[l,d]=u.useState(["","","",""]),{setDeviceVerified:m}=B(),{user:p}=L(),h=async v=>{const y=v??l.join("");if(y.length<4)return;o(!0);const g=p?.email||localStorage.getItem("userEmail")||"";if(!g){o(!1);return}try{(await Ot.verifyNewDevice({email:g,otp:y})).success&&(m(!0),r(3),setTimeout(()=>{a(),r(1)},2e3))}catch{}finally{o(!1)}},x=()=>{n||(a(),r(1),d(["","","",""]))};return e?t.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:"bg-white rounded-2xl p-6 w-full max-w-md
2shadow-xl",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Device Verification"}),t.jsx("button",{onClick:x,disabled:n,className:"text-gray-400 hover:text-gray-600 disabled:opacity-50 transition-colors",children:t.jsx(X,{className:"w-5 h-5"})})]}),s===1&&t.jsxs("div",{className:"text-center",children:[t.jsxs("div",{className:"mb-6",children:[t.jsx(it,{className:"w-16 h-16 text-purple-600 mx-auto mb-4"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"Verify Your Device"}),t.jsx("p",{className:"text-gray-500 text-sm",children:"To ensure the security of your account, we need to verify this device. This is a one-time process."})]}),t.jsx("div",{className:"space-y-3 mb-6 text-left",children:["Enhanced security protection","Prevent unauthorized access","Secure transaction processing"].map(v=>t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(Ts,{className:"w-5 h-5 text-green-500 shrink-0"}),t.jsx("span",{className:"text-sm text-gray-700",children:v})]},v))}),t.jsx("button",{onClick:()=>r(2),className:"w-full bg-purple-700 text-white py-3.5 rounded-full font-semibold hover:bg-purple-800 transition-colors",children:"Continue Verification"})]}),s===2&&t.jsxs("div",{className:"text-center",children:[t.jsxs("div",{className:"mb-6",children:[t.jsx(it,{className:"w-14 h-14 text-purple-600 mx-auto mb-4"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"Enter Verification Code"}),t.jsx("p",{className:"text-gray-500 text-sm",children:"We've sent a 6-digit code to your registered email. Enter it below to verify this device."})]}),t.jsx(Me,{length:4,value:l,onChange:d,onComplete:v=>h(v),disabled:n,autoFocus:s===2}),t.jsxs("div",{className:"space-y-3 mt-6",children:[t.jsxs("button",{onClick:()=>h(),disabled:l.some(v=>!v)||n,className:"w-full bg-purple-700 text-white py-3.5 rounded-full font-semibold hover:bg-purple-800 disabled:opacity-40 disabled:cursor-not-allowed transition-colors flex items-center justify-center gap-2",children:[n&&t.jsx("span",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),n?"Verifying...":"Verify Device"]}),t.jsx("button",{onClick:()=>r(1),disabled:n,className:"w-full text-gray-500 py-2 hover:text-gray-700 disabled:opacity-50 transition-colors text-sm",children:"Back"})]})]}),s===3&&t.jsxs("div",{className:"text-center py-4",children:[t.jsx(ae,{className:"w-16 h-16 text-green-500 mx-auto mb-4"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"Device Verified!"}),t.jsx("p",{className:"text-gray-500 text-sm",children:"Your device has been verified and secured. You can now access all features safely."})]})]})}):null},so=({isOpen:e,onClose:a})=>{const[s,r]=u.useState(1),[n,o]=u.useState(!1),[l,d]=u.useState(""),[m,p]=u.useState({bvn:"",dob:""}),[h,x]=u.useState({nin:"",dob:""}),{setBvnVerified:v,setNinVerified:y}=B(),g=async()=>{if(!m.bvn||!m.dob){d("Please fill in all BVN fields");return}o(!0),d("");try{const b=await Q.kyc.submitBvn({bvn:m.bvn,date_of_birth:m.dob});b.success?(v(!0),r(2)):d(b.message||"BVN verification failed")}catch(b){d(b.response?.data?.message||b.message||"An error occurred during BVN verification")}finally{o(!1)}},f=async()=>{if(!h.nin||!h.dob){d("Please fill in all NIN fields");return}o(!0),d("");try{const b=await Q.kyc.submitNin({nin:h.nin,date_of_birth:h.dob});b.success?(y(!0),r(3),setTimeout(()=>{a(),S()},2e3)):d(b.message||"NIN verification failed")}catch(b){d(b.response?.data?.message||b.message||"An error occurred during NIN verification")}finally{o(!1)}},S=()=>{r(1),p({bvn:"",dob:""}),x({nin:"",dob:""}),d("")},N=()=>{n||(a(),S())};return e?t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white rounded-lg p-6 w-full max-w-md mx-4 max-h-[90vh] overflow-y-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"BVN & NIN Verification"}),t.jsx("button",{onClick:N,disabled:n,className:"text-gray-400 hover:text-gray-600 disabled:opacity-50",children:t.jsx(X,{className:"w-6 h-6"})})]}),l&&t.jsxs("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-lg flex items-center space-x-2",children:[t.jsx(ot,{className:"w-5 h-5 text-red-500"}),t.jsx("span",{className:"text-red-700 text-sm",children:l})]}),s===1&&t.jsxs("div",{children:[t.jsxs("div",{className:"text-center mb-6",children:[t.jsx(Jt,{className:"w-16 h-16 text-blue-500 mx-auto mb-4"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"BVN Verification"}),t.jsx("p",{className:"text-gray-600 text-sm",children:"Please provide your Bank Verification Number (BVN) and date of birth to verify your identity."})]}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"BVN (Bank Verification Number)"}),t.jsx("input",{type:"text",value:m.bvn,onChange:b=>p({...m,bvn:b.target.value}),placeholder:"Enter your 11-digit BVN",className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",maxLength:11,disabled:n})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Date of Birth"}),t.jsx("input",{type:"date",value:m.dob,onChange:b=>p({...m,dob:b.target.value}),className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",disabled:n})]})]}),t.jsx("button",{onClick:g,disabled:!m.bvn||!m.dob||n,className:"w-full mt-6 bg-blue-600 text-white py-3 px-4 roun
2ded-lg hover:bg-blue-700 disabled:bg-gray-300 disabled:cursor-not-allowed transition-colors",children:n?t.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[t.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),t.jsx("span",{children:"Verifying BVN..."})]}):"Verify BVN"})]}),s===2&&t.jsxs("div",{children:[t.jsxs("div",{className:"text-center mb-6",children:[t.jsxs("div",{className:"flex items-center justify-center mb-4",children:[t.jsx(ae,{className:"w-6 h-6 text-green-500 mr-2"}),t.jsx("span",{className:"text-green-600 font-medium",children:"BVN Verified"})]}),t.jsx(Jt,{className:"w-16 h-16 text-blue-500 mx-auto mb-4"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"NIN Verification"}),t.jsx("p",{className:"text-gray-600 text-sm",children:"Now please provide your National Identification Number (NIN) to complete the verification process."})]}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"NIN (National Identification Number)"}),t.jsx("input",{type:"text",value:h.nin,onChange:b=>x({...h,nin:b.target.value}),placeholder:"Enter your 11-digit NIN",className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",maxLength:11,disabled:n})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Date of Birth"}),t.jsx("input",{type:"date",value:h.dob,onChange:b=>x({...h,dob:b.target.value}),className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",disabled:n})]})]}),t.jsxs("div",{className:"space-y-3 mt-6",children:[t.jsx("button",{onClick:f,disabled:!h.nin||!h.dob||n,className:"w-full bg-blue-600 text-white py-3 px-4 rounded-lg hover:bg-blue-700 disabled:bg-gray-300 disabled:cursor-not-allowed transition-colors",children:n?t.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[t.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),t.jsx("span",{children:"Verifying NIN..."})]}):"Verify NIN"}),t.jsx("button",{onClick:()=>r(1),disabled:n,className:"w-full text-gray-600 py-2 hover:text-gray-800 disabled:opacity-50",children:"Back to BVN"})]})]}),s===3&&t.jsxs("div",{className:"text-center",children:[t.jsx(ae,{className:"w-16 h-16 text-green-500 mx-auto mb-4"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"Verification Complete!"}),t.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Both your BVN and NIN have been successfully verified. You can now access additional features."}),t.jsxs("div",{className:"space-y-2 text-sm",children:[t.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[t.jsx(ae,{className:"w-4 h-4 text-green-500"}),t.jsx("span",{className:"text-green-600",children:"BVN Verified"})]}),t.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[t.jsx(ae,{className:"w-4 h-4 text-green-500"}),t.jsx("span",{className:"text-green-600",children:"NIN Verified"})]})]})]})]})}):null},ao=()=>{const{modals:e,setShowPinSetupModal:a,setShowPinConfirmModal:s,setTempPin:r}=B(),{showPinSetupModal:n}=e,[o,l]=u.useState(["","","",""]);u.useEffect(()=>{n&&l(["","","",""])},[n]);const d=()=>{const p=o.join("");p.length===4&&(r(p),a(!1),s(!0))},m=()=>{a(!1),l(["","","",""])};return t.jsx(oe,{open:n,onOpenChange:m,children:t.jsxs(ee,{className:"sm:max-w-sm",children:[t.jsx(Ne,{children:t.jsx(ue,{className:"text-xl font-semibold",children:"Setup Security PIN"})}),t.jsxs("div",{className:"space-y-6",children:[t.jsx("p",{className:"text-gray-500 text-sm text-center",children:"Set a 4-digit PIN to secure your transactions. Keep it safe."}),t.jsx(Me,{value:o,onChange:l,masked:!0,onComplete:d,autoFocus:n}),t.jsx("button",{onClick:d,disabled:o.some(p=>!p),className:"w-full py-3.5 rounded-full bg-purple-700 hover:bg-purple-800 text-white font-semibold text-sm transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:"Continue"})]})]})})},ro=()=>{const{modals:e,setShowPinConfirmModal:a,setShowPinSuccessModal:s,setShowPinSetupModal:r,setPinSetupComplete:n}=B(),{showPinConfirmModal:o,tempPin:l}=e,[d,m]=u.useState(["","","",""]),[p,h]=u.useState(""),[x,v]=u.useState(!1),y=async f=>{const S=f??d.join("");if(S.length===4){if(S!==l){h("PINs do not match. Please try again.");return}v(!0),h("");try{const N=await Q.securityPin.setupPin({pin:l,pin_confirmation:S}
2);if(!N.success){h(N.message||"Failed to setup security PIN");return}const b=await Q.securityPin.verifyPin({pin:S});if(!b.success||!b.data?.verified){h(b.message||"PIN verification failed. Please try again.");return}try{await pa()}catch{}a(!1),s(!0),n(!0)}catch(N){const b=N?.response?.data?.message,D=N?.response?.data?.errors;let F="";if(D&&typeof D=="object"){const P=Object.keys(D)[0];if(P){const I=D[P];F=Array.isArray(I)?I[0]:String(I)}}h(F||b||N.message||"An error occurred while setting up your PIN")}finally{v(!1)}}},g=()=>{x||(a(!1),r(!0),m(["","","",""]),h(""),v(!1))};return u.useEffect(()=>{o&&(m(["","","",""]),h(""))},[o]),t.jsx(oe,{open:o,onOpenChange:f=>!f&&g(),children:t.jsxs(ee,{className:"sm:max-w-md",children:[t.jsx(Ne,{children:t.jsx(ue,{className:"text-xl font-semibold",children:"Confirm Security PIN"})}),t.jsxs("div",{className:"space-y-6",children:[t.jsx("p",{className:"text-gray-500 text-sm text-center",children:"Re-enter your PIN to confirm the setup."}),t.jsx(Me,{value:d,onChange:f=>{m(f),h("")},masked:!0,hasError:!!p,onComplete:f=>y(f),autoFocus:o}),p&&t.jsx("p",{className:"text-red-500 text-sm text-center",children:p}),t.jsxs("button",{onClick:()=>y(),disabled:d.some(f=>!f)||x,className:"w-full py-3.5 rounded-full bg-purple-700 hover:bg-purple-800 text-white font-semibold text-sm transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:[x&&t.jsx("span",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),x?"Setting up PIN...":"Confirm"]})]})]})})},no=()=>{const{modals:e,setShowPinSuccessModal:a,setPinSetupComplete:s}=B(),r=()=>{a(!1),s(!0)};return e.showPinSuccessModal?t.jsx("div",{className:"fixed inset-0 bg-black/15 flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:"bg-white rounded-lg p-6 w-full max-w-md mx-auto text-center",children:[t.jsx("div",{className:"flex justify-end mb-4",children:t.jsx("button",{onClick:r,className:"text-gray-400 hover:text-gray-600 transition-colors",children:t.jsx(X,{className:"h-5 w-5"})})}),t.jsxs("div",{className:"mb-6",children:[t.jsx("div",{className:"w-20 h-20 bg-green-500 rounded-full flex items-center justify-center mx-auto mb-4",children:t.jsx(As,{className:"h-10 w-10 text-white",strokeWidth:3})}),t.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Security PIN Saved"}),t.jsx("p",{className:"text-gray-600 text-sm",children:"Your security PIN has been saved"})]})]})}):null},Ut=u.forwardRef(({className:e,type:a,...s},r)=>t.jsx("input",{type:a,className:T("flex h-10 w-full rounded-md shadow-sm bg-gray-100 px-3 py-2 text-sm file:border-0 file:bg-gray-300 file:text-sm file:font-medium placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...s}));Ut.displayName="Input";const oo=()=>{const{modals:e,setShowWithdrawAmountModal:a,setShowWithdrawBankModal:s,setCurrentWithdrawTransaction:r}=B(),[n,o]=u.useState(""),l=()=>{a(!1)},d=()=>{a(!1)},m=()=>{n&&(r({amount:n}),a(!1),s(!0))},p=h=>{o(Xr(h))};return t.jsx(oe,{open:e.showWithdrawAmountModal,onOpenChange:a,children:t.jsxs(ee,{className:"sm:max-w-[425px] p-0 flex flex-col h-auto min-h-[400px] overflow-hidden gap-0 bg-[#F9FAFB]",children:[t.jsxs("div",{className:"flex items-center justify-between p-4 bg-white border-b sticky top-0 z-10",children:[t.jsx(C,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-gray-100 rounded-full",onClick:l,children:t.jsx(_t,{className:"h-4 w-4"})}),t.jsx("h2",{className:"text-base font-semibold",children:"Withdraw"}),t.jsx(C,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-gray-100 rounded-full",onClick:d,children:t.jsx(X,{className:"h-4 w-4"})})]}),t.jsx("div",{className:"flex-1 p-6 flex flex-col items-center justify-center bg-white m-4 rounded-2xl shadow-sm border border-gray-100",children:t.jsxs("div",{className:"w-full space-y-8",children:[t.jsxs("div",{className:"text-center space-y-2",children:[t.jsx("p",{className:"text-sm text-gray-500 font-medium",children:"Enter Amount"}),t.jsxs("div",{className:"flex items-center justify-center",children:[t.jsx("span",{className:"text-3xl font-bold text-gray-900 mr-1",children:"â¦"}),t.jsx(Ut,{type:"text",className:"border-none text-4xl font-bold text-center w-full p-0 h-auto focus-visible:ring-0 placeholder:text-gray-300 shadow-none",placeholder:"0.00",value:n,onChange:h=>p(h.target.value),autoFocus:!0})]})]}),t.jsx(C,{className:"w-full bg-purple-800 hover:bg-purple-900 text-white font-medium py-6 rounded-xl text-base shadow-lg shadow-purple-900/10 transition-all active:scale-[0.98]",onClick:m,disabled:!n||parseFloat(n.replace(/,/g,""))<=0,children:"Continue"})]})})]})})},io=Xe("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),je=u.forwardRef(({className:e,...a},s)=>t.jsx(Cs,{ref:s,className:T(io(),e),...a}));
2je.displayName=Cs.displayName;const cs=jr,ls=Tr,yt=u.forwardRef(({className:e,children:a,...s},r)=>t.jsxs(Rs,{ref:r,className:T("flex h-10 w-full items-center justify-between rounded-md shadow-sm bg-white px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...s,children:[a,t.jsx(vr,{asChild:!0,children:t.jsx(Tt,{className:"h-4 w-4 opacity-50"})})]}));yt.displayName=Rs.displayName;const Ea=u.forwardRef(({className:e,...a},s)=>t.jsx(Is,{ref:s,className:T("flex cursor-default items-center bg-white justify-center py-1",e),...a,children:t.jsx(br,{className:"h-4 w-4"})}));Ea.displayName=Is.displayName;const _a=u.forwardRef(({className:e,...a},s)=>t.jsx(Ps,{ref:s,className:T("flex cursor-default items-center justify-center py-1",e),...a,children:t.jsx(Tt,{className:"h-4 w-4"})}));_a.displayName=Ps.displayName;const xt=u.forwardRef(({className:e,children:a,position:s="popper",...r},n)=>t.jsx(Sr,{children:t.jsxs(Ls,{ref:n,className:T("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-white text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:s,...r,children:[t.jsx(Ea,{}),t.jsx(Nr,{className:T("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),t.jsx(_a,{})]})}));xt.displayName=Ls.displayName;const co=u.forwardRef(({className:e,...a},s)=>t.jsx(Ds,{ref:s,className:T("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...a}));co.displayName=Ds.displayName;const wt=u.forwardRef(({className:e,children:a,...s},r)=>t.jsxs(ks,{ref:r,className:T("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[t.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:t.jsx(Er,{children:t.jsx(As,{className:"h-4 w-4"})})}),t.jsx(_r,{children:a})]}));wt.displayName=ks.displayName;const lo=u.forwardRef(({className:e,...a},s)=>t.jsx(Os,{ref:s,className:T("-mx-1 my-1 h-px bg-muted",e),...a}));lo.displayName=Os.displayName;const ja=u.forwardRef(({className:e,...a},s)=>t.jsx("textarea",{className:T("flex min-h-[80px] w-full rounded-md shadow-sm bg-background px-3 py-2 text-sm r
2ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:s,...a}));ja.displayName="Textarea";const uo=()=>{const{modals:e,setShowWithdrawBankModal:a,setShowWithdrawAmountModal:s,currentWithdrawTransaction:r,fetchUserWallets:n,showPinModal:o,hidePinModal:l,showSuccessModal:d}=B(),{addToast:m}=Ws(),[p,h]=u.useState("list"),[x,v]=u.useState([]),{data:y=[]}=Ga({...Cn(),enabled:e.showWithdrawBankModal}),[g,f]=u.useState(!1),[S,N]=u.useState(""),[b,D]=u.useState(""),[F,P]=u.useState(""),[I,k]=u.useState(!1),[W,te]=u.useState(!1),[z,Yt]=u.useState(null),[Ve,zt]=u.useState(""),[Be,Kt]=u.useState(""),[st,at]=u.useState(!1);u.useEffect(()=>{e.showWithdrawBankModal?qt():(h("list"),Yt(null),zt(""),Kt(""))},[e.showWithdrawBankModal]);const qt=async()=>{f(!0);try{const A=await Q.transfer.getBeneficiaries();v(A.filter(K=>K.type==="bank"))}catch{}finally{f(!1)}},Ra=()=>{p==="add"?h("list"):(a(!1),s(!0))},Ia=()=>{a(!1)};u.useEffect(()=>{b.length===10&&S?Pa():P("")},[b,S]);const Pa=async()=>{k(!0);try{const A=await Q.transfer.resolveAccount(S,b);P(A.account_name)}catch{P(""),m({title:"Error",description:"Could not resolve account details",variant:"destructive"})}finally{k(!1)}},La=async()=>{if(!F||!S||b.length!==10)return;const A=y.find(K=>K.code===S);te(!0);try{await Q.transfer.saveBeneficiary({type:"bank",label:F,bank_code:S,bank_name:A?.name??"",bank_account_number:b,bank_account_name:F}),await qt(),h("list"),N(""),D(""),P("")}catch{m({title:"Error",description:"Failed to save bank. Please try again.",variant:"destructive"})}finally{te(!1)}},Da=async()=>{if(!z||!r||!Ve||!Be.trim())return;const A=ss(r.amount);at(!0);try{const{transferService:K}=await w(async()=>{const{transferService:rt}=await Promise.resolve().then(()=>O);return{transferService:rt}},void 0),Fe=await K.getQuote({category:"send_money",amount:A,currency:"NGN",fee_mode:"inclusive",quote_expires_at:0,bank_code:z.bank_code,bank_name:z.bank_name,account_number:z.bank_account_number,account_name:z.bank_account_name});at(!1),a(!1),o({title:"Enter Security PIN",description:`Confirm withdrawal of â¦${A.toLocaleString()} to ${z.bank_account_name} · ${z.bank_name}`,buttonText:"Confirm Withdrawal",onConfirm:async rt=>{l();try{const Ue=await Q.wallet.withdrawToBank({amount:A,narration:Be.trim(),reason:Ve,security_pin:rt,fee_mode:"inclusive",quote_hash:Fe.quote_hash,quote_expires_at:Fe.quote_expires_at});n(),d({title:"Withdrawal Submitted",message:Ue.message||"Your withdrawal has been submitted. Funds will arrive in your bank account shortly.",amount:`â¦${A.toLocaleString()}`,buttonText:"Done"})}catch(Ue){const Oa=Ue?.response?.data?.message??Ue?.message??"Withdrawal failed. Please try again.";m({title:"Withdrawal Failed",description:Oa,variant:"destructive"})}}})}catch(K){at(!1);const Fe=K?.response?.data?.message??K?.message??"Failed to get a quote. Please try again.";m({title:"Error",description:Fe,variant:"destructive"})}},ka=!!z&&!!Ve&&!!Be.trim()&&!st;return t.jsx(oe,{open:e.showWithdrawBankModal,onOpenChange:a,children:t.jsxs(ee,{className:"sm:max-w-[425px] p-0 flex flex-col h-auto max-h-[85vh] overflow-hidden gap-0 bg-[#F9FAFB]",children:[t.jsxs("div",{className:"flex items-center justify-between p-4 bg-white border-b sticky top-0 z-10",children:[t.jsx(C,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-gray-100 rounded-full",onClick:Ra,children:t.jsx(_t,{className:"h-4 w-4"})}),t.jsx("h2",{className:"text-base font-semibold",children:p==="list"?"Withdraw":"Add Bank"}),t.jsx(C,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-gray-100 rounded-full",onClick:Ia,children:t.jsx(X,{className:"h-4 w-4"})})]}),t.jsx("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:p==="list"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx("p",{className:"text-sm font-medium text-gray-700",children:"Select Bank Account"}),g?t.jsx("div",{className:"flex items-center justify-center py-6",children:t.jsx(he,{className:"w-5 h-5 animate-spin text-gray-400"})}):t.jsx("div",{className:"space-y-2",children:x.map(A=>t.jsx("div",{className:`p-4 bg-white rounded-xl border cursor-pointer transition-all ${z?.id===A.id?"border-purple-700 ring-1 ring-purple-700 bg-purple-50":"border-gray-100 hover:border-gray-200"}`,onClick:()=>Yt(A),children:t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("div",{className:"w-10 h-10 rounded-full bg-purple-100 flex items-center justify-center shrink-0",children:t.jsx(Ar,{className:"w-5 h-5 text-purple-700"})}),t.jsxs("div",{children:[t.jsx("h3",{className:"font-semibold text-gray-900 text-sm",children:A.bank_account_name}),t.jsxs("p",{className:"text-xs text-gray-500",children:[A.bank_name," ⢠",A.bank_account_number]})]})]})},A.id))}),t.jsxs(C,{variant:"outline",className:"w-full py-5 border-dashed border-gray-300 text-gray-500 hover:text-purple-700 hover:border-purple-700 hover:bg-purple-50 gap-2",onClick:()=>h("add"),children:[t.jsx(Cr,{className:"w-4 h-4"}),"Add New Bank"]})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(je,{children:"Reason"}),t.jsxs(cs,{value:Ve,onValueChange:zt,children:[t.jsx(yt,{children:t.jsx(ls,{placeholder:"Select a reason"})}),t.jsx(xt,{children:sa.map(A=>t.jsx(wt,{value:A.value,children:A.label},A.value))})]})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(je,{children:"Narration"}),t.jsx(ja,{placeholder:"e.g. Rent for December",value:Be,onChange:A=>Kt(A.target.value),maxLength:100,className:"resize-none",rows:2})]})]}):t.jsxs("div",{className:"space-y-4 bg-white p-4 rounded-xl border border-gray-100",children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx(je,{children:"Select Bank"}),t.jsxs(cs,{value:S,onValueChange:N,children:[t.jsx(yt,{children:t.jsx(ls,{placeholder:"Choose bank"})}),t.jsx(xt,{children:y.map(A=>t.jsx(wt,{value:A.code,children:A.name},A.code))})]})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(je,{children:"Account Number"}),t.jsx(Ut,{value:b,onChange:A=>{const K=A.target.value.replace(/\D/g,"");K.length<=10&&D(K)},placeholder:"0123456789",type:"tel"})]}),t.jsx("div",{className:"min-h-[20px]",children:I?t.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[t.jsx(he,{className:"w-3 h-3 animate-spin"})," Resolving account..."]}):F?t.jsx("div",{className:"text-sm text-green-600 font-medium bg-green-50 p-2 rounded",children:F}):null}),t.jsxs(C,{className:"w-full bg-purple-700 hover:bg-purple-800 text-white",disabled:!F||!S||b.length!==10||W,onClick:La,children:[W&&t.jsx(he,{className:"w-4 h-4 mr-2 animate-spin"}),"Save Bank"]})]})}),p==="list"&&t.jsxs("div",{className:"p-4 bg-white border-t",children:[t.jsxs("div",{className:"flex justify-between items-center mb-3 text-sm",children:[t.jsx("span",{className:"text-gray-500",children:"Withdrawal Amount"}),t.jsxs("span",{className:"font-semibold text-purple-700",children:["â¦",Number(ss(r?.amount??"0")).toLocaleStr
2ing()]})]}),t.jsxs(C,{className:"w-full bg-purple-700 hover:bg-purple-800 py-6 text-base text-white",disabled:!ka,onClick:Da,children:[st&&t.jsx(he,{className:"w-4 h-4 mr-2 animate-spin"}),st?"Getting quoteâ¦":"Withdraw"]})]})]})})},po=()=>{const[e,a]=u.useState(!1),[s,r]=u.useState(!1),[n,o]=u.useState(!1),l=Et(),{getActiveNotifications:d,setShowEmailVerificationModal:m,setShowBvnNinVerificationModal:p,setShowPinSetupModal:h,fetchUserWallets:x,modals:v,verificationRefreshKey:y}=B(),{fetchVirtualAccounts:g}=L(),f=n&&y>=0?d():[];u.useEffect(()=>{Promise.all([L.getState().fetchUserProfile(),x(),g(),pa().finally(()=>{o(!0)})]),L.getState().fetchExchangeRates(),L.getState().fetchClientSettings(),L.getState().fetchTransactionPolicy();const N=async()=>{try{const P="sendbit_web_push_token",I="sendbit_push_token_registered";let k=localStorage.getItem(P);if(!k){const W=`${navigator.userAgent}-${Date.now()}-${Math.random()}`;k=`web_${btoa(W).replace(/[^a-zA-Z0-9]/g,"").slice(0,64)}`,localStorage.setItem(P,k)}localStorage.getItem(I)||(await ea({push_notification_token:k}),localStorage.setItem(I,"1"))}catch{}},b=window.requestIdleCallback??(P=>setTimeout(P,1)),D=window.cancelIdleCallback??clearTimeout,F=b(()=>{L.getState().fetchServiceAvailability(),N()});return()=>D(F)},[]);const S=N=>{if(N.link){l(N.link);return}N.title==="Verify Email"?m(!0):N.title==="Verify Device"?r(!0):N.title==="Verify BVN and NIN"?p(!0):N.title==="Setup your Security PIN"&&h(!0)};return t.jsxs("div",{className:"flex h-screen bg-gray-50",children:[e&&t.jsx("div",{className:"fixed inset-0 z-40 bg-black/30 lg:hidden",onClick:()=>a(!1)}),t.jsx("div",{className:` 3 fixed inset-y-0 left-0 z-50 transform transition-transform duration-300 ease-in-out lg:translate-x-0 lg:static lg:inset-0 4 ${e?"translate-x-0":"-translate-x-full"} 5 lg:block 6 `,children:t.jsx(Wn,{})}),t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden lg:ml-0",children:[t.jsx(zn,{sidebarOpen:e,setSidebarOpen:a}),t.jsxs("main",{className:"flex-1 overflow-y-auto p-4 lg:p-6",children:[f.map(N=>t.jsx(ba,{variant:"warning",className:"relative cursor-pointer my-2 hover:bg-orange-50 transition-colors",onClick:()=>S(N),children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center justify-center gap-3",children:[t.jsx(Zn,{}),t.jsxs("div",{className:"flex-1",children:[t.jsx(Sa,{children:N.title}),t.jsx(Na,{children:N.message})]})]}),t.jsx(Ke,{className:"h-4 w-4 text-orange-600"})]})},N.id)),t.jsx("div",{className:"mt-4",children:t.jsx(Nt,{})})]})]}),t.jsx(qn,{}),t.jsx(Jn,{}),t.jsx(eo,{isOpen:v.showEmailVerificationModal,onClose:()=>m(!1)}),t.jsx(to,{isOpen:s,onClose:()=>r(!1)}),t.jsx(so,{isOpen:v.showBvnNinVerificationModal,onClose:()=>p(!1)}),t.jsx(ao,{}),t.jsx(ro,{}),t.jsx(no,{}),t.jsx(oo,{}),t.jsx(uo,{}),t.jsx(Qn,{})]})},Ta=300*1e3,Wt=new Map,tt=e=>`sendbit-privacy-lock:${e}`,ds=(e,a)=>e.locked||a<e.lastActivity||a-e.lastActivity>=Ta;function us(e,a=Date.now()){try{const s=localStorage.getItem(tt(e));if(s){const r=JSON.parse(s);return Number.isFinite(r.lastActivity)&&typeof r.locked=="boolean"?r:{lastActivity:a,locked:!0}}}catch{}return Wt.get(e)??{lastActivity:a,locked:!1}}function ps(e,a){Wt.set(e,a);try{localStorage.setItem(tt(e),JSON.stringify(a))}catch{}}function mo(e){if(e!=null){Wt.delete(e);try{localStorage.removeItem(tt(e))}catch{}}}function ho({children:e}){const a=L(r=>r.user),s=L(r=>r.fetchUserProfile);return u.useEffect(()=>{a?.id==null&&s()},[a?.id,s]),a?.id==null?t.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center gap-4",children:[t.jsx("p",{children:"Loading your sessionâ¦"}),t.jsx(C,{onClick:()=>{s()},children:"Retry"}),t.jsx(C,{variant:"ghost",onClick:()=>{L.getState().logout()},children:"Log out"})]}):t.jsx(fo,{userId:a.id,hasPin:a.has_security_pin,children:e},a.id)}function fo({userId:e,hasPin:a,children:s}){const[r,n]=u.useState(()=>ds(us(e),Date.now())),[o,l]=u.useState(["","","",""]),[d,m]=u.useState(""),[p,h]=u.useState(!1),x=u.useRef(!1),v=u.useRef(!0);u.useEffect(()=>{v.current=!0;let g,f=!1;const S=(P=!1)=>{const I=Date.now(),k=us(e,I),W=ds(k,I),te=!W&&P&&I-k.lastActivity>=1e3,z={lastActivity:te?I:k.lastActivity,locked:W};(!f||W!==k.locked||te)&&ps(e,z),f=!0,n(W),clearTimeout(g),W||(g=setTimeout(()=>S(),Math.max(1,Ta-(I-z.lastActivity))))},N=P=>{P.isTrusted&&document.visibilityState==="visible"&&S(!0)},b=()=>S(),D=P=>{P.key===tt(e)&&S()},F=["pointerdown","pointermove","keydown","wheel","touchstart"];return F.forEach(P=>window.addEventListener(P,N,{passive:!0})),window.addEventListener("focus",b),window.addEventListener("pageshow",b),document.addEventListener("visibilitychange",b),window.addEventListener("storage",D),S(),()=>{v.current=!1,clearTimeout(g),F.forEach(P=>window.removeEventListener(P,N)),window.removeEventListener("focus",b),window.removeEventListener("pageshow",b),document.removeEventListener("visibilitychange",b),window.removeEventListener("storage",D)}},[e,r]);const y=async g=>{if(g.preventDefault(),!(x.current||!/^\d{4}$/.test(o.join("")))){x.current=!0,h(!0),m("");try{const f=await Mt.verifyPin({pin:o.join("")});if(!v.current)return;if(!f.success||f.data?.verified!==!0){m(f.message||"Unable to verify your PIN.");return}ps(e,{lastActivity:Date.now(),locked:!1}),n(!1)}catch(f){v.current&&m(M.isAxiosError(f)?f.response?.status===429?"Too many attempts. Please wait before trying again.":f.response?.data?.message||"Unable to verify your PIN. Check your connection and retry.":"Unable to unlock. Please try again.")}finally{x.current=!1,v.current&&(l(["","","",""]),h(!1))}}};return r?t.jsx("main",{className:"min-h-dvh bg-white flex items-center justify-center px-6 py-10",children:t.jsxs("section",{className:"w-full max-w-sm space-y-6 text-center","aria-labelledby":"privacy-lock-title",children:[t.jsx("img",{src:$s,alt:"SendBit",className:"mx-auto h-10"}),t.jsx(Rr,{className:"mx-auto h-12 w-12 text-primary","aria-hidden":"true"}),t.jsxs("div",{children:[t.jsx("h1",{id:"privacy-lock-title",className:"text-2xl font-bold",children:"Your dashboard is locked"}),t.jsx("p",{className:"mt-2 text-sm text-gray-600",children:a?"Enter your security PIN to continue where you left off.":"Sign in again to continue. You can set up a security PIN in Settings afterwards."})]}),a&&t.jsxs("form",{onSubmit:y,className:"space-y-5",children:[t.jsx(Me,{value:o,onChange:l,masked:!0,disabled:p,autoFocus:!0,hasError:!!d}),d&&t.jsx("p",{role:"alert",className:"text-sm text-red-700",children:d}),t.jsx(C,{type:"submit",className:"w-full",disabled:p||o.join("").length!==4,children:p?"Verifyingâ¦":"Unlock"})]}),t.jsx("p",{className:"text-sm text-gray-600",children:"Forgot your PIN? Log out and sign in again to recover it in Settings."}),t.jsx(C,{variant:"outline",className:"w-full",onClick:()=>{L.getState().logout()},children:"Log out"})]})}):t.jsx(t.Fragment,{children:s})}const go=({children:e})=>{const{isAuthenticated:a,isAuthInitialized:s,initializeSession:r}=L(),n=fs();return u.useEffect(()=>{s||r()},[r,s]),s?a?t.jsx(ho,{children:e??t.jsx(Nt,{})}):t.jsx(Va,{to:"/auth/login",replace:!0,state:{from:n.pathname}}):t.jsx(E,{})},$t=u.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:T("rounded-xl border-none bg-card text-card-foreground shadow-md",e),...a}));
6$t.displayName="Card";const yo=u.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:T("flex flex-col space-y-1.5 p-6",e),...a}));yo.displayName="CardHeader";const xo=u.forwardRef(({className:e,...a},s)=>t.jsx("h3",{ref:s,className:T("font-semibold leading-none tracking-tight",e),...a}));xo.displayName="CardTitle";const wo=u.forwardRef(({className:e,...a},s)=>t.jsx("p",{ref:s,className:T("text-sm text-muted-foreground",e),...a}));wo.displayName="CardDescription";const Ht=u.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:T("p-6 pt-0",e),...a}));Ht.displayName="CardContent";const vo=u.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:T("flex items-center p-6 pt-0",e),...a}));vo.displayName="CardFooter";const vt=e=>{if(!e||typeof e!="object")return!1;const a="message"in e&&typeof e.message=="string"?e.message.toLowerCase():"";return a.includes("failed to fetch dynamically imported")||a.includes("loading chunk")||a.includes("chunkloaderror")},bo=e=>{if(vt(e))return'The app was updated. Click "Try Again" to reload with the latest version.';switch(e&&typeof e=="object"&&"status"in e?e.status:void 0){case 401:return"Please sign in again to continue.";case 403:return"You do not have permission to access this page.";case 404:return"The page you requested could not be found.";case 429:return"Too many requests. Please wait a moment and try again.";case 503:return"The service is temporarily unavailable. Please try again shortly.";default:return"An unexpected error occurred. Please try again or contact support."}},nt="sendbit-chunk-reload-at",So=3e4,Z=()=>{const e=Ba(),[a,s]=u.useState(!1);u.useEffect(()=>{if(!vt(e))return;const l=Number(sessionStorage.getItem(nt)||0);Date.now()-l>So&&(sessionStorage.setItem(nt,String(Date.now())),s(!0),window.location.reload())},[e]);const r=()=>{sessionStorage.removeItem(nt),window.location.reload()};if(a)return t.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:t.jsxs("div",{className:"text-center space-y-4",children:[t.jsx(he,{className:"h-10 w-10 text-purple-600 animate-spin mx-auto"}),t.jsx("p",{className:"text-gray-600 text-sm",children:"App updated â reloadingâ¦"})]})});const n=vt(e),o=bo(e);return t.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:t.jsx($t,{className:"w-full max-w-md",children:t.jsxs(Ht,{className:"p-8 text-center",children:[t.jsxs("div",{className:"mb-6",children:[t.jsx("div",{className:"w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-4",children:t.jsx(ct,{className:"h-8 w-8 text-red-600"})}),t.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:n?"App updated":"Oops! Something went wrong"}),t.jsx("p",{className:"text-gray-600 mb-6",children:o})]}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs(C,{onClick:r,className:"w-full bg-[#5C2B90] hover:bg-[#4a1f75] text-white",children:[t.jsx(js,{className:"h-4 w-4 mr-2"}),"Try Again"]}),t.jsx(C,{asChild:!0,variant:"outline",className:"w-full",children:t.jsxs(U,{to:"/",children:[t.jsx(jt,{className:"h-4 w-4 mr-2"}),"Go Home"]})})]})]})})})},No=()=>t.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:t.jsx($t,{className:"w-full max-w-md",children:t.jsxs(Ht,{className:"p-8 text-center",children:[t.jsxs("div",{className:"mb-6",children:[t.jsx("div",{className:"w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mx-auto mb-4",children:t.jsx(Ir,{className:"h-8 w-8 text-purple-600"})}),t.jsx("div",{className:"text-6xl font-bold text-gray-300 mb-2",children:"404"}),t.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Page Not Found"}),t.jsx("p",{className:"text-gray-600 mb-6",children:"The page you're looking for doesn't exist or has been moved."})]}),t.jsxs("div",{className:"space-y-3",children:[t.jsx(C,{asChild:!0,className:"w-full bg-[#5C2B90] hover:bg-[#4a1f75] text-white",children:t.jsxs(U,{to:"/",children:[t.jsx(jt,{className:"h-4 w-4 mr-2"}),"Go Home"]})}),t.jsxs(C,{onClick:()=>window.history.back(),variant:"outline",className:"w-full",children:[t.jsx(Pr,{className:"h-4 w-4 mr-2"}),"Go Back"]})]}),t.jsx("div",{className:"mt-8 pt-6 border-t border-gray-200",children:t.jsxs("p",{className:"text-sm text-gray-500",children:["Need help? Contact our"," ",t.jsx(U,{to:"/support",className:"text-purple-600 hover:text-purple-700 underline",children:"support team"})]})})]})})}),ms="sendbit-chunk-reload-at",Eo=3e4;async function j(e){try{const{default:a}=await e();return{Component:a}}catch(a){const s=(a?.message??"").toLowerCase();if(s.includes("failed to fetch dynamically imported")||s.includes("loading chunk")||s.includes("chunkloaderror")){const n=Number(sessionStorage.getItem(ms)||0);if(Date.now()-n>Eo)return sessionStorage.setItem(ms,String(Date.now())),window.location.reload(),new Promise(()=>{})}throw a}}const Pe=Fa([{path:"/",element:t.jsx(Gr,{}),loader:({request:e})=>{const s=new URL(e.url).searchParams.get("code");return s?Ua(`/auth/social/callback?code=${encodeURIComponent(s)}`):null},errorElement:t.jsx(Z,{})},{path:"/privacy-policy",lazy:()=>j(()=>w(()=>import("./PrivacyPolicy-Ct8LmYOy.js"),__vite__mapDeps([0,1,2,3,4,5]))),loader:E,errorElement:t.jsx(Z,{})},{path:"/about",lazy:()=>j(()=>w(()=>import("./AboutPage-BJT8_o1A.js"),__vite__mapDeps([6,1,2,3,4,5]))),loader:E,errorElement:t.jsx(Z,{})},{path:"/contact",lazy:()=>j(()=>w(()=>import("./ContactPage-XAmPQWgz.js"),__vite__mapDeps([7,1,2,3,4,5]))),loader:E,errorElement:t.jsx(Z,{})},{path:"/terms",lazy:()=>j(()=>w(()=>import("./TermsPage-D762thKO.js"),__vite__mapDeps([8,1,2,3,4,5]))),loader:E,errorElement:t.jsx(Z,{})},{path:"/faq",lazy:()=>j(()=>w(()=>
6import("./FaqPage-D7IL7fAx.js"),__vite__mapDeps([9,1,2,3,4,5]))),loader:E,errorElement:t.jsx(Z,{})},{path:"/whats-new",lazy:()=>j(()=>w(()=>import("./WhatsNewPage-BU_vfiRI.js"),__vite__mapDeps([10,1,2,3,4,5]))),loader:E,errorElement:t.jsx(Z,{})},{path:"/auth",element:t.jsx(Or,{}),loader:E,errorElement:t.jsx(Z,{}),children:[{path:"/auth/login",lazy:()=>j(()=>w(()=>import("./Login-B8UuiUq9.js"),__vite__mapDeps([11,1,3,12,13,2,4,5]))),loader:E},{path:"/auth/register",lazy:()=>j(()=>w(()=>import("./Register-B0Waa9uz.js"),__vite__mapDeps([14,1,3,12,13,2,4,5]))),loader:E},{path:"/auth/verify-account",lazy:()=>j(()=>w(()=>import("./VerifyAccount-Bmzyo4FN.js"),__vite__mapDeps([15,1,3,12,4,5,2]))),loader:E},{path:"/auth/device-verification",lazy:()=>j(()=>w(()=>import("./DeviceVerification-D4rL2MK_.js"),__vite__mapDeps([16,1,3,12,4,5,2]))),loader:E},{path:"/auth/forget-password",lazy:()=>j(()=>w(()=>import("./ForgetPassword-DDK9j6fb.js"),__vite__mapDeps([17,1,3,12,13,2,4,5]))),loader:E},{path:"/auth/reset-password",lazy:()=>j(()=>w(()=>import("./ResetPassword-BQeKy7gZ.js"),__vite__mapDeps([18,1,3,12,13,2,4,5]))),loader:E},{path:"/auth/social/callback",lazy:()=>j(()=>w(()=>import("./SocialCallback-Zg09bNdD.js"),__vite__mapDeps([19,1,5,3,4,2]))),loader:E}]},{path:"/dashboard",element:t.jsx(go,{children:t.jsx(po,{})}),loader:E,errorElement:t.jsx(Z,{}),children:[{path:"/dashboard/home",lazy:()=>j(()=>w(()=>import("./Home-WNbsn_ss.js"),__vite__mapDeps([20,1,5,21,3,22,4,23,24,25,26,27,2]))),loader:E},{path:"/dashboard/wallet",lazy:()=>j(()=>w(()=>import("./Wallet-D67NcFTQ.js"),__vite__mapDeps([28,5,1,21,3,4,24,22,29,30,27,26,2]))),loader:E},{path:"/dashboard/products",lazy:()=>j(()=>w(()=>import("./Products-C9EMndn6.js"),__vite__mapDeps([31,1,24,23,4,3,32,5,2]))),loader:E},{path:"/dashboard/virtual-cards",lazy:()=>j(()=>w(()=>import("./VirtualCards-AB8eYqjM.js"),__vite__mapDeps([33,1,5,32,34,26,4,3,2]))),loader:E},{path:"/dashboard/transactions",lazy:()=>j(()=>w(()=>import("./Transactions-CR6c4CoC.js"),__vite__mapDeps([35,1,25,4,3,30,24,27,21,26,34,5,2]))),loader:E},{path:"/dashboard/refer-earn",lazy:()=>j(()=>w(()=>import("./ReferEarn-Bs3qOjM6.js"),__vite__mapDeps([36,1,32,34,26,4,3,5,2]))),loader:E},{path:"/dashboard/rewards",lazy:()=>j(()=>w(()=>import("./Rewards-Bi5oxH95.js"),__vite__mapDeps([37,1,32,5,34,26,4,3,2]))),loader:E},{path:"/dashboard/settings",lazy:()=>j(()=>w(()=>import("./Settings-37zofBNn.js"),__vite__mapDeps([38,1,25,4,3,21,5,32,2]))),loader:E},{path:"/dashboard/support",lazy:()=>j(()=>w(()=>import("./Support-D9qsNSxL.js"),__vite__mapDeps([39,1,32,4,3,5,2]))),loader:E},{path:"/dashboard/crypto",lazy:()=>j(()=>w(()=>import("./Crypto-BBoMVGEL.js"),__vite__mapDeps([40,1,34,26,4,3,5,2]))),loader:E},{path:"/dashboard/crypto/swap",lazy:()=>j(()=>w(()=>import("./CryptoSwapPage-BvBe66AY.js"),__vite__mapDeps([41,1,34,26,4,3,5,2]))),loader:E},{path:"/dashboard/crypto/market",lazy:()=>j(()=>w(()=>import("./CryptoMarketPage-QIHIffLU.js"),__vite__mapDeps([42,1,34,26,4,3,5,2]))),loader:E},{path:"/dashboard/crypto/history",lazy:()=>j(()=>w(()=>import("./CryptoHistoryPage-Er1j4R85.js"),__vite__mapDeps([43,1,34,26,4,3,5,2]))),loader:E},{path:"/dashboard/profile",lazy:()=>j(()=>w(()=>import("./Profile-D3IgTUv5.js"),__vite__mapDeps([44,1,21,3,4,32,5,2]))),loader:E},{path:"/dashboard/tiers",lazy:()=>j(()=>w(()=>import("./Tiers-mPqgx1LR.js"),__vite__mapDeps([45,1,5,21,3,46,4,2]))),loader:E},{path:"/dashboard/paypal",lazy:()=>j(()=>w(()=>import("./PayPalPage-CSCNrK-7.js"),__vite__mapDeps([47,1,34,26,4,3,5,2]))),loader:E},{path:"/dashboard/paypal/setup",lazy:()=>j(()=>w(()=>import("./PayPalSetupPage-EnlAH8VY.js"),__vite__mapDeps([48,1,22,4,3,5,2]))),loader:E},{path:"/dashboard/paypal/letter-of-acknowledgement",lazy:()=>j(()=>w(()=>import("./PayPalLOAPage-IenpTClL.js"),__vite__mapDeps([49,1,34,26,4,3,5,2]))),loader:E},{path:"/dashboard/notifications",lazy:()=>j(()=>w(()=>import("./NotificationPage-aCiH2wQf.js"),__vite__mapDeps([50,1,34,26,4,3,5,2]))),loader:E},{path:"/dashboard/kyc",lazy:()=>j(()=>w(()=>import("./KycPage-D6GFVGr4.js"),__vite__mapDeps([51,5,1,3,4,21,46,2]))),loader:E},{path:"/dashboard/invoices",lazy:()=>j(()=>w(()=>import("./Invoices-CD_zPP2C.js"),__vite__mapDeps([52,1,32,34,26,53,4,3,5,2]))),loader:E},{path:"/dashboard/invoices/:uuid",lazy:()=>j(()=>w(()=>import("./Invoices-CD_zPP2C.js"),__vite__mapDeps([52,1,32,34,26,53,4,3,5,2]))),loader:E},{path:"/dashboard/payment-links",lazy:()=>j(()=>w(()=>import("./PaymentLinksPage-7TGw0I0v.js"),__vite__mapDeps([54,1,24,34,26,4,3,5,2]))),loader:E},{path:"/dashboard/payment-links/create",lazy:()=>j(()=>w(()=>import("./CreatePaymentLinkPage-nVd5kK2l.js"),__vite__mapDeps([55,1,4,3,34,26,5,2]))),loader:E},{path:"/dashboard/payment-links/:uuid",lazy:()=>j(()=>w(()=>
6import("./PaymentLinkDetailsPage-Bmg2ZLdV.js"),__vite__mapDeps([56,1,29,34,26,4,3,5,2]))),loader:E},{path:"/dashboard/evidence-requests",lazy:()=>j(()=>w(()=>import("./EvidenceRequestsPage-B4Fp4pqU.js"),__vite__mapDeps([57,1,5,26,25,4,3,58,2]))),loader:E},{path:"/dashboard/evidence-requests/:reference",lazy:()=>j(()=>w(()=>import("./EvidenceRequestDetailsPage-26s4re8B.js"),__vite__mapDeps([59,1,22,4,3,53,58,5,2]))),loader:E}]},{path:"*",element:t.jsx(No,{})}]),bt="https://mysendbit.com",Aa="Convert crypto, create payment links, and receive global payments.",hs={"/":{title:"SendBit | Your Fast Pay Spot",description:Aa},"/about":{title:"About SendBit | Your Fast Pay Spot",description:"Learn about SendBit and our platform for crypto conversion, payment links, and global payments."},"/contact":{title:"Contact SendBit | Get in Touch",description:"Contact SendBit for help with your account, payments, and services."},"/faq":{title:"Frequently Asked Questions | SendBit",description:"Find answers to common questions about SendBit accounts, payments, and services."},"/whats-new":{title:"Whatâs New | SendBit",description:"Explore the latest SendBit product updates and features."},"/privacy-policy":{title:"Privacy Policy | SendBit",description:"Read how SendBit collects, uses, and protects your personal information."},"/terms":{title:"Terms and Conditions | SendBit",description:"Read the terms and conditions that apply when using SendBit and its services."}};function St(e){const a=e.replace(/\/+$/,"")||"/",s=Object.hasOwn(hs,a)?hs[a]:void 0;return{title:s?.title??"SendBit | Your Fast Pay Spot",description:s?.description??Aa,canonical:s?`${bt}${a==="/"?"/":a}`:null,robots:s?"index, follow":"noindex, nofollow"}}function _o(e){const a=St(e);return[{name:"description",content:a.description},{name:"robots",content:a.robots},{property:"og:site_name",content:"SendBit"},{property:"og:type",content:"website"},{property:"og:locale",content:"en_US"},{property:"og:title",content:a.title},{property:"og:description",content:a.description},...a.canonical?[{property:"og:url",content:a.canonical}]:[],{property:"og:image",content:`${bt}/tab-bg.png`},{property:"og:image:alt",content:"SendBit logo"},{name:"twitter:card",content:"summary"},{name:"twitter:title",content:a.title},{name:"twitter:description",content:a.description},{name:"twitter:image",content:`${bt}/tab-bg.png`},{name:"twitter:image:alt",content:"SendBit logo"}]}function Ca(e){document.title=St(e).title,document.head.querySelectorAll("[data-sendbit-seo]").forEach(s=>s.remove());for(const s of _o(e)){const r=document.createElement("meta");r.setAttribute("data-sendbit-seo",""),Object.entries(s).forEach(([n,o])=>r.setAttribute(n,o)),document.head.appendChild(r)}const a=St(e).canonical;if(a){const s=document.createElement("link");s.setAttribute("data-sendbit-seo",""),s.rel="canonical",s.href=a,document.head.appendChild(s)}}const jo=()=>{const[e,a]=u.useState(We),[s,r]=u.useState(!1),n=u.useCallback(async()=>{if(Pt()){r(!0);try{await L.getState().logout()}finally{a(We()),r(!1)}}},[]);return u.useEffect(()=>{const o=()=>{L.getState().logout().then(()=>{Pe.navigate("/auth/login",{replace:!0})})},l=()=>{L.setState({isAuthenticated:!0,isAuthInitialized:!0}),L.getState().fetchUserProfile()},d=()=>{mo(L.getState().user?.id),a(We()),At.clear(),B.setState(B.getInitialState()),L.setState({user:null,cryptoWallets:[],cryptoStatus:null,walletBalance:null,transactions:[],isAuthenticated:!1,isAuthInitialized:!0,successMessage:null}),Ft(),Pe.navigate("/auth/login",{replace:!0})},m=()=>{a(!1),L.setState({authError:null})},p=()=>a(!1),h=()=>a(We()),x=()=>{n()};return window.addEventListener("auth:session-expired",o),window.addEventListener("auth:session-synchronized",l),window.addEventListener("auth:remote-logout",d),window.addEventListener("auth:logout-complete",m),window.addEventListener("auth:logout-started",p),window.addEventListener("auth:logout-failed",h),window.addEventListener("online",x),navigator.onLine&&n(),()=>{window.removeEventListener("auth:session-expired",o),window.removeEventListener("auth:session-synchronized",l),window.removeEventListener("auth:remote-logout",d),window.removeEventListener("auth:logout-complete",m),window.removeEventListener("auth:logout-started",p),window.removeEventListener("auth:logout-failed",h),window.removeEventListener("online",x)}},[n]),e?t.jsxs("div",{role:"alert",className:"fixed bottom-4 left-4 right-4 z-[100] mx-auto max-w-xl rounded-xl border border-amber-300 bg-amber-50 p-4 text-sm text-amber-950 shadow-lg",children:[t.jsx("p",{className:"font-semibold",children:"Couldnât finish signing out"}),t.jsx("p",{className:"mt-1",children:"Youâre signed out on this device, but we couldnât confirm server sign-out. Please retry. Weâll also retry when your connection returns."}),t.jsx("button",{type:"button",onClick:()=>{n()},disabled:s,className:"mt-3 cursor-pointer rounded-md border border-amber-700 px-3 py-1.5 font-semibold disabled:cursor-wait disabled:opacity-60",children:s?"Retryingâ¦":"Retry logout"})]}):null};Ft();let Ye=Pe.state.location.pathname;Ca(Ye);Pe.subscribe(e=>{e.location.pathname!==Ye&&(Ye=e.location.pathname,Ca(Ye))});Wa.createRoot(document.getElementById("root")).render(t.jsx($a.StrictMode,{children:t.jsxs(Qa,{client:At,children:[t.jsx(jo,{}),t.jsx(kr,{children:t.jsx(Ha,{router:Pe})})]})}));export{Dt as $,ts as A,C as B,$t as C,oe as D,wt as E,Fr as F,T as G,Xr as H,Ut as I,Q as J,Mn as K,je as L,ja as M,Vr as N,Me as O,es as P,ss as Q,Lo as R,cs as S,sa as T,In as U,Bt as V,Lt as W,Mr as X,ya as Y,Nn as Z,ia as _,Ws as a,et as a0,vn as a1,xa as a2,wa as a3,va as a4,oa as a5,Qe as a6,$n as a7,Rn as a8,aa as a9,wo as aa,ba as ab,Sa as ac,Na as ad,kt as ae,Bo as af,ma as ag,ca as ah,_n as ai,V as aj,vo as ak,q as al,Vo as am,la as an,Oo as ao,Mo as ap,O as aq,Ie as b,ee as c,ue as d,fa as e,gt as f,se as g,me as h,Ot as i,Ae as j,pa as k,$s as l,B as m,ko as n,yo as o,Ht as p,Po as q,xo as r,ta as s,Do as t,L as u,Ne as v,Tn as w,yt as x,ls as y,xt as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.