1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7396],{15884:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/telemedicine/Appointed",function(){return s(7565)}])},72496:function(e,t,s){"use strict";var l=s(85893);s(67294),t.Z=e=>{let{h1:t,click:s}=e;return(0,l.jsxs)("div",{className:"mt-8 flex cursor-pointer items-center gap-x-2 ",onClick:s,children:[(0,l.jsx)("svg",{width:"10",height:"16",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M9.88 1.88L8 0L0 8L8 16L9.88 14.12L3.77333 8L9.88 1.88Z",fill:"black"})}),(0,l.jsx)("h1",{className:" text-[22px] font-[500] text-[#000000]",children:t})]})}},7565:function(e,t,s){"use strict";let l;s.r(t),s.d(t,{default:function(){return telemedicine_Appointed}});var a=s(85893),n=s(67294),i=s(72496),r=s(25675),o=s.n(r),telemedicine_AppointmentCard=e=>{let{icon:t,btn1text:s,btn1color:l,btn2text:n,btn2color:i}=e;return(0,a.jsxs)("div",{className:"flex w-fit min-w-[90%] items-start justify-start gap-4 rounded-xl bg-[#EEF0F8] p-4",children:[(0,a.jsx)("div",{className:" flex w-fit min-w-fit items-center justify-start ",children:(0,a.jsx)(o(),{src:"/assets/images/woman1.png",alt:"Doctor's Profile",width:150,height:150,className:" max-h-[150px] max-w-[150px] rounded-[60px] ring-2 ring-[#6FDFE1] lg:p-1 lg:ring-2"})}),(0,a.jsxs)("div",{className:"flex h-full w-fit min-w-fit flex-col justify-between ",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"w-fit text-[16px] font-[700]",children:"Dr. Annie Mazuri"}),(0,a.jsx)("p",{className:"text-[14px] font-[500] text-[#000000B2]",children:"Pediatrician"})]}),(0,a.jsx)("button",{type:"button",style:{backgroundColor:l},className:"font-base first-letter ml-2 rounded-xl px-6 py-[2px] text-sm capitalize leading-7 text-white shadow-lg",children:s}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("svg",{width:"15",height:"17",viewBox:"0 0 15 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M4.0949 2.60444H3.47607C2.60942 2.60444 2.17577 2.60444 1.84475 2.77932C1.55358 2.93314 1.31702 3.17841 1.16866 3.48031C1 3.82352 1 4.27314 1 5.17171V5.81333M4.0949 2.60444H10.2847M4.0949 2.60444V1M10.2847 2.60444H10.9038C11.7705 2.60444 12.2032 2.60444 12.5342 2.77932C12.8254 2.93314 13.0628 3.17841 13.2111 3.48031C13.3796 3.82318 13.3796 4.27226 13.3796 5.16908V5.81333M10.2847 2.60444V1M1 5.81333V12.873C1 13.7716 1 14.2207 1.16866 14.5639C1.31702 14.8658 1.55358 15.1115 1.84475 15.2653C2.17545 15.44 2.60857 15.44 3.47353 15.44H10.9061C11.771 15.44 12.2035 15.44 12.5342 15.2653C12.8254 15.1115 13.0628 14.8658 13.2111 14.5639C13.3796 14.221 13.3796 13.7726 13.3796 12.8758V5.81333M1 5.81333H13.3796M10.2847 12.2311H10.2863L10.2862 12.2327L10.2847 12.2327V12.2311ZM7.18981 12.2311H7.19135L7.19132 12.2327L7.18981 12.2327V12.2311ZM4.0949 12.2311H4.09645L4.09641 12.2327L4.0949 12.2327V12.2311ZM10.2862 9.02222V9.02383L10.2847 9.02379V9.02222H10.2862ZM7.18981 9.02222H7.19135L7.19132 9.02383L7.18981 9.02379V9.02222ZM4.0949 9.02222H4.09645L4.09641 9.02383L4.0949 9.02379V9.02222Z",stroke:"black",strokeOpacity:"0.7",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,a.jsxs)("p",{className:"text-[12px] font-[600]",children:["Friday 04",(0,a.jsx)("sup",{children:"th "}),"June 2023"]})]})]}),(0,a.jsxs)("div",{className:"flex h-full w-full flex-col justify-between ",children:[(0,a.jsx)("div",{className:" self-end text-[#EA526F]",children:t}),(0,a.jsx)("button",{type:"button",style:{backgroundColor:i},className:"font-base first-letter ml-2 rounded-xl px-6 py-[2px] text-sm capitalize leading-7 text-white shadow-lg",children:n}),(0,a.jsxs)("div",{className:"flex items-center gap-2 self-end",children:[(0,a.jsx)("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M7.96353 4.20889V8.22H11.8322M7.96353 15.44C4.11768 15.44 1 12.2075 1 8.22C1 4.2325 4.11768 1 7.96353 1C11.8094 1 14.9271 4.2325 14.9271 8.22C14.9271 12.2075 11.8094 15.44 7.96353 15.44Z",stroke:"black",strokeOpacity:"0.7",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,a.jsx)("p",{className:"text-[12px] font-[600]",children:"8am - 9am"})]})]})]})},c=s(39828),d=s(83977),h=s(86650);let x=(0,d.ZF)({apiKey:"AIzaSyDxP_gpzrX_ozDHANEDayehduZdhxS349E",authDomain:"webchat-9f06b.firebaseapp.com",projectId:"webchat-9f06b",storageBucket:"webchat-9f06b.appspot.com",messagingSenderId:"353659600645",appId:"1:353659600645:web:90ec765936323e4d6d416c",measurementId:"G-7F6EVW3W3L"}),m=(0,c.ad)(x),p=(0,h.cF)(x);var u=s(9473),w=s(55678);let g=[];async function startAudioCallAndRecording(){try{let e=await navigator.mediaDevices.getUserMedia({audio:!0}
1),t=["audio/webm","audio/mp4"].filter(MediaRecorder.isTypeSupported);if(0===t.length)throw Error("No supported MIME types for MediaRecorder.");l=new MediaRecorder(e,{mimeType:t[0]}),g=[],l.ondataavailable=e=>{e.data.size>0&&g.push(e.data)},l.onstop=handleRecordedAudio,l.start(10)}catch(e){console.error("Error starting audio call and recording:",e)}}async function handleRecordedAudio(e){let t,s;let l=new Blob(g,{type:"audio/webm"}),a=new Date().toISOString();"[object Event]"!=e&&(t="".concat(e,"_").concat(a,".webm"));let n=new File([l],t,{type:"audio/webm"});if(void 0!=n.name){s=(0,h.iH)(p,"audio/".concat(n.name));try{await (0,h.KV)(s,n);let e=await (0,h.Jt)(s);return e}catch(e){throw console.error("Error uploading audio file:",e),e}}}var telemedicine_SendMessage=e=>{let{handleOpenCamera:t,showIcons:s,capturedImage:i,onClose:r,handleOpenFiles:o,setFile:d,file:h}=e,[x,p]=(0,n.useState)(""),g=(0,u.v9)(e=>e.auth.user),f=(0,n.useRef)(),[C,j]=(0,n.useState)(!1),[v,b]=(0,n.useState)(null),sendMessage=async e=>{if(e.preventDefault(),!g||!g._id){w.Am.error("User not authenticated or missing _id.");return}if(""===x.trim()&&!h&&!v){w.Am.error("Enter a message");return}let{_id:t,first_name:s,last_name:l,profile_image:a}=g;try{await (0,c.ET)((0,c.hJ)(m,"messages"),{text:x,name:"".concat(s," ").concat(l),avatar:a,file:h?URL.createObjectURL(h):null,fileName:h?h.name:null,fileSize:h?h.size:null,fileType:h?h.type:null,audio:v||null,createdAt:(0,c.Bt)(),_id:t}),p(""),b(""),d(null),f.current.scrollIntoView({behavior:"smooth"}),p("")}catch(e){console.error("Error adding message:",e)}},[N,y]=(0,n.useState)(!1),handleSendWithImage=async e=>{if(e.preventDefault(),!g||!g._id){w.Am.error("User not authenticated or missing _id.");return}let{_id:t,first_name:s,last_name:l,profile_image:a}=g;try{await (0,c.ET)((0,c.hJ)(m,"messages"),{text:x,name:"".concat(s," ").concat(l),avatar:a,image:i,createdAt:(0,c.Bt)(),_id:t}),p(""),r(),f.current.scrollIntoView({behavior:"smooth"})}catch(e){console.error("Error adding message:",e)}},handleStartRecording=async()=>{await startAudioCallAndRecording(),j(!0)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mt-2 flex items-center justify-around",ref:f,children:[(0,a.jsxs)("svg",{width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"cursor-pointer",onClick:()=>{y(!N)},children:[(0,a.jsx)("circle",{cx:"22",cy:"22",r:"22",fill:"#899AA2"}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.1419 12.4613C15.1718 12.4458 14.2376 12.952 13.5484 13.8667C12.8593 14.7813 12.4727 16.0279 12.4753 17.3274C12.4753 20.0398 14.1169 22.2387 16.1419 22.2387C18.167 22.2387 19.8086 20.0398 19.8086 17.3274C19.8112 16.0279 19.4246 14.7813 18.7354 13.8667C18.0462 12.952 17.112 12.4458 16.1419 12.4613ZM36.6604 25.766C35.4889 32.0965 29.379 37.382 21.9963 37.382C14.6725 37.382 8.59833 32.1735 7.35808 25.9145C7.10673 24.3525 8.38603 23.984 9.59108 24.2755C13.6223 25.4411 17.803 26.0081 21.9991 25.9585C26.1857 26.007 30.3568 25.4418 34.3796 24.281C35.5511 23.984 36.8056 24.3195 36.6604 25.766ZM32.674 26.6888C32.5596 26.7328 32.4436 26.7658 32.3264 26.8043C32.3143 26.8098 32.7015 26.6833 32.69 26.6888C29.2114 27.6465 25.6156 28.1112 22.0079 28.0693C17.7025 28.0693 13.8519 27.5908 11.202 26.6393C9.28088 26.0673 9.64938 28.3278 10.9996 29.0208C14.4539 30.5934 18.2122 31.3858 22.0073 31.3418C26.5217 31.3418 30.5444 30.2913 33.2015 28.9328C34.4588 28.1243 34.7074 25.9573 32.674 26.6888ZM30.0702 12.4613C29.1002 12.4459 28.1661 12.9484 27.4769 13.8562C26.7878 14.764 26.4011 16.0014 26.4035 17.2914C26.3841 19.0502 27.0787 20.6866 28.221 21.5735C29.3633 22.4605 30.7763 22.4605 31.9186 21.5735C33.0609 20.6866 33.7554 19.0502 33.736 17.2914C33.7384 16.0016 33.3519 14.7644 32.6629 13.8566C31.9739 12.9488 31.04 12.4462 30.0702 12.4613Z",fill:"#50555C"})]}),(0,a.jsxs)("div",{className:"relative w-[60%] rounded-[160px] bg-white py-4",children:[h?(0,a.jsx)("input",{type:"text",className:"h-fit w-[90%] max-w-[90%] whitespace-pre-line break-words border-none pl-4 outline-0 placeholder:pl-4 placeholder:text-[16
1px]",placeholder:"Type a message.",value:h.name,onChange:e=>p(e.target.value)}):(0,a.jsx)("input",{type:"text",className:"h-fit w-[90%] max-w-[90%] whitespace-pre-line break-words border-none pl-4 outline-0 placeholder:pl-4 placeholder:text-[16px]",placeholder:"Type a message.",value:x,onChange:e=>p(e.target.value)}),""!==x.trim()||h?(0,a.jsx)("button",{type:"button",onClick:e=>sendMessage(e),children:!s&&(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",className:"text-gray h-6 w-6 stroke-[#EEF0F8] text-[#EEF0F8]",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})})}):!s&&(0,a.jsx)("svg",{width:"24",height:"21",viewBox:"0 0 24 21",className:"absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer",onClick:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M23.4286 5.125V18.3036C23.4286 19.5162 22.4448 20.5 21.2321 20.5H2.19643C0.983817 20.5 0 19.5162 0 18.3036V5.125C0 3.91239 0.983817 2.92857 2.19643 2.92857H6.22321L6.78605 1.4231C7.10636 0.567411 7.92545 0 8.84062 0H14.5834C15.4985 0 16.3176 0.567411 16.6379 1.4231L17.2054 2.92857H21.2321C22.4448 2.92857 23.4286 3.91239 23.4286 5.125ZM17.2054 11.7143C17.2054 8.68505 14.7435 6.22321 11.7143 6.22321C8.68504 6.22321 6.22321 8.68505 6.22321 11.7143C6.22321 14.7435 8.68504 17.2054 11.7143 17.2054C14.7435 17.2054 17.2054 14.7435 17.2054 11.7143ZM15.7411 11.7143C15.7411 13.9336 13.9336 15.7411 11.7143 15.7411C9.49498 15.7411 7.6875 13.9336 7.6875 11.7143C7.6875 9.49498 9.49498 7.6875 11.7143 7.6875C13.9336 7.6875 15.7411 9.49498 15.7411 11.7143Z",fill:"#899AA2"})})]}),!s&&(0,a.jsxs)("div",{className:"flex items-center gap-x-4",children:[(0,a.jsxs)("label",{className:"cursor-pointer",onClick:o,children:[(0,a.jsxs)("svg",{width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"cursor-pointer",children:[(0,a.jsx)("rect",{width:"44",height:"44",rx:"10",fill:"#F3FFFF"}),(0,a.jsx)("rect",{x:"0.7",y:"0.7",width:"42.6",height:"42.6",rx:"9.3",stroke:"black",strokeOpacity:"0.3",strokeWidth:"1.4"}),(0,a.jsx)("path",{d:"M13 21.3989L20.6849 13.714C22.9702 11.4287 26.6756 11.4287 28.961 13.714C31.2463 15.9994 31.2461 19.7049 28.9607 21.9903L20.0935 30.8574C18.5699 32.381 16.1002 32.3808 14.5766 30.8572C13.053 29.3336 13.0526 26.8637 14.5762 25.3401L23.4434 16.4729C24.2052 15.7112 25.4409 15.7112 26.2027 16.4729C26.9645 17.2347 26.964 18.4695 26.2022 19.2313L18.5173 26.9162",stroke:"black",strokeOpacity:"0.3",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,a.jsx)("input",{type:"file",className:"hidden",onChange:e=>{d(e.target.files[0])}})]}),(0,a.jsxs)("svg",{width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",className:"cursor-pointer ",onClick:startAudioCallAndRecording,xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("circle",{cx:"22",cy:"22",r:"22",fill:"#02A884"}),(0,a.jsx)("path",{d:"M21.8892 25.2315C23.2863 25.2315 24.4142 23.6424 24.4142 21.6737V14.5579C24.4142 12.5892 23.2863 11 21.8892 11C20.4921 11 19.3643 12.5892 19.3643 14.5579V21.6737C19.3643 23.6424 20.4921 25.2315 21.8892 25.2315Z",fill:"white"}),(0,a.jsx)("path",{d:"M26.0998 21.6797C26.0998 24.9529 24.2145 27.6095 21.8916 27.6095C19.5686 27.6095 17.6833 24.9529 17.6833 21.6797H16C16 25.8661 18.1967 29.3054 21.0499 29.8865V33.5393H22.7332V29.8865C25.5864 29.3054 27.7831 25.8661 27.7831 21.6797H26.0998Z",fill:"white"})]})]}),s?(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"h-6 w-6",onClick:handleSendWithImage,children:(0,a.jsx)("path",{d:"M3.478 2.405a.75.75 0 00-.926.94l2.432 7.905H13.5a.75.75 0 010 1.5H4.984l-2.432 7.905a.75.75 0 00.926.94 60.519 60.519 0 0018.445-8.986.75.75 0 000-1.218A60.517 60.517 0 003.478 2.405z"})}):null]}),N?(0,a.jsx)(a.Fragment,{}):null,C?(0,a.jsxs)("section",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{children:"Recording in progress..."}),";",(0,a.jsx)("button",{className:"w-2 rounded-md bg-red-800 px-3 py-3 ",onClick:e=>{if(e.preventDefault(),g.first_name||g.last_name){let e=handleRecordedAudio("".concat(null==g?void 0:g.first_name,"_").concat(null==g?void 0:g.last_name));Promise.resolve(e).then(e=>b(e))}l&&"inactive"!==l.state&&l.stop(),l&&l.stream&&l.stream.getTracks().forEac
1h(e=>e.stop()),sendMessage(e),j(!1)}})]}):(0,a.jsx)("button",{onClick:handleStartRecording,className:"bg-blue-200 px-2 py-1",children:"Start Recording"})]})},Picture=e=>{let{capturedImage:t,onClose:s,onSend:l}=e;return(0,a.jsxs)("div",{className:"image-modal fixed inset-y-0 z-[1050] mt-4 flex w-[60vw] flex-col items-center bg-gray-200 ",children:[(0,a.jsxs)("div",{className:"flex w-full items-center justify-around",children:[(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"h-6 w-6 cursor-pointer",onClick:s,children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 011.06 0L12 10.94l5.47-5.47a.75.75 0 111.06 1.06L13.06 12l5.47 5.47a.75.75 0 11-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 01-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 010-1.06z",clipRule:"evenodd"})}),(0,a.jsx)("h1",{children:"Take Photo"}),(0,a.jsxs)("div",{className:"flex space-x-2 ",children:[(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"h-6 w-6",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M9.53 2.47a.75.75 0 010 1.06L4.81 8.25H15a6.75 6.75 0 010 13.5h-3a.75.75 0 010-1.5h3a5.25 5.25 0 100-10.5H4.81l4.72 4.72a.75.75 0 11-1.06 1.06l-6-6a.75.75 0 010-1.06l6-6a.75.75 0 011.06 0z",clipRule:"evenodd"})}),(0,a.jsx)("h1",{children:"Retake Photo"})]})]}),(0,a.jsx)(o(),{src:t,alt:"Captured Image",width:600,height:600}),(0,a.jsx)("div",{className:"w-[100%] ",children:(0,a.jsx)(telemedicine_SendMessage,{onSend:l,showIcons:!0,onClose:s,capturedImage:t})})]})},telemedicine_DocChart=()=>(0,a.jsxs)("div",{className:"relative mr-12 mt-2 w-96 place-content-end place-self-end self-end bg-[#E7FFDB] px-6 py-4",children:[(0,a.jsxs)("p",{className:"w-48 text-[14px]",children:["Good morning June! Nice to meet you. How are you feeling today?"," "]}),(0,a.jsx)("p",{className:"absolute bottom-0 right-2 text-[9px] text-[#84939A]",children:"9:40 a.m"})]}),f=s(56868),telemedicine_PatientChart=e=>{var t;let{message:s}=e,l=null==s?void 0:null===(t=s.createdAt)||void 0===t?void 0:t.seconds,n=new Date(1e3*l),i=n.getHours(),r="0".concat(n.getMinutes()).slice(-2),c=n.getFullYear(),d="0".concat(n.getMonth()+1).slice(-2),h="0".concat(n.getDate()).slice(-2),x=i>=12?"PM":"AM";i=i>12?i-12:i;let m="".concat(i,":").concat(r," ").concat(x);"".concat(h,"/").concat(d,"/").concat(c);let renderImage=e=>(0,a.jsx)(o(),{src:e,alt:"Message",width:200,height:200,className:"h-full w-full"});return(0,a.jsx)(a.Fragment,{children:s.image?(0,a.jsxs)("div",{className:"relative ml-2 mt-2 w-96 rounded-md border-4 border-[#00a884] bg-[#F3FFFF]",children:[renderImage(s.image),s.text?(0,a.jsx)("p",{className:"mb-2 min-w-48 max-w-[72] bg-[#00a884] p-2 text-[14px] text-white",children:s.text}):null,(0,a.jsx)("p",{className:"absolute bottom-0 right-2 text-[12px] text-white",children:m})]}):s.fileName&&s.fileName.includes("image")?(0,a.jsx)("div",{className:"relative ml-2 mt-2 h-fit w-fit bg-[#00a884] px-6 py-4 text-white/60",children:(0,a.jsxs)("section",{className:"flex h-full w-full items-center justify-between bg-[#00a884]/60",children:[renderImage(s.file),(0,a.jsx)("a",{href:s.file,download:s.fileName,target:"_blank",rel:"noopener noreferrer",onClick:e=>{s.file||(e.preventDefault(),console.error("File URL not available:",s.file))},children:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"h-8 w-8 cursor-pointer rounded-full border border-white/60 p-2",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 13.5l3 3m0 0l3-3m-3 3v-6m1.06-4.19l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})})})]})}):s.fileName?(0,a.jsx)("div",{className:"relative ml-2 mt-2 w-96 bg-[#00a884] px-6 py-4 text-white/60",children:(0,a.jsxs)("section",{className:"flex h-[80%] w-[80%] items-center justify-between bg-[#00a884]/60",children:[(0,a.jsx)(f.Z,{}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("p",{className:"min-w-48 max-w-[72] text-[14px]",children:s.fileName}),(0,a.jsxs)("div",{className:"flex items-center ",children:[(0,a.jsxs)("p",{className:"min-w-48 max-w-[72] text-[14px]",children:[((null==s?void 0:s.fileSize)/1e3).toFixed(0)," kbs \xa0"]}),(0,a.jsxs)("p",{className:"min-w-48 max-w-[72] text-[14px]",children:[". \xa0",s.fileType]})]})]}),(0,a.jsx)("a",{href:s.file,download:s.fileName,target:"_blank",rel:"noopener noreferrer",onClick:e=>{s.file||(e.preventDefault(),console.error("File URL not available:",s.file))},children:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"h-8 w-8 cursor-pointer rounded-full border border-white/60 p-2",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 13.5l3 3m0 0l3-3m-3 3v-6m1.06-4.19l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})})})]})}):"string"==typeof s.audio?(0,a.jsxs)("div",{className:"relative ml-2 mt-2 w-96 bg-[#F3FFFF] px-6 py-4",children:[(0,a.jsxs)("audio",{controls:!0,children:[(0,a.jsx)("source",{src:s.audio,type:"audio/mpeg"}),"Your browser does not support the audio element."]}),(0,a.jsx)("p",{className:"absolute bottom-0 right-2 text-[9px] text-[#84939A]",children:m})]}):(0,a.jsxs)("div",{className:"relative ml-2 mt-2 w-96 bg-[#F3FFFF] px-6 py-4",children:[(0,a.jsx)("p",{className:"min-w-48 max-w-[72] text-[14px]",children:s.text}),(0,a.jsx)("p",{className:"absolute bottom-0 right-2 text-[9px] text-[#84939A]",children:m})]})})},telemedicine_ChartCard=e=>{let{setVideocall:t}=e,s=(0,u.v9)(e=>
1e.auth.user),[l,i]=(0,n.useState)([]),r=(0,n.useRef)(),[d,h]=(0,n.useState)([]),[x,p]=(0,n.useState)(!1),[w,g]=(0,n.useState)(null),[f,C]=(0,n.useState)(!1),[j,v]=(0,n.useState)(!1),[b,N]=(0,n.useState)(!1),[y,k]=(0,n.useState)(null);(0,n.useEffect)(()=>{let fetchMessages=async()=>{let e=(0,c.IO)((0,c.hJ)(m,"messages"),(0,c.Xo)("createdAt","desc"),(0,c.b9)(1e3)),t=(0,c.cf)(e,e=>{let t=[];e.forEach(e=>{let l=e.data();l._id.includes(s._id)&&t.push({...l,id:e.id})});let l=t.reverse();i(l)});return()=>t()};s&&fetchMessages()},[s]);let handleOpenCamera=async()=>{try{let e=await navigator.mediaDevices.getUserMedia({video:!0}),t=document.getElementById("videoElement");t&&(t.srcObject=e,p(!0)),p(!0)}catch(e){console.error("Error accessing camera:",e)}},[M,F]=(0,n.useState)("");(0,n.useEffect)(()=>{F(function(){let e=new Date,t=String(e.getDate()).padStart(2,"0"),s=String(e.getMonth()+1).padStart(2,"0"),l=String(e.getFullYear());return'"'.concat(t,"/").concat(s,"/").concat(l,'"')}())},[M]),(0,n.useEffect)(()=>{let e=[];l.forEach(t=>{var s;let l=null==t?void 0:null===(s=t.createdAt)||void 0===s?void 0:s.seconds,a=new Date(1e3*l),n=a.getFullYear(),i=a.getMonth()+1,r=a.getDate();r<10&&(r="0".concat(r)),i<10&&(i="0".concat(i));let o="".concat(r,"/").concat(i,"/").concat(n);e.push(o)}),h(e)},[l]),(0,n.useEffect)(()=>{M==d&&v(!0)},[d,M]);let L=Array.from(new Set(d));function dateformatter(e){let t=new Date(1e3*e),s=t.getHours(),l=t.getMinutes(),a=t.getFullYear(),n=t.getMonth()+1,i=t.getDate();s>12&&(s-=12),i<10&&(i="0".concat(i)),n<10&&(n="0".concat(n)),l<10&&(l="0".concat(l));let r="".concat(i,"/").concat(n,"/").concat(a);return r}return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:" h-fit w-full bg-[#EEF0F8] py-2 shadow-lg",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-6",children:[(0,a.jsxs)("div",{className:" flex w-fit min-w-fit items-center justify-start gap-2",children:[(0,a.jsx)(o(),{src:"/assets/images/woman1.png",alt:"Doctor's Profile",width:150,height:150,className:" max-h-[50px] max-w-[50px] rounded-[20px] ring-1 ring-[#6FDFE1] lg:p-px lg:ring-1"}),(0,a.jsx)("p",{className:"text-[16px] font-[700]",children:"Dr. Annie Mazuri"})]}),(0,a.jsxs)("div",{className:"mr-6 flex items-center gap-6",children:[(0,a.jsx)("svg",{width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M5 15H11M5 12H11M9.00038 1.00087C8.90484 1 8.79738 1 8.67471 1H4.2002C3.08009 1 2.51962 1 2.0918 1.21799C1.71547 1.40973 1.40973 1.71547 1.21799 2.0918C1 2.51962 1 3.08009 1 4.2002V15.8002C1 16.9203 1 17.4801 1.21799 17.9079C1.40973 18.2842 1.71547 18.5905 2.0918 18.7822C2.51921 19 3.079 19 4.19694 19L11.8031 19C12.921 19 13.48 19 13.9074 18.7822C14.2837 18.5905 14.5905 18.2842 14.7822 17.9079C15 17.4805 15 16.9215 15 15.8036V7.32568C15 7.20302 14.9999 7.09553 14.999 7M9.00038 1.00087C9.28583 1.00348 9.46572 1.01407 9.63818 1.05547C9.84225 1.10446 10.0379 1.18526 10.2168 1.29492C10.4186 1.41857 10.5918 1.59181 10.9375 1.9375L14.063 5.06298C14.4089 5.40889 14.5809 5.58136 14.7046 5.78319C14.8142 5.96214 14.8953 6.15726 14.9443 6.36133C14.9857 6.53379 14.9964 6.71454 14.999 7M9.00038 1.00087L9 3.80021C9 4.92031 9 5.48015 9.21799 5.90797C9.40973 6.2843 9.71547 6.59048 10.0918 6.78223C10.5192 7 11.079 7 12.1969 7H14.999",stroke:"#292D32",strokeOpacity:"0.6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M18.973 15.697C18.973 16.021 18.901 16.354 18.748 16.678C18.595 17.002 18.397 17.308 18.136 17.596C17.695 18.082 17.209 18.433 16.66 18.658C16.12 18.883 15.535 19 14.905 19C13.987 19 13.006 18.784 11.971 18.343C10.936 17.902 9.901 17.308 8.875 16.561C7.84 15.805 6.859 14.968 5.923 14.041C4.996 13.105 4.159 12.124 3.412 11.098C2.674 10.072 2.08 9.046 1.648 8.029C1.216 7.003 1 6.022 1 5.086C1 4.474 1.108 3.889 1.324 3.349C1.54 2.8 1.882 2.296 2.359 1.846C2.935 1.279 3.565 1 4.231 1C4.483 1 4.735 1.054 4.96 1.162C5.194 1.27 5.401 1.432 5.563 1.666L7.651 4.609C7.813 4.834 7.93 5.041 8.011 5.239C8.092 5.428 8.137 5.617 8.137 5.788C8.137 6.004 8.074 6.22 7.948 6.427C7.831 6.634 7.66 6.85 7.444 7.066L6.76 7.777C6.661 7.876 6.616 7.993 6.616 8.137C6.616 8.209 6.625 8.272 6.643 8.344C6.67 8.416 6.697 8.47 6.715 8.524C6.877 8.821 7.156 9.208 7.552 9.676C7.957 10.144 8.389 10.621 8.857 11.098C9.343 11.575 9.811 12.016 10.288 12.421C10.756 12.817 11.
1143 13.087 11.449 13.249C11.494 13.267 11.548 13.294 11.611 13.321C11.683 13.348 11.755 13.357 11.836 13.357C11.989 13.357 12.106 13.303 12.205 13.204L12.889 12.529C13.114 12.304 13.33 12.133 13.537 12.025C13.744 11.899 13.951 11.836 14.176 11.836C14.347 11.836 14.527 11.872 14.725 11.953C14.923 12.034 15.13 12.151 15.355 12.304L18.334 14.419C18.568 14.581 18.73 14.77 18.829 14.995C18.919 15.22 18.973 15.445 18.973 15.697Z",stroke:"#292D32",strokeOpacity:"0.6",strokeWidth:"2",strokeMiterlimit:"10"})}),(0,a.jsxs)("svg",{width:"25",height:"20",viewBox:"0 0 25 20",fill:"none",className:"cursor-pointer",onClick:()=>{t(!0)},xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M13.228 19H6.47266C3.09498 19 1.97266 16.7553 1.97266 14.5V5.5C1.97266 2.12233 3.09498 1 6.47266 1H13.228C16.6057 1 17.728 2.12233 17.728 5.5V14.5C17.728 17.8777 16.595 19 13.228 19Z",stroke:"#292D32",strokeOpacity:"0.6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M20.699 15.4482L17.7275 13.3638V6.61918L20.699 4.53486C22.1527 3.51942 23.3499 4.13937 23.3499 5.92441V14.0693C23.3499 15.8543 22.1527 16.4743 20.699 15.4482Z",stroke:"#292D32",strokeOpacity:"0.6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M12.1258 8.93321C13.0113 8.93321 13.7291 8.21538 13.7291 7.32989C13.7291 6.4444 13.0113 5.72656 12.1258 5.72656C11.2403 5.72656 10.5225 6.4444 10.5225 7.32989C10.5225 8.21538 11.2403 8.93321 12.1258 8.93321Z",stroke:"#292D32",strokeOpacity:"0.6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})]})]}),(0,a.jsx)("hr",{className:"mr-8 mt-[18px] w-full min-w-[120%] border border-[#D9D9D966]"}),(0,a.jsx)("div",{className:"flex justify-center",children:(0,a.jsx)("div",{className:"mt-4 w-fit bg-[#55F3F733] px-6 py-1 text-[14px] font-[400]",children:j?"Today":L.map((e,t)=>(0,a.jsx)("p",{className:"bg-[#3b4a54] p-2 text-center text-sm text-white/75",children:e},t))})}),(0,a.jsxs)("section",{className:"relative mt-4 flex h-[40vw] w-[98%] flex-col overflow-y-scroll",children:[x?(0,a.jsxs)("div",{className:"relative h-full w-full",children:[(0,a.jsx)("video",{id:"videoElement",autoPlay:!0,playsInline:!0,className:"h-full w-full"}),(0,a.jsx)("span",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-[#00a884] p-4",onClick:()=>{let e=document.getElementById("videoElement"),t=document.createElement("canvas");t.width=e.videoWidth,t.height=e.videoHeight;let s=t.getContext("2d");s.drawImage(e,0,0,t.width,t.height);let l=t.toDataURL("image/png");p(!1),g(l),C(!0)},children:(0,a.jsx)("svg",{viewBox:"0 0 24 24",height:"24",width:"24",preserveAspectRatio:"xMidYMid meet",className:"cursor-pointer text-white",version:"1.1",x:"0px",y:"0px",enableBackground:"new 0 0 24 24",children:(0,a.jsx)("path",{fill:"currentColor",d:"M21.317,4.381H10.971L9.078,2.45C8.832,2.199,8.342,1.993,7.989,1.993H4.905 c-0.352,0-0.837,0.211-1.078,0.468L1.201,5.272C0.96,5.529,0.763,6.028,0.763,6.38v1.878c0,0.003-0.002,0.007-0.002,0.01v11.189 c0,1.061,0.86,1.921,1.921,1.921h18.634c1.061,0,1.921-0.86,1.921-1.921V6.302C23.238,5.241,22.378,4.381,21.317,4.381z M12.076,18.51c-3.08,0-5.577-2.497-5.577-5.577s2.497-5.577,5.577-5.577s5.577,2.497,5.577,5.577 C17.654,16.013,15.157,18.51,12.076,18.51z M12.076,9.004c-2.17,0-3.929,1.759-3.929,3.929s1.759,3.929,3.929,3.929 s3.929-1.759,3.929-3.929C16.004,10.763,14.245,9.004,12.076,9.004z"})})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(telemedicine_DocChart,{}),L.map((e,t)=>(0,a.jsxs)(n.Fragment,{children:[(0,a.jsx)("p",{className:"my-2 w-fit self-center rounded bg-[#3b4a54] px-2 py-1 text-center text-sm text-white/75",children:dateformatter(Math.floor(Date.now()/1e3))===e?"Today":dateformatter(Math.floor(new Date().getTime()/1e3)-86400)===e?"Yesterday":"".concat(e)}),l.filter(t=>{var s;return dateformatter(null==t?void 0:null===(s=t.createdAt)||void 0===s?void 0:s.seconds)===e}).map(e=>(0,a.jsx)(telemedicine_PatientChart,{message:e},e.id))]},t))]}),f?(0,a.jsx)(Picture,{capturedImage:w,onClose:()=>C(!1),onSend:e=>{C(!1)}}):null]})]}),(0,a.jsx)("span",{ref:r}),(0,a.jsx)(telemedicine_SendMessage,{scroll:r,handleOpenCamera:handleOpenCamera,handleOpenFiles:()=>{N(!0)},setFile:k,file:y})]})},C=s(5152),j=s.n(C),telemedicine_Appointed=()=>{let e=j()(()=>Promise.all([s.e(2756),s.e(2344),s.e(8095),s.e(759)]).then(s.bind(s,47785)),{loadableGenerated:{webpack:()=>[47785]},ssr:!1}
1),[t,l]=(0,n.useState)(!1),[r,o]=(0,n.useState)(!0),toggleTime=()=>{o(e=>!e)};return(0,a.jsx)("div",{className:"flex h-[100vh] w-[100vw] flex-col bg-[#EEF0F8] md:h-full md:max-h-fit md:min-h-[70vw] md:flex-row",children:t?(0,a.jsx)(e,{}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{className:"order-2 h-full w-full overflow-y-scroll bg-[#F3FFFF] p-2 text-sm md:order-1 md:h-full md:min-h-[70vw] md:basis-[40%] md:text-base",children:[(0,a.jsx)(i.Z,{h1:"Appointment (s)"}),(0,a.jsx)("hr",{className:"mt-1 w-full border border-[#D9D9D966]"}),(0,a.jsx)("div",{className:"flex justify-center",children:(0,a.jsxs)("div",{className:"mt-8 flex w-fit gap-x-6 rounded-full border border-[#D9D9D966] bg-white px-2 py-1",children:[(0,a.jsxs)("button",{type:"button",onClick:toggleTime,className:"rounded-full px-6 py-1 ".concat(r?"bg-[#5BDADD] text-white":"bg-white"),children:["Upcoming"," "]}),(0,a.jsx)("button",{type:"button",onClick:toggleTime,className:"rounded-full px-12 py-1 ".concat(r?"bg-white":"bg-[#5BDADD] text-white"),children:"Past"})]})}),(0,a.jsx)("div",{className:"mt-8 flex justify-center ",children:r?(0,a.jsx)(telemedicine_AppointmentCard,{icon:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",className:"h-8 w-8",viewBox:"0 0 24 24",strokeWidth:"2.5",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 12a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H8.25m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H12m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0h-.375M21 12c0 4.556-4.03 8.25-9 8.25a9.764 9.764 0 01-2.555-.337A5.972 5.972 0 015.41 20.97a5.969 5.969 0 01-.474-.065 4.48 4.48 0 00.978-2.025c.09-.457-.133-.901-.467-1.226C3.93 16.178 3 14.189 3 12c0-4.556 4.03-8.25 9-8.25s9 3.694 9 8.25z"})}),btn1text:"Pending Approval",btn1color:"#FFCD5D"}):(0,a.jsxs)("div",{className:"flex w-[95%] flex-col space-y-4",children:[(0,a.jsx)(telemedicine_AppointmentCard,{icon:"Give Review",btn1text:"Successful",btn1color:"#23B66D"}),(0,a.jsx)(telemedicine_AppointmentCard,{btn1text:"Timed Out",btn1color:"#00000033",btn2text:"summary",btn2color:"#5BDADD"}),(0,a.jsx)(telemedicine_AppointmentCard,{btn1text:"Rejected",btn1color:"#FF0000"}),(0,a.jsx)(telemedicine_AppointmentCard,{btn1text:"Successful",btn1color:"#23B66D",btn2text:"summary",btn2color:"#5BDADD"})]})})]}),(0,a.jsx)("section",{className:"order-1 min-h-[600px] w-full bg-[#F3FFFF] md:order-2 md:h-full md:min-h-[70vw] md:basis-[60%] ",children:(0,a.jsx)(telemedicine_ChartCard,{setVideocall:l})})]})})}}},function(e){e.O(0,[2016,1046,8108,6650,8224,9774,2888,179],function(){return e(e.s=15884)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.