!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]="feec57f6-64c6-4269-8908-dd3d492dab76",e._sentryDebugIdIdentifier="sentry-dbid-feec57f6-64c6-4269-8908-dd3d492dab76")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[32935],{53853:(e,t,s)=>{s.d(t,{M:()=>c});var n=s(46787),l=s(55729),a=s(45860),r=s(11996),i=s(15341),o=s(15307);function d(e,t,s,l){switch(e){case"tournament":return n.yKR.standings(t,s,l);case"unique-tournament":return n.V3t.standings(t,s,l);default:return null}}function c(e){var t;let{entityType:s,entityId:c,seasonId:u,isLoadingTournamentIdData:m,selectedTournamentId:x,initialStandings:p,targetTeamId:C,awayTeamId:h,swrOptions:j}=e,[g,y]=(0,l.useState)(),[v,f]=(0,i.A)(o.s4,"short"),[b,H]=(0,l.useState)(),w="unique-tournament"===s,{data:L,error:M}=(0,a.Ay)(d(s,c,u,n.lpv.Total),j),{hasHomeAwayStandings:S,hasStandingsGroups:T,hasStandingsRounds:Z}=(0,r.A)({hasHomeAwayStandings:{route:null!=(t=d(s,c,u,n.lpv.Home))?t:void 0},hasStandingsGroups:{route:n.V3t.seasonGroups(c,u),skipCheck:!w},hasStandingsRounds:{route:n.V3t.seasonRounds(c,u),skipCheck:!w}},[c,u]),k=(0,l.useMemo)(()=>w?(null==L?void 0:L.standings)||p:null==L?void 0:L.standings.filter(e=>!C||e.rows.find(e=>e.team.id===C||e.team.id===h)),[L,w,p,C,h]);return(0,l.useEffect)(()=>{k&&!m&&y(x?k.find(e=>e.tournament.id===x):k[0])},[k,m,x,u]),{relevantStandings:null!=k?k:[],standingsErr:M,selectedStandingsTable:g,setSelectedStandingsTable:y,displayType:v,setDisplayType:f,isStandingsTableEmpty:b,setIsStandingsTableEmpty:H,hasHomeAwayStandings:S,hasGroupsData:!!T&&!!Z}}},54123:(e,t,s)=>{s.d(t,{A:()=>eq});var n=s(6029),l=s(10174),a=s(76356),r=s(55729),i=s(90248),o=s(46222),d=s(52466),c=s(89721),u=s(94565),m=s(6813),x=s(62042),p=s(93338),C=s(947);function h(){let e=(0,C.A)();return(0,n.jsxs)("svg",{width:"243",height:"206",viewBox:"0 0 243 206",fill:"none",children:[(0,n.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.4833 99.0127C12.2094 99.0127 12 98.8015 12 98.5253C12 98.2492 12.2094 98.038 12.4833 98.038H14.4167C14.6906 98.038 14.9 98.2492 14.9 98.5253C14.9 98.8015 14.6906 99.0127 14.4167 99.0127H12.4833ZM21.1833 99.0127C20.9094 99.0127 20.7 98.8015 20.7 98.5253C20.7 98.2492 20.9094 98.038 21.1833 98.038H23.1167C23.3906 98.038 23.6 98.2492 23.6 98.5253C23.6 98.8015 23.3906 99.0127 23.1167 99.0127H21.1833ZM29.8833 99.0127C29.6094 99.0127 29.4 98.8015 29.4 98.5253C29.4 98.2492 29.6094 98.038 29.8833 98.038H31.8167C32.0906 98.038 32.3 98.2492 32.3 98.5253C32.3 98.8015 32.0906 99.0127 31.8167 99.0127H29.8833ZM38.5833 99.0127C38.3094 99.0127 38.1 98.8015 38.1 98.5253C38.1 98.2492 38.3094 98.038 38.5833 98.038H40.5167C40.7906 98.038 41 98.2492 41 98.5253C41 98.8015 40.7906 99.0127 40.5167 99.0127H38.5833ZM47.2833 99.0127C47.0094 99.0127 46.8 98.8015 46.8 98.5253C46.8 98.2492 47.0094 98.038 47.2833 98.038H49.2167C49.4906 98.038 49.7 98.2492 49.7 98.5253C49.7 98.8015 49.4906 99.0127 49.2167 99.0127H47.2833ZM55.9833 99.0127C55.7094 99.0127 55.5 98.8015 55.5 98.5253C55.5 98.2492 55.7094 98.038 55.9833 98.038H57.9167C58.1905 98.038 58.4 98.2492 58.4 98.5253C58.4 98.8015 58.1905 99.0127 57.9167 99.0127H55.9833ZM64.6833 99.0127C64.4094 99.0127 64.2 98.8015 64.2 98.5253C64.2 98.2492 64.4094 98.038 64.6833 98.038H66.6167C66.8905 98.038 67.1 98.2492 67.1 98.5253C67.1 98.8015 66.8905 99.0127 66.6167 99.0127H64.6833ZM73.3833 99.0127C73.1094 99.0127 72.9 98.8015 72.9 98.5253C72.9 98.2492 73.1094 98.038 73.3833 98.038H75.3167C75.5905 98.038 75.8 98.2492 75.8 98.5253C75.8 98.8015 75.5905 99.0127 75.3167 99.0127H73.3833ZM82.0833 99.0127C81.8094 99.0127 81.6 98.8015 81.6 98.5253C81.6 98.2492 81.8094 98.038 82.0833 98.038H84.0167C84.2905 98.038 84.5 98.2492 84.5 98.5253C84.5 98.8015 84.2905 99.0127 84.0167 99.0127H82.0833ZM90.7833 99.0127C90.5094 99.0127 90.3 98.8015 90.3 98.5253C90.3 98.2492 90.5094 98.038 90.7833 98.038H92.7167C92.9906 98.038 93.2 98.2492 93.2 98.5253C93.2 98.8015 92.9906 99.0127 92.7167 99.0127H90.7833ZM99.4833 99.0127C99.2094 99.0127 99 98.8015 99 98.5253C99 98.2492 99.2094 98.038 99.4833 98.038H101.417C101.691 98.038 101.9 98.2492 101.9 98.5253C101.9 98.8015 101.691 99.0127 101.417 99.0127H99.4833ZM108.183 99.0127C107.909 99.0127 107.7 98.8015 107.7 98.5253C107.7 98.2492 107.909 98.038 108.183 98.038H110.117C110.391 98.038 110.6 98.2492 110.6 98.5253C110.6 98.8015 110.391 99.0127 110.117 99.0127H108.183ZM116.883 99.0127C116.609 99.0127 116.4 98.8015 116.4 98.5253C116.4 98.2492 116.609 98.038 116.883 98.038H118.817C119.091 98.038 119.3 98.2492 119.3 98.5253C119.3 98.8015 119.091 99.0127 118.817 99.0127H116.883ZM125.583 99.0127C125.309 99.0127 125.1 98.8015 125.1 98.5253C125.1 98.2492 125.309 98.038 125.583 98.038H127.517C127.791 98.038 128 98.2492 128 98.5253C128 98.8015 127.791 99.0127 127.517 99.0127H125.583ZM12.4833 138C12.2094 138 12 137.789 12 137.513C12 137.236 12.2094 137.025 12.4833 137.025H14.4167C14.6906 137.025 14.9 137.236 14.9 137.513C14.9 137.789 14.6906 138 14.4167 138H12.4833ZM21.1833 138C20.9094 138 20.7 137.789 20.7 137.513C20.7 137.236 20.9094 137.025 21.1833 137.025H23.1167C23.3906 137.025 23.6 137.236 23.6 137.513C23.6 137.789 23.3906 138 23.1167 138H21.1833ZM29.8833 138C29.6094 138 29.4 137.789 29.4 137.513C29.4 137.236 29.6094 137.025 29.8833 137.025H31.8167C32.0906 137.025 32.3 137.236 32.3 137.513C32.3 137.789 32.0906 138 31.8167 138H29.8833ZM38.5833 138C38.3094 138 38.1 137.789 38.1 137.513C38.1 137.236 38.3094 137.025 38.5833 137.025H40.5167C40.7906 137.025 41 137.236 41 137.513C41 137.789 40.7906 138 40.5167 138H38.5833ZM47.2833 138C47.0094 138 46.8 137.789 46.8 137.513C46.8 137.236 47.0094 137.025 47.2833 137.025H49.2167C49.4906 137.025 49.7 137.236 49.7 137.513C49.7 137.789 49.4906 138 49.2167 138H47.2833ZM55.9833 138C55.7094 138 55.5 137.789 55.5 137.513C55.5 137.236 55.7094 137.025 55.9833 137.025H57.9167C58.1905 137.025 58.4 137.236 58.4 137.513C58.4 137.789 58.1905 138 57.9167 138H55.9833ZM64.6833 138C64.4094 138 64.2 137.789 64.2 137.513C64.2 137.236 64.4094 137.025 64.6833 137.025H66.6167C66.8905 137.025 67.1 137.236 67.1 137.513C67.1 137.789 66.8905 138 66.6167 138H64.6833ZM73.3833 138C73.1094 138 72.9 137.789 72.9 137.513C72.9 137.236 73.1094 137.025 73.3833 137.025H75.3167C75.5905 137.025 75.8 137.236 75.8 137.513C75.8 137.789 75.5905 138 75.3167 138H73.3833ZM82.0833 138C81.8094 138 81.6 137.789 81.6 137.513C81.6 137.236 81.8094 137.025 82.0833 137.025H84.0167C84.2905 137.025 84.5 137.236 84.5 137.513C84.5 137.789 84.2905 138 84.0167 138H82.0833ZM90.7833 138C90.5094 138 90.3 137.789 90.3 137.513C90.3 137.236 90.5094 137.025 90.7833 137.025H92.7167C92.9906 137.025 93.2 137.236 93.2 137.513C93.2 137.789 92.9906 138 92.7167 138H90.7833ZM99.4833 138C99.2094 138 99 137.789 99 137.513C99 137.236 99.2094 137.025 99.4833 137.025H101.417C101.691 137.025 101.9 137.236 101.9 137.513C101.9 137.789 101.691 138 101.417 138H99.4833ZM108.183 138C107.909 138 107.7 137.789 107.7 137.513C107.7 137.236 107.909 137.025 108.183 137.025H110.117C110.391 137.025 110.6 137.236 110.6 137.513C110.6 137.789 110.391 138 110.117 138H108.183ZM116.883 138C116.609 138 116.4 137.789 116.4 137.513C116.4 137.236 116.609 137.025 116.883 137.025H118.817C119.091 137.025 119.3 137.236 119.3 137.513C119.3 137.789 119.091 138 118.817 138H116.883ZM125.583 138C125.309 138 125.1 137.789 125.1 137.513C125.1 137.236 125.309 137.025 125.583 137.025H127.517C127.791 137.025 128 137.236 128 137.513C128 137.789 127.791 138 127.517 138H125.583ZM12.4833 61.9747C12.2094 61.9747 12 61.7635 12 61.4873C12 61.2112 12.2094 61 12.4833 61H14.4167C14.6906 61 14.9 61.2112 14.9 61.4873C14.9 61.7635 14.6906 61.9747 14.4167 61.9747H12.4833ZM21.1833 61.9747C20.9094 61.9747 20.7 61.7635 20.7 61.4873C20.7 61.2112 20.9094 61 21.1833 61H23.1167C23.3906 61 23.6 61.2112 23.6 61.4873C23.6 61.7635 23.3906 61.9747 23.1167 61.9747H21.1833ZM29.8833 61.9747C29.6094 61.9747 29.4 61.7635 29.4 61.4873C29.4 61.2112 29.6094 61 29.8833 61H31.8167C32.0906 61 32.3 61.2112 32.3 61.4873C32.3 61.7635 32.0906 61.9747 31.8167 61.9747H29.8833ZM38.5833 61.9747C38.3094 61.9747 38.1 61.7635 38.1 61.4873C38.1 61.2112 38.3094 61 38.5833 61H40.5167C40.7906 61 41 61.2112 41 61.4873C41 61.7635 40.7906 61.9747 40.5167 61.9747H38.5833ZM47.2833 61.9747C47.0094 61.9747 46.8 61.7635 46.8 61.4873C46.8 61.2112 47.0094 61 47.2833 61H49.2167C49.4906 61 49.7 61.2112 49.7 61.4873C49.7 61.7635 49.4906 61.9747 49.2167 61.9747H47.2833ZM55.9833 61.9747C55.7094 61.9747 55.5 61.7635 55.5 61.4873C55.5 61.2112 55.7094 61 55.9833 61H57.9167C58.1905 61 58.4 61.2112 58.4 61.4873C58.4 61.7635 58.1905 61.9747 57.9167 61.9747H55.9833ZM64.6833 61.9747C64.4094 61.9747 64.2 61.7635 64.2 61.4873C64.2 61.2112 64.4094 61 64.6833 61H66.6167C66.8905 61 67.1 61.2112 67.1 61.4873C67.1 61.7635 66.8905 61.9747 66.6167 61.9747H64.6833ZM73.3833 61.9747C73.1094 61.9747 72.9 61.7635 72.9 61.4873C72.9 61.2112 73.1094 61 73.3833 61H75.3167C75.5905 61 75.8 61.2112 75.8 61.4873C75.8 61.7635 75.5905 61.9747 75.3167 61.9747H73.3833ZM82.0833 61.9747C81.8094 61.9747 81.6 61.7635 81.6 61.4873C81.6 61.2112 81.8094 61 82.0833 61H84.0167C84.2905 61 84.5 61.2112 84.5 61.4873C84.5 61.7635 84.2905 61.9747 84.0167 61.9747H82.0833ZM90.7833 61.9747C90.5094 61.9747 90.3 61.7635 90.3 61.4873C90.3 61.2112 90.5094 61 90.7833 61H92.7167C92.9906 61 93.2 61.2112 93.2 61.4873C93.2 61.7635 92.9906 61.9747 92.7167 61.9747H90.7833ZM99.4833 61.9747C99.2094 61.9747 99 61.7635 99 61.4873C99 61.2112 99.2094 61 99.4833 61H101.417C101.691 61 101.9 61.2112 101.9 61.4873C101.9 61.7635 101.691 61.9747 101.417 61.9747H99.4833ZM108.183 61.9747C107.909 61.9747 107.7 61.7635 107.7 61.4873C107.7 61.2112 107.909 61 108.183 61H110.117C110.391 61 110.6 61.2112 110.6 61.4873C110.6 61.7635 110.391 61.9747 110.117 61.9747H108.183ZM116.883 61.9747C116.609 61.9747 116.4 61.7635 116.4 61.4873C116.4 61.2112 116.609 61 116.883 61H118.817C119.091 61 119.3 61.2112 119.3 61.4873C119.3 61.7635 119.091 61.9747 118.817 61.9747H116.883ZM125.583 61.9747C125.309 61.9747 125.1 61.7635 125.1 61.4873C125.1 61.2112 125.309 61 125.583 61H127.517C127.791 61 128 61.2112 128 61.4873C128 61.7635 127.791 61.9747 127.517 61.9747H125.583Z",fill:p.S.var("colors.neutral.default")}),(0,n.jsx)("path",{d:"M134 74.3323V77.0609L123.738 66.9375H116.729L108.875 75.6562H100.939L85.2293 89.2188H77.3746L69.5199 96H60.9171L45.5817 82.7604L38.0848 89.2188H29.4983L13.7889 75.6562H12V73.7187H14.5207L30.2301 87.2812H37.353L45.5817 80.1771L61.6489 94.0625H68.7881L76.6428 87.2812H84.4975L100.207 73.7187H107.997L115.851 65H124.552L134 74.3323Z",fill:p.S.var("colors.secondary.default")}),(0,n.jsx)("path",{d:"M134 110.418V112.819L122.584 121.253H114.014L106.647 112.899L99.2799 121.253H91.4415L75.8296 137H59.4047L43.7929 121.253H28.1485L12 102.929V100L29.0267 119.332H44.606L60.2178 135.08H75.0165L90.6284 119.332H98.4018L106.647 109.97L114.892 119.332H121.933L134 110.418Z",fill:p.S.var("colors.primary.default")}),(0,n.jsx)("path",{d:"M4.38545 58L8.77091 66.7158H4.87273V129.663H8.77091L4.38545 138.379L0 129.663H3.89818V66.7158H0L4.38545 58ZM125.229 141.284L134 145.642L125.229 150V146.126H19.9782V150L11.2073 145.642L19.9782 141.284V145.158H125.229V141.284Z",fill:p.S.var("colors.neutral.default")}),(0,n.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M72.9918 187C72.8279 187 72.6803 186.919 72.5984 186.79C72.5656 186.741 72.5328 186.676 72.5164 186.596C72.5164 186.563 72.5164 186.531 72.5164 186.499V185.528C72.5164 185.253 72.7295 185.043 73.0082 185.043C73.2869 185.043 73.5 185.253 73.5 185.528V186.482C73.4836 186.968 72.9918 187 72.9918 187ZM72.5 154.485C72.5 154.21 72.7131 154 72.9918 154C73.2705 154 73.4836 154.21 73.4836 154.485V156.426C73.4836 156.701 73.2705 156.912 72.9918 156.912C72.7131 156.912 72.5 156.701 72.5 156.426V154.485ZM72.5 158.368C72.5 158.093 72.7131 157.882 72.9918 157.882C73.2705 157.882 73.4836 158.093 73.4836 158.368V160.309C73.4836 160.584 73.2705 160.794 72.9918 160.794C72.7131 160.794 72.5 160.584 72.5 160.309V158.368ZM72.5 162.25C72.5 161.975 72.7131 161.765 72.9918 161.765C73.2705 161.765 73.4836 161.975 73.4836 162.25V164.191C73.4836 164.466 73.2705 164.676 72.9918 164.676C72.7131 164.676 72.5 164.466 72.5 164.191V162.25ZM72.5 166.132C72.5 165.857 72.7131 165.647 72.9918 165.647C73.2705 165.647 73.4836 165.857 73.4836 166.132V168.074C73.4836 168.349 73.2705 168.559 72.9918 168.559C72.7131 168.559 72.5 168.349 72.5 168.074V166.132ZM72.5 170.015C72.5 169.74 72.7131 169.529 72.9918 169.529C73.2705 169.529 73.4836 169.74 73.4836 170.015V171.956C73.4836 172.231 73.2705 172.441 72.9918 172.441C72.7131 172.441 72.5 172.231 72.5 171.956V170.015ZM72.5 173.897C72.5 173.622 72.7131 173.412 72.9918 173.412C73.2705 173.412 73.4836 173.622 73.4836 173.897V175.838C73.4836 176.113 73.2705 176.324 72.9918 176.324C72.7131 176.324 72.5 176.113 72.5 175.838V173.897ZM72.5 177.779C72.5 177.504 72.7131 177.294 72.9918 177.294C73.2705 177.294 73.4836 177.504 73.4836 177.779V179.721C73.4836 179.996 73.2705 180.206 72.9918 180.206C72.7131 180.206 72.5 179.996 72.5 179.721V177.779ZM72.5 181.662C72.5 181.387 72.7131 181.176 72.9918 181.176C73.2705 181.176 73.4836 181.387 73.4836 181.662V183.603C73.4836 183.878 73.2705 184.088 72.9918 184.088C72.7131 184.088 72.5 183.878 72.5 183.603V181.662Z",fill:p.S.var("colors.neutral.default")}),(0,n.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M172.997 78.2339C173.273 78.2295 173.488 78.4531 173.492 78.7126C173.497 78.9884 173.273 79.2029 173.013 79.2071L171.064 79.2061C170.788 79.2105 170.573 78.9868 170.569 78.7273C170.564 78.4516 170.788 78.2371 171.048 78.2329L172.997 78.2339ZM169.099 78.2319C169.375 78.2274 169.59 78.4511 169.578 78.7109C169.582 78.9866 169.358 79.2011 169.098 79.1891L167.149 79.1881C166.873 79.1925 166.659 78.9689 166.654 78.7094C166.65 78.4336 166.874 78.2191 167.134 78.2149L169.099 78.2319ZM165.201 78.2299C165.477 78.2254 165.692 78.4491 165.696 78.7086C165.701 78.9843 165.477 79.1988 165.217 79.203L163.268 79.202C162.992 79.2065 162.777 78.9828 162.773 78.7233C162.768 78.4476 162.992 78.233 163.252 78.2288L165.201 78.2299ZM161.303 78.2278C161.579 78.2234 161.794 78.447 161.782 78.7068C161.786 78.9825 161.562 79.1971 161.302 79.185L159.353 79.184C159.077 79.1885 158.863 78.9648 158.858 78.7053C158.854 78.4296 159.078 78.215 159.338 78.2109L161.303 78.2278ZM157.405 78.242C157.681 78.2376 157.896 78.4612 157.9 78.7207C157.905 78.9803 157.681 79.211 157.421 79.2152L155.472 79.2142C155.196 79.2186 154.981 78.995 154.977 78.7354C154.973 78.4597 155.197 78.2452 155.456 78.241L157.405 78.242ZM153.507 78.24C153.784 78.2355 153.998 78.4592 154.002 78.7187C154.007 78.9782 153.783 79.209 153.523 79.1969L151.574 79.1959C151.298 79.2004 151.083 78.9767 151.079 78.7172C151.075 78.4415 151.298 78.227 151.558 78.2228L153.507 78.24ZM149.609 78.238C149.886 78.2335 150.1 78.4572 150.104 78.7167C150.109 78.9924 149.885 79.2069 149.625 79.2111L147.676 79.2101C147.4 79.2146 147.185 78.9909 147.181 78.7314C147.177 78.4557 147.401 78.2411 147.661 78.237L149.609 78.238ZM145.712 78.2359C145.988 78.2315 146.202 78.4552 146.206 78.7147C146.211 78.9904 145.987 79.2049 145.727 79.1929L143.778 79.1919C143.502 79.1963 143.287 78.9727 143.283 78.7131C143.279 78.4374 143.502 78.2229 143.762 78.2187L145.712 78.2359Z",fill:p.S.var("colors.secondary.default")}),(0,n.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M172.997 108.41C173.273 108.405 173.488 108.629 173.492 108.888C173.497 109.164 173.273 109.379 173.013 109.383L171.064 109.382C170.788 109.386 170.573 109.163 170.569 108.903C170.564 108.627 170.788 108.413 171.048 108.409L172.997 108.41ZM169.099 108.408C169.375 108.403 169.59 108.627 169.578 108.887C169.582 109.162 169.358 109.377 169.098 109.365L167.149 109.364C166.873 109.368 166.659 109.145 166.654 108.885C166.65 108.609 166.874 108.395 167.134 108.391L169.099 108.408ZM165.201 108.406C165.477 108.401 165.692 108.625 165.696 108.884C165.701 109.16 165.477 109.375 165.217 109.379L163.268 109.378C162.992 109.382 162.777 109.159 162.773 108.899C162.768 108.623 162.992 108.409 163.252 108.405L165.201 108.406ZM161.303 108.404C161.579 108.399 161.794 108.623 161.782 108.883C161.786 109.142 161.562 109.373 161.302 109.361L159.353 109.36C159.077 109.364 158.863 109.141 158.858 108.881C158.854 108.605 159.078 108.391 159.338 108.387L161.303 108.404ZM157.405 108.402C157.681 108.397 157.896 108.621 157.9 108.88C157.904 109.14 157.681 109.371 157.421 109.375L155.472 109.374C155.196 109.378 154.981 109.155 154.977 108.895C154.972 108.619 155.196 108.405 155.456 108.401L157.405 108.402ZM153.507 108.4C153.783 108.395 153.998 108.619 154.002 108.878C154.007 109.154 153.783 109.369 153.523 109.357L151.574 109.355C151.298 109.36 151.083 109.136 151.079 108.877C151.074 108.601 151.298 108.387 151.558 108.382L153.507 108.4ZM149.609 108.414C149.886 108.409 150.1 108.633 150.104 108.892C150.109 109.168 149.885 109.383 149.625 109.387L147.676 109.386C147.4 109.39 147.185 109.167 147.181 108.907C147.177 108.631 147.401 108.417 147.661 108.413L149.609 108.414ZM145.712 108.412C145.988 108.407 146.202 108.631 146.206 108.89C146.211 109.166 145.987 109.381 145.727 109.369L143.778 109.368C143.502 109.372 143.287 109.148 143.283 108.889C143.279 108.613 143.502 108.399 143.762 108.394L145.712 108.412Z",fill:p.S.var("colors.primary.default")}),(0,n.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M53.0385 35.5357V35.0536C53.0385 34.7804 53.2468 34.5714 53.5192 34.5714C53.7917 34.5714 54 34.7804 54 35.0536V36.0018C54 36.4518 53.5192 36.5 53.5192 36.5H52.5577C52.2853 36.5 52.0769 36.2911 52.0769 36.0179C52.0769 35.7446 52.2853 35.5357 52.5577 35.5357H53.0385ZM4.48077 36.5C4.48077 36.5 3.83974 35.5357 4.48077 35.5357C4.75321 35.5357 4.96154 35.7446 4.96154 36.0179V37.9464C4.96154 38.2196 4.75321 38.4286 4.48077 38.4286C4.20833 38.4286 4 38.2196 4 37.9464V36.0179C4 36.2911 4.20833 36.5 4.48077 36.5ZM53.0385 23.4821C53.0385 23.2089 53.2468 23 53.5192 23C53.7917 23 54 23.2089 54 23.4821V25.4107C54 25.6839 53.7917 25.8929 53.5192 25.8929C53.2468 25.8929 53.0385 25.6839 53.0385 25.4107V23.4821ZM53.0385 27.3393C53.0385 27.0661 53.2468 26.8571 53.5192 26.8571C53.7917 26.8571 54 27.0661 54 27.3393V29.2679C54 29.5411 53.7917 29.75 53.5192 29.75C53.2468 29.75 53.0385 29.5411 53.0385 29.2679V27.3393ZM53.0385 31.1964C53.0385 30.9232 53.2468 30.7143 53.5192 30.7143C53.7917 30.7143 54 30.9232 54 31.1964V33.125C54 33.3982 53.7917 33.6071 53.5192 33.6071C53.2468 33.6071 53.0385 33.3982 53.0385 33.125V31.1964ZM50.6346 35.5357C50.9071 35.5357 51.1154 35.7446 51.1154 36.0179C51.1154 36.2911 50.9071 36.5 50.6346 36.5H48.7115C48.4391 36.5 48.2308 36.2911 48.2308 36.0179C48.2308 35.7446 48.4391 35.5357 48.7115 35.5357H50.6346ZM46.7885 35.5357C47.0609 35.5357 47.2692 35.7446 47.2692 36.0179C47.2692 36.2911 47.0609 36.5 46.7885 36.5H44.8654C44.593 36.5 44.3846 36.2911 44.3846 36.0179C44.3846 35.7446 44.593 35.5357 44.8654 35.5357H46.7885ZM42.9423 35.5357C43.2147 35.5357 43.4231 35.7446 43.4231 36.0179C43.4231 36.2911 43.2147 36.5 42.9423 36.5H41.0192C40.7468 36.5 40.5385 36.2911 40.5385 36.0179C40.5385 35.7446 40.7468 35.5357 41.0192 35.5357H42.9423ZM39.0962 35.5357C39.3686 35.5357 39.5769 35.7446 39.5769 36.0179C39.5769 36.2911 39.3686 36.5 39.0962 36.5H37.1731C36.9006 36.5 36.6923 36.2911 36.6923 36.0179C36.6923 35.7446 36.9006 35.5357 37.1731 35.5357H39.0962ZM35.25 35.5357C35.5224 35.5357 35.7308 35.7446 35.7308 36.0179C35.7308 36.2911 35.5224 36.5 35.25 36.5H33.3269C33.0545 36.5 32.8462 36.2911 32.8462 36.0179C32.8462 35.7446 33.0545 35.5357 33.3269 35.5357H35.25ZM31.4038 35.5357C31.6763 35.5357 31.8846 35.7446 31.8846 36.0179C31.8846 36.2911 31.6763 36.5 31.4038 36.5H29.4808C29.2083 36.5 29 36.2911 29 36.0179C29 35.7446 29.2083 35.5357 29.4808 35.5357H31.4038ZM27.5577 35.5357C27.8301 35.5357 28.0385 35.7446 28.0385 36.0179C28.0385 36.2911 27.8301 36.5 27.5577 36.5H25.6346C25.3622 36.5 25.1538 36.2911 25.1538 36.0179C25.1538 35.7446 25.3622 35.5357 25.6346 35.5357H27.5577ZM23.7115 35.5357C23.984 35.5357 24.1923 35.7446 24.1923 36.0179C24.1923 36.2911 23.984 36.5 23.7115 36.5H21.7885C21.516 36.5 21.3077 36.2911 21.3077 36.0179C21.3077 35.7446 21.516 35.5357 21.7885 35.5357H23.7115ZM19.8654 35.5357C20.1378 35.5357 20.3462 35.7446 20.3462 36.0179C20.3462 36.2911 20.1378 36.5 19.8654 36.5H17.9423C17.6699 36.5 17.4615 36.2911 17.4615 36.0179C17.4615 35.7446 17.6699 35.5357 17.9423 35.5357H19.8654ZM16.0192 35.5357C16.2917 35.5357 16.5 35.7446 16.5 36.0179C16.5 36.2911 16.2917 36.5 16.0192 36.5H14.0962C13.8237 36.5 13.6154 36.2911 13.6154 36.0179C13.6154 35.7446 13.8237 35.5357 14.0962 35.5357H16.0192ZM12.1731 35.5357C12.4455 35.5357 12.6538 35.7446 12.6538 36.0179C12.6538 36.2911 12.4455 36.5 12.1731 36.5H10.25C9.97756 36.5 9.76923 36.2911 9.76923 36.0179C9.76923 35.7446 9.97756 35.5357 10.25 35.5357H12.1731ZM8.32692 35.5357C8.59936 35.5357 8.80769 35.7446 8.80769 36.0179C8.80769 36.2911 8.59936 36.5 8.32692 36.5H6.40385C6.13141 36.5 5.92308 36.2911 5.92308 36.0179C5.92308 35.7446 6.13141 35.5357 6.40385 35.5357H8.32692ZM4 39.875C4 39.6018 4.20833 39.3929 4.48077 39.3929C4.75321 39.3929 4.96154 39.6018 4.96154 39.875V41.8036C4.96154 42.0768 4.75321 42.2857 4.48077 42.2857C4.20833 42.2857 4 42.0768 4 41.8036V39.875ZM4 43.7321C4 43.4589 4.20833 43.25 4.48077 43.25C4.75321 43.25 4.96154 43.4589 4.96154 43.7321V45.6607C4.96154 45.9339 4.75321 46.1429 4.48077 46.1429C4.20833 46.1429 4 45.9339 4 45.6607V43.7321ZM4 47.5893C4 47.3161 4.20833 47.1071 4.48077 47.1071C4.75321 47.1071 4.96154 47.3161 4.96154 47.5893V49.5179C4.96154 49.7911 4.75321 50 4.48077 50C4.20833 50 4 49.7911 4 49.5179V47.5893Z",fill:p.S.var("colors.neutral.default")}),(0,n.jsx)("text",{x:"57",y:"201",className:(0,x.AH)({textStyle:"assistive.default",fill:"neutrals.nLv3"}),children:e.formatMessage({id:"standings_tracker_week_date"})}),(0,n.jsx)("text",{x:"33",y:"11",className:(0,x.AH)({textStyle:"assistive.default",fill:"neutrals.nLv3"}),children:e.formatMessage({id:"position"})}),(0,n.jsx)("text",{x:"180",y:"78",className:(0,x.AH)({textStyle:"assistive.default",fill:"secondary.default"}),children:e.formatMessage({id:"standings_tracker_team_one"})}),(0,n.jsx)("text",{x:"180",y:"116",className:(0,x.AH)({textStyle:"assistive.default",fill:"primary.default"}),children:e.formatMessage({id:"standings_tracker_team_two"})})]})}function j(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.EY,{textStyle:"display.large",display:"block",my:"sm",hideBelow:"md",children:(0,n.jsx)(i.A,{id:"standings_tracker_title"})}),(0,n.jsx)(l.EY,{textStyle:"body.mediumParagraph",py:"sm",display:"block",children:(0,n.jsx)(i.A,{id:"standings_tracker_general"})}),(0,n.jsx)(a.az,{py:"sm",children:(0,n.jsx)(h,{})})]})}function g(e){let{variant:t}=e;switch(t){case"popover":return(0,n.jsx)(u.AM,{trigger:(0,n.jsx)(d.G_L,{minW:24,fill:"onSurface.nLv1",cursor:"pointer"}),closeOnOutsideClick:!0,children:(0,n.jsx)(u.AM.Content,{position:"absolute",w:"320px",style:{right:"100%"},elevation:3,children:(0,n.jsx)(j,{})})});case"accordion":return(0,n.jsx)(a.az,{mx:"sm",bg:"surface.s2",br:"sm",children:(0,n.jsx)(u.nD,{children:(0,n.jsxs)(u.nD.Item,{bg:"surface.s2",br:"sm",mb:"lg",children:[(0,n.jsx)(u.nD.Trigger,{bg:"surface.s2",br:"sm",children:(0,n.jsx)(l.EY,{textStyle:"display.small",children:(0,n.jsx)(i.A,{id:"about_the_chart_title"})})}),(0,n.jsx)(u.nD.Content,{children:(0,n.jsx)(a.az,{px:"md",children:(0,n.jsx)(j,{})})})]})})});default:return null}}var y=s(78488),v=s(14297),f=s(36729),b=s(28446),H=s(56591),w=s(51384);function L(e){switch(e){case 0:return"secondary.default";case 1:return"primary.default";case 2:return"status.val";case 3:return"tertiary.default";default:return"neutrals.nLv2"}}s(14632);let M=e=>{let{teamCount:t,selectedWeek:s,setSelectedWeek:i,data:o}=e,{textDirection:d,isMobile:c}=(0,l.$c)(),u="rtl"===d,m=c?8:40,C=Math.max(...o.map(e=>(null==e?void 0:e.length)||0)),h=(0,r.useRef)(null),j=(0,r.useMemo)(()=>(0,b.A)().domain([1,C]).range([0,735]),[C]),g=(0,r.useMemo)(()=>(0,b.A)().domain([1,t]).range([0,211]),[t]),M=(0,w.A)().x(e=>e.x).y(e=>e.y);return(0,r.useEffect)(()=>{if(!h.current||!C)return;let e=(0,H.A)(h.current).select("svg").attr("viewBox","0 0 ".concat(780," ").concat(256)).attr("width","100%").attr("height","100%"),s=(0,y.V4)(g).tickSize(735).tickValues([...Array(t)].map((e,t)=>t+1).filter(e=>1===e||e%5==0||e===t)).tickPadding(17.5).tickFormat(e=>e.toString());e.select(".yAxis").remove(),e.append("g").classed("yAxis",!0).classed("hidePath",!0).classed("isRTL",u).call(s).style("stroke-dasharray","3 6").style("stroke-opacity","0.5").attr("transform","translate(".concat(770,", ").concat(10,")"));let n=function(e,t){let s=Array.from({length:e},(e,t)=>t+1);if(e<=t)s=Array.from({length:e},(e,t)=>t+1);else{let n=Math.min(5,Math.ceil((e-1)/(t-1))),l=[];if(5===n){l.push(1);for(let t=5;t=2&&l[l.length-1]-l[l.length-2]e.toString());e.select(".xAxis").remove(),e.append("g").classed("xAxis",!0).classed("hidePath",!0).classed("isRTL",u).call(l).attr("transform","translate(".concat(35,", ").concat(238.5,")"))},[t,C,u,j,g,m]),(0,r.useEffect)(()=>{if(!h.current)return;let e=(0,H.A)(h.current).select("svg");o.forEach((t,s)=>{((t,s)=>{if(!t||0===t.length)return e.select("svg g.graph").selectAll("line.class-".concat(s)).remove();let n=t?t.map(e=>({x:35+j(e.week),y:10+g(e.position)})):[],l=e.select("svg g.graph").selectAll("path.class-".concat(s)).data([n]);l.enter().append("path").classed("class-".concat(s),!0).merge(l).transition().ease(f.wq).duration(350).attr("d",e=>M(e)).attr("fill","none").attr("stroke",p.S.var("colors.".concat(L(s)))).attr("stroke-width","2")})(t,s)})},[o,j,g]),(0,r.useEffect)(()=>{if(!h.current)return;let e=(0,H.A)(h.current).select("svg"),t=e=>{let t=Math.round(j.invert(e.x-35))-1;t=0&&i(t)};(()=>{if(e.select(".slider").remove(),!C)return;let n=e.append("g").classed("slider",!0),l=35+j(s+1),a=231;n.append("path").attr("fill","none").attr("stroke",p.S.var("colors.neutral.variant")).attr("stroke-width","1").attr("d",M([{x:l,y:0},{x:l,y:a}])||""),n.append("rect").attr("x",l).attr("y",0).attr("width",Math.max(735-j(s+1),1)).attr("height",a).classed("rect-overlay",!0),n.append("rect").classed("track",!0).attr("x",35).attr("y",0).attr("width",735).attr("height",a).attr("fill","transparent"),n.call((0,v.A)().on("drag",t))})()},[s,C,j,i]),(0,n.jsx)("div",{ref:h,style:{marginTop:"22px"},children:(0,n.jsxs)(a.I4.svg,{_rtl:{transform:"scale(-1,1)"},className:(0,x.AH)({"& text":{fontSize:{base:"md",md:"xs"}}}),children:[(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"graph-clip-area",children:(0,n.jsx)("rect",{x:35,y:9,width:735,height:213})})}),(0,n.jsx)("g",{className:"graph","clip-path":"url(#graph-clip-area)"})]})})};var S=s(22375),T=s(90510);let Z=e=>{let{week:t}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.A,{id:"standings_tracker_week_date"}),t&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{children:" ("}),(0,n.jsx)(T.XU,{value:1e3*t.timeframeStart,...S.or.fullDate}),(0,n.jsx)("span",{children:" - "}),(0,n.jsx)(T.XU,{value:1e3*t.timeframeEnd,...S.or.fullDate}),(0,n.jsx)("span",{children:")"})]})]})};function k(e){let{setVisibleTeamsCount:t,maxComparisonCount:s,visibleTeamsCount:r,setSelectedTeamIds:o}=e;return(0,n.jsxs)(a.so,{gap:"sm",children:[r>1&&(0,n.jsx)(l.K0,{variant:"clear",size:"primary",onClick:()=>{r>1&&t(e=>e-1),o(e=>{let t=[...e];return t[r-1]=void 0,t})},children:(0,n.jsx)(d.zQC,{icon:"close",width:24})}),rt(e=>e+1),children:(0,n.jsx)(i.A,{id:"compare"})}):(0,n.jsx)(l.K0,{br:"50%",size:"primary",onClick:()=>t(e=>e+1),children:(0,n.jsx)(d.xZp,{width:24})}))]})}function A(e){let{maxMatches:t,position:s,teamIndex:r,children:o}=e,d=48*t+4*(t-1)+16+24+4;return(0,n.jsx)(a.az,{style:{minHeight:d},children:(0,n.jsxs)(a.so,{bg:"surface.s2",align:"center",justify:"flex-start",br:"xs",direction:"column",style:{borderTop:"".concat(4,"px solid ").concat(p.S.var("colors.".concat(L(r))))},children:[(0,n.jsxs)(a.so,{gap:"xs",align:"center",py:"xs",style:{height:24},children:[(0,n.jsx)(l.EY,{color:"neutrals.nLv3",textStyle:"assistive.default",children:(0,n.jsx)(i.A,{id:"position.short"})}),(0,n.jsx)(l.EY,{textStyle:"display.small",children:s})]}),o]})})}var I=s(33144),V=s(88505);let E=e=>{let{availableTeams:t,selectedTeam:s,setSelectedTeams:r,teamIndex:i,showSelectedTeamName:o,isFullWidth:d}=e,c=t.every(e=>e.shortName)?t.sort((e,t)=>e.shortName>t.shortName?1:t.shortName>e.shortName?-1:0).map(e=>({value:e.id,label:(0,n.jsx)(V.Rm,{team:e,short:!0})})):t.sort((e,t)=>e.name>t.name?1:t.name>e.name?-1:0).map(e=>({value:e.id,label:(0,n.jsx)(V.Rm,{team:e})})),u=o&&(null==s?void 0:s.shortName)||"",m=s?{value:s.id,label:u}:void 0;return(0,n.jsx)(l.ms,{width:"100%",buttonStyles:{width:d?"100%":"fit"},listContainerStyles:{zIndex:"modal"},label:null==m?void 0:m.value,items:c,selectedItem:m,alignRight:i>1,onSelectedItemChange:e=>{r(t=>{var s;let n=[...t];return n[i]=Number(null==(s=e.selectedItem)?void 0:s.value),n})},renderItem:e=>e?(0,n.jsxs)(a.so,{align:"center",gap:"sm",children:[(0,n.jsx)(I.p,{id:e.value,size:24}),(0,n.jsx)(l.EY,{truncate:!0,children:e.label})]}):(0,n.jsx)(a.so,{align:"center",children:(0,n.jsx)("img",{width:24,src:"/static/images/placeholders/team.svg",alt:"Placeholder team"})})})};var N=s(46787),_=s(67087),z=s(64006),R=s(81484),D=s(14831);function F(e){let{event:t}=e,[s,r]=(0,_.jr)(t,"homeScore","awayScore",t),i=t.winnerCode===N.Jfo.Right||t.winnerCode===N.Jfo.Draw,o=t.winnerCode===N.Jfo.Left||t.winnerCode===N.Jfo.Draw;return(0,n.jsx)(a.so,{align:"center",justify:"center",color:"neutrals.nLv3",py:"xs",w:"100%",children:(0,D.ux)(t)||D.dp.includes(t.status.type)?(0,n.jsx)(l.EY,{textStyle:"assistive.default",color:"status.error.default",minW:"[0px]",truncate:!0,children:(0,n.jsx)(R.fP,{id:t.status.type,short:!0})}):(0,n.jsxs)(a.so,{gap:"2xs",children:[(0,n.jsx)(l.EY,{textStyle:"display.small",display:"block",color:i?"[inherit]":"neutrals.nLv1",children:s.display}),(0,n.jsx)(l.EY,{display:"block",color:"[inherit]",children:"-"}),(0,n.jsx)(l.EY,{textStyle:"display.small",display:"block",color:o?"[inherit]":"neutrals.nLv1",children:r.display})]})})}let P=e=>{let{event:t,isWideRow:s}=e,[l,r]=(0,_.jr)(t,"homeTeam","awayTeam",t);return t?(0,n.jsx)(z.tj,{event:t,style:{width:"100%"},children:(0,n.jsxs)(a.so,{direction:"column",justify:"center",align:"center",gap:"xs",br:"sm",md:{px:"sm",py:"xs"},_hover:{bg:"neutral.highlight"},children:[(0,n.jsxs)(a.so,{gap:"md",align:"center",children:[(0,n.jsx)(I.p,{id:l.id,size:20,name:l.name}),s&&(0,n.jsx)(F,{event:t}),(0,n.jsx)(I.p,{id:r.id,size:20,name:r.name})]}),!s&&(0,n.jsx)(F,{event:t})]})}):null};function Y(e){let{events:t,visibleTeamsCount:s}=e,{isDesktop:r}=(0,l.$c)();if(!(null==t?void 0:t.length))return(0,n.jsx)(l.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",textAlign:"center",p:"sm",children:(0,n.jsx)(i.A,{id:"standings_tracker_no_games_played_short"})});let o=r||s<3;return(0,n.jsx)(a.so,{direction:"column",p:"sm",gap:o?"sm":"xs",w:"100%",children:t.map(e=>(0,n.jsx)(P,{event:e,isWideRow:o},e.id))})}var B=s(45860);let O=(0,a.I4)(a.az,{base:{"& svg .hidePath path":{display:"none"},"& svg .xAxis.isRTL text":{transform:"scale(-1, 1)"},"& svg .yAxis.isRTL text":{transform:"scale(-1, 1) translateX(193%)"},"& .rect-overlay":{fill:"surface.s1/65"}}}),W=e=>{var t,s;let{uniqueTournamentId:i,seasonId:d,preselectedTeamIds:c,availableTeams:x}=e,{isMobile:p}=(0,l.$c)(),C=x.map(e=>e.id),h=Math.min(C.length,4),[j,y]=(0,r.useState)(!1),[v,f]=(0,r.useState)(0),[b,H]=(0,r.useState)((null==c?void 0:c.length)?c:[C[0],C[1]]),[w,L]=(0,r.useState)(b.length),{data:S,isLoading:T}=((e,t,s)=>{let[n,l,a,r]=s,{data:i,isLoading:o}=(0,B.Ay)(n?N.V3t.performanceGraphData(e,t,n):null),{data:d,isLoading:c}=(0,B.Ay)(l?N.V3t.performanceGraphData(e,t,l):null),{data:u,isLoading:m}=(0,B.Ay)(a?N.V3t.performanceGraphData(e,t,a):null),{data:x,isLoading:p}=(0,B.Ay)(r?N.V3t.performanceGraphData(e,t,r):null);return{data:[null==i?void 0:i.graphData,null==d?void 0:d.graphData,null==u?void 0:u.graphData,null==x?void 0:x.graphData],isLoading:o||c||m||p}})(i,d,b),I=(null==(s=S[0])||null==(t=s[v])?void 0:t.week)||0,V=(e=>{if(!e)return[];let t=[];return null==e||e.forEach((e,s)=>{null==e||e.forEach((e,n)=>{t[n]||(t[n]=[]),t[n][s]=e.events})}),[...t]})(S),_=Math.max(0,...V.flat().map(e=>e.length));return((0,r.useEffect)(()=>{!j&&!T&&(null==S?void 0:S.length)&&(f(Math.min(...S.filter(e=>null==e?void 0:e.length).map(e=>((null==e?void 0:e.length)||1)-1))),y(!0))},[S,T,j]),(0,r.useEffect)(()=>{y(!1)},[d]),S.find(e=>null==e?void 0:e.length)&&V.length)?(0,n.jsxs)(o.Zp,{variant:"desktop-only",children:[(0,n.jsx)(o.Zp.Header,{visibility:"desktop-only",titleId:"standings_tracker_title",actionComponent:(0,n.jsx)(g,{variant:"popover"})}),(0,n.jsx)(O,{children:(0,n.jsxs)(a.az,{p:{base:"sm",md:"lg"},children:[(0,n.jsx)(a.az,{pb:"lg",children:(0,n.jsx)(M,{teamCount:x.length,data:S,selectedWeek:v,setSelectedWeek:f})}),(0,n.jsx)(u.VQ,{controls:[v,f],buttonProps:{variant:"unshielded"},align:"flex-start",my:"md",children:Array.from({length:V.length},(e,t)=>t).map(e=>{var t,s;return(0,n.jsxs)(a.so,{align:"center",gap:"xs",children:[(0,n.jsx)(l.EY,{textStyle:"display.large",children:I}),(0,n.jsx)(l.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,n.jsx)(Z,{week:S[0]&&S[0][v]})})]},(null==(s=S[0])||null==(t=s[v])?void 0:t.week)||e)})}),(0,n.jsxs)(a.so,{gap:"sm",py:"sm",children:[Array.from({length:w},(e,t)=>t).map(e=>{var t,s,l;if(e>h)return null;let r=b[e],i=null==(s=S[e])||null==(t=s[v])?void 0:t.position,o=null==(l=V[v])?void 0:l[e];return(0,n.jsxs)(a.so,{gap:"md",direction:"column",w:"100%",minW:"[0px]",children:[(0,n.jsxs)(a.so,{justify:"space-between",children:[(0,n.jsx)(E,{teamIndex:e,availableTeams:x.filter(e=>!b.includes(e.id)),selectedTeam:x.find(e=>e.id===r),setSelectedTeams:H,showSelectedTeamName:w<3&&p||!p,isFullWidth:w>1}),1===w&&(0,n.jsx)(k,{visibleTeamsCount:w,maxComparisonCount:h,setVisibleTeamsCount:L,setSelectedTeamIds:H})]}),r&&void 0!==i&&(0,n.jsx)(A,{maxMatches:_,position:i,teamIndex:e,children:(0,n.jsx)(Y,{events:o,visibleTeamsCount:w})})]},"".concat(r,"-").concat(e,"-").concat(d))}),w>1&&(0,n.jsx)(k,{visibleTeamsCount:w,maxComparisonCount:h,setVisibleTeamsCount:L,setSelectedTeamIds:H})]})]})}),(0,n.jsx)(a.az,{hideFrom:"md",children:(0,n.jsx)(g,{variant:"accordion"})})]}):(0,n.jsxs)(o.Zp,{children:[(0,n.jsx)(o.Zp.Header,{titleId:"standings_tracker_title",actionComponent:(0,n.jsx)(g,{variant:"popover"})}),(0,n.jsx)(m.p,{graphic:"performance-chart",descriptionMessageId:"standings_tracker_empty_season"})]})};var G=s(15341);let U=()=>{let[e,t,s]=(0,G.A)("standings-first-rules-open",!0);return{firstRulesOpen:e,onRuleClick:()=>t(e=>!e),rulesStateRehydrated:s}};var $=s(59721),q=s(4284);let K=(0,r.createContext)({colors:{},texts:{}}),J=e=>{let{standings:t,seasonId:s,children:l}=e,[a,i]=(0,r.useMemo)(()=>{let e=t.rows.map(e=>({...e.promotion,teamId:e.team.id})).filter(e=>!!e.id);return[(0,q.oB)(e),e.reduce((e,t)=>(e[t.teamId]=t.text,e),{})]},[null==t?void 0:t.id,s]);return(0,n.jsx)(K,{value:{colors:a,texts:i},children:l})};var X=s(64327),Q=s(15307),ee=function(e){return e[e.AFC=1]="AFC",e[e.NFC=2]="NFC",e[e.OVERALL=3]="OVERALL",e}({});let et={1:"American",2:"National"},es={1:"AFC",2:"NFC"};function en(e,t){return t.findIndex(e=>["AMERICAN","NATIONAL"].includes(e.name))>-1?et[e]:es[e]}var el=s(494),ea=s(72753),er=s(80055);let ei=(0,x.Fj)({base:{display:"flex",alignItems:"center",position:"relative",textStyle:"table.medium",padding:"sm",height:{base:"4xl",md:"2xl"},_selected:{backgroundColor:"neutral.highlight"},_hover:{backgroundColor:"surface.s2"}},variants:{team:{none:{},home:{backgroundColor:"secondary.highlight",borderStart:"{sizes.xs} solid {colors.secondary.default}",pl:"xs"},away:{backgroundColor:"primary.highlight",borderStart:"{sizes.xs} solid {colors.primary.default}",pl:"xs"}},stuck:{true:{mx:"-sm",px:"lg",backgroundColor:"surface.s1",borderTop:"1px solid {colors.surface.s2}",borderBottom:"1px solid {colors.surface.s2}",elevation:"2"},false:{}}}}),eo=(0,a.I4)("div",ei),ed=(0,a.I4)("p",{base:{margin:"0",padding:"0",whiteSpace:"pre-line","& + &":{marginTop:"xs"}}}),ec=(0,a.I4)("div",{base:{"& button":{border:"1px solid {colors.surface.s2}",px:"xs","& svg":{margin:"0"},"& svg:nth-child(2)":{display:"none"}}}});function eu(e){let{description:t,transValue:s}=e;return(0,n.jsxs)(ed,{children:[t.teamName?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(V.lC,{original:t.teamName}),":\xa0"]}):null,s||t.text]})}function em(e){let{description:t,locale:s}=e,{data:l}=(0,B.Ay)(N.oo$.singleEntity(t.id,s));return(0,n.jsx)(eu,{description:t,transValue:null==l?void 0:l.translation.value})}function ex(e){let{promotion:t,locale:s}=e,{data:a}=(0,B.Ay)(N.oo$.singleEntity(t.id,s));return(0,n.jsx)(l.EY,{display:"block",textStyle:"assistive.default",color:"neutrals.nLv3",lineHeight:1,children:(null==a?void 0:a.translation.value)||t.text})}function ep(e){let{descriptions:t,locale:s}=e;return t&&t.length&&s?"en"===s?(0,n.jsx)(n.Fragment,{children:t.map(e=>(0,n.jsx)(eu,{description:e},e.id))}):(0,n.jsx)(n.Fragment,{children:t.map(e=>(0,n.jsx)(em,{description:e,locale:s},e.id))}):null}let eC=e=>{let{children:t,defaultOpenedFirstRules:s,onRuleClick:a}=e;return(0,n.jsx)(u.nD,{children:(0,n.jsxs)(u.nD.Item,{bg:"surface.s2",br:"lg",defaultOpened:s,children:[(0,n.jsx)(u.nD.Trigger,{bg:"transparent",onClick:a,children:(0,n.jsx)(l.EY,{textStyle:"display.small",children:(0,n.jsx)(i.A,{id:"rules"})})}),(0,n.jsx)(u.nD.Content,{children:(0,n.jsx)(l.EY,{textStyle:"body.small",display:"block",px:"md",pb:"md",children:t})})]})})},eh=e=>{let{locale:t,descriptions:s,rowDescriptions:l,rowPromotions:r,tieBreakingRules:i,promotionColors:o,defaultOpenedFirstRules:d,onRuleClick:c}=e;return(0,n.jsx)(eC,{defaultOpenedFirstRules:d,onRuleClick:c,children:(0,n.jsxs)(a.so,{direction:"column",gap:"sm",children:[(0,n.jsx)("div",{children:r.map(e=>(0,n.jsxs)(a.so,{align:"center",h:"xl",children:[(0,n.jsx)(a.so,{justify:"center",align:"center",w:"xl",children:(0,n.jsx)(a.az,{h:"sm",w:"sm",br:"50%",style:{background:o[e.id]}})}),(0,n.jsx)(ex,{promotion:e,locale:t})]},e.id))}),(0,n.jsx)(ep,{descriptions:l,locale:t}),(0,n.jsx)(ep,{descriptions:s,locale:t}),(0,n.jsx)(ep,{descriptions:i,locale:t})]})})};function ej(e){let{rows:t,descriptions:s,tieBreakingRule:l,defaultOpenedFirstRules:i,hasPerformanceGraph:o,onRuleClick:d}=e,{isStandingsTableEmpty:c}=(0,r.useContext)(X.P),u=(0,el.d4)(ea.JV),{rowDescriptions:m,rowPromotions:x,tieBreakingRules:p,promotionColors:C}=((e,t,s)=>{let{colors:n}=(0,r.useContext)(K),[l,a,i]=(0,r.useMemo)(()=>{let s=[],l=[],a={};return e.forEach(e=>{var r;e.descriptions&&s.push(...e.descriptions.map(s=>({...s,teamName:(0,er.s)(e.team,t)}))),(null==(r=e.promotion)?void 0:r.text)&&!a[e.promotion.id]&&(l.push(e.promotion),a[e.promotion.id]=n[e.team.id])}),[s,l,a]},[e]);return{rowDescriptions:l,rowPromotions:a,promotionColors:i,tieBreakingRules:s?[s]:[]}})(t,u,l),h=!!(m.length||(null==s?void 0:s.length)||p.length),[j,g]=(0,r.useState)(i);return c||!h&&0===x.length?null:(0,n.jsx)(a.az,{px:"sm",pb:{mdDown:"sm",md:o?void 0:"sm"},children:(0,n.jsx)(eh,{locale:u,descriptions:s,rowDescriptions:m,rowPromotions:x,tieBreakingRules:p,promotionColors:C,defaultOpenedFirstRules:j,onRuleClick:d})})}function eg(e){return e.isNarrowLayout?(0,n.jsx)(ec,{children:(0,n.jsx)(u.ms,{items:e.items||[...N.ur4],selectedItem:e.displayType,onSelectedItemChange:t=>{let{selectedItem:s}=t;s&&e.setDisplayType(s)},renderItem:(e,t)=>t?(0,n.jsx)(d.NwX,{fill:"onSurface.nLv1"}):(0,n.jsx)(i.A,{id:"standings."+e}),menuLabel:(0,n.jsx)(i.A,{id:"standings.appearance"}),alignRight:!0,buttonStyle:{width:36,height:36,zIndex:u.Py.Backdrop}})}):null}function ey(e){let{displayType:t,setDisplayType:s,items:r,isNarrowLayout:o}=e;return(0,n.jsxs)(a.so,{justify:"space-between",p:"sm",borderBottom:"neutrals.nLv4",children:[(0,n.jsxs)(a.az,{children:[(0,n.jsx)(l.EY,{display:"block",textStyle:"assistive.default",pt:"2xs",children:(0,n.jsx)(i.A,{id:"standings.appearance"})}),(0,n.jsx)(l.EY,{display:"block",textStyle:"body.small",color:"neutrals.nLv3",children:(0,n.jsx)(i.A,{id:"standings.appearance.select"})})]}),(0,n.jsx)(eg,{displayType:t,setDisplayType:s,items:r,isNarrowLayout:o})]})}var ev=s(41735),ef=s(81278),eb=s(90438),eH=s(37236),ew=s(18858),eL=s(73240);let eM=e=>{var t;let{row:s,events:i,sport:o,position:c,columnKeys:u,promotionColors:m,isRTL:x}=e,{selectedTeamId:C,homeTeamId:h,awayTeamId:j,display:g}=(0,r.useContext)(X.P),{displayType:y,isNarrowLayout:v}=g,{isDesktopLarge:f}=(0,l.$c)(),b=(0,el.d4)(ea.JV),H=s.team.id,w=!!s.liveMatchWinnerCodeColumn,{texts:L}=(0,r.useContext)(K),{data:M}=(0,B.Ay)(s.promotion?N.oo$.singleEntity(s.promotion.id,b):null),S=(null==M?void 0:M.translation.value)||(null==(t=s.promotion)?void 0:t.text)||L[H],[T,Z]=(0,r.useState)(!1);return(0,n.jsx)(z.gT,{sport:o,team:s.team,children:(0,n.jsxs)(eo,{"data-selected":C===H||void 0,team:h===H?"home":j===H?"away":"none",children:[C===H&&(0,n.jsx)(a.az,{position:"absolute",left:"[0px]",w:"xs",h:"100%",bg:"neutral.default"}),(0,n.jsx)(a.az,{children:(0,n.jsx)(a.so,{w:"xl",h:"xl",justify:"center",align:"center",br:"50%",textStyle:"display.small",cursor:"pointer",userSelect:"none",onClick:e=>{e.preventDefault(),e.stopPropagation(),S&&(T||(Z(!0),setTimeout(()=>{Z(!1)},3e3),(0,D.MZ)((0,n.jsxs)(a.so,{align:"center",children:[(0,n.jsx)(d.G_L,{fill:"surface.s1",mr:"lg"}),(0,n.jsxs)(l.EY,{textStyle:"display.small",color:"surface.s1",display:"block",children:[(0,n.jsx)(V.Rm,{team:s.team,short:!0})," – ".concat(S)]})]}))))},color:m[H]?"surface.s1":"neutrals.nLv1",style:{backgroundColor:m[H]?m[H]:p.S.var("colors.surface.s2")},title:S||void 0,children:c})}),"full"===y&&(!f||v)?null:(0,n.jsx)(I.p,{id:s.team.id,name:s.team.name,w:[32,24],h:[32,24],ml:"sm",style:{verticalAlign:"top"},fallback:(0,n.jsx)(a.I4.img,{src:"/static/images/placeholders/team.svg",width:{base:"2xl",md:"xl"},height:{base:"2xl",md:"xl"},alt:""})}),(0,n.jsx)(a.az,{flexGrow:1,overflow:"auto",children:(0,n.jsxs)(a.so,{align:"center",pl:"sm",overflow:"hidden",w:"100%",children:[(0,n.jsx)(l.EY,{textStyle:"table.medium",color:w?"status.live":"neutrals.nLv1",display:"block",truncate:!0,children:(0,n.jsx)(V.Rm,{team:s.team,short:!0})}),w&&(0,n.jsx)(a.I4.small,{position:"relative",color:"status.live",_after:{content:"''",position:"relative",display:"inline-block",top:"[-1px]",width:"[6px]",height:"[6px]",ml:"xs",br:"50%",bg:"status.live",animation:"pulse 1s ease-in infinite"}})]})}),u.map(e=>{if("last5"===e)return(0,n.jsx)(eL.o1,{events:i,referenceId:s.team.id},s.team.id+e);let t=q.oG(e,o,s,x),r=!1;e===s.liveMatchWinnerCodeColumn||"points"===e&&w?r=!0:"percentage"===e&&w&&(r=!0);let d=q.j8(e,o,!1);return(0,n.jsx)(a.az,{children:(0,n.jsx)(l.Ym,{textStyle:"table.medium",color:r?"status.live":"neutrals.nLv1",children:(0,n.jsx)(a.so,{justify:"center",style:{minWidth:d},children:t})})},e)})]})})};function eS(e){let{sport:t,columnKeys:s,selectedSeason:r}=e,{isDesktop:o}=(0,l.$c)(),d=(0,ef.useRouter)(),c=null==r?void 0:r.year,u=(0,ew.Ay)({isInMobileTabs:!0,isSportMenuVisible:!0}),m=[eb.xW.OldTeam,eb.xW.Team,eb.xW.TeamAsPlayer].includes(d.route);return(0,n.jsx)(l.PI,{top:u+48*!!m,isStickingDisabled:o,zIndex:"stickyTertiary",children:e=>(0,n.jsxs)(eo,{stuck:e,children:[(0,n.jsx)(a.az,{children:(0,n.jsx)(l.EY,{textStyle:"table.medium",color:"neutrals.nLv3",textAlign:"center",display:"block",w:"xl",children:"#"})}),(0,n.jsx)(a.az,{flexGrow:1,children:(0,n.jsx)(l.EY,{textStyle:"table.medium",color:"neutrals.nLv3",display:"block",pl:"sm",children:(0,n.jsx)(i.A,{id:"team"})})}),s.map(e=>{if("last5"===e)return(0,n.jsx)(a.so,{ml:"sm",wrap:"nowrap",flexBasis:"[120px]",justify:"center",align:"center",children:(0,n.jsx)(a.so,{minW:"2xl",justify:"center",children:(0,n.jsx)(l.EY,{textStyle:"table.medium",color:"neutrals.nLv3",children:(0,n.jsx)(eH.N,{id:e})})})},"column-key-last5");let s=function(e,t){switch(e){case"pointsCurrSeason":return t;case"pointsPrevSeason":return Number(t)-1;case"pointsPrevPrevSeason":return Number(t)-2;default:return(0,n.jsx)(eH.N,{id:e})}}(e,c),r=q.j8(e,t,!1);return(0,n.jsx)(a.az,{children:(0,n.jsx)(l.EY,{textStyle:"table.medium",color:"neutrals.nLv3",textTransform:"points"===e?"uppercase":void 0,children:(0,n.jsx)(a.so,{justify:"center",style:{minWidth:r},children:s})})},e)})]})})}function eT(e){let{type:t,table:s,teamEvents:a}=e,i=(0,r.useContext)(X.P),{uniqueTournamentId:o,homeTeamId:d,awayTeamId:c,selectedTeamId:u,selectedSeason:m,display:x}=i,{isNarrowLayout:p,displayType:h}=x,{isDesktop:j,mediaBreakpoint:g}=(0,l.$c)(),{settings:y}=(0,ev.useTheme)(),v=(0,C.A)(),f=s.tournament.category.sport.slug,b=(0,r.useMemo)(()=>{let e=s.rows.reduce((e,t)=>Object.keys(t).length>Object.keys(e).length?t:e,s.rows[0]),n=s.rows.some(e=>0!==Number(e.gamesBehind)),l=s.rows.some(e=>void 0!==e.scoresFor||void 0!==e.scoresAgainst),a=!!(null==m?void 0:m.year)&&s.rows.some(e=>void 0!==e.pointsCurrSeason||void 0!==e.pointsPrevPrevSeason||void 0!==e.pointsPrevPrevSeason);if(e._isPlaceholderRow)return[v.formatMessage({id:"standings_placeholder_data"},{type:t,name:s.name})];let r="xxs"===g||"xs"===g||j&&p;return(0,q.Tx)(e,f,h,p,n,l,a,r,o)},[s.id,f,h,p]),{colors:H}=(0,r.useContext)(K),w=(0,r.useMemo)(()=>{let e={homeTeamId:d,awayTeamId:c,selectedTeamId:u};return t===N.lpv.Home&&(delete e.awayTeamId,delete e.homeTeamId,e.selectedTeamId=u),t===N.lpv.Away&&(delete e.awayTeamId,delete e.homeTeamId,e.selectedTeamId=u),e},[d,c,u,t]);return(0,n.jsxs)("div",{style:{width:"100%"},children:[(0,n.jsx)(eS,{columnKeys:b,sport:f,selectedSeason:m}),(0,n.jsx)(X.P,{value:{...i,...w},children:s.rows.map((e,t)=>(0,n.jsx)(eM,{columnKeys:b,promotionColors:H,position:t+1,row:e,sport:f,events:a?a[e.team.id]:null,isRTL:"rtl"===y.textDirection},e.id))})]})}var eZ=s(18205);function ek(e){let{entityType:t,tableType:s,tableName:l,loaderHeight:a}=e,{standingsData:i,standingsError:o,currentStandings:d,teamEvents:c}=function(e,t,s){let{standings:n,uniqueTournamentId:l,tournament:a,seasonId:i,hasHomeAwayStandings:o,setIsStandingsTableEmpty:d}=(0,r.useContext)(X.P),c="tournament"===e?null==a?void 0:a.id:l,u=function(e,t,s,n){let l=t&&s;switch(e){case"tournament":return{standingsRoute:l?N.yKR.standings(t,s,n):null,teamEventsRoute:l?N.yKR.teamEvents(t,s,n):null};case"unique-tournament":return{standingsRoute:l?N.V3t.standings(t,s,n):null,teamEventsRoute:l?N.V3t.teamEvents(t,s,n):null};default:return{standingsRoute:null,teamEventsRoute:null}}}(e,c,i,t),{data:m,error:x}=(0,B.Ay)(u.standingsRoute,{refreshInterval:3e4,fallbackData:t===N.lpv.Total?{standings:n}:void 0,revalidateOnMount:"tournament"===e||void 0}),{data:p}=(0,B.Ay)(u.teamEventsRoute,{refreshInterval:3e4});(0,r.useEffect)(()=>{o&&d&&m&&d(void 0===m.standings.find(e=>e.name===s))},[m,s]);let C=null==m?void 0:m.standings.find(e=>e.name===s),h=p?"tournament"===e?p.teamEvents:C?p.tournamentTeamEvents[C.tournament.id]:void 0:void 0;return{standingsData:m,standingsError:x,currentStandings:C,teamEvents:h}}(t,s,l);return o?null:i?d?(0,n.jsx)(eT,{type:s,table:d,teamEvents:c}):(0,n.jsx)(m.p,{graphic:"no-standings",descriptionMessageId:"empty_recent_searches_title"}):(0,n.jsx)(eZ.e,{rows:a})}let eA=e=>{let{tab:t}=e,{standings:s,seasonId:i}=(0,r.useContext)(X.P),d=function(e,t){return 3===e?t.filter(e=>!(e.name.includes("AFC")||e.name.includes("NFC")||e.name.includes("AMERICAN")||e.name.includes("NATIONAL"))):1===e?t.filter(e=>e.name.includes("AFC")||e.name.includes("AMERICAN")):t.filter(e=>e.name.includes("NFC")||e.name.includes("NATIONAL"))}(t,s),{firstRulesOpen:c,onRuleClick:u,rulesStateRehydrated:m}=U();return i?(0,n.jsx)(n.Fragment,{children:d.map((e,t)=>(0,n.jsx)(o.Zp,{children:(0,n.jsxs)(a.so,{direction:"column",children:[(0,n.jsxs)(a.so,{align:"center",px:"sm",pt:"sm",columnGap:"md",children:[(0,n.jsx)($.e,{id:Q.nJ,name:e.name,w:40,h:40}),(0,n.jsx)(l.EY,{textStyle:"display.large",children:e.name})]}),(0,n.jsxs)(J,{standings:e,seasonId:i,children:[(0,n.jsx)(a.az,{pb:"sm",children:(0,n.jsx)(ek,{entityType:"unique-tournament",tableType:N.lpv.Total,tableName:e.name})}),m&&(0,n.jsx)(ej,{rows:e.rows,descriptions:e.descriptions,tieBreakingRule:e.tieBreakingRule,defaultOpenedFirstRules:0===t&&c,onRuleClick:0===t?u:void 0})]})]})},e.id))}):null},eI=()=>{let{standings:e,display:t}=(0,r.useContext)(X.P),{displayType:s,setDisplayType:d}=t,[c,u]=(0,r.useState)(ee.AFC);return(0,n.jsxs)(a.so,{direction:"column",gap:"sm",children:[(0,n.jsx)(o.Zp,{children:(0,n.jsxs)(a.so,{p:"sm",justify:"space-between",children:[(0,n.jsx)("div",{children:(0,n.jsx)(l.tU,{variant:"secondary",initialValue:c,onChange:e=>u(e),centered:!0,children:(0,n.jsxs)(l.tU.List,{children:[(0,n.jsx)(l.tU.Tab,{children:en(ee.AFC,e)}),(0,n.jsx)(l.tU.Tab,{children:en(ee.NFC,e)}),(0,n.jsx)(l.tU.Tab,{children:(0,n.jsx)(i.A,{id:"standings.overall"})})]})})}),(0,n.jsx)(eg,{displayType:s,setDisplayType:d,items:["short","form"],isNarrowLayout:!0})]})}),(0,n.jsx)(eA,{tab:c})]})};var eV=s(20288);let eE=e=>{let{currentStandings:t}=e,{uniqueTournamentId:s,seasonId:l,hasHomeAwayStandings:a}=(0,r.useContext)(X.P),i=t.tournament,o=i.id,d=i.slug,c=i.category.slug,u=i.category.sport.slug;return(0,n.jsx)(eV.w,{type:"standings",sport:u,tournamentId:o,tournamentSlug:d,uniqueTournamentId:s,categorySlug:c,seasonId:l,standingsName:t.name,rowCount:t.rows.length,hasHomeAwayStandings:!!a,isButton:!0})},eN=e=>{let{currentStandings:t,showEmbed:s,children:l}=e;return(0,n.jsx)(n.Fragment,{children:l?(0,n.jsxs)(a.so,{justify:"space-between",align:"center",px:"sm",children:[l,s&&(0,n.jsx)(eE,{currentStandings:t})]}):s&&(0,n.jsx)(eE,{currentStandings:t})})};var e_=s(9081);let ez=e=>{let{table:t}=e;return t?t.tournament.groupName?(0,n.jsx)(e_.__,{name:t.tournament.groupName}):(0,n.jsx)(n.Fragment,{children:t.name}):null};function eR(){let{standings:e,selectedStandingsTable:t,setSelectedStandingsTable:s}=(0,r.useContext)(X.P);return(0,n.jsx)(a.az,{py:"sm",children:(0,n.jsx)(l.ms,{label:"Select standings table in tournament standings",items:e,initialSelectedItem:t,selectedItem:t,renderItem:(e,t)=>{if(t&&e){var s,l;return(0,n.jsxs)(a.so,{align:"center",gap:"xs",children:[(0,n.jsx)($.e,{id:(null==(s=e.tournament.uniqueTournament)?void 0:s.id)||e.tournament.id,name:(null==(l=e.tournament.uniqueTournament)?void 0:l.name)||e.tournament.name,size:24}),(0,n.jsx)(ez,{table:e})]})}return(0,n.jsx)(ez,{table:e})},onSelectedItemChange:e=>{let{selectedItem:t}=e;null!==t&&s(t)}})})}var eD=s(19621),eF=s(43072);let eP=e=>{let{isSelected:t,onClick:s,children:r}=e,[i,o]=(0,eD.c9)([]);return(0,l.rF)(i,[t],()=>!!t),(0,n.jsx)(a.az,{ref:o,children:(0,n.jsx)(a.so,{h:"2xl",minW:"[68px]",px:"sm",br:"sm",userSelect:"none",bg:t?"primary.highlight":"surface.s2",border:t?"1.5px solid {colors.primary.highlight}":"1.5px solid transparent",onClick:t?void 0:s,cursor:"pointer",justify:"center",align:"center",children:(0,n.jsx)(l.EY,{textStyle:"tab.secondary",color:t?"primary.default":"neutrals.nLv1",truncate:!0,textTransform:"uppercase",children:r})})})},eY=e=>{let{currentStandings:t,setSelectedStandingsTable:s,children:i}=e,{standings:o,uniqueTournamentId:d,seasonId:c,display:u}=(0,r.useContext)(X.P),{isNarrowLayout:m,displayType:x,setDisplayType:p}=u,[C,h]=(0,eF.Wx)({trackVisibility:!0,delay:100}),j=!!d&&!!c;return(0,n.jsxs)(a.az,{flexGrow:1,overflow:{md:"hidden"},children:[(0,n.jsxs)(a.so,{align:"center",px:"sm",borderBottom:"1px solid {colors.neutrals.nLv4}",children:[(0,n.jsx)(l.tR,{buttonStyle:"solid",showButtons:"desktop",children:(0,n.jsxs)(a.so,{children:[(0,n.jsx)(a.so,{justify:"flex-start",gap:"lg",py:"sm",children:o.map(e=>(0,n.jsx)(eP,{isSelected:e.id===t.id,onClick:()=>s(e),children:(0,n.jsx)(e_.__,{name:e.tournament.groupName||e.tournament.name})},"".concat(t.tournament.id,"-").concat(c,"-").concat(e.id)))}),(0,n.jsx)(a.az,{ref:C,w:"sm"})]})}),(m||j)&&(0,n.jsxs)(a.so,{align:"center",ps:"sm",boxShadow:{_ltr:h?void 0:"[-3px 0 8px -7px {colors.neutrals.nLv1}]",_rtl:h?void 0:"[3px 0 8px -7px {colors.neutrals.nLv1}]"},children:[m&&(0,n.jsx)(eg,{displayType:x,setDisplayType:p,isNarrowLayout:m}),(0,n.jsx)(eN,{currentStandings:t,showEmbed:j})]})]}),i]})};function eB(e){let{button:t,children:s}=e;return t?(0,n.jsx)(n.Fragment,{children:s?(0,n.jsxs)(a.so,{justify:"space-between",px:"sm",py:"sm",borderTop:"1px solid",borderColor:"neutrals.nLv4",hideFrom:"md",children:[s,t]}):(0,n.jsx)(a.so,{justify:"flex-end",px:"sm",py:"sm",borderTop:"1px solid",borderColor:"neutrals.nLv4",hideFrom:"md",children:(0,n.jsx)(n.Fragment,{children:t})})}):(0,n.jsx)(n.Fragment,{children:s})}var eO=s(73045),eW=s(76155);function eG(e){let{currentStandings:t,ignoreTableName:s}=e,{uniqueTournamentId:i,tournament:o,title:d}=(0,r.useContext)(X.P),{hideTitleLogo:c,isMobileOnlyTitle:u}=d;return(0,n.jsx)(a.az,{hideBelow:u?"md":void 0,children:(0,n.jsx)(a.so,{justify:"space-between",align:"center",gap:"lg",children:(0,n.jsxs)(a.so,{gap:"xs",align:"center",children:[(0,n.jsx)(a.az,{hideBelow:"md",children:!c&&(i?(0,n.jsx)(eO.e,{id:i,size:40}):(0,n.jsx)(eO.l,{id:null==o?void 0:o.id,size:40}))}),(0,n.jsx)(l.EY,{textStyle:{base:"display.small",md:"display.large"},lineClamp:2,children:s&&o?(0,n.jsx)(eW.J,{tournament:o}):(0,n.jsx)(ez,{table:t})})]})})})}let eU=e=>{let{isNarrowLayout:t,hideTitle:s}=e,l=0;return t&&(l+=36),s&&(l+=44),(0,n.jsx)(a.az,{hideBelow:"md",style:{minWidth:l}})},e$=e=>{let{entityType:t,currentStandings:s,showHorizontalStandings:o,hasHomeAwayStandings:d,hideTitle:c,ignoreTableName:u,performanceChartBtn:m}=e,[x,p]=(0,r.useState)(N.lpv.Total),{isMobile:C}=(0,l.$c)(),{setSelectedStandingsTable:h,display:j}=(0,r.useContext)(X.P),{displayType:g,setDisplayType:y,displayTypeOptions:v,isNarrowLayout:f}=j;return o?(0,n.jsx)(eY,{currentStandings:s,setSelectedStandingsTable:h,children:(0,n.jsx)(ek,{entityType:t,tableType:N.lpv.Total,tableName:s.name})}):d?(0,n.jsx)(a.az,{pt:"sm",position:"relative",children:(0,n.jsxs)(l.tU,{variant:C?"tertiary":"secondary",initialValue:x,onChange:p,centered:!C,children:[(0,n.jsxs)(a.so,{justify:"space-between",align:"center",gap:"sm",px:"sm",children:[(f||c)&&(0,n.jsx)(eU,{isNarrowLayout:f,hideTitle:c}),(0,n.jsxs)(l.tU.List,{children:[(0,n.jsx)(l.tU.Tab,{tabKey:N.lpv.Total,children:(0,n.jsx)(i.A,{id:"all"})}),(0,n.jsx)(l.tU.Tab,{tabKey:N.lpv.Home,children:(0,n.jsx)(i.A,{id:"home"})}),(0,n.jsx)(l.tU.Tab,{tabKey:N.lpv.Away,children:(0,n.jsx)(i.A,{id:"away"})})]}),(f||c)&&(0,n.jsxs)(a.so,{align:"center",gap:"sm",children:[f&&(0,n.jsx)(eg,{displayType:g,setDisplayType:y,items:v,isNarrowLayout:f}),c&&(0,n.jsx)(eN,{currentStandings:s,showEmbed:!0})]})]}),(0,n.jsxs)(a.az,{pt:"sm",children:[!c&&(0,n.jsx)(eB,{button:m,children:(0,n.jsx)(eN,{currentStandings:s,showEmbed:!0,children:(0,n.jsx)(eG,{currentStandings:s,ignoreTableName:u})})}),c&&m&&(0,n.jsx)(eB,{button:m}),[N.lpv.Total,N.lpv.Home,N.lpv.Away].map(e=>(0,n.jsx)(l.tU.Panel,{tabKey:e,children:(0,n.jsx)(ek,{entityType:t,tableType:e,tableName:s.name,loaderHeight:s.rows.length})},e))]})]})}):(0,n.jsxs)(a.az,{children:[f&&(0,n.jsx)(ey,{displayType:g,setDisplayType:y,items:v,isNarrowLayout:f}),(0,n.jsxs)(a.az,{pt:"sm",children:[!c&&(0,n.jsx)(eN,{currentStandings:s,showEmbed:!0,children:(0,n.jsx)(eG,{currentStandings:s,ignoreTableName:u})}),(0,n.jsx)(ek,{entityType:t,tableType:N.lpv.Total,tableName:s.name})]})]})};function eq(e){var t;let{entityType:s,tableId:u,branding:m,seasonPicker:x,showHorizontalStandings:p,hasTablePicker:C,hideTitle:h,ignoreTableName:j}=e,{seasonId:g,uniqueTournamentId:y,standings:v,hasPerformanceGraphFeature:f,selectedTeamId:b,homeTeamId:H,awayTeamId:w,hasHomeAwayStandings:L,display:M}=(0,r.useContext)(X.P),[S,T]=(0,r.useState)(!1),Z=v.find(e=>e.id===u),k=(null==(t=v[0])?void 0:t.id)===u,{firstRulesOpen:A,onRuleClick:I,rulesStateRehydrated:V}=U();if(!Z)return null;if(!p&&"unique-tournament"===s&&C&&y===Q.nJ&&M.isNarrowLayout)return(0,n.jsx)(eI,{});let E=!!h||"tournament"===s&&!!C,N=f&&!!y&&!!g,_=!p&&!x&&!C&&!L&&E;return(0,n.jsx)(J,{standings:Z,seasonId:g,children:(0,n.jsxs)(a.so,{direction:"column",gap:"sm",children:[(0,n.jsxs)(o.Zp,{children:[y&&(0,n.jsx)(c.U,{entityId:y,branding:m,location:"league_standings"}),x&&(0,n.jsx)(a.az,{py:{mdDown:"sm"},children:(0,n.jsx)(eN,{currentStandings:Z,showEmbed:!C&&!L&&E,children:x})}),C&&(0,n.jsx)(eN,{currentStandings:Z,showEmbed:!L&&E,children:(0,n.jsx)(eR,{})}),(0,n.jsx)(a.az,{pb:"sm",children:(0,n.jsx)(e$,{entityType:s,currentStandings:Z,showHorizontalStandings:p,hasHomeAwayStandings:L,hideTitle:E&&!_,ignoreTableName:!!j,performanceChartBtn:N?(0,n.jsxs)(l.$n,{size:"tertiary",onClick:()=>T(!0),children:[(0,n.jsx)(d.SWD,{fill:"surface.s1"}),(0,n.jsx)(i.A,{id:"chart_button_title"})]}):null})}),V&&(0,n.jsx)(ej,{rows:Z.rows,descriptions:Z.descriptions,tieBreakingRule:Z.tieBreakingRule,defaultOpenedFirstRules:(p||k)&&A,onRuleClick:I,hasPerformanceGraph:N})]}),N&&(0,n.jsx)(eK,{isOpen:S,onClose:()=>T(!1),children:(0,n.jsx)(a.az,{id:"performance-graph-box",children:(0,n.jsx)(W,{uniqueTournamentId:y,seasonId:g,preselectedTeamIds:b?[b]:[H,w].filter(e=>"number"==typeof e),availableTeams:Z.rows.map(e=>e.team)})})})]})})}function eK(e){let{isOpen:t,onClose:s,children:a}=e,{isMobile:r}=(0,l.$c)();return r?(0,n.jsx)(l.Xn,{isOpen:t,onClose:s,size:"contentFit",children:a}):(0,n.jsx)(n.Fragment,{children:a})}},64327:(e,t,s)=>{s.d(t,{P:()=>a});var n=s(78383),l=s.n(n);let a=(0,s(55729).createContext)({standings:[],tournament:void 0,tournamentId:void 0,uniqueTournamentId:void 0,seasonId:void 0,selectedSeason:void 0,selectedStandingsTable:void 0,setSelectedStandingsTable:l(),selectedTeamId:void 0,homeTeamId:void 0,awayTeamId:void 0,title:{hideTitleLogo:void 0,isMobileOnlyTitle:void 0},display:{displayType:"short",setDisplayType:l(),displayTypeOptions:void 0,isNarrowLayout:!0},hasHomeAwayStandings:!1,hasPerformanceGraphFeature:!1,isStandingsTableEmpty:void 0,setIsStandingsTableEmpty:l()})}}]);