1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8989],{7874:function(e,t,n){"use strict";var s=n(83464),a=n(39942);let r=s.Z.create({baseURL:"https://apiv2.evital.com.tr",headers:{"Content-Type":"application/json","Accept-Language":"tr-TR"}});r.interceptors.request.use(e=>{let t=sessionStorage.getItem("token");return t&&(e.headers.Authorization="Bearer ".concat(t)),e}),r.interceptors.response.use(e=>e,(0,a.d$)(r)),t.Z=r},91164:function(e,t,n){"use strict";var s=n(83464),a=n(39942);let r=s.Z.create({baseURL:"https://finans-apiv2.evital.com.tr/api/v1",headers:{"Content-Type":"application/json","Accept-Language":"tr-TR"}});r.interceptors.request.use(e=>{let t=sessionStorage.getItem("token");return t&&(e.headers.Authorization="Bearer ".concat(t)),e}),r.interceptors.response.use(e=>e,(0,a.d$)(r)),t.Z=r},39942:function(e,t,n){"use strict";n.d(t,{d$:function(){return f}});var s=n(83464),a=n(82776),r=n(5851),i=n(8363);let l=null,o=!1,c=s.Z.create({baseURL:"https://auth-apiv2.evital.com.tr",headers:{"Content-Type":"application/json","Accept-Language":"tr-TR",os:"patient-web"}}),u=async()=>{try{let{data:e}=await c.post("/api/Common/login-refresh-token",{refresh_token:a.Z.getItem("refreshToken")});return e.data.accessToken}catch(e){throw r.Z.error("Failed to refresh token",e),Error("Failed to refresh token")}},d=()=>{["token","refreshToken","expiration","a-storage"].forEach(e=>{sessionStorage.removeItem(e),localStorage.removeItem(e)}),i.Z.setState({isLoggedIn:!1,token:null,profile:null,userId:null})},m=()=>{d(),o||window.location.pathname.startsWith("/auth/sign-in")||(o=!0,window.location.replace("/auth/sign-in"))},p=()=>(l||(l=u().finally(()=>{l=null})),l),f=e=>async t=>{var n,s;let r=t.config;if((null===(n=t.response)||void 0===n?void 0:n.status)!==401)return Promise.reject(t);let l=a.Z.getItem("refreshToken"),o=null==r?void 0:null===(s=r.url)||void 0===s?void 0:s.includes("login-refresh-token");if(l&&r&&!r._retry&&!o){r._retry=!0;try{let n=await p();if(!n)return m(),Promise.reject(t);return a.Z.setItem("token",n),i.Z.setState(e=>({token:e.token?{...e.token,accessToken:n}:{accessToken:n}})),r.headers.Authorization="Bearer ".concat(n),e(r)}catch(e){}}return m(),Promise.reject(t)};c.interceptors.response.use(e=>e,f(c)),c.interceptors.request.use(e=>{let t=a.Z.getItem("token");return t&&(e.headers.Authorization="Bearer ".concat(t)),e}),t.ZP=c},91434:function(e,t,n){"use strict";var s=n(83464),a=n(39942);let r=s.Z.create({baseURL:"https://notification-apiv2.evital.com.tr/api",headers:{"Content-Type":"application/json"}});r.interceptors.request.use(e=>{let t=sessionStorage.getItem("token");return t&&(e.headers.Authorization="Bearer ".concat(t)),e}),r.interceptors.response.use(e=>e,(0,a.d$)(r)),t.Z=r},5851:function(e,t,n){"use strict";var s=n(11393),a=n.n(s);class r{static error(e){for(var t=arguments.length,n=Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];console.error(a().red("[ERROR] ".concat(e)),n)}static warning(e){}static info(e){for(var t=arguments.length,n=Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s]}static log(e){}}t.Z=r},82776:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});class s{getItem(e){return sessionStorage.getItem(e)||localStorage.getItem(e)}setItem(e,t){sessionStorage.getItem("remember_me_active"),sessionStorage.setItem(e,t)}}let a=new s},96967:function(e,t,n){"use strict";n.d(t,{d:function(){return o}});var s=n(57437),a=n(2265),r=n(8363),i=n(65098);let l=(0,a.createContext)(void 0);function o(e){let{children:t}=e,[n,o]=(0,a.useState)(!1),{userId:c,profile:u}=(0,r.Z)(e=>({userId:e.userId,profile:e.profile})),{fetchPatientProfile:d}=(0,i.Z)();return(0,a.useEffect)(()=>{c&&!u&&d()},[]),(0,a.useEffect)(()=>{"true"===sessionStorage.getItem("isLoggedIn")&&o(!0)},[]),(0,s.jsx)(l.Provider,{value:{isLoggedIn:n,setIsLoggedIn:e=>{o(e),localStorage.setItem("isLoggedIn",e.toString())}},children:t})}},24603:function(e,t,n){"use strict";var s=n(3166),a=n(8363),r=n(63888),i=n(50571),l=n(31757);t.Z=()=>{let{setOpenMiniModal:e}=(0,r.Z)(),{openModal:t,handleModal:n,openHambMenuModal:o,handleHambMenuModal:c}=(0,s.A)(),{setIsLoggedIn:u,setProfile:d,setToken:m,setUserId:p}=(0,a.Z)(e=>({setIsLoggedIn:e.setIsLoggedIn,setProfile:e.setProfile,setToken:e.setToken,setUserId:e.setUserId}));return{logout:()=>{localStorage.clear(),sessionStorage.clear(),u(!1),d(null),m(null),p(null),e(!1),(0,i.oL)("logout","logout","membership"),(0,l.SZ)("logout","logout","membership",{reason:"user_initiated"}),o&&c&&c(),t&&n&&n(),window.location.href="/"}}}},13322:function(e,t,n){"use strict";var s=n(57437),a=n(27648);n(2265),t.Z=function(e){let{onClick:t,children:n,...r}=e;return(0,s.jsx)(a.default,{href:r.href||"#",title:r.title||"link",onClick:t,...r,children:n})}},65098:function(e,t,n){"use strict";var s=n(2265),a=n(7874),r=n(8363),i=n(5851);t.Z=()=>
1{let[e,t]=(0,s.useState)(),[n,l]=(0,s.useState)(!1),o=(0,r.Z)(e=>e.setProfile),[c,u]=(0,s.useState)(!1),d=async()=>{l(!0);try{let e=await a.Z.get("/api/patient/Profile");l(!1);let{data:n}=e;200===e.status&&(t(n.data),o(n.data))}catch(e){u(!0),i.Z.error("Error fetching Patient profile:",e)}finally{l(!1)}};return{patientProfile:e,loading:n,fetchPatientProfile:d,error:c,refresh:()=>{d()}}}},63888:function(e,t,n){"use strict";var s=n(59625),a=n(89134);let r=(0,s.Ue)()((0,a.tJ)(e=>({openInfoModal:!1,openMiniModal:!1,openMedicalModal:!1,infoModalClosed:!1,openCreateAppointmentModal:!1,setOpenInfoModal:t=>e(e=>({openInfoModal:"function"==typeof t?t(e.openInfoModal):t})),setOpenMiniModal:t=>e(e=>({openMiniModal:"function"==typeof t?t(e.openMiniModal):t})),setOpenMedicalModal:t=>e(e=>({openMedicalModal:"function"==typeof t?t(e.openMedicalModal):t})),setInfoModalClosed:t=>e({infoModalClosed:t}),setOpenCreateAppointmentModal:t=>e(e=>({openCreateAppointmentModal:"function"==typeof t?t(e.openCreateAppointmentModal):t}))}),{name:"modal-storage",storage:(0,a.FL)(()=>sessionStorage)}));t.Z=r},44718:function(e,t,n){"use strict";let s=(0,n(59625).Ue)(e=>({requiresLogin:!1,setRequiresLogin:t=>e({requiresLogin:t})}));t.Z=s},52563:function(e,t,n){"use strict";let s=(0,n(59625).Ue)(e=>({openModal:!1,toggleSidebar:()=>e(e=>({openModal:!e.openModal})),closeSidebar:()=>e({openModal:!1})}));t.Z=s},77601:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var s=n(91164);let a=new Map,r=new Map,i=e=>{let t=JSON.stringify(e),n=r.get(t);if(n&&n.expiresAt>Date.now())return Promise.resolve(n.data);r.delete(t);let i=a.get(t);if(i)return i;let l=s.Z.post("/orders",e).then(e=>{let{data:n}=e;return r.set(t,{data:n,expiresAt:Date.now()+1e3}),n}).finally(()=>{a.delete(t)});return a.set(t,l),l}},44986:function(e,t,n){"use strict";var s=n(59625),a=n(8363),r=n(77601);let i=(0,s.Ue)(e=>({lastAppointment:null,refresh:async()=>{if(!a.Z.getState().token)return;let t=(await (0,r.A)({page:1,state:"upcoming"})).data.items;if(0==t.length)return;let n=t.find(e=>"current"==e.state)||t.find(e=>"ready"==e.state)||null;e(e=>{var t,s;return!n&&e.lastAppointment?{lastAppointment:null}:n&&((null==e?void 0:null===(t=e.lastAppointment)||void 0===t?void 0:t.orderId)!==n.orderId||(null==e?void 0:null===(s=e.lastAppointment)||void 0===s?void 0:s.state)!==n.state)?{lastAppointment:n}:e})}}));setInterval(()=>{i.getState().refresh()},6e4),a.Z.subscribe((e,t)=>{var n,s;let a=e.isLoggedIn&&!t.isLoggedIn,r=(null===(n=e.token)||void 0===n?void 0:n.accessToken)!==(null===(s=t.token)||void 0===s?void 0:s.accessToken);e.isLoggedIn&&(a||r)&&i.getState().refresh()}),t.Z=i},1016:function(e,t,n){"use strict";var s=n(57437),a=n(27648),r=n(99376);n(2265);var i=n(52563);t.Z=e=>{let{url:t,title:n,customClass:l,badge:o,linkTitle:c,children:u,target:d,onClick:m}=e,p=(0,r.usePathname)(),{openModal:f,closeSidebar:h}=(0,i.Z)();return(0,s.jsx)("div",{className:"menu-item ".concat(t===p?"hover":""," "),onClick:h,children:(0,s.jsxs)(a.default,{href:t,title:c,target:d,onClick:m,className:"menu-link py-2 ".concat(l||""),children:[u||(0,s.jsx)("span",{className:"menu-title",children:n}),o&&(0,s.jsx)("span",{className:"badge badge-sm badge-light-primary ms-2",children:o})]})})}},5555:function(e,t,n){"use strict";var s=n(57437),a=n(2265),r=n(99376),i=n(3166),l=n(24603),o=n(1016),c=n(8363),u=n(13322),d=n(44986);t.Z=function(e){let{isDashboard:t}=e,{openHambMenuModal:n,handleHambMenuModal:m}=(0,i.A)(),{logout:p}=(0,l.Z)(),{isLoggedIn:f,profile:h}=(0,c.Z)(e=>({isLoggedIn:e.isLoggedIn,profile:e.profile})),{lastAppointment:g}=(0,d.Z)(),v=(0,r.usePathname)(),k=(0,r.useRouter)();return(0,a.useEffect)(()=>{n&&m&&m()},[v]),(0,s.jsxs)(s.Fragment,{children:[n&&(0,s.jsx)("div",{className:"drawer-overlay",onClick:m}),(0,s.jsxs)("div",{className:"card bg-body drawer drawer-end ".concat(n?" drawer-on d-block":"d-none"),style:n?{width:"400px"}:{},children:[(0,s.jsxs)("div",{className:"card-header ps-6 pe-3",id:"evital-sidebar-hamb-menu-header",children:[f?(0,s.jsx)(u.Z,{className:"card-title fw-semibold text-gray-900",children:null==h?void 0:h.name}):(0,s.jsx)("a",{href:"https://www.eczacibasi.com.tr",className:"card-title fw-semibold text-gray-900",target:"_blank",rel:"noreferrer",title:"EczacibaÅı",children:(0,s.jsx)("img",{alt:"EczacibaÅı",src:"/assets/media/ev-images/eczacibasi-logo.png",width:"120"})}),(0,s.jsx)("div",{className:"card-toolbar",children:(0,s.jsx)("a",{href:"#",className:"btn btn-sm btn-icon btn-active-light-primary",onClick:e=>{e.preventDefault(),null==m||m()},"aria-label":"kapat",children:(0,s.jsx)("i",{className:"ki-solid ki-cross fs-2qx text-gray-600"})})})]}),(0,s.jsxs)("div",{className:"aside-menu flex-column-fluid px-4",children:[(0,s.jsx)("div",{className:"position-relative scroll-y me-n5 pe-5",children:(0,s.jsxs)("div",{className:"menu menu-rounded menu-column menu-title-gray-700 menu-icon-gray-500 menu-arrow-gray-500 menu-bullet-gray-500 menu-arrow-gray-500 menu-state-bg fw-semibold w-100",children:[(0,s.jsx)(o.Z,{url:"/#hizmetler",title:"Hizmetler",customClass:"",linkTitle:"Hizmetler"}),(0,s.jsx)("div",{className:"menu-item",children:(0,s.jsx)("span",{className:"menu-link py-2",children:(0,s.jsx)("span",{className:"menu-title",children:"Kurumsal \xc7\xf6z\xfcmler"})})}),(0,s.jsxs)("div",{className:"menu-sub menu-sub-accordion fs-7 show ms-6",children:[(0,s.jsx)("div",{className:"menu-item",children:(0,s.jsx)("a",{href:"/kurumsal/detay?type=sirketler",title:"Åirketler",className:"menu-link py-2",children:(0,s.jsx)("span",{className:"menu-title",children:"Åirketler"})})}),(0,s.jsx)("div",{className:"menu-item",children:(0,s.jsx)("a",{href:"/kurumsal/detay?type=sigorta-sirketleri",title:"Sigorta Åirketleri",className:"menu-link py-2",children:(0,s.jsx)("span",{className:"menu-title",children:"Sigorta Åirketleri"})})}),(0,s.jsx)("div",{className:"menu-item",children:(0,s.jsx)("a",{href:"/kurumsal/detay?type=saglik-kurumlari",title:"SaÄlık Kurumları",className:"menu-link py-2",children:(0,s.jsx)("span",{className:"menu-title",children:"SaÄlık Kurumları"})})}),(0,s.jsx)("div",{className:"menu-item",children:(0,s.jsx)("a",{href:"/kurumsal/detay?type=saglik-teknolojileri",title:"SaÄlık Teknolojileri",className:"menu-link py-2",children:(0,s.jsx)("span",{className:"menu-title",children:"SaÄlık Teknolojileri"})})})]}),(0,s.jsx)(o.Z,{url:"https://blog.evital.com.tr/",title:"Blog",customClass:"",linkTitle:"Blog"}),(0,s.jsx)(o.Z,{url:"/psikolojik-testler",title:"Psikolojik Testler",customClass:"",linkTitle:"Psikolojik Testler"})]})}),(0,s.jsx)("div",{className:"",children:f?(0,s.jsx)("button",{onClick:()=>{f?g?k.push("/anasayfa/randevularim"):k.push("/kategori-secimi"):k.push("/onl
1ine-gorusme")},className:"btn btn-sm btn-outline btn-outline-primary w-100 fs-8 fw-600 d-flex justify-content-center rounded-pill aside-menu flex-column-fluid px-4",children:f?g?"G\xf6r\xfcÅmeye Katıl":"Randevu Al":"Online G\xf6r\xfcÅme"}):(0,s.jsx)("div",{className:" py-4",children:(0,s.jsx)("a",{href:"/online-gorusme",className:"btn btn-sm btn-outline btn-outline-primary fs-8 fw-600 d-flex justify-content-center rounded-pill",id:"evital-sign-up-sidebar-toggle2",children:"Online G\xf6r\xfcÅme"})})})]}),!t&&(0,s.jsx)("div",{className:"card-footer py-5 shadow-lg",id:"evital-sidebar-hamb-menu-footer",children:(0,s.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,s.jsx)("div",{children:(0,s.jsxs)("div",{className:"fs-8 text-muted",children:["evital Destek"," ",(0,s.jsx)("br",{}),(0,s.jsx)("a",{href:"tel:+908502050885",className:"text-muted",title:"evital Destek",children:"+ 90 (850) 205 08 85"})]})}),f&&(0,s.jsx)(u.Z,{onClick:e=>{e.preventDefault(),p()},className:"text-danger text-decoration-underline",children:"\xc7ıkıŠYap"})]})})]})]})}},3166:function(e,t,n){"use strict";n.d(t,{A:function(){return c},H:function(){return u}});var s=n(57437),a=n(2265),r=n(99376),i=n(44718);let l=e=>{var t;return null!==(t=({"/dashboard/raporlar":0,"/dashboard/user-list":1,"/dashboard/services":2,"/dashboard/settings":3,"/dashboard/settings1":4,"/dashboard/settings2":5})[e])&&void 0!==t?t:null},o=(0,a.createContext)({selectedTab:null,handleClick:()=>{},openModal:!1,openSignUpModal:!1,openSignInModal:!1,openVerifyNumberModal:!1,openForgetPasswordModal:!1,openChangePasswordModal:!1,openVerifyNumberSignUpModal:!1,openCreatePasswordModal:!1,openHambMenuModal:!1,openInviteFriendModal:!1}),c=()=>(0,a.useContext)(o);function u(e){let{children:t}=e,n=(0,r.usePathname)(),[c,u]=(0,a.useState)(l(n)),[d,m]=(0,a.useState)(!1),[p,f]=(0,a.useState)(!1),[h,g]=(0,a.useState)(!1),[v,k]=(0,a.useState)(!1),[x,b]=(0,a.useState)(!1),[j,y]=(0,a.useState)(!1),[M,S]=(0,a.useState)(!1),[I,w]=(0,a.useState)(!1),[N,Z]=(0,a.useState)(!1),[C,A]=(0,a.useState)(!1),{requiresLogin:L,setRequiresLogin:T}=(0,i.Z)(e=>({requiresLogin:e.requiresLogin,setRequiresLogin:e.setRequiresLogin}));(0,a.useEffect)(()=>{u(l(n))},[n]);let P=(0,a.useCallback)(e=>{u(t=>t===e?null:e)},[]);return(0,s.jsx)(o.Provider,{value:{selectedTab:c,handleClick:P,openModal:d,openSignUpModal:p,openSignInModal:h,openVerifyNumberModal:v,openForgetPasswordModal:x,openChangePasswordModal:j,openVerifyNumberSignUpModal:M,openCreatePasswordModal:I,openHambMenuModal:N,handleModal:()=>{!1===d?m(!0):m(!1)},handleSignUpModal:()=>{f(!p),g(!1),T(!1)},handleSignInModal:()=>{g(!h),f(!1)},handleVerifyNumberModal:()=>{!1===v?k(!0):k(!1)},handleForgetPasswordModal:()=>{!1===x?b(!0):b(!1)},handleChangePasswordModal:()=>{!1===j?y(!0):y(!1)},handleVerifyNumberSignUpModal:()=>{!1===M?S(!0):S(!1)},handleCreatePasswordModal:()=>{!1===I?w(!0):w(!1)},handleHambMenuModal:()=>{!1===N?Z(!0):Z(!1)},openInviteFriendModal:C,handleInviteFriendModal:()=>{!1===C?A(!0):A(!1)}},children:t})}},2648:function(){},68923:function(){},97770:function(){},57151:function(){},74549:function(){},34055:function(){},91955:function(){},54431:function(){},40601:function(){},12078:function(){}}]);
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.