1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="4cd87622-8abe-42d4-867e-cc67a466efff",e._sentryDebugIdIdentifier="sentry-dbid-4cd87622-8abe-42d4-867e-cc67a466efff")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2596],{63485:function(e,a,o){"use strict";o.r(a),o.d(a,{default:function(){return V}});var l=o(85893),n=o(16732),i=o(67294),t=o(58713),r=o.n(t),s=o(41664),d=o.n(s),c=o(47874),u=o(66724),p=o(66353),v=o(25395),_=o(66779),m=o(11163),h=o(22955),g=o(5152),f=o.n(g);let y=f()(()=>Promise.all([o.e(1048),o.e(4024)]).then(o.bind(o,91048)),{loadableGenerated:{webpack:()=>[91048]}}),b=e=>{var a,o,l,n,i,t;let r="tabClicked";if(c.e&&(null===(o=c.e)||void 0===o?void 0:null===(a=o.analyticsConfig)||void 0===a?void 0:a.lens)&&(null===(n=v.g)||void 0===n?void 0:null===(l=n[r])||void 0===l?void 0:l.lens)){let a=null===(t=v.g)||void 0===t?void 0:null===(i=t[r])||void 0===i?void 0:i.lens;_.Z[a](e)}},x=(e,a,o)=>{var n,i,t,s;let u="account"===e.code?"/myaccount":e.targetPath&&"/"!==e.targetPath&&""!==e.targetPath?e.targetPath.startsWith("/")?e.targetPath:"/".concat(e.targetPath):"/";return(0,l.jsx)("div",{className:"".concat(e.targetPath==o||"/"==e.targetPath&&""==o||(null==e?void 0:null===(n=e.subMenus)||void 0===n?void 0:n.length)>0&&(null==e?void 0:null===(i=e.subMenus)||void 0===i?void 0:i.find(e=>(null==e?void 0:e.targetPath)===o))?r().active:""),children:(0,l.jsxs)(d(),{href:u,className:"".concat(e.targetPath==o||"/"==e.targetPath&&""==o||(null==e?void 0:null===(t=e.subMenus)||void 0===t?void 0:t.length)>0&&(null==e?void 0:null===(s=e.subMenus)||void 0===s?void 0:s.find(e=>(null==e?void 0:e.targetPath)===o))?r().active:""),onClick:()=>b(e.displayText),children:[(0,l.jsxs)("div",{className:"".concat(r().imageDiv),children:[(0,l.jsx)("img",{className:"".concat(r().default),src:"".concat(c.e.staticImagesPath).concat(a,"-default.svg"),alt:e.displayText}),(0,l.jsx)("img",{className:"".concat(r().selected),src:"".concat(c.e.staticImagesPath).concat(a,"-active.svg"),alt:e.displayText})]}),e.displayText]})})};var w=e=>{var a,o,t,s,v,_,h,g,f,w,j,P,S,k;let{pagePath:N}=e,{state:{SystemConfig:O,PageData:C,localLang:D}}=(0,n.oR)(),[I,M]=(0,i.useState)({}),[T,E]=(0,i.useState)(""),[H,R]=(0,i.useState)(!1),{scrolledToppx:Z}=(0,u.Z)(),[A,z]=(0,i.useState)(0),[L,B]=(0,i.useState)(!0),[F,W]=(0,i.useState)(!1),Y=null==O?void 0:null===(a=O.configs)||void 0===a?void 0:a.favouritesTargetPath,q=null==O?void 0:null===(o=O.configs)||void 0===o?void 0:o.myPurchasesTargetPathWeb,U=null==O?void 0:null===(t=O.configs)||void 0===t?void 0:t.watchHistoryTargetPath,G=null==O?void 0:null===(s=O.configs)||void 0===s?void 0:s.likeTargetPath,V=(0,m.useRouter)();(0,i.useEffect)(()=>{O&&J()},[O,N]),(0,i.useEffect)(()=>{X()},[C]),(0,i.useEffect)(()=>{null!==Z&&(Z<200||A>Z?R(!1):R(!0),z(Z))},[Z]);let J=()=>{let e={bottom_menus:O.menus};if(e.bottom_menus.length>0){var a;(null==V?void 0:V.asPath)==="/"&&b(e.bottom_menus[0].displayText),e.bottom_menus[0].targetPath="";let o=!1;null==e||null===(a=e.bottom_menus)||void 0===a||a.map(a=>{var l,n;if((null==a?void 0:a.targetPath)===(null==N?void 0:N.path)&&(null==a?void 0:null===(l=a.subMenus)||void 0===l?void 0:l.length)&&!o)e.top_menus=null==a?void 0:a.subMenus,o=!0;else if(null==a?void 0:null===(n=a.subMenus)||void 0===n?void 0:n.length)for(let l of a.subMenus)l.targetPath===N.path&&(e.top_menus=a.subMenus,o=!0)}),M(e)}E(N.path)},Q=e=>{W(!F)},X=()=>{var e,a;window.innerWidth<=991&&((null==C?void 0:null===(e=C.info)||void 0===e?void 0:e.pageType)==="player"||(null==C?void 0:null===(a=C.info)||void 0===a?void 0:a.pageType)==="details")?B(!1):B(!0)},K=e=>e&&"/"!==e&&""!==e?e.startsWith("/")?e:"/".concat(e):"/";return(0,l.jsxs)("div",{className:"".concat(H?" ".concat(r().headerMobile_fixed):"".concat(r().nav_transparent)," ").concat(Z<200&&(null==C?void 0:null===(v=C.banners)||void 0===v?void 0:v.length)>0||(null==C?void 0:null===(_=C.info)||void 0===_?void 0:_.pageType)==="details"?"".concat(r().has_trans):"".concat(r().no_trans)),children:[!(["search","shorts","settings","settings/edit-profile",Y,"buy/packages-list","buy/order-summary/","transaction",U,q,G].includes(null==N?void 0:N.path)||(null==N?void 0:null===(h=N.path)||void 0===h?void 0:h.includes("buy/order-summary/"))||(null==N?void 0:null===(g=N.path)||void 0===g?void 0:g.includes("shorts")))&&L&&(0,l.jsxs)("div",{className:"".concat(r().mobile_header),children:[(0,l.jsxs)("div",{className:"".concat(r().mobile_header_top),children:[(0,l.jsx)(d(),{href:"/","aria-label":"app logo",children:(0,l.jsx)("img",{className:"app-logo",src:null===(f=p.Z)||void 0===f?void 0:f.mobilelogo})}),(0,l.jsxs)("div",{className:"".concat(r().mobile_header_top_right),children:[!!(null===(j=c.e)||void 0===j?void 0:null===(w=j.header)||void 0===w?void 0:w.languages)&&(0,l.jsx)("span",{className:"".concat(r().language),onClick:e=>Q(e),children:(0,l.jsx)("img",{src:"".concat(p.Z.desktopHeader.languageSelectionIcon),alt:""})}),(0,l.jsx)(d(),{href:"/search","aria-label":"search icon",children:(0,l.jsx)("img",{className:"".concat(r().searchIcon),src:"".concat(p.Z.mobileHeader.searchIcon)})}),(0,l.jsx)(d(),{href:"/myaccount","aria-label":"account icon",children:(0,l.jsx)("img",{className:"".concat(r().myaccountIcon),src:"".concat(p.Z.mobileHeader.myAccount)})})]})]}),(null==I?void 0:null===(P=I.top_menus)||void 0===P?void 0:P.length)>0&&(0,l.jsx)("ul",{className:"".concat(r().headerMenus),children:null==I?void 0:null===(S=I.top_menus)||void 0===S?void 0:S.map(e=>(0,l.jsx)("li",{children:(0,l.jsx)(d(),{href:K(e.targetPath),className:"".concat(e.targetPath==T||"/"==e.targetPath&&""==T?r().active:""),children:e.displayText})},e.code))})]}),(0,l.jsx)("ul",{className:"".concat(r().bottom_menus),children:null==I?void 0:null===(k=I.bottom_menus)||void 0===k?void 0:k.map(e=>(0,l.jsxs)("li",{children:[e.code.includes("home")&&x(e,"home",T),e.code.includes("programs")&&x(e,"programs",T),"news_mobile"===e.code&&x(e,"news",T),"news"===e.code&&x(e,"news",T),"movies_mobile"===e.code&&x(e,"movies",T),"movies"===e.code&&x(e,"movies",T),"search"===e.code&&x(e,"search",T),e.code.includes("favourites")&&x(e,"favourites",T),e.code.includes("watchlist")&&x(e,"watchlist",T),e.code.includes("kids")&&x(e,"kids",T),e.code.includes("account")&&x(e,"myaccount",T),e.code.includes("guide")&&x(e,"guide",T),e.code.includes("swag")&&x(e,"swag",T),(e.code.includes("book")||e.code.includes("dish")||e.code.includes("d2h")||e.code.includes("siti"))&&x(e,"mydish",T),e.code.includes("plans")&&x(e,"plans",T),"watch_now"===e.code&&x(e,"watchnow",T),"catchup"===e.code&&x(e,"catchup",T),"settings"===e.code&&x(e,"settings",T),"quizzop"===e.code&&x(e,"myaccount",T),"shorts"===e.code&&x(e,"Shorts",T)]},e.code))}),F&&(0,l.jsx)(y,{open:F,onClose:()=>Q()})]})}
1,j=o(57686),P=o(83677),S=o(69968),k=o(93208),N=o(1558),O=o(84781),C=o(31178),D=o(3899),I=o(11402),M=o(73935);let T=f()(()=>Promise.all([o.e(7297),o.e(4693)]).then(o.bind(o,63194)),{loadableGenerated:{webpack:()=>[63194]}}),E=f()(()=>Promise.all([o.e(5212),o.e(4631)]).then(o.bind(o,15212)),{loadableGenerated:{webpack:()=>[15212]}}),H=f()(()=>Promise.all([o.e(1048),o.e(4024)]).then(o.bind(o,91048)),{loadableGenerated:{webpack:()=>[91048]}});f()(()=>Promise.resolve().then(o.bind(o,8550)),{loadableGenerated:{webpack:()=>[8550]}});var R=e=>{var a,o,t,s,g,f,y,b,x,w,R,Z,A,z,L,B,F,W,Y,q,U,G,V,J,Q,X,K,$,ee,ea,eo,el,en,ei,et,er,es,ed,ec,eu,ep,ev,e_,em,eh,eg,ef;let{pagePath:ey}=e,{state:{SystemConfig:eb,userDetails:ex,SystemFeature:ew,PageData:ej,localLang:eP},dispatch:eS}=(0,n.oR)(),{mutate:ek,data:eN}=(0,S.Z)(),eO=(0,m.useRouter)(),{mutate:eC,data:eD}=(0,P.Z)(),[eI,eM]=(0,i.useState)([]),[eT,eE]=(0,i.useState)(null),[eH,eR]=(0,i.useState)({isSubscribed:!1,isRenewAvailable:!1}),[eZ,eA]=(0,i.useState)(!1),{scrolledToppx:ez}=(0,u.Z)(),[eL,eB]=(0,i.useState)(""),[eF,eW]=(0,i.useState)(!1),[eY,eq]=(0,i.useState)(!1),[eU,eG]=(0,i.useState)({}),[eV,eJ]=(0,i.useState)(!1),[eQ,eX]=(0,i.useState)([]),[eK,e$]=(0,i.useState)(5),[e0,e1]=(0,i.useState)(!1),[e2,e4]=(0,i.useState)(0),e6=(0,i.useRef)(null),[e8,e5]=(0,i.useState)(!1),[e3,e7]=(0,i.useState)({top:0,left:0}),e9=(0,i.useRef)(null),[ae,aa]=(0,i.useState)(0),ao=(0,i.useRef)(null),[al,an]=(0,i.useState)(0),ai=(0,i.useRef)(null);(0,i.useRef)(null);let at=e2-(al+ae+110+20),[ar,as]=(0,i.useState)(!1);(0,i.useEffect)(()=>{null!==ez&&(ez>=200?eA(!0):eA(!1))},[ez]),(0,i.useEffect)(()=>{try{var e,a;let o=null===(a=JSON)||void 0===a?void 0:a.parse(null==eb?void 0:null===(e=eb.configs)||void 0===e?void 0:e.sideMenuPages);o&&eX(o)}catch(e){console.error("Error parsing side menu pages :",e)}},[eb]),(0,i.useEffect)(()=>{if(eb){var e,a;ad(),(null==eb?void 0:null===(e=eb.configs)||void 0===e?void 0:e.showPackages)?e1((null==eb?void 0:null===(a=eb.configs)||void 0===a?void 0:a.showPackages)=="true"):e1(c.e.header.pricing)}},[eb,ey]),(0,i.useEffect)(()=>{if(eb&&eb.configs.menusMore){let e=JSON.parse(eb.configs.menusMore),a=[],o=!1;for(let o in e)a.push(parseInt(o.split("_")[1]));for(let l=0;l<a.length;l++){if(window.innerWidth>=a[l]){for(let n in e)if(a[l]>=parseInt(n.split("_")[1])){e$(parseInt(e[n])),o=!0;break}}if(o)break}}},[eb]),(0,i.useEffect)(()=>{ex?(eE(!0),ex.packages.length>0&&"voucher"!==ex.packages[0].gateway&&"coupon"!==ex.packages[0].gateway?ex.attributes.isRenew&&"true"===ex.attributes.isRenew&&"A"!==ex.packages[0].recurrenceStatus?eR({isSubscribed:!0,isRenewAvailable:!0}):eR({isRenewAvailable:!1,isSubscribed:!0}):eR({isSubscribed:!1,isRenewAvailable:!1})):eE(!1)},[ex]),(0,i.useEffect)(()=>{if(eN){(0,N.LS)("profile-expiry-time",new Date().getTime()+1e3*c.e.profile.expiry);let e=(0,N.zH)("user-info")||{},a={...e,expiryTime:new Date().getTime()+1e3*c.e.profile.expiry};(0,N.q0)("user-info",a),eC("".concat("https://apiv2.manoramamax.com","/service/api/auth/user/info"))}},[eN]),(0,i.useEffect)(()=>{if(eD){var e,a;(0,k.XN)(eD.data.response),(0,C.hh)(null==eD?void 0:null===(e=eD.data)||void 0===e?void 0:e.response,"clevertap"),eS({type:n.Nw.userDetails,payload:eD.data.response}),(null==eD?void 0:null===(a=eD.data)||void 0===a?void 0:a.status)&&eS({type:n.Nw.PageRefresh,payload:!0})}},[eD]);let ad=()=>{let e=eb.menus;e.length>0&&((null==eO?void 0:eO.asPath)==="/"&&ay(e[0].displayText),e[0].targetPath="",e[0].subMenus&&e[0].subMenus.length>0&&(e[0].subMenus[0].targetPath=""),eM(e));let a=ac(ey.path);eB(a)},ac=e=>{let a=e.split("?")[0].split("/");return a},au=e=>{(0,C.qP)("filter_channel_partner",{}),eW(!eF)},ap=e=>{eq(!eY)},av=()=>{eG({})},a_=()=>{(0,C.qP)("signout",(0,O.ke)(!0)),eJ(!0),av(),(0,j.oO)()},am=e=>{e.isPinAvailable&&e.isProfileLockActive?eG({type:"pinprofile",subtype:"select",isActive:!0,userProfiles:e,closeTarget:av,validated:ag}):ah({profileId:e.profileId})},ah=e=>{ek({url:"".concat("https://apiv2.manoramamax.com","/service/api/auth/activate/user/profile"),apiData:e})},ag=e=>{if("select"==e.subtype){(0,N.LS)("profile-expiry-time",new Date().getTime()+1e3*c.e.profile.expiry);let e=(0,N.zH)("user-info")||{},a={...e,expiryTime:new Date().getTime()+1e3*c.e.profile.expiry};(0,N.q0)("user-info",a),av(),eC("".concat("https://apiv2.manoramamax.com","/service/api/auth/user/info"))}},af=e=>{let a=e.filter(e=>e.targetPath===eL[0]);return a.length>0},ay=e=>{var a,o,l,n,i,t;let r="tabClicked";if(c.e&&(null===(o=c.e)||void 0===o?void 0:null===(a=o.analyticsConfig)||void 0===a?void 0:a.lens)&&(null===(n=v.g)||void 0===n?void 0:null===(l=n[r])||void 0===l?void 0:l.lens)){let a=null===(t=v.g)||void 0===t?void 0:null===(i=t[r])||void 0===i?void 0:i.lens;_.Z[a](e)}},ab=[];(0,i.useEffect)(()=>
1{if(e9.current){let e=e9.current.getBoundingClientRect().width;e4(e)}if(ao.current){let e=ao.current.getBoundingClientRect().width;aa(e)}if(ai.current){let e=ai.current.getBoundingClientRect().width;an(e)}},[eT,eH,ex]),(0,i.useEffect)(()=>{let e=()=>{let e=window.innerWidth;as(e>=991&&e<=1260)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let ax=()=>{if(e6.current){let e=e6.current.getBoundingClientRect();e7({top:e.bottom,left:e.left}),e5(!0)}},aw=()=>{e5(!1)};return(0,l.jsxs)("div",{className:" title ".concat(r().main_nav," ").concat(eZ?"".concat(r().nav_fixed):"".concat(r().nav_transparent)),children:[c.e.header.topHeader&&(0,l.jsx)("div",{className:" ".concat(r().top_header," "),children:(0,l.jsxs)("div",{className:" container ".concat(r().container),children:[!!(null===(o=c.e)||void 0===o?void 0:null===(a=o.header)||void 0===a?void 0:a.partners)&&(0,l.jsxs)("span",{className:"".concat(r().language),onClick:e=>ap(e),children:[(0,l.jsx)("img",{src:"".concat(p.Z.desktopHeader.headerFilter),alt:""}),null===(t=h.cP[eP])||void 0===t?void 0:t.Filter]}),!!(null===(g=c.e)||void 0===g?void 0:null===(s=g.header)||void 0===s?void 0:s.languages)&&(0,l.jsxs)("span",{className:"".concat(r().language),onClick:e=>au(e),children:[(0,l.jsx)("img",{src:"".concat(p.Z.desktopHeader.languageSelectionIcon),alt:""}),null===(f=h.cP[eP])||void 0===f?void 0:f.Languages]}),(0,l.jsxs)(d(),{className:"".concat(r().help),href:"/support/about-us",children:[(0,l.jsx)("img",{src:"".concat(p.Z.desktopHeader.headerAbout),alt:""}),null===(y=h.cP[eP])||void 0===y?void 0:y.About_us]}),(0,l.jsxs)("span",{className:"".concat(r().help),children:[(0,l.jsx)("img",{src:"".concat(p.Z.desktopHeader.headerMailSupport),alt:""}),(0,l.jsx)(d(),{href:"mailto:".concat(null===(b=h.cP[eP])||void 0===b?void 0:b.Support_mail),children:null===(x=h.cP[eP])||void 0===x?void 0:x.Support_mail})]})]})}),(0,l.jsxs)("div",{ref:e9,className:" title ".concat(r().nav," ").concat((null==ej?void 0:null===(w=ej.banners)||void 0===w?void 0:w.length)>0||(null==ej?void 0:null===(R=ej.data)||void 0===R?void 0:R.length)>0&&(null==ej?void 0:null===(L=ej.data[0])||void 0===L?void 0:null===(z=L.section)||void 0===z?void 0:null===(A=z.sectionInfo)||void 0===A?void 0:null===(Z=A.code)||void 0===Z?void 0:Z.length)>0&&(null==ej?void 0:null===(Y=ej.data[0])||void 0===Y?void 0:null===(W=Y.section)||void 0===W?void 0:null===(F=W.sectionInfo)||void 0===F?void 0:null===(B=F.code)||void 0===B?void 0:B.includes("banner"))||(null==ej?void 0:null===(q=ej.info)||void 0===q?void 0:q.pageType)==="details"&&(null==ej?void 0:null===(G=ej.info)||void 0===G?void 0:null===(U=G.attributes)||void 0===U?void 0:U.contentType)!=="network"?"":"".concat(r().nav_bg)," "),children:[(0,l.jsx)("span",{className:" ".concat(r().header_gradient," ")}),(0,l.jsxs)("div",{className:" title ".concat(r().nav_left," "),children:[(0,l.jsx)(d(),{href:"/"===eO.asPath?"":"/",onClick:e=>{"/"===eO.asPath&&e.preventDefault()},"aria-label":"app logo",children:(0,l.jsx)("img",{className:"app-logo",src:null===(V=p.Z)||void 0===V?void 0:V.logo,alt:"logo",ref:ai})}),(0,l.jsxs)("ul",{className:at<870?"".concat(r().menu_list):"",style:{width:at>870?"auto":at},children:[eI.map((e,a)=>{if(eK&&a<eK-1)return(0,l.jsxs)("li",{className:"".concat(e.subMenus.length>0?r().more_menu:""),children:[e.subMenus.length>0?(0,l.jsxs)("div",{ref:e6,onMouseEnter:ax,onMouseLeave:aw,className:"".concat(r().hasMoreDiv," ").concat(af(e.subMenus)?"".concat(r().active):""),children:[e.displayText,!!e.subMenus&&e.subMenus.length>0&&e8&&(0,M.createPortal)((0,l.jsx)("ul",{className:"".concat(r().dropdown),style:{position:"fixed",top:e3.top,left:e3.left},onMouseEnter:()=>e5(!0),onMouseLeave:()=>e5(!1),children:e.subMenus.map((a,o)=>(0,l.jsx)("li",{children:(0,l.jsx)(d(),{target:"internalbrowser"==e.params.targetPath?"_blank":"_self",href:"/".concat(a.targetPath),children:a.displayText})},a.code))}),document.body)]}):(0,l.jsx)(d(),{target:"internalbrowser"==e.params.targetPath?"_blank":"_self",href:"/".concat(e.targetPath),className:"".concat(e.targetPath==e
1L||"/"==e.targetPath&&""==eL?r().active:""),onClick:a=>{(eO.asPath===e.targetPath||eO.asPath==="/".concat(e.targetPath)||e.subMenus.length>0)&&a.preventDefault(),ay(e.displayText)},children:e.displayText}),(0,l.jsxs)("div",{className:"".concat(r().tag_class),children:[!!ex&&!!e.params.login_and_pack_marker&&!!e.params.login_and_no_pack_marker&&(0,l.jsx)("span",{className:"".concat(r().tag," ").concat(ex.packages&&ex.packages.length>0?"".concat(r().bp):""),children:ex.packages&&ex.packages.length>0?e.params.login_and_pack_marker:e.params.login_and_no_pack_marker}),!ex&&!!e.params.non_login_marker&&(0,l.jsx)("span",{className:"".concat(r().tag),children:e.params.non_login_marker})]})]},e.code)}),ab.length>0&&(0,l.jsx)("li",{className:"".concat(r().more_menu),children:(0,l.jsxs)("div",{className:"".concat(r().hasMoreDiv," ").concat(af(ab)?"".concat(r().active):""),children:[null===(J=h.cP[eP])||void 0===J?void 0:J.More,(0,l.jsx)("ul",{className:"",children:ab.map((e,a)=>(0,l.jsx)("li",{children:(0,l.jsxs)(d(),{target:"internalbrowser"===e.params.targetPath?"_blank":"_self",href:"/".concat(e.targetPath),children:[e.displayText,!!e.subMenus&&e.subMenus.length>0&&(0,l.jsx)("ul",{className:"".concat(r().dropdown),children:e.subMenus.map((e,a)=>(0,l.jsx)("li",{children:(0,l.jsx)(d(),{href:"/".concat(e.targetPath),children:e.displayText})},e.code))})]})},e.code))})]})},"")]})]}),(0,l.jsxs)("div",{ref:ao,className:" title ".concat(r().nav_right," "),children:[!!(null===(X=c.e)||void 0===X?void 0:null===(Q=X.header)||void 0===Q?void 0:Q.languages)&&(0,l.jsx)("span",{className:"".concat(r().language),onClick:e=>au(e),children:(0,l.jsx)("img",{src:"".concat(p.Z.desktopHeader.languageSelectionIcon),alt:""})}),eT&&(eH.isSubscribed?eH.isRenewAvailable&&(0,l.jsx)(d(),{href:"/buy/packages-list",className:" ".concat(r().plans," "),children:null===(K=
1h.fF[eP])||void 0===K?void 0:K.Renew_plan}):(0,l.jsx)(d(),{href:"/buy/packages-list",className:" ".concat(r().plans," "),children:null===($=h.fF[eP])||void 0===$?void 0:$.Subscribe})),(0,l.jsxs)(d(),{href:"/search",className:" title ".concat(r().main_search," "),onClick:()=>(0,C.qP)("search_button",(0,O.ke)()),children:[(0,l.jsx)("img",{src:"".concat(p.Z.desktopHeader.searchIcon),alt:"search-icon"}),(null===(ee=h.cP[eP])||void 0===ee?void 0:ee.Search)&&(0,l.jsx)("span",{className:" ".concat(r().search," "),children:null===(ea=h.cP[eP])||void 0===ea?void 0:ea.Search})]}),!eT&&(0,l.jsx)(d(),{href:"",onClick:()=>{var e,a;eS({type:n.Nw.navigateFrom,payload:eO.asPath}),(null===(a=c.e)||void 0===a?void 0:null===(e=a.signin)||void 0===e?void 0:e.ssoLogin)?(0,O.Ed)():eO.push("/signin"),(0,C.qP)("signin",{})},children:null===(eo=h.cP[eP])||void 0===eo?void 0:eo.SIGN_IN}),eT&&(0,l.jsxs)("div",{className:" ".concat(r().profile_menu_nav," "),children:[(0,l.jsx)("span",{className:" ".concat(r().profile_name_block," "),children:ew&&ew.userprofiles&&"true"==ew.userprofiles.fields.is_userprofiles_supported&&ex?ex.profileParentalDetails.map((e,a)=>(0,l.jsx)(i.Fragment,{children:e.profileId==ex.profileId&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:" ".concat(r().profile_icon," ").concat(r().with_profiles," "),children:(0,l.jsx)("img",{src:e.imageUrl?(0,k.ZY)(e.imageUrl):"".concat(p.Z.desktopHeader.profileImage)})}),(0,l.jsx)("span",{className:" ".concat(r().profile_name),children:e.name})]})},a)):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"".concat(r().profile_icon," "),children:!!(null==ex?void 0:ex.name)&&(null==ex?void 0:ex.name[0])}),(0,l.jsx)("span",{className:" ".concat(r().profile_name),children:null==ex?void 0:ex.name})]})}),(0,l.jsxs)("div",{className:" ".concat(r().profile_menu," ").concat(ew&&ew.userprofiles&&"true"==ew.userprofiles.fields.is_userprofiles_supported?r().has__profiles:""," "),children:[(0,l.jsxs)("ul",{children:[!!(null==eb?void 0:null===(el=eb.configs)||void 0===el?void 0:el.favouritesTargetPath)&&(0,l.jsx)("li",{children:(0,l.jsx)(d(),{href:"/".concat(eb.configs.favouritesTargetPath),onClick:()=>(0,C.qP)("my_favorites",{}),children:null===(en=h.cP[eP])||void 0===en?void 0:en.My_Playlist})}),(0,l.jsx)("li",{children:(0,l.jsx)(d(),{href:"/settings",onClick:()=>(0,C.qP)("account_setting",(0,O.ke)()),children:h.cP[eP].Account_Settings})}),eQ&&(null==eQ?void 0:eQ.length)>0?null==eQ?void 0:eQ.map((e,a)=>(0,l.jsx)("li",{children:(0,l.jsx)(d(),{href:null==e?void 0:e.targetPath,children:null==e?void 0:e.displayName})},null==e?void 0:e.displayName)):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("li",{children:(0,l.jsx)(d(),{href:(null==eb?void 0:null===(ei=eb.configs)||void 0===ei?void 0:ei.likeTargetPath)?null==eb?void 0:null===(et=eb.configs)||void 0===et?void 0:et.likeTargetPath:"/like",children:"Liked Videos"})}),(0,l.jsx)("li",{children:(0,l.jsx)(d(),{href:(null==eb?void 0:null===(er=eb.configs)||void 0===er?void 0:er.watchHistoryTargetPath)?null==eb?void 0:null===(es=eb.configs)||void 0===es?void 0:es.watchHistoryTargetPath:"/watch-history",children:"Watch History"})})]}),!eH.isSubscribed&&(0,l.jsx)("li",{children:(0,l.jsx)(d(),{href:"/buy/packages-list",children:null===(ed=h.cP[eP])||void 0===ed?void 0:ed.go_premium})}),(null==eb?void 0:null===(ec=eb.configs)||void 0===ec?void 0:ec.myPurchasesTargetPathWeb)&&(0,l.jsx)("li",{children:(0,l.jsx)(d(),{href:"/".concat(eb.configs.myPurchasesTargetPathWeb),children:null===(eu=h.cP[eP])||void 0===eu?void 0:eu.My_Purchases})}),(0,l.jsx)("li",{className:"".concat(r().devider)}),null===(e_=c.e)||void 0===e_?void 0:null===(ev=e_.header)||void 0===ev?void 0:null===(ep=ev.accountDropdown)||void 0===ep?void 0:ep.map((e,a)=>{var o;return(0,l.jsx)("li",{children:(0,l.jsx)(d(),{href:e.targetPath,onClick:()=>(0,C.qP)(e.key,(0,O.ke)()),children:null===(o=h.cP[eP])||void 0===o?void 0:o[e.displayName]})},e.targetPath)}),(0,l.jsx)("li",{children:(0,l.jsx)(d(),{href:"/support/about-us",onClick:()=>(0,C.qP)("help_support",(0,O.ke)()),children:null===(em=h.cP[eP])||void 0===em?void 0:em.Help_Support})}),(0,l.jsx)("li",{onClick:()=>{var e,a;let o={type:"signout",isActive:!0,title1:eb.configs.signoutPopMessage||"Are you sure, you want to sign out from this device?",yesButton1:(null===(e=h.cP[eP])||void 0===e?void 0:e.Cancel)||"Cancel",
1yesButtonType:"primary",yesButtonTarget1:av,noButton1:(null===(a=h.cP[eP])||void 0===a?void 0:a.Sign_Out)||"Sign Out",noButtontarget1:a_,noButtonType:"secondary",close:!0,closeTarget:av};eG(o)},children:(0,l.jsxs)("div",{children:[" ",null===(eh=h.cP[eP])||void 0===eh?void 0:eh.Sign_Out," "]})})]}),!!ew&&!!ew.userprofiles&&"true"==ew.userprofiles.fields.is_userprofiles_supported&&(0,l.jsxs)("ul",{className:"".concat(r().users_section),children:[!!ex&&!!(null==ex?void 0:ex.profileParentalDetails)&&(null==ex?void 0:null===(eg=ex.profileParentalDetails)||void 0===eg?void 0:eg.map((e,a)=>(0,l.jsx)(i.Fragment,{children:e.profileId!=ex.profileId&&(0,l.jsxs)("li",{onClick:()=>am(e),children:[(0,l.jsx)("img",{className:" ".concat(r().user_icon," "),src:e.imageUrl?(0,k.ZY)(e.imageUrl):"".concat(p.Z.desktopHeader.profileImage)}),(0,l.jsx)("span",{className:" ".concat(r().profile_name_el," "),children:e.name}),(null==e?void 0:e.isProfileLockActive)&&(0,l.jsx)("img",{className:"".concat(r().profile_lock_icon),alt:"lock",src:"".concat(p.Z.desktopHeader.lockIcon)})]})},a))),(null==ex?void 0:null===(ef=ex.profileParentalDetails)||void 0===ef?void 0:ef.length)>1&&(0,l.jsx)("li",{className:"".concat(r().devider)}),(0,l.jsx)("li",{children:(0,l.jsx)(d(),{href:"/profiles/select-user-profile",children:h.cP[eP].Exit_profile})}),(0,l.jsx)("li",{children:(0,l.jsx)(d(),{href:"/profiles/manage-user-profile",onClick:()=>(0,C.qP)("manage_profile",{}),children:h.cP[eP].Manage_profiles})})]})]})]})]})]}),eF&&(0,l.jsx)(H,{open:eF,onClose:()=>au()}),eY&&(0,l.jsx)(I.Z,{open:eY,onClose:()=>ap()}),eU.isActive&&"signout"===eU.type&&(0,l.jsx)(T,{popupData:eU}),!!eU.isActive&&"pinprofile"===eU.type&&(0,l.jsx)(E,{popupData:eU}),eV&&(0,l.jsx)(D.Z,{})]})},Z=o(46377);o(85518);var A=o(8550),z=o(37114),L=o.n(z),B=o(50594),F=o(85186),W=o(68445),Y=o(64666),q=o(44637),U=o(17075);function G(e){var a,o,t,r;let{active_OrderSummary:s,closePopup:d,couponDetails:c,setlandingcouponClose:u}=e,{state:{localLang:p},dispatch:v}=(0,n.oR)(),_=(0,m.useRouter)(),[g,f]=(0,i.useState)(null),[y,b]=(0,i.useState)(null),{mutate:x,data:w}=(0,S.Z)(),[j,P]=(0,i.useState)(""),[k,N]=(0,i.useState)({enabled:!1,data:{}}),[O,C]=(0,i.useState)({enabled:!1,data:{}}),D=()=>{N({enabled:!1,data:{}}),C({enabled:!1,data:{}})};if((0,i.useEffect)(()=>{let e=_.query;if(e&&e.paymentCancelled){let e=_.asPath;D(),_.replace(e.split("paymentCancelled")[0])}},[_]),(0,i.useEffect)(()=>{s&&f(s)},[s]),(0,i.useEffect)(()=>{if(c){var e,a;let o={...c};if((null==c?void 0:c.gateway)&&(null==c?void 0:null===(e=c.gateway)||void 0===e?void 0:e.includes(","))){let e=null==c?void 0:null===(a=c.gateway)||void 0===a?void 0:a.split(",");o.gateway=e}b(o)}else b(null)},[c]),(0,i.useEffect)(()=>{var e,a;if((null==w?void 0:w.status)===200){if(null==w?void 0:null===(e=w.data)||void 0===e?void 0:e.status){let e=null==w?void 0:null===(a=w.data)||void 0===a?void 0:a.response;(null==j?void 0:j.includes("razorpay"))?N({enabled:!0,data:e}):"worldline"===j&&C({enabled:!0,data:e})}else v({type:n.Nw.NotificationBar,payload:{message:null==w?void 0:w.data.error.message}}),D()}},[w]),!g)return null;let I=(0,F.Z)({palette:{mode:"dark"}}),M=e=>{P(e);let a={gateway:e||(null==y?void 0:y.gateway),packages:null==y?void 0:y.packages,couponCode:null==y?void 0:y.coupon,userConsent:"false"};try{x({url:"https://apiv2.manoramamax.com/payment/api/v1/order/checkout",apiData:a})}catch(e){console.log("Checkout API error :",e),P("")}};return(0,l.jsxs)(l.Fragment,{children:[k.enabled&&(0,l.jsx)(q.default,{razorpayData:k.data,orderSummary:g,paymentCancelled:D,couponDetails:y,isPaymentPending:()=>console.log("payment updated")}),O.enabled&&(0,l.jsx)(U.Z,{WorldlineData:null==O?void 0:O.data,orderSummary:g,isPaymentPending:()=>console.log("payment updated"),couponDetails:y}),(0,l.jsx)("div",{className:"order_data",children:(0,l.jsx)(W.Z,{theme:I,children:(0,l.jsx)(Y.Z,{open:!0,disableEnforceFocus:!0,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",sx:{"& .MuiPaper-root":{backgroundColor:"#121212",maxWidth:"500px",width:"100% !important",margin:"auto",borderRadius:"4px !important","@media (max-width: 600px)":{maxWidth:"90%",width:"90%"}}},children:(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:"".concat(L().order_summary_container),children:[(0,l.jsx)("div",{className:"".concat(L().close_icon),children:(0,l.jsx)(B.Z,{className:"".concat(L().cross_icon),onClick:()=>{d({isOpen:!1,summaryData:null}),N({enabled:!1,data:{}}),C({enabled:!1,data:{}}),u()}})}),(0,l.jsxs)("div",{className:"".concat(L().order_summary_top),children:[(0,l.jsx)("span",{children:h.Ms[p].Order_Summary}),(0,l.jsx)("span",{children:h.Ms[p].Price})]}),(0,l.jsxs)("div",{className:"".concat(L().order_summary_body),children:[(0,l.jsxs)("div",{className:"".concat(L().order_summary_body_to
1p),children:[(0,l.jsx)("p",{className:"".concat(L().label),children:h.Ms[p].Your_Plan}),(null==g?void 0:g.planPrice)&&(0,l.jsxs)("div",{className:"".concat(L().plan_info),children:[(0,l.jsx)("span",{children:null==g?void 0:g.planName}),(0,l.jsx)("span",{className:"".concat(L().price),children:null==g?void 0:g.planPrice})]}),(null==g?void 0:g.couponInfo)&&(0,l.jsxs)("div",{className:"".concat(L().plan_info),children:[(0,l.jsx)("span",{children:h.Ms[p].Coupon_Discount}),(0,l.jsx)("span",{children:null==g?void 0:null===(a=g.couponInfo)||void 0===a?void 0:a.couponDiscount})]})]}),(0,l.jsxs)("div",{className:"".concat(L().order_summary_body_bottom),children:[(null==g?void 0:g.subTotal)&&(0,l.jsxs)("div",{className:"".concat(L().total_amount),children:[(0,l.jsx)("span",{children:h.Ms[p].Total_Amount}),(0,l.jsx)("span",{className:"".concat(L().price),children:null==g?void 0:g.subTotal})]}),y&&"string"==typeof(null==y?void 0:y.gateway)?(0,l.jsx)("button",{type:"button",className:"".concat(L().proceed_pay," primary"),onClick:()=>M(null==y?void 0:y.gateway),children:h.Ms[p].Pay_through+" "+(null==y?void 0:y.gateway)}):(null==y?void 0:null===(o=y.gateway)||void 0===o?void 0:o.length)>0&&(null==y?void 0:null===(t=y.gateway)||void 0===t?void 0:t.length)>0?null==y?void 0:null===(r=y.gateway)||void 0===r?void 0:r.map((e,a)=>(0,l.jsx)("button",{type:"button",className:"".concat(L().proceed_pay," primary"),onClick:()=>M(e),children:h.Ms[p].Pay_through+" "+((null==e?void 0:e.includes("razorpay"))?"Razorpay":e)},a)):null]})]})]})})})})})]})}var V=e=>{var a;let{pagePath:o}=e,[t,s]=(0,i.useState)(!1),[d,p]=(0,i.useState)(!1),[v,_]=(0,i.useState)(0),[h,g]=(0,i.useState)({}),f=(0,i.useRef)({}),[y,b]=(0,i.useState)(),[x,k]=(0,i.useState)(!1),[I,M]=(0,i.useState)(!1),[T,E]=(0,i.useState)(),[H,z]=(0,i.useState)(!1),[L,B]=(0,i.useState)({isOpen:!1,summaryData:null}),{mutate:F,data:W,reset:Y}=(0,P.Z)(),{mutate:q,data:U,reset:V}=(0,S.Z)(),{mutate:J,data:Q,reset:X}=(0,S.Z)(),{mutate:K,data:$}=(0,P.Z)(),{state:{PageData:ee},dispatch:ea}=(0,n.oR)(),eo=(0,m.useRouter)(),{scrolledToppx:el}=(0,u.Z)(),en=(null==ee?void 0:null===(a=ee.banners)||void 0===a?void 0:a.length)>0,ei=!0===c.e.header.topHeader;(0,i.useEffect)(()=>{var e,a;s(!0),!(null==eo?void 0:null===(e=eo.pathname)||void 0===e?void 0:e.includes("/login"))&&!(null==eo?void 0:null===(a=eo.pathname)||void 0===a?void 0:a.includes("/profiles"))&&((0,N.rV)("IsOkongSignInFlow")||(0,N.rV)("OkongSignInParams"))&&((0,N.wz)("IsOkongSignInFlow"),(0,N.wz)("OkongSignInParams"),(0,N.wz)("IsSignupUserForOKONG"))},[]),(0,i.useEffect)(()=>{null!==el&&(el<120||v>el?p(!1):p(!0),_(el))},[el]),(0,i.useEffect)(()=>{if($&&!x){if(z(!1),(null==$?void 0:null===(o=$.data)||void 0===o?void 0:o.status)===!0){let n=(0,N.rV)("sessionId");var e,a,o,l,i,t,r,s,d,u,p,v,_,m,h,g,f,y,b,w,P,S="";if(null!=n&&(null==$?void 0:null===(i=$.data)||void 0===i?void 0:null===(l=i.response)||void 0===l?void 0:l.sessionId)!=n&&(0,N.B$)(),null==$?void 0:null===(r=$.data)||void 0===r?void 0:null===(t=r.response)||void 0===t?void 0:t.sessionId){S=(null==$?void 0:null===(d=$.data)||void 0===d?void 0:null===(s=d.response)||void 0===s?void 0:s.boxId)?null==$?void 0:null===(P=$.data)||void 0===P?void 0:null===(w=P.response)||void 0===w?void 0:w.boxId:(0,j.g$)(),(0,N.LS)("boxId",S),(0,j.iN)(S),(0,N.LS)("sessionId",null==$?void 0:null===(p=$.data)||void 0===p?void 0:null===(u=p.response)||void 0===u?void 0:u.sessionId),(0,j.mK)(null==$?void 0:null===(_=$.data)||void 0===_?void 0:null===(v=_.response)||void 0===v?void 0:v.sessionId),(0,N.LS)("profile-expiry-time",null===(m=new Date().getTime()+432e6)||void 0===m?void 0:m.toString()),(0,N.LS)("isloggedin",!0),(0,N.LS)("clientId",null==$?void 0:null===(g=$.data)||void 0===g?void 0:null===(h=g.response)||void 0===h?void 0:h.deviceId);let e=(0,N.zH)("user-info")||{},a={...e,expiryTime:new Date().getTime()+(null===(y=c.e)||void 0===y?void 0:null===(f=y.profile)||void 0===f?void 0:f.expiry)*1e3,isLoggedIn:!0};(0,N.q0)("user-info",a),et(),null===(b=sessionStorage)||void 0===b||b.setItem("user-context","payment_link"),k(!0)}}else ep(),ea({type:n.Nw.NotificationBar,payload:{message:(null==$?void 0:null===(a=$.data)||void 0===a?void 0:null===(e=a.error)||void 0===e?void 0:e.message)||"Something went wrong! Please try again later."}})}},[$]);let et=async()=>{k(!0);let e="https://apiv2.manoramamax.com/service/api/auth/user/info";try{var a,o,l,i,t,r,s,d,u,p,v,_,m;let h=await (0,j.SA)(e);if(null==h||!h.data)return null;if(null==h||null===(a=h.data)||void 0===a||!a.status)return(null==h?void 0:null===(u=h.data)||void 0===u?void 0:u.error)&&(null==h?void 0:null===(v=h.data)||void 0===v?void 0:null===(p=v.error)||void 0===p?void 0:p.code)===401&&(ep(),ea({type:n.Nw.NotificationBar,payload:{message:(null==h?void 0:null===(m=h.data)||void 0===m?void 0:null===(_=m.error)||void 0===_?void 0:_.message)||"Something went wrong! Please try again later."}})),null;{let a=null==h?void 0:null===(o=h.data)||void 0===o?void 0:o.response;
1if((null===(l=a)||void 0===l?void 0:l.profileParentalDetails)&&(null===(t=a)||void 0===t?void 0:null===(i=t.profileParentalDetails)||void 0===i?void 0:i.length)>0){for(let o of a.profileParentalDetails)if(null==o?void 0:o.isMasterProfile){let l=await (0,j.Zj)("https://apiv2.manoramamax.com/service/api/auth/activate/user/profile",{profileId:null==o?void 0:o.profileId});if(null==l?void 0:null===(r=l.data)||void 0===r?void 0:r.status){(0,N.LS)("profile-expiry-time",new Date().getTime()+1e3*c.e.profile.expiry);let o=(0,N.zH)("user-info")||{},l={...o,expiryTime:new Date().getTime()+1e3*c.e.profile.expiry};(0,N.q0)("user-info",l);let n=await (0,j.SA)(e);(null==n?void 0:null===(s=n.data)||void 0===s?void 0:s.status)&&(a=null==n?void 0:null===(d=n.data)||void 0===d?void 0:d.response)}break}}(0,N.XR)("uDetails",a),(0,N.LS)("isloggedin",!0);let u=(0,N.zH)("user-info")||{},p={...u,isLoggedIn:!0};(0,N.q0)("user-info",p),a&&ea({type:n.Nw.userDetails,payload:a})}}catch(e){return null}};(0,i.useEffect)(()=>{let e=null==eo?void 0:eo.asPath;if(e&&((null==e?void 0:e.includes("buy/payment-success"))||(null==e?void 0:e.includes("/buy/payment-failure"))||(null==e?void 0:e.includes("buy/packages-list")))){es();return}let a=(0,O.vl)(e);b(a);let o=null==a?void 0:a.coupon;if(o){let a=ec(e);if(a){g({...h,coupon:a,EncryptedCoupon:o});let e="https://apiv2.manoramamax.com/payment/api/v1/get/coupon/details?"+(0,O.Yo)({coupon_code:a});try{F(e),z(!0)}catch(e){console.log("coupon API error :",e)}}else ev({error:{code:404}})}else g({}),M(!1),z(!1),B({isOpen:!1,summaryData:null})},[eo,(0,N.rV)("sessionId"),x]),(0,i.useEffect)(()=>{var e,a,o,l,n,i,t,r,s,d,c,u,p,v,_,m,b,w,j,P,S,k,N,O,C,D,I,T,H,R,Z,A,L,F,Y,U,G,V,J;if((null==W?void 0:W.status)===200){if((null==y?void 0:y.auth_token)&&(null==y?void 0:y.tenant_code)&&!x){let e="".concat("https://apiv2.manoramamax.com","/service/api/v1/validate/payment/link?token=").concat(null==y?void 0:y.auth_token,"&tenant_code=").concat(null==y?void 0:y.tenant_code);try{K(e)}catch(e){console.log("Exception : ",e)}}else if(null==W?void 0:null===(e=W.data)||void 0===e?void 0:e.status){if((null==W?void 0:null===(l=W.data)||void 0===l?void 0:null===(o=l.response)||void 0===o?void 0:null===(a=o.data)||void 0===a?void 0:a.length)>0){if((null==W?void 0:null===(t=W.data)||void 0===t?void 0:null===(i=t.response)||void 0===i?void 0:null===(n=i.data)||void 0===n?void 0:n.length)===1){let e=null==W?void 0:null===(u=W.data)||void 0===u?void 0:null===(c=u.response)||void 0===c?void 0:c.data[0],a=(null==W?void 0:null===(_=W.data)||void 0===_?void 0:null===(v=_.response)||void 0===v?void 0:null===(p=v.targetParams)||void 0===p?void 0:p.length)>0?null==W?void 0:null===(b=W.data)||void 0===b?void 0:null===(m=b.response)||void 0===m?void 0:m.targetParams[0]:null;g({...h,gateway:null==e?void 0:e.gateway,packages:null==e?void 0:e.packages,couponMsg:a});let o={couponCode:null==h?void 0:h.coupon,gateway:null==e?void 0:e.gateway,packages:null==e?void 0:e.packages};if((null==o?void 0:o.gateway)==="coupon")try{q({url:"https://apiv2.manoramamax.com/payment/api/v1/order/summary",apiData:o})}catch(e){console.log("summary API error :",e)}else if((null==e?void 0:null===(w=e.gateway)||void 0===w?void 0:w.includes("razorpayCAW"))||(null==e?void 0:null===(j=e.gateway)||void 0===j?void 0:j.includes("worldline"))||(null==e?void 0:null===(P=e.gateway)||void 0===P?void 0:P.includes("razorpay"))){let a=(null==e?void 0:null===(S=e.gateway)||void 0===S?void 0:S.includes(","))?null==e?void 0:null===(k=e.gateway)||void 0===k?void 0:k.split(",")[1]:null==e?void 0:e.gateway;o.gateway=a;try{q({url:"https://apiv2.manoramamax.com/payment/api/v1/order/summary",apiData:o})}catch(e){console.log("summary API error :",e)}}}else if((null==W?void 0:null===(d=W.data)||void 0===d?void 0:null===(s=d.response)||void 0===s?void 0:null===(r=s.data)||void 0===r?void 0:r.length)>1){let e=(null==W?void 0:null===(C=W.data)||void 0===C?void 0:null===(O=C.response)||void 0===O?void 0:null===(N=O.targetParams)||void 0===N?void 0:N.length)>0?null==W?void 0:null===(I=W.data)||void 0===I?void 0:null===(D=I.response)||void 0===D?void 0:D.targetParams[0]:null,a=(null==W?void 0:null===(Z=W.data)||void 0===Z?void 0:null===(R=Z.response)||void 0===R?void 0:null===(H=R.targetParams)||void 0===H?void 0:null===(T=H[0])||void 0===T?void 0:T.couponExpiryDate)&&(null==W?void 0:null===(Y=W.data)||void 0===Y?void 0:null===(F=Y.response)||void 0===F?void 0:null===(L=F.targetParams)||void 0===L?void 0:null===(A=L[0])||void 0===A?void 0:A.couponExpiryDate)!=="0"?null==W?void 0:null===(J=W.data)||void 0===J?void 0:null===(V=J.response)||void 0===V?void 0:null===(G=V.targetParams)||void 0===G?void 0:null===(U=G[0])||void 0===U?void 0:U.couponExpiryDate:"";f.current={...f.current,CouponExpiryDate:a},e?(g({...h,couponMsg:e}),M(!0),E({response:{targetParams:e,button:"Subscribe",OnButtonClickHandler:ed},status:!0}),z(!1)):ed()}}else g({}),ev(),B({isOpen:!1,summaryData:null})}else g({}),ev(null==W?void 0:W.data),B({isOpen:!1,summaryData:null})}},[W]),(0,i.useEffect)(()=>
1{if(U){var e,a,o,l,i;if((null==U?void 0:U.status)===200&&(null==U?void 0:null===(e=U.data)||void 0===e?void 0:e.status)&&(null==U?void 0:null===(a=U.data)||void 0===a?void 0:a.response)){let e=null==U?void 0:null===(o=U.data)||void 0===o?void 0:o.response;if(ea({type:null===(l=n.Nw)||void 0===l?void 0:l.packageUtil,payload:{order_summary:e}}),(null==e?void 0:e.payAmount)===0&&(null==h?void 0:h.gateway)==="coupon"){let a={gateway:null==h?void 0:h.gateway,packages:null==h?void 0:h.packages,couponCode:(null==h?void 0:h.coupon)?null==h?void 0:h.coupon:(null==e?void 0:e.couponInfo.couponCode)?null==e?void 0:e.couponInfo.couponCode:""};try{J({url:"https://apiv2.manoramamax.com/payment/api/v1/order/checkout",apiData:a})}catch(e){console.log("Checkout API error :",e)}}else((null==e?void 0:e.payAmount)||(null==h?void 0:h.gateway.includes("razorpay"))||(null==h?void 0:null===(i=h.gateway)||void 0===i?void 0:i.includes("worldline")))&&((null==h?void 0:h.couponMsg)?(M(!0),E({response:{targetParams:null==h?void 0:h.couponMsg,button:"Subscribe",OnButtonClickHandler:er,CouponSummaryRes:e},status:!0}),z(!1)):B({isOpen:!0,summaryData:e}))}else ev(null==U?void 0:U.data),B({isOpen:!1,summaryData:null})}},[U]),(0,i.useEffect)(()=>{var e;(null==Q?void 0:Q.status)===200&&((null==Q?void 0:null===(e=Q.data)||void 0===e?void 0:e.status)?(M(!0),E(null==Q?void 0:Q.data),z(!1)):ev(null==Q?void 0:Q.data))},[Q]);let er=e=>{B({isOpen:!0,summaryData:e})},es=()=>{g({}),M(!1),E(null),z(!1),B({isOpen:!1,summaryData:null}),Y(),V(),X()},ed=()=>{try{var e,a,o,l,i;let t=null==W?void 0:null===(o=W.data)||void 0===o?void 0:null===(a=o.response)||void 0===a?void 0:null===(e=a.data)||void 0===e?void 0:e.map(e=>null==e?void 0:e.packages),r="/buy/packages-list?coupon=".concat(null==h?void 0:h.EncryptedCoupon);(null==f?void 0:null===(l=f.current)||void 0===l?void 0:l.CouponExpiryDate)&&(0,N.LS)("".concat(null==h?void 0:h.EncryptedCoupon,"_expiry"),JSON.stringify(null==f?void 0:null===(i=f.current)||void 0===i?void 0:i.CouponExpiryDate)),(null==h?void 0:h.EncryptedCoupon)&&(null==t?void 0:t.length)>0?((0,N.LS)("".concat(null==h?void 0:h.EncryptedCoupon),JSON.stringify(t)),ep(r)):(null==h?void 0:h.EncryptedCoupon)?ep(r):(ea({type:n.Nw.NotificationBar,payload:{message:"Something went wrong! Please try again later."}}),es(),ep())}catch(e){console.log("PlansPageRedirectionHandler error: ",e),ea({type:n.Nw.NotificationBar,payload:{message:"Something went wrong! Please try again later."}}),es(),ep()}},ec=e=>{var a;if(!e)return"";let o=(0,O.vl)(e),l=null==o?void 0:o.coupon;if(l){let e=(0,O._T)(l,null===(a=c.e)||void 0===a?void 0:a.CouponDecryptionSecretKey);if(e)return e}},eu=()=>{var e,a;(null===(a=c.e)||void 0===a?void 0:null===(e=a.signin)||void 0===e?void 0:e.ssoLogin)?(0,O.Ed)():eo.push("/signin"),(0,C.qP)("signin",{})},ep=e=>{M(!1),E(null),z(!1),e?eo.replace(e):eo.replace("/")},ev=(e,a)=>{var o,l,n,i,t,r,s,d,c,u,p,v;let _={};switch(null==e?void 0:null===(o=e.error)||void 0===o?void 0:o.code){case -402:{let a=(null==e?void 0:null===(l=e.error)||void 0===l?void 0:l.message)?null==e?void 0:null===(n=e.error)||void 0===n?void 0:n.message:"Uh, oh! You have already availed a coupon!";if(null==a?void 0:a.includes("\n")){let[e,o=""]=null==a?void 0:a.split("\n"),l={errorMsg1:e,errorMsg2:(null==o?void 0:o.includes("click here"))?null==o?void 0:null===(i=o.split("click here")[0])||void 0===i?void 0:i.trim():o,button:(null==o?void 0:o.includes("click here"))?"click here":"Continue Watching"};_=l}else _={errorMsg1:a,button:"Continue Watching"};_.popupType="error",_.errorType="alreadyAvailed",M(!0),E(_),z(!1);break}case -1e3:_.errorMsg1=(null==e?void 0:null===(t=e.error)||void 0===t?void 0:t.message)?null==e?void 0:null===(r=e.error)||void 0===r?void 0:r.message:"You are not Logged in ! please login to watch the content",_.button="Login Now",_.SigninHandler=eu,_.popupType="error",_.errorType="signin",M(!0),E(_),z(!1);break;case -1:_.errorMsg1=(null==e?void 0:null===(s=e.error)||void 0===s?void 0:s.message)?null==e?void 0:null===(d=e.error)||void 0===d?void 0:d.message:"Invalid coupon for your Region !",_.button="Back to Home",_.popupType="error",M(!0),E(_),z(!1);break;case 404:_.errorMsg1=(null==e?void 0:null===(c=e.error)||void 0===c?void 0:c.message)?null==e?void 0:null===(u=e.error)||void 0===u?void 0:u.message:"You have entered an incorrect coupon code.\n Please recheck and enter the correct code.",_.button="Subscribe Now",_.popupType="error",_.errorType="invalidCoupon",_.RedirectionPath=(0,N.rV)("isloggedin")?"/buy/packages-list":"/login",M(!0),E(_),z(!1);break;default:_.errorMsg1=(null==e?void 0:null===(p=e.error)||void 0===p?void 0:p.message)?null==e?void 0:null===(v=e.error)||void 0===v?void 0:v.message:"Something went wrong, Please try again later !",_.button="Back to Home",_.popupType="error",M(!0),E(_),z(!1)}};return t?(0,l.jsxs)("div",{className:"".concat(r().headerHome," ").concat(en?"".concat(r().page_has_banners):"".concat(r().no_banners)," ").concat(ei?"".concat(r().page_has_languages):"".concat(r().no_languages)
1),children:[(0,l.jsx)("div",{className:"".concat(r().headerDesktop),children:(0,l.jsx)(R,{pagePath:o})}),(0,l.jsxs)("div",{className:"".concat(r().headerMobile," ").concat(d?"".concat(r().ad_hide):"".concat(r().ad_show)),children:[(0,l.jsx)(Z.Z,{pagePath:o}),(0,l.jsx)(w,{pagePath:o})]}),(I||T)&&(0,l.jsx)(A.default,{open:I,data:T,onClose:ep}),(null==L?void 0:L.isOpen)&&(null==L?void 0:L.summaryData)&&(0,l.jsx)(G,{active_OrderSummary:null==L?void 0:L.summaryData,closePopup:B,couponDetails:h,setlandingcouponClose:ep}),H&&(0,l.jsx)(D.Z,{})]}):(0,l.jsx)(l.Fragment,{})}},46377:function(e,a,o){"use strict";var l=o(85893),n=o(2864),i=o.n(n),t=o(1558),r=o(41664),s=o.n(r),d=o(67294);o(22955);var c=o(16732),u=o(66353),p=o(85518);a.Z=e=>{var a;let{pagePath:o}=e,[n,r]=(0,d.useState)(""),{state:{localLang:v}}=(0,c.oR)();return((0,d.useEffect)(()=>{let e=(0,t.rV)("app-dwnld-hdr"),a=new Date(null==e?void 0:e.expires),o=new Date;e&&a>o?r(!1):r(!0)},[n]),n)?(null==o?void 0:null===(a=o.path)||void 0===a?void 0:a.includes("buy/order-summary/"))||["buy/packages-list","settings","myaccount","search","favorites","shorts","settings/edit-profile"].includes(null==o?void 0:o.path)?null:(0,l.jsxs)("div",{className:"".concat(i().app_header),children:[(0,l.jsx)("span",{className:"".concat(i().close_icon),onClick:()=>{let e=new Date;e.setTime(e.getTime()+2592e5),(0,t.LS)("app-dwnld-hdr",{checkStatus:!0,expires:e.toUTCString()}),(0,t.d8)("app-dwnld-hdr",{checkStatus:!0,expires:e.toUTCString()}),r(!1)},children:(0,l.jsx)("img",{src:u.Z.mbDwnldHeader.closeIcon})}),(0,l.jsx)("div",{className:"".concat(i().app_inner),children:(0,l.jsxs)("div",{className:"".concat(i().app_left),children:[(0,l.jsxs)("h3",{children:["Install ","manoramaMAX"," App"]}),(0,l.jsxs)("p",{children:["Get ","manoramaMAX"," mobile app for a superlative experience!"]}),(0,l.jsx)("div",{className:"".concat(i().store_icon),children:"iOS"===p.BF?(0,l.jsx)(s(),{href:"https://apps.apple.com/in/app/manoramamax/id1468454034",target:"_blank",children:(0,l.jsx)("button",{className:"".concat(i().btn),type:"button",children:"Install Now"})}):(0,l.jsx)(s(),{href:"https://play.google.com/store/apps/details?id=com.mmtv.manoramamax.android",target:"_blank",children:(0,l.jsx)("button",{className:"".concat(i().btn),type:"button",children:"Install Now"})})})]})})]}):null}},66724:function(e,a,o){"use strict";var l=o(67294);a.Z=function(){let[e,a]=(0,l.useState)(null),[o,n]=(0,l.useState)(null),[i,t]=(0,l.useState)(null);function r(e){n(window.scrollY),t(document.documentElement.scrollHeight-window.innerHeight-window.scrollY)}return(0,l.useEffect)(()=>(a(document.documentElement.scrollHeight),n(window.scrollY),t(document.documentElement.scrollHeight-window.innerHeight),window.addEventListener("scroll",r),()=>{window.removeEventListener("scroll",r)}),[]),{totalHeightpx:e,scrolledToppx:o,scrolledBottompx:i}}},58713:function(e){e.exports={primaryColor:"#2cd7f3",whiteColor:"#fff",bodyColor:"#141414",main_nav:"header_main_nav__qrDPk",top_header:"header_top_header__VRxjN",container:"header_container__dwp8i",language:"header_language__GIWdw",help:"header_help__znmFp",nav_fixed:"header_nav_fixed__AMXkP",nav:"header_nav__i0NOE",header_gradient:"header_header_gradient__E_v2l",headerHome:"header_headerHome__FDfKt",no_languages:"header_no_languages__d9RRQ",headerDesktop:"header_headerDesktop__dyQBK",top_gradient:"header_top_gradient__RObPp",nav_left:"header_nav_left__Qx_9S",active:"header_active__6Yj05",tag_class:"header_tag_class__65ypY",tag:"header_tag__MXWK7",bp:"header_bp__uFzWV",more_menu:"header_more_menu__XpHOj",hasMoreDiv:"header_hasMoreDiv__jH3QA",dropdown:"header_dropdown__Frp95",nav_right:"header_nav_right__4h5HZ",main_search:"header_main_search__54y2N",search:"header_search__hhx4j",Redeem_Voucher:"header_Redeem_Voucher__zp9M2",plans:"header_plans__82_Wm",profile_menu_nav:"header_profile_menu_nav__X7z3g",profile_name_block:"header_profile_name_block__IJURi",profile_icon:"header_profile_icon__vCeYs",with_profiles:"header_with_profiles__mq5lQ",profile_name:"header_profile_name__jUH5g",profile_menu:"header_profile_menu__ExMhS",has__profiles:"header_has__profiles__bkE9W",user_icon:"header_user_icon__i_Y2C",profile_lock_icon:"header_profile_lock_icon__Hs1O_",profile_lock:"header_profile_lock__Dijpf",devider:"header_devider__Dt7Hb",users_section:"header_users_section__Ab_3D",profile_name_el:"header_profile_name_el__t8Q35",primary:"header_primary__NBdhx",nav_bg:"header_nav_bg__2oDxH",headerMobile:"header_headerMobile___QfWe",bottom_menus:"header_bottom_menus__oUxIi",nav_transparent:"header_nav_transparent__4WG_f",has_trans:"header_has_trans__8F0j9",headerMenus:"header_headerMenus__vmniL",no_trans:"header_no_trans__0xHPH",headerMobile_fixed:"header_headerMobile_fixed__x7ejh",mobile_header:"header_mobile_header__kz6tX",mobile_header_top:"header_mobile_header_top__xSnjq",mobile_header_top_right:"header_mobile_header_top_right__1Bw9C",myaccountIcon:"header_myaccountIcon__j8nOd",searchIcon:"header_searchIcon__4pkck",selected:"header_selected__crZqb",default:"header_default__NBU_O",imageDiv:"header_imageDiv__TNika",menu_list:"header_menu_list___8OrY"}},19269:function(e){e.exports={primaryColor:"#2cd7f3",whiteColor:"#fff",bodyColor:"#141414",page_loader:"loader_page_loader__F3T2W",icon:"loader_icon__ZnJXA",spin:"loader_spin__WhEv_",btn_loader:"loader_btn_loader__jC8_k"}},2864:function(e){e.exports={primaryColor:"#2cd7f3",whiteColor:"#fff",bodyColor:"#141414",app_header:"mbDwnldHeader_app_header__Gd63h",close_icon:"mbDwnldHeader_close_icon__WiFdF",app_inner:"mbDwnldHeader_app_inner__FuO2a",app_left:"mbDwnldHeader_app_left__YTQsb",btn:"mbDwnldHeader_btn__MsTJ_",mobile:"mbDwnldHeader_mobile__GIP9O"}},37114:function(e){e.exports={primaryColor:"#2cd7f3",whiteColor:"#fff",bodyColor:"#141414","MuiPaper-root":"OrderSummary_popup_MuiPaper-root__zOUXx",order_summary_container:"OrderSummary_popup_order_summary_container__KAsWN",close_icon:"OrderSummary_popup_close_icon__jEz0_",cross_icon:"OrderSummary_popup_cross_icon__lG2YJ",order_summary_top:"OrderSummary_popup_order_summary_top__8w__e",order_summary_body:"OrderSummary_popup_order_summary_body__rz7p5",order_summary_body_to
1p:"OrderSummary_popup_order_summary_body_top__wluv4",label:"OrderSummary_popup_label__fczEX",plan_info:"OrderSummary_popup_plan_info__QWpVB",price:"OrderSummary_popup_price__CghhA",copun:"OrderSummary_popup_copun__8ljeF",copun_input_container:"OrderSummary_popup_copun_input_container__yZJWS",input_container:"OrderSummary_popup_input_container__8HQjE",input_div:"OrderSummary_popup_input_div__zBpn6",apply_btn:"OrderSummary_popup_apply_btn__2uGMM",copun_msg:"OrderSummary_popup_copun_msg__OR7fl",copun_err_msg:"OrderSummary_popup_copun_err_msg__733AE",copun_valid_msg:"OrderSummary_popup_copun_valid_msg__RRN4R",order_summary_body_bottom:"OrderSummary_popup_order_summary_body_bottom__UYhBO",total_amount:"OrderSummary_popup_total_amount__s3FOj",proceed_pay:"OrderSummary_popup_proceed_pay__SDv9B",terms_container:"OrderSummary_popup_terms_container__sQzJ5",terms:"OrderSummary_popup_terms__zTnuz",no_packages:"OrderSummary_popup_no_packages__RYmdg",already_subscribed:"OrderSummary_popup_already_subscribed__iBGc7",staticPage:"OrderSummary_popup_staticPage__p2Cl3",Iframe:"OrderSummary_popup_Iframe__czzro",Iframe2:"OrderSummary_popup_Iframe2__RHrY7",closeBtn:"OrderSummary_popup_closeBtn__JmLvd",paymentOptionsRow:"OrderSummary_popup_paymentOptionsRow__R2KJq",paymentSection:"OrderSummary_popup_paymentSection__b83Yd",paymentHeading:"OrderSummary_popup_paymentHeading__CzYrO",paymentMethods:"OrderSummary_popup_paymentMethods__yuBAY",paymentOption:"OrderSummary_popup_paymentOption__RTdMt",active:"OrderSummary_popup_active__wiOQI",radioIndicator:"OrderSummary_popup_radioIndicator__xRyjP",paymentLabel:"OrderSummary_popup_paymentLabel__0alS1",autoRenewToggle:"OrderSummary_popup_autoRenewToggle__6kpsY",toggleLabel:"OrderSummary_popup_toggleLabel__6lmVn",toggleSlider:"OrderSummary_popup_toggleSlider__UFnD1",ordersummary_tvod:"OrderSummary_popup_ordersummary_tvod__Wz4al"}}}]);
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.