PageSourceSearch

https://myka.ng/assets/ReviewPlanPage-CL2RSWwI.js

js myka.ng collected 2026-10-09 22:42:48 UTC 10,613 bytes, 1 lines download raw bytes

1import{j as e,d as E,p as w,r as h,u as O}from"./vendor-react-DfYGAhtm.js";import{m as x,g as T,bj as V,t as G,bi as Q}from"./index-DsBgCU7r.js";import"./LinkPaymentMethodOption-CuZHpNDU.js";import{u as Y,P as $}from"./useProductPaymentFlow-BTWzU1Vd.js";import{S as A}from"./StepPageLayout-DdZUweau.js";import{a as P,R as p,H as z,P as H}from"./HealthFormShell-BdiFYoa2.js";import{I as K}from"./IndividualPlanTierCard-CLUUibjp.js";import{a as l,i as X,T as s,F as I,H as S,V as R,v as Z,G as J}from"./vendor-ui-DA_r9yXk.js";import{a as _}from"./currency-tq8RhIEU.js";import{bE as ee}from"./vendor-icons-1odZwi-b.js";import{g as te}from"./underwriterLogoDisplay-B0FBG3Nn.js";import{C as oe}from"./Checkbox-DwOz6egu.js";import{U as ne}from"./UnderwriterPlanLogo-CdMcnE2i.js";import{d as re,a as ie,u as ae}from"./PaymentTermsConsentCopy-DOzXQujc.js";import{d as se,I as le,c as de}from"./individualHealthConstants-DtbURbNc.js";import{u as L,e as pe}from"./vendor-state-BsBVN-fX.js";import{g as ce}from"./errors-BYKXB8DF.js";import{D as me}from"./paymentReturnUrls-CXEwLwaV.js";import{b as ue}from"./healthPolicyActivation-BCt2rMDw.js";import{c as xe}from"./checkoutSessionStore-BRM5sYZN.js";import{H as W}from"./routes-Dr23NpA-.js";import{g as he,m as ge}from"./mapHealthQuote-Dd5YesTp.js";import"./vendor-forms-BP-7CbAP.js";import"./EmailVerificationModal-BxNiYJiq.js";import"./Modal-DS-VW05m.js";import"./useWalletMandateLinkFlow-m9cf0nTk.js";import"./useAnalytics-HP01GbIH.js";import"./userEmail-9DwyWHBc.js";import"./walletApi-DyFgHNVA.js";import"./walletMandateApi-Du1GplC_.js";import"./walletMandateSession-B-c6J5GS.js";import"./walletMandateReturnUrls-BPu4z42g.js";import"./paymentMandateReturnSession-B31Waw65.js";import"./failed-Dd90HJgP.js";import"./success-C0L8gZxS.js";import"./transactionsApi-CANA4ntQ.js";const fe=t=>({mark:o=>{try{sessionStorage.setItem(t,o)}catch{}},consume:o=>{try{const n=sessionStorage.getItem(t);return!n||o&&n!==o?!1:(sessionStorage.removeItem(t),!0)}catch{return!1}}}),be=()=>e.jsxs(l,{fontFamily:P.bodyFont,children:[e.jsx(X,{fontSize:{base:"26px",md:"34px"},fontWeight:"semibold",lineHeight:"1.15",letterSpacing:"-1.43px",color:x.orange[500],children:"Here's your plan"}),e.jsx(s,{fontSize:{base:"15px",md:"17px"},lineHeight:"24.74px",color:x.text.primary,mt:"8px",children:"A simple summary before you continue."})]}),ye="/assets/wallet-card-bg-DQSf8cXY.png",Se=({planName:t,annualPremium:o})=>e.jsxs(I,{position:"relative",overflow:"hidden",direction:"column",justify:"space-between",minH:{base:"320px",lg:"507.5px"},p:"32px",borderRadius:"24px",boxShadow:p.heroShadow,color:"white",children:[e.jsx(l,{"aria-hidden":!0,position:"absolute",inset:0,backgroundImage:`url(${ye})`,backgroundSize:"cover",backgroundPosition:"center",pointerEvents:"none"}),e.jsx(l,{"aria-hidden":!0,position:"absolute",inset:0,bg:p.heroOverlay,pointerEvents:"none"}),e.jsx(l,{"aria-hidden":!0,position:"absolute",top:"-48px",left:"153px",boxSize:"250px",borderRadius:"full",bg:"white",opacity:.1,filter:"blur(64px)",pointerEvents:"none"}),e.jsxs(l,{position:"relative",children:[e.jsx(s,{fontSize:"14px",lineHeight:"21px",fontWeight:"medium",opacity:.9,children:"Health Insurance"}),e.jsx(s,{fontFamily:"heading",fontSize:{base:"30px",md:"36px"},lineHeight:"39.6px",fontWeight:"semibold",letterSpacing:"-2px",py:"8px",children:t}),e.jsx(l,{display:"inline-block",px:"12px",py:"4px",borderRadius:"100px",bg:p.heroPill,children:e.jsx(s,{fontSize:"12px",lineHeight:"18px",fontWeight:"medium",children:"12 months plan"})})]}),e.jsxs(l,{position:"relative",mt:{base:10,lg:0},pt:"25px",borderTop:"1px solid",borderColor:p.heroDivider,children:[e.jsx(s,{fontSize:"13px",lineHeight:"19.5px",fontWeight:"medium",opacity:.9,children:"Total Premium"}),e.jsxs(S,{align:"baseline",gap:"8px",pt:"4px",children:[e.jsx(s,{fontFamily:"heading",fontSize:{base:"34px",md:"40px"},lineHeight:"40px",fontWeight:"bold",letterSpacing:"-2px",children:_(o)}),e.jsx(s,{fontSize:"16px",lineHeight:"24px",fontWeight:"medium",opacity:.8,children:"/yr"})]})]})]}),Ie=({onBackToPlans:t})=>e.jsx(A,{items:[],contentMaxW:"960px",mobileContentOnly:!0,children:e.jsxs(z,{px:{base:4,md:10,lg:"72px"},py:{base:6,md:12,lg:"67px"},children:[e.jsx(s,{fontSize:"14px",color:x.text.secondary,children:"Select a plan first to review your cover."}),e.jsx(T,{type:"button",buttonType:"outline",text:"Back to plans",size:"md",mt:4,onClick:t})]})}),Pe=4,ve=({isChecked:t,onToggle:o})=>
1e.jsxs(I,{align:"flex-start",gap:"8px",bg:p.consentBg,border:"1px solid",borderColor:p.consentBorder,borderRadius:"16px",px:"18px",py:"12px",cursor:"pointer",role:"checkbox","aria-checked":t,"aria-label":re,tabIndex:0,onClick:n=>{n.target.closest("a")||o(!t)},onKeyDown:n=>{n.target===n.currentTarget&&(n.key===" "||n.key==="Enter")&&(n.preventDefault(),o(!t))},children:[e.jsx(oe,{checked:t,controlProps:{boxSize:"20px",borderRadius:"6px"},flexShrink:0,mt:"1px",pointerEvents:"none"}),e.jsx(s,{fontFamily:P.bodyFont,fontSize:"12px",fontWeight:"medium",lineHeight:"16px",color:x.text.tertiary,children:e.jsx(ie,{})})]}),je=({plan:t,providerName:o,canPay:n,termsAccepted:r,onTermsAcceptedChange:a,isRecordingConsent:g=!1,onProceedToPayment:m})=>{const d=te(o),u=o.replace(/[^A-Za-z]/g,"").charAt(0).toUpperCase()||"?",f=t.coverageDetails.slice(0,Pe);return e.jsxs(I,{direction:"column",bg:"white",border:"1.5px solid",borderColor:H.border,borderRadius:"24px",boxShadow:P.optionShadow,p:{base:5,md:"33.5px"},children:[e.jsxs(S,{gap:"16px",pb:"25px",mb:"24px",borderBottom:"1px solid",borderColor:H.border,children:[e.jsx(I,{boxSize:"48px",flexShrink:0,align:"center",justify:"center",borderRadius:"16px",bg:p.logoWellBg,border:"1px solid",borderColor:H.border,overflow:"hidden",px:"6px",children:e.jsx(ne,{logo:d,fallbackLetter:u,brandLetterColor:x.text.label,maxWidth:"100%",maxHeightPx:28})}),e.jsxs(l,{children:[e.jsx(s,{fontSize:"13px",lineHeight:"19.5px",fontWeight:"medium",color:x.text.primary,pb:"2px",children:o}),e.jsxs(s,{fontSize:"17px",lineHeight:"25.5px",fontWeight:"semibold",color:x.text.label,children:[t.name," Plan"]})]})]}),e.jsx(R,{align:"stretch",gap:"16px",pb:"32px",children:f.map(c=>e.jsxs(S,{gap:"12px",align:"flex-start",children:[e.jsx(Z,{as:ee,boxSize:"20px",mt:"2px",flexShrink:0,color:p.check}),e.jsx(s,{fontSize:"14px",lineHeight:"21px",fontWeight:"medium",color:x.text.label,children:c.label})]},c.id))}),e.jsxs(l,{mt:"auto",children:[e.jsxs(l,{p:"17px",borderRadius:"16px",bg:p.noteBg,border:"1px solid",borderColor:p.noteBorder,children:[e.jsxs(S,{gap:"8px",children:[e.jsx(l,{boxSize:"6px",borderRadius:"full",bg:x.orange[500]}),e.jsx(s,{fontSize:"13px",lineHeight:"19.5px",fontWeight:"semibold",color:x.text.label,children:"Please note:"})]}),e.jsx(R,{align:"stretch",gap:"6px",pl:"12px",pt:"8px",children:se.map(c=>e.jsx(s,{fontSize:"12px",lineHeight:"18px",color:p.noteText,children:c},c))})]}),e.jsx(l,{mt:"16px",children:e.jsx(ve,{isChecked:r,onToggle:a})}),e.jsx(T,{type:"button",buttonType:"primary",text:"Proceed to Payment",size:"lg",fullWidth:!0,mt:"24px",h:"52px",fontSize:"15px",fontWeight:"normal",letterSpacing:"-0.9px",boxShadow:p.ctaShadow,loading:g,disabled:!n||!r||g,onClick:m})]})]})},He=t=>{if(!t||typeof t!="object")return!1;const o=t;return typeof o.policyId=="string"&&o.policyId.trim()!==""&&o.quote!=null&&typeof o.quote=="object"&&typeof o.planId=="string"&&o.planId.trim()!==""&&typeof o.savedAt=="number"},M=xe({key:"myka.individualHealth.payment.checkout",isValid:He}),D=fe("myka.individualHealth.payment.returnHandled"),{save:ct,load:F,clear:Ce}=M,{mark:mt,consume:ut}=D,ke=({policyId:t,planId:o,quote:n,amountDue:r})=>{const a=E(),g=L(),[m]=w(),d=m.get("payment"),u=m.get("policyId"),f=h.useMemo(()=>d?F(u):null,[d,u]),c=h.useCallback(()=>{const y=t??u??f?.policyId;if(!y){a("/policies",{replace:!0});return}a(ue(y),{replace:!0})},[f?.policyId,a,t,u]),i=h.useMemo(()=>t&&n&&o?{policyId:t,quote:n,planId:o}:null,[t,n,o]),b=Y({policyId:t,amountDue:r,sessionStore:M,sessionPayload:i,successPath:W.IndividualReview,persistBeforeEmailGate:!0,showSuccessModalOnOnlineReturn:!1,successHoldMs:me,isPaidContextValid:!!(f||n&&o&&t),returnHandledMark:D,onPaid:()=>{Ce(),g(V("paid")),c()},...r!=null?{amountDisplay:_(r)}:{}}),[v,q]=h.useState(!1),{recordPolicyConsentAsync:k,isRecordingConsent:B}=ae("health"),{openMethodModal:j,modals:N}=b,U=h.useCallback(()=>{if(!t){j();return}k({policyId:t,...v?{consent:!0}:{}}).then(()=>j()).catch(y=>{G.error(ce(y)??"We could not record your consent. Please try again.")})},[j,t,k,v]);return{termsAccepted:v,onTermsAcceptedChange:q,isRecordingConsent:B,proceedToPayment:U,modals:N}},C=(t,o)=>{const n=he(t);return!n||!o?null:{plan:ge(t,o),providerName:t.underwriter,planId:o,policyId:t.policyId,quoteId:n,quote:t}},Re=()=>{const t=O(),[o]=w(),n=L(),r=pe(b=>b.individualHealth),a=t.state,g=o.get("planId")??void 0,m=o.get("policyId")??a?.quote.policyId??r.policyId??void 0,d=h.useMemo(()=>a?.quote?null:F(m),[a?.quote,m]),u=h.useMemo(()=>!a?.quote||!a.planId?null:C(a.quote,a.planId),[a]),f=h.useMemo(()=>
1{if(!d)return null;const b=C(d.quote,d.planId);return b?{...b,policyId:d.policyId||b.policyId}:null},[d]),c=h.useMemo(()=>!r.quote||!r.planId?null:C(r.quote,r.planId),[r.quote,r.planId]),i=u??f??c;return h.useEffect(()=>{i&&(r.planId===i.planId&&r.quoteId===i.quoteId&&r.selectedPlan?.id===i.plan.id||n(Q({planId:i.planId,providerName:i.providerName,providerLogo:null,selectedPlan:i.plan,quoteId:i.quoteId,quote:i.quote})))},[n,i,r.planId,r.quoteId,r.selectedPlan?.id]),{plan:i?.plan??null,providerName:i?.providerName??null,policyId:i?.policyId||m,planId:i?.planId??g,quoteId:i?.quoteId,quote:i?.quote??null,isLoading:!1}},xt=()=>{const t=E(),{plan:o,providerName:n,policyId:r,planId:a,quote:g}=Re(),{termsAccepted:m,onTermsAcceptedChange:d,isRecordingConsent:u,proceedToPayment:f,modals:c}=ke({policyId:r,planId:a,quote:g,amountDue:o?.annualPremium});return!o||!n||!r||!a||!g?e.jsx(Ie,{onBackToPlans:()=>t(`/${W.IndividualSelectPlan}`)}):e.jsxs(A,{items:[],contentMaxW:"960px",mobileContentOnly:!0,children:[e.jsx($,{...c}),e.jsxs(z,{px:{base:4,md:10,lg:"72px"},py:{base:6,md:12,lg:"67px"},children:[e.jsx(K,{steps:de,activeStep:le.Review,mb:{base:8,md:"83px"}}),e.jsxs(l,{fontFamily:P.bodyFont,children:[e.jsx(be,{}),e.jsxs(J,{templateColumns:{base:"1fr",lg:"355fr 437fr"},gap:"24px",mt:{base:8,md:"31px"},alignItems:"stretch",children:[e.jsx(Se,{planName:o.name,annualPremium:o.annualPremium}),e.jsx(je,{plan:o,providerName:n,canPay:!!r,termsAccepted:m,onTermsAcceptedChange:d,isRecordingConsent:u,onProceedToPayment:f})]})]})]})]})};export{xt 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.