PageSourceSearch

https://medicaresimple.io/_next/static/chunks/pages/connect-b9c3dd45dc6ad32f.js

js medicaresimple.io collected 2026-10-07 20:39:15 UTC 26,153 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cc5cc16a-164e-4bd9-90ae-1c3ffd9b14d0",e._sentryDebugIdIdentifier="sentry-dbid-cc5cc16a-164e-4bd9-90ae-1c3ffd9b14d0")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7784],{45712:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/connect",function(){return n(75271)}])},61842:function(e,t){"use strict";t.Z={src:"/_next/static/media/close_dark.e6c945e1.svg",height:48,width:48,blurWidth:0,blurHeight:0}},19217:function(e,t){"use strict";t.Z={src:"/_next/static/media/book-100.6b3b1b84.svg",height:50,width:50,blurWidth:0,blurHeight:0}},87624:function(e,t){"use strict";t.Z={src:"/_next/static/media/calendar-335.c164e580.svg",height:50,width:50,blurWidth:0,blurHeight:0}},22372:function(e,t){"use strict";t.Z={src:"/_next/static/media/check-38.c9a83f8c.svg",height:50,width:50,blurWidth:0,blurHeight:0}},82951:function(e,t){"use strict";t.Z={src:"/_next/static/media/doc_mask.028ebe12.svg",height:12,width:19,blurWidth:0,blurHeight:0}},29820:function(e,t){"use strict";t.Z={src:"/_next/static/media/dollar-sign-8.d8f68761.svg",height:50,width:50,blurWidth:0,blurHeight:0}},49569:function(e,t){"use strict";t.Z={src:"/_next/static/media/man-12.60781749.svg",height:50,width:50,blurWidth:0,blurHeight:0}},96657:function(e,t){"use strict";t.Z={src:"/_next/static/media/needle.43eedb4f.svg",height:15,width:15,blurWidth:0,blurHeight:0}},61634:function(e,t){"use strict";t.Z={src:"/_next/static/media/plus.f0aacae5.svg",height:14,width:14,blurWidth:0,blurHeight:0}},79577:function(e,t){"use strict";t.Z={src:"/_next/static/media/scale.b30145f6.svg",height:50,width:50,blurWidth:0,blurHeight:0}},17856:function(e,t){"use strict";t.Z={src:"/_next/static/media/warn_yellow.07cbec06.svg",height:18,width:4,blurWidth:0,blurHeight:0}},40544:function(e,t,n){"use strict";var r=n(85893);n(67294),t.Z=e=>{let{children:t,className:n}=e;return(0,r.jsx)("div",{className:n+" flex flex-col items-center justify-center max-w-[1224px] mx-auto px-0 w-full md:w-[calc(100%-32px)] relative",children:t})}},52279:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(85893),i=n(67294),o=n(41248),a=n(82778),l=n(97797);function c(e){let{children:t}=e,n=(0,o.I0)();return(0,i.useEffect)(()=>{let e=JSON.parse(localStorage.getItem("data"));if(null==e?void 0:e.agentAvatarRef){let[t,r]=e.agentAvatarRef.split(":");(0,a.EH)(t,r).then(e=>{n((0,l.av)({avatar_ref_url:e}))})}},[n]),(0,r.jsx)("div",{className:"grid grid-cols-1 gap-0 max-w-[1600px] mx-auto w-full",children:t})}},75271:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return W}});var r=n(85893),i=n(11163),o=n(40544),a=n(67294),l=n(6529),c=n.n(l),s=n(59587),d=n(17856),u=e=>{let{ix:t,icon:n,title:i,description:o="",target:a=null,value:l=null,onClick:u=()=>{},type:m="",disabled:g=!1,warn:h=!1,time:p=null,readOnly:f=!1}=e;return(0,r.jsxs)("div",{className:"col-span-2 lg:col-span-1 pt-4",children:[99==t&&(0,r.jsx)("div",{className:"text-[#80C6AD] text-4xl p-8 ".concat(c().handwriting),children:"Start here!"}),99==t&&(0,r.jsx)("div",{className:c()["curved-arrow-".concat(t)]}),(0,r.jsx)("a",{href:a,className:"",style:{textDecoration:"none"},children:(0,r.jsxs)("div",{className:"shadow-md border border-purple-10 rounded-xl px-5 py-8 max-w-md ".concat(c()["card-bg"]),children:[(0,r.jsxs)("div",{className:"flex justify-between items-center",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("img",{src:null==n?void 0:n.src,className:"w-10 h-10 object-contain"}),(0,r.jsx)("div",{className:"font-bold p-2",children:i})]}),l?(0,r.jsx)("img",{src:h?null===d.Z||void 0===d.Z?void 0:d.Z.src:null===s.Z||void 0===s.Z?void 0:s.Z.src,className:"w-10 h-10 object-contain rounded-full p-2",style:{background:"#F2F9F7"}}):p&&(0,r.jsx)("div",{className:"py-2 px-4 text-black-50 rounded-full",children:p})]}),(0,r.jsxs)("div",{className:"h-[calc(3em*1.5)] py-4 ",children:[o,"."]}),!f&&(l?(0,r.jsx)("div",{className:"bg-white ".concat(h?"text-yellow-700 border-yellow-500":"text-green-600 border-green-600"," border-[1px] text-lg rounded-md text-center h-12 flex items-center justify-center"),children:l}):(0,r.jsx)("div",{className:"text-center text-purple-110 h-12 flex items-center justify-center",children:"Start"}))]})})]})};n(61842);var m=n(87624),g=n(80080),h=n(22372),p=n(29820),f=n(49569),v=n(79577),x=n(19217),_=n(82951),w=n(96657),y=n(61634),b={src:"/_next/static/media/question-25.fd43de54.svg",height:1024,width:1024,blurWidth:0,blurHeight:0},j=e=>{let{children:t}=e;return(0,r.jsx)("div",{className:"grid gap-4",children:t})},N=n(21477),E=n(75413),C=n(6911),S=n(61349),Z=n(23922),q=n(55626),O={src:"/_next/static/media/line_gray.2024aaca.svg"},D=e=>{let{customerProfile:t,agent:n,items:i}=e;return(0,r.jsxs)("div",{className:"rounded-lg col-span-1 shadow-md p-4 mb-6 w-full h-64 ".concat(c()["card-bg"]),children:[(0,r.jsx)("div",{className:"font-bold text-lg py-2 text-center",children:"Your Summary"}),i.map((e,t)=>!e.disabled&&(0,r.jsxs)("div",{className:"flex px-2",children:[(0,r.jsx)("img",{src:e.value?s.Z.src:O.src}),(0,r.jsxs)("div",{className:"px-2",children:[e.title,":"," ",e.value&&(0,r.jsx)("span",{className:"font-bold",children:e.value})]})]},t))]})};let k=n(83454).env.NEXT_PUBLIC_DEV_MODE;function A(){let e=(0,i.useRouter)(),[t,n]=(0,a.useState)(null),[l,d]=(0,a.useState)(null),[O,A]=(0,a.useState)(0),[Q,I]=(0,a.useState)(!1),[M,W]=(0,a.useState)(null),[H,F]=(0,a.useState)([]),[P,U]=(0,a.useState)(null),[L,R]=(0,a.useState)(null),[T,B]=(0,a.useState)(!1),[G,Y]=(0,a.useState)(!1),[X,J]=(0,a.useState)("phone"),z=new Date;z.setMonth(9),z.setDate(15),z<new Date&&z.setFullYear(z.getFullYear()+1);let[V,K]=(0,a.useState)({title:"Medicare 101",short:"An Overview",icon:x.Z,target:"/connect/medicare101/intro",completed:(null==l?void 0:l.medicare_101_text)&&!0});if(new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0,minimumFractionDigits:0}),(0,a.useEffect)(()=>{N.C.getCustomerSession().then(t=>{if(null==t?void 0:t.customerId)n(t.customerId),Y(!1);else if("true"==localStorage.getItem("anonymous")){var r;Y(!0),(null===(r=localStorage.getItem("accessToken"))||void 0===r?void 0:r.toLocaleLowerCase().includes("_email"))?J("email"):J("phone"),I(localStorage.getItem("hideWelcome"))}else e.push("/user/login")})},[]),(0,a.useEffect)(()=>{t&&(N.C.getProfile({customerId:t}).then(e=>{d(e),I(e.hide_welcome),A(0+(e.medicare_101_text?1:0)+(e.adjusted_cost?1:0)+(e.rec_enroll_text?1:0)+(e.plan_recommendation?1:0)+(e.compare_text?1:0)+(e.how_to_enroll?1:0)+(M?1:0)),e.chosen_agent_id&&E.G.getAgentById(e.chosen_agent_id).then(e=>{W(e)}),B(e.onboarding_enrolled)}),S.n.getMedicareCosts().then(e=>{U(e)}))},[t]),(0,a.useEffect)(()=>{l&&(l.chosen_agent_id&&E.G.getAgentById(l.chosen_agent_id).then(e=>{k&&console.log("Agent",e),W(e)}),T?F([{title:"What's your current Medicare plan?",icon:g.Z,target:"/connect/onboarding/current-plan",completed:((null==l?void 0:l.current_plan)||(null==l?void 0:l.current_carrier))&&!0},{title:"Connect with an advisor",icon:f.Z,target:"/connect/agent/intro",completed:M&&!0}]):F([{title:"Medicare 101",short:"An Overview",icon:x.Z,target:"/connect/medicare101/intro",completed:(null==l?void 0:l.medicare_101_text)&&!0},{title:"Which plan is right for me?",icon:g.Z,target:"/connect/which/intro",completed:(null==l?void 0:l.plan_recommendation)&&!0},{title:"How much will it cost?",icon:p.Z,target:"/connect/cost/intro",completed:(null==l?void 0:l.adjusted_cost)&&!0},{title:"Compare with my plan",icon:v.Z,target:"/connect/compare/intro",completed:(null==l?void 0:l.compare_text)&&!0},{title:"When should I enroll?",icon:m.Z,target:"/connect/when/intro",completed:(null==l?void 0:l.rec_enroll_text)&&!0},{title:"How to sign up?",icon:h.Z,target:"/connect/how/intro",completed:(null==l?void 0:l.how_to_enroll)&&!0},{title:"Connect with an advisor",icon:f.Z,target:"/connect/agent/intro",completed:M&&!0}]))},[l]),(0,a.useEffect)(()=>{H.length>0&&K(H.find(e=>!e.completed))},[H]),(0,a.useEffect)(()=>{l&&P&&R(C.L.getEstimatedCosts(l,P))},[l,P]),!G&&(!t||!l))return(0,r.jsx)("div",{className:"flex items-center justify-center h-screen text-white",children:"Loading your MedicareSimple dashboard..."});if(l&&"false"==Q)e.push("/connect/onboarding/intro");else{var $,ee,et,en,er,ei,eo,ea,el,ec;return(0,r.jsxs)(r.Fragment,{children:[G&&(0,r.jsx)("div",{className:"fixed inset-0 w-screen h-screen flex flex-col items-center justify-center z-50",children:(0,r.jsxs)("div",{children:["email"==X&&(0,r.jsx)(q.default,{onSuccess:()=>{console.log("On Success"),Y(!1),e.reload()}}),"phone"==X&&(0,r.jsx)(Z.Z,{onSuccess:()=>{console.log("On Success"),Y(!1),e.reload()}})]})}
1),(0,r.jsxs)(o.Z,{className:G&&"blur-sm opacity-30",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 ".concat(T?"md:grid-cols-3 w-5xl":"md:grid-cols-3 w-full"),children:[!T&&(0,r.jsx)("div",{className:"rounded-lg col-span-1 shadow-md p-4 mb-6 w-full h-64 ".concat(c()["card-bg"]),children:V?(0,r.jsxs)("a",{href:V.target,children:[(0,r.jsx)("div",{className:"font-bold text-lg py-2 text-center ",children:"Up Next!"}),(0,r.jsx)("img",{className:"mx-auto transform w-24 h-24 object-cover",src:V.icon.src}),(0,r.jsx)("div",{className:"font-bold text-lg pt-2 text-center",children:V.title}),(0,r.jsx)("div",{className:"text-black-60 text-lg text-center",children:V.short})]}):O>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"font-bold text-lg py-2 text-center",children:"Completed"}),(0,r.jsxs)("div",{className:"flex items-center justify-center text-[96px] text-purple-110 font-bold",children:[O?Math.floor(O/7*100):0,"%"]})]})}),!T&&(0,r.jsx)(D,{customerProfile:l,agent:M,items:[{title:"Enrollment Date",value:null==l?void 0:l.rec_enroll_text},{title:"Which plan",value:null==l?void 0:l.plan_recommendation},{title:"Cost",value:(null==l?void 0:l.adjusted_cost)?null==L?void 0:L.yourPremiumDisplay:null},{title:"Agent",value:M?"".concat(null==M?void 0:M.first_name," ").concat(null==M?void 0:M.last_name):null}]}),(0,r.jsx)("div",{className:"rounded-lg shadow-md p-4 mb-6 w-full h-64 ".concat(c()["card-bg"]),children:M?(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-bold text-lg py-2 text-center",children:"Your Agent"}),(0,r.jsx)("img",{className:"mx-auto transform w-32 h-32 rounded-full bg-black-10 object-cover",src:null==M?void 0:M.image}),(0,r.jsxs)("div",{className:"relative flex items-center justify-center",children:[(0,r.jsx)("img",{src:s.Z.src,className:"absolute left-8 px-2"}),(0,r.jsx)("div",{className:"font-bold text-lg py-3 text-center",children:"".concat(null==M?void 0:M.first_name," ").concat(null==M?void 0:M.last_name)})]})]}):T||O<=0?(0,r.jsxs)("a",{href:"/connect/medicare101/intro",children:[(0,r.jsx)("div",{className:"font-bold text-lg py-2 text-center ",children:"Get Started"}),(0,r.jsx)("div",{className:"pt-4 text-black-60 text-lg text-center",children:T?"Work through the modules below at your own pace to update your current care details, then\n                    connect with an advisor when you are ready.":"Work through the modules below at your own pace to learning about Medicare and then\n                      connect with an advisor when you are ready."})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"font-bold text-lg py-2 text-center ",children:"Completed"}),(0,r.jsxs)("div",{className:"flex items-center justify-center text-[96px] text-purple-110 font-bold",children:[O?Math.floor(O/7*100):0,"%"]})]})}),T&&(0,r.jsx)(D,{customerProfile:l,agent:M,items:[{title:"Current Plan",value:null==l?void 0:l.current_plan},{title:"Current Insurance Carrier",value:null==l?void 0:l.current_carrier,disabled:!0},{title:"Checkup Recommendation",value:null==l?void 0:l.plan_recommendation},{title:"Prescriptions",value:l.prescriptions?"Updated":null},{title:"Doctors",value:l.doctors?"Updated":null},{title:"Agent",value:M?"".concat(null==M?void 0:M.first_name," ").concat(null==M?void 0:M.last_name):null}]}),T&&(0,r.jsxs)("div",{className:"rounded-lg col-span-1 shadow-md p-4 mb-6 w-full h-64 ".concat(c()["card-bg"]),children:[(0,r.jsx)("div",{className:"font-bold text-lg py-2 text-center",children:"AEP starts in"}),(0,r.jsx)("div",{className:"pt-3 flex text-center items-center justify-center text-[96px] text-purple-110 font-bold text-wrap leading-none",children:Math.floor((z-new Date)/864e5)}),(0,r.jsx)("div",{className:"pt-3 flex text-center items-center justify-center text-[24px] text-purple-110 font-bold text-wrap leading-none",children:"Days"})]})]}),(0,r.jsxs)(j,{children:[(0,r.jsx)("div",{className:"col-span-2 text-[#80C6AD] text-4xl text-center pt-4 ".concat(c().handwriting),children:(0,r.jsx)("hr",{className:"mt-2"})}),T?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u,{ix:"11",className:"grid-container",icon:y.Z,title:"What's your current Medicare plan?",description:"Track your current plan type and carrier",target:"/connect/onboarding/current-plan?skipWelcome=true",warn:!(null==l?void 0:l.current_carrier)&&(null==l?void 0:null===(ee=l.current_plan)||void 0===ee?void 0:ee.includes("not sure")),value:!(null==l?void 0:l.current_carrier)&&(null==l?void 0:null===(et=l.current_plan)||void 0===et?void 0:et.includes("not sure"))?"Not sure":(null==l?void 0:l.current_plan)&&"".concat((null==l?void 0:l.current_carrier)||""," ").concat((null==l?void 0:null===(en=l.current_plan)||void 0===en?void 0:en.includes("not sure"))?"":(null==l?void 0:null===(er=l.current_plan)||void 0===er?void 0:er.includes("Original"))?null==l?void 0:l.current_plan:null==l?void 0:null===(ei=l.current_plan)||void 0===ei?void 0:ei.replace("Medicare","")),time:"1 min"}),(0,r.jsx)(u,{ix:"12",className:"grid-container",icon:w.Z,title:"Update your prescription drugs",description:"Keep track of your preferred pharmacy and current prescriptions",target:"/connect/collect/pharmacy?target=dashboard",value:l.prescriptions?"".concat((null===(eo=l.prescriptions)||void 0===eo?void 0:eo.includes("none"))?"No":null===(ea=l.prescriptions)||void 0===ea?void 0:ea.length," Prescriptions"):null,time:"2 min"}),(0,r.jsx)(u,{ix:"12",className:"grid-container",icon:_.Z,title:"Update your doctor",description:"Update your doctor(s), specialists, and preferred hospital",target:"/connect/collect/doctors?target=dashboard",value:l.doctors?"".concat((null===(el=l.doctors)||void 0===el?void 0:el.length)===1?l.doctors[0]:"".concat(null===(ec=l.doctors)||void 0===ec?void 0:ec.length," Doctors")):null,time:"2 min"}),(0,r.jsx)(u,{ix:"1",icon:g.Z,title:"Plan Checkup",description:"Make sure that your plan is the right type for you",target:"/connect/which/intro?target=dashboard",value:null==l?void 0:l.plan_recommendation,time:"5 min"}),(0,r.jsx)(u,{ix:"3",icon:v.Z,title:"Compare plan costs",description:"Compare the average cost of Medicare plan options",target:"/connect/compare/intro?mode=reconnect",value:(null==l?void 0:l.compare_text)&&"Completed",time:"2 min"}),(0,r.jsx)(u,{ix:"6",className:"grid-container",icon:f.Z,title:"Connect with an advisor",description:"Find a professional to help you enroll into a 
1new plan",target:"/connect/agent/intro",value:M?"Connected to ".concat("".concat(null==M?void 0:M.first_name," ").concat(null==M?void 0:M.last_name)):null,time:"3 min"}),(0,r.jsx)(u,{ix:"0",icon:x.Z,title:"Medicare refresher",description:"Review the basics of Medicare",target:"/connect/medicare101/intro",value:(null==l?void 0:l.medicare_101_text)&&"Completed",time:"7 min"}),(0,r.jsx)(u,{ix:"7",className:"grid-container",icon:b,title:"Additional information",description:"Review some frequently asked questions and other scenarios",target:"/connect/faq/intro",time:""})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u,{ix:"0",icon:x.Z,title:"Medicare 101",description:"Quickly learn the basics of Medicare",target:"/connect/medicare101/intro",value:(null==l?void 0:l.medicare_101_text)&&"Completed",time:"7 min"}),(0,r.jsx)(u,{ix:"1",icon:g.Z,title:"Which plan is right for me?",description:"Discover which type of Medicare plan fits your needs",target:"/connect/which/intro",value:null==l?void 0:l.plan_recommendation,time:"5 min"}),(0,r.jsx)(u,{ix:"2",icon:p.Z,title:"How much will it cost?",description:"Personalized estimate of Medicare costs",target:"/connect/cost/intro",value:(null==l?void 0:l.adjusted_cost)&&(L&&(null==L?void 0:null===($=L.partC)||void 0===$?void 0:$.premium)?L.yourPremiumDisplay:"Calculating..."),time:"3 min"}),(0,r.jsx)(u,{ix:"3",icon:v.Z,title:"Compare to my current plan",description:"Compare your existing plan to Medicare options",target:"/connect/compare/intro",value:(null==l?void 0:l.compare_text)&&"Completed",time:"2 min"}),(0,r.jsx)(u,{ix:"4",icon:m.Z,title:"When should I enroll?",description:"Discover the best time to enroll",target:"/connect/when/intro",value:null==l?void 0:l.rec_enroll_text,time:"5 min"}),(0,r.jsx)(u,{ix:"5",className:"grid-container",icon:h.Z,title:"How do I enroll?",description:"Learn the steps to enrollment",target:"/connect/how/intro",value:null==l?void 0:l.how_to_enroll,time:"5 min"}),(0,r.jsx)(u,{ix:"6",className:"grid-container",icon:f.Z,title:"Connect with an advisor",description:"Find a professional to help you enroll into a new plan",target:"/connect/agent/intro",value:M?"Connected to ".concat("".concat(null==M?void 0:M.first_name," ").concat(null==M?void 0:M.last_name)):null,time:"3 min"}),(0,r.jsx)(u,{ix:"7",className:"grid-container",icon:b,title:"Additional Information",description:"Review some frequently asked questions and other scenarios",target:"/connect/faq/intro",time:""})]})]})]})]})}}var Q=n(9008),I=n.n(Q),M=n(52279),W=()=>(0,r.jsxs)(M.Z,{children:[(0,r.jsx)(I(),{children:(0,r.jsx)("title",{children:"Connect"})}),(0,r.jsx)("main",{children:(0,r.jsx)(A,{})})]})},75413:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});var r=n(82778);let i={getEligibleAgents:async function(e){let{customerId:t}=e,n=null;if(t){let{data:e,error:i}=await r.OQ.from("customer").select("*").eq("id",t).maybeSingle();if(n=null==e?void 0:e.group_id,i)throw console.error("Error fetching customer:",i),i;if(!e)throw console.error("No customer found"),Error("No customer found")}let i=r.OQ.from("agent").select("\n    *,\n    agent_listing (\n      location,\n      description,\n      years_service,\n      licensed_in\n    )\n  ").eq("active",!0);if(null!=n){let e=await r.OQ.from("agent_group").select("agent_id").eq("group_id",n);i=i.in("id",e.data.map(e=>e.agent_id))}else i=i.eq("eligible",!0);let{data:o,error:a}=await i;if(a)throw console.error("Error fetching agents:",a),a;return o.forEach(e=>{if(null==e?void 0:e.avatar_ref){let[t,n]=e.avatar_ref.split(":");(0,r.EH)(t,n).then(t=>{e.image=t})}}),o},getAgentById:async function(e){var t;let{data:n,error:i}=await r.OQ.from("agent").select("\n      *,\n      agent_listing (\n        location,\n        description,\n        years_service,\n        licensed_in\n      )\n    ").eq("id",e).maybeSingle();if(i)throw console.error("Error fetching agent:",i),i;if(null==n?void 0:n.avatar_ref){let[e,t]=n.avatar_ref.split(":");(0,r.EH)(e,t).then(e=>{n.image=e})}return(null==n?void 0:null===(t=n.agent_listing)||void 0===t?void 0:t[0])&&(n={...n,...n.agent_listing[0]}),n},updateAgent:async function(e,t){let{data:n,error:i}=await r.OQ.from("agent").update(t).eq("id",e);if(i)throw console.error("Error updating agent:",i),i;return n},upsertAgent:async function(e,t){let{data:n,error:i}=await r.OQ.from("agent").upsert([{id:e,...t,created_by:e}]),{data:o,error:a}=await r.OQ.from("agent").select("*").eq("id",e).eq("active",!0).maybeSingle();if(a)throw console.error("Error fetching agent:",i),i;return o},markAgentAsDeleted:async function(e){let{data:t,error:n}=await r.OQ.from("agent").update({active:!1}).eq("id",e);if(n)throw console.error("Error updating agent:",n),n;return t},getAgentListing:async function(e){let{data:t,error:n}=await r.OQ.from("agent_listing").select("*").eq("agent_id",e).eq("active",!0).maybeSingle();if(n)throw console.error("Error fetching agent listing:",n),n;return t},upsertAgentListing:async function(e,t){let n;let{data:i,error:o}=await r.OQ.from("agent_listing").select("*").eq("agent_id",e).single();if(o&&"PGRST116"!==o.code)throw console.error("Error querying agent listing:",o),o;if(i){let{data:i,error:o}=await r.OQ.from("agent_listing").update({description:t.description,location:t.location,years_service:t.years_service,licensed_in:t.licensed_in,active:!0}).eq("agent_id",e).select("*").single();if(o)throw console.error("Error updating agent listing:",o),o;n=i}else{let{data:i,error:o}=await r.OQ.from("agent_listing").insert([{agent_id:e,...t,active:!0}]).select().single();if(o)throw console.error("Error inserting agent listing:",o),o;n=i}return n},getAgentUrlListing:async function(e){let{data:t,error:n}=await r.OQ.from("client").select("\n      id,\n      name,\n      group:group (\n        id,\n        name,\n        agent_group:agent_group (\n          id,\n          group_id\n        )\n      )\n    ").eq("created_by",e).limit(1).maybeSingle();if(n)throw console.error("Error fetching client:",n),n;if(!t)return null;let{data:i,error:o}=await r.OQ.from("access_control").select("*").eq("group_id",t.group[0].id).eq("type","ACCESS_CODE").eq("created_by",e).maybeSingle();if(o)throw console.error("Error fetching access control:",o),o;return{groupId:t.group[0].id,clientId:t.id,groupName:t.group[0].name,clientName:t.name,urlPath:(null==i?void 0:i.entry)||null}},upsertAgentUrlListing:async function(e,t){let n,i,o;let{data:a,error:l}=await r.OQ.from("agent").select("first_name, last_name").eq("id",e).single();if(l)throw console.error("Error fetching agent:",l),l;
1let c="".concat(a.first_name," ").concat(a.last_name),{data:s,error:d}=await r.OQ.from("client").select("id").eq("created_by",e).maybeSingle();if(d)throw console.error("Error querying client:",d),d;if(s)n=s;else{let{data:t,error:i}=await r.OQ.from("client").insert({name:c,admin_user_id:e,created_by:e}).select().single();if(i)throw console.error("Error creating client:",i),i;n=t}let{data:u,error:m}=await r.OQ.from("group").select("id").eq("client_id",n.id).eq("created_by",e).maybeSingle();if(m)throw console.error("Error querying group:",m),m;if(u)i=u;else{let{data:t,error:o}=await r.OQ.from("group").insert({client_id:n.id,name:c,created_by:e}).select().single();if(o)throw console.error("Error creating group:",o),o;i=t}let{data:g,error:h}=await r.OQ.from("agent_group").select("id").eq("agent_id",e).eq("group_id",i.id).eq("created_by",e).maybeSingle();if(h)throw console.error("Error querying agent_group:",h),h;if(!g){let{data:t,error:n}=await r.OQ.from("agent_group").insert({agent_id:e,group_id:i.id,created_by:e}).select().single();if(n)throw console.error("Error creating agent_group:",n),n}let{data:p,error:f}=await r.OQ.from("access_control").select("id").eq("group_id",i.id).eq("type","ACCESS_CODE").eq("created_by",e).maybeSingle();if(f)throw console.error("Error querying access control:",f),f;if(p){let{data:e,error:n}=await r.OQ.from("access_control").update({entry:t}).eq("id",p.id).select().single();if(n)throw console.error("Error updating access control:",n),n;o=e}else{let{data:n,error:a}=await r.OQ.from("access_control").insert({entry:t,type:"ACCESS_CODE",group_id:i.id,created_by:e}).select().single();if(a)throw console.error("Error creating access control:",a),a;o=n}return{groupId:i.id,clientId:n.id,groupName:i.name,clientName:n.name,urlPath:o.entry}},checkUrlPathExists:async function(e){let{data:t,error:n}=await r.OQ.from("access_control").select("id, created_by").eq("entry",e).eq("type","ACCESS_CODE").maybeSingle();if(n)throw console.error("Error checking URL path:",n),n;return!!t}}},6911:function(e,t,n){"use strict";n.d(t,{L:function(){return i}}),n(83454).env.NEXT_PUBLIC_DEV_MODE;let r=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0,minimumFractionDigits:0}),i={getEstimatedCosts:function(e,t){if(e&&t){var n,i,o,a,l,c,s;let d=e.irmaa,u=e.irmaa_rx,m=Number((null==t?void 0:null===(n=t.partB)||void 0===n?void 0:n.premium)+(d||0)+(null==t?void 0:null===(i=t.partC)||void 0===i?void 0:i.premium)+(u||0)),g=Number((null==t?void 0:null===(o=t.partB)||void 0===o?void 0:o.premium)+(d||0)+(null==t?void 0:null===(a=t.supplement)||void 0===a?void 0:a.premium)+(null==t?void 0:null===(l=t.extras)||void 0===l?void 0:l.dental)+(null==t?void 0:null===(c=t.extras)||void 0===c?void 0:c.vision)+(null==t?void 0:null===(s=t.partD)||void 0===s?void 0:s.premium)+(u||0)),h=null!=e.plan_recommendation?"Medicare Advantage"==e.plan_recommendation?m:g:null;return{...t,irmaa:d,irmaaRx:u,partC:{premium:m},supplement:{premium:g},includesIrmaa:null!=d,yourPremium:h,yourPremiumDisplay:h?"".concat(r.format(h)," / month"):"".concat(r.format(m)," to \n  ").concat(r.format(g)," / month")}}return console.warn("Could not calculate estimated costs"),t}}},61349:function(e,t,n){"use strict";n.d(t,{n:function(){return c}});var r=n(82778);async function i(e){let{data:t,error:n}=await r.OQ.from("system_settings").select("settings").eq("name",e).single();if(n)throw console.error("Error fetching settings:",n),n;return t.settings}async function o(){return await i("medicare_costs")}async function a(){return await i("faqs")}async function l(){return await i("analysis_defaults")}let c={getSettings:i,getMedicareCosts:o,getFAQs:a,getAnalysisDefaults:l}},6529:function(e){e.exports={gridcontainer:"styles_gridcontainer__gFqJD",card:"styles_card__WmYkH","card-bg":"styles_card-bg__RHMTy","curved-arrow-0":"styles_curved-arrow-0__Qd3ip","curved-arrow-2":"styles_curved-arrow-2__aiQfb","curved-arrow-4":"styles_curved-arrow-4__Q72c0","curved-arrow-1":"styles_curved-arrow-1__wp8re","curved-arrow-3":"styles_curved-arrow-3__eN3bb","curved-arrow-5":"styles_curved-arrow-5__N5FCo",handwriting:"styles_handwriting__9J1wa"}}},function(e){e.O(0,[2216,5626,3922,2888,9774,179],function(){return e(e.s=45712)}),_N_E=e.O()}]);

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.