1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[4734],{6204:function(e,t,n){n.d(t,{R:function(){return c},W:function(){return i}});var a=n(20834),r=n(54490),l=n(17599),i=function(){var e=l.parse((0,r.Vd)()?window.location.search:""),t=JSON.parse((0,a.E)(e.p));return t.nextAvailableAppointmentDate=new Date(t.nextAvailableAppointmentDate),t},c=function(e){return e.map(function(e){return{description:e.description,healthCarerId:e.health_carer.id,professionId:e.health_carer.professional_id,imgSrc:e.profile_url,name:e.health_carer.name,tags:e.themes}})}},12645:function(e,t){t.A="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2aWV3Qm94PSIwIDAgNjM2IDExMiIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDxnIGlkPSJMYW5kaW5nLVBhZ2Ut4oCTLU1vYmlsZSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9IkRlc2t0b3AiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xOTMuMDAwMDAwLCAtNzM4LjAwMDAwMCkiIGZpbGw9IiMxRDE3NDIiPgogICAgICAgICAgICA8cGF0aCBkPSJNMjAxLDczOCBMNTExLDczOCBMNTExLDczOCBMODIxLDczOCBDODI1LjQxODI3OCw3MzggODI5LDc0MS41ODE3MjIgODI5LDc0NiBMODI5LDc3NS4wMTc0NjcgTDgyOSw3NzUuMDE3NDY3IEM3OTUuMTM4ODg5LDc5Ni4zNjA4NzIgNzMxLjA5NzIyMiw4MTEuMDM0NDYzIDYzNi44NzUsODE5LjAzODIzOSBDNDk1LjU0MTY2Nyw4MzEuMDQzOTA0IDMzMi4xMjUsODU1LjA1NTIzNSAyNjguMDgzMzMzLDg0OS4wNTI0MDIgQzIyNS4zODg4ODksODQ1LjA1MDUxNCAyMDAuMzYxMTExLDg0MS4zODIxMTYgMTkzLDgzOC4wNDcyMDkgTDE5Myw3NDYgQzE5Myw3NDEuNTgxNzIyIDE5Ni41ODE3MjIsNzM4IDIwMSw3MzggWiIgaWQ9IlBhdGgtMi1Db3B5Ij48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4K"},20834:function(e,t,n){n.d(t,{E:function(){return a},n:function(){return r}});var a=atob,r=btoa},27647:function(e,t,n){n.d(t,{Rs:function(){return s},iG:function(){return o}});var a=n(33498),r=n(20834),l=n(92517),i=n(64810),c=n(17599),o=function(e){var t,n=l.A.getToken();(0,i.navigate)(e.path+"?"+c.stringify((t=Object.assign({token:n},e.queryParam),{p:(0,r.n)(JSON.stringify(t))})),{state:null==e?void 0:e.state})},s=function(e){var t=l.A.getToken();(0,i.navigate)(a.F.preUserStart.path+"?"+c.stringify(function(e){return{t:(0,r.n)(JSON.stringify(e))}}({t:t})),e)}},33498:function(e,t,n){n.d(t,{F:function(){return a}});var a={telehealthProfile:{name:"Perfil",path:"/teleatendimento/"},preUserStart:{name:"Teleconsultas",path:"/pre-user/teleatendimento/inicio/"},preUserSchedule:{name:"Agendamento de consultas",path:"/pre-user/teleatendimento/agendar/"},preUserHcpProfile:{name:"Agendamento de consultas",path:"/pre-user/teleatendimento/"},preUserRegister:{name:"Agendamento",path:"/pre-user/teleatendimento/registrar/"}}},54587:function(e,t,n){n.d(t,{b8:function(){return c},is:function(){return o},ph:function(){return s}});var a=n(53943),r=n(42807),l=n(6853),i=n(12645).A,c=(0,l.default)(r.Ox).withConfig({displayName:"person-card-templatecomponentstyle__PersonCardTemplateStyled",componentId:"sc-9o7o9v-0"})(["display:flex;flex-direction:column;height:calc(100% - ",");background-image:",";background-size:100% 114px;background-repeat:no-repeat;background-position:top;"],a.Kz.Medium,function(e){return"regular"===e.theme.name?"url("+i+")":"none"}),o=l.default.div.withConfig({displayName:"person-card-templatecomponentstyle__PersonCardTemplateImgStyled",componentId:"sc-9o7o9v-1"})(["height:","px;width:","px;margin:"," auto ",";"],136,136,a.Kz.XXLarge,a.Kz.Large),s=l.default.img.withConfig({displayName:"person-card-templatecomponentstyle__ProfileImage",componentId:"sc-9o7o9v-2"})(["border-radius:50%;width:126px;"])},75784:function(e,t,n){n.r(t);var a=n(24148),r=n(33498),l=n(50198),i=n(92517),c=n(87487),o=n(64810),s=n(24755),u=n(17599),d=n(14041),m=n(27647),p=n(97436),f=n(6204);t.default=function(e){var t,n,g,h=(0,s.useTranslation)("teleconsulta").t,I=d.useRef((0,c.o)()),D=null!==(t=null===(n=e.data)||void 0===n||null===(g=n.hasura.health_carer_telehealth)||void 0===g?void 0:g[0])&&void 0!==t?t:{},v=D.education,E=D.approaches,A=D.themes,x=D.full_description,M=D.health_carer,S=D.profile_url,b=d.useState({preUserId:"",token:"",davId:"",nextAvailableAppointmentDate:new Date}),_=b[0],N=b[1];d.useEffect(function(){try{var e=(0,f.W)();e.preUserId||(0,o.navigate)(-1),i.A.setToken(e.token),N(e)}catch(t){console.error("ERROR: agendar.tsx:23 ~ React.useEffect ~ error",t),(0,o.navigate)(-1)}},[]);return d.createElement(l.A,e,d.createElement(p.A,{user:{id:null==_?void 0:_.preUserId,hasDavId:!(null==_||!_.davId)},hcp:{id:M.id,profileUrl:S,name:M.name,professionalId:M.professional_id,appointmentDurationInMinutes:a.qP,fullDescription:x,themes:A,approaches:E,education:v},nextAvailableAppointmentDate:_.nextAvailableAppointmentDate.toISOString(),datasource:I.current,handleScheduleSuccess:function(){(0,o.navigate)(r.F.preUserStart.path+"?"+u.stringify({t:i.A.getToken()}),{state:{flashMessage:h("schedule_success_message"),flashType:"success"}})},onRedirectRegisterPageClick:function(e){(0,m.iG)({path:r.F.preUserSchedule.path,queryParam:{preUserId:_.preUserId,hcpId:M.id,hcpName:M.name,nextAvailableAppointmentDate:_.nextAvailableAppointmentDate,date:e.date.toISOString(),time:e.time}})}}))}},97436:function(e,t,n){n.d(t,{A:function(){return M}});var a=n(24148),r=n(53943),l=n(82336),i=n(24755),c=n(14041),o=n(6853).default.ul.withConfig({displayName:"hcp-profile-descritionstyle__HcpProfileDescriptionSectionUL",componentId:"sc-bp2na5-0"})(["margin-top:0;"]),s=function(e){var t=e.title,n=e.items;return n&&0!==(null==n?void 0:n.length)?c.createElement(r.fI,null,c.createElement(r.fv,{xs:12,md:3},c.createElement(r.H3,null,t)),c.createElement(r.fv,{xs:12,md:6},c.createElement(o,null,n.map(function(e,t){return c.createElement("li",{key:t},e)})))):null},u=n(54587),d=function(e){var t=(0,i.useTranslation)("teleconsulta").t;return c.createElement(r.fv,{xs:12,md:6},c.createElement(r.fI,{center:"xs",mb:!0},c.createElement(r.fv,{xs:12,md:5},c.createElement(u.ph,{src:e.profileUrl,alt:t("profile_header_photo_alt",{name:e.hcpName})})),c.createElement(r.fv,{xs:12,md:7},c.createElement(r.H2,null,e.hcpName),c.createElement(r.nB,null,t("profile_header_crp",{id:e.professionalId})," "),c.createElement(r.BS,null,t("profile_header_duration",{minutes:a.qP})," "))),c.createElement(r.wv,null),e.fullDescription&&c.createElement(r.nB,null,c.createElement("p",{dangerouslySetInnerHTML:{__html:e.fullDescription}})))},m=n(86330),p=n(75799),f=n.n(p),g=n(90171),h=n(51059),I=n(44530),D=n(60532),v=n(54991),E=n(36071),A=n(59914),x=function(e){var t=e.datasource,n=e.userId,a=e.hcpId,l=e.onRedirectRegisterPageClick,o=e.nextAvailableAppointmentDate,s=e.onScheduleSuccess,u=e.userHasDavId,d=(0,i.useTranslation)("teleconsulta").t,p=(0,A.j8)(t,a,o),x=p.data,M=p.error,S=p.loading;c.useEffect(function(){M&&console.error("ERROR: payment-options.tsx:315 ~ useHealthCarerAgenda error: "+M+", data: "+x+", hcpId: "+a+" nextAvailableAppointmentDate: "+o)},[M]);var b=c.useState(),_=b[0],N=b[1],w=(0,A.P)({datasource:t,onSuccess:s,onUserDoesntExistOnDavError:function(){return l(_)}}),O=w[0],y=w[1].loading,z=function(){var e=(0,m.A)(f().mark(function e(t){var r;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(N(t),!u){e.next=5;break}return e.prev=1,e.next=2,O(Object.assign({},t,{userId:n,hcpId:a}));case 2:e.next=4;break;case 3:e.prev=3,r=e.catch(1),console.error("ERROR: schedule-on-profile.wrapper.tsx:58 ~ handleScheduleSubmit ~ error:",r);case 4:e.next=6;break;case 5:l(t);case 6:case"end":return e.stop()}},e,null,[[1,3]])}
1));return function(t){return e.apply(this,arguments)}}(),C=null==x?void 0:x.available_start_date_time;return c.createElement(v.G,{loading:S,error:!!M,data:!!C},c.createElement(v.G.Shimmer,null,c.createElement(r.fI,{mb:!0,center:"xs"},c.createElement(r.fv,{xs:12,md:10},c.createElement(h.G,{noMarginTop:!0,title:d("schedule_appointment_title")}),c.createElement(r.wv,null),c.createElement(D.Oi,null),c.createElement(I.Fw,{height:"16px",margin:"46px 0 0 0"}),c.createElement(r.wv,null),c.createElement(g.F,null,Array(5).fill(1).map(function(e,t){return c.createElement(D.LB,{key:t,width:"90px",height:"51px",margin:"0 8px 8px 0"})})),c.createElement(r.wv,null),c.createElement(D.e6,null)))),c.createElement(v.G.Error,null,c.createElement(c.Fragment,null)),c.createElement(E.u,{title:d("schedule_appointment_title"),initialDate:new Date(null==C?void 0:C[0]),schedulableDates:null==C?void 0:C.map(function(e){return new Date(e)}),onSubmit:z,submitLoading:y}))},M=function(e){var t=(0,i.useTranslation)("teleconsulta").t,n=e.hcp,o=e.user,u=e.datasource;return c.createElement(c.Fragment,null,c.createElement(r.wv,null),c.createElement(r.xA,null,c.createElement(r.fI,{between:"xs"},c.createElement(d,{profileUrl:n.profileUrl,hcpName:n.name,professionalId:n.professionalId,appointmentDurationInMinutes:a.qP,fullDescription:n.fullDescription}),c.createElement(l.I,{defaultMinWidth:"64em"},function(t){return t?null:c.createElement(r.fv,{xs:12,md:6},c.createElement(x,{datasource:u,userId:o.id,hcpId:n.id,nextAvailableAppointmentDate:e.nextAvailableAppointmentDate,userHasDavId:o.hasDavId,onScheduleSuccess:e.handleScheduleSuccess,onRedirectRegisterPageClick:e.onRedirectRegisterPageClick}))})),c.createElement(r.vI,null),c.createElement(s,{title:t("telehealth_profile_themes"),items:n.themes}),c.createElement(r.wv,null),c.createElement(s,{title:t("telehealth_profile_approaches"),items:n.approaches}),c.createElement(r.wv,null),c.createElement(s,{title:t("telehealth_profile_education"),items:n.education}),c.createElement(l.I,{defaultMinWidth:"64em"},function(t){return t?c.createElement(r.fI,{between:"xs"},c.createElement(r.fv,{xs:12},c.createElement(x,{datasource:u,userId:o.id,hcpId:n.id,nextAvailableAppointmentDate:e.nextAvailableAppointmentDate,userHasDavId:o.hasDavId,onScheduleSuccess:e.handleScheduleSuccess,onRedirectRegisterPageClick:e.onRedirectRegisterPageClick}))):null})),c.createElement(r.wv,null))}}}]); 2//# sourceMappingURL=component---src-modules-telehealth-profile-telehealth-profile-web-tsx-44433333984539a1b5ac.js.map
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.