1import{j as t,r as f,d as K,p as Y}from"./vendor-react-DfYGAhtm.js";import{m as v,l as Z,p as Q,q as X,r as J,s as q,a as e2,v as t2,w as n2,o as r2,A as s2,k as o2}from"./index-DsBgCU7r.js";import{g as i2}from"./errors-BYKXB8DF.js";import{F as g,a as l,o as m,T as d,B as z,t as E,G as H,u as a2,m as l2,V as B,s as j}from"./vendor-ui-DA_r9yXk.js";import{u as c2}from"./embla-carousel-react.esm-DyMEp6Qu.js";import{E as p2}from"./vendor-icons-1odZwi-b.js";import{P as d2,a as u2}from"./PolicyContributionPager-BOoAZAgj.js";import{b as x2,t as g2,c as h2,o as b2,a as m2,d as f2,n as W,p as I,e as C2,f as y2,C as w2}from"./contributionPeriods-BVOAzSfZ.js";import{f as v2}from"./vendor-state-BsBVN-fX.js";import{f as M}from"./currency-tq8RhIEU.js";import"./vendor-forms-BP-7CbAP.js";import"./Modal-DS-VW05m.js";const S2="/assets/bg-grid-DFEvko1g.png",j2="/assets/bg-grid-overlay-l8oTqNaf.png",k2="/assets/avatar-BQvikzAs.png",L2="'Baloo 2', system-ui, sans-serif",A2="'Inter', system-ui, sans-serif",E2=({customerName:e,onLogin:n})=>t.jsxs(g,{align:"center",justify:"space-between",w:"full",gap:3,children:[t.jsxs(g,{align:"center",gap:"10px",minW:0,children:[t.jsx(l,{boxSize:"39px",borderRadius:"full",overflow:"hidden",flexShrink:0,border:"1.5px solid",borderColor:"rgba(106, 126, 146, 0.2)",children:t.jsx(m,{src:k2,alt:"",w:"100%",h:"100%",objectFit:"cover"})}),t.jsx(l,{minW:0,children:t.jsx(d,{fontFamily:L2,fontWeight:"semibold",fontSize:"18px",lineHeight:"22px",color:v.navy[500],truncate:!0,title:e,children:e})})]}),t.jsx(z,{type:"button",unstyled:!0,onClick:n,bg:v.orange[500],color:"white",borderRadius:"full",px:"12px",h:"32px",fontFamily:A2,fontWeight:"medium",fontSize:"10.5px",lineHeight:"1",cursor:"pointer",whiteSpace:"nowrap",flexShrink:0,children:"Login"})]}),I2="/assets/card-coin-Bo8F-MB5.png",F2="/assets/card-edu-BrQjTfKf.jpeg",T2="/assets/card-sabi-B7uT7xRW.png",P="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='18.448'%20height='18.448'%20viewBox='0%200%2018.448%2018.448'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icon'%20opacity='0.9'%3e%3cpath%20id='Vector'%20d='M15.5696%204.90048C15.5696%206.6515%2012.7302%208.07122%209.22815%208.07122C5.72611%208.07122%202.88666%206.6515%202.88666%204.90048M15.5696%204.90048C15.5696%203.14946%2012.7302%201.72973%209.22815%201.72973C5.72611%201.72973%202.88666%203.14946%202.88666%204.90048M15.5696%204.90048V13.548C15.5696%2015.299%2012.7302%2016.7187%209.22815%2016.7187C5.72611%2016.7187%202.88666%2015.299%202.88666%2013.548V4.90048M15.5696%209.22422C15.5696%2010.9752%2012.7302%2012.395%209.22815%2012.395C5.72611%2012.395%202.88666%2010.9752%202.88666%209.22422'%20stroke='white'%20stroke-width='1.34516'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e",B2="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='20.4977'%20height='20.4977'%20viewBox='0%200%2020.4977%2020.4977'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icon'%3e%3cpath%20id='Vector'%20d='M1.74623%2010.5239C1.68729%2010.3468%201.68729%2010.1553%201.74623%209.97819C2.93083%206.41415%206.29331%203.84339%2010.2562%203.84339C14.2174%203.84339%2017.5782%206.41159%2018.7653%209.97392C18.8251%2010.1507%2018.8251%2010.342%2018.7653%2010.5197C17.5816%2014.0837%2014.2191%2016.6545%2010.2562%2016.6545C6.29502%2016.6545%202.93339%2014.0863%201.74623%2010.5239Z'%20stroke='white'%20stroke-opacity='0.8'%20stroke-width='1.49463'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_2'%20d='M12.816%2010.2489C12.816%2010.9285%2012.546%2011.5802%2012.0655%2012.0607C11.585%2012.5412%2010.9333%2012.8112%2010.2538%2012.8112C9.57422%2012.8112%208.92251%2012.5412%208.442%2012.0607C7.96149%2011.5802%207.69155%2010.9285%207.69155%2010.2489C7.69155%209.5694%207.96149%208.91769%208.442%208.43719C8.92251%207.95668%209.57422%207.68673%2010.2538%207.68673C10.9333%207.68673%2011.585%207.95668%2012.0655%208.43719C12.546%208.91769%2012.816%209.5694%2012.816%2010.2489Z'%20stroke='white'%20stroke-opacity='0.8'%20stroke-width='1.49463'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e",M2="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='18.079'%20height='18.079'%20viewBox='0%200%2018.079%2018.079'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icon'%20opacity='0.9'%3e%3cpath%20id='Vector'%20d='M3.20532%207.64368L9.0358%2010.9228L14.8663%207.64368M9.0358%202.82488L15.8154%206.63804L9.0358%2010.452L2.25617%206.63804L9.0358%202.82488Z'%20stroke='white'%20stroke-width='1.31826'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_2'%20d='M4.51388%209.03939V12.4292C4.51388%2013.5591%206.53722%2014.5008%209.03363%2014.5008C11.53%2014.5008%2013.5534%2013.5591%2013.5534%2012.4292V9.03939'%20stroke='white'%20stroke-width='1.31826'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e",F="'Baloo 2', system-ui, sans-serif",k="'Inter', system-ui, sans-serif",P2=E("button"),R2={sabi:{texture:T2,tint:null,icon:P},edu:{texture:F2,tint:"rgba(14, 40, 87, 0.39)",icon:M2},coin:{texture:I2,tint:"rgba(10, 53, 6, 0.55)",icon:P}},N2=({card:e,isActive:n=!0})=>{const[r,s]=f.useState(!0),i=R2[e.theme];return t.jsxs(l,{position:"relative",overflow:"hidden",borderRadius:"28px",w:"full",h:"195px",minH:"195px",maxH:"195px",boxShadow:"0px 8px 24px rgba(0,0,0,0.06)",opacity:n?1:.88,transition:"opacity 0.2s ease",userSelect:"none",style:{WebkitUserSelect:"none"},children:[t.jsx(m,{src:i.texture,alt:"","aria-hidden":!0,position:"absolute",inset:0,w:"100%",h:"100%",objectFit:"cover"}),i.tint?t.jsx(l,{"aria-hidden":!0,position:"absolute",inset:0,bg:i.tint}):t.jsx(l,{"aria-hidden":!0,position:"absolute",top:0,right:0,bottom:0,w:"55%",bg
1:"rgba(255,255,255,0.1)"}),t.jsxs(g,{direction:"column",justify:"space-between",position:"relative",h:"full",px:"24px",py:"24px",children:[t.jsxs(l,{children:[t.jsxs(g,{align:"flex-start",justify:"space-between",gap:2,children:[t.jsxs(g,{align:"center",gap:"6px",minW:0,pt:"2px",children:[t.jsx(m,{src:i.icon,alt:"",boxSize:"18px",flexShrink:0}),t.jsx(d,{fontFamily:k,fontWeight:"medium",fontSize:"14px",lineHeight:"21px",color:"white",truncate:!0,children:e.productName})]}),t.jsxs(g,{direction:"column",align:"flex-end",gap:"8px",flexShrink:0,children:[e.rateBadge?t.jsx(l,{border:"1px solid",borderColor:"rgba(255,255,255,0.3)",borderRadius:"full",px:"10px",py:"2px",children:t.jsx(d,{fontFamily:k,fontWeight:"medium",fontSize:"10px",lineHeight:"15px",letterSpacing:"0.25px",color:"white",whiteSpace:"nowrap",children:e.rateBadge})}):null,t.jsx(P2,{type:"button","aria-label":r?"Hide balance":"Show balance",onClick:o=>{o.stopPropagation(),s(p=>!p)},p:"4px",cursor:"pointer",color:"rgba(255,255,255,0.85)",display:"flex",alignItems:"center",justifyContent:"center",children:r?t.jsx(m,{src:B2,alt:"",boxSize:"20px"}):t.jsx(p2,{size:20})})]})]}),t.jsx(d,{fontFamily:F,fontWeight:"medium",fontSize:{base:"32px",sm:"41px"},lineHeight:"1",letterSpacing:"-1px",color:"white",whiteSpace:"nowrap",pt:"10px",pr:"4px",truncate:!0,children:r?e.balanceDisplay:e.balanceHiddenDisplay})]}),t.jsx(l,{borderTop:"1px solid",borderColor:"rgba(255,255,255,0.15)",pt:"12px",mt:"4px",children:t.jsxs(g,{align:"center",justify:"space-between",gap:3,children:[t.jsxs(l,{minW:0,children:[t.jsx(d,{fontFamily:k,fontSize:"10px",lineHeight:"15px",letterSpacing:"0.25px",textTransform:"uppercase",color:"rgba(255,255,255,0.8)",children:e.primaryMetricLabel}),t.jsx(d,{fontFamily:F,fontWeight:"medium",fontSize:"13px",lineHeight:"20px",color:"white",pt:"2px",children:e.primaryMetricDisplay})]}),t.jsxs(l,{textAlign:"right",minW:0,children:[t.jsx(d,{fontFamily:k,fontSize:"10px",lineHeight:"15px",letterSpacing:"0.25px",textTransform:"uppercase",color:"rgba(255,255,255,0.8)",children:e.secondaryMetricLabel}),t.jsx(d,{fontFamily:F,fontWeight:"medium",fontSize:"13px",lineHeight:"20px",color:"white",pt:"2px",children:e.secondaryMetricDisplay})]})]})})]})]})},z2="'Baloo 2', system-ui, sans-serif",H2=E("button"),W2=({plans:e,activeIndex:n,onActiveIndexChange:r})=>{const s=e.length>1,[i,o]=c2({align:"center",containScroll:!1,dragFree:!1,loop:!1,skipSnaps:!1}),[p,u]=f.useState(n);f.useEffect(()=>{if(!o)return;const a=()=>{const c=o.selectedScrollSnap();u(c),r(c)};return o.on("select",a),o.on("reInit",a),a(),()=>{o.off("select",a),o.off("reInit",a)}},[o,r]),f.useEffect(()=>{o&&o.selectedScrollSnap()!==n&&o.scrollTo(n)},[n,o]);const x=f.useCallback(a=>{o?.scrollTo(a)},[o]);return e.length===0?null:t.jsxs(l,{w:"full",children:[t.jsx(d,{fontFamily:z2,fontWeight:"semibold",fontSize:"22.641px",lineHeight:"22.641px",letterSpacing:"-0.566px",color:"#5E7297",mb:"12px",px:"2px",whiteSpace:"nowrap",children:"Account Overview"}),t.jsx(l,{mx:s?"-24px":0,overflow:"hidden",children:t.jsx(l,{ref:i,overflow:"hidden",w:"full",children:t.jsx(g,{align:"stretch",gap:s?"12px":0,px:s?"24px":0,children:e.map((a,c)=>t.jsx(l,{flex:s?"0 0 86%":"0 0 100%",minW:s?"86%":"100%",maxW:s?"86%":"100%",h:"195px",children:t.jsx(N2,{card:a.overview,isActive:c===p})},a.subscriptionReference))})})}),s?t.jsx(g,{justify:"center",align:"center",gap:"6px",mt:"14px",opacity:.56,role:"tablist","aria-label":"Savings plans",children:e.map((a,c)=>{const h=c===p;return t.jsx(H2,{type:"button",role:"tab","aria-selected":h,"aria-label":`Show ${a.overview.productName}`,onClick:()=>x(c),bg:h?"rgba(94,114,151,0.5)":"rgba(94,114,151,0.2)",h:"3.7px",w:h?"16px":"10px",borderRadius:"5px",cursor:"pointer",transition:"width 0.2s ease, background 0.2s ease"},a.subscriptionReference)})}):null]})},D2="/assets/icon-agent-BJK2zKvR.svg",_2="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icon'%3e%3cpath%20id='Vector'%20d='M7.5%2010.625L9.375%2012.5L12.5%208.125M10%202.26167C8.11311%204.05353%205.60022%205.03631%202.99833%205C2.66736%206.00832%202.49914%207.06292%202.5%208.12417C2.5%2012.7842%205.68667%2016.6992%2010%201
17.81C14.3133%2016.7%2017.5%2012.785%2017.5%208.125C17.5%207.03333%2017.325%205.9825%2017.0017%204.99917H16.875C14.2117%204.99917%2011.7917%203.95917%2010%202.26167Z'%20stroke='%23027A48'%20stroke-width='1.45833'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e",O2="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icon'%3e%3cpath%20id='Vector'%20d='M16.25%2011.875V9.6875C16.25%208.94158%2015.9537%208.22621%2015.4262%207.69876C14.8988%207.17132%2014.1834%206.875%2013.4375%206.875H12.1875C11.9389%206.875%2011.7004%206.77623%2011.5246%206.60041C11.3488%206.4246%2011.25%206.18614%2011.25%205.9375V4.6875C11.25%203.94158%2010.9537%203.22621%2010.4262%202.69876C9.89879%202.17132%209.18342%201.875%208.4375%201.875H6.875M6.875%2012.5H13.125M6.875%2015H10M8.75%201.875H4.6875C4.17%201.875%203.75%202.295%203.75%202.8125V17.1875C3.75%2017.705%204.17%2018.125%204.6875%2018.125H15.3125C15.83%2018.125%2016.25%2017.705%2016.25%2017.1875V9.375C16.9083%208.23486%2017.2548%206.94153%2017.2548%205.625C17.2548%204.30848%2016.9083%203.01514%2016.25%201.875'%20stroke='%23175CD3'%20stroke-width='1.45833'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e",V2="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Frame'%3e%3cpath%20id='Vector'%20d='M10%206.25C9.25832%206.25%208.5333%206.46993%207.91661%206.88199C7.29993%207.29404%206.81928%207.87971%206.53545%208.56494C6.25162%209.25016%206.17736%2010.0042%206.32206%2010.7316C6.46675%2011.459%206.8239%2012.1272%207.34835%2012.6517C7.8728%2013.1761%208.54098%2013.5333%209.26841%2013.6779C9.99584%2013.8226%2010.7498%2013.7484%2011.4351%2013.4645C12.1203%2013.1807%2012.706%2012.7001%2013.118%2012.0834C13.5301%2011.4667%2013.75%2010.7417%2013.75%2010C13.749%209.00576%2013.3535%208.05253%2012.6505%207.34949C11.9475%206.64645%2010.9942%206.25103%2010%206.25ZM10%2012.5C9.50555%2012.5%209.0222%2012.3534%208.61107%2012.0787C8.19995%2011.804%207.87952%2011.4135%207.6903%2010.9567C7.50108%2010.4999%207.45157%209.99723%207.54804%209.51227C7.6445%209.02732%207.8826%208.58186%208.23223%208.23223C8.58186%207.8826%209.02732%207.6445%209.51227%207.54804C9.99723%207.45157%2010.4999%207.50108%2010.9567%207.6903C11.4135%207.87952%2011.804%2
108.19995%2012.0787%208.61107C12.3534%209.0222%2012.5%209.50555%2012.5%2010C12.5%2010.663%2012.2366%2011.2989%2011.7678%2011.7678C11.2989%2012.2366%2010.663%2012.5%2010%2012.5ZM16.875%2010.1688C16.8781%2010.0563%2016.8781%209.94375%2016.875%209.83125L18.0406%208.375C18.1017%208.29854%2018.144%208.20879%2018.1641%208.11299C18.1842%208.01719%2018.1815%207.91801%2018.1562%207.82344C17.9652%207.10516%2017.6793%206.41551%2017.3063%205.77266C17.2574%205.68853%2017.1896%205.61697%2017.1082%205.56366C17.0268%205.51036%2016.9341%205.47679%2016.8375%205.46563L14.9844%205.25938C14.9073%205.17813%2014.8292%205.1%2014.75%205.025L14.5313%203.16719C14.52%203.07048%2014.4863%202.97774%2014.4329%202.89635C14.3794%202.81497%2014.3077%202.7472%2014.2234%202.69844C13.5803%202.32605%2012.8907%202.0405%2012.1727%201.84922C12.078%201.82406%2011.9788%201.82149%2011.883%201.84171C11.7872%201.86193%2011.6975%201.90437%2011.6211%201.96563L10.1688%203.125C10.0563%203.125%209.94375%203.125%209.83125%203.125L8.375%201.96172C8.29854%201.9006%208.20879%201.8583%208.11299%201.83821C8.01719%201.81813%207.91801%201.82083%207.82344%201.84609C7.10527%202.03752%206.41567%202.32335%205.77266%202.69609C5.68853%202.74494%205.61697%202.81275%205.56366%202.89413C5.51036%202.97551%205.47679%203.06821%205.46563%203.16484L5.25938%205.02109C5.17813%205.0987%205.1%205.17682%205.025%205.25547L3.16719%205.46875C3.07048%205.48%202.97774%205.51369%202.89635%205.56713C2.81497%205.62057%202.7472%205.69229%202.69844%205.77656C2.32605%206.41966%202.0405%207.10925%201.84922%207.82734C1.82406%207.92197%201.82149%208.02119%201.84171%208.11699C1.86193%208.2128%201.90437%208.30251%201.96563%208.37891L3.125%209.83125C3.125%209.94375%203.125%2010.0563%203.125%2010.1688L1.96172%2011.625C1.9006%2011.7015%201.8583%2011.7912%201.83821%2011.887C1.81813%2011.9828%201.82083%2012.082%201.84609%2012.1766C2.03718%2012.8948%202.32302%2013.5845%202.69609%2014.2273C2.74494%2014.3115%202.81275%2014.383%202.89413%2014.4363C2.97551%2014.4896%203.06821%2014.5232%203.16484%2014.5344L5.01797%2014.7406C5.09557%2014.8219%205.1737%2014.9%205.25234%2014.975L5.46875%2016.8328C5.48%2016.9295%205.51369%2017.0223%205.56713%2017.1036C5.62057%2017.185%205.69229%2017.2528%205.77656%2017.3016C6.41966%2017.6739%207.10925%2017.9595%207.82734%2018.1508C7.92197%2018.1759%208.02119%2018.1785%208.11699%2018.1583C8.2128%2018.1381%208.30251%2018.0956%208.37891%2018.0344L9.83125%2016.875C9.94375%2016.8781%2010.0563%2016.8781%2010.1688%2016.875L11.625%2018.0406C11.7015%2018.1017%2011.7912%2018.144%2011.887%2018.1641C11.9828%2018.1842%2012.082%2018.1815%2012.1766%2018.1562C12.8948%2017.9652%2013.5845%2017.6793%2014.2273%2017.3063C14.3115%2017.2574%2014.383%2017.1896%2014.4363%2017.1082C14.4896%2017.0268%2014.5232%2016.9341%2014.5344%2016.8375L14.7406%2014.9844C14.8219%2014.9073%2014.9%2014.8292%2014.975%2014.75L16.8328%2014.5313C16.9295%2014.52%2017.0223%2014.4863%2017.1036%2014.4329C17.185%2014.3794%2017.2528%2014.3077%2017.3016%2014.2234C17.6739%2013.5803%2017.9595%2012.8907%2018.1508%2012.1727C18.1759%2012.078%2018.1785%2011.9788%2018.1583%2011.883C18.1381%2011.7872%2018.0956%2011.6975%2018.0344%2011.6211L16.875%2010.1688ZM15.6172%209.66094C15.6305%209.88678%2015.6305%2010.1132%2015.6172%2010.3391C15.6079%2010.4937%2015.6563%2010.6463%2015.7531%2010.7672L16.8617%2012.1523C16.7345%2012.5566%2016.5716%2012.9488%2016.375%2013.3242L14.6094%2013.5242C14.4556%2013.5413%2014.3136%2013.6148%2014.2109%2013.7305C14.0606%2013.8996%2013.9004%2014.0598%2013.7312%2014.2102C13.6156%2014.3129%2013.5421%2014.4548%2013.525%2014.6086L13.3289%2016.3727C12.9535%2016.5694%2012.5613%2016.7323%2012.157%2016.8594L10.7711%2015.7508C10.6602%2015.6622%2010.5224%2015.614%2010.3805%2015.6141H10.343C10.1171%2015.6273%209.89069%2015.6273%209.66484%2015.6141C9.51022%2015.6048%209.35765%2015.6532%209.23672%2015.75L7.84766%2016.8594C7.44339%2016.7322%207.05122%2016.5693%206.67578%2016.3727L6.47578%2014.6094C6.45871%2014.4556%206.38522%2014.3136%206.26953%2014.2109C6.1004%2014.0606%205.94023%2013.9004%205.78984%2013.7312C5.68714%2013.6156%205.54517%2013.5421%205.39141%2013.525L3.62734%2013.3281C3.43062%2012.9527%203.26774%2012.5606%203.14063%2012.1563L4.24922%2010.7703C4.34602%2010.6494%204.39446%2010.4968%204.38516%2010.3422C4.37188%2010.1163%204.37188%209.88991%204.38516%209.66406C4.39446%209.50944%204.34602%209.35687%204.24922%209.23594L3.14063%207.84766C3.26783%207.44339%203.43071%207.05122%203.62734%206.67578L5.39063%206.47578C5.54439%206.45871%205.68635%206.38522%205.78906%206.26953C5.93945%206.1004%206.09962%205.94023%206.26875%205.78984C6.3849%205.68707%206.45869%205.54478%206.47578%205.39063
1L6.67188%203.62734C7.04727%203.43062%207.43944%203.26774%207.84375%203.14063L9.22969%204.24922C9.35062%204.34602%209.50319%204.39446%209.65781%204.38516C9.88366%204.37188%2010.1101%204.37188%2010.3359%204.38516C10.4906%204.39446%2010.6431%204.34602%2010.7641%204.24922L12.1523%203.14063C12.5566%203.26783%2012.9488%203.43071%2013.3242%203.62734L13.5242%205.39063C13.5413%205.54439%2013.6148%205.68635%2013.7305%205.78906C13.8996%205.93945%2014.0598%206.09962%2014.2102%206.26875C14.3129%206.38444%2014.4548%206.45793%2014.6086%206.475L16.3727%206.67109C16.5694%207.04649%2016.7323%207.43866%2016.8594%207.84297L15.7508%209.22891C15.653%209.35086%2015.6045%209.505%2015.6148%209.66094H15.6172Z'%20fill='%239333EA'/%3e%3c/g%3e%3c/svg%3e",$2="'Baloo 2', system-ui, sans-serif",U2=E("button"),L=({icon:e,label:n,onClick:r,iconWidth:s,iconHeight:i})=>t.jsxs(U2,{type:"button",onClick:r,display:"flex",flexDirection:"column",alignItems:"center",gap:"10px",cursor:"pointer",bg:"transparent",border:"none",p:0,children:[t.jsx(g,{align:"center",justify:"center",boxSize:"52px",borderRadius:"18px",bg:"white",border:"1px solid",borderColor:"#F1F5F9",boxShadow:"0px 2px 6px rgba(0,0,0,0.03)",children:t.jsx(m,{src:e,alt:"",w:s,h:i})}),t.jsx(d,{fontFamily:$2,fontWeight:"medium",fontSize:"12.5px",lineHeight:"18.75px",color:"#5E7297",textAlign:"center",whiteSpace:"nowrap",children:n})]}),G2=({onContactAgent:e,onBuyPlan:n,onMakeClaim:r,onSettings:s})=>t.jsx(l,{w:"full",px:"4px",children:t.jsxs(H,{templateColumns:"repeat(4, 1fr)",gap:"16px",w:"full",children:[t.jsx(L,{icon:D2,label:"Contact my agent",onClick:e,iconWidth:"18.424px",iconHeight:"20.401px"}),t.jsx(L,{icon:_2,label:"Buy a plan",onClick:n,iconWidth:"20px",iconHeight:"20px"}),t.jsx(L,{icon:O2,label:"Make Claim",onClick:r,iconWidth:"20px",iconHeight:"20px"}),t.jsx(L,{icon:V2,label:"Settings",onClick:s,iconWidth:"20px",iconHeight:"20px"})]})}),K2=({label:e,frequency:n})=>{const r=e.trim();if(!r||n==null||n==="DAILY")return r;if(n==="MONTHLY"){const[s,i]=r.split(/\s+/);return s&&i&&i.length===4?`${s} ${i.slice(-2)}`:r}return r},Y2=({gridCells:e,planKey:n,frequency:r})=>e.map(s=>({key:`${n}-${s.dueDate}-${s.state}`,dayLabel:K2({label:s.label,frequency:r}),state:s.state,opensSheet:f2(s.state),detail:s})),Z2=({frequency:e,termStart:n,termEnd:r,answeredCells:s,planKey:i,pageIndex:o,today:p=m2()})=>{const u=n.trim(),x=r.trim(),a=e==null||!u||!x?[]:x2(e,u,x,g2(e,!1)),c=a.length===0?0:Math.min(o??h2(a,p),a.length-1),h=a[c]??null,b=h==null||e==null?[]:b2(e,h.cells,s);return{frequency:e,pages:a,pageIndex:c,pageCount:a.length,pageTitle:h?.title??"",canGoPrev:c>0,canGoNext:c<a.length-1,columns:Q2(e),cells:Y2({gridCells:b,planKey:i,frequency:e}),gridCells:b}},Q2=e=>e==="ANNUAL"?1:e==="MONTHLY"||e==="QUARTERLY"||e==="SEMI_ANNUAL"?4:6,X2=e=>{const[n,r]=f.useState(null),s=Z2({frequency:e.frequency,termStart:e.termStart,termEnd:e.termEnd,answeredCells:e.answeredCells,planKey:e.subscriptionReference,pageIndex:n});return{...s,goToPrevPage:()=>{s.canGoPrev&&r(s.pageIndex-1)},goToNextPage:()=>{s.canGoNext&&r(s.pageIndex+1)}}},J2=({frequency:e,cellCount:n})=>e==="ANNUAL"||n===1?"full":"circle",D="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icon'%20clip-path='url(%23clip0_0_4)'%3e%3cpath%20id='Vector'%20d='M10%2018.3333C14.6024%2018.3333%2018.3333%2014.6024%2018.3333%2010C18.3333%205.39763%2014.6024%201.66667%2010%201.66667C5.39763%201.66667%201.66667%205.39763%201.66667%2010C1.66667%2014.6024%205.39763%2018.3333%2010%2018.3333Z'%20stroke='%23E46921'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_2'%20d='M10%206.66667V10'%20stroke='%23E46921'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_3'%20d='M10%2013.3333H10.0083'%20stroke='%23E46921'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_0_4'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",_="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icon'%3e%3cpath%20id='Vector'%20d='M12%2
1022C17.5228%2022%2022%2017.5228%2022%2012C22%206.47715%2017.5228%202%2012%202C6.47715%202%202%206.47715%202%2012C2%2017.5228%206.47715%2022%2012%2022Z'%20stroke='%2304802E'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_2'%20d='M9%2012L11%2014L15%2010'%20stroke='%2304802E'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e",q2=e=>{switch(e){case"PAID":case"PAID_LATE":case"PREPAID":return{visual:"paid",bg:"#F0FDF4",border:"#DCFCE7",borderStyle:"solid",borderWidth:"0.86px",labelColor:"#027A48"};case"DUE":case"DUE_NEXT":return{visual:"due",bg:"#FFFFFF",border:"#E46921",borderStyle:"solid",borderWidth:"1.5px",labelColor:"#E46921"};case"MISSED":case"REVERSED":return{visual:"missed",bg:"#F1F5F9",border:"#E2E8F0",borderStyle:"solid",borderWidth:"0.86px",labelColor:"#64748B"};default:return{visual:"upcoming",bg:"transparent",border:"#CBD5E1",borderStyle:"dashed",borderWidth:"1px",labelColor:"#94A3B8"}}},R="'Inter', system-ui, sans-serif",e0=({visual:e})=>e==="upcoming"?null:t.jsxs(g,{position:"absolute",top:"-2px",right:"-2px",align:"center",justify:"center",boxSize:"14px",borderRadius:"full",bg:"white",zIndex:1,children:[e==="paid"?t.jsx(m,{src:_,alt:"",boxSize:"12px"}):null,e==="due"?t.jsx(m,{src:D,alt:"",boxSize:"12px"}):null,e==="missed"?t.jsx(l,{boxSize:"10px",borderRadius:"full",bg:"#94A3B8","aria-hidden":!0}):null]}),t0=({visual:e})=>e==="paid"?t.jsx(m,{src:_,alt:"",boxSize:"16px"}):e==="due"?t.jsx(m,{src:D,alt:"",boxSize:"16px"}):e==="missed"?t.jsx(l,{boxSize:"12px",borderRadius:"full",bg:"#94A3B8","aria-hidden":!0}):t.jsx(l,{boxSize:"16px","aria-hidden":!0}),n0=({cell:e,layout:n="circle",onSelect:r})=>{const s=q2(e.state),i=e.dayLabel.trim().split(/\s+/).filter(Boolean),o=i.length>1,p=e.opensSheet&&r!=null,u=n==="full"?t.jsxs(g,{align:"center",justify:"center",gap:"8px",w:"100%",minH:"52px",h:"52px",px:"16px",borderRadius:"16px",bg:s.bg,borderWidth:s.borderWidth,borderStyle:s.borderStyle,borderColor:s.border,children:[t.jsx(t0,{visual:s.visual}),t.jsx(d,{fontFamily:R,fontWeight:"semibold",fontSize:"14px",lineHeight:"20px",color:s.labelColor,textAlign:"center",children:e.dayLabel})]}):t.jsxs(g,{position:"relative",direction:"column",align:"center",justify:"center",boxSize:"36px",flexShrink:0,borderRadius:"full",bg:s.bg,borderWidth:s.borderWidth,borderStyle:s.borderStyle,borderColor:s.border,overflow:"visible",px:"2px",children:[t.jsx(e0,{visual:s.visual}),t.jsx(d,{fontFamily:R,fontWeight:"medium",fontSize:o?"7px":"8.5px",lineHeight:o?"8px":"8.5px",color:s.labelColor,textAlign:"center",maxW:"100%",overflow:"hidden",children:o?i.map(x=>t.jsx(l,{as:"span",display:"block",children:x},x)):e.dayLabel})]});return p?t.jsx(E.button,{type:"button",onClick:()=>r(e),"aria-label":`View ${e.dayLabel} contribution`,cursor:"pointer",bg:"transparent",p:0,w:n==="full"?"100%":"auto",display:"flex",justifyContent:"center",children:u}):u},r0="'Baloo 2', system-ui, sans-serif",O="'Inter', system-ui, sans-serif",s0=[.22,1,.36,1],T=({color:e,label:n})=>t.jsxs(g,{align:"center",gap:"6px",children:[t.jsx(l,{boxSize:"8px",borderRadius:"full",bg:e}),t.jsx(d,{fontFamily:O,fontWeight:"medium",fontSize:"10px",letterSpacing:"0.4px",color:"#64748B",textTransform:"uppercase",children:n})]}),o0=({policyName:e,frequencyLabel:n,cells:r,columns:s,cellLayout:i,pageTitle:o,canGoPrev:p,canGoNext:u,onPrevPage:x,onNextPage:a,showPager:c,onSelectCell:h})=>{const b=a2(),C=i==="full";return t.jsxs(l,{bg:"white",border:"0.94px solid",borderColor:"rgba(106, 126, 146, 0.15)",borderRadius:"22px",boxShadow:"0px 7.5px 14px rgba(0,0,0,0.03)",px:"19px",py:"16px",w:"full",children:[t.jsxs(g,{align:"center",justify:"space-between",mb:"12px",gap:2,children:[t.jsxs(d,{fontFamily:r0,fontWeight:"semibold",fontSize:"14px",lineHeight:"21px",minW:0,truncate:!0,title:e?`Savings Tracker: ${e}`:"Savings Tracker",children:[t.jsxs(d,{as:"span",color:"#5E7297",children:["Savings Tracker",e?":":""]}),e?t.jsxs(d,{as:"span",color:"#E46921",children:[" ",e]}):null]}),t.jsx(l,{border:"0.77px solid",borderColor:"#E2E8F0",borderRadius:"full",px:"9px",py:"3px",flexShrink:0,children:t.jsx(d,{fontFamily:O,fontWeight:"medium",fontSize:"8.5px",lineHeight:"13px",color:"#64748B",children:n})})]}),c?t.jsx(l,{mb:"12px",mt:"-8px",children:t.jsx(d2,{title:o,canGoPrev:p,canGoNext:u,locked:!1,onPrev:x,onNext:a})}):null,r.length===0?t.jsx(d,{fontSize:"13px",color:"#64748B",textAlign:"center",py:6,children:"No contribution periods to show yet."}):t.jsx(H,{templateColumns:C?"1fr":`repeat(${s}
1, 36px)`,justifyContent:C?"stretch":"space-between",columnGap:"8px",rowGap:C?"8px":"12px",w:"full",pt:"2px",px:"2px",children:r.map((w,y)=>{const S=Math.floor(y/s);return t.jsx(l2.div,{style:{display:"flex",justifyContent:"center",width:C?"100%":36},initial:b?!1:{opacity:0,y:-14,scale:.86},animate:{opacity:1,y:0,scale:1},transition:b?{duration:0}:{duration:.32,delay:S*.055+y%s*.012,ease:s0},children:t.jsx(n0,{cell:w,layout:i,onSelect:h})},w.key)})}),t.jsxs(g,{align:"center",justify:"center",gap:"16px",mt:"16px",pt:"4px",children:[t.jsx(T,{color:"#027A48",label:"Paid"}),t.jsx(T,{color:"#E46921",label:"Due"}),t.jsx(T,{color:"#94A3B8",label:"Missed"})]})]})},i0=({plan:e,frequencyLabel:n})=>{const[r,s]=f.useState(null),{cells:i,columns:o,frequency:p,pageTitle:u,canGoPrev:x,canGoNext:a,goToPrevPage:c,goToNextPage:h,pageCount:b}=X2(e);return t.jsxs(t.Fragment,{children:[t.jsx(o0,{policyName:e.overview.productName,frequencyLabel:n,cells:i,columns:o,cellLayout:J2({frequency:p,cellCount:i.length}),pageTitle:u,canGoPrev:x,canGoNext:a,onPrevPage:c,onNextPage:h,showPager:b>1,onSelectCell:s}),t.jsx(u2,{open:r!=null,cell:r?.detail??null,currency:e.currency,frequencyLabel:n,showInvoiceReference:!1,onClose:()=>s(null)})]})},V=e=>{const n=(e??"").split("/").map(o=>o.trim()).filter(o=>o.length>0&&o.toLowerCase()!=="null"),r=n[0]??null,s=n[1]??n[0]??null,i=$(s)||"Savings plan";return{underwriter:r,productCode:s,productName:i}},$=e=>{const n=e?.trim()??"";return n?n.toLowerCase().replace(/[_-]+/g," ").split(/\s+/).filter(Boolean).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" "):""},a0=e=>{const n=e?.trim()??"";return n?$(n):"â"},l0=({productCode:e,productName:n})=>{const r=`${e??""} ${n??""}`.toLowerCase();return r.includes("edu")||r.includes("education")||r.includes("assured")?"edu":r.includes("coin")?"coin":"sabi"},c0=e=>{const n=W(e);return n==null?"Daily":n==="SEMI_ANNUAL"?"Semi-annual":n.charAt(0)+n.slice(1).toLowerCase().replace(/_/g," ")},p0=e=>{if(e==null||!e.trim())return"Completed";const n=y2(e);if(n==null)return e;const r=new Date(n.year,n.month-1,n.day);return Z(r,{preset:"gb-short",fallback:e})},d0=(e,n)=>{const{productCode:r}=V(e.title),s=e.subscription?.startDate?.trim()||"start",i=r?.trim()||e.title.trim()||"plan";return`preview-${n}-${i}-${s}`},u0=(e,n)=>{const{productCode:r,productName:s}=V(e.title),i=e.subscription?.currency??"NGN",o=I(e.summary?.totalSaved)??I(e.subscription?.amount)??0,p=l0({productCode:r,productName:s}),u=e.summary?.paidInstallments??0,x=e.summary?.cycles??e.subscription?.installmentCount??0,a=I(e.summary?.nextDueAmount);return{subscriptionReference:n,productName:s,rateBadge:null,balanceDisplay:M(o,i),balanceHiddenDisplay:"â¢â¢â¢â¢â¢â¢",theme:p,primaryMetricLabel:"Next Due",primaryMetricDisplay:p0(e.summary?.nextDueDate),secondaryMetricLabel:a!=null&&a>0?"Due Amount":"Status",secondaryMetricDisplay:a!=null&&a>0?M(a,i):a0(e.summary?.compliance)||(x>0?`${u} of ${x} paid`:"â")}},x0=e=>(e.tracker?.cells??[]).map((r,s)=>({cycle:r.cycle>0?r.cycle:s+1,dueDate:r.dueDate,amount:r.amount,state:C2(r.state),paidAt:r.paidAt??null})),g0=(e,n=0)=>{const r=d0(e,n);return{subscriptionReference:r,customerName:e.customerName?.trim()||"Customer",frequencyLabel:c0(e.subscription?.frequency),frequency:W(e.subscription?.frequency),termStart:e.subscription?.startDate?.trim()??"",termEnd:e.subscription?.endDate?.trim()??"",currency:e.subscription?.currency?.trim()||"NGN",answeredCells:x0(e),overview:u0(e,r)}},h0=e=>e.map((n,r)=>g0(n,r)),b0=e=>{const n=Q.create({baseURL:J,timeout:X});return n.interceptors.request.use(r=>(r.headers.Authorization=`Bearer ${e}`,r)),q(n),n},m0=["savings-status","contribution-preview"],A=e=>e!=null&&typeof e=="object"&&!Array.isArray(e),f0=e=>{if(!A(e)||typeof e.customerName!="string"||typeof e.title!="string")return!1;const n=e.tracker;return A(n)&&Array.isArray(n.cells)},C0=e=>{if(!A(e))return[];const n=e.data;return Array.isArray(n)?n.filter(f0):[]},y0=e=>{if(A(e)&&typeof e.message=="string"){const n=e.message.trim();if(n)return n}return"Failed to load contribution preview"},w0=async({session:e})=>{const n=b0(e),{data:r}=await n.get("/api/v1/contribution-preview",{timeout:w2}),s=C0(r);if(s.length===0)throw new Error(y0(r));return s},v0=({session:e})=>{const n=!!e?.trim(),{data:r,isPending:s,isError:i,error:o,refetch:p}=v2({queryKey:[...m0,e??null],queryFn:()=>w0({session:e}),enabled:n,refetchOnWindowFocus:!1,retry:!1});return{plans:r?h0(r):[],isLoading:n&&s,isError:n&&i,error:o,refetch:p}},S0=(...e)=>{for(const n of e){const r=n?.trim();if(r)return r}return""},j0=({searchParams:e})=>{const n=S0(e.get("session"),e.get("sessionId"),e.get("session_id"),e.get("token"),e.get("accessToken"),e.get("access_token"));return n?{session:n}:null},k0=()=>{const e=K(),n=e2(),r=t2(),[s]=Y(),[i,o]=f.useState(0),p=f.useMemo(()=>j0({searchParams:s}),[s]),u=p?.session??"",[x,a]=f.useState(u);u!==x&&(a(u),o(0));const{plans:c,isLoading:h,isError:b,error:C,refetch:w}=v0({...p?.session!=null?{session:p.session}:{}}),y=c.length===0?0:Math.min(i,c.length-1),S=c[y]??c[0]??null,U=S?.customerName??c[0]?.customerName??"",G=()=>{n(r2({step:s2.LOGIN})),e("/home")};return{hasValidLink:p!=null,plans:c,activePlan:S,activeIndex:y,setActiveIndex:o,customerName:U,isLoading:h,isError:b,error:C,refetch:w,onLogin:G,onContactAgent:()=>{window.open(n2("Hi Myka, I need help with my savings contributions."),"_blank","noopener,noreferrer")},onBuyPlan:r,onMakeClaim:()=>{e("/claims")},onSettings:()=>{e("/settings/profile")}}},N="'Baloo 2', system-ui, sans-serif",H0=()=>{const{hasValidLink:e,plans:n,activePlan:r,activeIndex:s,setActiveIndex:i,customerName:o,isLoading:p,isError:u,error:x,refetch:a,onLogin:c,onContactAgent:h,onBuyPlan:b,onMakeClaim:C,onSettings:w}=k0(),y=()=>e?p?t.jsxs(B,{gap:4,w:"full",align:"stretch",children:[t.jsx(j,{borderRadius:"full",h:"40px",w:"full"}),t.jsx(j,{borderRadius:"28px",h:"195px",w:"full"}),t.jsx(j,{borderRadius:"22px",h:"320px",w:"full"}),t.jsx(j,{borderRadius:"18px",h:"80px",w:"full"})]}):u||!r||n.length===0?t.jsxs(l,{bg:"white",borderRadius:"22px",border:"1px solid",borderColor:"rgba(106, 126, 146, 0.15)",px:6,py:8,textAlign:"center",children:[t.jsx(d,{fontFamily:N,fontWeight:"bold",color:v.n
1avy[500],mb:2,children:"Couldnât load savings status"}),t.jsx(d,{fontSize:"sm",color:"#64748B",lineHeight:"1.6",mb:4,children:i2(x)??"We could not load your contribution overview. Check the link or try again."}),t.jsx(z,{type:"button",onClick:()=>void a(),bg:v.orange[500],color:"white",borderRadius:"full",px:5,h:"36px",fontSize:"13px",fontWeight:"semibold",children:"Try again"})]}):t.jsxs(B,{gap:"16px",w:"full",align:"stretch",pb:"24px",children:[t.jsx(E2,{customerName:o,onLogin:c}),t.jsx(W2,{plans:n,activeIndex:s,onActiveIndexChange:i}),t.jsx(i0,{plan:r,frequencyLabel:r.frequencyLabel},r.subscriptionReference),t.jsx(G2,{onContactAgent:h,onBuyPlan:b,onMakeClaim:C,onSettings:w})]}):t.jsxs(l,{bg:"white",borderRadius:"22px",border:"1px solid",borderColor:"rgba(106, 126, 146, 0.15)",px:6,py:8,textAlign:"center",children:[t.jsx(d,{fontFamily:N,fontWeight:"bold",color:v.navy[500],mb:2,children:"Link unavailable"}),t.jsx(d,{fontSize:"sm",color:"#64748B",lineHeight:"1.6",children:"This savings status link is missing a valid session. Please open the link from your message again."})]});return t.jsx(l,{minH:"100dvh",w:"100%",bg:{base:"#FBFBFB",sm:"#EEF1F4"},display:"flex",justifyContent:"center",alignItems:"flex-start",py:{base:0,sm:"24px"},px:{base:0,sm:"16px"},overflowX:"hidden",overflowY:"auto",children:t.jsx(l,{position:"relative",w:"full",maxW:{base:"100%",sm:"430px"},minH:{base:"100dvh",sm:"calc(100dvh - 48px)"},bg:"#FBFBFB",borderRadius:{base:0,sm:"32px"},overflow:"hidden",boxShadow:{base:"none",sm:"0 8px 32px rgba(18, 33, 47, 0.08)"},children:t.jsxs(g,{direction:"column",position:"relative",zIndex:1,w:"full",h:"full",minH:"inherit",px:{base:"16px",sm:"24px"},pt:{base:"24px",sm:"28px"},pb:"32px",children:[t.jsxs(l,{"aria-hidden":!0,position:"absolute",top:"-34px",left:"50%",transform:"translateX(-50%)",w:"100%",maxW:{base:"100%",sm:"430px"},h:"433px",pointerEvents:"none",zIndex:0,overflow:"hidden",children:[t.jsx(m,{src:S2,alt:"",position:"absolute",inset:0,w:"100%",h:"100%",objectFit:"cover",objectPosition:"top center"}),t.jsx(l,{position:"absolute",inset:0,style:{backgroundImage:"linear-gradient(181deg, rgba(255,255,255,0) 9%, rgb(251,251,251) 67%)"}}),t.jsx(m,{src:j2,alt:"",position:"absolute",inset:0,w:"100%",h:"100%",objectFit:"cover",objectPosition:"top center",opacity:.31})]}),t.jsxs(l,{flex:"1",position:"relative",zIndex:1,children:[t.jsx(l,{mb:"16px",children:t.jsx(o2,{variant:"light",alt:"Myka",h:"32px"})}),y()]})]})})})};export{H0 as default};
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.