1(()=>{(function(){try{var L=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{},R=new L.Error().stack;R&&(L._sentryDebugIds=L._sentryDebugIds||{},L._sentryDebugIds[R]="75cca4e6-a606-4c47-b769-097ccc4249bb",L._sentryDebugIdIdentifier="sentry-dbid-75cca4e6-a606-4c47-b769-097ccc4249bb")}catch(n){}})();(self.webpackChunkdice_web=self.webpackChunkdice_web||[]).push([[18674],{90317:((L,R,n)=>{n.d(R,{B:()=>Z});var t=n(96540),T=n(63719),f=n(13516),Q=n(90953),X=n(94962),J=n(17540),S=n(64759),C;(function(r){r.LOADING="loading",r.LOADED="loaded",r.ERROR="error"})(C||(C={}));const z=({item:r,isSelected:y,itemClick:u,index:h,itemFocus:O,showIcons:B})=>{const[b,U]=(0,t.useState)(C.LOADING),K=()=>u(r.id),M=()=>O==null?void 0:O(r.id),F=()=>U(C.LOADED),N=()=>U(C.ERROR),{imageType:E}=t.useContext(f.xK),D=(0,f.AH)("sidebar__item",`sidebar--icon-${b}`,y&&"selected");return t.createElement("button",{className:D,onClick:K,onFocus:M,title:r.description||r.title,"aria-label":r.title,"data-item-index":h,"data-item-id":r.id},r.iconUrl&&B&&t.createElement("img",{src:(0,f.vy)(r.iconUrl,"AUTO",60,E),alt:r.title,onLoad:F,onError:N,height:"25",width:"25"}),t.createElement("span",null,r.title))},Z=({items:r,globalOnClick:y,globalOnFocus:u,isLoading:h,toggleMode:O,allCategoriesLabel:B,showIcons:b=!0,showLoader:U=!1,loadMore:K,highlightedItem:M})=>{const F=(0,f.AH)(T.k,"sidebar",h&&"sidebar--loading"),{settings:N}=(0,Q.U)(),{setCSSProperty:E}=(0,J.E)(),[D,A]=t.useState(null),G=t.useRef(null);t.useEffect(()=>{M&&A(null)},[M]),(0,X.BL)(G.current,K),t.useEffect(()=>{E("--sidebar-item-font",N.SECONDARY_FONT_URL),E("--sidebar-bg-color",N.BG_COLOR);const c=r.find(_=>_.isSelected);return c&&A(c.id),()=>{E("--sidebar-item-font",null),E("--sidebar-bg-color",null)}},[E]);const j=t.useCallback(c=>{A(O&&c===D?null:c);const _=r.find(v=>v.id===c);y&&y(_),_!=null&&_.action&&_.action()},[r,y,D]),k=t.useCallback(c=>{if(u){const _=r.find(H=>H.id===c),v=r.indexOf(_);u(_,v)}},[r,u]);return t.createElement("div",{className:F},t.createElement("div",{className:"sidebar__content"},O&&t.createElement("button",{className:(0,f.AH)("sidebar__item",D===null&&"selected"),onClick:()=>j(null),"aria-label":B},t.createElement("span",null,B)),r.map((c,_)=>{var v;const H=(v=c.isSelected)!==null&&v!==void 0?v:c.id===D||c.id===M;return t.createElement(z,{key:c.id,item:c,isSelected:H,itemClick:j,itemFocus:k,showIcons:b,index:_})}),U&&t.createElement("div",{ref:G,className:"sidebar__content--loader"},t.createElement(S.A,{useRealmColor:!0,smallMode:!0}))),h&&t.createElement(S.A,{useRealmColor:!0}))}}),99520:((L,R,n)=>{n.r(R),n.d(R,{default:()=>Ne});var t=n(96540),T=n(86364),f=n(56347),Q=n(34235),X=n(48324),J=n(94953),S=n(1346),C=n(32248),z=n(68407),Z=n(58562),r=n(90953),y=n(94962),u=n(4592),h=n(13516),O=n(62851),B=n(64759),b=n(90317),U=n(47243),K=n(78955),M=n(17323),F=n(55184),N=n(59530),E=n(58116),D=n(81056),A=n(71342),G=n(60756),j=Object.defineProperty,k=Object.defineProperties,c=Object.getOwnPropertyDescriptors,_=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,de=(l,a,s)=>a in l?j(l,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):l[a]=s,q=(l,a)=>{for(var s in a||(a={}))v.call(a,s)&&de(l,s,a[s]);if(_)for(var s of _(a))H.call(a,s)&&de(l,s,a[s]);return l},ge=(l,a)=>k(l,c(a));const Se=({moment:l,history:a,bucket:s,loadMoreChannels:x,mutedPreference:xe})=>{var _e,ue;const m=t.useRef(null),me=t.useRef(0),[I,We]=t.useState(null),we=(I==null?void 0:I.from)&&(I==null?void 0:I.to),d=(0,Z.b0)(["signUp","signIn","errorOccurredPleaseTryAgain","noProgrammeAvailable","epgPreviousDay","epgNextDay","epgNextDay","epgBackNow","epgPreviousRange","epgNextRange","playingNow","epgAllCategories","epgFavourites","epgPlay","liveNow","loadMore","epgGuide","live","epgTimeRangeAnnouncement"],{epgTimeRangeAnnouncement:{from:I==null?void 0:I.from,to:I==null?void 0:I.to}}),be=(_e=(0,y.lW)())==null?void 0:_e.width,{routes:ee}=t.useContext(N.P),{analytics:W}
1=t.useContext(Q.I),Ke=(0,f.zy)(),Fe=(0,T.wA)(),[Ee,te]=t.useState(u.Wc.MEDIUM),[V,ve]=t.useState(null),[Pe,Ge]=t.useState(null),[ne,pe]=t.useState(null),[fe,oe]=t.useState(null),[se,ye]=t.useState(!1),[He,re]=t.useState(!1),ae=(0,T.d4)(e=>e.services.navbar.isMobile),he=(0,T.d4)(e=>e.services.app.isRtL),Oe=ae||((ue=s.contentList)==null?void 0:ue.length)<=2,{epgDvrHoursLive:De=0,epgPlaybackContentStatus:Ve,settings:{PRIMARY_COLOR:Ye,EPG_COLOR:ze,BG_COLOR:je,PRIMARY_FONT_URL:$e,SECONDARY_FONT_URL:Qe}}=(0,r.U)(),Ie=Ve===C.AvailabilityState.ENABLED,Xe=Date.now()-De*u.MA+G.MINUTE_BUFFER;t.useEffect(()=>{!s.isFetchingNext&&V&&window.requestAnimationFrame(()=>{ve(null);try{Me(V)}catch(e){(0,D.JE)("It was not possible to scroll to category: ",{loadingAnchor:V})}})},[s.isFetchingNext,V,s.contentList]),t.useEffect(()=>{var e;const o=window.matchMedia("(max-width: 1024px)");o.matches&&te(u.Wc.SMALL);const i=g=>{g.matches?te(u.Wc.SMALL):te(u.Wc.MEDIUM)};return(e=o==null?void 0:o.addEventListener)==null||e.call(o,"change",i),()=>{var g;(g=o==null?void 0:o.removeEventListener)==null||g.call(o,"change",i)}},[]);const le=m.current&&m.current.querySelector(".epg-matrix__header"),Je=e=>m.current.style.setProperty("--epg-header-height",`${e}px`),Ze=t.useCallback(()=>{Oe||(m.current.getBoundingClientRect().bottom<=0?ye(!1):ye(!0))},[m.current,ae]);(0,y.BL)(m.current,Ze,{threshold:0},!1,!0);const ie=e=>{const i=m.current.getBoundingClientRect().top<=0;re(!!(se&&i))};t.useEffect(()=>{if(!(!m.current||!le||Oe)){if(se){const e=le.getBoundingClientRect();Je(e.height),window.addEventListener("scroll",ie)}else re(!1),window.removeEventListener("scroll",ie);return()=>{window.removeEventListener("scroll",ie)}}},[m.current,le,se,ae]);const ce=(e,o,i)=>{var g;const{startDate:P,endDate:Y}=e,w=Date.now(),Te=new Date(P).getTime()<=w&&new Date(Y).getTime()>w,it=e.endDate<w,p=s.contentList.find(ct=>ct.channelId===o);if(!e&&!o)return Re((g=s.contentList[0])==null?void 0:g.liveEventId);if(Te&&Ie)return pe({programme:e,id:p.eventId.toString(),name:p.title,channelLogoUrl:p.logoUrl,accessLevel:p.accessLevel});if(i&&be<=G.EPG_BREAKPOINT)return oe({programme:e,channelId:o});Te?$(o):e.vodId?Le(e.vodId.toString()):it&&e.startDate>=Xe&&$(o,!1,new Date(P),e),W==null||W.track(S.Yh.PROGRAMME_CLICK,{accessLevel:p.accessLevel,bucketId:s.bucketId,epgCategory:p.categoryId,group:p.name,id:p.channelId,programId:e.vodId,programTitle:e.programme,title:e.episode,type:p.type})},Le=t.useCallback(e=>{a.push((0,A.gk)(z.LinkTypes.VOD,ee,{id:e}))},[ee,ne]),$=t.useCallback((e,o=!1,i,g)=>{const P=s.contentList.find(Y=>Y.channelId===e);oe(null),o||Re(P.liveEventId,i,g,P)},[s]),Re=(e,o,i,g)=>{const{entryPage:P}=(0,K.Q6)(Ke,a,!1);a.push((0,A.gk)(z.LinkTypes.LIVE,ee,{id:String(e)}),{startLiveFrom:o||null,isFromPastEPGProgramme:!!o,currentProgramme:i,channel:g,entryPage:P})},ke=()=>({primaryColor:Ye,programmeColor:window.APP_CONF.EPG_COLOR||ze,backgroundColor:je,primaryFont:$e,secondaryFont:Qe}),qe=()=>q({errorMessage:d.errorOccurredPleaseTryAgain,noProgrammeAvailable:d.noProgrammeAvailable,epgPreviousDay:d.epgPreviousDay,epgNextDay:d.epgNextDay,epgBackNow:d.epgBackNow,epgPreviousRange:d.epgPreviousRange,epgNextRange:d.epgNextRange,playingNow:d.playingNow,epgAllCategories:d.epgAllCategories,epgFavourites:d.epgFavourites,liveNow:d.liveNow,epgPlay:d.epgPlay,loadMore:d.loadM
1ore,epgGuide:d.epgGuide,live:d.live},we&&{epgTimeRangeAnnouncement:d.epgTimeRangeAnnouncement}),et=async e=>$(e.channelId),Ce=e=>{const o=X.f.fetchEPGNextProgrammesRequest({bucketId:s.bucketId,from:e.from,to:e.to});Fe(o)},tt=t.useCallback((e,o)=>o?s.contentList.map(i=>ge(q({},i),{programmes:(0,J.lQ)(i.programmes,o.fromTs,o.toTs)})):s.contentList,[s.contentList]),nt=e=>{var o,i,g;if(e!=null&&e.past&&(((o=e.past)==null?void 0:o.fromTs)>me.current?W==null||W.track(S.Yh.SCROLL_NEXT):W==null||W.track(S.Yh.SCROLL_PREVIOUS),me.current=e.past.fromTs),(i=e==null?void 0:e.current)!=null&&i.fromTs&&((g=e==null?void 0:e.current)!=null&&g.toTs)){const P=l(e.current.fromTs).isSame(e.current.toTs,"day"),Y=l(e.current.fromTs).format("LLL");let w=l(e.current.toTs).format("LT");P||(w=l(e.current.toTs).format("LLL")),We({from:Y,to:w})}},ot={title:null,logo:null,channelId:null,isCasting:!1},Me=e=>document.querySelector(`[data-category-id="${e}"]`).scrollIntoView({behavior:"smooth"}),st=s.categories.filter(e=>e.title).map(e=>({id:e.categoryId,title:e.title,iconUrl:e.iconUrl,action:()=>{try{Me(e.categoryId)}catch(o){ve(e.categoryId),x()}}})),Ae=!1,rt=s.maxProgrammeWindowSecs?s.maxProgrammeWindowSecs/60/60:void 0,at=()=>ge(q({},s),{categories:void 0}),lt=(e,o)=>ce(e,o,!1);return t.createElement("div",{className:"epg-bucket carousel-container carousel-container--base"},t.createElement("div",{className:(0,h.AH)("epg-wrapper view",He&&"sticky-header"),ref:m},t.createElement("div",{className:(0,h.AH)("epg-matrix__container",s.categories.length&&Ae?"epg-matrix__container--with-sidebar":"")},Ae&&t.createElement(b.B,{items:st,highlightedItem:Pe}),t.createElement(O.AF,{moment:l,labels:qe(),appSettings:ke(),handleProgrammeClick:ce,handleProgrammeKeyPress:(e,o,i,g)=>{(0,h.YO)(()=>{ce(o,i,g)})(e)},handleDeniedChannelClick:et,onTimeRangeChange:nt,enableAnimations:!0,timeToPaginateInMinutes:60,getMultipleEpg:e=>{Ce({from:e.from,to:e.to})},fetchNextProgrammes:Ce,getChannelsWithoutGaps:tt,epg:at(),size:Ee,loadingChannelId:null,key:Ee.className,nowPlaying:ot,playingChannelId:null,loadMoreChannels:x,muted:xe,toggleMute:null,showFullScreenButton:!1,maxHoursAhead:rt,highlightItem:Ge,highlightedItem:Pe,maxHoursBackwards:De,playPastProgramme:Ie&<,isRtL:he,timeLocale:he?"en":void 0}),V&&t.createElement(B.a,null)),ne&&t.createElement(F.default,{programme:ne,onClose:()=>{pe(null)}}),fe&&t.createElement(M.G,{expandedProgramme:fe,setExpandedProgramme:oe,playEvent:$,playVod:Le})))},Be=({services:{session:{user:{isGuest:l}},search:{isSearchActive:a},app:{previousLocation:s},preferences:{muted:x}}})=>({isGuest:l,isSearchActive:a,previousLocation:s,mutedPreference:x}),Ue=l=>({setPreference:(a,s)=>{const x=(0,U.cG)(a,s);l(x)}}),Ne=(0,f.y)((0,T.Ng)(Be,Ue)((0,E.A)()(Se)))})}]);})(); 2 3//# sourceMappingURL=epg-bucket.49ec1aebc061926c8118.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.