1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9ed4131f-1c55-412c-8721-cd578efbd77b",e._sentryDebugIdIdentifier="sentry-dbid-9ed4131f-1c55-412c-8721-cd578efbd77b")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3333],{28705:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/home/appointments/reschedule/[appointmentId]",function(){return n(72283)}])},72283:function(e,t,n){"use strict";n.r(t),n.d(t,{CabinetRescheduleSessionPage:function(){return I},__N_SSP:function(){return T},default:function(){return P}});var s=n(52322),i=n(5632),a=n(59969),o=n(19034),l=n.n(o),c=n(2784),d=n(59622),r=n(64986),m=n(76898),p=n(84192),x=n(3375),u=n(33616),f=n(55671),h=n(97588),b=n(65287),_=n(18723),v=n(54764),j=n.n(v),g=n(93869),w=n(37286);let N=e=>{let{isModalOpen:t,setIsModalOpen:n,appointment:i,selectedSlot:o}=e,l=(0,f.b)(),{t:c}=(0,h.$)(["cabinetComponents"]),r=(0,a.oR)({onSuccess:()=>{setTimeout(()=>{n(!1),(0,b.c)("/".concat(l,"/home/appointments/details/").concat(i.appointment_id))},300)}});return(0,s.jsx)(_.Z,{open:t,onClose:()=>n(!1),children:(0,s.jsx)("div",{className:"flex h-full items-center justify-center font-gilroy backdrop-blur",children:(0,s.jsxs)("div",{className:"mx-[10px] flex w-[333px] flex-col rounded-lg bg-white px-[22px] py-[15px] text-[16px] M:w-[372px]",children:[(0,s.jsx)("div",{className:"text-center font-gilroy text-[22px] font-bold L:text-[34px]",children:c("cabinetComponents:attention")}),(0,s.jsx)("div",{className:"mb-8 mt-1.5 text-center font-gilroy",children:c("cabinetComponents:areYouSureYouWantToReschedule")}),(0,s.jsxs)("div",{className:"mb-3 flex gap-1",children:[(0,s.jsx)("div",{className:"min-w-[93px] font-bold",children:c("cabinetComponents:oldTime")}),(0,s.jsxs)("div",{className:"flex flex-wrap",children:[(0,s.jsx)("div",{children:(0,m.p6)(j()(i.appointment_start_time),l)}),(0,s.jsx)("div",{children:", ".concat((0,m.mr)(j()(i.appointment_start_time)))})]})]}),(0,s.jsxs)("div",{className:"flex gap-1",children:[(0,s.jsx)("div",{className:"font-bold",children:c("cabinetComponents:therapist")}),(0,s.jsx)("div",{children:i.worker_name})]}),(0,s.jsx)("div",{className:"mx-auto my-[24px] h-[1px] w-[317px] bg-stroke"}),(0,s.jsxs)("div",{className:"mb-6 flex gap-1",children:[(0,s.jsx)("div",{className:"font-bold",children:c("cabinetComponents:newTime")}),(0,s.jsx)("div",{children:"".concat((0,m.p6)((0,g.KU)(o.slot_start),l),", ").concat((0,m.zT)((0,g.KU)(o.slot_start),l))})]}),(0,s.jsxs)("div",{className:"flex w-[238px] flex-col items-center self-center L:w-[300px]",children:[(0,s.jsx)(w.ZP,{className:"mb-[10px] w-full",disabled:r.isPending||r.isSuccess,onClick:()=>{(0,d.qi)(e.appointment,l)?r.mutate({queryParams:{configId:l,appointmentId:i.appointment_id,newStartTime:(0,m.Ep)((0,g.KU)(o.slot_start))}}):location.reload()},children:c("cabinetComponents:rescheduleAppointment")}),(0,s.jsx)(w.ZP,{className:"!h-11 w-full",buttonType:"text",onClick:()=>n(!1),disabled:r.isPending||r.isSuccess,children:c("cabinetComponents:back")})]})]})})})},y=e=>{var t,n;let i=(0,f.b)(),{t:a}=(0,h.$)(["cabinetComponents","appointmentsPage"]),[o,_]=(0,c.useState)(!1),[v,j]=(0,c.useState)(null),g=(0,p.ry)({config_id:i,service_name:x.d8[e.appointment.service_id],worker_id:e.appointment.worker_id}),w=(0,c.useMemo)(()=>{var e;return(null===(e=g.data)||void 0===e?void 0:e.slots_start_time)&&0!==g.data.slots_start_time.length?Array.from(new Set([...g.data.slots_start_time.map(e=>e.substring(0,10))])):[]},[null===(t=g.data)||void 0===t?void 0:t.slots_start_time]),y=(0,c.useMemo)(()=>{var t;return(null===(t=g.data)||void 0===t?void 0:t.slots_start_time)&&0!==g.data.slots_start_time.length?g.data.slots_start_time.map(t=>({slot_start:t,slot_end:(0,p.gw)(t,x.d8[e.appointment.service_id]).toISOString()})):[]},[null===(n=g.data)||void 0===n?void 0:n.slots_start_time]);return(0,s.jsxs)("div",{className:"mx-[21px] flex max-w-[372px] flex-grow flex-col items-center L:mx-0",children:[!!v&&(0,s.jsx)(N,{isModalOpen:o,setIsModalOpen:_,appointment:e.appointment,selectedSlot:v}),(0,s.jsxs)("div",{className:"flex flex-col items-center rounded-[22px] L:mb-6 L:max-w-[460px] L:shadow-heavy",children:[(0,s.jsxs)("div",{className:"mt-11 w-[335px] L:mx-[63.5px]",children:[(0,s.jsxs)("div",{className:"font-gilroy text-[16px]",children:[(0,s.jsx)("div",{className:"mb-[18px] text-center text-[18px] font-bold",children:a("cabinetComponents:appointmentRescheduling")}),(0,s.jsxs)("div",{className:"mb-3 flex min-w-[93px] gap-1",children:[(0,s.jsx)("div",{className:"font-bold",children:a("cabinetComponents:oldTime")}),(0,s.jsx)("div",{children:(0,m.o0)(l()(e.appointment.appointment_start_time),i)})]}),(0,s.jsxs)("div",{className:"mb-6 flex gap-1",children:[(0,s.jsx)("div",{className:"font-bold",children:a("cabinetComponents:therapist")}),(0,s.jsx)("div",{children:e.appointment.worker_name})]})]}),(0,s.jsx)("div",{className:"mx-auto my-[24px] h-[1px] w-[317px] bg-stroke"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-gilroy font-bold",children:a("cabinetComponents:newTime")}
1),(0,s.jsx)(r.E,{dates:w,slots:y,service_id:e.appointment.service_id,isNewCabinet:!0,onSelectSlot:t=>{(0,d.qi)(e.appointment,i)?(j(t),_(!0)):location.reload()}})]})]}),(0,s.jsx)(u.Yd,{variant:"text",onClick:()=>{(0,b.c)("/".concat(i,"/home/appointments/details/").concat(e.appointment.appointment_id))},className:"mb-6",children:a("cabinetComponents:back")})]})]})};var C=n(94117),k=n(71369),S=n(27692),T=!0;let I=()=>{let e=(0,i.useRouter)(),{appointmentId:t}=e.query,n=(0,f.b)(),{t:o}=(0,h.$)(["cabinetComponents"]),{isError:l,isPending:c,data:d}=(0,a.BK)(n,t);return l?(0,s.jsx)(s.Fragment,{children:"Error fetching appointment"}):c?(0,s.jsx)(k.T,{}):(0,s.jsx)(C.cu,{headerTitle:o("cabinetComponents:appointmentRescheduling"),children:(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("div",{className:"mb-6 flex items-center",children:[(0,s.jsx)("div",{className:"mr-6 cursor-pointer",onClick:()=>e.back(),children:(0,s.jsx)("img",{src:S,alt:"back_arrow"})}),(0,s.jsx)("div",{className:"mt-[2px] font-gilroy text-[18px] font-bold L:text-[22px]",children:o("cabinetComponents:appointmentRescheduling")})]}),(0,s.jsx)("div",{className:"flex w-full justify-center",children:(0,s.jsx)(y,{appointment:d})})]})})};var P=I}},function(e){e.O(0,[1409,58,947,8223,421,4614,8293,4846,7765,8723,3354,3289,6469,1400,3616,1660,1441,926,5501,3920,3392,2888,9774,179],function(){return e(e.s=28705)}),_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.