!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="84015ac7-faee-45b3-a2ae-e0bc83475052",e._sentryDebugIdIdentifier="sentry-dbid-84015ac7-faee-45b3-a2ae-e0bc83475052")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11946,59007],{7643:(e,n,t)=>{t.d(n,{Ay:()=>o});var s=t(55729),l=t(45860),i=t(17259),r=t(27133);let a=Promise.resolve(),o=(0,i.Ht)(l.Ay,e=>(n,t,l)=>{let o,u=(0,s.useRef)(!1),{cache:d,initialSize:c=1,revalidateAll:m=!1,persistSize:p=!1,revalidateFirstPage:x=!0,revalidateOnMount:h=!1,parallel:g=!1}=l,[,,,v]=i.bZ.get(i.PP);try{(o=(e=>(0,i.lK)(e?e(0,null):null)[0])(n))&&(o=i.q9+o)}catch(e){}let[j,b,f]=(0,i.r9)(d,o),y=(0,s.useCallback)(()=>(0,i.b0)(j()._l)?c:j()._l,[d,o,c]);(0,r.useSyncExternalStore)((0,s.useCallback)(e=>o?f(o,()=>{e()}):()=>{},[d,o]),y,y);let I=(0,s.useCallback)(()=>{let e=j()._l;return(0,i.b0)(e)?c:e},[o,c]),T=(0,s.useRef)(I());(0,i.Es)(()=>{if(!u.current){u.current=!0;return}o&&b({_l:p?T.current:I()})},[o,d]);let _=h&&!u.current,w=e(o,async e=>{let s=j()._i,r=[],a=I(),[o]=(0,i.r9)(d,e),u=o().data,c=[],p=null;for(let e=0;e{if(a in v){let e=v[a];delete v[a],b=await e}else b=await t(o);j({data:b,_k:o}),r[e]=b};g?c.push(n):await n()}else r[e]=b;g||(p=b)}return g&&await Promise.all(c.map(e=>e())),b({_i:i.ZH}),r},l),A=(0,s.useCallback)(function(e,n){let t="boolean"==typeof n?{revalidate:n}:n||{},s=!1!==t.revalidate;return o?(s&&((0,i.b0)(e)?b({_i:!0}):b({_i:!1})),arguments.length?w.mutate(e,{...t,revalidate:s}):w.mutate()):a},[o,d]),C=(0,s.useCallback)(e=>{let t;if(!o)return a;let[,s]=(0,i.r9)(d,o);if((0,i.Tn)(e)?t=e(I()):"number"==typeof e&&(t=e),"number"!=typeof t)return a;s({_l:t}),T.current=t;let l=[],[r]=(0,i.r9)(d,o),u=null;for(let e=0;e{t.r(n),t.d(n,{default:()=>v});var s=t(6029),l=t(59721),i=t(46787),r=t(10174),a=t(76356),o=t(55729),u=t(90248),d=t(18970),c=t(18858),m=t(32180),p=t(35486),x=t(45860),h=function(e){return e[e.Results=0]="Results",e[e.Fixtures=1]="Fixtures",e[e.All=2]="All",e[e.Singles=3]="Singles",e[e.Doubles=4]="Doubles",e}(h||{});let g=[i.QCR.Tennis];function v(e){var n,t;let{hasSingles:h=!1,hasDoubles:v=!1}=e,j=(0,o.useContext)(d.Ws),b=g.includes(j),[f,y]=(0,o.useState)(b?2:1),I=(0,c.Ay)(),{data:T,isLoading:_,dropdownItems:w,selectedTournament:A,setSelectedTournament:C}=function(e,n){let{data:t,isLoading:s}=(0,x.Ay)(n===i.wNW.Team?i.cWY.uniqueTournamentsAll(e):null),l={label:"All",value:void 0},[r,a]=(0,o.useState)(l),u=[l,...(null==t?void 0:t.uniqueTournaments.map(e=>({label:e.name,value:e.id})))||[]];return{data:t,isLoading:n===i.wNW.Team&&s,selectedTournament:r,setSelectedTournament:a,dropdownItems:u}}(e.id,e.entity),M=null!=(n=A.value)?n:e.uniqueTournamentId,k=async()=>{let n=i.lX$.eventListRoutes({entity:e.entity,id:e.id,seasonId:e.seasonId,isPast:!1,page:0,uniqueTournamentId:M});if(!n)return;let t=(0,i.Lo9)(n),s=await fetch(t,{method:"HEAD",headers:i.jAu});(null==s?void 0:s.ok)||y(2*!!b)};return(0,o.useEffect)(()=>{e.entity===i.wNW.Player||b||k()},[A]),(0,p.L)(),(0,s.jsxs)(r.tU,{variant:"tertiary",initialValue:b?2:1,value:f,onChange:e=>y(e),children:[(!b||h&&v)&&(0,s.jsx)(r.PI,{top:null!=(t=e.top)?t:I,bg:"surface.s1",p:"sm",children:(0,s.jsxs)(a.so,{direction:"column",gap:"lg",children:[_?(0,s.jsx)(a.az,{h:"[34px]"}):T&&w.length>2&&(0,s.jsx)(r.ms,{label:"Select Unique Tournament",items:w,selectedItem:A,onSelectedItemChange:e=>{e.selectedItem&&C(e.selectedItem)},renderItem:e=>e?"All"===e.label?(0,s.jsx)(u.A,{id:"all"}):(0,s.jsxs)(a.so,{align:"center",gap:"xs",children:[e.value&&(0,s.jsx)(l.e,{id:e.value,size:24}),e.label]}):null}),(0,s.jsx)("div",{children:b&&h&&v?(0,s.jsxs)(r.tU.List,{children:[(0,s.jsx)(r.tU.Tab,{tabKey:2,children:(0,s.jsx)(u.A,{id:"all"})}),(0,s.jsx)(r.tU.Tab,{tabKey:3,children:(0,s.jsx)(u.A,{id:"tennis_singles"})}),(0,s.jsx)(r.tU.Tab,{tabKey:4,children:(0,s.jsx)(u.A,{id:"tennis_doubles"})})]}):b?null:(0,s.jsxs)(r.tU.List,{children:[(0,s.jsx)(r.tU.Tab,{tabKey:0,children:(0,s.jsx)(u.A,{id:"basic.results"})}),(0,s.jsx)(r.tU.Tab,{tabKey:1,children:(0,s.jsx)(u.A,{id:"basic.fixtures"})})]})})]})}),b&&h&&v?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.tU.Panel,{tabKey:2,children:(0,s.jsx)(m.l,{...e,uniqueTournamentId:M,isPast:!0,matchesTypeFilter:void 0})}),(0,s.jsx)(r.tU.Panel,{tabKey:3,children:(0,s.jsx)(m.l,{...e,uniqueTournamentId:M,isPast:!0,matchesTypeFilter:i.nJ5.Singles})}),(0,s.jsx)(r.tU.Panel,{tabKey:4,children:(0,s.jsx)(m.l,{...e,uniqueTournamentId:M,isPast:!0,matchesTypeFilter:i.nJ5.Doubles})})]}):b?(0,s.jsx)(m.l,{...e,uniqueTournamentId:M,isPast:!0,matchesTypeFilter:void 0}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.tU.Panel,{tabKey:0,children:(0,s.jsx)(m.l,{...e,uniqueTournamentId:M,isPast:!0})}),(0,s.jsx)(r.tU.Panel,{tabKey:1,children:(0,s.jsx)(m.l,{...e,uniqueTournamentId:M,isPast:!1})})]})]})}},32180:(e,n,t)=>{t.d(n,{l:()=>v});var s=t(6029),l=t(46787),i=t(76356),r=t(46222),a=t(6813),o=t(56494),u=t(94432),d=t(55729),c=t(43072),m=t(494),p=t(7643),x=t(36678);let h=(e,n,t)=>(s,i)=>n===l.wNW.Team?s===e:n===l.wNW.Manager&&!!t&&s===t[i];var g=t(96016);let v=e=>{var n;let{entity:t,id:v,uniqueTournamentId:j,seasonId:b,player:f,transfers:y,isPast:I,hideHeader:T,matchesTypeFilter:_,statisticFilter:w}=e,A=function(e){let{entity:n,id:t,uniqueTournamentId:s,seasonId:i,isPast:r,matchesTypeFilter:a}=e,o=(0,m.wA)(),{flatEvents:u,setSize:x,maps:h,hasMore:v,isValidating:j,error:b,...f}=function(e){let{entity:n,id:t,uniqueTournamentId:s,seasonId:i,isPast:r,matchesTypeFilter:a}=e,{data:o,size:u,setSize:d,isValidating:c,error:m}=(0,p.Ay)((e,o)=>0===e||(null==o?void 0:o.hasNextPage)?l.lX$.eventListRoutes({entity:n,id:t,uniqueTournamentId:s,seasonId:i,isPast:r,page:e,matchesTypeFilter:a}):null,l.TtD),x=o||[],h=x.reduce((e,n)=>[...e,...n.events],[]),g=x.reduce((e,n)=>({managedTeamMap:{...e.managedTeamMap||{},...n.managedTeamMap||{}},statisticsMap:{...e.statisticsMap||{},...n.statisticsMap||{}},playedForTeamMap:{...e.playedForTeamMap||{},...n.playedForTeamMap||{}},incidentsMap:{...e.incidentsMap||{},...n.incidentsMap||{}},onBenchMap:{...e.onBenchMap||{},...n.onBenchMap||{}}}),{statisticsMap:{},playedForTeamMap:{},managedTeamMap:{},onBenchMap:{},incidentsMap:{}}),v=!!x.length&&x[x.length-1].hasNextPage;return{flatEvents:h,data:x||[],size:u,setSize:d,maps:g,hasMore:v,isValidating:c,error:m}}({entity:n,id:t,uniqueTournamentId:s,seasonId:i,isPast:r,matchesTypeFilter:a}),{ref:y,inView:I}=(0,c.Wx)(),T=v&&u.length?u.length-10:void 0;return(0,d.useEffect)(()=>{I&&v&&!j&&x(e=>e+1)},[I]),(0,d.useEffect)(()=>{o((0,g.oU)(u))},[u.length]),{flatEvents:u,hasMore:v,maps:h,triggerRef:y,triggerIndex:T,isLoadingInitial:!b&&!u.length,isValidating:j,setSize:x,error:b,...f}}({entity:t,id:v,uniqueTournamentId:j,seasonId:b,isPast:I,matchesTypeFilter:_});return(null==A||null==(n=A.flatEvents)?void 0:n.length)||A.isLoadingInitial?(0,s.jsxs)(i.az,{children:[(0,s.jsx)(u.b,{descending:I,events:A.flatEvents,isMobile:!0,eventCell:(e=>{let{id:n,entity:t,statisticsMap:s,playedForTeamMap:i,managedTeamMap:r,onBenchMap:a,incidentsMap:o,player:u,statisticFilter:d}=e;return t===l.wNW.Team?(0,x.ey)({isReferenceTeamId:h(n,t)}):t===l.wNW.Manager&&r?(0,x.ey)({isReferenceTeamId:h(n,t,r),incidentsMap:o,entity:t}):t===l.wNW.Player?e=>{var n;return(0,x.G)({selectedStatistic:d,statistics:null==s?void 0:s[e],isOnBench:null!=(n=null==a?void 0:a[e])&&n,playedFor:i?i[e]:void 0,incidents:o?o[e]:void 0,player:u})}:x.gY})({entity:t,id:v,player:f,statisticFilter:w,...A.maps}),isEventCellFactory:t===l.wNW.Player,triggerRef:A.triggerRef,triggerIndex:A.triggerIndex,transfers:y,hideHeader:T,asCards:!0}),A.hasMore&&(0,s.jsx)(i.az,{pb:"sm",children:(0,s.jsx)(o.a,{})})]}):(0,s.jsx)(i.az,{p:"sm",children:(0,s.jsx)(r.Zp,{children:(0,s.jsx)(a.p,{graphic:"no-data",titleMessageId:"basic.noEvents"})})})}},35486:(e,n,t)=>{t.d(n,{L:()=>r});var s=t(55729),l=t(34158),i=t(14831);let r=()=>{let[e,n]=(0,i.bL)(l.L,!1);(0,s.useEffect)(()=>(n(!0),()=>{n(!1)}),[])}},59007:(e,n,t)=>{t.r(n),t.d(n,{EventListContainer:()=>D,default:()=>Z});var s=t(6029),l=t(46787),i=t(10174),r=t(55729),a=t(90248),o=t(46222),u=t(18970),d=t(20288),c=t(61321),m=t(76393),p=t(11946),x=t(95084),h=t(14831),g=t(11996),v=t(18858),j=t(50865);function b(e){let{uniqueTournamentId:n,seasonId:t}=e;return(0,s.jsxs)(o.WC,{variant:"square",children:[(0,s.jsx)(m.S,{id:n,seasonId:t,entity:l.wNW.UniqueTournament,hideHeader:!0}),(0,s.jsx)(o.Zp.Footer,{})]})}var f=t(494),y=t(45860),I=t(96016),T=t(9081),_=t(94565),w=t(78383),A=t.n(w),C=t(94432),M=t(3800),k=t(76356),S=t(36678),U=t(3074);function P(e){let{events:n,eventCell:t,header:l,onClick:o,isMobile:u,lastClickedEvent:d,isGrouping:c}=e,m=t||S.gY,p=l||U.sm;if(!n||!n.length)return null;let x=null,h=null;return(0,s.jsx)(s.Fragment,{children:n.map(e=>{var n,t;let l=(null==(n=e.tournament)?void 0:n.groupSign)||null,g=null!=(t=e.tournament.id)?t:null,v=null;return l&&c?l!==x&&(v=(0,s.jsx)(k.az,{px:"lg",pt:"md",pb:"sm",children:(0,s.jsx)(i.EY,{textStyle:"display.micro",children:(0,s.jsx)(a.A,{id:"group_letter",values:{n:l}})})},"group-".concat(e.id)),x=l):g!==h&&(v=(0,s.jsx)(p,{tournament:e.tournament,sport:e.tournament.category.sport,preferTournamentName:!0}),h=g),(0,s.jsxs)(r.Fragment,{children:[v,(0,s.jsx)(m,{event:e,onClick:o,isMobile:u,isSelected:d===e.id})]},e.id)})})}function E(e){let{round:n,sport:t}=e;return(0,s.jsx)(i.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",display:"block",px:"lg",pt:"lg",pb:"sm",children:(0,s.jsx)(T.DT,{round:n,sport:t})})}function N(e){let{events:n,eventCell:t,onClick:l,isMobile:i,lastClickedEvent:a}=e,o=t||S.gY,u=-1;if(!n||!n.length)return null;let d=n[0].tournament.category.sport.slug;return(0,s.jsx)(s.Fragment,{children:n.sort((e,n)=>e.roundInfo&&n.roundInfo?e.roundInfo.round-n.roundInfo.round:e.startTimestamp-n.startTimestamp).map((e,n)=>{var t,c;let m=null!=(c=null==(t=e.roundInfo)?void 0:t.round)?c:null,p=null;return m&&m!==u&&(p=(0,s.jsx)(E,{round:e.roundInfo,sport:d}),u=m),(0,s.jsxs)(r.Fragment,{children:[!!p&&(0,s.jsxs)(r.Fragment,{children:[0!==n&&(0,s.jsx)(k.az,{h:"[1px]",bg:"neutrals.nLv4"}),p]}),(0,s.jsx)(o,{event:e,onClick:l,isMobile:i,isSelected:a===e.id})]},e.id)})})}function q(e){let n,{items:t,events:l,currentItemIndex:a,setCurrentItemIndex:u,renderItem:d,groupBy:c,top:m,isGrouping:p}=e,x=(0,r.useRef)(null),{isMobile:h}=(0,i.$c)(),g=null!=t&&!!t.length&&a===t.length-1,v=(null==t?void 0:t.length)&&-1!==a,j=A(),b=A();return -1!==a&&(n=null==t?void 0:t[a],j=()=>u(a-1),b=()=>u(a+1)),(0,s.jsx)(_.az,{children:(0,s.jsxs)("div",{className:"list-wrapper",ref:x,children:[h?!!v&&(0,s.jsx)(_.PI,{top:m,bg:"surface.s1",p:"sm",zIndex:_.Py.Sticky-2,children:(0,s.jsx)(i.ms,{label:"Select item in event list",items:t,onSelectedItemChange:e=>{let{selectedItemIndex:n}=e;void 0!==n&&u(n)},selectedItem:n,renderItem:d,scrollToHighlighted:!0,forceMenuBelow:!0})}):(0,s.jsx)(o.Zp,{variant:"mobile-only",children:(0,s.jsxs)(_.so,{py:"sm",px:"lg",align:"center",borderBottom:[void 0,"onSurface.nLv4"],justify:"space-between",minH:"4xl",children:[(0,s.jsx)(M.Ap,{disabled:0===a,onClick:j}),!!v&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(i.ms,{label:"Select item in event list",items:t,onSelectedItemChange:e=>{let{selectedItemIndex:n}=e;void 0!==n&&u(n)},selectedItem:n,renderItem:d,scrollToHighlighted:!0,forceMenuBelow:!0})}),(0,s.jsx)(M.WE,{disabled:g,onClick:b})]})}),(0,s.jsx)(_.az,{px:["sm",0],pb:["sm",0],children:(0,s.jsx)(o.Zp,{variant:"mobile-only",children:(0,s.jsx)(_.az,{mt:["sm",0],pb:[l&&l.length?"sm":0,"lg"],minH:["auto",600],children:(()=>{switch(c){case"groups":return(0,s.jsx)(P,{events:l,isMobile:h,isGrouping:p});case"rounds":return(0,s.jsx)(N,{events:l,isMobile:h});default:return(0,s.jsx)(C.b,{events:l,isMobile:h})}})()})})})]})})}function F(e){let{uniqueTournamentId:n,seasonId:t,top:i,sport:a,isGrouping:o}=e,[u,d]=(0,r.useState)(-1),c=(0,f.wA)(),{data:m}=(0,y.Ay)(l.V3t.seasonGroups(n,t)),p=m?m.groups:[];(0,r.useEffect)(()=>{m&&d(0)},[m]);let x=-1!==u?p[u]:null,{data:h}=(0,y.Ay)(x&&l.yKR.seasonEvents(x.tournamentId,t));(0,r.useEffect)(()=>{h&&c((0,I.oU)(h.events))},[h]);let g=h?h.events:[];return(0,s.jsx)(q,{items:p,events:g,currentItemIndex:u,setCurrentItemIndex:d,renderItem:e=>e?(0,s.jsx)(T.__,{name:e.groupName,sport:a}):"",groupBy:"rounds",top:i,isGrouping:o})}function L(e){let{uniqueTournamentId:n,seasonId:t,top:i,sport:a,isGrouping:o}=e,[u,d]=(0,r.useState)(-1),c=(0,f.wA)(),{data:m}=(0,y.Ay)(l.V3t.seasonRounds(n,t));(0,r.useEffect)(()=>{if(m){let{currentRound:e,rounds:n}=m;d(Math.max(0,n.findIndex(n=>n.name===e.name&&n.round===e.round&&n.prefix===e.prefix)))}},[m]);let p=null==m?void 0:m.rounds[u],{data:x}=(0,y.Ay)(p?l.V3t.roundEvents(n,t,p.round,p.slug,p.prefix):null);(0,r.useEffect)(()=>{x&&c((0,I.oU)(x.events))},[x]);let h=x?x.events:[];return(0,s.jsx)(q,{items:null==m?void 0:m.rounds,events:h,currentItemIndex:u,setCurrentItemIndex:d,renderItem:e=>(0,s.jsx)(T.DT,{round:e,sport:a}),groupBy:"groups",top:i,isGrouping:o})}var K=t(52736),R=t(90510),W=t(17135),B=t(36882);function V(e){let{events:n,eventCell:t,onClick:l,isMobile:r,lastClickedEvent:a}=e,u=t||S.gY,{isNarrow:d}=(0,W.lv)();if(!n||!n.length)return null;let c=n.reduce((e,n)=>{let t=new Date(1e3*n.startTimestamp).setHours(0,0,0,0);return e[t]||(e[t]=[]),e[t].push(n),e},{});return(0,s.jsx)(S.MC,{value:{statusTimeOnly:!0,location:B.y.MatchesSection},children:(0,s.jsx)(k.so,{direction:"column",gap:"sm",children:Object.entries(c).sort((e,n)=>{let[t]=e,[s]=n;return Number(s)-Number(t)}).map(e=>{let[n,t]=e;return(0,s.jsxs)(o.Zp,{variant:"mobile-only",children:[(0,s.jsx)(i.EY,{textStyle:"display.micro",color:"neutrals.nLv3",display:"block",p:"lg",pb:"sm",children:(0,s.jsx)(R.XU,{value:Number(n)/1e3*1e3,year:"numeric",month:"numeric",day:"2-digit"})}),t.map(e=>(0,s.jsx)(u,{event:e,onClick:l,isMobile:r,isSelected:a===e.id,isNarrow:d},e.id))]},n)})})})}function z(e){var n,t,u;let{uniqueTournamentId:d,seasonId:c,top:m}=e,[p,x]=(0,r.useState)(void 0),h=(0,f.wA)(),{isMobile:g}=(0,i.$c)(),v=(0,r.useRef)(null),{data:j}=(0,y.Ay)(l.V3t.seasonVenues(d,c)),{data:b}=(0,y.Ay)(void 0!==p?l.V3t.venueEvents(d,c,p,"all"):null),T=null!=(t=null==j?void 0:j.venues)?t:[],w=null==T?void 0:T.findIndex(e=>e.id===p),A=null==T?void 0:T[w],C=null!=(u=null==b?void 0:b.events)?u:[];return((0,r.useEffect)(()=>{var e;(null==j||null==(e=j.venues)?void 0:e.length)&&void 0===p&&x(null==j?void 0:j.venues[0].id)},[j,p]),(0,r.useEffect)(()=>{b&&h((0,I.oU)(C))},[b,h]),null==j||null==(n=j.venues)?void 0:n.length)?(0,s.jsx)(_.az,{children:(0,s.jsxs)("div",{className:"list-wrapper",ref:v,children:[g?!!(null==T?void 0:T.length)&&(0,s.jsx)(_.PI,{top:m,bg:"surface.s1",p:"sm",zIndex:_.Py.Sticky-2,children:(0,s.jsxs)(_.so,{direction:"column",gap:"lg",children:[(0,s.jsx)(i.ms,{label:"Select venue in unique tournament event list",items:T,onSelectedItemChange:e=>{let{selectedItemIndex:n}=e;void 0!==n&&x(T[n].id)},selectedItem:A,renderItem:e=>e?(0,s.jsx)(a.A,{id:null==e?void 0:e.name}):"",scrollToHighlighted:!0,forceMenuBelow:!0}),(0,s.jsx)(K.b,{messageId:"tennis_disclaimer_not_before_times"})]})}):(0,s.jsxs)(o.Zp,{variant:"mobile-only",children:[(0,s.jsx)(_.so,{py:"sm",px:"sm",borderBottom:[void 0,"onSurface.nLv4"],direction:"column",gap:"lg",children:!!(null==T?void 0:T.length)&&(0,s.jsx)(i.ms,{label:"Select venue in unique tournament event list",items:T,onSelectedItemChange:e=>{let{selectedItemIndex:n}=e;void 0!==n&&x(T[n].id)},selectedItem:A,renderItem:e=>e?(0,s.jsx)(a.A,{id:null==e?void 0:e.name}):"",scrollToHighlighted:!0,forceMenuBelow:!0})}),(0,s.jsx)(_.az,{p:"sm",children:(0,s.jsx)(K.b,{messageId:"tennis_disclaimer_not_before_times"})})]}),(0,s.jsx)(_.az,{px:["sm",0],pb:[C&&C.length?"sm":0,"lg"],mt:["sm",0],minH:["auto",600],children:(0,s.jsx)(V,{events:C,isMobile:g})})]})}):null}var H=function(e){return e.Date="date",e.Round="round",e.Group="group",e.Venue="venue",e}(H||{});function D(e){let{uniqueTournamentId:n,seasonId:t,isGrouping:f=!1}=e,{isMobile:y}=(0,i.$c)(),I=(0,r.useContext)(u.Ws),T=I===l.QCR.Tennis,_=(0,v.Ay)(),w=I===l.QCR.AmericanFootball,A=(0,r.useContext)(j.O),C=A.editor&&A.uniqueTournamentId&&A.seasonId,{hasByRound:M,hasByGroup:k,hasByVenue:S}=(0,g.A)({hasByRound:{route:l.V3t.seasonRounds(n,t)},hasByGroup:{route:l.V3t.seasonGroups(n,t)},hasByVenue:{route:l.V3t.seasonVenues(n,t)}},[n,t]);return void 0===M||void 0===k||void 0===S?(0,s.jsxs)(o.Zp,{children:[(0,s.jsx)(o.Zp.Header,{titleId:"matches",values:{sport:l.QCR.Football}}),(0,s.jsx)(c.A,{initialEventCount:12})]}):M||k||S?(0,s.jsxs)(o.Zp,{variant:"desktop-only",children:[(0,s.jsx)(o.Zp.Header,{titleId:"matches",values:{sport:(0,h.ap)(I)},actionComponent:C?(0,s.jsx)(d.w,{type:"editor_fixtures",tournamentId:A.uniqueTournamentId,seasonId:A.seasonId}):null,visibility:"desktop-only"}),(0,s.jsxs)(i.tU,{variant:"tertiary",initialValue:M?"round":"date",onChange:()=>{y&&window.scrollTo({top:0})},children:[(0,s.jsx)(i.PI,{top:_,p:"sm",bg:"surface.s1",borderBottom:{mdDown:"1px solid {colors.neutrals.nLv4}"},children:(0,s.jsxs)(i.tU.List,{children:[(0,s.jsx)(i.tU.Tab,{tabKey:"date",onClick:()=>(0,x.ke)({action:"click",location:"matches_screen",type:"date"}),children:(0,s.jsx)(a.A,{id:"chip_by_date"})}),S&&T&&(0,s.jsx)(i.tU.Tab,{tabKey:"venue",onClick:()=>(0,x.ke)({action:"click",location:"matches_screen",type:"court"}),children:(0,s.jsx)(a.A,{id:"chip_by_tennis_court"})}),M&&(0,s.jsx)(i.tU.Tab,{tabKey:"round",onClick:()=>(0,x.ke)({action:"click",location:"matches_screen",type:"round"}),children:(0,s.jsx)(a.A,{id:w?"chip_by_week":"chip_by_round"})}),k&&(0,s.jsx)(i.tU.Tab,{tabKey:"group",onClick:()=>(0,x.ke)({action:"click",location:"matches_screen",type:"group"}),children:(0,s.jsx)(a.A,{id:"chip_by_group"})})]})}),(0,s.jsx)(i.tU.Panel,{tabKey:"date",children:y?(0,s.jsx)(p.default,{id:n,seasonId:t,entity:l.wNW.UniqueTournament,top:_+51}):(0,s.jsx)(b,{uniqueTournamentId:n,seasonId:t})}),M&&(0,s.jsx)(i.tU.Panel,{tabKey:"round",children:(0,s.jsx)(L,{uniqueTournamentId:n,seasonId:t,sport:I,top:_+51,isGrouping:f})}),k&&(0,s.jsx)(i.tU.Panel,{tabKey:"group",children:(0,s.jsx)(F,{uniqueTournamentId:n,seasonId:t,sport:I,top:_+51,isGrouping:f})}),S&&(0,s.jsx)(i.tU.Panel,{tabKey:"venue",children:(0,s.jsx)(z,{uniqueTournamentId:n,seasonId:t,sport:I,top:_+51})})]})]}):y?(0,s.jsx)(p.default,{id:n,seasonId:t,entity:l.wNW.UniqueTournament}):(0,s.jsx)(m.S,{id:n,seasonId:t,entity:l.wNW.UniqueTournament})}let Z=D},76393:(e,n,t)=>{t.d(n,{S:()=>s.A});var s=t(47151)}}]);