1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7209],{8818:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/header",function(){return o(99284)}])},99284:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return u}});var a=o(85893),r=o(67294),n=o(5152),i=o.n(n),l=o(11163);let d=i()(()=>Promise.all([o.e(6492),o.e(1664),o.e(5675),o.e(5609),o.e(7366),o.e(9700)]).then(o.bind(o,23681)),{loadableGenerated:{webpack:()=>[23681]},ssr:!1});function u(){let e=(0,l.useRouter)(),[t,n]=(0,r.useState)(!1),[i,u]=(0,r.useState)(!1),s=(0,r.useRef)(!1),c=window.parent!==window,f="true"===e.query.notificationsOnly,h=(0,r.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c&&window.parent.postMessage({source:"turito-header",type:e,payload:t},"*")},[c]),E=(0,r.useCallback)(()=>{let e=document.getElementById("header-container");e&&h("HEIGHT_UPDATE",{height:e.scrollHeight})},[h]),v=(0,r.useCallback)((e,t)=>{if(!e||!t)return null;if(e.startsWith("__BUTTON_INDEX__")){let o=parseInt(e.replace("__BUTTON_INDEX__",""),10);return t.querySelectorAll("button")[o]||null}if(e.startsWith("#"))return t.querySelector(e);try{return t.querySelector(e)}catch(e){return null}},[]),g=(0,r.useCallback)(e=>{h("START_TOUR",{tourId:e})},[h]);(0,r.useEffect)(()=>{n(!0),!s.current&&c&&(h("HEADER_READY"),h("REQUEST_VIEWPORT_INFO"),s.current=!0),setTimeout(E,100),setTimeout(E,500)},[c,h,E]),(0,r.useEffect)(()=>{let e=e=>{var t,a,r,n,i,l,d,s,c,f,h,g,w,_,p;if((null===(t=e.data)||void 0===t?void 0:t.type)==="VIEWPORT_INFO"&&u(e.data.payload.width<768),null===(a=e.data)||void 0===a||a.type,(null===(r=e.data)||void 0===r?void 0:r.type)==="NOTIFICATIONS_OPENED"&&(null===(n=e.data)||void 0===n?void 0:n.source)==="turito-header"&&(setTimeout(E,100),setTimeout(E,300)),(null===(i=e.data)||void 0===i?void 0:i.type)==="NOTIFICATIONS_CLOSED"&&(null===(l=e.data)||void 0===l?void 0:l.source)==="turito-header"&&(console.log("Notifications closed, updating height"),setTimeout(E,100)),(null===(d=e.data)||void 0===d?void 0:d.type)==="CLOSE_NOTIFICATIONS"&&(null===(s=e.data)||void 0===s||s.source),(null===(c=e.data)||void 0===c?void 0:c.type)==="PROXY_CLICK"&&(null===(f=e.data)||void 0===f?void 0:f.source)==="turito-parent"){let{menu:t,selector:o}=e.data.payload||{},a=document.querySelector('[data-mirror-root="'.concat(t,'"]')),r=a&&v(o,a);r&&r.click()}if(((null===(h=e.data)||void 0===h?void 0:h.type)==="PROXY_MOUSEENTER"||(null===(g=e.data)||void 0===g?void 0:g.type)==="PROXY_MOUSELEAVE")&&(null===(w=e.data)||void 0===w?void 0:w.source)==="turito-parent"){let{menu:t,selector:o}=e.data.payload||{},a=document.querySelector('[data-mirror-root="'.concat(t,'"]')),r=a&&v(o,a);if(r){let t="PROXY_MOUSEENTER"===e.data.type;r.dispatchEvent(new MouseEvent(t?"mouseover":"mouseout",{bubbles:!0,cancelable:!0,relatedTarget:t?document.body:null}))}}if((null===(_=e.data)||void 0===_?void 0:_.type)==="PERFORM_LOGOUT"&&(null===(p=e.data)||void 0===p?void 0:p.source)==="turito-parent"){let e=async()=>{try{try{let e=await o.e(6492).then(o.t.bind(o,16418,23)),t=e.CometChat,a=await t.getLoggedinUser();a&&await t.logout();let r=[];for(let e=0;e<localStorage.length;e++){let t=localStorage.key(e);t&&(t.includes("cometchat")||t.includes("COMETCHAT"))&&r.push(t)}r.forEach(e=>localStorage.removeItem(e))}catch(e){console.error("CometChat logout failed:",e)}let e=(await Promise.resolve().then(o.bind(o,44608))).default,t=new e;await t.postData("API_EDU_AUTH_URL","signout",{},{});try{let{sendCleverTapEventsData:e}=await Promise.resolve().then(o.bind(o,78636));e("Logout_Confirmation_Yes_Click",{Source:window.location.href});let t=(await Promise.resolve().then(o.bind(o,42020))).default,a=new t;a.logOut()}catch(e){console.error("CleverTap logout failed:",e)}let a=(await Promise.resolve().then(o.bind(o,84316))).default,r=new a;if(null==r||r.remove("locationInfo",{}),localStorage.removeItem("isGuestUser"),await r.clearSession({}),window.fcWidget)try{window.fcWidget.user.clear(),window.fcWidget.destroy(),delete window.fcWidget}catch(e){console.error("Freshchat cleanup failed:",e)}window.parent.postMessage({type:"LOGOUT_COMPLETE",source:"turito-header"},"*");let{getCountrySlug:n}=await Promise.resolve().then(o.bind(o,78636)),i=localStorage.getItem("userGeo"),l=i?JSON.parse(i):"",d=n(l||"");window.location.href=d||"/"}catch(e){console.error("Logout failed:",e),window.parent.postMessage({type:"LOGOUT_COMPLETE",source:"turito-header"},"*"),localStorage.clear(),sessionStorage.clear(),window.location.href="/"}};e()}};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[h,E,v]),(0,r.useEffect)(()=>
1{if(!c)return;let e=e=>{let t=e.target.closest("a");if(!t)return;let o=t.getAttribute("href");!o||o.startsWith("#")||(e.preventDefault(),h("NAVIGATION",{url:o}))};return document.addEventListener("click",e,!0),()=>document.removeEventListener("click",e,!0)},[c,h]);let w={openProfileMenu:e=>h("OPEN_PROFILE_MENU",{rect:e}),openLoginModal:()=>h("OPEN_LOGIN_MODAL"),toggleSidebar:()=>h("TOGGLE_SIDEBAR_REQUEST")};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("style",{children:"\n html, body {\n margin: 0;\n padding: 0;\n overflow: visible;\n height: auto;\n }\n #header-container {\n background: #fff;\n width: 100%;\n position: relative;\n }\n "}),(0,a.jsx)("div",{id:"header-container",children:t&&(0,a.jsx)(d,{isEmbedded:c,showHamburger:i,onProfileClick:w.openProfileMenu,onLoginClick:w.openLoginModal,toggleSidebar:w.toggleSidebar,notificationsOnly:f,onStartTour:g})})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=8818)}),_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.