PageSourceSearch

https://www.ardent.africa/_next/static/immutable/chunks/3ymu-m-zzffx9.js

js ardent.africa collected 2026-09-25 23:06:44 UTC 126,600 bytes, 28 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,371680,e=>{"use strict";var t=e.i(632165),r=e.i(860484),n=e.i(205729),o=e.i(58291),a=e.i(671985),i=e.i(328238),s=e.i(600618),l=e.i(759741),c=e.i(438542),d=e.i(568630),u=e.i(183711),p=e.i(637549),h=e.i(498306),m=e.i(599567),f=e.i(715390),x=e.i(50473),g=e.i(733471),b=e.i(486566),y=e.i(759893),v=e.i(212089),j=e.i(613198),k=e.i(65621),S=e.i(645827),w=e.i(952489),C=e.i(427178),I=e.i(819943),T=e.i(341372),L=e.i(892920),E=e.i(612312),z=e.i(480209),M=e.i(692709),F=e.i(281405),_=e.i(580771),B=e.i(438369),A=e.i(445536),W=e.i(551592);let P=(0,W.default)((0,t.jsx)("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}),"VolunteerActivismOutlined");var R=e.i(430264),$=e.i(784321),D=e.i(875450),O=e.i(895079),H=e.i(101023),N=e.i(225617),V=e.i(211071);let U=(0,W.default)((0,t.jsx)("path",{d:"M10.27 12h3.46c.93 0 1.63-.83 1.48-1.75l-.3-1.79C14.67 7.04 13.44 6 12 6S9.33 7.04 9.09 8.47l-.3 1.79c-.15.91.55 1.74 1.48 1.74m.79-3.21c.08-.46.47-.79.94-.79s.86.33.94.79l.2 1.21h-2.28zm-9.4 2.32c-.13.26-.18.57-.1.88.16.69.76 1.03 1.53 1h1.95c.83 0 1.51-.58 1.51-1.29 0-.14-.03-.27-.07-.4-.01-.03-.01-.05.01-.08.09-.16.14-.34.14-.53 0-.31-.14-.6-.36-.82-.03-.03-.03-.06-.02-.1.07-.2.07-.43.01-.65-.16-.43-.55-.72-.99-.74-.03 0-.05-.01-.07-.03-.17-.21-.48-.35-.83-.35-.3 0-.57.1-.75.26-.03.03-.06.03-.09.02-.14-.06-.3-.09-.46-.09-.65 0-1.18.49-1.24 1.12q0 .03-.03.06c-.29.26-.46.65-.41 1.05.03.22.12.43.25.6.03.02.03.06.02.09m14.58 2.54c-1.17-.52-2.61-.9-4.24-.9s-3.07.39-4.24.9C6.68 14.13 6 15.21 6 16.39V18h12v-1.61c0-1.18-.68-2.26-1.76-2.74M8.07 16c.09-.23.27-.42.49-.52 1.1-.49 2.26-.73 3.43-.73 1.18 0 2.33.25 3.43.73.23.1.4.29.49.52zm-6.85-1.42C.48 14.9 0 15.62 0 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58m21.56 0c-.85-.37-1.79-.58-2.78-.58-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24v-1.57c0-.81-.48-1.53-1.22-1.85M22 11v-.5c0-1.1-.9-2-2-2h-2c-.42 0-.65.48-.39.81l.7.63c-.19.31-.31.67-.31 1.06 0 1.1.9 2 2 2s2-.9 2-2"}),"Groups2Outlined");var G=e.i(75429);let q=(0,W.default)([(0,t.jsx)("path",{d:"M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z"},"0"),(0,t.jsx)("path",{d:"M20 3h-8c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 8h-8V7h8zM4 12H2v7c0 1.1.9 2 2 2h9v-2H4z"},"1")],"DynamicFeedOutlined"),Y=(0,W.default)((0,t.jsx)("path",{d:"M14 12c0 .74-.4 1.38-1 1.72V22h-2v-8.28c-.6-.35-1-.98-1-1.72 0-1.1.9-2 2-2s2 .9 2 2m-2-6c-3.31 0-6 2.69-6 6 0 1.74.75 3.31 1.94 4.4l1.42-1.42C8.53 14.25 8 13.19 8 12c0-2.21 1.79-4 4-4s4 1.79 4 4c0 1.19-.53 2.25-1.36 2.98l1.42 1.42C17.25 15.31 18 13.74 18 12c0-3.31-2.69-6-6-6m0-4C6.48 2 2 6.48 2 12c0 2.85 1.2 5.41 3.11 7.24l1.42-1.42C4.98 16.36 4 14.29 4 12c0-4.41 3.59-8 8-8s8 3.59 8 8c0 2.29-.98 4.36-2.53 5.82l1.42 1.42C20.8 17.41 22 14.85 22 12c0-5.52-4.48-10-10-10"}),"PodcastsOutlined"),K=(0,W.default)((0,t.jsx)("path",{d:"M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3m-4.4 15.55-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05"}),"FavoriteBorderOutlined");var J=e.i(791078);let X=(0,W.default)((0,t.jsx)("path",{d:"M19 5h-2V3H7v2H5c-1.1 0-2 .9-2 2v1c0 2.55 1.92 4.63 4.39 4.94.63 1.5 1.98 2.63 3.61 2.96V19H7v2h10v-2h-4v-3.1c1.63-.33 2.98-1.46 3.61-2.96C19.08 12.63 21 10.55 21 8V7c0-1.1-.9-2-2-2M5 8V7h2v3.82C5.84 10.4 5 9.3 5 8m7 6c-1.65 0-3-1.35-3-3V5h6v6c0 1.65-1.35 3-3 3m7-6c0 1.3-.84 2.4-2 2.82V7h2z"}),"EmojiEventsOutlined"),Q=(0,W.default)((0,t.jsx)("path",{d:"M16 11V3H8v6H2v12h20V11zm-6-6h4v14h-4zm-6 6h4v8H4zm16 8h-4v-6h4z"}),"LeaderboardOutlined"),Z=(0,W.default)((0,t.jsx)("path",{d:"m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25zm0 6-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25zm-7.5-5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12zm-1.51 3.49L9 15.17l-.99-2.18L5.83 12l2.18-.99L9 8.83l.99 2.18 2.18.99z"}),"AutoAwesomeOutlined"),ee=(0,W.default)((0,t.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14zM7 10h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z"}),"AssessmentOutlined"),et=(0,W.default)((0,t.jsx)("path",{d:"M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"}),"DescriptionOutlined"),er=(0,W.default)((0,t.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");var en=e.i(880634),eo=e.i(528191),ea=e.i(720247);let ei=(0,W.default)([(0,t.jsx)("path",{d:"M21 12.22C21 6.73 16.74 3 12 3c-4.69 0-9 3.65-9 9.28-.6.34-1 .98-1 1.72v2c0 1.1.9 2 2 2h1v-6.1c0-3.87 3.13-7 7-7s7 3.13 7 7V19h-8v2h8c1.1 0 2-.9 2-2v-1.22c.59-.31 1-.92 1-1.64v-2.3c0-.7-.41-1.31-1-1.62"},"0"),(0,t.jsx)("circle",{cx:"9",cy:"13",r:"1"},"1"),(0,t.jsx)("circle",{cx:"15",cy:"13",r:"1"},"2"),(0,t.jsx)("path",{d:"M18 11.03C17.52 8.18 15.04 6 12.05 6c-3.03 0-6.29 2.51-6.03 6.45 2.47-1.01 4.33-3.21 4.86-5.89 1.31 2.63 4 4.44 7.12 4.47"}
1,"3")],"SupportAgentOutlined");var es=e.i(456904);let el=(0,W.default)((0,t.jsx)("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightMode"),ec=(0,W.default)((0,t.jsx)("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"}),"DarkMode");var ed=e.i(848317);function eu(){let e=(0,a.useTranslations)("nav"),{theme:r,setTheme:o}=(0,ed.useTheme)(),[i,s]=(0,n.useState)(!1),c=(0,m.useTheme)();return((0,n.useEffect)(()=>{s(!0)},[]),i)?(0,t.jsx)(l.IconButton,{onClick:()=>o("dark"===r?"light":"dark"),sx:{color:c.palette.text.primary,transition:"all 0.3s ease","&:hover":{backgroundColor:"rgba(221, 186, 125, 0.1)",transform:"scale(1.05)",color:c.palette.secondary.main}},"aria-label":e("toggleTheme"),children:"dark"===r?(0,t.jsx)(el,{}):(0,t.jsx)(ec,{})}):(0,t.jsx)(l.IconButton,{sx:{color:c.palette.text.primary,"&:hover":{backgroundColor:"rgba(221, 186, 125, 0.1)"}},"aria-label":e("toggleTheme"),children:(0,t.jsx)(el,{})})}var ep=e.i(621664),eh=e.i(160889);let em={en:{name:"English",nativeName:"English"},fr:{name:"French",nativeName:"Français"},pt:{name:"Portuguese",nativeName:"Português"},sw:{name:"Swahili",nativeName:"Kiswahili"},es:{name:"Spanish",nativeName:"Español"}};var ef=e.i(337203),ex=e.i(434725),eg=e.i(32232),eb=e.i(629160),ey=e.i(570703),ev=e.i(23949),ej=e.i(734080);let ek=eh.routing.locales;function eS({variant:e="header",color:o,hoverColor:i}){let s=(0,ep.useLocale)(),c=(0,es.useRouter)(),d=(0,es.usePathname)(),[u,p]=(0,n.useState)(null),h=(0,a.useTranslations)("nav"),m=e=>{p(null),e!==s&&((0,ef.writeLocaleCookie)(e),c.replace(d,{locale:e}),(0,ef.persistLocaleForAccount)(e))};return"footer"===e?(0,t.jsx)(y.Stack,{direction:"row",spacing:1.5,sx:{flexWrap:"wrap"},useFlexGap:!0,children:ek.map(e=>(0,t.jsx)(eg.Link,{component:"button",onClick:()=>m(e),"aria-current":e===s?"true":void 0,sx:{color:o,fontFamily:'"Manrope", sans-serif',fontSize:"0.8125rem",textDecoration:"none",background:"none",border:"none",cursor:"pointer",opacity:e===s?1:.7,fontWeight:e===s?600:400,"&:hover":{color:i,opacity:1}},children:em[e].nativeName},e))}):(0,t.jsxs)(r.Box,{children:[(0,t.jsx)(eb.Tooltip,{title:em[s].nativeName,children:(0,t.jsx)(l.IconButton,{onClick:e=>p(e.currentTarget),size:"small","aria-label":h("changeLanguage"),sx:{color:o??"text.secondary","&:hover":{color:i??"text.primary"}},children:(0,t.jsx)(ey.default,{sx:{fontSize:22}})})}),(0,t.jsx)(ex.Menu,{anchorEl:u,open:!!u,onClose:()=>p(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{zIndex:e=>e.zIndex.modal+3},slotProps:{paper:{sx:{mt:1,minWidth:224,borderRadius:ej.RADIUS.surface,p:.5}},list:{sx:{py:0}}},children:ek.map(e=>{let r=e===s,n=em[e];return(0,t.jsxs)(x.MenuItem,{selected:r,onClick:()=>m(e),sx:{borderRadius:ej.RADIUS.control,px:1.25,py:.85,gap:1.5},children:[(0,t.jsx)(v.Typography,{component:"span",sx:{flexGrow:1,fontFamily:'"Manrope", sans-serif',fontSize:"0.9rem",fontWeight:r?600:500,color:"text.primary"},children:n.nativeName}),n.nativeName!==n.name&&(0,t.jsx)(v.Typography,{component:"span",sx:{fontFamily:'"Manrope", sans-serif',fontSize:"0.78rem",color:"text.secondary",opacity:.7},children:n.name}),(0,t.jsx)(ev.default,{sx:{fontSize:17,color:"primary.main",visibility:r?"visible":"hidden"}})]},e)})})]})}var ew=e.i(896604),eC=e.i(997459),eI=e.i(977324);let eT=[{id:"platform",items:[{id:"campaigns",href:"/campaigns"},{id:"fundraising",href:"/fundraising"},{id:"petitions",href:"/petitions"},{id:"events",href:"/events"},{id:"jobs",href:"/jobs"},{id:"marketplace",href:"/marketplace"},{id:"reviews",href:"/reviews"},{id:"durbar",href:"/durbar"},{id:"surveys",href:"/polls"},{id:"social",href:"/features/social",authedHref:"/feed",authedCapability:"canUseSocial"}]},{id:"explore",items:[{id:"causes",href:"/causes"},{id:"ngos",href:"/ngos"},{id:"companies",href:"/corporates"},{id:"csr",href:"/csr"},{id:"candidates",href:"/candidates"},{id:"employers",href:"/employers"},{id:"challenges",href:"/challenges"},{id:"volunteer",href:"/volunteer"},{id:"leaderboard",href:"/leaderboard"},{id:"successStories",href:"/success-stories"},{id:"impactReports",href:"/impact-reports"},{id:"templates",href:"/templates"}]},{id:"resources",items:[{id:"howItWorks",href:"/how-it-works"},{id:"fees",href:"/fees"},{id:"features",href:"/features"},{id:"blog",href:"/blog"},{id:"support",href:"/support"},{id:"about",href:"/about"}]}];function eL(e,{signedIn:t,can:r}){return e.authedHref&&t&&(!e.authedCapability||r(e.authedCapability))?e.authedHref:e.href}eT.flatMap(e=>e.items);let eE=e=>({minWidth:208,borderRadius:ej.RADIUS.control,border:`1px solid ${e.palette.divider}`,backgroundImage:"none",boxShadow:"dark"===e.palette.mode?"0 18px 44px rgba(0, 0, 0, 0.55)":"0 18px 44px rgba(21, 41, 47, 0.16)",overflow:"hidden","& .MuiList-root":{p:.75}}),ez=(e=!1)=>({borderRadius:ej.RADIUS.sm,px:1.5,py:1,minHeight:"auto",fontFamily:'"Manrope", sans-serif',fontSize:"0.9rem",fontWeight:e?700:500,color:e?"secondary.main":"text.primary",transition:"background-color 0.15s ease, color 0.15s ease",...e?{backgroundColor:"rgba(221, 186, 125, 0.12)"}:{},"& .MuiListItemIcon-root":{color:"inherit",minWidth:32},"&:hover":{backgroundColor:e=>"dark"===e.palette.mode?"rgba(221, 186, 125, 0.16)":e.palette.primary.main,color:e=>"dark"===e.palette.mode?e.palette.secondary.main:"#F5E7C6"}}),eM={my:.75,mx:1,borderColor:"divider"};var eF=e.i(267144),eF=eF,e_=e.i(345444),e_=e_,eB=e.i(771428),eB=eB,eA=e.i(256108),eW=e.i(37311),eW=eW;function eP({id:e,placement:o="bottom-start",trigger:a,children:i}
1){let[s,l]=(0,n.useState)(null),c=(0,n.useRef)(null),[d,u]=(0,n.useState)(!1),p=()=>{c.current&&(clearTimeout(c.current),c.current=null)},h=()=>{p(),u(!0)},m=()=>{p(),u(!1)},f=()=>{p(),c.current=setTimeout(()=>{u(!1),c.current=null},140)},x="bottom-end"===o?"top right":"top left";return(0,t.jsxs)(r.Box,{ref:l,sx:{display:"inline-flex"},onMouseEnter:h,onMouseLeave:f,children:[a({open:d,"aria-haspopup":"menu","aria-expanded":d,"aria-controls":d?e:void 0,onClick:h}),(0,t.jsx)(eW.default,{open:d,anchorEl:s,placement:o,transition:!0,sx:{zIndex:e=>e.zIndex.modal},children:({TransitionProps:n})=>(0,t.jsx)(e_.default,{...n,timeout:160,style:{transformOrigin:x},children:(0,t.jsx)(r.Box,{sx:{pt:1},onMouseEnter:p,onMouseLeave:f,children:(0,t.jsx)(eF.default,{onClickAway:e=>{s?.contains(e.target)||m()},children:(0,t.jsx)(eA.Paper,{id:e,elevation:0,sx:eE,onKeyDown:e=>{"Escape"===e.key&&m()},children:(0,t.jsx)(eB.default,{autoFocusItem:!1,sx:{outline:"none"},children:i(m)})})})})})})]})}function eR(){let e=(0,m.useTheme)(),n=(0,a.useTranslations)("nav"),o=(0,es.usePathname)(),{user:i}=(0,eI.useAuth)(),{can:l}=(0,eC.useAccountContext)(),c=e=>o===e||o.startsWith(`${e}/`);return(0,t.jsx)(r.Box,{sx:{display:"flex",alignItems:"center",gap:{md:.25,lg:.75},minWidth:0,flex:1},children:eT.map(r=>{let o=r.items.map(e=>({id:e.id,href:eL(e,{signedIn:!!i,can:l})})),a=o.some(e=>c(e.href));return(0,t.jsx)(eP,{id:`primary-nav-${r.id}`,trigger:o=>(0,t.jsx)(s.Button,{disableRipple:!0,onClick:o.onClick,"aria-haspopup":o["aria-haspopup"],"aria-expanded":o["aria-expanded"],"aria-controls":o["aria-controls"],endIcon:(0,t.jsx)(F.default,{sx:{fontSize:18,transition:"transform 0.2s ease",transform:o.open?"rotate(180deg)":"none"}}),sx:{color:a?e.palette.warmGold.text:e.palette.text.primary,fontFamily:'"Manrope", sans-serif',fontWeight:a?700:500,fontSize:"0.95rem",textTransform:"none",px:1.25,minWidth:"auto",whiteSpace:"nowrap","&:hover":{color:e.palette.warmGold.text,backgroundColor:"transparent"}},children:n(`groups.${r.id}`)}),children:e=>o.map(r=>(0,t.jsx)(x.MenuItem,{component:es.Link,href:r.href,onClick:e,sx:ez(c(r.href)),children:n(r.id)},r.id))},r.id)})})}var e$=e.i(562067),eD=e.i(920755),eO=e.i(676997),eH=e.i(694456),eN=e.i(767307),eV=e.i(302452),eU=e.i(502208);function eG(){let e=eU.default.env.NEXT_PUBLIC_STATUS_URL;return"string"==typeof e&&e.trim().length>0?e.replace(/\/$/,""):"https://status.ardent.africa"}function eq(){let e=(0,m.useTheme)(),o=(0,a.useTranslations)("nav"),W=(0,a.useTranslations)("topbar"),el=(0,f.useMediaQuery)(e.breakpoints.down("md")),ec=(0,eV.docsAppUrl)(),ed=eG(),[ep,eh]=(0,n.useState)(!1),{user:em,loading:ef}=(0,eI.useAuth)(),{can:ex}=(0,eC.useAccountContext)(),eg=(0,es.usePathname)(),eb=eT.map(e=>({id:e.id,label:o(`groups.${e.id}`),items:e.items.map(e=>({id:e.id,label:o(e.id),href:eL(e,{signedIn:!!em,can:ex})}))})),ey=()=>{eh(!ep)},ev=async()=>{await (0,eO.signOutThisDevice)((0,eD.createClient)()),window.location.href="/"}
1,[ek,eE]=(0,n.useState)([]),[eF,e_]=(0,n.useState)(0);(0,n.useEffect)(()=>{(async()=>{try{let e=await (0,eH.listAnnouncements)();if(e.announcements){let t=e.announcements.map(e=>({id:e.id,text:e.message||e.title||"",url:e.url}));eE(t)}}catch{}})()},[]),(0,n.useEffect)(()=>{if(!ek.length)return;let e=setInterval(()=>{e_(e=>(e+1)%ek.length)},8e3);return()=>clearInterval(e)},[ek.length]);let eB={"/campaigns":(0,t.jsx)(A.default,{}),"/fundraising":(0,t.jsx)(P,{}),"/petitions":(0,t.jsx)(R.default,{}),"/ngos":(0,t.jsx)($.default,{}),"/corporates":(0,t.jsx)(D.default,{}),"/csr":(0,t.jsx)(V.default,{}),"/marketplace":(0,t.jsx)(O.default,{}),"/events":(0,t.jsx)(H.default,{}),"/jobs":(0,t.jsx)(N.default,{}),"/reviews":(0,t.jsx)(B.default,{}),"/features/social":(0,t.jsx)(U,{}),"/features/polls-surveys":(0,t.jsx)(G.default,{}),"/feed":(0,t.jsx)(q,{}),"/durbar":(0,t.jsx)(Y,{}),"/polls":(0,t.jsx)(G.default,{}),"/causes":(0,t.jsx)(K,{}),"/candidates":(0,t.jsx)(J.default,{}),"/employers":(0,t.jsx)(D.default,{}),"/challenges":(0,t.jsx)(X,{}),"/volunteer":(0,t.jsx)(V.default,{}),"/leaderboard":(0,t.jsx)(Q,{}),"/success-stories":(0,t.jsx)(Z,{}),"/impact-reports":(0,t.jsx)(ee,{}),"/templates":(0,t.jsx)(et,{}),"/how-it-works":(0,t.jsx)(er,{}),"/fees":(0,t.jsx)(en.default,{}),"/features":(0,t.jsx)(eo.default,{}),"/blog":(0,t.jsx)(ea.default,{}),"/support":(0,t.jsx)(ei,{}),"/about":(0,t.jsx)(L.default,{})},eA=e=>`rgba(221, 186, 125, ${e})`,eW=t=>({position:"relative",borderRadius:ej.RADIUS.control,px:1.5,py:1.1,gap:1.5,minHeight:48,alignItems:"center","& .MuiListItemIcon-root":{minWidth:0,color:"inherit",display:"flex",alignItems:"center"},"& .MuiListItemIcon-root svg":{fontSize:22,display:"block"},"& .MuiListItemText-root":{my:0},"& .MuiListItemText-primary":{transform:"translateY(3px)"},color:t?e.palette.secondary.main:e.palette.text.primary,backgroundColor:t?eA("dark"===e.palette.mode?.14:.16):"transparent",transition:"background-color 0.18s ease, color 0.18s ease","&::before":{content:'""',position:"absolute",left:4,top:"50%",transform:"translateY(-50%)",width:3,height:20*!!t,borderRadius:ej.RADIUS.pill,backgroundColor:e.palette.secondary.main,transition:"height 0.2s ease"},"&:hover":{backgroundColor:t?eA(.2):eA("dark"===e.palette.mode?.08:.1)}}),eU={display:"block",px:1.5,mt:2,mb:.5,fontFamily:'"Manrope", sans-serif',fontWeight:700,fontSize:"0.68rem",letterSpacing:"0.09em",textTransform:"uppercase",color:"text.secondary"},eq=(0,t.jsxs)(r.Box,{onClick:ey,sx:{height:"100%",display:"flex",flexDirection:"column",background:"dark"===e.palette.mode?`linear-gradient(180deg, ${eA(.05)} 0%, ${(0,ej.darkRgba)(1)} 160px, ${(0,ej.darkRgba)(1)} 100%)`:`linear-gradient(180deg, ${eA(.1)} 0%, rgba(249, 250, 251, 1) 160px, rgba(249, 250, 251, 1) 100%)`},children:[(0,t.jsxs)(r.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:3,py:2,borderBottom:`1px solid ${e.palette.divider}`,flexShrink:0},children:[(0,t.jsx)(r.Box,{component:es.Link,href:"/",sx:{display:"flex",alignItems:"center",textDecoration:"none"},children:(0,t.jsx)(ew.Logo,{variant:"full",size:40})}),(0,t.jsx)(l.IconButton,{"aria-label":o("closeMenu"),onClick:ey,sx:{color:e.palette.text.secondary,"&:hover":{color:e.palette.secondary.main,backgroundColor:eA(.1)}},children:(0,t.jsx)(k.default,{})})]}),(0,t.jsxs)(r.Box,{sx:{flex:1,overflowY:"auto",px:1.5,py:1.5},children:[eb.map(e=>(0,t.jsxs)(r.Box,{sx:{mb:1},children:[(0,t.jsx)(v.Typography,{component:"span",sx:eU,children:e.label}),(0,t.jsx)(d.List,{disablePadding:!0,sx:{display:"flex",flexDirection:"column",gap:.25},children:e.items.map(e=>{let r=eg===e.href||eg.startsWith(e.href+"/");return(0,t.jsx)(u.ListItem,{disablePadding:!0,children:(0,t.jsxs)(p.ListItemButton,{component:es.Link,href:e.href,sx:eW(r),children:[(0,t.jsx)(g.ListItemIcon,{sx:{minWidth:0,color:"inherit","& svg":{fontSize:22}},children:eB[e.href]??(0,t.jsx)(_.default,{})}),(0,t.jsx)(h.ListItemText,{primary:e.label,slotProps:{primary:{sx:{fontFamily:'"Manrope", sans-serif',fontWeight:r?700:600,fontSize:"0.95rem"}}}})]})},e.id)})})]},e.id)),(0,t.jsx)(d.List,{disablePadding:!0,sx:{display:"flex",flexDirection:"column",gap:.25},children:(0,t.jsx)(u.ListItem,{disablePadding:!0,children:(0,t.jsxs)(p.ListItemButton,{component:es.Link,href:"/search",sx:eW("/search"===eg),children:[(0,t.jsx)(g.ListItemIcon,{sx:{minWidth:0,color:"inherit","& svg":{fontSize:22}},children:(0,t.jsx)(E.default,{})}),(0,t.jsx)(h.ListItemText,{primary:o("search"),slotProps:{primary:{sx:{fontFamily:'"Manrope", sans-serif',fontWeight:"/search"===eg?700:600,fontSize:"0.95rem"}}}})]})})}),(0,t.jsxs)(y.Stack,{spacing:1.25,sx:{mt:2.5,px:1.5},children:[(0,t.jsx)(e$.StartCauseCTA,{isLoggedIn:!!em,variant:"outlined",fullWidth:!0,sx:{borderWidth:2,borderColor:"secondary.main",color:"secondary.main",fontFamily:'"Manrope", sans-serif',fontWeight:700,textTransform:"none",py:1.35,borderRadius:ej.RADIUS.control,"&:hover":{borderWidth:2,borderColor:"secondary.main",backgroundColor:eA(.18)}}}),!em&&(0,t.jsx)(s.Button,{component:es.Link,href:"/signup",variant:"contained",color:"secondary",fullWidth:!0,sx:{fontFamily:'"Manrope", sans-serif',fontWeight:700,textTransform:"none",py:1.35,borderRadius:ej.RADIUS.control},children:o("signUp")})]}),!em&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.Typography,{component:"span",sx:eU,children:o("cho
1osePath")}),(0,t.jsx)(d.List,{disablePadding:!0,sx:{display:"flex",flexDirection:"column",gap:.25},children:[{label:o("signUpPersonal"),href:"/signup/personal"},{label:o("signUpNgo"),href:"/signup/ngo"},{label:o("signUpCorporate"),href:"/signup/corporate"}].map(e=>(0,t.jsx)(u.ListItem,{disablePadding:!0,children:(0,t.jsxs)(p.ListItemButton,{component:es.Link,href:e.href,sx:eW(!1),children:[(0,t.jsx)(h.ListItemText,{primary:e.label,slotProps:{primary:{sx:{fontFamily:'"Manrope", sans-serif',fontWeight:600,fontSize:"0.9rem"}}}}),(0,t.jsx)(_.default,{sx:{fontSize:20,color:"text.disabled"}})]})},e.href))})]}),(0,t.jsx)(b.Divider,{sx:{borderColor:e.palette.divider,my:2}}),(0,t.jsx)(v.Typography,{component:"span",sx:{...eU,mt:0},children:W("company")}),(0,t.jsx)(d.List,{disablePadding:!0,sx:{display:"flex",flexDirection:"column",gap:.25},children:[{label:W("aboutUs"),href:"/about"},{label:W("features"),href:"/features"},{label:W("helpSupport"),href:"/support"},{label:W("documentation"),href:ec,external:!0},{label:W("blog"),href:"/blog"},{label:W("careers"),href:"/careers"},{label:W("donorGuarantee"),href:"/legal/donor-guarantee"}].map(e=>(0,t.jsx)(u.ListItem,{disablePadding:!0,children:(0,t.jsxs)(p.ListItemButton,{component:e.external?"a":es.Link,href:e.href,...e.external?{target:"_blank",rel:"noopener noreferrer"}:{},sx:{...eW(!1),py:.85,minHeight:42},children:[(0,t.jsx)(h.ListItemText,{primary:e.label,slotProps:{primary:{sx:{fontFamily:'"Manrope", sans-serif',fontSize:"0.9rem",fontWeight:500}}}}),(0,t.jsx)(_.default,{sx:{fontSize:20,color:"text.disabled"}})]})},e.label))}),(0,t.jsx)(b.Divider,{sx:{borderColor:e.palette.divider,my:2}}),(0,t.jsx)(v.Typography,{component:"span",sx:{...eU,mt:0},children:o("account")}),em?(0,t.jsxs)(d.List,{disablePadding:!0,sx:{display:"flex",flexDirection:"column",gap:.25},children:[(0,t.jsx)(u.ListItem,{disablePadding:!0,children:(0,t.jsxs)(p.ListItemButton,{component:es.Link,href:"/dashboard",sx:eW(eg.startsWith("/dashboard")),children:[(0,t.jsx)(g.ListItemIcon,{sx:{minWidth:0,color:"inherit","& svg":{fontSize:22}},children:(0,t.jsx)(S.default,{})}),(0,t.jsx)(h.ListItemText,{primary:o("dashboard"),slotProps:{primary:{sx:{fontFamily:'"Manrope", sans-serif',fontWeight:eg.startsWith("/dashboard")?700:600,fontSize:"0.95rem"}}}})]})}),(0,t.jsx)(u.ListItem,{disablePadding:!0,children:(0,t.jsxs)(p.ListItemButton,{component:es.Link,href:"/dashboard/messages",sx:eW(eg.startsWith("/dashboard/messages")),children:[(0,t.jsx)(g.ListItemIcon,{sx:{minWidth:0,color:"inherit","& svg":{fontSize:22}},children:(0,t.jsx)(z.default,{})}),(0,t.jsx)(h.ListItemText,{primary:o("messages"),slotProps:{primary:{sx:{fontFamily:'"Manrope", sans-serif',fontWeight:eg.startsWith("/dashboard/messages")?700:600,fontSize:"0.95rem"}}}})]})}),(0,t.jsx)(u.ListItem,{disablePadding:!0,children:(0,t.jsxs)(p.ListItemButton,{onClick:ev,sx:eW(!1),children:[(0,t.jsx)(g.ListItemIcon,{sx:{minWidth:0,color:"inherit","& svg":{fontSize:22}},children:(0,t.jsx)(T.default,{})}),(0,t.jsx)(h.ListItemText,{primary:o("signOut"),slotProps:{primary:{sx:{fontFamily:'"Manrope", sans-serif',fontWeight:600,fontSize:"0.95rem"}}}})]})})]}):(0,t.jsx)(d.List,{disablePadding:!0,children:(0,t.jsx)(u.ListItem,{disablePadding:!0,children:(0,t.jsxs)(p.ListItemButton,{component:es.Link,href:"/login",sx:eW("/login"===eg),children:[(0,t.jsx)(g.ListItemIcon,{sx:{minWidth:0,color:"inherit","& svg":{fontSize:22}},children:(0,t.jsx)(w.default,{})}),(0,t.jsx)(h.ListItemText,{primary:o("signIn"),slotProps:{primary:{sx:{fontFamily:'"Manrope", sans-serif',fontWeight:600,fontSize:"0.95rem"}}}})]})})})]}),(0,t.jsxs)(r.Box,{onClick:e=>e.stopPropagation(),sx:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",px:3,py:1.5,borderTop:`1px solid ${e.palette.divider}`},children:[(0,t.jsx)(v.Typography,{variant:"caption",sx:{color:"text.secondary",fontFamily:'"Manrope", sans-serif',fontWeight:600},children:"Ardent Africa"}),(0,t.jsxs)(r.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,t.jsx)(eS,{variant:"header"}),(0,t.jsx)(eu,{})]})]})]});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(r.Box,{sx:{display:{xs:"none",sm:"flex"},alignItems:"center",justifyContent:"space-between",gap:2,px:{xs:2,sm:3,md:4},py:.75,backgroundColor:e=>(0,ej.darkSectionSurface)(e.palette.mode,eN.BRAND_TOPBAR_BG),color:eN.BRAND_TOPBAR_TEXT,borderBottom:`1px solid ${eN.BRAND_TOPBAR_BORDER}`,position:"relative",zIndex:1201},children:[(0,t.jsxs)(y.Stack,{direction:"row",spacing:1.5,sx:{alignItems:"center",flex:1,minWidth:0,justifyContent:{xs:"center",sm:"flex-start"}},children:[(0,t.jsx)(L.default,{sx:{fontSize:16,color:e.palette.secondary.main,flexShrink:0,display:{xs:"none",sm:"block"}}}),(0,t.jsx)(v.Typography,{component:ek[eF]?.url?es.Link:"span",href:ek[eF]?.url||void 0,variant:"caption",noWrap:!0,sx:{fontFamily:'"Manrope", sans-serif',color:eN.BRAND_TOPBAR_TEXT,fontWeight:600,fontSize:{xs:"0.75rem",sm:"0.8rem"},textDecoration:ek[eF]?.url?"underline":"none",textUnderlineOffset:"4px",textAlign:{xs:"center",sm:"left"},"&:hover":{color:ek[eF]?.url?e.palette.secondary.main:eN.BRAND_TOPBAR_TEXT}},title:ek[eF]?.text||o("announcementsTitle"),children:ek[eF]?.text||o("announcementsEmpty")})]}),(0,t.jsx)(y.Stack,{direction:"row",spacing:1,sx:{alignItems:"center",display:{xs:"none",sm:"flex"},flexWrap:"nowrap"},children:[{label:W("aboutUs"),href:"/about"},{label:W("features"),href:"/features"},{label:W("helpSupport"),href:"/support"},{label:W("documentation"),href:ec,external:!0},{label:W("systemStatus"),href:ed,external:!0},{label:W("blog"),href:"/blog"},{label:W("careers"),href:"/careers"},{label:W("donorGuarantee"),href:"/legal/donor-guarantee"}].map(r=>(0,t.jsx)(s.Button,{component:r.external?"a":es.Link,href:r.href,...r.external?{target:"_blank",rel:"noopener noreferrer"}:{},size:"small",sx:{color:eN.BRAND_TOPBAR_TEXT,fontFamily:'"Manrope", sans-serif',fontSize:"0.75rem",textTransform:"none",minWidth:"auto",px:1,whiteSpace:"nowrap","&:hover":{color:e.palette.secondary.main,backgroundColor:"rgba(221,186,125,0.12)"}},children:r.label},r.label))})]}),(0,t.jsx)(r.Box,{component:"header",role:"banner","aria-label":o("mainNavigation"),sx:{position:"sticky",top:0,left:0,right:0,width:"100%",zIndex:1200,flexShrink:0,alignSelf:"stretch",borderBottom:`1px solid ${"dark"===e.palette.mode?ej.DARK_BORDER_ACCENT:"rgba(221, 186, 125, 0.2)"}`,backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",backgroundColor:"dark"===e.palette.mode?(0,ej.darkRgba)(.95):"rgba(249, 250, 251, 0.98)","@supports (backdrop-filter: blur(12px))":{backgroundColor:"dark"===e.palette.mode?(0,ej.darkRgba)(.85):"rgba(249, 250, 251, 0.85)"}},children:(0,t.jsxs)(i.Toolbar,{sx:{justifyContent:"space-between",padding:{xs:"8px 16px",sm:"12px 24px"},minHeight:{xs:"64px",sm:"72px"},maxWidth:"100%"},children:[(0,t.jsx)(r.Box,{component:es.Link,href:"/",sx:{textDecoration:"none",display:"flex",alignItems:"center",transition:"opacity 0.2s ease","&:hover":{opacity:.8}},children:(0,t.jsx)(ew.Logo,{variant:"full",size:56})}),el?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(r.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[!em&&!ef&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.Button,{component:es.Link,href:"/signup",size:"small",variant:"contained",color:"secondary",sx:{fontFamily:'"Manrope", sans-serif',fontWeight:600,textTransform:"none",fontSize:"0.8rem",minWidth:"auto",px:1.25},children:o("signUp")}),(0,t.jsx)(s.Button,{component:es.Link,href:"/login",size:"small",sx:{color:e.palette.text.primary,fontFamily:'"Manrope", sans-serif',fontWeight:500,textTransform:"none",fontSize:"0.875rem",minWidth:"auto",px:1.5,"&:hover":{color:e.palette.secondary.main,backgroundColor:"rgba(221, 186, 125, 0.1)"}}
1,children:o("signIn")})]}),(0,t.jsx)(eu,{}),(0,t.jsx)(l.IconButton,{color:"inherit","aria-label":o("openMenu"),"aria-expanded":ep,"aria-controls":"mobile-navigation",edge:"end",onClick:ey,sx:{color:e.palette.text.primary,"&:hover":{backgroundColor:"rgba(221, 186, 125, 0.1)"}},children:(0,t.jsx)(j.default,{})})]}),(0,t.jsx)(c.Drawer,{variant:"temporary",open:ep,onClose:ey,ModalProps:{keepMounted:!0},id:"mobile-navigation","aria-label":o("mobileNavigation"),sx:{display:{xs:"block",md:"none"},zIndex:e=>e.zIndex.modal+2,"& .MuiDrawer-paper":{boxSizing:"border-box",width:{xs:"86vw",sm:360},maxWidth:380,borderLeft:"none",backgroundColor:"dark"===e.palette.mode?(0,ej.darkRgba)(1):"rgba(249, 250, 251, 1)",boxShadow:"dark"===e.palette.mode?`-8px 0 40px rgba(0,0,0,0.5), 0 0 0 1px ${ej.DARK_BORDER_ACCENT}`:"-8px 0 40px rgba(0,0,0,0.12), 0 0 0 1px rgba(221, 186, 125, 0.18)"}},children:eq})]}):(0,t.jsxs)(r.Box,{sx:{display:"flex",alignItems:"center",flex:1,minWidth:0,gap:{md:1,lg:2},ml:{md:2,lg:3}},children:[(0,t.jsx)(eR,{}),(0,t.jsxs)(r.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexShrink:0},children:[(0,t.jsx)(l.IconButton,{component:es.Link,href:"/search","aria-label":o("search"),sx:{color:"/search"===eg?e.palette.secondary.main:e.palette.text.primary,"&:hover":{color:e.palette.secondary.main,backgroundColor:"rgba(221, 186, 125, 0.1)"}},children:(0,t.jsx)(E.default,{})}),(0,t.jsx)(e$.StartCauseCTA,{isLoggedIn:!!em,variant:"outlined",sx:{borderColor:"secondary.main",color:"text.primary",fontFamily:'"Manrope", sans-serif',fontWeight:500,textTransform:"none","&:hover":{borderColor:"secondary.main",backgroundColor:"rgba(221, 186, 125, 0.1)"}}}),!em&&!ef&&(0,t.jsx)(eP,{id:"header-signup-menu",placement:"bottom-end",trigger:e=>(0,t.jsx)(s.Button,{variant:"contained",color:"secondary",endIcon:(0,t.jsx)(F.default,{sx:{fontSize:18,transition:"transform 0.2s ease",transform:e.open?"rotate(180deg)":"none"}}),onClick:e.onClick,"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],sx:{fontFamily:'"Manrope", sans-serif',fontWeight:600,textTransform:"none"},children:o("signUp")}),children:e=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.MenuItem,{component:es.Link,href:"/signup",onClick:e,sx:ez(),children:o("allSignupOptions")}),(0,t.jsx)(x.MenuItem,{component:es.Link,href:"/signup/personal",onClick:e,sx:ez(),children:o("signUpPersonal")}),(0,t.jsx)(x.MenuItem,{component:es.Link,href:"/signup/ngo",onClick:e,sx:ez(),children:o("signUpNgo")}),(0,t.jsx)(x.MenuItem,{component:es.Link,href:"/signup/corporate",onClick:e,sx:ez(),children:o("signUpCorporate")})]})}),em?(0,t.jsx)(eP,{id:"header-dashboard-menu",placement:"bottom-end",trigger:r=>(0,t.jsx)(s.Button,{onClick:r.onClick,"aria-haspopup":r["aria-haspopup"],"aria-expanded":r["aria-expanded"],"aria-controls":r["aria-controls"],endIcon:(0,t.jsx)(S.default,{fontSize:"small"}),sx:{fontFamily:'"Manrope", sans-serif',fontWeight:600,textTransform:"none",px:1.75,borderRadius:ej.RADIUS.control,transition:"background-color 0.15s ease, color 0.15s ease",...eg.startsWith("/dashboard")?{color:"primary.contrastText",backgroundColor:"primary.main","&:hover":{color:"primary.contrastText",backgroundColor:"primary.dark"}}:{color:e.palette.text.primary,backgroundColor:"transparent","&:hover":{color:e.palette.secondary.main,backgroundColor:"rgba(221, 186, 125, 0.1)"}}},children:o("dashboard")}),children:e=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(x.MenuItem,{component:es.Link,href:"/dashboard",onClick:e,sx:ez("/dashboard"===eg),children:[(0,t.jsx)(g.ListItemIcon,{children:(0,t.jsx)(S.default,{fontSize:"small"})}),o("overview")]}),(0,t.jsxs)(x.MenuItem,{component:es.Link,href:"/dashboard/profile",onClick:e,sx:ez(eg.startsWith("/dashboard/profile")),children:[(0,t.jsx)(g.ListItemIcon,{children:(0,t.jsx)(w.default,{fontSize:"small"})}),o("profile")]}),ex("canUseSocialGraph")&&(0,t.jsxs)(x.MenuItem,{component:es.Link,href:"/network",onClick:e,sx:ez(eg.startsWith("/network")),children:[(0,t.jsx)(g.ListItemIcon,{children:(0,t.jsx)(M.default,{fontSize:"small"})}
1),o("myNetwork")]}),ex("canJoinGroups")&&(0,t.jsxs)(x.MenuItem,{component:es.Link,href:"/groups",onClick:e,sx:ez(eg.startsWith("/groups")),children:[(0,t.jsx)(g.ListItemIcon,{children:(0,t.jsx)(U,{fontSize:"small"})}),o("communities")]}),(0,t.jsxs)(x.MenuItem,{component:es.Link,href:"/dashboard/notifications",onClick:e,sx:ez(eg.startsWith("/dashboard/notifications")),children:[(0,t.jsx)(g.ListItemIcon,{children:(0,t.jsx)(C.default,{fontSize:"small"})}),o("notifications")]}),(0,t.jsxs)(x.MenuItem,{component:es.Link,href:"/dashboard/messages",onClick:e,sx:ez(eg.startsWith("/dashboard/messages")),children:[(0,t.jsx)(g.ListItemIcon,{children:(0,t.jsx)(z.default,{fontSize:"small"})}),o("messages")]}),(0,t.jsxs)(x.MenuItem,{component:es.Link,href:"/dashboard/reviews",onClick:e,sx:ez(eg.startsWith("/dashboard/reviews")),children:[(0,t.jsx)(g.ListItemIcon,{children:(0,t.jsx)(B.default,{fontSize:"small"})}),o("myReviews")]}),(0,t.jsxs)(x.MenuItem,{component:es.Link,href:"/dashboard/settings",onClick:e,sx:ez(eg.startsWith("/dashboard/settings")),children:[(0,t.jsx)(g.ListItemIcon,{children:(0,t.jsx)(I.default,{fontSize:"small"})}),o("settings")]}),(0,t.jsx)(b.Divider,{sx:eM}),(0,t.jsxs)(x.MenuItem,{onClick:()=>{e(),ev()},sx:ez(),children:[(0,t.jsx)(g.ListItemIcon,{children:(0,t.jsx)(T.default,{fontSize:"small"})}),o("signOut")]})]})}):(0,t.jsx)(s.Button,{component:es.Link,href:"/login",variant:"outlined",sx:{borderColor:"secondary.main",color:e.palette.text.primary,fontFamily:'"Manrope", sans-serif',fontWeight:500,textTransform:"none","&:hover":{borderColor:"secondary.main",backgroundColor:"rgba(221, 186, 125, 0.1)"}},children:o("signIn")}),(0,t.jsx)(eS,{variant:"header"}),(0,t.jsx)(eu,{})]})]})]})})]})}var eY=e.i(473616),eY=eY,eK=e.i(171864),eJ=e.i(224495),eX=e.i(790591),eQ=e.i(152708),eZ=e.i(766290),e0=e.i(879389);let e1={operational:{label:"All systems operational",short:"Operational",color:"#3FB950"},degraded:{label:"Partial system degradation",short:"Degraded",color:"#D29922"},outage:{label:"Major system outage",short:"Outage",color:"#F85149"},maintenance:{label:"Maintenance in progress",short:"Maintenance",color:"#58A6FF"}};async function e2(e,t){try{let r=e.replace(/\/+$/,""),n=await fetch(`${r}/status.json`,{signal:t,cache:"no-store"});if(!n.ok)return null;let o=await n.json(),a=o?.status?.indicator;if(!a||!(a in e1))return null;return{indicator:a,label:o?.status?.description||e1[a].label}}catch{return null}}function e5({color:e="inherit",hoverColor:o}){let a=eG(),[i,s]=(0,n.useState)(null);(0,n.useEffect)(()=>{let e=new AbortController;return e2(a,e.signal).then(s),()=>e.abort()},[a]);let l=i?e1[i.indicator]:null,c=l?.color??"#8b98a5",d=i?.label??"System status";return(0,t.jsxs)(eg.Link,{href:a,target:"_blank",rel:"noopener noreferrer","aria-label":`System status: ${d}`,sx:{display:"inline-flex",alignItems:"center",gap:1,textDecoration:"none",color:e,fontFamily:'"Manrope", sans-serif',fontSize:"0.8125rem",opacity:.85,transition:"opacity 0.2s ease, color 0.2s ease","&:hover":{opacity:1,color:o??e}},children:[(0,t.jsx)(r.Box,{component:"span",sx:{width:9,height:9,borderRadius:"50%",bgcolor:c,flexShrink:0}}),d]})}var e4=e.i(386801),e3=e.i(498622),e6=e.i(207008),e8=e.i(761090);function e9({entitySlug:e,color:o,hoverColor:i}){let s=(0,a.useTranslations)("trustScoreBadge"),[l,c]=(0,n.useState)(void 0);return((0,n.useEffect)(()=>{let t=!0;return(0,e8.getEntity)(e).then(e=>t&&c(e.entity)).catch(()=>t&&c(null)),()=>{t=!1}},[e]),void 0===l)?(0,t.jsx)(e4.Skeleton,{variant:"text",width:140,sx:{bgcolor:"rgba(255,255,255,0.08)"}}):l?(0,t.jsx)(r.Box,{component:e6.default,href:`/reviews/${e}`,sx:{display:"inline-flex",textDecoration:"none",color:o??"text.secondary",transition:"color 0.2s ease","&:hover":{color:i??"primary.main"}},children:(0,t.jsxs)(y.Stack,{direction:"row",spacing:.75,sx:{alignItems:"center"},children:[(0,t.jsx)(e3.default,{sx:{fontSize:18,color:"warmGold.text"}}),null!==l.trust_score?(0,t.jsx)(v.Typography,{variant:"body2",sx:{fontFamily:'"Manrope", sans-serif',fontSize:"0.8rem"},children:s("summary",{score:(l.trust_score/20).toFixed(1),count:l.published_review_count})}):(0,t.jsx)(v.Typography,{variant:"body2",sx:{fontFamily:'"Manrope", sans-serif',fontSize:"0.8rem"},children:s("rate",{name:l.display_name})})]})}):null}function e7(e){return(0,t.jsx)(eY.default,{viewBox:"0 0 24 24",...e,children:(0,t.jsx)("path",{d:"M18.9 3H22l-7 8 8.2 10h-6.4l-5-6.1L4.9 21H2l7.5-8.6L1.5 3h6.6l4.5 5.6L18.9 3zm-1.1 16h1.7L7.3 4.8H5.5L17.8 19z"})})}function te(){let e=(0,m.useTheme)(),o=(0,a.useTranslations)("footer"),i=(0,eZ.useLaunchCopy)(),s=(0,eV.docsAppUrl)(),l=eG(),c=(0,e0.foundationAppUrl)(),d="dark"===e.palette.mode?"#000000":"#141b1c",u="rgba(245, 247, 250, 0.66)",p="rgba(245, 247, 250, 0.74)",h=e.palette.secondary.main,f="dark"===e.palette.mode?"rgba(255, 255, 255, 0.22)":"rgba(245, 231, 198, 0.1)",x=(0,n.useMemo)(()=>[{title:o("sections.getStarted"),links:[{label:o("links.signUp"),href:"/signup"},{label:o("links.personalAccount"),href:"/signup/personal"},{label:o("links.ngoOrCharity"),href:"/signup/ngo"},{label:o("links.corporate"),href:"/signup/corporate"},{label:o("links.logIn"),href:"/login"},{label:o("links.howItWorks"),href:"/how-it-works"}]},{title:o("sections.platform"),links:[{label:o("links.howItWorks"),href:"/how-it-works"},{label:o("links.feesCharges"),href:"/fees"},{label:o("links.features"),href:"/features"},{label:o("links.campaigns"),href:"/campaigns"},{label:o("links.fundraising"),href:"/fundraising"},{label:o("links.petitions"),href:"/petitions"},{label:o("links.petitionGuides"),href:"/petitions/guides"},{label:o("links.petitionVictories"),href:"/petitions/victories"},{label:o("links.ngos"),href:"/ngos"},{label:o("links.companies"),href:"/corporates"},{label:o("links.csrPledges"),href:"/csr"},{label:o("links.marketplace"),href:"/marketplace"},{label:o("links.events"),href:"/events"},{label:o("links.jobs"),href:"/jobs"},{label:o("links.reviews"),href:"/reviews"},{label:o("links.social"),href:"/features/social"},{label:o("links.surveys"),href:"/features/polls-surveys"},{label:o("links.talentDirectory"),href:"/candidates"},{label:o("links.companiesHiring"),href:"/employers"},{label:o("links.blog"),href:"/blog"},{label:o("links.search"),href:"/search"},{label:o("links.successStories"),href:"/success-stories"}]},{title:o("sections.explore"),links:[{label:o("links.challenges"),href:"/challenges"},{label:o("links.volunteer"),href:"/volunteer"},{label:o("links.templates"),href:"/templates"},{label:o("links.marketplace"),href:"/marketplace"},{label:o("links.events"),href:"/events"},{label:o("links.jobs"),href:"/jobs"},{label:o("links.reviews"),href:"/reviews"},{label:o("links.leaderboard"),href:"/leaderboard"},{label:o("links.community"),href:"/groups"},{label:o("links.impactReports"),href:"/impact-reports"}]},{title:o("sections.resources"),links:[{label:o("links.aboutUs"),href:"/about"},{label:o("links.foundation"),href:c,external:!0},{label:o("links.helpSupport"),href:"/support"},{label:o("links.faqs"),href:"/faq"},{label:o("links.contact"),href:"/contact"},{label:o("links.feedback"),href:"/feedback"},{label:o("links.donorGuarantee"),href:"/legal/donor-guarantee"},{label:i.footerStartLabel,href:i.footerStartHref},{label:o("links.pressMedia"),href:"/press"},{label:o("links.brandGuidelines"),href:"/brand"},{label:o("links.documentation"),href:s,external:!0},{label:o("links.developers"),href:`${s}/docs/developers`,external:!0},{label:o("links.careers"),href:"/careers"},{label:o("links.systemStatus"),href:l,external:!0}]},{title:o("sections.legalTrust"),links:[{label:o("links.platformUseGuidelines"),href:"/legal/platform-use-guidelines"},{label:o("links.petitionCommunityGuidelines"),href:"/legal/petition-community-guidelines"},{label:o("links.privacyPolicy"),href:"/privacy"},{label:o("links.termsOfService"),href:"/terms"},{label:o("links.cookiePolicy"),href:"/cookies"},{label:o("links.accessibility"),href:"/accessibility"},{label:o("links.security"),href:"/security"},{label:o("links.reportIssue"),href:"/report"},{label:o("links.moderationTransparency"),href:"/transparency"}]}],[o,i.footerStartHref,i.footerStartLabel,s,l,c]),g=[{icon:(0,t.jsx)(eK.default,{sx:{fontSize:19}}),href:"https://facebook.com/ardentafrica",label:"Facebook"},{icon:(0,t.jsx)(e7,{sx:{fontSize:17}}),href:"https://twitter.com/ardentafrica",label:"X"},{icon:(0,t.jsx)(eJ.default,{sx:{fontSize:19}}),href:"https://linkedin.com/company/ardentafrica",label:"LinkedIn"},{icon:(0,t.jsx)(eX.default,{sx:{fontSize:19}}),href:"https://instagram.com/ardentafrica",label:"Instagram"}];return(0,t.jsxs)(r.Box,{component:"footer",sx:{position:"relative",overflow:"hidden",borderTop:`1px solid ${f}`,backgroundColor:d,padding:{xs:"40px 16px",sm:"56px 24px",md:"64px 32px"},marginTop:"auto",color:"#f5f7fa"},children:[(0,t.jsx)(r.Box,{"aria-hidden":!0,sx:{position:"absolute",top:{xs:12,md:20},right:{xs:-10,md:24,lg:56},transform:"rotate(-6deg)",width:{xs:170,md:220,lg:250},height:{xs:170,md:220,lg:250},backgroundImage:"url(/ardent_africa_favicon_.png)",backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain",opacity:.04,pointerEvents:"none",zIndex:0}}),(0,t.jsxs)(r.Box,{sx:{position:"relative",zIndex:1,maxWidth:{xs:"100%",sm:"600px",md:"900px",lg:"1200px",xl:"1400px"},margin:"0 auto"},children:[(0,t.jsxs)(r.Box,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(2, 1fr)",md:"repeat(6, 1fr)"},gap:{xs:4,md:6}},children:[(0,t.jsx)(r.Box,{sx:{gridColumn:{xs:"1",sm:"1 / 3",md:"1 / 2"}},children:(0,t.jsxs)(y.Stack,{spacing:2,children:[(0,t.jsx)(r.Box,{component:es.Link,href:"/",sx:{dis
1play:"flex",alignItems:"center",textDecoration:"none",transition:"opacity 0.2s ease","&:hover":{opacity:.8}},children:(0,t.jsx)(ew.Logo,{variant:"full",size:48,forceDark:!0})}),(0,t.jsx)(v.Typography,{variant:"body2",sx:{fontFamily:'"Manrope", sans-serif',color:u,lineHeight:1.7,maxWidth:"300px"},children:o("brandBlurb")}),(0,t.jsxs)(y.Stack,{spacing:.75,sx:{maxWidth:"300px"},children:[(0,t.jsx)(v.Typography,{variant:"body2",sx:{fontFamily:'"Manrope", sans-serif',color:u,lineHeight:1.6,fontSize:"0.8125rem"},children:eN.ORG_CONTACT.fullAddress}),(0,t.jsx)(eg.Link,{href:`tel:${eN.ORG_CONTACT.phoneHref}`,sx:{fontFamily:'"Manrope", sans-serif',color:p,fontSize:"0.8125rem",textDecoration:"none","&:hover":{color:h}},children:eN.ORG_CONTACT.phone}),(0,t.jsx)(eg.Link,{href:`mailto:${eN.ORG_CONTACT.generalEmail}`,sx:{fontFamily:'"Manrope", sans-serif',color:p,fontSize:"0.8125rem",textDecoration:"none","&:hover":{color:h}},children:eN.ORG_CONTACT.generalEmail})]}),(0,t.jsx)(y.Stack,{direction:"row",spacing:1.25,sx:{mt:1},children:g.map((e,r)=>(0,t.jsx)(eg.Link,{href:e.href,target:"_blank",rel:"noopener noreferrer","aria-label":e.label,sx:{width:40,height:40,borderRadius:"12px",display:"flex",alignItems:"center",justifyContent:"center",color:u,backgroundColor:"rgba(255, 255, 255, 0.04)",border:`1px solid ${f}`,transition:"color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease","&:hover":{color:h,borderColor:h,backgroundColor:"rgba(221, 186, 125, 0.12)",transform:"translateY(-2px)"}},children:e.icon},r))})]})}),x.map((e,n)=>(0,t.jsx)(r.Box,{children:(0,t.jsxs)(y.Stack,{spacing:2,children:[(0,t.jsx)(v.Typography,{variant:"h6",sx:{fontFamily:'"Sora", sans-serif',fontWeight:600,color:h,fontSize:"0.78rem",letterSpacing:"0.08em",textTransform:"uppercase"},children:e.title}),(0,t.jsx)(y.Stack,{spacing:1.5,children:e.links.map(e=>(0,t.jsx)(eg.Link,{component:e.external?"a":es.Link,href:e.href,...e.external?{target:"_blank",rel:"noopener noreferrer"}:{},sx:{color:p,fontFamily:'"Manrope", sans-serif',fontWeight:400,fontSize:"0.875rem",textDecoration:"none",transition:"color 0.3s ease","&:hover":{color:h}},children:e.label},`${e.label}-${e.href}`))})]})},n))]}),(0,t.jsx)(b.Divider,{sx:{my:4,borderColor:f}}),(0,t.jsxs)(r.Box,{sx:{mb:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:[(0,t.jsx)(v.Typography,{variant:"body2",sx:{color:u,fontFamily:'"Manrope", sans-serif',opacity:.9,textAlign:"center",mb:1,fontWeight:500},children:o("paymentMethods")}),(0,t.jsx)(r.Box,{sx:{width:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:(0,t.jsx)(eQ.PaymentMethodLogos,{variant:"compact",showLabels:!1,size:56,flat:!0})})]}),(0,t.jsx)(r.Box,{"aria-hidden":!0,sx:{overflow:"hidden",textAlign:"center",pt:{xs:1.5,md:2.5},mt:{xs:1,md:2},mb:{xs:1,md:0}},children:(0,t.jsx)(r.Box,{component:"span",sx:{display:"inline-block",fontFamily:'"Sora", sans-serif',fontWeight:800,fontSize:{xs:"3.2rem",sm:"5.5rem",md:"8.5rem",lg:"11rem"},lineHeight:.95,letterSpacing:"-0.04em",whiteSpace:"nowrap",color:"transparent",WebkitTextStroke:"1.4px rgba(221, 186, 125, 0.45)",background:"linear-gradient(180deg, rgba(221,186,125,0.16), rgba(221,186,125,0))",WebkitBackgroundClip:"text",backgroundClip:"text",userSelect:"none"},children:"Ardent Africa"})}),(0,t.jsx)(b.Divider,{sx:{my:2,borderColor:f}}),(0,t.jsxs)(r.Box,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"center",sm:"flex-start"},gap:2},children:[(0,t.jsxs)(r.Box,{sx:{display:"flex",flexDirection:"column",gap:1,alignItems:{xs:"center",sm:"flex-start"}},children:[(0,t.jsxs)(r.Box,{sx:{display:"flex",flexWrap:"wrap",alignItems:"baseline",columnGap:1,rowGap:.5,justifyContent:{xs:"center",sm:"flex-start"}},children:[(0,t.jsx)(v.Typography,{variant:"body2",sx:{color:u,fontFamily:'"Manrope", sans-serif',textAlign:{xs:"center",sm:"left"}},children:o("copyright",{year:new Date().getFullYear()})}),(0,t.jsx)(eg.Link,{href:c,target:"_blank",rel:"noopener noreferrer",variant:"body2",sx:{color:u,fontFamily:'"Manrope", sans-serif',textDecoration:"none",whiteSpace:"nowrap","&:hover":{color:e.palette.secondary.main}},children:o("poweredBy")})]}),(0,t.jsx)(eg.Link,{href:"https://logo.dev",target:"_blank",rel:"noopener noreferrer",sx:{color:u,fontFamily:'"Manrope", sans-serif',fontSize:"0.75rem",textDecoration:"none","&:hover":{color:e.palette.secondary.main}},children:o("logosBy")}),(0,t.jsx)(e9,{entitySlug:"ardent-africa",color:u,hoverColor:h}),(0,t.jsx)(eS,{variant:"footer",color:p,hoverColor:h})]}),(0,t.jsxs)(r.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5,alignItems:{xs:"center",sm:"flex-end"}},children:[(0,t.jsxs)(y.Stack,{direction:"row",spacing:3,sx:{flexWrap:"wrap",justifyContent:{xs:"center",sm:"flex-end"}},children:[(0,t.jsx)(eg.Link,{component:es.Link,href:"/privacy",sx:{color:u,fontFamily:'"Manrope", sans-serif',fontSize:"0.875rem",textDecoration:"none","&:hover":{color:e.palette.secondary.main}},children:o("bottom.privacy")}),(0,t.jsx)(eg.Link,{component:es.Link,href:"/terms",sx:{color:u,fontFamily:'"Manrope", sans-serif',fontSize:"0.875rem",textDecoration:"none","&:hover":{color:e.palette.secondary.main}},children:o("bottom.terms")}),(0,t.jsx)(eg.Link,{component:es.Link,href:"/contact",sx:{color:u,fontFamily:'"Manrope", sans-serif',fontSize:"0.875rem",textDecoration:"none","&:hover":{color:e.palette.secondary.main}},children:o("bottom.support")}),(0,t.jsx)(eg.Link,{component:"button",onClick:()=>{window.dispatchEvent(new Event("openCookiePreferences"))}
1,sx:{color:u,fontFamily:'"Manrope", sans-serif',fontSize:"0.875rem",textDecoration:"none",background:"none",border:"none",cursor:"pointer","&:hover":{color:e.palette.secondary.main}},children:o("bottom.manageCookies")})]}),(0,t.jsx)(e5,{color:u,hoverColor:e.palette.secondary.main})]})]})]})]})}var tt=e.i(548606);function tr(){let{settings:e,loading:n}=(0,eZ.usePlatformSettings)();return n||!e.maintenance_banner?.trim()?null:(0,t.jsx)(r.Box,{sx:{bgcolor:"warning.light",color:"warning.contrastText",px:2,py:1,textAlign:"center",fontFamily:'"Manrope", sans-serif',fontSize:"0.875rem"},role:"status",children:(0,t.jsx)(tt.Alert,{severity:"warning",sx:{bgcolor:"transparent",color:"inherit",py:0,justifyContent:"center","& .MuiAlert-icon":{color:"inherit"}},children:e.maintenance_banner})})}function tn(){let{settings:e,loading:n}=(0,eZ.usePlatformSettings)();return n||!e.test_mode?null:(0,t.jsx)(r.Box,{sx:{bgcolor:e=>(0,ej.darkPanelSurface)(e.palette.mode,"#15292f"),color:"#DDBA7D",px:2,py:.75,textAlign:"center",fontFamily:'"Manrope", sans-serif',fontSize:"0.8125rem",fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase"},role:"status",children:"Test mode: transactions may use sandbox credentials"})}var to=e.i(583654),ta=e.i(91392),ti=e.i(197676),ts=e.i(793170),tl=e.i(816228),tc=e.i(285953),td=e.i(293582),tu=e.i(439587);let tp="ardent-africa-cookie-consent";function th(){try{let e=localStorage.getItem(tp);if(!e)return null;let t=JSON.parse(e);if("1.0"!==t.version)return null;return t}catch(e){return console.error("Error reading cookie preferences:",e),null}}function tm(e){try{let t=th(),r={essential:!0,analytics:e.analytics??t?.analytics??!1,functional:e.functional??t?.functional??!1,marketing:e.marketing??t?.marketing??!1,timestamp:Date.now(),version:"1.0"};localStorage.setItem(tp,JSON.stringify(r))}catch(e){console.error("Error saving cookie preferences:",e)}}function tf(){let e=(0,a.useTranslations)("cookieConsent");(0,m.useTheme)();let[o,i]=(0,n.useState)(!1),[l,c]=(0,n.useState)(!1),[d,u]=(0,n.use
1State)({essential:!0,analytics:!1,functional:!1,marketing:!1,timestamp:Date.now(),version:"1.0"});(0,n.useEffect)(()=>{let e=th();if(e)u(e);else{let e=setTimeout(()=>{i(!0)},1e3);return()=>clearTimeout(e)}},[]),(0,n.useEffect)(()=>{let e=()=>{let e=th();e&&u(e),c(!0),i(!0)};return window.addEventListener("openCookiePreferences",e),()=>{window.removeEventListener("openCookiePreferences",e)}},[]);let p=(e,t)=>{"essential"!==e&&u(r=>({...r,[e]:t}))};return o?(0,t.jsxs)(to.Dialog,{open:o,maxWidth:"sm",fullWidth:!0,onClose:()=>{},sx:{zIndex:e=>e.zIndex.modal+1},slotProps:{paper:{sx:{borderRadius:{xs:"20px 20px 0 0",sm:"16px"},position:"fixed",bottom:{xs:0,sm:24},right:{xs:0,sm:24},left:{xs:0,sm:"auto"},top:"auto",m:0,width:{xs:"100%",sm:"auto"},maxHeight:{xs:"90vh",sm:"85vh"},boxShadow:{xs:"0 -8px 32px rgba(0, 0, 0, 0.18)",sm:"0 8px 32px rgba(0, 0, 0, 0.12)"}}}},children:[(0,t.jsx)(ta.DialogContent,{sx:{p:{xs:3,sm:4},"&.MuiDialogContent-root":{paddingTop:{xs:3,sm:4}}},children:l?(0,t.jsxs)(y.Stack,{spacing:3,children:[(0,t.jsxs)(y.Stack,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between"},children:[(0,t.jsx)(v.Typography,{variant:"h6",sx:{fontFamily:'"Sora", sans-serif',fontWeight:600},children:e("preferencesTitle")}),(0,t.jsx)(s.Button,{size:"small",onClick:()=>c(!1),sx:{minWidth:"auto",p:1,color:"text.secondary"},children:(0,t.jsx)(k.default,{})})]}),(0,t.jsx)(b.Divider,{}),(0,t.jsx)(eA.Paper,{variant:"outlined",sx:{p:2,borderRadius:"16px",backgroundColor:"rgba(221, 186, 125, 0.05)"},children:(0,t.jsxs)(y.Stack,{spacing:1.5,children:[(0,t.jsxs)(y.Stack,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between"},children:[(0,t.jsxs)(y.Stack,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[(0,t.jsx)(td.default,{sx:{fontSize:20,color:"success.main"}}),(0,t.jsx)(v.Typography,{variant:"subtitle1",sx:{fontFamily:'"Sora", sans-serif',fontWeight:600},children:e("essentialTitle")})]}),(0,t.jsx)(tl.FormControlLabel,{control:(0,t.jsx)(ts.Switch,{checked:!0,disabled:!0}),label:"",sx:{m:0}})]}),(0,t.jsx)(v.Typography,{variant:"body2",sx:{fontFamily:'"Manrope", sans-serif',color:"text.secondary",lineHeight:1.6,pl:4},children:e("essentialDescription")})]})}),(0,t.jsx)(eA.Paper,{variant:"outlined",sx:{p:2,borderRadius:"16px"},children:(0,t.jsxs)(y.Stack,{spacing:1.5,children:[(0,t.jsxs)(y.Stack,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between"},children:[(0,t.jsx)(v.Typography,{variant:"subtitle1",sx:{fontFamily:'"Sora", sans-serif',fontWeight:600},children:e("analyticsTitle")}),(0,t.jsx)(tl.FormControlLabel,{control:(0,t.jsx)(ts.Switch,{checked:d.analytics,onChange:e=>p("analytics",e.target.checked)}),label:"",sx:{m:0}})]}),(0,t.jsx)(v.Typography,{variant:"body2",sx:{fontFamily:'"Manrope", sans-serif',color:"text.secondary",lineHeight:1.6},children:e("analyticsDescription")})]})}),(0,t.jsx)(eA.Paper,{variant:"outlined",sx:{p:2,borderRadius:"16px"},children:(0,t.jsxs)(y.Stack,{spacing:1.5,children:[(0,t.jsxs)(y.Stack,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between"},children:[(0,t.jsx)(v.Typography,{variant:"subtitle1",sx:{fontFamily:'"Sora", sans-serif',fontWeight:600},children:e("functionalTitle")}),(0,t.jsx)(tl.FormControlLabel,{control:(0,t.jsx)(ts.Switch,{checked:d.functional,onChange:e=>p("functional",e.target.checked)}),label:"",sx:{m:0}})]}),(0,t.jsx)(v.Typography,{variant:"body2",sx:{fontFamily:'"Manrope", sans-serif',color:"text.secondary",lineHeight:1.6},children:e("functionalDescription")})]})}),(0,t.jsx)(eA.Paper,{variant:"outlined",sx:{p:2,borderRadius:"16px"},children:(0,t.jsxs)(y.Stack,{spacing:1.5,children:[(0,t.jsxs)(y.Stack,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between"},children:[(0,t.jsx)(v.Typography,{variant:"subtitle1",sx:{fontFamily:'"Sora", sans-serif',fontWeight:600},children:e("marketingTitle")}),(0,t.jsx)(tl.FormControlLabel,{control:(0,t.jsx)(ts.Switch,{checked:d.marketing,onChange:e=>p("marketing",e.target.checked)}),label:"",sx:{m:0}})]}),(0,t.jsx)(v.Typography,{variant:"body2",sx:{fontFamily:'"Manrope", sans-serif',color:"text.secondary",lineHeight:1.6},children:e("marketingDescription")})]})}),(0,t.jsx)(r.Box,{sx:{p:2,borderRadius:"16px",backgroundColor:"warmGold.surface",border:"1px solid",borderColor:"warmGold.text"},children:(0,t.jsxs)(y.Stack,{direction:"row",spacing:1,sx:{alignItems:"flex-start"},children:[(0,t.jsx)(tu.default,{sx:{fontSize:20,color:"warmGold.text",mt:.25,flexShrink:0}}),(0,t.jsxs)(v.Typography,{variant:"body2",sx:{fontFamily:'"Manrope", sans-serif',color:"text.primary",lineHeight:1.6},children:["Learn more about how we use cookies in our"," ",(0,t.jsx)(eg.Link,{component:e6.default,href:"/cookies",sx:{color:"warmGold.text",fontWeight:600},children:"Cookie Policy"}),"."]})]})})]}):(0,t.jsxs)(y.Stack,{spacing:3,children:[(0,t.jsxs)(y.Stack,{direction:"row",spacing:2,sx:{alignItems:"center"},children:[(0,t.jsx)(r.Box,{sx:{p:1.5,borderRadius:"16px",backgroundColor:"warmGold.surface",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,t.jsx)(tc.default,{sx:{fontSize:32,color:"warmGold.text"}})}),(0,t.jsxs)(r.Box,{sx:{flex:1},children:[(0,t.jsx)(v.Typography,{variant:"h6",sx:{fontFamily:'"Sora", sans-serif',fontWeight:600,mb:.5},children:e("title")}),(0,t.jsx)(v.Typography,{variant:"body2",sx:{fontFamily:'"Manrope", sans-serif',color:"text.secondary"},children:e("subtitle")})]})]}),(0,t.jsx)(v.Typography,{variant:"body2",sx:{fontFamily:'"Manrope", sans-serif',color:"text.secondary",lineHeight:1.7},children:e.rich("body",{policyLink:e=>(0,t.jsx)(eg.Link,{component:e6.default,href:"/cookies",sx:{color:"warmGold.text",fontWeight:600},children:e})})})]})}),(0,t.jsx)(ti.DialogActions,{sx:{p:{xs:3,sm:3},pt:{xs:1,sm:2},flexDirection:{xs:"column",sm:"row"},gap:{xs:1,sm:2},alignItems:{xs:"stretch",sm:"center"},justifyContent:{xs:"stretch",sm:"flex-end"},"& > *":{flex:{xs:"0 0 auto",sm:"0 0 auto"},width:{xs:"100%",sm:"auto"}},"& > :not(:first-of-type)":{ml:0}},children:l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.Button,{variant:"outlined",onClick:()=>c(!1),fullWidth:!1,sx:{borderColor:"text.secondary",color:"text.primary",fontFamily:'"Manrope", sans-serif',textTransform:"none",fontWeight:500,order:{xs:2,sm:1},"&:hover":{borderColor:"text.primary",backgroundColor:"rgba(0, 0, 0, 0.04)"}},children:"Cancel"}),(0,t.jsx)(s.Button,{variant:"contained",onClick:()=>{tm(d),i(!1),window.location.reload()},fullWidth:!1,sx:{backgroundColor:"secondary.main",color:"secondary.c
1ontrastText",fontFamily:'"Manrope", sans-serif',textTransform:"none",fontWeight:600,order:{xs:1,sm:2},"&:hover":{backgroundColor:"secondary.dark"}},children:e("savePreferences")})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.Button,{variant:"outlined",startIcon:(0,t.jsx)(I.default,{}),onClick:()=>c(!0),fullWidth:!1,sx:{borderColor:"text.secondary",color:"text.primary",fontFamily:'"Manrope", sans-serif',textTransform:"none",fontWeight:500,order:{xs:1,sm:1},"&:hover":{borderColor:"secondary.main",backgroundColor:"rgba(221, 186, 125, 0.1)"}},children:e("customize")}),(0,t.jsx)(s.Button,{variant:"outlined",onClick:()=>{tm({essential:!0,analytics:!1,functional:!1,marketing:!1}),i(!1),window.location.reload()},fullWidth:!1,sx:{borderColor:"text.secondary",color:"text.primary",fontFamily:'"Manrope", sans-serif',textTransform:"none",fontWeight:500,order:{xs:2,sm:2},"&:hover":{borderColor:"text.primary",backgroundColor:"rgba(0, 0, 0, 0.04)"}},children:e("rejectNonEssential")}),(0,t.jsx)(s.Button,{variant:"contained",onClick:()=>{tm({essential:!0,analytics:!0,functional:!0,marketing:!0}),i(!1),window.location.reload()},fullWidth:!1,sx:{backgroundColor:"secondary.main",color:"secondary.contrastText",fontFamily:'"Manrope", sans-serif',textTransform:"none",fontWeight:600,order:{xs:3,sm:3},"&:hover":{backgroundColor:"secondary.dark"}},children:e("acceptAll")})]})})]}):null}var tx=e.i(7284),tg=e.i(584031),tb=e.i(381500),ty=e.i(12440),tv=e.i(908455),tj=e.i(771986);function tk(e){return(0,tj.default)("MuiFab",e)}let tS=(0,tv.default)("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]);var tw=e.i(711580),tC=e.i(731801),tI=e.i(279960),tT=e.i(867301),tL=e.i(367325),tE=e.i(423286);let tz=(0,tC.styled)(tb.default,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>(0,tw.default)(e)||"classes"===e,overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],t[`size${(0,ty.default)(r.size)}`],"inherit"===r.color&&t.colorInherit,t[(0,ty.default)(r.size)],t[r.color]]}})((0,tI.default)(({theme:e})=>({...e.typography.button,minHeight:36,...(0,tE.getTransitionStyles)(e,["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.grey[900]:e.palette.getContrastText?.(e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${tS.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},variants:[{props:{size:"small"},style:{width:40,height:40}},{props:{size:"medium"},style:{width:48,height:48}},{props:{variant:"extended"},style:{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48}},{props:{variant:"extended",size:"small"},style:{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,he
1ight:34}},{props:{variant:"extended",size:"medium"},style:{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40}},{props:{color:"inherit"},style:{color:"inherit"}}]})),(0,tI.default)(({theme:e})=>({variants:[...Object.entries(e.palette).filter((0,tT.default)(["dark","contrastText"])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),(0,tI.default)(({theme:e})=>({[`&.${tS.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),tM=n.forwardRef(function(e,r){let n=(0,tL.useDefaultProps)({props:e,name:"MuiFab"}),{children:o,className:a,color:i="default",component:s="button",disabled:l=!1,disableFocusRipple:c=!1,focusVisibleClassName:d,size:u="large",variant:p="circular",...h}=n,m={...n,color:i,component:s,disabled:l,disableFocusRipple:c,size:u,variant:p},f=(e=>{let{color:t,variant:r,classes:n,size:o}=e,a={root:["root",r,`size${(0,ty.default)(o)}`,"inherit"===t?"colorInherit":t]},i=(0,tg.default)(a,tk,n);return{...n,...i}})(m),{root:x,...g}=f;return(0,t.jsx)(tz,{className:(0,tx.default)(f.root,a),component:s,internalNativeButton:!0,disabled:l,focusRipple:!c,focusVisibleClassName:(0,tx.default)(f.focusVisible,d),ownerState:m,ref:r,...h,classes:g,children:o})});var tF=e.i(155246),t_=e.i(621984),tB=e.i(519257),tA=e.i(794409);function tW(){let e=(0,m.useTheme)(),[r,o]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let e=()=>{window.pageYOffset>300?o(!0):o(!1)};return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),(0,t.jsx)(tB.AnimatePresence,{children:r&&(0,t.jsx)(t_.motion.div,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{duration:.2},style:{position:"fixed",bottom:24,right:24,zIndex:1e3},className:"back-to-top-button",children:(0,t.jsx)(tM,{onClick:tA.scrollToTop,size:"medium","aria-label":"Scroll back to top",role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),(0,tA.scrollToTop)())},sx:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText,boxShadow:`0 4px 16px ${"dark"===e.palette.mode?"rgba(221, 186, 125, 0.4)":"rgba(221, 186, 125, 0.3)"}`,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{backgroundColor:e.palette.secondary.dark,transform:"translateY(-4px)",boxShadow:`0 8px 24px ${"dark"===e.palette.mode?"rgba(221, 186, 125, 0.5)":"rgba(221, 186, 125, 0.4)"}`},"&:active":{transform:"translateY(-2px)"}},children:(0,t.jsx)(tF.default,{})})})})}var tP=e.i(575846);function tR(){let e=(0,m.useTheme)(),r=(0,o.usePathname)(),n=(0,f.useMediaQuery)(e.breakpoints.down("md")),a=r?.startsWith("/widget"),i="/feedback"===r;return a||i||n?null:(0,t.jsx)(t_.motion.div,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{duration:.2},style:{position:"fixed",bottom:24,left:24,zIndex:1e3},className:"feedback-fab-button",children:(0,t.jsx)(tM,{component:e6.default,href:"/feedback",size:"medium","aria-label":"Share your feedback",role:"button",tabIndex:0,sx:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText,boxShadow:`0 4px 16px ${"dark"===e.palette.mode?"rgba(221, 186, 125, 0.4)":"rgba(221, 186, 125, 0.3)"}`,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{backgroundColor:e.palette.secondary.dark,transform:"translateY(-4px)",boxShadow:`0 8px 24px ${"dark"===e.palette.mode?"rgba(221, 186, 125, 0.5)":"rgba(221, 186, 125, 0.4)"}`},"&:active":{transform:"translateY(-2px)"}},children:(0,t.jsx)(tP.default,{})})})}var t$=e.i(712465);let tD={first_donation:{title:"First Donation",description:"You made your first donation! Thank you for supporting a cause.",color:"#4caf50"},first_campaign:{title:"Campaign Creator",description:"You created your first campaign! Start making an impact.",color:"#2196f3"},first_signature:{title:"First Signature",description:"You signed your first petition! Your voice matters.",color:"#00bcd4"},supporter_10:{title:"Active Supporter",description:"You've supported 10 campaigns! You're making a real difference.",color:"#ff9800"},supporter_50:{title:"Dedicated Supporter",description:"You've supported 50 campaigns! Your dedication is inspiring.",color:"#ff9800"},supporter_100:{title:"Champion Supporter",description:"You've supported 100 campaigns! You're a true champion of change.",color:"#ff9800"},donor_1000:{title:"Generous Donor",description:"You've donated over GHS 1,000! Your generosity is changing lives.",color:"#4caf50"},donor_5000:{title:"Major Donor",description:"You've donated over GHS 5,000! You're a major force for good.",color:"#4caf50"},campaign_goal:{title:"Goal Achiever",description:"Your campaign reached its goal! Congratulations on your success.",color:"#ff9800"},campaign_viral:{title:"Viral Campaign",description:"Your campaign reached 1,000 supporters! It's going viral!",color:"#f44336"}};function tO(){let{user:e}
1=(0,eI.useAuth)(),[o,a]=(0,n.useState)(null),[i,l]=(0,n.useState)(!1),[c,d]=(0,n.useState)(new Set);(0,n.useEffect)(()=>{if(!e)return;let t=(0,eD.createClient)(),r=async()=>{try{let{data:r,error:n}=await t.from("supporter_achievements").select("*").eq("user_id",e.id).order("earned_at",{ascending:!1}).limit(1);if(n)throw n;if(r&&r.length>0){let t=r[0];if(!t||!t.id||!t.earned_at)return void console.warn("Achievement missing required fields:",t);let n=`${e.id}-${t.id}`;if(!c.has(n))try{let e=new Date(t.earned_at);if(isNaN(e.getTime()))return void console.warn("Invalid earned_at date:",t.earned_at);(new Date().getTime()-e.getTime())/6e4<5&&(a(t),l(!0),d(e=>new Set([...e,n])))}catch(e){console.warn("Error parsing earned_at date:",t.earned_at,e)}}}catch(t){let e=t instanceof Error?t.message:t?.message??String(t);"Failed to fetch"===e||/network|connection closed|ERR_CONNECTION/i.test(e)||console.error("Error checking achievements:",e)}};r();let n=t.channel("achievements-channel").on("postgres_changes",{event:"INSERT",schema:"public",table:"supporter_achievements",filter:`user_id=eq.${e.id}`},t=>{let r=t.new;if(!r||!r.id||!r.earned_at)return void console.warn("Achievement from real-time subscription missing required fields:",r);let n=`${e.id}-${r.id}`;c.has(n)||(a(r),l(!0),d(e=>new Set([...e,n])))}).subscribe(),o=setInterval(r,3e4);return()=>{t.removeChannel(n),clearInterval(o)}},[e,c]);let u=()=>{l(!1)};if(!o)return null;let p=tD[o.achievement_key]||{title:o.achievement_key.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()),description:"Congratulations on unlocking this achievement!",color:"warmGold.text"};return(0,t.jsx)(tB.AnimatePresence,{children:i&&(0,t.jsx)(to.Dialog,{open:i,onClose:u,maxWidth:"sm",fullWidth:!0,sx:{zIndex:1400,"& .MuiDialog-container":{zIndex:1400},"& .MuiBackdrop-root":{backgroundColor:"rgba(0, 0, 0, 0.85)",backdropFilter:"blur(8px)",zIndex:1399}},slotProps:{paper:{sx:{borderRadius:"16px",background:e=>"dark"===e.palette.mode?e.palette.background.paper:"linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%)",border:`2px solid ${p.color}`,position:"relative",zIndex:1400,boxShadow:"0 8px 32px rgba(0, 0, 0, 0.4)",overflow:"hidden",isolation:"isolate"}}},children:(0,t.jsxs)(ta.DialogContent,{sx:{p:4,textAlign:"center",position:"relative",backgroundColor:"transparent",isolation:"isolate","& > *":{position:"relative",zIndex:1}},children:[(0,t.jsx)(s.Button,{onClick:u,sx:{position:"absolute",top:8,right:8,minWidth:"auto",width:32,height:32},children:(0,t.jsx)(k.default,{})}),(0,t.jsx)(t_.motion.div,{initial:{scale:0,rotate:-180},animate:{scale:1,rotate:0},transition:{type:"spring",stiffness:200,damping:15},children:(0,t.jsx)(r.Box,{sx:{width:120,height:120,borderRadius:"50%",backgroundColor:`${p.color}20`,display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px",border:`4px solid ${p.color}`},children:(0,t.jsx)(t$.default,{sx:{fontSize:64,color:p.color}})})}),(0,t.jsxs)(t_.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:[(0,t.jsx)(v.Typography,{variant:"h4",sx:{fontFamily:'"Sora", sans-serif',fontWeight:700,mb:2,color:p.color},children:"Achievement Unlocked!"}),(0,t.jsx)(v.Typography,{variant:"h5",sx:{fontFamily:'"Sora", sans-serif',fontWeight:600,mb:2},children:p.title}),(0,t.jsx)(v.Typography,{variant:"body1",sx:{color:"text.secondary",mb:4,lineHeight:1.7},children:p.description}),(0,t.jsxs)(y.Stack,{direction:"row",spacing:2,sx:{justifyContent:"center"},children:[(0,t.jsx)(s.Button,{variant:"contained",component:e6.default,href:"/dashboard/achievements",onClick:u,sx:{backgroundColor:p.color,color:"white",px:4,py:1.5,borderRadius:"999px","&:hover":{backgroundColor:p.color,opacity:.9}},children:"View All Achievements"}),(0,t.jsx)(s.Button,{variant:"outlined",onClick:u,sx:{borderColor:p.color,color:p.color,px:4,py:1.5,borderRadius:"999px","&:hover":{borderColor:p.color,backgroundColor:`${p.color}10`}},children:"Continue"})]})]})]})})})}var tH=e.i(746167),tN=e.i(68939),tV=e.i(352995);function tU(){let e=(0,a.useTranslations)("onboarding.interests"),{user:r}
1=(0,eI.useAuth)(),[o,i]=(0,n.useState)(!1),[l,c]=(0,n.useState)(!0),[d,u]=(0,n.useState)(!1),[p,h]=(0,n.useState)(!1);(0,n.useEffect)(()=>{r&&(async()=>{try{let e=(0,eD.createClient)(),{data:t}=await e.from("user_interests").select("categories").eq("user_id",r.id).single();t&&t.categories&&t.categories.length>0&&u(!0);let n=`has_seen_interests_prompt_${r.id}`,o="true"===localStorage.getItem(n);o&&h(!0),d||o||setTimeout(()=>{i(!0)},2e3)}catch(e){}finally{c(!1)}})()},[r,d,p]);let m=async(e=!1)=>{if(i(!1),!r)return;let t=`has_seen_interests_prompt_${r.id}`;localStorage.setItem(t,"true"),h(!0),e||setTimeout(()=>{(async()=>{let e=(0,eD.createClient)(),{data:t}=await e.from("user_interests").select("categories").eq("user_id",r.id).single();t&&t.categories&&t.categories.length>0&&u(!0)})()},1e3)};return l||!r||d||p?null:(0,t.jsxs)(to.Dialog,{open:o,onClose:()=>m(!0),maxWidth:"sm",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:"16px"}}},children:[(0,t.jsx)(tH.DialogTitle,{sx:{pb:2},children:(0,t.jsxs)(y.Stack,{direction:"row",sx:{justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsxs)(y.Stack,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[(0,t.jsx)(tN.default,{sx:{color:"warmGold.text"}}),(0,t.jsx)(v.Typography,{variant:"h6",sx:{fontFamily:'"Sora", sans-serif',fontWeight:600},children:e("title")})]}),(0,t.jsx)(s.Button,{onClick:()=>m(!0),"aria-label":e("close"),sx:{minWidth:"auto",p:.5},children:(0,t.jsx)(k.default,{})})]})}),(0,t.jsx)(ta.DialogContent,{children:(0,t.jsxs)(t_.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3},children:[(0,t.jsx)(v.Typography,{variant:"body1",sx:{color:"text.secondary",mb:3,fontFamily:'"Manrope", sans-serif'},children:e("body")}),(0,t.jsx)(tV.UserInterestsSelector,{onSave:()=>m(!1)})]})}),(0,t.jsx)(ti.DialogActions,{sx:{p:2,pt:1},children:(0,t.jsx)(s.Button,{onClick:()=>m(!0),variant:"outlined",sx:{borderColor:"divider",color:"text.secondary"},children:e("skip")})})]})}var tG=e.i(847651),tq=e.i(113513);let tY=(0,W.default)((0,t.jsx)("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"Pause");function tK(){(0,m.useTheme)().palette.mode;let{settings:e,loading:o}=(0,eZ.usePlatformSettings)(),i=(0,a.useTranslations)("common"),[s,c]=(0,n.useState)(!1);if(o||!e.testing_banner_enabled)return null;let d="#FFFFFF",u=(0,t.jsxs)(r.Box,{sx:{display:"inline-flex",alignItems:"center",gap:1,px:4,minWidth:"max-content"},children:[(0,t.jsx)(tG.default,{sx:{fontSize:20,flexShrink:0,color:d}}),(0,t.jsx)(v.Typography,{variant:"body2",sx:{fontFamily:'"Manrope", sans-serif',fontWeight:600,fontSize:{xs:"0.75rem",sm:"0.875rem"},color:d},children:"Platform Under Testing - All campaigns, petitions, and donations are for testing purposes only. Payment gateway is in test mode - no real money is being processed."}),(0,t.jsx)(eg.Link,{component:e6.default,href:"/feedback",sx:{color:d,textDecoration:"underline",fontWeight:700,ml:1,"&:hover":{color:"#FFE5EC",textDecoration:"underline"}},children:"Share your feedback with us →"})]});return(0,t.jsxs)(r.Box,{sx:{position:"relative",display:"flex",alignItems:"center",width:"100%",backgroundColor:"#BF124D",color:d,py:1,overflow:"hidden",zIndex:1100,borderBottom:"2px solid rgba(255, 255, 255, 0.2)"},role:"region","aria-label":i("testingBannerLabel"),children:[(0,t.jsx)(l.IconButton,{size:"small",onClick:()=>c(e=>!e),"aria-label":i(s?"resumeScrolling":"pauseScrolling"),sx:{flexShrink:0,ml:1,color:d,position:"relative",zIndex:1,backgroundColor:"#BF124D","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.16)"},"&:focus-visible":{outline:`2px solid ${d}`,outlineOffset:"2px"}},children:s?(0,t.jsx)(tq.default,{sx:{fontSize:18}}):(0,t.jsx)(tY,{sx:{fontSize:18}})}),(0,t.jsxs)(r.Box,{sx:{display:"flex",alignItems:"center",whiteSpace:"nowrap",animation:"scroll 40s linear infinite",animationPlayState:s?"paused":"running","&:hover":{animationPlayState:"paused"},"@media (prefers-reduced-motion: reduce)":{animation:"none",transform:"none"},"@keyframes scroll":{"0%":{transform:"translateX(0)"},"100%":{transform:"translateX(-50%)"}}},children:[u,(0,t.jsx)(r.Box,{inert:!0,sx:{display:"inline-flex"},children:u})]})]})}var tJ=e.i(463854),tX=e.i(627061),tQ=e.i(288903),tZ=e.i(996537),t0=e.i(896574),t0=t0,t1=e.i(823954);let t2=(0,W.default)((0,t.jsx)("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M6 9h12v2H6zm8 5H6v-2h8zm4-6H6V6h12z"}),"Chat");var t5=e.i(489723),t4=e.i(295671);let t3=(0,W.default)((0,t.jsx)("path",{d:"M20 9V7c0-1.1-.9-2-2-2h-3c0-1.66-1.34-3-3-3S9 3.34 9 5H6c-1.1 0-2 .9-2 2v2c-1.66 0-3 1.34-3 3s1.34 3 3 3v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c1.66 0 3-1.34 3-3s-1.34-3
1-3-3M7.5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S9.83 13 9 13s-1.5-.67-1.5-1.5M16 17H8v-2h8zm-1-4c-.83 0-1.5-.67-1.5-1.5S14.17 10 15 10s1.5.67 1.5 1.5S15.83 13 15 13"}),"SmartToy");var t6=e.i(794509);let t8=(0,W.default)((0,t.jsx)("path",{d:"M6 19h12v2H6z"}),"Minimize");var t9=e.i(715760);let t7="ardent_support_guest_token";function re(){localStorage.removeItem(t7)}function rt(){let e=localStorage.getItem(t7);return e?{"x-support-guest-token":e}:{}}async function rr(e){return t9.apiClient.post("/support/conversations",e)}async function rn(e){return t9.apiClient.get(`/support/conversations/${e}`,{headers:rt()})}async function ro(e){return t9.apiClient.get(`/support/conversations/${e}/messages`,{headers:rt()})}async function ra(e,t){return t9.apiClient.post(`/support/conversations/${e}/messages`,t,{headers:rt()})}async function ri(e){return t9.apiClient.post(`/support/conversations/${e}/request-human`,{},{headers:rt()})}async function rs(e,t){return t9.apiClient.patch(`/support/conversations/${e}`,t,{headers:rt()})}async function rl(t,r){let{createClient:n}=await e.A(90015),o=n(),{data:a}=await o.auth.getSession(),i={Accept:"application/json","x-client-type":"web"};a.session?.access_token&&(i.Authorization=`Bearer ${a.session.access_token}`);let s=await fetch(`${"https://core-api.ardent.africa".replace(/\/$/,"")}/support/conversations/${t}/upload`,{method:"POST",headers:i,body:r,credentials:"include"});if(!s.ok){let e=await s.json().catch(()=>({}));throw Error(e.message||e.error||"Request failed")}return s.json()}var rc=e.i(203176);let rd="ardent_chat_sounds_enabled",ru="/sounds/chat-incoming.mp3",rp=(0,n.createContext)(null);function rh({children:e}){let[r,o]=(0,n.useState)(!0);(0,n.useEffect)(()=>{o(function(){try{let e=window.localStorage.getItem(rd);if("false"===e)return!1}catch{}return!0}())},[]);let a=(0,n.useCallback)(e=>{o(e);try{window.localStorage.setItem(rd,String(e))}catch{}},[]),i=(0,n.useCallback)(()=>{o(e=>{let t=!e;try{window.localStorage.setItem(rd,String(t))}catch{}return t})},[]),s=(0,n.useMemo)(()=>({enabled:r,toggleEnabled:i,setEnabled:a}),[r,i,a]);return(0,t.jsx)(rp.Provider,{value:s,children:e})}function rm(){let e=(0,n.useContext)(rp);if(!e)throw Error("useChatSoundPreferences must be used within ChatSoundProvider");return e}function rf(){return(rf=Object.assign.bind()).apply(null,arguments)}var rx=["id","volume","playbackRate","soundEnabled","interrupt","onload"];let rg=function(t,r){var o=void 0===r?{}:r,a=o.volume,i=void 0===a?1:a,s=o.playbackRate,l=void 0===s?1:s,c=o.soundEnabled,d=void 0===c||c,u=o.interrupt,p=void 0!==u&&u,h=o.onload,m=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(o,rx),f=n.default.useRef(null),x=n.default.useRef(!1),g=n.default.useState(null),b=g[0],y=g[1],v=n.default.useState(null),j=v[0],k=v[1],S=function(){"function"==typeof h&&h.call(this),x.current&&y(1e3*this.duration()),k(this)};(0,n.useEffect)(function(){return e.A(636480).then(function(e){if(!x.current){var r;f.current=null!=(r=e.Howl)?r:e.default.Howl,x.current=!0,new f.current(rf({src:Array.isArray(t)?t:[t],volume:i,rate:l,onload:S},m))}}),function(){x.current=!1}},[]),n.default.useEffect(function(){f.current&&j&&k(new f.current(rf({src:Array.isArray(t)?t:[t],volume:i,onload:S},m)))},[JSON.stringify(t)]),n.default.useEffect(function(){j&&(j.volume(i),m.sprite||j.rate(l))},[j,i,l]);var w=n.default.useCallback(function(e){void 0===e&&(e={}),j&&(d||e.forceSoundEnabled)&&(p&&j.stop(),e.playbackRate&&j.rate(e.playbackRate),j.play(e.id))},[j,d,p]),C=n.default.useCallback(function(e){j&&j.stop(e)},[j]),I=n.default.useCallback(function(e){j&&j.pause(e)},[j]);return[w,{sound:j,stop:C,pause:I,duration:b}]};var rb=e.i(807643);function ry(){return"u"<typeof document||!document.hidden}function rv(){let{enabled:e}=rm(),[t]=rg(ru,{volume:.45,interrupt:!0,soundEnabled:e}),[r]=rg("/sounds/chat-queue.mp3",{volume:.55,interrupt:!0,soundEnabled:e}),o=(0,n.useCallback)(()=>{try{rb.Howler.ctx&&"suspended"===rb.Howler.ctx.state&&rb.Howler.ctx.resume()}catch{}},[]);return{enabled:e,notifyIncoming:(0,n.useCallback)(()=>{ry()&&t()},[t]),notifyQueue:(0,n.useCallback)(()=>{ry()&&r()},[r]),primeOnUserGesture:o}}var rj=e.i(564444),rk=e.i(861085);let rS=(0,W.default)((0,t.jsx)("path",{d:"M4.34 2.93 2.93 4.34 7.29 8.7 7 9H3v6h4l5 5v-6.59l4.18 4.18c-.65.49-1.38.88-2.18 1.11v2.06c1.34-.3 2.57-.92 3.61-1.75l2.05 2.05 1.41-1.41zM10 15.17 7.83 13H5v-2h2.83l.88-.88L10 11.41zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71m-7-8-1.88 1.88L12 7.76zm4.5 8c0-1.77-1.02-3.29-2.5-4.03v1.79l2.48 2.48c.01-.08.02-.16.02-.24"}),"VolumeOffOutlined"),rw=(0,W.default)((0,t.jsx)("path",{d:"M3 9v6h4l5 5V4L7 9zm7-.17v6.34L7.83 13H5v-2h2.83zM16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77"}),"VolumeUpOutlined");function rC({size:e="small",inverted:r=!1}){let n=(0,a.useTranslations)("nav"),{enabled:o,toggleEnabled:i}=rm(),[s]=rg(ru,{volume:.45,interrupt:!0});return(0,t.jsx)(rk.default,{title:n(o?"muteChatSounds":"unmuteChatSounds"),children:(0,t.jsx)(rj.default,{size:e,onClick:()=>{let e=!o;i(),e&&s({forceSoundEnabled:!0})},"aria-label":n(o?"muteChatSounds":"unmuteChatSounds"),"aria-pressed":o,sx:r?{color:"inherit",opacity:.92}:void 0,children:o?(0,t.jsx)(rw,{fontSize:e}):(0,t.jsx)(rS,{fontSize:e})})})}let rI="ardent_support_conversation_id",rT=/https?:\/\/[^\s<]+[^\s<.,;:!?'")\]}>]/g;function rL({text:e,className:r,linkClassName:n}){let o=function(e){let t;if(!e)return[];let r=[],n=0,o=new RegExp(rT.source,rT.flags);for(;null!==(t=o.exec(e));)t.index>n&&r.push({type:"text",value:e.slice(n,t.index)}),r.push({type:"link",value:t[0]}),n=t.index+t[0].length;return n<e.length&&r.push({type:"text",value:e.slice(n)}),r.length>0?r:[{type:"text",value:e}]}(e);return(0,t.jsx)("span",{className:r,children:o.map((e,r)=>"link"===e.type?(0,t.jsx)("a",{href:e.value,target:"_blank",rel:"noopener noreferrer",className:n,children:e.value},`${e.value}-${r}`):(0,t.jsx)("span",{children:e.value},`text-${r}`))})}function rE({onSubmit:e,isLoading:o}){let i=(0,a.useTranslations)("supportChatWidget"),[l,c]=(0,n.use
1State)(""),[d,u]=(0,n.useState)(""),[p,h]=(0,n.useState)(""),[m,f]=(0,n.useState)({});return(0,t.jsxs)(r.Box,{component:"form",onSubmit:t=>{t.preventDefault();let r={};(l.trim()||(r.name=i("guestForm.errors.nameRequired")),d.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(d)||(r.email=i("guestForm.errors.emailInvalid")):r.email=i("guestForm.errors.emailRequired"),p.trim()?/^[+]?[\d\s()-]{7,}$/.test(p.trim())||(r.phone=i("guestForm.errors.phoneInvalid")):r.phone=i("guestForm.errors.phoneRequired"),Object.keys(r).length>0)?f(r):e({name:l.trim(),email:d.trim(),phone:p.trim()})},sx:{p:2},children:[(0,t.jsx)(v.Typography,{variant:"body1",sx:{mb:2,fontWeight:500},children:i("guestForm.intro")}),(0,t.jsxs)(y.Stack,{spacing:2,children:[(0,t.jsx)(tJ.TextField,{label:i("guestForm.nameLabel"),value:l,onChange:e=>c(e.target.value),error:!!m.name,helperText:m.name,size:"small",fullWidth:!0,disabled:o}),(0,t.jsx)(tJ.TextField,{label:i("guestForm.emailLabel"),type:"email",value:d,onChange:e=>u(e.target.value),error:!!m.email,helperText:m.email,size:"small",fullWidth:!0,disabled:o}),(0,t.jsx)(tJ.TextField,{label:i("guestForm.phoneLabel"),type:"tel",value:p,onChange:e=>h(e.target.value),error:!!m.phone,helperText:m.phone,placeholder:i("guestForm.phonePlaceholder"),size:"small",fullWidth:!0,disabled:o}),(0,t.jsx)(s.Button,{type:"submit",variant:"contained",disabled:o,sx:{borderRadius:"16px"},children:o?(0,t.jsx)(tZ.CircularProgress,{size:20}):i("guestForm.submit")})]})]})}function rz({message:e,isUser:n,currentUserProfile:o}){let i=(0,m.useTheme)(),l=(0,a.useTranslations)("supportChatWidget"),c=(()=>{switch(e.sender_type){case"ai":return{name:l("sender.ai"),icon:(0,t.jsx)(t3,{fontSize:"small"}),color:i.palette.primary.main,avatarUrl:null};case"admin":return{name:e.sender_profile?.full_name||l("sender.agent"),icon:(0,t.jsx)(t6.default,{fontSize:"small"}),color:i.palette.success.main,avatarUrl:e.sender_profile?.avatar_url||null};case"system":return{name:l("sender.system"),icon:(0,t.jsx)(tu.default,{fontSize:"small"}),color:i.palette.grey[500],avatarUrl:null};default:return{name:o?.full_name||l("sender.you"),icon:(0,t.jsx)(w.default,{fontSize:"small"}),color:i.palette.secondary.main,avatarUrl:o?.avatar_url||e.sender_profile?.avatar_url||null}}})();return"system"===e.sender_type?(0,t.jsx)(r.Box,{sx:{textAlign:"center",my:1},children:(0,t.jsx)(tQ.Chip,{size:"small",label:e.content,sx:{bgcolor:e=>"dark"===e.palette.mode?"rgba(255,255,255,0.08)":"#EEEFF2",color:"text.secondary",fontSize:"0.75rem",maxWidth:"100%",height:"auto","& .MuiChip-label":{whiteSpace:"normal",py:.5}}})}):(0,t.jsxs)(r.Box,{sx:{display:"flex",flexDirection:n?"row-reverse":"row",alignItems:"flex-end",gap:1,mb:1.5},children:[(0,t.jsx)(tX.Avatar,{src:c.avatarUrl||void 0,sx:{width:28,height:28,bgcolor:c.color,fontSize:"0.75rem"},children:!c.avatarUrl&&c.icon}),(0,t.jsxs)(r.Box,{sx:{maxWidth:"75%",bgcolor:n?"primary.main":e=>"dark"===e.palette.mode?e.palette.background.paper:"#FFFFFF",color:n?"primary.contrastText":"text.primary",border:n?"none":"1px solid",borderColor:n?"transparent":"divider",borderRadius:"16px",borderBottomRightRadius:2*!n,borderBottomLeftRadius:2*!!n,px:1.5,py:1,boxShadow:"0 1px 2px rgba(0,0,0,0.1)"},children:[!n&&(0,t.jsx)(v.Typography,{variant:"caption",sx:{fontWeight:600,display:"block",mb:.5},children:c.name}),(0,t.jsx)(v.Typography,{variant:"body2",sx:{whiteSpace:"pre-wrap",wordBreak:"break-word","& a.support-chat-link":{color:n?"inherit":"primary.main",textDecoration:"underline",fontWeight:500,"&:hover":{opacity:.85}}},children:(0,t.jsx)(rL,{text:e.content,linkClassName:"support-chat-link"})}),e.file_url&&(0,t.jsx)(r.Box,{sx:{mt:1},children:e.file_type?.startsWith("image/")?(0,t.jsx)(r.Box,{component:"img",src:e.file_url,alt:l("message.attachmentAlt"),sx:{maxWidth:"100%",borderRadius:"12px",maxHeight:200}}):(0,t.jsx)(s.Button,{size:"small",variant:"outlined",href:e.file_url,target:"_blank",sx:{color:n?"inherit":"primary.main",borderColor:n?"rgba(255,255,255,0.5)":"primary.main"},children:l("message.viewAttachment")})}
1),(0,t.jsx)(v.Typography,{variant:"caption",sx:{display:"block",mt:.5,opacity:.7,fontSize:"0.65rem"},children:new Date(e.created_at).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})}function rM(){let e=(0,a.useTranslations)("supportChatWidget"),{settings:o}=(0,eZ.usePlatformSettings)(),[i,c]=(0,n.useState)(!1),[d,u]=(0,n.useState)(""),[p,h]=(0,n.useState)(!1),x=(0,n.useRef)(null),g=(0,n.useRef)(!0),b=(0,n.useRef)(null),[j,S]=(0,n.useState)(!1),w=(e="auto")=>{let t=x.current;t&&t.scrollTo({top:t.scrollHeight,behavior:e})},{user:C}=(0,eI.useAuth)(),I=(0,m.useTheme)(),T=(0,f.useMediaQuery)(I.breakpoints.down("sm")),{conversation:L,messages:E,currentUserProfile:z,isLoading:M,isSending:F,error:_,isOtherTyping:B,reportTyping:A,startConversation:W,sendMessage:P,requestHuman:R,closeConversation:$,uploadFile:D,clearError:O}=function(){let[e,t]=(0,n.useState)(null),[r,o]=(0,n.useState)([]),[a,i]=(0,n.useState)(null),[s,l]=(0,n.useState)(!1),[c,d]=(0,n.useState)(!1),[u,p]=(0,n.useState)(null),[h,m]=(0,n.useState)(!1),f=(0,eD.createClient)(),x=(0,n.useRef)(null),g=(0,n.useRef)(null),{notifyIncoming:b}=rv(),y=(0,n.useRef)(b);(0,n.useEffect)(()=>{y.current=b},[b]);let v=(0,n.useCallback)(e=>{o(t=>new Set(t.map(e=>e.id)).has(e.id)?t:(("admin"===e.sender_type||"ai"===e.sender_type)&&y.current(),[...t.filter(t=>!t.id.startsWith("temp-")||t.sender_type!==e.sender_type||t.content!==e.content),e]))},[]);(0,n.useEffect)(()=>{(async()=>{let{data:{user:e}}=await f.auth.getUser();if(e){let{data:t}=await f.from("profiles").select("id, full_name, avatar_url").eq("id",e.id).single();t&&i(t)}})()},[f]),(0,n.useEffect)(()=>((async()=>{let e=localStorage.getItem(rI);if(e)try{let r=await rn(e);r.conversation&&"closed"!==r.conversation.status?(t(r.conversation),await j(e),k(e)):(localStorage.removeItem(rI),re())}catch(e){console.error("Error loading conversation:",e),localStorage.removeItem(rI),re()}})(),()=>{x.current&&f.removeChannel(x.current),g.current&&(g.current.close(),g.current=null)}),[]);let j=async e=>{try{let t=(await ro(e)).messages||[];o(e=>e.length===t.length&&e.every((e,r)=>e.id===t[r]?.id&&e.content===t[r]?.content&&e.created_at===t[r]?.created_at)?e:t)}catch(e){console.error("Error fetching messages:",e)}},k=(0,n.useCallback)(async e=>{x.current&&(f.removeChannel(x.current),x.current=null),g.current&&(g.current.close(),g.current=null);let{data:{user:r}}=await f.auth.getUser();if(!r){let r=new EventSource(`/api/support/conversations/${e}/events`);r.addEventListener("message",e=>{try{let t=JSON.parse(e.data);v(t)}catch(e){console.error("Error parsing support SSE message:",e)}}),r.addEventListener("conversation",e=>{try{let r=JSON.parse(e.data);t(e=>e?{...e,...r}:null)}catch(e){console.error("Error parsing support SSE conversation:",e)}}),r.onerror=()=>{},g.current=r;return}let n=f.channel(`support-conv-${e}`).on("postgres_changes",{event:"INSERT",schema:"public",table:"support_messages",filter:`conversation_id=eq.${e}`},e=>{v(e.new)}).on("postgres_changes",{event:"UPDATE",schema:"public",table:"support_conversations",filter:`id=eq.${e}`},e=>{let r=e.new;t(e=>e?{...e,...r}:null)}).on("presence",{event:"sync"},()=>{let e=n.presenceState(),t=!1;Object.values(e).forEach(e=>{e.forEach(e=>{"admin"===e.role&&e.typing&&(t=!0)})}),m(t)}).subscribe(async e=>{"SUBSCRIBED"===e&&await n.track({typing:!1,role:"user"})});x.current=n},[f,v]);(0,n.useEffect)(()=>{if(!e||"closed"===e.status)return;let t=setInterval(async()=>{document.hidden||await j(e.id)},5e3);return()=>clearInterval(t)},[e?.id,e?.status]);let S=(0,n.useCallback)(e=>{x.current&&x.current.track({typing:e,role:"user"})},[]),w=async n=>{if(!e||!n.trim())return;d(!0),p(null);let a=`temp-${Date.now()}`,i={id:a,conversation_id:e.id,sender_type:"user",sender_id:null,content:n.trim(),created_at:new Date().toISOString()};o(e=>[...e,i]);try{let i=await ra(e.id,{content:n.trim()});o(e=>{let t=e.filter(e=>e.id!==a),r=[],n=i.userMessage,o=i.aiMessage;return n&&!t.some(e=>e.id===n.id)&&r.push(n),o&&!t.some(e=>e.id===o.id)&&r.push(o),[...t,...r]}),i.aiMessage&&!r.some(e=>e.id===i.aiMessage.id)&&y.current(),i.shouldHandover&&t(e=>e?{...e,status:"waiting"}:null)}catch(e){o(e=>e.filter(e=>e.id!==a)),p((0,rc.isApiError)(e)?e.message:"Failed to send message")}finally{d(!1)}},C=async()=>
1{if(e){l(!0),p(null);try{await ri(e.id),t(e=>e?{...e,status:"waiting"}:null)}catch(e){p((0,rc.isApiError)(e)?e.message:"Failed to request human agent")}finally{l(!1)}}},I=async()=>{if(e){l(!0);try{await rs(e.id,{status:"closed"}),t(null),o([]),localStorage.removeItem(rI),x.current&&(f.removeChannel(x.current),x.current=null),g.current&&(g.current.close(),g.current=null)}catch(e){console.error("Error closing conversation:",e)}finally{l(!1)}}},T=async(t,r)=>{if(!e||"live"!==e.status)return void p("File uploads are only available when connected to a human agent");d(!0),p(null);try{let n=new FormData;n.append("file",t),r&&n.append("message",r),await rl(e.id,n)}catch(e){p((0,rc.isApiError)(e)?e.message:"Failed to upload file")}finally{d(!1)}};return{conversation:e,messages:r,currentUserProfile:a,isLoading:s,isSending:c,error:u,isOtherTyping:h,reportTyping:S,startConversation:async e=>{l(!0),p(null);try{var r;let n={metadata:{source_instance:"platform",userAgent:navigator.userAgent,url:window.location.href,timestamp:new Date().toISOString()}};e&&(n.guest_info={name:e.name,email:e.email,phone:e.phone},localStorage.setItem("ardent_support_guest_info",JSON.stringify(e)));let o=await rr(n);if(!o.conversation)throw Error("Failed to start conversation");t(o.conversation),localStorage.setItem(rI,o.conversation.id),(r=o.guestToken)&&localStorage.setItem(t7,r),await j(o.conversation.id),k(o.conversation.id)}catch(e){p((0,rc.isApiError)(e)?e.message:"Failed to start conversation")}finally{l(!1)}},sendMessage:w,requestHuman:C,closeConversation:I,uploadFile:T,clearError:()=>p(null)}}(),{primeOnUserGesture:H}=rv(),N=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(!g.current){E.length>0&&S(!0);return}w(E.length<=1?"auto":"smooth"),S(!1)},[E]),(0,n.useEffect)(()=>{g.current&&w("auto")},[F,B]),(0,n.useEffect)(()=>{i&&L&&(g.current=!0,requestAnimationFrame(()=>w("auto")))},[i,L?.id]);let V=()=>{H(),c(!0),L||(C?W():h(!0))};(0,n.useEffect)(()=>{let e=()=>V();return window.addEventListener("ardent:open-support-chat",e),()=>window.removeEventListener("ardent:open-support-chat",e)},[V]);let U=()=>{d.trim()&&!F&&(g.current=!0,S(!1),A(!1),P(d),u(""))},G=(()=>{if(!L)return null;switch(L.status){case"ai":return{label:e("status.ai"),color:"primary"};case"waiting":return{label:e("status.waiting"),color:"warning"};case"live":return{label:e("status.live"),color:"success"};case"closed":return{label:e("status.closed"),color:"default"};default:return null}})();return o.support_chat_enabled?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tB.AnimatePresence,{children:!i&&(0,t.jsx)(t_.motion.div,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},style:{position:"fixed",bottom:96,right:24,zIndex:1300},children:(0,t.jsx)(eb.Tooltip,{title:e("launcher.tooltip"),placement:"left",children:(0,t.jsxs)(r.Box,{sx:{position:"relative",width:60,height:60},children:[(0,t.jsx)(r.Box,{component:t_.motion.span,"aria-hidden":!0,animate:{scale:[1,1.8],opacity:[.28,0]},transition:{duration:2.8,repeat:1/0,ease:"easeOut",repeatDelay:.4},sx:{position:"absolute",inset:0,borderRadius:"50%",backgroundColor:"#DE1A58",pointerEvents:"none"}}),(0,t.jsx)(t1.Badge,{badgeContent:L?.status==="waiting"?"!":0,color:"warning",overlap:"circular",children:(0,t.jsx)(tM,{onClick:V,"aria-label":e("launcher.ariaLabel"),sx:{width:60,height:60,backgroundColor:"#DE1A58",color:"#fff",boxShadow:"0 6px 22px rgba(222,26,88,0.4)",position:"relative",zIndex:1,transition:"transform 0.2s ease","&:hover":{backgroundColor:"#c0174d",transform:"scale(1.05)"}},children:(0,t.jsx)(t2,{})})}),L?.status!=="waiting"&&(0,t.jsx)(r.Box,{"aria-hidden":!0,sx:{position:"absolute",top:1,right:1,width:14,height:14,borderRadius:"50%",backgroundColor:"#22C55E",border:"2px solid #fff",zIndex:2}})]})})})}),(0,t.jsx)(t0.default,{direction:"up",in:i,mountOnEnter:!0,unmountOnExit:!0,children:(0,t.jsxs)(eA.Paper,{elevation:8,sx:{position:"fixed",bottom:24*!T,right:24*!T,width:T?"100%":440,height:T?"100%":720,maxHeight:T?"100vh":"calc(100vh - 48px)",borderRadius:T?0:"16px",overflow:"hidden",display:"flex",flexDirection:"column",zIndex:1300},children:[(0,t.jsxs)(r.Box,{sx:{bgcolor:e=>(0,ej.darkPanelSurface)(e.palette.mode,"#15292f"),color:"#FFFFFF",px:2,py:1.75,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[(0,t.jsxs)(r.Box,{sx:{display:"flex",alignItems:"center",gap:1.25,minWidth:0},children:[(0,t.jsx)(tX.Avatar,{sx:{bgcolor:"rgba(255,255,255,0.15)",width:38,height:38},children:(0,t.jsx)(t6.default,{})}),(0,t.jsxs)(r.Box,{sx:{minWidth:0},children:[(0,t.jsx)(v.Typography,{variant:"subtitle1",sx:{fontFamily:'"Sora", sans-serif',fontWeight:700,lineHeight:1.2},children:e("header.title",{brand:"Ardent Africa"})}),(0,t.jsxs)(y.Stack,{direction:"row",spacing:.75,sx:{alignItems:"center",mt:.375},children:[(0,t.jsx)(r.Box,{sx:{width:7,height:7,borderRadius:"50%",flexShrink:0,bgcolor:G&&"success"!==G.color?"#FBBF24":"#4ADE80"}}),(0,t.jsx)(v.Typography,{variant:"caption",sx:{opacity:.85,whiteSpace:"nowrap"},children:G?.label??e("status.ai")})]})]})]}),(0,t.jsxs)(y.Stack,{direction:"row",spacing:.25,sx:{alignItems:"center",flexShrink:0},children:[(0,t.jsx)(rC,{inverted:!0}),(0,t.jsx)(l.IconButton,{size:"small",onClick:()=>c(!1),sx:{color:"inherit"},children:T?(0,t.jsx)(k.default,{}):(0,t.jsx)(t8,{})})]})]}),(0,t.jsxs)(r.Box,{sx:{flex:1,overflow:"hidden",display:"flex",flexDirection:"column"},children:[_&&(0,t.jsx)(tt.Alert,{severity:"error",onClose:O,sx:{m:1,py:0},children:_}),p&&!L&&(0,t.jsx)(rE,{onSubmit:e=>{h(!1),W(e)},isLoading:M}),M&&!L&&!p&&(0,t.jsx)(r.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",flex:1},children:(0,t.jsx)(tZ.CircularProgress,{})}),L&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(r.Box,{sx:{flex:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"},children:[(0,t.jsxs)(r.Box,{ref:x,onScroll:()=>{let e=x.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight<=64;g.current=t,S(!t)},sx:{flex:1,overflow:"auto",p:2,bgcolor:e=>"dark"===e.palette.mode?e.palette.background.default:"#F7F7F9",display:"flex",flexDirection:"column"},children:[E.map(e=>(0,t.jsx)(rz,{message:e,isUser:"user"===e.sender_type,currentUserProfile:z},e.id)),"live"===L.status&&B&&(0,t.jsx)(r.Box,{sx:{display:"flex",alignItems:"center",gap:1,py:.5,px:1.5},children:(0,t.jsx)(v.Typography,{variant:"caption",sx:{color:"text.secondary",fontStyle:"italic"},children:e("typing")})}),F&&(0,t.jsx)(r.Box,{sx:{display:"flex",justifyContent:"center",py:1},children:(0,t.jsx)(tZ.CircularProgress,{size:20})})]}),j&&(0,t.jsx)(s.Button,{size:"small",variant:"contained",onClick:()=>{g.current=!0,w("smooth"),S(!1)},sx:{position:"absolute",bottom:12,left:"50%",transform:"translateX(-50%)",borderRadius:"999px",px:2,py:.5,minHeight:32,fontSize:"0.75rem",boxShadow:2,textTransform:"none",zIndex:1},children:e("jumpToLatest")})]}),"ai"===L.status&&(0,t.jsx)(r.Box,{sx:{px:2,py:.75,bgcolor:e=>"dark"===e.palette.mode?e.palette.background.paper:"#FFFFFF",borderTop:"1px solid",borderColor:"divider",display:"flex",justifyContent:"center"},children:(0,t.jsx)(s.Button,{size:"small",variant:"text",onClick:R,disabled:M,startIcon:(0,t.jsx)(t6.default,{sx:{fontSize:18}}),sx:{color:"text.secondary",textTransform:"none",fontWeight:600,"&:hover":{bgcolor:"action.hover"}},children:e("talkToHuman")})}),"closed"!==L.status&&(0,t.jsxs)(r.Box,{sx:{p:1.5,bgcolor:e=>"dark"===e.palette.mode?e.palette.background.paper:"#FFFFFF",borderTop:"1px solid",borderColor:"divider",display:"flex",gap:1,alignItems:"flex-end"},children:["live"===L.status&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("input",{type:"file",ref:b,onChange:e=>{let t=e.target.files?.[0];t&&D(t),b.current&&(b.current.value="")},accept:"image/*,application/pdf",style:{display:"none"}}),(0,t.jsx)(l.IconButton,{size:"small",onClick:()=>b.current?.click(),disabled:F,children:(0,t.jsx)(t4.default,{})})]}),(0,t.jsx)(tJ.TextField,{fullWidth:!0,size:"small",placeholder:e("inputPlaceholder"),value:d,onChange:e=>{u(e.target.value),L?.status==="live"&&(A(!0),N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{A(!1),N.current=null},2e3))},onKeyPress:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),U())},disabled:F||"waiting"===L.status,multiline:!0,maxRows:3,sx:{"& .MuiOutlinedInput-root":{borderRadius:"16px",bgcolor:e=>"dark"===e.palette.mode?"rgba(255,255,255,0.05)":"#F4F4F6","& fieldset":{borderColor:"divider"},"&:hover fieldset":{borderColor:"text.secondary"}}}}),(0,t.jsx)(l.IconButton,{color:"primary",onClick:U,disabled:!d.trim()||F||"waiting"===L.status,children:(0,t.jsx)(t5.default,{})})]}),"closed"===L.status&&(0,t.jsxs)(r.Box,{sx:{p:2,bgcolor:e=>"dark"===e.palette.mode?e.palette.background.paper:"#FFFFFF",borderTop:"1px solid",borderColor:"divider"},children:[(0,t.jsx)(v.Typography,{variant:"body2",sx:{color:"text.secondary",textAlign:"center",mb:1},children:e("closed.notice")}),(0,t.jsx)(s.Button,{variant:"outlined",fullWidth:!0,onClick:()=>{$(),C?W():h(!0)},children:e("closed.startNew")})]})]})]})]})})]}):null}e.s(["GlobalLayout",0,function({children:e}){let i=(0,o.usePathname)(),s=(0,a.useTranslations)("common")("skipToContent"),l=i?.startsWith("/widget");return((0,n.useEffect)(()=>{let e,t;l||(e=th(),e?.analytics?void 0!==window.gtag&&window.gtag("consent","update",{analytics_storage:"granted"}):void 0!==window.gtag&&window.gtag("consent","update",{analytics_storage:"denied"}),t=th(),t?.marketing?void 0!==window.fbq&&window.fbq("consent","grant"):void 0!==window.fbq&&window.fbq("consent","revoke"))},[l]),l)?(0,t.jsx)(t.Fragment,{children:e}):(0,t.jsx)(eC.AccountContextProvider,{children:(0,t.jsxs)(r.Box,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",position:"relative",overflow:"visible"},children:[(0,t.jsx)(r.Box,{component:"a",href:"#main-content",sx:{position:"absolute",left:8,top:-100,zIndex:e
1=>e.zIndex.tooltip+1,px:2.5,py:1.5,borderRadius:"12px",bgcolor:"background.paper",color:"text.primary",border:"2px solid",borderColor:"primary.main",fontFamily:'"Manrope", sans-serif',fontWeight:600,fontSize:"0.9375rem",textDecoration:"none",transition:"top 0.15s ease-in-out","@media (prefers-reduced-motion: reduce)":{transition:"none"},"&:focus":{top:8}},children:s}),(0,t.jsx)(eq,{}),(0,t.jsx)(tr,{}),(0,t.jsx)(tn,{}),(0,t.jsx)(tK,{}),(0,t.jsx)(r.Box,{component:"main",id:"main-content",tabIndex:-1,sx:{flex:1,width:"100%",position:"relative",outline:"none"},children:e}),(0,t.jsx)(te,{}),(0,t.jsx)(tf,{}),(0,t.jsx)(tW,{}),(0,t.jsx)(tR,{}),(0,t.jsx)(tO,{}),(0,t.jsx)(tU,{}),(0,t.jsx)(rh,{children:(0,t.jsx)(rM,{})})]})})}],371680)},605477,e=>{"use strict";var t=e.i(632165),r=e.i(126574);e.s(["AppSnackbarProvider",0,function({children:e}){return(0,t.jsx)(r.SnackbarProvider,{maxSnack:3,anchorOrigin:{vertical:"bottom",horizontal:"center"},autoHideDuration:5e3,children:e})}])},142458,e=>{"use strict";var t=e.i(205729),r=e.i(621664),n=e.i(456904),o=e.i(160889),a=e.i(977324),i=e.i(920755),s=e.i(337203);e.s(["LocalePreferenceSync",0,function(){let e=(0,r.useLocale)(),{user:l}=(0,a.useAuth)(),c=(0,n.useRouter)(),d=(0,n.usePathname)(),u=(0,t.useRef)(!1);return(0,t.useEffect)(()=>{if(!l?.id)return;let t=`pl-sync:${l.id}:${e}`;try{if(sessionStorage.getItem(t))return}catch{}(0,i.createClient)().from("profiles").update({preferred_locale:e}).eq("id",l.id).then(()=>{try{sessionStorage.setItem(t,"1")}catch{}},()=>{})},[l?.id,e]),(0,t.useEffect)(()=>{if(!l?.id||u.current)return;let t=!1;return(async()=>{try{let r=(0,i.createClient)(),{data:n}=await r.from("profiles").select("preferred_locale, locale_chosen_at").eq("id",l.id).maybeSingle();if(t||!n?.locale_chosen_at)return;let a=n.preferred_locale;if(!a||a===e||!o.routing.locales.includes(a))return;u.current=!0,(0,s.writeLocaleCookie)(a),c.replace(d,{locale:a})}catch{}})(),()=>{t=!0}},[l?.id,e,c,d]),null}])},377294,e=>{"use strict";var t=e.i(632165),r=e.i(205729);let n=r.createContext(null);function o(){return r.useContext(n)}let a="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",i=function(e){let{children:i,theme:s}=e,l=o(),c=r.useMemo(()=>{var e,t;let r=null===l?{...s}:(e=l,"function"==typeof(t=s)?t(e):{...e,...t});return null!=r&&(r[a]=null!==l),r},[s,l]);return(0,t.jsx)(n.Provider,{value:c,children:i})};var s=e.i(218779),l=e.i(485857),c=e.i(12484),d=e.i(960575),u=e.i(800599),p=e.i(451133),h=e.i(70069);let m={};function f(e,t,n,o=!1){return r.useMemo(()=>{let r=e&&t[e]||t;if("function"==typeof n){let a=n(r),i=e?{...t,[e]:a}:a;return o?()=>i:i}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,o])}let x=function(e){let{children:r,theme:n,themeId:a}=e,x=(0,l.default)(m),g=o()||m,b=f(a,x,n),y=f(a,g,n,!0),v="rtl"===(a?b[a]:b).direction,j=function(e){let r=(0,l.default)(),n=(0,p.default)()||"",{modularCssLayers:o}=e,a="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return(a=o&&null===r?"string"==typeof o?o.replace(/mui(?!\.)/g,a):`@layer ${a};`:"",(0,u.default)(()=>{let e=document.querySelector("head");if(!e)return;let t=e.firstChild;if(a){if(t&&t.hasAttribute?.("data-mui-layer-order")&&t.getAttribute("data-mui-layer-order")===n)return;let r=document.createElement("style");r.setAttribute("data-mui-layer-order",n),r.textContent=a,e.prepend(r)}else e.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[a,n]),a)?(0,t.jsx)(h.default,{styles:a}):null}(b);return(0,t.jsx)(i,{theme:y,children:(0,t.jsx)(s.ThemeContext.Provider,{value:b,children:(0,t.jsx)(c.default,{value:v,children:(0,t.jsxs)(d.default,{value:a?b[a].components:b.components,children:[j,r]})})})})};var g=e.i(138989);function b({theme:e,...r}){let n=g.default in e?e[g.default]:void 0;return(0,t.jsx)(x,{...r,themeId:n?g.default:void 0,theme:n||e})}var y=e.i(98378),v=e.i(182541);let j="mode",k="color-scheme";function S(){}({...r}).useSyncExternalStore;let w=({key:e,storageWindow:t})=>(!t&&"u">typeof window&&(t=window),{get(r){let n;if("u">typeof window){if(!t)return r;try{n=t.localStorage.getItem(e)}catch{}return n||r}},set:r=>{if(t)try{t.localStorage.setItem(e,r)}catch{}},subscribe:r=>{if(!t)return S;let n=t=>{let n=t.newValue;t.key===e&&r(n)};
1return t.addEventListener("storage",n),()=>{t.removeEventListener("storage",n)}}});function C(){}function I(e){if("u">typeof window&&"function"==typeof window.matchMedia&&"system"===e)return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function T(e,t){return"light"===e.mode||"system"===e.mode&&"light"===e.systemMode?t("light"):"dark"===e.mode||"system"===e.mode&&"dark"===e.systemMode?t("dark"):void 0}var L=e.i(895729),E=e.i(606208);let{CssVarsProvider:z,useColorScheme:M,getInitColorSchemeScript:F}=function(e){let{themeId:n,theme:a={},modeStorageKey:i=j,colorSchemeStorageKey:s=k,disableTransitionOnChange:l=!1,defaultColorScheme:c,resolveTheme:d}=e,p={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},h=r.createContext(void 0),m={},f={},g="string"==typeof c?c:c.light,b="string"==typeof c?c:c.dark;return{CssVarsProvider:function(e){let{children:p,theme:g,modeStorageKey:b=i,colorSchemeStorageKey:y=s,disableTransitionOnChange:S=l,storageManager:L,storageWindow:E="u"<typeof window?void 0:window,documentNode:z="u"<typeof document?void 0:document,colorSchemeNode:M="u"<typeof document?void 0:document.documentElement,disableNestedContext:F=!1,disableStyleSheetGeneration:_=!1,defaultMode:B="system",forceThemeRerender:A=!1,noSsr:W}=e,P=r.useRef(!1),R=o(),$=r.useContext(h),D=!!$&&!F,O=r.useMemo(()=>g||("function"==typeof a?a():a),[g]),H=O[n],N=H||O,{colorSchemes:V=m,components:U=f,cssVarPrefix:G}=N,q=Object.keys(V).filter(e=>!!V[e]).join(","),Y=r.useMemo(()=>q.split(","),[q]),K="string"==typeof c?c:c.light,J="string"==typeof c?c:c.dark,X=V[K]&&V[J]?B:V[N.defaultColorScheme]?.palette?.mode||N.palette?.mode,{mode:Q,setMode:Z,systemMode:ee,lightColorScheme:et,darkColorScheme:er,colorScheme:en,setColorScheme:eo}=function(e){let{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:o,supportedColorSchemes:a=[],modeStorageKey:i=j,colorSchemeStorageKey:s=k,storageWindow:l="u"<typeof window?void 0:window,storageManager:c=w,noSsr:d=!1}=e,u=a.join(","),p=a.length>1,h=r.useMemo(()=>c?.({key:i,storageWindow:l}),[c,i,l]),m=r.useMemo(()=>c?.({key:`${s}-light`,storageWindow:l}),[c,s,l]),f=r.useMemo(()=>c?.({key:`${s}-dark`,storageWindow:l}),[c,s,l]),[x,g]=r.useState(()=>{let e=h?.get(t)||t,r=m?.get(n)||n,a=f?.get(o)||o;return{mode:e,systemMode:I(e),lightColorScheme:r,darkColorScheme:a}}),[b,y]=r.useState(d||!p);r.useEffect(()=>{y(!0)},[]);let v=T(x,e=>"light"===e?x.lightColorScheme:"dark"===e?x.darkColorScheme:void 0),S=r.useCallback(e=>{g(r=>{if(e===r.mode)return r;let n=e??t;return h?.set(n),{...r,mode:n,systemMode:I(n)}})},[h,t]),L=r.useCallback(e=>{e?"string"==typeof e?e&&!u.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):g(t=>{let r={...t};return T(t,t=>{"light"===t&&(m?.set(e),r.lightColorScheme=e),"dark"===t&&(f?.set(e),r.darkColorScheme=e)}),r}):g(t=>{let r={...t},a=null===e.light?n:e.light,i=null===e.dark?o:e.dark;
1return a&&(u.includes(a)?(r.lightColorScheme=a,m?.set(a)):console.error(`\`${a}\` does not exist in \`theme.colorSchemes\`.`)),i&&(u.includes(i)?(r.darkColorScheme=i,f?.set(i)):console.error(`\`${i}\` does not exist in \`theme.colorSchemes\`.`)),r}):g(e=>(m?.set(n),f?.set(o),{...e,lightColorScheme:n,darkColorScheme:o}))},[u,m,f,n,o]),E=r.useCallback(e=>{"system"===x.mode&&g(t=>{let r=e?.matches?"dark":"light";return t.systemMode===r?t:{...t,systemMode:r}})},[x.mode]),z=r.useRef(E);return z.current=E,r.useEffect(()=>{if("function"!=typeof window.matchMedia||!p)return;let e=(...e)=>z.current(...e),t=window.matchMedia("(prefers-color-scheme: dark)");return t.addListener(e),e(t),()=>{t.removeListener(e)}},[p]),r.useEffect(()=>{if(p){let e=h?.subscribe(e=>{(!e||["light","dark","system"].includes(e))&&S(e||t)})||C,r=m?.subscribe(e=>{(!e||u.match(e))&&L({light:e})})||C,n=f?.subscribe(e=>{(!e||u.match(e))&&L({dark:e})})||C;return()=>{e(),r(),n()}}},[L,S,u,t,l,p,h,m,f]),{...x,mode:b?x.mode:void 0,systemMode:b?x.systemMode:void 0,colorScheme:b?v:void 0,setMode:S,setColorScheme:L}}({supportedColorSchemes:Y,defaultLightColorScheme:K,defaultDarkColorScheme:J,modeStorageKey:b,colorSchemeStorageKey:y,defaultMode:X,storageManager:L,storageWindow:E,noSsr:W}),ea=Q,ei=en;D&&(ea=$.mode,ei=$.colorScheme);let es=ei||N.defaultColorScheme;N.vars&&!A&&(es=N.defaultColorScheme);let el=r.useMemo(()=>{let e=N.generateThemeVars?.()||N.vars,t={...N,components:U,colorSchemes:V,cssVarPrefix:G,vars:e};if("function"==typeof t.generateSpacing&&(t.spacing=t.generateSpacing()),es){let e=V[es];e&&"object"==typeof e&&Object.keys(e).forEach(r=>{e[r]&&"object"==typeof e[r]?t[r]={...t[r],...e[r]}:t[r]=e[r]})}return d?d(t):t},[N,es,U,V,G]),ec=N.colorSchemeSelector;(0,u.default)(()=>{if(ei&&M&&ec&&"media"!==ec){let e=ec;if("class"===ec&&(e=".%s"),"data"===ec&&(e="[data-%s]"),ec?.startsWith("data-")&&!ec.includes("%s")&&(e=`[${ec}="%s"]`),e.startsWith("."))M.classList.remove(...Y.map(t=>e.substring(1).replace("%s",t))),M.classList.add(e.substring(1).replace("%s",ei));else{let t=e.replace("%s",ei).match(/\[([^\]]+)\]/);if(t){let[e,r]=t[1].split("=");r||Y.forEach(t=>{M.removeAttribute(e.replace(ei,t))}),M.setAttribute(e,r?r.replace(/"|'/g,""):"")}else M.setAttribute(e,ei)}}},[ei,ec,M,Y]),r.useEffect(()=>{let e;if(S&&P.current&&z){let t=z.createElement("style");t.appendChild(z.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),z.head.appendChild(t),window.getComputedStyle(z.body),e=setTimeout(()=>{z.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[ei,S,z]),r.useEffect(()=>(P.current=!0,()=>{P.current=!1}),[]);let ed=r.useMemo(()=>({allColorSchemes:Y,colorScheme:ei,darkColorScheme:er,lightColorScheme:et,mode:ea,setColorScheme:eo,setMode:Z,systemMode:ee}),[Y,ei,er,et,ea,eo,Z,ee,el.colorSchemeSelector]),eu=!0;(_||!1===N.cssVariables||D&&R?.cssVarPrefix===G)&&(eu=!1);let ep=(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(x,{themeId:H?n:void 0,theme:el,children:p}),eu&&(0,t.jsx)(v.GlobalStyles,{styles:el.generateStyleSheets?.()||[]})]});return D?ep:(0,t.jsx)(h.Provider,{value:ed,children:ep})},useColorScheme:()=>r.useContext(h)||p,getInitColorSchemeScript:e=>(function(e){let{defaultMode:r="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:o="dark",modeStorageKey:a=j,colorSchemeStorageKey:i=k,attribute:s="data-color-scheme",colorSchemeNode:l="document.documentElement",nonce:c}=e||{},d="",u=s;if("class"===s&&(u=".%s"),"data"===s&&(u="[data-%s]"),u.startsWith(".")){let e=u.substring(1);d+=`${l}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));
2      ${l}.classList.add('${e}'.replace('%s', colorScheme));`}let p=u.match(/\[([^[\]]+)\]/);if(p){let[e,t]=p[1].split("=");t||(d+=`${l}.removeAttribute('${e}'.replace('%s', light));
3      ${l}.removeAttribute('${e}'.replace('%s', dark));`),d+=`
4      ${l}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:'""'});`}else".%s"!==u&&(d+=`${l}.setAttribute('${u}', colorScheme);`);return(0,t.jsx)("script",{suppressHydrationWarning:!0,nonce:"u"<typeof window?c:"",dangerouslySetInnerHTML:{__html:`(function() {
5try {
6  let colorScheme = '';
7  const mode = localStorage.getItem('${a}') || '${r}';
8  const dark = localStorage.getItem('${i}-dark') || '${o}';
9  const light = localStorage.getItem('${i}-light') || '${n}';
10  if (mode === 'system') {
11    // handle system mode
12    const mql = window.matchMedia('(prefers-color-scheme: dark)');
13    if (mql.matches) {
14      colorScheme = dark
15    } else {
16      colorScheme = light
17    }
18  }
19  if (mode === 'light') {
20    colorScheme = light;
21  }
22  if (mode === 'dark') {
23    colorScheme = dark;
24  }
25  if (colorScheme) {
26    ${d}
27  }
28} catch(e){}})();`}},"mui-color-scheme-init")}
28)({colorSchemeStorageKey:s,defaultLightColorScheme:g,defaultDarkColorScheme:b,modeStorageKey:i,...e})}}({themeId:g.default,theme:()=>(0,L.default)({cssVariables:!0}),colorSchemeStorageKey:"mui-color-scheme",modeStorageKey:"mui-mode",defaultColorScheme:{light:"light",dark:"dark"},resolveTheme:e=>{let t={...e,typography:(0,E.default)(e.palette,e.typography)};return t.unstable_sx=function(e){return(0,y.default)({sx:e,theme:this})},t}});function _({theme:e,...n}){let o=r.useMemo(()=>{if("function"==typeof e)return e;let t=g.default in e?e[g.default]:e;return"colorSchemes"in t?null:"vars"in t?e:{...e,vars:null}},[e]);return o?(0,t.jsx)(b,{theme:o,...n}):(0,t.jsx)(z,{theme:e,...n})}var B=e.i(680039),A=e.i(367325);let W="function"==typeof(0,B.globalCss)({}),P=(e,t=!1)=>{let r={};t&&e.colorSchemes&&"function"==typeof e.getColorSchemeSelector&&Object.entries(e.colorSchemes).forEach(([t,n])=>{let o=e.getColorSchemeSelector(t);o.startsWith("@")?r[o]={":root":{colorScheme:n.palette?.mode}}:r[o.replace(/\s*&/,"")]={colorScheme:n.palette?.mode}});let n={html:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...t&&!e.vars&&{colorScheme:e.palette.mode}},"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...{color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}},"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...r},o=e.components?.MuiCssBaseline?.styleOverrides;return o&&(n=[n,o]),n},R="mui-ecs",$=(0,B.globalCss)(W?({theme:e,enableColorScheme:t})=>P(e,t):({theme:e})=>{let t,r;return r=Array.isArray(t=P(e,!1))?t[0]:t,!e.vars&&r&&(r.html[`:root:has(${R})`]={colorScheme:e.palette.mode}),e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([t,n])=>{let o=e.getColorSchemeSelector(t);o.startsWith("@")?r[o]={[`:root:not(:has(.${R}))`]:{colorScheme:n.palette?.mode}}:r[o.replace(/\s*&/,"")]={[`&:not(:has(.${R}))`]:{colorScheme:n.palette?.mode}}}),t}),D=function(e){let{children:n,enableColorScheme:o=!1}=(0,A.useDefaultProps)({props:e,name:"MuiCssBaseline"});return(0,t.jsxs)(r.Fragment,{children:[W&&(0,t.jsx)($,{enableColorScheme:o}),!W&&!o&&(0,t.jsx)("span",{className:R,style:{display:"none"}}),n]})};var O=e.i(848317),H=e.i(734080);e.s(["MUIThemeProviderWrapper",0,function({children:e}){let{resolvedTheme:n}=(0,O.useTheme)(),[o,a]=(0,r.useState)(!1);(0,r.useEffect)(()=>{a(!0)},[]);let i=o&&"dark"===n?H.darkTheme:H.lightTheme;return(0,t.jsxs)(_,{theme:i,children:[(0,t.jsx)(D,{}),e]})}],377294)},388685,e=>{"use strict";var t=e.i(632165),r=e.i(205729),n=e.i(351483),o=e.i(812210),a=e.i(744511);function i({children:e,...s}){let l=(0,r.useContext)(o.MotionConfigContext);(s={...l,...s}).transition=(0,n.resolveTransition)(s.transition,l.transition),s.isStatic=(0,a.useConstant)(()=>s.isStatic);let c=(0,r.useMemo)(()=>s,[JSON.stringify(s.transition),s.transformPagePoint,s.reducedMotion,s.skipAnimations,s.isValidProp]);return(0,t.jsx)(o.MotionConfigContext.Provider,{value:c,children:e})}e.s(["MotionProvider",0,function({children:e}){return(0,t.jsx)(i,{reducedMotion:"user",children:e})}],388685)},859032,e=>{"use strict";var t=e.i(632165),r=e.i(920755),n=e.i(205729);let o=(0,n.createContext)(null);e.s(["SupabaseProvider",0,function({children:e}){let n=(0,r.createClient)();return(0,t.jsx)(o.Provider,{value:n,children:e})},"useSupabase",0,function(){let e=(0,n.useContext)(o);if(!e)throw Error("useSupabase must be used within SupabaseProvider");return e}])},305622,e=>{"use strict";var t=e.i(632165),r=e.i(848317);e.s(["ThemeProvider",0,function({children:e}){return(0,t.jsx)(r.ThemeProvider,{attribute:"class",defaultTheme:"light",enableSystem:!1,storageKey:"ardent-africa-theme",disableTransitionOnChange:!0,children:e})}])},399971,e=>{"use strict";e.i(502208);var t=e.i(205729);e.s(["PWAInstaller",0,function(){return(0,t.useEffect)(()=>{!window.matchMedia("(display-mode: standalone)").matches&&"serviceWorker"
28in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js").then(e=>{console.log("Service Worker registered:",e)}).catch(e=>{console.error("Service Worker registration failed:",e)})})},[]),null}])},337203,e=>{"use strict";var t=e.i(160889);let r="object"==typeof t.routing.localeCookie?t.routing.localeCookie:void 0,n=r?.name??"NEXT_LOCALE",o=r?.maxAge??31536e3;async function a(t){try{let{createClient:r}=await e.A(90015),n=r(),{data:{user:o}}=await n.auth.getUser();if(!o)return;await n.from("profiles").update({preferred_locale:t,locale_chosen_at:new Date().toISOString()}).eq("id",o.id)}catch{}}e.s(["persistLocaleForAccount",0,a,"writeLocaleCookie",0,function(e){if("u"<typeof document)return;let t="https:"===window.location.protocol?"; Secure":"";document.cookie=`${n}=${e}; Path=/; Max-Age=${o}; SameSite=Lax${t}`}])},795405,e=>{"use strict";var t=e.i(205729),r=e.i(503172),n=e.i(437470),n=n,o=e.i(441151),a=e.i(632165);e.s(["default",0,function(e){let{options:i,CacheProvider:s=n.C,children:l}=e,[c]=t.useState(()=>{let e=(0,r.default)({...i,key:i?.key??"mui"});e.compat=!0;let t=e.insert,n=[];return e.insert=(...r)=>{i?.enableCssLayer&&!r[1].styles.match(/^@layer\s+[^{]*$/)&&(r[1].styles=`@layer mui {${r[1].styles}}`);let[o,a]=r;return void 0===e.inserted[a.name]&&n.push({name:a.name,isGlobal:!o}),t(...r)},{cache:e,flush:()=>{let e=n;return n=[],e}}});return(0,o.useServerInsertedHTML)(()=>{let e=c.flush();if(0===e.length)return null;let r="",n=c.cache.key,o=[];return e.forEach(({name:e,isGlobal:t})=>{let a=c.cache.inserted[e];"string"==typeof a&&(t?o.push({name:e,style:a}):(r+=a,n+=` ${e}`))}),(0,a.jsxs)(t.Fragment,{children:[o.map(({name:e,style:t})=>(0,a.jsx)("style",{nonce:i?.nonce,"data-emotion":`${c.cache.key}-global ${e}`,dangerouslySetInnerHTML:{__html:t}},e)),r&&(0,a.jsx)("style",{nonce:i?.nonce,"data-emotion":n,dangerouslySetInnerHTML:{__html:r}})]})}),(0,a.jsx)(s,{value:c.cache,children:l})}],795405)},441151,(e,t,r)=>{t.exports=e.r(58291)},317146,e=>{"use strict";var t=e.i(502208),r=e.i(205729);function n(){return"u">typeof window}function o(){return"production"}function a(){return(n()?window.vam:o())||"production"}function i(){return"production"===a()}function s(){return"development"===a()}function l(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:`/${e}`}e.s(["Analytics",0,function(e){return(0,r.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),(0,r.useEffect)(()=>{!function(e={debug:!0},t){var r;if(!n())return;let{beforeSend:a,src:i,dataset:c}=function(e,t){var r,n;let a=e;if(t)try{a={...null==(r=JSON.parse(t))?void 0:r.analytics,...e}}catch{}!function(e="auto"){if("auto"===e){window.vam=o();return}window.vam=e}(a.mode);let i={sdkn:"@vercel/analytics"+(a.framework?`/${a.framework}`:""),sdkv:"2.0.1"};return a.disableAutoTrack&&(i.disableAutoTrack="1"),a.viewEndpoint&&(i.viewEndpoint=l(a.viewEndpoint)),a.eventEndpoint&&(i.eventEndpoint=l(a.eventEndpoint)),a.sessionEndpoint&&(i.sessionEndpoint=l(a.sessionEndpoint)),s()&&!1===a.debug&&(i.debug="false"),a.dsn&&(i.dsn=a.dsn),a.endpoint?i.endpoint=a.endpoint:a.basePath&&(i.endpoint=l(`${a.basePath}/insights`)),{beforeSend:a.beforeSend,src:(n=a).scriptSrc?l(n.scriptSrc):s()?"https://va.vercel-scripts.com/v1/script.debug.js":n.basePath?l(`${n.basePath}/insights/script.js`):"/_vercel/insights/script.js",dataset:i}}(e,t);if(window.va||(window.va=function(...e){window.vaq||(window.vaq=[]),window.vaq.push(e)}),a&&(null==(r=window.va)||r.call(window,"beforeSend",a)),document.head.querySelector(`script[src*="${i}"]`))return;let d=document.createElement("script");for(let[e,t]of(d.src=i,Object.entries(c)))d.dataset[e]=t;d.defer=!0,d.onerror=()=>{let e=s()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${i}. ${e}`)},document.head.appendChild(d)}({framework:e.framework||"react",basePath:e.basePath??function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...void 0!==e.route&&{disableAutoTrack:!0},...e}
28,e.configString??function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG}())},[]),(0,r.useEffect)(()=>{e.route&&e.path&&function({route:e,path:t}){var r;null==(r=window.va)||r.call(window,"pageview",{route:e,path:t})}({route:e.route,path:e.path})},[e.route,e.path]),null},"track",0,function(e,t,r){var o,a;if(!n()){let e="[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment";if(i())console.warn(e);else throw Error(e);return}if(!t){null==(o=window.va)||o.call(window,"event",{name:e,options:r});return}try{let n=function(e,t){if(!e)return;let r=e,n=[];for(let[o,a]of Object.entries(e))"object"==typeof a&&null!==a&&(t.strip?r=function(e,{[e]:t,...r}){return r}(o,r):n.push(o));if(n.length>0&&!t.strip)throw Error(`The following properties are not valid: ${n.join(", ")}. Only strings, numbers, booleans, and null are allowed.`);return r}(t,{strip:i()});null==(a=window.va)||a.call(window,"event",{name:e,data:n,options:r})}catch(e){e instanceof Error&&s()&&console.error(e)}}])},821308,e=>{"use strict";var t=e.i(502208),r=e.i(205729),n=e.i(58291);function o(){return false}function a(e){return RegExp(`/${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?=[/?#]|$)`)}function i(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:`/${e}`}function s(e){(0,r.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]);let n=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(!n.current){let r=function(e={},t){var r;if(!("u">typeof window)||null===e.route)return null;window.si||(window.si=function(...e){window.siq=window.siq||[],window.siq.push(e)});let{beforeSend:n,src:a,dataset:s}=function(e,t){var r,n;let a=e;if(t)try{a={...null==(r=JSON.parse(t))?void 0:r.speedInsights,...e}}catch{}let s={sdkn:"@vercel/speed-insights"+(a.framework?`/${a.framework}`:""),sdkv:"2.0.0"};return a.sampleRate&&(s.sampleRate=a.sampleRate.toString()),a.route&&(s.route=a.route),o()&&!1===a.debug&&(s.debug="false"),a.dsn&&(s.dsn=a.dsn),a.endpoint?s.endpoint=i(a.endpoint):a.basePath&&(s.endpoint=i(`${a.basePath}/speed-insights/vitals`)),{src:(n=a).scriptSrc?i(n.scriptSrc):o()?"https://va.vercel-scripts.com/v1/speed-insights/script.debug.js":n.dsn?"https://va.vercel-scripts.com/v1/speed-insights/script.js":n.basePath?i(`${n.basePath}/speed-insights/script.js`):"/_vercel/speed-insights/script.js",beforeSend:a.beforeSend,dataset:s}}(e,t);if(document.head.querySelector(`script[src*="${a}"]`))return null;n&&(null==(r=window.si)||r.call(window,"beforeSend",n));let l=document.createElement("script");for(let[e,t]of(l.src=a,l.defer=!0,Object.entries(s)))l.dataset[e]=t;return l.onerror=()=>{console.log(`[Vercel Speed Insights] Failed to load script from ${a}. Please check if any content blockers are enabled and try again.`)},document.head.appendChild(l),{setRoute:e=>{l.dataset.route=e??void 0}}}({framework:e.framework??"react",basePath:e.basePath??function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...e},e.configString??function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG}());r&&(n.current=r.setRoute)}},[e]),(0,r.useEffect)(()=>{n.current&&e.route&&n.current(e.route)},[e.route]),null}function l(e){let o=(()=>{let e=(0,n.useParams)(),t=(0,n.useSearchParams)()||new URLSearchParams,r=(0,n.usePathname)();if(!e)return null;let o=Object.keys(e).length?e:Object.fromEntries(t.entries());if(!r||!o)return r;let i=r;try{let e=Object.entries(o);for(let[t,r]of e)if(!Array.isArray(r)){let e=a(r);e.test(i)&&(i=i.replace(e,`/[${t}]`))}for(let[t,r]of e)if(Array.isArray(r)){let e=a(r.join("/"));e.test(i)&&(i=i.replace(e,`/[...${t}]`))}return i}catch{return r}})();return r.default.createElement(s,{route:o,...e,framework:"next",basePath:function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH}
28(),configString:function(){if(void 0!==t.default&&void 0!==t.default.env)return'{"analytics":{"scriptSrc":"b483c6cf643630ab/script.js","viewEndpoint":"b483c6cf643630ab/view","eventEndpoint":"b483c6cf643630ab/event","sessionEndpoint":"b483c6cf643630ab/session"},"speedInsights":{"scriptSrc":"1ed1539879c670db/script.js","endpoint":"1ed1539879c670db/vitals"}}'}()})}e.s(["SpeedInsights",0,function(e){return r.default.createElement(r.Suspense,{fallback:null},r.default.createElement(l,{...e}))}])},522415,e=>{"use strict";var t=e.i(621664),r=e.i(632165);e.s(["default",0,function({locale:e,...n}){if(!e)throw Error(void 0);return(0,r.jsx)(t.IntlProvider,{locale:e,...n})}])},848317,e=>{"use strict";var t=e.i(205729),r=(e,t,r,n,o,a,i,s)=>{let l=document.documentElement,c=["light","dark"];function d(t){var r;(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,n=r&&a?o.map(e=>a[e]||e):o;r?(l.classList.remove(...n),l.classList.add(a&&a[t]?a[t]:t)):l.setAttribute(e,t)}),r=t,s&&c.includes(r)&&(l.style.colorScheme=r)}if(n)d(n);else try{let e=localStorage.getItem(t)||r,n=i&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;d(n)}catch(e){}},n=["light","dark"],o="(prefers-color-scheme: dark)",a="u"<typeof window,i=t.createContext(void 0),s={setTheme:e=>{},themes:[]},l=["light","dark"],c=({forcedTheme:e,disableTransitionOnChange:r=!1,enableSystem:a=!0,enableColorScheme:s=!0,storageKey:c="theme",themes:m=l,defaultTheme:f=a?"system":"light",attribute:x="data-theme",value:g,children:b,nonce:y,scriptProps:v})=>{let[j,k]=t.useState(()=>u(c,f)),[S,w]=t.useState(()=>"system"===j?h():j),C=g?Object.values(g):m,I=t.useCallback(e=>{let t=e;if(!t)return;"system"===e&&a&&(t=h());let o=g?g[t]:t,i=r?p(y):null,l=document.documentElement,c=e=>{"class"===e?(l.classList.remove(...C),o&&l.classList.add(o)):e.startsWith("data-")&&(o?l.setAttribute(e,o):l.removeAttribute(e))};if(Array.isArray(x)?x.forEach(c):c(x),s){let e=n.includes(f)?f:null,r=n.includes(t)?t:e;l.style.colorScheme=r}null==i||i()},[y]),T=t.useCallback(e=>{let t="function"==typeof e?e(j):e;k(t);try{localStorage.setItem(c,t)}catch(e){}},[j]),L=t.useCallback(t=>{w(h(t)),"system"===j&&a&&!e&&I("system")},[j,e]);t.useEffect(()=>{let e=window.matchMedia(o);return e.addListener(L),L(e),()=>e.removeListener(L)},[L]),t.useEffect(()=>{let e=e=>{e.key===c&&(e.newValue?k(e.newValue):T(f))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[T]),t.useEffect(()=>{I(null!=e?e:j)},[e,j]);let E=t.useMemo(()=>({theme:j,setTheme:T,forcedTheme:e,resolvedTheme:"system"===j?S:j,themes:a?[...m,"system"]:m,systemTheme:a?S:void 0}),[j,T,e,S,a,m]);return t.createElement(i.Provider,{value:E},t.createElement(d,{forcedTheme:e,storageKey:c,attribute:x,enableSystem:a,enableColorScheme:s,defaultTheme:f,value:g,themes:m,nonce:y,scriptProps:v}),b)},d=t.memo(({forcedTheme:e,storageKey:n,attribute:o,enableSystem:a,enableColorScheme:i,defaultTheme:s,value:l,themes:c,nonce:d,scriptProps:u})=>{let p=JSON.stringify([o,n,s,e,c,l,a,i]).slice(1,-1);return t.createElement("script",{...u,suppressHydrationWarning:!0,nonce:"u"<typeof window?d:"",dangerouslySetInnerHTML:{__html:`(${r.toString()})(${p})`}})}),u=(e,t)=>{let r;if(!a){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},p=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},h=e=>(e||(e=window.matchMedia(o)),e.matches?"dark":"light");e.s(["ThemeProvider",0,e=>t.useContext(i)?t.createElement(t.Fragment,null,e.children):t.createElement(c,{...e}),"useTheme",0,()=>{var e;return null!=(e=t.useContext(i))?e:s}])}]);

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.