PageSourceSearch

https://assets.pharmeasy.in/web-assets/_next/static/chunks/6715-eb385f11e3d4c4b1.js

js pharmeasy.in collected 2026-09-24 08:57:46 UTC 7,336 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6715],{46715:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return O}});var n=i(85893),r=i(67294),a=i(32020),s=i(77426),c=i(10190),l=i(68789),o=i(55202),d=i(30344),_=i(76408),p=i(34190),x=i.n(p),h=e=>{let{loadMore:t}=e;return(0,n.jsx)(d.Z,{handleinview:t,threshold:.02,once:!1,className:x().loader,elemId:"rx-infinite-loader",children:(0,n.jsx)(_.Z,{size:30})})},u=i(93832),m=i(70595),g=i.n(m),P=e=>{let{heading:t,onBackClick:i,className:r=""}=e;return(0,n.jsxs)("div",{className:"".concat(g().header," ").concat(r),children:[(0,n.jsx)(u.S7,{className:g().backIcon,onClick:i}),t]})},v=i(75622),b=i(24957),j=i(16171),C=i.n(j),L=e=>{let{id:t,name:i,onClick:a,icon:s}=e;return(0,n.jsx)(v.Z,{tagName:"li",className:C().container,onClick:()=>{a({id:t,name:i})},children:(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)("div",{className:C().icon,children:s?(0,n.jsx)(b.Z,{src:s,alt:"patient_icon",height:"40",width:"40"}):(null==i?void 0:i.charAt(0))||"P"}),(0,n.jsx)("div",{className:C().name,children:i}),(0,n.jsx)("div",{className:C().chevron,children:(0,n.jsx)(b.Z,{alt:"right",src:"https://assets.pharmeasy.in/web-assets/images/chevronRight.svg",width:24,height:24})})]})})},k=(0,r.memo)(e=>{let{patientList:t=[],handlePatientSelect:i,onBackClick:a,isMobile:s}=e;return(0,n.jsxs)(r.Fragment,{children:[s&&(0,n.jsx)(P,{heading:"Upload Prescription",onBackClick:a}),(0,n.jsx)(L,{id:"all",name:"All Prescriptions",icon:"https://assets.pharmeasy.in/web-assets/images/allRx.svg",onClick:i}),Array.isArray(t)&&t.map(e=>(0,n.jsx)(L,{id:e.id,name:e.name,onClick:i},e.id))]})}),f=i(82776),N=i(19998),S=i(25675),w=i.n(S),y=i(13310),B=i(46490),D=i.n(B),M=e=>{let{id:t,url:i,onSelect:r,isSelected:a,onClick:s}=e;return(0,n.jsxs)("div",{className:D().container,children:[(0,n.jsx)("div",{className:D().imageContainer,children:(0,n.jsx)(w(),{src:i,alt:"prescription",fill:!0,className:D().prescriptionImg,onClick:()=>{s({id:t,url:i})},loader:y.qM})}),(0,n.jsx)("input",{type:"checkbox",name:"selected_rx",id:"selected_rx_".concat(t),onChange:e=>{var i;r({id:t,selected:null===(i=e.target)||void 0===i?void 0:i.checked})},className:D().checkbox,checked:a}),(0,n.jsxs)("label",{htmlFor:"selected_rx_".concat(t),className:D().label,children:[a?"Selected":"Select",(0,n.jsx)(u.Ye,{fill:"#10847e",className:D().tick})]})]})},T=i(79724),Z=i.n(T);let A={defaultHeading:"Select Prescription",dateText:"Uploaded on "};var H=e=>{let{patient:{name:t},rxList:i,onBackClick:a,loading:s,selectPrescription:c,selectedPrescription:l,isMobile:o}=e,[d,_]=(0,r.useState)([]),[p,x]=(0,r.useState)({id:"",url:""}),[h,u]=(0,r.useState)(!1),m=(0,f._P)(),g=e=>{let{id:t,selected:i}=e;i?_([...d,t]):-1!==d.indexOf(t)&&_(e=>e.filter(e=>e!==t)),c(t,"past_prescriptions")},v=e=>{x(e),u(!0)};return(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)(P,{heading:t||A.defaultHeading,onBackClick:a,className:Z().heading}),(0,n.jsx)("div",{className:"".concat(Z().rxList," ").concat(m?Z().rxListExtraBottomSpace:""),children:(null==i?void 0:i.length)?null==i?void 0:i.map(e=>{var t,i;return(null==e?void 0:null===(t=e.images)||void 0===t?void 0:t.length)&&(0,n.jsxs)(r.Fragment,{children:[(0,n.jsxs)("h6",{className:Z().dateText,children:[A.dateText,(0,n.jsx)("b",{className:Z().date,children:null==e?void 0:e.date})]}),(0,n.jsx)("div",{className:Z().list,children:null==e?void 0:null===(i=e.images)||void 0===i?void 0:i.map(e=>(0,n.jsx)(M,{id:null==e?void 0:e.id,url:null==e?void 0:e.url,onSelect:g,isSelected:l.indexOf(null==e?void 0:e.id)>-1,onClick:v},null==e?void 0:e.id))})]},null==e?void 0:e.date)}):!s&&(0,n.jsx)("h5",{className:Z().errMsg,children:"Sorry! You don't have any past prescriptions"})}),(0,n.jsx)(N.Z,{open:h,onClose:()=>{u(!1)},headerText:"Prescription Viewer",initialSlide:0,images:[p],isMobile:o})]})};let I={teleConsult:"TELECONSULT"};var O=(0,r.memo)(e=>{let t=(0,a.v9)(e=>{var t;return null!==(t=e.device.isMobile)&&void 0!==t&&t}),{isOpen:i,onClose:d,selectPrescription:_,selectedPrescription:p,showTeleConsultRx:u}=e,[m,g]=(0,r.useState)(!1),[P,v]=(0,r.useState)(!1),[b,j]=(0,r.useState)({id:"",name:""}),[C,L]=(0,r.useState)({patientList:[],page:1}),[f,N]=(0,r.useState)([]),[S,w]=(0,r.useState)(!1),y=(0,a.I0)(),B=()=>{y((0,c.yL)(C.page)).then(e=>{Array.isArray(e)&&(null==e?void 0:e.length)>0?(L(t=>({patientList:[...t.patientList,...e],page:t.page+1})),(null==e?void 0:e.length)<10&&w(!1)):w(!1)}).catch(()=>{w(!1)})},D=e=>{let t=u?I.teleConsult:"";y((0,l.ng)(e,t)).then(e=>{N((null==e?void 0:e.prescriptions)||[])}).finally(()=>{w(!1)})};(0,r.useEffect)(()=>{g(!0),w(!0)},[]),(0,r.useEffect)(()=>{N([]),w(!0)},[b.name]);let M=p.length<=0;return m&&(0,n.jsxs)(s.default,{name:"Past_Prescription_Drawer",isOpen:i,onClose:d,title:"Select Patient",position:t?"bottom":"right",classes:{content:"".concat(x().content," ").concat(P?x().rxListContent:""),header:x().header,innerWrapper:x().innerWrapper},hideHeader:t||P,fullHeight:!0,children:[P?(0,n.jsx)(H,{patient:b,loading:S,rxList:f,onBackClick:()=>{v(!1),w(!0)},selectPrescription:_,selectedPrescription:p,isMobile:t}):(0,n.jsx)(k,{patientList:C.patientList,handlePatientSelect:e=>{let{id:t,name:i}=e;t===b.id&&w(!1),D(t),v(!0),j({id:t,name:i})},onBackClick:d,isMobile:t}),P&&(0,n.jsx)(o.Z,{cta:"Upload and continue",type:"button",onClick:d,style:{btn:x().btnContainer,btntxt:M?x().isDisable:x().txt},disabled:M}),S&&(0,n.jsx)(h,{loadMore:()=>{P?D(b.id):B()}})]})})},55202:function(e,t,i){"use strict";var n=i(85893),r=i(94055),a=i(29206),s=i.n(a);t.Z=e=>{let{cta:t,type:i,style:a,onClick:c,disabled:l=!1,loading:o=!1}=e;return(0,n.jsx)("div",{className:"".concat(s().btnContainer," ").concat(a.btn),children:(0,n.jsx)(r.Z,{disabled:l,loading:o,type:i,onClick:e=>{null==c||c(e)},className:"".concat(s().btn," ").concat(a.btntxt),children:t})})}},34190:function(e){e.exports={header:"PastPrescriptionDrawer_header__KiJuV",innerWrapper:"PastPrescriptionDrawer_innerWrapper__RaUHH",content:"PastPrescriptionDrawer_content__NwrTa",rxListContent:"PastPrescriptionDrawer_rxListContent__LNALT",btnContainer:"PastPrescriptionDrawer_btnContainer__Ahmq3",loader:"PastPrescriptionDrawer_loader__pwuxJ",txt:"PastPrescriptionDrawer_txt__USjL9",isDisable:"PastPrescriptionDrawer_isDisable__gz4q9"}},70595:function(e){e.exports={header:"DrawerHeader_header__NbV71",backIcon:"DrawerHeader_backIcon__i_CIy"}},16171:function(e){e.exports={container:"PatientBox_container__bSsD2",icon:"PatientBox_icon__J_ifx",name:"PatientBox_name__qBZpM",chevron:"PatientBox_chevron__XIxiv"}},46490:function(e){e.exports={container:"Prescription_container__l4gqh",imageContainer:"Prescription_imageContainer__uFScP",prescriptionImg:"Prescription_prescriptionImg__8OnHy",label:"Prescription_label__ATJMU",checkbox:"Prescription_checkbox__KPaU2",tick:"Prescription_tick__0yCUp"}},79724:function(e){e.exports={heading:"PrescriptionList_heading__UbV4L",rxList:"PrescriptionList_rxList__8zSO0",rxListE
1xtraBottomSpace:"PrescriptionList_rxListExtraBottomSpace__FxBHS",dateText:"PrescriptionList_dateText__t05Wm",date:"PrescriptionList_date__v0fPm",list:"PrescriptionList_list__geYtW",endOfList:"PrescriptionList_endOfList__KgO5r",errMsg:"PrescriptionList_errMsg__POVsA"}},29206:function(e){e.exports={btnContainer:"ProceedButton_btnContainer__351zo",btn:"ProceedButton_btn__BZNLg"}}}]);

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.