!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7c585768-3735-4ebd-b4fb-49cede017114",e._sentryDebugIdIdentifier="sentry-dbid-7c585768-3735-4ebd-b4fb-49cede017114")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[35491],{2920:(e,t,n)=>{"use strict";n.d(t,{C:()=>y.C,A:()=>p});var r=n(6029),l=n(28349),a=n(99064),i=n(78383),s=n.n(i),o=n(55729),u=n(90248),d=n(95084),c=n(18858);function p(e){let{id:t,location:n,initialTabKey:i,onChange:p=s(),tabs:y,children:g,customControls:m,noSportMenu:h,eventStatusType:x,seasonId:v,disableAnalytics:f}=e,{isMobile:b}=(0,l.$c)(),[j,C]=((e,t)=>{let n=(0,o.useState)(e);return t||n})(i,m),_=(0,c.Ay)({isSportMenuVisible:!h,isInMobileTabs:!1});return(0,o.useEffect)(()=>{j!==i&&C(i)},[t,n,v]),(0,r.jsxs)(a.tU,{onChange:e=>{j!==e&&(C(e),p(e),b&&window.scrollTo({left:0,top:0}))},initialValue:i||j,value:j,variant:"primary",fullWidthTabs:!0,children:[(0,r.jsx)(l.PI,{top:_,isStickingDisabled:!b,verticalAlign:"top",mdDown:{bg:"surface.s1",borderBottom:"1px solid",borderColor:"elevation.elevation1"},children:(0,r.jsx)(a.tU.List,{underline:!0,scroll:!0,children:y.filter(e=>!e.isHidden).map(e=>(0,r.jsx)(a.tU.Tab,{tabKey:e.tabKey,style:{marginLeft:0},as:"h2",onClick:r=>r.nativeEvent.isTrusted&&!f&&e.tabKey!==j?(0,d.yy)({type:e.tabKey,id:t,location:n,status:x}):void 0,children:(0,r.jsx)("a",{href:"#tab:".concat(e.tabKey),onClick:e=>e.preventDefault(),style:{color:"inherit"},children:"string"==typeof e.item?(0,r.jsx)(u.A,{id:e.item,values:e.values}):e.item})},"".concat(t,"-").concat(e.tabKey)))})}),g]},t)}var y=n(56132)},5195:(e,t,n)=>{"use strict";n.d(t,{M:()=>E});var r=n(6029),l=n(99064),a=n(64006),i=n(55729),s=n(21377),o=n(45860),u=n(59721),d=n(28349),c=n(76356),p=n(90248),y=n(15340),g=n(36882),m=n(82346);let h=e=>{let{all:t,live:n}=e;return(0,r.jsxs)(c.so,{shrink:0,children:[n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.EY,{textStyle:"body.small",color:"status.live",children:n}),(0,r.jsx)(d.EY,{textStyle:"body.small",color:"neutrals.nLv3",children:"/"})]}),void 0!==t&&(0,r.jsx)(d.EY,{textStyle:"body.small",color:"neutrals.nLv3",children:t})]})};var x=n(4967);let v=e=>{let{ut:t,totalCount:n,liveCount:l}=e;return(0,r.jsx)(a.tQ,{tournament:t,children:(0,r.jsxs)(c.so,{justify:"space-between",align:"center",cursor:"pointer",px:{base:"xl",md:"lg"},py:{base:"md",md:"sm"},_hover:{bg:"surface.s2"},gap:"sm",children:[(0,r.jsxs)(c.so,{gap:"lg",align:"center",style:{width:"calc(100% - 90px)"},children:[(0,r.jsx)(u.e,{id:t.id,name:t.name,size:24}),(0,r.jsx)(d.EY,{textStyle:"body.large",truncate:!0,children:(0,r.jsx)(m.O,{uniqueTournament:t})})]}),(0,r.jsxs)(c.so,{gap:"md",align:"center",children:[n&&l&&(0,r.jsx)(h,{all:null==n?void 0:n[t.id],live:null==l?void 0:l[t.id]}),(0,r.jsx)(y.e,{id:t.id,entity:s.bq7.Tournaments,location:g.y.MainLeagues,type:g.b.UniqueTournament})]})]},t.id)})},f=e=>{let{category:t,utGroups:n,date:l}=e,{totalCount:i,liveCount:u}=((e,t)=>{let{data:n}=(0,o.Ay)(s.ZXN.countByUniqueTournaments(e,(0,x.UG)(t),3600*(0,x.UW)())),{data:r}=(0,o.Ay)((0,x.cK)(t)?s.ZXN.liveCountByUniqueTournaments(e):null);return{totalCount:null==n?void 0:n.uniqueTournamentEventCount,liveCount:null==r?void 0:r.liveUniqueTournaments}})(t.id,l),y=Array.from(new Map(n.flatMap(e=>e.uniqueTournaments).map(e=>[e.id,e])).values());return(0,r.jsxs)(c.so,{direction:"column",bg:"surface.s2",children:[y.map(e=>(0,r.jsx)(v,{ut:e,totalCount:i,liveCount:u},e.id)),(0,r.jsx)(a.Z6,{category:t,children:(0,r.jsx)(c.az,{px:{base:"[64px]",sm:"[56px]"},py:{base:"md",md:"md"},_hover:{bg:"surface.s2"},children:(0,r.jsx)(d.EY,{textStyle:"body.large",children:(0,r.jsx)(p.A,{id:"basic.all"})})})})]})},b=e=>{let{category:t,onAsyncComplete:n,date:l,updateContentHeight:a}=e,{data:u}=(0,o.Ay)(s.ZXN.uniqueTournaments(t.id),{onSuccess:e=>n(e.groups)});return((0,i.useEffect)(()=>{null==a||a()},[u]),u)?(0,r.jsx)(f,{category:t,date:l,utGroups:u.groups}):null},j=(0,i.memo)(e=>{let{opened:t,category:n,date:l,updateContentHeight:a}=e,s=(0,i.useRef)(void 0);return s.current?(0,r.jsx)(f,{category:n,utGroups:s.current,date:l}):t?(0,r.jsx)(b,{category:n,date:l,updateContentHeight:a,onAsyncComplete:e=>{s.current=e}}):null},(e,t)=>e.opened===t.opened);var C=n(8329),_=n(52466),w=n(79131);let T=e=>{let{opened:t,category:n,eventsCount:l,toggleAccordion:a}=e;return(0,r.jsxs)(c.so,{cursor:"pointer",w:"100%",align:"center",justify:"space-between",gap:"md",border:"none",onClick:a,py:"md",px:{base:"xl",md:"lg"},bg:{md:t?"primary.highlight":"surface.s1",_hover:t?"primary.highlight":"surface.s2"},br:{mdDown:"sm"},children:[(0,r.jsxs)(c.so,{justify:"space-between",align:"center",gap:"sm",grow:1,children:[(0,r.jsxs)(c.so,{gap:"lg",align:"center",children:[(0,r.jsx)(C.w,{alpha2:n.alpha2,name:n.name,categoryId:n.id,size:24,loading:"lazy"}),(0,r.jsx)(d.EY,{textStyle:"body.large",children:(0,r.jsx)(w.m,{slug:n.slug,name:n.name})})]}),(0,r.jsx)(h,{all:null==l?void 0:l.all,live:null==l?void 0:l.live})]}),(0,r.jsx)(c.az,{w:"xl",h:"xl",flexShrink:0,children:(0,r.jsx)(_.zQC,{icon:"chevron-down",fill:t?"primary.default":"onSurface.nLv3",style:{transition:"0.2s all",transform:"rotate(".concat(180*!!t,"deg)")}})})]})},A=e=>{1!==e.button&&e.preventDefault()},D=e=>{let{category:t,date:n,eventsCount:i}=e;return(0,r.jsxs)(l.nD.Item,{br:["sm",0],bg:["surface.s1",void 0],elevation:[2,void 0],children:[(0,r.jsx)(a.Z6,{category:t,onClick:A,children:(0,r.jsx)(l.nD.Trigger,{children:e=>{let{opened:n,toggleAccordion:l}=e;return(0,r.jsx)(T,{opened:n,category:t,eventsCount:i,toggleAccordion:l})}})}),(0,r.jsx)(l.nD.Content,{children:e=>{let{opened:l,updateContentHeight:a}=e;return(0,r.jsx)(j,{opened:l||!1,category:t,date:n,updateContentHeight:a})}})]})},E=e=>{let{sport:t,date:n,categories:a}=e,i=((e,t)=>{let{data:n}=(0,o.Ay)(s.t3g.categoriesByDate(e,(0,x.UG)(t))),{data:r}=(0,o.Ay)((0,x.cK)(t)?s.t3g.liveCategoryEvents(e):null);return function(e,t){if(!e)return;let n=e.categories,r=null==t?void 0:t.liveCategories,l={};return n.forEach(e=>{let t=e.category.id;l[t]={all:e.totalEvents,live:r?r[t]:void 0}}),l}(n,r)})(t,n);return(0,r.jsx)(l.nD,{children:a.map(e=>(0,r.jsx)(D,{category:e,date:n,eventsCount:null==i?void 0:i[e.id]},e.id))})}},16419:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},54044:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>l,it:()=>s,uD:()=>o,w9:()=>a,wV:()=>i});var r=n(21377);let l={desktop:{width:360},mobile:{width:"100%",topSpace:0,adSpace:62,bottomNavSpace:56}},a={[r.QCR.Tennis]:"top_players",[r.QCR.TableTennis]:"top_players",[r.QCR.Darts]:"top_players",[r.QCR.Badminton]:"top_players",[r.QCR.Motorsport]:"top_drivers",[r.QCR.MMA]:"top_fighters",[r.QCR.Cycling]:"top_riders",default:"top_teams"},i={default:"top_players"},s={[r.QCR.Motorsport]:"top_series",[r.QCR.MMA]:"top_organisations",default:"top_leagues"},o={[r.QCR.Motorsport]:"all_series",[r.QCR.MMA]:"all_organisations",default:"all_competitions"}},70807:(e,t,n)=>{"use strict";function r(e,t,n){let r=[...e];return r.sort((e,r)=>{if(n&&(e.alpha2===n||r.alpha2===n)&&e.alpha2!==r.alpha2){if(e.alpha2===n)return -1;if(r.alpha2===n)return 1}if((e.priority||r.priority)&&e.priority!==r.priority){var l,a;return(null!=(l=r.priority)?l:0)-(null!=(a=e.priority)?a:0)}try{return e.name.localeCompare(r.name,t)}catch(t){return e.name.localeCompare(r.name)}}),r}n.d(t,{X:()=>r})},70917:(e,t,n)=>{var r=n(74283),l=n(87567);e.exports=function(e){return null==e?[]:r(e,l(e))}},74283:(e,t,n)=>{var r=n(88601);e.exports=function(e,t){return r(t,function(t){return e[t]})}}}]);