PageSourceSearch

https://www.theage.com.au/hashed-metro-assets/components-Scoreboard-Scoreboard.2a93909d21e228a5.chunk.js

js theage.com.au collected 2026-10-01 08:35:50 UTC 16,071 bytes, 1 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([["1853"],{63484:function(e,t,i){i.r(t),i.d(t,{default:()=>X});var n=i(52322),o=i(17845),a=i(10519),r=i(89311),d=i(93673),s=i(96314),l=i(69414),p=i(13419),c=i(46416),u=i(2784);let x={111:"afl",113:"rugby-league",117:"rugby-championship"},f={afl:"/sport/afl/fixture","rugby-league":"/sport/nrl/fixtures","rugby-union":"/sport/rugby-union/fixtures"},g={afl:"/sport/afl/live-scores","rugby-league":"/sport/nrl/live-scores","rugby-union":"/sport/rugby-union/live-scores"};var m=i(27297);let b=i.p+"1b406ddfc7108969.png",k=i.p+"bc9eccb2e58bb155.png";var h=i(78943);let v=h.ZP.div.withConfig({componentId:"sc-c44f41b2-0"})(["background:",";color:",";font-size:11px;height:21px;letter-spacing:0.5px;overflow:visible;padding:4px 12px 20px;position:relative;text-align:left;text-transform:uppercase;white-space:nowrap;span{overflow:visible;position:absolute;z-index:1;}",""],e=>e.theme.colorBrandOffset,e=>e.theme.colorLightAccent,e=>!e.$isStartRound&&(0,h.iv)(["span{visibility:hidden;}"])),N=h.ZP.a.withConfig({componentId:"sc-c44f41b2-1"})(["background:",";border-right:1px solid ",";box-sizing:border-box;display:inline-block;font-size:13px;text-align:center;text-decoration:none;transition:background 200ms ease-out;width:160px;&:hover{background:",";}&:focus{outline-offset:-2px;}"],e=>e.theme.colorLightFill,e=>e.theme.colorLightAccent,e=>e.theme.colorLightAccent),w=h.ZP.div.withConfig({componentId:"sc-c44f41b2-2"})(["color:",";font-weight:bold;letter-spacing:1px;padding:",";"," ",""],e=>e.theme.colorDark,e=>e.$isNRL?"4px 0 11px":"6px 0 9px",e=>e.$isComplete&&(0,h.iv)(["background:",";color:",";"],e.theme.colorLightAccent,e.theme.colorDark),e=>e.$isLive&&(0,h.iv)(["border-top:3px solid ",";padding-top:3px;"],e.theme.colorHighlight)),y=h.ZP.div.withConfig({componentId:"sc-c44f41b2-3"})(["color:",";letter-spacing:0.5px;padding:8px;abbr{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"],e=>e.theme.colorDark),S=h.ZP.div.withConfig({componentId:"sc-c44f41b2-4"})(["font-size:11px;line-height:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]),I=h.ZP.span.withConfig({componentId:"sc-c44f41b2-5"})(["display:block;font-size:13px;font-weight:bold;line-height:17px;margin-bottom:6px;"]),C=h.ZP.span.withConfig({componentId:"sc-c44f41b2-6"})(["display:block;font-size:13px;font-weight:bold;line-height:17px;margin-bottom:6px;text-decoration:underline;"]),R=h.ZP.span.withConfig({componentId:"sc-c44f41b2-7"})(["font-size:11px;font-weight:normal;line-height:13px;margin:0 8px;"]),L=h.ZP.span.withConfig({componentId:"sc-c44f41b2-8"})(["color:",";font-size:11px;font-weight:bold;line-height:13px;text-transform:uppercase;"],e=>e.theme.colorHighlight),F=(0,h.iv)(["&[title='BRI']::after{background-position:0 0;}&[title='CBR']::after{background-position:0 -28px;}&[title='CBY']::after{background-position:0 -56px;}&[title='CRO']::after{background-position:0 -84px;}&[title='GCT']::after{background-position:0 -112px;}&[title='MAN']::after{background-position:0 -140px;}&[title='MEL']::after{background-position:0 -168px;}&[title='NEW']::after{background-position:0 -196px;}&[title='NZW']::after{background-position:0 -224px;}&[title='NQL']::after{background-position:0 -252px;}&[title='PAR']::after{background-position:0 -280px;}&[title='PEN']::after{background-position:0 -308px;}&[title='SOU']::after{background-position:0 -336px;}&[title='STG']::after{background-position:0 -364px;}&[title='SYD']::after{background-position:0 -392px;}&[title='WST']::after{background-position:0 -420px;}&[title='NSW']::after{background-position:0 -448px;}&[title='QLD']::after{background-position:0 -476px;}&[title='DOL']::after{background-position:0 -504px;}"]),j=(0,h.iv)(["&[title='ADE']::after{background-position:0 -20px;}&[title='BRI']::after{background-position:0 -40px;}&[title='CAR']::after{background-position:0 -60px;}&[title='COL']::after{background-position:0 -80px;}&[title='ESS']::after{background-position:0 -100px;}&[title='FRE']::after{background-position:0 -120px;}&[title='GEE']::after{background-position:0 -140px;}&[title='GCS']::after{background-position:0 -160px;}&[title='HAW']::after{background-position:0 -180px;}&[title='NTH']::after{background-position:0 -200px;}&[title='MEL']::after{background-position:0 -220px;}&[title='PTA']::after{background-position:0 -240px;}&[title='RIC']::after{background-position:0 -260px;}&[title='STK']::after{background-position:0 -280px;}&[title='SYD']::after{background-position:0 -300px;}&[title='WCE']::after{background-position:0 -320px;}&[title='WB']::after{background-position:0 -340px;}&[title='GWS']::after{background-position:0 -360px;}&[title='BLU']::after{background-position:-40px -20px;}&[title='BRU']::after{background-position:-40px -40px;}&[title='BUL']::after{background-position:-40px -60px;}&[title='CRU']::after{background-position:-40px -80px;}&[title='CHE']::after{background-position:-40px -100px;}&[title='FIJ']::after{background-position:-40px -120px;}&[title='JAG']::after{background-position:-40px -140px;}&[title='LIO']::after{background-position:-40px -160px;}
1&[title='REB']::after{background-position:-40px -180px;}&[title='PSK']::after{background-position:-40px -200px;}&[title='WAR']::after{background-position:-40px -220px;}&[title='HIG']::after{background-position:-40px -240px;}&[title='RED']::after{background-position:-40px -260px;}&[title='SHA']::after{background-position:-40px -280px;}&[title='STO']::after{background-position:-40px -300px;}&[title='SUN']::after{background-position:-40px -320px;}&[title='CHF']::after{background-position:-40px -340px;}&[title='HUR']::after{background-position:-40px -360px;}&[title='FOR']::after{background-position:-40px -380px;}&[title='ARG']::after{background-position:-60px -20px;}&[title='AUS']::after{background-position:-60px -40px;}&[title='CAN']::after{background-position:-60px -60px;}&[title='ENG']::after{background-position:-60px -80px;}&[title='FJI']::after{background-position:-60px -100px;}&[title='FRA']::after{background-position:-60px -120px;}&[title='GEO']::after{background-position:-60px -140px;}&[title='IRE']::after{background-position:-60px -160px;}&[title='ITA']::after{background-position:-60px -180px;}&[title='JPN']::after{background-position:-60px -200px;}&[title='NAM']::after{background-position:-60px -220px;}&[title='NZ']::after{background-position:-60px -240px;}&[title='NZL']::after{background-position:-60px -240px;}&[title='ROU']::after{background-position:-60px -260px;}&[title='RUS']::after{background-position:-60px -280px;}&[title='SAM']::after{background-position:-60px -300px;}&[title='SCO']::after{background-position:-60px -320px;}&[title='SA']::after{background-position:-60px -340px;}&[title='RSA']::after{background-position:-60px -340px;}&[title='TON']::after{background-position:-60px -360px;}&[title='USA']::after{background-position:-60px -380px;}&[title='WAL']::after{background-position:-60px -400px;}&[title='URY']::after{background-position:-60px -480px;}"]),D=(0,h.iv)(["&::after{background-color:transparent;background-image:",";background-repeat:no-repeat;background-size:28px auto;content:'';display:inline-block;height:28px;margin-bottom:-9px;width:28px;}",""],()=>`url("${k}")`,F),Z=(0,h.iv)(["&::after{background-image:",";background-repeat:no-repeat;background-size:100px 700px;content:'';display:inline-block;height:20px;margin-bottom:-6px;width:20px;}",""],()=>`url("${b}")`,j),A=e=>e?D:Z,P=h.ZP.abbr.withConfig({componentId:"sc-c44f41b2-9"})([""," &::after{margin-left:",";}"],e=>A(e.$isNRL),e=>e.$isNRL?"2px":"8px"),$=h.ZP.abbr.withConfig({componentId:"sc-c44f41b2-10"})(["padding-left:28px;position:relative;"," &::after{left:0;position:absolute;}"],e=>A(e.$isNRL)),E=({team:e,isHome:t,isNRL:i})=>(0,n.jsx)(t?P:$,{$isNRL:i,title:e.displayName||e.name,children:e.displayName||e.name}),T=({match:e,isNRL:t})=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(E,{isHome:!0,isNRL:t,team:e.homeTeam}),(0,n.jsx)(R,{children:"vs"}),(0,n.jsx)(E,{isHome:!1,isNRL:t,team:e.awayTeam})]}),O=({isNRL:e,match:t,showRound:i,url:o})=>{var a,r;let d="complete"===t.status||"Result"===t.status,s="playing"===t.status||"first half"===t.status||"second half"===t.status,l=d||s,p={"first half":"First half","second half":"Second half",playing:"Live"}[t.status.toLowerCase()]||"",c=t.displayLocation||t.location;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v,{$isStartRound:i,children:i&&(0,n.jsx)("span",{children:t.roundName})}),(0,n.jsxs)(N,{href:o||"#",children:[(0,n.jsx)(w,{$isComplete:d,$isLive:s,$isNRL:e,children:(0,n.jsx)(T,{isNRL:e,match:t})}),(0,n.jsxs)(y,{children:[s&&(0,n.jsx)(L,{children:p}),l&&(0,n.jsxs)(I,{children:[t.homeTeam.score," - ",t.awayTeam.score]}),!d&&!s&&(0,n.jsx)(C,{children:(a=t.date)?new m.ZP(a).format(`${m.zA}, ${m.Hz} ${m.x4}`):""}),!d&&(0,n.jsxs)(S,{children:[(r=t.date)?new m.ZP(r).format(`${m.Gf}:${m.ko}`):""," ",c]}),d&&(0,n.jsx)(S,{children:c})]})]})]})};var G=i(79644);let z=h.ZP.section.withConfig({componentId:"sc-f277dc75-0"})(["background-color:",";font-family:",";"],e=>e.theme.colorLightFill,e=>e.theme.fontPrimary),H=h.ZP.span.withConfig({componentId:"sc-f277dc75-1"})(["border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;"]),U=h.ZP.header.withConfig({componentId:"sc-f277dc75-2"})(["background:",";padding:10px;user-select:none;h3{color:#fff;font-size:15px;font-weight:bold;letter-spacing:1.15px;text-transform:uppercase;@media ","{padding-right:90px;position:relative;}}"],e=>e.theme.colorBrandOffset,G.Z.query.smallOnly),W=h.ZP.a.withConfig({componentId:"sc-f277dc75-3"})(["color:#fff;float:right;letter-spacing:0;text-decoration:underline;text-transform:initial;@media ","{position:absolute;right:0;top:0;}"],G.Z.query.smallOnly),B=h.ZP.div.withConfig({componentId:"sc-f277dc75-4"})(["height:141px;margin-bottom:16px;position:relative;"]),_=h.ZP.div.withConfig({componentId:"sc-f277dc75-5"})(["align-items:stretch;display:flex;position:relative;"]),M=h.ZP.div.withConfig({componentId:"sc-f277dc75-6"})(["cursor:grab;flex:1;min-width:0;overflow:hidden;"]),Y=h.ZP.div.withConfig({componentId:"sc-f277dc75-7"})(["display:flex;user-select:none;"]),q=h.ZP.button.withConfig({componentId:"sc-f277dc75-8"})(["background:#fff;border:0;cursor:pointer;flex-shrink:0;padding:0;width:34px;svg{height:18px;width:18px;}&:disabled{cursor:not-allowed;opacity:0.5;}@media ","{display:none;}"],G.Z.query.smallOnly),Q=h.ZP.div.withConfig({componentId:"sc-f277dc75-9"})(["flex-shrink:0;"]);var J=i(23539);let K={kind:"Document",definitions:[{kind:"OperationDefinition",name:{kind:"Name",value:"ScoreboardQuery"}
1,directives:[],variableDefinitions:[{kind:"VariableDefinition",directives:[],variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"scoreboard"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"matches"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"roundID"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"roundName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"date"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayLocation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"location"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"number"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"homeTeam"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"teamID"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"score"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"awayTeam"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"teamID"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"score"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:213,source:{body:"query ScoreboardQuery($id:ID!){scoreboard(id:$id){id matches{id roundID roundName status date displayLocation location number homeTeam{id teamID name displayName score}awayTeam{id teamID name displayName score}}}}"}}},V={"FIFA World Cup":"World Cup Scoreboard","Rugby Championship":"Rugby C'ship Scores","Rugby World Cup":"RWC Scoreboard"},X=({gameID:e,matchID:t,title:i,type:m,live:b=!1})=>{var k;let h=(0,d.Z)("small"),{data:v,error:N,loading:w}=(0,J.a)(K,{context:{clientName:"api-front"},pollInterval:12e4*!!b,skip:!e,ssr:!1,variables:{id:e}}),[y,S]=(0,u.useState)(!1),[I,C]=(0,u.useState)(!0),[R,L]=(0,p.Z)({dragFree:!0,align:"start"},[(0,c.Y)()]),F=(0,u.useRef)(!1),j=v?.scoreboard?.matches??[],D=(0,u.useMemo)(()=>j.length?((e,t,i)=>{let n=[...e].reverse(),o=((e,t)=>{if(t){let i=e.findIndex(e=>e?.id===t);if(i>-1)return i}let i=e.findIndex(e=>/playing|first half|second half/i.test(e?.status||""));return i>-1?i:Math.max(0,e.findIndex(e=>/complete|result/i.test(e?.status||"")))})(n,i),a=((e,t)=>{let i=Math.min(t,Math.max(0,e.length-1-10)),n=Math.min(i+10,e.length-1),o=Math.max(i-10,0),a=e[n]?.roundID,r=e[o]?.roundID,d=e.slice(n+1).findIndex(e=>e?.roundID!==a),s=e.slice(0,o).reverse().findIndex(e=>e?.roundID!==r);return{end:-1===d?e.length-1:n+d,start:-1===s?0:o-s}})(n,o),r=n.slice(a.start,a.end+1),d="Rugby Championship"===t,s=r.filter(e=>null!==e);return s.map((e,t)=>({match:e,showRound:!d&&e.roundID!==s[t-1]?.roundID}))})(j,i,t):[],[t,j,i]);if((0,u.useEffect)(()=>{if(!L)return()=>{};let e=()=>{S(!L.canScrollNext()),C(!L.canScrollPrev())};return L.on("select",e),()=>L.off("select",e)},[L]),(0,u.useEffect)(()=>{if(!L||!t||F.current||!D.length)return;F.current=!0;let e=D.findIndex(e=>e.match.id===t);e>0&&L.scrollTo(e)},[L,D,t]),!e)return null;if(N){let t={eventContext:"Scoreboard",eventType:"content:getGameID",description:`Game id: ${e}`};return l.Y.error("GraphQL request failed",o.log.EventType("front","error"),o.log.Error(N),o.log.Object(t)),null}if(w)return(0,n.jsx)(B,{children:(0,n.jsx)(s.Z,{})});if(!v?.scoreboard||!j.length){let t={eventContext:"Scoreboard",eventType:"content:missingScoreboard",description:`Game id: ${e}`};
1return l.Y.error("GraphQL scoreboard payload missing",o.log.EventType("front","error"),o.log.Object(t)),null}let Z=m||e&&x[e]||"",A=f[Z];return(0,n.jsxs)(z,{children:[(0,n.jsx)(U,{children:(0,n.jsxs)("h3",{children:[(k=i||"",h?V[k]??`${k} Scoreboard`:`${k} Scoreboard`),A&&(0,n.jsxs)(W,{href:A,children:[(0,n.jsx)(H,{children:i}),"afl"===Z?"Full fixture":"Full fixtures"]})]})}),(0,n.jsxs)(_,{children:[(0,n.jsx)(q,{"aria-label":"Scroll backward",disabled:I,onClick:()=>L?.scrollPrev(),children:(0,n.jsx)(a.Z,{})}),(0,n.jsx)(M,{ref:R,children:(0,n.jsx)(Y,{children:D.map(({match:e,showRound:t})=>(0,n.jsx)(Q,{children:(0,n.jsx)(O,{isNRL:"rugby-league"===Z,match:e,showRound:t,url:`${g[Z]}?match=${e.id}`})},e.id))})}),(0,n.jsx)(q,{"aria-label":"Scroll forward",disabled:y,onClick:()=>L?.scrollNext(),children:(0,n.jsx)(r.Z,{})})]})]})}}}]);

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.