"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[900],{95875:function(e,t,a){a.d(t,{U:function(){return r}});var i=a(10265);let r={[i.JJ.PreEligibility]:"pre_eligibility",[i.JJ.ContactDetails]:"contact_details",[i.JJ.InsuranceDetails]:"insurance_details",[i.JJ.InsuranceDetailsReview]:"insurance_details_review",[i.JJ.ApplicationReview]:"application_review",[i.JJ.ApplicationComplete]:"application_complete",[i.JJ.EligibilityUnmet]:"eligibility_unmet",[i.JJ.ApplicationDetected]:"account_already_exists",[i.JJ.EmailVerification]:"otp_code",[i.JJ.OnboardingChecklist]:"welcome",[i.JJ.ReviewConsents]:"agree_to_receive_care",[i.JJ.CreatePassword]:"create_password",[i.JJ.AppDownload]:"download_the_app",closeWorkflowEvent:"eligibility_signup_closed",openPartnerSelectorEvent:"partner_selector_opened",closeWorkflowConfirmationEvent:"eligibility_signup_cancel_confirmation_screen",abortCloseWorkflow:"eligibility_signup_cancel_aborted",phoneNumberClicked:"contact_phone_clicked",editEmail:"edit_email",patientConsent:"patient_consent",declinePatientConsent:"decline_patient_consent"}},4e4:function(e,t,a){a.d(t,{o:function(){return checkBenefits}});var i=a(78260),r=a(29262);let n={name:"Flyte Medical",npi:"1992372403"},serializeBenefitsCheck=e=>{let{payerCode:t,firstName:a,lastName:i,birthdate:o,insuranceMemberID:s,provider:l}=e;return{payer:{payerCode:t},patient:{firstName:a,lastName:i,dateOfBirth:(0,r.f)(o),memberId:s},provider:l||n}},checkBenefits=async e=>{let t=serializeBenefitsCheck(e),a=await i.Z.post("/api/benefits/check",t);return a}},78260:function(e,t,a){a.d(t,{Z:function(){return n}});var i=a(5121);let r=i.Z.create();var n=r},76364:function(e,t,a){a.d(t,{m:function(){return checkEligibility}});var i=a(78260),r=a(29262);let serializeEligibilityCheck=e=>{let{firstName:t,lastName:a,birthdate:i,insuranceMemberID:n,insurance:o,benefitProgram:s}=e;return{firstName:t,lastName:a,dateOfBirth:(0,r.f)(i),memberId:n,insurer:o,employerProgram:s}},checkEligibility=async e=>{try{let t=serializeEligibilityCheck(e),a=await i.Z.post("/api/eligibility/check",t);return a}catch(e){throw e}}},20893:function(e,t,a){a.d(t,{$:function(){return createLead}});var i=a(78260),r=a(52766),n=a(67063),o=a(81058);let serializeLead=e=>{let{birthdate:t,currentWeightInPounds:a,highestWeightInPounds:i,dateOfHighestWeightValue:s,heightInFoot:l,heightInInch:c,phone:d,insuranceCoverage:u,insuranceMemberID:h,state:m,benefitProgram:p,howDidYouFindUS:g,firstName:x,lastName:b,ssn:y,benefitsCheck:v,eligibilityVerifiedBy:f,...C}=e;return{...C,birthdate:(0,r.f1)(t),currentWeightInPounds:(0,r.MC)(a),highestWeightInPounds:(0,r.MC)(i),dateOfHighestWeightValue:"".concat(s,"-01-01"),heightInFoot:(0,r.MC)(l),...c&&{heightInInch:(0,r.MC)(c)},...h&&{insuranceMemberID:h},...d&&{phone:(0,o.X)(d)},...g&&{howDidYouFindUS:g},...x&&{firstName:x},...b&&{lastName:b},...m&&{state:m},...v&&{...(0,n.D)(v)},...f&&{eligibilityVerifiedBy:f}}},createLead=async e=>{let t=serializeLead(e),a=await i.Z.post("/api/lead",t);return a}},28588:function(e,t,a){a.d(t,{J:function(){return ApplicationComplete}});var i=a(85893),r=a(71986),n=a(57087),o=a(25675),s=a.n(o),l=a(42575),c=a(76849),d=a(93773);let ApplicationComplete=e=>{let{title:t,email:a,description:o}=e,u=(0,l.d)();return(0,i.jsxs)(n.D,{gap:{lg:"spacer-16",xl:"spacer-18",xxl:"spacer-64"},alignItems:"start","data-test":d.J.ApplicationComplete,children:[(0,i.jsxs)(r.Flex,{direction:"column",justifyContent:{lg:"space-between"},height:"100%",children:[(0,i.jsxs)(r.Box,{children:[t,(0,i.jsx)(r.Box,{backgroundColor:"background-container-active",px:"spacer-7",py:"spacer-6",borderRadius:"radii-2",mt:"spacer-7",display:{base:"block",lg:"inline-block"},children:(0,i.jsx)(r.Text,{variant:"text-header-M",children:a})}),o]}),(0,i.jsxs)(r.Box,{children:[(0,i.jsx)(r.Text,{mt:"spacer-16",color:"text-secondary",variant:"text-body-bold",children:"Need some help?"}),(0,i.jsxs)(r.Text,{color:"text-secondary",variant:"text-body-regular",mt:"spacer-1",children:["Please call ",(0,i.jsx)(c.R,{fontWeight:"thin"})," to speak with a Care Coordinator."]})]})]}),!u&&(0,i.jsx)(s(),{alt:"Application Complete",width:340,height:340,src:"/static/assets/application-complete.png"})]})}},4225:function(e,t,a){a.d(t,{v:function(){return ApplicationDetected}});var i=a(85893),r=a(71986),n=a(57087),o=a(25675),s=a.n(o),l=a(42575),c=a(76849),d=a(93773);let ApplicationDetected=e=>{let{title:t,email:a,description:o}=e,u=(0,l.d)();return(0,i.jsxs)(n.D,{gap:{lg:"spacer-16",xl:"spacer-18",xxl:"spacer-64"},alignItems:"start","data-test":d.J.ApplicationDetected,children:[(0,i.jsxs)(r.Flex,{direction:"column",justifyContent:{lg:"space-between"},height:"100%",children:[(0,i.jsxs)(r.Flex,{gap:"spacer-6",direction:"column",children:[t,(0,i.jsx)(r.Box,{alignSelf:{lg:"start"},backgroundColor:"background-container-active",px:"spacer-7",py:"spacer-6",borderRadius:"radii-2",display:{base:"block",lg:"inline-block"},children:(0,i.jsx)(r.Text,{variant:"text-header-M",children:a})}),o]}),(0,i.jsxs)(c.R,{mt:"spacer-7",size:"l",leadingIcon:(0,i.jsx)(r.IconPhone,{}),"aria-label":"Contact Us",variant:"primary-alt",isInline:!1,justifyContent:"center",alignSelf:"start",children:["Call ",c._.formatted]})]}),!u&&(0,i.jsx)(s(),{alt:"Application Detected",width:340,height:340,src:"/static/assets/application-detected.png"})]})}},9941:function(e,t,a){a.d(t,{G:function(){return ApplicationReview}});var i=a(85893),r=a(71986),n=a(57087),o=a(25675),s=a.n(o),l=a(76849),c=a(93773),d=a(42575);let ApplicationReview=e=>{let{title:t,note:a}=e,o=(0,d.d)();return(0,i.jsxs)(n.D,{gap:{lg:"spacer-16",xl:"spacer-18",xxl:"spacer-64"},alignItems:"start","data-test":c.J.ApplicationReview,children:[(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-7",children:[t,(0,i.jsxs)(l.R,{size:"l",leadingIcon:(0,i.jsx)(r.IconPhone,{}),"aria-label":"Contact Us",variant:"primary-alt",isInline:!1,justifyContent:"center",alignSelf:"start",children:["Call ",l._.formatted]}),a]}),!o&&(0,i.jsx)(s(),{alt:"Application Review",width:340,height:340,src:"/static/assets/application-review.png"})]})}},78430:function(e,t,a){a.d(t,{e:function(){return ConfirmationExitModal}});var i=a(85893),r=a(67294),n=a(71986);let ConfirmationExitModal=e=>{let{isOpen:t,onLeave:a,onContinue:o}=e,s=(0,r.useRef)(null);return(0,i.jsxs)(n.Modal,{isOpen:t,onClose:o,autoFocus:!1,isCentered:!0,initialFocusRef:s,children:[(0,i.jsx)(n.Modal.Overlay,{}),(0,i.jsxs)(n.Modal.Content,{px:"spacer-7",py:"spacer-6",gap:"spacer-7",mx:{base:"spacer-9",md:0},maxWidth:"26.25rem",children:[(0,i.jsxs)(n.Modal.Body,{p:0,children:[(0,i.jsx)(n.Text,{variant:"text-body-large-bold",children:"Are you sure you want to leave?"}),(0,i.jsx)(n.Text,{color:"text-secondary",variant:"text-body-regular",children:"You haven't finished signing up. If you leave, all information will be cleared."})]}),(0,i.jsxs)(n.Modal.Footer,{flexDirection:{base:"column",md:"row-reverse"},gap:"spacer-4",p:0,children:[(0,i.jsx)(n.Button,{variant:"secondary",size:"m",flex:1,width:"100%",onClick:o,ref:s,children:"Continue signing up"}),(0,i.jsx)(n.Button,{variant:"destroy",size:"m",flex:1,width:"100%",onClick:a,children:"Leave now"})]})]})]})}},22390:function(e,t,a){a.d(t,{$S:function(){return PhoneField},u8:function(){return ReferrerSelector},KP:function(){return TermsAgreementField}});var i=a(85893),r=a(71986),n=a(6426),o=a(58278),s=a(47209),l=a(87536),c=a(37887),d=a(98951);let u="phone",PhoneField=e=>{let{isDisabled:t,...a}=e,{register:h,setValue:m,formState:{errors:p}}=(0,l.Gc)(),g=(0,s.T)(u,p,"validate");return(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-2",...a,children:[(0,i.jsx)(r.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:u,children:"Mobile phone"}),(0,i.jsx)(n.sb,{"data-test":u,id:u,isInvalid:g,isDisabled:t,onInput:e=>m(u,e.currentTarget.value),...h(u,{required:!0,validate:e=>(0,c.Z)(e,"US",d.Z)||o.x[u].validate})}),g&&(0,i.jsx)(n.VO,{errors:p,name:u})]})},h="howDidYouFindUS",m=["Brochure","Company Intranet","Email","Employee Referral","Epic EHR Referral","Frame Fertility","Google Ad","Mailer","Nuvance Rhinebeck","Onsite Monitor","Other","Poster","Print Ad","Professional Referral","Provider Referral","Quantum Health","Social Media","TV Ad","Trade Show","Upswing Health","Web Search","Website","Word of Mouth"],ReferrerSelector=e=>{let{isDisabled:t}=e,{register:a,watch:n}=(0,l.Gc)();return(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-2",children:[(0,i.jsx)(r.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:h,children:"How did you hear about us?"}),(0,i.jsx)(r.Select,{"data-test":h,id:h,size:"l",variant:"flushed",placeholder:"Select",isDisabled:t,...a(h,{required:!0}),value:n(h),children:m.map(e=>(0,i.jsx)("option",{value:e,children:e},e))})]})},p="termsAgreement",TermsAgreementField=e=>{let{isDisabled:t,...a}=e,{register:n}=(0,l.Gc)();return(0,i.jsxs)(r.Flex,{direction:"row",gap:"spacer-2",...a,children:[(0,i.jsx)(r.Checkbox,{"data-test":p,size:{base:"l",lg:"m"},"aria-label":"I agree to the terms",isDisabled:t,...n(p,{required:!0})}),(0,i.jsxs)(r.Text,{variant:"text-body-regular",color:"text-secondary",children:["I have read and agree to the\xa0",(0,i.jsx)(r.Link,{fontWeight:"thin",variant:"link-primary",isInline:!0,isExternal:!0,href:"https://www.flytehealth.com/terms/#elementor-toc__heading-anchor-2",children:"Terms of Service"}),",\xa0",(0,i.jsx)(r.Link,{fontWeight:"thin",variant:"link-primary",isInline:!0,isExternal:!0,href:"https://www.flytehealth.com/terms/#elementor-toc__heading-anchor-3",children:"Privacy Policy"}),"\xa0&\xa0",(0,i.jsx)(r.Link,{fontWeight:"thin",variant:"link-primary",isInline:!0,href:"https://www.flytehealth.com/terms/#elementor-toc__heading-anchor-4",isExternal:!0,children:"Notice of Privacy Practice"}),"."]})]})}},79447:function(e,t,a){a.d(t,{q:function(){return ContactDetailsForm}});var i=a(85893),r=a(71986),n=a(87536),o=a(6426),s=a(57087),l=a(22390),c=a(42575),d=a(42811);let u="state",USStateSelector=e=>{let{isDisabled:t,options:a,...o}=e,{register:s,watch:l}=(0,n.Gc)();return(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-2",...o,children:[(0,i.jsx)(r.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:u,children:"State"}),(0,i.jsx)(d.e,{"data-test":u,id:u,isDisabled:t,...s(u,{required:!0}),value:l(u),options:a})]})};var h=a(58278),m=a(47209),p=a(17207);let SsnField=e=>{let{isDisabled:t,...a}=e,{register:s,setValue:l,formState:{errors:c}}=(0,n.Gc)(),d=(0,m.T)("ssn",c,["minLength","maxLength"]);return(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-2",...a,children:[(0,i.jsx)(r.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:"ssn",children:"Social Security Number"}),(0,i.jsx)(r.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"Last 4 Digits of your Social Security Number"}),(0,i.jsx)(p.T,{"data-test":"ssn",id:"ssn",isInvalid:d,isDisabled:t,onInput:e=>l("ssn",e.currentTarget.value),...s("ssn",{required:!0,minLength:{value:4,message:h.x.ssn.minLength},maxLength:{value:4,message:h.x.ssn.maxLength}})}),d&&(0,i.jsx)(o.VO,{errors:c,name:"ssn"})]})},ContactDetailsForm=e=>{let{configuration:t,loading:a=!1,onSubmit:d,defaultValues:u}=e,{contentResources:h,fields:m}=t,p=(0,n.cI)({mode:"onBlur",defaultValues:u}),g=(0,c.d)(),renderFormAction=()=>(0,i.jsx)(r.Button,{type:"submit",size:{base:"m",lg:"l"},isDisabled:!p.formState.isValid,width:"100%",isLoading:a,trailingIcon:(0,i.jsx)(r.IconArrowRight,{}),"aria-label":"Continue",children:"Continue"});return(0,i.jsx)(n.RV,{...p,children:(0,i.jsxs)(s.S,{as:"form",onSubmit:p.handleSubmit(d),noValidate:!0,children:[(0,i.jsx)(s.S.Side,{gap:0,children:h.title}),(0,i.jsxs)(s.S.Form,{children:[(0,i.jsx)(o.dO,{isDisabled:a}),(null==m?void 0:m.ssn)&&(0,i.jsx)(SsnField,{isDisabled:a}),(0,i.jsx)(o.s8,{inputProps:{isDisabled:a}}),(0,i.jsxs)(r.Flex,{direction:{base:"column",lg:"row"},gap:"spacer-9",children:[(0,i.jsx)(l.$S,{isDisabled:a,flex:1}),(null==m?void 0:m.state)&&(0,i.jsx)(USStateSelector,{isDisabled:a,flex:1,options:m.state.options})]}),(0,i.jsx)(l.u8,{isDisabled:a}),(0,i.jsx)(l.KP,{isDisabled:a,pb:{base:"spacer-24",lg:0}}),g?(0,i.jsx)(o.D2,{children:renderFormAction()}):renderFormAction()]})]})})}},55632:function(e,t,a){a.d(t,{X:function(){return EligibilityUnmetForm}});var i=a(85893),r=a(71986),n=a(87536),o=a(6426),s=a(57087),l=a(42575),c=a(93773);let EligibilityUnmetForm=e=>{let{configuration:t,loading:a=!1,isEmailSent:d=!1,hasError:u=!1,isMobileFooterSticky:h=!0,onSubmit:m}=e,{contentResources:p}=t,g=(0,n.cI)({mode:"onBlur"}),x=(0,l.d)(),renderFormAction=()=>(0,i.jsx)(r.Button,{type:"submit",size:{base:"m",lg:"l"},isDisabled:!g.formState.isValid||d,width:"100%",isLoading:a,"aria-label":"Keep me posted",children:"Keep me posted"});return(0,i.jsx)(n.RV,{...g,children:(0,i.jsxs)(s.S,{as:"form",onSubmit:g.handleSubmit(m),noValidate:!0,"data-test":c.J.EligibilityUnmet,children:[(0,i.jsx)(s.S.Side,{children:p.title}),(0,i.jsxs)(s.S.Form,{pb:{base:"spacer-24",lg:0},children:[p.alert,(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-L",children:[(0,i.jsx)(r.TextPairing.Label,{children:"We work hard to try to offer our services to everyone who wants them."}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"Please provide your contact information so we can get in touch if our criteria change and you become eligible to join."})]}),(0,i.jsx)(o.dO,{isDisabled:a||d}),(0,i.jsx)(o.s8,{inputProps:{isDisabled:a||d}}),x&&h?(0,i.jsx)(o.D2,{children:renderFormAction()}):renderFormAction(),d&&(0,i.jsxs)(r.Alert,{status:"success",variant:"subtle",children:[(0,i.jsx)(r.Alert.Icon,{}),(0,i.jsxs)(r.Box,{children:[(0,i.jsx)(r.Alert.Title,{children:(0,i.jsx)(r.Text,{variant:"text-body-bold",children:"Email received"})}),(0,i.jsx)(r.Alert.Description,{children:(0,i.jsx)(r.Text,{variant:"text-body-regular",children:"We'll keep you up to date on our latest news and will send you an email if you become eligible to join."})})]})]}),u&&(0,i.jsxs)(r.Alert,{status:"error",variant:"subtle",children:[(0,i.jsx)(r.Alert.Icon,{}),(0,i.jsx)(r.Alert.Title,{children:"There was an error submitting your information. Please review the email address above and try again."})]})]})]})})}},91176:function(e,t,a){a.d(t,{vu:function(){return InsuranceCarrierSelector},nK:function(){return InsuranceCoverageField},nB:function(){return InsuranceMemberIdField},OF:function(){return l},o0:function(){return d},rI:function(){return p}});var i=a(85893),r=a(71986),n=a(15615),o=a(67294),s=a(87536);let l="insurance",c=Object.values(n.PF).filter(e=>e!==n.PF.SelfPay),InsuranceCarrierSelector=e=>{let{isRequired:t=!0,isDisabled:a=!1,defaultSelectedItem:n,insuranceCarriers:d=c,...u}=e,[h,m]=(0,o.useState)(d),{control:p,watch:g}=(0,s.Gc)();return(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-2",...u,children:[(0,i.jsx)(r.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:l,children:"Name of the insurer"}),(0,i.jsx)(s.Qr,{control:p,name:l,rules:{required:t},render:e=>{let{field:{onChange:t,onBlur:o}}=e;return(0,i.jsxs)(r.Autocomplete,{id:"".concat(l,"-autocomplete"),items:h,onInputValueChange:e=>{let{inputValue:a}=e;if(!a){m(d),t(a);return}m(d.filter(e=>null==e?void 0:e.toLowerCase().includes(a.toLowerCase())))},onSelectedItemChange:e=>{let{selectedItem:a}=e;return t(a)},initialSelectedItem:n,selectedItem:g(l)||"",children:[(0,i.jsx)(r.Autocomplete.Input,{"data-test":l,id:l,size:"l",placeholder:"Select your insurance carrier",clearButtonMode:a?"never":"has-value",leadingIcon:(0,i.jsx)(r.IconSearch,{}),variant:"flushed",isDisabled:a,onBlur:o}),(0,i.jsx)(r.Autocomplete.List,{"data-test":"".concat(l,"List"),zIndex:2,renderItem:e=>(0,i.jsx)(r.Text,{variant:"text-body-regular",children:e}),overflowY:"auto",maxHeight:"13.5rem"})]})}})]})},d="insuranceCoverage",InsuranceCoverageField=e=>{let{isDisabled:t}=e,{register:a}=(0,s.Gc)();return(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-4",children:[(0,i.jsx)(r.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",children:"Do you have insurance coverage?"}),(0,i.jsxs)(r.RadioGroup,{display:"flex",flexDirection:"column",gap:"spacer-4",isDisabled:t,"data-test":d,children:[(0,i.jsx)(r.Radio,{value:n.eF.Insured,size:"m",...a(d,{required:!0}),children:"Yes, I'd like to check if my insurance can help cover the cost"}),(0,i.jsx)(r.Radio,{value:n.eF.SelfPay,size:"m",...a(d),children:"No, I will pay for it myself"})]})]})};var u=a(6426),h=a(5487),m=a(47209);let p="insuranceMemberID",InsuranceMemberIdField=e=>{let{label:t="Insurance Member ID",placeholder:a,description:n,tooltip:o,type:l,maxLength:c,minLength:d,maskOptions:g,inputMode:x,registerOptions:b,isDisabled:y=!1,isRequired:v=!0,...f}=e,{setValue:C,register:I,formState:{errors:D}}=(0,s.Gc)(),j=(0,m.T)(p,D,["minLength","maxLength","pattern"]);return(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-2",...f,children:[(0,i.jsxs)(r.Box,{children:[(0,i.jsxs)(r.Flex,{gap:"spacer-2",alignItems:"center",children:[(0,i.jsx)(r.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:p,children:t}),o&&(0,i.jsx)(r.Tooltip,{label:o,placement:"auto-end",children:(0,i.jsx)(r.Flex,{children:(0,i.jsx)(r.IconInfoCircle,{size:"m",color:"text-link-primary-default"})})})]}),n]}),(0,i.jsx)(h.o,{"data-test":p,id:p,isInvalid:j,isDisabled:y,placeholder:a,type:l,inputMode:x,maxLength:c,minLength:d,maskOptions:g,onInput:e=>{let t=e.currentTarget.value,a=!d||d&&t.length>=d;C(p,t,{shouldValidate:a})},...I(p,{required:v,...b})}),j&&(0,i.jsx)(u.VO,{errors:D,name:p})]})}},21954:function(e,t,a){a.d(t,{v:function(){return InsuranceDetailsForm}});var i=a(85893),r=a(71986),n=a(67294),o=a(87536),s=a(6426),l=a(57087),c=a(91176),d=a(42575),u=a(15615);let InsuranceDetailsForm=e=>{let{configuration:t,loading:a=!1,onSubmit:h,onBack:m}=e,{contentResources:p,fields:g}=t,x=(0,o.cI)({mode:"onBlur",defaultValues:{insuranceCoverage:void 0,insuranceMemberID:"",insurance:void 0}}),b=(0,d.d)(),y=x.watch(c.o0)===u.eF.SelfPay,v=x.watch(c.OF)===u.PF.Other;(0,n.useEffect)(()=>{y&&x.resetField(c.OF),(y||v)&&x.resetField(c.rI)},[y,v,x]);let renderFormActions=()=>(0,i.jsxs)(r.Flex,{gap:{base:"spacer-8",md:"spacer-16"},alignItems:"center",flex:{base:1,lg:"unset"},children:[(0,i.jsx)(r.Button,{size:{base:"m",lg:"l"},isLoading:a,variant:"link","aria-label":"Back",leadingIcon:(0,i.jsx)(r.IconArrowLeft,{}),onClick:m,children:"Back"}),(0,i.jsx)(r.Button,{type:"submit",size:{base:"m",lg:"l"},isDisabled:!x.formState.isValid,flex:1,isLoading:a,trailingIcon:(0,i.jsx)(r.IconArrowRight,{}),"aria-label":"Continue",children:"Continue"})]});return(0,i.jsx)(o.RV,{...x,children:(0,i.jsxs)(l.S,{as:"form",onSubmit:x.handleSubmit(h),noValidate:!0,children:[(0,i.jsx)(l.S.Side,{gap:0,flex:{base:"none",lg:1},children:p.title}),(0,i.jsxs)(l.S.Form,{children:[(null==g?void 0:g.insuranceCoverage)&&(0,i.jsx)(c.nK,{isDisabled:a}),(null==g?void 0:g.insurance)&&(0,i.jsx)(c.vu,{isDisabled:a||y,isRequired:!y,...null==g?void 0:g.insurance},y.toString()),(0,i.jsx)(c.nB,{isDisabled:a||y||v,isRequired:!y&&!v,pb:{base:"spacer-24",lg:0},...null==g?void 0:g.insuranceMemberID}),b?(0,i.jsx)(s.D2,{children:renderFormActions()}):renderFormActions()]})]})})}},98694:function(e,t,a){a.d(t,{b:function(){return InsuranceDetailsReviewForm}});var i=a(85893),r=a(71986),n=a(67294),o=a(87536),s=a(6426),l=a(57087),c=a(22390),d=a(17207),u=a(42811),h=a(58278),m=a(47209);let p="firstName",g="lastName",x="birthdate",b="state",IdentityFields=e=>{let{isDisabled:t,...a}=e,{register:n,formState:{errors:l,defaultValues:y},setValue:v,watch:f}=(0,o.Gc)(),C=(0,m.T)(x,l,["isValid","isOver18YearsOld","isLessThan150YearsOld"]),I=(0,m.T)("ssn",l,["minLength","maxLength"]);return(0,i.jsxs)(r.Flex,{direction:"column",...a,children:[(0,i.jsx)(r.Text,{as:"label",variant:"text-header-M",color:"text-primary",children:"About you"}),(0,i.jsxs)(r.Flex,{gap:{base:"spacer-4",md:"spacer-8"},mt:"spacer-5",children:[(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-2",flex:1,children:[(0,i.jsx)(r.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:p,children:"Legal First name"}),(0,i.jsx)(s.iQ,{id:p,isDisabled:t,...n(p,{required:!0})})]}),(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-2",flex:1,children:[(0,i.jsx)(r.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:g,children:"Legal Last name"}),(0,i.jsx)(s.Fl,{id:g,isDisabled:t,...n(g,{required:!0})})]})]}),(0,i.jsxs)(r.Flex,{gap:{base:"spacer-4",md:"spacer-8"},mt:"spacer-5",children:[(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-2",flex:1,children:[(0,i.jsx)(r.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:x,children:"Date of birth"}),(0,i.jsx)(s.AM,{"aria-label":"Date of birth",id:x,isInvalid:C,isDisabled:t,onInput:e=>v(x,e.currentTarget.value),...n(x,{required:!0,validate:{isValid:e=>s.pm.isValid(e)||h.x[x].isValid,isOver18YearsOld:e=>s.pm.isOver18YearsOld(e)||h.x[x].isOver18YearsOld,isLessThan150YearsOld:e=>s.pm.isLessThan150YearsOld(e)||h.x[x].isLessThan150YearsOld}})}),C&&(0,i.jsx)(s.VO,{errors:l,name:x})]}),y[b]&&(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-2",flex:1,children:[(0,i.jsx)(r.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:b,children:"State"}),(0,i.jsx)(u.e,{"aria-label":"State",id:b,isDisabled:t,...n(b,{required:!0}),value:f(b)})]})]}),y.ssn&&(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-2",flex:1,mt:"spacer-5",children:[(0,i.jsx)(r.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:"ssn",children:"Social Security Number"}),(0,i.jsx)(r.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"Last 4 Digits of your Social Security Number"}),(0,i.jsx)(d.T,{"data-test":"ssn",id:"ssn",isInvalid:I,isDisabled:t,onInput:e=>v("ssn",e.currentTarget.value),...n("ssn",{required:!0,minLength:{value:4,message:h.x.ssn.minLength},maxLength:{value:4,message:h.x.ssn.maxLength}})}),I&&(0,i.jsx)(s.VO,{errors:l,name:"ssn"})]}),(0,i.jsxs)(r.Flex,{gap:{base:"spacer-4",md:"spacer-8"},mt:"spacer-5",children:[(0,i.jsx)(s.s8,{inputProps:{isDisabled:t},flex:1}),(0,i.jsx)(c.$S,{isDisabled:t,flex:1})]})]})};var y=a(91176),v=a(5487),f=a(15615);let C="insuranceMemberID",InsuranceFields=e=>{let{isDisabled:t,insuranceMemberID:a,insurance:l,...c}=e,{register:d,formState:{defaultValues:u,errors:h},watch:p,setValue:g}=(0,o.Gc)(),x=p(y.OF)===f.PF.Other,b=u[y.OF],I=(0,m.T)(C,h,["minLength","maxLength"]),{registerOptions:D,...j}=a||{};return(0,n.useEffect)(()=>{x&&g(C,"")},[x,g]),(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-5",...c,children:[(0,i.jsx)(r.Text,{variant:"text-header-M",color:"text-primary",children:"Insurance information"}),(0,i.jsxs)(r.Flex,{direction:{base:"column",md:"row"},gap:{base:"spacer-4",md:"spacer-8"},children:[b&&(0,i.jsx)(y.vu,{isDisabled:t,isRequired:!0,defaultSelectedItem:b,flex:1,...l}),(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-2",flex:1,children:[(0,i.jsx)(r.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:C,children:(null==a?void 0:a.label)||"Insurance Member ID"}),(0,i.jsx)(v.o,{id:C,isDisabled:t||x,...j,onInput:e=>{let t=e.currentTarget.value,a=null==j?void 0:j.minLength,i=!a||a&&t.length>=a;g(C,t,{shouldValidate:i})},...d(C,{required:!x,...D})}),I&&(0,i.jsx)(s.VO,{errors:h,name:C})]})]})]})};var I=a(42575);let InsuranceDetailsReviewForm=e=>{var t,a;let{configuration:c,defaultValues:d,loading:u=!1,hasError:h=!1,onSubmit:m}=e,{contentResources:p}=c,g=(0,o.cI)({mode:"onBlur",defaultValues:d}),x=(0,I.d)(),[b,y]=(0,n.useState)(!1),v=u||!b,f=d.insurance||d.insuranceMemberID,toggleEditMode=()=>y(e=>!e),handleCancel=()=>{g.reset(d),toggleEditMode()},renderFormActions=()=>(0,i.jsxs)(r.Flex,{gap:{base:"spacer-6"},flex:1,children:[b&&!u&&(0,i.jsx)(r.Button,{size:{base:"m",lg:"l"},variant:"primary-alt","aria-label":"Cancel",onClick:handleCancel,children:"Cancel"}),(0,i.jsx)(r.Button,{type:"submit",size:{base:"m",lg:"l"},isDisabled:!g.formState.isValid,flex:1,isLoading:u,leadingIcon:(0,i.jsx)(r.IconCircleCheck,{}),"aria-label":"My information is correct",children:x&&b?"Confirm":"My information is correct"})]});return(0,i.jsx)(o.RV,{...g,children:(0,i.jsxs)(l.S,{as:"form",onSubmit:g.handleSubmit(e=>{y(!1),m(e)}),noValidate:!0,children:[(0,i.jsx)(l.S.Side,{gap:0,children:p.title}),(0,i.jsxs)(l.S.Form,{gap:0,children:[(0,i.jsx)(r.Text,{variant:"text-header-L",color:"text-primary",children:"Please confirm your personal information"}),(0,i.jsx)(r.Button,{mt:"spacer-2",variant:"link-primary",verticalAlign:"initial",onClick:toggleEditMode,alignSelf:"start",isDisabled:u||b,leadingIcon:(0,i.jsx)(r.IconPencil,{}),textDecoration:"underline",_hover:{textDecoration:"underline"},children:"Edit your information"}),b&&(0,i.jsxs)(r.Alert,{status:"warning",variant:"subtle",mt:"spacer-5",children:[(0,i.jsx)(r.Alert.Icon,{}),(0,i.jsx)(r.Alert.Title,{children:"You are editing your personal information"})]}),h&&(0,i.jsxs)(r.Alert,{status:"error",variant:"subtle",mt:"spacer-5",children:[(0,i.jsx)(r.Alert.Icon,{}),(0,i.jsx)(r.Alert.Title,{children:"There was an error submitting your information. Please try again."})]}),(0,i.jsxs)(r.Flex,{direction:"column",mt:"spacer-5",_last:{pb:{base:"spacer-24",lg:0}},children:[(0,i.jsx)(IdentityFields,{isDisabled:v,mb:{base:f?"spacer-9":0,lg:"spacer-9"}}),f&&(0,i.jsx)(InsuranceFields,{isDisabled:v,insuranceMemberID:null==c?void 0:null===(t=c.fields)||void 0===t?void 0:t.insuranceMemberID,insurance:null==c?void 0:null===(a=c.fields)||void 0===a?void 0:a.insurance,mb:{base:0,lg:"spacer-9"}}),x?(0,i.jsx)(s.D2,{children:renderFormActions()}):renderFormActions()]})]})]})})}},76089:function(e,t,a){a.d(t,{fk:function(){return BMIFields},IQ:function(){return r},Dy:function(){return ComorbidityStatusField},R2:function(){return DateOfBirthField},zi:function(){return EligibilityCriteriaNote},t_:function(){return HighestWeightFields}});var i,r,n=a(85893),o=a(71986),s=a(6426),l=a(58278),c=a(47209),d=a(40188),u=a(87536);let h="currentWeightInPounds",m="heightInFoot",p="heightInInch",BMIFields=e=>{let{isDisabled:t}=e,{register:a,setValue:i,formState:{errors:r}}=(0,u.Gc)(),g=(0,c.T)(h,r,"validate"),x=(0,c.T)(m,r,"validate"),b=(0,c.T)(p,r,"validate");return(0,n.jsxs)(o.Flex,{direction:"column",gap:"spacer-2",children:[(0,n.jsx)(o.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",children:"What is your current weight and height?"}),(0,n.jsxs)(o.Flex,{direction:{base:"column",md:"row",lg:"column",xl:"row"},gap:{base:"spacer-9",xl:"spacer-12"},children:[(0,n.jsx)(o.Flex,{flex:.6,children:(0,n.jsx)(s.CZ,{"data-test":h,isDisabled:t,isInvalid:g,onInput:e=>i(h,e.currentTarget.value),...a(h,{required:!0,validate:e=>{let t=(0,d.M)(e);return t>=1&&t<1e3||l.x[h].validate}})})}),(0,n.jsxs)(o.Flex,{gap:"spacer-4",flex:1,children:[(0,n.jsx)(s.lm,{unit:"ft","data-test":m,isDisabled:t,isInvalid:x,onInput:e=>i(m,e.currentTarget.value),...a(m,{required:!0,validate:e=>{let t=(0,d.M)(e);return t>=4&&t<=7||l.x[m].validate}})}),(0,n.jsx)(s.lm,{"data-test":p,unit:"in",isDisabled:t,isInvalid:b,onInput:e=>i(p,e.currentTarget.value),...a(p,{required:!0,validate:e=>{let t=(0,d.M)(e);return t>=0&&t<=11||l.x[p].validate}})})]})]}),g&&(0,n.jsx)(s.VO,{errors:r,name:h}),x&&(0,n.jsx)(s.VO,{errors:r,name:m}),b&&(0,n.jsx)(s.VO,{errors:r,name:p})]})};(i=r||(r={})).Yes="yes",i.No="no";let g="comorbidity",x=["Asthma","Atrial fibrillation","Binge eating disorder or Bulimia","Breast cancer","Colon cancer","Congestive heart failure","Coronary artery disease","Darkening of skin around neck, armpits, groin","Deep vein thrombosis","Depression","Endometrial/Uterine cancer","Erectile dysfunction","GERD/Heartburn/Hiatal hernia","Gallstones","Gout","History of bariatric surgery","Hyperlipidemia","Hypertension","Idiopathic intracranial hypertension","Infertility","Insulin resistance/Metabolic syndrome","Liver cancer","Low Testosterone/Hypogonadism in men","Low back pain","Nonalcoholic fatty liver disease or Elevated LFTs","Obstructive sleep apnea","Osteoarthritis","Other as indicated by a doctor","Polycystic ovarian syndrome","Prediabetes/Impaired fasting glucose","Prostate cancer","Stroke","Type 2 diabetes","Venous stasis ulcers"],ComorbidityStatusField=e=>{let{trigger:t,isDisabled:a}=e,{control:i,setValue:r}=(0,u.Gc)();return(0,n.jsxs)(o.Flex,{direction:"column",children:[(0,n.jsxs)(o.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:g,children:["Do you have a weight-related health condition?",(0,n.jsxs)(o.Popover,{trigger:t,closeOnBlur:!0,placement:"auto",children:[(0,n.jsx)(o.Popover.Trigger,{children:(0,n.jsx)(o.Flex,{display:"inline-flex",verticalAlign:"text-top",ml:"spacer-2",children:(0,n.jsx)(o.IconInfoCircle,{size:"m",color:"text-link-primary-default"})})}),(0,n.jsxs)(o.Popover.Content,{children:[(0,n.jsx)(o.Popover.Arrow,{backgroundColor:"text-secondary"}),(0,n.jsx)(o.Popover.Body,{backgroundColor:"text-secondary",borderColor:"transparent",borderRadius:"radii-1",p:"spacer-2",children:(0,n.jsx)(o.Text,{variant:"text-body-meta-regular",color:"text-light",children:"Examples include heart or cardiovascular disease, high blood pressure, sleep apnea, diabetes, gastrointestinal disease, fatty liver."})})]})]})]}),(0,n.jsx)(o.Text,{variant:"text-body-meta-regular",color:"text-secondary",marginBottom:"spacer-2",children:"If yes, select all that apply. If no, skip to the next question."}),(0,n.jsx)(u.Qr,{name:g,control:i,rules:{required:!1},render:e=>{let{field:{onChange:t}}=e;return(0,n.jsxs)(o.AutocompleteMultiSelect,{items:x,useMultipleSelectionProps:{onSelectedItemsChange:e=>{let{selectedItems:a}=e;t(a),r(g,a,{shouldValidate:!0})}},isDisabled:a,children:[(0,n.jsx)(o.AutocompleteMultiSelect.SelectedItems,{renderSelectedItem:e=>{let{selectedItem:t,removeSelectedItem:i}=e;return(0,n.jsxs)(o.Tag,{size:"s",isDisabled:a,onClick:e=>{e.stopPropagation(),i(t)},cursor:"pointer",children:[(0,n.jsx)(o.Tag.Label,{children:t}),(0,n.jsx)(o.Tag.RightIcon,{as:o.IconX})]})}}),(0,n.jsx)(o.AutocompleteMultiSelect.Input,{"data-test":g,placeholder:"Select health condition",variant:"flushed"}),(0,n.jsx)(o.AutocompleteMultiSelect.List,{"data-test":"".concat(g,"List"),renderItem:e=>(0,n.jsx)(n.Fragment,{children:e}),overflowY:"auto",maxHeight:"13.5rem",zIndex:2})]})}})]})},b="birthdate",DateOfBirthField=e=>{let{isDisabled:t}=e,{register:a,setValue:i,formState:{errors:r}}=(0,u.Gc)(),d=(0,c.T)(b,r,["isValid","isOver18YearsOld","isLessThan150YearsOld"]);return(0,n.jsxs)(o.Flex,{direction:"column",gap:"spacer-2",children:[(0,n.jsx)(o.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:b,children:"What is your date of birth?"}),(0,n.jsx)(s.AM,{id:b,isInvalid:d,isDisabled:t,onInput:e=>i(b,e.currentTarget.value),...a(b,{required:!0,validate:{isValid:e=>s.pm.isValid(e)||l.x[b].isValid,isOver18YearsOld:e=>s.pm.isOver18YearsOld(e)||l.x[b].isOver18YearsOld,isLessThan150YearsOld:e=>s.pm.isLessThan150YearsOld(e)||l.x[b].isLessThan150YearsOld}})}),d&&(0,n.jsx)(s.VO,{errors:r,name:b})]})},EligibilityCriteriaNote=()=>(0,n.jsx)(o.Text,{variant:"text-body-floating-label-regular",color:"text-secondary",textAlign:"center",children:"Meeting eligibility criteria based on this information does not automatically guarantee program enrollment."});var y=a(67294);let v="highestWeightInPounds",f="dateOfHighestWeightValue",HighestWeightFields=e=>{let{isDisabled:t}=e,{register:a,setValue:i,trigger:r,formState:{errors:m},watch:p}=(0,u.Gc)(),g=p(h),x=p(b),C=(0,c.T)(v,m,["isValid","isLowerThanCurrentWeight"]),I=(0,c.T)(f,m,["pattern","min","max"]);return(0,y.useEffect)(()=>{r(v)},[g]),(0,n.jsxs)(o.Flex,{direction:"column",gap:"spacer-2",children:[(0,n.jsxs)(o.Box,{children:[(0,n.jsx)(o.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:v,children:"What was your highest lifetime weight and when did you reach it?"}),(0,n.jsx)(o.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"This will help your doctor customize your treatment plan"})]}),(0,n.jsxs)(o.Flex,{gap:"spacer-8",children:[(0,n.jsx)(o.MaskInput,{"data-test":v,"aria-label":"Weight (lbs)",id:v,inputMode:"decimal",size:"l",variant:"flushed",placeholder:"Weight (lbs)",isDisabled:t,isInvalid:C,maskOptions:{mask:/^\d{0,3}(\.\d{0,2})?$/,postfix:" (lbs)"},onInput:e=>i(v,e.currentTarget.value),...a(v,{required:!0,validate:{isValid:e=>{let t=(0,d.M)(e);return t>=1&&t<1e3||l.x[v].isValid},isLowerThanCurrentWeight:e=>{let t=(0,d.M)(g),a=(0,d.M)(e);return a>=t||l.x[v].isLowerThanCurrentWeight}}})}),(0,n.jsx)(o.MaskInput,{"data-test":f,inputMode:"numeric",id:f,size:"l",variant:"flushed",placeholder:"YYYY",isDisabled:t,isInvalid:I,maskOptions:{mask:/^\d{0,4}$/},onInput:e=>{i(f,e.currentTarget.value),4===e.currentTarget.value.length&&r(f)},...a(f,{required:!0,pattern:{value:/^\d{4}$/,message:l.x[f].pattern},min:{value:new Date(x).getFullYear(),message:l.x[f].min},max:{value:new Date().getFullYear(),message:l.x[f].max}})})]}),C&&(0,n.jsx)(s.VO,{errors:m,name:v}),I&&(0,n.jsx)(s.VO,{errors:m,name:f})]})}},17081:function(e,t,a){a.d(t,{b:function(){return PreEligibilityForm}});var i=a(85893),r=a(71986),n=a(87536),o=a(6426),s=a(57087),l=a(76089),c=a(42575),d=a(93773);let PreEligibilityForm=e=>{let{configuration:t,loading:a=!1,onSubmit:u}=e,{contentResources:h}=t,m=(0,n.cI)({mode:"onBlur"}),p=(0,c.d)(),renderFormAction=()=>(0,i.jsx)(r.Button,{type:"submit",size:{base:"m",lg:"l"},isDisabled:!m.formState.isValid,width:"100%",isLoading:a,"aria-label":"Am I eligible?",children:"Am I eligible?"});return(0,i.jsx)(n.RV,{...m,children:(0,i.jsxs)(s.S,{as:"form",onSubmit:m.handleSubmit(e=>{var t;let a=(null===(t=e.comorbidity)||void 0===t?void 0:t.length)>0,i={...e,comorbidity:a?l.IQ.Yes:l.IQ.No};u(i)}),noValidate:!0,"data-test":d.J.PreEligibility,children:[(0,i.jsxs)(s.S.Side,{children:[h.title,!p&&h.bmiEnrollmentDisclaimer]}),(0,i.jsxs)(s.S.Form,{children:[(0,i.jsx)(l.R2,{isDisabled:a}),(0,i.jsx)(l.Dy,{isDisabled:a,trigger:p?"click":"hover"}),(0,i.jsx)(l.fk,{isDisabled:a}),(0,i.jsx)(l.t_,{isDisabled:a}),p?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.Flex,{gap:"spacer-10",direction:"column",pb:"spacer-24",children:[h.bmiEnrollmentDisclaimer,(0,i.jsx)(l.zi,{})]}),(0,i.jsx)(o.D2,{children:renderFormAction()})]}):(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-5",children:[renderFormAction(),(0,i.jsx)(l.zi,{})]})]})]})})}},34e3:function(e,t,a){a.d(t,{E:function(){return PartnerLogo},Z:function(){return l}});var i=a(85893);a(67294);var r=a(25675),n=a.n(r),o=a(42575),s=a(15615);let l={[s.kT.Flyte]:"/static/assets/programs/flyte-logo.png",[s.kT.CareCompass]:"/static/assets/programs/care-compass-logo.png",[s.kT.PequotHealthCare]:"/static/assets/programs/pequot-logo.png",[s.kT.RiverSpringLiving]:"/static/assets/programs/riverspring-logo.png",[s.kT.Aetna]:"/static/assets/programs/aetna-logo.png",[s.kT.PyleFamilyInsurance]:"/static/assets/programs/pyle-logo.png",[s.kT.DGA]:"/static/assets/programs/dga-logo.png",[s.kT.MDSave]:"/static/assets/programs/mdsave-logo.png",[s.kT.ChristianaCare]:"/static/assets/programs/christiana-care-logo.png"},c={[s.kT.Flyte]:{width:{base:95,lg:99},height:{base:27,lg:28}},[s.kT.CareCompass]:{width:{base:44,lg:44},height:{base:44,lg:44}},[s.kT.Aetna]:{width:{base:111,lg:143},height:{base:28,lg:36}},[s.kT.RiverSpringLiving]:{width:{base:184,lg:184},height:{base:23,lg:23}},[s.kT.PequotHealthCare]:{width:{base:103,lg:103},height:{base:40,lg:40}},[s.kT.PyleFamilyInsurance]:{width:{base:118,lg:118},height:{base:36,lg:36}},[s.kT.DGA]:{width:{base:94,lg:94},height:{base:36,lg:36}},[s.kT.MDSave]:{width:{base:44,lg:44},height:{base:44,lg:44}},[s.kT.ChristianaCare]:{width:{base:169,lg:169},height:{base:32,lg:32}}},PartnerLogo=e=>{let{partner:t}=e,a=(0,o.d)(),r=l[t]||l.flyte,s=c[t]||c.flyte;return(0,i.jsx)(n(),{src:r,width:a?s.width.base:s.width.lg,height:a?s.height.base:s.height.lg,alt:"".concat(t," Logo")})}},76849:function(e,t,a){a.d(t,{R:function(){return SupportContactLink},_:function(){return s}});var i=a(85893),r=a(95875),n=a(3183),o=a(71986);let s={formatted:"(844) 359-8363"},SupportContactLink=e=>{let{onClick:t,children:a="(844) 359-8363",...s}=e,{track:l}=(0,n.useAnalytics)();return(0,i.jsx)(o.Link,{isInline:!0,href:"tel:+18443598363",children:a,onClick:e=>{l(r.U.phoneNumberClicked),null==t||t(e)},...s})}},5111:function(e,t,a){a.d(t,{K:function(){return WorkflowHeader},t:function(){return l}});var i=a(85893),r=a(67294),n=a(71986),o=a(42575);let DynamicStepGuide=e=>{let{steps:t,currentStep:a}=e,s=(0,o.d)(),l=t.length,c=t.findIndex(e=>e.label===a),{activeStep:d,setActiveStep:u}=(0,n.useSteps)({index:c,count:l});return((0,r.useEffect)(()=>{-1!==c&&u(c)},[c,u]),-1===c)?null:s?(0,i.jsx)(n.ProgressBar,{value:(d+1)/l*100,size:"xs",position:"absolute",left:0,right:0,bottom:0}):(0,i.jsx)(n.Stepper,{index:d,maxWidth:{base:"21rem",xl:"25rem",xxl:"33rem"},width:"100%",children:t.map((e,t)=>{let a=(0,i.jsx)(e.icon,{"data-testid":"".concat(e.label,"-icon"),size:"m"});return(0,i.jsxs)(n.Stepper.Step,{flexDirection:"column",_horizontal:{alignItems:"start"},gap:"spacer-2",children:[(0,i.jsxs)(n.Flex,{width:"100%",alignItems:"center",children:[(0,i.jsx)(n.Tooltip,{label:e.label,placement:"bottom",display:{base:"block",xxl:"none"},children:(0,i.jsx)(n.Box,{children:(0,i.jsx)(n.Stepper.Step.Indicator,{boxSize:"1.75rem",children:(0,i.jsx)(n.Stepper.Step.Status,{complete:(0,r.cloneElement)(a,{color:"text-light"}),incomplete:(0,r.cloneElement)(a,{color:"background-static"}),active:(0,r.cloneElement)(a,{color:"primary-default"})})})})}),(0,i.jsx)(n.Stepper.Step.Separator,{})]}),(0,i.jsx)(n.Stepper.Step.Title,{display:{base:"none",xxl:"block"},variant:"text-body-floating-label-bold",color:t<=d?"text-primary":"text-disabled",textTransform:{base:"none",xxl:"uppercase"},children:e.label})]},e.label)})})};var s=a(93773);let l=new Map([[s.J.PreEligibility,{label:"Age & BMI",icon:n.IconScaleOutline}],[s.J.ContactDetails,{label:"Personal Details",icon:n.IconId}],[s.J.InsuranceDetails,{label:"Insurance Info",icon:n.IconClipboardPlus}]]),WorkflowHeader=e=>{var t;let{currentStep:a,steps:r=l}=e,n=null===(t=r.get(a))||void 0===t?void 0:t.label,o=Array.from(r.values());return(0,i.jsx)(DynamicStepGuide,{currentStep:n,steps:o})}},76539:function(e,t,a){a.d(t,{V:function(){return ErrorFormMessage}});var i=a(85893),r=a(71986),n=a(32866);let ErrorFormMessage=e=>{let{errors:t,name:a}=e;return(0,i.jsx)(n.B,{errors:t,name:a,render:e=>{let{message:t}=e;return(0,i.jsxs)(r.InlineAlert,{status:"error",children:[(0,i.jsx)(r.InlineAlert.Icon,{}),(0,i.jsx)(r.InlineAlert.Message,{children:t})]})}})}},5487:function(e,t,a){a.d(t,{o:function(){return o}});var i=a(85893),r=a(71986),n=a(67294);let o=(0,n.forwardRef)((e,t)=>{let{inputMode:a="text",placeholder:n="Insurance Member ID",maskOptions:o={mask:/^[a-zA-Z0-9]*$/},...s}=e;return(0,i.jsx)(r.MaskInput,{type:"text",inputMode:a,size:"l",placeholder:n,variant:"flushed",maskOptions:o,ref:t,...s})})},17207:function(e,t,a){a.d(t,{T:function(){return o}});var i=a(85893),r=a(71986),n=a(67294);let o=(0,n.forwardRef)((e,t)=>{let{isDisabled:a,...o}=e,[s,l]=(0,n.useState)(!1),c=s?r.IconEyeOff:r.IconEye;return(0,i.jsx)(r.MaskInput,{type:s?"text":"password",inputMode:"numeric",maskOptions:{mask:[/\d/,/\d/,/\d/,/\d/]},placeholder:"SSN last 4 digits",size:"l",variant:"flushed",ref:t,isDisabled:a,trailingIcon:(0,i.jsx)(r.Box,{userSelect:"none",children:(0,i.jsx)(c,{onClick:()=>{a||l(e=>!e)},cursor:a?"not-allowed":"pointer"})}),...o})})},42811:function(e,t,a){a.d(t,{e:function(){return l},F:function(){return s}});var i=a(85893),r=a(71986),n=a(15615),o=a(67294);let s=Object.entries(n.i$).map(e=>{let[t,a]=e;return{fullName:t,shortCode:a}}),l=(0,o.forwardRef)((e,t)=>{let{options:a=s,...n}=e;return(0,i.jsx)(r.Select,{size:"l",variant:"flushed",placeholder:"Select",ref:t,...n,children:a.map(e=>{let{fullName:t,shortCode:a}=e;return(0,i.jsx)("option",{value:a,children:t},a)})})})},58278:function(e,t,a){a.d(t,{x:function(){return i}});let i={email:{pattern:"Enter a valid email address",maxLength:"Email must be less than 150 characters"},phone:{validate:"Enter a valid phone number"},birthdate:{isValid:"Enter a valid date of birth using the format MM/DD/YYYY",isOver18YearsOld:"To be eligible, you must be at least 18 years old",isLessThan150YearsOld:"Enter a valid date of birth using the format MM/DD/YYYY"},currentWeightInPounds:{validate:"Weight must be a number between 1 and 999"},heightInFoot:{validate:"Height (ft) must be a number between 4 and 7"},heightInInch:{validate:"Height (in) must be a number between 0 and 11"},highestWeightInPounds:{isValid:"Weight must be a number between 1 and 999",isLowerThanCurrentWeight:"Weight must be higher than current weight"},dateOfHighestWeightValue:{min:"Enter a year that is after your birth year",pattern:"Enter a year using the format (YYYY)",max:"Enter a year that is not in the future"},ssn:{minLength:"Enter the last 4 digits of your SSN",maxLength:"Enter the last 4 digits of your SSN"}}},6426:function(e,t,a){a.d(t,{AM:function(){return l},s8:function(){return EmailField},VO:function(){return m.V},iQ:function(){return p},lm:function(){return g},Fl:function(){return x},D2:function(){return MobileFormFooter},dO:function(){return NameFields},sb:function(){return v},CZ:function(){return C},pm:function(){return s},Fp:function(){return f.F}});var i=a(85893),r=a(71986),n=a(48527),o=a(67294);let s={isValid:e=>10===e.length,isOver18YearsOld:e=>{let t=(0,n.F)(e);return t>=18},isLessThan150YearsOld:e=>{let t=(0,n.F)(e);return t<150}},l=(0,o.forwardRef)((e,t)=>(0,i.jsx)(r.DateInput,{placeholder:"mm/dd/yyyy",inputMode:"numeric",mode:"mm/dd/yyyy",size:"l",variant:"flushed",ref:t,"data-test":"birthdate",...e}));var c=a(58278),d=a(47209),u=a(87536);let h="email",EmailField=e=>{let{name:t=h,label:a="Email address",inputProps:n,...o}=e,{register:s,setValue:l,formState:{errors:p}}=(0,u.Gc)(),g=(0,d.T)(t,p,["maxLength","pattern"]);return(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-2",...o,children:[(0,i.jsx)(r.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:t,children:a}),(0,i.jsx)(r.Input,{"data-test":t,autoComplete:"email",placeholder:"name@email.com",inputMode:"email",type:"email",id:t,size:"l",variant:"flushed",isInvalid:g,...n,...s(t,{required:!0,onChange:e=>{var a;l(t,null===(a=e.target.value)||void 0===a?void 0:a.toLowerCase())},pattern:{value:/^[a-zA-Z0-9._+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,150}$/,message:c.x[h].pattern},maxLength:{value:150,message:c.x[h].maxLength}})}),g&&(0,i.jsx)(m.V,{errors:p,name:t})]})};var m=a(76539);let p=(0,o.forwardRef)((e,t)=>(0,i.jsx)(r.Input,{autoComplete:"given-name","aria-label":"Legal First name",placeholder:"Legal First name",type:"text",size:"l",variant:"flushed",ref:t,...e})),g=(0,o.forwardRef)((e,t)=>{let{unit:a,...n}=e;return(0,i.jsx)(r.MaskInput,{"aria-label":"Height (".concat(a,")"),placeholder:"Height (".concat(a,")"),inputMode:"numeric",size:"l",variant:"flushed",maskOptions:{mask:/^\d*$/,postfix:" (".concat(a,")")},ref:t,...n})});a(5487);let x=(0,o.forwardRef)((e,t)=>(0,i.jsx)(r.Input,{autoComplete:"family-name","aria-label":"Legal Last name",placeholder:"Legal Last name",type:"text",size:"l",variant:"flushed",ref:t,...e})),MobileFormFooter=e=>{let{children:t,...a}=e;return(0,i.jsx)(r.Flex,{position:"fixed",bottom:0,left:0,right:0,role:"contentinfo",px:"spacer-6",py:"spacer-4",background:"background-page",borderTop:"1px",borderColor:"ui-element-divider",borderStyle:"solid",zIndex:1,...a,"data-testid":"mobile-footer",children:t})},b="firstName",y="lastName",NameFields=e=>{let{isDisabled:t}=e,{register:a}=(0,u.Gc)();return(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-2",children:[(0,i.jsxs)(r.Box,{children:[(0,i.jsx)(r.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",children:"Tell us about yourself"}),(0,i.jsx)(r.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"Please enter your full legal name as on your ID or medical insurance."})]}),(0,i.jsxs)(r.Flex,{gap:{base:"spacer-4",md:"spacer-8"},children:[(0,i.jsx)(p,{"data-test":b,id:b,isDisabled:t,...a(b,{required:!0})}),(0,i.jsx)(x,{"data-test":y,id:y,isDisabled:t,...a(y,{required:!0})})]})]})},v=(0,o.forwardRef)((e,t)=>(0,i.jsx)(r.PhoneInput,{autoComplete:"tel-national",inputMode:"numeric",maskOptions:{countryIsoCode:"US",mask:["(",/\d/,/\d/,/\d/,")"," ",/\d/,/\d/,/\d/,"-",/\d/,/\d/,/\d/,/\d/]},placeholder:"(000) 000-0000",size:"l",variant:"flushed",ref:t,...e}));var f=a(42811);let C=(0,o.forwardRef)((e,t)=>(0,i.jsx)(r.MaskInput,{"aria-label":"Weight (lbs)",placeholder:"Weight (lbs)",inputMode:"decimal",size:"l",variant:"flushed",maskOptions:{mask:/^\d{0,3}(\.\d{0,2})?$/,postfix:" (lbs)"},ref:t,...e}))},7351:function(e,t,a){a.d(t,{Eg:function(){return FullModalLayout}});var i=a(85893),r=a(67294),n=a(71986),o=a(17156);let FullModalLayoutContextError=class FullModalLayoutContextError extends o.s{constructor(e="useFullModalLayoutContext must be used within a FullModalLayoutProvider"){super(e,"FULL_MODAL_CONTEXT_ERROR")}};let s=(0,r.createContext)({onClose:()=>{}}),useFullModalLayoutContext=()=>{let e=(0,r.useContext)(s);if(!e)throw new FullModalLayoutContextError;return e},FullModalLayout=e=>{let{isOpen:t,onClose:a,children:r}=e;return(0,i.jsx)(s.Provider,{value:{onClose:a},children:(0,i.jsx)(n.Modal,{isOpen:t,onClose:a,size:"full",autoFocus:!1,children:(0,i.jsx)(n.Modal.Content,{p:0,backgroundColor:"background-page",height:"100%",containerProps:{overflow:"hidden"},motionProps:{initial:{opacity:1},animate:{opacity:1}},children:r})})})};FullModalLayout.Header=e=>{let{children:t}=e,{onClose:a}=useFullModalLayoutContext();return(0,i.jsx)(n.Modal.Header,{backgroundColor:"background-page",borderBottomColor:"ui-element-divider",borderBottomWidth:"1px",borderBottomStyle:"solid",borderRadius:"radius-0",p:0,position:{base:"fixed",lg:"relative"},width:"100%",zIndex:"2",children:(0,i.jsxs)(n.Flex,{alignItems:"center",justifyContent:"space-between",maxWidth:"90rem",px:{base:"spacer-6",md:"spacer-9",lg:"spacer-7",xl:"spacer-20",xxl:"spacer-28"},py:{base:"spacer-2",lg:"spacer-4"},width:"100%",margin:"0 auto",children:[t,(0,i.jsx)(n.ButtonIcon,{variant:"ghost","aria-label":"Close",size:"l",icon:(0,i.jsx)(n.IconX,{}),onClick:a})]})})},FullModalLayout.Body=e=>{let{children:t,...a}=e;return(0,i.jsx)(n.Modal.Body,{p:0,backgroundColor:"background-page",display:"flex",mt:{base:"4.25rem",lg:0},mx:"auto",overflow:"auto",borderRadius:"none",width:"100%",...a,children:(0,i.jsx)(n.Fade,{in:!0,style:{width:"100%"},transition:{enter:{duration:.4}},children:t})})}},57087:function(e,t,a){a.d(t,{D:function(){return ContentLayout},S:function(){return SplitFormLayout}});var i=a(85893),r=a(71986);let ContentLayout=e=>(0,i.jsx)(r.Flex,{px:{base:"spacer-6",md:"spacer-9",lg:"spacer-14",xl:"spacer-20",xxl:"spacer-28"},py:{base:"spacer-5",lg:"spacer-12"},maxWidth:"90rem",marginY:"0",marginX:"auto",...e}),SplitFormLayout=e=>(0,i.jsx)(ContentLayout,{direction:{base:"column",lg:"row"},gap:{base:"spacer-10",lg:"spacer-16",xl:"spacer-28",xxl:"spacer-44"},...e});SplitFormLayout.Side=e=>(0,i.jsx)(r.Flex,{direction:"column",gap:{base:"spacer-6",lg:"spacer-8"},flex:1,...e}),SplitFormLayout.Form=e=>(0,i.jsx)(r.Flex,{direction:"column",gap:"spacer-9",flex:1,...e})},19813:function(e,t,a){a.d(t,{U:function(){return AetnaWorkflow}});var i,r,n=a(85893),o=a(67294),s=a(79447),l=a(17081),c=a(55632),d=a(21954),u=a(98694),h=a(28588),m=a(9941),p=a(71986),g=a(97213),x=a(93773);let b={[x.J.PreEligibility]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-primary",children:"Let's make sure you're eligible for the Flyte program."}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"To be eligible for the Flyte program through your Aetna Medicare Advantage benefits, you must meet specific age and Body Mass Index (BMI)* requirements."})]}),bmiEnrollmentDisclaimer:(0,n.jsx)(p.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"*We acknowledge that Body Mass Index (BMI) is an imperfect way to screen for excess weight. Flyte providers do not use BMI alone as a measure of overall health. Instead, BMI is used as a data point to see if someone is eligible to join the Flyte program. Once someone joins the program, we'll ask each person more about their health to create a personalized treatment plan."})},[x.J.EligibilityUnmet]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-secondary-negative",children:"Unfortunately, you are not eligible to join FlyteHealth at this time."}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"The Flyte program requires a minimum BMI of 27+ (plus one or more weight-related health conditions) or a BMI of 30+."})]})},[x.J.ContactDetails]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-secondary-negative",children:"Congratulations! You're eligible for the FlyteHealth program"}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"To help us match your information with your health plan, tell us about yourself. Next, we'll ask about your Aetna membership. Be sure to have your insurance card handy."})]})},[x.J.InsuranceDetails]:{title:(0,n.jsxs)(p.Text,{variant:"text-header-2XL",color:"text-secondary-negative",children:["One more thing:"," ",(0,n.jsx)(p.Text,{as:"span",variant:"text-header-2XL",color:"text-primary",children:"What's your Aetna membership number?"})]})},[x.J.InsuranceDetailsReview]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{children:"Let's review: Is your info correct?"}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"Please double-check the information you provided to make sure everything is correct."})]})},[x.J.ApplicationComplete]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-secondary-negative",children:"Welcome aboard! We're so excited you're here."}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"Next, we need to confirm your email. Click the link we sent to:"})]}),description:(0,n.jsx)(p.Text,{mt:"spacer-8",color:"text-secondary",variant:"text-body-regular",children:"Can’t find the email? Make sure to check your Spam folder."})},[x.J.ApplicationReview]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-primary",children:"You're almost finished!"}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"We've received your application, but we need a little more information from you to move forward. Please call us to complete the application process."})]})},[x.J.ApplicationDetected]:{title:(0,n.jsx)(p.Text,{variant:"text-header-2XL",color:"text-primary",children:"We found an existing account for:"}),description:(0,n.jsx)(p.Text,{variant:"text-body-display-S",color:"text-secondary",children:"It looks like you already have an account with us. To continue or update your registration details, please contact our Care Coordinator team."})},[x.J.OnboardingChecklist]:g.T[x.J.OnboardingChecklist],[x.J.CreatePassword]:g.T[x.J.CreatePassword],[x.J.AppDownload]:g.T[x.J.AppDownload],[x.J.ReviewConsents]:g.T[x.J.ReviewConsents]};var y=a(20893),v=a(10265),f=a(52766),C=a(94788),I=a(47243),D=a(30368),j=a(98491),S=a(3938),w=a(15615);let isEligibleForAutoEnrollment=e=>e===S._.FULL_MATCH||e===S._.ELIGIBLE_MATCH,getLeadStatus=e=>{switch(e){case S._.PERSON_MATCH:case S._.INSURANCE_MATCH:case S._.EXPIRED:case S._.NOT_FOUND:return w.rl.EligibleWaiting;case S._.FULL_MATCH:case S._.ELIGIBLE_MATCH:default:return}};var E=a(76364),T=a(61741),k=a(97620),P=a(4e4);(i=r||(r={})).CheckEligibility="checkEligibility",i.CreateLead="createLead",i.CheckBenefits="checkBenefits";let F={...j.a,...r},A=k.aU[v.kT.Aetna],M={formData:{birthdate:"",comorbidity:"",currentWeightInPounds:"",dateOfHighestWeightValue:"",email:"",firstName:"",heightInFoot:"",heightInInch:"",highestWeightInPounds:"",insuranceCoverage:void 0,insuranceMemberID:"",insurance:void 0,lastName:"",phone:"",state:void 0,termsAgreement:!1,howDidYouFindUS:""},eligibilityCheckMatchType:void 0,bmi:void 0,benefitsCheck:void 0},L=(0,C.cY)({types:{},guards:{isPreEligibilityMet:e=>{let{context:{formData:t,bmi:a}}=e;return f.Pq.aetna({bmi:a,comorbidity:t.comorbidity,birthdate:t.birthdate})},isApplicationReviewRequired:e=>{let{context:{eligibilityCheckMatchType:t}}=e;return[v._q.EXPIRED,v._q.INSURANCE_MATCH,v._q.PERSON_MATCH,v._q.NOT_FOUND].includes(t)},isApplicationDetected:T.Q},actions:{updateFormData:(0,I.a)({formData:e=>{let{context:t,event:a}=e;return{...t.formData,...a.data}}}),assignBMI:(0,I.a)({bmi:e=>{let{context:t}=e,{heightInFoot:a,heightInInch:i,highestWeightInPounds:r}=t.formData;return(0,f.V2)({heightFeet:(0,f.MC)(a),heightInches:(0,f.MC)(i),weightPounds:(0,f.MC)(r)})}}),reset:(0,I.a)({...M}),resetBenefitsCheck:(0,I.a)({benefitsCheck:void 0})}}).createMachine({context:()=>M,id:"aetnaMachine",initial:F.PreEligibility,states:{[F.PreEligibility]:{id:F.PreEligibility,initial:F.Idle,states:{[F.Idle]:{on:{SUBMIT:{target:F.Submitting,actions:"updateFormData"}}},[F.Submitting]:{entry:"assignBMI",always:[{target:"#".concat(F.ContactDetails),guard:"isPreEligibilityMet"},{target:"#".concat(F.EligibilityUnmet)}]}}},[F.ContactDetails]:{id:F.ContactDetails,initial:F.Idle,states:{[F.Idle]:{on:{SUBMIT:{target:"#".concat(F.InsuranceDetails),actions:"updateFormData"}}}}},[F.InsuranceDetails]:{id:F.InsuranceDetails,initial:F.Idle,states:{[F.Idle]:{on:{BACK:{target:"#".concat(F.ContactDetails)},SUBMIT:{target:"#".concat(F.InsuranceDetailsReview),actions:"updateFormData"}}}}},[F.InsuranceDetailsReview]:{id:F.InsuranceDetailsReview,initial:F.Idle,states:{[F.Idle]:{on:{SUBMIT:{actions:"updateFormData",target:F.Submitting}}},[F.Submitting]:{id:F.Submitting,initial:F.CheckEligibility,states:{[F.CheckEligibility]:{id:F.CheckEligibility,invoke:{src:(0,D.p4)(async e=>{let{input:t}=e,a={...t,insurance:k.Er[v.kT.Aetna],benefitProgram:k.Q1[v.kT.Aetna]};return await (0,E.m)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:[{actions:(0,I.a)({eligibilityCheckMatchType:e=>{let{event:t}=e;return t.output.data.matchType}}),target:"#".concat(F.CheckBenefits)}],onError:"#".concat(F.Error)}},[F.CheckBenefits]:{id:F.CheckBenefits,invoke:{src:(0,D.p4)(async e=>{let{input:t}=e,a={...t,payerCode:k.qK[v.PF["Aetna Medicare"]]};return await (0,P.o)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:[{actions:(0,I.a)({benefitsCheck:e=>{let{event:t}=e;return t.output.data}}),target:"#".concat(F.CreateLead)}],onError:"#".concat(F.CreateLead)}},[F.CreateLead]:{id:F.CreateLead,invoke:{src:(0,D.p4)(async e=>{let{input:t}=e,a={...t.formData,...t.formData.insuranceMemberID&&{employmentVerificationCode:t.formData.insuranceMemberID},...t.benefitsCheck&&{benefitsCheck:t.benefitsCheck},eligibilityVerifiedBy:v.Vn.Evolve,company:A,insurance:k.KG[v.kT.Aetna],evolveOrganization:v.bV["State of Connecticut Retirees"],leadStatus:getLeadStatus(t.eligibilityCheckMatchType),automateEvolveEnrollment:isEligibleForAutoEnrollment(t.eligibilityCheckMatchType)};return await (0,y.$)(a)}),input:e=>{let{context:t}=e;return t},onDone:[{guard:"isApplicationReviewRequired",target:"#".concat(F.ApplicationReview)},{target:"#".concat(F.ApplicationComplete)}],onError:[{guard:"isApplicationDetected",target:"#".concat(F.ApplicationDetected)},{target:"#".concat(F.Error)}]}}}},[F.Error]:{id:F.Error,on:{SUBMIT:{actions:["updateFormData","resetBenefitsCheck"],target:F.Submitting}}}}},[F.ApplicationReview]:{id:F.ApplicationReview},[F.ApplicationComplete]:{id:F.ApplicationComplete},[F.ApplicationDetected]:{id:F.ApplicationDetected},[F.EligibilityUnmet]:{id:F.EligibilityUnmet,initial:F.Idle,states:{[F.Idle]:{on:{SUBMIT:{target:F.Submitting,actions:"updateFormData"}}},[F.Submitting]:{invoke:{src:(0,D.p4)(async e=>{let{input:t}=e,a={...t,company:A,leadStatus:v.rl.Ineligible,ineligibilityReason:v.ib.BMI,automateEvolveEnrollment:!1};return await (0,y.$)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:F.Success,onError:F.Error}},[F.Success]:{},[F.Error]:{on:{SUBMIT:{target:F.Submitting}}}}}},on:{RESET:{target:"#".concat(F.PreEligibility),actions:"reset"}}});var R=a(90420),B=a(94445),O=a(34e3),U=a(5111),J=a(67989),H=a(6426);let N={[x.J.ContactDetails]:{state:{options:H.Fp}},[x.J.InsuranceDetails]:{insuranceMemberID:{tooltip:(0,n.jsxs)(p.Box,{children:[(0,n.jsx)(p.Text,{variant:"text-body-meta-regular",color:"text-light",children:"Where to find my Membership ID Number:"}),(0,n.jsx)(p.Image,{width:"100%",height:"auto",src:"/static/assets/programs/aetna-insurance-card.png",alt:"Member ID guidance"})]})}},[x.J.InsuranceDetailsReview]:{insuranceMemberID:{}}};var W=a(4225);let _=w.kT.Aetna,AetnaWorkflow=e=>{let{render:t}=e,[a,i]=(0,B.eO)(L),r=(0,o.useMemo)(()=>(0,R.k)(a.value),[a.value]);(0,J.R)(r,_);let g=(0,o.useCallback)(e=>{i({type:"SUBMIT",data:e})},[i]),y=(0,o.useCallback)(()=>{i({type:"BACK"})},[i]),v=(0,o.useCallback)(()=>{switch(r){case j.a.PreEligibility:return(0,n.jsx)(l.b,{configuration:{contentResources:b[x.J.PreEligibility]},onSubmit:g});case j.a.ContactDetails:return(0,n.jsx)(s.q,{configuration:{contentResources:b[x.J.ContactDetails],fields:N[x.J.ContactDetails]},onSubmit:g,defaultValues:a.context.formData});case j.a.EligibilityUnmet:return(0,n.jsx)(c.X,{configuration:{contentResources:b[x.J.EligibilityUnmet]},onSubmit:g,loading:a.matches({[j.a.EligibilityUnmet]:j.a.Submitting}),isEmailSent:a.matches({[j.a.EligibilityUnmet]:j.a.Success}),hasError:a.matches({[j.a.EligibilityUnmet]:j.a.Error})});case j.a.InsuranceDetails:return(0,n.jsx)(d.v,{configuration:{contentResources:b[x.J.InsuranceDetails],fields:N[x.J.InsuranceDetails]},onSubmit:g,onBack:y});case j.a.InsuranceDetailsReview:return(0,n.jsx)(u.b,{configuration:{contentResources:b[x.J.InsuranceDetailsReview],fields:N[x.J.InsuranceDetailsReview]},onSubmit:g,loading:a.matches({[j.a.InsuranceDetailsReview]:j.a.Submitting}),hasError:a.matches({[j.a.InsuranceDetailsReview]:j.a.Error}),defaultValues:a.context.formData});case j.a.ApplicationComplete:return(0,n.jsx)(h.J,{...b[x.J.ApplicationComplete],email:a.context.formData.email});case j.a.ApplicationDetected:return(0,n.jsx)(W.v,{...b[x.J.ApplicationDetected],email:a.context.formData.email});case j.a.ApplicationReview:return(0,n.jsx)(m.G,{...b[x.J.ApplicationReview]});default:return null}},[r,a]);return t({header:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(p.Flex,{gap:"spacer-5",alignItems:"center",children:[(0,n.jsx)(O.E,{partner:w.kT.Flyte}),(0,n.jsx)(p.Divider,{orientation:"vertical",alignSelf:"stretch",height:"auto"}),(0,n.jsx)(O.E,{partner:_})]}),(0,n.jsx)(U.K,{currentStep:r})]}),body:v(),currentWorkFlowStep:r})}},4985:function(e,t,a){a.d(t,{$:function(){return CareCompassWorkflow}});var i,r,n=a(85893),o=a(67294),s=a(79447),l=a(17081),c=a(55632),d=a(21954),u=a(98694),h=a(28588),m=a(9941),p=a(71986),g=a(93773),x=a(97213);let b={[g.J.PreEligibility]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-primary",children:"Let's make sure you're eligible for the FlyteHealth program."}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"To be eligible for the FlyteHealth program through your State of Connecticut Health Plan benefits, you must meet specific age and Body Mass Index (BMI)* requirements."})]}),bmiEnrollmentDisclaimer:(0,n.jsx)(p.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"*We acknowledge that Body Mass Index (BMI) is an imperfect way to screen for excess weight. FlyteHealth providers do not use BMI alone as a measure of overall health. Instead, BMI is used as a data point to see if someone is eligible to join the FlyteHealth program. Once someone joins the program, we'll ask each person more about their health to create a personalized treatment plan."})},[g.J.EligibilityUnmet]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-secondary-negative",children:"Unfortunately, you are not eligible to join FlyteHealth at this time."}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"The FlyteHealth program requires a minimum BMI of 27+ (plus one or more weight-related health conditions) or a BMI of 30+."})]}),alert:(0,n.jsx)(()=>(0,n.jsxs)(p.Alert,{status:"info",variant:"subtle",bgColor:"background-action-hover",p:"spacer-5",flexDirection:{base:"column",md:"row"},gap:{base:"spacer-3",md:"spacer-5"},alignItems:{base:"flex-start"},children:[(0,n.jsx)(p.Image,{width:"70.56px",height:"auto",src:"/static/assets/insurance-cards.png",alt:"Insurance cards illustration"}),(0,n.jsxs)(p.Flex,{direction:"column",flex:"1",children:[(0,n.jsx)(p.Alert.Title,{textStyle:"text-body-large-bold",mb:"spacer-1",children:"Additional State of Connecticut Benefits"}),(0,n.jsx)(p.Alert.Description,{mb:"spacer-3",children:"While the FlyteHealth program isn't a match for you today, the State of Connecticut Health Plan offers a wide range of options that might suit your needs."}),(0,n.jsx)(p.Link,{href:"https://carecompass.ct.gov/state/medical/",color:"text-link-primary-default",isExternal:!0,trailingIcon:(0,n.jsx)(p.IconArrowRight,{color:"text-link-primary-default"}),children:"Learn More"})]})]}),{})},[g.J.ContactDetails]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-secondary-negative",children:"Congratulations! You're eligible for the FlyteHealth program"}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"To help us match your information with your employer, tell us about yourself. Next, we'll ask about your Anthem membership. Be sure to have your insurance card handy."})]})},[g.J.InsuranceDetails]:{title:(0,n.jsxs)(p.Text,{variant:"text-header-2XL",color:"text-secondary-negative",children:["One more thing:"," ",(0,n.jsx)(p.Text,{as:"span",variant:"text-header-2XL",color:"text-primary",children:"What's your Anthem membership number?"})]})},[g.J.InsuranceDetailsReview]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{children:"Let's review: Is your info correct?"}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"Please double-check the information you provided to make sure everything is correct."})]})},[g.J.ApplicationComplete]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-secondary-negative",children:"Welcome aboard! We're so excited you're here."}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"Next, we need to confirm your email. Click the link we sent to:"})]}),description:(0,n.jsx)(p.Text,{mt:"spacer-8",color:"text-secondary",variant:"text-body-regular",children:"Can’t find the email? Make sure to check your Spam folder."})},[g.J.ApplicationReview]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-primary",children:"You're almost finished!"}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"We've received your application, but we need a little more information from you to move forward. Please call us to complete the application process."})]})},[g.J.ApplicationDetected]:{title:(0,n.jsx)(p.Text,{variant:"text-header-2XL",color:"text-primary",children:"We found an existing account for:"}),description:(0,n.jsx)(p.Text,{variant:"text-body-display-S",color:"text-secondary",children:"It looks like you already have an account with us. To continue or update your registration details, please contact our Care Coordinator team."})},[g.J.OnboardingChecklist]:x.T[g.J.OnboardingChecklist],[g.J.CreatePassword]:x.T[g.J.CreatePassword],[g.J.AppDownload]:x.T[g.J.AppDownload],[g.J.ReviewConsents]:x.T[g.J.ReviewConsents]};var y=a(20893),v=a(10265),f=a(52766),C=a(94788),I=a(47243),D=a(30368),j=a(98491),S=a(3938),w=a(15615);let isEligibleByMatchType=e=>{switch(e){case S._.FULL_MATCH:case S._.ELIGIBLE_MATCH:return!0;case S._.PERSON_MATCH:case S._.INSURANCE_MATCH:case S._.EXPIRED:case S._.NOT_FOUND:default:return!1}},isEligibleForAutoEnrollment=e=>{let{matchType:t}=e;return isEligibleByMatchType(t)},getLeadStatus=e=>{let{matchType:t}=e;if(!isEligibleForAutoEnrollment({matchType:t}))return w.rl.EligibleWaiting},removeInsuranceMemberIdPrefix=e=>e.substring(3);var E=a(76364),T=a(61741),k=a(97620),P=a(4e4);(i=r||(r={})).CheckEligibility="checkEligibility",i.CreateLead="createLead",i.CheckBenefits="checkBenefits";let F={...j.a,...r},A=k.aU[v.kT.CareCompass],M={formData:{birthdate:"",comorbidity:"",currentWeightInPounds:"",dateOfHighestWeightValue:"",email:"",firstName:"",heightInFoot:"",heightInInch:"",highestWeightInPounds:"",insuranceCoverage:void 0,insuranceMemberID:"",insurance:void 0,lastName:"",phone:"",state:void 0,termsAgreement:!1,howDidYouFindUS:""},eligibilityCheckMatchType:void 0,bmi:void 0,benefitsCheck:void 0},L=(0,C.cY)({types:{},guards:{isPreEligibilityMet:e=>{let{context:{formData:t,bmi:a}}=e;return f.Pq.careCompass({bmi:a,comorbidity:t.comorbidity,birthdate:t.birthdate})},isApplicationReviewRequired:e=>{let{context:{eligibilityCheckMatchType:t,formData:a,bmi:i}}=e;return!isEligibleForAutoEnrollment({matchType:t})},isApplicationDetected:T.Q},actions:{updateFormData:(0,I.a)({formData:e=>{let{context:t,event:a}=e;return{...t.formData,...a.data}}}),assignBMI:(0,I.a)({bmi:e=>{let{context:t}=e,{heightInFoot:a,heightInInch:i,highestWeightInPounds:r}=t.formData;return(0,f.V2)({heightFeet:(0,f.MC)(a),heightInches:(0,f.MC)(i),weightPounds:(0,f.MC)(r)})}}),reset:(0,I.a)({...M}),resetBenefitsCheck:(0,I.a)({benefitsCheck:void 0})}}).createMachine({context:()=>M,id:"careCompassMachine",initial:F.PreEligibility,states:{[F.PreEligibility]:{id:F.PreEligibility,initial:F.Idle,states:{[F.Idle]:{on:{SUBMIT:{target:F.Submitting,actions:"updateFormData"}}},[F.Submitting]:{entry:"assignBMI",always:[{target:"#".concat(F.ContactDetails),guard:"isPreEligibilityMet"},{target:"#".concat(F.EligibilityUnmet)}]}}},[F.ContactDetails]:{id:F.ContactDetails,initial:F.Idle,states:{[F.Idle]:{on:{SUBMIT:{target:"#".concat(F.InsuranceDetails),actions:"updateFormData"}}}}},[F.InsuranceDetails]:{id:F.InsuranceDetails,initial:F.Idle,states:{[F.Idle]:{on:{BACK:{target:"#".concat(F.ContactDetails)},SUBMIT:{target:"#".concat(F.InsuranceDetailsReview),actions:"updateFormData"}}}}},[F.InsuranceDetailsReview]:{id:F.InsuranceDetailsReview,initial:F.Idle,states:{[F.Idle]:{on:{SUBMIT:{actions:"updateFormData",target:F.Submitting}}},[F.Submitting]:{id:F.Submitting,initial:F.CheckEligibility,states:{[F.CheckEligibility]:{id:F.CheckEligibility,invoke:{src:(0,D.p4)(async e=>{let{input:t}=e,a={...t,insuranceMemberID:removeInsuranceMemberIdPrefix(t.insuranceMemberID),insurance:k.Er[v.kT.CareCompass],benefitProgram:k.Q1[v.kT.CareCompass]};return await (0,E.m)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:[{actions:(0,I.a)({eligibilityCheckMatchType:e=>{let{event:t}=e;return t.output.data.matchType}}),target:"#".concat(F.CheckBenefits)}],onError:"#".concat(F.Error)}},[F.CheckBenefits]:{id:F.CheckBenefits,invoke:{src:(0,D.p4)(async e=>{let{input:t}=e,a={...t,payerCode:k.qK[v.PF.Anthem]};return await (0,P.o)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:[{actions:(0,I.a)({benefitsCheck:e=>{let{event:t}=e;return t.output.data}}),target:"#".concat(F.CreateLead)}],onError:"#".concat(F.CreateLead)}},[F.CreateLead]:{id:F.CreateLead,invoke:{src:(0,D.p4)(async e=>{let{input:t}=e,a=removeInsuranceMemberIdPrefix(t.formData.insuranceMemberID),i={...t.formData,...t.formData.insuranceMemberID&&{employmentVerificationCode:a,insuranceMemberID:a},...t.benefitsCheck&&{benefitsCheck:t.benefitsCheck},eligibilityVerifiedBy:v.Vn.Evolve,company:A,insurance:k.KG[v.kT.CareCompass],evolveOrganization:v.bV["State of Connecticut"],leadStatus:getLeadStatus({matchType:t.eligibilityCheckMatchType}),automateEvolveEnrollment:isEligibleForAutoEnrollment({matchType:t.eligibilityCheckMatchType})};return await (0,y.$)(i)}),input:e=>{let{context:t}=e;return t},onDone:[{guard:"isApplicationReviewRequired",target:"#".concat(F.ApplicationReview)},{target:"#".concat(F.ApplicationComplete)}],onError:[{guard:"isApplicationDetected",target:"#".concat(F.ApplicationDetected)},{target:"#".concat(F.Error)}]}}}},[F.Error]:{id:F.Error,on:{SUBMIT:{actions:["updateFormData","resetBenefitsCheck"],target:F.Submitting}}}}},[F.ApplicationReview]:{id:F.ApplicationReview},[F.ApplicationComplete]:{id:F.ApplicationComplete},[F.ApplicationDetected]:{id:F.ApplicationDetected},[F.EligibilityUnmet]:{id:F.EligibilityUnmet,initial:F.Idle,states:{[F.Idle]:{on:{SUBMIT:{target:F.Submitting,actions:"updateFormData"}}},[F.Submitting]:{invoke:{src:(0,D.p4)(async e=>{let{input:t}=e,a={...t,company:A,leadStatus:v.rl.Ineligible,ineligibilityReason:v.ib.BMI,automateEvolveEnrollment:!1};return await (0,y.$)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:F.Success,onError:F.Error}},[F.Success]:{},[F.Error]:{on:{SUBMIT:{actions:"updateFormData",target:F.Submitting}}}}}},on:{RESET:{target:"#".concat(F.PreEligibility),actions:"reset"}}});var R=a(90420),B=a(94445),O=a(34e3),U=a(5111),J=a(67989),H=a(6426);let N={maxLength:13,minLength:13,registerOptions:{minLength:{value:13,message:"Enter the 13-character member ID number."},maxLength:{value:13,message:"Enter the 13-character member ID number."}},inputMode:"text",maskOptions:{mask:/^[a-zA-Z0-9]+$/},label:"Anthem Membership ID Number",placeholder:"Insurance ID"},W={[g.J.ContactDetails]:{state:{options:H.Fp}},[g.J.InsuranceDetails]:{insuranceMemberID:{...N,tooltip:(0,n.jsxs)(p.Box,{children:[(0,n.jsx)(p.Text,{variant:"text-body-meta-regular",color:"text-light",children:"Where to find my Membership ID Number:"}),(0,n.jsx)(p.Image,{width:"100%",height:"auto",src:"https://images.ctfassets.net/0t897tgc80v7/7uNdTqwf8eRDlvJB51S69E/972a00db0acaa4136dd531435cc22d36/anthem_member_id_13_char.png",alt:"Member ID guidance"})]}),description:(0,n.jsx)(p.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"Enter the 13-character Member ID number as displayed on your Anthem Membership ID Card."})}},[g.J.InsuranceDetailsReview]:{insuranceMemberID:N}};var _=a(4225);let V=w.kT.CareCompass,CareCompassWorkflow=e=>{let{render:t}=e,[a,i]=(0,B.eO)(L),r=(0,o.useMemo)(()=>(0,R.k)(a.value),[a.value]);(0,J.R)(r,V);let x=(0,o.useCallback)(e=>{i({type:"SUBMIT",data:e})},[i]),y=(0,o.useCallback)(()=>{i({type:"BACK"})},[i]),v=(0,o.useCallback)(()=>{switch(r){case j.a.PreEligibility:return(0,n.jsx)(l.b,{configuration:{contentResources:b[g.J.PreEligibility]},onSubmit:x});case j.a.ContactDetails:return(0,n.jsx)(s.q,{configuration:{contentResources:b[g.J.ContactDetails],fields:W[g.J.ContactDetails]},onSubmit:x,defaultValues:a.context.formData});case j.a.EligibilityUnmet:return(0,n.jsx)(c.X,{configuration:{contentResources:b[g.J.EligibilityUnmet]},onSubmit:x,loading:a.matches({[j.a.EligibilityUnmet]:j.a.Submitting}),isEmailSent:a.matches({[j.a.EligibilityUnmet]:j.a.Success}),hasError:a.matches({[j.a.EligibilityUnmet]:j.a.Error}),isMobileFooterSticky:!1});case j.a.InsuranceDetails:return(0,n.jsx)(d.v,{configuration:{contentResources:b[g.J.InsuranceDetails],fields:W[g.J.InsuranceDetails]},onSubmit:x,onBack:y});case j.a.InsuranceDetailsReview:return(0,n.jsx)(u.b,{configuration:{contentResources:b[g.J.InsuranceDetailsReview],fields:W[g.J.InsuranceDetailsReview]},onSubmit:x,loading:a.matches({[j.a.InsuranceDetailsReview]:j.a.Submitting}),hasError:a.matches({[j.a.InsuranceDetailsReview]:j.a.Error}),defaultValues:a.context.formData});case j.a.ApplicationComplete:return(0,n.jsx)(h.J,{...b[g.J.ApplicationComplete],email:a.context.formData.email});case j.a.ApplicationReview:return(0,n.jsx)(m.G,{...b[g.J.ApplicationReview]});case j.a.ApplicationDetected:return(0,n.jsx)(_.v,{...b[g.J.ApplicationDetected],email:a.context.formData.email});default:return null}},[r,a]);return t({header:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(p.Flex,{gap:"spacer-5",alignItems:"center",children:[(0,n.jsx)(O.E,{partner:w.kT.Flyte}),(0,n.jsx)(p.Divider,{orientation:"vertical",alignSelf:"stretch",height:"auto"}),(0,n.jsx)(O.E,{partner:V})]}),(0,n.jsx)(U.K,{currentStep:r})]}),body:v(),currentWorkFlowStep:r})}},21991:function(e,t,a){a.d(t,{k:function(){return ChristianaCareWorkflow}});var i,r,n=a(85893),o=a(67294),s=a(79447),l=a(17081),c=a(55632),d=a(21954),u=a(98694),h=a(28588),m=a(9941),p=a(71986),g=a(97213),x=a(93773);let b={[x.J.PreEligibility]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-primary",children:"Let's make sure you're eligible for the FlyteHealth program."}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"To be eligible for the FlyteHealth program through ChristianaCare, you must meet specific age and Body Mass Index (BMI)* requirements."})]}),bmiEnrollmentDisclaimer:(0,n.jsx)(p.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"*We acknowledge that Body Mass Index (BMI) is an imperfect way to screen for excess weight. FlyteHealth providers do not use BMI alone as a measure of overall health. Instead, BMI is used as a data point to see if someone is eligible to join the FlyteHealth program. Once someone joins the program, we'll ask each person more about their health to create a personalized treatment plan."})},[x.J.EligibilityUnmet]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-secondary-negative",children:"Unfortunately, you are not eligible to join FlyteHealth at this time."}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"The FlyteHealth program requires a minimum BMI of 27+ (plus one or more weight-related health conditions) or a BMI of 30+."})]})},[x.J.ContactDetails]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-secondary-negative",children:"Congratulations! You're eligible for the FlyteHealth program"}),(0,n.jsxs)(p.TextPairing.SubLabel,{color:"text-secondary",children:["To help match your information with the ChristianaCare Caregivers with Highmark insurance plan, tell us about yourself.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Next, we'll ask about your Highmark membership. Be sure to have your insurance card handy."]})]})},[x.J.InsuranceDetails]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsxs)(p.TextPairing.Label,{color:"text-primary",children:[(0,n.jsxs)(p.Text,{display:{base:"inline",lg:"block"},as:"label",variant:"text-header-2XL",color:"text-secondary-negative",children:["One more thing:"," "]}),"What's your Highmark membership number?"]}),(0,n.jsxs)(p.TextPairing.SubLabel,{color:"text-secondary",children:["If you are a caregiver or dependent who does not have the ChristianaCare-provided Highmark insurance plan, please apply for"," ",(0,n.jsx)(p.Link,{href:"/",size:"l",children:"FlyteHealth Direct"}),"."]})]})},[x.J.InsuranceDetailsReview]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{children:"Let's review: Is your info correct?"}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"Please double-check the information you provided to make sure everything is correct."})]})},[x.J.ApplicationComplete]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-secondary-negative",children:"Welcome aboard! We're so excited you're here."}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"Next, we need to confirm your email. Click the link we sent to:"})]}),description:(0,n.jsx)(p.Text,{mt:"spacer-8",color:"text-secondary",variant:"text-body-regular",children:"Can’t find the email? Make sure to check your Spam folder."})},[x.J.ApplicationReview]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-primary",children:"You're almost finished!"}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"We've received your application, but we need a little more information from you to move forward. Please call us to complete the application process."})]})},[x.J.ApplicationDetected]:{title:(0,n.jsx)(p.Text,{variant:"text-header-2XL",color:"text-primary",children:"We found an existing account for:"}),description:(0,n.jsx)(p.Text,{variant:"text-body-display-S",color:"text-secondary",children:"It looks like you already have an account with us. To continue or update your registration details, please contact our Care Coordinator team."})},[x.J.OnboardingChecklist]:g.T[x.J.OnboardingChecklist],[x.J.CreatePassword]:g.T[x.J.CreatePassword],[x.J.AppDownload]:g.T[x.J.AppDownload],[x.J.ReviewConsents]:g.T[x.J.ReviewConsents]};var y=a(90420),v=a(98491),f=a(94445),C=a(34e3),I=a(5111),D=a(67989),j=a(15615),S=a(6426);let w={maxLength:15,minLength:15,registerOptions:{minLength:{value:15,message:"Enter the 15-character member ID number."},maxLength:{value:15,message:"Enter the 15-character member ID number."},pattern:{value:/^(C9I|C9O)/i,message:"Member ID must begin with C9i or C9o."}},label:"Highmark Membership ID Number",placeholder:"C9XXXXXXXXXXXXX"},E={[x.J.ContactDetails]:{state:{options:S.Fp}},[x.J.InsuranceDetails]:{insuranceMemberID:{...w,description:(0,n.jsx)(p.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"Enter the 15-digit Member ID as displayed on your Highmark Membership ID Card."}),tooltip:(0,n.jsxs)(p.Box,{children:[(0,n.jsx)(p.Text,{variant:"text-body-meta-regular",color:"text-light",children:"Where to find my Membership ID Number:"}),(0,n.jsx)(p.Image,{width:"100%",height:"auto",src:"/static/assets/programs/christiana-care-insurance-card.png",alt:"Member ID guidance"})]})}},[x.J.InsuranceDetailsReview]:{insuranceMemberID:w}};var T=a(4225),k=a(20893),P=a(10265),F=a(52766),A=a(94788),M=a(47243),L=a(30368);let isEligibleForAutoEnrollment=e=>{let{groupNumber:t,status:a}=e;return["10556700","10556701","10556702","10556703","10556704","10556705","10556706","10556707","10556708","10556709","10556710","10556711","10556712","10556713","10556714","10556715","10556716","10556717","10556718","10556719","10556720","10556721","10556722","10556723","10556724","10556725","10556726","10556727","10556728"].includes(t)&&"Active"===a},getLeadStatus=e=>{let{groupNumber:t,status:a}=e;if(!isEligibleForAutoEnrollment({groupNumber:t,status:a}))return j.rl.EligibleWaiting};var R=a(61741),B=a(97620),O=a(4e4);(i=r||(r={})).CreateLead="createLead",i.CheckBenefits="checkBenefits";let U={...v.a,...r},J=B.aU[P.kT.ChristianaCare],H={formData:{birthdate:"",comorbidity:"",currentWeightInPounds:"",dateOfHighestWeightValue:"",email:"",firstName:"",heightInFoot:"",heightInInch:"",highestWeightInPounds:"",insuranceCoverage:void 0,insuranceMemberID:"",insurance:void 0,lastName:"",phone:"",state:void 0,termsAgreement:!1,howDidYouFindUS:""},bmi:void 0,benefitsCheck:void 0},N=(0,A.cY)({types:{},guards:{isPreEligibilityMet:e=>{let{context:{formData:t,bmi:a}}=e;return F.Pq.christianaCare({bmi:a,comorbidity:t.comorbidity,birthdate:t.birthdate})},isApplicationReviewRequired:e=>{var t,a;let{context:{benefitsCheck:i}}=e;return!isEligibleForAutoEnrollment({groupNumber:null==i?void 0:null===(t=i.coverage)||void 0===t?void 0:t.groupNumber,status:null==i?void 0:null===(a=i.coverage)||void 0===a?void 0:a.status})},isApplicationDetected:R.Q},actions:{updateFormData:(0,M.a)({formData:e=>{let{context:t,event:a}=e;return{...t.formData,...a.data}}}),assignBMI:(0,M.a)({bmi:e=>{let{context:t}=e,{heightInFoot:a,heightInInch:i,highestWeightInPounds:r}=t.formData;return(0,F.V2)({heightFeet:(0,F.MC)(a),heightInches:(0,F.MC)(i),weightPounds:(0,F.MC)(r)})}}),reset:(0,M.a)({...H}),resetBenefitsCheck:(0,M.a)({benefitsCheck:void 0})}}).createMachine({context:()=>H,id:"christianaCareMachine",initial:U.PreEligibility,states:{[U.PreEligibility]:{id:U.PreEligibility,initial:U.Idle,states:{[U.Idle]:{on:{SUBMIT:{target:U.Submitting,actions:"updateFormData"}}},[U.Submitting]:{entry:"assignBMI",always:[{target:"#".concat(U.ContactDetails),guard:"isPreEligibilityMet"},{target:"#".concat(U.EligibilityUnmet)}]}}},[U.ContactDetails]:{id:U.ContactDetails,initial:U.Idle,states:{[U.Idle]:{on:{SUBMIT:{target:"#".concat(U.InsuranceDetails),actions:"updateFormData"}}}}},[U.InsuranceDetails]:{id:U.InsuranceDetails,initial:U.Idle,states:{[U.Idle]:{on:{BACK:{target:"#".concat(U.ContactDetails)},SUBMIT:{target:"#".concat(U.InsuranceDetailsReview),actions:"updateFormData"}}}}},[U.InsuranceDetailsReview]:{id:U.InsuranceDetailsReview,initial:U.Idle,states:{[U.Idle]:{on:{SUBMIT:{actions:"updateFormData",target:U.Submitting}}},[U.Submitting]:{id:U.Submitting,initial:U.CheckBenefits,states:{[U.CheckBenefits]:{id:U.CheckBenefits,invoke:{src:(0,L.p4)(async e=>{let{input:t}=e,a={...t,payerCode:B.qK[P.PF.Highmark]};return await (0,O.o)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:[{actions:(0,M.a)({benefitsCheck:e=>{let{event:t}=e;return t.output.data}}),target:"#".concat(U.CreateLead)}],onError:"#".concat(U.CreateLead)}},[U.CreateLead]:{id:U.CreateLead,invoke:{src:(0,L.p4)(async e=>{var t,a,i,r,n,o,s,l,c,d,u,h;let{input:m}=e,p={...m.formData,...m.formData.insuranceMemberID&&{employmentVerificationCode:m.formData.insuranceMemberID},...m.benefitsCheck&&{benefitsCheck:m.benefitsCheck},...isEligibleForAutoEnrollment({groupNumber:null===(a=m.benefitsCheck)||void 0===a?void 0:null===(t=a.coverage)||void 0===t?void 0:t.groupNumber,status:null===(r=m.benefitsCheck)||void 0===r?void 0:null===(i=r.coverage)||void 0===i?void 0:i.status})&&{eligibilityVerifiedBy:P.Vn.Pverify},insurance:B.KG[P.kT.ChristianaCare],evolveOrganization:P.bV["ChristianaCare - Caregivers"],company:J,leadStatus:getLeadStatus({groupNumber:null===(o=m.benefitsCheck)||void 0===o?void 0:null===(n=o.coverage)||void 0===n?void 0:n.groupNumber,status:null===(l=m.benefitsCheck)||void 0===l?void 0:null===(s=l.coverage)||void 0===s?void 0:s.status}),automateEvolveEnrollment:isEligibleForAutoEnrollment({groupNumber:null===(d=m.benefitsCheck)||void 0===d?void 0:null===(c=d.coverage)||void 0===c?void 0:c.groupNumber,status:null===(h=m.benefitsCheck)||void 0===h?void 0:null===(u=h.coverage)||void 0===u?void 0:u.status})};return await (0,k.$)(p)}),input:e=>{let{context:t}=e;return t},onDone:[{guard:"isApplicationReviewRequired",target:"#".concat(U.ApplicationReview)},{target:"#".concat(U.ApplicationComplete)}],onError:[{guard:"isApplicationDetected",target:"#".concat(U.ApplicationDetected)},{target:"#".concat(U.Error)}]}}}},[U.Error]:{id:U.Error,on:{SUBMIT:{actions:["updateFormData","resetBenefitsCheck"],target:U.Submitting}}}}},[U.ApplicationReview]:{id:U.ApplicationReview},[U.ApplicationComplete]:{id:U.ApplicationComplete},[U.ApplicationDetected]:{id:U.ApplicationDetected},[U.EligibilityUnmet]:{id:U.EligibilityUnmet,initial:U.Idle,states:{[U.Idle]:{on:{SUBMIT:{target:U.Submitting,actions:"updateFormData"}}},[U.Submitting]:{invoke:{src:(0,L.p4)(async e=>{let{input:t}=e,a={...t,company:J,leadStatus:P.rl.Ineligible,ineligibilityReason:P.ib.BMI,automateEvolveEnrollment:!1};return await (0,k.$)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:U.Success,onError:U.Error}},[U.Success]:{},[U.Error]:{on:{SUBMIT:{actions:"updateFormData",target:U.Submitting}}}}}},on:{RESET:{target:"#".concat(U.PreEligibility),actions:"reset"}}}),W=j.kT.ChristianaCare,ChristianaCareWorkflow=e=>{let{render:t}=e,[a,i]=(0,f.eO)(N),r=(0,o.useMemo)(()=>(0,y.k)(a.value),[a.value]);(0,D.R)(r,W);let g=(0,o.useCallback)(e=>{i({type:"SUBMIT",data:e})},[i]),S=(0,o.useCallback)(()=>{i({type:"BACK"})},[i]),w=(0,o.useCallback)(()=>{switch(r){case v.a.PreEligibility:return(0,n.jsx)(l.b,{configuration:{contentResources:b[x.J.PreEligibility]},onSubmit:g});case v.a.ContactDetails:return(0,n.jsx)(s.q,{configuration:{contentResources:b[x.J.ContactDetails],fields:E[x.J.ContactDetails]},onSubmit:g,defaultValues:a.context.formData});case v.a.EligibilityUnmet:return(0,n.jsx)(c.X,{configuration:{contentResources:b[x.J.EligibilityUnmet]},onSubmit:g,loading:a.matches({[v.a.EligibilityUnmet]:v.a.Submitting}),isEmailSent:a.matches({[v.a.EligibilityUnmet]:v.a.Success}),hasError:a.matches({[v.a.EligibilityUnmet]:v.a.Error})});case v.a.InsuranceDetails:return(0,n.jsx)(d.v,{configuration:{contentResources:b[x.J.InsuranceDetails],fields:E[x.J.InsuranceDetails]},onSubmit:g,onBack:S});case v.a.InsuranceDetailsReview:return(0,n.jsx)(u.b,{configuration:{contentResources:b[x.J.InsuranceDetailsReview],fields:E[x.J.InsuranceDetailsReview]},onSubmit:g,loading:a.matches({[v.a.InsuranceDetailsReview]:v.a.Submitting}),hasError:a.matches({[v.a.InsuranceDetailsReview]:v.a.Error}),defaultValues:a.context.formData});case v.a.ApplicationComplete:return(0,n.jsx)(h.J,{...b[x.J.ApplicationComplete],email:a.context.formData.email});case v.a.ApplicationDetected:return(0,n.jsx)(T.v,{...b[x.J.ApplicationDetected],email:a.context.formData.email});case v.a.ApplicationReview:return(0,n.jsx)(m.G,{...b[x.J.ApplicationReview]});default:return null}},[r,a]);return t({header:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(p.Flex,{gap:"spacer-5",alignItems:"center",children:[(0,n.jsx)(C.E,{partner:j.kT.Flyte}),(0,n.jsx)(p.Divider,{orientation:"vertical",alignSelf:"stretch",height:"auto"}),(0,n.jsx)(C.E,{partner:W})]}),(0,n.jsx)(I.K,{currentStep:r})]}),body:w(),currentWorkFlowStep:r})}},45321:function(e,t,a){a.d(t,{I:function(){return DGAWorkflow}});var i,r,n=a(85893),o=a(67294),s=a(79447),l=a(17081),c=a(55632),d=a(21954),u=a(98694),h=a(28588),m=a(9941),p=a(71986),g=a(97213),x=a(93773);let b={[x.J.PreEligibility]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-primary",children:"Let's make sure you're eligible for the FlyteHealth program."}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"To be eligible for the FlyteHealth program through Directors Guild of America - Producer Health Plan, you must meet specific age and Body Mass Index (BMI)* requirements."})]}),bmiEnrollmentDisclaimer:(0,n.jsx)(p.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"*We acknowledge that Body Mass Index (BMI) is an imperfect way to screen for excess weight. FlyteHealth providers do not use BMI alone as a measure of overall health. Instead, BMI is used as a data point to see if someone is eligible to join the FlyteHealth program. Once someone joins the program, we'll ask each person more about their health to create a personalized treatment plan."})},[x.J.EligibilityUnmet]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-secondary-negative",children:"Unfortunately, you are not eligible to join FlyteHealth at this time."}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"The FlyteHealth program requires a minimum BMI of 27+ (plus one or more weight-related health conditions) or a BMI of 30+."})]})},[x.J.ContactDetails]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-secondary-negative",children:"Congratulations! You're eligible for the FlyteHealth program"}),(0,n.jsxs)(p.TextPairing.SubLabel,{color:"text-secondary",children:["To help match your information with the DGA - Producer Health Plan, tell us about yourself.",(0,n.jsx)("br",{})," ",(0,n.jsx)("br",{}),"Next, we'll ask about your coverage status. Be sure to have your insurance card handy."]})]})},[x.J.InsuranceDetails]:{title:(0,n.jsxs)(p.Text,{variant:"text-header-2XL",color:"text-secondary-negative",children:["One more thing:"," ",(0,n.jsx)(p.Text,{as:"span",variant:"text-header-2XL",color:"text-primary",children:"What's your DGA - Producer Health Plan Participant ID?"})]})},[x.J.InsuranceDetailsReview]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{children:"Let's review: Is your info correct?"}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"Please double-check the information you provided to make sure everything is correct."})]})},[x.J.ApplicationComplete]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-secondary-negative",children:"Welcome aboard! We're so excited you're here."}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"Next, we need to confirm your email. Click the link we sent to:"})]}),description:(0,n.jsx)(p.Text,{mt:"spacer-8",color:"text-secondary",variant:"text-body-regular",children:"Can’t find the email? Make sure to check your Spam folder."})},[x.J.ApplicationReview]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-primary",children:"You're almost finished!"}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"We've received your application, but we need a little more information from you to move forward. Please call us to complete the application process."})]})},[x.J.ApplicationDetected]:{title:(0,n.jsx)(p.Text,{variant:"text-header-2XL",color:"text-primary",children:"We found an existing account for:"}),description:(0,n.jsx)(p.Text,{variant:"text-body-display-S",color:"text-secondary",children:"It looks like you already have an account with us. To continue or update your registration details, please contact our Care Coordinator team."})},[x.J.OnboardingChecklist]:g.T[x.J.OnboardingChecklist],[x.J.CreatePassword]:g.T[x.J.CreatePassword],[x.J.AppDownload]:g.T[x.J.AppDownload],[x.J.ReviewConsents]:g.T[x.J.ReviewConsents]};var y=a(20893),v=a(10265),f=a(52766),C=a(94788),I=a(47243),D=a(30368),j=a(98491),S=a(3938),w=a(15615);let isEligibleForAutoEnrollment=e=>e===S._.FULL_MATCH||e===S._.ELIGIBLE_MATCH,getLeadStatus=e=>{switch(e){case S._.PERSON_MATCH:case S._.INSURANCE_MATCH:case S._.EXPIRED:case S._.NOT_FOUND:return w.rl.EligibleWaiting;case S._.FULL_MATCH:case S._.ELIGIBLE_MATCH:default:return}};var E=a(76364),T=a(61741),k=a(97620);(i=r||(r={})).CheckEligibility="checkEligibility",i.CreateLead="createLead";let P={...j.a,...r},F=k.aU[v.kT.DGA],A={formData:{birthdate:"",comorbidity:"",currentWeightInPounds:"",dateOfHighestWeightValue:"",email:"",ssn:"",firstName:"",heightInFoot:"",heightInInch:"",highestWeightInPounds:"",insuranceCoverage:void 0,insuranceMemberID:"",insurance:void 0,lastName:"",phone:"",termsAgreement:!1,howDidYouFindUS:""},eligibilityCheckMatchType:void 0,bmi:void 0},M=(0,C.cY)({types:{},guards:{isPreEligibilityMet:e=>{let{context:{formData:t,bmi:a}}=e;return f.Pq.dga({bmi:a,comorbidity:t.comorbidity})},isApplicationReviewRequired:e=>{let{context:{eligibilityCheckMatchType:t}}=e;return[v._q.EXPIRED,v._q.INSURANCE_MATCH,v._q.PERSON_MATCH,v._q.NOT_FOUND].includes(t)},isApplicationDetected:T.Q},actions:{updateFormData:(0,I.a)({formData:e=>{let{context:t,event:a}=e;return{...t.formData,...a.data}}}),assignBMI:(0,I.a)({bmi:e=>{let{context:t}=e,{heightInFoot:a,heightInInch:i,highestWeightInPounds:r}=t.formData;return(0,f.V2)({heightFeet:(0,f.MC)(a),heightInches:(0,f.MC)(i),weightPounds:(0,f.MC)(r)})}}),reset:(0,I.a)({...A})}}).createMachine({context:()=>A,id:"dgaMachine",initial:P.PreEligibility,states:{[P.PreEligibility]:{id:P.PreEligibility,initial:P.Idle,states:{[P.Idle]:{on:{SUBMIT:{target:P.Submitting,actions:"updateFormData"}}},[P.Submitting]:{entry:"assignBMI",always:[{target:"#".concat(P.ContactDetails),guard:"isPreEligibilityMet"},{target:"#".concat(P.EligibilityUnmet)}]}}},[P.ContactDetails]:{id:P.ContactDetails,initial:P.Idle,states:{[P.Idle]:{on:{SUBMIT:{target:"#".concat(P.InsuranceDetails),actions:"updateFormData"}}}}},[P.InsuranceDetails]:{id:P.InsuranceDetails,initial:P.Idle,states:{[P.Idle]:{on:{BACK:{target:"#".concat(P.ContactDetails)},SUBMIT:{target:"#".concat(P.InsuranceDetailsReview),actions:"updateFormData"}}}}},[P.InsuranceDetailsReview]:{id:P.InsuranceDetailsReview,initial:P.Idle,states:{[P.Idle]:{on:{SUBMIT:{actions:"updateFormData",target:P.Submitting}}},[P.Submitting]:{id:P.Submitting,initial:P.CheckEligibility,states:{[P.CheckEligibility]:{id:P.CheckEligibility,invoke:{src:(0,D.p4)(async e=>{let{input:t}=e,a={...t,insuranceMemberID:t.ssn,insurance:k.Er[v.kT.DGA],benefitProgram:k.Q1[v.kT.DGA]};return await (0,E.m)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:[{actions:(0,I.a)({eligibilityCheckMatchType:e=>{let{event:t}=e;return t.output.data.matchType}}),target:"#".concat(P.CreateLead)}],onError:"#".concat(P.Error)}},[P.CreateLead]:{id:P.CreateLead,invoke:{src:(0,D.p4)(async e=>{let{input:t}=e,a={...t.formData,...t.formData.ssn&&{employmentVerificationCode:t.formData.ssn},eligibilityVerifiedBy:v.Vn.Evolve,insuranceMemberID:(0,f.MC)(t.formData.insuranceMemberID).toString(),company:F,insurance:k.KG[v.kT.DGA],evolveOrganization:v.bV["Directors Guild of America – Producer Health Plan"],leadStatus:getLeadStatus(t.eligibilityCheckMatchType),automateEvolveEnrollment:isEligibleForAutoEnrollment(t.eligibilityCheckMatchType)};return await (0,y.$)(a)}),input:e=>{let{context:t}=e;return t},onDone:[{guard:"isApplicationReviewRequired",target:"#".concat(P.ApplicationReview)},{target:"#".concat(P.ApplicationComplete)}],onError:[{guard:"isApplicationDetected",target:"#".concat(P.ApplicationDetected)},{target:"#".concat(P.Error)}]}}}},[P.Error]:{id:P.Error,on:{SUBMIT:{actions:"updateFormData",target:P.Submitting}}}}},[P.ApplicationReview]:{id:P.ApplicationReview},[P.ApplicationComplete]:{id:P.ApplicationComplete},[P.ApplicationDetected]:{id:P.ApplicationDetected},[P.EligibilityUnmet]:{id:P.EligibilityUnmet,initial:P.Idle,states:{[P.Idle]:{on:{SUBMIT:{target:P.Submitting,actions:"updateFormData"}}},[P.Submitting]:{invoke:{src:(0,D.p4)(async e=>{let{input:t}=e,a={...t,company:F,leadStatus:v.rl.Ineligible,ineligibilityReason:v.ib.BMI,automateEvolveEnrollment:!1};return await (0,y.$)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:P.Success,onError:P.Error}},[P.Success]:{},[P.Error]:{on:{SUBMIT:{target:P.Submitting}}}}}},on:{RESET:{target:"#".concat(P.PreEligibility),actions:"reset"}}});var L=a(90420),R=a(94445),B=a(34e3),O=a(5111),U=a(67989),J=a(6426);let H={placeholder:"DGAXXXXXXXX",label:"DGA - Producer Plan Participant ID",maxLength:11,minLength:11,inputMode:"numeric",maskOptions:{mask:["D","G","A",/\d/,/\d/,/\d/,/\d/,/\d/,/\d/,/\d/,/\d/],prefix:"DGA"},registerOptions:{minLength:{value:11,message:"Enter the 8-digit member ID number."},maxLength:{value:11,message:"Enter the 8-digit member ID number."}}},N={[x.J.ContactDetails]:{ssn:{},state:{options:J.Fp}},[x.J.InsuranceDetails]:{insuranceMemberID:{description:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"Enter your Member ID number"}),(0,n.jsx)(p.Text,{variant:"text-body-meta-bold",color:"text-secondary",children:"Omit the first three alphabetic characters ('DGA')"})]}),...H}},[x.J.InsuranceDetailsReview]:{insuranceMemberID:H}};var W=a(4225);let DGAWorkflow=e=>{let{render:t}=e,[a,i]=(0,R.eO)(M),r=(0,o.useMemo)(()=>(0,L.k)(a.value),[a.value]);(0,U.R)(r);let g=(0,o.useCallback)(e=>{i({type:"SUBMIT",data:e})},[i]),y=(0,o.useCallback)(()=>{i({type:"BACK"})},[i]),v=(0,o.useCallback)(()=>{switch(r){case j.a.PreEligibility:return(0,n.jsx)(l.b,{configuration:{contentResources:b[x.J.PreEligibility]},onSubmit:g});case j.a.ContactDetails:return(0,n.jsx)(s.q,{configuration:{contentResources:b[x.J.ContactDetails],fields:N[x.J.ContactDetails]},onSubmit:g,defaultValues:a.context.formData});case j.a.EligibilityUnmet:return(0,n.jsx)(c.X,{configuration:{contentResources:b[x.J.EligibilityUnmet]},onSubmit:g,loading:a.matches({[j.a.EligibilityUnmet]:j.a.Submitting}),isEmailSent:a.matches({[j.a.EligibilityUnmet]:j.a.Success}),hasError:a.matches({[j.a.EligibilityUnmet]:j.a.Error})});case j.a.InsuranceDetails:return(0,n.jsx)(d.v,{configuration:{contentResources:b[x.J.InsuranceDetails],fields:N[x.J.InsuranceDetails]},onSubmit:g,onBack:y});case j.a.InsuranceDetailsReview:return(0,n.jsx)(u.b,{configuration:{contentResources:b[x.J.InsuranceDetailsReview],fields:N[x.J.InsuranceDetailsReview]},onSubmit:g,loading:a.matches({[j.a.InsuranceDetailsReview]:j.a.Submitting}),hasError:a.matches({[j.a.InsuranceDetailsReview]:j.a.Error}),defaultValues:a.context.formData});case j.a.ApplicationComplete:return(0,n.jsx)(h.J,{...b[x.J.ApplicationComplete],email:a.context.formData.email});case j.a.ApplicationDetected:return(0,n.jsx)(W.v,{...b[x.J.ApplicationDetected],email:a.context.formData.email});case j.a.ApplicationReview:return(0,n.jsx)(m.G,{...b[x.J.ApplicationReview]});default:return null}},[r,a]);return t({header:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(p.Flex,{gap:"spacer-5",alignItems:"center",children:[(0,n.jsx)(B.E,{partner:w.kT.Flyte}),(0,n.jsx)(p.Divider,{orientation:"vertical",alignSelf:"stretch",height:"auto"}),(0,n.jsx)(B.E,{partner:w.kT.DGA})]}),(0,n.jsx)(O.K,{currentStep:r})]}),body:v(),currentWorkFlowStep:r})}},92900:function(e,t,a){a.d(t,{U:function(){return FlyteSignUpLauncher}});var i,r,n,o=a(85893),s=a(67294),l=a(71986),c=a(78430),d=a(7351),u=a(93773),h=a(90420),m=a(94445),p=a(34e3),g=a(15615),x=a(10265),b=a(94788);let y={WorkflowSelector:"workflowSelector",...x.kT},v=(0,b.cY)({types:{},guards:{isCareCompassSelected:e=>{let{event:t}=e;return t.data.workflow===x.kT.CareCompass},isAetnaSelected:e=>{let{event:t}=e;return t.data.workflow===x.kT.Aetna},isRiverspringSelected:e=>{let{event:t}=e;return t.data.workflow===x.kT.RiverSpringLiving},isPequotSelected:e=>{let{event:t}=e;return t.data.workflow===x.kT.PequotHealthCare},isPyleSelected:e=>{let{event:t}=e;return t.data.workflow===x.kT.PyleFamilyInsurance},isDGASelected:e=>{let{event:t}=e;return t.data.workflow===x.kT.DGA},isMDSaveSelected:e=>{let{event:t}=e;return t.data.workflow===x.kT.MDSave},isChristianaCareSelected:e=>{let{event:t}=e;return t.data.workflow===x.kT.ChristianaCare}}}).createMachine({id:"workflowManagerMachine",initial:y.WorkflowSelector,states:{[y.WorkflowSelector]:{id:y.WorkflowSelector,on:{SUBMIT:[{guard:"isCareCompassSelected",target:y.CareCompass},{guard:"isAetnaSelected",target:y.Aetna},{guard:"isRiverspringSelected",target:y.RiverSpringLiving},{guard:"isPequotSelected",target:y.PequotHealthCare},{guard:"isPyleSelected",target:y.PyleFamilyInsurance},{guard:"isDGASelected",target:y.DGA},{guard:"isMDSaveSelected",target:y.MDSave},{guard:"isChristianaCareSelected",target:y.ChristianaCare},{target:y.Flyte}]}},[y.PequotHealthCare]:{},[y.RiverSpringLiving]:{},[y.CareCompass]:{},[y.Aetna]:{},[y.Flyte]:{},[y.PyleFamilyInsurance]:{},[y.DGA]:{},[y.MDSave]:{},[y.ChristianaCare]:{}}});var f=a(79447),C=a(17081),I=a(55632),D=a(21954),j=a(98694),S=a(28588),w=a(9941),E=a(97213);let T={[u.J.PreEligibility]:{title:(0,o.jsxs)(l.TextPairing,{variant:"textpairing-header-2XL",children:[(0,o.jsxs)(l.TextPairing.Label,{color:"text-secondary-negative",children:["We're so glad you're here!"," ",(0,o.jsx)(l.Text,{as:"span",variant:"text-header-2XL",color:"text-primary",children:"Let's make sure you're eligible for FlyteHealth."})]}),(0,o.jsx)(l.TextPairing.SubLabel,{color:"text-secondary",children:"You must meet specific age and Body Mass Index (BMI) requirements* to be eligible for the FlyteHealth program."})]}),bmiEnrollmentDisclaimer:(0,o.jsx)(l.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"*We acknowledge that Body Mass Index (BMI) is an imperfect way to screen for excess weight. FlyteHealth providers do not use BMI alone as a measure of overall health. Instead, BMI is used as a data point to see if someone is eligible to join the FlyteHealth program. Once someone joins the program, we'll ask each person more about their health to create a personalized treatment plan."})},[u.J.EligibilityUnmet]:{title:(0,o.jsxs)(l.TextPairing,{variant:"textpairing-header-2XL",children:[(0,o.jsx)(l.TextPairing.Label,{color:"text-secondary-negative",children:"Unfortunately, you are not eligible to join FlyteHealth at this time."}),(0,o.jsx)(l.TextPairing.SubLabel,{color:"text-secondary",children:"FlyteHealth requires a minimum BMI of 27+ (plus one or more weight-related health conditions) or a BMI of 30+"})]})},[u.J.ContactDetails]:{title:(0,o.jsxs)(l.TextPairing,{variant:"textpairing-header-2XL",children:[(0,o.jsx)(l.TextPairing.Label,{color:"text-secondary-negative",children:"Congratulations! You're eligible for the FlyteHealth program"}),(0,o.jsx)(l.TextPairing.SubLabel,{color:"text-secondary",children:"Tell us a little more about yourself."})]})},[u.J.InsuranceDetails]:{title:(0,o.jsxs)(l.Text,{variant:"text-header-2XL",color:"text-secondary-negative",children:["One more thing:"," ",(0,o.jsx)(l.Text,{as:"span",variant:"text-header-2XL",color:"text-primary",children:"Do you have health insurance?"})]})},[u.J.InsuranceDetailsReview]:{title:(0,o.jsxs)(l.TextPairing,{variant:"textpairing-header-2XL",children:[(0,o.jsx)(l.TextPairing.Label,{children:"Let's review: Is your info correct?"}),(0,o.jsx)(l.TextPairing.SubLabel,{color:"text-secondary",children:"Please double-check the information you provided to make sure everything is correct."})]})},[u.J.ApplicationComplete]:{title:(0,o.jsxs)(l.TextPairing,{variant:"textpairing-header-2XL",children:[(0,o.jsx)(l.TextPairing.Label,{color:"text-secondary-negative",children:"Welcome aboard! We're so excited you're here."}),(0,o.jsx)(l.TextPairing.SubLabel,{color:"text-secondary",children:"Next, we need to confirm your email. Click the link we sent to:"})]}),description:(0,o.jsx)(l.Text,{mt:"spacer-8",color:"text-secondary",variant:"text-body-regular",children:"Can’t find the email? Make sure to check your Spam folder."})},[u.J.ApplicationReview]:{title:(0,o.jsxs)(l.TextPairing,{variant:"textpairing-header-2XL",children:[(0,o.jsx)(l.TextPairing.Label,{color:"text-primary",children:"You're almost finished!"}),(0,o.jsx)(l.TextPairing.SubLabel,{color:"text-secondary",children:"We've received your application, but we need a little more information from you to move forward. Please call us to complete the application process."})]})},[u.J.ApplicationDetected]:{title:(0,o.jsx)(l.Text,{variant:"text-header-2XL",color:"text-primary",children:"We found an existing account for:"}),description:(0,o.jsx)(l.Text,{variant:"text-body-display-S",color:"text-secondary",children:"It looks like you already have an account with us. To continue or update your registration details, please contact our Care Coordinator team."})},[u.J.EmailVerification]:e=>({title:(0,o.jsxs)(l.TextPairing,{variant:"textpairing-header-2XL",children:[(0,o.jsxs)(l.TextPairing.Label,{children:["Enter the"," ",(0,o.jsx)(l.Text,{color:"text-secondary-negative",as:"span",variant:"text-header-2XL",children:"6 digit code"})," ","we've sent you"]}),(0,o.jsxs)(l.TextPairing.SubLabel,{color:"text-secondary",children:["To confirm your email, enter the code we sent to ",(0,o.jsx)("b",{children:e})]})]})}),[u.J.OnboardingChecklist]:E.T[u.J.OnboardingChecklist],[u.J.CreatePassword]:E.T[u.J.CreatePassword],[u.J.AppDownload]:E.T[u.J.AppDownload],[u.J.ReviewConsents]:E.T[u.J.ReviewConsents]};var k=a(20893),P=a(52766),F=a(47243),A=a(30368),M=a(98491),L=a(76089);let R=[g.PF["1199SEIU"],g.PF.BCBS,g.PF.BCBSPPO,g.PF.United],B=[g.PF.Aetna,g.PF.Cigna],getEvolveOrganization=(e,t,a)=>{if(a===g.eF.SelfPay)return t===g.i$["New York"]?g.bV.SIA:g.bV.Flyte;let i=R.includes(e)||B.includes(e)&&t===g.i$["New York"]||e===g.PF.Other&&t===g.i$["New York"];return i?g.bV.SIA:g.bV.Flyte},isInsuranceStateEligible=(e,t)=>{switch(e){case g.PF["1199SEIU"]:return!0;case g.PF.Aetna:case g.PF.Cigna:return[g.i$["New York"],g.i$["New Jersey"],g.i$.Connecticut].includes(t);case g.PF.BCBS:case g.PF.United:return t===g.i$["New York"];case g.PF.BCBSPPO:case g.PF.Other:default:return!1}},isEligibleForAutoEnrollment=e=>{let{bmi:t,comorbidity:a,insurance:i,insuranceCoverage:r,state:n}=e;return(!(t>=27)||!(t<=30)||a!==L.IQ.Yes)&&r!==g.eF.SelfPay&&isInsuranceStateEligible(i,n)},getIneligibilityReason=e=>{let{insuranceCoverage:t,insurance:a,state:i}=e;return t===g.eF.SelfPay?g.ib.CashPay:isInsuranceStateEligible(a,i)?void 0:g.ib.Insurance},getLeadStatus=e=>{let{bmi:t,comorbidity:a,insuranceCoverage:i,insurance:r,state:n}=e;if(!isEligibleForAutoEnrollment({bmi:t,comorbidity:a,insurance:r,insuranceCoverage:i,state:n}))return g.rl.EligibleWaiting},getInsurance=e=>{let{insurance:t,insuranceCoverage:a}=e;return a===g.eF.SelfPay?g.PF.SelfPay:t};var O=a(61741),U=a(97620),J=a(4e4),H=a(78260);a(42881),a(60126);var N=a(58266);a(34155).env.MULESOFT_API_URL,a(62256),a(52902),a(97630),a(17156);var W=a(42474),_=a.n(W);a(48764).Buffer;let SessionManager=class SessionManager{async createTemporarySession(e,t){let a=await this.adapter.getUserByEmail(e);a||(a=await this.adapter.createUser({email:e,emailVerified:null,contactId:t}));let i=this.generateSessionToken();await this.adapter.createSession({sessionToken:i,userId:a.id,expires:new Date(Date.now()+9e5)}),this.setCookie(SessionManager.SESSION_COOKIE_NAME,i,900)}async upgradeSession(){let e=this.req.cookies[SessionManager.SESSION_COOKIE_NAME],{session:t,user:a}=await this.adapter.getSessionAndUser(e);if(!t||!a)throw new N.yj;await this.adapter.updateUser({id:a.id,emailVerified:new Date}),await this.adapter.deleteSession(e);let i=this.generateSessionToken();await this.adapter.createSession({sessionToken:i,userId:a.id,expires:new Date(Date.now()+2592e6)}),this.setCookie(SessionManager.SESSION_COOKIE_NAME,i,2592e3)}async upgradeSessionEmail(e){let t=this.req.cookies[SessionManager.SESSION_COOKIE_NAME],{session:a,user:i}=await this.adapter.getSessionAndUser(t);if(!a||!i)throw new N.yj;await this.adapter.updateUser({id:i.id,email:e})}generateSessionToken(){return _().randomBytes(32).toString("hex")}setCookie(e,t,a){let i="".concat(e,"=").concat(t,"; Path=/; HttpOnly; SameSite=Lax; Max-Age=").concat(a,"; ").concat("Secure");this.res.setHeader("Set-Cookie",i)}constructor(e,t,a){this.adapter=e,this.req=t,this.res=a}};SessionManager.SESSION_COOKIE_NAME="next-auth.session-token",a(56590);let V="/api/contact";var q=a(29262),G=a(40188),z=a(67063),X=a(81058);let serializeContact=e=>{let{birthdate:t,currentWeightInPounds:a,highestWeightInPounds:i,dateOfHighestWeightValue:r,heightInFoot:n,heightInInch:o,phone:s,insuranceCoverage:l,insuranceMemberID:c,state:d,howDidYouFindUS:u,firstName:h,lastName:m,ssn:p,benefitsCheck:g,eligibilityVerifiedBy:x,...b}=e;return{...b,birthdate:(0,q.f)(t),currentWeightInPounds:(0,G.M)(a),highestWeightInPounds:(0,G.M)(i),dateOfHighestWeightValue:"".concat(r,"-01-01"),heightInFoot:(0,G.M)(n),...o&&{heightInInch:(0,G.M)(o)},...c&&{insuranceMemberID:c},...s&&{phone:(0,X.X)(s)},...u&&{howDidYouFindUS:u},...h&&{firstName:h},...m&&{lastName:m},...d&&{state:d},...g&&{...(0,z.D)(g)}}},createContact=async e=>{let t=serializeContact(e),a=await H.Z.post(V,t);return a.data},updateContact=async e=>{let t=await H.Z.put(V,e);return t.data},requestOtp=async e=>{let t=await H.Z.post("/api/auth/request-otp",e);return t},verifyOtp=async e=>{let t=await H.Z.post("/api/auth/verify-otp",e);return t},getConsents=async()=>{let e=await H.Z.get("/api/consents");return e},Y={coding:[{system:"http://terminology.hl7.org/CodeSystem/observation-category",code:"vital-signs",display:"Vital Signs"}],text:"Vital Signs"},K={coding:[{system:"http://snomed.info/sct",code:"733985002",display:"Reported (qualifier value)"}],text:"Reported"},$={LOINC:"http://loinc.org",UNITS_OF_MEASURE:"http://unitsofmeasure.org",CONSENT_SCOPE:"http://terminology.hl7.org/CodeSystem/consentscope",CONSENT_ACTION:"http://terminology.hl7.org/CodeSystem/consentaction",IDENTIFIER_TYPE:"http://terminology.hl7.org/CodeSystem/v2-0203",PATIENT_IDENTIFIER:"https://intellihealth.salesforce.com/contacts/"},Q={HEIGHT:"http://hl7.org/fhir/us/vitals/StructureDefinition/height",BODY_WEIGHT:"http://hl7.org/fhir/us/vitals/StructureDefinition/body-weight"},createPatientResource=(e,t)=>({resourceType:"Patient",identifier:[{use:"secondary",system:$.PATIENT_IDENTIFIER,value:t,period:{start:new Date().toISOString()}}],name:[{family:e.lastName,given:e.firstName}],telecom:[{system:"phone",value:e.phone,use:"home"},{system:"email",value:e.email},{system:"sms",value:e.phone}],birthDate:(0,q.f)(e.birthDate),address:[{use:"home",type:"both",text:e.addressText||"",line:e.addressLines||[],city:e.city||"",state:e.state,postalCode:e.postalCode||""}],extension:[{url:"http://hl7.org/fhir/StructureDefinition/timezone",valueString:Intl.DateTimeFormat().resolvedOptions().timeZone}]}),createObservationResource=(e,t,a,i,r,n,o)=>({resourceType:"Observation",id:e,meta:{profile:["weight"===e?Q.BODY_WEIGHT:Q.HEIGHT]},status:"preliminary",category:[Y],code:{coding:[{system:$.LOINC,code:i,display:r}]},subject:{type:"Patient",identifier:{use:"secondary",system:$.PATIENT_IDENTIFIER,value:n,period:{start:o}}},effectiveDateTime:o,valueQuantity:{value:t,unit:a,system:$.UNITS_OF_MEASURE,code:a},method:K}),createOrganizationResource=e=>({resourceType:"Organization",name:e.evolveOrganization||g.bV.Flyte}),createConsentResources=e=>e.map(e=>({resource:{resourceType:"Consent",identifier:{use:"official",type:{coding:[{system:$.IDENTIFIER_TYPE,code:"FILL",display:"Filler Identifier"}],text:"An identifier issued by FlyeHealth."},value:e.formType},status:"active",scope:{coding:[{system:$.CONSENT_SCOPE,code:"patient-privacy"}]},category:[{coding:[{system:$.LOINC,code:"59284-0"}]}],provision:[{action:[{coding:[{system:$.CONSENT_ACTION,code:"disclose"}]}],period:{start:new Date().toISOString(),end:new Date(new Date().getTime()+31536e6).toISOString()}}],decision:createDecision(e.isAccepted)}})),createDecision=e=>e?"permit":"deny",convertFeetToInches=e=>12*e,serializeFhirData=e=>{let t=new Date().toISOString(),a=(0,G.M)(e.heightInFeet),i=(0,G.M)(e.heightInInch),r=i+convertFeetToInches(a),n={resourceType:"Bundle",identifier:{use:"temp",value:"onboarding-bundle"},type:"collection",timestamp:t,entry:[{resource:createPatientResource(e,e.patientIdentifier)},{resource:createObservationResource("height",r,"[in_i]","8302-2","Body height",e.patientIdentifier,t)},{resource:createObservationResource("weight",(0,G.M)(e.currentWeightInPounds),"[lb_av]","29463-7","Body weight",e.patientIdentifier,t)},{resource:createOrganizationResource(e)},...createConsentResources(e.consents)]};return n},createFlyteUser=async e=>{let t=serializeFhirData(e),a=await H.Z.post("/api/fhir/onboard",t);return a};(r||(r={})).PASSWORD_CHANGE="passwordChange";let passwordChange=async(e,t)=>{let a={action:r.PASSWORD_CHANGE,createPassword:!0,token:e,value:t};return H.Z.post("/api/authmanagement",a)};(i=n||(n={})).CreateLead="createLead",i.CreateContact="createContact",i.UpdateContact="updateContact",i.CheckBenefits="checkBenefits",i.DetermineBenefitsOrLead="determineBenefitsOrLead",i.DetermineContactOrLead="determineContactOrLead",i.FetchConsents="fetchConsents",i.UpdateEmail="updateEmail";let Z={...M.a,...n},ee=U.aU[x.kT.Flyte],et={formData:{birthdate:"",comorbidity:"",currentWeightInPounds:"",dateOfHighestWeightValue:"",email:"",firstName:"",heightInFoot:"",heightInInch:"",highestWeightInPounds:"",insuranceCoverage:void 0,insuranceMemberID:"",insurance:void 0,lastName:"",phone:"",state:void 0,termsAgreement:!1,howDidYouFindUS:""},bmi:void 0,benefitsCheck:void 0,otpData:void 0,consentsData:{items:[],userConsentStatus:[]},contactData:{},passwordData:{password:void 0,confirmPassword:void 0},flyteUserData:void 0,error:void 0},ea=(0,b.cY)({types:{},guards:{isPreEligibilityMet:e=>{let{context:{formData:t,bmi:a}}=e;return P.Pq.flyte({bmi:a,comorbidity:t.comorbidity})},isApplicationReviewRequired:e=>{let{context:{formData:t,bmi:a}}=e;return!isEligibleForAutoEnrollment({bmi:a,comorbidity:t.comorbidity,insuranceCoverage:t.insuranceCoverage,insurance:t.insurance,state:t.state})},isApplicationDetected:O.Q,isInsurerSelected:e=>{let{context:{formData:t}}=e;return!!t.insurance&&t.insurance!==x.PF.Other}},actions:{updateFormData:(0,F.a)({formData:e=>{let{context:t,event:a}=e;return{...t.formData,...a.data}}}),assignBMI:(0,F.a)({bmi:e=>{let{context:t}=e,{heightInFoot:a,heightInInch:i,highestWeightInPounds:r}=t.formData;return(0,P.V2)({heightFeet:(0,P.MC)(a),heightInches:(0,P.MC)(i),weightPounds:(0,P.MC)(r)})}}),assignOtpCode:(0,F.a)({otpData:e=>{let{context:t,event:a}=e;return{...t.otpData,otp:a.data.verificationCode}}}),assignConsents:(0,F.a)({consentsData:e=>{let{context:t,event:a}=e;return{...t.consentsData,items:a.output.data}}}),assignUserConsentStatus:(0,F.a)({consentsData:e=>{let{context:t,event:a}=e;return{...t.consentsData,userConsentStatus:Object.entries(a.data).map(e=>{let[t,a]=e;return{formType:t,isAccepted:a}})}}}),assignContactData:(0,F.a)({contactData:e=>{var t;let{context:a,event:i}=e;return{...a.contactData,contactId:null===(t=i.output)||void 0===t?void 0:t.contactId}}}),assignPasswordData:(0,F.a)({passwordData:e=>{let{context:t,event:a}=e;return{...t.passwordData,...a.data}}}),assignFlyteUserData:(0,F.a)({flyteUserData:e=>{let{event:t}=e;return t.output.data}}),assignNewEmail:(0,F.a)({formData:e=>{let{context:t,event:a}=e;return{...t.formData,email:a.output.email}}}),assignError:(0,F.a)({error:e=>{var t,a,i;let{event:r}=e,n=(null==r?void 0:null===(i=r.error)||void 0===i?void 0:null===(a=i.response)||void 0===a?void 0:null===(t=a.data)||void 0===t?void 0:t.code)==="PASSWORD_PWNED"?"This password has been exposed in previous data breaches by an unrelated party. To keep your account secure, please choose a different, unique password.":"There was an error submitting. Please try again.";return{message:n}}}),resetError:(0,F.a)({error:void 0}),reset:(0,F.a)({...et}),resetBenefitsCheck:(0,F.a)({benefitsCheck:void 0})}}).createMachine({context:()=>et,id:"flyteMachine",initial:Z.PreEligibility,states:{[Z.PreEligibility]:{id:Z.PreEligibility,initial:Z.Idle,states:{[Z.Idle]:{on:{SUBMIT:{target:Z.Submitting,actions:"updateFormData"}}},[Z.Submitting]:{entry:"assignBMI",always:[{guard:"isPreEligibilityMet",target:"#".concat(Z.ContactDetails)},{target:"#".concat(Z.EligibilityUnmet)}]}}},[Z.ContactDetails]:{id:Z.ContactDetails,initial:Z.Idle,states:{[Z.Idle]:{on:{SUBMIT:{target:"#".concat(Z.InsuranceDetails),actions:"updateFormData"}}}}},[Z.InsuranceDetails]:{id:Z.InsuranceDetails,initial:Z.Idle,states:{[Z.Idle]:{on:{BACK:{target:"#".concat(Z.ContactDetails)},SUBMIT:{target:"#".concat(Z.InsuranceDetailsReview),actions:"updateFormData"}}}}},[Z.InsuranceDetailsReview]:{id:Z.InsuranceDetailsReview,initial:Z.Idle,states:{[Z.Idle]:{on:{SUBMIT:{actions:"updateFormData",target:Z.Submitting}}},[Z.Submitting]:{initial:Z.DetermineBenefitsOrLead,states:{[Z.DetermineBenefitsOrLead]:{id:Z.DetermineBenefitsOrLead,always:[{guard:"isInsurerSelected",target:Z.CheckBenefits},{target:Z.CreateLead}]},[Z.CheckBenefits]:{id:Z.CheckBenefits,invoke:{src:(0,A.p4)(async e=>{let{input:t}=e,a={...t,payerCode:U.qK[t.insurance]};return await (0,J.o)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:{actions:(0,F.a)({benefitsCheck:e=>{let{event:t}=e;return t.output.data}}),target:Z.DetermineContactOrLead},onError:Z.DetermineContactOrLead}},[Z.DetermineContactOrLead]:{id:Z.DetermineContactOrLead,always:[{guard:"isApplicationReviewRequired",target:Z.CreateLead},{target:Z.CreateContact}]},[Z.CreateContact]:{id:Z.CreateContact,invoke:{src:(0,A.p4)(async e=>{let{input:t}=e,a={...t.formData,...t.benefitsCheck&&{benefitsCheck:t.benefitsCheck},company:ee,insurance:getInsurance({insuranceCoverage:t.formData.insuranceCoverage,insurance:t.formData.insurance}),evolveOrganization:getEvolveOrganization(t.formData.insurance,t.formData.state,t.formData.insuranceCoverage),accountId:U.kS[x.kT.Flyte]};return await createContact(a)}),input:e=>{let{context:t}=e;return t},onDone:{actions:"assignContactData",target:"#".concat(Z.EmailVerification)},onError:[{guard:"isApplicationDetected",target:"#".concat(Z.ApplicationDetected)},{target:"#".concat(Z.InsuranceDetailsReview,".").concat(Z.Error)}]}},[Z.CreateLead]:{id:Z.CreateLead,invoke:{src:(0,A.p4)(async e=>{let{input:t}=e,a={...t.formData,...t.benefitsCheck&&{benefitsCheck:t.benefitsCheck},company:ee,insurance:getInsurance({insuranceCoverage:t.formData.insuranceCoverage,insurance:t.formData.insurance}),evolveOrganization:getEvolveOrganization(t.formData.insurance,t.formData.state,t.formData.insuranceCoverage),ineligibilityReason:getIneligibilityReason({insuranceCoverage:t.formData.insuranceCoverage,insurance:t.formData.insurance,state:t.formData.state}),leadStatus:getLeadStatus({bmi:t.bmi,comorbidity:t.formData.comorbidity,insuranceCoverage:t.formData.insuranceCoverage,insurance:t.formData.insurance,state:t.formData.state}),automateEvolveEnrollment:isEligibleForAutoEnrollment({bmi:t.bmi,comorbidity:t.formData.comorbidity,insuranceCoverage:t.formData.insuranceCoverage,insurance:t.formData.insurance,state:t.formData.state})};return await (0,k.$)(a)}),input:e=>{let{context:t}=e;return t},onDone:[{guard:"isApplicationReviewRequired",target:"#".concat(Z.ApplicationReview)},{target:"#".concat(Z.ApplicationComplete)}],onError:[{guard:"isApplicationDetected",target:"#".concat(Z.ApplicationDetected)},{target:"#".concat(Z.InsuranceDetailsReview,".").concat(Z.Error)}]}}}},[Z.Error]:{id:"".concat(Z.InsuranceDetailsReview,".").concat(Z.Error),on:{SUBMIT:{actions:["updateFormData","resetBenefitsCheck"],target:Z.Submitting}}}}},[Z.EmailVerification]:{id:Z.EmailVerification,initial:Z.Idle,states:{[Z.Idle]:{id:"".concat(Z.EmailVerification,".").concat(Z.Idle),on:{SUBMIT:{actions:"assignOtpCode",target:Z.Submitting},RESEND_EMAIL_VERIFICATION:{target:Z.Idle,reenter:!0},UPDATE_EMAIL:{target:Z.UpdateEmail}},invoke:{input:e=>{var t;let{context:a,event:i}=e;return{email:a.formData.email,firstName:a.formData.firstName,onSuccess:null==i?void 0:null===(t=i.data)||void 0===t?void 0:t.onSuccess}},src:(0,A.p4)(async e=>{let{input:t}=e,a={email:t.email,firstName:t.firstName},i=await requestOtp(a);return{token:i.data.token,onSuccess:t.onSuccess}}),onDone:{actions:[(0,F.a)({otpData:e=>{let{context:t,event:a}=e;return{...t.otpData,token:a.output.token}}}),e=>{var t;let{event:a}=e;(null==a?void 0:null===(t=a.output)||void 0===t?void 0:t.onSuccess)&&a.output.onSuccess()}]},onError:Z.Error}},[Z.Submitting]:{invoke:{src:(0,A.p4)(async e=>{let{input:t}=e,a={email:t.formData.email,token:t.otpData.token,otp:t.otpData.otp};return await verifyOtp(a)}),input:e=>{let{context:t}=e;return t},onDone:"#".concat(Z.OnboardingChecklist),onError:Z.Error}},[Z.Error]:{on:{SUBMIT:{actions:"assignOtpCode",target:Z.Submitting},RESEND_EMAIL_VERIFICATION:{target:Z.Idle},UPDATE_EMAIL:{target:Z.UpdateEmail}}},[Z.UpdateEmail]:{initial:Z.Idle,states:{[Z.Idle]:{invoke:{input:e=>{let{context:t,event:a}=e;return{contactId:t.contactData.contactId,email:a.data.email,onSuccess:a.data.onSuccess}},src:(0,A.p4)(async e=>{let{input:t}=e,a={contactId:t.contactId,email:t.email};await updateContact(a);let i={email:t.email,onSuccess:t.onSuccess};return i}),onDone:{actions:["assignNewEmail",e=>{var t;let{event:a}=e;(null==a?void 0:null===(t=a.output)||void 0===t?void 0:t.onSuccess)&&a.output.onSuccess()}],target:"#".concat(Z.EmailVerification,".").concat(Z.Idle)},onError:Z.Error}},[Z.Error]:{on:{SUBMIT:{target:"#".concat(Z.EmailVerification,".").concat(Z.Idle)},RESEND_EMAIL_VERIFICATION:{target:"#".concat(Z.EmailVerification,".").concat(Z.Idle)},UPDATE_EMAIL:{target:Z.Idle}}}}}}},[Z.ReviewConsents]:{id:Z.ReviewConsents,initial:Z.FetchConsents,states:{[Z.Idle]:{on:{SUBMIT:{actions:["assignUserConsentStatus"],target:Z.Submitting}}},[Z.FetchConsents]:{invoke:{src:(0,A.p4)(async()=>await getConsents()),onDone:{actions:"assignConsents",target:Z.Idle},onError:Z.Error}},[Z.Submitting]:{invoke:{src:(0,A.p4)(async e=>{let{input:t}=e,a={patientIdentifier:t.contactData.contactId,firstName:t.formData.firstName,lastName:t.formData.lastName,phone:t.formData.phone,email:t.formData.email,birthDate:t.formData.birthdate,state:t.formData.state,heightInInch:t.formData.heightInInch,heightInFeet:t.formData.heightInFoot,currentWeightInPounds:t.formData.currentWeightInPounds,evolveOrganization:x.bV.Flyte,consents:t.consentsData.userConsentStatus};return await createFlyteUser(a)}),input:e=>{let{context:t}=e;return t},onDone:{actions:"assignFlyteUserData",target:"#".concat(Z.CreatePassword)},onError:Z.Error}},[Z.Error]:{on:{SUBMIT:{actions:["assignUserConsentStatus"],target:Z.Submitting}}}}},[Z.CreatePassword]:{id:Z.CreatePassword,initial:Z.Idle,states:{[Z.Idle]:{on:{SUBMIT:{actions:"assignPasswordData",target:Z.Submitting}}},[Z.Submitting]:{invoke:{src:(0,A.p4)(async e=>{let{input:t}=e,a={email:t.formData.email,password:t.passwordData.password,confirmPassword:t.passwordData.confirmPassword};return await passwordChange(t.flyteUserData.verifyToken,a)}),input:e=>{let{context:t}=e;return t},onDone:Z.UpdateContact,onError:{target:Z.Error,actions:"assignError"}}},[Z.UpdateContact]:{initial:Z.Submitting,states:{[Z.Submitting]:{invoke:{src:(0,A.p4)(async e=>{let{input:t}=e,a={contactId:t.contactData.contactId,evolvePatientID:t.flyteUserData.patientId};return await updateContact(a)}),input:e=>{let{context:t}=e;return t},onDone:"#".concat(Z.AppDownload),onError:{target:Z.Error,assignError:"assignError"}}},[Z.Error]:{on:{SUBMIT:{actions:["resetError"],target:Z.Submitting}}}}},[Z.Error]:{on:{SUBMIT:{actions:["resetError","assignPasswordData"],target:Z.Submitting}}}}},[Z.OnboardingChecklist]:{id:Z.OnboardingChecklist,on:{SUBMIT:{target:"#".concat(Z.ReviewConsents)}}},[Z.AppDownload]:{id:Z.AppDownload},[Z.ApplicationReview]:{id:Z.ApplicationReview},[Z.ApplicationComplete]:{id:Z.ApplicationComplete},[Z.ApplicationDetected]:{id:Z.ApplicationDetected},[Z.EligibilityUnmet]:{id:Z.EligibilityUnmet,initial:Z.Idle,states:{[Z.Idle]:{on:{SUBMIT:{target:Z.Submitting,actions:"updateFormData"}}},[Z.Submitting]:{invoke:{src:(0,A.p4)(async e=>{let{input:t}=e,a={...t,company:U.aU[x.kT.Flyte],leadStatus:x.rl.Ineligible,ineligibilityReason:x.ib.BMI,automateEvolveEnrollment:!1};return await (0,k.$)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:Z.Success,onError:Z.Error}},[Z.Success]:{},[Z.Error]:{on:{SUBMIT:{target:Z.Submitting}}}}}},on:{RESET:{target:"#".concat(Z.PreEligibility),actions:"reset"}}});var ei=a(5111),er=a(67989),en=a(6426);let eo=[g.PF["1199SEIU"],g.PF.Aetna,g.PF.Cigna,g.PF.BCBS,g.PF.BCBSPPO,g.PF.United,g.PF.Other],es={[u.J.ContactDetails]:{state:{options:en.Fp}},[u.J.InsuranceDetails]:{insuranceCoverage:{},insurance:{insuranceCarriers:eo},insuranceMemberID:{}},[u.J.InsuranceDetailsReview]:{insurance:{insuranceCarriers:eo}}};var el=a(4225),ec=a(87536),ed=a(57087),eu=a(76849);let eh="verificationCode",VerificationCodeField=e=>{let{name:t=eh,hasError:a=!1,loading:i=!1,onResendCode:r,onSubmit:n}=e,{control:c,reset:d,watch:u}=(0,ec.Gc)(),[h,m]=(0,s.useState)(60),p=a&&!u(eh);(0,s.useEffect)(()=>{let e;return h>0&&(e=setInterval(()=>{m(t=>t<=1?(clearInterval(e),0):t-1)},1e3)),()=>clearInterval(e)},[h]);let handlePinInputChange=e=>{6===e.length&&n(e)};return(0,s.useEffect)(()=>{a&&d({[t]:""})},[a,d,t]),(0,o.jsxs)(l.Flex,{direction:"column",gap:"spacer-2",children:[(0,o.jsxs)(l.Flex,{gap:"spacer-2",direction:"column",children:[(0,o.jsx)(ec.Qr,{name:t,control:c,rules:{required:!0,minLength:6,maxLength:6},render:e=>{let{field:{onChange:a,value:r}}=e;return(0,o.jsx)(l.PinInput,{"data-test":t,id:t,value:r,onChange:e=>{a(e),handlePinInputChange(e)},"aria-label":"Enter the code",otp:!0,size:"l",variant:"outline",type:"number",isDisabled:i,isInvalid:p,children:Array.from({length:6}).map((e,a)=>(0,o.jsx)(l.PinInput.Field,{"data-test":"".concat(t,"-").concat(a),width:{base:"auto",lg:"4rem",xl:"5rem",xxl:"5.25rem"}},a))})}}),p&&(0,o.jsxs)(l.InlineAlert,{status:"error",children:[(0,o.jsx)(l.InlineAlert.Icon,{}),(0,o.jsx)(l.InlineAlert.Message,{children:"Incorrect code. Please try again."})]})]}),(0,o.jsxs)(l.Flex,{gap:"spacer-1",mt:"spacer-2",flexWrap:"wrap",children:[(0,o.jsx)(l.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"Do you need a new code?"}),h>0?(0,o.jsxs)(l.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:["You can request a new one in"," ",(0,o.jsxs)(l.Text,{as:"span",variant:"text-body-meta-medium",color:"text-secondary",children:[h,"s"]})]}):(0,o.jsx)(l.Button,{variant:"link-primary","aria-label":"Resend code",size:"s",textDecoration:"underline",onClick:()=>{r(),m(60)},isDisabled:i,children:"Resend code"})]})]})},EditEmailModal=e=>{let{isOpen:t,onClose:a,onSubmit:i,currentEmail:r,loading:n=!1,hasError:c}=e,d=(0,ec.cI)({defaultValues:{currentEmail:r},mode:"onBlur"});(0,s.useEffect)(()=>{d.setValue("currentEmail",r)},[r]);let handleClose=()=>{n||(a(),d.reset())};return(0,o.jsxs)(l.Modal,{isOpen:t,onClose:handleClose,isCentered:!0,closeOnEsc:!n,closeOnOverlayClick:!n,children:[(0,o.jsx)(l.Modal.Overlay,{}),(0,o.jsxs)(l.Modal.Content,{borderRadius:"0.75rem",px:"spacer-7",py:"spacer-6",gap:"spacer-7",maxWidth:"26.25rem",mx:{base:"spacer-5",md:0},children:[(0,o.jsxs)(l.Modal.Header,{p:0,children:[(0,o.jsx)(l.Text,{variant:"text-body-large-bold",color:"text-primary",children:"Edit your email address"}),(0,o.jsx)(l.Text,{variant:"text-body-regular",color:"text-secondary",mt:"spacer-4",children:"This email will be used to create your FlyteHealth account. Next, you'll receive an email with a 6-digit code. Use this code to confirm your email."})]}),(0,o.jsx)(l.Modal.CloseButton,{isDisabled:n}),c&&(0,o.jsxs)(l.Alert,{status:"error",variant:"subtle",children:[(0,o.jsx)(l.Alert.Icon,{}),(0,o.jsx)(l.Alert.Title,{children:"There was an error submitting your information. Please call (844) 359-8363 to speak with a Care Coordinator."})]}),(0,o.jsx)(l.Modal.Body,{p:0,children:(0,o.jsx)(ec.RV,{...d,children:(0,o.jsxs)(l.Flex,{as:"form",noValidate:!0,direction:"column",gap:"spacer-7",children:[(0,o.jsx)(en.s8,{name:"currentEmail",label:"Current email address",inputProps:{isDisabled:!0}}),(0,o.jsx)(en.s8,{name:"newEmail",label:"Enter your correct email address",inputProps:{isRequired:!0,isDisabled:n}})]})})}),(0,o.jsxs)(l.Modal.Footer,{p:0,gap:"spacer-8",children:[(0,o.jsx)(l.Button,{variant:"link-secondary",onClick:handleClose,size:"m",isDisabled:n,"aria-label":"Cancel",children:"Cancel"}),(0,o.jsx)(l.Button,{"aria-label":"Update email",onClick:d.handleSubmit(i),variant:"primary",isLoading:n,size:"m",isDisabled:!d.formState.isValid,children:"Update email"})]})]})]})};var em=a(42575),ep=a(95875),eg=a(3183);let EmailVerificationForm=e=>{let{configuration:t,email:a,hasError:i=!1,loading:r=!1,isUpdateEmailLoading:n,hasUpdateEmailError:c,onResendCode:d,onEditEmail:u,onSubmit:h}=e,m=(0,ec.cI)({mode:"onBlur"}),{contentResources:p}=t,[g,x]=(0,s.useState)(!1),[b,y]=(0,s.useState)(!0),v=(0,em.d)(),f=(0,l.useToast)(),{track:C}=(0,eg.useAnalytics)(),renderFormAction=()=>(0,o.jsx)(l.Button,{type:"submit",size:{base:"m",lg:"l"},isDisabled:!m.formState.isValid||r,width:"100%",isLoading:r,"aria-label":"Verify code",children:"Verify code"}),I=(0,s.useCallback)(e=>{b&&(h({verificationCode:e}),y(!1))},[h,b]),handleCloseEditEmailModal=()=>{x(!1)},handleEditEmailSubmit=e=>{u(e,()=>{handleCloseEditEmailModal(),f({title:"Email address updated",description:"Check your email for a 6-digit code to confirm your email address.",status:"success",titleAlignment:"top",position:"bottom",variant:"subtle",duration:3e3})})};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ec.RV,{...m,children:(0,o.jsxs)(ed.S,{as:"form",onSubmit:m.handleSubmit(h),noValidate:!0,children:[(0,o.jsxs)(ed.S.Side,{gap:"spacer-7",children:[p.title,(0,o.jsxs)(l.Flex,{gap:"spacer-1",children:[(0,o.jsx)(l.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"Not your email?"}),(0,o.jsx)(l.Button,{variant:"link-primary",size:"s",textDecoration:"underline",onClick:()=>{x(!0),C(ep.U.editEmail)},isDisabled:r,"aria-label":"Edit email address",children:"Edit email address"})]})]}),(0,o.jsxs)(ed.S.Form,{children:[(0,o.jsx)(VerificationCodeField,{hasError:i,loading:r,onResendCode:()=>{d(()=>{f({title:"New code sent to your email",status:"success",position:"bottom",variant:"solid",duration:3e3})})},onSubmit:I}),(0,o.jsxs)(l.Flex,{direction:"column",children:[(0,o.jsx)(l.Text,{variant:"text-body-bold",color:"text-secondary",children:"Need some help?"}),(0,o.jsxs)(l.Text,{color:"text-secondary",variant:"text-body-regular",mt:"spacer-1",children:["Please call ",(0,o.jsx)(eu.R,{fontWeight:"thin"})," to speak with a Care Coordinator."]})]}),v?(0,o.jsx)(en.D2,{children:renderFormAction()}):renderFormAction()]})]})}),g&&(0,o.jsx)(EditEmailModal,{isOpen:g,onClose:handleCloseEditEmailModal,onSubmit:e=>{let{newEmail:t}=e;return handleEditEmailSubmit(t)},currentEmail:a,loading:n,hasError:c})]})};var ex=a(27856),eb=a.n(ex);let ConsentDetailModal=e=>{let{isOpen:t,consent:a,onClose:i,onDeclineConsent:r,onAgreeConsent:n,agreementLink:c,loading:d=!1,hasError:u=!1}=e,h=(0,s.useRef)(null),m=(0,s.useMemo)(()=>eb().sanitize(a.forms[0]),[a]);return(0,o.jsxs)(l.Modal,{isOpen:t,onClose:i,autoFocus:!1,isCentered:!0,initialFocusRef:h,children:[(0,o.jsx)(l.Modal.Overlay,{}),(0,o.jsxs)(l.Modal.Content,{px:"spacer-7",pb:"spacer-6",gap:"spacer-6",mx:0,maxWidth:{lg:"680px"},mb:{base:0,lg:"auto"},height:{base:"calc(100% - 76px)",lg:"100%"},maxHeight:{lg:"80%"},children:[(0,o.jsxs)(l.Modal.Header,{p:0,children:[(0,o.jsx)(l.Text,{variant:"text-body-large-bold",pt:"20px",children:a.title}),(0,o.jsx)(l.Modal.CloseButton,{color:"text-secondary"})]}),(0,o.jsxs)(l.Modal.Body,{p:0,overflow:"hidden",display:"flex",flexDirection:"column",children:[u&&(0,o.jsxs)(l.Alert,{status:"error",variant:"subtle",mb:"spacer-6",flex:"none",children:[(0,o.jsx)(l.Alert.Icon,{}),(0,o.jsxs)(l.Alert.Title,{children:["We couldn't process the documents. Please try again or call"," ",(0,o.jsx)(eu.R,{size:"m",variant:"link-primary","aria-label":"Contact Us",isInline:!0,children:"(844) 359-8363"})," ","to speak with a Care Coordinator."]})]}),(0,o.jsxs)(l.Text,{color:"text-secondary",variant:"text-body-regular",mb:"spacer-6",children:['By selecting "I agree", you agree to the terms of the'," ",(0,o.jsx)(l.Link,{color:"text-primary",textDecoration:"underline",href:c,target:"_blank",rel:"noopener noreferrer",children:a.title}),". We will email you a confirmation for your records."]}),(0,o.jsx)(l.Flex,{height:"100%",direction:"column",wordBreak:"break-word",p:"spacer-3",backgroundColor:"background-page-01",borderRadius:"radii-3",overflow:"auto",__css:{ul:{paddingLeft:"2.5rem"},"h1, h2, h3, h4, h5, h6":{fontWeight:"bold",marginY:"0.67em"},"& p":{marginBottom:"1em"}},dangerouslySetInnerHTML:{__html:m}})]}),(0,o.jsxs)(l.Modal.Footer,{flexDirection:"column",gap:"spacer-2",p:0,children:[(0,o.jsx)(l.Button,{variant:"primary",size:{base:"m",lg:"l"},flex:1,width:"100%",onClick:n,ref:h,isLoading:d,"data-test":"agree-consent",children:"I agree"}),(0,o.jsx)(l.Button,{variant:"transparent",size:{base:"m",lg:"l"},flex:1,width:"100%",onClick:r,children:"I decline"})]})]})]})},ConsentDeclineModal=e=>{let{isOpen:t,onClose:a,onDeclineConsent:i,consentTitle:r,isConsentRequired:n=!1}=e;return(0,o.jsxs)(l.Modal,{isOpen:t,onClose:a,autoFocus:!1,isCentered:!0,children:[(0,o.jsx)(l.Modal.Overlay,{}),(0,o.jsxs)(l.Modal.Content,{px:"spacer-7",py:"spacer-6",maxWidth:{base:"342px",md:"460px"},borderRadius:"radii-4",children:[(0,o.jsx)(l.Modal.Header,{p:0,children:(0,o.jsxs)(l.Text,{variant:"text-body-large-bold",children:["Decline the ",r,"?"]})}),(0,o.jsx)(l.Modal.Body,{p:0,children:(0,o.jsx)(l.Text,{color:"text-secondary",variant:"text-body-regular",mb:"spacer-7",children:n?"Agreement with this document is required for us to provide care for you. Declining will stop you from joining FlyteHealth.":"To continue, we need to know if you decline or agree to this document."})}),(0,o.jsxs)(l.Modal.Footer,{flexDirection:{base:"column",md:"row-reverse"},gap:"spacer-4",p:0,children:[(0,o.jsx)(l.Button,{variant:"secondary",size:"m",width:{base:"100%",md:"auto"},flex:{base:1,md:"auto"},onClick:a,children:"Go back"}),(0,o.jsx)(l.Button,{variant:"destroy",size:"m",width:{base:"100%",md:"auto"},flex:{base:1,md:"1 0 0"},onClick:i,children:"I decline"})]})]})]})},ey={consents:"https://www.joinflyte.com/patient-consent",consentHie:"https://www.joinflyte.com/health-information-exchange-consent"},ConsentReviewCard=e=>{let{consent:t,isRequired:a,isApproved:i,onReview:r,...n}=e,{register:s}=(0,ec.Gc)();return(0,o.jsxs)(l.Flex,{onClick:r,cursor:"pointer",py:"spacer-4",px:"spacer-3",backgroundColor:i?"background-success":"background-card",border:"1px solid",borderColor:i?"alert-success-default":"primary-default",borderRadius:"radii-4",alignItems:"center",gap:"spacer-5",...!i&&{_hover:{backgroundColor:"background-action-hover"},_active:{backgroundColor:"background-action-pressed"}},...s(t.formType,{validate:e=>void 0!==e,required:a}),...n,children:[(0,o.jsx)(l.IconFile,{size:"l",color:"text-secondary"}),(0,o.jsxs)(l.Flex,{direction:"column",flex:1,children:[(0,o.jsxs)(l.Flex,{flexDirection:"row",flexWrap:"wrap",gap:"8px",alignItems:"center",children:[(0,o.jsx)(l.Text,{variant:"text-header-S",children:t.title}),a&&!i&&(0,o.jsx)(l.Badge,{variant:"outline",status:"secondary",textTransform:"capitalize",children:"Required"})]}),!i&&(0,o.jsx)(l.Button,{mt:"6px",onClick:e=>{e.stopPropagation(),r()},variant:"link-primary",textDecoration:"underline",alignSelf:"start",_hover:{textDecoration:"underline"},p:0,size:"s","data-test":"review-consent",children:"Review and sign"})]}),(0,o.jsx)(l.IconCircleCheckFilled,{size:"l",color:i?"text-success":"primary-disabled"})]})},ev=["consents"],ReviewConsents=e=>{let{consents:t,configuration:a,hasError:i=!1,loading:r=!1,onSubmit:n}=e,{contentResources:c}=a,d=(0,ec.cI)({mode:"onBlur"}),{track:u}=(0,eg.useAnalytics)(),h=(0,em.d)(),[m,p]=(0,s.useState)(null),[g,x]=(0,s.useState)(!1),b=t.sort((e,t)=>(ev.includes(t.formType)?1:0)-(ev.includes(e.formType)?1:0)),y=ev.some(e=>{let t=d.getValues()[e];return!1===t}),renderFormAction=()=>(0,o.jsx)(l.Button,{type:"submit",size:{base:"m",lg:"l"},width:"100%","aria-label":"Continue",isDisabled:r||!d.formState.isValid||0===t.length,isLoading:r,trailingIcon:(0,o.jsx)(l.IconArrowRight,{}),children:"Continue"}),handleOpenConsent=e=>{p(e),u(ep.U.patientConsent)};return(0,o.jsxs)(o.Fragment,{children:[y&&(0,o.jsx)(l.Alert,{status:"warning",variant:"subtle",px:0,children:(0,o.jsx)(l.Flex,{margin:"0 auto",maxWidth:"90rem",width:"100%",px:{base:"spacer-6",md:"spacer-9",lg:"spacer-14",xl:"spacer-20",xxl:"spacer-28"},children:(0,o.jsxs)(l.Flex,{children:[(0,o.jsx)(l.Alert.Icon,{}),(0,o.jsxs)(l.Flex,{direction:"column",children:[(0,o.jsx)(l.Alert.Title,{children:"Patient Consent Form"}),(0,o.jsx)(l.Alert.Description,{children:"Agreement with the Patient Consent document is required for us to provide care for you."})]})]})})}),(0,o.jsx)(ec.RV,{...d,children:(0,o.jsxs)(ed.S,{as:"form",onSubmit:d.handleSubmit(n),noValidate:!0,gap:{base:"spacer-6",md:"spacer-10"},width:"100%",children:[(0,o.jsx)(ed.S.Side,{gap:0,children:c.title}),(0,o.jsxs)(ed.S.Form,{width:"100%",gap:"spacer-9",children:[i&&(0,o.jsxs)(l.Alert,{status:"error",variant:"subtle",width:"100%",children:[(0,o.jsx)(l.Alert.Icon,{}),(0,o.jsxs)(l.Alert.Title,{children:["We couldn't process the documents. Please try again or call"," ",(0,o.jsx)(eu.R,{size:"m",variant:"link-primary","aria-label":"Contact Us",isInline:!0,fontWeight:"bold",children:"(844) 359-8363"})," ","to speak with a Care Coordinator."]})]}),(0,o.jsx)(l.Flex,{direction:"column",gap:"spacer-5",children:0===t.length?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l.Skeleton,{height:"80px",borderRadius:"radii-4"}),(0,o.jsx)(l.Skeleton,{height:"80px",borderRadius:"radii-4"})]}):b.map(e=>(0,o.jsx)(ConsentReviewCard,{consent:e,isRequired:ev.includes(e.formType),isApproved:d.getValues()[e.formType],onReview:()=>handleOpenConsent(e)},e.formType))}),h?(0,o.jsx)(en.D2,{children:renderFormAction()}):renderFormAction()]})]})}),m&&(0,o.jsx)(ConsentDetailModal,{isOpen:!!m,onClose:()=>p(null),onAgreeConsent:()=>{d.setValue(m.formType,!0,{shouldValidate:!0}),p(null)},onDeclineConsent:()=>x(!0),consent:m,agreementLink:ey[m.formType]}),(0,o.jsx)(ConsentDeclineModal,{isOpen:g,onClose:()=>x(!1),onDeclineConsent:()=>{d.setValue(m.formType,!1,{shouldValidate:!0}),x(!1),p(null),u(ep.U.declinePatientConsent)},consentTitle:null==m?void 0:m.title})]})},ef=(0,s.forwardRef)((e,t)=>{let{isDisabled:a,...i}=e,[r,n]=(0,s.useState)(!1),c=r?l.IconEyeOff:l.IconEye;return(0,o.jsx)(l.Input,{type:r?"text":"password",inputMode:"text",placeholder:"Enter your password",size:"l",variant:"flushed",ref:t,isDisabled:a,trailingIcon:(0,o.jsx)(l.Box,{userSelect:"none",children:(0,o.jsx)(c,{onClick:()=>{a||n(e=>!e)},cursor:a?"not-allowed":"pointer"})}),...i})});var eC=a(76539),eI=a(47209);let eD={LENGTH:{regex:/^.{10,}$/,label:"Password must be at least ten characters long"},LOWERCASE:{regex:/[a-z]/,label:"Use at least one lowercase letter"},UPPERCASE:{regex:/[A-Z]/,label:"Use at least one uppercase letter"},NUMBER:{regex:/\d/,label:"Use at least one number"},SPECIAL_CHAR:{regex:/[^a-zA-Z0-9\s]/,label:"Use at least one special character (like !@#$%)"}},evaluatePasswordRules=e=>({length:eD.LENGTH.regex.test(e),lowercase:eD.LOWERCASE.regex.test(e),uppercase:eD.UPPERCASE.regex.test(e),number:eD.NUMBER.regex.test(e),specialChar:eD.SPECIAL_CHAR.regex.test(e)}),PasswordField=e=>{let{name:t="password",label:a="Create password",showRules:i,checkMatchingPassword:r,isDisabled:n,...s}=e,{register:c,watch:d,formState:{errors:u}}=(0,ec.Gc)(),h=d(t),m=(0,eI.T)(t,u,["matchesPassword"]),p=evaluatePasswordRules(h),g=[{label:eD.LENGTH.label,isValid:p.length},{label:eD.LOWERCASE.label,isValid:p.lowercase},{label:eD.UPPERCASE.label,isValid:p.uppercase},{label:eD.NUMBER.label,isValid:p.number},{label:eD.SPECIAL_CHAR.label,isValid:p.specialChar}],x={required:!0,minLength:i?{value:10,message:eD.LENGTH.label}:void 0,validate:{...r&&{matchesPassword:e=>e===r||"Passwords do not match"},lowercase:e=>eD.LOWERCASE.regex.test(e)||eD.LOWERCASE.label,uppercase:e=>eD.UPPERCASE.regex.test(e)||eD.UPPERCASE.label,number:e=>eD.NUMBER.regex.test(e)||eD.NUMBER.label,specialChar:e=>eD.SPECIAL_CHAR.regex.test(e)||eD.SPECIAL_CHAR.label}};return(0,o.jsxs)(l.Flex,{direction:"column",gap:"spacer-2",...s,children:[(0,o.jsx)(l.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:t,children:a}),(0,o.jsx)(ef,{"data-test":t,id:t,isDisabled:n,isInvalid:m,...c(t,x)}),m&&(0,o.jsx)(eC.V,{errors:u,name:t}),i&&(0,o.jsx)(l.Flex,{direction:"column",gap:"spacer-1",children:g.map((e,t)=>(0,o.jsxs)(l.Flex,{gap:"spacer-1",children:[(0,o.jsx)(l.IconCircleCheck,{color:e.isValid?"alert-success-default":"primary-disabled"}),(0,o.jsx)(l.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:e.label})]},t))})]})},ej="password",eS="confirmPassword",CreatePasswordForm=e=>{let{configuration:t,loading:a=!1,error:i,onSubmit:r}=e,{contentResources:n}=t,s=(0,ec.cI)({mode:"onBlur"}),{handleSubmit:c,watch:d,formState:{isValid:h}}=s,m=(0,em.d)(),renderFormAction=()=>(0,o.jsx)(l.Button,{type:"submit",size:{base:"m",lg:"l"},width:"100%","aria-label":"Create account",isDisabled:!h||a||d(ej)!==d(eS),isLoading:a,children:"Create account"});return(0,o.jsx)(ec.RV,{...s,children:(0,o.jsxs)(ed.S,{as:"form",onSubmit:c(r),noValidate:!0,"data-test":u.J.CreatePassword,children:[(0,o.jsx)(ed.S.Side,{children:n.title}),(0,o.jsxs)(ed.S.Form,{children:[i&&(0,o.jsxs)(l.Alert,{status:"error",variant:"subtle",children:[(0,o.jsx)(l.Alert.Icon,{}),(0,o.jsx)(l.Alert.Title,{children:i.message||"There was an error submitting your password. Please try again."})]}),(0,o.jsx)(PasswordField,{name:ej,label:"Create password",isDisabled:a,showRules:!0}),(0,o.jsx)(PasswordField,{name:eS,label:"Confirm password",isDisabled:a,placeholder:"Retype your password",pb:{base:"spacer-24",lg:0},checkMatchingPassword:d(ej)}),m?(0,o.jsx)(en.D2,{children:renderFormAction()}):renderFormAction()]})]})})},AppDownloadMobileFooter=()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l.Flex,{justifyContent:"center",width:"100%",pb:{base:"spacer-24",lg:0},children:(0,o.jsx)(l.Image,{alt:"Application Complete",src:"/static/assets/application-download.png",width:{base:"200px",md:"254px"},height:{base:"200px",md:"254px"}})}),(0,o.jsx)(en.D2,{children:(0,o.jsx)(l.Link,{variant:"primary",size:"m",justifyContent:"center",width:"100%","aria-label":"Download the app",target:"_blank",href:"/api/app-download",children:"Download the app"})})]}),AppDownload=e=>{let{title:t,checklist:a}=e,i=(0,em.d)();return(0,o.jsxs)(ed.D,{gap:{base:"spacer-10",lg:"spacer-16",xl:"spacer-18",xxl:"spacer-64"},alignItems:"start",flexDirection:{base:"column",lg:"row"},"data-test":u.J.AppDownload,children:[(0,o.jsx)(l.Flex,{direction:"column",justifyContent:{lg:"space-between"},height:"100%",flex:1,children:t}),i?(0,o.jsx)(AppDownloadMobileFooter,{}):(0,o.jsxs)(l.Flex,{flexDirection:"column",gap:"spacer-9",flex:1,children:[a,(0,o.jsx)(l.Flex,{width:"100%",backgroundColor:"background-page-04",justifyContent:"center",padding:"spacer-5",borderRadius:"radii-2",children:(0,o.jsx)(l.Image,{alt:"QR application download",width:"200px",height:"200px",src:"/static/assets/app-qr-download.png"})})]})]})},OnboardingChecklist=e=>{let{configuration:t,onSubmit:a}=e,{contentResources:i}=t,r=(0,ec.cI)({mode:"onBlur"}),n=(0,em.d)(),renderFormAction=()=>(0,o.jsx)(l.Button,{type:"submit",size:{base:"m",lg:"l"},width:"100%","aria-label":"Continue",trailingIcon:(0,o.jsx)(l.IconArrowRight,{}),children:"Continue"});return(0,o.jsx)(ec.RV,{...r,children:(0,o.jsxs)(ed.S,{as:"form",onSubmit:r.handleSubmit(a),noValidate:!0,"data-test":u.J.OnboardingChecklist,children:[(0,o.jsx)(ed.S.Side,{gap:"spacer-4",children:i.title}),(0,o.jsxs)(ed.S.Form,{children:[i.checklist,n?(0,o.jsx)(en.D2,{children:renderFormAction()}):renderFormAction()]})]})})},ew=g.kT.Flyte,FlyteWorkflow=e=>{let{render:t}=e,[a,i]=(0,m.eO)(ea),r=(0,s.useMemo)(()=>(0,h.k)(a.value),[a.value]);(0,er.R)(r,ew);let n=(0,s.useCallback)(e=>{i({type:"SUBMIT",data:e})},[i]),l=(0,s.useCallback)(()=>{i({type:"BACK"})},[i]),c=(0,s.useCallback)(()=>{switch(r){case Z.PreEligibility:return(0,o.jsx)(C.b,{configuration:{contentResources:T[u.J.PreEligibility]},onSubmit:n});case Z.ContactDetails:return(0,o.jsx)(f.q,{configuration:{contentResources:T[u.J.ContactDetails],fields:es[u.J.ContactDetails]},onSubmit:n,defaultValues:a.context.formData});case Z.EligibilityUnmet:return(0,o.jsx)(I.X,{configuration:{contentResources:T[u.J.EligibilityUnmet]},onSubmit:n,loading:a.matches({[Z.EligibilityUnmet]:Z.Submitting}),isEmailSent:a.matches({[Z.EligibilityUnmet]:Z.Success}),hasError:a.matches({[Z.EligibilityUnmet]:Z.Error})});case Z.InsuranceDetails:return(0,o.jsx)(D.v,{configuration:{contentResources:T[u.J.InsuranceDetails],fields:es[u.J.InsuranceDetails]},onSubmit:n,onBack:l});case Z.InsuranceDetailsReview:return(0,o.jsx)(j.b,{configuration:{contentResources:T[u.J.InsuranceDetailsReview]},onSubmit:n,loading:a.matches({[Z.InsuranceDetailsReview]:Z.Submitting}),hasError:a.matches({[Z.InsuranceDetailsReview]:Z.Error}),defaultValues:a.context.formData});case Z.ApplicationComplete:return(0,o.jsx)(S.J,{...T[u.J.ApplicationComplete],email:a.context.formData.email});case Z.ApplicationReview:return(0,o.jsx)(w.G,{...T[u.J.ApplicationReview]});case Z.ApplicationDetected:return(0,o.jsx)(el.v,{...T[u.J.ApplicationDetected],email:a.context.formData.email});case Z.EmailVerification:return(0,o.jsx)(EmailVerificationForm,{configuration:{contentResources:{title:T[u.J.EmailVerification](a.context.formData.email).title}},email:a.context.formData.email,hasError:a.matches({[Z.EmailVerification]:Z.Error}),loading:a.matches({[Z.EmailVerification]:Z.Submitting}),isUpdateEmailLoading:a.matches({[Z.EmailVerification]:{[Z.UpdateEmail]:Z.Idle}}),hasUpdateEmailError:a.matches({[Z.EmailVerification]:{[Z.UpdateEmail]:Z.Error}}),onSubmit:n,onResendCode:e=>i({type:"RESEND_EMAIL_VERIFICATION",data:{onSuccess:e}}),onEditEmail:(e,t)=>i({type:"UPDATE_EMAIL",data:{email:e,onSuccess:t}})});case Z.OnboardingChecklist:return(0,o.jsx)(OnboardingChecklist,{configuration:{contentResources:T[u.J.OnboardingChecklist]},onSubmit:n});case Z.ReviewConsents:return(0,o.jsx)(ReviewConsents,{configuration:{contentResources:T[u.J.ReviewConsents]},consents:a.context.consentsData.items,hasError:a.matches({[Z.ReviewConsents]:Z.Error}),loading:a.matches({[Z.ReviewConsents]:Z.FetchConsents})||a.matches({[Z.ReviewConsents]:Z.Submitting}),onSubmit:n});case Z.CreatePassword:return(0,o.jsx)(CreatePasswordForm,{configuration:{contentResources:T[u.J.CreatePassword]},loading:a.matches({[Z.CreatePassword]:Z.Submitting})||a.matches({[Z.CreatePassword]:{[Z.UpdateContact]:Z.Submitting}}),error:a.context.error,onSubmit:n});case Z.AppDownload:return(0,o.jsx)(AppDownload,{title:T[u.J.AppDownload].title,checklist:T[u.J.AppDownload].checklist});default:return null}},[r,a]);return t({header:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(p.E,{partner:ew}),(0,o.jsx)(ei.K,{currentStep:r})]}),body:c(),currentWorkFlowStep:r})},WorkflowCard=e=>(0,o.jsx)(l.Flex,{direction:"column",gap:"spacer-2",alignItems:"center",cursor:"pointer",role:"group",tabIndex:0,outline:"none",as:"button",onKeyDown:t=>{"Enter"===t.key&&e.onClick()},...e});WorkflowCard.Image=e=>(0,o.jsx)(l.Image,{flex:1,objectFit:"contain",...e}),WorkflowCard.Description=e=>(0,o.jsx)(l.Text,{variant:"text-body-floating-label-regular",color:"text-secondary",textAlign:"center",...e}),WorkflowCard.Title=e=>(0,o.jsx)(l.Text,{color:"text-secondary",variant:"text-body-meta-medium",transition:"color 100ms linear",_groupHover:{color:"text-link-primary-hover"},_groupActive:{color:"text-link-primary-pressed"},_groupFocusVisible:{color:"text-link-primary-default"},...e}),WorkflowCard.Frame=e=>(0,o.jsx)(l.Flex,{px:"spacer-3",pb:"spacer-5",borderRadius:"radii-1",borderWidth:"1px",borderStyle:"solid",borderColor:"ui-element-outline-active",transition:"background-color 100ms linear, border-color 100ms linear",_groupFocusVisible:{outlineWidth:"3px",outlineStyle:"solid",outlineColor:"primary-focus"},_groupHover:{borderColor:"primary-hover",backgroundColor:"background-action-hover"},_groupActive:{borderColor:"primary-pressed",backgroundColor:"background-action-pressed"},direction:"column",alignItems:"center",minHeight:"160px",width:"100%",...e});let eE={[g.kT.CareCompass]:{asset:{src:p.Z[g.kT.CareCompass],width:"64px",height:"64px",alt:"Care Compass Logo"},name:"Care Compass",description:"State of Connecticut Health Plan Members"},[g.kT.Aetna]:{asset:{src:p.Z[g.kT.Aetna],width:"141px",height:"32px",alt:"Aetna Logo"},name:"State of Connecticut: Aetna",description:"Aetna MA for State of Connecticut Retirees"},[g.kT.PequotHealthCare]:{asset:{src:p.Z[g.kT.PequotHealthCare],width:"103px",height:"40px",alt:"Pequot Health Care Logo"},name:"Mashantucket Pequot Tribal Nation",description:"Pequot Healthy Weight Program"},[g.kT.RiverSpringLiving]:{asset:{src:p.Z[g.kT.RiverSpringLiving],width:"158px",height:"24px",alt:"RiverSpring Living Logo"},name:"RiverSpring Living Employee Program",description:"Employees at The Hebrew Home at Riverdale by RiverSpring Living"},[g.kT.PyleFamilyInsurance]:{asset:{src:p.Z[g.kT.PyleFamilyInsurance],width:"157px",height:"48px",alt:"Pyle Family Insurance Logo"},name:"A. Duie Pyle",description:"Pyle Weight Management Program for Employees"},[g.kT.DGA]:{asset:{src:p.Z[g.kT.DGA],width:"123px",height:"40px",alt:"DGA Logo"},name:"Directors Guild of America",description:"DGA - Producer Health Plan Participant"},[g.kT.MDSave]:{asset:{src:p.Z[g.kT.MDSave],width:"56px",height:"56px",alt:"MDsave Logo"},name:"MDsave",description:"Patients in partnership with MDsave"}};var eT=a(25675),ek=a.n(eT);let WorkflowSelector=e=>{let{onSelectWorkflow:t}=e,{track:a}=(0,eg.useAnalytics)(),[i,r]=(0,s.useState)(""),handleWorkflowClick=e=>()=>(a("".concat(e,"_selected"),{partner:e}),t(e)),n=(0,s.useMemo)(()=>Object.entries(eE).filter(e=>{let[,{description:t,name:a}]=e;return t.toLowerCase().includes(i)||a.toLowerCase().includes(i)}),[i]);return(0,o.jsxs)(ed.D,{direction:"column",gap:"spacer-9",children:[(0,o.jsxs)(l.Flex,{direction:"column",gap:"spacer-2",children:[(0,o.jsxs)(l.Text,{variant:"text-header-XL",color:"text-secondary-negative",children:["Welcome!"," ",(0,o.jsx)(l.Text,{as:"span",variant:"text-header-XL",color:"text-primary",children:"Select whether you're applying to FlyteHealth Direct or a specific benefit program."})]}),(0,o.jsxs)(l.Text,{color:"text-secondary",variant:"text-body-regular",children:["If you are not sure, please"," ",(0,o.jsx)(l.Link,{as:"button",isInline:!0,onClick:handleWorkflowClick(g.kT.Flyte),children:"continue with FlyteHealth Direct."})," ","(We'll review this later)."]})]}),(0,o.jsxs)(l.Flex,{direction:"column",gap:{base:"spacer-9"},children:[(0,o.jsxs)(l.Flex,{direction:"column",gap:"spacer-4",flex:1,maxWidth:"16rem",children:[(0,o.jsxs)(l.Flex,{gap:"spacer-3",alignItems:"center",children:[(0,o.jsx)(l.IconArrowRight,{color:"primary-default",size:"l"}),(0,o.jsx)(l.Text,{variant:"text-body-large-medium",color:"text-primary",children:"FlyteHealth Direct"})]}),(0,o.jsx)(WorkflowCard,{onClick:handleWorkflowClick(g.kT.Flyte),children:(0,o.jsx)(WorkflowCard.Frame,{p:0,width:"100%",minHeight:{base:"7.5rem",md:"10rem"},children:(0,o.jsx)(WorkflowCard.Image,{src:p.Z[g.kT.Flyte],width:"123px",height:"40px",alt:"Flyte Logo"})})})]}),(0,o.jsxs)(l.Flex,{direction:"column",gap:"spacer-4",pb:{base:"spacer-9",md:"spacer-6"},flex:1,children:[(0,o.jsxs)(l.Flex,{direction:{base:"column",md:"row"},gap:{base:"spacer-6",md:"spacer-3"},justifyContent:{md:"space-between"},alignItems:{md:"end"},children:[(0,o.jsxs)(l.Flex,{gap:"spacer-3",alignItems:"center",flex:1,children:[(0,o.jsx)(l.IconArrowRight,{color:"primary-default",size:"l"}),(0,o.jsx)(l.Text,{variant:"text-body-large-medium",color:"text-primary",children:"Available Benefit Programs:"})]}),(0,o.jsx)(l.Flex,{flex:1,maxWidth:{md:"20rem"},children:(0,o.jsx)(l.Input,{placeholder:"Type to search program",size:"m",variant:"flushed",leadingIcon:(0,o.jsx)(l.IconSearch,{}),onChange:e=>{r(e.target.value.toLowerCase())},autoComplete:"off",autoCorrect:"off"})})]}),n.length>0?(0,o.jsx)(l.Grid,{spacingX:"spacer-4",spacingY:{base:"spacer-4",lg:"spacer-6"},columns:{base:2,md:3,lg:4,xxl:5},children:n.map((e,t)=>{let[a,{asset:i,description:r,name:n}]=e;return(0,o.jsxs)(WorkflowCard,{onClick:handleWorkflowClick(a),children:[(0,o.jsxs)(WorkflowCard.Frame,{children:[(0,o.jsx)(WorkflowCard.Image,{...i}),(0,o.jsx)(WorkflowCard.Description,{children:r})]}),(0,o.jsx)(WorkflowCard.Title,{children:n})]},t)})}):(0,o.jsxs)(l.Flex,{py:"spacer-8",gap:"spacer-4",direction:"column",alignItems:"center",children:[(0,o.jsx)(ek(),{alt:"No results found",width:170,height:166,src:"/static/assets/application-complete.png"}),(0,o.jsxs)(l.Text,{variant:"text-body-regular",color:"text-secondary",children:['Sorry, no results found for "',i,'". If you are not able to find your program, please continue with'," ",(0,o.jsx)(l.Link,{as:"button",isInline:!0,onClick:handleWorkflowClick(g.kT.Flyte),fontWeight:"light",children:"FlyteHealth Direct."})]})]})]})]}),(0,o.jsxs)(l.Flex,{direction:"column",gap:"spacer-1",children:[(0,o.jsx)(l.Text,{color:"text-secondary",variant:"text-body-bold",children:"Need some help?"}),(0,o.jsxs)(l.Text,{color:"text-secondary",variant:"text-body-regular",children:["Please call ",(0,o.jsx)(eu.R,{})," to speak with a Care Coordinator."]})]})]})};var eP=a(2070),eF=a(19813),eA=a(4985),eM=a(80702),eL=a(9231),eR=a(54638),eB=a(45321),eO=a(76371),eU=a(21991);let WorkflowManager=e=>{let{render:t}=e,[a,i]=(0,m.eO)(v),r=(0,s.useMemo)(()=>(0,h.k)(a.value),[a.value]),n=(0,s.useCallback)(e=>{i({type:"SUBMIT",data:{workflow:e}})},[i]),c=(0,s.useCallback)(()=>{switch(r){case y.WorkflowSelector:return t({header:(0,o.jsx)(p.E,{partner:g.kT.Flyte}),body:(0,o.jsx)(WorkflowSelector,{onSelectWorkflow:n}),currentWorkFlowStep:r});case y.Aetna:return(0,o.jsx)(l.ComposerProvider,{theme:eP.rS.aetna,children:(0,o.jsx)(eF.U,{render:t})});case y.CareCompass:return(0,o.jsx)(l.ComposerProvider,{theme:eP.rS.careCompass,children:(0,o.jsx)(eA.$,{render:t})});case y.RiverSpringLiving:return(0,o.jsx)(l.ComposerProvider,{theme:eP.rS.riverspring,children:(0,o.jsx)(eM.l,{render:t})});case y.PequotHealthCare:return(0,o.jsx)(l.ComposerProvider,{theme:eP.rS.pequot,children:(0,o.jsx)(eL.u,{render:t})});case y.PyleFamilyInsurance:return(0,o.jsx)(l.ComposerProvider,{theme:eP.rS.pyle,children:(0,o.jsx)(eR.u,{render:t})});case y.DGA:return(0,o.jsx)(l.ComposerProvider,{theme:eP.rS.standard,children:(0,o.jsx)(eB.I,{render:t})});case y.MDSave:return(0,o.jsx)(l.ComposerProvider,{theme:eP.rS.standard,children:(0,o.jsx)(eO.t,{render:t})});case y.ChristianaCare:return(0,o.jsx)(l.ComposerProvider,{theme:eP.rS.standard,children:(0,o.jsx)(eU.k,{render:t})});case y.Flyte:default:return(0,o.jsx)(FlyteWorkflow,{render:t})}},[r]);return c()},FlyteSignUpLauncher=e=>{let{size:t="l",children:a="Get Started",...i}=e,[r,n]=(0,s.useState)(!1),[h,m]=(0,s.useState)(!1),{track:p}=(0,eg.useAnalytics)(),g=(0,s.useCallback)(()=>{m(!1),n(!1),p(ep.U.closeWorkflowEvent)},[]),x=(0,s.useCallback)(e=>{let t=[u.J.ApplicationReview,u.J.ApplicationComplete,u.J.ApplicationDetected,u.J.EligibilityUnmet,u.J.AppDownload],a=t.includes(e);a?n(!1):(p(ep.U.closeWorkflowConfirmationEvent),b())},[]),b=(0,s.useCallback)(()=>m(e=>!e),[]),y=(0,s.useCallback)(()=>{p(ep.U.abortCloseWorkflow),b()},[b]),v=(0,s.useCallback)(()=>{p(ep.U.openPartnerSelectorEvent),n(!0)},[p,n]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l.Button,{onClick:v,trailingIcon:(0,o.jsx)(l.IconArrowRight,{}),size:t,children:a,"data-test":"flyteSignUpLauncher",...i}),r&&(0,o.jsx)(WorkflowManager,{render:e=>{let{header:t,body:a,currentWorkFlowStep:i}=e;return(0,o.jsxs)(d.Eg,{isOpen:!0,onClose:()=>x(i),children:[(0,o.jsx)(d.Eg.Header,{children:t}),(0,o.jsx)(d.Eg.Body,{children:a},i)]})}}),(0,o.jsx)(c.e,{isOpen:h,onContinue:y,onLeave:g})]})}},76371:function(e,t,a){a.d(t,{t:function(){return MDSaveWorkflow}});var i,r=a(85893),n=a(67294),o=a(79447),s=a(17081),l=a(55632),c=a(9941),d=a(71986),u=a(97213),h=a(93773);let m={[h.J.PreEligibility]:{title:(0,r.jsxs)(d.TextPairing,{variant:"textpairing-header-2XL",children:[(0,r.jsx)(d.TextPairing.Label,{color:"text-primary",children:"Let's make sure you're eligible for the FlyteHealth program."}),(0,r.jsx)(d.TextPairing.SubLabel,{color:"text-secondary",children:"To be eligible for the FlyteHealth program through your MDsave benefits, you must meet specific age and Body Mass Index (BMI)* requirements."})]}),bmiEnrollmentDisclaimer:(0,r.jsx)(d.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"*We acknowledge that Body Mass Index (BMI) is an imperfect way to screen for excess weight. FlyteHealth providers do not use BMI alone as a measure of overall health. Instead, BMI is used as a data point to see if someone is eligible to join the FlyteHealth program. Once someone joins the program, we'll ask each person more about their health to create a personalized treatment plan."})},[h.J.EligibilityUnmet]:{title:(0,r.jsxs)(d.TextPairing,{variant:"textpairing-header-2XL",children:[(0,r.jsx)(d.TextPairing.Label,{color:"text-secondary-negative",children:"Unfortunately, you are not eligible to join FlyteHealth at this time."}),(0,r.jsx)(d.TextPairing.SubLabel,{color:"text-secondary",children:"The FlyteHealth program requires a minimum BMI of 27+ (plus one or more weight-related health conditions) or a BMI of 30+."})]})},[h.J.ContactDetails]:{title:(0,r.jsxs)(d.TextPairing,{variant:"textpairing-header-2XL",children:[(0,r.jsx)(d.TextPairing.Label,{color:"text-secondary-negative",children:"Congratulations! You're eligible for the FlyteHealth program"}),(0,r.jsx)(d.TextPairing.SubLabel,{color:"text-secondary",children:"To help us match your information with your employer, tell us about yourself."})]})},[h.J.ApplicationReview]:{title:(0,r.jsxs)(d.TextPairing,{variant:"textpairing-header-2XL",children:[(0,r.jsx)(d.TextPairing.Label,{color:"text-primary",children:"You're almost finished!"}),(0,r.jsx)(d.TextPairing.SubLabel,{color:"text-secondary",children:"We've received your application, but we need a little more information from you to move forward. Please call us to complete the application process."})]})},[h.J.ApplicationDetected]:{title:(0,r.jsx)(d.Text,{variant:"text-header-2XL",color:"text-primary",children:"We found an existing account for:"}),description:(0,r.jsx)(d.Text,{variant:"text-body-display-S",color:"text-secondary",children:"It looks like you already have an account with us. To continue or update your registration details, please contact our Care Coordinator team."})},[h.J.OnboardingChecklist]:u.T[h.J.OnboardingChecklist],[h.J.CreatePassword]:u.T[h.J.CreatePassword],[h.J.AppDownload]:u.T[h.J.AppDownload],[h.J.ReviewConsents]:u.T[h.J.ReviewConsents]};var p=a(20893),g=a(10265),x=a(52766),b=a(94788),y=a(47243),v=a(30368),f=a(98491),C=a(61741),I=a(97620);(i||(i={})).CreateLead="createLead";let D={...f.a,...i},j=I.aU[g.kT.MDSave],S={formData:{birthdate:"",comorbidity:"",currentWeightInPounds:"",dateOfHighestWeightValue:"",email:"",firstName:"",heightInFoot:"",heightInInch:"",highestWeightInPounds:"",insuranceCoverage:void 0,insuranceMemberID:"",insurance:void 0,lastName:"",phone:"",state:void 0,termsAgreement:!1,howDidYouFindUS:""},bmi:void 0},w=(0,b.cY)({types:{},guards:{isPreEligibilityMet:e=>{let{context:{bmi:t,formData:a}}=e;return x.Pq.mdSave({bmi:t,comorbidity:a.comorbidity})},isApplicationDetected:C.Q},actions:{updateFormData:(0,y.a)({formData:e=>{let{context:t,event:a}=e;return{...t.formData,...a.data}}}),assignBMI:(0,y.a)({bmi:e=>{let{context:t}=e,{heightInFoot:a,heightInInch:i,highestWeightInPounds:r}=t.formData;return(0,x.V2)({heightFeet:(0,x.MC)(a),heightInches:(0,x.MC)(i),weightPounds:(0,x.MC)(r)})}}),reset:(0,y.a)({...S})}}).createMachine({context:()=>S,id:"mdSaveMachine",initial:D.PreEligibility,states:{[D.PreEligibility]:{id:D.PreEligibility,initial:D.Idle,states:{[D.Idle]:{on:{SUBMIT:{target:D.Submitting,actions:"updateFormData"}}},[D.Submitting]:{entry:"assignBMI",always:[{target:"#".concat(D.ContactDetails),guard:"isPreEligibilityMet"},{target:"#".concat(D.EligibilityUnmet)}]}}},[D.ContactDetails]:{id:D.ContactDetails,initial:D.Idle,states:{[D.Idle]:{on:{SUBMIT:{actions:"updateFormData",target:D.Submitting}}},[D.Submitting]:{id:D.Submitting,initial:D.CreateLead,states:{[D.CreateLead]:{id:D.CreateLead,invoke:{src:(0,v.p4)(async e=>{let{input:t}=e,a={...t.formData,company:j,evolveOrganization:g.bV.MDsave,leadStatus:g.rl.EligibleWaiting,automateEvolveEnrollment:!1};return await (0,p.$)(a)}),input:e=>{let{context:t}=e;return t},onDone:"#".concat(D.ApplicationReview),onError:[{guard:"isApplicationDetected",target:"#".concat(D.ApplicationDetected)},{target:"#".concat(D.Error)}]}}}},[D.Error]:{id:D.Error,on:{SUBMIT:{actions:"updateFormData",target:D.Submitting}}}}},[D.ApplicationReview]:{id:D.ApplicationReview},[D.ApplicationDetected]:{id:D.ApplicationDetected},[D.EligibilityUnmet]:{id:D.EligibilityUnmet,initial:D.Idle,states:{[D.Idle]:{on:{SUBMIT:{target:D.Submitting,actions:"updateFormData"}}},[D.Submitting]:{invoke:{src:(0,v.p4)(async e=>{let{input:t}=e,a={...t,company:j,leadStatus:g.rl.Ineligible,ineligibilityReason:g.ib.BMI,automateEvolveEnrollment:!1};return await (0,p.$)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:D.Success,onError:D.Error}},[D.Success]:{},[D.Error]:{on:{SUBMIT:{target:D.Submitting}}}}}},on:{RESET:{target:"#".concat(D.PreEligibility),actions:"reset"}}});var E=a(90420),T=a(94445),k=a(34e3),P=a(5111),F=a(67989),A=a(15615),M=a(4225),L=a(6426);let R={[h.J.ContactDetails]:{state:{options:L.Fp}}},B=new Map([[h.J.PreEligibility,P.t.get(h.J.PreEligibility)],[h.J.ContactDetails,P.t.get(h.J.ContactDetails)]]),O=A.kT.MDSave,MDSaveWorkflow=e=>{let{render:t}=e,[a,i]=(0,T.eO)(w),u=(0,n.useMemo)(()=>(0,E.k)(a.value),[a.value]);(0,F.R)(u,O);let p=(0,n.useCallback)(e=>{i({type:"SUBMIT",data:e})},[i]),g=(0,n.useCallback)(()=>{switch(u){case f.a.PreEligibility:return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(d.Alert,{variant:"subtle",status:"warning",borderRadius:"none",justifyContent:"center",children:[(0,r.jsx)(d.Alert.Icon,{}),(0,r.jsxs)(d.Alert.Title,{children:["To continue, you must first purchase the MDsave FlyteHealth bundle. To purchase, click"," ",(0,r.jsx)(d.Link,{isExternal:!0,href:"https://www.mdsave.com/p/flyte-weight-loss-and-nutritional-counseling",fontWeight:"bold",children:"here"}),"."]})]}),(0,r.jsx)(s.b,{configuration:{contentResources:m[h.J.PreEligibility]},onSubmit:p})]});case f.a.ContactDetails:return(0,r.jsx)(o.q,{configuration:{contentResources:m[h.J.ContactDetails],fields:R[h.J.ContactDetails]},loading:a.matches({[f.a.ContactDetails]:f.a.Submitting}),onSubmit:p,defaultValues:a.context.formData});case f.a.EligibilityUnmet:return(0,r.jsx)(l.X,{configuration:{contentResources:m[h.J.EligibilityUnmet]},onSubmit:p,loading:a.matches({[f.a.EligibilityUnmet]:f.a.Submitting}),isEmailSent:a.matches({[f.a.EligibilityUnmet]:f.a.Success}),hasError:a.matches({[f.a.EligibilityUnmet]:f.a.Error})});case f.a.ApplicationReview:return(0,r.jsx)(c.G,{...m[h.J.ApplicationReview]});case f.a.ApplicationDetected:return(0,r.jsx)(M.v,{...m[h.J.ApplicationDetected],email:a.context.formData.email});default:return null}},[u,a]);return t({header:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(d.Flex,{gap:"spacer-5",alignItems:"center",children:[(0,r.jsx)(k.E,{partner:A.kT.Flyte}),(0,r.jsx)(d.Divider,{orientation:"vertical",alignSelf:"stretch",height:"auto"}),(0,r.jsx)(k.E,{partner:O})]}),(0,r.jsx)(P.K,{currentStep:u,steps:B})]}),body:g(),currentWorkFlowStep:u})}},9231:function(e,t,a){a.d(t,{u:function(){return PequotWorkflow}});var i,r,n=a(85893),o=a(67294),s=a(79447),l=a(17081),c=a(55632),d=a(21954),u=a(98694),h=a(28588),m=a(9941),p=a(71986),g=a(97213),x=a(93773);let b={[x.J.PreEligibility]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-primary",children:"Let's make sure you're eligible for the FlyteHealth program."}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"To be eligible for the FlyteHealth program through your Pequot HealthCare benefits, you must meet specific age and Body Mass Index (BMI)* requirements."})]}),bmiEnrollmentDisclaimer:(0,n.jsx)(p.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"*We acknowledge that Body Mass Index (BMI) is an imperfect way to screen for excess weight. FlyteHealth providers do not use BMI alone as a measure of overall health. Instead, BMI is used as a data point to see if someone is eligible to join the FlyteHealth program. Once someone joins the program, we'll ask each person more about their health to create a personalized treatment plan."})},[x.J.EligibilityUnmet]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-secondary-negative",children:"Unfortunately, you are not eligible to join FlyteHealth at this time."}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"The FlyteHealth program requires a minimum BMI of 35, or a weight-related health condition."})]})},[x.J.ContactDetails]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-secondary-negative",children:"Congratulations! You're eligible for the FlyteHealth program"}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"To help us match your information with your employer, tell us about yourself. Next, we'll ask about your Pequot Healthcare membership. Be sure to have your insurance card handy."})]})},[x.J.InsuranceDetails]:{title:(0,n.jsxs)(p.Text,{variant:"text-header-2XL",color:"text-secondary-negative",children:["One more thing:"," ",(0,n.jsx)(p.Text,{as:"span",variant:"text-header-2XL",color:"text-primary",children:"What's your Pequot HealthCare membership number?"})]})},[x.J.InsuranceDetailsReview]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{children:"Let's review: Is your info correct?"}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"Please double-check the information you provided to make sure everything is correct."})]})},[x.J.ApplicationComplete]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-secondary-negative",children:"Welcome aboard! We're so excited you're here."}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"Next, we need to confirm your email. Click the link we sent to:"})]}),description:(0,n.jsx)(p.Text,{mt:"spacer-8",color:"text-secondary",variant:"text-body-regular",children:"Can’t find the email? Make sure to check your Spam folder."})},[x.J.ApplicationReview]:{title:(0,n.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,n.jsx)(p.TextPairing.Label,{color:"text-primary",children:"You're almost finished!"}),(0,n.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"We've received your application, but we need a little more information from you to move forward. Please call us to complete the application process."})]})},[x.J.ApplicationDetected]:{title:(0,n.jsx)(p.Text,{variant:"text-header-2XL",color:"text-primary",children:"We found an existing account for:"}),description:(0,n.jsx)(p.Text,{variant:"text-body-display-S",color:"text-secondary",children:"It looks like you already have an account with us. To continue or update your registration details, please contact our Care Coordinator team."})},[x.J.OnboardingChecklist]:g.T[x.J.OnboardingChecklist],[x.J.CreatePassword]:g.T[x.J.CreatePassword],[x.J.AppDownload]:g.T[x.J.AppDownload],[x.J.ReviewConsents]:g.T[x.J.ReviewConsents]};var y=a(20893),v=a(10265),f=a(52766),C=a(94788),I=a(47243),D=a(30368),j=a(98491),S=a(3938),w=a(15615);let isEligibleForAutoEnrollment=e=>e===S._.FULL_MATCH||e===S._.ELIGIBLE_MATCH,getLeadStatus=e=>{switch(e){case S._.PERSON_MATCH:case S._.INSURANCE_MATCH:case S._.EXPIRED:case S._.NOT_FOUND:return w.rl.EligibleWaiting;case S._.FULL_MATCH:case S._.ELIGIBLE_MATCH:default:return}};var E=a(76364),T=a(61741),k=a(97620),P=a(4e4);(i=r||(r={})).CheckEligibility="checkEligibility",i.CreateLead="createLead",i.CheckBenefits="checkBenefits";let F={...j.a,...r},A=k.aU[v.kT.PequotHealthCare],M={formData:{birthdate:"",comorbidity:"",currentWeightInPounds:"",dateOfHighestWeightValue:"",email:"",firstName:"",heightInFoot:"",heightInInch:"",highestWeightInPounds:"",insuranceCoverage:void 0,insuranceMemberID:"",insurance:void 0,lastName:"",phone:"",state:void 0,termsAgreement:!1,howDidYouFindUS:""},eligibilityCheckMatchType:void 0,bmi:void 0,benefitsCheck:void 0},L=(0,C.cY)({types:{},guards:{isPreEligibilityMet:e=>{let{context:{formData:t,bmi:a}}=e;return f.Pq.pequotHealthCare({bmi:a,comorbidity:t.comorbidity})},isApplicationReviewRequired:e=>{let{context:{eligibilityCheckMatchType:t}}=e;return[v._q.EXPIRED,v._q.INSURANCE_MATCH,v._q.PERSON_MATCH,v._q.NOT_FOUND].includes(t)},isApplicationDetected:T.Q},actions:{updateFormData:(0,I.a)({formData:e=>{let{context:t,event:a}=e;return{...t.formData,...a.data}}}),assignBMI:(0,I.a)({bmi:e=>{let{context:t}=e,{heightInFoot:a,heightInInch:i,highestWeightInPounds:r}=t.formData;return(0,f.V2)({heightFeet:(0,f.MC)(a),heightInches:(0,f.MC)(i),weightPounds:(0,f.MC)(r)})}}),reset:(0,I.a)({...M}),resetBenefitsCheck:(0,I.a)({benefitsCheck:void 0})}}).createMachine({context:()=>M,id:"pequotMachine",initial:F.PreEligibility,states:{[F.PreEligibility]:{id:F.PreEligibility,initial:F.Idle,states:{[F.Idle]:{on:{SUBMIT:{target:F.Submitting,actions:"updateFormData"}}},[F.Submitting]:{entry:"assignBMI",always:[{target:"#".concat(F.ContactDetails),guard:"isPreEligibilityMet"},{target:"#".concat(F.EligibilityUnmet)}]}}},[F.ContactDetails]:{id:F.ContactDetails,initial:F.Idle,states:{[F.Idle]:{on:{SUBMIT:{target:"#".concat(F.InsuranceDetails),actions:"updateFormData"}}}}},[F.InsuranceDetails]:{id:F.InsuranceDetails,initial:F.Idle,states:{[F.Idle]:{on:{BACK:{target:"#".concat(F.ContactDetails)},SUBMIT:{target:"#".concat(F.InsuranceDetailsReview),actions:"updateFormData"}}}}},[F.InsuranceDetailsReview]:{id:F.InsuranceDetailsReview,initial:F.Idle,states:{[F.Idle]:{on:{SUBMIT:{actions:"updateFormData",target:F.Submitting}}},[F.Submitting]:{id:F.Submitting,initial:F.CheckEligibility,states:{[F.CheckEligibility]:{id:F.CheckEligibility,invoke:{src:(0,D.p4)(async e=>{let{input:t}=e,a={...t,insurance:k.Er[v.kT.PequotHealthCare],benefitProgram:k.Q1[v.kT.PequotHealthCare]};return await (0,E.m)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:[{actions:(0,I.a)({eligibilityCheckMatchType:e=>{let{event:t}=e;return t.output.data.matchType}}),target:"#".concat(F.CheckBenefits)}],onError:"#".concat(F.Error)}},[F.CheckBenefits]:{id:F.CheckBenefits,invoke:{src:(0,D.p4)(async e=>{let{input:t}=e,a={...t,payerCode:k.qK[v.PF["Pequot HealthCare"]]};return await (0,P.o)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:[{actions:(0,I.a)({benefitsCheck:e=>{let{event:t}=e;return t.output.data}}),target:"#".concat(F.CreateLead)}],onError:"#".concat(F.CreateLead)}},[F.CreateLead]:{id:F.CreateLead,invoke:{src:(0,D.p4)(async e=>{let{input:t}=e,a={...t.formData,...t.formData.insuranceMemberID&&{employmentVerificationCode:t.formData.insuranceMemberID},...t.benefitsCheck&&{benefitsCheck:t.benefitsCheck},eligibilityVerifiedBy:v.Vn.Evolve,company:A,insurance:k.KG[v.kT.PequotHealthCare],evolveOrganization:v.bV["Pequot Tribal Family Health Plan"],leadStatus:getLeadStatus(t.eligibilityCheckMatchType),automateEvolveEnrollment:isEligibleForAutoEnrollment(t.eligibilityCheckMatchType)};return await (0,y.$)(a)}),input:e=>{let{context:t}=e;return t},onDone:[{guard:"isApplicationReviewRequired",target:"#".concat(F.ApplicationReview)},{target:"#".concat(F.ApplicationComplete)}],onError:[{guard:"isApplicationDetected",target:"#".concat(F.ApplicationDetected)},{target:"#".concat(F.Error)}]}}}},[F.Error]:{id:F.Error,on:{SUBMIT:{actions:["updateFormData","resetBenefitsCheck"],target:F.Submitting}}}}},[F.ApplicationReview]:{id:F.ApplicationReview},[F.ApplicationComplete]:{id:F.ApplicationComplete},[F.ApplicationDetected]:{id:F.ApplicationDetected},[F.EligibilityUnmet]:{id:F.EligibilityUnmet,initial:F.Idle,states:{[F.Idle]:{on:{SUBMIT:{target:F.Submitting,actions:"updateFormData"}}},[F.Submitting]:{invoke:{src:(0,D.p4)(async e=>{let{input:t}=e,a={...t,company:A,leadStatus:v.rl.Ineligible,ineligibilityReason:v.ib.BMI,automateEvolveEnrollment:!1};return await (0,y.$)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:F.Success,onError:F.Error}},[F.Success]:{},[F.Error]:{on:{SUBMIT:{actions:"updateFormData",target:F.Submitting}}}}}},on:{RESET:{target:"#".concat(F.PreEligibility),actions:"reset"}}});var R=a(90420),B=a(94445),O=a(34e3),U=a(5111),J=a(67989),H=a(6426);let N={[x.J.ContactDetails]:{state:{options:H.Fp}},[x.J.InsuranceDetails]:{insuranceMemberID:{}},[x.J.InsuranceDetailsReview]:{insuranceMemberID:{}}};var W=a(4225);let _=w.kT.PequotHealthCare,PequotWorkflow=e=>{let{render:t}=e,[a,i]=(0,B.eO)(L),r=(0,o.useMemo)(()=>(0,R.k)(a.value),[a.value]);(0,J.R)(r,_);let g=(0,o.useCallback)(e=>{i({type:"SUBMIT",data:e})},[i]),y=(0,o.useCallback)(()=>{i({type:"BACK"})},[i]),v=(0,o.useCallback)(()=>{switch(r){case j.a.PreEligibility:return(0,n.jsx)(l.b,{configuration:{contentResources:b[x.J.PreEligibility]},onSubmit:g});case j.a.ContactDetails:return(0,n.jsx)(s.q,{configuration:{contentResources:b[x.J.ContactDetails],fields:N[x.J.ContactDetails]},onSubmit:g,defaultValues:a.context.formData});case j.a.EligibilityUnmet:return(0,n.jsx)(c.X,{configuration:{contentResources:b[x.J.EligibilityUnmet]},onSubmit:g,loading:a.matches({[j.a.EligibilityUnmet]:j.a.Submitting}),isEmailSent:a.matches({[j.a.EligibilityUnmet]:j.a.Success}),hasError:a.matches({[j.a.EligibilityUnmet]:j.a.Error})});case j.a.InsuranceDetails:return(0,n.jsx)(d.v,{configuration:{contentResources:b[x.J.InsuranceDetails],fields:N[x.J.InsuranceDetails]},onSubmit:g,onBack:y});case j.a.InsuranceDetailsReview:return(0,n.jsx)(u.b,{configuration:{contentResources:b[x.J.InsuranceDetailsReview],fields:N[x.J.InsuranceDetailsReview]},onSubmit:g,loading:a.matches({[j.a.InsuranceDetailsReview]:j.a.Submitting}),hasError:a.matches({[j.a.InsuranceDetailsReview]:j.a.Error}),defaultValues:a.context.formData});case j.a.ApplicationComplete:return(0,n.jsx)(h.J,{...b[x.J.ApplicationComplete],email:a.context.formData.email});case j.a.ApplicationReview:return(0,n.jsx)(m.G,{...b[x.J.ApplicationReview]});case j.a.ApplicationDetected:return(0,n.jsx)(W.v,{...b[x.J.ApplicationDetected],email:a.context.formData.email});default:return null}},[r,a]);return t({header:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(p.Flex,{gap:"spacer-5",alignItems:"center",children:[(0,n.jsx)(O.E,{partner:w.kT.Flyte}),(0,n.jsx)(p.Divider,{orientation:"vertical",alignSelf:"stretch",height:"auto"}),(0,n.jsx)(O.E,{partner:_})]}),(0,n.jsx)(U.K,{currentStep:r})]}),body:v(),currentWorkFlowStep:r})}},54638:function(e,t,a){a.d(t,{u:function(){return PyleWorkflow}});var i,r=a(85893),n=a(67294),o=a(79447),s=a(17081),l=a(55632),c=a(9941),d=a(71986),u=a(97213),h=a(93773);let m={[h.J.PreEligibility]:{title:(0,r.jsxs)(d.TextPairing,{variant:"textpairing-header-2XL",children:[(0,r.jsx)(d.TextPairing.Label,{color:"text-primary",children:"Let's make sure you're eligible for the FlyteHealth program."}),(0,r.jsx)(d.TextPairing.SubLabel,{color:"text-secondary",children:"To be eligible for the FlyteHealth program through your A-Duie Pyle benefits, you must meet specific age and Body Mass Index (BMI)* requirements."})]}),bmiEnrollmentDisclaimer:(0,r.jsx)(d.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"*We acknowledge that Body Mass Index (BMI) is an imperfect way to screen for excess weight. FlyteHealth providers do not use BMI alone as a measure of overall health. Instead, BMI is used as a data point to see if someone is eligible to join the FlyteHealth program. Once someone joins the program, we'll ask each person more about their health to create a personalized treatment plan."})},[h.J.EligibilityUnmet]:{title:(0,r.jsxs)(d.TextPairing,{variant:"textpairing-header-2XL",children:[(0,r.jsx)(d.TextPairing.Label,{color:"text-secondary-negative",children:"Unfortunately, you are not eligible to join FlyteHealth at this time."}),(0,r.jsx)(d.TextPairing.SubLabel,{color:"text-secondary",children:"The FlyteHealth program requires a minimum BMI of 27+ (plus one or more weight-related health conditions) or a BMI of 30+."})]})},[h.J.ContactDetails]:{title:(0,r.jsxs)(d.TextPairing,{variant:"textpairing-header-2XL",children:[(0,r.jsx)(d.TextPairing.Label,{color:"text-secondary-negative",children:"Congratulations! You're eligible for the FlyteHealth program"}),(0,r.jsx)(d.TextPairing.SubLabel,{color:"text-secondary",children:"To help us match your information with your employer, tell us about yourself."})]})},[h.J.ApplicationReview]:{title:(0,r.jsxs)(d.TextPairing,{variant:"textpairing-header-2XL",children:[(0,r.jsx)(d.TextPairing.Label,{color:"text-primary",children:"You're almost finished!"}),(0,r.jsx)(d.TextPairing.SubLabel,{color:"text-secondary",children:"We've received your application, but we need a little more information from you to move forward. Please call us to complete the application process."})]}),note:(0,r.jsx)(d.Text,{variant:"text-body-large-regular",color:"text-secondary",children:"There is a one-time $235 FlyteHealth program fee for eligible employees collected during scheduling. A portion of this fee ($150) will be reimbursed by A-Duie Pyle upon confirmation of eligibility and program start. Please contact Pyle HR for instructions on how to obtain this reimbursement."})},[h.J.ApplicationDetected]:{title:(0,r.jsx)(d.Text,{variant:"text-header-2XL",color:"text-primary",children:"We found an existing account for:"}),description:(0,r.jsx)(d.Text,{variant:"text-body-display-S",color:"text-secondary",children:"It looks like you already have an account with us. To continue or update your registration details, please contact our Care Coordinator team."})},[h.J.OnboardingChecklist]:u.T[h.J.OnboardingChecklist],[h.J.CreatePassword]:u.T[h.J.CreatePassword],[h.J.AppDownload]:u.T[h.J.AppDownload],[h.J.ReviewConsents]:u.T[h.J.ReviewConsents]};var p=a(20893),g=a(10265),x=a(52766),b=a(94788),y=a(47243),v=a(30368),f=a(98491),C=a(61741),I=a(97620);(i||(i={})).CreateLead="createLead";let D={...f.a,...i},j=I.aU[g.kT.PyleFamilyInsurance],S={formData:{birthdate:"",comorbidity:"",currentWeightInPounds:"",dateOfHighestWeightValue:"",email:"",firstName:"",heightInFoot:"",heightInInch:"",highestWeightInPounds:"",insuranceCoverage:void 0,insuranceMemberID:"",insurance:void 0,lastName:"",phone:"",state:void 0,termsAgreement:!1,howDidYouFindUS:""},bmi:void 0},w=(0,b.cY)({types:{},guards:{isPreEligibilityMet:e=>{let{context:{bmi:t}}=e;return x.Pq.pyleFamilyInsurance({bmi:t})},isApplicationDetected:C.Q},actions:{updateFormData:(0,y.a)({formData:e=>{let{context:t,event:a}=e;return{...t.formData,...a.data}}}),assignBMI:(0,y.a)({bmi:e=>{let{context:t}=e,{heightInFoot:a,heightInInch:i,highestWeightInPounds:r}=t.formData;return(0,x.V2)({heightFeet:(0,x.MC)(a),heightInches:(0,x.MC)(i),weightPounds:(0,x.MC)(r)})}}),reset:(0,y.a)({...S})}}).createMachine({context:()=>S,id:"pyleMachine",initial:D.PreEligibility,states:{[D.PreEligibility]:{id:D.PreEligibility,initial:D.Idle,states:{[D.Idle]:{on:{SUBMIT:{target:D.Submitting,actions:"updateFormData"}}},[D.Submitting]:{entry:"assignBMI",always:[{target:"#".concat(D.ContactDetails),guard:"isPreEligibilityMet"},{target:"#".concat(D.EligibilityUnmet)}]}}},[D.ContactDetails]:{id:D.ContactDetails,initial:D.Idle,states:{[D.Idle]:{on:{SUBMIT:{actions:"updateFormData",target:D.Submitting}}},[D.Submitting]:{id:D.Submitting,initial:D.CreateLead,states:{[D.CreateLead]:{id:D.CreateLead,invoke:{src:(0,v.p4)(async e=>{let{input:t}=e,a={...t.formData,company:j,evolveOrganization:g.bV["A Duie Pyle"],leadStatus:g.rl.EligibleWaiting,automateEvolveEnrollment:!1};return await (0,p.$)(a)}),input:e=>{let{context:t}=e;return t},onDone:"#".concat(D.ApplicationReview),onError:[{guard:"isApplicationDetected",target:"#".concat(D.ApplicationDetected)},{target:"#".concat(D.Error)}]}}}},[D.Error]:{id:D.Error,on:{SUBMIT:{actions:"updateFormData",target:D.Submitting}}}}},[D.ApplicationReview]:{id:D.ApplicationReview},[D.ApplicationDetected]:{id:D.ApplicationDetected},[D.EligibilityUnmet]:{id:D.EligibilityUnmet,initial:D.Idle,states:{[D.Idle]:{on:{SUBMIT:{target:D.Submitting,actions:"updateFormData"}}},[D.Submitting]:{invoke:{src:(0,v.p4)(async e=>{let{input:t}=e,a={...t,company:j,leadStatus:g.rl.Ineligible,ineligibilityReason:g.ib.BMI,automateEvolveEnrollment:!1};return await (0,p.$)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:D.Success,onError:D.Error}},[D.Success]:{},[D.Error]:{on:{SUBMIT:{target:D.Submitting}}}}}},on:{RESET:{target:"#".concat(D.PreEligibility),actions:"reset"}}});var E=a(90420),T=a(94445),k=a(34e3),P=a(5111),F=a(67989),A=a(15615),M=a(4225),L=a(6426);let R={[h.J.ContactDetails]:{state:{options:L.Fp}}},B=new Map([[h.J.PreEligibility,P.t.get(h.J.PreEligibility)],[h.J.ContactDetails,P.t.get(h.J.ContactDetails)]]),O=A.kT.PyleFamilyInsurance,PyleWorkflow=e=>{let{render:t}=e,[a,i]=(0,T.eO)(w),u=(0,n.useMemo)(()=>(0,E.k)(a.value),[a.value]);(0,F.R)(u,O);let p=(0,n.useCallback)(e=>{i({type:"SUBMIT",data:e})},[i]),g=(0,n.useCallback)(()=>{switch(u){case f.a.PreEligibility:return(0,r.jsx)(s.b,{configuration:{contentResources:m[h.J.PreEligibility]},onSubmit:p});case f.a.ContactDetails:return(0,r.jsx)(o.q,{configuration:{contentResources:m[h.J.ContactDetails],fields:R[h.J.ContactDetails]},loading:a.matches({[f.a.ContactDetails]:f.a.Submitting}),onSubmit:p,defaultValues:a.context.formData});case f.a.EligibilityUnmet:return(0,r.jsx)(l.X,{configuration:{contentResources:m[h.J.EligibilityUnmet]},onSubmit:p,loading:a.matches({[f.a.EligibilityUnmet]:f.a.Submitting}),isEmailSent:a.matches({[f.a.EligibilityUnmet]:f.a.Success}),hasError:a.matches({[f.a.EligibilityUnmet]:f.a.Error})});case f.a.ApplicationReview:return(0,r.jsx)(c.G,{...m[h.J.ApplicationReview]});case f.a.ApplicationDetected:return(0,r.jsx)(M.v,{...m[h.J.ApplicationDetected],email:a.context.formData.email});default:return null}},[u,a]);return t({header:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(d.Flex,{gap:"spacer-5",alignItems:"center",children:[(0,r.jsx)(k.E,{partner:A.kT.Flyte}),(0,r.jsx)(d.Divider,{orientation:"vertical",alignSelf:"stretch",height:"auto"}),(0,r.jsx)(k.E,{partner:O})]}),(0,r.jsx)(P.K,{currentStep:u,steps:B})]}),body:g(),currentWorkFlowStep:u})}},80702:function(e,t,a){a.d(t,{l:function(){return RiverspringWorkflow}});var i,r,n,o,s=a(85893),l=a(67294),c=a(79447),d=a(17081),u=a(98694),h=a(28588),m=a(9941),p=a(71986),g=a(97213),x=a(93773),b=a(75887);let y={[x.J.PreEligibility]:{title:(0,s.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,s.jsx)(p.TextPairing.Label,{color:"text-primary",children:"Let's make sure you're eligible for the FlyteHealth program."}),(0,s.jsxs)(p.TextPairing.SubLabel,{color:"text-secondary",children:["All employees are eligible to access the ",(0,s.jsx)("b",{children:"Self-Guided"})," program through the RiverSpring Living benefits.",(0,s.jsx)("br",{}),"To be eligible for the ",(0,s.jsx)("b",{children:"Physician-Guided"})," program, you must meet specific age and Body Mass Index (BMI)* requirements."]})]}),bmiEnrollmentDisclaimer:(0,s.jsx)(p.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"*We acknowledge that Body Mass Index (BMI) is an imperfect way to screen for excess weight. FlyteHealth providers do not use BMI alone as a measure of overall health. Instead, BMI is used as a data point to see if someone is eligible to join the FlyteHealth program. Once someone joins the program, we'll ask each person more about their health to create a personalized treatment plan."})},[x.J.ContactDetails]:(e,t)=>({title:(0,s.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,s.jsxs)(p.TextPairing.Label,{color:"text-primary",children:[(0,s.jsxs)(p.Text,{display:{base:"inline",lg:"block"},as:"label",variant:"text-header-2XL",color:"text-secondary-negative",children:["Congratulations!"," "]}),"You're eligible for the ",b.P.riverSpringLiving({bmi:e,comorbidity:t})?"Physician":"Self","-Guided FlyteHealth program"]}),(0,s.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"To help us match your information with your employer, please tell us a bit more about yourself."})]})}),[x.J.InsuranceDetails]:{title:(0,s.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,s.jsxs)(p.TextPairing.Label,{color:"text-secondary-negative",children:["Almost done:"," ",(0,s.jsx)(p.Text,{as:"span",variant:"text-header-2XL",color:"text-primary",children:"Select your program and let us know if you have health insurance"})]}),(0,s.jsxs)(p.TextPairing.SubLabel,{color:"text-secondary",children:["Before selecting your program, review summaries below. ",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),(0,s.jsx)("b",{children:"Physician-Guided:"})," Access to the entire FlyteHealth care team and our patient app.",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),(0,s.jsx)("b",{children:"Self-Guided:"})," Access to the FlyteHealth patient app only."]})]})},[x.J.InsuranceDetailsReview]:{title:(0,s.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,s.jsx)(p.TextPairing.Label,{children:"Let's review: Is your info correct?"}),(0,s.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"Please double-check the information you provided to make sure everything is correct."})]})},[x.J.ApplicationComplete]:{title:(0,s.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,s.jsx)(p.TextPairing.Label,{color:"text-secondary-negative",children:"Welcome aboard! We're so excited you're here."}),(0,s.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"Next, we need to confirm your email. Click the link we sent to:"})]}),description:(0,s.jsxs)(p.Text,{color:"text-secondary",mt:"spacer-8",variant:"text-body-meta-regular",children:["Please note that for Physician-Guided users, clinical encounters and prescription costs are covered by RiverSpring Living insurance (either Aetna or 1199SEIU), and out-of-pocket costs will vary based on your plan coverage, deductibles, co-pays, and limits. For more information, please contact the RiverSpring Living Benefits Department or your insurance company.",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"If you don't have RiverSpring Living insurance, FlyteHealth also accepts a number of other plans. Please check with a FlyteHealth Patient Coordinator about whether your insurance is accepted.",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"For Self-Guided users, there is no cost for RiverSpring Living employees."]})},[x.J.ApplicationReview]:{title:(0,s.jsxs)(p.TextPairing,{variant:"textpairing-header-2XL",children:[(0,s.jsx)(p.TextPairing.Label,{color:"text-primary",children:"You're almost finished!"}),(0,s.jsx)(p.TextPairing.SubLabel,{color:"text-secondary",children:"We've received your application, but we need a little more information from you to move forward. Please call us to complete the application process."})]}),note:(0,s.jsxs)(p.Text,{color:"text-secondary",variant:"text-body-meta-regular",children:["Please note that for Guided users, clinical encounters and prescription costs are covered by RiverSpring Living insurance (either Aetna or 1199SEIU), and out-of-pocket costs will vary based on your plan coverage, deductibles, co-pays, and limits. For more information, please contact the RiverSpring Living Benefits Department or your insurance company. ",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"If you don't have RiverSpring Living insurance, FlyteHealth also accepts a number of other plans. Please check with a FlyteHealth Patient Coordinator about whether your insurance is accepted."]})},[x.J.ApplicationDetected]:{title:(0,s.jsx)(p.Text,{variant:"text-header-2XL",color:"text-primary",children:"We found an existing account for:"}),description:(0,s.jsx)(p.Text,{variant:"text-body-display-S",color:"text-secondary",children:"It looks like you already have an account with us. To continue or update your registration details, please contact our Care Coordinator team."})},[x.J.OnboardingChecklist]:g.T[x.J.OnboardingChecklist],[x.J.CreatePassword]:g.T[x.J.CreatePassword],[x.J.AppDownload]:g.T[x.J.AppDownload],[x.J.ReviewConsents]:g.T[x.J.ReviewConsents]};var v=a(20893),f=a(10265),C=a(52766),I=a(94788),D=a(47243),j=a(30368),S=a(98491),w=a(15615);let E={Guided:w.bV["RiverSpring Living - Guided"],"Self-Guided":w.bV["RiverSpring Living - Self Guided"]},isEligibleForAutoEnrollment=(e,t,a)=>{if(a===w.bV["RiverSpring Living - Self Guided"])return!0;switch(e){case w.PF["1199SEIU"]:return!0;case w.PF.Aetna:return[w.i$["New York"],w.i$["New Jersey"],w.i$.Connecticut].includes(t);default:return!1}},getLeadStatus=(e,t,a)=>{if(!isEligibleForAutoEnrollment(e,t,a))return w.rl.EligibleWaiting};var T=a(61741),k=a(97620),P=a(4e4),F=a(87536);let A="evolveProgram";(i=n||(n={})).Guided="Guided",i.SelfGuided="Self-Guided";let ProgramField=()=>{let{register:e}=(0,F.Gc)();return(0,s.jsxs)(p.Flex,{direction:"column",gap:"spacer-4",children:[(0,s.jsx)(p.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",children:"Program selection"}),(0,s.jsxs)(p.RadioGroup,{display:"flex",gap:"spacer-8","data-test":A,children:[(0,s.jsx)(p.Radio,{value:"Guided",size:"m",...e(A,{required:!0}),children:"Physician-guided"}),(0,s.jsx)(p.Radio,{value:"Self-Guided",size:"m",...e(A),children:"Self-guided"})]})]})};(r=o||(o={})).CreateLead="createLead",r.CheckBenefits="checkBenefits",r.DecisionGate="decisionGate";let M={...S.a,...o},L=k.aU[f.kT.RiverSpringLiving],R={formData:{birthdate:"",comorbidity:"",currentWeightInPounds:"",dateOfHighestWeightValue:"",email:"",firstName:"",heightInFoot:"",heightInInch:"",highestWeightInPounds:"",insuranceCoverage:void 0,insuranceMemberID:"",insurance:void 0,lastName:"",phone:"",state:void 0,termsAgreement:!1,howDidYouFindUS:"",participantDepartmentorOrg:"",evolveProgram:void 0},evolveOrganization:void 0,bmi:void 0,benefitsCheck:void 0},B=(0,I.cY)({types:{},guards:{isApplicationReviewRequired:e=>{let{context:{formData:t,evolveOrganization:a}}=e;return!isEligibleForAutoEnrollment(t.insurance,t.state,a)},isApplicationDetected:T.Q,isInsurerSelected:e=>{let{context:{formData:t}}=e;return!!t.insurance}},actions:{updateFormData:(0,D.a)({formData:e=>{let{context:t,event:a}=e;return{...t.formData,...a.data}}}),assignBMI:(0,D.a)({bmi:e=>{let{context:t}=e,{heightInFoot:a,heightInInch:i,highestWeightInPounds:r}=t.formData;return(0,C.V2)({heightFeet:(0,C.MC)(a),heightInches:(0,C.MC)(i),weightPounds:(0,C.MC)(r)})}}),assignEvolveOrganization:(0,D.a)({evolveOrganization:e=>{let{context:t}=e;return E[t.formData.evolveProgram||n.SelfGuided]}}),reset:(0,D.a)({...R}),resetBenefitsCheck:(0,D.a)({benefitsCheck:void 0})}}).createMachine({context:()=>R,id:"riverspringMachine",initial:M.PreEligibility,states:{[M.PreEligibility]:{id:M.PreEligibility,initial:M.Idle,states:{[M.Idle]:{on:{SUBMIT:{target:M.Submitting,actions:"updateFormData"}}},[M.Submitting]:{entry:["assignBMI"],always:"#".concat(M.ContactDetails)}}},[M.ContactDetails]:{id:M.ContactDetails,initial:M.Idle,states:{[M.Idle]:{on:{SUBMIT:{target:"#".concat(M.InsuranceDetails),actions:"updateFormData"}}}}},[M.InsuranceDetails]:{id:M.InsuranceDetails,initial:M.Idle,states:{[M.Idle]:{on:{BACK:{target:"#".concat(M.ContactDetails)},SUBMIT:{target:"#".concat(M.InsuranceDetailsReview),actions:["updateFormData","assignEvolveOrganization"]}}}}},[M.InsuranceDetailsReview]:{id:M.InsuranceDetailsReview,initial:M.Idle,states:{[M.Idle]:{on:{SUBMIT:{actions:"updateFormData",target:M.Submitting}}},[M.Submitting]:{id:M.Submitting,initial:M.DecisionGate,states:{[M.DecisionGate]:{id:M.DecisionGate,always:[{guard:"isInsurerSelected",target:"#".concat(M.CheckBenefits)},{target:"#".concat(M.CreateLead)}]},[M.CheckBenefits]:{id:M.CheckBenefits,invoke:{src:(0,j.p4)(async e=>{let{input:t}=e,a={...t,payerCode:k.qK[t.insurance]};return await (0,P.o)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:[{actions:(0,D.a)({benefitsCheck:e=>{let{event:t}=e;return t.output.data}}),target:"#".concat(M.CreateLead)}],onError:"#".concat(M.CreateLead)}},[M.CreateLead]:{id:M.CreateLead,invoke:{src:(0,j.p4)(async e=>{let{input:t}=e,a={...t.formData,evolveOrganization:t.evolveOrganization,...t.formData.insuranceMemberID&&{employmentVerificationCode:t.formData.insuranceMemberID},...t.benefitsCheck&&{benefitsCheck:t.benefitsCheck},company:L,leadStatus:getLeadStatus(t.formData.insurance,t.formData.state,t.evolveOrganization),automateEvolveEnrollment:isEligibleForAutoEnrollment(t.formData.insurance,t.formData.state,t.evolveOrganization),evolveProgram:t.formData.evolveProgram||n.SelfGuided};return await (0,v.$)(a)}),input:e=>{let{context:t}=e;return t},onDone:[{guard:"isApplicationReviewRequired",target:"#".concat(M.ApplicationReview)},{target:"#".concat(M.ApplicationComplete)}],onError:[{guard:"isApplicationDetected",target:"#".concat(M.ApplicationDetected)},{target:"#".concat(M.Error)}]}}}},[M.Error]:{id:M.Error,on:{SUBMIT:{actions:["updateFormData","resetBenefitsCheck"],target:M.Submitting}}}}},[M.ApplicationReview]:{id:M.ApplicationReview},[M.ApplicationComplete]:{id:M.ApplicationComplete},[M.ApplicationDetected]:{id:M.ApplicationDetected}},on:{RESET:{target:"#".concat(M.PreEligibility),actions:"reset"}}});var O=a(90420),U=a(94445),J=a(34e3),H=a(5111),N=a(67989),W=a(6426);let _={[x.J.ContactDetails]:{state:{options:W.Fp}},[x.J.InsuranceDetails]:e=>({insurance:{insuranceCarriers:[w.PF.Aetna,w.PF["1199SEIU"]]},insuranceMemberID:{},evolveProgram:e?{}:void 0}),[x.J.InsuranceDetailsReview]:{insurance:{insuranceCarriers:[w.PF.Aetna,w.PF["1199SEIU"]]}}};var V=a(4225),q=a(57087),G=a(91176),z=a(42575);let X="participantDepartmentorOrg",Y=["Hebrew Home at Riverdale","RiverSpring Services Corp","RiverSpring Licensed Home Care Services Agency","RiverSpring Health Plans (ElderServe Health, Inc.)"],ParticipantDepartmentSelector=()=>{let{register:e,watch:t}=(0,F.Gc)();return(0,s.jsxs)(p.Flex,{direction:"column",gap:"spacer-2",children:[(0,s.jsx)(p.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:X,children:"Participating organization"}),(0,s.jsx)(p.Select,{"data-test":X,id:X,size:"l",variant:"flushed",placeholder:"Select organization",...e(X,{required:!0}),value:t(X),children:Y.map(e=>(0,s.jsx)("option",{value:e,children:e},e))})]})},RiverspringInsuranceDetailsForm=e=>{let{configuration:t,loading:a=!1,onSubmit:i,onBack:r}=e,{contentResources:n,fields:o}=t,l=(0,F.cI)({mode:"onBlur",defaultValues:{insuranceMemberID:"",insurance:void 0,evolveProgram:void 0}}),c=(0,z.d)(),renderFormActions=()=>(0,s.jsxs)(p.Flex,{gap:{base:"spacer-8",md:"spacer-16"},alignItems:"center",flex:{base:1,lg:"unset"},children:[(0,s.jsx)(p.Button,{size:{base:"m",lg:"l"},isLoading:a,variant:"link","aria-label":"Back",leadingIcon:(0,s.jsx)(p.IconArrowLeft,{}),onClick:r,children:"Back"}),(0,s.jsx)(p.Button,{type:"submit",size:{base:"m",lg:"l"},isDisabled:!l.formState.isValid,flex:1,isLoading:a,trailingIcon:(0,s.jsx)(p.IconArrowRight,{}),"aria-label":"Continue",children:"Continue"})]});return(0,s.jsx)(F.RV,{...l,children:(0,s.jsxs)(q.S,{as:"form",onSubmit:l.handleSubmit(i),noValidate:!0,children:[(0,s.jsx)(q.S.Side,{gap:0,flex:{base:"none",lg:1},children:n.title}),(0,s.jsxs)(q.S.Form,{children:[(null==o?void 0:o.evolveProgram)&&(0,s.jsx)(ProgramField,{}),(0,s.jsx)(ParticipantDepartmentSelector,{}),(null==o?void 0:o.insurance)&&(0,s.jsx)(G.vu,{isDisabled:a,isRequired:!0,...null==o?void 0:o.insurance}),(0,s.jsx)(G.nB,{isDisabled:a,isRequired:!0,pb:{base:"spacer-24",lg:0},...null==o?void 0:o.insuranceMemberID}),c?(0,s.jsx)(W.D2,{children:renderFormActions()}):renderFormActions()]})]})})},K=w.kT.RiverSpringLiving,RiverspringWorkflow=e=>{let{render:t}=e,[a,i]=(0,U.eO)(B),r=(0,l.useMemo)(()=>(0,O.k)(a.value),[a.value]);(0,N.R)(r,K);let n=(0,l.useCallback)(e=>{i({type:"SUBMIT",data:e})},[i]),o=(0,l.useCallback)(()=>{i({type:"BACK"})},[i]),g=(0,l.useCallback)(()=>{switch(r){case S.a.PreEligibility:return(0,s.jsx)(d.b,{configuration:{contentResources:y[x.J.PreEligibility]},onSubmit:n});case S.a.ContactDetails:return(0,s.jsx)(c.q,{configuration:{contentResources:y[x.J.ContactDetails](a.context.bmi,a.context.formData.comorbidity),fields:_[x.J.ContactDetails]},onSubmit:n,defaultValues:a.context.formData});case S.a.InsuranceDetails:return(0,s.jsx)(RiverspringInsuranceDetailsForm,{configuration:{contentResources:y[x.J.InsuranceDetails],fields:_[x.J.InsuranceDetails](b.P.riverSpringLiving({bmi:a.context.bmi,comorbidity:a.context.formData.comorbidity}))},onSubmit:n,onBack:o});case S.a.InsuranceDetailsReview:return(0,s.jsx)(u.b,{configuration:{contentResources:y[x.J.InsuranceDetailsReview],fields:_[x.J.InsuranceDetailsReview]},onSubmit:n,loading:a.matches({[S.a.InsuranceDetailsReview]:S.a.Submitting}),hasError:a.matches({[S.a.InsuranceDetailsReview]:S.a.Error}),defaultValues:a.context.formData});case S.a.ApplicationComplete:return(0,s.jsx)(h.J,{...y[x.J.ApplicationComplete],email:a.context.formData.email});case S.a.ApplicationReview:return(0,s.jsx)(m.G,{...y[x.J.ApplicationReview]});case S.a.ApplicationDetected:return(0,s.jsx)(V.v,{...y[x.J.ApplicationDetected],email:a.context.formData.email});default:return null}},[r,a]);return t({header:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(p.Flex,{gap:"spacer-5",alignItems:"center",children:[(0,s.jsx)(J.E,{partner:w.kT.Flyte}),(0,s.jsx)(p.Divider,{orientation:"vertical",alignSelf:"stretch",height:"auto"}),(0,s.jsx)(J.E,{partner:K})]}),(0,s.jsx)(H.K,{currentStep:r})]}),body:g(),currentWorkFlowStep:r})}},97213:function(e,t,a){a.d(t,{T:function(){return o}});var i=a(85893),r=a(71986),n=a(93773);let o={[n.J.OnboardingChecklist]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsxs)(r.TextPairing.Label,{color:"text-primary",children:["Welcome to"," ",(0,i.jsx)(r.Text,{as:"span",variant:"text-header-2XL",color:"text-secondary-negative",children:"FlyteHealth!"})]}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"Before we can connect you to your care team, you'll need to:"})]}),checklist:(0,i.jsxs)(r.Flex,{gap:"spacer-9",pb:{base:"spacer-24",lg:0},flexDirection:"column",children:[(0,i.jsxs)(r.Flex,{direction:"row",gap:"spacer-2",children:[(0,i.jsx)(r.IconCircle1,{color:"text-secondary",size:"l"}),(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-M",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-primary",children:"Complete Care Agreements"}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"These allow us to provide care for you"})]})]}),(0,i.jsxs)(r.Flex,{direction:"row",gap:"spacer-2",children:[(0,i.jsx)(r.IconCircle2,{color:"text-secondary",size:"l"}),(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-M",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-primary",children:"Create a Password"}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"So you can log into FlyteHealth and get support along the way."})]})]}),(0,i.jsxs)(r.Flex,{direction:"row",gap:"spacer-2",children:[(0,i.jsx)(r.IconCircle3,{color:"text-secondary",size:"l"}),(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-M",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-primary",children:"Download the App"}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"The patient app helps you prepare for your first visit with a FlyteHealth provider. Log into FlyteHealth and get support along the way."})]})]})]})},[n.J.CreatePassword]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsxs)(r.TextPairing.Label,{color:"text-primary",children:["Create a"," ",(0,i.jsxs)(r.Text,{as:"span",variant:"text-header-2XL",color:"text-secondary-negative",children:["password"," "]}),"for your account"]}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"Once created, you will use your email and this password to log into the FlyteHealth mobile app."})]})},[n.J.AppDownload]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsxs)(r.TextPairing.Label,{color:"text-primary",children:["Download the"," ",(0,i.jsxs)(r.Text,{as:"span",color:"text-secondary-negative",variant:"text-header-2XL",children:["FlyteHealth"," "]}),"patient app"]}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"Now that your account is ready, use it to log into the patient app and complete the checklist so you can schedule your first visit."})]}),checklist:(0,i.jsxs)(r.Flex,{gap:"spacer-6",pb:{base:"spacer-24",lg:0},flexDirection:"column",children:[(0,i.jsxs)(r.Flex,{direction:"row",gap:"spacer-2",children:[(0,i.jsx)(r.IconCircle1,{color:"text-secondary",size:"l"}),(0,i.jsx)(r.Text,{variant:"text-body-regular",color:"text-secondary",children:"Open the camera app on your phone"})]}),(0,i.jsxs)(r.Flex,{direction:"row",gap:"spacer-2",children:[(0,i.jsx)(r.IconCircle2,{color:"text-secondary",size:"l"}),(0,i.jsx)(r.Text,{variant:"text-body-regular",color:"text-secondary",children:"Scan the QR Code below"})]}),(0,i.jsxs)(r.Flex,{direction:"row",gap:"spacer-2",children:[(0,i.jsx)(r.IconCircle3,{color:"text-secondary",size:"l"}),(0,i.jsx)(r.Text,{variant:"text-body-regular",color:"text-secondary",children:"Follow the steps on your phone to download the app"})]})]})},[n.J.ReviewConsents]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-primary",children:"Agree to Receive Care "}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"To begin your health journey, review the following documents."})]})}}},52902:function(e,t,a){a.d(t,{k:function(){return c},l:function(){return l}});var i=a(51247),r=a(62256),n=a(46915);let o=new i.c({credentials:{accessKeyId:"AKIAXJH6Z5MSDJQJQGF7",secretAccessKey:"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"},region:"us-east-1"}),s=r.QJ.from(o),l=r.m1.from(o),c=(0,n.LO)(s,{tableName:"prod_green-knight-authjs"})},60126:function(e,t,a){a.d(t,{BC:function(){return s},GH:function(){return n},KY:function(){return o},Uy:function(){return r},m7:function(){return i}});let i=200,r=400,n=401,o=409,s=500},42575:function(e,t,a){a.d(t,{d:function(){return useIsMobile}});var i=a(71986);let useIsMobile=()=>{let e=(0,i.useBreakpointValue)({base:!0,lg:!1},{ssr:!1});return e}},67989:function(e,t,a){a.d(t,{R:function(){return useWorkflowTracker}});var i=a(67294),r=a(3183),n=a(95875);let useWorkflowTracker=(e,t)=>{let{track:a}=(0,r.useAnalytics)(),o=(0,i.useRef)(null);(0,i.useEffect)(()=>{o.current!==e&&(a(n.U[e],{partner:t}),o.current=e)},[e,a])}},56590:function(e,t,a){a.d(t,{L:function(){return o}});var i=a(62842),r=a.n(i),n=a(52902);let o={providers:[],adapter:n.k,session:{strategy:"database",maxAge:2592e3},callbacks:{async session(e){let{session:t,user:a}=e;return t.user&&(t.user.id=a.id,t.user.contactId=a.contactId||null),t}},secret:"Z5tgwaJFqR",debug:!1};r()(o)},97620:function(e,t,a){a.d(t,{Q1:function(){return r},Er:function(){return n},qK:function(){return l},kS:function(){return c},aU:function(){return s},KG:function(){return o}});var i=a(10265);let r={[i.kT.Aetna]:"State of Connecticut - Retirees",[i.kT.CareCompass]:"State of Connecticut - Employees",[i.kT.PequotHealthCare]:"PEQUOT - EMPLOYEES",[i.kT.DGA]:"DIRECTORS GUILD OF AMERICA - EMPLOYEES"},n={[i.kT.Aetna]:"Aetna",[i.kT.CareCompass]:"Anthem",[i.kT.PequotHealthCare]:"PEQUOT",[i.kT.DGA]:"DIRECTORS GUILD OF AMERICA"},o={[i.kT.Aetna]:"Aetna",[i.kT.CareCompass]:"SoCT",[i.kT.PequotHealthCare]:"Pequot Healthcare",[i.kT.DGA]:"DGA Health Plan",[i.kT.ChristianaCare]:"Highmark"},s={[i.kT.Flyte]:"Flyte Direct",[i.kT.CareCompass]:"State of Connecticut (Flyte)",[i.kT.Aetna]:"State of Connecticut Retirees (Flyte)",[i.kT.RiverSpringLiving]:"RiverSpring Living (Flyte)",[i.kT.PequotHealthCare]:"Pequot Tribal Family Health Plan (Flyte)",[i.kT.PyleFamilyInsurance]:"A. Duie Pyle (Flyte)",[i.kT.DGA]:"Director Guild of America (Flyte)",[i.kT.MDSave]:"MDsave (Flyte)",[i.kT.ChristianaCare]:"ChristianaCare - Caregivers (Flyte)"},l={[i.PF["1199SEIU"]]:"00634",[i.PF.BCBS]:"S001",[i.PF.BCBSPPO]:"S001",[i.PF.Aetna]:"00001",[i.PF.Cigna]:"00004",[i.PF.United]:"00192",[i.PF.Anthem]:"S001",[i.PF["Pequot HealthCare"]]:"00192",[i.PF["Aetna Medicare"]]:"00001",[i.PF.Highmark]:"01015"},c={[i.kT.Flyte]:"0014U00003DawbO",[i.kT.CareCompass]:"0014U000034qD18",[i.kT.Aetna]:"0014U00003LU03D",[i.kT.RiverSpringLiving]:"0014U00002tQPkK",[i.kT.PequotHealthCare]:"0014U00003DCPzp",[i.kT.PyleFamilyInsurance]:"0014U00002ngNsZ",[i.kT.DGA]:"001VY000006lyba",[i.kT.MDSave]:"001VY00000CYbSs",[i.kT.ChristianaCare]:"001VY00000AE6Ny"}},61741:function(e,t,a){a.d(t,{Q:function(){return isApplicationDetected}});var i=a(60126);let isApplicationDetected=e=>{var t,a;let{event:r}=e;return(null==r?void 0:null===(a=r.error)||void 0===a?void 0:null===(t=a.response)||void 0===t?void 0:t.status)===i.KY}},98491:function(e,t,a){a.d(t,{a:function(){return o}});var i,r,n=a(93773);(i=r||(r={})).Idle="idle",i.Submitting="submitting",i.Error="error",i.Success="success";let o={...n.J,...r}},3938:function(e,t,a){var i,r,n,o;a.d(t,{V:function(){return r},_:function(){return i}}),(n=i||(i={})).FULL_MATCH="FULL_MATCH",n.EXPIRED="EXPIRED",n.PERSON_MATCH="PERSON_MATCH",n.INSURANCE_MATCH="INSURANCE_MATCH",n.NOT_FOUND="NOT_FOUND",n.ELIGIBLE_MATCH="ELIGIBLE_MATCH",(o=r||(r={})).Evolve="Evolve",o.Pverify="Pverify"},10265:function(e,t,a){a.d(t,{JJ:function(){return n.J},PF:function(){return r.PF},Vn:function(){return i.V},_q:function(){return i._},bV:function(){return r.bV},ib:function(){return r.ib},kT:function(){return r.kT},rl:function(){return r.rl}});var i=a(3938),r=a(15615),n=a(93773)},15615:function(e,t,a){var i,r,n,o,s,l,c,d,u,h,m,p,g,x;a.d(t,{PF:function(){return l},bV:function(){return n},eF:function(){return s},i$:function(){return o},ib:function(){return i},kT:function(){return c},rl:function(){return r}}),(d=i||(i={})).Insurance="Insurance",d.CashPay="Cash Pay",d.BMI="BMI",d.Expired="Expired",(u=r||(r={})).EligibleWaiting="Eligible Waiting",u.Ineligible="Ineligible",u.Review="Review",(h=n||(n={})).SIA="SIA Medical PC",h.Flyte="Flyte Medical PC",h["State of Connecticut"]="State of Connecticut",h["State of Connecticut Retirees"]="State of Connecticut Retirees",h["RiverSpring Living - Self Guided"]="RiverSpring Living - Self Guided",h["RiverSpring Living - Guided"]="RiverSpring Living - Guided",h["Pequot Tribal Family Health Plan"]="Pequot Tribal Family Health Plan",h["A Duie Pyle"]="A Duie Pyle",h["Directors Guild of America – Producer Health Plan"]="Directors Guild of America – Producer Health Plan",h.MDsave="MDsave",h["ChristianaCare - Caregivers"]="ChristianaCare - Caregivers",(m=o||(o={})).Alabama="AL",m.Alaska="AK",m.Arizona="AZ",m.Arkansas="AR",m.California="CA",m.Colorado="CO",m.Connecticut="CT",m.Delaware="DE",m.Florida="FL",m.Georgia="GA",m.Hawaii="HI",m.Idaho="ID",m.Illinois="IL",m.Indiana="IN",m.Iowa="IA",m.Kansas="KS",m.Kentucky="KY",m.Louisiana="LA",m.Maine="ME",m.Maryland="MD",m.Massachusetts="MA",m.Michigan="MI",m.Minnesota="MN",m.Mississippi="MS",m.Missouri="MO",m.Montana="MT",m.Nebraska="NE",m.Nevada="NV",m["New Hampshire"]="NH",m["New Jersey"]="NJ",m["New Mexico"]="NM",m["New York"]="NY",m["North Carolina"]="NC",m["North Dakota"]="ND",m.Ohio="OH",m.Oklahoma="OK",m.Oregon="OR",m.Pennsylvania="PA",m["Rhode Island"]="RI",m["South Carolina"]="SC",m["South Dakota"]="SD",m.Tennessee="TN",m.Texas="TX",m.Utah="UT",m.Vermont="VT",m.Virginia="VA",m.Washington="WA",m["Washington D.C."]="DC",m["West Virginia"]="WV",m.Wisconsin="WI",m.Wyoming="WY",(p=s||(s={})).Insured="yes",p.SelfPay="no",(g=l||(l={}))["1199SEIU"]="1199SEIU",g.Aetna="Aetna",g.Anthem="Anthem",g.Cigna="Cigna",g.BCBS="BCBS",g.BCBSPPO="BCBS Bluecard - PPO Briefcase",g.United="United",g.Other="Other",g.SelfPay="Self-Pay",g["Pequot HealthCare"]="Pequot HealthCare",g["Aetna Medicare"]="Aetna Medicare",g.Highmark="Highmark",(x=c||(c={})).Flyte="flyte",x.CareCompass="careCompass",x.PequotHealthCare="pequotHealthCare",x.RiverSpringLiving="riverSpringLiving",x.PyleFamilyInsurance="pyleFamilyInsurance",x.Aetna="aetna",x.DGA="dga",x.MDSave="mdSave",x.ChristianaCare="christianaCare"},93773:function(e,t,a){var i,r;a.d(t,{J:function(){return i}}),(r=i||(i={})).WorkflowSelector="workflowSelector",r.PreEligibility="preEligibility",r.ContactDetails="contactDetails",r.InsuranceDetails="insuranceDetails",r.InsuranceDetailsReview="insuranceDetailsReview",r.ApplicationReview="applicationReview",r.ApplicationComplete="applicationComplete",r.ApplicationDetected="applicationDetected",r.EligibilityUnmet="eligibilityUnmet",r.EmailVerification="emailVerification",r.OnboardingChecklist="onboardingChecklist",r.CreatePassword="createPassword",r.AppDownload="appDownload",r.ReviewConsents="reviewConsents"},48527:function(e,t,a){a.d(t,{F:function(){return calculateAge}});let calculateAge=e=>{let t=new Date,a=new Date(e),i=t.getFullYear()-a.getFullYear(),r=t.getMonth()-a.getMonth();return(r<0||0===r&&t.getDate(){let{heightFeet:t,heightInches:a,weightPounds:r}=e;if(t<0||a<0||r<=0)throw new i.WB("Negative values are not allowed.");let n=12*t+a;return r/(n*n)*703}},47209:function(e,t,a){a.d(t,{T:function(){return checkFieldErrors}});let checkFieldErrors=(e,t,a)=>{if(!t[e])return!1;let i=Array.isArray(a)?a:[a];return i.some(a=>{var i;return(null===(i=t[e])||void 0===i?void 0:i.type)===a})}},75887:function(e,t,a){a.d(t,{P:function(){return o}});var i=a(76089),r=a(15615),n=a(52766);let o={[r.kT.Flyte]:e=>{let{bmi:t,comorbidity:a}=e;return t>=30||t>=27&&a===i.IQ.Yes},[r.kT.CareCompass]:e=>{let{birthdate:t,bmi:a,comorbidity:r}=e,o=(0,n.Fw)(t);return o>=18&&(a>=30||a>=27&&r===i.IQ.Yes)},[r.kT.Aetna]:e=>{let{birthdate:t,bmi:a,comorbidity:r}=e,o=(0,n.Fw)(t);return o>=18&&(a>=30||a>=27&&r===i.IQ.Yes)},[r.kT.RiverSpringLiving]:e=>{let{bmi:t,comorbidity:a}=e;return t>=30||t>=27&&a===i.IQ.Yes},[r.kT.PequotHealthCare]:e=>{let{bmi:t,comorbidity:a}=e;return t>=35||a===i.IQ.Yes},[r.kT.PyleFamilyInsurance]:e=>{let{bmi:t}=e;return t>=30},[r.kT.DGA]:e=>{let{bmi:t,comorbidity:a}=e;return t>=30||t>=27&&a===i.IQ.Yes},[r.kT.MDSave]:e=>{let{bmi:t,comorbidity:a}=e;return t>=30||t>=27&&a===i.IQ.Yes},[r.kT.ChristianaCare]:e=>{let{birthdate:t,bmi:a,comorbidity:r}=e,o=(0,n.Fw)(t);return o>=18&&(a>=30||a>=27&&r===i.IQ.Yes)}}},29262:function(e,t,a){a.d(t,{f:function(){return convertDateToISO}});var i=a(97630);let convertDateToISO=e=>{let t=e.match(/^(\d{2})[-\/](\d{2})[-\/](\d{4})$/);if(t)return"".concat(t[3],"-").concat(t[1],"-").concat(t[2]);throw new i.q7("convertDateToISO was given an invalid date format, expected MM/DD/YYYY")}},17156:function(e,t,a){a.d(t,{s:function(){return CustomError}});let CustomError=class CustomError extends Error{constructor(e,t,a){super(e),this.message=e,this.code=t,this.status=a,this.name=this.constructor.name,Object.setPrototypeOf(this,new.target.prototype)}}},58266:function(e,t,a){a.d(t,{oY:function(){return BadRequestError},AY:function(){return ConflictError},yj:function(){return UnauthorizedError},OI:function(){return getErrorResponse}});var i=a(60126),r=a(17156);let PasswordPwnedError=class PasswordPwnedError extends r.s{constructor(e="The password you entered has been found in a data breach. Please choose a different password."){super(e,"PASSWORD_PWNED",i.Uy)}};function isPasswordPwnedError(e){return"object"==typeof e&&null!==e&&"message"in e&&"string"==typeof e.message&&"passwordPWNED"===e.message}let UnauthorizedError=class UnauthorizedError extends r.s{constructor(e="Unauthorized: No valid session found."){super(e,"UNAUTHORIZED",i.GH)}};let ConflictError=class ConflictError extends r.s{constructor(e="Conflict: A resource already exists."){super(e,"CONFLICT",i.KY)}};let BadRequestError=class BadRequestError extends r.s{constructor(e="Bad Request: Invalid input."){super(e,"BAD_REQUEST",i.Uy)}};let UnknownError=class UnknownError extends r.s{constructor(e="An unknown error occurred"){super(e,"UNKNOWN_ERROR",i.BC)}};function getErrorResponse(e){let t=parseCustomError(e)||parseAxiosError(e)||parseUnknownError(e);return{code:t.code,message:t.message,status:t.status||i.BC}}function parseCustomError(e){return e instanceof r.s?e:null}function parseAxiosError(e){if((null==e?void 0:e.isAxiosError)&&(null==e?void 0:e.response)){var t;let a=e.response.status||i.BC,n=(null===(t=e.response.data)||void 0===t?void 0:t.message)||e.message;if(isPasswordPwnedError(e.response.data))return new PasswordPwnedError;switch(a){case i.GH:return new UnauthorizedError;case i.KY:return new ConflictError;case i.Uy:return new BadRequestError;default:return new r.s(n,"AXIOS_ERROR",a)}}return null}function parseUnknownError(e){let t=e instanceof Error?e.message:"An unknown error occurred";return new UnknownError(t)}},97630:function(e,t,a){a.d(t,{WB:function(){return InvalidInputError},q7:function(){return InvalidDateFormatError},v0:function(){return MissingParameterError}});var i=a(17156);let InvalidInputError=class InvalidInputError extends i.s{constructor(e){super(e,"INVALID_INPUT")}};let InvalidDateFormatError=class InvalidDateFormatError extends i.s{constructor(e){super(e,"INVALID_DATE_FORMAT")}};let MissingParameterError=class MissingParameterError extends i.s{constructor(e){super("".concat(e," is required"),"MISSING_PARAMETER")}}},40188:function(e,t,a){a.d(t,{M:function(){return extractNumericValue}});let extractNumericValue=e=>{let t=null==e?void 0:e.match(/\d+(\.\d+)?/);return t?parseFloat(t[0]):null}},90420:function(e,t,a){a.d(t,{k:function(){return getParentStateValue}});let getParentStateValue=e=>"string"==typeof e?e:Object.keys(e)[0]},42881:function(e,t,a){a.d(t,{G:function(){return getSession}});var i=a(58266),r=a(21379),n=a(56590);let getSession=async(e,t)=>{var a,o;let s=await (0,r.getServerSession)(e,t,n.L);if(!s||!(null===(a=s.user)||void 0===a?void 0:a.email)||!(null===(o=s.user)||void 0===o?void 0:o.contactId))throw new i.yj;return{email:s.user.email,contactId:s.user.contactId}}},52766:function(e,t,a){a.d(t,{Fw:function(){return i.F},V2:function(){return r.V},Pq:function(){return n.P},f1:function(){return o.f},MC:function(){return s.M}});var i=a(48527),r=a(59893),n=a(75887),o=a(29262),s=a(40188);a(42881)},67063:function(e,t,a){a.d(t,{D:function(){return normalizeBenefitsCheck}});let normalizeBenefitsCheck=e=>({pvRequestID:e.checkId,pvStartDateOfService:e.startDateOfService,pvEndDateOfService:e.endDateOfService,pvPayerName:e.payer.payerName,pvSubscriberFullName:e.patient.fullName,pvMemberID:e.patient.memberId,pvEffectiveDate:e.coverage.effectiveDate,pvExpiryDate:e.coverage.expiryDate,pvStatus:e.coverage.status,pvPolicyType:e.coverage.policyType,pvGroupNumber:e.coverage.groupNumber,pvPlanName:e.coverage.planName,pvPlanNumber:e.coverage.planNumber,pvErrorDescription:e.errorDescription,pvEligibilityResult:e.eligibilityResult,pvDetailsURL:e.detailsUrl})},81058:function(e,t,a){a.d(t,{X:function(){return normalizePhoneNumber}});var i=a(18398);let normalizePhoneNumber=e=>{let t=(0,i.h)(e,"US");return t.nationalNumber}}}]);