1!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"[email protected]@14849"}}catch(e){}}();try{e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(t=(new e.Error).stack)&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="61010507-de82-4464-b3f0-50ba7f6266d9",e._sentryDebugIdIdentifier="sentry-dbid-61010507-de82-4464-b3f0-50ba7f6266d9")}catch(e){}var e,t;import{c as n,a as s,dB as a,dC as i,p as o,dD as r,dE as l,n as c,dF as d,dG as u,dH as m,dI as h,y as g,dJ as f,dK as _,aF as x,q as y,v as p,w as v,aw as b,dL as w,r as j,cx as T,dM as N,e as S,dN as I,dO as E,dP as L,dQ as k,dR as D,dS as C,dT as B,z as G,j as z,dU as H,dV as P,I as M,dW as V,aa as F,D as O,c8 as W,N as R,aI as Y,dX as A,dY as X,t as K,dZ as $,d_ as q,d$ as J,k as U,x as Q,e0 as Z,e1 as ee,e2 as te,e3 as ne,e4 as se,f as ae,cv as ie,ch as oe,e5 as re,e6 as le,e7 as ce,e8 as de,cw as ue,e9 as me,ea as he,a5 as ge,eb as fe,a9 as _e,ec as xe,b2 as ye,ed as pe,ee as ve,ef as be,V as we,T as je,b as Te,eg as Ne,S as Se,M as Ie,eh as Ee,ei as Le}from"./index-DIL-Wss4.js";import{M as ke}from"./main-D4YePtcG.js";import{S as De}from"./seo-DZp_zGsC.js";import{C as Ce}from"./channel-group-picker-BLGYjuhi.js";import"./memory-router-B-S3dj8V.js";import"./index-kbBjg0tr.js";import"./use-can-close-editor-ehJuQlPc.js";import"./use-confirmation-dialog-Cb1eJxDM.js";import"./channel-group-trigger-DyE2aHlA.js";function Be(e,t,n){const s=e(l)??e(c);t(d,u(m(s,n)))}const Ge="grid-date-selector";function ze(e,t){const n=new Date(e(h)??e(c));n.setHours(20,0,0,0),t(d,u(n))}function He(e,t){const n=e(c);t(d,u(n))}function Pe(e){return{label:e.label,value:e.value.toISOString()}}const Me="separator-module__root__sY5H3";function Ve(e){const t=n.c(5),{className:s,"data-testid":a}=e;let i,o;return t[0]!==s?(i=G([Me,s]),t[0]=s,t[1]=i):i=t[1],t[2]!==a||t[3]!==i?(o=z.jsx("div",{className:i,"data-testid":a,"data-sentry-component":"Separator","data-sentry-source-file":"separator.tsx"}),t[2]=a,t[3]=i,t[4]=o):o=t[4],o}const Fe="guide-channel-module__channel__3KYeL",Oe="guide-channel-module__active__AGThU",We="guide-channel-module__number__QPTDp",Re="guide-channel-module__currently-playing__xc-sS",Ye="guide-channel-module__logo__-GmiC",Ae="guide-channel-module__inner__BIsNV";function Xe(e){const t=n.c(15),{channel:a,style:i}=e,o=s(f),r=s(H),l=s(P),c="channel"===a.type?a.info.id:null,d="channel"===a.type?a.info.logo:null,u="channel"===a.type?a.info.name:null,m=o?.channelId===c&&l&&Oe,h=r===c&ℜlet g,_,x,y,p;return t[0]!==m||t[1]!==h?(g=G([Fe,m,h]),t[0]=m,t[1]=h,t[2]=g):g=t[2],t[3]!==a.info.channelNumber?(_=z.jsx(M,{className:We,size:"small",variant:"label",children:a.info.channelNumber}),t[3]=a.info.channelNumber,t[4]=_):_=t[4],t[5]!==d||t[6]!==u?(x=z.jsx(V,{className:Ye,logo:d,name:u,"data-sentry-element":"ChannelLogo","data-sentry-source-file":"guide-channel.tsx"}),t[5]=d,t[6]=u,t[7]=x):x=t[7],t[8]!==_||t[9]!==x?(y=z.jsxs("div",{className:Ae,children:[_,x]}),t[8]=_,t[9]=x,t[10]=y):y=t[10],t[11]!==i||t[12]!==g||t[13]!==y?(p=z.jsx("div",{className:g,style:i,"data-sentry-component":"GuideChannel","data-sentry-source-file":"guide-channel.tsx",children:y}),t[11]=i,t[12]=g,t[13]=y,t[14]=p):p=t[14],p}const Ke={container:"guide-controls-module__container__EnObf",channelList:"guide-controls-module__channelList__GKLNW",navigation:"guide-controls-module__navigation__NKaSf",dateSelection:"guide-controls-module__dateSelection__VxJyB",dateButton:"guide-controls-module__dateButton__-mkN0",jumpButtons:"guide-controls-module__jumpButtons__wDan4",mobileHidden:"guide-controls-module__mobileHidden__ry9JE"};function $e(){const e=n.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={showDialogTitle:!0,useRadioButtons:!0},e[0]=t):t=e[0];const{currentlySelectedDate:l,selectDate:m}=function(e){const t=n.c(16),l=g();let m;t[0]!==e?(m=e??{},t[0]=e,t[1]=m):m=t[1];const{getFocusKey:b}
1=m,w=s(h),j=s(a),T=s(f),N=e?.showDialogTitle,S=e?.useRadioButtons,I=s(c);let E;t[2]!==I||t[3]!==j||t[4]!==l?(E=_(j,I,l),t[2]=I,t[3]=j,t[4]=l,t[5]=E):E=t[5];const L=E;let k;t[6]!==w||t[7]!==T||t[8]!==b||t[9]!==N||t[10]!==l||t[11]!==S?(k=(e,t)=>{const n=e(c),s=e(i).map(e=>({label:_(e,n,l),value:e})),a=s.find(e=>w?r(w,e.value):!!T&&x(T,e.value));t(y,p({id:Ge,type:"list",title:N?{key:"guide_select_date"}:void 0,buttonTextAlign:"left",analyticsType:"date",onButtonClick:e=>{e&&(t(d,u(new Date(e))),t(y,v()))},sections:[{options:s.map(Pe)}],radioButtons:S,activeOptions:a?[a.value.toISOString()]:[],lastFocusKey:b?.()??""}))},t[6]=w,t[7]=T,t[8]=b,t[9]=N,t[10]=l,t[11]=S,t[12]=k):k=t[12];const D=o(k);let C;return t[13]!==L||t[14]!==D?(C={selectDate:D,currentlySelectedDate:L},t[13]=L,t[14]=D,t[15]=C):C=t[15],C}(t),{id:b}=s(F)??{},w=b===Ge;let j;return e[1]!==l||e[2]!==m||e[3]!==w?(j=z.jsx(O,{active:w,className:Ke.dateButton,icon:"calendar",onClick:m,"data-sentry-element":"DropdownButton","data-sentry-component":"GuideControlsNavDate","data-sentry-source-file":"guide-controls-nav-date.tsx",children:l}),e[1]=l,e[2]=m,e[3]=w,e[4]=j):j=e[4],j}function qe(e){const t=n.c(43),{className:l}=e,c=g(),{moveToNow:d,moveToPrimeTime:u}=function(){const e=n.c(3),t=o(He),s=o(ze);let a;return e[0]!==t||e[1]!==s?(a={moveToNow:t,moveToPrimeTime:s},e[0]=t,e[1]=s,e[2]=a):a=e[2],a}(),{canGoBack:m,canGoForward:h,goToPreviousDay:f,goToNextDay:_}=(()=>{const e=n.c(15),t=s(a),l=s(i),c=o(Be);let d;e[0]!==c?(d=()=>c(-1),e[0]=c,e[1]=d):d=e[1];const u=d;let m;e[2]!==c?(m=()=>c(1),e[2]=c,e[3]=m):m=e[3];const h=m;let g;e[4]!==t||e[5]!==l[0]?(g=r(l[0],t),e[4]=t,e[5]=l[0],e[6]=g):g=e[6];const f=!g,_=l[l.length-1];let x;e[7]!==t||e[8]!==_?(x=r(_,t),e[7]=t,e[8]=_,e[9]=x):x=e[9];const y=!x;let p;return e[10]!==h||e[11]!==u||e[12]!==f||e[13]!==y?(p={canGoBack:f,canGoForward:y,goToPreviousDay:u,goToNextDay:h},e[10]=h,e[11]=u,e[12]=f,e[13]=y,e[14]=p):p=e[14],p})(),x=W("(width <= 500px)");let y,p;t[0]!==l?(y=G([Ke.container,l]),t[0]=l,t[1]=y):y=t[1],t[2]!==x?(p=z.jsx(Ce,{className:Ke.channelList,hideLabel:x,"data-sentry-element":"ChannelGroupPicker","data-sentry-source-file":"guide-controls.tsx"}),t[2]=x,t[3]=p):p=t[3];const v=!m;let b,w,j;t[4]!==c?(b=c("previous_day_button"),t[4]=c,t[5]=b):b=t[5],t[6]!==f||t[7]!==v||t[8]!==b?(w=z.jsx(R,{className:Ke.mobileHidden,disabled:v,icon:"chevronLeft",variant:"chip",hideLabel:!0,onClick:f,"data-sentry-element":"Button","data-sentry-source-file":"guide-controls.tsx",children:b}),t[6]=f,t[7]=v,t[8]=b,t[9]=w):w=t[9],t[10]===Symbol.for("react.memo_cache_sentinel")?(j=z.jsx($e,{"data-sentry-element":"GuideControlsNavDate","data-sentry-source-file":"guide-controls.tsx"}),t[10]=j):j=t[10];const T=!h;let N,S,I,E,L,k,D,C,B,H,P,M,V;return t[11]!==c?(N=c("next_day_button"),t[11]=c,t[12]=N):N=t[12],t[13]!==_||t[14]!==T||t[15]!==N?(S=z.jsx(R,{className:Ke.mobileHidden,disabled:T,icon:"chevronRight",variant:"chip",hideLabel:!0,onClick:_,"data-sentry-element":"Button","data-sentry-source-file":"guide-controls.tsx",children:N}),t[13]=_,t[14]=T,t[15]=N,t[16]=S):S=t[16],t[17]!==w||t[18]!==S?(I=z.jsxs("div",{className:Ke.dateSelection,children:[w,j,S]}),t[17]=w,t[18]=S,t[19]=I):I=t[19],t[20]===Symbol.for("react.memo_cache_sentinel")?(E=z.jsx(Ve,{className:Ke.mobileHidden,"data-sentry-element":"Separator","data-sentry-source-file":"guide-controls.tsx"}),t[20]=E):E=t[20],t[21]===Symbol.for("react.memo_cache_sentinel")?(L={button_title:"guide_now_button",type:"filter"},t[21]=L):L=t[21],t[22]!==c?(k=c("guide_now_button"),t[22]=c,t[23]=k):k=t[23],t[24]!==d||t[25]!==k?(D=z.jsx(Y,{className:Ke.jumpButton,trackArgs:L,variant:"chip",onClick:d,"data-sentry-element":"TrackingButton","data-sentry-source-file":"guide-controls.tsx",children:k}),t[24]=d,t[25]=k,t[26]=D):D=t[26],t[27]===Symbol.for("react.memo_cache_sentinel")?(C=G([Ke.jumpButton,Ke.mobileHidden]),t[27]=C):C=t[27],t[28]!==c?(B=c("guide_primetime_button"),t[28]=c,t[29]=B):B=t[29],t[30]!==u||t[31]!==B?(H=z.jsx(R,{className:C,variant:"chip",onClick:u,"data-sentry-element":"Button","data-sentry-source-file":"guide-control
1s.tsx",children:B}),t[30]=u,t[31]=B,t[32]=H):H=t[32],t[33]!==D||t[34]!==H?(P=z.jsxs("div",{className:Ke.jumpButtons,children:[D,H]}),t[33]=D,t[34]=H,t[35]=P):P=t[35],t[36]!==I||t[37]!==P?(M=z.jsxs("div",{className:Ke.navigation,children:[I,E,P]}),t[36]=I,t[37]=P,t[38]=M):M=t[38],t[39]!==y||t[40]!==M||t[41]!==p?(V=z.jsxs("div",{className:y,"data-sentry-component":"GuideControls","data-sentry-source-file":"guide-controls.tsx",children:[p,M]}),t[39]=y,t[40]=M,t[41]=p,t[42]=V):V=t[42],V}const Je="grid-arrow-module__arrow__OUinV",Ue="grid-arrow-module__arrowLeft__YqrXg",Qe="grid-arrow-module__arrowRight__c8oJI";function Ze(e){const t=n.c(15),{direction:s,navigateDirection:a,disabled:i}=e,o="left"===s,r=g(),l=!o;let c;t[0]!==o||t[1]!==l?(c=G(Je,{[Ue]:o,[Qe]:l}),t[0]=o,t[1]=l,t[2]=c):c=t[2];const d=o?"arrowLeft":"arrowRight";let u;t[3]!==s||t[4]!==a?(u=()=>a(s),t[3]=s,t[4]=a,t[5]=u):u=t[5];const m="right"===s?"guide_navigate_right":"guide_navigate_left";let h,f;return t[6]!==r||t[7]!==m?(h=r(m),t[6]=r,t[7]=m,t[8]=h):h=t[8],t[9]!==i||t[10]!==c||t[11]!==d||t[12]!==u||t[13]!==h?(f=z.jsx(R,{className:c,disabled:i,icon:d,variant:"none",hideLabel:!0,onClick:u,"data-sentry-element":"Button","data-sentry-component":"GridArrow","data-sentry-source-file":"grid-arrow.tsx",children:h}),t[9]=i,t[10]=c,t[11]=d,t[12]=u,t[13]=h,t[14]=f):f=t[14],f}const et="guide-now-bar-module__now-bar__myipc",tt="guide-now-bar-module__now-time__waCef",nt=e=>{const t=n.c(14),{size:a,"data-testid":i}=e,o=void 0===i?"guide-now-bar":i,r=s(c),l=s(A);let d;t[0]!==r||t[1]!==l?(d=l?.(r)??0,t[0]=r,t[1]=l,t[2]=d):d=t[2];const u=`${d}px`,m=`${a}px`;let h,g,f,_;return t[3]!==u||t[4]!==m?(h={"--guide-now-bar-left":u,"--guide-now-bar-height":m},t[3]=u,t[4]=m,t[5]=h):h=t[5],t[6]!==r?(g=X(r,"HH:mm"),t[6]=r,t[7]=g):g=t[7],t[8]!==g?(f=z.jsx("div",{className:tt,children:z.jsx(M,{size:"small",variant:"label",children:g})}),t[8]=g,t[9]=f):f=t[9],t[10]!==o||t[11]!==h||t[12]!==f?(_=z.jsx("div",{className:et,"data-testid":o,style:h,"data-sentry-component":"GuideNowBar","data-sentry-source-file":"guide-now-bar.tsx",children:f}),t[10]=o,t[11]=h,t[12]=f,t[13]=_):_=t[13],_},st=(e,t)=>{t&&(t.style.cursor=e)},at=e=>{const t=n.c(6);let s,a,i,o;t[0]!==e?(s=()=>{const t=e.current;if(!t)return;const n=e=>{1===(e.buttons??e.which)&&(st("grab",t),window.addEventListener("pointermove",a),window.addEventListener("pointerup",s))},s=()=>{st("auto",t),window.removeEventListener("pointermove",a),t.removeEventListener("pointerup",s)},a=e=>{t.scrollLeft=t.scrollLeft-e.movementX,t.scrollTop=t.scrollTop-e.movementY};return t.addEventListener("pointerdown",n),()=>{t.removeEventListener("pointerdown",n),window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",s)}},a=[e],t[0]=e,t[1]=s,t[2]=a):(s=t[1],a=t[2]),j.useEffect(s,a),t[3]!==e?(i=()=>{const t=e.current;if(!t)return;let n={x:0,y:0};const s=e=>{n={x:e.clientX,y:e.clientY}},a=e=>{var t,s,a,i;t=n.x,s=e.clientX,a=n.y,i=e.clientY,Math.floor(Math.hypot(s-t,i-a))>5&&(e.preventDefault(),K("guide_interaction",{scroll_origin:"touch"})),n={x:0,y:0}};return t.addEventListener("pointerdown",s),t.addEventListener("click",a),()=>{t.removeEventListener("pointerdown",s),t.removeEventListener("click",a)}},o=[e],t[3]=e,t[4]=i,t[5]=o):(i=t[4],o=t[5]),j.useEffect(i,o)};function it(e){return e.clientWidth>0}function ot(e){return e.isIntersecting}function rt(e,t,n){const s=e($);s&&Math.abs(s.x-n.scrollLeft)<=1&&Math.abs(s.y-n.scrollTop)<=1||t(d,q(n.scrollLeft,n.scrollTop))}const lt="guide-grid-module__scroll-container__x7bsh",ct="guide-grid-module__no-results__C---U",dt="guide-grid-module__channels-container__MJYA1",ut="guide-grid-module__inner-scroll__6XT4v",mt="guide-grid-module__channels-search-button-container__-azKH",ht="guide-grid-module__time-blocks-bar__1shVO",gt="guide-grid-module__rows__Kbo0N",ft="guide-grid-module__feedback__sBq88",_t="guide-grid-module__right-shadow__Nvtez",xt=U(!1),yt="guide-search-module__channels-search-button__XLpiq",pt="guide-search-module__guide-search-input__QzXjn",vt="guide-search-module__channelsSearchForm__6-I58",bt="guide-search-module__formCloseButton__U3WGN";function wt(){const e=n.c(18),t=g(),[s,a]=Q(xt),[i,o]=Q(Z),r=b(ee),l=j.useRef(null);let c;
1e[0]!==r?(c=e=>{r(e.target.value)},e[0]=r,e[1]=c):c=e[1];const d=c;let u;e[2]!==a?(u=()=>{a(!0)},e[2]=a,e[3]=u):u=e[3];const m=u;let h;e[4]!==a||e[5]!==o?(h=()=>{a(!1),o("")},e[4]=a,e[5]=o,e[6]=h):h=e[6];const f=h;let _;e[7]!==f||e[8]!==s||e[9]!==m?(_=()=>{s?f():m()},e[7]=f,e[8]=s,e[9]=m,e[10]=_):_=e[10];const x=_;let y;return e[11]!==f||e[12]!==s||e[13]!==d||e[14]!==i||e[15]!==t||e[16]!==x?(y=z.jsx(z.Fragment,{children:s?z.jsxs("form",{className:vt,role:"search",onSubmit:jt,children:[z.jsx(R,{className:bt,icon:"close",variant:"none",hideLabel:!0,onClick:f,children:t("button_close")}),z.jsx("input",{ref:l,autoCapitalize:"off",autoComplete:"off",autoFocus:!0,className:pt,id:"guide-search-input",inputMode:"search",name:"guide-search",placeholder:t("guide_channels_search_placeholder"),type:"text",value:i,onChange:d})]}):z.jsx(R,{active:s,className:yt,icon:"search",iconPosition:"start",variant:"filled",onClick:x,children:z.jsx(M,{size:"small",variant:"label",children:t("guide_channels_section_title")})})}),e[11]=f,e[12]=s,e[13]=d,e[14]=i,e[15]=t,e[16]=x,e[17]=y):y=e[17],y}function jt(e){return e.preventDefault()}const Tt="guide-time-block-module__timeBlock__sesfY",Nt="guide-time-block-module__time__ADE5a";function St(e){const t=n.c(13),{timeBlock:s,itemWidth:a,horizontalOffset:i}=e;let o;t[0]!==s.date?(o=s.date.toJSON(),t[0]=s.date,t[1]=o):o=t[1];const r=`time-block-${o}`,l=`translateX(${i}px)`;let c,d,u,m;return t[2]!==a||t[3]!==l?(c={width:a,transform:l},t[2]=a,t[3]=l,t[4]=c):c=t[4],t[5]!==s.date?(d=X(s.date,"HH:mm"),t[5]=s.date,t[6]=d):d=t[6],t[7]!==d?(u=z.jsx("div",{className:Nt,children:z.jsx(M,{size:"small",variant:"label",children:d})}),t[7]=d,t[8]=u):u=t[8],t[9]!==r||t[10]!==c||t[11]!==u?(m=z.jsx("div",{className:Tt,"data-testid":r,style:c,"data-sentry-component":"GuideTimeBlock","data-sentry-source-file":"guide-time-block.tsx",children:u}),t[9]=r,t[10]=c,t[11]=u,t[12]=m):m=t[12],m}const It=te(e=>{K("guide_interaction",{scroll_origin:e})},200);function Et(){const[e,{width:t=0,height:a=0}]=ie(),i=oe("(hover: hover) and (pointer: fine)");!function(e){const t=n.c(6),a=s(D),i=b(d),o=s(C);let r,l;t[0]!==o||t[1]!==a||t[2]!==e||t[3]!==i?(r=()=>{o&&a&&!a.handled&&e.current&&(e.current.scroll({left:a.x,top:a.y,behavior:"auto"}),i(B(a.x,a.y)))},l=[a,i,e,o],t[0]=o,t[1]=a,t[2]=e,t[3]=i,t[4]=r,t[5]=l):(r=t[4],l=t[5]),j.useEffect(r,l)}(e);const r=o(j.useCallback((e,t,n)=>{t(d,re(n))},[])),{ref:l,hovered:c}=le();j.useEffect(()=>{r(c)},[c,r]),at(e),function(e){const t=n.c(8),a=s(I),i=j.useRef(null),r=o(rt);let l;t[0]!==r?(l=e=>{const t=e.target;it(t)&&r(t)},t[0]=r,t[1]=l):l=t[1];const c=l;let d,u;t[2]!==c||t[3]!==a||t[4]!==e||t[5]!==r?(d=()=>{if(!a)return;const t=e.current;if(!t)return;const n=J(c,250);t.addEventListener("scroll",n);const s=new IntersectionObserver(e=>{const n=e.some(ot),s=n&&!1===i.current;i.current=n,s&&it(t)&&r(t)});return s.observe(t),()=>{t.removeEventListener("scroll",n),n.cancel(),s.disconnect()}},u=[c,a,e,r],t[2]=c,t[3]=a,t[4]=e,t[5]=r,t[6]=d,t[7]=u):(d=t[6],u=t[7]),j.useEffect(d,u)}(e);const u=g(),{data:h}=s(ce),f=s(xt),_=s(de),x=b(d),y=ue({count:_.length,estimateSize:()=>150,getScrollElement:()=>e.current,horizontal:!0,overscan:5}),p=ue({count:h.length,estimateSize:()=>52,getScrollElement:()=>e.current});j.useEffect(()=>{t<=0||y.measure()},[y,t]),j.useEffect(()=>{a<=0||p.measure()},[p,a]);const v=y.getTotalSize(),H=p.getTotalSize(),P=p.getVirtualItems(),V=y.getVirtualItems(),F=b(me);j.useEffect(()=>{F({channelHeightInPx:48,channelRowGapInPx:4,channelsColumnWidthInPx:116,timeBlockSizeInMinutes:30,oneMinuteWidthInPx:5})},[F]),j.useEffect(()=>{t&&a&&v&&H&&x(he({container:{width:t,height:a},inner:{width:v,height:H}}))},[v,H,x,t,a]);const O=_[V[0]?.index??-1]?.date.toISOString()??null,W=V[V.length-1],R=ge(W)?_[W.index]??null:null,Y=R?.date.toISOString()??null,A=P[0]?.index??null,X=P[P.length-1]?.index??null;!function(e){const t=n.c(14),{firstTimeVisible:a,lastTimeVisible:i,bufferInMinutes:o}=e,{startTime:r,endTime:l}=s(N),c=S(),d=s(I);let u,h;t[0]!==o||t[1]!==a||t[2]!==i||t[3]!==d||t[4]!==c?(u=()=>{if(!a||!d)return;const e=new Date(a),t=i?new Date(i):m(e,1);c.set(E,{startTime:k(e,o),endTime:L(t,o)})},t[0]=o,t[1]=a,t[2]=i,t[3]=d,t[4]=c,t[5]=u):u=t[5],t[6]!==o||t[7]!==l||t[8]!==a||t[9]!==i||t[10]!==d||t[11]!==r||t[12]!==c?(h=[r,l,a,o,i,d,c],t[6]=o,t[7]=l,t[8]=a,t[9]=i,t[10]=d,t[11]=r,t[12]=c,t[13]=h):h=t[13],j.useEffect(u,h)}({firstTimeVisible:O,lastTimeVisible:Y,bufferInMinutes:720}),function(e){const t=n.c(5),{firstChannelIndexVisible:s,lastChannelIndexVisible:a}=e,i=b(w);let o,r;t[0]!==i||t[1]!==s||t[2]!==a?(o=()=>{T(s)||T(a)||i({start:s??0,end:a??0})},r=[s,a,i],t[0]=i,t[1]=s,t[2]=a,t[3]=o,t[4]=r):(o=t[3],r=t[4]),j.useEffect(o,r)}
1({firstChannelIndexVisible:A,lastChannelIndexVisible:X});const K=f&&0===P.length,$=j.useCallback(n=>{if(!e.current)return;It("button_click");const s=e.current.scrollLeft,a="left"===n?Math.max(0,s-.8*t):Math.min(v,s+.8*t);fe(a,{behavior:"smooth"},y)},[v,y,t,e]),{atStart:q,atEnd:U}=function(e){const t=n.c(6),[s,a]=j.useState(!0),[i,o]=j.useState(!1);let r,l,c;return t[0]!==e?(r=()=>{const t=()=>{if(!e.current)return;const{scrollLeft:t,clientWidth:n,scrollWidth:s}=e.current;a(t<=0),o(t+n>=s-1)},n=e.current;return n&&(n.addEventListener("scroll",t),t()),()=>{n&&n.removeEventListener("scroll",t)}},l=[e],t[0]=e,t[1]=r,t[2]=l):(r=t[1],l=t[2]),j.useEffect(r,l),t[3]!==i||t[4]!==s?(c={atStart:s,atEnd:i},t[3]=i,t[4]=s,t[5]=c):c=t[5],c}(e);return z.jsxs(z.Fragment,{children:[z.jsxs("div",{ref:e,className:G("u-horizontal-scroll",lt,{[ct]:K}),onScroll:i?void 0:()=>It("touch"),onWheel:()=>It("scrolling"),children:[z.jsx("div",{className:_t}),!K&&z.jsx(nt,{size:e.current?.clientHeight??0}),z.jsx("div",{className:mt,children:z.jsx(wt,{"data-sentry-element":"GuideSearch","data-sentry-source-file":"guide-grid.tsx"})}),z.jsx(Ze,{direction:"left",disabled:q,navigateDirection:$,"data-sentry-element":"GridArrow","data-sentry-source-file":"guide-grid.tsx"}),z.jsx(Ze,{direction:"right",disabled:U,navigateDirection:$,"data-sentry-element":"GridArrow","data-sentry-source-file":"guide-grid.tsx"}),z.jsx("div",{className:ht,style:{width:v},children:V.map(e=>{const t=_[e.index];return T(t)?null:z.jsx(St,{horizontalOffset:V[0]?.start,itemWidth:e.size,timeBlock:t},t.id)})}),z.jsxs("div",{ref:l,className:ut,style:{height:H,width:v},children:[z.jsx(j.Suspense,{"data-sentry-element":"Suspense","data-sentry-source-file":"guide-grid.tsx",children:z.jsx("div",{className:dt,children:P.map(e=>{const t=h[e.index];return z.jsx(Xe,{channel:t,style:{translate:`0 ${e.start}px`}},e.key)})})}),P.map(e=>{const t=h[e.index];return T(t)?null:z.jsx("div",{className:gt,"data-testid":`channel-${"channel"===t.type?t.info.id:t.info.index}`,style:{width:v,transform:`translateY(${e.start}px)`},children:V.map((e,n)=>{const s=_[e.index];return T(s)||"channel"!==t.type?null:z.jsx(Lt,{channel:t,date:s.date,fullWidth:v,isFirst:0===n,offsetForHour:e.start},e.key)})},e.key)})]})]}),K?z.jsx(M,{className:ft,children:u("guide_channels_search_no_results")}):null]})}const Lt=j.memo(function({date:e,channel:t,isFirst:n,offsetForHour:s,fullWidth:a}){const i=function(e,t,n,s=!1){let a=n.findIndex(t=>t.startTime>=e);if(-1===a)return[];if(s){const s=new Date(e.getTime()-60*t*1e3),i=n.find(e=>e.endTime>=s);T(i)||(a=n.indexOf(i))}const i=n.slice(a),o=new Date(e.getTime()+60*t*1e3),r=i.findIndex(e=>e.startTime>=o);return r>-1?i.slice(0,r):i}(e,30,t.items,n);return i.map(n=>{const i=5*ne(n.startTime.getTime()-e.getTime())+s+2;let o=5*n.durationInMinutes-4;return o+i>a&&(o=a-i),z.jsx(se,{channel:t.info,durationInMinutes:n.durationInMinutes,href:ae.details.root({assetId:n.assetId,epgId:n.id,displayLanguage:n.displayLanguage}),program:n,programTitle:n.title,programWidth:o,startInPx:i,trackArgs:{type:"detail",epg_entry_id:n.id}},n.id)})});function kt(e){const t=n.c(33),{className:a}=e,i=s(f),o=s(P),r=j.useDeferredValue(i),l=s(c),d=g(),[u,m]=function(e,t,n={leading:!1}){const[s,a]=j.useState(e),i=j.useRef(null),o=j.useRef(!0),r=()=>window.clearTimeout(i.current);return j.useEffect(()=>r,[]),[s,j.useCallback(e=>{r(),o.current&&n.leading?a(e):i.current=window.setTimeout(()=>{o.current=!0,a(e)},t),o.current=!1},[n.leading])]}(null,500);let h,_,x;t[0]!==r||t[1]!==m?(h=()=>{m(r)},_=[r,m],t[0]=r,t[1]=m,t[2]=h,t[3]=_):(h=t[2],_=t[3]),j.useEffect(h,_);e:{if(!u){x=be;break e}let e;t[4]!==u.epgId?(e=_e(xe(u.epgId)),t[4]=u.epgId,t[5]=e):e=t[5],x=e}const y=s(x);let p;t[6]!==r?(p=r?{epgId:r.epgId,start:r.startTime,end:r.endTime}:null,t[6]=r,t[7]=p):p=t[7];const{replayProgress:v,liveProgress:b}=ye(p);if(!r||!o)return null;let w;t[8]!==r.endTime||t[9]!==r.startTime||t[10]!==l||t[11]!==d?(w=pe(r.startTime,r.endTime,l,d),t[8]=r.endTime,t[9]=r.startTime,t[10]=l,t[11]=d,t[12]=w):w=t[12];const T=w;let N;t[13]!==r.startTime?(N=X(r.startTime,"HH:mm"),t[13]=r.startTime,t[14]=N):N=t[14];const S=N;let I;t[15]!==r.endTime?(I=X(r.endTime,"HH:mm"),t[15]=r.endTime,t[16]=I):I=t[16];const E=I,L=T??"",k=r===u&&"hasData"===y?.state&&y.data?y.data.status:null,D=r.subtitle??"",C=r.title??"";let B;return t[17]!==a||t[18]!==r.blurhash||t[19]!==r.channelLogo||t[20]!==r.channelName||t[21]!==r.endTime||t[22]!==r.image||t[23]!==r.startTime||t[24]!==E||t[25]!==b||t[26]!==v||t[27]!==S||t[28]!==D||t[29]!==C||t[30]!==L||t[31]!==k?(B=z.jsx(ve,{airTime:L,channelLogo:r.channelLogo,channelName:r.channelName,className:a,coverImageBlurhash:r.blurhash,coverImageUrl:r.image,endDate:r.endTime,formattedEnd:E,formattedStart:S,liveProgress:b,playIcon:null,recordingState:k,replayProgress:v,startDate:r.startTime,subtitle:D,title:C,level:"h2",variant:"horizontal","data-sentry-element":"ProgramBox","data-sentry-component":"SelectedProgram","data-sentry-source-file":"selected-program.tsx"}),t[17]=a,t[18]=r.blurhash,t[19]=r.channelLogo,t[20]=r.channelName,t[21]=r.endTime,t[22]=r.image,t[23]=r.startTime,t[24]=E,t[25]=b,t[26]=v,t[27]=S,t[28]=D,t[29]=C,t[30]=L,t[31]=k,t[32]=B):B=t[32],B}const Dt="guide-module__main__Yg-ho",Ct="guide-module__header__NMPAj",Bt="guide-module__selectedProgram__pqI58",Gt="guide-module__guideControls__Vg4zy";function zt(){const e=n.c(5);Se(Ie.guide_page);const t=s(Ee);let a,i,o;return s(Le),e[0]!==t?(a=t?z.jsx(Te,{}):null,e[0]=t,e[1]=a):a=e[1],e[2]===Symbol.for("react.memo_cache_sentinel")?(i=z.jsx(Et,{"data-sentry-element":"GuideGrid","data-sentry-source-file":"guide.tsx"}),e[2]=i):i=e[2],e[3]!==a?(o=z.jsxs(z.Fragment,{children:[a,i]}),e[3]=a,e[4]=o):o=e[4],o}
1function Ht(){const e=n.c(25),t=j.useId(),s=W("(width >= 1024px)"),a=g();let i,o,r,l,c,d,u,m,h,f,_,x;return e[0]!==a?(i=a("seo_description_guide"),e[0]=a,e[1]=i):i=e[1],e[2]!==a?(o=a("seo_title_guide"),e[2]=a,e[3]=o):o=e[3],e[4]!==i||e[5]!==o?(r=z.jsx(De,{description:i,title:o,"data-sentry-element":"SEO","data-sentry-source-file":"guide.tsx"}),e[4]=i,e[5]=o,e[6]=r):r=e[6],e[7]!==a?(l=a("menu_guide"),e[7]=a,e[8]=l):l=e[8],e[9]!==t||e[10]!==l?(c=z.jsx(we,{"data-sentry-element":"VisuallyHidden","data-sentry-source-file":"guide.tsx",children:z.jsx(je,{id:t,level:"h1",size:"large",variant:"title","data-sentry-element":"Title","data-sentry-source-file":"guide.tsx",children:l})}),e[9]=t,e[10]=l,e[11]=c):c=e[11],e[12]===Symbol.for("react.memo_cache_sentinel")?(d=z.jsx(Te,{}),e[12]=d):d=e[12],e[13]!==s?(u=s&&z.jsx(j.Suspense,{fallback:z.jsx(Ne,{variant:"horizontal"}),children:z.jsx(kt,{className:Bt})}),e[13]=s,e[14]=u):u=e[14],e[15]===Symbol.for("react.memo_cache_sentinel")?(m=z.jsx(qe,{className:Gt,"data-sentry-element":"GuideControls","data-sentry-source-file":"guide.tsx"}),e[15]=m):m=e[15],e[16]!==u?(h=z.jsxs("div",{className:Ct,children:[u,m]}),e[16]=u,e[17]=h):h=e[17],e[18]===Symbol.for("react.memo_cache_sentinel")?(f=z.jsx(zt,{"data-sentry-element":"ConnectedGuide","data-sentry-source-file":"guide.tsx"}),e[18]=f):f=e[18],e[19]!==h?(_=z.jsxs(j.Suspense,{fallback:d,"data-sentry-element":"Suspense","data-sentry-source-file":"guide.tsx",children:[h,f]}),e[19]=h,e[20]=_):_=e[20],e[21]!==_||e[22]!==r||e[23]!==c?(x=z.jsxs(ke,{className:Dt,"data-testid":"guide","data-sentry-element":"Main","data-sentry-component":"Guide","data-sentry-source-file":"guide.tsx",children:[r,c,_]}),e[21]=_,e[22]=r,e[23]=c,e[24]=x):x=e[24],x}export{Ht as default}; 2//# sourceMappingURL=guide-DNAvyQyq.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.