1var Ue=Object.defineProperty,ze=Object.defineProperties;var Pe=Object.getOwnPropertyDescriptors;var ue=Object.getOwnPropertySymbols;var Ge=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable;var ge=(o,a,n)=>a in o?Ue(o,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[a]=n,z=(o,a)=>{for(var n in a||(a={}))Ge.call(a,n)&&ge(o,n,a[n]);if(ue)for(var n of ue(a))Ye.call(a,n)&&ge(o,n,a[n]);return o},P=(o,a)=>ze(o,Pe(a));var fe=(o,a,n)=>new Promise((y,t)=>{var x=f=>{try{T(n.next(f))}catch(V){t(V)}},g=f=>{try{T(n.throw(f))}catch(V){t(V)}},T=f=>f.done?y(f.value):Promise.resolve(f.value).then(x,g);T((n=n.apply(o,a)).next())});import{m as we,E as Te,j as e,M as i,T as C,q as je,K as Qe,a3 as qe,ag as Ce,a2 as Se,N as J}from"./vendor-mui-BGS3mHwM.js";import{r as l,u as $e,j as Je}from"./vendor-redux-FtDGt7Mz.js";import{jM as Ke,gK as Xe,gM as Ie,pU as Ze,c0 as Q,bw as q,v as Ae,s as es,d as ss,oW as ts,d6 as ns,A as is,c8 as os,pV as as,bY as ye,dX as rs,dS as cs,p5 as G,p6 as Y,p7 as _,p8 as M,pW as ds,pX as ps,Q as ls,nD as xs,f as hs,pY as ms}from"./index-D5apbUK-.js";import{d as us}from"./index-D8v8Urgc.js";import{P as gs,I as fs,R as js,T as Cs,H as Ss,D as Is,B as ys,S as Vs}from"./index-DPsj9Qf3.js";import{u as ve}from"./vendor-react-CUpnpRPD.js";import{B as ws}from"./BannersCards-Briiwrim.js";import{B as Ts}from"./enum-BI9DAnD2.js";import"./vendor-stream-CynyArsg.js";import"./vendor-pdf-Ddbn4B6C.js";import"./vendor-graphql-CuoeCPzn.js";import"./vendor-media-BEZy7yMd.js";import"./vendor-radix-NiTG7895.js";import"./vendor-mui-pickers-BdXKbjEa.js";import"./vendor-forms-BcpGzS3-.js";import"./index-_AhaXIr4.js";import"./index-AL27mQ15.js";import"./slider-5sduuYxH.js";import"./arrowNext-CF_cyRUy.js";import"./index-CdaXMd8H.js";import"./infoIconPurple-Dovs9vaw.js";const As="/assets/vaccineImage-x6Ai4rE8.png",$="/assets/vaccineImage2-M0GeMGF2.png",vs="/assets/vaccine--hJqlJ38.png",Es="/assets/BookVaccineThanks-BSMO_3-x.png",Ee=({setShowVaccineForm:o})=>{const a=we(),n=Te(a.breakpoints.up("md")),[y,t]=l.useState({isLoading:!1,isSuccess:!1,isError:!1}),{data:x}=Ke(),[g]=us(),[T,f]=l.useState(!0),{isLoading:V}=y,[b,O]=l.useState(""),W=B=>fe(void 0,null,function*(){var I,k,m;Q(q.CORONA_VACCINE_REQUESTED_NOW,{}),B.preventDefault(),t({isLoading:!0,isSuccess:!1,isError:!1});const F={consumerType:"USER",consumerId:(I=x==null?void 0:x.data)==null?void 0:I.id,placeOfOrder:"BLR",orderType:Ae,itemValue:1,billingAddressId:-1,shippingAddressId:-1};try{const c=yield g(F);if(((k=c==null?void 0:c.data)==null?void 0:k.status)==="success"&&(t({isLoading:!1,isSuccess:!0,isError:!0}),f(!1)),c!=null&&c.error)throw c==null?void 0:c.error}catch(c){t({isLoading:!1,isSuccess:!1,isError:!0}),O((m=c==null?void 0:c.data)==null?void 0:m.message)}});return e.jsxs(e.Fragment,{children:[T?e.jsxs(e.Fragment,{children:[b&&e.jsx(Xe,{children:b}),e.jsxs(i,{sx:{height:n?"normal":"100vh"},children:[e.jsxs(i,{display:"flex",gap:"12px",alignItems:"center",padding:"0 22px",children:[!n&&e.jsx(i,{component:"img",onClick:()=>o(!1),src:Ie,alt:"arrow-left"}),e.jsx(C,{fontWeight:"700",fontSize:"18px",padding:"24px 0",color:n?"#1F2584":"inherit",children:"Vaccination"})]}),e.jsxs(i,{children:[e.jsxs(i,{display:"flex",flexDirection:"column",gap:"18px",children:[e.jsx(i,{component:"img",src:Ze,padding:"53px 45px"}),e.jsxs(i,{width:"75%",height:"87px",textAlign:"center",margin:"auto",children:[e.jsx(C,{fontSize:"20px",children:"Book your vaccination appointment through your"}),e.jsx(C,{color:"#3E49F4",fontWeight:"700",fontSize:"20px",children:"Personal Concierge"})]})]}),e.jsx(i,{padding:"0 22px",children:e.jsx(je,{color:"greenButton",variant:"contained",sx:{width:"100%",padding:"15px",margin:"36px 0",fontWeight:"700",fontSize:n?"18px":"16px"},onClick:W,children:V?"Processing...":"Request Now"})}),e.jsxs(i,{width:"50%",margin:"auto",textAlign:"center",color:"#333",children:[e.jsx(C,{fontWeight:"700",fontSize:"12px",lineHeight:"20px",children:"Our working hours are from 10:00 am to 6:00 pm on all days."}),e.jsx(C,{fontWeight:"500",fontSize:"12px",lineHeight:"20px",children:"Requests received after 6:00 pm will be confirmed the next day."})]})]})]})]}):e.jsxs(i,{sx:{height:n?"normal":"100vh"},display:"flex",flexDirection:"column",justifyContent:"space-between",children:[e.jsxs(i,{children:[e.jsxs(i,{display:"flex",gap:"12px",alignItems:"center",padding:"0 22px",children:[!n&&e.jsx(i,{component:"img",onClick:()=>f(!0),src:Ie,alt:"arrow-left"}),e.jsx(C,{fontWeight:"700",fontSize:"18px",padding:"24px 0",color:n?"#1F2584":"inherit",children:"Vaccination"})]}),e.jsx(i,{component:"img",src:Es,padding:"60px 120px"}),e.jsxs(i,{width:"309px",height:"177px",textAlign:"left",padding:"0 33px",children:[e.jsx(C,{fontSize:"24px",fontWeight:"700",children:"Thanks"}
1),e.jsx(C,{marginBottom:"16px",children:"We have received your request for vaccination."}),e.jsx(C,{children:"Your personal concierge will get in touch with you shortly."})]})]}),e.jsx(i,{padding:"0 22px",children:e.jsx(je,{color:"greenButton",variant:"contained",sx:{width:"100%",padding:"15px",fontWeight:"700",fontSize:n?"18px":"16px"},href:"/",children:"Go to Home Page"})})]}),";"]})};Ee.propTypes={setShowVaccineForm:Qe.func.isRequired};const Ns=({title:o,img:a,subText:n,handleClick:y})=>e.jsxs(i,{children:[e.jsx(C,{variant:"2xl.bold",padding:"1rem 0",component:"div",children:o}),e.jsxs(i,{display:"flex",margin:"auto",width:{xs:"100%",md:"433px"},sx:{boxShadow:"0px 1px 4px rgba(0, 0, 0, 0.25)",borderRadius:"8px",cursor:"pointer"},boxSizing:"border-box",height:"10rem",onClick:y,children:[e.jsx(i,{children:e.jsx(i,{component:"img",src:a,height:"10rem",alt:`vaccine-${o}`})}),e.jsx(i,{display:"flex",justifyContent:"center",alignItems:"center",padding:"32px",boxSizing:"border-box",children:e.jsx(C,{variant:"lg.bold",children:n})})]})]},o),bs={ADULT_VACCINATION:$,CHILD_VACCINATION:As,COVID_VACCINATION:$},ks=({vaccineTypesList:o,handleClick:a,setVaccineName:n})=>{const y=t=>{var x,g;n(((x=t==null?void 0:t.metadata)==null?void 0:x.name)||(t==null?void 0:t.name)),a(t.immunisationCategory,t.id,((g=t==null?void 0:t.metadata)==null?void 0:g.name)||(t==null?void 0:t.name))};return e.jsx(i,{display:"flex",gap:"24px",flexDirection:{xs:"column",md:"row"},flexWrap:"wrap",children:o==null?void 0:o.map(t=>{var x,g;return e.jsx(Ns,{title:((x=t==null?void 0:t.metadata)==null?void 0:x.name)||(t==null?void 0:t.name),img:bs[t==null?void 0:t.cardIdentifier]||(t==null?void 0:t.img)||$,subText:((g=t==null?void 0:t.metadata)==null?void 0:g.detail)||(t==null?void 0:t.detail),handleClick:()=>y(t)},`vaccine-type-card-${t==null?void 0:t.id}-${Math.random()*1.7}`)})})},Ds="/assets/injection-CW_NAG9i.png",_s=()=>{const o=ve(),a="/vaccine/how-it-works-vaccine",n=()=>{o(a)};return e.jsxs(gs,{children:[e.jsx(fs,{alt:"injection",src:Ds}),e.jsxs(js,{children:[e.jsxs(Cs,{children:[e.jsx(Ss,{children:"Pay with benefits for vaccinations booked directly at the clinic"}),e.jsx(Is,{children:"Book at your selected centre and pay using benefits."})]}),e.jsx(ys,{onClick:()=>n(),variant:"contained",color:"primary",children:"How It Works"})]})]})},Ms=J(i)` 2 max-width: 1380px; 3 display: flex; 4 justify-content: flex-end; 5 width: 100%; 6 margin: auto; 7`,Os=J(i)` 8 ${ls} { 9 display: flex; 10 justify-content: flex-end; 11 margin: 0 auto; 12 } 13`,Ve=J("div")(({width:o})=>({width:o||"none",padding:"16px",backgroundColor:"#fff",borderRadius:"8px",border:"1px solid #C0C6D4"})),it=()=>{var oe,ae,re,ce,de,pe,le,xe,he;const o=we(),a=Te(o.breakpoints.up("md")),n=$e(),y=ve(),t=Je(es),[x,g]=l.useState(!1),[T,f]=l.useState(""),[V,b]=l.useState(""),[O,W]=l.useState(""),[B,F]=l.useState(!1),[I,k]=l.useState(),[m,c]=l.useState(0),[R,K]=l.useState([]),[Ne,be]=l.useState(),[v,ke]=l.useState({type:"",name:""}),[De,L]=l.useState(!1),{data:E,isFetching:X,isSuccess:Z}=ss({skip:!x}),{data:d,isSuccess:N,isFetching:D}=ts({userId:t,type:Ae},{skip:!t}),{data:H}=ns(null),ee=(re=(ae=(oe=H==null?void 0:H.data)==null?void 0:oe.config)==null?void 0:ae.vaccineSelfBookedFlow)==null?void 0:re.enabled;l.useEffect(()=>{N&&Q(q.VACCINE_HOMEPAGELOAD,{benefit_selected:m})},[N,m]);const u=(ce=d==null?void 0:d.data)==null?void 0:ce.map(s=>s==null?void 0:s.packageRes).filter(s=>s),se=s=>{var r;return s&&((r=s==null?void 0:s.slice())==null?void 0:r.sort((p,j)=>p.metadata.priority-j.metadata.priority))||[]},_e=()=>{var p,j;const s=((j=(p=d==null?void 0:d.data)==null?void 0:p.find(h=>{var A;return((A=h==null?void 0:h.packageRes)==null?void 0:A.id)===m}))==null?void 0:j.serviceCards)||[],r=se(s);k(r)},te=s=>s==null?void 0:s.map(r=>{var p;return P(z({},r),{immunisationCategory:(p=r==null?void 0:r.metadata)==null?void 0:p.type})}),Me=te(m===0?se((pe=(de=d==null?void 0:d.data)==null?void 0:de[0])==null?void 0:pe.serviceCards):I);l.useEffect(()=>{m&&_e()},[m,N,D]);const ne=(s,r)=>{n(ds({vaccineDetail:{category:s}})),b(s);const p=(S,w,U)=>P(z({},S),{isDisable:S.age<w||S.age>U}),j=(S,w)=>(S.isDisable?1:0)-(w.isDisable?1:0),h=(S,w)=>{var me;const U=(me=E==null?void 0:E.data)==null?void 0:me.map(He=>p(He,S,w)).sort(j);K(U)},A=I==null?void 0:I.some(S=>{var w;return((w=S==null?void 0:S.metadata)==null?void 0:w.name)===M});m===0||!A?(s===_&&h(0,17),s===G&&h(18,1/0)):(s===_&&r===M&&h(0,0),s===_&&r===ms&&h(1,17),s===G&&h(18,1/0)),(s===ps||(R==null?void 0:R.length)===0)&&K(E==null?void 0:E.data)},Oe=(s,r)=>{var p,j,h;return s===G?(p=Y)==null?void 0:p.ADULT:s===_&&r!==M?(j=Y)==null?void 0:j.CHILD:r===M?(h=Y)==null?void 0:h.INFANT:""},We={serviceTypes:(le=cs)==null?void 0:le.VACCINATION,vaccineImmunizationType:Oe(v==null?void 0:v.type,v==null?void 0:v.name)},Be=s=>{Q(q.VACCINE_TYPE_SELECTED,{type:s})},Fe=(s,r,p)=>{ke({type:s,name:p}),Be(s),ne(s,p),be(r),g(!x)};l.useEffect(()=>{Z&&!X&&ne(V)},[X,Z]),l.useEffect(()=>{var s,r,p,j,h,A;N&&!D&&((s=d==null?void 0:d.data)!=null&&s.length&&((p=(r=d==null?void 0:d.data)==null?void 0:r[0])!=null&&p.packageRes)?c((A=(h=(j=d==null?void 0:d.data)==null?void 0:j[0])==null?void 0:h.packageRes)==null?void 0:A.id):c(0))},[N,D]);const ie=s=>{y("/vaccine/listing",{state:{vaccineType:V,patientId:T||s,packageId:m,vaccinationTypeId:Ne,vaccineName:O}})},Re=s=>{f(s),n(hs({userId:s})),ee?L(!0):ie(s)},Le=s=>{n(xs(s)),ie()};return D?e.jsx(is,{}):e.jsxs(i,{children:[a&&e.jsx(Os,{bgcolor:"#f1f4ff",children:e.jsx(Ms,{children:e.jsxs(i,{sx:{display:"flex",justifyContent:"space-between",maxWidth:"1242px",width:"100%"},children:[e.jsxs(i,{sx:{margin:"102px 0"},width:"100%",children:[e.jsx(C,{variant:"main_heading",dangerouslySetInnerHTML:{__html:"Vaccinate & Secure Your Family </br> From Harmful & Unknown Deadly Diseases"}}),(u==null?void 0:u.length)>0&&e.jsx(qe,{fullWidth:!0,children:(u==null?void 0:u.length)>1?e.jsx(Ce,{value:m,id:"demo-simple-select",onChange:s=>c(s.target.value),sx:{width:"368px",bgcolor:"#fff",borderRadius:"8px","& .MuiSelect-select":{border:"none"}},children:u.map(s=>e.jsx(Se,{value:s==null?void 0:s.id,children:s==null?void 0:s.name},`${s==null?void 0:s.name}`))}):e.jsx(Ve,{width:"368px",children:(xe=u[0])==null?void 0:xe.name})})]}),e.jsx(i,{component:"img",src:vs,alt:"vaccine book"})]})})}),!a&&(u==null?void 0:u.length)>0&&e.jsx(i,{width:"100%",margin:"8px 0",padding:"0 16px",boxSizing:"border-box",children:u.length>1?e.jsx(Ce,{value:m,id:"demo-simple-select",onChange:s=>c(s.target.value),sx:{bgcolor:"#fff",borderRadius:"8px"},fullWidth:!0,children:u.map(s=>e.jsx(Se,{value:s==null?void 0:s.id,children:s==null?void 0:s.name},`${s==null?void 0:s.name}`))}):e.jsx(Ve,{children:(he=u[0])==null?void 0:he.name})}),e.jsx(ws,{position:Ts.VACCINATION_MIDDLE,sx:{padding:"24px"}}),e.jsxs(os,{children:[ee&&e.jsx(_s,{}
13),e.jsx(ks,{vaccineTypesList:Me,handleClick:Fe,setVaccineName:W}),(I==null?void 0:I.length)===0&&m!==0&&e.jsx(i,{display:"flex",justifyContent:"center",children:"Vaccine service not available"}),as]}),e.jsx(ye,{drawerStatus:De,drawerClose:L,children:e.jsx(Vs,{handleIsSelfBookingType:Le,handleDrawerClose:()=>L(!1)})}),e.jsx(rs,{open:x,handleDrawerClose:g,handleSelectedPatient:s=>Re(s),patientListingParams:We}),e.jsx(ye,{drawerStatus:B,drawerClose:F,children:e.jsx(Ee,{})})]})};export{it as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.