1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7492],{69349:function(){},49080:function(){},57588:function(){},3071:function(){},15232:function(){},85760:function(e,t,s){"use strict";var i=s(57437);s(54655);var l=s(9805),n=s(83523),a=s(2265);t.Z=e=>{let{onSelect:t,customStyle:s,selectedOption:o,options:r}=e,[d,c]=(0,a.useState)(!1),[x,m]=(0,a.useState)(!1),u=(0,a.useRef)(null),handleClickOutside=e=>{u.current&&!u.current.contains(e.target)&&(c(!1),m(!1))};(0,a.useEffect)(()=>(document.addEventListener("click",handleClickOutside),()=>{document.removeEventListener("click",handleClickOutside)}),[]);let handleOptionSelect=e=>{c(!1),t(e),m(!x)};return(0,i.jsxs)("div",{className:"relative inline-block z-10 text-left ".concat(s," mr-4 "),ref:u,children:[(0,i.jsx)("div",{children:(0,i.jsx)("div",{className:"rounded-md shadow-sm ",children:(0,i.jsxs)("button",{type:"button",onClick:()=>{c(!d),m(!x)},className:"inline-flex gap-3 relative w-full text-white ".concat(x?"ring-2 ring-[#79E51F]":"ring-2 ring-[#748A9A]"," items-center px-2 py-2 text-sm font-semibold min-w-[200px] justify-between rounded-full"),id:"options-menu","aria-haspopup":"true","aria-expanded":"true",children:[(0,i.jsxs)("span",{className:"font-semibold text-base whitespace-pre max-w-[300px] overflow-scroll no-scrollbar",children:[" ",o]}),(0,i.jsx)("span",{className:"".concat(d?"-rotate-180":"rotate-0"," transition duration-300"),children:(0,i.jsx)(n.Z,{className:"text-[#667085] "})})]})})}),(0,i.jsx)(l.u,{show:d,enter:"transition duration-300 ease-out ",enterFrom:"transform scale-95 opacity-0",enterTo:"transform scale-100 opacity-100",leave:"transition duration-300 ease-out",leaveFrom:"transform opacity-100",leaveTo:"transform scale-95 opacity-0",className:"",children:(0,i.jsx)("div",{className:"absolute left-0 mt-2 max-h-[300px] overflow-y-scroll no-scrollbar w-full rounded-2xl overflow-hidden shadow-lg bg-white ring-1 ring-black ring-opacity-5",role:"menu","aria-orientation":"vertical","aria-labelledby":"options-menu",children:(0,i.jsx)("div",{className:"flex flex-col ",role:"none",children:r.map((e,t)=>(0,i.jsx)("div",{className:"flex px-4 cursor-pointer hover:bg-[#f4fced] duration-300 p-2",onClick:()=>handleOptionSelect(e),children:(0,i.jsx)("div",{className:"text-[#344054] font-semibold text-base",children:e})},t))})})})]})}},15103:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return Home}});var i=s(57437),demoIcon=()=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:[(0,i.jsx)("path",{d:"M12 22.4449C17.5228 22.4449 22 17.9678 22 12.4449C22 6.9221 17.5228 2.44495 12 2.44495C6.47715 2.44495 2 6.9221 2 12.4449C2 17.9678 6.47715 22.4449 12 22.4449Z",stroke:"#ffffff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),(0,i.jsx)("path",{d:"M9.5 9.41028C9.5 8.93299 9.5 8.69435 9.59974 8.56112C9.68666 8.44502 9.81971 8.37238 9.96438 8.36205C10.1304 8.35019 10.3311 8.47924 10.7326 8.73734L15.4532 11.772C15.8016 11.996 15.9758 12.1079 16.0359 12.2503C16.0885 12.3748 16.0885 12.5151 16.0359 12.6396C15.9758 12.7819 15.8016 12.8939 15.4532 13.1179L10.7326 16.1526C10.3311 16.4107 10.1304 16.5397 9.96438 16.5278C9.81971 16.5175 9.68666 16.4449 9.59974 16.3288C9.5 16.1955 9.5 15.9569 9.5 15.4796V9.41028Z",stroke:"#ffffff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]});s(57170);var l=s(99538),n=s(94097),a=s(79721),o=s(62525),r=s(24033),d=s(2265),c=s(51872),x=s(12391),m=s(54655),u=s(16691),h=s.n(u),p=s(3485),f=s(85394),v=s(53714),g=s(28734),j=s(82549),b=s(58471),w=s(5491),C=s.n(w),y=s(72821),N=s(85760),A=s(63014),k=s(70221),S=s(68956),stetoscope=()=>(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"41",height:"42",viewBox:"0 0 41 42",fill:"none",children:(0,i.jsx)("path",{d:"M6.06615 8.81237L6.06615 18.2485C6.06615 26.0657 12.4032 32.4028 20.2204 32.4028M34.3746 8.81237L34.3746 18.2485C34.3746 26.0657 28.0375 32.4028 20.2204 32.4028M20.2204 32.4028L20.2204 37.1208M30.4429 4.09429C32.6143 4.09429 34.3746 5.85459 34.3746 8.02603L34.3746 11.1714C34.3746 13.3428 32.6143 15.1031 30.4429 15.1031C28.2715 15.1031 26.5112 13.3428 26.5112 11.1714L26.5112 8.02603C26.5112 5.85459 28.2715 4.09429 30.4429 4.09429ZM9.99788 4.09429C12.1693 4.09429 13.9296 5.85459 13.9296 8.02603L13.9296 11.1714C13.9296 13.3428 12.1693 15.1031 9.99788 15.1031C7.82645 15.1031 6.06615 13.3428 6.06615 11.1714L6.06615 8.02602C6.06615 5.85459 7.82645 4.09429 9.99788 4.09429Z",stroke:"#4CA30D","stroke-width":"3.37006","
1stroke-linecap":"round","stroke-linejoin":"round"})}),home_MedicalRecords=()=>(0,i.jsxs)("svg",{width:"40",height:"41",viewBox:"0 0 40 41",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("path",{d:"M31.8169 16.4655V11.5843C31.8169 10.7989 31.5049 10.0456 30.9496 9.49024L26.16 4.70063C25.6046 4.14526 24.8513 3.83325 24.0659 3.83325H11.3184C9.68287 3.83325 8.357 5.15912 8.357 6.79467V11.1905M31.8169 16.4655H21.8638C20.807 16.4655 19.8304 15.9024 19.3009 14.9879L17.9579 12.6682C17.4284 11.7536 16.4518 11.1905 15.395 11.1905H8.357M31.8169 16.4655H33.9917C35.6273 16.4655 36.9531 17.7914 36.9531 19.4269V34.0489C36.9531 35.6845 35.6273 37.0103 33.9917 37.0103H6.32103C4.68549 37.0103 3.35962 35.6845 3.35962 34.0489V14.1519C3.35962 12.5164 4.68549 11.1905 6.32103 11.1905H8.357M20.0176 21.9719V26.414V30.8561M15.5754 26.414H24.4597",stroke:"#4CA30D","stroke-width":"3.33333","stroke-linecap":"round","stroke-linejoin":"round"}),(0,i.jsx)("path",{d:"M31.8169 16.4655V11.5843C31.8169 10.7989 31.5049 10.0456 30.9496 9.49024L26.16 4.70063C25.6046 4.14526 24.8513 3.83325 24.0659 3.83325H11.3184C9.68287 3.83325 8.357 5.15912 8.357 6.79467V11.1905M31.8169 16.4655H21.8638C20.807 16.4655 19.8304 15.9024 19.3009 14.9879L17.9579 12.6682C17.4284 11.7536 16.4518 11.1905 15.395 11.1905H8.357M31.8169 16.4655H33.9917C35.6273 16.4655 36.9531 17.7914 36.9531 19.4269V34.0489C36.9531 35.6845 35.6273 37.0103 33.9917 37.0103H6.32103C4.68549 37.0103 3.35962 35.6845 3.35962 34.0489V14.1519C3.35962 12.5164 4.68549 11.1905 6.32103 11.1905H8.357M20.0176 21.9719V26.414V30.8561M15.5754 26.414H24.4597",stroke:"url(#paint0_linear_41_19056)","stroke-width":"3.33333","stroke-linecap":"round","stroke-linejoin":"round"}),(0,i.jsx)("defs",{children:(0,i.jsxs)("linearGradient",{id:"paint0_linear_41_19056",x1:"-10.4362",y1:"-4.52866",x2:"28.1755",y2:"49.0659",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{"stop-color":"#54C81A"}),(0,i.jsx)("stop",{offset:"1","stop-color":"#0A8E10"})]})})]}),M=s(61396),E=s.n(M);let D=[{id:1,count:"500K+",description:"Analyzable Symptoms",icon:(0,i.jsx)(stetoscope,{})},{id:2,count:"20K+",description:"Medication Database",icon:(0,i.jsx)(home_MedicalRecords,{})},{id:3,count:"1K+",description:"Detectable Conditions",icon:(0,i.jsx)(()=>(0,i.jsxs)("svg",{width:"41",height:"41",viewBox:"0 0 41 41",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("path",{d:"M24.9041 15.9163H14.8282M33.7006 17.9726V11.738C33.7006 8.90693 33.7006 7.49137 33.1496 6.41003C32.6649 5.45885 31.8916 4.68552 30.9404 4.20087C29.8591 3.6499 28.4435 3.6499 25.6124 3.6499H14.8282C11.9971 3.6499 10.5816 3.6499 9.50024 4.20087C8.54906 4.68552 7.77573 5.45885 7.29108 6.41003C6.74011 7.49137 6.74011 8.90693 6.74011 11.738V29.2623C6.74011 32.0934 6.74011 33.509 7.29108 34.5903C7.77573 35.5415 8.54906 36.3148 9.50024 36.7995C10.5816 37.3505 11.9971 37.3505 14.8282 37.3505H19.3778M37.0706 37.3505L34.5431 34.8229M19.8491 20.1289V10.8613M36.2281 30.6104C36.2281 33.8675 33.5877 36.508 30.3305 36.508C27.0734 36.508 24.4329 33.8675 24.4329 30.6104C24.4329 27.3532 27.0734 24.7128 30.3305 24.7128C33.5877 24.7128 36.2281 27.3532 36.2281 30.6104Z",stroke:"#4CA30D","stroke-width":"3.37006","stroke-linecap":"round","stroke-linejoin":"round"}),(0,i.jsx)("path",{d:"M24.9041 15.9163H14.8282M33.7006 17.9726V11.738C33.7006 8.90693 33.7006 7.49137 33.1496 6.41003C32.6649 5.45885 31.8916 4.68552 30.9404 4.20087C29.8591 3.6499 28.4435 3.6499 25.6124 3.6499H14.8282C11.9971 3.6499 10.5816 3.6499 9.50024 4.20087C8.54906 4.68552 7.77573 5.45885 7.29108 6.41003C6.74011 7.49137 6.74011 8.90693 6.74011 11.738V29.2623C6.74011 32.0934 6.74011 33.509 7.29108 34.5903C7.77573 35.5415 8.54906 36.3148 9.50024 36.7995C10.5816 37.3505 11.9971 37.3505 14.8282 37.3505H19.3778M37.0706 37.3505L34.5431 34.8229M19.8491 20.1289V10.8613M36.2281 30.6104C36.2281 33.8675 33.5877 36.508 30.3305 36.508C27.0734 36.508 24.4329 33.8675 24.4329 30.6104C24.4329 27.3532 27.0734 24.7128 30.3305 24.7128C33.5877 24.7128 36.2281 27.3532 36.2281 30.6104Z",stroke:"url(#paint0_linear_41_19046)","stroke-width":"3.37006","
1stroke-linecap":"round","stroke-linejoin":"round"}),(0,i.jsx)("defs",{children:(0,i.jsxs)("linearGradient",{id:"paint0_linear_41_19046",x1:"-5.71565",y1:"-4.84395",x2:"34.7368",y2:"45.0643",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{"stop-color":"#54C81A"}),(0,i.jsx)("stop",{offset:"1","stop-color":"#0A8E10"})]})})]}),{})},{id:4,count:"2K+",description:"Active Users",icon:(0,i.jsx)(()=>(0,i.jsxs)("svg",{width:"41",height:"41",viewBox:"0 0 41 41",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("path",{d:"M26.9605 6.12291C29.4573 7.36368 31.1731 9.94013 31.1731 12.9173C31.1731 15.8946 29.4573 18.471 26.9605 19.7118M30.3306 28.5315C32.8774 29.6839 35.1708 31.5622 37.0707 33.9802M3.37012 33.9802C6.65001 29.8057 11.103 27.2401 16.0078 27.2401C20.9126 27.2401 25.3656 29.8057 28.6455 33.9802M23.5905 12.9173C23.5905 17.1051 20.1956 20.5 16.0078 20.5C11.8201 20.5 8.4252 17.1051 8.4252 12.9173C8.4252 8.72957 11.8201 5.33472 16.0078 5.33472C20.1956 5.33472 23.5905 8.72957 23.5905 12.9173Z",stroke:"#4CA30D","stroke-width":"3.37","stroke-linecap":"round","stroke-linejoin":"round"}),(0,i.jsx)("path",{d:"M26.9605 6.12291C29.4573 7.36368 31.1731 9.94013 31.1731 12.9173C31.1731 15.8946 29.4573 18.471 26.9605 19.7118M30.3306 28.5315C32.8774 29.6839 35.1708 31.5622 37.0707 33.9802M3.37012 33.9802C6.65001 29.8057 11.103 27.2401 16.0078 27.2401C20.9126 27.2401 25.3656 29.8057 28.6455 33.9802M23.5905 12.9173C23.5905 17.1051 20.1956 20.5 16.0078 20.5C11.8201 20.5 8.4252 17.1051 8.4252 12.9173C8.4252 8.72957 11.8201 5.33472 16.0078 5.33472C20.1956 5.33472 23.5905 8.72957 23.5905 12.9173Z",stroke:"url(#paint0_linear_41_19104)","stroke-width":"3.37","stroke-linecap":"round","stroke-linejoin":"round"}),(0,i.jsx)("defs",{children:(0,i.jsxs)("linearGradient",{id:"paint0_linear_41_19104",x1:"-10.4696",y1:"-1.88506",x2:"21.0118",y2:"48.8865",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{"stop-color":"#54C81A"}),(0,i.jsx)("stop",{offset:"1","stop-color":"#0A8E10"})]})})]}),{})},{id:5,count:"500K+",description:"Analyzable Symptoms",icon:(0,i.jsx)(stetoscope,{})},{id:6,count:"20K+",description:"Medication Database",icon:(0,i.jsx)(home_MedicalRecords,{})}];var banner=()=>{let[e,t]=(0,d.useState)(""),[s,u]=(0,d.useState)(l.Z[0]),[h,f]=(0,d.useState)([]),[w,M]=(0,d.useState)(0),[F,I]=(0,d.useState)(""),[L,H]=(0,d.useState)(!1),P=(0,d.useRef)(null),[Z,_]=(0,d.useState)({}),{authUser:U,isLoading:T}=(0,x.a)(),O=(0,r.useRouter)(),V=(0,d.useRef)(null),[B,R]=(0,d.useState)(null),[G,W]=(0,d.useState)(m.Z);(0,d.useEffect)(()=>{var e,t,s,i,l;U&&("prod_Pjdv7YBrZUtcdT"===(null==U?void 0:null===(l=U.userSubscription)||void 0===l?void 0:null===(i=l.items)||void 0===i?void 0:null===(s=i[0])||void 0===s?void 0:null===(t=s.price)||void 0===t?void 0:null===(e=t.product)||void 0===e?void 0:e.id)?W(k.Z):W(m.Z))},[U]);let getChatCount=async()=>{if(null==U?void 0:U.email){let e=await (0,a.Ts)(null==U?void 0:U.uid);R((null==e?void 0:e.length)?null==e?void 0:e.length:0)}else{let e=await (0,a.P5)(null==U?void 0:U.uid);R((null==e?void 0:e.length)?null==e?void 0:e.length:0)}};(0,d.useLayoutEffect)(()=>{(null==U?void 0:U.uid)&&getChatCount()},[null==U?void 0:U.uid]);let handleClickOutside=e=>{V.current&&!V.current.contains(e.target)&&_({})};(0,d.useEffect)(()=>(document.addEventListener("click",handleClickOutside),()=>{document.removeEventListener("click",handleClickOutside)}),[]);let fileSubmit=async()=>{if(""==e){_({inputValue:!0});return}if(!(null==U?void 0:U.userSubscription)&&B>=5&&null!=B){A.Am.error("Your chat limit exceeded"),H(!1);return}if(!(null==U?void 0:U.email)&&0!=B&&null!=B){A.Am.error("Your chat limit exceeded please login for more chats"),H(!1);return}let t=(0,c.Z)();await submit(F,t);let i=y.Z.indexOf(s);O.push("/project?chatId=".concat(t,"&chronicId=").concat(i,"&systemId=").concat(w))},submit=async(t,i)=>{try{H(!0),I(i);let l={role:"user",content:[{type:"text",text:e,docType:"text"}]},r=null;if(h.length>0){let e=h.filter(e=>e.type.includes("image")),s=h.filter(e=>e.type.includes("pdf")),i=await (0,o.We)(e,t,"chatFiles");i.map(e=>{l.content.push({type:"image_url",image_url:{url:null==e?void 0:e.downloadUrl}})}),s.map(async e=>{let t=await C()(e).then(e=>e),s=(null==e?void 0:e.size)/1048576;l.content.push({type:"text",text:t,docType:"pdf",name:null==e?void 0:e.name,size:s})})}let d=U?{...U}:null;if(!d&&!(d=await (0,n.fK)())){console.log("Failed to log in user anonymously");return}let c=await getProjectTitle(e);await (0,a.eq)(i,{title:c,userId:d.uid}),r={role:"system",content:G[w].prompt(s)};let x=await getAssistantResponse(r?[r,l]:[l]);(0,a.mL)(i,r?[r,l,x]:[l,x]).then(()=>{H(!1)})}catch(e){console.log("chat submit err",e),H(!1)}},getProjectTitle=async e=>{let t=await fetch("/api/suggestTitle",{method:"POST",body:JSON.stringify({title:e}),headers:{Accept:"application/json","Content-Type":"application/json"}}),s=await t.json();if(t.ok&&"success"===s.status)return s.title;throw Error("An error while running AI model")},handleFileChange=async e=>{let t=[...h];t.push(e.target.files[0]),f(t)},removeSelectedFiles=e=>{let t=[...h];t.splice(e,1),f(t),P.current.value=""},getAssistantResponse=async e=>{let t=await fetch("/api/chatBot",{method:"POST",body:JSON.stringify({chatHistory:e}),headers:{Accept:"application/json","Content-Type":"application/json"}}),s=await t.json();if(t.ok&&"success"===s.status)return s.response.choices[0].message;throw Error("An error while running AI model")};return(0,i.jsxs)("div",{className:"py-28 bg-[#06070D] relative overflow-hidden",children:[(0,i.jsx)("div",{className:"bg-[url('/mainBg.webp')] absolute inset-0 bg-no-repeat bg-cover"}),(0,i.jsxs)("div",{className:"sm:px-8 px-4 max-w-7xl mx-auto gap-4 grid grid-cols-2 relative z-10",children:[(0,i.jsxs)("div",{className:"lg:col-span-1 col-span-2 flex flex-col ",children:[(0,i.jsxs)("div",{className:"bg-[#FFFFFF26] rounded-full w-fit flex gap-3 p-1 pr-2.5 cursor-pointer mb-4",onClick:()=>
1O.push("/login"),children:[(0,i.jsx)("div",{className:"rounded-full customGradient text-white text-sm font-medium py-1 px-3",children:"Itâs free!"}),(0,i.jsxs)("div",{className:"flex gap-2 items-center text-sm customGradientText font-medium",children:["Try now"," ",(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",children:[(0,i.jsx)("defs",{children:(0,i.jsxs)("linearGradient",{id:"textGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[(0,i.jsx)("stop",{offset:"-4.28%","stop-color":"#00870D"}),(0,i.jsx)("stop",{offset:"140.62%","stop-color":"#79E51F"})]})}),(0,i.jsx)("path",{d:"M3.33333 8.44499H12.6667M12.6667 8.44499L8 3.77832M12.6667 8.44499L8 13.1117",stroke:"url(#textGradient)","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]})]})]}),(0,i.jsx)("p",{className:"font-semibold text-[64px] leading-[74px] text-white tracking-[-2%] mb-6",children:"Precision Health Insights Instantly"}),(0,i.jsx)("p",{className:"text-xl text-[#DCE1E8] mb-8",children:"Explore a new era of wellness with ChronicAI. Journey into personalized health discovery with our advanced platform. Your path to well-being starts here"}),(0,i.jsxs)("div",{className:"flex flex-row justify-center items-center text-white px-7 py-4 rounded-full bg-[#4CA30D] hover:bg-[#56bf0a] duration-300 gap-x-3 w-fit mb-16",children:[(0,i.jsx)(demoIcon,{}),(0,i.jsx)("span",{children:"Watch Demo"})]}),(0,i.jsx)("div",{className:"flex flex-wrap ",children:(0,i.jsx)(S.Z,{children:D.map(e=>(0,i.jsxs)("div",{className:" py-4 px-8 bg-[#B3C4D12E] transition-all duration-700 w-fit cursor-auto rounded-2xl mx-4 overflow-hidden",children:[(0,i.jsx)("div",{className:"flex flex-col gap-3 ",children:(0,i.jsxs)("div",{className:"flex items-center text-white text-[40.44px] font-semibold gap-x-[11px]",children:[e.icon,e.count]})}),(0,i.jsx)("div",{className:"text-white text-left ",children:e.description})]}))})})]}),(0,i.jsx)("div",{className:"lg:col-span-1 col-span-2 rounded-2xl lg:pl-[96px] pb-[84px] ",children:(0,i.jsxs)("div",{className:"border border-[#748A9A] rounded-2xl ",style:{backdropFilter:"blur(24px)"},children:[(0,i.jsxs)("div",{className:"flex items-end h-[72px] justify-between rounded-t-2xl border-b bg-[#B3C4D12E]",children:[(0,i.jsx)("p",{className:"font-semibold sm:text-base text-xs flex py-3 cursor-pointer mx-auto ".concat(0===w?" border-b-2 border-solid text-[#79E51F] border-b-[#79E51F]":"text-white border-b-2 border-transparent"," "),onClick:()=>M(0),children:"Symptom Analysis"}),(0,i.jsx)("p",{className:" font-semibold sm:text-base text-xs flex py-3 mx-auto cursor-pointer ".concat(1===w?" border-b-2 border-solid text-[#79E51F] border-b-[#79E51F] ":"text-white border-b-2 border-transparent"),onClick:()=>M(1),children:"Diagnosis Refinement"})]}),(0,i.jsxs)("div",{className:"relative pt-7 sm:px-10 px-4 h-full rounded-b-2xl",children:[(0,i.jsx)("input",{type:"file",className:"hidden",ref:P,onChange:handleFileChange}),(0,i.jsxs)("div",{children:[1===w&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:"text-white mb-3 font-medium text-sm mt-1",children:"Chronic Condition"}),(0,i.jsx)(N.Z,{options:l.Z,selectedOption:s,onSelect:u,customStyle:"w-full mb-5"})]}),(0,i.jsx)("p",{className:"text-white font-medium text-sm mt-3",children:"Symptoms"}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)("textarea",{className:"text-white font-normal text-base px-4 mt-4 w-full focus:outline-none ".concat((null==Z?void 0:Z.inputValue)?"ring ring-red-500 face":""," rounded-lg ").concat(1==w?"h-[201px]":"h-[297px]"," ring-2 ring-[#748A9A] focus:ring-2 focus:ring-[#79E51F] pt-2.5 bg-[#B3C4D12E]"),placeholder:"Describe your symptoms, circumstances, or pains here...",onChange:e=>{t(e.target.value),_({inputValue:!1})}}),(0,i.jsxs)("div",{className:"bg-[#95A4AC78] w-fit cursor-pointer right-2 bottom-4 absolute py-1.5 px-3 pr-4 rounded-full flex gap-2 items-center ",onClick:()=>P.current.click(),children:[(0,i.jsx)(v.Z,{className:"text-white w-4 h-4"}),(0,i.jsx)("span",{className:"text-white font-medium",children:"Add file"})]})]})]}),(0,i.jsx)("div",{className:"flex gap-2 mt-2",children:h.map((e,t)=>{var s;return(0,i.jsxs)("div",{className:"flex gap-2 items-center justify-center bg-gray-200/10 rounded-full px-2 py-1 text-gray-600","data-tooltip-content":null==e?void 0:e.name,"data-tooltip-id":"tooltip-".concat(t),children:[(0,i.jsx)(g.Z,{className:"w-4 h-4 text-white"}),(0,i.jsxs)("span",{className:"text-white",children:[null==e?void 0:e.name.slice(0,5),(null==e?void 0:null===(s=e.name)||void 0===s?void 0:s.length)>5&&"..."]}),(0,i.jsx)("span",{onClick:()=>removeSelectedFiles(t),children:(0,i.jsx)(j.Z,{className:"h-4 w-4 text-white cursor-pointer"})}),(0,i.jsx)(b.u,{id:"tooltip-".concat(t)})]},t)})}),(0,i.jsxs)("button",{className:"text-sm font-semibold flex justify-center gap-2 items-center leading-6 text-white px-4 roun
1ded-full py-2 hover:bg-[#56bf0a] duration-300 w-full mt-[20px]",onClick:fileSubmit,style:{background:"linear-gradient(97deg, #00870D -4.29%, #79E51F 143.57%)"},type:"submit",ref:V,disabled:T,children:[L&&(0,i.jsx)(p.default,{})," Diagnose"]}),(0,i.jsxs)("p",{className:"text-white font-normal text-sm px-4 my-3 text-center ",children:["We care about your data in our"," ",(0,i.jsx)(E(),{href:"/privacy",className:"underline",children:"privacy policy."})]})]})]})})]})]})},F={src:"/_next/static/media/homeFeature.5e60c234.png",height:592,width:384,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAICAMAAAAGL8UJAAAAM1BMVEWdtLmZwMerx8x3maKpv8W2xspwl5+Hpa2it72TsLZ7naTT4OOMtb18sLrr7OxqpbDQ1NWjJ3f0AAAAAXRSTlP+GuMHfQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAC9JREFUeJwFwYkBwCAMA7GDJrFDH9h/2kqU2sElP4OljpuqPT4833nIzAxkdwBqfhq5AQrRj9/LAAAAAElFTkSuQmCC",blurWidth:5,blurHeight:8},features=()=>(0,i.jsxs)("div",{className:"mx-auto lg:max-w-7xl sm:px-8 px-4 py-24 sm:py-32",id:"features",children:[(0,i.jsx)("p",{className:"text-[#00870D] font-semibold text-base py-3 text-center",children:"Features"}),(0,i.jsx)("p",{className:"text-[#101828] font-medium text-4xl leading-[44px] text-center",children:"Unlocking Wellness - Feature by Feature"}),(0,i.jsx)("div",{className:"text-xl leading-[30px] font-normal font-inter text-[#475467] mt-4 mx-auto max-w-[768px] text-center",children:"Explore the powerful features of ChronicAI designed to simplify and enhance your health journey."}),(0,i.jsxs)("div",{className:"mt-16 grid grid-cols-3 gap-9",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-8 lg:col-span-1 col-span-3 ",children:[(0,i.jsxs)("div",{className:" relative sm:pb-0 bg-white rounded-2xl h-full",children:[(0,i.jsx)("div",{className:" flex justify-center rounded-md",children:(0,i.jsx)(h(),{src:"/doctor.svg",width:180,height:180,className:"w-full pb-6 max-w-[300px] max-h-[300px] relative object-cover"})}),(0,i.jsxs)("div",{className:"absolute text-center bottom-0 p-8",children:[(0,i.jsx)("p",{className:"text-[#101828] leading-[30px] font-semibold text-xl",children:"Intuitive Symptom Analysis"}),(0,i.jsx)("p",{className:"text-[#475467] font-normal text-base mt-2",children:"Effortlessly articulate health concerns using ChronicAI's intuitive Natural Language Processing (NLP) interface."})]})]}),(0,i.jsxs)("div",{className:"relative sm:pb-0 bg-white rounded-2xl h-full",children:[(0,i.jsx)("div",{className:" p-2 flex justify-center rounded-md",children:(0,i.jsx)(h(),{src:"/timmer.svg",width:180,height:180,className:"w-full pb-8 relative object-cover max-w-[300px] max-h-[300px]"})}),(0,i.jsxs)("div",{className:"absolute text-center bottom-0 p-8 ",children:[(0,i.jsx)("p",{className:"text-[#101828] leading-[30px] font-semibold text-xl ",children:"Smart Medication Tracker"}),(0,i.jsx)("p",{className:"text-[#475467] font-normal text-base mt-2",children:"Simplify medication with ChronicAI's intelligent tracker. Get reminders, dosage guidance, and insights for effective management."})]})]})]}),(0,i.jsx)("div",{className:" rounded-2xl lg:col-span-1 col-span-3 ",children:(0,i.jsx)(h(),{src:F,className:"object-cover lg:w-full lg:mx-0 mx-auto max-h-fit lg:h-full rounded-3xl",alt:"feature"})}),(0,i.jsxs)("div",{className:"flex flex-col gap-8 lg:col-span-1 col-span-3",children:[(0,i.jsxs)("div",{className:" relative bg-white sm:pb-0 rounded-2xl",children:[(0,i.jsx)("div",{className:" flex justify-center rounded-md",children:(0,i.jsx)(h(),{src:"/bloodtest.svg",width:180,height:180,className:"w-full pb-10 relative object-cover max-w-[300px] max-h-[300px]"})}),(0,i.jsxs)("div",{className:"absolute text-center bottom-0 p-8 ",children:[(0,i.jsx)("p",{className:"text-[#101828] leading-[30px] font-semibold text-xl mt-5",children:"Comprehensive Health Analysis"}),(0,i.jsx)("p",{className:"text-[#141922] font-normal text-base mt-2",children:"Upload images or PDFs for in-depth analysis. ChronicAI ensures secure data handling."})]})]}),(0,i.jsxs)("div",{className:" relative sm:pb-0 bg-white rounded-2xl",children:[(0,i.jsx)("div",{className:" flex justify-center roun
1ded-md",children:(0,i.jsx)(h(),{src:"/heart.svg",width:180,height:180,className:"w-full pb-12 relative object-cover max-w-[300px] max-h-[300px]"})}),(0,i.jsxs)("div",{className:"absolute text-center bottom-0 p-8 ",children:[(0,i.jsx)("p",{className:"text-[#101828] leading-[30px] font-semibold text-xl mt-5",children:"Wellness Goal Achievements"}),(0,i.jsx)("p",{className:"text-[#475467] font-normal text-base mt-2",children:"Set and achieve milestones with ChronicAI's goal tracking. Monitor progress, celebrate achievements, and stay motivated."})]})]})]})]})]}),I=s(67082),L=s(49342),H=s(56469),P=s(81152),Z=s(88294),_=s(30568),pricing=()=>{var e,t,s,l,n,a,o,c,x,m,u,h,p,v,g,j,b;let{authUser:w,plans:C}=(0,_.useFirebaseAuthContext)(),[y,N]=(0,d.useState)([]),[A,k]=(0,d.useState)(!1),S=(0,r.useRouter)();(0,d.useEffect)(()=>{var e,t,s,i;(null==C?void 0:null===(t=C[0])||void 0===t?void 0:null===(e=t.metadata)||void 0===e?void 0:e.features)&&N(JSON.parse(null==C?void 0:null===(i=C[1])||void 0===i?void 0:null===(s=i.metadata)||void 0===s?void 0:s.features))},[C]);let subscribe=async()=>{if(k(!0),null==w?void 0:w.uid){var e,t,s;(0,Z.Mc)(null==C?void 0:null===(s=C[1])||void 0===s?void 0:null===(t=s.prices)||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.id,null==w?void 0:w.email,null==w?void 0:w.uid).then(e=>{k(!1),window.location.href=e})}else S.push("/login")};return(0,i.jsxs)("div",{className:"lg:mx-auto lg:max-w-7xl sm:px-8 px-4 mt-[72px] pb-[83px] border-b-2 border-solid border-white border-",children:[(0,i.jsx)("p",{className:"text-[#00870D] font-semibold text-base text-center",children:"Upgrade"}),(0,i.jsx)("p",{className:"text-[#101828] font-medium text-4xl mt-1 text-center",children:"Pricing as simple as our cards"}),(0,i.jsx)("div",{className:"text-xl font-normal font-inter text-gray-600 leading-7 mt-4 mx-auto max-w-[768px] text-center",children:"Simple, transparent pricing that grows with you."}),(0,i.jsxs)("div",{className:"grid grid-cols-2 mt-16 gap-8 ",children:[(0,i.jsxs)("div",{className:"lg:col-span-1 col-span-2 lg:pr-16 lg:px-8 space-y-10 flex flex-col justify-center",children:[(0,i.jsxs)("div",{className:"flex gap-2 ",children:[(0,i.jsx)("div",{className:"p-2 rounded-md h-fit mt-1 flex items-center justify-center",style:{background:"linear-gradient(97deg, #00870D -4.29%, #79E51F 143.57%)"},children:(0,i.jsx)(I.Z,{})}),(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:"text-[#101828] text-xl font-semibold",children:"Initial Symptom Analysis"}),(0,i.jsx)("p",{className:"text-[#475467] text-base font-normal mt-1",children:"Understand basic symptoms for initial health guidance and insights."})]})]}),(0,i.jsxs)("div",{className:"flex gap-2 ",children:[(0,i.jsx)("div",{className:"p-2 rounded-md h-fit mt-1 bg-[#4CA30D] flex items-center justify-center",style:{background:"linear-gradient(97deg, #00870D -4.29%, #79E51F 143.57%)"},children:(0,i.jsx)(L.Z,{})}),(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:"text-[#101828] text-xl font-semibold",children:"Initial AI Diagnosis"}),(0,i.jsx)("p",{className:"text-[#475467] text-base font-normal mt-1",children:"Access AI-driven initial diagnoses for common health concerns."})]})]}),(0,i.jsxs)("div",{className:"flex gap-2 ",children:[(0,i.jsx)("div",{className:"p-2 rounded-md h-fit mt-1 bg-[#4CA30D] flex items-center justify-center",style:{background:"linear-gradient(97deg, #00870D -4.29%, #79E51F 143.57%)"},children:(0,i.jsx)(H.Z,{})}),(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:"text-[#101828] text-xl font-semibold",children:"Educational Resources"}),(0,i.jsx)("p",{className:"text-[#475467] text-base font-normal",children:"Explore a library of resources for health education and awareness."})]})]})]}),(0,i.jsx)("div",{className:"lg:col-span-1 col-span-2",children:(0,i.jsxs)("div",{className:"bg-white p-8 shadow-md rounded-2xl",children:[(null==y?void 0:y.length)!==0?(0,i.jsxs)("div",{className:"flex justify-between flex-wrap",children:[(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"flex items-center gap-4 flex-wrap",children:[(0,i.jsx)("p",{className:"text-[#101828] text-2xl font-semibold",children:null==C?void 0:null===(t=C[1])||void 0===t?void 0:null===(e=t.metadata)||void 0===e?void 0:e.title}),(0,i.jsx)("div",{className:"flex py-1 text-sm font-medium items-center px-3 rounded-full bg-[#F3FEE7] text-[#3B7C0F] border border-solid border-[#D0F8AB] ",children:"Popular"})]}),(0,i.jsx)("div",{className:"text-[#475467] font-normal text-base",children:null==C?void 0:null===(l=C[1])||void 0===l?void 0:null===(s=l.metadata)||void 0===s?void 0:s.description})]}),(0,i.jsxs)("div",{className:"flex items-center",children:[(0,i.jsx)("span",{className:"text-[#101828] font-semibold text-4xl",children:"$"}),(0,i.jsx)("span",{className:"text-[#101828] font-semibold text-6xl",children:(null==C?void 0:null===(o=C[1])||void 0===o?void 0:null===(a=o.prices)||void 0===a?void 0:null===(n=a[0])||void 0===n?void 0:n.unit_amount)/100}),(0,i.jsxs)("span",{className:"text-xl font-normal font-inter text-[#475467] mt-auto",children:["per ",null==C?void 0:null===(u=C[1])||void 0===u?void 0:null===(m=u.prices)||void 0===m?void 0:null===(x=m[0])||void 0===x?void 0:null===(c=x.recurring)||void 0===c?void 0:c.interval]})]})]}):(0,i.jsxs)("div",{className:"flex justify-between items-center flex-wrap",children:[(0,i.jsxs)("div",{className:" w-2/3 ",children:[(0,i.jsx)("div",{className:"flex items-center gap-4 flex-wrap",children:(0,i.jsx)("div",{className:"animate-pulse w-full text-[#101828] text-2xl font-semibold",children:(0,i.jsx)("div",{className:"h-4 bg-slate-200 rounded-lg w-full "})})}),(0,i.jsx)("div",{className:"animate-pulse mt-2 w-full text-[#475467] font-normal text-base",children:(0,i.jsx)("div",{className:"h-4 bg-slate-200 w-full rounded-lg"})})]}),(0,i.jsx)("div",{className:"flex animate-pulse items-center",children:(0,i.jsx)("div",{className:"rounded-full bg-slate-200 h-24 w-24"})})]}),(0,i.jsxs)("div",{children:[0!==y.length?(0,i.jsx)("p",{className:"text-[#101828] text-base mt-8 font-semibold",children:"FEATURES"}):(0,i.jsx)("div",{className:"animate-pulse mt-2 w-full text-[#475467] font-normal text-base",children:(0,i.jsx)("div",{className:"h-4 bg-slate-200 w-full rounded-lg"})}),(0,i.jsxs)("div",{className:"flex sm:flex-row flex-col sm:gap-8 gap-4 mt-6 mx-auto",children:[0!==y.length&&(0,i.jsx)("div",{className:"flex flex-col gap-4",children:y.slice(0,3).map((e,t)=>(0,i.jsxs)("div",{className:"flex gap-2 w-full",children:[(0,i.jsx)(P.Z,{}),(0,i.jsx)("p",{className:"text-[#475467] font-normal text-base",children:e})]}))}),0!==y.length&&(0,i.jsx)("div",{className:"flex flex-col gap-4",children:y.slice(3,6).map((e,t)=>(0,i.jsxs)("div",{className:"flex gap-2 w-full",children:[(0,i.jsx)(P.Z,{}),(0,i.jsx)("p",{className:"text-[#475467] font-normal text-base",children:e})]}))}),!(null==y?void 0:y.length)&&(0,i.jsxs)("div",{className:"animate-pulse w-full",children:[(0,i.jsx)("div",{className:"h-10 w-full bg-slate-200 rounded-lg"}),(0,i.jsx)("div",{className:"h-10 w-full bg-slate-200 rounded-lg mt-2"}),(0,i.jsx)("div",{className:"h-10 w-full bg-slate-200 rounded-lg mt-2"})]})]}),(null==y?void 0:y.length)!==0?(0,i.jsx)(f.Z,{className:" mt-[72px] w-full",onClick:()=>subscribe(),text:"Get started",loading:A,disabled:(null==w?void 0:null===(b=w.userSubscription)||void 0===b?void 0:null===(j=b.items)||void 0===j?void 0:null===(g=j[0])||void 0===g?void 0:null===(v=g.price)||void 0===v?void 0:null===(p=v.product)||void 0===p?void 0:null===(h=p.metadata)||void 0===h?void 0:h.title)==="Pro plan"}):(0,i.jsx)("div",{className:"animate-pulse mt-[72px] w-full",children:(0,i.jsx)("div",{className:"h-10 w-full bg-slate-200 rounded-lg mt-2"})})]})]})})]})]})},U=s(12943);s(30452);var T=s(21743);function Home(){return(0,i.jsxs)("main",{className:"bg-[#F2F4F7]",children:[(0,i.jsx)(banner,{}),(0,i.jsx)(features,{}),(0,i.jsx)(U.default,{}),(0,i.jsx)(pricing,{}),(0,i.jsx)(T.default,{})]})}s(9982)},72821:function(e,t){"use strict";t.Z=[" General","Mild","Moderate","Severe"]},99538:function(e,t){"use strict";t.Z=["General","Diabetes","Hypertension","Asthma","Chronic Obstructive Pulmonary Disease (COPD)","Rheumatoid Arthritis","Osteoarthritis","Cardiovascular Disease","Alzheimer's Disease","Parkinson's Disease","Multiple Sclerosis (MS)","Inflammatory Bowel Disease (IBD)","Chronic Kidney Disease","Chronic Liver Disease","HIV/AIDS","Cystic Fibrosis","Epilepsy","Chronic Migraine","Chronic Fatigue Syndrome","Crohn's Disease","Systemic Lupus Erythematosus (SLE)","Psoriasis","Endometriosis","Chronic Pain Syndrome","Fibromyalgia","Chronic Bronchitis","Interstitial Lung Disease","Hemophilia","Sickle Cell Anemia","Hepatitis B","Hepatitis C","Myasthenia Gravis","Thyroid Disorders (e.g., Hypothyroidism, Hyperthyroidism)","Chronic Gastritis","Chronic Pancreatitis","Lyme Disease","Celiac Disease","Polycystic Ovary Syndrome (PCOS)","Chronic Sinusitis","Huntington's Disease","Amyotrophic Lateral Sclerosis (ALS)","Chronic Urticaria","Chronic Rhinitis","Chronic Myeloid Leukemia","Chronic Lymphocytic Leukemia","Chronic Anemia","Chronic Glaucoma","Chronic Osteomyelitis","Chronic Prostatitis","Chronic Pelvic Pain Syndrome","Chronic Renal Failure","Chronic Venous Insufficiency","Chronic Inflammatory Demyelinating Polyneuropathy (CIDP)","Chronic Subdural Hematoma","Chronic Thromboembolic Pulmonary Hypertension (CT
1EPH)"]},70221:function(e,t,s){"use strict";var i=s(57170),l=s(21155);let n=[{id:0,title:"Insightful Symptom Analysis",description:"Use Chronic.ai's Symptom Checker to describe symptoms for instant AI-generated potential condition insights.",prompt:e=>"If a user has a ".concat(e," then your role as a chronic AI symptom checker is to analyze user's symptom and ask him a question according to the symptom and according to that ask one question at a time and get all the answers from user and get to know about his symptom and give him Favorable advice is to be given and a medical report prepared and given"),icon:i.Z},{id:1,title:"Diagnosis Refinement",description:"Select your condition, add details or documents for enhanced AI-driven diagnosis with continuous progress updates.",prompt:(e,t)=>"If a user has a ".concat(t," ").concat(e," then your role as a chronic AI symptom checker is to analyze user's symptom and ask him a question according to the symptom and according to that ask one question at a time and get all the answers from user and get to know about his symptom and give him Favorable advice is to be given and a medical report prepared and given"),icon:l.Z}];t.Z=n},12391:function(e,t,s){"use strict";s.d(t,{a:function(){return useAuth}});var i=s(94097),l=s(79721),n=s(62525),a=s(97215),o=s(25566);let useAuth=()=>{if("supabase"===o.env.NEXT_PUBLIC_BACKEND_PLATFORM){let{authUser:e,setAuthUser:t}=(0,a.Kg)();return{authUser:e,setAuthUser:t,signInWithGoogle:a.qj,logoutUser:a.TX,registerWithEmailAndPassword:a.bE,signInWithEmail:a.Ry,resetUserPassword:a.h8}}{let{authUser:e,isLoading:t,setAuthUser:s,updateUserData:a}=(0,i.h2)();return{authUser:e,isLoading:t,setAuthUser:s,updateUserData:a,signInWithGoogle:i.qj,logoutUser:i.TX,registerWithEmailAndPassword:i.bE,signInWithEmail:i.Ry,updateEmailAddress:i.gp,updateUserPassword:i.Zy,resetUserPassword:i.h8,updateUserProfile:i.Lj,uploadProfileImage:n._p,updateUserDocs:l.nl,updateCustomerData:l.mU,getCurrentUserData:l.Ts}}}}}]);
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.