@sensiblestats/widget-embed 0.40.6 → 0.40.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/embed.global.js +11 -5
- package/dist/embed.global.js.map +1 -1
- package/package.json +2 -2
package/dist/embed.global.js
CHANGED
|
@@ -34,7 +34,7 @@ Error generating stack: `+a.message+`
|
|
|
34
34
|
`))+1))}let i="#".repeat(s),o=n.enter("headingAtx"),l=n.enter("phrasing");a.move(i+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
35
35
|
`,...a.current()});return/^[\t ]/.test(u)&&(u=hs(u.charCodeAt(0))+u.slice(1)),u=u?i+" "+u:i,n.options.closeAtx&&(u+=" "+i),l(),o(),u}Sf.peek=xL;function Sf(e){return e.value||""}function xL(){return"<"}Af.peek=vL;function Af(e,t,n,r){let s=Ja(n),a=s==='"'?"Quote":"Apostrophe",i=n.enter("image"),o=n.enter("label"),l=n.createTracker(r),u=l.move("![");return u+=l.move(n.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=n.enter(`title${a}`),u+=l.move(" "+s),u+=l.move(n.safe(e.title,{before:u,after:s,...l.current()})),u+=l.move(s),o()),u+=l.move(")"),i(),u}function vL(){return"!"}Ef.peek=bL;function Ef(e,t,n,r){let s=e.referenceType,a=n.enter("imageReference"),i=n.enter("label"),o=n.createTracker(r),l=o.move("!["),u=n.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),i();let c=n.stack;n.stack=[],i=n.enter("reference");let d=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return i(),n.stack=c,a(),s==="full"||!u||u!==d?l+=o.move(d+"]"):s==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function bL(){return"!"}If.peek=kL;function If(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){let i=n.unsafe[a],o=n.compilePattern(i),l;if(i.atBreak)for(;l=o.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(l.index+1)}}return s+r+s}function kL(){return"`"}function Nf(e,t){let n=Ws(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Tf.peek=CL;function Tf(e,t,n,r){let s=Ja(n),a=s==='"'?"Quote":"Apostrophe",i=n.createTracker(r),o,l;if(Nf(e,n)){let c=n.stack;n.stack=[],o=n.enter("autolink");let d=i.move("<");return d+=i.move(n.containerPhrasing(e,{before:d,after:">",...i.current()})),d+=i.move(">"),o(),n.stack=c,d}o=n.enter("link"),l=n.enter("label");let u=i.move("[");return u+=i.move(n.containerPhrasing(e,{before:u,after:"](",...i.current()})),u+=i.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=i.move("<"),u+=i.move(n.safe(e.url,{before:u,after:">",...i.current()})),u+=i.move(">")):(l=n.enter("destinationRaw"),u+=i.move(n.safe(e.url,{before:u,after:e.title?" ":")",...i.current()}))),l(),e.title&&(l=n.enter(`title${a}`),u+=i.move(" "+s),u+=i.move(n.safe(e.title,{before:u,after:s,...i.current()})),u+=i.move(s),l()),u+=i.move(")"),o(),u}function CL(e,t,n){return Nf(e,n)?"<":"["}Lf.peek=SL;function Lf(e,t,n,r){let s=e.referenceType,a=n.enter("linkReference"),i=n.enter("label"),o=n.createTracker(r),l=o.move("["),u=n.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),i();let c=n.stack;n.stack=[],i=n.enter("reference");let d=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return i(),n.stack=c,a(),s==="full"||!u||u!==d?l+=o.move(d+"]"):s==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function SL(){return"["}function Ya(e){let t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ok(e){let t=Ya(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Bk(e){let t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function rc(e){let t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Fk(e,t,n,r){let s=n.enter("list"),a=n.bulletCurrent,i=e.ordered?Bk(n):Ya(n),o=e.ordered?i==="."?")":".":Ok(n),l=t&&n.bulletLastUsed?i===n.bulletLastUsed:!1;if(!e.ordered){let c=e.children?e.children[0]:void 0;if((i==="*"||i==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),rc(n)===i&&c){let d=-1;for(;++d<e.children.length;){let p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(i=o),n.bulletCurrent=i;let u=n.containerFlow(e,r);return n.bulletLastUsed=i,n.bulletCurrent=a,s(),u}function Uk(e){let t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Qk(e,t,n,r){let s=Uk(n),a=n.bulletCurrent||Ya(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let i=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(i=Math.ceil(i/4)*4);let o=n.createTracker(r);o.move(a+" ".repeat(i-a.length)),o.shift(i);let l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,o.current()),c);return l(),u;function c(d,p,m){return p?(m?"":" ".repeat(i))+d:(m?a:a+" ".repeat(i-a.length))+d}}function Hk(e,t,n,r){let s=n.enter("paragraph"),a=n.enter("phrasing"),i=n.containerPhrasing(e,r);return a(),s(),i}var Pf=gs(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Gk(e,t,n,r){return(e.children.some(function(i){return Pf(i)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Vk(e){let t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Mf.peek=AL;function Mf(e,t,n,r){let s=Vk(n),a=n.enter("strong"),i=n.createTracker(r),o=i.move(s+s),l=i.move(n.containerPhrasing(e,{after:s,before:o,...i.current()})),u=l.charCodeAt(0),c=Ka(r.before.charCodeAt(r.before.length-1),u,s);c.inside&&(l=hs(u)+l.slice(1));let d=l.charCodeAt(l.length-1),p=Ka(r.after.charCodeAt(0),d,s);p.inside&&(l=l.slice(0,-1)+hs(d));let m=i.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},o+l+m}function AL(e,t,n){return n.options.strong||"*"}function Wk(e,t,n,r){return n.safe(e.value,r)}function _k(e){let t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function jk(e,t,n){let r=(rc(n)+(n.options.ruleSpaces?" ":"")).repeat(_k(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Po={blockquote:Ak,break:kf,code:Pk,definition:Mk,emphasis:Cf,hardBreak:kf,heading:zk,html:Sf,image:Af,imageReference:Ef,inlineCode:If,link:Tf,linkReference:Lf,list:Fk,listItem:Qk,paragraph:Hk,root:Gk,strong:Mf,text:Wk,thematicBreak:jk};function Df(){return{enter:{table:EL,tableData:Xk,tableHeader:Xk,tableRow:NL},exit:{codeText:TL,table:IL,tableData:Rf,tableHeader:Rf,tableRow:Rf}}}function EL(e){let t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function IL(e){this.exit(e),this.data.inTable=void 0}function NL(e){this.enter({type:"tableRow",children:[]},e)}function Rf(e){this.exit(e)}function Xk(e){this.enter({type:"tableCell",children:[]},e)}function TL(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,LL));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function LL(e,t){return t==="|"?t:e}function zf(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
36
36
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:i,tableCell:l,tableRow:o}};function i(m,g,w,C){return u(c(m,w,C),m.align)}function o(m,g,w,C){let f=d(m,w,C),h=u([f]);return h.slice(0,h.indexOf(`
|
|
37
|
-
`))}function l(m,g,w,C){let f=w.enter("tableCell"),h=w.enter("phrasing"),y=w.containerPhrasing(m,{...C,before:a,after:a});return h(),f(),y}function u(m,g){return Sk(m,{align:g,alignDelimiters:r,padding:n,stringLength:s})}function c(m,g,w){let C=m.children,f=-1,h=[],y=g.enter("table");for(;++f<C.length;)h[f]=d(C[f],g,w);return y(),h}function d(m,g,w){let C=m.children,f=-1,h=[],y=g.enter("tableRow");for(;++f<C.length;)h[f]=l(C[f],m,g,w);return y(),h}function p(m,g,w){let C=Po.inlineCode(m,g,w);return w.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function Of(){return{exit:{taskListCheckValueChecked:qk,taskListCheckValueUnchecked:qk,paragraph:PL}}}function Bf(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ML}}}function qk(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function PL(e){let t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){let n=this.stack[this.stack.length-1];n.type;let r=n.children[0];if(r&&r.type==="text"){let s=t.children,a=-1,i;for(;++a<s.length;){let o=s[a];if(o.type==="paragraph"){i=o;break}}i===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function ML(e,t,n,r){let s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",i="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);a&&o.move(i);let l=Po.listItem(e,t,n,{...r,...o.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+i}}function Ff(){return[hf(),yf(),vf(),Df(),Of()]}function Uf(e){return{extensions:[wf(),xf(e),bf(),zf(e),Bf()]}}var RL={tokenize:FL,partial:!0},Jk={tokenize:UL,partial:!0},Kk={tokenize:QL,partial:!0},Yk={tokenize:HL,partial:!0},DL={tokenize:GL,partial:!0},$k={name:"wwwAutolink",tokenize:OL,previous:e0},Zk={name:"protocolAutolink",tokenize:BL,previous:t0},Pr={name:"emailAutolink",tokenize:zL,previous:n0},mr={};function Hf(){return{text:mr}}var ea=48;for(;ea<123;)mr[ea]=Pr,ea++,ea===58?ea=65:ea===91&&(ea=97);mr[43]=Pr;mr[45]=Pr;mr[46]=Pr;mr[95]=Pr;mr[72]=[Pr,Zk];mr[104]=[Pr,Zk];mr[87]=[Pr,$k];mr[119]=[Pr,$k];function zL(e,t,n){let r=this,s,a;return i;function i(d){return!Qf(d)||!n0.call(r,r.previous)||Gf(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(d))}function o(d){return Qf(d)?(e.consume(d),o):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(DL,c,u)(d):d===45||d===95||Ze(d)?(a=!0,e.consume(d),l):c(d)}function u(d){return e.consume(d),s=!0,l}function c(d){return a&&s&&ht(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function OL(e,t,n){let r=this;return s;function s(i){return i!==87&&i!==119||!e0.call(r,r.previous)||Gf(r.events)?n(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(RL,e.attempt(Jk,e.attempt(Kk,a),n),n)(i))}function a(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}}function BL(e,t,n){let r=this,s="",a=!1;return i;function i(d){return(d===72||d===104)&&t0.call(r,r.previous)&&!Gf(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(d),e.consume(d),o):n(d)}function o(d){if(ht(d)&&s.length<5)return s+=String.fromCodePoint(d),e.consume(d),o;if(d===58){let p=s.toLowerCase();if(p==="http"||p==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),a?u:(a=!0,l)):n(d)}function u(d){return d===null||_s(d)||he(d)||dr(d)||js(d)?n(d):e.attempt(Jk,e.attempt(Kk,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function FL(e,t,n){let r=0;return s;function s(i){return(i===87||i===119)&&r<3?(r++,e.consume(i),s):i===46&&r===3?(e.consume(i),a):n(i)}function a(i){return i===null?n(i):t(i)}}function UL(e,t,n){let r,s,a;return i;function i(u){return u===46||u===95?e.check(Yk,l,o)(u):u===null||he(u)||dr(u)||u!==45&&js(u)?l(u):(a=!0,e.consume(u),i)}function o(u){return u===95?r=!0:(s=r,r=void 0),e.consume(u),i}function l(u){return s||r||!a?n(u):t(u)}}function QL(e,t){let n=0,r=0;return s;function s(i){return i===40?(n++,e.consume(i),s):i===41&&r<n?a(i):i===33||i===34||i===38||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===93||i===95||i===126?e.check(Yk,t,a)(i):i===null||he(i)||dr(i)?t(i):(e.consume(i),s)}function a(i){return i===41&&r++,e.consume(i),s}}function HL(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),s):o===60||o===null||he(o)||dr(o)?t(o):n(o)}function s(o){return o===null||o===40||o===91||he(o)||dr(o)?t(o):r(o)}function a(o){return ht(o)?i(o):n(o)}function i(o){return o===59?(e.consume(o),r):ht(o)?(e.consume(o),i):n(o)}}function GL(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return Ze(a)?n(a):t(a)}}function e0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||he(e)}function t0(e){return!ht(e)}function n0(e){return!(e===47||Qf(e))}function Qf(e){return e===43||e===45||e===46||e===95||Ze(e)}function Gf(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var VL={tokenize:KL,partial:!0};function Vf(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:XL,continuation:{tokenize:qL},exit:JL}},text:{91:{name:"gfmFootnoteCall",tokenize:jL},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:WL,resolveTo:_L}}}}function WL(e,t,n){let r=this,s=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),i;for(;s--;){let l=r.events[s][1];if(l.type==="labelImage"){i=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!i||!i._balanced)return n(l);let u=Pt(r.sliceSerialize({start:i.end,end:r.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function _L(e,t){let n=e.length,r;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){r=e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";let s={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;let i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[e[n+1],e[n+2],["enter",s,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",s,t]];return e.splice(n,e.length-n+1,...l),e}function jL(e,t,n){let r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,i;return o;function o(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(a>999||d===93&&!i||d===null||d===91||he(d))return n(d);if(d===93){e.exit("chunkString");let p=e.exit("gfmFootnoteCallString");return s.includes(Pt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return he(d)||(i=!0),a++,e.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(e.consume(d),a++,u):u(d)}}function XL(e,t,n){let r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,i=0,o;return l;function l(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(g)}function c(g){if(i>999||g===93&&!o||g===null||g===91||he(g))return n(g);if(g===93){e.exit("chunkString");let w=e.exit("gfmFootnoteDefinitionLabelString");return a=Pt(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return he(g)||(o=!0),i++,e.consume(g),g===92?d:c}function d(g){return g===91||g===92||g===93?(e.consume(g),i++,c):c(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),s.includes(a)||s.push(a),$(e,m,"gfmFootnoteDefinitionWhitespace")):n(g)}function m(g){return t(g)}}function qL(e,t,n){return e.check(pr,t,e.attempt(VL,t,n))}function JL(e){e.exit("gfmFootnoteDefinition")}function KL(e,t,n){let r=this;return $(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){let i=r.events[r.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?t(a):n(a)}}function Wf(e){let n=(e||{}).singleTilde,r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(i,o){let l=-1;for(;++l<i.length;)if(i[l][0]==="enter"&&i[l][1].type==="strikethroughSequenceTemporary"&&i[l][1]._close){let u=l;for(;u--;)if(i[u][0]==="exit"&&i[u][1].type==="strikethroughSequenceTemporary"&&i[u][1]._open&&i[l][1].end.offset-i[l][1].start.offset===i[u][1].end.offset-i[u][1].start.offset){i[l][1].type="strikethroughSequence",i[u][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},i[u][1].start),end:Object.assign({},i[l][1].end)},d={type:"strikethroughText",start:Object.assign({},i[u][1].end),end:Object.assign({},i[l][1].start)},p=[["enter",c,o],["enter",i[u][1],o],["exit",i[u][1],o],["enter",d,o]],m=o.parser.constructs.insideSpan.null;m&&st(p,p.length,0,ms(m,i.slice(u+1,l),o)),st(p,p.length,0,[["exit",d,o],["enter",i[l][1],o],["exit",i[l][1],o],["exit",c,o]]),st(i,u-1,l-u+3,p),l=u+p.length-2;break}}for(l=-1;++l<i.length;)i[l][1].type==="strikethroughSequenceTemporary"&&(i[l][1].type="data");return i}function a(i,o,l){let u=this.previous,c=this.events,d=0;return p;function p(g){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(g):(i.enter("strikethroughSequenceTemporary"),m(g))}function m(g){let w=Lr(u);if(g===126)return d>1?l(g):(i.consume(g),d++,m);if(d<2&&!n)return l(g);let C=i.exit("strikethroughSequenceTemporary"),f=Lr(g);return C._open=!f||f===2&&!!w,C._close=!w||w===2&&!!f,o(g)}}}var sc=class{constructor(){this.map=[]}add(t,n,r){YL(this,t,n,r)}consume(t){if(this.map.sort(function(a,i){return a[0]-i[0]}),this.map.length===0)return;let n=this.map.length,r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(let a of s)t.push(a);s=r.pop()}this.map.length=0}};function YL(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function r0(e,t){let n=!1,r=[];for(;t<e.length;){let s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){let a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function _f(){return{flow:{null:{name:"table",tokenize:$L,resolveAll:ZL}}}}function $L(e,t,n){let r=this,s=0,a=0,i;return o;function o(S){let V=r.events.length-1;for(;V>-1;){let T=r.events[V][1].type;if(T==="lineEnding"||T==="linePrefix")V--;else break}let H=V>-1?r.events[V][1].type:null,N=H==="tableHead"||H==="tableRow"?x:l;return N===x&&r.parser.lazy[r.now().line]?n(S):N(S)}function l(S){return e.enter("tableHead"),e.enter("tableRow"),u(S)}function u(S){return S===124||(i=!0,a+=1),c(S)}function c(S){return S===null?n(S):W(S)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),m):n(S):ne(S)?$(e,c,"whitespace")(S):(a+=1,i&&(i=!1,s+=1),S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),i=!0,c):(e.enter("data"),d(S)))}function d(S){return S===null||S===124||he(S)?(e.exit("data"),c(S)):(e.consume(S),S===92?p:d)}function p(S){return S===92||S===124?(e.consume(S),d):d(S)}function m(S){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(S):(e.enter("tableDelimiterRow"),i=!1,ne(S)?$(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):g(S))}function g(S){return S===45||S===58?C(S):S===124?(i=!0,e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),w):E(S)}function w(S){return ne(S)?$(e,C,"whitespace")(S):C(S)}function C(S){return S===58?(a+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),f):S===45?(a+=1,f(S)):S===null||W(S)?A(S):E(S)}function f(S){return S===45?(e.enter("tableDelimiterFiller"),h(S)):E(S)}function h(S){return S===45?(e.consume(S),h):S===58?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(S))}function y(S){return ne(S)?$(e,A,"whitespace")(S):A(S)}function A(S){return S===124?g(S):S===null||W(S)?!i||s!==a?E(S):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(S)):E(S)}function E(S){return n(S)}function x(S){return e.enter("tableRow"),M(S)}function M(S){return S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),M):S===null||W(S)?(e.exit("tableRow"),t(S)):ne(S)?$(e,M,"whitespace")(S):(e.enter("data"),P(S))}function P(S){return S===null||S===124||he(S)?(e.exit("data"),M(S)):(e.consume(S),S===92?z:P)}function z(S){return S===92||S===124?(e.consume(S),P):P(S)}}function ZL(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],i=[0,0,0,0],o=!1,l=0,u,c,d,p=new sc;for(;++n<e.length;){let m=e[n],g=m[1];m[0]==="enter"?g.type==="tableHead"?(o=!1,l!==0&&(s0(p,t,l,u,c),c=void 0,l=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",u,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],i=[0,n+1,0,0],o&&(o=!1,c={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",c,t]])),s=g.type==="tableDelimiterRow"?2:c?3:1):s&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,i[2]===0&&(a[1]!==0&&(i[0]=i[1],d=ac(p,t,a,s,void 0,d),a=[0,0,0,0]),i[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(i[0]=i[1],d=ac(p,t,a,s,void 0,d)),a=i,i=[a[1],n,0,0])):g.type==="tableHead"?(o=!0,l=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=n,a[1]!==0?(i[0]=i[1],d=ac(p,t,a,s,n,d)):i[1]!==0&&(d=ac(p,t,i,s,n,d)),s=0):s&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(i[3]=n)}for(l!==0&&s0(p,t,l,u,c),p.consume(t.events),n=-1;++n<t.events.length;){let m=t.events[n];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=r0(t.events,n))}return e}function ac(e,t,n,r,s,a){let i=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(a.end=Object.assign({},$a(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));let l=$a(t.events,n[1]);if(a={type:i,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){let u=$a(t.events,n[2]),c=$a(t.events,n[3]),d={type:o,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){let p=t.events[n[2]],m=t.events[n[3]];if(p[1].end=Object.assign({},m[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){let g=n[2]+1,w=n[3]-n[2]-1;e.add(g,w,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return s!==void 0&&(a.end=Object.assign({},$a(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function s0(e,t,n,r,s){let a=[],i=$a(t.events,n);s&&(s.end=Object.assign({},i),a.push(["exit",s,t])),r.end=Object.assign({},i),a.push(["exit",r,t]),e.add(n+1,0,a)}function $a(e,t){let n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}var eP={name:"tasklistCheck",tokenize:tP};function jf(){return{text:{91:eP}}}function tP(e,t,n){let r=this;return s;function s(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),a)}function a(l){return he(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),i):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),i):n(l)}function i(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(l)}function o(l){return W(l)?t(l):ne(l)?e.check({tokenize:nP},t,n)(l):n(l)}}function nP(e,t,n){return $(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function a0(e){return Mu([Hf(),Vf(),Wf(e),_f(),jf()])}var rP={};function ic(e){let t=this,n=e||rP,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),i=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(a0(n)),a.push(Ff()),i.push(Uf(n))}var Mr=b(I(),1),sP={a:({children:e,href:t})=>(0,Mr.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"ss-w-md-link",children:e}),table:({children:e})=>(0,Mr.jsx)("div",{className:"ss-w-table-wrap",children:(0,Mr.jsx)("table",{className:"ss-w-md-table",children:e})}),ul:({children:e})=>(0,Mr.jsx)("ul",{className:"ss-w-md-ul",children:e}),ol:({children:e})=>(0,Mr.jsx)("ol",{className:"ss-w-md-ol",children:e}),code:({children:e})=>(0,Mr.jsx)("code",{className:"ss-w-md-code",children:e})};function i0({text:e}){return(0,Mr.jsx)("div",{className:"ss-w-md",children:(0,Mr.jsx)(uf,{remarkPlugins:[ic],components:sP,children:e})})}var Xf=b(se(),1),xe=b(I(),1),o0=3,aP=/^(\d+)-(\d+)-(\d+)$/;function iP(e){return e.split(/\s+/).slice(0,2).map(t=>{var n;return(n=t[0])!=null?n:""}).join("").toUpperCase()}function oP(e){return e.replace(/\d{4}/g,t=>t.slice(2))}function u0({image:e,label:t}){return(0,xe.jsx)("span",{className:"ss-w-ecard-crest",style:{backgroundImage:`url(${e})`},...t?{role:"img",title:t,"aria-label":t}:{"aria-hidden":"true"}})}function lP({w:e,d:t,l:n}){return e+t+n===0?null:(0,xe.jsxs)("span",{className:"ss-w-form","aria-hidden":"true",children:[e>0?(0,xe.jsx)("span",{className:"ss-w-form-w",style:{flexGrow:e}}):null,t>0?(0,xe.jsx)("span",{className:"ss-w-form-d",style:{flexGrow:t}}):null,n>0?(0,xe.jsx)("span",{className:"ss-w-form-l",style:{flexGrow:n}}):null]})}function uP({s:e}){let t=aP.exec(e.value);return t?(0,xe.jsxs)("div",{className:"ss-w-ecard-cell",children:[(0,xe.jsx)("span",{className:"ss-w-ecard-cval",children:(0,xe.jsx)(lP,{w:Number(t[1]),d:Number(t[2]),l:Number(t[3])})}),(0,xe.jsx)("span",{className:"ss-w-ecard-clabel",children:e.value})]}):(0,xe.jsxs)("div",{className:"ss-w-ecard-cell",children:[(0,xe.jsx)("span",{className:"ss-w-ecard-cval",children:e.value}),(0,xe.jsx)("span",{className:"ss-w-ecard-clabel",children:e.label})]})}function cP({stats:e}){if(e.length===0)return null;let t=Math.min(e.length,4);return(0,xe.jsx)("div",{className:"ss-w-ecard-strip",style:{gridTemplateColumns:`repeat(${t}, 1fr)`},children:e.map(n=>(0,xe.jsx)(uP,{s:n},n.label+n.value))})}function l0({c:e,showScopeCrest:t}){let n=e.scopes.length===1?e.scopes[0]:null;return(0,xe.jsxs)("div",{className:"ss-w-ecard-hd",children:[(0,xe.jsx)("span",{className:e.kind==="team"?"ss-w-thumb ss-w-team":"ss-w-thumb",style:e.image?{backgroundImage:`url(${e.image})`}:void 0,children:e.image?"":iP(e.name)}),(0,xe.jsxs)("span",{className:"ss-w-ecard-idtext",children:[(0,xe.jsx)("span",{className:"ss-w-nm",children:e.name}),e.sub?(0,xe.jsx)("span",{className:"ss-w-sub",children:e.sub}):null]}),(0,xe.jsxs)("span",{className:"ss-w-ecard-meta",children:[t&&(n!=null&&n.image)?(0,xe.jsx)(u0,{image:n.image,label:n.label}):null,e.season?(0,xe.jsx)("span",{className:"ss-w-ecard-season",children:oP(e.season)}):null]})]})}function dP({scopes:e,active:t,onSelect:n}){return(0,xe.jsx)("div",{className:"ss-w-ecard-scopes",role:"tablist",children:e.map((r,s)=>{var a;return(0,xe.jsx)("button",{type:"button",role:"tab",className:"ss-w-ecard-scope","aria-selected":s===t,"aria-label":r.label,title:r.label,onClick:()=>n(s),children:r.image?(0,xe.jsx)(u0,{image:r.image}):r.label},String((a=r.competitionId)!=null?a:"all"))})})}function pP({c:e}){let[t,n]=(0,Xf.useState)(0);if(!(e.scopes.length>0))return(0,xe.jsx)("div",{className:"ss-w-ecard ss-w-ecard-bare","data-kind":e.kind,children:(0,xe.jsx)(l0,{c:e,showScopeCrest:!1})});let s=e.scopes.length>1,a=e.scopes[s&&e.scopes[t]?t:0];return(0,xe.jsxs)("div",{className:"ss-w-ecard","data-kind":e.kind,children:[(0,xe.jsx)(l0,{c:e,showScopeCrest:!s}),s?(0,xe.jsx)(dP,{scopes:e.scopes,active:t,onSelect:n}):null,(0,xe.jsx)(cP,{stats:a.stats})]})}function c0({cards:e,disabled:t,showLessLabel:n="Show less",showMoreLabel:r=s=>`Show ${s} more`}){let[s,a]=(0,Xf.useState)(!1);if(e.length===0)return null;let i=s?e:e.slice(0,o0),o=e.length-o0;return(0,xe.jsxs)("div",{className:"ss-w-cards",children:[i.map(l=>(0,xe.jsx)(pP,{c:l},l.id)),o>0?(0,xe.jsx)("button",{type:"button",className:"ss-w-cards-more",disabled:t,onClick:()=>a(l=>!l),children:s?n:r(o)}):null]})}var Jf=b(se(),1);var Za=b(se(),1);var d0=b(se(),1),p0=b(I(),1),mP=4e3;function oc({toast:e,onDismiss:t}){return(0,d0.useEffect)(()=>{if(!e)return;let n=setTimeout(t,mP);return()=>clearTimeout(n)},[e,t]),e?(0,p0.jsx)("div",{className:`ss-w-toast ss-w-toast-${e.kind}`,role:"status","aria-live":"polite",children:e.text}):null}var ei=b(I(),1);function gP(e){return Promise.race([e,new Promise((t,n)=>setTimeout(()=>n(new Error("add-to-slip timed out")),1e4))])}function Mo({selection:e,shownOdds:t,marketName:n,marketDeveloperName:r,slip:s,ui:a}){let[i,o]=(0,Za.useState)(!1),[l,u]=(0,Za.useState)(!1),[c,d]=(0,Za.useState)(null),p=(0,Za.useCallback)(()=>d(null),[]),m=Ha(),g=s.onAddToSlip;return!a||!g||!e?null:(0,ei.jsxs)("div",{className:"ss-w-slip",children:[(0,ei.jsx)("button",{type:"button",className:"ss-w-slip-btn",disabled:i||l,onClick:async()=>{o(!0),r!==void 0&&(m==null||m.log({name:"slip_click",entityType:"market",marketDeveloperName:r,entityId:r}));try{let C=await gP(Promise.resolve(g(e)));if(C!=null&&!nm(C))throw new Error("malformed add-to-slip result");let f=C!=null?C:void 0;if(r!==void 0&&(m==null||m.log({name:"slip_result",entityType:"market",marketDeveloperName:r,entityId:r,outcome:wx(f)})),d(yx(f,t||e.oddsDecimal.toFixed(2),a)),u(hx(f)),yu(f)&&s.onMarketClicked)try{s.onMarketClicked(n)}catch{}}catch{r!==void 0&&(m==null||m.log({name:"slip_result",entityType:"market",marketDeveloperName:r,entityId:r,outcome:"timeout"})),d({kind:"error",text:a.slipFailed})}finally{o(!1)}},children:l?a.inSlip:a.addToSlip}),(0,ei.jsx)(oc,{toast:c,onDismiss:p})]})}function m0({it:e,slip:t,ui:n}){var s;let r=e.addToSlipEnabled?Tx(e,t.conversationId):null;return(0,ei.jsx)(Mo,{selection:r,shownOdds:(s=e.odds)!=null?s:"",marketName:e.market,marketDeveloperName:e.marketDeveloperName,slip:t,ui:n})}var Ro=b(I(),1);function ti({previous:e,current:t,direction:n,ui:r}){var i,o,l,u;if(e===void 0||n===void 0)return null;let s=n==="shortened"?(i=r==null?void 0:r.oddsShortened)!=null?i:"shortened":(o=r==null?void 0:r.oddsDrifted)!=null?o:"drifted",a=(u=(l=r==null?void 0:r.oddsMoved)==null?void 0:l.call(r,e,t,s))!=null?u:`was ${e}, now ${t}, ${s}`;return(0,Ro.jsxs)("span",{className:"ss-w-move",role:"img","aria-label":a,children:[(0,Ro.jsx)("span",{className:"ss-w-move-prev","aria-hidden":"true",children:e}),(0,Ro.jsx)("span",{className:"ss-w-move-arrow","aria-hidden":"true",children:n==="shortened"?"\u25BC":"\u25B2"})]})}var f0=b(se(),1),qf=b(I(),1);function hP(e){return(e!=null?e:"").trim().slice(0,1).toUpperCase()||"?"}function at({url:e,name:t,kind:n}){let r=n==="comp"?"ss-w-bi-comp-logo":"ss-w-bi-crest",[s,a]=(0,f0.useState)(!1);return e&&!s?(0,qf.jsx)("img",{className:r,src:e,alt:"","aria-hidden":"true",onError:()=>a(!0)}):(0,qf.jsx)("span",{className:`${r} ss-w-bi-crest-mono`,"aria-hidden":"true",children:hP(t)})}var lc=b(se(),1);var ta=b(I(),1),wP={pin:{viewBox:"0 0 24 24",strokeWidth:1.4,transform:"scale(1.5)",d:"M9.5 1.5 14.5 6.5 13 8l-.5-.5-3 3 .3 2.2-1.4 1.4L5.6 11.3l-3.3 3.3-1-1 3.3-3.3L1.9 7.5l1.4-1.4 2.2.3 3-3L8 2.9z"},star:{viewBox:"0 0 24 24",strokeWidth:2,d:"M12 2.5l2.9 5.9 6.5.95-4.7 4.58 1.1 6.47L12 17.35 6.1 20.4l1.1-6.47L2.5 9.35l6.5-.95z"},bookmark:{viewBox:"0 0 24 24",strokeWidth:2,d:"M7 3h10a1.5 1.5 0 0 1 1.5 1.5V21l-6.5-3.6L5.5 21V4.5A1.5 1.5 0 0 1 7 3z"}};function ln({pin:e,monitor:t,ui:n}){let[r,s]=(0,lc.useState)(null),a=(0,lc.useCallback)(()=>s(null),[]),i=Ha();if(!t||!t.enabled)return null;let o=Hx(e),l=t.isPinned(o),u=e.kind==="match"?{pin:n.matchPinLabel,unpin:n.matchUnpinLabel}:{pin:n.pinLabel,unpin:n.unpinLabel},c=()=>{let p=t.togglePin({...e,key:o});(p==="added"||p==="removed")&&(e.kind==="match"||e.marketDeveloperName!==void 0)?i==null||i.log({name:p==="added"?"pin_add":"pin_remove",entityType:e.kind==="match"?"match":"market",entityId:e.kind==="match"?String(e.matchId):e.marketDeveloperName,marketDeveloperName:e.marketDeveloperName}):p==="match_limit"?s({kind:"error",text:n.matchLimitToast}):p==="market_limit"&&s({kind:"error",text:n.marketLimitToast})},d=wP[n.pinIcon];return(0,ta.jsxs)("div",{className:"ss-w-pin-wrap",children:[(0,ta.jsx)("button",{type:"button",className:"ss-w-pin","data-on":l||void 0,"data-icon":n.pinIcon,"aria-pressed":l,"aria-label":l?u.unpin:u.pin,onClick:c,children:(0,ta.jsx)("svg",{viewBox:d.viewBox,"aria-hidden":"true",children:(0,ta.jsx)("path",{transform:d.transform,d:d.d,fill:l?"currentColor":"none",stroke:l?"none":"currentColor",strokeWidth:d.strokeWidth,strokeLinejoin:"round",strokeLinecap:"round"})})}),(0,ta.jsx)(oc,{toast:r,onDismiss:a})]})}var j=b(I(),1);function h0({stats:e}){return(0,j.jsx)("div",{className:"ss-w-bi-rows",children:e.map(t=>(0,j.jsxs)("div",{className:"ss-w-bi-row",children:[(0,j.jsx)("span",{className:"ss-w-bi-row-lbl",children:t.label}),(0,j.jsx)("span",{className:"ss-w-bi-row-num",children:t.value})]},`${t.label}:${t.value}`))})}function yP({scopes:e}){var s,a;let[t,n]=(0,Jf.useState)(0),r=(a=(s=e[t])!=null?s:e[0])!=null?a:{key:"",label:"",stats:[]};return(0,j.jsxs)("div",{className:"ss-w-bi-scoped",children:[(0,j.jsx)("div",{className:"ss-w-bi-scopes",role:"group",children:e.map((i,o)=>(0,j.jsx)("button",{type:"button",className:"ss-w-bi-chip","aria-pressed":o===t,onClick:()=>n(o),children:i.label},i.key))}),(0,j.jsx)(h0,{stats:r.stats},r.key)]})}function xP(e){return!!e.scopes&&e.scopes.length>=2||e.stats.length>0}function vP({it:e,ui:t}){var c,d,p,m;let[n,r]=(0,Jf.useState)(!1),s=Ha(),a=!!e.scopes&&e.scopes.length>=2,i=xP(e),o=!!e.text;if(!o&&!i)return null;let l=i||((d=(c=e.text)==null?void 0:c.length)!=null?d:0)>90,u=()=>{r(g=>{let w=!g;return w&&(s==null||s.log({name:"insight_expand",entityType:"match",entityId:String(e.matchId)})),w})};return(0,j.jsxs)("div",{className:"ss-w-bi-reason",children:[(0,j.jsx)("span",{className:"ss-w-bi-chart","aria-hidden":"true"}),(0,j.jsxs)("div",{className:"ss-w-bi-reason-body",children:[o?(0,j.jsx)("p",{className:`ss-w-bi-text${n?"":" ss-w-bi-text-clamp"}`,children:e.text}):null,n&&i?a?(0,j.jsx)(yP,{scopes:e.scopes}):(0,j.jsx)(h0,{stats:e.stats}):null]}),l?(0,j.jsx)("button",{type:"button",className:"ss-w-bi-expand","aria-expanded":n,"aria-label":n?(p=t==null?void 0:t.hideStats)!=null?p:"Hide stats":(m=t==null?void 0:t.showStats)!=null?m:"Show stats",onClick:u,children:(0,j.jsx)("span",{className:`ss-w-bi-arrow${n?" ss-w-bi-arrow-open":""}`,"aria-hidden":"true"})}):null]})}function g0({it:e}){return e.homeTeamName&&e.awayTeamName?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(at,{kind:"team",url:e.homeCrest,name:e.homeTeamName}),(0,j.jsx)("span",{className:"ss-w-bi-team",children:e.homeTeamName}),(0,j.jsx)("span",{className:"ss-w-bi-vs","aria-hidden":"true",children:"vs"}),(0,j.jsx)("span",{className:"ss-w-bi-team",children:e.awayTeamName}),(0,j.jsx)(at,{kind:"team",url:e.awayCrest,name:e.awayTeamName})]}):e.fixture?(0,j.jsx)("span",{className:"ss-w-bi-fixture-txt",children:e.fixture}):e.competition?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(at,{kind:"comp",url:e.competitionCrest,name:e.competition}),(0,j.jsx)("span",{className:"ss-w-bi-comp",children:e.competition})]}):null}function bP({it:e,ui:t,slip:n,monitor:r}){var p,m,g;let s=e.isLive||e.phase==="live",a=e.kickoffUtc&&(t!=null&&t.bettingKickoff)?t.bettingKickoff(e.kickoffUtc):void 0,i=(p=e.kickoffLabel)!=null?p:a?`${a.dayLabel} ${a.time}`:void 0,l=!!e.homeTeamName&&!!e.awayTeamName||!!e.fixture,u=!!r&&e.pinEnabled,c=l||!!e.competition||s||!!i||u,d=(0,j.jsxs)(j.Fragment,{children:[s?(0,j.jsxs)("span",{className:"ss-w-bi-live",children:[(0,j.jsx)("span",{className:"ss-w-bi-live-dot","aria-hidden":"true"}),(m=t==null?void 0:t.liveLabel)!=null?m:"Live"]}):null,i?(0,j.jsx)("span",{className:"ss-w-bi-kick",children:i}):null,u&&t?(0,j.jsx)(ln,{ui:t,monitor:r,pin:{kind:"match",matchId:e.matchId}}):null]});return(0,j.jsxs)("div",{className:"ss-w-binsight",children:[c?l?(0,j.jsxs)("div",{className:"ss-w-bi-head",children:[e.competition||s||i||u?(0,j.jsxs)("div",{className:"ss-w-bi-meta",children:[(0,j.jsx)("span",{className:"ss-w-bi-meta-left",children:e.competition?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(at,{kind:"comp",url:e.competitionCrest,name:e.competition}),(0,j.jsx)("span",{className:"ss-w-bi-comp",children:e.competition})]}):null}),(0,j.jsx)("span",{className:"ss-w-bi-meta-right",children:d})]}):null,(0,j.jsx)("div",{className:"ss-w-bi-fixture-line",children:(0,j.jsx)(g0,{it:e})})]}):(0,j.jsxs)("div",{className:"ss-w-bi-header",children:[(0,j.jsx)("span",{className:"ss-w-bi-header-left",children:(0,j.jsx)(g0,{it:e})}),(0,j.jsx)("span",{className:"ss-w-bi-header-right",children:d})]}):null,(0,j.jsxs)("div",{className:"ss-w-bi-action",children:[e.market?(0,j.jsx)("span",{className:"ss-w-bi-market",children:e.market}):null,(0,j.jsxs)("div",{className:"ss-w-bi-pick-row",children:[e.selection?(0,j.jsx)("span",{className:"ss-w-bi-sel",children:e.selection}):null,e.odds?(0,j.jsxs)("span",{className:"ss-w-bi-odds",children:[(0,j.jsx)("b",{children:e.odds}),(0,j.jsx)(ti,{previous:e.previousOdds,current:e.odds,direction:e.movementDirection,ui:t}),e.bookmaker?(0,j.jsx)("span",{className:"ss-w-bi-book",children:e.bookmaker}):null]}):null,(0,j.jsx)(m0,{it:e,slip:n,ui:t}),u&&t?(0,j.jsx)(ln,{ui:t,monitor:r,pin:{kind:"selection",matchId:e.matchId,marketDeveloperName:e.marketDeveloperName,selectionLabel:e.selectionLabel,line:e.line,matchOddsId:e.matchOddsId}}):null]})]}),e.isMarketFloor?(0,j.jsx)("span",{className:"ss-w-bi-floor",children:(g=t==null?void 0:t.marketFloorLabel)!=null?g:"Market price \xB7 not a value pick"}):null,(0,j.jsx)(vP,{it:e,ui:t}),e.disclaimer?(0,j.jsx)("p",{className:"ss-w-bi-disc",children:e.disclaimer}):null]})}function w0({insights:e,ui:t,slip:n,monitor:r}){return!e||e.length===0?null:(0,j.jsx)("div",{className:"ss-w-binsights",children:e.map(s=>(0,j.jsx)(bP,{it:s,ui:t,slip:n,monitor:r},s.id))})}var x0=b(se(),1);var ue=b(I(),1);function y0({vm:e,row:t,ui:n,slip:r,inSlipIds:s}){let a=e.addToSlipEnabled?Lx(e,t,r.conversationId):null,i=!!s&&t.matchOddsId!=null&&!!s[t.matchOddsId];return(0,ue.jsxs)("div",{className:"ss-w-mo-row",children:[(0,ue.jsx)("span",{className:"ss-w-mo-sel",children:t.selection}),(0,ue.jsx)(ti,{previous:t.previousOdds,current:t.odds,direction:t.movementDirection,ui:n}),(0,ue.jsx)("span",{className:"ss-w-mo-price",children:t.odds}),i&&n?(0,ue.jsxs)("span",{className:"ss-w-mon-inslip",children:["\u2713 ",n.inSlipLabel]}):null,(0,ue.jsx)(Mo,{selection:a,shownOdds:t.odds,marketName:e.market,marketDeveloperName:e.marketDeveloperName,slip:r,ui:n})]})}function kP({vm:e,ui:t,slip:n,monitor:r,inSlipIds:s,hideHeader:a,pinRef:i}){var w,C,f,h;let[o,l]=(0,x0.useState)(!1),u=e.kickoffUtc&&(t!=null&&t.bettingKickoff)?t.bettingKickoff(e.kickoffUtc):void 0,c=(w=e.kickoffLabel)!=null?w:u?`${u.dayLabel} ${u.time}`:void 0,d=!!e.homeTeamName&&!!e.awayTeamName,p=!!r&&e.pinEnabled,m=p&&!i,g=!!e.competition||e.isLive||!!c||p;return(0,ue.jsxs)("div",{className:a?"ss-w-mocard ss-w-mocard--bare":"ss-w-mocard",children:[!a&&(0,ue.jsxs)(ue.Fragment,{children:[g?(0,ue.jsxs)("div",{className:"ss-w-bi-header",children:[(0,ue.jsx)("span",{className:"ss-w-bi-header-left",children:e.competition?(0,ue.jsxs)(ue.Fragment,{children:[(0,ue.jsx)(at,{kind:"comp",url:e.competitionCrest,name:e.competition}),(0,ue.jsx)("span",{className:"ss-w-bi-comp",children:e.competition})]}):null}),(0,ue.jsxs)("span",{className:"ss-w-bi-header-right",children:[e.isLive?(0,ue.jsxs)("span",{className:"ss-w-bi-live",children:[(0,ue.jsx)("span",{className:"ss-w-bi-live-dot","aria-hidden":"true"}),(C=t==null?void 0:t.liveLabel)!=null?C:"Live"]}):null,c?(0,ue.jsx)("span",{className:"ss-w-bi-kick",children:c}):null,p&&t?(0,ue.jsx)(ln,{ui:t,monitor:r,pin:i!=null?i:{kind:"match",matchId:e.matchId}}):null]})]}):null,d||e.fixture||e.market||m?(0,ue.jsxs)("div",{className:"ss-w-mo-sub",children:[d?(0,ue.jsxs)("div",{className:"ss-w-bi-fixture",children:[(0,ue.jsx)(at,{kind:"team",url:e.homeCrest,name:e.homeTeamName}),(0,ue.jsx)("span",{className:"ss-w-bi-team",children:e.homeTeamName}),(0,ue.jsx)("span",{className:"ss-w-bi-vs","aria-hidden":"true",children:"vs"}),(0,ue.jsx)("span",{className:"ss-w-bi-team",children:e.awayTeamName}),(0,ue.jsx)(at,{kind:"team",url:e.awayCrest,name:e.awayTeamName})]}):e.fixture?(0,ue.jsx)("span",{className:"ss-w-mo-teams",children:e.fixture}):null,e.market||m?(0,ue.jsxs)("div",{className:"ss-w-mo-market-row",children:[e.market?(0,ue.jsx)("span",{className:"ss-w-mo-market",children:e.market}):null,m&&t?(0,ue.jsx)(ln,{ui:t,monitor:r,pin:{kind:"market",matchId:e.matchId,marketDeveloperName:e.marketDeveloperName,line:e.mainLine}}):null]}):null]}):null]}),(0,ue.jsxs)("div",{className:"ss-w-mo-rows",children:[e.mainRows.map(y=>(0,ue.jsx)(y0,{vm:e,row:y,ui:t,slip:n,inSlipIds:s},y.key)),o?e.moreRows.map(y=>(0,ue.jsx)(y0,{vm:e,row:y,ui:t,slip:n,inSlipIds:s},y.key)):null]}),e.moreRows.length>0?(0,ue.jsxs)("button",{type:"button",className:"ss-w-mo-more","aria-expanded":o,onClick:()=>l(y=>!y),children:[(0,ue.jsx)("span",{children:o?(f=t==null?void 0:t.hideLines)!=null?f:"Hide lines":`${(h=t==null?void 0:t.moreLines)!=null?h:"More lines"} (${e.moreRows.length})`}),(0,ue.jsx)("span",{className:`ss-w-mo-more-chev${o?" ss-w-mo-more-chev-up":""}`,"aria-hidden":"true"})]}):null,e.bookmaker?(0,ue.jsx)("div",{className:"ss-w-mo-foot",children:(0,ue.jsx)("span",{children:e.bookmaker})}):null,e.disclaimer?(0,ue.jsx)("p",{className:"ss-w-bi-disc",children:e.disclaimer}):null]})}function ni({cards:e,ui:t,slip:n,monitor:r,inSlipIds:s,hideHeader:a,pinRef:i}){return!e||e.length===0?null:(0,ue.jsx)("div",{className:"ss-w-mocards",children:e.map(o=>(0,ue.jsx)(kP,{vm:o,ui:t,slip:n,monitor:r,inSlipIds:s,hideHeader:a,pinRef:i},o.id))})}var ye=b(I(),1);function SP(e,t){var n,r;return e.direction==="shortened"?(n=t==null?void 0:t.oddsShortened)!=null?n:"shortened":e.direction==="drifted"?(r=t==null?void 0:t.oddsDrifted)!=null?r:"drifted":""}function AP({vm:e,ui:t,monitor:n}){var o,l,u,c,d,p;let r=SP(e,t),s=r?`, ${r}`:"",a=t!=null&&t.chartAria?t.chartAria(e.opening,e.current,r,e.windowHours):`Price movement over the last ${e.windowHours} hours: opened at ${e.opening}, currently ${e.current}${s}.`,i=!!n&&e.pinEnabled;return(0,ye.jsxs)("div",{className:"ss-w-omcard",children:[(0,ye.jsxs)("div",{className:"ss-w-om-head",children:[(0,ye.jsx)("span",{className:"ss-w-om-market",children:e.market}),(0,ye.jsx)("span",{className:"ss-w-om-tag",children:(o=t==null?void 0:t.priceMovement)!=null?o:"Price movement"}),i&&t?(0,ye.jsx)(ln,{ui:t,monitor:n,pin:{kind:"selection",matchId:e.matchId,marketDeveloperName:e.marketDeveloperName,selectionLabel:e.selectionLabel,line:e.line,withHistory:!0,matchOddsId:e.matchOddsId}}):null]}),e.fixture?(0,ye.jsxs)("div",{className:"ss-w-om-fixture",children:[(0,ye.jsx)("span",{children:e.fixture}),e.competition?(0,ye.jsx)("span",{className:"ss-w-om-comp",children:e.competition}):null]}):null,(0,ye.jsx)("div",{className:"ss-w-om-sel",children:e.selection}),(0,ye.jsx)(ti,{previous:e.opening,current:e.current,direction:e.direction,ui:t}),e.geometry===null?(0,ye.jsx)("div",{className:"ss-w-om-empty",children:e.observationCount===1?(l=t==null?void 0:t.singlePricePoint)!=null?l:"Only one price recorded so far for this selection.":(u=t==null?void 0:t.notEnoughHistory)!=null?u:"No price history recorded yet for this selection."}):(0,ye.jsxs)("svg",{className:"ss-w-om-chart",viewBox:e.geometry.viewBox,width:"100%",role:"img","aria-label":a,children:[e.geometry.gridlines.map(m=>(0,ye.jsxs)("g",{children:[(0,ye.jsx)("line",{className:"ss-w-om-grid",x1:40,y1:m.y,x2:312,y2:m.y}),(0,ye.jsx)("text",{className:"ss-w-om-ylab",x:34,y:m.y+3,textAnchor:"end",children:m.price.toFixed(2)})]},m.price)),(0,ye.jsx)("path",{className:"ss-w-om-line",d:e.geometry.path,fill:"none"}),e.geometry.markers.map((m,g)=>(0,ye.jsx)("circle",{className:"ss-w-om-dot",cx:m.x,cy:m.y,r:2.5},g)),t!=null&&t.chartTimeLabel?(0,ye.jsxs)(ye.Fragment,{children:[(0,ye.jsx)("text",{className:"ss-w-om-xlab",x:40,y:132,textAnchor:"start",children:t.chartTimeLabel(e.geometry.startMs)}),(0,ye.jsx)("text",{className:"ss-w-om-xlab",x:312,y:132,textAnchor:"end",children:t.chartTimeLabel(e.geometry.endMs)})]}):(0,ye.jsx)("text",{className:"ss-w-om-xlab",x:40,y:132,children:t!=null&&t.movementWindow?t.movementWindow(e.windowHours):`Last ${e.windowHours}h`})]}),(0,ye.jsxs)("div",{className:"ss-w-om-foot",children:[(0,ye.jsxs)("span",{children:[(c=t==null?void 0:t.openingLabel)!=null?c:"Opening"," ",(0,ye.jsx)("b",{children:e.opening})]}),(0,ye.jsxs)("span",{children:[(d=t==null?void 0:t.currentLabel)!=null?d:"Current"," ",(0,ye.jsx)("b",{children:e.current})]})]}),e.bookmaker?(0,ye.jsx)("div",{className:"ss-w-om-foot",children:(0,ye.jsx)("span",{children:e.bookmaker})}):null,e.excludedCount>0?(0,ye.jsx)("div",{className:"ss-w-om-excl",children:t!=null&&t.excludedSuspended?t.excludedSuspended(e.excludedCount):`${e.excludedCount} suspended price(s) excluded from this chart.`}):null,e.isSuspended?(0,ye.jsx)("div",{className:"ss-w-om-susp",children:(p=t==null?void 0:t.selectionSuspended)!=null?p:"This selection is not currently available to bet."}):null,e.disclaimer?(0,ye.jsx)("div",{className:"ss-w-om-disc",children:e.disclaimer}):null]})}function uc({cards:e,ui:t,monitor:n}){return!e||e.length===0?null:(0,ye.jsx)("div",{className:"ss-w-omcards",children:e.map(r=>(0,ye.jsx)(AP,{vm:r,ui:t,monitor:n},r.id))})}var Rr=b(I(),1);function cc({actions:e,loading:t,disabled:n,onAct:r}){return e.length===0&&!t?null:(0,Rr.jsxs)("div",{className:"ss-w-actions",children:[e.map((s,a)=>(0,Rr.jsx)("button",{type:"button",className:"ss-w-abtn",disabled:n,onClick:()=>r(s),children:s.label},`${s.label}-${a}`)),e.length===0&&t?(0,Rr.jsxs)(Rr.Fragment,{children:[(0,Rr.jsx)("span",{className:"ss-w-abtn-shimmer"}),(0,Rr.jsx)("span",{className:"ss-w-abtn-shimmer"})]}):null]})}var un=b(I(),1),EP=3;function b0({tile:e,onTap:t}){var a;let n=e.span==="full"?"ss-w-dash-tile--full":"ss-w-dash-tile--half",r=((a=e.imageUrls)!=null?a:[]).slice(0,EP),s=!!e.badgeText||r.length>0;return(0,un.jsxs)("button",{type:"button",className:`ss-w-dash-tile ${n}`,onClick:t,children:[(0,un.jsx)("span",{className:"ss-w-dash-tile-icon",children:(0,un.jsx)(fv,{name:e.icon})}),(0,un.jsxs)("span",{className:"ss-w-dash-tile-body",children:[(0,un.jsx)("span",{className:"ss-w-dash-tile-title",children:e.title}),e.subtitle?(0,un.jsx)("span",{className:"ss-w-dash-tile-subtitle",children:e.subtitle}):null,s?(0,un.jsxs)("span",{className:"ss-w-dash-tile-meta",children:[e.badgeText?(0,un.jsx)("span",{className:"ss-w-dash-tile-badge",children:e.badgeText}):null,r.length>0?(0,un.jsx)("span",{className:"ss-w-dash-tile-crests",children:r.map((i,o)=>(0,un.jsx)("span",{className:"ss-w-dash-tile-crest",style:{backgroundImage:`url(${i})`},"aria-hidden":"true"},`${i}-${o}`))}):null]}):null]}),(0,un.jsx)("span",{className:"ss-w-dash-tile-chevron",children:(0,un.jsx)(Cu,{})})]})}var Dr=b(I(),1),Kf={market:"ss-w-dash--market",goal:"ss-w-dash--goal",discovery:"ss-w-dash--discovery"};function IP(e){return Object.prototype.hasOwnProperty.call(Kf,e)?Kf[e]:Kf.goal}function k0({dashboard:e,onTap:t}){return(0,Dr.jsxs)("div",{className:`ss-w-dash ${IP(e.layout)}`,children:[(0,Dr.jsxs)("div",{className:"ss-w-dash-head",children:[(0,Dr.jsx)("span",{className:"ss-w-dash-title",children:e.title}),e.subtitle?(0,Dr.jsx)("span",{className:"ss-w-dash-subtitle",children:e.subtitle}):null]}),(0,Dr.jsx)("div",{className:"ss-w-dash-grid",children:e.tiles.map((n,r)=>(0,Dr.jsx)(b0,{tile:n,onTap:()=>t(n,r)},`${n.title}-${r}`))}),e.footerTip?(0,Dr.jsx)("span",{className:"ss-w-dash-foot",children:e.footerTip}):null]})}var re=b(I(),1);function NP(e){return e==="W"?"ss-w-fandash-teamform-cell--win":e==="L"?"ss-w-fandash-teamform-cell--loss":"ss-w-fandash-teamform-cell--draw"}function C0({m:e,subjectCrestUrl:t,subjectName:n}){var i;let r=(0,re.jsx)(at,{url:t!=null?t:void 0,name:n,kind:"team"}),s=(0,re.jsx)(at,{url:(i=e.opponentCrestUrl)!=null?i:void 0,kind:"team"}),a=e.teamIsHome?`${e.teamScore} - ${e.oppScore}`:`${e.oppScore} - ${e.teamScore}`;return(0,re.jsxs)("div",{className:`ss-w-fandash-teamform-cell ${NP(e.result)}`,children:[e.teamIsHome?r:s,(0,re.jsx)("span",{className:"ss-w-fandash-teamform-score",children:a}),e.teamIsHome?s:r]})}var TP=5;function LP(e){return Array.from({length:TP},(t,n)=>n).flatMap(t=>[(0,re.jsx)("span",{className:"ss-w-fandash-teamform-slot",children:e.homeForm[t]?(0,re.jsx)(C0,{m:e.homeForm[t],subjectCrestUrl:e.homeCrestUrl,subjectName:e.homeName}):null},`h-${t}`),(0,re.jsx)("span",{className:"ss-w-fandash-teamform-slot",children:e.awayForm[t]?(0,re.jsx)(C0,{m:e.awayForm[t],subjectCrestUrl:e.awayCrestUrl,subjectName:e.awayName}):null},`a-${t}`)])}function S0({card:e}){var r,s,a,i;let{data:t}=e,n=t.h2H;return(0,re.jsxs)(re.Fragment,{children:[(0,re.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-fixture",children:[(0,re.jsxs)("span",{className:"ss-w-fandash-eyebrow",children:[e.title," \xB7 ",t.competition]}),(0,re.jsxs)("div",{className:"ss-w-fandash-fixture-teams",children:[(0,re.jsxs)("span",{className:"ss-w-fandash-fixture-team",children:[(0,re.jsx)(at,{url:(r=t.homeCrestUrl)!=null?r:void 0,name:t.homeName,kind:"team"}),(0,re.jsx)("span",{className:"ss-w-fandash-fixture-name",children:t.homeName})]}),(0,re.jsx)("span",{className:"ss-w-fandash-fixture-vs",children:"v"}),(0,re.jsxs)("span",{className:"ss-w-fandash-fixture-team ss-w-fandash-fixture-team--away",children:[(0,re.jsx)("span",{className:"ss-w-fandash-fixture-name",children:t.awayName}),(0,re.jsx)(at,{url:(s=t.awayCrestUrl)!=null?s:void 0,name:t.awayName,kind:"team"})]})]}),(0,re.jsxs)("div",{className:"ss-w-fandash-fixture-meta",children:[(0,re.jsx)("span",{className:"ss-w-fandash-fixture-kickoff",children:t.kickoffLabel}),t.venue?(0,re.jsxs)("span",{className:"ss-w-fandash-fixture-venue",children:[" \xB7 ",t.venue]}):null]})]}),(0,re.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-lastfive",children:[(0,re.jsx)("span",{className:"ss-w-fandash-eyebrow",children:t.formLabel}),(0,re.jsxs)("div",{className:"ss-w-fandash-teamform-head",children:[(0,re.jsxs)("span",{className:"ss-w-fandash-teamform-head-team",children:[(0,re.jsx)(at,{url:(a=t.homeCrestUrl)!=null?a:void 0,name:t.homeName,kind:"team"}),(0,re.jsx)("span",{className:"ss-w-fandash-teamform-head-name",children:t.homeName})]}),(0,re.jsxs)("span",{className:"ss-w-fandash-teamform-head-team",children:[(0,re.jsx)(at,{url:(i=t.awayCrestUrl)!=null?i:void 0,name:t.awayName,kind:"team"}),(0,re.jsx)("span",{className:"ss-w-fandash-teamform-head-name",children:t.awayName})]})]}),(0,re.jsx)("div",{className:"ss-w-fandash-teamform-rows",children:LP(t)})]}),n||t.fact?(0,re.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-h2h",children:[n?(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)("span",{className:"ss-w-fandash-eyebrow",children:n.label}),(0,re.jsxs)("div",{className:"ss-w-fandash-split",children:[(0,re.jsxs)("span",{className:"ss-w-fandash-split-cell",children:[(0,re.jsx)("span",{className:"ss-w-fandash-split-value",children:n.wins}),(0,re.jsx)("span",{className:"ss-w-fandash-split-label",children:n.homeWinsLabel})]}),(0,re.jsxs)("span",{className:"ss-w-fandash-split-cell",children:[(0,re.jsx)("span",{className:"ss-w-fandash-split-value",children:n.draws}),(0,re.jsx)("span",{className:"ss-w-fandash-split-label",children:n.drawsLabel})]}),(0,re.jsxs)("span",{className:"ss-w-fandash-split-cell",children:[(0,re.jsx)("span",{className:"ss-w-fandash-split-value",children:n.losses}),(0,re.jsx)("span",{className:"ss-w-fandash-split-label",children:n.awayWinsLabel})]})]})]}):null,t.fact?(0,re.jsx)("span",{className:"ss-w-fandash-fact",children:t.fact}):null]}):null]})}var na=b(se(),1),Jn=b(I(),1),PP=864e5;function MP(e,t,n){let r=Math.floor((e*1e3-t)/1e3);if(r<=0)return null;let s=Math.floor(r/86400),a=Math.floor(r%86400/3600),i=Math.floor(r%3600/60),o=r%60,l=c=>String(c).padStart(2,"0");if(s>0)return[{value:l(s),unit:"d"},{value:l(a),unit:"h"}];let u=[{value:l(a),unit:"h"},{value:l(i),unit:"m"}];return n&&u.push({value:l(o),unit:"s"}),u}function A0({card:e}){var l;let{data:t}=e,n={d:t.daysUnit,h:t.hoursUnit,m:t.minutesUnit,s:t.secondsUnit},[r,s]=(0,na.useState)(()=>Date.now()),[a]=(0,na.useState)(()=>typeof window!="undefined"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches),i=t.kickoffUnix*1e3-r<PP;(0,na.useEffect)(()=>{if(a)return;let u=window.setInterval(()=>s(Date.now()),i?1e3:6e4);return()=>window.clearInterval(u)},[a,i]);let o=MP(t.kickoffUnix,r,i&&!a);return(0,Jn.jsx)("div",{className:"ss-w-fandash-card ss-w-fandash-countdown",children:(0,Jn.jsxs)("div",{className:"ss-w-fandash-countdown-top",children:[(0,Jn.jsx)("span",{className:"ss-w-fandash-eyebrow",children:(l=e.title)!=null?l:"Kick-off in"}),o?(0,Jn.jsx)("span",{className:"ss-w-fandash-countdown-clock",children:o.map((u,c)=>(0,Jn.jsxs)(na.Fragment,{children:[c>0?(0,Jn.jsx)("span",{className:"ss-w-fandash-countdown-colon",children:":"}):null,(0,Jn.jsxs)("span",{className:"ss-w-fandash-countdown-seg",children:[(0,Jn.jsx)("span",{className:"ss-w-fandash-countdown-value",children:u.value}),(0,Jn.jsx)("span",{className:"ss-w-fandash-countdown-unit",children:n[u.unit]})]})]},u.unit))}):null]})})}var N0=b(se(),1);var Ge=b(I(),1),Yf=3;function E0({name:e,crestUrl:t}){return(0,Ge.jsxs)("span",{className:"ss-w-fandash-injuries-col-head",children:[(0,Ge.jsx)(at,{url:t!=null?t:void 0,name:e,kind:"team"}),(0,Ge.jsx)("span",{className:"ss-w-fandash-injuries-col-head-name",children:e})]})}function I0({rows:e,emptyLabel:t,limit:n}){if(e.length===0)return(0,Ge.jsx)("span",{className:"ss-w-fandash-injuries-empty",children:t});let r=n===void 0?e:e.slice(0,n);return(0,Ge.jsx)("ul",{className:"ss-w-fandash-injury-list",children:r.map((s,a)=>(0,Ge.jsxs)("li",{className:"ss-w-fandash-injury-row",children:[(0,Ge.jsx)("span",{className:"ss-w-fandash-injury-name",children:s.playerName}),(0,Ge.jsxs)("span",{className:"ss-w-fandash-injury-meta",children:[(0,Ge.jsx)("span",{className:"ss-w-fandash-injury-status",children:s.status}),s.injuryType?(0,Ge.jsx)("span",{className:"ss-w-fandash-injury-type",children:s.injuryType}):null,s.expectedReturnLabel?(0,Ge.jsx)("span",{className:"ss-w-fandash-injury-return",children:s.expectedReturnLabel}):null]})]},`${s.playerName}-${a}`))})}function T0({card:e,ui:t}){var d,p;let{data:n}=e,[r,s]=(0,N0.useState)(!1),a=Math.max(0,n.ours.length-Yf)+Math.max(0,n.theirs.length-Yf),i=r?void 0:Yf,o=(d=t==null?void 0:t.showMore)!=null?d:(m=>`Show ${m} more`),l=(p=t==null?void 0:t.showLess)!=null?p:"Show less",u=n.oursIsHome?{name:n.oursName,crest:n.oursCrestUrl,rows:n.ours}:{name:n.theirsName,crest:n.theirsCrestUrl,rows:n.theirs},c=n.oursIsHome?{name:n.theirsName,crest:n.theirsCrestUrl,rows:n.theirs}:{name:n.oursName,crest:n.oursCrestUrl,rows:n.ours};return(0,Ge.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-injuries",children:[e.title?(0,Ge.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,Ge.jsxs)("div",{className:"ss-w-fandash-injuries-cols",children:[(0,Ge.jsxs)("div",{className:"ss-w-fandash-injuries-col",children:[(0,Ge.jsx)(E0,{name:u.name,crestUrl:u.crest}),(0,Ge.jsx)(I0,{rows:u.rows,emptyLabel:n.emptyLabel,limit:i})]}),(0,Ge.jsx)("div",{className:"ss-w-fandash-injuries-divider"}),(0,Ge.jsxs)("div",{className:"ss-w-fandash-injuries-col",children:[(0,Ge.jsx)(E0,{name:c.name,crestUrl:c.crest}),(0,Ge.jsx)(I0,{rows:c.rows,emptyLabel:n.emptyLabel,limit:i})]})]}),a>0?(0,Ge.jsx)("button",{type:"button",className:"ss-w-fandash-injuries-more","aria-expanded":r,onClick:()=>s(m=>!m),children:r?l:o(a)}):null]})}var ri=b(I(),1);function L0({card:e}){return(0,ri.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-reasons",children:[e.title?(0,ri.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,ri.jsx)("ul",{className:"ss-w-fandash-reason-list",children:e.data.angles.map((t,n)=>(0,ri.jsx)("li",{className:"ss-w-fandash-reason-item",children:t},`${t}-${n}`))})]})}var si=b(I(),1);function P0({card:e}){return(0,si.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-watch",children:[e.title?(0,si.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,si.jsx)("span",{className:"ss-w-fandash-stations",children:e.data.stations.map((t,n)=>(0,si.jsx)("span",{className:"ss-w-fandash-station-chip",children:t},`${t}-${n}`))})]})}var Kn=b(I(),1);function M0({card:e,onTap:t}){return(0,Kn.jsxs)("button",{type:"button",className:"ss-w-fandash-card ss-w-fandash-card--tap ss-w-fandash-congested",onClick:()=>t(e),children:[e.title?(0,Kn.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,Kn.jsx)("div",{className:"ss-w-fandash-congested-grid",children:e.data.entries.map((n,r)=>(0,Kn.jsxs)("span",{className:"ss-w-fandash-congested-cell",children:[(0,Kn.jsx)("span",{className:"ss-w-fandash-congested-day",children:n.dayLabel}),(0,Kn.jsx)("span",{className:"ss-w-fandash-congested-opponent",children:n.opponent}),(0,Kn.jsx)("span",{className:"ss-w-fandash-congested-comp",children:n.competition}),(0,Kn.jsx)("span",{className:"ss-w-fandash-congested-time",children:n.timeLabel})]},`${n.opponent}-${r}`))}),(0,Kn.jsx)("span",{className:"ss-w-fandash-card-cta",children:e.actionLabel})]})}var At=b(I(),1);function R0({rows:e}){return e.length===0?(0,At.jsx)("span",{className:"ss-w-fandash-transfers-empty",children:"None"}):(0,At.jsx)("ul",{className:"ss-w-fandash-transfer-list",children:e.map((t,n)=>(0,At.jsxs)("li",{className:"ss-w-fandash-transfer-row",children:[(0,At.jsx)("span",{className:"ss-w-fandash-transfer-name",children:t.playerName}),(0,At.jsx)("span",{className:"ss-w-fandash-transfer-club",children:t.otherClub}),t.type?(0,At.jsx)("span",{className:"ss-w-fandash-transfer-type",children:t.type}):null]},`${t.playerName}-${n}`))})}function D0({card:e}){let{data:t}=e;return(0,At.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-transfers",children:[e.title?(0,At.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,At.jsxs)("div",{className:"ss-w-fandash-transfers-cols",children:[(0,At.jsxs)("div",{className:"ss-w-fandash-transfers-col",children:[(0,At.jsx)("span",{className:"ss-w-fandash-transfers-col-head",children:"In"}),(0,At.jsx)(R0,{rows:t.in})]}),(0,At.jsxs)("div",{className:"ss-w-fandash-transfers-col",children:[(0,At.jsx)("span",{className:"ss-w-fandash-transfers-col-head",children:"Out"}),(0,At.jsx)(R0,{rows:t.out})]})]})]})}var zr=b(I(),1);function z0({card:e}){return(0,zr.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-links",children:[e.title?(0,zr.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,zr.jsx)("div",{className:"ss-w-fandash-link-grid",children:e.data.links.map((t,n)=>(0,zr.jsxs)("a",{className:"ss-w-fandash-link-tile",href:t.url,target:"_blank",rel:"noopener noreferrer",children:[(0,zr.jsx)("span",{className:"ss-w-fandash-link-label",children:t.label}),(0,zr.jsx)("span",{className:"ss-w-fandash-link-chevron",children:(0,zr.jsx)(Cu,{})})]},`${t.url}-${n}`))})]})}var B0=b(se(),1),ut=b(I(),1);function RP(e){return e.trim().slice(0,3).toUpperCase()}function O0({url:e,name:t,side:n}){let[r,s]=(0,B0.useState)(!1),a=`ss-w-fandash-postmatch-crest ss-w-fandash-postmatch-crest--${n}`;return e&&!r?(0,ut.jsx)("img",{className:a,src:e,alt:"","aria-hidden":"true",onError:()=>s(!0)}):(0,ut.jsx)("span",{className:`${a} ss-w-fandash-postmatch-crest--fallback`,"aria-hidden":"true",children:RP(t)})}function F0({card:e}){let{data:t}=e,n=t.homeScore>=t.awayScore,r=t.awayScore>=t.homeScore;return(0,ut.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-postmatch-result",children:[(0,ut.jsxs)("div",{className:"ss-w-fandash-postmatch-top",children:[e.title?(0,ut.jsx)("span",{className:"ss-w-fandash-postmatch-pill",children:e.title}):null,(0,ut.jsx)("span",{className:`ss-w-fandash-postmatch-tag ss-w-fandash-postmatch-tag--${t.outcome}`,children:t.resultLabel})]}),(0,ut.jsxs)("div",{className:"ss-w-fandash-postmatch-main",children:[(0,ut.jsxs)("div",{className:"ss-w-fandash-postmatch-side ss-w-fandash-postmatch-side--home",children:[(0,ut.jsx)(O0,{url:t.homeCrestUrl,name:t.homeName,side:"home"}),(0,ut.jsx)("span",{className:"ss-w-fandash-postmatch-team-name",children:t.homeName})]}),(0,ut.jsxs)("div",{className:"ss-w-fandash-postmatch-score-main",children:[(0,ut.jsx)("span",{className:`ss-w-fandash-postmatch-score-value ss-w-fandash-postmatch-score-value--${n?"win":"lose"}`,children:t.homeScore}),(0,ut.jsx)("span",{className:"ss-w-fandash-postmatch-score-sep",children:"\u2013"}),(0,ut.jsx)("span",{className:`ss-w-fandash-postmatch-score-value ss-w-fandash-postmatch-score-value--${r?"win":"lose"}`,children:t.awayScore})]}),(0,ut.jsxs)("div",{className:"ss-w-fandash-postmatch-side ss-w-fandash-postmatch-side--away",children:[(0,ut.jsx)(O0,{url:t.awayCrestUrl,name:t.awayName,side:"away"}),(0,ut.jsx)("span",{className:"ss-w-fandash-postmatch-team-name",children:t.awayName})]})]}),(0,ut.jsxs)("div",{className:"ss-w-fandash-postmatch-meta",children:[t.kickoffLabel,t.competition?` \xB7 ${t.competition}`:""]})]})}var Or=b(I(),1);function U0({card:e,onTap:t}){return(0,Or.jsxs)("button",{type:"button",className:"ss-w-fandash-card ss-w-fandash-card--tap ss-w-fandash-postmatch-goals",onClick:()=>t(e),children:[e.title?(0,Or.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,Or.jsx)("ul",{className:"ss-w-fandash-postmatch-goal-list",children:e.data.goals.map((n,r)=>(0,Or.jsxs)("li",{className:n.scoredByClub?"ss-w-fandash-postmatch-goal ss-w-fandash-postmatch-goal--club":"ss-w-fandash-postmatch-goal",children:[(0,Or.jsx)("span",{className:"ss-w-fandash-postmatch-goal-ball"}),(0,Or.jsx)("span",{children:n.text})]},`${n.text}-${r}`))}),(0,Or.jsx)("span",{className:"ss-w-fandash-card-cta",children:e.actionLabel})]})}var wt=b(I(),1);function DP(e,t){let n=e+t;if(n<=0)return{home:"50%",away:"50%"};let r=Math.round(e/n*1e3)/10;return{home:`${r}%`,away:`${Math.round((100-r)*10)/10}%`}}function Q0({card:e,onTap:t}){let{data:n}=e;return(0,wt.jsxs)("button",{type:"button",className:"ss-w-fandash-card ss-w-fandash-card--tap ss-w-fandash-postmatch-stats",onClick:()=>t(e),children:[e.title?(0,wt.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,wt.jsx)("div",{className:"ss-w-fandash-postmatch-stat-rows",children:n.rows.map((r,s)=>{let a=n.clubIsHome?r.clubValue:r.oppValue,i=n.clubIsHome?r.oppValue:r.clubValue,o=n.clubIsHome?r.clubNum:r.oppNum,l=n.clubIsHome?r.oppNum:r.clubNum,{home:u,away:c}=DP(o,l);return(0,wt.jsxs)("div",{className:"ss-w-fandash-postmatch-stat",children:[(0,wt.jsxs)("div",{className:"ss-w-fandash-postmatch-stat-row",children:[(0,wt.jsx)("span",{className:"ss-w-fandash-postmatch-stat-value ss-w-fandash-postmatch-stat-value--home",children:a}),(0,wt.jsx)("span",{className:"ss-w-fandash-postmatch-stat-label",children:r.label}),(0,wt.jsx)("span",{className:"ss-w-fandash-postmatch-stat-value ss-w-fandash-postmatch-stat-value--away",children:i})]}),(0,wt.jsxs)("div",{className:"ss-w-fandash-postmatch-stat-bar",children:[(0,wt.jsx)("span",{className:"ss-w-fandash-postmatch-stat-bar-home",style:{width:u}}),(0,wt.jsx)("span",{className:"ss-w-fandash-postmatch-stat-bar-away",style:{width:c}})]})]},`${r.label}-${s}`)})}),n.rows.length>0?(0,wt.jsxs)("div",{className:"ss-w-fandash-postmatch-legend",children:[(0,wt.jsxs)("span",{className:"ss-w-fandash-postmatch-legend-item",children:[(0,wt.jsx)("i",{className:"ss-w-fandash-postmatch-legend-swatch ss-w-fandash-postmatch-legend-swatch--home"}),n.homeName]}),(0,wt.jsxs)("span",{className:"ss-w-fandash-postmatch-legend-item",children:[(0,wt.jsx)("i",{className:"ss-w-fandash-postmatch-legend-swatch ss-w-fandash-postmatch-legend-swatch--away"}),n.awayName]})]}):null,(0,wt.jsx)("span",{className:"ss-w-fandash-card-cta",children:e.actionLabel})]})}var Br=b(I(),1);function zP(e){let t=e.trim().split(/\s+/).filter(Boolean);if(t.length===0)return"?";let n=t[0].charAt(0),r=t[t.length-1].charAt(0);return(t.length>1?`${n}${r}`:n).toUpperCase()}function H0({card:e,onTap:t}){let{data:n}=e;return(0,Br.jsxs)("button",{type:"button",className:"ss-w-fandash-card ss-w-fandash-card--tap ss-w-fandash-postmatch-performer",onClick:()=>t(e),children:[e.title?(0,Br.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,Br.jsxs)("div",{className:"ss-w-fandash-postmatch-perf-row",children:[(0,Br.jsx)("span",{className:"ss-w-fandash-postmatch-perf-avatar","aria-hidden":"true",children:zP(n.playerName)}),(0,Br.jsx)("span",{className:"ss-w-fandash-postmatch-perf-name",children:n.playerName}),(0,Br.jsx)("span",{className:"ss-w-fandash-postmatch-perf-rating",children:n.ratingLabel})]}),(0,Br.jsx)("span",{className:"ss-w-fandash-card-cta",children:e.actionLabel})]})}var ai=b(I(),1);function G0({card:e}){let{data:t}=e;return(0,ai.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-postmatch-next",children:[e.title?(0,ai.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,ai.jsx)("div",{className:"ss-w-fandash-postmatch-next-row",children:(0,ai.jsx)("span",{className:"ss-w-fandash-postmatch-next-when",children:t.whenLabel})})]})}var ws=b(I(),1);function V0({card:e,onTap:t}){let{data:n}=e;return(0,ws.jsxs)("button",{type:"button",className:"ss-w-fandash-card ss-w-fandash-card--tap ss-w-fandash-resting-next",onClick:()=>t(e),children:[e.title?(0,ws.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,ws.jsxs)("div",{className:"ss-w-fandash-resting-next-row",children:[(0,ws.jsx)("span",{className:"ss-w-fandash-resting-next-when",children:n.whenLabel}),n.competition?(0,ws.jsx)("span",{className:"ss-w-fandash-resting-next-competition",children:n.competition}):null]}),(0,ws.jsx)("span",{className:"ss-w-fandash-card-cta",children:e.actionLabel})]})}var ys=b(I(),1);function W0({card:e,onTap:t}){let{data:n}=e;return(0,ys.jsxs)("button",{type:"button",className:"ss-w-fandash-card ss-w-fandash-card--tap ss-w-fandash-resting-standings",onClick:()=>t(e),children:[e.title?(0,ys.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,ys.jsxs)("div",{className:"ss-w-fandash-resting-standings-row",children:[(0,ys.jsx)("span",{className:"ss-w-fandash-resting-standings-position",children:n.positionLabel}),(0,ys.jsx)("span",{className:"ss-w-fandash-resting-standings-record",children:n.recordLabel})]}),(0,ys.jsx)("span",{className:"ss-w-fandash-card-cta",children:e.actionLabel})]})}var Fr=b(I(),1);function _0({card:e,onTap:t}){let{data:n}=e;return(0,Fr.jsxs)("button",{type:"button",className:"ss-w-fandash-card ss-w-fandash-card--tap ss-w-fandash-resting-season",onClick:()=>t(e),children:[e.title?(0,Fr.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,Fr.jsxs)("div",{className:"ss-w-fandash-resting-season-rows",children:[n.scorerLabel?(0,Fr.jsx)("span",{className:"ss-w-fandash-resting-season-row",children:n.scorerLabel}):null,n.playerLabel?(0,Fr.jsx)("span",{className:"ss-w-fandash-resting-season-row",children:n.playerLabel}):null,(0,Fr.jsx)("span",{className:"ss-w-fandash-resting-season-row",children:n.tallyLabel})]}),(0,Fr.jsx)("span",{className:"ss-w-fandash-card-cta",children:e.actionLabel})]})}var ii=b(I(),1);function OP(e){let t=e.toUpperCase();return t==="W"?"ss-w-fandash-form-pill--win":t==="L"?"ss-w-fandash-form-pill--loss":"ss-w-fandash-form-pill--draw"}function j0({card:e}){let{data:t}=e;return(0,ii.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-resting-form",children:[e.title?(0,ii.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,ii.jsx)("span",{className:"ss-w-fandash-form",children:t.letters.map((n,r)=>(0,ii.jsx)("span",{className:`ss-w-fandash-form-pill ${OP(n)}`,children:n},`${n}-${r}`))})]})}var pc=b(se(),1);var dc=b(se(),1),X0=6e4,BP=15;function $f(e,t,n){if(!t)return e;let r=Math.floor((Date.now()-n)/X0);return e+Math.min(Math.max(0,r),BP)}function q0(e,t,n){let[r,s]=(0,dc.useState)(()=>$f(e,t,n));return(0,dc.useEffect)(()=>{if(s($f(e,t,n)),!t)return;let a=window.setInterval(()=>{s($f(e,t,n))},X0);return()=>window.clearInterval(a)},[e,t,n]),r}var Ve=b(I(),1);function FP(e){return e.trim().slice(0,3).toUpperCase()}function J0({url:e,name:t,side:n}){let[r,s]=(0,pc.useState)(!1),a=`ss-w-fandash-live-crest ss-w-fandash-live-crest--${n}`;return e&&!r?(0,Ve.jsx)("img",{className:a,src:e,alt:"","aria-hidden":"true",onError:()=>s(!0)}):(0,Ve.jsx)("span",{className:`${a} ss-w-fandash-live-crest--fallback`,"aria-hidden":"true",children:FP(t)})}function UP(e){if(!e||e.length===0)return null;let t=e.filter(n=>n.type==="goal"&&n.player);return t.length===0?null:t.slice().sort((n,r)=>n.minute-r.minute).map(n=>`${n.player} ${n.minuteLabel}`).join(", ")}function K0({card:e,goalEvents:t}){let{data:n}=e,r=`${n.minute}:${n.homeScore}:${n.awayScore}`,s=(0,pc.useRef)(null);(!s.current||s.current.key!==r)&&(s.current={key:r,receivedAtMs:Date.now()});let a=q0(n.minute,n.clockRunning,s.current.receivedAtMs),i=n.minuteLabel.replace(/^\d+/,""),o=UP(t);return(0,Ve.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-live-score",children:[e.title?(0,Ve.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,Ve.jsxs)("div",{className:"ss-w-fandash-live-top",children:[(0,Ve.jsxs)("span",{className:"ss-w-fandash-live-pill",children:[(0,Ve.jsx)("span",{className:"ss-w-fandash-live-dot","aria-hidden":"true"}),n.statusLabel]}),(0,Ve.jsx)("span",{className:"ss-w-fandash-live-minute",children:`${a}${i}`}),n.competition?(0,Ve.jsx)("span",{className:"ss-w-fandash-live-competition",children:n.competition}):null]}),(0,Ve.jsxs)("div",{className:"ss-w-fandash-live-main",children:[(0,Ve.jsxs)("div",{className:"ss-w-fandash-live-side ss-w-fandash-live-side--home",children:[(0,Ve.jsx)(J0,{url:n.homeCrestUrl,name:n.homeName,side:"home"}),(0,Ve.jsx)("span",{className:"ss-w-fandash-live-team-name",children:n.homeName})]}),(0,Ve.jsxs)("div",{className:"ss-w-fandash-live-score-main",children:[(0,Ve.jsx)("span",{className:"ss-w-fandash-live-score-value",children:n.homeScore}),(0,Ve.jsx)("span",{className:"ss-w-fandash-live-score-sep",children:"\u2013"}),(0,Ve.jsx)("span",{className:"ss-w-fandash-live-score-value",children:n.awayScore})]}),(0,Ve.jsxs)("div",{className:"ss-w-fandash-live-side ss-w-fandash-live-side--away",children:[(0,Ve.jsx)(J0,{url:n.awayCrestUrl,name:n.awayName,side:"away"}),(0,Ve.jsx)("span",{className:"ss-w-fandash-live-team-name",children:n.awayName})]})]}),o?(0,Ve.jsxs)("div",{className:"ss-w-fandash-live-scorers",children:[(0,Ve.jsx)("span",{className:"ss-w-fandash-live-scorers-icon","aria-hidden":"true",children:"\u26BD"}),o]}):null]})}var $0=b(se(),1),Xe=b(I(),1),Y0=3;function QP({type:e}){return e==="goal"?(0,Xe.jsx)("span",{className:"ss-w-fandash-live-tl-ico ss-w-fandash-live-tl-ico--goal","aria-hidden":"true",children:(0,Xe.jsx)("span",{className:"ss-w-fandash-live-tl-ball"})}):e==="yellow"||e==="red"?(0,Xe.jsx)("span",{className:"ss-w-fandash-live-tl-ico","aria-hidden":"true",children:(0,Xe.jsx)("span",{className:`ss-w-fandash-live-tl-card ss-w-fandash-live-tl-card--${e}`})}):e==="sub"?(0,Xe.jsx)("span",{className:"ss-w-fandash-live-tl-ico","aria-hidden":"true",children:(0,Xe.jsx)("span",{className:"ss-w-fandash-live-tl-subarrows",children:"\u21C5"})}):(0,Xe.jsx)("span",{className:"ss-w-fandash-live-tl-ico","aria-hidden":"true",children:(0,Xe.jsx)("span",{className:"ss-w-fandash-live-tl-dot"})})}function HP({e}){var t,n;return e.type==="sub"?(0,Xe.jsxs)("span",{className:"ss-w-fandash-live-tl-who",children:[(t=e.player)!=null?t:e.text,e.playerOff?(0,Xe.jsxs)("span",{className:"ss-w-fandash-live-tl-off",children:[" for ",e.playerOff]}):null]}):(0,Xe.jsx)("span",{className:"ss-w-fandash-live-tl-who",children:(n=e.player)!=null?n:e.text})}function GP({e}){let t=["ss-w-fandash-live-tl-ev",e.side==="home"?"ss-w-fandash-live-tl-ev--home":"ss-w-fandash-live-tl-ev--away",e.type==="goal"?"ss-w-fandash-live-tl-ev--goal":""].filter(Boolean).join(" ");return(0,Xe.jsxs)("div",{className:t,children:[(0,Xe.jsxs)("span",{className:"ss-w-fandash-live-tl-txt",children:[(0,Xe.jsx)(HP,{e}),(0,Xe.jsx)(QP,{type:e.type})]}),(0,Xe.jsx)("span",{className:"ss-w-fandash-live-tl-badge",children:e.minuteLabel})]})}function Z0({card:e,ui:t}){var c,d;let[n,r]=(0,$0.useState)(!1),s=e.data.events;if(!s||s.length===0)return null;let a=[...s].sort((p,m)=>m.minute-p.minute),i=a.length-Y0,o=n?a:a.slice(0,Y0),l=(c=t==null?void 0:t.showMore)!=null?c:(p=>`Show ${p} more`),u=(d=t==null?void 0:t.showLess)!=null?d:"Show less";return(0,Xe.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-live-timeline",children:[e.title?(0,Xe.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,Xe.jsx)("div",{className:"ss-w-fandash-live-tl",children:o.map((p,m)=>(0,Xe.jsx)(GP,{e:p},`${p.minute}-${p.side}-${p.type}-${m}`))}),i>0?(0,Xe.jsx)("button",{type:"button",className:"ss-w-fandash-live-tl-more","aria-expanded":n,onClick:()=>r(p=>!p),children:n?u:l(i)}):null]})}var e1=b(se(),1),Rt=b(I(),1),oi=270,Zf=56,xs=Zf/2,VP=.26;function WP(e){var u,c;let t=e.length-1,n=d=>t===0?0:d/t*oi,r=d=>xs-d*VP,s=e.map((d,p)=>`${n(p).toFixed(1)},${r(d.value).toFixed(1)}`),a=`M0,${xs} L${s.join(" L")} L${oi},${xs} Z`,i=`M${s.join(" L")}`,o=(c=(u=e[t])==null?void 0:u.value)!=null?c:0;return{area:a,line:i,lastLeftPct:t===0?0:100,lastTopPx:r(o)}}function mc({points:e,caption:t,clubIsHome:n}){if(e.length===0)return null;let{area:r,line:s,lastLeftPct:a,lastTopPx:i}=WP(e),o=(0,e1.useId)(),l=`${o}-top`,u=`${o}-bottom`,c=n?"ss-w-fandash-live-mom-home":"ss-w-fandash-live-mom-away",d=n?"ss-w-fandash-live-mom-away":"ss-w-fandash-live-mom-home";return(0,Rt.jsxs)("div",{className:"ss-w-fandash-live-mom",children:[t?(0,Rt.jsx)("span",{className:"ss-w-fandash-live-mom-caption",children:t}):null,(0,Rt.jsxs)("div",{className:"ss-w-fandash-live-mom-plot",children:[(0,Rt.jsxs)("svg",{className:"ss-w-fandash-live-mom-svg",viewBox:`0 0 ${oi} ${Zf}`,preserveAspectRatio:"none",role:"img","aria-label":t!=null?t:"Momentum",children:[(0,Rt.jsxs)("defs",{children:[(0,Rt.jsx)("clipPath",{id:l,children:(0,Rt.jsx)("rect",{x:0,y:0,width:oi,height:xs})}),(0,Rt.jsx)("clipPath",{id:u,children:(0,Rt.jsx)("rect",{x:0,y:xs,width:oi,height:Zf-xs})})]}),(0,Rt.jsx)("path",{d:r,className:c,clipPath:`url(#${l})`}),(0,Rt.jsx)("path",{d:r,className:d,clipPath:`url(#${u})`}),(0,Rt.jsx)("line",{x1:0,y1:xs,x2:oi,y2:xs,className:"ss-w-fandash-live-mom-base"}),(0,Rt.jsx)("path",{d:s,className:"ss-w-fandash-live-mom-line",vectorEffect:"non-scaling-stroke"})]}),(0,Rt.jsx)("span",{className:"ss-w-fandash-live-mom-now",style:{left:`clamp(4px, ${a}%, calc(100% - 4px))`,top:`${i}px`},"aria-hidden":"true"})]})]})}var ct=b(I(),1);function _P(e,t){let n=e+t;if(n<=0)return{home:"50%",away:"50%"};let r=Math.round(e/n*1e3)/10;return{home:`${r}%`,away:`${Math.round((100-r)*10)/10}%`}}function t1({card:e}){let{data:t}=e;return(0,ct.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-live-stats",children:[e.title?(0,ct.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,ct.jsx)("div",{className:"ss-w-fandash-live-stat-rows",children:t.rows.map((n,r)=>{let s=t.clubIsHome?n.clubValue:n.oppValue,a=t.clubIsHome?n.oppValue:n.clubValue,i=t.clubIsHome?n.clubNum:n.oppNum,o=t.clubIsHome?n.oppNum:n.clubNum,{home:l,away:u}=_P(i,o);return(0,ct.jsxs)("div",{className:"ss-w-fandash-live-stat",children:[(0,ct.jsxs)("div",{className:"ss-w-fandash-live-stat-row",children:[(0,ct.jsx)("span",{className:"ss-w-fandash-live-stat-value ss-w-fandash-live-stat-value--home",children:s}),(0,ct.jsx)("span",{className:"ss-w-fandash-live-stat-label",children:n.label}),(0,ct.jsx)("span",{className:"ss-w-fandash-live-stat-value ss-w-fandash-live-stat-value--away",children:a})]}),(0,ct.jsxs)("div",{className:"ss-w-fandash-live-bar",children:[(0,ct.jsx)("span",{className:"ss-w-fandash-live-bar-home",style:{width:l}}),(0,ct.jsx)("span",{className:"ss-w-fandash-live-bar-away",style:{width:u}})]})]},`${n.label}-${r}`)})}),t.momentum.length>0?(0,ct.jsx)(mc,{points:t.momentum,caption:t.momentumLabel,clubIsHome:t.clubIsHome}):t.momentumLabel?(0,ct.jsx)("span",{className:"ss-w-fandash-live-momentum",children:t.momentumLabel}):null,t.rows.length>0?(0,ct.jsxs)("div",{className:"ss-w-fandash-live-legend",children:[(0,ct.jsxs)("span",{className:"ss-w-fandash-live-legend-item",children:[(0,ct.jsx)("i",{className:"ss-w-fandash-live-legend-swatch ss-w-fandash-live-legend-swatch--home"}),t.homeName]}),(0,ct.jsxs)("span",{className:"ss-w-fandash-live-legend-item",children:[(0,ct.jsx)("i",{className:"ss-w-fandash-live-legend-swatch ss-w-fandash-live-legend-swatch--away"}),t.awayName]})]}):null]})}var ze=b(I(),1);function n1({dashboard:e,onTap:t,ui:n}){let r=[...e.cards.filter(i=>i.cardType==="countdown"),...e.cards.filter(i=>i.cardType!=="countdown")],s=e.cards.find(i=>i.cardType==="liveTimeline"),a=s==null?void 0:s.data.events.filter(i=>i.type==="goal");return(0,ze.jsxs)("div",{className:"ss-w-fandash",children:[e.greeting?(0,ze.jsx)("span",{className:e.greetingIsLead?"ss-w-fandash-greeting ss-w-fandash-greeting--lead":"ss-w-fandash-greeting",children:e.greeting}):null,(0,ze.jsx)("div",{className:"ss-w-fandash-cards",children:r.map((i,o)=>(0,ze.jsx)(jP,{card:i,onTap:t,ui:n,goalEvents:a},`${i.cardType}-${o}`))})]})}function jP({card:e,onTap:t,ui:n,goalEvents:r}){switch(e.cardType){case"fixture":return(0,ze.jsx)(S0,{card:e});case"countdown":return(0,ze.jsx)(A0,{card:e});case"injuries":return(0,ze.jsx)(T0,{card:e,ui:n});case"reasonToBet":return(0,ze.jsx)(L0,{card:e});case"whereToWatch":return(0,ze.jsx)(P0,{card:e});case"congestedWeek":return(0,ze.jsx)(M0,{card:e,onTap:t});case"transfers":return(0,ze.jsx)(D0,{card:e});case"links":return(0,ze.jsx)(z0,{card:e});case"postMatchResult":return(0,ze.jsx)(F0,{card:e});case"postMatchGoals":return(0,ze.jsx)(U0,{card:e,onTap:t});case"postMatchStats":return(0,ze.jsx)(Q0,{card:e,onTap:t});case"postMatchTopPerformer":return(0,ze.jsx)(H0,{card:e,onTap:t});case"postMatchNext":return(0,ze.jsx)(G0,{card:e});case"restingNext":return(0,ze.jsx)(V0,{card:e,onTap:t});case"restingStandings":return(0,ze.jsx)(W0,{card:e,onTap:t});case"restingSeason":return(0,ze.jsx)(_0,{card:e,onTap:t});case"restingForm":return(0,ze.jsx)(j0,{card:e});case"liveScore":return(0,ze.jsx)(K0,{card:e,goalEvents:r});case"liveTimeline":return(0,ze.jsx)(Z0,{card:e,ui:n});case"liveStats":return(0,ze.jsx)(t1,{card:e});default:return null}}var vn=b(I(),1);function r1({message:e,disabled:t,onAct:n,onTap:r,ui:s,slip:a,monitor:i}){if(e.role==="user")return(0,vn.jsx)("div",{className:"ss-w-msg ss-w-user","data-msg-id":e.id,children:(0,vn.jsx)("div",{className:"ss-w-bubble",children:e.text})});let o=l=>{n({message:l.actionLabel,actionRef:l.actionRef,label:l.actionLabel||l.title||""})};return(0,vn.jsxs)("div",{className:"ss-w-msg ss-w-bot","data-msg-id":e.id,children:[e.text&&!e.greetingDashboard&&!e.clubFanDashboard?(0,vn.jsx)(i0,{text:e.text}):null,e.greetingDashboard&&!e.clubFanDashboard?(0,vn.jsx)(k0,{dashboard:e.greetingDashboard,onTap:r}):null,e.clubFanDashboard?(0,vn.jsx)(n1,{dashboard:e.clubFanDashboard,onTap:o,ui:s}):null,(0,vn.jsx)(c0,{cards:e.cards,disabled:t,showLessLabel:s==null?void 0:s.showLess,showMoreLabel:s==null?void 0:s.showMore}),(0,vn.jsx)(w0,{insights:e.insights,ui:s,slip:a,monitor:i}),(0,vn.jsx)(ni,{cards:e.marketOdds,ui:s,slip:a,monitor:i}),(0,vn.jsx)(uc,{cards:e.oddsMovement,ui:s,monitor:i}),(0,vn.jsx)(cc,{actions:e.actions,loading:!1,disabled:t,onAct:n})]})}var eg=b(I(),1);function s1({chips:e,onPick:t}){return e.length===0?null:(0,eg.jsx)("div",{className:"ss-w-chips",children:e.map((n,r)=>(0,eg.jsx)("button",{type:"button",className:"ss-w-chip",onClick:()=>t(n.text),children:n.text},`${n.text}-${r}`))})}function a1(e,t=48){return e.scrollHeight-e.scrollTop-e.clientHeight<=t}var Yn=b(I(),1);function XP(e){let t=e[e.length-1];if(!t||t.role!=="assistant")return null;let n=e[e.length-2];return{turnId:t.id,anchorId:n&&n.role==="user"?n.id:t.id}}function i1({controller:e,ui:t,slip:n,onDashboardTap:r,monitor:s}){let{state:a,send:i}=e,o=(0,ra.useRef)(null),l=(0,ra.useRef)(null),u=(0,ra.useRef)(!0),c=(0,ra.useRef)(null);(0,ra.useEffect)(()=>{var w,C;let m=XP(a.messages),g=o.current;if(m&&m.turnId!==c.current){c.current=m.turnId,l.current&&g&&(l.current.style.height=a.isStreaming?`${g.clientHeight}px`:""),u.current=!1,(w=g==null?void 0:g.querySelector(`[data-msg-id="${m.anchorId}"]`))==null||w.scrollIntoView({block:"start"});return}!a.isStreaming&&l.current&&(l.current.style.height=""),u.current&&((C=l.current)==null||C.scrollIntoView({block:"end"}))},[a.messages,a.status,a.isStreaming]);let d=a.messages.some(m=>m.role==="user"),p=a.messages.some(m=>m.role==="assistant"&&(m.greetingDashboard||m.clubFanDashboard));return(0,Yn.jsxs)("div",{className:"ss-w-list","aria-live":"polite",ref:o,onScroll:()=>{o.current&&(u.current=a1(o.current))},children:[a.messages.map(m=>(0,Yn.jsx)(r1,{message:m,disabled:a.isStreaming,onAct:g=>i(g.message,{actionId:g.actionId,actionRef:g.actionRef,displayText:g.label}),onTap:(g,w)=>{i(g.actionValue,g.actionRef?{actionRef:g.actionRef,displayText:g.title}:{displayText:g.title}),m.role==="assistant"&&m.greetingDashboard&&(r==null||r(g,w,m.greetingDashboard.layout))},ui:t,slip:n,monitor:s},m.id)),a.isStreaming&&a.actionsLoading?(0,Yn.jsx)(cc,{actions:[],loading:!0,onAct:()=>{}}):null,a.status?(0,Yn.jsx)("div",{className:"ss-w-status",children:a.status}):null,a.error?(0,Yn.jsxs)("div",{className:"ss-w-error",role:"alert",children:[(0,Yn.jsx)("span",{children:"message"in a.error?a.error.message:t.somethingWentWrong}),(0,Yn.jsx)("button",{type:"button",className:"ss-w-retry",onClick:()=>e.retry(),children:t.retry})]}):null,!d&&!p?(0,Yn.jsx)(s1,{chips:a.starters,onPick:m=>i(m)}):null,(0,Yn.jsx)("div",{ref:l,className:"ss-w-turn-spacer","aria-hidden":"true"})]})}var o1=b(se(),1);var vs=b(I(),1);function l1({placeholder:e,streaming:t,onSend:n,onStop:r,stopLabel:s="Stop response",sendLabel:a="Send message"}){let[i,o]=(0,o1.useState)(""),l=()=>{let c=i.trim();c&&(n(c),o(""))};return(0,vs.jsxs)("div",{className:"ss-w-input",children:[(0,vs.jsx)("textarea",{className:"ss-w-textarea",rows:1,placeholder:e,value:i,disabled:t,onChange:c=>o(c.target.value),onKeyDown:c=>{c.key==="Enter"&&!c.shiftKey&&(c.preventDefault(),l())}}),t?(0,vs.jsx)("button",{type:"button",className:"ss-w-send ss-w-stop","aria-label":s,onClick:r,children:(0,vs.jsx)("span",{className:"ss-w-stop-glyph"})}):(0,vs.jsx)("button",{type:"button",className:"ss-w-send","aria-label":a,onClick:l,children:(0,vs.jsx)(dv,{})})]})}var li=b(I(),1);function u1({monitor:e,ui:t,matchCount:n,oddsCount:r,todayCount:s,hasToday:a,gamesEnabled:i}){let o=[{tab:"chat",label:t.tabChat,count:0,dot:e.chatDot},...a?[{tab:"today",label:t.tabToday,count:s,dot:e.todayDot}]:[],...n>0?[{tab:"following",label:t.tabFollowing,count:n,dot:e.matchesDot}]:[],...r>0?[{tab:"odds",label:t.tabOdds,count:r,dot:e.oddsDot}]:[],...i?[{tab:"games",label:t.tabGames,count:0,dot:!1},{tab:"leaderboard",label:t.tabLeaderboard,count:0,dot:!1}]:[]];return o.length<2?null:(0,li.jsx)("div",{className:"ss-w-tabs",role:"tablist",children:o.map(({tab:l,label:u,count:c,dot:d})=>{let p=e.activeTab===l;return(0,li.jsxs)("button",{type:"button",role:"tab","aria-selected":p,"data-on":p?"":void 0,className:"ss-w-tab",onClick:()=>e.setActiveTab(l),children:[u,c>0&&(0,li.jsx)("span",{className:"ss-w-tab-count",children:c}),d&&!p&&(0,li.jsx)("span",{className:"ss-w-tab-dot","aria-hidden":"true"})]},l)})})}var Dt=b(I(),1);function c1({match:e,monitor:t,ui:n,slip:r}){var i,o;let s=(i=e.availableMarkets)!=null?i:[];if(s.length===0)return null;let a=(o=t.openMarket[e.matchId])!=null?o:null;return(0,Dt.jsx)("div",{className:"ss-w-acc",children:s.map(l=>{var p,m,g;let u=a===l.marketDeveloperName&&!l.suspended,c=`${e.matchId}:${l.marketDeveloperName}`,d=t.marketOdds[c];return(0,Dt.jsxs)("div",{className:u?"ss-w-acc-row ss-w-acc-row-open":"ss-w-acc-row",children:[(0,Dt.jsxs)("div",{className:"ss-w-acc-head",children:[(0,Dt.jsxs)("button",{type:"button",className:l.suspended?"ss-w-acc-toggle ss-w-acc-toggle--susp":"ss-w-acc-toggle","aria-expanded":u,disabled:l.suspended,onClick:()=>t.toggleMarket(e.matchId,l.marketDeveloperName),children:[(0,Dt.jsx)("span",{className:"ss-w-acc-chevron",children:l.suspended?"":u?"\u25BE":"\u25B8"}),(0,Dt.jsx)("span",{className:"ss-w-acc-label",children:l.marketLabel}),l.hasInsight&&(0,Dt.jsx)("span",{className:"ss-w-acc-badge",children:"\u2605"}),l.suspended&&(0,Dt.jsx)("span",{className:"ss-w-acc-susp",children:n.accordionSuspended})]}),(0,Dt.jsx)(ln,{ui:n,monitor:t,pin:{kind:"market",matchId:e.matchId,marketDeveloperName:l.marketDeveloperName}})]}),u&&(0,Dt.jsxs)("div",{className:"ss-w-acc-panel",children:[(d==null?void 0:d.error)&&(0,Dt.jsx)("div",{className:"ss-w-acc-retry",onClick:()=>t.retryMarket(e.matchId,l.marketDeveloperName),children:n.accordionRetry}),((m=(p=d==null?void 0:d.block)==null?void 0:p.insight)==null?void 0:m.text)&&(0,Dt.jsxs)("div",{className:"ss-w-acc-insight",children:[(0,Dt.jsx)("span",{className:"ss-w-acc-badge",children:n.accordionValueLabel})," ",d.block.insight.text]}),((g=d==null?void 0:d.block)==null?void 0:g.card)&&(0,Dt.jsx)(ni,{cards:[Ua(d.block.card)],ui:n,slip:r,monitor:t,inSlipIds:t.inSlip,hideHeader:!0})]})]},l.marketDeveloperName)})})}var le=b(I(),1);function qP(e,t,n){let r=e.market;if(!r||!r.addToSlipEnabled||typeof r.matchOddsId!="number"||typeof r.price!="number")return null;let s={matchOddsId:r.matchOddsId,matchId:t,oddsDecimal:r.price};return n!==void 0&&(s.conversationId=n),s}function tg(e,t){let n=e.market;return n?t.some(r=>r.marketDeveloperName===n.marketDeveloperName||n.matchOddsId!=null&&r.matchOddsId===n.matchOddsId):!1}function JP(e){return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function d1(e,t){var s;let n=[],r=new Map;for(let a of e){let i=(s=a.player)!=null?s:"",o=a.ownGoal?`${a.minuteLabel} (${t})`:a.minuteLabel;r.has(i)||(r.set(i,[]),n.push(i)),r.get(i).push(o)}return n.map(a=>{let i=r.get(a).join(", ");return{player:a,label:a?`${a} ${i}`:i}})}function p1({match:e,promotedPins:t,monitor:n,ui:r,slip:s}){var m,g,w,C;let a=e.phase==="live",i=e.events.filter(f=>f.type==="goal"),o=d1(i.filter(f=>f.side==="home"),r.ownGoalLabel),l=d1(i.filter(f=>f.side==="away"),r.ownGoalLabel),u=e.statRows.filter(f=>tg(f,t)),c=e.statRows.filter(f=>!tg(f,t)),d=[...u,...c],p=e.phase==="preMatch"&&e.kickoffUtc?r.bettingKickoff(e.kickoffUtc):void 0;return(0,le.jsxs)("div",{className:"ss-w-mon",children:[(0,le.jsxs)("div",{className:"ss-w-mon-top",children:[a&&(0,le.jsxs)("span",{className:"ss-w-fandash-live-pill",children:[(0,le.jsx)("span",{className:"ss-w-fandash-live-dot","aria-hidden":"true"}),r.liveLabel]}),e.phase==="fullTime"&&(0,le.jsx)("span",{className:"ss-w-mon-pill",children:r.fullTimeLabel}),p&&(0,le.jsxs)("span",{className:"ss-w-mon-pill",children:[p.dayLabel," \xB7 ",p.time]}),a&&e.minuteLabel&&(0,le.jsx)("span",{className:"ss-w-mon-min",children:e.minuteLabel}),e.competitionName&&(0,le.jsx)("span",{className:"ss-w-mon-comp",children:e.competitionName}),(0,le.jsx)(ln,{ui:r,monitor:n,pin:{kind:"match",matchId:e.matchId}})]}),(0,le.jsxs)("div",{className:"ss-w-mon-main",children:[(0,le.jsxs)("span",{className:"ss-w-mon-side",children:[(0,le.jsx)(at,{kind:"team",url:(m=e.homeCrestUrl)!=null?m:void 0,name:(g=e.homeTeamName)!=null?g:void 0}),(0,le.jsx)("span",{className:"ss-w-mon-name",children:e.homeTeamName})]}),e.phase==="preMatch"?(0,le.jsx)("span",{className:"ss-w-mon-vs",children:"vs"}):(0,le.jsxs)("span",{className:"ss-w-mon-score",children:[e.homeScore,(0,le.jsx)("i",{children:"\u2013"}),e.awayScore]}),(0,le.jsxs)("span",{className:"ss-w-mon-side ss-w-mon-side--away",children:[(0,le.jsx)(at,{kind:"team",url:(w=e.awayCrestUrl)!=null?w:void 0,name:(C=e.awayTeamName)!=null?C:void 0}),(0,le.jsx)("span",{className:"ss-w-mon-name",children:e.awayTeamName})]})]}),(o.length>0||l.length>0)&&(0,le.jsxs)("div",{className:"ss-w-mon-scorers",children:[(0,le.jsx)("ul",{className:"ss-w-mon-scorers-col ss-w-mon-scorers-home",children:o.map((f,h)=>(0,le.jsx)("li",{children:f.label},`${f.player}-${h}`))}),(0,le.jsx)("span",{className:"ss-w-mon-scorers-ball","aria-hidden":"true",children:"\u26BD"}),(0,le.jsx)("ul",{className:"ss-w-mon-scorers-col ss-w-mon-scorers-away",children:l.map((f,h)=>(0,le.jsx)("li",{children:f.label},`${f.player}-${h}`))})]}),(0,le.jsx)("div",{className:"ss-w-mon-stats",children:d.map(f=>{let h=f.homeNum+f.awayNum,y=h>0?f.homeNum/h*75:0,A=h>0?f.awayNum/h*75:0,E=tg(f,t),x=qP(f,e.matchId,s.conversationId);return(0,le.jsxs)("div",{className:E?"ss-w-mon-stat ss-w-mon-pstrip":"ss-w-mon-stat",children:[(0,le.jsxs)("div",{className:"ss-w-mon-stat-row",children:[(0,le.jsx)("span",{className:"ss-w-mon-stat-v ss-w-mon-stat-v--home",children:f.homeValue}),(0,le.jsx)("span",{className:"ss-w-mon-stat-l",children:f.label}),(0,le.jsx)("span",{className:"ss-w-mon-stat-v ss-w-mon-stat-v--away",children:f.awayValue})]}),(0,le.jsxs)("div",{className:"ss-w-mon-bar",children:[(0,le.jsx)("b",{className:"ss-w-mon-bar-home",style:{width:`${y}%`}}),(0,le.jsx)("i",{className:"ss-w-mon-bar-away",style:{width:`${A}%`}})]}),f.market&&!f.market.isSuspended&&(0,le.jsxs)("div",{className:E?"ss-w-mon-stat-mkt ss-w-mon-mkt":"ss-w-mon-stat-mkt",children:[(0,le.jsxs)("span",{children:[f.market.marketLabel," \xB7 ",f.market.selectionLabel]}),(0,le.jsxs)("span",{className:"ss-w-mon-stat-mkt-right",children:[typeof f.market.price=="number"&&(0,le.jsx)("span",{className:"ss-w-mon-price",children:f.market.price.toFixed(2)}),(0,le.jsx)(Mo,{selection:x,shownOdds:typeof f.market.price=="number"?f.market.price.toFixed(2):"",marketName:f.market.marketLabel,marketDeveloperName:f.market.marketDeveloperName,slip:s,ui:r})]})]})]},f.label)})}),e.status==="stale"&&(0,le.jsx)("span",{className:"ss-w-mon-asof",children:r.asOf(JP(e.asOfUtc))}),e.momentum.length>0&&(0,le.jsxs)("div",{className:"ss-w-mon-mom",children:[(0,le.jsx)("span",{className:"ss-w-mon-stat-l",children:r.momentumLabel}),(0,le.jsx)(mc,{points:e.momentum,clubIsHome:!0})]}),e.phase==="fullTime"&&(0,le.jsx)("div",{className:"ss-w-mon-grace",children:r.graceNote})]})}var dt=b(I(),1);function KP({m:e,ui:t}){let n=e.phase!=="preMatch"&&typeof e.homeScore=="number",r=e.status==="stale";return!n&&!e.minuteLabel&&!(e.isSuspended&&!e.isSettled)&&!e.isSettled&&!r?null:(0,dt.jsxs)("div",{className:"ss-w-mk-live",children:[n&&(0,dt.jsxs)("b",{className:"ss-w-mk-live-score",children:[e.homeTeamName," ",e.homeScore,"\u2013",e.awayScore," ",e.awayTeamName]}),e.minuteLabel&&(0,dt.jsx)("span",{className:"ss-w-mon-min",children:e.minuteLabel}),e.isSuspended&&!e.isSettled&&(0,dt.jsx)("span",{className:"ss-w-mon-susp",children:t.suspendedLabel}),e.isSettled&&(0,dt.jsx)("span",{className:"ss-w-mon-pill",children:t.fullTimeLabel}),r&&(0,dt.jsx)("span",{className:"ss-w-mon-asof",children:t.asOf(new Date(e.asOfUtc).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}))})]})}function m1({monitor:e,ui:t,slip:n}){var s,a;let r=((a=(s=e.snapshot)==null?void 0:s.matches)!=null?a:[]).filter(i=>e.pins.some(o=>o.kind==="match"&&o.matchId===i.matchId));return r.length===0?(0,dt.jsx)("div",{className:"ss-w-mon-empty",children:t.emptyMatchesTab}):(0,dt.jsx)("div",{className:"ss-w-mon-list",children:r.map(i=>(0,dt.jsxs)("div",{className:"ss-w-mon-item",children:[(0,dt.jsx)(p1,{match:i,promotedPins:e.pins.filter(o=>o.kind!=="match"&&o.matchId===i.matchId),monitor:e,ui:t,slip:n}),(0,dt.jsx)(c1,{match:i,monitor:e,ui:t,slip:n})]},i.matchId))})}function YP(e,t){let n=e.mainRows[0];if(t===void 0||!n||n.oddsDecimal===void 0||n.oddsDecimal===t)return e;let r={...n,previousOdds:t.toFixed(2),movementDirection:n.oddsDecimal<t?"shortened":"drifted"};return{...e,mainRows:[r,...e.mainRows.slice(1)]}}function f1({monitor:e,ui:t,slip:n}){var s,a;let r=((a=(s=e.snapshot)==null?void 0:s.markets)!=null?a:[]).filter(i=>e.pins.some(o=>o.key===i.key));return r.length===0?(0,dt.jsx)("div",{className:"ss-w-mon-empty",children:t.emptyOddsTab}):(0,dt.jsx)("div",{className:"ss-w-mon-list",children:r.map(i=>{let o=e.pins.find(l=>l.key===i.key);return(0,dt.jsxs)("div",{className:"ss-w-mon-oddspin","data-settled":i.isSettled||void 0,children:[(0,dt.jsx)(KP,{m:i,ui:t}),i.card&&(0,dt.jsx)(ni,{cards:[YP(Ua(i.card),e.lastViewedPrices[i.key])],ui:t,slip:n,monitor:e,pinRef:o!=null?o:void 0,inSlipIds:e.inSlip}),i.history&&(0,dt.jsx)(uc,{cards:[xu(i.history)],ui:t}),!i.card&&!i.history&&(0,dt.jsx)("div",{className:"ss-w-mon-empty-card",children:t.oddsUnavailable})]},i.key)})})}var Dn=b(I(),1);function $P(e){let t=new Date(e*1e3);return`${`${t.getHours()}`.padStart(2,"0")}:${`${t.getMinutes()}`.padStart(2,"0")}`}function g1({name:e,crest:t,away:n=!1}){return(0,Dn.jsxs)("span",{className:n?"ss-w-drow-side ss-w-drow-side--away":"ss-w-drow-side",children:[t?(0,Dn.jsx)("img",{className:"ss-w-drow-crest",src:t,alt:""}):null,(0,Dn.jsx)("span",{className:"ss-w-drow-nm",children:e})]})}function fc({match:e,state:t,stale:n,ui:r,monitor:s}){var u;let a=(t==null?void 0:t.phase)==="live"&&!n,i=((t==null?void 0:t.phase)==="live"||(t==null?void 0:t.phase)==="fullTime")&&typeof t.homeScore=="number"&&typeof t.awayScore=="number",o=(t==null?void 0:t.phase)==="live"&&(u=t.minuteLabel)!=null?u:null,l=t!=null&&t.isHalfTime&&!n?r.halfTime:a?o!=null?o:"\u2014":(t==null?void 0:t.phase)==="live"?"\u2014":$P(e.kickoffUnix);return(0,Dn.jsxs)("div",{className:a||t!=null&&t.isHalfTime?"ss-w-drow ss-w-drow--live":"ss-w-drow",children:[(0,Dn.jsx)("span",{className:a||t!=null&&t.isHalfTime?"ss-w-drow-when ss-w-drow-when--live":"ss-w-drow-when",children:l}),(0,Dn.jsxs)("span",{className:"ss-w-drow-fx",children:[(0,Dn.jsx)(g1,{name:e.homeTeamName,crest:e.homeTeamImagePath}),(0,Dn.jsx)("span",{className:i?"ss-w-drow-sc":"ss-w-drow-sc ss-w-drow-sc--idle",children:i?`${t.homeScore}\u2013${t.awayScore}`:"\u2013"}),(0,Dn.jsx)(g1,{name:e.awayTeamName,crest:e.awayTeamImagePath,away:!0})]}),(0,Dn.jsx)(ln,{ui:r,monitor:s,pin:{kind:"match",matchId:e.matchId}})]})}var $n=b(I(),1);function h1({group:e,open:t,onToggle:n,states:r,stale:s,ui:a,monitor:i,disambiguate:o=!1}){let l=e.matches.filter(c=>!vu(r[c.matchId],s)),u=l.length!==e.matches.length;return l.length===0?null:(0,$n.jsxs)("div",{className:"ss-w-grp",children:[(0,$n.jsxs)("button",{type:"button",className:"ss-w-grp-head","aria-expanded":t,onClick:n,children:[(0,$n.jsx)("span",{className:"ss-w-grp-chev",children:t?"\u25BE":"\u25B8"}),u&&(0,$n.jsx)("span",{className:"ss-w-sec-dot","aria-hidden":"true"}),(0,$n.jsxs)("span",{className:"ss-w-grp-name",children:[e.competitionName,o&&e.competitionCountry?(0,$n.jsxs)("span",{className:"ss-w-grp-country",children:[" (",e.competitionCountry,")"]}):null]}),(0,$n.jsx)("span",{className:"ss-w-grp-count",children:l.length})]}),t&&(0,$n.jsx)("div",{className:"ss-w-grp-body",children:l.map(c=>(0,$n.jsx)(fc,{match:c,state:r[c.matchId],stale:s,ui:a,monitor:i},c.matchId))})]})}var zn=b(I(),1);function w1({discovery:e,ui:t,monitor:n}){let{groups:r,states:s,stale:a,expanded:i,toggleGroup:o}=e,l=Qa(r,s),u=a?[]:l.flatMap(d=>d.matches.filter(p=>vu(s[p.matchId],a)).map(p=>({match:p,rank:d.rank}))).sort((d,p)=>d.rank-p.rank),c=l.reduce((d,p)=>{var m;return d[p.competitionName]=((m=d[p.competitionName])!=null?m:0)+1,d},{});return(0,zn.jsxs)("div",{className:"ss-w-mon-list",children:[a&&(0,zn.jsx)("div",{className:"ss-w-stale",children:t.staleStates}),u.length>0&&(0,zn.jsxs)(zn.Fragment,{children:[(0,zn.jsxs)("div",{className:"ss-w-sec-head",children:[(0,zn.jsx)("span",{className:"ss-w-sec-dot","aria-hidden":"true"}),t.sectionLive]}),(0,zn.jsx)("div",{className:"ss-w-today-live",children:u.map(({match:d})=>(0,zn.jsx)(fc,{match:d,state:s[d.matchId],stale:a,ui:t,monitor:n},d.matchId))})]}),l.map(d=>{var p,m;return(0,zn.jsx)(h1,{group:d,open:(p=i[d.competitionId])!=null?p:d.expandedByDefault,onToggle:()=>o(d.competitionId),disambiguate:((m=c[d.competitionName])!=null?m:0)>1,states:s,stale:a,ui:t,monitor:n},d.competitionId)})]})}var Pc=b(se(),1);var gc=b(I(),1);function hc({ui:e}){return(0,gc.jsx)("div",{className:"ss-w-mon-list",children:(0,gc.jsx)("div",{className:"ss-w-games-wall",children:(0,gc.jsx)("p",{children:e.gamesLoginRequired})})})}var kc=b(se(),1);function ZP(e){return e.split("-").map(t=>t&&t[0].toUpperCase()+t.slice(1)).join(" ")}function et(e,t){var n,r;return(r=(n=e.title)!=null?n:t[e.gameId])!=null?r:ZP(e.gameId)}function zt(e){var n;let t=e.trim().split(/\s+/).filter(Boolean);return t.length<=1?{first:"",last:(n=t[0])!=null?n:""}:{first:t.slice(0,-1).join(" "),last:t[t.length-1]}}var ae=b(I(),1);function yc({gameId:e}){var t;return(0,ae.jsx)("svg",{className:"ss-g-art",viewBox:"0 0 120 74","aria-hidden":"true",children:(t=y1[e])!=null?t:y1.default})}var wc=(e,t,n,r="ss-g-art-fg")=>(0,ae.jsxs)("g",{className:r,children:[(0,ae.jsx)("circle",{cx:e,cy:t-n*.3,r:n*.45}),(0,ae.jsx)("path",{d:`M${e-n} ${t+n}c0-${n*.8} ${n*.45}-${n*1.1} ${n}-${n*1.1}s${n} ${n*.3} ${n} ${n*1.1}z`})]}),y1={"mystery-tiger":(0,ae.jsxs)(ae.Fragment,{children:[wc(60,38,26,"ss-g-art-fg"),(0,ae.jsx)("text",{x:"60",y:"36",className:"ss-g-art-q",textAnchor:"middle",children:"?"})]}),"higher-or-lower":(0,ae.jsxs)(ae.Fragment,{children:[wc(32,38,20),wc(88,38,20),(0,ae.jsx)("circle",{cx:"60",cy:"37",r:"11",className:"ss-g-art-accent"}),(0,ae.jsx)("path",{d:"M57 33l3-3 3 3M57 41l3 3 3-3",className:"ss-g-art-ink"})]}),"guess-the-xi":(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)("rect",{x:"8",y:"4",width:"104",height:"66",rx:"6",className:"ss-g-art-pitch"}),[[60,60,"a"],[24,46],[48,46],[72,46],[96,46],[36,30],[60,30],[84,30],[40,14],[60,14],[80,14]].map(([e,t,n],r)=>(0,ae.jsx)("circle",{cx:e,cy:t,r:"4",className:n?"ss-g-art-accent":"ss-g-art-dot"},r))]}),"daily-quiz":(0,ae.jsx)(ae.Fragment,{children:[[14,8],[62,8],[14,40],[62,40]].map(([e,t],n)=>(0,ae.jsx)("rect",{x:e,y:t,width:"44",height:"26",rx:"5",className:n===1?"ss-g-art-correct":"ss-g-art-block"},n))}),"career-path":(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)("path",{d:"M18 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z",className:"ss-g-art-fg"}),(0,ae.jsx)("path",{d:"M48 37h8M84 37h8",className:"ss-g-art-line"}),(0,ae.jsx)("path",{d:"M60 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z",className:"ss-g-art-fg"}),(0,ae.jsx)("rect",{x:"96",y:"22",width:"18",height:"26",rx:"4",className:"ss-g-art-dash"}),(0,ae.jsx)("text",{x:"105",y:"40",className:"ss-g-art-q",textAnchor:"middle",children:"?"})]}),"beat-the-grid":(0,ae.jsx)(ae.Fragment,{children:[0,1,2].flatMap(e=>[0,1,2].map(t=>(0,ae.jsx)("rect",{x:33+t*19,y:10+e*19,width:"16",height:"16",rx:"3",className:(e+t)%3===0?"ss-g-art-accent":"ss-g-art-block"},`${e}${t}`)))}),"matchday-predictor":(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)("path",{d:"M10 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z",className:"ss-g-art-fg"}),(0,ae.jsx)("rect",{x:"38",y:"22",width:"18",height:"24",rx:"4",className:"ss-g-art-accent-stroke"}),(0,ae.jsx)("rect",{x:"64",y:"22",width:"18",height:"24",rx:"4",className:"ss-g-art-dash"}),(0,ae.jsx)("path",{d:"M90 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z",className:"ss-g-art-fg"})]}),"starting-xi":(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)("rect",{x:"8",y:"4",width:"104",height:"66",rx:"6",className:"ss-g-art-pitch"}),[[60,60],[30,46],[50,46],[70,46],[90,46],[45,30],[75,30],[30,16],[60,16],[90,16]].map(([e,t],n)=>(0,ae.jsx)("circle",{cx:e,cy:t,r:"5",className:n<7?"ss-g-art-accent":"ss-g-art-dash"},n))]}),"stat-ladder":(0,ae.jsx)(ae.Fragment,{children:[[20,70],[34,52],[48,34]].map(([e,t],n)=>(0,ae.jsx)("rect",{x:"24",y:e,width:t,height:"12",rx:"3",className:n===1?"ss-g-art-accent":"ss-g-art-block"},n))}),"fan-motm":(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)("circle",{cx:"60",cy:"37",r:"26",className:"ss-g-art-accent-stroke"}),wc(60,40,18),(0,ae.jsx)("path",{d:"M84 8l2.4 5 5.4.6-4 3.7 1.1 5.4-4.9-2.7-4.9 2.7 1.1-5.4-4-3.7 5.4-.6z",className:"ss-g-art-accent"})]}),default:(0,ae.jsx)("circle",{cx:"60",cy:"37",r:"22",className:"ss-g-art-fg"})};var ui=b(I(),1);function Te({variant:e="neutral",icon:t,children:n,className:r}){return(0,ui.jsxs)("span",{className:`ss-g-chip ss-g-chip--${e}${r?` ${r}`:""}`,children:[t,n]})}function x1({value:e,label:t}){return(0,ui.jsxs)("span",{className:"ss-g-statstack",children:[(0,ui.jsx)("span",{className:"ss-g-statstack-v",children:e}),(0,ui.jsx)("span",{className:"ss-g-statstack-l",children:t})]})}var qe=b(I(),1),Ot=(e,t,n=!1)=>(0,qe.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:n?"currentColor":"none",stroke:n?"none":"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:t}),xc=({size:e=20})=>Ot(e,(0,qe.jsx)("path",{d:"M15 18l-6-6 6-6"})),Ur=({size:e=14})=>Ot(e,[(0,qe.jsx)("rect",{x:"5",y:"11",width:"14",height:"10",rx:"2"},"a"),(0,qe.jsx)("path",{d:"M8 11V7a4 4 0 0 1 8 0v4"},"b")]),bn=({size:e=14})=>Ot(e,(0,qe.jsx)("path",{d:"M5 12l5 5 9-10"})),bs=({size:e=16})=>Ot(e,(0,qe.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})),v1=({size:e=18})=>Ot(e,[(0,qe.jsx)("circle",{cx:"11",cy:"11",r:"7"},"a"),(0,qe.jsx)("path",{d:"M20 20l-3.5-3.5"},"b")]),sa=({size:e=20})=>Ot(e,(0,qe.jsx)("path",{d:"M12 5v14M5 12h14"}));var vc=({size:e=16})=>Ot(e,[(0,qe.jsx)("path",{d:"M9 18h6M10 21h4"},"a"),(0,qe.jsx)("path",{d:"M12 3a6 6 0 0 0-3.5 10.9V16h7v-2.1A6 6 0 0 0 12 3z"},"b")]),b1=({size:e=12})=>Ot(e,(0,qe.jsx)("path",{d:"M12 19V5M5 12l7-7 7 7"})),k1=({size:e=12})=>Ot(e,(0,qe.jsx)("path",{d:"M12 5v14M19 12l-7 7-7-7"})),C1=({size:e=18})=>Ot(e,[(0,qe.jsx)("rect",{x:"4",y:"5",width:"16",height:"15",rx:"2"},"a"),(0,qe.jsx)("path",{d:"M4 10h16M9 3v4M15 3v4"},"b")]),bc=({size:e=18})=>Ot(e,(0,qe.jsx)("path",{d:"M12 3l7 3v6c0 5-3 8-7 9-4-1-7-4-7-9V6z"})),S1=({size:e=18})=>Ot(e,(0,qe.jsx)("path",{d:"M5 21V4M5 4h12l-2 4 2 4H5"})),A1=({size:e=18})=>Ot(e,[(0,qe.jsx)("circle",{cx:"12",cy:"12",r:"9"},"a"),(0,qe.jsx)("path",{d:"M12 7l4 3-1.5 4.5h-5L8 10z"},"b")]),E1=({size:e=18})=>Ot(e,(0,qe.jsx)("path",{d:"M4 6h6l1 6 8 3v3H4z"})),I1=({size:e=18})=>Ot(e,(0,qe.jsx)("path",{d:"M7 21v-8l-2-3V6a1.5 1.5 0 0 1 3 0v3V4a1.5 1.5 0 0 1 3 0v5V3.5a1.5 1.5 0 0 1 3 0V9V5a1.5 1.5 0 0 1 3 0v9l-2 3v4z"})),N1=({size:e=16})=>Ot(e,(0,qe.jsx)("path",{d:"M12 3c1 4 5 5 5 10a5 5 0 0 1-10 0c0-3 2-4 2-7 1.5 1 2 2 2 3 1-2 1-4 1-6z"}),!0);var Se=b(I(),1);function e2(e,t){var n,r;switch(e.status){case"locked":return{text:t.gameLocked,tone:"muted"};case"voided":return{text:t.gameVoided,tone:"muted"};case"in_progress":return{text:t.games.resume,tone:"accent"};case"played":case"graded":return e.ranked?{text:t.games.doneWithScore((n=e.score)!=null?n:0),tone:"success"}:{text:t.games.done,tone:"success"};default:return e.kind==="fixture"&&e.lockAtUtc&&new Date(e.lockAtUtc).getTime()>Date.now()?{text:t.games.locksAt(t.games.formatDayTime(e.lockAtUtc)),tone:"accent"}:{text:(r=t.games.taglines[e.gameId])!=null?r:t.gamePlay,tone:"new"}}}var t2=new Set(["locked","voided"]);function Do({game:e,onOpen:t,ui:n,variant:r="tile"}){var u;let s=e2(e,n),a=t2.has(e.status),i=et(e,n.games.titles),o=r==="hero"?(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsxs)("span",{className:"ss-g-hero-text",children:[(0,Se.jsx)("span",{className:"ss-g-hero-eyebrow",children:n.games.dailyChallenge}),s.tone==="new"&&(0,Se.jsx)(Te,{variant:"badge",children:n.games.newToday}),(0,Se.jsx)("span",{className:"ss-g-hero-title",children:i}),(0,Se.jsx)("span",{className:"ss-g-hero-sub",children:(u=n.games.taglines[e.gameId])!=null?u:""}),s.tone==="success"?(0,Se.jsx)("span",{className:"ss-g-tile-status","data-tone":"success",children:s.text}):(0,Se.jsxs)("span",{className:"ss-g-hero-cta",children:[s.tone==="accent"?n.games.resume:n.games.playNow," \u2192"]})]}),(0,Se.jsx)("span",{className:"ss-g-hero-art",children:(0,Se.jsx)(yc,{gameId:e.gameId})})]}):r==="wide"?(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)("span",{className:"ss-g-wide-art",children:(0,Se.jsx)(yc,{gameId:e.gameId})}),(0,Se.jsxs)("span",{className:"ss-g-wide-text",children:[(0,Se.jsx)("span",{className:"ss-g-tile-title",children:i}),(0,Se.jsx)("span",{className:"ss-g-tile-status","data-tone":s.tone,children:s.text}),s.tone==="new"&&(0,Se.jsx)(Te,{variant:"badge",children:n.games.newToday})]}),(0,Se.jsx)("span",{className:"ss-g-wide-chev",children:(0,Se.jsx)(xc,{size:18})})]}):(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)("span",{className:"ss-g-tile-art",children:(0,Se.jsx)(yc,{gameId:e.gameId})}),(0,Se.jsx)("span",{className:"ss-g-tile-title",children:i}),(0,Se.jsx)("span",{className:"ss-g-tile-status","data-tone":s.tone,children:s.text})]}),l=`ss-g-tile ss-g-tile--${r}`;return a?(0,Se.jsx)("div",{className:l,"data-disabled":!0,"aria-disabled":"true",children:o}):(0,Se.jsx)("button",{type:"button",className:l,"aria-label":`${i} \u2014 ${s.text}`,onClick:()=>t(e),children:o})}var be=b(I(),1),T1=new Set(["available","in_progress"]),n2=new Set(["played","graded"]);function r2(e){var s;let t=e.filter(a=>a.kind==="daily"),n=t.find(a=>a.gameId==="mystery-tiger");if(n&&T1.has(n.status))return n;let r=t.find(a=>T1.has(a.status));return r||((s=n!=null?n:t[0])!=null?s:null)}var L1=e=>`${e.gameId}-${e.gameDay}-${e.fixtureId}`;function P1({games:e,myWeeklyRow:t,weeklyPrize:n,onOpen:r,ui:s}){let[,a]=(0,kc.useState)(0);(0,kc.useEffect)(()=>{let g=setInterval(()=>a(w=>w+1),6e4);return()=>clearInterval(g)},[]);let i=r2(e),o=e.filter(g=>g.kind==="daily"&&g!==i),l=o.filter(g=>g.gameId!=="beat-the-grid"),u=o.find(g=>g.gameId==="beat-the-grid"),c=e.filter(g=>g.kind==="fixture"),d=c.map(g=>g.kickoffUtc).filter(g=>!!g).sort(),p=e.filter(g=>n2.has(g.status)).reduce((g,w)=>{var C;return g+((C=w.score)!=null?C:0)},0),m="\u2014";return(0,be.jsxs)("div",{className:"ss-g-hub",children:[(0,be.jsxs)("div",{className:"ss-g-stats",children:[(0,be.jsxs)("div",{className:"ss-g-stat",children:[(0,be.jsx)("span",{className:"ss-g-stat-l",children:s.games.statStreak}),(0,be.jsxs)("span",{className:"ss-g-stat-v","data-testid":"stat-streak",children:[t?(0,be.jsxs)(be.Fragment,{children:[(0,be.jsx)(N1,{}),t.currentStreak]}):m,t&&(0,be.jsx)("small",{children:s.games.unitDays})]})]}),(0,be.jsxs)("div",{className:"ss-g-stat",children:[(0,be.jsx)("span",{className:"ss-g-stat-l",children:s.games.statToday}),(0,be.jsxs)("span",{className:"ss-g-stat-v ss-g-stat-v--accent","data-testid":"stat-today",children:[s.games.formatPts(p),(0,be.jsx)("small",{children:s.games.unitPts})]})]}),(0,be.jsxs)("div",{className:"ss-g-stat",children:[(0,be.jsx)("span",{className:"ss-g-stat-l",children:s.games.statRank}),(0,be.jsxs)("span",{className:"ss-g-stat-v","data-testid":"stat-rank",children:[t?`#${t.rank}`:m,t&&(0,be.jsx)("small",{children:s.games.thisWeek})]})]})]}),n&&(0,be.jsx)(Te,{variant:"accent",className:"ss-g-prize",children:n}),i&&(0,be.jsx)(Do,{game:i,onOpen:r,ui:s,variant:"hero"}),(l.length>0||u)&&(0,be.jsxs)("section",{className:"ss-g-sec",children:[(0,be.jsxs)("div",{className:"ss-g-sec-head",children:[(0,be.jsx)("h3",{children:s.games.dailyGames}),(0,be.jsx)("span",{children:s.games.newSetAtMidnight})]}),l.length>0&&(0,be.jsx)("div",{className:"ss-g-grid",children:l.map(g=>(0,be.jsx)(Do,{game:g,onOpen:r,ui:s},L1(g)))}),u&&(0,be.jsx)(Do,{game:u,onOpen:r,ui:s,variant:"wide"})]}),c.length>0&&(0,be.jsxs)("section",{className:"ss-g-sec",children:[(0,be.jsxs)("div",{className:"ss-g-sec-head",children:[(0,be.jsx)("h3",{children:s.games.matchdayGames}),d[0]&&(0,be.jsx)("span",{children:s.games.kickoffAt(s.games.formatDayTime(d[0]))})]}),(0,be.jsx)("div",{className:"ss-g-grid",children:c.map(g=>(0,be.jsx)(Do,{game:g,onOpen:r,ui:s},L1(g)))})]})]})}var As=b(se(),1);var kn=b(se(),1);function s2(e){return{alreadyPlayed:e.status==="played"||e.status==="graded"||e.status==="pending",score:e.score,isCorrect:e.isCorrect,clientStateJson:e.clientStateJson,attemptsUsed:e.attemptsUsed}}function M1(e,{gameId:t,gameDay:n,fixtureId:r,refresh:s}){let[a,i]=(0,kn.useState)(null),[o,l]=(0,kn.useState)(!1),[u,c]=(0,kn.useState)(null),d=(0,kn.useRef)(!1),p=(0,kn.useRef)(e);p.current=e;let m=(0,kn.useRef)({gameId:t,gameDay:n,fixtureId:r,refresh:s});m.current={gameId:t,gameDay:n,fixtureId:r,refresh:s};let g=(0,kn.useRef)(null);g.current=a;let w=(0,kn.useCallback)(async()=>{var A;let h=p.current;if(!h)return;let y=m.current;try{let E=await h.getGameResult(y.gameId,y.fixtureId,y.gameDay);if(E===null)return;if(E.clientStateJson==null&&((A=g.current)==null?void 0:A.clientStateJson)!=null){c(E.status);return}i(s2(E)),c(E.status)}catch{}},[]),C=(0,kn.useCallback)(async h=>{var A,E;let y=p.current;if(!(!y||d.current)){d.current=!0,l(!0);try{let x=m.current,M=await y.postPlay(x.gameId,h,x.gameDay,x.fixtureId);if(M!==null){let P=M.clientStateJson!=null,z=M.alreadyPlayed===!0,S=((A=g.current)==null?void 0:A.clientStateJson)!=null;!P&&!z&&S?await w():i(M),M.pointsDelta!=null&&((E=x.refresh)==null||E.call(x))}}catch{}finally{d.current=!1,l(!1)}}},[w]),f=(0,kn.useCallback)(()=>{w()},[w]);return{result:a,submitting:o,submit:C,hydrate:f,rawStatus:u}}var Ac=b(se(),1);var a2={england:"\u{1F3F4}\u{E0067}\u{E0062}\u{E0065}\u{E006E}\u{E0067}\u{E007F}",scotland:"\u{1F3F4}\u{E0067}\u{E0062}\u{E0073}\u{E0063}\u{E0074}\u{E007F}",wales:"\u{1F3F4}\u{E0067}\u{E0062}\u{E0077}\u{E006C}\u{E0073}\u{E007F}","northern ireland":"\u{1F1EC}\u{1F1E7}","republic of ireland":"\u{1F1EE}\u{1F1EA}",ireland:"\u{1F1EE}\u{1F1EA}","united kingdom":"\u{1F1EC}\u{1F1E7}",france:"\u{1F1EB}\u{1F1F7}",spain:"\u{1F1EA}\u{1F1F8}",portugal:"\u{1F1F5}\u{1F1F9}",germany:"\u{1F1E9}\u{1F1EA}",italy:"\u{1F1EE}\u{1F1F9}",netherlands:"\u{1F1F3}\u{1F1F1}",belgium:"\u{1F1E7}\u{1F1EA}",switzerland:"\u{1F1E8}\u{1F1ED}",austria:"\u{1F1E6}\u{1F1F9}",denmark:"\u{1F1E9}\u{1F1F0}",sweden:"\u{1F1F8}\u{1F1EA}",norway:"\u{1F1F3}\u{1F1F4}",finland:"\u{1F1EB}\u{1F1EE}",iceland:"\u{1F1EE}\u{1F1F8}",poland:"\u{1F1F5}\u{1F1F1}",czechia:"\u{1F1E8}\u{1F1FF}","czech republic":"\u{1F1E8}\u{1F1FF}",croatia:"\u{1F1ED}\u{1F1F7}",serbia:"\u{1F1F7}\u{1F1F8}","bosnia and herzegovina":"\u{1F1E7}\u{1F1E6}",greece:"\u{1F1EC}\u{1F1F7}",romania:"\u{1F1F7}\u{1F1F4}",ukraine:"\u{1F1FA}\u{1F1E6}",russia:"\u{1F1F7}\u{1F1FA}",hungary:"\u{1F1ED}\u{1F1FA}",slovakia:"\u{1F1F8}\u{1F1F0}",slovenia:"\u{1F1F8}\u{1F1EE}",turkey:"\u{1F1F9}\u{1F1F7}",t\u00FCrkiye:"\u{1F1F9}\u{1F1F7}",albania:"\u{1F1E6}\u{1F1F1}","north macedonia":"\u{1F1F2}\u{1F1F0}",brazil:"\u{1F1E7}\u{1F1F7}",argentina:"\u{1F1E6}\u{1F1F7}",uruguay:"\u{1F1FA}\u{1F1FE}",colombia:"\u{1F1E8}\u{1F1F4}",chile:"\u{1F1E8}\u{1F1F1}",peru:"\u{1F1F5}\u{1F1EA}",ecuador:"\u{1F1EA}\u{1F1E8}",paraguay:"\u{1F1F5}\u{1F1FE}",mexico:"\u{1F1F2}\u{1F1FD}","united states":"\u{1F1FA}\u{1F1F8}",usa:"\u{1F1FA}\u{1F1F8}",canada:"\u{1F1E8}\u{1F1E6}",jamaica:"\u{1F1EF}\u{1F1F2}",nigeria:"\u{1F1F3}\u{1F1EC}",ghana:"\u{1F1EC}\u{1F1ED}",senegal:"\u{1F1F8}\u{1F1F3}",ivorycoast:"\u{1F1E8}\u{1F1EE}","cote d'ivoire":"\u{1F1E8}\u{1F1EE}","ivory coast":"\u{1F1E8}\u{1F1EE}",cameroon:"\u{1F1E8}\u{1F1F2}",egypt:"\u{1F1EA}\u{1F1EC}",morocco:"\u{1F1F2}\u{1F1E6}",algeria:"\u{1F1E9}\u{1F1FF}",tunisia:"\u{1F1F9}\u{1F1F3}",mali:"\u{1F1F2}\u{1F1F1}","south africa":"\u{1F1FF}\u{1F1E6}","dr congo":"\u{1F1E8}\u{1F1E9}",japan:"\u{1F1EF}\u{1F1F5}","south korea":"\u{1F1F0}\u{1F1F7}",korea:"\u{1F1F0}\u{1F1F7}",australia:"\u{1F1E6}\u{1F1FA}","saudi arabia":"\u{1F1F8}\u{1F1E6}",iran:"\u{1F1EE}\u{1F1F7}","new zealand":"\u{1F1F3}\u{1F1FF}"};function Cc(e){var n;if(!e)return"\u{1F3F3}\uFE0F";let t=e.trim().toLowerCase();return(n=a2[t])!=null?n:e.slice(0,3).toUpperCase()}var R1=b(se(),1),Sc=b(I(),1);function i2(e){var s,a;let t=e.trim().split(/\s+/).filter(Boolean),n=t[0];if(!n)return"?";let r=t[t.length-1];return t.length===1||!r?n.slice(0,2).toUpperCase():(((s=n[0])!=null?s:"")+((a=r[0])!=null?a:"")).toUpperCase()}function Bt({name:e,imagePath:t,className:n}){let[r,s]=(0,R1.useState)(!1);return(0,Sc.jsx)("div",{className:n,"aria-hidden":"true",children:!!t&&!r?(0,Sc.jsx)("img",{src:t,alt:"",loading:"lazy",onError:()=>s(!0)}):(0,Sc.jsx)("span",{className:"ss-w-av-initials",children:i2(e)})})}var Qr=b(I(),1);function Oe({title:e,eyebrow:t,right:n,onBack:r,backLabel:s}){return(0,Qr.jsxs)("div",{className:"ss-g-head",children:[r&&(0,Qr.jsx)("button",{type:"button",className:"ss-g-back","aria-label":s,onClick:r,children:(0,Qr.jsx)(xc,{})}),(0,Qr.jsxs)("div",{className:"ss-g-head-text",children:[t&&(0,Qr.jsx)("span",{className:"ss-g-eyebrow",children:t}),(0,Qr.jsx)("h2",{className:"ss-g-title",children:e})]}),n&&(0,Qr.jsx)("div",{className:"ss-g-head-right",children:n})]})}var Hr=b(I(),1);function Gr({segments:e,ariaLabel:t,leftLabel:n,rightLabel:r,right:s}){return(0,Hr.jsxs)("div",{className:"ss-g-progress",children:[(0,Hr.jsxs)("div",{className:"ss-g-progress-main",children:[(n||r)&&(0,Hr.jsxs)("div",{className:"ss-g-progress-labels",children:[(0,Hr.jsx)("span",{children:n}),(0,Hr.jsx)("span",{className:"ss-g-progress-rl",children:r})]}),(0,Hr.jsx)("div",{className:"ss-g-segs",role:"img","aria-label":t,style:{gridTemplateColumns:`repeat(${e.length}, minmax(0, 1fr))`},children:e.map((a,i)=>(0,Hr.jsx)("span",{className:"ss-g-seg","data-state":a},i))})]}),s]})}var aa=b(I(),1);function cn({id:e,label:t,labelHidden:n=!1,placeholder:r,value:s,onChange:a,disabled:i,inputRef:o,onKeyDown:l}){return(0,aa.jsxs)("div",{className:"ss-g-search",children:[(0,aa.jsx)("label",{htmlFor:e,className:n?"ss-g-sr":"ss-g-search-label",children:t}),(0,aa.jsxs)("div",{className:"ss-g-search-box",children:[(0,aa.jsx)(v1,{}),(0,aa.jsx)("input",{id:e,ref:o,type:"text",autoComplete:"off",placeholder:r,value:s,disabled:i,onKeyDown:l,onChange:u=>a(u.target.value)})]})]})}var D1=b(I(),1);function pt({children:e}){return(0,D1.jsx)("div",{className:"ss-g-footer",children:e})}var ia=b(I(),1);function On({size:e,variant:t="default"}){return(0,ia.jsxs)("span",{className:`ss-g-sil ss-g-sil--${t}`,style:{width:e,height:e},"aria-hidden":"true",children:[(0,ia.jsxs)("svg",{width:e*.86,height:e*.86,viewBox:"0 0 100 100",children:[(0,ia.jsx)("circle",{cx:"50",cy:"40",r:"19",fill:"currentColor"}),(0,ia.jsx)("path",{d:"M12 100c0-23 17-38 38-38s38 15 38 38z",fill:"currentColor"})]}),t==="mystery"&&(0,ia.jsx)("span",{className:"ss-g-sil-q",children:"?"})]})}var z1=b(I(),1);function Jt({variant:e="primary",block:t=!1,className:n,type:r="button",...s}){let a=`ss-g-btn ss-g-btn--${e}${t?" ss-g-btn--block":""}${n?` ${n}`:""}`;return(0,z1.jsx)("button",{type:r,className:a,...s})}var ks=b(I(),1);function it({tone:e,title:t,score:n,detail:r,onBack:s,ui:a}){return(0,ks.jsxs)("div",{className:"ss-g-result","data-tone":e,role:"status",children:[(0,ks.jsx)("span",{className:"ss-g-result-title",children:t}),n!==void 0&&(0,ks.jsxs)("span",{className:"ss-g-result-score",children:[(0,ks.jsx)("span",{className:"ss-g-result-num",children:n}),a.games.unitPts]}),r&&(0,ks.jsx)("span",{className:"ss-g-result-detail",children:r}),s&&(0,ks.jsx)(Jt,{variant:"outline",onClick:s,children:a.games.backToGames})]})}var ng=b(I(),1);function Cs({label:e,options:t,onPick:n}){return(0,ng.jsx)("div",{className:"ss-g-opts",role:"listbox","aria-label":e,children:t.map(r=>(0,ng.jsx)("button",{type:"button",role:"option","aria-selected":!1,className:"ss-g-opt",onClick:()=>n(r.key),children:r.content},r.key))})}var ee=b(I(),1);function o2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}var l2=["position","nationality","age","shirtNumber","apps"],u2=new Set(["age","shirtNumber","apps"]),c2=6;function d2(e){return e.verdict==="exact"?"\u2713":e.verdict==="miss"?"\u2717":e.direction==="up"?"\u2191":e.direction==="down"?"\u2193":"\u2248"}function p2(e){return e.direction==="up"?"\u25B2":e.direction==="down"?"\u25BC":""}var m2={goalkeeper:"GK",keeper:"GK",defender:"DEF","centre back":"CB","center back":"CB","centre-back":"CB","center-back":"CB","left back":"LB","right back":"RB","left wing-back":"LWB","right wing-back":"RWB",sweeper:"SW",midfielder:"MID","defensive midfield":"DM","central midfield":"CM","centre midfield":"CM","attacking midfield":"AM","left midfield":"LM","right midfield":"RM","left wing":"LW","right wing":"RW","left winger":"LW","right winger":"RW",forward:"FWD",attacker:"FWD",striker:"ST","second striker":"SS","centre forward":"CF","center forward":"CF","centre-forward":"CF"};function f2(e){let t=m2[e.trim().toLowerCase()];return t||(e.length<=3?e.toUpperCase():e.split(/[\s-]+/).filter(Boolean).map(n=>{var r;return((r=n[0])!=null?r:"").toUpperCase()}).join("").slice(0,3))}function O1(e,t){return t.value?e==="nationality"?Cc(t.value):e==="position"?f2(t.value):t.value:d2(t)}function g2(e,t){return t.map(n=>{let r=e.find(i=>i[n].verdict==="exact");if(r)return{key:n,state:"known",text:O1(n,r[n])};if(!u2.has(n))return{key:n,state:"unknown",text:"?"};let s=null,a=null;for(let i of e){let o=i[n];if(!o.value||!o.direction)continue;let l=Number(o.value);Number.isFinite(l)&&(o.direction==="up"?s=s===null?l:Math.max(s,l):a=a===null?l:Math.min(a,l))}if(s!==null&&a!==null){let i=s+1,o=a-1;return{key:n,state:"range",text:i>=o?String(i):`${i}\u2013${o}`}}return a!==null?{key:n,state:"range",text:`< ${a}`}:s!==null?{key:n,state:"range",text:`> ${s}`}:{key:n,state:"unknown",text:"?"}})}function B1({config:e,result:t,submitting:n,onSubmit:r,ui:s,onBack:a}){var S,V,H,N,T;let i=s.games.mysteryTiger,[o,l]=(0,Ac.useState)(""),u=(0,Ac.useId)(),c=o2(t==null?void 0:t.clientStateJson),d=(S=c==null?void 0:c.guessResults)!=null?S:[],p=new Set(d.map(L=>L.playerId)),m=(H=(V=e==null?void 0:e.shirtTileEnabled)!=null?V:c==null?void 0:c.shirtTileEnabled)!=null?H:!1,g=l2.filter(L=>L!=="shirtNumber"||m),w=(t==null?void 0:t.alreadyPlayed)===!0||(c==null?void 0:c.solved)===!0||(c==null?void 0:c.failed)===!0,C=(N=c==null?void 0:c.guessesUsed)!=null?N:d.length,f=c?c.guessesUsed+c.guessesRemaining:c2,h=(T=t==null?void 0:t.score)!=null?T:0,y=w?c==null?void 0:c.revealedPlayerName:void 0,A=e&&!w?e.squadPlayers.filter(L=>!p.has(L.id)&&L.name.toLowerCase().includes(o.toLowerCase())):[];function E(L){if(!e||w||n)return;let D=[...d.map(G=>G.playerId),L];l(""),r(JSON.stringify({guesses:D}))}let x=e?w?(0,ee.jsxs)(Te,{variant:"accent",children:[h," ",s.games.unitPts]}):(0,ee.jsx)("span",{"data-testid":"mt-chip",children:(0,ee.jsxs)(Te,{children:[s.games.guess," ",(0,ee.jsx)("span",{className:"ss-g-num",children:C+1})," / ",f]})}):void 0,M=Array.from({length:f},(L,O)=>O<C?"done":O===C?"current":"todo"),P={gridTemplateColumns:`minmax(0, 1fr) repeat(${g.length}, 42px)`},z=g2(d,g);return(0,ee.jsxs)("div",{className:"ss-g-screen ss-g-mt","data-testid":"game-screen-mystery-tiger",children:[(0,ee.jsx)(Oe,{title:et({gameId:"mystery-tiger"},s.games.titles),eyebrow:i.eyebrow,right:x,onBack:a,backLabel:s.back}),!e&&(0,ee.jsx)("div",{className:"ss-g-body ss-g-loading",children:s.games.loading}),e&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsxs)("div",{className:"ss-g-body",children:[(0,ee.jsxs)("div",{className:`ss-g-mt-card${w?" ss-g-mt-card--reveal":""}`,children:[(0,ee.jsxs)("div",{className:"ss-g-mt-portrait",children:[y?(0,ee.jsx)(Bt,{className:"ss-g-mt-photo",name:y,imagePath:c==null?void 0:c.revealedPlayerImagePath}):(0,ee.jsx)(On,{size:150,variant:"mystery"}),y&&(0,ee.jsx)("span",{className:"ss-g-mt-reveal-name",children:y})]}),(0,ee.jsx)("div",{className:"ss-g-mt-known",style:{gridTemplateColumns:`repeat(${g.length}, minmax(0, 1fr))`},children:z.map(L=>(0,ee.jsxs)("div",{className:"ss-g-mt-known-cell",children:[(0,ee.jsx)("span",{className:"ss-g-mt-lab",children:i.labels[L.key]}),(0,ee.jsx)("span",{className:"ss-g-mt-known-v","data-state":L.state,"data-testid":`known-${L.key}`,children:L.text})]},L.key))})]}),!w&&(0,ee.jsx)(Gr,{segments:M,ariaLabel:i.progress(C,f)}),d.length>0&&(0,ee.jsxs)("div",{className:"ss-g-mt-table",children:[(0,ee.jsxs)("div",{className:"ss-g-mt-thead",style:P,children:[(0,ee.jsx)("span",{children:i.yourGuesses}),g.map(L=>(0,ee.jsx)("span",{children:i.labels[L]},L))]}),d.map((L,O)=>{var v,Be;let D=(Be=(v=e.squadPlayers.find(Le=>Le.id===L.playerId))==null?void 0:v.name)!=null?Be:`#${L.playerId}`,{first:G,last:pe}=zt(D);return(0,ee.jsxs)("div",{className:"ss-g-mt-row",style:P,children:[(0,ee.jsxs)("div",{className:"ss-g-mt-who",children:[(0,ee.jsx)(Bt,{className:"ss-g-mt-av",name:D}),(0,ee.jsxs)("span",{className:"ss-g-mt-names",children:[G&&(0,ee.jsx)("span",{className:"ss-g-mt-first",children:G}),(0,ee.jsx)("span",{className:"ss-g-mt-last",children:pe})]})]}),g.map(Le=>{var Ke;let k=L[Le],Ee=p2(k);return(0,ee.jsxs)("div",{className:"ss-g-mt-cell","data-testid":`verdict-${Le}-${O}`,"data-verdict":k.verdict,"aria-label":`${i.labels[Le]}: ${(Ke=k.value)!=null?Ke:k.verdict}${k.direction?` ${k.direction}`:""}`,children:[(0,ee.jsx)("span",{className:"ss-g-mt-cell-v","aria-hidden":"true",children:O1(Le,k)}),Ee&&(0,ee.jsx)("span",{className:"ss-g-mt-cell-dir","aria-hidden":"true",children:Ee})]},Le)})]},L.playerId)})]}),!w&&(0,ee.jsxs)("div",{className:"ss-g-mt-legend",children:[(0,ee.jsxs)("span",{children:[(0,ee.jsx)("i",{className:"ss-g-mt-sw","data-verdict":"exact"}),i.legendMatch]}),(0,ee.jsxs)("span",{children:[(0,ee.jsx)("i",{className:"ss-g-mt-sw","data-verdict":"near"}),i.legendClose]}),(0,ee.jsxs)("span",{children:["\u25B2 ",i.legendHigher]})]}),(c==null?void 0:c.hintLine)&&!w&&(0,ee.jsxs)("div",{className:"ss-g-mt-hint",children:[(0,ee.jsx)(vc,{}),(0,ee.jsx)("span",{children:c.hintLine})]}),w&&(0,ee.jsx)(it,{tone:c!=null&&c.solved?"win":c!=null&&c.failed?"lose":"neutral",title:c!=null&&c.solved?i.solved:c!=null&&c.failed?i.failed:s.games.alreadyPlayedTitle,score:h,detail:c?i.detail(c.guessesUsed):void 0,onBack:a,ui:s})]}),!w&&(0,ee.jsxs)(pt,{children:[o.length>0&&A.length>0&&(0,ee.jsx)(Cs,{label:i.optionsLabel,options:A.map(L=>({key:L.id,content:(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(Bt,{className:"ss-g-opt-av",name:L.name}),(0,ee.jsx)("span",{children:L.name})]})})),onPick:L=>E(Number(L))}),(0,ee.jsx)(cn,{id:u,label:i.searchLabel,placeholder:i.searchPlaceholder,value:o,onChange:l,disabled:n})]})]})]})}var ce=b(I(),1),h2=10;function w2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function F1({name:e,imagePath:t,highlight:n,children:r}){let{first:s,last:a}=zt(e);return(0,ce.jsxs)("div",{className:`ss-g-hl-card${n?" ss-g-hl-card--b":""}`,children:[(0,ce.jsx)("div",{className:"ss-g-hl-photo-wrap",children:t?(0,ce.jsx)(Bt,{className:"ss-g-hl-photo",name:e,imagePath:t}):(0,ce.jsx)(On,{size:150})}),(0,ce.jsxs)("div",{className:"ss-g-hl-info",children:[s&&(0,ce.jsx)("span",{className:"ss-g-hl-first",children:s}),(0,ce.jsx)("span",{className:"ss-g-hl-surname",children:a}),r]})]})}function U1({config:e,result:t,submitting:n,onSubmit:r,ui:s,onBack:a}){var A,E,x,M,P;let i=s.games.higherOrLower,o=w2(t==null?void 0:t.clientStateJson),l=(A=o==null?void 0:o.answeredPairs)!=null?A:[],u=l.length,c=l.some(z=>!z.wasCorrect),d=e!=null&&u>=e.pairs.length,p=(t==null?void 0:t.alreadyPlayed)===!0||c||d,m=e&&!p&&(E=e.pairs[u])!=null?E:null,g=l.filter(z=>z.wasCorrect).length,w=(M=(x=o==null?void 0:o.score)!=null?x:t==null?void 0:t.score)!=null?M:0,C=(P=o==null?void 0:o.runLength)!=null?P:0,f=l[l.length-1],h=f?e==null?void 0:e.pairs.find(z=>z.pairIndex===f.pairIndex):void 0;function y(z){if(!e||p||n||!m)return;let V=[...l.map(H=>({pairIndex:H.pairIndex,pick:H.pick})),{pairIndex:m.pairIndex,pick:z}];r(JSON.stringify({answers:V}))}return(0,ce.jsxs)("div",{className:"ss-g-screen ss-g-hl","data-testid":"game-screen-higher-or-lower",children:[(0,ce.jsx)(Oe,{title:et({gameId:"higher-or-lower"},s.games.titles),eyebrow:i.eyebrow(h2),right:e?(0,ce.jsx)(x1,{value:C,label:i.streak}):void 0,onBack:a,backLabel:s.back}),!e&&(0,ce.jsx)("div",{className:"ss-g-body ss-g-loading",children:s.games.loading}),e&&(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsxs)("div",{className:"ss-g-body",children:[(0,ce.jsxs)("div",{className:"ss-g-hl-prompt","data-testid":"hol-prompt",children:[(0,ce.jsx)("span",{className:"ss-g-hl-prompt-q",children:i.whoHadMore}),(0,ce.jsx)("span",{className:"ss-g-hl-prompt-stat",children:e.statLabel}),(0,ce.jsx)("span",{className:"ss-g-hl-prompt-season",children:i.season(e.seasonLabel)})]}),m&&(0,ce.jsxs)("div",{className:"ss-g-hl-pair",children:[(0,ce.jsxs)(F1,{name:m.playerAName,imagePath:m.playerAImagePath,children:[(0,ce.jsx)("span",{className:"ss-g-hl-value",children:m.playerAValue}),(0,ce.jsx)("span",{className:"ss-g-hl-stat",children:e.statLabel})]}),(0,ce.jsx)("span",{className:"ss-g-hl-vs","aria-hidden":"true",children:i.vs}),(0,ce.jsx)(F1,{name:m.playerBName,imagePath:m.playerBImagePath,highlight:!0,children:(0,ce.jsxs)("div",{className:"ss-g-hl-btns",children:[(0,ce.jsxs)(Jt,{variant:"primary",disabled:n,onClick:()=>y("higher"),children:[(0,ce.jsx)(b1,{size:16}),i.higher]}),(0,ce.jsxs)(Jt,{variant:"outline",disabled:n,onClick:()=>y("lower"),children:[(0,ce.jsx)(k1,{size:16}),i.lower]})]})})]}),f&&h&&(0,ce.jsxs)("p",{className:"ss-g-hl-feedback","data-testid":"hol-last","data-correct":f.wasCorrect?"true":"false",children:[f.wasCorrect?(0,ce.jsx)(bn,{}):(0,ce.jsx)(bs,{}),i.lastAnswer(zt(h.playerBName).last,f.playerBValue)]}),p&&(0,ce.jsx)(it,{tone:c?"lose":d?"win":"neutral",title:c?i.runOver:d?i.perfectRun:s.games.alreadyPlayedTitle,score:w,detail:o?i.runDetail(g):void 0,onBack:a,ui:s})]}),!p&&(0,ce.jsx)(pt,{children:(0,ce.jsxs)("div",{className:"ss-g-hl-foot",children:[(0,ce.jsx)("div",{className:"ss-g-hl-dots",role:"img","aria-label":i.answersSoFar(u,e.pairs.length),children:e.pairs.map((z,S)=>{let V=l[S];return(0,ce.jsx)("span",{className:"ss-g-hl-dot","data-state":V?V.wasCorrect?"correct":"wrong":"todo"},z.pairIndex)})}),(0,ce.jsxs)("span",{className:"ss-g-hl-pts",children:[(0,ce.jsx)("span",{"data-testid":"hol-score",children:w})," ",(0,ce.jsx)("span",{className:"ss-g-hl-pts-unit",children:s.games.unitPts})]})]})})]})]})}var Ic=b(se(),1);var Q1=b(se(),1),Ec=b(I(),1);function oa({src:e,name:t,size:n=28}){let[r,s]=(0,Q1.useState)(!1);return e&&!r?(0,Ec.jsx)("img",{className:"ss-g-crest",src:e,alt:t,width:n,height:n,loading:"lazy",onError:()=>s(!0)}):(0,Ec.jsx)("svg",{className:"ss-g-crest ss-g-crest--ph",width:n,height:n*32/28,viewBox:"0 0 28 32",role:"img","aria-label":t,children:(0,Ec.jsx)("path",{d:"M2 3h24v12c0 9-6 14-12 17C8 29 2 24 2 15z",fill:"currentColor"})})}var Y=b(I(),1);function y2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function x2(e){return e.startYear?e.endYear&&e.endYear!==e.startYear?`${e.startYear}\u2013${e.endYear}`:String(e.startYear):""}function H1({config:e,result:t,submitting:n,onSubmit:r,onBack:s,ui:a}){var E,x,M;let i=a.games.careerPath,o=et({gameId:"career-path"},a.games.titles),[l,u]=(0,Ic.useState)(""),c=(0,Ic.useId)(),d=y2(t==null?void 0:t.clientStateJson),p=new Set((E=d==null?void 0:d.guessResults.map(P=>P.playerId))!=null?E:[]),m=(t==null?void 0:t.alreadyPlayed)===!0||(d==null?void 0:d.solved)===!0||(d==null?void 0:d.failed)===!0;if(!e)return(0,Y.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-career-path",children:[(0,Y.jsx)(Oe,{title:o,eyebrow:i.eyebrow,onBack:s,backLabel:a.back}),(0,Y.jsx)("div",{className:"ss-g-body ss-g-loading",children:a.games.loading})]});let g=(x=d==null?void 0:d.visiblePath)!=null?x:e.initialPath,w=(M=d==null?void 0:d.totalClubs)!=null?M:e.totalClubs,C=m?0:Math.max(0,w-g.length),f=m?[]:e.typeaheadPool.filter(P=>!p.has(P.id)&&P.name.toLowerCase().includes(l.toLowerCase()));function h(P){var V;if(!e||m||n)return;let S=[...(V=d==null?void 0:d.guessResults.map(H=>H.playerId))!=null?V:[],P];u(""),r(JSON.stringify({guesses:S}))}let y=!m&&d?(0,Y.jsx)("span",{"data-testid":"cp-guess-chip",children:(0,Y.jsxs)(Te,{variant:"neutral",children:[a.games.guess," ",(0,Y.jsx)("span",{className:"ss-g-num",children:d.guessesUsed+1})," / ",d.guessesUsed+d.guessesRemaining]})}):void 0,A=d!=null&&d.solved?i.solved:d!=null&&d.failed?i.failed:a.games.done;return(0,Y.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-career-path",children:[(0,Y.jsx)(Oe,{title:o,eyebrow:i.eyebrow,right:y,onBack:s,backLabel:a.back}),(0,Y.jsxs)("div",{className:"ss-g-body",children:[(0,Y.jsxs)("div",{className:"ss-g-cp-card",children:[(0,Y.jsx)(On,{size:64,variant:m?"default":"mystery"}),(0,Y.jsxs)("div",{className:"ss-g-cp-card-text",children:[(0,Y.jsx)("span",{className:"ss-g-cp-card-title",children:m&&(d!=null&&d.revealedPlayerName)?d.revealedPlayerName:i.mysteryPlayer}),d!=null&&d.hintLine?(0,Y.jsx)("span",{className:"ss-g-cp-hint",children:d.hintLine}):m?null:(0,Y.jsxs)("span",{className:"ss-g-cp-locks",children:[(0,Y.jsx)(Te,{variant:"lock",icon:(0,Y.jsx)(Ur,{size:11}),children:i.lockPosition}),(0,Y.jsx)(Te,{variant:"lock",icon:(0,Y.jsx)(Ur,{size:11}),children:i.lockNationality})]})]})]}),(0,Y.jsxs)("ol",{className:"ss-g-cp-line",children:[g.map((P,z)=>{let S=z===0?i.firstClub:x2(P);return(0,Y.jsxs)("li",{className:"ss-g-cp-step",children:[(0,Y.jsxs)("span",{className:"ss-g-cp-rail",children:[(0,Y.jsx)("span",{className:"ss-g-cp-tile",children:(0,Y.jsx)(oa,{src:P.crestUrl,name:P.clubName,size:30})}),(0,Y.jsx)("span",{className:"ss-g-cp-conn","aria-hidden":"true"})]}),(0,Y.jsxs)("span",{className:"ss-g-cp-step-text",children:[(0,Y.jsx)("span",{className:"ss-g-cp-club",children:P.clubName}),(0,Y.jsxs)("span",{className:"ss-g-cp-sub",children:[(0,Y.jsx)("span",{className:"ss-g-cp-years",children:S}),P.isLoan&&(0,Y.jsxs)(Y.Fragment,{children:[S?" \xB7 ":"",(0,Y.jsx)("span",{className:"ss-g-cp-loan",children:i.loan})]})]})]})]},`${P.clubName}-${z}`)}),C>0&&(0,Y.jsxs)("li",{className:"ss-g-cp-step ss-g-cp-step--hidden",children:[(0,Y.jsxs)("span",{className:"ss-g-cp-rail",children:[(0,Y.jsx)("span",{className:"ss-g-cp-tile ss-g-cp-tile--locked",children:(0,Y.jsx)(Ur,{size:18})}),C>1&&(0,Y.jsx)("span",{className:"ss-g-cp-conn ss-g-cp-conn--faint","aria-hidden":"true"})]}),(0,Y.jsx)("span",{className:"ss-g-cp-step-text",children:(0,Y.jsx)("span",{className:"ss-g-cp-sub",children:i.nextClubHidden})})]}),C>1&&(0,Y.jsxs)("li",{className:"ss-g-cp-step ss-g-cp-step--more",children:[(0,Y.jsx)("span",{className:"ss-g-cp-rail",children:(0,Y.jsx)("span",{className:"ss-g-cp-tile ss-g-cp-tile--faint",children:(0,Y.jsx)(Ur,{size:18})})}),(0,Y.jsx)("span",{className:"ss-g-cp-step-text",children:(0,Y.jsx)("span",{className:"ss-g-cp-sub",children:i.moreClubs(C-1)})})]})]}),m&&(0,Y.jsx)(it,{tone:d!=null&&d.solved?"win":d!=null&&d.failed?"lose":"neutral",title:A,score:t==null?void 0:t.score,detail:d?i.guessesLine(d.guessesUsed):void 0,onBack:s,ui:a})]}),!m&&(0,Y.jsxs)(pt,{children:[l.length>0&&f.length>0&&(0,Y.jsx)(Cs,{label:i.searchLabel,options:f.map(P=>({key:P.id,content:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Bt,{className:"ss-g-opt-av",name:P.name}),(0,Y.jsx)("span",{children:P.name})]})})),onPick:P=>h(Number(P))}),(0,Y.jsx)(cn,{id:c,label:i.searchLabel,placeholder:i.searchPlaceholder,value:l,onChange:u,disabled:n})]})]})}var Zn=b(se(),1);var J=b(I(),1);function v2(e){let t=e.toLowerCase();return t.includes("app")?"calendar":t.includes("goal")?"ball":t.includes("assist")?"boot":t.includes("clean")?"gloves":t.includes("tackle")?"shield":"flag"}function b2(e,t){var n;return(n=t[e])!=null?n:e}function k2({kind:e}){switch(e){case"calendar":return(0,J.jsx)(C1,{});case"ball":return(0,J.jsx)(A1,{});case"boot":return(0,J.jsx)(E1,{});case"gloves":return(0,J.jsx)(I1,{});case"shield":return(0,J.jsx)(bc,{});default:return(0,J.jsx)(S1,{})}}function C2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function G1(e,t,n){return e.find(r=>r.row===t&&r.col===n)}function S2(e){if(!e)return"";let t=e.trim().split(/\s+/).filter(Boolean);if(t.length===0)return"";let n=t[0];if(t.length===1)return n;let r=t[t.length-1];return`${n.charAt(0)}. ${r}`}function A2({row:e,col:t,rowLabel:n,colLabel:r,playerPool:s,alreadyFilledIds:a,onPick:i,onDismiss:o,ui:l}){let u=l.games.beatTheGrid,[c,d]=(0,Zn.useState)(""),p=(0,Zn.useId)(),m=(0,Zn.useRef)(null);(0,Zn.useEffect)(()=>{var w;(w=m.current)==null||w.focus()},[e,t]);let g=s.filter(w=>!a.has(w.id)&&w.name.toLowerCase().includes(c.toLowerCase()));return(0,J.jsxs)("div",{className:"ss-g-btg-sheet","data-testid":"btg-search-sheet",children:[(0,J.jsxs)("div",{className:"ss-g-btg-sheet-hdr",children:[(0,J.jsx)(Te,{variant:"neutral",children:n}),(0,J.jsx)("span",{className:"ss-g-btg-sheet-x","aria-hidden":"true",children:(0,J.jsx)(bs,{size:12})}),(0,J.jsx)(Te,{variant:"accent",children:r}),(0,J.jsx)("button",{type:"button",className:"ss-g-btg-sheet-close","data-testid":"btg-sheet-dismiss","aria-label":u.closeSearch,onClick:o,children:(0,J.jsx)(bs,{})})]}),s.length===0?(0,J.jsx)("div",{className:"ss-g-btg-sheet-empty",children:u.emptyPool}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(cn,{id:p,label:u.searchLabel(n,r),labelHidden:!0,placeholder:u.searchPlaceholder,value:c,onChange:d,inputRef:m}),c.length>0&&g.length>0&&(0,J.jsx)(Cs,{label:u.searchLabel(n,r),options:g.map(w=>({key:w.id,content:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Bt,{name:w.name,className:"ss-g-opt-av"}),(0,J.jsx)("span",{className:"ss-g-btg-result-name",children:w.name}),(0,J.jsx)("span",{className:"ss-g-btg-result-plus","aria-hidden":"true",children:(0,J.jsx)(sa,{size:18})})]})})),onPick:w=>i(e,t,Number(w))})]})]})}function V1({config:e,result:t,submitting:n,onSubmit:r,onBack:s,ui:a,playerPool:i}){var P,z,S,V,H;let o=a.games.beatTheGrid,l=et({gameId:"beat-the-grid"},a.games.titles),[u,c]=(0,Zn.useState)(null),d=C2(t==null?void 0:t.clientStateJson),p=(P=d==null?void 0:d.cells)!=null?P:[],m=(t==null?void 0:t.alreadyPlayed)===!0||(d==null?void 0:d.isComplete)===!0,g=new Set(p.map(N=>N.playerId));function w(N,T){m||n||G1(p,N,T)||c({row:N,col:T})}function C(N,T,L){c(null);let D=[...p.map(G=>({row:G.row,col:G.col,playerId:G.playerId})),{row:N,col:T,playerId:L}];r(JSON.stringify({cells:D}))}if(!e)return(0,J.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-beat-the-grid",children:[(0,J.jsx)(Oe,{title:l,eyebrow:o.eyebrow,onBack:s,backLabel:a.back}),(0,J.jsx)("div",{className:"ss-g-body ss-g-loading",children:a.games.loading})]});let f=e.rows,h=e.cols,y=f.length*h.length,A=p.filter(N=>N.isCorrect).length,E=p.length-A,x=Array.from({length:y},(N,T)=>T<A?"correct":T<A+E?"wrong":"todo"),M=(S=(z=d==null?void 0:d.totalScore)!=null?z:t==null?void 0:t.score)!=null?S:0;return(0,J.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-beat-the-grid",children:[(0,J.jsx)(Oe,{title:l,eyebrow:o.eyebrow,onBack:s,backLabel:a.back}),(0,J.jsx)(Gr,{segments:x,ariaLabel:o.progressAria(p.length,y),leftLabel:o.filled(p.length,y),rightLabel:o.toGo(Math.max(0,y-p.length)),right:(0,J.jsx)(Te,{variant:"accent",children:`${M} ${a.games.unitPts}`})}),(0,J.jsxs)("div",{className:"ss-g-body",children:[(0,J.jsxs)("div",{className:"ss-g-btg-grid",style:{gridTemplateColumns:`64px repeat(${h.length}, minmax(0, 1fr))`},role:"grid",children:[(0,J.jsx)("div",{className:"ss-g-btg-corner"}),h.map(N=>(0,J.jsxs)("div",{className:"ss-g-btg-colhdr",children:[(0,J.jsx)(k2,{kind:v2(N)}),(0,J.jsx)("span",{children:N})]},N)),f.map((N,T)=>{let L=b2(N,o.rowAbbrev);return(0,J.jsxs)(Zn.default.Fragment,{children:[(0,J.jsx)("div",{className:"ss-g-btg-rowhdr",children:L===N?(0,J.jsx)("span",{children:N}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("span",{"aria-hidden":"true",children:L}),(0,J.jsx)("span",{className:"ss-g-sr",children:N})]})}),h.map((O,D)=>{var Be,Le,k;let G=G1(p,T,D),pe=(u==null?void 0:u.row)===T&&(u==null?void 0:u.col)===D,v=G?G.isCorrect?"correct":"wrong":pe?"active":"empty";return(0,J.jsx)("button",{type:"button","data-testid":`btg-cell-${T}-${D}`,"data-state":v,"aria-label":G?o.cellFilled(N,O,(Le=(Be=i.find(Ee=>Ee.id===G.playerId))==null?void 0:Be.name)!=null?Le:"",G.isCorrect?o.correct:o.wrong):o.pickCell(N,O),"aria-pressed":pe,className:"ss-g-btg-cell",disabled:m||n,onClick:()=>w(T,D),children:G?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("span",{className:`ss-g-btg-badge ss-g-btg-badge--${G.isCorrect?"correct":"wrong"}`,role:"img","aria-label":G.isCorrect?o.correct:o.wrong,children:G.isCorrect?(0,J.jsx)(bn,{size:11}):(0,J.jsx)(bs,{size:11})}),(0,J.jsx)("span",{className:"ss-g-btg-rarity",children:G.rarityScore}),(0,J.jsx)(On,{size:40}),(0,J.jsx)("span",{className:"ss-g-btg-name",children:S2((k=i.find(Ee=>Ee.id===G.playerId))==null?void 0:k.name)})]}):(0,J.jsx)("span",{className:"ss-g-btg-plus","aria-hidden":"true",children:(0,J.jsx)(sa,{size:22})})},`cell-${T}-${D}`)})]},T)})]}),m&&(0,J.jsx)(it,{tone:"neutral",title:o.complete,score:M,detail:o.summary(A,p.length),onBack:s,ui:a})]}),u!==null&&(0,J.jsx)("div",{className:"ss-g-btg-pin",children:(0,J.jsx)(A2,{row:u.row,col:u.col,rowLabel:(V=f[u.row])!=null?V:"",colLabel:(H=h[u.col])!=null?H:"",playerPool:i,alreadyFilledIds:g,onPick:C,onDismiss:()=>c(null),ui:a},`${u.row}-${u.col}`)})]})}var Tc=b(se(),1);var Kt=b(I(),1);function Nc({variant:e}){return(0,Kt.jsxs)("svg",{className:"ss-g-pitch-svg",viewBox:e==="full"?"0 0 100 150":"0 0 100 100",preserveAspectRatio:"none","aria-hidden":"true",children:[(0,Kt.jsx)("rect",{x:"4",y:"4",width:"92",height:e==="full"?142:92,fill:"none"}),e==="full"?(0,Kt.jsxs)(Kt.Fragment,{children:[(0,Kt.jsx)("line",{x1:"4",y1:"75",x2:"96",y2:"75"}),(0,Kt.jsx)("circle",{cx:"50",cy:"75",r:"12",fill:"none"}),(0,Kt.jsx)("rect",{x:"26",y:"4",width:"48",height:"20",fill:"none"}),(0,Kt.jsx)("rect",{x:"26",y:"126",width:"48",height:"20",fill:"none"})]}):(0,Kt.jsxs)(Kt.Fragment,{children:[(0,Kt.jsx)("path",{d:"M38 4a12 12 0 0 0 24 0",fill:"none"}),(0,Kt.jsx)("rect",{x:"26",y:"76",width:"48",height:"20",fill:"none"})]})]})}function W1(e){let t=new Map;return e.forEach((n,r)=>{var i,o;let s=Number((i=n.slot)==null?void 0:i.split(":")[0])||r+1,a=(o=t.get(s))!=null?o:[];a.push(n),t.set(s,a)}),[...t.keys()].sort((n,r)=>r-n).map(n=>t.get(n))}function _1(e){return e.length<2?"":[...e].reverse().slice(1).map(n=>n.length).join("-")}var rg={"4-4-2":[["GK"],["LB","CB","CB","RB"],["LM","CM","CM","RM"],["ST","ST"]],"4-3-3":[["GK"],["LB","CB","CB","RB"],["CM","CM","CM"],["LW","ST","RW"]],"4-2-3-1":[["GK"],["LB","CB","CB","RB"],["CDM","CDM"],["LW","CAM","RW"],["ST"]],"4-1-4-1":[["GK"],["LB","CB","CB","RB"],["CDM"],["LM","CM","CM","RM"],["ST"]],"4-5-1":[["GK"],["LB","CB","CB","RB"],["LM","CM","CM","CM","RM"],["ST"]],"4-4-1-1":[["GK"],["LB","CB","CB","RB"],["LM","CM","CM","RM"],["CAM"],["ST"]],"4-1-2-1-2":[["GK"],["LB","CB","CB","RB"],["CDM"],["LM","RM"],["CAM"],["ST","ST"]],"3-5-2":[["GK"],["CB","CB","CB"],["LWB","CM","CM","CM","RWB"],["ST","ST"]],"3-4-3":[["GK"],["CB","CB","CB"],["LM","CM","CM","RM"],["LW","ST","RW"]],"5-3-2":[["GK"],["LWB","CB","CB","CB","RWB"],["CM","CM","CM"],["ST","ST"]],"5-4-1":[["GK"],["LWB","CB","CB","CB","RWB"],["LM","CM","CM","RM"],["ST"]]};function sg(e,t){return e===0?"GK":e===t-1?"FWD":e===1?"DEF":"MID"}function j1(e,t){let n=[...t].reverse(),r=rg[e],s=new Map;return n.forEach((a,i)=>{a.forEach((o,l)=>{var c,d;if(!o.slot)return;let u=(d=(c=r==null?void 0:r[i])==null?void 0:c[l])!=null?d:sg(i,n.length);s.set(o.slot,u)})}),s}var Ae=b(I(),1),E2=3;function I2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function X1({config:e,result:t,submitting:n,onSubmit:r,ui:s,onBack:a}){var P,z,S,V,H,N;let i=s.games.guessTheXi,[o,l]=(0,Tc.useState)(""),u=(0,Tc.useId)(),c=I2(t==null?void 0:t.clientStateJson),d=(t==null?void 0:t.alreadyPlayed)===!0||(c==null?void 0:c.status)==="solved"||(c==null?void 0:c.status)==="failed",p=(c==null?void 0:c.status)==="solved",m=(c==null?void 0:c.status)==="failed",g=new Set((P=c==null?void 0:c.guessHistory.map(T=>T.teamId))!=null?P:[]),w=e?W1(e.positions):[],C=e!=null&&e.hasRealFormation?_1(w):"",f=e!=null&&e.hasRealFormation?j1(C,w):new Map,h=new Map;((z=c==null?void 0:c.earnedReveals)!=null?z:[]).forEach(T=>{T.slot&&T.type!=="position"&&h.set(T.slot,T.value)});let y=e&&!d?e.teamPool.filter(T=>!g.has(T.teamId)&&T.teamName.toLowerCase().includes(o.toLowerCase())):[];function A(T){var D;if(!e||d||n)return;let O=[...(D=c==null?void 0:c.guessHistory.map(G=>({teamId:G.teamId})))!=null?D:[],{teamId:T}];l(""),r(JSON.stringify({guesses:O}))}let E=((S=c==null?void 0:c.guessHistory)!=null?S:[]).filter(T=>!T.wasCorrect),x=Math.max(0,E2-((V=c==null?void 0:c.guessesUsed)!=null?V:0)),M=T=>{var L,O;return(O=(L=e==null?void 0:e.teamPool.find(D=>D.teamId===T))==null?void 0:L.teamName)!=null?O:`#${T}`};return(0,Ae.jsxs)("div",{className:"ss-g-screen ss-g-gxi","data-testid":"game-screen-guess-the-xi",children:[(0,Ae.jsx)(Oe,{title:et({gameId:"guess-the-xi"},s.games.titles),eyebrow:e==null?void 0:e.poolLabel,right:C?(0,Ae.jsx)(Te,{variant:"accent",children:C}):void 0,onBack:a,backLabel:s.back}),!e&&(0,Ae.jsx)("div",{className:"ss-g-body ss-g-loading",children:s.games.loading}),e&&(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsxs)("div",{className:"ss-g-body",children:[w.length>0&&(0,Ae.jsxs)("div",{className:"ss-g-gxi-pitch",role:"group","aria-label":i.pitchLabel,children:[(0,Ae.jsx)(Nc,{variant:"full"}),(0,Ae.jsx)("div",{className:"ss-g-gxi-rows",children:w.map((T,L)=>(0,Ae.jsx)("div",{className:"ss-g-gxi-row",children:T.map((O,D)=>{var v;let G=O.slot&&(v=f.get(O.slot))!=null?v:"",pe=O.slot?h.get(O.slot):void 0;return(0,Ae.jsxs)("div",{className:"ss-g-gxi-node","data-revealed":pe?"true":void 0,children:[(0,Ae.jsx)("span",{className:"ss-g-gxi-disc",role:"img",title:O.nationality,"aria-label":`${G?G+" \u2014 ":""}${O.nationality}${pe?" \u2014 "+pe:""}`,children:Cc(O.nationality)}),pe?(0,Ae.jsx)("span",{className:"ss-g-gxi-pos ss-g-gxi-pos--name",children:zt(pe).last}):G&&(0,Ae.jsx)("span",{className:"ss-g-gxi-pos",children:G})]},`${O.slot}-${D}`)})},L))})]}),!d&&E.length>0&&(0,Ae.jsxs)("div",{className:"ss-g-gxi-wrong",children:[(0,Ae.jsx)("span",{className:"ss-g-gxi-wrong-l",children:i.notThem}),E.map(T=>(0,Ae.jsxs)("span",{className:"ss-g-gxi-wrong-chip",children:[(0,Ae.jsx)(oa,{name:M(T.teamId),size:18}),(0,Ae.jsx)("s",{children:M(T.teamId)})]},T.teamId))]}),d&&(0,Ae.jsx)(it,{tone:p?"win":m?"lose":"neutral",title:p?i.solved:m?i.failed:s.games.alreadyPlayedTitle,score:(N=(H=c==null?void 0:c.score)!=null?H:t==null?void 0:t.score)!=null?N:0,detail:c?i.detail(c.guessesUsed):void 0,onBack:a,ui:s})]}),!d&&(0,Ae.jsxs)(pt,{children:[o.length>0&&y.length>0&&(0,Ae.jsx)(Cs,{label:i.optionsLabel,options:y.map(T=>({key:T.teamId,content:(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsx)(oa,{name:T.teamName,size:28}),(0,Ae.jsx)("span",{children:T.teamName})]})})),onPick:T=>A(Number(T))}),(0,Ae.jsx)(cn,{id:u,label:i.whichClub(x),placeholder:i.searchPlaceholder,value:o,onChange:l,disabled:n})]})]})]})}var ag=b(se(),1);var ge=b(I(),1);function N2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function q1(e,t){return e.find(n=>n.index===t)}var T2=/\s*\(([^)]*)\)$/,L2=/^[\p{L}\p{M}.'’-]+$/u;function P2({text:e}){var l,u;let t=T2.exec(e),n=t?e.slice(0,t.index).trim():e.trim(),r=(u=(l=t==null?void 0:t[1])==null?void 0:l.trim())!=null?u:"",s=n.split(/\s+/).filter(Boolean);if(!(s.length>=1&&s.length<=4&&s.every(c=>L2.test(c)))||n==="")return(0,ge.jsx)("span",{className:"ss-g-dq-opt-name",children:(0,ge.jsx)("span",{className:"ss-g-dq-opt-full",children:e})});let{first:i,last:o}=zt(n);return(0,ge.jsxs)("span",{className:"ss-g-dq-opt-name",children:[i&&(0,ge.jsx)("span",{className:"ss-g-dq-opt-first",children:i}),(0,ge.jsx)("span",{className:"ss-g-dq-opt-last",children:o}),r&&(0,ge.jsx)("span",{className:"ss-g-dq-opt-suffix",children:r})]})}function J1({config:e,result:t,submitting:n,onSubmit:r,onBack:s,ui:a}){var V;let i=a.games.dailyQuiz,o=et({gameId:"daily-quiz"},a.games.titles),[l,u]=(0,ag.useState)(new Map),[c,d]=(0,ag.useState)(0),p=N2(t==null?void 0:t.clientStateJson),m=(V=p==null?void 0:p.results)!=null?V:[],g=m.length>0||(t==null?void 0:t.alreadyPlayed)===!0;if(!e)return(0,ge.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-daily-quiz",children:[(0,ge.jsx)(Oe,{title:o,onBack:s,backLabel:a.back}),(0,ge.jsx)("div",{className:"ss-g-body ss-g-loading",children:a.games.loading})]});let w=e.questions,C=w.length,f=w[Math.min(c,C-1)],h=c>=C-1,y=f!==void 0&&l.has(f.index),A=l.size===C;function E(H,N){g||n||u(T=>new Map(T).set(H,N))}function x(){!y||h||d(H=>H+1)}function M(){d(H=>Math.max(0,H-1))}function P(){if(!e||!A||g||n)return;let H=e.questions.map(N=>{var T;return{index:N.index,selectedOptionIndex:(T=l.get(N.index))!=null?T:0}});r(JSON.stringify({answers:H}))}if(g){let H=w.map(T=>{let L=q1(m,T.index);return L?L.isCorrect?"correct":"wrong":"done"}),N=m.filter(T=>T.isCorrect).length;return(0,ge.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-daily-quiz",children:[(0,ge.jsx)(Oe,{title:o,eyebrow:i.results,onBack:s,backLabel:a.back}),(0,ge.jsx)(Gr,{segments:H,ariaLabel:i.results}),(0,ge.jsxs)("div",{className:"ss-g-body",children:[(0,ge.jsx)(it,{tone:"neutral",title:m.length>0?i.correctOf(N,C):a.games.alreadyPlayedTitle,score:t==null?void 0:t.score,onBack:s,ui:a}),w.map(T=>{let L=q1(m,T.index),O=l.get(T.index);return(0,ge.jsxs)("div",{className:"ss-g-dq-rq",children:[(0,ge.jsx)("div",{className:"ss-g-dq-rq-stem",children:T.stem}),L&&(0,ge.jsx)("div",{className:"ss-g-dq-rq-opts",children:T.options.map((D,G)=>{let pe="ss-g-dq-rq-opt";return G===L.correctOptionIndex?pe+=" ss-g-dq-rq-opt--correct":G===O&&!L.isCorrect&&(pe+=" ss-g-dq-rq-opt--wrong"),(0,ge.jsx)("span",{className:pe,children:D},G)})}),(L==null?void 0:L.revealText)&&(0,ge.jsx)("div",{className:"ss-g-dq-why",children:L.revealText})]},T.index)})]})]})}let z=w.map((H,N)=>N<c?"done":N===c?"current":"todo"),S=f?l.get(f.index):void 0;return(0,ge.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-daily-quiz",children:[(0,ge.jsx)(Oe,{title:o,eyebrow:i.questionOf(c+1,C),onBack:s,backLabel:a.back}),(0,ge.jsx)(Gr,{segments:z,ariaLabel:i.progressAria(c+1,C)}),(0,ge.jsx)("div",{className:"ss-g-body",children:f&&(0,ge.jsxs)(ge.Fragment,{children:[(0,ge.jsx)("h3",{className:"ss-g-dq-stem",children:f.stem}),(0,ge.jsx)("div",{className:"ss-g-dq-opts",children:f.options.map((H,N)=>{let T=N===S;return(0,ge.jsxs)("button",{type:"button",className:"ss-g-dq-opt","aria-pressed":T,disabled:n,onClick:()=>E(f.index,N),children:[(0,ge.jsx)("span",{className:"ss-g-dq-badge","aria-hidden":"true",children:T?(0,ge.jsx)(bn,{}):String.fromCharCode(65+N)}),(0,ge.jsx)(P2,{text:H})]},N)})})]})}),(0,ge.jsx)(pt,{children:(0,ge.jsxs)("div",{className:"ss-g-dq-nav",children:[c>0&&(0,ge.jsx)(Jt,{variant:"outline",onClick:M,disabled:n,children:i.previous}),h?(0,ge.jsx)(Jt,{variant:"primary",block:!0,onClick:P,disabled:!y||!A||n,children:n?i.submitting:i.submit}):(0,ge.jsx)(Jt,{variant:"primary",block:!0,onClick:x,disabled:!y||n,children:i.next})]})})]})}var Ss=b(se(),1);var X=b(I(),1),M2=9;function R2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function D2(e){try{return new Date(e).getTime()<=Date.now()}catch{return!0}}function z2(){return(0,X.jsx)("svg",{width:18,height:18,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:(0,X.jsx)("path",{d:"M5 12h14"})})}function K1({team:e,label:t}){return(0,X.jsxs)("div",{className:"ss-g-mp-team",children:[(0,X.jsx)(oa,{name:e.name,size:44}),(0,X.jsx)("span",{className:"ss-g-mp-team-name",children:e.name}),(0,X.jsx)("span",{className:"ss-g-mp-team-side",children:t})]})}function ig({home:e,away:t,h:n,a:r,t:s,edit:a}){let i=(o,l,u)=>(0,X.jsxs)("div",{className:"ss-g-mp-col",children:[a&&(0,X.jsx)("button",{type:"button",className:"ss-g-mp-step","aria-label":s.goalsUp(l.name),disabled:a.disabled,onClick:()=>a.onStep(o,1),children:(0,X.jsx)(sa,{size:18})}),(0,X.jsx)("span",{className:"ss-g-mp-digit","data-testid":"mp-digit","data-active":a?String(a.active===o):"false",children:u}),a&&(0,X.jsx)("button",{type:"button",className:"ss-g-mp-step","aria-label":s.goalsDown(l.name),disabled:a.disabled||u<=0,onClick:()=>a.onStep(o,-1),children:(0,X.jsx)(z2,{})})]});return(0,X.jsxs)("div",{className:"ss-g-mp-card",children:[(0,X.jsx)(K1,{team:e,label:s.home}),(0,X.jsxs)("div",{className:"ss-g-mp-scores",children:[i("home",e,n),(0,X.jsx)("span",{className:"ss-g-mp-dash","aria-hidden":"true",children:"\u2013"}),i("away",t,r)]}),(0,X.jsx)(K1,{team:t,label:s.away})]})}function og({label:e,ok:t,detail:n,t:r}){return(0,X.jsxs)("li",{className:"ss-g-mp-row","data-testid":"mp-row","data-ok":String(t),children:[(0,X.jsx)("span",{className:"ss-g-mp-row-k",children:e}),(0,X.jsxs)("span",{className:"ss-g-mp-row-v",children:[t?(0,X.jsx)(bn,{}):(0,X.jsx)(bs,{size:14}),(0,X.jsx)("span",{className:"ss-g-sr",children:t?r.correct:r.incorrect}),n?(0,X.jsx)("span",{className:"ss-g-mp-row-d",children:n}):null]})]})}function Y1({config:e,result:t,submitting:n,onSubmit:r,ui:s,onBack:a}){var N,T,L;let i=s.games.predictor,[o,l]=(0,Ss.useState)(0),[u,c]=(0,Ss.useState)(0),[d,p]=(0,Ss.useState)(null),[m,g]=(0,Ss.useState)("home"),[w,C]=(0,Ss.useState)(""),f=(0,Ss.useId)(),h=R2(t==null?void 0:t.clientStateJson),y=(t==null?void 0:t.alreadyPlayed)===!0,A=(0,X.jsx)(Oe,{title:et({gameId:"matchday-predictor"},s.games.titles),eyebrow:e?i.eyebrow(e.homeTeam.name,e.awayTeam.name):void 0,right:e?(0,X.jsx)(Te,{icon:(0,X.jsx)(Ur,{}),children:s.games.formatDayTime(e.kickoffUtc)}):void 0,onBack:a,backLabel:s.back});if(y&&h){if(!h.graded){let D=(N=e==null?void 0:e.scorerPool.find(G=>G.playerId===h.predictedFirstScorerPlayerId))!=null?N:null;return(0,X.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-matchday-predictor",children:[A,(0,X.jsxs)("div",{className:"ss-g-body",children:[e&&(0,X.jsx)(ig,{home:e.homeTeam,away:e.awayTeam,h:h.predictedHomeScore,a:h.predictedAwayScore,t:i}),(0,X.jsx)(it,{tone:"neutral",title:i.saved,detail:i.savedDetail({home:(T=e==null?void 0:e.homeTeam.name)!=null?T:"",away:(L=e==null?void 0:e.awayTeam.name)!=null?L:"",h:h.predictedHomeScore,a:h.predictedAwayScore,scorer:D?zt(D.playerName).last:null}),onBack:a,ui:s})]}),(0,X.jsx)(pt,{children:(0,X.jsx)("p",{className:"ss-g-mp-fun",children:i.forFun})})]})}let O=h.result;return(0,X.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-matchday-predictor",children:[A,(0,X.jsxs)("div",{className:"ss-g-body",children:[e&&(0,X.jsx)(ig,{home:e.homeTeam,away:e.awayTeam,h:O.homeScore,a:O.awayScore,t:i}),(0,X.jsx)(it,{tone:"neutral",title:i.fullTime(O.homeScore,O.awayScore),onBack:a,ui:s}),(0,X.jsxs)("ul",{className:"ss-g-mp-rows",children:[(0,X.jsx)(og,{label:i.exactScore,ok:h.exactScoreCorrect,t:i}),(0,X.jsx)(og,{label:i.outcome,ok:h.outcomeCorrect,t:i}),!h.firstScorerVoid&&(0,X.jsx)(og,{label:i.firstScorerRow,ok:h.firstScorerCorrect,detail:O.firstScorerName,t:i})]})]}),(0,X.jsx)(pt,{children:(0,X.jsx)("p",{className:"ss-g-mp-fun",children:i.forFun})})]})}if(!e)return(0,X.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-matchday-predictor",children:[A,(0,X.jsx)("div",{className:"ss-g-body ss-g-loading",children:s.games.loading})]});let E=D2(e.kickoffUtc),x=E||n;function M(O,D){g(O),O==="home"?l(G=>Math.max(0,G+D)):c(G=>Math.max(0,G+D))}function P(){x||!e||r(JSON.stringify({homeScore:o,awayScore:u,...d!==null?{firstScorerPlayerId:d}:{}}))}let z=e.scorerPool,S=z.length>M2,V=w.trim().toLowerCase(),H=S&&V?z.filter(O=>O.playerName.toLowerCase().includes(V)):z;return(0,X.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-matchday-predictor",children:[A,(0,X.jsxs)("div",{className:"ss-g-body",children:[(0,X.jsx)(ig,{home:e.homeTeam,away:e.awayTeam,h:o,a:u,t:i,edit:{disabled:x,active:m,onStep:M}}),z.length>0&&(0,X.jsxs)("section",{className:"ss-g-mp-scorer",children:[(0,X.jsxs)("div",{className:"ss-g-mp-sec-head",children:[(0,X.jsx)("h3",{children:i.firstScorer}),(0,X.jsx)("span",{children:i.optional})]}),S&&(0,X.jsx)(cn,{id:f,label:i.searchLabel,labelHidden:!0,placeholder:i.searchPlaceholder,value:w,onChange:C,disabled:x}),(0,X.jsx)("div",{className:"ss-g-mp-grid",children:H.map(O=>{let D=d===O.playerId;return(0,X.jsxs)("button",{type:"button",className:"ss-g-mp-pcard","aria-pressed":D,"aria-label":O.playerName,disabled:x,onClick:()=>p(G=>G===O.playerId?null:O.playerId),children:[D&&(0,X.jsx)("span",{className:"ss-g-mp-pcheck",children:(0,X.jsx)(bn,{size:12})}),(0,X.jsx)(On,{size:52,variant:D?"selected":"default"}),(0,X.jsx)("span",{className:"ss-g-mp-pname",children:zt(O.playerName).last})]},O.playerId)})}),(0,X.jsxs)("button",{type:"button",className:"ss-g-mp-none","aria-pressed":d===null,disabled:x,onClick:()=>p(null),children:[(0,X.jsx)("span",{className:"ss-g-mp-radio","aria-hidden":"true"}),i.noScorer]})]}),E&&(0,X.jsx)("p",{className:"ss-g-mp-closed",children:i.closed})]}),(0,X.jsxs)(pt,{children:[(0,X.jsx)(Jt,{variant:"primary",block:!0,disabled:x,onClick:P,children:n?i.saving:i.save}),(0,X.jsx)("p",{className:"ss-g-mp-fun",children:i.forFun})]})]})}var ci=b(se(),1);var fe=b(I(),1),O2=8,Lc=11,$1="4-3-3";function B2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function F2(e){let t=e.split("-").map(Number).filter(l=>l>0),n=t.reduce((l,u)=>l+u,0)===Lc-1,r=n?e:$1,a=[1,...n?t:$1.split("-").map(Number)],i=rg[r],o=[];return a.forEach((l,u)=>{var d,p;let c=88-u*(77/(a.length-1));for(let m=0;m<l;m++){let g=l===1?50:12+m*(76/(l-1));o.push({index:o.length,label:(p=(d=i==null?void 0:i[u])==null?void 0:d[m])!=null?p:sg(u,a.length),left:g,top:c})}}),{formation:r,slots:o}}function U2(e){let t=e.findIndex(n=>n===null);return t===-1?null:t}function Z1({config:e,result:t,submitting:n,onSubmit:r,ui:s,onBack:a,lockAtUtc:i}){var O;let o=s.games.startingXi,[l,u]=(0,ci.useState)(()=>Array(Lc).fill(null)),[c,d]=(0,ci.useState)(0),[p,m]=(0,ci.useState)(""),g=(0,ci.useId)(),w=B2(t==null?void 0:t.clientStateJson),C=(t==null?void 0:t.alreadyPlayed)===!0,f=(0,fe.jsx)(Oe,{title:et({gameId:"starting-xi"},s.games.titles),eyebrow:o.eyebrow,right:(0,fe.jsx)(Te,{variant:"accent",children:o.perStarter(O2)}),onBack:a,backLabel:s.back});function h(D,G){return(0,fe.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-starting-xi",children:[f,(0,fe.jsx)("div",{className:"ss-g-body",children:(0,fe.jsx)(it,{tone:"neutral",title:D,score:G,onBack:a,ui:s})})]})}if(C){if(!w)return h(o.voided);if(w.status==="pending")return h(o.pending(w.predictedCount));if(w.status==="graded")return h(o.gradedLine(w.correctCount),w.score)}if(!e)return(0,fe.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-starting-xi",children:[f,(0,fe.jsx)("div",{className:"ss-g-body ss-g-loading",children:s.games.loading})]});let{formation:y,slots:A}=F2(e.formation),E=new Map(e.squadSheet.map(D=>[D.playerId,D])),x=l.filter(D=>D!==null).length,M=x===Lc&&!n,P=new Set(l.filter(D=>D!==null)),z=p.trim().toLowerCase(),S=e.squadSheet.filter(D=>{var G;return!P.has(D.playerId)&&(!z||((G=D.playerName)!=null?G:"").toLowerCase().includes(z))}),V=c!==null&&(O=A[c])!=null?O:null;function H(D){if(n||c===null)return;let G=[...l];G[c]=D,u(G),d(U2(G)),m("")}function N(D){if(!n){if(l[D]!==null){let G=[...l];G[D]=null,u(G)}d(D)}}function T(){M&&r(JSON.stringify({predictedPlayerIds:l}))}let L=l.map(D=>D!==null?"current":"todo");return(0,fe.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-starting-xi",children:[f,(0,fe.jsx)(Gr,{segments:L,ariaLabel:o.picked(x),leftLabel:o.picked(x),rightLabel:o.toGo(Lc-x),right:(0,fe.jsx)(Te,{children:y})}),(0,fe.jsxs)("div",{className:"ss-g-body",children:[(0,fe.jsxs)("div",{className:"ss-g-xi-pitch",children:[(0,fe.jsx)(Nc,{variant:"half"}),A.map(D=>{var Le,k,Ee,Ke;let G=(Le=l[D.index])!=null?Le:null,pe=G!==null&&(k=E.get(G))!=null?k:null,v=(Ee=pe==null?void 0:pe.playerName)!=null?Ee:"",Be=pe?"filled":c===D.index?"active":"empty";return(0,fe.jsxs)("button",{type:"button",className:"ss-g-xi-slot","data-state":Be,style:{left:`${D.left}%`,top:`${D.top}%`},"aria-pressed":c===D.index,"aria-label":pe?o.clearSlot(D.label,v):o.pickSlot(D.label),disabled:n,onClick:()=>N(D.index),children:[(0,fe.jsx)("span",{className:"ss-g-xi-ring","aria-hidden":"true",children:pe?(Ke=pe.jerseyNumber)!=null?Ke:"":(0,fe.jsx)(sa,{size:18})}),(0,fe.jsx)("span",{className:"ss-g-xi-tag","aria-hidden":"true",children:pe?zt(v).last:D.label})]},D.index)})]}),(0,fe.jsxs)("div",{className:"ss-g-xi-picker",children:[(0,fe.jsx)("div",{className:"ss-g-xi-picker-head",children:V?(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(Te,{variant:"badge",children:V.label}),(0,fe.jsx)("strong",{children:o.pickFor(V.label)})]}):(0,fe.jsx)("strong",{children:o.allPicked})}),V&&(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(cn,{id:g,label:o.searchLabel,labelHidden:!0,placeholder:o.searchLabel,value:p,onChange:m,disabled:n}),(0,fe.jsx)("ul",{className:"ss-g-xi-list",children:S.map(D=>{var G;return(0,fe.jsx)("li",{children:(0,fe.jsxs)("button",{type:"button",className:"ss-g-xi-opt",disabled:n,onClick:()=>H(D.playerId),children:[(0,fe.jsx)("span",{className:"ss-g-xi-opt-no","aria-hidden":"true",children:(G=D.jerseyNumber)!=null?G:""}),(0,fe.jsx)("span",{className:"ss-g-xi-opt-name",children:D.playerName}),(0,fe.jsx)("span",{className:"ss-g-xi-opt-pos",children:D.positionName})]})},D.playerId)})})]})]})]}),(0,fe.jsxs)(pt,{children:[(0,fe.jsx)(Jt,{variant:"primary",block:!0,disabled:!M,onClick:T,children:n?o.submitting:o.submit}),(0,fe.jsxs)("p",{className:"ss-g-xi-lock",children:[(0,fe.jsx)(Ur,{}),i?o.locksAt(s.games.formatDayTime(i)):o.locksSoon]})]})]})}var zo=b(se(),1);var de=b(I(),1);function Q2(e){let t=e.find(s=>s.rank===2);if(!t)return null;let n=e.find(s=>s.rank===1),r=e.find(s=>s.rank===3);return{value:t.statValue,above:n!=null&&n.playerName?{name:n.playerName,diff:n.statValue-t.statValue}:null,below:r!=null&&r.playerName?{name:r.playerName,diff:t.statValue-r.statValue}:null}}function H2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function eC({name:e}){let{first:t,last:n}=zt(e);return(0,de.jsxs)("span",{className:"ss-g-sl-name",children:[t&&(0,de.jsx)("small",{children:`${t[0]}.`}),(0,de.jsx)("b",{children:n})]})}function tC({config:e,result:t,submitting:n,onSubmit:r,ui:s,onBack:a}){let i=s.games.statLadder,[o,l]=(0,zo.useState)(""),[u,c]=(0,zo.useState)(null),d=(0,zo.useId)(),p=H2(t==null?void 0:t.clientStateJson),m=p!=null,g=(0,de.jsx)(Oe,{title:et({gameId:"stat-ladder"},s.games.titles),eyebrow:i.eyebrow,onBack:a,backLabel:s.back});if(!e)return(0,de.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-stat-ladder",children:[g,(0,de.jsx)("div",{className:"ss-g-body ss-g-loading",children:s.games.loading})]});let w=i.question(e.statLabel),C=m?null:Q2(e.ladder),f=[...e.ladder].sort((E,x)=>E.rank-x.rank),h=o.trim().toLowerCase(),y=h?e.playerPool.filter(E=>E.playerName.toLowerCase().includes(h)):e.playerPool;function A(){u===null||n||m||r(JSON.stringify({guessedPlayerId:u}))}return(0,de.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-stat-ladder",children:[g,(0,de.jsxs)("div",{className:"ss-g-body",children:[(0,de.jsxs)("div",{className:"ss-g-sl-prompt",children:[(0,de.jsx)(Te,{variant:"accent",icon:(0,de.jsx)(bc,{size:14}),className:"ss-g-sl-stat",children:e.statLabel}),(0,de.jsxs)("h3",{className:"ss-g-sl-q",children:[w.pre,(0,de.jsx)("em",{children:w.emph}),w.post]})]}),(0,de.jsx)("ol",{className:"ss-g-sl-rungs",children:f.map(E=>{var x,M;return E.rank===2?(0,de.jsxs)("li",{className:"ss-g-sl-rung ss-g-sl-rung--mystery","data-testid":"sl-mystery-rung","data-result":m?p.isCorrect?"correct":"wrong":void 0,children:[(0,de.jsx)("span",{className:"ss-g-sl-rank",children:"2"}),m?(0,de.jsx)(Bt,{name:p.revealedRank2.playerName,className:"ss-g-sl-av"}):(0,de.jsx)(On,{size:52,variant:"mystery"}),m?(0,de.jsx)(eC,{name:p.revealedRank2.playerName}):(0,de.jsx)("span",{className:"ss-g-sl-who",children:i.whoSecond}),(0,de.jsx)("span",{className:"ss-g-sl-val ss-g-sl-val--mystery",children:E.statValue})]},E.rank):(0,de.jsxs)("li",{className:"ss-g-sl-rung",children:[(0,de.jsx)("span",{className:"ss-g-sl-rank",children:E.rank}),(0,de.jsx)(Bt,{name:(x=E.playerName)!=null?x:"?",className:"ss-g-sl-av"}),(0,de.jsx)(eC,{name:(M=E.playerName)!=null?M:"?"}),(0,de.jsx)("span",{className:"ss-g-sl-val",children:E.statValue})]},E.rank)})}),C&&(0,de.jsxs)("p",{className:"ss-g-sl-clue",children:[(0,de.jsx)(vc,{}),(0,de.jsx)("span",{children:i.clue(C,e.statLabel)})]}),!m&&(0,de.jsx)("ul",{className:"ss-g-sl-pool",children:y.map(E=>(0,de.jsx)("li",{children:(0,de.jsxs)("button",{type:"button",className:"ss-g-sl-opt","aria-label":E.playerName,"aria-pressed":u===E.playerId,disabled:n,onClick:()=>{c(E.playerId),l(E.playerName)},children:[(0,de.jsx)(Bt,{name:E.playerName,className:"ss-g-sl-opt-av"}),(0,de.jsx)("span",{className:"ss-g-sl-opt-name",children:E.playerName}),u===E.playerId&&(0,de.jsx)(bn,{})]})},E.playerId))}),m&&(0,de.jsx)(it,{tone:p.isCorrect?"win":"lose",title:p.isCorrect?i.correct:i.wrong(p.revealedRank2.playerName),score:t==null?void 0:t.score,onBack:a,ui:s})]}),!m&&(0,de.jsx)(pt,{children:(0,de.jsxs)("div",{className:"ss-g-sl-guess",children:[(0,de.jsx)(cn,{id:d,label:i.searchLabel,labelHidden:!0,placeholder:i.searchPlaceholder,value:o,onChange:E=>{l(E),c(null)},disabled:n}),(0,de.jsx)(Jt,{variant:"primary",disabled:u===null||n,onClick:A,children:i.guess})]})})]})}var yt=b(I(),1);function G2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function nC({config:e,result:t,submitting:n,onSubmit:r,ui:s,onBack:a}){var m,g;let i=s.games.motm,o=G2(t==null?void 0:t.clientStateJson),l=(t==null?void 0:t.alreadyPlayed)===!0,u=(m=o==null?void 0:o.pickedPlayerId)!=null?m:null,c=(0,yt.jsx)(Oe,{title:i.title,eyebrow:i.eyebrow,right:l?(0,yt.jsx)(Te,{variant:"success",icon:(0,yt.jsx)(bn,{}),children:i.voted}):void 0,onBack:a,backLabel:s.back});if(!e)return(0,yt.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-fan-motm",children:[c,(0,yt.jsx)("div",{className:"ss-g-body ss-g-loading",children:s.games.loading})]});let d=(g=e.candidates.find(w=>w.playerId===u))!=null?g:null;function p(w){l||n||r(JSON.stringify({pickedPlayerId:w}))}return(0,yt.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-fan-motm",children:[c,(0,yt.jsxs)("div",{className:"ss-g-body",children:[(0,yt.jsx)("ul",{className:"ss-g-motm-list",children:e.candidates.map(w=>{let C=l&&u===w.playerId;return(0,yt.jsx)("li",{children:(0,yt.jsxs)("button",{type:"button",className:`ss-g-motm-row${C?" ss-g-motm-row--voted":""}`,"data-testid":`motm-candidate-${w.playerId}`,disabled:l||n,onClick:()=>p(w.playerId),children:[(0,yt.jsx)(Bt,{name:w.playerName,className:"ss-g-motm-av"}),(0,yt.jsx)("span",{className:"ss-g-motm-name",children:w.playerName}),C&&(0,yt.jsx)(Te,{variant:"accent",className:"ss-g-motm-pill",children:i.yourVote})]})},w.playerId)})}),l&&d&&(0,yt.jsx)(it,{tone:"neutral",title:i.youVoted(d.playerName),detail:i.thanks,onBack:a,ui:s})]}),(0,yt.jsxs)(pt,{children:[!l&&(0,yt.jsx)("p",{className:"ss-g-motm-foot",children:i.tapToVote}),(0,yt.jsx)("p",{className:"ss-g-motm-fun",children:i.forFun})]})]})}var dn=b(I(),1),V2=new Set(["matchday-predictor","starting-xi","stat-ladder","fan-motm"]),W2=3e4;function fr(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function rC({selected:e,onBack:t,onPlayed:n,conversation:r,ui:s}){let{gameId:a,fixtureId:i,gameDay:o="",lockAtUtc:l=null}=e,[u,c]=(0,As.useState)(null);(0,As.useEffect)(()=>{if(c(null),!r)return;let y=!1;return(async()=>{try{let A=await r.getGameConfig(a,i,o||void 0);!y&&(A!=null&&A.configJson)&&c(A.configJson)}catch{}})(),()=>{y=!0}},[r,a,i,o]);let{result:d,submitting:p,submit:m,hydrate:g,rawStatus:w}=M1(r,{gameId:a,gameDay:o,fixtureId:i||void 0});(0,As.useEffect)(()=>{r&&g()},[r,a]);let C=(0,As.useRef)(g);C.current=g,(0,As.useEffect)(()=>{if(!V2.has(a)||w!=="pending")return;let y=setInterval(()=>{C.current()},W2);return()=>clearInterval(y)},[a,w]);let f={result:d,submitting:p,onSubmit:y=>{m(y).then(()=>n==null?void 0:n())},ui:s,onBack:t,lockAtUtc:l};function h(){var y;switch(a){case"mystery-tiger":return(0,dn.jsx)(B1,{...f,config:fr(u)});case"higher-or-lower":return(0,dn.jsx)(U1,{...f,config:fr(u)});case"career-path":return(0,dn.jsx)(H1,{...f,config:fr(u)});case"beat-the-grid":{let A=fr(u);return(0,dn.jsx)(V1,{...f,config:A,playerPool:(y=A==null?void 0:A.playerPool)!=null?y:[]})}case"guess-the-xi":return(0,dn.jsx)(X1,{...f,config:fr(u)});case"daily-quiz":return(0,dn.jsx)(J1,{...f,config:fr(u)});case"matchday-predictor":return(0,dn.jsx)(Y1,{...f,config:fr(u)});case"starting-xi":return(0,dn.jsx)(Z1,{...f,config:fr(u)});case"stat-ladder":return(0,dn.jsx)(tC,{...f,config:fr(u)});case"fan-motm":return(0,dn.jsx)(nC,{...f,config:fr(u)});default:return(0,dn.jsx)("div",{className:"ss-g-screen","data-testid":`game-screen-${a}`,children:(0,dn.jsx)(Oe,{title:et({gameId:a},s.games.titles),onBack:t,backLabel:s.back})})}}return(0,dn.jsx)("div",{className:"ss-w-gscreen","data-testid":"gscreen","data-lock-at":l!=null?l:void 0,children:h()})}var sC="ss-w-games-fonts",_2="https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=Barlow:wght@400;500;600;700&display=swap";function aC(e=document){if(!e.head||e.getElementById(sC))return;let t=e.createElement("link");t.id=sC,t.rel="stylesheet",t.href=_2,e.head.appendChild(t)}var di=b(I(),1);function iC({loggedIn:e,games:t,ui:n,conversation:r,leaderboard:s,refreshHub:a}){var l;let[i,o]=(0,Pc.useState)(null);return(0,Pc.useEffect)(()=>{aC()},[]),e?i!==null?(0,di.jsx)("div",{className:"ss-w-gscreen-wrap",lang:n.games.lang,children:(0,di.jsx)(rC,{selected:i,onBack:()=>{o(null),a==null||a()},onPlayed:a,conversation:r!=null?r:null,ui:n})}):(0,di.jsx)("div",{className:"ss-g-hub-wrap","data-testid":"games-hub",lang:n.games.lang,children:(0,di.jsx)(P1,{games:t,onOpen:u=>{var c;return o({gameId:u.gameId,fixtureId:u.fixtureId,gameDay:u.gameDay,lockAtUtc:(c=u.lockAtUtc)!=null?c:null})},myWeeklyRow:(l=s==null?void 0:s.myWeeklyRow)!=null?l:null,ui:n})}):(0,di.jsx)(hc,{ui:n})}var lC=b(se(),1);var er=b(I(),1);function pi(e){return e.toLocaleString("en")}function lg({row:e,isMe:t}){let n=`ss-w-lb2-rank${e.rank<=3?" ss-w-lb2-rank--top3":""}`;return(0,er.jsxs)("div",{className:`ss-w-lb2-row${t?" ss-w-lb2-row--you":""}`,children:[(0,er.jsxs)("span",{className:n,children:["#",e.rank]}),(0,er.jsx)("span",{className:"ss-w-lb2-handle",children:e.handle}),(0,er.jsx)("span",{className:"ss-w-lb2-points",children:pi(e.points)}),e.currentStreak>0&&(0,er.jsxs)("span",{className:"ss-w-lb2-streak",children:["\u{1F525} ",e.currentStreak]})]})}function ug({row:e,isMe:t}){let n=`ss-w-lb2-rank${e.rank<=3?" ss-w-lb2-rank--top3":""}`;return(0,er.jsxs)("div",{className:`ss-w-lb2-row${t?" ss-w-lb2-row--you":""}`,children:[(0,er.jsxs)("span",{className:n,children:["#",e.rank]}),(0,er.jsx)("span",{className:"ss-w-lb2-handle",children:e.handle}),(0,er.jsx)("span",{className:"ss-w-lb2-points",children:pi(e.allTimePoints)})]})}var mt=b(I(),1);function oC({segment:e,lastWeek:t,weeklyPrize:n,onPlay:r,ui:s}){if(e==="alltime")return(0,mt.jsxs)("div",{className:"ss-w-lb-empty ss-w-lb-empty--alltime",children:[(0,mt.jsx)("div",{className:"ss-w-lb-empty-icon","aria-hidden":"true",children:"\u{1F4CA}"}),(0,mt.jsx)("p",{className:"ss-w-lb-empty-body",children:s.leaderboardAllTimeEmpty})]});let a=t!=null,i=a?s.leaderboardEmptyFreshTitle:s.leaderboardEmptyColdTitle,o=a?s.leaderboardEmptyFreshBody:s.leaderboardEmptyColdBody;return(0,mt.jsxs)("div",{className:"ss-w-lb-empty",children:[n&&(0,mt.jsxs)("div",{className:"ss-w-prize",children:[(0,mt.jsx)("span",{className:"ss-w-prize-icon","aria-hidden":"true",children:"\u{1F3C6}"}),(0,mt.jsx)("div",{className:"ss-w-prize-body",children:(0,mt.jsx)("span",{className:"ss-w-prize-text",children:n})})]}),(0,mt.jsxs)("div",{className:"ss-w-lb-empty-hero",children:[(0,mt.jsx)("div",{className:"ss-w-lb-empty-icon","aria-hidden":"true",children:a?"\u{1F3C6}":"\u{1F3AE}"}),(0,mt.jsx)("h4",{className:"ss-w-lb-empty-title",children:i}),(0,mt.jsx)("p",{className:"ss-w-lb-empty-body",children:o}),r&&(0,mt.jsx)("button",{type:"button",className:"ss-w-lb-empty-cta",onClick:r,children:s.leaderboardEmptyCta})]}),a&&t&&(0,mt.jsxs)("div",{className:"ss-w-lb-last",children:[(0,mt.jsx)("span",{className:"ss-w-lb-last-label",children:s.leaderboardLastWeekLabel}),(0,mt.jsx)("span",{className:"ss-w-lb-last-champ","aria-hidden":"true",children:"\u{1F947}"}),(0,mt.jsx)("span",{className:"ss-w-lb-last-handle",children:t.handle}),(0,mt.jsx)("span",{className:"ss-w-lb-last-points",children:pi(t.points)})]})]})}var ot=b(I(),1);function uC({data:e,ui:t,onPlay:n}){let[r,s]=(0,lC.useState)("weekly"),a=r==="weekly"?e.myWeeklyRow:e.myAllTimeRow,i=a!=null&&a.rank===-1,o=r==="weekly"?e.weeklyTop.length===0:e.allTimeTop.length===0;return(0,ot.jsxs)("div",{className:"ss-w-lb2",children:[(0,ot.jsxs)("div",{className:"ss-w-seg",children:[(0,ot.jsx)("button",{type:"button",className:"ss-w-seg-btn",...r==="weekly"?{"data-on":""}:{},onClick:()=>s("weekly"),children:t.leaderboardThisWeek}),(0,ot.jsx)("button",{type:"button",className:"ss-w-seg-btn",...r==="alltime"?{"data-on":""}:{},onClick:()=>s("alltime"),children:t.leaderboardAllTime})]}),o?(0,ot.jsx)(oC,{segment:r,lastWeek:e.lastWeek,weeklyPrize:e.weeklyPrize,onPlay:n,ui:t}):(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsx)("div",{className:"ss-w-lb2-rows",children:r==="weekly"?e.weeklyTop.map(l=>{var u;return(0,ot.jsx)(lg,{row:l,isMe:l.operatorUserId===((u=e.myWeeklyRow)==null?void 0:u.operatorUserId)},l.operatorUserId)}):e.allTimeTop.map(l=>{var u;return(0,ot.jsx)(ug,{row:l,isMe:l.operatorUserId===((u=e.myAllTimeRow)==null?void 0:u.operatorUserId)},l.operatorUserId)})}),(0,ot.jsx)("div",{className:"ss-w-kitline",children:"\u{1F3BD}"}),a!=null&&(i?(0,ot.jsx)("div",{className:"ss-w-lbgap",children:t.leaderboardOffBoard}):(0,ot.jsxs)("div",{className:"ss-w-lb2-rows",children:[r==="weekly"&&e.myWeeklyRow&&(0,ot.jsx)(lg,{row:e.myWeeklyRow,isMe:!0}),r==="alltime"&&e.myAllTimeRow&&(0,ot.jsx)(ug,{row:e.myAllTimeRow,isMe:!0})]})),r==="alltime"&&e.myAllTimeRow&&!i&&(0,ot.jsx)("div",{className:"ss-w-lb2-rows",children:(0,ot.jsx)("div",{className:"ss-w-lb2-row",children:(0,ot.jsx)("span",{className:"ss-w-lb2-handle",children:pi(e.allTimeTop.reduce((l,u)=>l+u.allTimePoints,0))})})})]})]})}var Oo=b(I(),1),j2={week:"",weeklyTop:[],myWeeklyRow:null,allTimeTop:[],myAllTimeRow:null,weeklyPrize:null,lastWeek:null};function cC({loggedIn:e,data:t,loading:n,onPlay:r,ui:s}){return e?t===null&&n?(0,Oo.jsx)("div",{className:"ss-w-mon-list"}):(0,Oo.jsx)("div",{className:"ss-w-mon-list",children:(0,Oo.jsx)(uC,{data:t!=null?t:j2,ui:s,onPlay:r})}):(0,Oo.jsx)(hc,{ui:s})}var Cn=b(I(),1),X2="(max-width: 639px)";function q2(){let[e,t]=(0,mi.useState)(!1);return(0,mi.useEffect)(()=>{if(typeof window=="undefined"||typeof window.matchMedia!="function")return;let n=window.matchMedia(X2),r=()=>t(n.matches);return r(),n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e}function dC({controller:e,ui:t,slip:n,onDashboardTap:r,monitor:s,discovery:a,gamesResult:i,leaderboardResult:o,loggedIn:l,conversation:u}){var f,h,y;let{state:c,close:d,stop:p,send:m,reset:g}=e,w=q2();(0,mi.useEffect)(()=>{let A=E=>{E.key==="Escape"&&d()};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[d]);let C=A=>{s==null||s.setActiveTab("chat"),m(A)};return(0,mi.useEffect)(()=>{s&&s.activeTab!=="chat"&&c.isStreaming&&s.markChatActivity()},[s,c.isStreaming,c.messages.length]),(0,Cn.jsxs)("div",{className:"ss-w-panel",role:"dialog","aria-modal":w,"aria-label":t.chatDialogLabel,children:[(0,Cn.jsx)(yv,{onClose:d,closeLabel:t.closeChat,logoUrl:t.logoUrl,headerTitle:t.headerTitle,onNewConversation:g,canReset:c.messages.length>0,newConversationLabel:t.newConversation,moreOptionsLabel:t.moreOptions}),s&&(0,Cn.jsx)(u1,{monitor:s,ui:t,matchCount:s.pins.filter(A=>A.kind==="match").length,oddsCount:s.pins.filter(A=>A.kind!=="match").length,todayCount:(f=a==null?void 0:a.liveCount)!=null?f:0,hasToday:a?Qa(a.groups,a.states).length>0:!1,gamesEnabled:(h=i==null?void 0:i.enabled)!=null?h:!1}),(0,Cn.jsx)("div",{style:!s||s.activeTab==="chat"?{display:"contents"}:{position:"absolute",inset:0,visibility:"hidden",display:"flex",flexDirection:"column"},children:(0,Cn.jsx)(i1,{controller:e,ui:t,slip:n,onDashboardTap:r,monitor:s})}),s&&a&&s.activeTab==="today"&&(0,Cn.jsx)(w1,{discovery:a,ui:t,monitor:s}),s&&s.activeTab==="following"&&(0,Cn.jsx)(m1,{monitor:s,ui:t,slip:n}),s&&s.activeTab==="odds"&&(0,Cn.jsx)(f1,{monitor:s,ui:t,slip:n}),s&&s.activeTab==="games"&&i&&(0,Cn.jsx)(iC,{loggedIn:!!l,games:i.games,ui:t,conversation:u,leaderboard:(y=o==null?void 0:o.data)!=null?y:null,refreshHub:()=>{i.refresh(),o==null||o.refresh()}}),s&&s.activeTab==="leaderboard"&&o&&(0,Cn.jsx)(cC,{loggedIn:!!l,data:o.data,loading:o.loading,onPlay:()=>s.setActiveTab("games"),ui:t}),(!s||s.activeTab!=="games"&&s.activeTab!=="leaderboard")&&(0,Cn.jsx)(l1,{placeholder:t.placeholder,streaming:c.isStreaming,onSend:C,onStop:p,stopLabel:t.stopResponse,sendLabel:t.sendMessage})]})}var pC=`.ss-w-root { all: revert; }
|
|
37
|
+
`))}function l(m,g,w,C){let f=w.enter("tableCell"),h=w.enter("phrasing"),y=w.containerPhrasing(m,{...C,before:a,after:a});return h(),f(),y}function u(m,g){return Sk(m,{align:g,alignDelimiters:r,padding:n,stringLength:s})}function c(m,g,w){let C=m.children,f=-1,h=[],y=g.enter("table");for(;++f<C.length;)h[f]=d(C[f],g,w);return y(),h}function d(m,g,w){let C=m.children,f=-1,h=[],y=g.enter("tableRow");for(;++f<C.length;)h[f]=l(C[f],m,g,w);return y(),h}function p(m,g,w){let C=Po.inlineCode(m,g,w);return w.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function Of(){return{exit:{taskListCheckValueChecked:qk,taskListCheckValueUnchecked:qk,paragraph:PL}}}function Bf(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ML}}}function qk(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function PL(e){let t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){let n=this.stack[this.stack.length-1];n.type;let r=n.children[0];if(r&&r.type==="text"){let s=t.children,a=-1,i;for(;++a<s.length;){let o=s[a];if(o.type==="paragraph"){i=o;break}}i===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function ML(e,t,n,r){let s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",i="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);a&&o.move(i);let l=Po.listItem(e,t,n,{...r,...o.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+i}}function Ff(){return[hf(),yf(),vf(),Df(),Of()]}function Uf(e){return{extensions:[wf(),xf(e),bf(),zf(e),Bf()]}}var RL={tokenize:FL,partial:!0},Jk={tokenize:UL,partial:!0},Kk={tokenize:QL,partial:!0},Yk={tokenize:HL,partial:!0},DL={tokenize:GL,partial:!0},$k={name:"wwwAutolink",tokenize:OL,previous:e0},Zk={name:"protocolAutolink",tokenize:BL,previous:t0},Pr={name:"emailAutolink",tokenize:zL,previous:n0},mr={};function Hf(){return{text:mr}}var ea=48;for(;ea<123;)mr[ea]=Pr,ea++,ea===58?ea=65:ea===91&&(ea=97);mr[43]=Pr;mr[45]=Pr;mr[46]=Pr;mr[95]=Pr;mr[72]=[Pr,Zk];mr[104]=[Pr,Zk];mr[87]=[Pr,$k];mr[119]=[Pr,$k];function zL(e,t,n){let r=this,s,a;return i;function i(d){return!Qf(d)||!n0.call(r,r.previous)||Gf(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(d))}function o(d){return Qf(d)?(e.consume(d),o):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(DL,c,u)(d):d===45||d===95||Ze(d)?(a=!0,e.consume(d),l):c(d)}function u(d){return e.consume(d),s=!0,l}function c(d){return a&&s&&ht(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function OL(e,t,n){let r=this;return s;function s(i){return i!==87&&i!==119||!e0.call(r,r.previous)||Gf(r.events)?n(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(RL,e.attempt(Jk,e.attempt(Kk,a),n),n)(i))}function a(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}}function BL(e,t,n){let r=this,s="",a=!1;return i;function i(d){return(d===72||d===104)&&t0.call(r,r.previous)&&!Gf(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(d),e.consume(d),o):n(d)}function o(d){if(ht(d)&&s.length<5)return s+=String.fromCodePoint(d),e.consume(d),o;if(d===58){let p=s.toLowerCase();if(p==="http"||p==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),a?u:(a=!0,l)):n(d)}function u(d){return d===null||_s(d)||he(d)||dr(d)||js(d)?n(d):e.attempt(Jk,e.attempt(Kk,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function FL(e,t,n){let r=0;return s;function s(i){return(i===87||i===119)&&r<3?(r++,e.consume(i),s):i===46&&r===3?(e.consume(i),a):n(i)}function a(i){return i===null?n(i):t(i)}}function UL(e,t,n){let r,s,a;return i;function i(u){return u===46||u===95?e.check(Yk,l,o)(u):u===null||he(u)||dr(u)||u!==45&&js(u)?l(u):(a=!0,e.consume(u),i)}function o(u){return u===95?r=!0:(s=r,r=void 0),e.consume(u),i}function l(u){return s||r||!a?n(u):t(u)}}function QL(e,t){let n=0,r=0;return s;function s(i){return i===40?(n++,e.consume(i),s):i===41&&r<n?a(i):i===33||i===34||i===38||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===93||i===95||i===126?e.check(Yk,t,a)(i):i===null||he(i)||dr(i)?t(i):(e.consume(i),s)}function a(i){return i===41&&r++,e.consume(i),s}}function HL(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),s):o===60||o===null||he(o)||dr(o)?t(o):n(o)}function s(o){return o===null||o===40||o===91||he(o)||dr(o)?t(o):r(o)}function a(o){return ht(o)?i(o):n(o)}function i(o){return o===59?(e.consume(o),r):ht(o)?(e.consume(o),i):n(o)}}function GL(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return Ze(a)?n(a):t(a)}}function e0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||he(e)}function t0(e){return!ht(e)}function n0(e){return!(e===47||Qf(e))}function Qf(e){return e===43||e===45||e===46||e===95||Ze(e)}function Gf(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var VL={tokenize:KL,partial:!0};function Vf(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:XL,continuation:{tokenize:qL},exit:JL}},text:{91:{name:"gfmFootnoteCall",tokenize:jL},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:WL,resolveTo:_L}}}}function WL(e,t,n){let r=this,s=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),i;for(;s--;){let l=r.events[s][1];if(l.type==="labelImage"){i=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!i||!i._balanced)return n(l);let u=Pt(r.sliceSerialize({start:i.end,end:r.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function _L(e,t){let n=e.length,r;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){r=e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";let s={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;let i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[e[n+1],e[n+2],["enter",s,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",s,t]];return e.splice(n,e.length-n+1,...l),e}function jL(e,t,n){let r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,i;return o;function o(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(a>999||d===93&&!i||d===null||d===91||he(d))return n(d);if(d===93){e.exit("chunkString");let p=e.exit("gfmFootnoteCallString");return s.includes(Pt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return he(d)||(i=!0),a++,e.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(e.consume(d),a++,u):u(d)}}function XL(e,t,n){let r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,i=0,o;return l;function l(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(g)}function c(g){if(i>999||g===93&&!o||g===null||g===91||he(g))return n(g);if(g===93){e.exit("chunkString");let w=e.exit("gfmFootnoteDefinitionLabelString");return a=Pt(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return he(g)||(o=!0),i++,e.consume(g),g===92?d:c}function d(g){return g===91||g===92||g===93?(e.consume(g),i++,c):c(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),s.includes(a)||s.push(a),$(e,m,"gfmFootnoteDefinitionWhitespace")):n(g)}function m(g){return t(g)}}function qL(e,t,n){return e.check(pr,t,e.attempt(VL,t,n))}function JL(e){e.exit("gfmFootnoteDefinition")}function KL(e,t,n){let r=this;return $(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){let i=r.events[r.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?t(a):n(a)}}function Wf(e){let n=(e||{}).singleTilde,r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(i,o){let l=-1;for(;++l<i.length;)if(i[l][0]==="enter"&&i[l][1].type==="strikethroughSequenceTemporary"&&i[l][1]._close){let u=l;for(;u--;)if(i[u][0]==="exit"&&i[u][1].type==="strikethroughSequenceTemporary"&&i[u][1]._open&&i[l][1].end.offset-i[l][1].start.offset===i[u][1].end.offset-i[u][1].start.offset){i[l][1].type="strikethroughSequence",i[u][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},i[u][1].start),end:Object.assign({},i[l][1].end)},d={type:"strikethroughText",start:Object.assign({},i[u][1].end),end:Object.assign({},i[l][1].start)},p=[["enter",c,o],["enter",i[u][1],o],["exit",i[u][1],o],["enter",d,o]],m=o.parser.constructs.insideSpan.null;m&&st(p,p.length,0,ms(m,i.slice(u+1,l),o)),st(p,p.length,0,[["exit",d,o],["enter",i[l][1],o],["exit",i[l][1],o],["exit",c,o]]),st(i,u-1,l-u+3,p),l=u+p.length-2;break}}for(l=-1;++l<i.length;)i[l][1].type==="strikethroughSequenceTemporary"&&(i[l][1].type="data");return i}function a(i,o,l){let u=this.previous,c=this.events,d=0;return p;function p(g){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(g):(i.enter("strikethroughSequenceTemporary"),m(g))}function m(g){let w=Lr(u);if(g===126)return d>1?l(g):(i.consume(g),d++,m);if(d<2&&!n)return l(g);let C=i.exit("strikethroughSequenceTemporary"),f=Lr(g);return C._open=!f||f===2&&!!w,C._close=!w||w===2&&!!f,o(g)}}}var sc=class{constructor(){this.map=[]}add(t,n,r){YL(this,t,n,r)}consume(t){if(this.map.sort(function(a,i){return a[0]-i[0]}),this.map.length===0)return;let n=this.map.length,r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(let a of s)t.push(a);s=r.pop()}this.map.length=0}};function YL(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function r0(e,t){let n=!1,r=[];for(;t<e.length;){let s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){let a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function _f(){return{flow:{null:{name:"table",tokenize:$L,resolveAll:ZL}}}}function $L(e,t,n){let r=this,s=0,a=0,i;return o;function o(S){let V=r.events.length-1;for(;V>-1;){let T=r.events[V][1].type;if(T==="lineEnding"||T==="linePrefix")V--;else break}let H=V>-1?r.events[V][1].type:null,N=H==="tableHead"||H==="tableRow"?x:l;return N===x&&r.parser.lazy[r.now().line]?n(S):N(S)}function l(S){return e.enter("tableHead"),e.enter("tableRow"),u(S)}function u(S){return S===124||(i=!0,a+=1),c(S)}function c(S){return S===null?n(S):W(S)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),m):n(S):ne(S)?$(e,c,"whitespace")(S):(a+=1,i&&(i=!1,s+=1),S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),i=!0,c):(e.enter("data"),d(S)))}function d(S){return S===null||S===124||he(S)?(e.exit("data"),c(S)):(e.consume(S),S===92?p:d)}function p(S){return S===92||S===124?(e.consume(S),d):d(S)}function m(S){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(S):(e.enter("tableDelimiterRow"),i=!1,ne(S)?$(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):g(S))}function g(S){return S===45||S===58?C(S):S===124?(i=!0,e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),w):E(S)}function w(S){return ne(S)?$(e,C,"whitespace")(S):C(S)}function C(S){return S===58?(a+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),f):S===45?(a+=1,f(S)):S===null||W(S)?A(S):E(S)}function f(S){return S===45?(e.enter("tableDelimiterFiller"),h(S)):E(S)}function h(S){return S===45?(e.consume(S),h):S===58?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(S))}function y(S){return ne(S)?$(e,A,"whitespace")(S):A(S)}function A(S){return S===124?g(S):S===null||W(S)?!i||s!==a?E(S):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(S)):E(S)}function E(S){return n(S)}function x(S){return e.enter("tableRow"),M(S)}function M(S){return S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),M):S===null||W(S)?(e.exit("tableRow"),t(S)):ne(S)?$(e,M,"whitespace")(S):(e.enter("data"),P(S))}function P(S){return S===null||S===124||he(S)?(e.exit("data"),M(S)):(e.consume(S),S===92?z:P)}function z(S){return S===92||S===124?(e.consume(S),P):P(S)}}function ZL(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],i=[0,0,0,0],o=!1,l=0,u,c,d,p=new sc;for(;++n<e.length;){let m=e[n],g=m[1];m[0]==="enter"?g.type==="tableHead"?(o=!1,l!==0&&(s0(p,t,l,u,c),c=void 0,l=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",u,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],i=[0,n+1,0,0],o&&(o=!1,c={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",c,t]])),s=g.type==="tableDelimiterRow"?2:c?3:1):s&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,i[2]===0&&(a[1]!==0&&(i[0]=i[1],d=ac(p,t,a,s,void 0,d),a=[0,0,0,0]),i[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(i[0]=i[1],d=ac(p,t,a,s,void 0,d)),a=i,i=[a[1],n,0,0])):g.type==="tableHead"?(o=!0,l=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=n,a[1]!==0?(i[0]=i[1],d=ac(p,t,a,s,n,d)):i[1]!==0&&(d=ac(p,t,i,s,n,d)),s=0):s&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(i[3]=n)}for(l!==0&&s0(p,t,l,u,c),p.consume(t.events),n=-1;++n<t.events.length;){let m=t.events[n];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=r0(t.events,n))}return e}function ac(e,t,n,r,s,a){let i=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(a.end=Object.assign({},$a(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));let l=$a(t.events,n[1]);if(a={type:i,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){let u=$a(t.events,n[2]),c=$a(t.events,n[3]),d={type:o,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){let p=t.events[n[2]],m=t.events[n[3]];if(p[1].end=Object.assign({},m[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){let g=n[2]+1,w=n[3]-n[2]-1;e.add(g,w,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return s!==void 0&&(a.end=Object.assign({},$a(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function s0(e,t,n,r,s){let a=[],i=$a(t.events,n);s&&(s.end=Object.assign({},i),a.push(["exit",s,t])),r.end=Object.assign({},i),a.push(["exit",r,t]),e.add(n+1,0,a)}function $a(e,t){let n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}var eP={name:"tasklistCheck",tokenize:tP};function jf(){return{text:{91:eP}}}function tP(e,t,n){let r=this;return s;function s(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),a)}function a(l){return he(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),i):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),i):n(l)}function i(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(l)}function o(l){return W(l)?t(l):ne(l)?e.check({tokenize:nP},t,n)(l):n(l)}}function nP(e,t,n){return $(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function a0(e){return Mu([Hf(),Vf(),Wf(e),_f(),jf()])}var rP={};function ic(e){let t=this,n=e||rP,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),i=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(a0(n)),a.push(Ff()),i.push(Uf(n))}var Mr=b(I(),1),sP={a:({children:e,href:t})=>(0,Mr.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"ss-w-md-link",children:e}),table:({children:e})=>(0,Mr.jsx)("div",{className:"ss-w-table-wrap",children:(0,Mr.jsx)("table",{className:"ss-w-md-table",children:e})}),ul:({children:e})=>(0,Mr.jsx)("ul",{className:"ss-w-md-ul",children:e}),ol:({children:e})=>(0,Mr.jsx)("ol",{className:"ss-w-md-ol",children:e}),code:({children:e})=>(0,Mr.jsx)("code",{className:"ss-w-md-code",children:e})};function i0({text:e}){return(0,Mr.jsx)("div",{className:"ss-w-md",children:(0,Mr.jsx)(uf,{remarkPlugins:[ic],components:sP,children:e})})}var Xf=b(se(),1),xe=b(I(),1),o0=3,aP=/^(\d+)-(\d+)-(\d+)$/;function iP(e){return e.split(/\s+/).slice(0,2).map(t=>{var n;return(n=t[0])!=null?n:""}).join("").toUpperCase()}function oP(e){return e.replace(/\d{4}/g,t=>t.slice(2))}function u0({image:e,label:t}){return(0,xe.jsx)("span",{className:"ss-w-ecard-crest",style:{backgroundImage:`url(${e})`},...t?{role:"img",title:t,"aria-label":t}:{"aria-hidden":"true"}})}function lP({w:e,d:t,l:n}){return e+t+n===0?null:(0,xe.jsxs)("span",{className:"ss-w-form","aria-hidden":"true",children:[e>0?(0,xe.jsx)("span",{className:"ss-w-form-w",style:{flexGrow:e}}):null,t>0?(0,xe.jsx)("span",{className:"ss-w-form-d",style:{flexGrow:t}}):null,n>0?(0,xe.jsx)("span",{className:"ss-w-form-l",style:{flexGrow:n}}):null]})}function uP({s:e}){let t=aP.exec(e.value);return t?(0,xe.jsxs)("div",{className:"ss-w-ecard-cell",children:[(0,xe.jsx)("span",{className:"ss-w-ecard-cval",children:(0,xe.jsx)(lP,{w:Number(t[1]),d:Number(t[2]),l:Number(t[3])})}),(0,xe.jsx)("span",{className:"ss-w-ecard-clabel",children:e.value})]}):(0,xe.jsxs)("div",{className:"ss-w-ecard-cell",children:[(0,xe.jsx)("span",{className:"ss-w-ecard-cval",children:e.value}),(0,xe.jsx)("span",{className:"ss-w-ecard-clabel",children:e.label})]})}function cP({stats:e}){if(e.length===0)return null;let t=Math.min(e.length,4);return(0,xe.jsx)("div",{className:"ss-w-ecard-strip",style:{gridTemplateColumns:`repeat(${t}, 1fr)`},children:e.map(n=>(0,xe.jsx)(uP,{s:n},n.label+n.value))})}function l0({c:e,showScopeCrest:t}){let n=e.scopes.length===1?e.scopes[0]:null;return(0,xe.jsxs)("div",{className:"ss-w-ecard-hd",children:[(0,xe.jsx)("span",{className:e.kind==="team"?"ss-w-thumb ss-w-team":"ss-w-thumb",style:e.image?{backgroundImage:`url(${e.image})`}:void 0,children:e.image?"":iP(e.name)}),(0,xe.jsxs)("span",{className:"ss-w-ecard-idtext",children:[(0,xe.jsx)("span",{className:"ss-w-nm",children:e.name}),e.sub?(0,xe.jsx)("span",{className:"ss-w-sub",children:e.sub}):null]}),(0,xe.jsxs)("span",{className:"ss-w-ecard-meta",children:[t&&(n!=null&&n.image)?(0,xe.jsx)(u0,{image:n.image,label:n.label}):null,e.season?(0,xe.jsx)("span",{className:"ss-w-ecard-season",children:oP(e.season)}):null]})]})}function dP({scopes:e,active:t,onSelect:n}){return(0,xe.jsx)("div",{className:"ss-w-ecard-scopes",role:"tablist",children:e.map((r,s)=>{var a;return(0,xe.jsx)("button",{type:"button",role:"tab",className:"ss-w-ecard-scope","aria-selected":s===t,"aria-label":r.label,title:r.label,onClick:()=>n(s),children:r.image?(0,xe.jsx)(u0,{image:r.image}):r.label},String((a=r.competitionId)!=null?a:"all"))})})}function pP({c:e}){let[t,n]=(0,Xf.useState)(0);if(!(e.scopes.length>0))return(0,xe.jsx)("div",{className:"ss-w-ecard ss-w-ecard-bare","data-kind":e.kind,children:(0,xe.jsx)(l0,{c:e,showScopeCrest:!1})});let s=e.scopes.length>1,a=e.scopes[s&&e.scopes[t]?t:0];return(0,xe.jsxs)("div",{className:"ss-w-ecard","data-kind":e.kind,children:[(0,xe.jsx)(l0,{c:e,showScopeCrest:!s}),s?(0,xe.jsx)(dP,{scopes:e.scopes,active:t,onSelect:n}):null,(0,xe.jsx)(cP,{stats:a.stats})]})}function c0({cards:e,disabled:t,showLessLabel:n="Show less",showMoreLabel:r=s=>`Show ${s} more`}){let[s,a]=(0,Xf.useState)(!1);if(e.length===0)return null;let i=s?e:e.slice(0,o0),o=e.length-o0;return(0,xe.jsxs)("div",{className:"ss-w-cards",children:[i.map(l=>(0,xe.jsx)(pP,{c:l},l.id)),o>0?(0,xe.jsx)("button",{type:"button",className:"ss-w-cards-more",disabled:t,onClick:()=>a(l=>!l),children:s?n:r(o)}):null]})}var Jf=b(se(),1);var Za=b(se(),1);var d0=b(se(),1),p0=b(I(),1),mP=4e3;function oc({toast:e,onDismiss:t}){return(0,d0.useEffect)(()=>{if(!e)return;let n=setTimeout(t,mP);return()=>clearTimeout(n)},[e,t]),e?(0,p0.jsx)("div",{className:`ss-w-toast ss-w-toast-${e.kind}`,role:"status","aria-live":"polite",children:e.text}):null}var ei=b(I(),1);function gP(e){return Promise.race([e,new Promise((t,n)=>setTimeout(()=>n(new Error("add-to-slip timed out")),1e4))])}function Mo({selection:e,shownOdds:t,marketName:n,marketDeveloperName:r,slip:s,ui:a}){let[i,o]=(0,Za.useState)(!1),[l,u]=(0,Za.useState)(!1),[c,d]=(0,Za.useState)(null),p=(0,Za.useCallback)(()=>d(null),[]),m=Ha(),g=s.onAddToSlip;return!a||!g||!e?null:(0,ei.jsxs)("div",{className:"ss-w-slip",children:[(0,ei.jsx)("button",{type:"button",className:"ss-w-slip-btn",disabled:i||l,onClick:async()=>{o(!0),r!==void 0&&(m==null||m.log({name:"slip_click",entityType:"market",marketDeveloperName:r,entityId:r}));try{let C=await gP(Promise.resolve(g(e)));if(C!=null&&!nm(C))throw new Error("malformed add-to-slip result");let f=C!=null?C:void 0;if(r!==void 0&&(m==null||m.log({name:"slip_result",entityType:"market",marketDeveloperName:r,entityId:r,outcome:wx(f)})),d(yx(f,t||e.oddsDecimal.toFixed(2),a)),u(hx(f)),yu(f)&&s.onMarketClicked)try{s.onMarketClicked(n)}catch{}}catch{r!==void 0&&(m==null||m.log({name:"slip_result",entityType:"market",marketDeveloperName:r,entityId:r,outcome:"timeout"})),d({kind:"error",text:a.slipFailed})}finally{o(!1)}},children:l?a.inSlip:a.addToSlip}),(0,ei.jsx)(oc,{toast:c,onDismiss:p})]})}function m0({it:e,slip:t,ui:n}){var s;let r=e.addToSlipEnabled?Tx(e,t.conversationId):null;return(0,ei.jsx)(Mo,{selection:r,shownOdds:(s=e.odds)!=null?s:"",marketName:e.market,marketDeveloperName:e.marketDeveloperName,slip:t,ui:n})}var Ro=b(I(),1);function ti({previous:e,current:t,direction:n,ui:r}){var i,o,l,u;if(e===void 0||n===void 0)return null;let s=n==="shortened"?(i=r==null?void 0:r.oddsShortened)!=null?i:"shortened":(o=r==null?void 0:r.oddsDrifted)!=null?o:"drifted",a=(u=(l=r==null?void 0:r.oddsMoved)==null?void 0:l.call(r,e,t,s))!=null?u:`was ${e}, now ${t}, ${s}`;return(0,Ro.jsxs)("span",{className:"ss-w-move",role:"img","aria-label":a,children:[(0,Ro.jsx)("span",{className:"ss-w-move-prev","aria-hidden":"true",children:e}),(0,Ro.jsx)("span",{className:"ss-w-move-arrow","aria-hidden":"true",children:n==="shortened"?"\u25BC":"\u25B2"})]})}var f0=b(se(),1),qf=b(I(),1);function hP(e){return(e!=null?e:"").trim().slice(0,1).toUpperCase()||"?"}function at({url:e,name:t,kind:n}){let r=n==="comp"?"ss-w-bi-comp-logo":"ss-w-bi-crest",[s,a]=(0,f0.useState)(!1);return e&&!s?(0,qf.jsx)("img",{className:r,src:e,alt:"","aria-hidden":"true",onError:()=>a(!0)}):(0,qf.jsx)("span",{className:`${r} ss-w-bi-crest-mono`,"aria-hidden":"true",children:hP(t)})}var lc=b(se(),1);var ta=b(I(),1),wP={pin:{viewBox:"0 0 24 24",strokeWidth:1.4,transform:"scale(1.5)",d:"M9.5 1.5 14.5 6.5 13 8l-.5-.5-3 3 .3 2.2-1.4 1.4L5.6 11.3l-3.3 3.3-1-1 3.3-3.3L1.9 7.5l1.4-1.4 2.2.3 3-3L8 2.9z"},star:{viewBox:"0 0 24 24",strokeWidth:2,d:"M12 2.5l2.9 5.9 6.5.95-4.7 4.58 1.1 6.47L12 17.35 6.1 20.4l1.1-6.47L2.5 9.35l6.5-.95z"},bookmark:{viewBox:"0 0 24 24",strokeWidth:2,d:"M7 3h10a1.5 1.5 0 0 1 1.5 1.5V21l-6.5-3.6L5.5 21V4.5A1.5 1.5 0 0 1 7 3z"}};function ln({pin:e,monitor:t,ui:n}){let[r,s]=(0,lc.useState)(null),a=(0,lc.useCallback)(()=>s(null),[]),i=Ha();if(!t||!t.enabled)return null;let o=Hx(e),l=t.isPinned(o),u=e.kind==="match"?{pin:n.matchPinLabel,unpin:n.matchUnpinLabel}:{pin:n.pinLabel,unpin:n.unpinLabel},c=()=>{let p=t.togglePin({...e,key:o});(p==="added"||p==="removed")&&(e.kind==="match"||e.marketDeveloperName!==void 0)?i==null||i.log({name:p==="added"?"pin_add":"pin_remove",entityType:e.kind==="match"?"match":"market",entityId:e.kind==="match"?String(e.matchId):e.marketDeveloperName,marketDeveloperName:e.marketDeveloperName}):p==="match_limit"?s({kind:"error",text:n.matchLimitToast}):p==="market_limit"&&s({kind:"error",text:n.marketLimitToast})},d=wP[n.pinIcon];return(0,ta.jsxs)("div",{className:"ss-w-pin-wrap",children:[(0,ta.jsx)("button",{type:"button",className:"ss-w-pin","data-on":l||void 0,"data-icon":n.pinIcon,"aria-pressed":l,"aria-label":l?u.unpin:u.pin,onClick:c,children:(0,ta.jsx)("svg",{viewBox:d.viewBox,"aria-hidden":"true",children:(0,ta.jsx)("path",{transform:d.transform,d:d.d,fill:l?"currentColor":"none",stroke:l?"none":"currentColor",strokeWidth:d.strokeWidth,strokeLinejoin:"round",strokeLinecap:"round"})})}),(0,ta.jsx)(oc,{toast:r,onDismiss:a})]})}var j=b(I(),1);function h0({stats:e}){return(0,j.jsx)("div",{className:"ss-w-bi-rows",children:e.map(t=>(0,j.jsxs)("div",{className:"ss-w-bi-row",children:[(0,j.jsx)("span",{className:"ss-w-bi-row-lbl",children:t.label}),(0,j.jsx)("span",{className:"ss-w-bi-row-num",children:t.value})]},`${t.label}:${t.value}`))})}function yP({scopes:e}){var s,a;let[t,n]=(0,Jf.useState)(0),r=(a=(s=e[t])!=null?s:e[0])!=null?a:{key:"",label:"",stats:[]};return(0,j.jsxs)("div",{className:"ss-w-bi-scoped",children:[(0,j.jsx)("div",{className:"ss-w-bi-scopes",role:"group",children:e.map((i,o)=>(0,j.jsx)("button",{type:"button",className:"ss-w-bi-chip","aria-pressed":o===t,onClick:()=>n(o),children:i.label},i.key))}),(0,j.jsx)(h0,{stats:r.stats},r.key)]})}function xP(e){return!!e.scopes&&e.scopes.length>=2||e.stats.length>0}function vP({it:e,ui:t}){var c,d,p,m;let[n,r]=(0,Jf.useState)(!1),s=Ha(),a=!!e.scopes&&e.scopes.length>=2,i=xP(e),o=!!e.text;if(!o&&!i)return null;let l=i||((d=(c=e.text)==null?void 0:c.length)!=null?d:0)>90,u=()=>{r(g=>{let w=!g;return w&&(s==null||s.log({name:"insight_expand",entityType:"match",entityId:String(e.matchId)})),w})};return(0,j.jsxs)("div",{className:"ss-w-bi-reason",children:[(0,j.jsx)("span",{className:"ss-w-bi-chart","aria-hidden":"true"}),(0,j.jsxs)("div",{className:"ss-w-bi-reason-body",children:[o?(0,j.jsx)("p",{className:`ss-w-bi-text${n?"":" ss-w-bi-text-clamp"}`,children:e.text}):null,n&&i?a?(0,j.jsx)(yP,{scopes:e.scopes}):(0,j.jsx)(h0,{stats:e.stats}):null]}),l?(0,j.jsx)("button",{type:"button",className:"ss-w-bi-expand","aria-expanded":n,"aria-label":n?(p=t==null?void 0:t.hideStats)!=null?p:"Hide stats":(m=t==null?void 0:t.showStats)!=null?m:"Show stats",onClick:u,children:(0,j.jsx)("span",{className:`ss-w-bi-arrow${n?" ss-w-bi-arrow-open":""}`,"aria-hidden":"true"})}):null]})}function g0({it:e}){return e.homeTeamName&&e.awayTeamName?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(at,{kind:"team",url:e.homeCrest,name:e.homeTeamName}),(0,j.jsx)("span",{className:"ss-w-bi-team",children:e.homeTeamName}),(0,j.jsx)("span",{className:"ss-w-bi-vs","aria-hidden":"true",children:"vs"}),(0,j.jsx)("span",{className:"ss-w-bi-team",children:e.awayTeamName}),(0,j.jsx)(at,{kind:"team",url:e.awayCrest,name:e.awayTeamName})]}):e.fixture?(0,j.jsx)("span",{className:"ss-w-bi-fixture-txt",children:e.fixture}):e.competition?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(at,{kind:"comp",url:e.competitionCrest,name:e.competition}),(0,j.jsx)("span",{className:"ss-w-bi-comp",children:e.competition})]}):null}function bP({it:e,ui:t,slip:n,monitor:r}){var p,m,g;let s=e.isLive||e.phase==="live",a=e.kickoffUtc&&(t!=null&&t.bettingKickoff)?t.bettingKickoff(e.kickoffUtc):void 0,i=(p=e.kickoffLabel)!=null?p:a?`${a.dayLabel} ${a.time}`:void 0,l=!!e.homeTeamName&&!!e.awayTeamName||!!e.fixture,u=!!r&&e.pinEnabled,c=l||!!e.competition||s||!!i||u,d=(0,j.jsxs)(j.Fragment,{children:[s?(0,j.jsxs)("span",{className:"ss-w-bi-live",children:[(0,j.jsx)("span",{className:"ss-w-bi-live-dot","aria-hidden":"true"}),(m=t==null?void 0:t.liveLabel)!=null?m:"Live"]}):null,i?(0,j.jsx)("span",{className:"ss-w-bi-kick",children:i}):null,u&&t?(0,j.jsx)(ln,{ui:t,monitor:r,pin:{kind:"match",matchId:e.matchId}}):null]});return(0,j.jsxs)("div",{className:"ss-w-binsight",children:[c?l?(0,j.jsxs)("div",{className:"ss-w-bi-head",children:[e.competition||s||i||u?(0,j.jsxs)("div",{className:"ss-w-bi-meta",children:[(0,j.jsx)("span",{className:"ss-w-bi-meta-left",children:e.competition?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(at,{kind:"comp",url:e.competitionCrest,name:e.competition}),(0,j.jsx)("span",{className:"ss-w-bi-comp",children:e.competition})]}):null}),(0,j.jsx)("span",{className:"ss-w-bi-meta-right",children:d})]}):null,(0,j.jsx)("div",{className:"ss-w-bi-fixture-line",children:(0,j.jsx)(g0,{it:e})})]}):(0,j.jsxs)("div",{className:"ss-w-bi-header",children:[(0,j.jsx)("span",{className:"ss-w-bi-header-left",children:(0,j.jsx)(g0,{it:e})}),(0,j.jsx)("span",{className:"ss-w-bi-header-right",children:d})]}):null,(0,j.jsxs)("div",{className:"ss-w-bi-action",children:[e.market?(0,j.jsx)("span",{className:"ss-w-bi-market",children:e.market}):null,(0,j.jsxs)("div",{className:"ss-w-bi-pick-row",children:[e.selection?(0,j.jsx)("span",{className:"ss-w-bi-sel",children:e.selection}):null,e.odds?(0,j.jsxs)("span",{className:"ss-w-bi-odds",children:[(0,j.jsx)("b",{children:e.odds}),(0,j.jsx)(ti,{previous:e.previousOdds,current:e.odds,direction:e.movementDirection,ui:t}),e.bookmaker?(0,j.jsx)("span",{className:"ss-w-bi-book",children:e.bookmaker}):null]}):null,(0,j.jsx)(m0,{it:e,slip:n,ui:t}),u&&t?(0,j.jsx)(ln,{ui:t,monitor:r,pin:{kind:"selection",matchId:e.matchId,marketDeveloperName:e.marketDeveloperName,selectionLabel:e.selectionLabel,line:e.line,matchOddsId:e.matchOddsId}}):null]})]}),e.isMarketFloor?(0,j.jsx)("span",{className:"ss-w-bi-floor",children:(g=t==null?void 0:t.marketFloorLabel)!=null?g:"Market price \xB7 not a value pick"}):null,(0,j.jsx)(vP,{it:e,ui:t}),e.disclaimer?(0,j.jsx)("p",{className:"ss-w-bi-disc",children:e.disclaimer}):null]})}function w0({insights:e,ui:t,slip:n,monitor:r}){return!e||e.length===0?null:(0,j.jsx)("div",{className:"ss-w-binsights",children:e.map(s=>(0,j.jsx)(bP,{it:s,ui:t,slip:n,monitor:r},s.id))})}var x0=b(se(),1);var ue=b(I(),1);function y0({vm:e,row:t,ui:n,slip:r,inSlipIds:s}){let a=e.addToSlipEnabled?Lx(e,t,r.conversationId):null,i=!!s&&t.matchOddsId!=null&&!!s[t.matchOddsId];return(0,ue.jsxs)("div",{className:"ss-w-mo-row",children:[(0,ue.jsx)("span",{className:"ss-w-mo-sel",children:t.selection}),(0,ue.jsx)(ti,{previous:t.previousOdds,current:t.odds,direction:t.movementDirection,ui:n}),(0,ue.jsx)("span",{className:"ss-w-mo-price",children:t.odds}),i&&n?(0,ue.jsxs)("span",{className:"ss-w-mon-inslip",children:["\u2713 ",n.inSlipLabel]}):null,(0,ue.jsx)(Mo,{selection:a,shownOdds:t.odds,marketName:e.market,marketDeveloperName:e.marketDeveloperName,slip:r,ui:n})]})}function kP({vm:e,ui:t,slip:n,monitor:r,inSlipIds:s,hideHeader:a,pinRef:i}){var w,C,f,h;let[o,l]=(0,x0.useState)(!1),u=e.kickoffUtc&&(t!=null&&t.bettingKickoff)?t.bettingKickoff(e.kickoffUtc):void 0,c=(w=e.kickoffLabel)!=null?w:u?`${u.dayLabel} ${u.time}`:void 0,d=!!e.homeTeamName&&!!e.awayTeamName,p=!!r&&e.pinEnabled,m=p&&!i,g=!!e.competition||e.isLive||!!c||p;return(0,ue.jsxs)("div",{className:a?"ss-w-mocard ss-w-mocard--bare":"ss-w-mocard",children:[!a&&(0,ue.jsxs)(ue.Fragment,{children:[g?(0,ue.jsxs)("div",{className:"ss-w-bi-header",children:[(0,ue.jsx)("span",{className:"ss-w-bi-header-left",children:e.competition?(0,ue.jsxs)(ue.Fragment,{children:[(0,ue.jsx)(at,{kind:"comp",url:e.competitionCrest,name:e.competition}),(0,ue.jsx)("span",{className:"ss-w-bi-comp",children:e.competition})]}):null}),(0,ue.jsxs)("span",{className:"ss-w-bi-header-right",children:[e.isLive?(0,ue.jsxs)("span",{className:"ss-w-bi-live",children:[(0,ue.jsx)("span",{className:"ss-w-bi-live-dot","aria-hidden":"true"}),(C=t==null?void 0:t.liveLabel)!=null?C:"Live"]}):null,c?(0,ue.jsx)("span",{className:"ss-w-bi-kick",children:c}):null,p&&t?(0,ue.jsx)(ln,{ui:t,monitor:r,pin:i!=null?i:{kind:"match",matchId:e.matchId}}):null]})]}):null,d||e.fixture||e.market||m?(0,ue.jsxs)("div",{className:"ss-w-mo-sub",children:[d?(0,ue.jsxs)("div",{className:"ss-w-bi-fixture",children:[(0,ue.jsx)(at,{kind:"team",url:e.homeCrest,name:e.homeTeamName}),(0,ue.jsx)("span",{className:"ss-w-bi-team",children:e.homeTeamName}),(0,ue.jsx)("span",{className:"ss-w-bi-vs","aria-hidden":"true",children:"vs"}),(0,ue.jsx)("span",{className:"ss-w-bi-team",children:e.awayTeamName}),(0,ue.jsx)(at,{kind:"team",url:e.awayCrest,name:e.awayTeamName})]}):e.fixture?(0,ue.jsx)("span",{className:"ss-w-mo-teams",children:e.fixture}):null,e.market||m?(0,ue.jsxs)("div",{className:"ss-w-mo-market-row",children:[e.market?(0,ue.jsx)("span",{className:"ss-w-mo-market",children:e.market}):null,m&&t?(0,ue.jsx)(ln,{ui:t,monitor:r,pin:{kind:"market",matchId:e.matchId,marketDeveloperName:e.marketDeveloperName,line:e.mainLine}}):null]}):null]}):null]}),(0,ue.jsxs)("div",{className:"ss-w-mo-rows",children:[e.mainRows.map(y=>(0,ue.jsx)(y0,{vm:e,row:y,ui:t,slip:n,inSlipIds:s},y.key)),o?e.moreRows.map(y=>(0,ue.jsx)(y0,{vm:e,row:y,ui:t,slip:n,inSlipIds:s},y.key)):null]}),e.moreRows.length>0?(0,ue.jsxs)("button",{type:"button",className:"ss-w-mo-more","aria-expanded":o,onClick:()=>l(y=>!y),children:[(0,ue.jsx)("span",{children:o?(f=t==null?void 0:t.hideLines)!=null?f:"Hide lines":`${(h=t==null?void 0:t.moreLines)!=null?h:"More lines"} (${e.moreRows.length})`}),(0,ue.jsx)("span",{className:`ss-w-mo-more-chev${o?" ss-w-mo-more-chev-up":""}`,"aria-hidden":"true"})]}):null,e.bookmaker?(0,ue.jsx)("div",{className:"ss-w-mo-foot",children:(0,ue.jsx)("span",{children:e.bookmaker})}):null,e.disclaimer?(0,ue.jsx)("p",{className:"ss-w-bi-disc",children:e.disclaimer}):null]})}function ni({cards:e,ui:t,slip:n,monitor:r,inSlipIds:s,hideHeader:a,pinRef:i}){return!e||e.length===0?null:(0,ue.jsx)("div",{className:"ss-w-mocards",children:e.map(o=>(0,ue.jsx)(kP,{vm:o,ui:t,slip:n,monitor:r,inSlipIds:s,hideHeader:a,pinRef:i},o.id))})}var ye=b(I(),1);function SP(e,t){var n,r;return e.direction==="shortened"?(n=t==null?void 0:t.oddsShortened)!=null?n:"shortened":e.direction==="drifted"?(r=t==null?void 0:t.oddsDrifted)!=null?r:"drifted":""}function AP({vm:e,ui:t,monitor:n}){var o,l,u,c,d,p;let r=SP(e,t),s=r?`, ${r}`:"",a=t!=null&&t.chartAria?t.chartAria(e.opening,e.current,r,e.windowHours):`Price movement over the last ${e.windowHours} hours: opened at ${e.opening}, currently ${e.current}${s}.`,i=!!n&&e.pinEnabled;return(0,ye.jsxs)("div",{className:"ss-w-omcard",children:[(0,ye.jsxs)("div",{className:"ss-w-om-head",children:[(0,ye.jsx)("span",{className:"ss-w-om-market",children:e.market}),(0,ye.jsx)("span",{className:"ss-w-om-tag",children:(o=t==null?void 0:t.priceMovement)!=null?o:"Price movement"}),i&&t?(0,ye.jsx)(ln,{ui:t,monitor:n,pin:{kind:"selection",matchId:e.matchId,marketDeveloperName:e.marketDeveloperName,selectionLabel:e.selectionLabel,line:e.line,withHistory:!0,matchOddsId:e.matchOddsId}}):null]}),e.fixture?(0,ye.jsxs)("div",{className:"ss-w-om-fixture",children:[(0,ye.jsx)("span",{children:e.fixture}),e.competition?(0,ye.jsx)("span",{className:"ss-w-om-comp",children:e.competition}):null]}):null,(0,ye.jsx)("div",{className:"ss-w-om-sel",children:e.selection}),(0,ye.jsx)(ti,{previous:e.opening,current:e.current,direction:e.direction,ui:t}),e.geometry===null?(0,ye.jsx)("div",{className:"ss-w-om-empty",children:e.observationCount===1?(l=t==null?void 0:t.singlePricePoint)!=null?l:"Only one price recorded so far for this selection.":(u=t==null?void 0:t.notEnoughHistory)!=null?u:"No price history recorded yet for this selection."}):(0,ye.jsxs)("svg",{className:"ss-w-om-chart",viewBox:e.geometry.viewBox,width:"100%",role:"img","aria-label":a,children:[e.geometry.gridlines.map(m=>(0,ye.jsxs)("g",{children:[(0,ye.jsx)("line",{className:"ss-w-om-grid",x1:40,y1:m.y,x2:312,y2:m.y}),(0,ye.jsx)("text",{className:"ss-w-om-ylab",x:34,y:m.y+3,textAnchor:"end",children:m.price.toFixed(2)})]},m.price)),(0,ye.jsx)("path",{className:"ss-w-om-line",d:e.geometry.path,fill:"none"}),e.geometry.markers.map((m,g)=>(0,ye.jsx)("circle",{className:"ss-w-om-dot",cx:m.x,cy:m.y,r:2.5},g)),t!=null&&t.chartTimeLabel?(0,ye.jsxs)(ye.Fragment,{children:[(0,ye.jsx)("text",{className:"ss-w-om-xlab",x:40,y:132,textAnchor:"start",children:t.chartTimeLabel(e.geometry.startMs)}),(0,ye.jsx)("text",{className:"ss-w-om-xlab",x:312,y:132,textAnchor:"end",children:t.chartTimeLabel(e.geometry.endMs)})]}):(0,ye.jsx)("text",{className:"ss-w-om-xlab",x:40,y:132,children:t!=null&&t.movementWindow?t.movementWindow(e.windowHours):`Last ${e.windowHours}h`})]}),(0,ye.jsxs)("div",{className:"ss-w-om-foot",children:[(0,ye.jsxs)("span",{children:[(c=t==null?void 0:t.openingLabel)!=null?c:"Opening"," ",(0,ye.jsx)("b",{children:e.opening})]}),(0,ye.jsxs)("span",{children:[(d=t==null?void 0:t.currentLabel)!=null?d:"Current"," ",(0,ye.jsx)("b",{children:e.current})]})]}),e.bookmaker?(0,ye.jsx)("div",{className:"ss-w-om-foot",children:(0,ye.jsx)("span",{children:e.bookmaker})}):null,e.excludedCount>0?(0,ye.jsx)("div",{className:"ss-w-om-excl",children:t!=null&&t.excludedSuspended?t.excludedSuspended(e.excludedCount):`${e.excludedCount} suspended price(s) excluded from this chart.`}):null,e.isSuspended?(0,ye.jsx)("div",{className:"ss-w-om-susp",children:(p=t==null?void 0:t.selectionSuspended)!=null?p:"This selection is not currently available to bet."}):null,e.disclaimer?(0,ye.jsx)("div",{className:"ss-w-om-disc",children:e.disclaimer}):null]})}function uc({cards:e,ui:t,monitor:n}){return!e||e.length===0?null:(0,ye.jsx)("div",{className:"ss-w-omcards",children:e.map(r=>(0,ye.jsx)(AP,{vm:r,ui:t,monitor:n},r.id))})}var Rr=b(I(),1);function cc({actions:e,loading:t,disabled:n,onAct:r}){return e.length===0&&!t?null:(0,Rr.jsxs)("div",{className:"ss-w-actions",children:[e.map((s,a)=>(0,Rr.jsx)("button",{type:"button",className:"ss-w-abtn",disabled:n,onClick:()=>r(s),children:s.label},`${s.label}-${a}`)),e.length===0&&t?(0,Rr.jsxs)(Rr.Fragment,{children:[(0,Rr.jsx)("span",{className:"ss-w-abtn-shimmer"}),(0,Rr.jsx)("span",{className:"ss-w-abtn-shimmer"})]}):null]})}var un=b(I(),1),EP=3;function b0({tile:e,onTap:t}){var a;let n=e.span==="full"?"ss-w-dash-tile--full":"ss-w-dash-tile--half",r=((a=e.imageUrls)!=null?a:[]).slice(0,EP),s=!!e.badgeText||r.length>0;return(0,un.jsxs)("button",{type:"button",className:`ss-w-dash-tile ${n}`,onClick:t,children:[(0,un.jsx)("span",{className:"ss-w-dash-tile-icon",children:(0,un.jsx)(fv,{name:e.icon})}),(0,un.jsxs)("span",{className:"ss-w-dash-tile-body",children:[(0,un.jsx)("span",{className:"ss-w-dash-tile-title",children:e.title}),e.subtitle?(0,un.jsx)("span",{className:"ss-w-dash-tile-subtitle",children:e.subtitle}):null,s?(0,un.jsxs)("span",{className:"ss-w-dash-tile-meta",children:[e.badgeText?(0,un.jsx)("span",{className:"ss-w-dash-tile-badge",children:e.badgeText}):null,r.length>0?(0,un.jsx)("span",{className:"ss-w-dash-tile-crests",children:r.map((i,o)=>(0,un.jsx)("span",{className:"ss-w-dash-tile-crest",style:{backgroundImage:`url(${i})`},"aria-hidden":"true"},`${i}-${o}`))}):null]}):null]}),(0,un.jsx)("span",{className:"ss-w-dash-tile-chevron",children:(0,un.jsx)(Cu,{})})]})}var Dr=b(I(),1),Kf={market:"ss-w-dash--market",goal:"ss-w-dash--goal",discovery:"ss-w-dash--discovery"};function IP(e){return Object.prototype.hasOwnProperty.call(Kf,e)?Kf[e]:Kf.goal}function k0({dashboard:e,onTap:t}){return(0,Dr.jsxs)("div",{className:`ss-w-dash ${IP(e.layout)}`,children:[(0,Dr.jsxs)("div",{className:"ss-w-dash-head",children:[(0,Dr.jsx)("span",{className:"ss-w-dash-title",children:e.title}),e.subtitle?(0,Dr.jsx)("span",{className:"ss-w-dash-subtitle",children:e.subtitle}):null]}),(0,Dr.jsx)("div",{className:"ss-w-dash-grid",children:e.tiles.map((n,r)=>(0,Dr.jsx)(b0,{tile:n,onTap:()=>t(n,r)},`${n.title}-${r}`))}),e.footerTip?(0,Dr.jsx)("span",{className:"ss-w-dash-foot",children:e.footerTip}):null]})}var re=b(I(),1);function NP(e){return e==="W"?"ss-w-fandash-teamform-cell--win":e==="L"?"ss-w-fandash-teamform-cell--loss":"ss-w-fandash-teamform-cell--draw"}function C0({m:e,subjectCrestUrl:t,subjectName:n}){var i;let r=(0,re.jsx)(at,{url:t!=null?t:void 0,name:n,kind:"team"}),s=(0,re.jsx)(at,{url:(i=e.opponentCrestUrl)!=null?i:void 0,kind:"team"}),a=e.teamIsHome?`${e.teamScore} - ${e.oppScore}`:`${e.oppScore} - ${e.teamScore}`;return(0,re.jsxs)("div",{className:`ss-w-fandash-teamform-cell ${NP(e.result)}`,children:[e.teamIsHome?r:s,(0,re.jsx)("span",{className:"ss-w-fandash-teamform-score",children:a}),e.teamIsHome?s:r]})}var TP=5;function LP(e){return Array.from({length:TP},(t,n)=>n).flatMap(t=>[(0,re.jsx)("span",{className:"ss-w-fandash-teamform-slot",children:e.homeForm[t]?(0,re.jsx)(C0,{m:e.homeForm[t],subjectCrestUrl:e.homeCrestUrl,subjectName:e.homeName}):null},`h-${t}`),(0,re.jsx)("span",{className:"ss-w-fandash-teamform-slot",children:e.awayForm[t]?(0,re.jsx)(C0,{m:e.awayForm[t],subjectCrestUrl:e.awayCrestUrl,subjectName:e.awayName}):null},`a-${t}`)])}function S0({card:e}){var r,s,a,i;let{data:t}=e,n=t.h2H;return(0,re.jsxs)(re.Fragment,{children:[(0,re.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-fixture",children:[(0,re.jsxs)("span",{className:"ss-w-fandash-eyebrow",children:[e.title," \xB7 ",t.competition]}),(0,re.jsxs)("div",{className:"ss-w-fandash-fixture-teams",children:[(0,re.jsxs)("span",{className:"ss-w-fandash-fixture-team",children:[(0,re.jsx)(at,{url:(r=t.homeCrestUrl)!=null?r:void 0,name:t.homeName,kind:"team"}),(0,re.jsx)("span",{className:"ss-w-fandash-fixture-name",children:t.homeName})]}),(0,re.jsx)("span",{className:"ss-w-fandash-fixture-vs",children:"v"}),(0,re.jsxs)("span",{className:"ss-w-fandash-fixture-team ss-w-fandash-fixture-team--away",children:[(0,re.jsx)("span",{className:"ss-w-fandash-fixture-name",children:t.awayName}),(0,re.jsx)(at,{url:(s=t.awayCrestUrl)!=null?s:void 0,name:t.awayName,kind:"team"})]})]}),(0,re.jsxs)("div",{className:"ss-w-fandash-fixture-meta",children:[(0,re.jsx)("span",{className:"ss-w-fandash-fixture-kickoff",children:t.kickoffLabel}),t.venue?(0,re.jsxs)("span",{className:"ss-w-fandash-fixture-venue",children:[" \xB7 ",t.venue]}):null]})]}),(0,re.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-lastfive",children:[(0,re.jsx)("span",{className:"ss-w-fandash-eyebrow",children:t.formLabel}),(0,re.jsxs)("div",{className:"ss-w-fandash-teamform-head",children:[(0,re.jsxs)("span",{className:"ss-w-fandash-teamform-head-team",children:[(0,re.jsx)(at,{url:(a=t.homeCrestUrl)!=null?a:void 0,name:t.homeName,kind:"team"}),(0,re.jsx)("span",{className:"ss-w-fandash-teamform-head-name",children:t.homeName})]}),(0,re.jsxs)("span",{className:"ss-w-fandash-teamform-head-team",children:[(0,re.jsx)(at,{url:(i=t.awayCrestUrl)!=null?i:void 0,name:t.awayName,kind:"team"}),(0,re.jsx)("span",{className:"ss-w-fandash-teamform-head-name",children:t.awayName})]})]}),(0,re.jsx)("div",{className:"ss-w-fandash-teamform-rows",children:LP(t)})]}),n||t.fact?(0,re.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-h2h",children:[n?(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)("span",{className:"ss-w-fandash-eyebrow",children:n.label}),(0,re.jsxs)("div",{className:"ss-w-fandash-split",children:[(0,re.jsxs)("span",{className:"ss-w-fandash-split-cell",children:[(0,re.jsx)("span",{className:"ss-w-fandash-split-value",children:n.wins}),(0,re.jsx)("span",{className:"ss-w-fandash-split-label",children:n.homeWinsLabel})]}),(0,re.jsxs)("span",{className:"ss-w-fandash-split-cell",children:[(0,re.jsx)("span",{className:"ss-w-fandash-split-value",children:n.draws}),(0,re.jsx)("span",{className:"ss-w-fandash-split-label",children:n.drawsLabel})]}),(0,re.jsxs)("span",{className:"ss-w-fandash-split-cell",children:[(0,re.jsx)("span",{className:"ss-w-fandash-split-value",children:n.losses}),(0,re.jsx)("span",{className:"ss-w-fandash-split-label",children:n.awayWinsLabel})]})]})]}):null,t.fact?(0,re.jsx)("span",{className:"ss-w-fandash-fact",children:t.fact}):null]}):null]})}var na=b(se(),1),Jn=b(I(),1),PP=864e5;function MP(e,t,n){let r=Math.floor((e*1e3-t)/1e3);if(r<=0)return null;let s=Math.floor(r/86400),a=Math.floor(r%86400/3600),i=Math.floor(r%3600/60),o=r%60,l=c=>String(c).padStart(2,"0");if(s>0)return[{value:l(s),unit:"d"},{value:l(a),unit:"h"}];let u=[{value:l(a),unit:"h"},{value:l(i),unit:"m"}];return n&&u.push({value:l(o),unit:"s"}),u}function A0({card:e}){var l;let{data:t}=e,n={d:t.daysUnit,h:t.hoursUnit,m:t.minutesUnit,s:t.secondsUnit},[r,s]=(0,na.useState)(()=>Date.now()),[a]=(0,na.useState)(()=>typeof window!="undefined"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches),i=t.kickoffUnix*1e3-r<PP;(0,na.useEffect)(()=>{if(a)return;let u=window.setInterval(()=>s(Date.now()),i?1e3:6e4);return()=>window.clearInterval(u)},[a,i]);let o=MP(t.kickoffUnix,r,i&&!a);return(0,Jn.jsx)("div",{className:"ss-w-fandash-card ss-w-fandash-countdown",children:(0,Jn.jsxs)("div",{className:"ss-w-fandash-countdown-top",children:[(0,Jn.jsx)("span",{className:"ss-w-fandash-eyebrow",children:(l=e.title)!=null?l:"Kick-off in"}),o?(0,Jn.jsx)("span",{className:"ss-w-fandash-countdown-clock",children:o.map((u,c)=>(0,Jn.jsxs)(na.Fragment,{children:[c>0?(0,Jn.jsx)("span",{className:"ss-w-fandash-countdown-colon",children:":"}):null,(0,Jn.jsxs)("span",{className:"ss-w-fandash-countdown-seg",children:[(0,Jn.jsx)("span",{className:"ss-w-fandash-countdown-value",children:u.value}),(0,Jn.jsx)("span",{className:"ss-w-fandash-countdown-unit",children:n[u.unit]})]})]},u.unit))}):null]})})}var N0=b(se(),1);var Ge=b(I(),1),Yf=3;function E0({name:e,crestUrl:t}){return(0,Ge.jsxs)("span",{className:"ss-w-fandash-injuries-col-head",children:[(0,Ge.jsx)(at,{url:t!=null?t:void 0,name:e,kind:"team"}),(0,Ge.jsx)("span",{className:"ss-w-fandash-injuries-col-head-name",children:e})]})}function I0({rows:e,emptyLabel:t,limit:n}){if(e.length===0)return(0,Ge.jsx)("span",{className:"ss-w-fandash-injuries-empty",children:t});let r=n===void 0?e:e.slice(0,n);return(0,Ge.jsx)("ul",{className:"ss-w-fandash-injury-list",children:r.map((s,a)=>(0,Ge.jsxs)("li",{className:"ss-w-fandash-injury-row",children:[(0,Ge.jsx)("span",{className:"ss-w-fandash-injury-name",children:s.playerName}),(0,Ge.jsxs)("span",{className:"ss-w-fandash-injury-meta",children:[(0,Ge.jsx)("span",{className:"ss-w-fandash-injury-status",children:s.status}),s.injuryType?(0,Ge.jsx)("span",{className:"ss-w-fandash-injury-type",children:s.injuryType}):null,s.expectedReturnLabel?(0,Ge.jsx)("span",{className:"ss-w-fandash-injury-return",children:s.expectedReturnLabel}):null]})]},`${s.playerName}-${a}`))})}function T0({card:e,ui:t}){var d,p;let{data:n}=e,[r,s]=(0,N0.useState)(!1),a=Math.max(0,n.ours.length-Yf)+Math.max(0,n.theirs.length-Yf),i=r?void 0:Yf,o=(d=t==null?void 0:t.showMore)!=null?d:(m=>`Show ${m} more`),l=(p=t==null?void 0:t.showLess)!=null?p:"Show less",u=n.oursIsHome?{name:n.oursName,crest:n.oursCrestUrl,rows:n.ours}:{name:n.theirsName,crest:n.theirsCrestUrl,rows:n.theirs},c=n.oursIsHome?{name:n.theirsName,crest:n.theirsCrestUrl,rows:n.theirs}:{name:n.oursName,crest:n.oursCrestUrl,rows:n.ours};return(0,Ge.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-injuries",children:[e.title?(0,Ge.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,Ge.jsxs)("div",{className:"ss-w-fandash-injuries-cols",children:[(0,Ge.jsxs)("div",{className:"ss-w-fandash-injuries-col",children:[(0,Ge.jsx)(E0,{name:u.name,crestUrl:u.crest}),(0,Ge.jsx)(I0,{rows:u.rows,emptyLabel:n.emptyLabel,limit:i})]}),(0,Ge.jsx)("div",{className:"ss-w-fandash-injuries-divider"}),(0,Ge.jsxs)("div",{className:"ss-w-fandash-injuries-col",children:[(0,Ge.jsx)(E0,{name:c.name,crestUrl:c.crest}),(0,Ge.jsx)(I0,{rows:c.rows,emptyLabel:n.emptyLabel,limit:i})]})]}),a>0?(0,Ge.jsx)("button",{type:"button",className:"ss-w-fandash-injuries-more","aria-expanded":r,onClick:()=>s(m=>!m),children:r?l:o(a)}):null]})}var ri=b(I(),1);function L0({card:e}){return(0,ri.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-reasons",children:[e.title?(0,ri.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,ri.jsx)("ul",{className:"ss-w-fandash-reason-list",children:e.data.angles.map((t,n)=>(0,ri.jsx)("li",{className:"ss-w-fandash-reason-item",children:t},`${t}-${n}`))})]})}var si=b(I(),1);function P0({card:e}){return(0,si.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-watch",children:[e.title?(0,si.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,si.jsx)("span",{className:"ss-w-fandash-stations",children:e.data.stations.map((t,n)=>(0,si.jsx)("span",{className:"ss-w-fandash-station-chip",children:t},`${t}-${n}`))})]})}var Kn=b(I(),1);function M0({card:e,onTap:t}){return(0,Kn.jsxs)("button",{type:"button",className:"ss-w-fandash-card ss-w-fandash-card--tap ss-w-fandash-congested",onClick:()=>t(e),children:[e.title?(0,Kn.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,Kn.jsx)("div",{className:"ss-w-fandash-congested-grid",children:e.data.entries.map((n,r)=>(0,Kn.jsxs)("span",{className:"ss-w-fandash-congested-cell",children:[(0,Kn.jsx)("span",{className:"ss-w-fandash-congested-day",children:n.dayLabel}),(0,Kn.jsx)("span",{className:"ss-w-fandash-congested-opponent",children:n.opponent}),(0,Kn.jsx)("span",{className:"ss-w-fandash-congested-comp",children:n.competition}),(0,Kn.jsx)("span",{className:"ss-w-fandash-congested-time",children:n.timeLabel})]},`${n.opponent}-${r}`))}),(0,Kn.jsx)("span",{className:"ss-w-fandash-card-cta",children:e.actionLabel})]})}var At=b(I(),1);function R0({rows:e}){return e.length===0?(0,At.jsx)("span",{className:"ss-w-fandash-transfers-empty",children:"None"}):(0,At.jsx)("ul",{className:"ss-w-fandash-transfer-list",children:e.map((t,n)=>(0,At.jsxs)("li",{className:"ss-w-fandash-transfer-row",children:[(0,At.jsx)("span",{className:"ss-w-fandash-transfer-name",children:t.playerName}),(0,At.jsx)("span",{className:"ss-w-fandash-transfer-club",children:t.otherClub}),t.type?(0,At.jsx)("span",{className:"ss-w-fandash-transfer-type",children:t.type}):null]},`${t.playerName}-${n}`))})}function D0({card:e}){let{data:t}=e;return(0,At.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-transfers",children:[e.title?(0,At.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,At.jsxs)("div",{className:"ss-w-fandash-transfers-cols",children:[(0,At.jsxs)("div",{className:"ss-w-fandash-transfers-col",children:[(0,At.jsx)("span",{className:"ss-w-fandash-transfers-col-head",children:"In"}),(0,At.jsx)(R0,{rows:t.in})]}),(0,At.jsxs)("div",{className:"ss-w-fandash-transfers-col",children:[(0,At.jsx)("span",{className:"ss-w-fandash-transfers-col-head",children:"Out"}),(0,At.jsx)(R0,{rows:t.out})]})]})]})}var zr=b(I(),1);function z0({card:e}){return(0,zr.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-links",children:[e.title?(0,zr.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,zr.jsx)("div",{className:"ss-w-fandash-link-grid",children:e.data.links.map((t,n)=>(0,zr.jsxs)("a",{className:"ss-w-fandash-link-tile",href:t.url,target:"_blank",rel:"noopener noreferrer",children:[(0,zr.jsx)("span",{className:"ss-w-fandash-link-label",children:t.label}),(0,zr.jsx)("span",{className:"ss-w-fandash-link-chevron",children:(0,zr.jsx)(Cu,{})})]},`${t.url}-${n}`))})]})}var B0=b(se(),1),ut=b(I(),1);function RP(e){return e.trim().slice(0,3).toUpperCase()}function O0({url:e,name:t,side:n}){let[r,s]=(0,B0.useState)(!1),a=`ss-w-fandash-postmatch-crest ss-w-fandash-postmatch-crest--${n}`;return e&&!r?(0,ut.jsx)("img",{className:a,src:e,alt:"","aria-hidden":"true",onError:()=>s(!0)}):(0,ut.jsx)("span",{className:`${a} ss-w-fandash-postmatch-crest--fallback`,"aria-hidden":"true",children:RP(t)})}function F0({card:e}){let{data:t}=e,n=t.homeScore>=t.awayScore,r=t.awayScore>=t.homeScore;return(0,ut.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-postmatch-result",children:[(0,ut.jsxs)("div",{className:"ss-w-fandash-postmatch-top",children:[e.title?(0,ut.jsx)("span",{className:"ss-w-fandash-postmatch-pill",children:e.title}):null,(0,ut.jsx)("span",{className:`ss-w-fandash-postmatch-tag ss-w-fandash-postmatch-tag--${t.outcome}`,children:t.resultLabel})]}),(0,ut.jsxs)("div",{className:"ss-w-fandash-postmatch-main",children:[(0,ut.jsxs)("div",{className:"ss-w-fandash-postmatch-side ss-w-fandash-postmatch-side--home",children:[(0,ut.jsx)(O0,{url:t.homeCrestUrl,name:t.homeName,side:"home"}),(0,ut.jsx)("span",{className:"ss-w-fandash-postmatch-team-name",children:t.homeName})]}),(0,ut.jsxs)("div",{className:"ss-w-fandash-postmatch-score-main",children:[(0,ut.jsx)("span",{className:`ss-w-fandash-postmatch-score-value ss-w-fandash-postmatch-score-value--${n?"win":"lose"}`,children:t.homeScore}),(0,ut.jsx)("span",{className:"ss-w-fandash-postmatch-score-sep",children:"\u2013"}),(0,ut.jsx)("span",{className:`ss-w-fandash-postmatch-score-value ss-w-fandash-postmatch-score-value--${r?"win":"lose"}`,children:t.awayScore})]}),(0,ut.jsxs)("div",{className:"ss-w-fandash-postmatch-side ss-w-fandash-postmatch-side--away",children:[(0,ut.jsx)(O0,{url:t.awayCrestUrl,name:t.awayName,side:"away"}),(0,ut.jsx)("span",{className:"ss-w-fandash-postmatch-team-name",children:t.awayName})]})]}),(0,ut.jsxs)("div",{className:"ss-w-fandash-postmatch-meta",children:[t.kickoffLabel,t.competition?` \xB7 ${t.competition}`:""]})]})}var Or=b(I(),1);function U0({card:e,onTap:t}){return(0,Or.jsxs)("button",{type:"button",className:"ss-w-fandash-card ss-w-fandash-card--tap ss-w-fandash-postmatch-goals",onClick:()=>t(e),children:[e.title?(0,Or.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,Or.jsx)("ul",{className:"ss-w-fandash-postmatch-goal-list",children:e.data.goals.map((n,r)=>(0,Or.jsxs)("li",{className:n.scoredByClub?"ss-w-fandash-postmatch-goal ss-w-fandash-postmatch-goal--club":"ss-w-fandash-postmatch-goal",children:[(0,Or.jsx)("span",{className:"ss-w-fandash-postmatch-goal-ball"}),(0,Or.jsx)("span",{children:n.text})]},`${n.text}-${r}`))}),(0,Or.jsx)("span",{className:"ss-w-fandash-card-cta",children:e.actionLabel})]})}var wt=b(I(),1);function DP(e,t){let n=e+t;if(n<=0)return{home:"50%",away:"50%"};let r=Math.round(e/n*1e3)/10;return{home:`${r}%`,away:`${Math.round((100-r)*10)/10}%`}}function Q0({card:e,onTap:t}){let{data:n}=e;return(0,wt.jsxs)("button",{type:"button",className:"ss-w-fandash-card ss-w-fandash-card--tap ss-w-fandash-postmatch-stats",onClick:()=>t(e),children:[e.title?(0,wt.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,wt.jsx)("div",{className:"ss-w-fandash-postmatch-stat-rows",children:n.rows.map((r,s)=>{let a=n.clubIsHome?r.clubValue:r.oppValue,i=n.clubIsHome?r.oppValue:r.clubValue,o=n.clubIsHome?r.clubNum:r.oppNum,l=n.clubIsHome?r.oppNum:r.clubNum,{home:u,away:c}=DP(o,l);return(0,wt.jsxs)("div",{className:"ss-w-fandash-postmatch-stat",children:[(0,wt.jsxs)("div",{className:"ss-w-fandash-postmatch-stat-row",children:[(0,wt.jsx)("span",{className:"ss-w-fandash-postmatch-stat-value ss-w-fandash-postmatch-stat-value--home",children:a}),(0,wt.jsx)("span",{className:"ss-w-fandash-postmatch-stat-label",children:r.label}),(0,wt.jsx)("span",{className:"ss-w-fandash-postmatch-stat-value ss-w-fandash-postmatch-stat-value--away",children:i})]}),(0,wt.jsxs)("div",{className:"ss-w-fandash-postmatch-stat-bar",children:[(0,wt.jsx)("span",{className:"ss-w-fandash-postmatch-stat-bar-home",style:{width:u}}),(0,wt.jsx)("span",{className:"ss-w-fandash-postmatch-stat-bar-away",style:{width:c}})]})]},`${r.label}-${s}`)})}),n.rows.length>0?(0,wt.jsxs)("div",{className:"ss-w-fandash-postmatch-legend",children:[(0,wt.jsxs)("span",{className:"ss-w-fandash-postmatch-legend-item",children:[(0,wt.jsx)("i",{className:"ss-w-fandash-postmatch-legend-swatch ss-w-fandash-postmatch-legend-swatch--home"}),n.homeName]}),(0,wt.jsxs)("span",{className:"ss-w-fandash-postmatch-legend-item",children:[(0,wt.jsx)("i",{className:"ss-w-fandash-postmatch-legend-swatch ss-w-fandash-postmatch-legend-swatch--away"}),n.awayName]})]}):null,(0,wt.jsx)("span",{className:"ss-w-fandash-card-cta",children:e.actionLabel})]})}var Br=b(I(),1);function zP(e){let t=e.trim().split(/\s+/).filter(Boolean);if(t.length===0)return"?";let n=t[0].charAt(0),r=t[t.length-1].charAt(0);return(t.length>1?`${n}${r}`:n).toUpperCase()}function H0({card:e,onTap:t}){let{data:n}=e;return(0,Br.jsxs)("button",{type:"button",className:"ss-w-fandash-card ss-w-fandash-card--tap ss-w-fandash-postmatch-performer",onClick:()=>t(e),children:[e.title?(0,Br.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,Br.jsxs)("div",{className:"ss-w-fandash-postmatch-perf-row",children:[(0,Br.jsx)("span",{className:"ss-w-fandash-postmatch-perf-avatar","aria-hidden":"true",children:zP(n.playerName)}),(0,Br.jsx)("span",{className:"ss-w-fandash-postmatch-perf-name",children:n.playerName}),(0,Br.jsx)("span",{className:"ss-w-fandash-postmatch-perf-rating",children:n.ratingLabel})]}),(0,Br.jsx)("span",{className:"ss-w-fandash-card-cta",children:e.actionLabel})]})}var ai=b(I(),1);function G0({card:e}){let{data:t}=e;return(0,ai.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-postmatch-next",children:[e.title?(0,ai.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,ai.jsx)("div",{className:"ss-w-fandash-postmatch-next-row",children:(0,ai.jsx)("span",{className:"ss-w-fandash-postmatch-next-when",children:t.whenLabel})})]})}var ws=b(I(),1);function V0({card:e,onTap:t}){let{data:n}=e;return(0,ws.jsxs)("button",{type:"button",className:"ss-w-fandash-card ss-w-fandash-card--tap ss-w-fandash-resting-next",onClick:()=>t(e),children:[e.title?(0,ws.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,ws.jsxs)("div",{className:"ss-w-fandash-resting-next-row",children:[(0,ws.jsx)("span",{className:"ss-w-fandash-resting-next-when",children:n.whenLabel}),n.competition?(0,ws.jsx)("span",{className:"ss-w-fandash-resting-next-competition",children:n.competition}):null]}),(0,ws.jsx)("span",{className:"ss-w-fandash-card-cta",children:e.actionLabel})]})}var ys=b(I(),1);function W0({card:e,onTap:t}){let{data:n}=e;return(0,ys.jsxs)("button",{type:"button",className:"ss-w-fandash-card ss-w-fandash-card--tap ss-w-fandash-resting-standings",onClick:()=>t(e),children:[e.title?(0,ys.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,ys.jsxs)("div",{className:"ss-w-fandash-resting-standings-row",children:[(0,ys.jsx)("span",{className:"ss-w-fandash-resting-standings-position",children:n.positionLabel}),(0,ys.jsx)("span",{className:"ss-w-fandash-resting-standings-record",children:n.recordLabel})]}),(0,ys.jsx)("span",{className:"ss-w-fandash-card-cta",children:e.actionLabel})]})}var Fr=b(I(),1);function _0({card:e,onTap:t}){let{data:n}=e;return(0,Fr.jsxs)("button",{type:"button",className:"ss-w-fandash-card ss-w-fandash-card--tap ss-w-fandash-resting-season",onClick:()=>t(e),children:[e.title?(0,Fr.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,Fr.jsxs)("div",{className:"ss-w-fandash-resting-season-rows",children:[n.scorerLabel?(0,Fr.jsx)("span",{className:"ss-w-fandash-resting-season-row",children:n.scorerLabel}):null,n.playerLabel?(0,Fr.jsx)("span",{className:"ss-w-fandash-resting-season-row",children:n.playerLabel}):null,(0,Fr.jsx)("span",{className:"ss-w-fandash-resting-season-row",children:n.tallyLabel})]}),(0,Fr.jsx)("span",{className:"ss-w-fandash-card-cta",children:e.actionLabel})]})}var ii=b(I(),1);function OP(e){let t=e.toUpperCase();return t==="W"?"ss-w-fandash-form-pill--win":t==="L"?"ss-w-fandash-form-pill--loss":"ss-w-fandash-form-pill--draw"}function j0({card:e}){let{data:t}=e;return(0,ii.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-resting-form",children:[e.title?(0,ii.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,ii.jsx)("span",{className:"ss-w-fandash-form",children:t.letters.map((n,r)=>(0,ii.jsx)("span",{className:`ss-w-fandash-form-pill ${OP(n)}`,children:n},`${n}-${r}`))})]})}var pc=b(se(),1);var dc=b(se(),1),X0=6e4,BP=15;function $f(e,t,n){if(!t)return e;let r=Math.floor((Date.now()-n)/X0);return e+Math.min(Math.max(0,r),BP)}function q0(e,t,n){let[r,s]=(0,dc.useState)(()=>$f(e,t,n));return(0,dc.useEffect)(()=>{if(s($f(e,t,n)),!t)return;let a=window.setInterval(()=>{s($f(e,t,n))},X0);return()=>window.clearInterval(a)},[e,t,n]),r}var Ve=b(I(),1);function FP(e){return e.trim().slice(0,3).toUpperCase()}function J0({url:e,name:t,side:n}){let[r,s]=(0,pc.useState)(!1),a=`ss-w-fandash-live-crest ss-w-fandash-live-crest--${n}`;return e&&!r?(0,Ve.jsx)("img",{className:a,src:e,alt:"","aria-hidden":"true",onError:()=>s(!0)}):(0,Ve.jsx)("span",{className:`${a} ss-w-fandash-live-crest--fallback`,"aria-hidden":"true",children:FP(t)})}function UP(e){if(!e||e.length===0)return null;let t=e.filter(n=>n.type==="goal"&&n.player);return t.length===0?null:t.slice().sort((n,r)=>n.minute-r.minute).map(n=>`${n.player} ${n.minuteLabel}`).join(", ")}function K0({card:e,goalEvents:t}){let{data:n}=e,r=`${n.minute}:${n.homeScore}:${n.awayScore}`,s=(0,pc.useRef)(null);(!s.current||s.current.key!==r)&&(s.current={key:r,receivedAtMs:Date.now()});let a=q0(n.minute,n.clockRunning,s.current.receivedAtMs),i=n.minuteLabel.replace(/^\d+/,""),o=UP(t);return(0,Ve.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-live-score",children:[e.title?(0,Ve.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,Ve.jsxs)("div",{className:"ss-w-fandash-live-top",children:[(0,Ve.jsxs)("span",{className:"ss-w-fandash-live-pill",children:[(0,Ve.jsx)("span",{className:"ss-w-fandash-live-dot","aria-hidden":"true"}),n.statusLabel]}),(0,Ve.jsx)("span",{className:"ss-w-fandash-live-minute",children:`${a}${i}`}),n.competition?(0,Ve.jsx)("span",{className:"ss-w-fandash-live-competition",children:n.competition}):null]}),(0,Ve.jsxs)("div",{className:"ss-w-fandash-live-main",children:[(0,Ve.jsxs)("div",{className:"ss-w-fandash-live-side ss-w-fandash-live-side--home",children:[(0,Ve.jsx)(J0,{url:n.homeCrestUrl,name:n.homeName,side:"home"}),(0,Ve.jsx)("span",{className:"ss-w-fandash-live-team-name",children:n.homeName})]}),(0,Ve.jsxs)("div",{className:"ss-w-fandash-live-score-main",children:[(0,Ve.jsx)("span",{className:"ss-w-fandash-live-score-value",children:n.homeScore}),(0,Ve.jsx)("span",{className:"ss-w-fandash-live-score-sep",children:"\u2013"}),(0,Ve.jsx)("span",{className:"ss-w-fandash-live-score-value",children:n.awayScore})]}),(0,Ve.jsxs)("div",{className:"ss-w-fandash-live-side ss-w-fandash-live-side--away",children:[(0,Ve.jsx)(J0,{url:n.awayCrestUrl,name:n.awayName,side:"away"}),(0,Ve.jsx)("span",{className:"ss-w-fandash-live-team-name",children:n.awayName})]})]}),o?(0,Ve.jsxs)("div",{className:"ss-w-fandash-live-scorers",children:[(0,Ve.jsx)("span",{className:"ss-w-fandash-live-scorers-icon","aria-hidden":"true",children:"\u26BD"}),o]}):null]})}var $0=b(se(),1),Xe=b(I(),1),Y0=3;function QP({type:e}){return e==="goal"?(0,Xe.jsx)("span",{className:"ss-w-fandash-live-tl-ico ss-w-fandash-live-tl-ico--goal","aria-hidden":"true",children:(0,Xe.jsx)("span",{className:"ss-w-fandash-live-tl-ball"})}):e==="yellow"||e==="red"?(0,Xe.jsx)("span",{className:"ss-w-fandash-live-tl-ico","aria-hidden":"true",children:(0,Xe.jsx)("span",{className:`ss-w-fandash-live-tl-card ss-w-fandash-live-tl-card--${e}`})}):e==="sub"?(0,Xe.jsx)("span",{className:"ss-w-fandash-live-tl-ico","aria-hidden":"true",children:(0,Xe.jsx)("span",{className:"ss-w-fandash-live-tl-subarrows",children:"\u21C5"})}):(0,Xe.jsx)("span",{className:"ss-w-fandash-live-tl-ico","aria-hidden":"true",children:(0,Xe.jsx)("span",{className:"ss-w-fandash-live-tl-dot"})})}function HP({e}){var t,n;return e.type==="sub"?(0,Xe.jsxs)("span",{className:"ss-w-fandash-live-tl-who",children:[(t=e.player)!=null?t:e.text,e.playerOff?(0,Xe.jsxs)("span",{className:"ss-w-fandash-live-tl-off",children:[" for ",e.playerOff]}):null]}):(0,Xe.jsx)("span",{className:"ss-w-fandash-live-tl-who",children:(n=e.player)!=null?n:e.text})}function GP({e}){let t=["ss-w-fandash-live-tl-ev",e.side==="home"?"ss-w-fandash-live-tl-ev--home":"ss-w-fandash-live-tl-ev--away",e.type==="goal"?"ss-w-fandash-live-tl-ev--goal":""].filter(Boolean).join(" ");return(0,Xe.jsxs)("div",{className:t,children:[(0,Xe.jsxs)("span",{className:"ss-w-fandash-live-tl-txt",children:[(0,Xe.jsx)(HP,{e}),(0,Xe.jsx)(QP,{type:e.type})]}),(0,Xe.jsx)("span",{className:"ss-w-fandash-live-tl-badge",children:e.minuteLabel})]})}function Z0({card:e,ui:t}){var c,d;let[n,r]=(0,$0.useState)(!1),s=e.data.events;if(!s||s.length===0)return null;let a=[...s].sort((p,m)=>m.minute-p.minute),i=a.length-Y0,o=n?a:a.slice(0,Y0),l=(c=t==null?void 0:t.showMore)!=null?c:(p=>`Show ${p} more`),u=(d=t==null?void 0:t.showLess)!=null?d:"Show less";return(0,Xe.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-live-timeline",children:[e.title?(0,Xe.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,Xe.jsx)("div",{className:"ss-w-fandash-live-tl",children:o.map((p,m)=>(0,Xe.jsx)(GP,{e:p},`${p.minute}-${p.side}-${p.type}-${m}`))}),i>0?(0,Xe.jsx)("button",{type:"button",className:"ss-w-fandash-live-tl-more","aria-expanded":n,onClick:()=>r(p=>!p),children:n?u:l(i)}):null]})}var e1=b(se(),1),Rt=b(I(),1),oi=270,Zf=56,xs=Zf/2,VP=.26;function WP(e){var u,c;let t=e.length-1,n=d=>t===0?0:d/t*oi,r=d=>xs-d*VP,s=e.map((d,p)=>`${n(p).toFixed(1)},${r(d.value).toFixed(1)}`),a=`M0,${xs} L${s.join(" L")} L${oi},${xs} Z`,i=`M${s.join(" L")}`,o=(c=(u=e[t])==null?void 0:u.value)!=null?c:0;return{area:a,line:i,lastLeftPct:t===0?0:100,lastTopPx:r(o)}}function mc({points:e,caption:t,clubIsHome:n}){if(e.length===0)return null;let{area:r,line:s,lastLeftPct:a,lastTopPx:i}=WP(e),o=(0,e1.useId)(),l=`${o}-top`,u=`${o}-bottom`,c=n?"ss-w-fandash-live-mom-home":"ss-w-fandash-live-mom-away",d=n?"ss-w-fandash-live-mom-away":"ss-w-fandash-live-mom-home";return(0,Rt.jsxs)("div",{className:"ss-w-fandash-live-mom",children:[t?(0,Rt.jsx)("span",{className:"ss-w-fandash-live-mom-caption",children:t}):null,(0,Rt.jsxs)("div",{className:"ss-w-fandash-live-mom-plot",children:[(0,Rt.jsxs)("svg",{className:"ss-w-fandash-live-mom-svg",viewBox:`0 0 ${oi} ${Zf}`,preserveAspectRatio:"none",role:"img","aria-label":t!=null?t:"Momentum",children:[(0,Rt.jsxs)("defs",{children:[(0,Rt.jsx)("clipPath",{id:l,children:(0,Rt.jsx)("rect",{x:0,y:0,width:oi,height:xs})}),(0,Rt.jsx)("clipPath",{id:u,children:(0,Rt.jsx)("rect",{x:0,y:xs,width:oi,height:Zf-xs})})]}),(0,Rt.jsx)("path",{d:r,className:c,clipPath:`url(#${l})`}),(0,Rt.jsx)("path",{d:r,className:d,clipPath:`url(#${u})`}),(0,Rt.jsx)("line",{x1:0,y1:xs,x2:oi,y2:xs,className:"ss-w-fandash-live-mom-base"}),(0,Rt.jsx)("path",{d:s,className:"ss-w-fandash-live-mom-line",vectorEffect:"non-scaling-stroke"})]}),(0,Rt.jsx)("span",{className:"ss-w-fandash-live-mom-now",style:{left:`clamp(4px, ${a}%, calc(100% - 4px))`,top:`${i}px`},"aria-hidden":"true"})]})]})}var ct=b(I(),1);function _P(e,t){let n=e+t;if(n<=0)return{home:"50%",away:"50%"};let r=Math.round(e/n*1e3)/10;return{home:`${r}%`,away:`${Math.round((100-r)*10)/10}%`}}function t1({card:e}){let{data:t}=e;return(0,ct.jsxs)("div",{className:"ss-w-fandash-card ss-w-fandash-live-stats",children:[e.title?(0,ct.jsx)("span",{className:"ss-w-fandash-eyebrow",children:e.title}):null,(0,ct.jsx)("div",{className:"ss-w-fandash-live-stat-rows",children:t.rows.map((n,r)=>{let s=t.clubIsHome?n.clubValue:n.oppValue,a=t.clubIsHome?n.oppValue:n.clubValue,i=t.clubIsHome?n.clubNum:n.oppNum,o=t.clubIsHome?n.oppNum:n.clubNum,{home:l,away:u}=_P(i,o);return(0,ct.jsxs)("div",{className:"ss-w-fandash-live-stat",children:[(0,ct.jsxs)("div",{className:"ss-w-fandash-live-stat-row",children:[(0,ct.jsx)("span",{className:"ss-w-fandash-live-stat-value ss-w-fandash-live-stat-value--home",children:s}),(0,ct.jsx)("span",{className:"ss-w-fandash-live-stat-label",children:n.label}),(0,ct.jsx)("span",{className:"ss-w-fandash-live-stat-value ss-w-fandash-live-stat-value--away",children:a})]}),(0,ct.jsxs)("div",{className:"ss-w-fandash-live-bar",children:[(0,ct.jsx)("span",{className:"ss-w-fandash-live-bar-home",style:{width:l}}),(0,ct.jsx)("span",{className:"ss-w-fandash-live-bar-away",style:{width:u}})]})]},`${n.label}-${r}`)})}),t.momentum.length>0?(0,ct.jsx)(mc,{points:t.momentum,caption:t.momentumLabel,clubIsHome:t.clubIsHome}):t.momentumLabel?(0,ct.jsx)("span",{className:"ss-w-fandash-live-momentum",children:t.momentumLabel}):null,t.rows.length>0?(0,ct.jsxs)("div",{className:"ss-w-fandash-live-legend",children:[(0,ct.jsxs)("span",{className:"ss-w-fandash-live-legend-item",children:[(0,ct.jsx)("i",{className:"ss-w-fandash-live-legend-swatch ss-w-fandash-live-legend-swatch--home"}),t.homeName]}),(0,ct.jsxs)("span",{className:"ss-w-fandash-live-legend-item",children:[(0,ct.jsx)("i",{className:"ss-w-fandash-live-legend-swatch ss-w-fandash-live-legend-swatch--away"}),t.awayName]})]}):null]})}var ze=b(I(),1);function n1({dashboard:e,onTap:t,ui:n}){let r=[...e.cards.filter(i=>i.cardType==="countdown"),...e.cards.filter(i=>i.cardType!=="countdown")],s=e.cards.find(i=>i.cardType==="liveTimeline"),a=s==null?void 0:s.data.events.filter(i=>i.type==="goal");return(0,ze.jsxs)("div",{className:"ss-w-fandash",children:[e.greeting?(0,ze.jsx)("span",{className:e.greetingIsLead?"ss-w-fandash-greeting ss-w-fandash-greeting--lead":"ss-w-fandash-greeting",children:e.greeting}):null,(0,ze.jsx)("div",{className:"ss-w-fandash-cards",children:r.map((i,o)=>(0,ze.jsx)(jP,{card:i,onTap:t,ui:n,goalEvents:a},`${i.cardType}-${o}`))})]})}function jP({card:e,onTap:t,ui:n,goalEvents:r}){switch(e.cardType){case"fixture":return(0,ze.jsx)(S0,{card:e});case"countdown":return(0,ze.jsx)(A0,{card:e});case"injuries":return(0,ze.jsx)(T0,{card:e,ui:n});case"reasonToBet":return(0,ze.jsx)(L0,{card:e});case"whereToWatch":return(0,ze.jsx)(P0,{card:e});case"congestedWeek":return(0,ze.jsx)(M0,{card:e,onTap:t});case"transfers":return(0,ze.jsx)(D0,{card:e});case"links":return(0,ze.jsx)(z0,{card:e});case"postMatchResult":return(0,ze.jsx)(F0,{card:e});case"postMatchGoals":return(0,ze.jsx)(U0,{card:e,onTap:t});case"postMatchStats":return(0,ze.jsx)(Q0,{card:e,onTap:t});case"postMatchTopPerformer":return(0,ze.jsx)(H0,{card:e,onTap:t});case"postMatchNext":return(0,ze.jsx)(G0,{card:e});case"restingNext":return(0,ze.jsx)(V0,{card:e,onTap:t});case"restingStandings":return(0,ze.jsx)(W0,{card:e,onTap:t});case"restingSeason":return(0,ze.jsx)(_0,{card:e,onTap:t});case"restingForm":return(0,ze.jsx)(j0,{card:e});case"liveScore":return(0,ze.jsx)(K0,{card:e,goalEvents:r});case"liveTimeline":return(0,ze.jsx)(Z0,{card:e,ui:n});case"liveStats":return(0,ze.jsx)(t1,{card:e});default:return null}}var vn=b(I(),1);function r1({message:e,disabled:t,onAct:n,onTap:r,ui:s,slip:a,monitor:i}){if(e.role==="user")return(0,vn.jsx)("div",{className:"ss-w-msg ss-w-user","data-msg-id":e.id,children:(0,vn.jsx)("div",{className:"ss-w-bubble",children:e.text})});let o=l=>{n({message:l.actionLabel,actionRef:l.actionRef,label:l.actionLabel||l.title||""})};return(0,vn.jsxs)("div",{className:"ss-w-msg ss-w-bot","data-msg-id":e.id,children:[e.text&&!e.greetingDashboard&&!e.clubFanDashboard?(0,vn.jsx)(i0,{text:e.text}):null,e.greetingDashboard&&!e.clubFanDashboard?(0,vn.jsx)(k0,{dashboard:e.greetingDashboard,onTap:r}):null,e.clubFanDashboard?(0,vn.jsx)(n1,{dashboard:e.clubFanDashboard,onTap:o,ui:s}):null,(0,vn.jsx)(c0,{cards:e.cards,disabled:t,showLessLabel:s==null?void 0:s.showLess,showMoreLabel:s==null?void 0:s.showMore}),(0,vn.jsx)(w0,{insights:e.insights,ui:s,slip:a,monitor:i}),(0,vn.jsx)(ni,{cards:e.marketOdds,ui:s,slip:a,monitor:i}),(0,vn.jsx)(uc,{cards:e.oddsMovement,ui:s,monitor:i}),(0,vn.jsx)(cc,{actions:e.actions,loading:!1,disabled:t,onAct:n})]})}var eg=b(I(),1);function s1({chips:e,onPick:t}){return e.length===0?null:(0,eg.jsx)("div",{className:"ss-w-chips",children:e.map((n,r)=>(0,eg.jsx)("button",{type:"button",className:"ss-w-chip",onClick:()=>t(n.text),children:n.text},`${n.text}-${r}`))})}function a1(e,t=48){return e.scrollHeight-e.scrollTop-e.clientHeight<=t}var Yn=b(I(),1);function XP(e){let t=e[e.length-1];if(!t||t.role!=="assistant")return null;let n=e[e.length-2];return{turnId:t.id,anchorId:n&&n.role==="user"?n.id:t.id}}function i1({controller:e,ui:t,slip:n,onDashboardTap:r,monitor:s}){let{state:a,send:i}=e,o=(0,ra.useRef)(null),l=(0,ra.useRef)(null),u=(0,ra.useRef)(!0),c=(0,ra.useRef)(null);(0,ra.useEffect)(()=>{var w,C;let m=XP(a.messages),g=o.current;if(m&&m.turnId!==c.current){c.current=m.turnId,l.current&&g&&(l.current.style.height=a.isStreaming?`${g.clientHeight}px`:""),u.current=!1,(w=g==null?void 0:g.querySelector(`[data-msg-id="${m.anchorId}"]`))==null||w.scrollIntoView({block:"start"});return}!a.isStreaming&&l.current&&(l.current.style.height=""),u.current&&((C=l.current)==null||C.scrollIntoView({block:"end"}))},[a.messages,a.status,a.isStreaming]);let d=a.messages.some(m=>m.role==="user"),p=a.messages.some(m=>m.role==="assistant"&&(m.greetingDashboard||m.clubFanDashboard));return(0,Yn.jsxs)("div",{className:"ss-w-list","aria-live":"polite",ref:o,onScroll:()=>{o.current&&(u.current=a1(o.current))},children:[a.messages.map(m=>(0,Yn.jsx)(r1,{message:m,disabled:a.isStreaming,onAct:g=>i(g.message,{actionId:g.actionId,actionRef:g.actionRef,displayText:g.label}),onTap:(g,w)=>{i(g.actionValue,g.actionRef?{actionRef:g.actionRef,displayText:g.title}:{displayText:g.title}),m.role==="assistant"&&m.greetingDashboard&&(r==null||r(g,w,m.greetingDashboard.layout))},ui:t,slip:n,monitor:s},m.id)),a.isStreaming&&a.actionsLoading?(0,Yn.jsx)(cc,{actions:[],loading:!0,onAct:()=>{}}):null,a.status?(0,Yn.jsx)("div",{className:"ss-w-status",children:a.status}):null,a.error?(0,Yn.jsxs)("div",{className:"ss-w-error",role:"alert",children:[(0,Yn.jsx)("span",{children:"message"in a.error?a.error.message:t.somethingWentWrong}),(0,Yn.jsx)("button",{type:"button",className:"ss-w-retry",onClick:()=>e.retry(),children:t.retry})]}):null,!d&&!p?(0,Yn.jsx)(s1,{chips:a.starters,onPick:m=>i(m)}):null,(0,Yn.jsx)("div",{ref:l,className:"ss-w-turn-spacer","aria-hidden":"true"})]})}var o1=b(se(),1);var vs=b(I(),1);function l1({placeholder:e,streaming:t,onSend:n,onStop:r,stopLabel:s="Stop response",sendLabel:a="Send message"}){let[i,o]=(0,o1.useState)(""),l=()=>{let c=i.trim();c&&(n(c),o(""))};return(0,vs.jsxs)("div",{className:"ss-w-input",children:[(0,vs.jsx)("textarea",{className:"ss-w-textarea",rows:1,placeholder:e,value:i,disabled:t,onChange:c=>o(c.target.value),onKeyDown:c=>{c.key==="Enter"&&!c.shiftKey&&(c.preventDefault(),l())}}),t?(0,vs.jsx)("button",{type:"button",className:"ss-w-send ss-w-stop","aria-label":s,onClick:r,children:(0,vs.jsx)("span",{className:"ss-w-stop-glyph"})}):(0,vs.jsx)("button",{type:"button",className:"ss-w-send","aria-label":a,onClick:l,children:(0,vs.jsx)(dv,{})})]})}var li=b(I(),1);function u1({monitor:e,ui:t,matchCount:n,oddsCount:r,todayCount:s,hasToday:a,gamesEnabled:i}){let o=[{tab:"chat",label:t.tabChat,count:0,dot:e.chatDot},...a?[{tab:"today",label:t.tabToday,count:s,dot:e.todayDot}]:[],...n>0?[{tab:"following",label:t.tabFollowing,count:n,dot:e.matchesDot}]:[],...r>0?[{tab:"odds",label:t.tabOdds,count:r,dot:e.oddsDot}]:[],...i?[{tab:"games",label:t.tabGames,count:0,dot:!1},{tab:"leaderboard",label:t.tabLeaderboard,count:0,dot:!1}]:[]];return o.length<2?null:(0,li.jsx)("div",{className:"ss-w-tabs",role:"tablist",children:o.map(({tab:l,label:u,count:c,dot:d})=>{let p=e.activeTab===l;return(0,li.jsxs)("button",{type:"button",role:"tab","aria-selected":p,"data-on":p?"":void 0,className:"ss-w-tab",onClick:()=>e.setActiveTab(l),children:[u,c>0&&(0,li.jsx)("span",{className:"ss-w-tab-count",children:c}),d&&!p&&(0,li.jsx)("span",{className:"ss-w-tab-dot","aria-hidden":"true"})]},l)})})}var Dt=b(I(),1);function c1({match:e,monitor:t,ui:n,slip:r}){var i,o;let s=(i=e.availableMarkets)!=null?i:[];if(s.length===0)return null;let a=(o=t.openMarket[e.matchId])!=null?o:null;return(0,Dt.jsx)("div",{className:"ss-w-acc",children:s.map(l=>{var p,m,g;let u=a===l.marketDeveloperName&&!l.suspended,c=`${e.matchId}:${l.marketDeveloperName}`,d=t.marketOdds[c];return(0,Dt.jsxs)("div",{className:u?"ss-w-acc-row ss-w-acc-row-open":"ss-w-acc-row",children:[(0,Dt.jsxs)("div",{className:"ss-w-acc-head",children:[(0,Dt.jsxs)("button",{type:"button",className:l.suspended?"ss-w-acc-toggle ss-w-acc-toggle--susp":"ss-w-acc-toggle","aria-expanded":u,disabled:l.suspended,onClick:()=>t.toggleMarket(e.matchId,l.marketDeveloperName),children:[(0,Dt.jsx)("span",{className:"ss-w-acc-chevron",children:l.suspended?"":u?"\u25BE":"\u25B8"}),(0,Dt.jsx)("span",{className:"ss-w-acc-label",children:l.marketLabel}),l.hasInsight&&(0,Dt.jsx)("span",{className:"ss-w-acc-badge",children:"\u2605"}),l.suspended&&(0,Dt.jsx)("span",{className:"ss-w-acc-susp",children:n.accordionSuspended})]}),(0,Dt.jsx)(ln,{ui:n,monitor:t,pin:{kind:"market",matchId:e.matchId,marketDeveloperName:l.marketDeveloperName}})]}),u&&(0,Dt.jsxs)("div",{className:"ss-w-acc-panel",children:[(d==null?void 0:d.error)&&(0,Dt.jsx)("div",{className:"ss-w-acc-retry",onClick:()=>t.retryMarket(e.matchId,l.marketDeveloperName),children:n.accordionRetry}),((m=(p=d==null?void 0:d.block)==null?void 0:p.insight)==null?void 0:m.text)&&(0,Dt.jsxs)("div",{className:"ss-w-acc-insight",children:[(0,Dt.jsx)("span",{className:"ss-w-acc-badge",children:n.accordionValueLabel})," ",d.block.insight.text]}),((g=d==null?void 0:d.block)==null?void 0:g.card)&&(0,Dt.jsx)(ni,{cards:[Ua(d.block.card)],ui:n,slip:r,monitor:t,inSlipIds:t.inSlip,hideHeader:!0})]})]},l.marketDeveloperName)})})}var le=b(I(),1);function qP(e,t,n){let r=e.market;if(!r||!r.addToSlipEnabled||typeof r.matchOddsId!="number"||typeof r.price!="number")return null;let s={matchOddsId:r.matchOddsId,matchId:t,oddsDecimal:r.price};return n!==void 0&&(s.conversationId=n),s}function tg(e,t){let n=e.market;return n?t.some(r=>r.marketDeveloperName===n.marketDeveloperName||n.matchOddsId!=null&&r.matchOddsId===n.matchOddsId):!1}function JP(e){return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function d1(e,t){var s;let n=[],r=new Map;for(let a of e){let i=(s=a.player)!=null?s:"",o=a.ownGoal?`${a.minuteLabel} (${t})`:a.minuteLabel;r.has(i)||(r.set(i,[]),n.push(i)),r.get(i).push(o)}return n.map(a=>{let i=r.get(a).join(", ");return{player:a,label:a?`${a} ${i}`:i}})}function p1({match:e,promotedPins:t,monitor:n,ui:r,slip:s}){var m,g,w,C;let a=e.phase==="live",i=e.events.filter(f=>f.type==="goal"),o=d1(i.filter(f=>f.side==="home"),r.ownGoalLabel),l=d1(i.filter(f=>f.side==="away"),r.ownGoalLabel),u=e.statRows.filter(f=>tg(f,t)),c=e.statRows.filter(f=>!tg(f,t)),d=[...u,...c],p=e.phase==="preMatch"&&e.kickoffUtc?r.bettingKickoff(e.kickoffUtc):void 0;return(0,le.jsxs)("div",{className:"ss-w-mon",children:[(0,le.jsxs)("div",{className:"ss-w-mon-top",children:[a&&(0,le.jsxs)("span",{className:"ss-w-fandash-live-pill",children:[(0,le.jsx)("span",{className:"ss-w-fandash-live-dot","aria-hidden":"true"}),r.liveLabel]}),e.phase==="fullTime"&&(0,le.jsx)("span",{className:"ss-w-mon-pill",children:r.fullTimeLabel}),p&&(0,le.jsxs)("span",{className:"ss-w-mon-pill",children:[p.dayLabel," \xB7 ",p.time]}),a&&e.minuteLabel&&(0,le.jsx)("span",{className:"ss-w-mon-min",children:e.minuteLabel}),e.competitionName&&(0,le.jsx)("span",{className:"ss-w-mon-comp",children:e.competitionName}),(0,le.jsx)(ln,{ui:r,monitor:n,pin:{kind:"match",matchId:e.matchId}})]}),(0,le.jsxs)("div",{className:"ss-w-mon-main",children:[(0,le.jsxs)("span",{className:"ss-w-mon-side",children:[(0,le.jsx)(at,{kind:"team",url:(m=e.homeCrestUrl)!=null?m:void 0,name:(g=e.homeTeamName)!=null?g:void 0}),(0,le.jsx)("span",{className:"ss-w-mon-name",children:e.homeTeamName})]}),e.phase==="preMatch"?(0,le.jsx)("span",{className:"ss-w-mon-vs",children:"vs"}):(0,le.jsxs)("span",{className:"ss-w-mon-score",children:[e.homeScore,(0,le.jsx)("i",{children:"\u2013"}),e.awayScore]}),(0,le.jsxs)("span",{className:"ss-w-mon-side ss-w-mon-side--away",children:[(0,le.jsx)(at,{kind:"team",url:(w=e.awayCrestUrl)!=null?w:void 0,name:(C=e.awayTeamName)!=null?C:void 0}),(0,le.jsx)("span",{className:"ss-w-mon-name",children:e.awayTeamName})]})]}),(o.length>0||l.length>0)&&(0,le.jsxs)("div",{className:"ss-w-mon-scorers",children:[(0,le.jsx)("ul",{className:"ss-w-mon-scorers-col ss-w-mon-scorers-home",children:o.map((f,h)=>(0,le.jsx)("li",{children:f.label},`${f.player}-${h}`))}),(0,le.jsx)("span",{className:"ss-w-mon-scorers-ball","aria-hidden":"true",children:"\u26BD"}),(0,le.jsx)("ul",{className:"ss-w-mon-scorers-col ss-w-mon-scorers-away",children:l.map((f,h)=>(0,le.jsx)("li",{children:f.label},`${f.player}-${h}`))})]}),(0,le.jsx)("div",{className:"ss-w-mon-stats",children:d.map(f=>{let h=f.homeNum+f.awayNum,y=h>0?f.homeNum/h*75:0,A=h>0?f.awayNum/h*75:0,E=tg(f,t),x=qP(f,e.matchId,s.conversationId);return(0,le.jsxs)("div",{className:E?"ss-w-mon-stat ss-w-mon-pstrip":"ss-w-mon-stat",children:[(0,le.jsxs)("div",{className:"ss-w-mon-stat-row",children:[(0,le.jsx)("span",{className:"ss-w-mon-stat-v ss-w-mon-stat-v--home",children:f.homeValue}),(0,le.jsx)("span",{className:"ss-w-mon-stat-l",children:f.label}),(0,le.jsx)("span",{className:"ss-w-mon-stat-v ss-w-mon-stat-v--away",children:f.awayValue})]}),(0,le.jsxs)("div",{className:"ss-w-mon-bar",children:[(0,le.jsx)("b",{className:"ss-w-mon-bar-home",style:{width:`${y}%`}}),(0,le.jsx)("i",{className:"ss-w-mon-bar-away",style:{width:`${A}%`}})]}),f.market&&!f.market.isSuspended&&(0,le.jsxs)("div",{className:E?"ss-w-mon-stat-mkt ss-w-mon-mkt":"ss-w-mon-stat-mkt",children:[(0,le.jsxs)("span",{children:[f.market.marketLabel," \xB7 ",f.market.selectionLabel]}),(0,le.jsxs)("span",{className:"ss-w-mon-stat-mkt-right",children:[typeof f.market.price=="number"&&(0,le.jsx)("span",{className:"ss-w-mon-price",children:f.market.price.toFixed(2)}),(0,le.jsx)(Mo,{selection:x,shownOdds:typeof f.market.price=="number"?f.market.price.toFixed(2):"",marketName:f.market.marketLabel,marketDeveloperName:f.market.marketDeveloperName,slip:s,ui:r})]})]})]},f.label)})}),e.status==="stale"&&(0,le.jsx)("span",{className:"ss-w-mon-asof",children:r.asOf(JP(e.asOfUtc))}),e.momentum.length>0&&(0,le.jsxs)("div",{className:"ss-w-mon-mom",children:[(0,le.jsx)("span",{className:"ss-w-mon-stat-l",children:r.momentumLabel}),(0,le.jsx)(mc,{points:e.momentum,clubIsHome:!0})]}),e.phase==="fullTime"&&(0,le.jsx)("div",{className:"ss-w-mon-grace",children:r.graceNote})]})}var dt=b(I(),1);function KP({m:e,ui:t}){let n=e.phase!=="preMatch"&&typeof e.homeScore=="number",r=e.status==="stale";return!n&&!e.minuteLabel&&!(e.isSuspended&&!e.isSettled)&&!e.isSettled&&!r?null:(0,dt.jsxs)("div",{className:"ss-w-mk-live",children:[n&&(0,dt.jsxs)("b",{className:"ss-w-mk-live-score",children:[e.homeTeamName," ",e.homeScore,"\u2013",e.awayScore," ",e.awayTeamName]}),e.minuteLabel&&(0,dt.jsx)("span",{className:"ss-w-mon-min",children:e.minuteLabel}),e.isSuspended&&!e.isSettled&&(0,dt.jsx)("span",{className:"ss-w-mon-susp",children:t.suspendedLabel}),e.isSettled&&(0,dt.jsx)("span",{className:"ss-w-mon-pill",children:t.fullTimeLabel}),r&&(0,dt.jsx)("span",{className:"ss-w-mon-asof",children:t.asOf(new Date(e.asOfUtc).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}))})]})}function m1({monitor:e,ui:t,slip:n}){var s,a;let r=((a=(s=e.snapshot)==null?void 0:s.matches)!=null?a:[]).filter(i=>e.pins.some(o=>o.kind==="match"&&o.matchId===i.matchId));return r.length===0?(0,dt.jsx)("div",{className:"ss-w-mon-empty",children:t.emptyMatchesTab}):(0,dt.jsx)("div",{className:"ss-w-mon-list",children:r.map(i=>(0,dt.jsxs)("div",{className:"ss-w-mon-item",children:[(0,dt.jsx)(p1,{match:i,promotedPins:e.pins.filter(o=>o.kind!=="match"&&o.matchId===i.matchId),monitor:e,ui:t,slip:n}),(0,dt.jsx)(c1,{match:i,monitor:e,ui:t,slip:n})]},i.matchId))})}function YP(e,t){let n=e.mainRows[0];if(t===void 0||!n||n.oddsDecimal===void 0||n.oddsDecimal===t)return e;let r={...n,previousOdds:t.toFixed(2),movementDirection:n.oddsDecimal<t?"shortened":"drifted"};return{...e,mainRows:[r,...e.mainRows.slice(1)]}}function f1({monitor:e,ui:t,slip:n}){var s,a;let r=((a=(s=e.snapshot)==null?void 0:s.markets)!=null?a:[]).filter(i=>e.pins.some(o=>o.key===i.key));return r.length===0?(0,dt.jsx)("div",{className:"ss-w-mon-empty",children:t.emptyOddsTab}):(0,dt.jsx)("div",{className:"ss-w-mon-list",children:r.map(i=>{let o=e.pins.find(l=>l.key===i.key);return(0,dt.jsxs)("div",{className:"ss-w-mon-oddspin","data-settled":i.isSettled||void 0,children:[(0,dt.jsx)(KP,{m:i,ui:t}),i.card&&(0,dt.jsx)(ni,{cards:[YP(Ua(i.card),e.lastViewedPrices[i.key])],ui:t,slip:n,monitor:e,pinRef:o!=null?o:void 0,inSlipIds:e.inSlip}),i.history&&(0,dt.jsx)(uc,{cards:[xu(i.history)],ui:t}),!i.card&&!i.history&&(0,dt.jsx)("div",{className:"ss-w-mon-empty-card",children:t.oddsUnavailable})]},i.key)})})}var Dn=b(I(),1);function $P(e){let t=new Date(e*1e3);return`${`${t.getHours()}`.padStart(2,"0")}:${`${t.getMinutes()}`.padStart(2,"0")}`}function g1({name:e,crest:t,away:n=!1}){return(0,Dn.jsxs)("span",{className:n?"ss-w-drow-side ss-w-drow-side--away":"ss-w-drow-side",children:[t?(0,Dn.jsx)("img",{className:"ss-w-drow-crest",src:t,alt:""}):null,(0,Dn.jsx)("span",{className:"ss-w-drow-nm",children:e})]})}function fc({match:e,state:t,stale:n,ui:r,monitor:s}){var u;let a=(t==null?void 0:t.phase)==="live"&&!n,i=((t==null?void 0:t.phase)==="live"||(t==null?void 0:t.phase)==="fullTime")&&typeof t.homeScore=="number"&&typeof t.awayScore=="number",o=(t==null?void 0:t.phase)==="live"&&(u=t.minuteLabel)!=null?u:null,l=t!=null&&t.isHalfTime&&!n?r.halfTime:a?o!=null?o:"\u2014":(t==null?void 0:t.phase)==="live"?"\u2014":$P(e.kickoffUnix);return(0,Dn.jsxs)("div",{className:a||t!=null&&t.isHalfTime?"ss-w-drow ss-w-drow--live":"ss-w-drow",children:[(0,Dn.jsx)("span",{className:a||t!=null&&t.isHalfTime?"ss-w-drow-when ss-w-drow-when--live":"ss-w-drow-when",children:l}),(0,Dn.jsxs)("span",{className:"ss-w-drow-fx",children:[(0,Dn.jsx)(g1,{name:e.homeTeamName,crest:e.homeTeamImagePath}),(0,Dn.jsx)("span",{className:i?"ss-w-drow-sc":"ss-w-drow-sc ss-w-drow-sc--idle",children:i?`${t.homeScore}\u2013${t.awayScore}`:"\u2013"}),(0,Dn.jsx)(g1,{name:e.awayTeamName,crest:e.awayTeamImagePath,away:!0})]}),(0,Dn.jsx)(ln,{ui:r,monitor:s,pin:{kind:"match",matchId:e.matchId}})]})}var $n=b(I(),1);function h1({group:e,open:t,onToggle:n,states:r,stale:s,ui:a,monitor:i,disambiguate:o=!1}){let l=e.matches.filter(c=>!vu(r[c.matchId],s)),u=l.length!==e.matches.length;return l.length===0?null:(0,$n.jsxs)("div",{className:"ss-w-grp",children:[(0,$n.jsxs)("button",{type:"button",className:"ss-w-grp-head","aria-expanded":t,onClick:n,children:[(0,$n.jsx)("span",{className:"ss-w-grp-chev",children:t?"\u25BE":"\u25B8"}),u&&(0,$n.jsx)("span",{className:"ss-w-sec-dot","aria-hidden":"true"}),(0,$n.jsxs)("span",{className:"ss-w-grp-name",children:[e.competitionName,o&&e.competitionCountry?(0,$n.jsxs)("span",{className:"ss-w-grp-country",children:[" (",e.competitionCountry,")"]}):null]}),(0,$n.jsx)("span",{className:"ss-w-grp-count",children:l.length})]}),t&&(0,$n.jsx)("div",{className:"ss-w-grp-body",children:l.map(c=>(0,$n.jsx)(fc,{match:c,state:r[c.matchId],stale:s,ui:a,monitor:i},c.matchId))})]})}var zn=b(I(),1);function w1({discovery:e,ui:t,monitor:n}){let{groups:r,states:s,stale:a,expanded:i,toggleGroup:o}=e,l=Qa(r,s),u=a?[]:l.flatMap(d=>d.matches.filter(p=>vu(s[p.matchId],a)).map(p=>({match:p,rank:d.rank}))).sort((d,p)=>d.rank-p.rank),c=l.reduce((d,p)=>{var m;return d[p.competitionName]=((m=d[p.competitionName])!=null?m:0)+1,d},{});return(0,zn.jsxs)("div",{className:"ss-w-mon-list",children:[a&&(0,zn.jsx)("div",{className:"ss-w-stale",children:t.staleStates}),u.length>0&&(0,zn.jsxs)(zn.Fragment,{children:[(0,zn.jsxs)("div",{className:"ss-w-sec-head",children:[(0,zn.jsx)("span",{className:"ss-w-sec-dot","aria-hidden":"true"}),t.sectionLive]}),(0,zn.jsx)("div",{className:"ss-w-today-live",children:u.map(({match:d})=>(0,zn.jsx)(fc,{match:d,state:s[d.matchId],stale:a,ui:t,monitor:n},d.matchId))})]}),l.map(d=>{var p,m;return(0,zn.jsx)(h1,{group:d,open:(p=i[d.competitionId])!=null?p:d.expandedByDefault,onToggle:()=>o(d.competitionId),disambiguate:((m=c[d.competitionName])!=null?m:0)>1,states:s,stale:a,ui:t,monitor:n},d.competitionId)})]})}var Pc=b(se(),1);var gc=b(I(),1);function hc({ui:e}){return(0,gc.jsx)("div",{className:"ss-w-mon-list",children:(0,gc.jsx)("div",{className:"ss-w-games-wall",children:(0,gc.jsx)("p",{children:e.gamesLoginRequired})})})}var kc=b(se(),1);function ZP(e){return e.split("-").map(t=>t&&t[0].toUpperCase()+t.slice(1)).join(" ")}function et(e,t){var n,r;return(r=(n=e.title)!=null?n:t[e.gameId])!=null?r:ZP(e.gameId)}function zt(e){var n;let t=e.trim().split(/\s+/).filter(Boolean);return t.length<=1?{first:"",last:(n=t[0])!=null?n:""}:{first:t.slice(0,-1).join(" "),last:t[t.length-1]}}var ae=b(I(),1);function yc({gameId:e}){var t;return(0,ae.jsx)("svg",{className:"ss-g-art",viewBox:"0 0 120 74","aria-hidden":"true",children:(t=y1[e])!=null?t:y1.default})}var wc=(e,t,n,r="ss-g-art-fg")=>(0,ae.jsxs)("g",{className:r,children:[(0,ae.jsx)("circle",{cx:e,cy:t-n*.3,r:n*.45}),(0,ae.jsx)("path",{d:`M${e-n} ${t+n}c0-${n*.8} ${n*.45}-${n*1.1} ${n}-${n*1.1}s${n} ${n*.3} ${n} ${n*1.1}z`})]}),y1={"mystery-tiger":(0,ae.jsxs)(ae.Fragment,{children:[wc(60,38,26,"ss-g-art-fg"),(0,ae.jsx)("text",{x:"60",y:"36",className:"ss-g-art-q",textAnchor:"middle",children:"?"})]}),"higher-or-lower":(0,ae.jsxs)(ae.Fragment,{children:[wc(32,38,20),wc(88,38,20),(0,ae.jsx)("circle",{cx:"60",cy:"37",r:"11",className:"ss-g-art-accent"}),(0,ae.jsx)("path",{d:"M57 33l3-3 3 3M57 41l3 3 3-3",className:"ss-g-art-ink"})]}),"guess-the-xi":(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)("rect",{x:"8",y:"4",width:"104",height:"66",rx:"6",className:"ss-g-art-pitch"}),[[60,60,"a"],[24,46],[48,46],[72,46],[96,46],[36,30],[60,30],[84,30],[40,14],[60,14],[80,14]].map(([e,t,n],r)=>(0,ae.jsx)("circle",{cx:e,cy:t,r:"4",className:n?"ss-g-art-accent":"ss-g-art-dot"},r))]}),"daily-quiz":(0,ae.jsx)(ae.Fragment,{children:[[14,8],[62,8],[14,40],[62,40]].map(([e,t],n)=>(0,ae.jsx)("rect",{x:e,y:t,width:"44",height:"26",rx:"5",className:n===1?"ss-g-art-correct":"ss-g-art-block"},n))}),"career-path":(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)("path",{d:"M18 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z",className:"ss-g-art-fg"}),(0,ae.jsx)("path",{d:"M48 37h8M84 37h8",className:"ss-g-art-line"}),(0,ae.jsx)("path",{d:"M60 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z",className:"ss-g-art-fg"}),(0,ae.jsx)("rect",{x:"96",y:"22",width:"18",height:"26",rx:"4",className:"ss-g-art-dash"}),(0,ae.jsx)("text",{x:"105",y:"40",className:"ss-g-art-q",textAnchor:"middle",children:"?"})]}),"beat-the-grid":(0,ae.jsx)(ae.Fragment,{children:[0,1,2].flatMap(e=>[0,1,2].map(t=>(0,ae.jsx)("rect",{x:33+t*19,y:10+e*19,width:"16",height:"16",rx:"3",className:(e+t)%3===0?"ss-g-art-accent":"ss-g-art-block"},`${e}${t}`)))}),"matchday-predictor":(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)("path",{d:"M10 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z",className:"ss-g-art-fg"}),(0,ae.jsx)("rect",{x:"38",y:"22",width:"18",height:"24",rx:"4",className:"ss-g-art-accent-stroke"}),(0,ae.jsx)("rect",{x:"64",y:"22",width:"18",height:"24",rx:"4",className:"ss-g-art-dash"}),(0,ae.jsx)("path",{d:"M90 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z",className:"ss-g-art-fg"})]}),"starting-xi":(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)("rect",{x:"8",y:"4",width:"104",height:"66",rx:"6",className:"ss-g-art-pitch"}),[[60,60],[30,46],[50,46],[70,46],[90,46],[45,30],[75,30],[30,16],[60,16],[90,16]].map(([e,t],n)=>(0,ae.jsx)("circle",{cx:e,cy:t,r:"5",className:n<7?"ss-g-art-accent":"ss-g-art-dash"},n))]}),"stat-ladder":(0,ae.jsx)(ae.Fragment,{children:[[20,70],[34,52],[48,34]].map(([e,t],n)=>(0,ae.jsx)("rect",{x:"24",y:e,width:t,height:"12",rx:"3",className:n===1?"ss-g-art-accent":"ss-g-art-block"},n))}),"fan-motm":(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)("circle",{cx:"60",cy:"37",r:"26",className:"ss-g-art-accent-stroke"}),wc(60,40,18),(0,ae.jsx)("path",{d:"M84 8l2.4 5 5.4.6-4 3.7 1.1 5.4-4.9-2.7-4.9 2.7 1.1-5.4-4-3.7 5.4-.6z",className:"ss-g-art-accent"})]}),default:(0,ae.jsx)("circle",{cx:"60",cy:"37",r:"22",className:"ss-g-art-fg"})};var ui=b(I(),1);function Te({variant:e="neutral",icon:t,children:n,className:r}){return(0,ui.jsxs)("span",{className:`ss-g-chip ss-g-chip--${e}${r?` ${r}`:""}`,children:[t,n]})}function x1({value:e,label:t}){return(0,ui.jsxs)("span",{className:"ss-g-statstack",children:[(0,ui.jsx)("span",{className:"ss-g-statstack-v",children:e}),(0,ui.jsx)("span",{className:"ss-g-statstack-l",children:t})]})}var qe=b(I(),1),Ot=(e,t,n=!1)=>(0,qe.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:n?"currentColor":"none",stroke:n?"none":"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:t}),xc=({size:e=20})=>Ot(e,(0,qe.jsx)("path",{d:"M15 18l-6-6 6-6"})),Ur=({size:e=14})=>Ot(e,[(0,qe.jsx)("rect",{x:"5",y:"11",width:"14",height:"10",rx:"2"},"a"),(0,qe.jsx)("path",{d:"M8 11V7a4 4 0 0 1 8 0v4"},"b")]),bn=({size:e=14})=>Ot(e,(0,qe.jsx)("path",{d:"M5 12l5 5 9-10"})),bs=({size:e=16})=>Ot(e,(0,qe.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})),v1=({size:e=18})=>Ot(e,[(0,qe.jsx)("circle",{cx:"11",cy:"11",r:"7"},"a"),(0,qe.jsx)("path",{d:"M20 20l-3.5-3.5"},"b")]),sa=({size:e=20})=>Ot(e,(0,qe.jsx)("path",{d:"M12 5v14M5 12h14"}));var vc=({size:e=16})=>Ot(e,[(0,qe.jsx)("path",{d:"M9 18h6M10 21h4"},"a"),(0,qe.jsx)("path",{d:"M12 3a6 6 0 0 0-3.5 10.9V16h7v-2.1A6 6 0 0 0 12 3z"},"b")]),b1=({size:e=12})=>Ot(e,(0,qe.jsx)("path",{d:"M12 19V5M5 12l7-7 7 7"})),k1=({size:e=12})=>Ot(e,(0,qe.jsx)("path",{d:"M12 5v14M19 12l-7 7-7-7"})),C1=({size:e=18})=>Ot(e,[(0,qe.jsx)("rect",{x:"4",y:"5",width:"16",height:"15",rx:"2"},"a"),(0,qe.jsx)("path",{d:"M4 10h16M9 3v4M15 3v4"},"b")]),bc=({size:e=18})=>Ot(e,(0,qe.jsx)("path",{d:"M12 3l7 3v6c0 5-3 8-7 9-4-1-7-4-7-9V6z"})),S1=({size:e=18})=>Ot(e,(0,qe.jsx)("path",{d:"M5 21V4M5 4h12l-2 4 2 4H5"})),A1=({size:e=18})=>Ot(e,[(0,qe.jsx)("circle",{cx:"12",cy:"12",r:"9"},"a"),(0,qe.jsx)("path",{d:"M12 7l4 3-1.5 4.5h-5L8 10z"},"b")]),E1=({size:e=18})=>Ot(e,(0,qe.jsx)("path",{d:"M4 6h6l1 6 8 3v3H4z"})),I1=({size:e=18})=>Ot(e,(0,qe.jsx)("path",{d:"M7 21v-8l-2-3V6a1.5 1.5 0 0 1 3 0v3V4a1.5 1.5 0 0 1 3 0v5V3.5a1.5 1.5 0 0 1 3 0V9V5a1.5 1.5 0 0 1 3 0v9l-2 3v4z"})),N1=({size:e=16})=>Ot(e,(0,qe.jsx)("path",{d:"M12 3c1 4 5 5 5 10a5 5 0 0 1-10 0c0-3 2-4 2-7 1.5 1 2 2 2 3 1-2 1-4 1-6z"}),!0);var Se=b(I(),1);function e2(e,t){var n,r;switch(e.status){case"locked":return{text:t.gameLocked,tone:"muted"};case"voided":return{text:t.gameVoided,tone:"muted"};case"in_progress":return{text:t.games.resume,tone:"accent"};case"played":case"graded":return e.ranked?{text:t.games.doneWithScore((n=e.score)!=null?n:0),tone:"success"}:{text:t.games.done,tone:"success"};default:return e.kind==="fixture"&&e.lockAtUtc&&new Date(e.lockAtUtc).getTime()>Date.now()?{text:t.games.locksAt(t.games.formatDayTime(e.lockAtUtc)),tone:"accent"}:{text:(r=t.games.taglines[e.gameId])!=null?r:t.gamePlay,tone:"new"}}}var t2=new Set(["locked","voided"]);function Do({game:e,onOpen:t,ui:n,variant:r="tile"}){var u;let s=e2(e,n),a=t2.has(e.status),i=et(e,n.games.titles),o=r==="hero"?(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsxs)("span",{className:"ss-g-hero-text",children:[(0,Se.jsx)("span",{className:"ss-g-hero-eyebrow",children:n.games.dailyChallenge}),s.tone==="new"&&(0,Se.jsx)(Te,{variant:"badge",children:n.games.newToday}),(0,Se.jsx)("span",{className:"ss-g-hero-title",children:i}),(0,Se.jsx)("span",{className:"ss-g-hero-sub",children:(u=n.games.taglines[e.gameId])!=null?u:""}),s.tone==="success"?(0,Se.jsx)("span",{className:"ss-g-tile-status","data-tone":"success",children:s.text}):(0,Se.jsxs)("span",{className:"ss-g-hero-cta",children:[s.tone==="accent"?n.games.resume:n.games.playNow," \u2192"]})]}),(0,Se.jsx)("span",{className:"ss-g-hero-art",children:(0,Se.jsx)(yc,{gameId:e.gameId})})]}):r==="wide"?(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)("span",{className:"ss-g-wide-art",children:(0,Se.jsx)(yc,{gameId:e.gameId})}),(0,Se.jsxs)("span",{className:"ss-g-wide-text",children:[(0,Se.jsx)("span",{className:"ss-g-tile-title",children:i}),(0,Se.jsx)("span",{className:"ss-g-tile-status","data-tone":s.tone,children:s.text}),s.tone==="new"&&(0,Se.jsx)(Te,{variant:"badge",children:n.games.newToday})]}),(0,Se.jsx)("span",{className:"ss-g-wide-chev",children:(0,Se.jsx)(xc,{size:18})})]}):(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)("span",{className:"ss-g-tile-art",children:(0,Se.jsx)(yc,{gameId:e.gameId})}),(0,Se.jsx)("span",{className:"ss-g-tile-title",children:i}),(0,Se.jsx)("span",{className:"ss-g-tile-status","data-tone":s.tone,children:s.text})]}),l=`ss-g-tile ss-g-tile--${r}`;return a?(0,Se.jsx)("div",{className:l,"data-disabled":!0,"aria-disabled":"true",children:o}):(0,Se.jsx)("button",{type:"button",className:l,"aria-label":`${i} \u2014 ${s.text}`,onClick:()=>t(e),children:o})}var be=b(I(),1),T1=new Set(["available","in_progress"]),n2=new Set(["played","graded"]);function r2(e){var s;let t=e.filter(a=>a.kind==="daily"),n=t.find(a=>a.gameId==="mystery-tiger");if(n&&T1.has(n.status))return n;let r=t.find(a=>T1.has(a.status));return r||((s=n!=null?n:t[0])!=null?s:null)}var L1=e=>`${e.gameId}-${e.gameDay}-${e.fixtureId}`;function P1({games:e,myWeeklyRow:t,weeklyPrize:n,onOpen:r,ui:s}){let[,a]=(0,kc.useState)(0);(0,kc.useEffect)(()=>{let g=setInterval(()=>a(w=>w+1),6e4);return()=>clearInterval(g)},[]);let i=r2(e),o=e.filter(g=>g.kind==="daily"&&g!==i),l=o.filter(g=>g.gameId!=="beat-the-grid"),u=o.find(g=>g.gameId==="beat-the-grid"),c=e.filter(g=>g.kind==="fixture"),d=c.map(g=>g.kickoffUtc).filter(g=>!!g).sort(),p=e.filter(g=>n2.has(g.status)).reduce((g,w)=>{var C;return g+((C=w.score)!=null?C:0)},0),m="\u2014";return(0,be.jsxs)("div",{className:"ss-g-hub",children:[(0,be.jsxs)("div",{className:"ss-g-stats",children:[(0,be.jsxs)("div",{className:"ss-g-stat",children:[(0,be.jsx)("span",{className:"ss-g-stat-l",children:s.games.statStreak}),(0,be.jsxs)("span",{className:"ss-g-stat-v","data-testid":"stat-streak",children:[t?(0,be.jsxs)(be.Fragment,{children:[(0,be.jsx)(N1,{}),t.currentStreak]}):m,t&&(0,be.jsx)("small",{children:s.games.unitDays})]})]}),(0,be.jsxs)("div",{className:"ss-g-stat",children:[(0,be.jsx)("span",{className:"ss-g-stat-l",children:s.games.statToday}),(0,be.jsxs)("span",{className:"ss-g-stat-v ss-g-stat-v--accent","data-testid":"stat-today",children:[s.games.formatPts(p),(0,be.jsx)("small",{children:s.games.unitPts})]})]}),(0,be.jsxs)("div",{className:"ss-g-stat",children:[(0,be.jsx)("span",{className:"ss-g-stat-l",children:s.games.statRank}),(0,be.jsxs)("span",{className:"ss-g-stat-v","data-testid":"stat-rank",children:[t?`#${t.rank}`:m,t&&(0,be.jsx)("small",{children:s.games.thisWeek})]})]})]}),n&&(0,be.jsx)(Te,{variant:"accent",className:"ss-g-prize",children:n}),i&&(0,be.jsx)(Do,{game:i,onOpen:r,ui:s,variant:"hero"}),(l.length>0||u)&&(0,be.jsxs)("section",{className:"ss-g-sec",children:[(0,be.jsxs)("div",{className:"ss-g-sec-head",children:[(0,be.jsx)("h3",{children:s.games.dailyGames}),(0,be.jsx)("span",{children:s.games.newSetAtMidnight})]}),l.length>0&&(0,be.jsx)("div",{className:"ss-g-grid",children:l.map(g=>(0,be.jsx)(Do,{game:g,onOpen:r,ui:s},L1(g)))}),u&&(0,be.jsx)(Do,{game:u,onOpen:r,ui:s,variant:"wide"})]}),c.length>0&&(0,be.jsxs)("section",{className:"ss-g-sec",children:[(0,be.jsxs)("div",{className:"ss-g-sec-head",children:[(0,be.jsx)("h3",{children:s.games.matchdayGames}),d[0]&&(0,be.jsx)("span",{children:s.games.kickoffAt(s.games.formatDayTime(d[0]))})]}),(0,be.jsx)("div",{className:"ss-g-grid",children:c.map(g=>(0,be.jsx)(Do,{game:g,onOpen:r,ui:s},L1(g)))})]})]})}var As=b(se(),1);var kn=b(se(),1);function s2(e){return{alreadyPlayed:e.status==="played"||e.status==="graded"||e.status==="pending",score:e.score,isCorrect:e.isCorrect,clientStateJson:e.clientStateJson,attemptsUsed:e.attemptsUsed}}function M1(e,{gameId:t,gameDay:n,fixtureId:r,refresh:s}){let[a,i]=(0,kn.useState)(null),[o,l]=(0,kn.useState)(!1),[u,c]=(0,kn.useState)(null),d=(0,kn.useRef)(!1),p=(0,kn.useRef)(e);p.current=e;let m=(0,kn.useRef)({gameId:t,gameDay:n,fixtureId:r,refresh:s});m.current={gameId:t,gameDay:n,fixtureId:r,refresh:s};let g=(0,kn.useRef)(null);g.current=a;let w=(0,kn.useCallback)(async()=>{var A;let h=p.current;if(!h)return;let y=m.current;try{let E=await h.getGameResult(y.gameId,y.fixtureId,y.gameDay);if(E===null)return;if(E.clientStateJson==null&&((A=g.current)==null?void 0:A.clientStateJson)!=null){c(E.status);return}i(s2(E)),c(E.status)}catch{}},[]),C=(0,kn.useCallback)(async h=>{var A,E;let y=p.current;if(!(!y||d.current)){d.current=!0,l(!0);try{let x=m.current,M=await y.postPlay(x.gameId,h,x.gameDay,x.fixtureId);if(M!==null){let P=M.clientStateJson!=null,z=M.alreadyPlayed===!0,S=((A=g.current)==null?void 0:A.clientStateJson)!=null;!P&&!z&&S?await w():i(M),M.pointsDelta!=null&&((E=x.refresh)==null||E.call(x))}}catch{}finally{d.current=!1,l(!1)}}},[w]),f=(0,kn.useCallback)(()=>{w()},[w]);return{result:a,submitting:o,submit:C,hydrate:f,rawStatus:u}}var Ac=b(se(),1);var a2={england:"\u{1F3F4}\u{E0067}\u{E0062}\u{E0065}\u{E006E}\u{E0067}\u{E007F}",scotland:"\u{1F3F4}\u{E0067}\u{E0062}\u{E0073}\u{E0063}\u{E0074}\u{E007F}",wales:"\u{1F3F4}\u{E0067}\u{E0062}\u{E0077}\u{E006C}\u{E0073}\u{E007F}","northern ireland":"\u{1F1EC}\u{1F1E7}","republic of ireland":"\u{1F1EE}\u{1F1EA}",ireland:"\u{1F1EE}\u{1F1EA}","united kingdom":"\u{1F1EC}\u{1F1E7}",france:"\u{1F1EB}\u{1F1F7}",spain:"\u{1F1EA}\u{1F1F8}",portugal:"\u{1F1F5}\u{1F1F9}",germany:"\u{1F1E9}\u{1F1EA}",italy:"\u{1F1EE}\u{1F1F9}",netherlands:"\u{1F1F3}\u{1F1F1}",belgium:"\u{1F1E7}\u{1F1EA}",switzerland:"\u{1F1E8}\u{1F1ED}",austria:"\u{1F1E6}\u{1F1F9}",denmark:"\u{1F1E9}\u{1F1F0}",sweden:"\u{1F1F8}\u{1F1EA}",norway:"\u{1F1F3}\u{1F1F4}",finland:"\u{1F1EB}\u{1F1EE}",iceland:"\u{1F1EE}\u{1F1F8}",poland:"\u{1F1F5}\u{1F1F1}",czechia:"\u{1F1E8}\u{1F1FF}","czech republic":"\u{1F1E8}\u{1F1FF}",croatia:"\u{1F1ED}\u{1F1F7}",serbia:"\u{1F1F7}\u{1F1F8}","bosnia and herzegovina":"\u{1F1E7}\u{1F1E6}",greece:"\u{1F1EC}\u{1F1F7}",romania:"\u{1F1F7}\u{1F1F4}",ukraine:"\u{1F1FA}\u{1F1E6}",russia:"\u{1F1F7}\u{1F1FA}",hungary:"\u{1F1ED}\u{1F1FA}",slovakia:"\u{1F1F8}\u{1F1F0}",slovenia:"\u{1F1F8}\u{1F1EE}",turkey:"\u{1F1F9}\u{1F1F7}",t\u00FCrkiye:"\u{1F1F9}\u{1F1F7}",albania:"\u{1F1E6}\u{1F1F1}","north macedonia":"\u{1F1F2}\u{1F1F0}",brazil:"\u{1F1E7}\u{1F1F7}",argentina:"\u{1F1E6}\u{1F1F7}",uruguay:"\u{1F1FA}\u{1F1FE}",colombia:"\u{1F1E8}\u{1F1F4}",chile:"\u{1F1E8}\u{1F1F1}",peru:"\u{1F1F5}\u{1F1EA}",ecuador:"\u{1F1EA}\u{1F1E8}",paraguay:"\u{1F1F5}\u{1F1FE}",mexico:"\u{1F1F2}\u{1F1FD}","united states":"\u{1F1FA}\u{1F1F8}",usa:"\u{1F1FA}\u{1F1F8}",canada:"\u{1F1E8}\u{1F1E6}",jamaica:"\u{1F1EF}\u{1F1F2}",nigeria:"\u{1F1F3}\u{1F1EC}",ghana:"\u{1F1EC}\u{1F1ED}",senegal:"\u{1F1F8}\u{1F1F3}",ivorycoast:"\u{1F1E8}\u{1F1EE}","cote d'ivoire":"\u{1F1E8}\u{1F1EE}","ivory coast":"\u{1F1E8}\u{1F1EE}",cameroon:"\u{1F1E8}\u{1F1F2}",egypt:"\u{1F1EA}\u{1F1EC}",morocco:"\u{1F1F2}\u{1F1E6}",algeria:"\u{1F1E9}\u{1F1FF}",tunisia:"\u{1F1F9}\u{1F1F3}",mali:"\u{1F1F2}\u{1F1F1}","south africa":"\u{1F1FF}\u{1F1E6}","dr congo":"\u{1F1E8}\u{1F1E9}",japan:"\u{1F1EF}\u{1F1F5}","south korea":"\u{1F1F0}\u{1F1F7}",korea:"\u{1F1F0}\u{1F1F7}",australia:"\u{1F1E6}\u{1F1FA}","saudi arabia":"\u{1F1F8}\u{1F1E6}",iran:"\u{1F1EE}\u{1F1F7}","new zealand":"\u{1F1F3}\u{1F1FF}"};function Cc(e){var n;if(!e)return"\u{1F3F3}\uFE0F";let t=e.trim().toLowerCase();return(n=a2[t])!=null?n:e.slice(0,3).toUpperCase()}var R1=b(se(),1),Sc=b(I(),1);function i2(e){var s,a;let t=e.trim().split(/\s+/).filter(Boolean),n=t[0];if(!n)return"?";let r=t[t.length-1];return t.length===1||!r?n.slice(0,2).toUpperCase():(((s=n[0])!=null?s:"")+((a=r[0])!=null?a:"")).toUpperCase()}function Bt({name:e,imagePath:t,className:n}){let[r,s]=(0,R1.useState)(!1);return(0,Sc.jsx)("div",{className:n,"aria-hidden":"true",children:!!t&&!r?(0,Sc.jsx)("img",{src:t,alt:"",loading:"lazy",onError:()=>s(!0)}):(0,Sc.jsx)("span",{className:"ss-w-av-initials",children:i2(e)})})}var Qr=b(I(),1);function Oe({title:e,eyebrow:t,right:n,onBack:r,backLabel:s}){return(0,Qr.jsxs)("div",{className:"ss-g-head",children:[r&&(0,Qr.jsx)("button",{type:"button",className:"ss-g-back","aria-label":s,onClick:r,children:(0,Qr.jsx)(xc,{})}),(0,Qr.jsxs)("div",{className:"ss-g-head-text",children:[t&&(0,Qr.jsx)("span",{className:"ss-g-eyebrow",children:t}),(0,Qr.jsx)("h2",{className:"ss-g-title",children:e})]}),n&&(0,Qr.jsx)("div",{className:"ss-g-head-right",children:n})]})}var Hr=b(I(),1);function Gr({segments:e,ariaLabel:t,leftLabel:n,rightLabel:r,right:s}){return(0,Hr.jsxs)("div",{className:"ss-g-progress",children:[(0,Hr.jsxs)("div",{className:"ss-g-progress-main",children:[(n||r)&&(0,Hr.jsxs)("div",{className:"ss-g-progress-labels",children:[(0,Hr.jsx)("span",{children:n}),(0,Hr.jsx)("span",{className:"ss-g-progress-rl",children:r})]}),(0,Hr.jsx)("div",{className:"ss-g-segs",role:"img","aria-label":t,style:{gridTemplateColumns:`repeat(${e.length}, minmax(0, 1fr))`},children:e.map((a,i)=>(0,Hr.jsx)("span",{className:"ss-g-seg","data-state":a},i))})]}),s]})}var aa=b(I(),1);function cn({id:e,label:t,labelHidden:n=!1,placeholder:r,value:s,onChange:a,disabled:i,inputRef:o,onKeyDown:l}){return(0,aa.jsxs)("div",{className:"ss-g-search",children:[(0,aa.jsx)("label",{htmlFor:e,className:n?"ss-g-sr":"ss-g-search-label",children:t}),(0,aa.jsxs)("div",{className:"ss-g-search-box",children:[(0,aa.jsx)(v1,{}),(0,aa.jsx)("input",{id:e,ref:o,type:"text",autoComplete:"off",placeholder:r,value:s,disabled:i,onKeyDown:l,onChange:u=>a(u.target.value)})]})]})}var D1=b(I(),1);function pt({children:e}){return(0,D1.jsx)("div",{className:"ss-g-footer",children:e})}var ia=b(I(),1);function On({size:e,variant:t="default"}){return(0,ia.jsxs)("span",{className:`ss-g-sil ss-g-sil--${t}`,style:{width:e,height:e},"aria-hidden":"true",children:[(0,ia.jsxs)("svg",{width:e*.86,height:e*.86,viewBox:"0 0 100 100",children:[(0,ia.jsx)("circle",{cx:"50",cy:"40",r:"19",fill:"currentColor"}),(0,ia.jsx)("path",{d:"M12 100c0-23 17-38 38-38s38 15 38 38z",fill:"currentColor"})]}),t==="mystery"&&(0,ia.jsx)("span",{className:"ss-g-sil-q",children:"?"})]})}var z1=b(I(),1);function Jt({variant:e="primary",block:t=!1,className:n,type:r="button",...s}){let a=`ss-g-btn ss-g-btn--${e}${t?" ss-g-btn--block":""}${n?` ${n}`:""}`;return(0,z1.jsx)("button",{type:r,className:a,...s})}var ks=b(I(),1);function it({tone:e,title:t,score:n,detail:r,onBack:s,ui:a}){return(0,ks.jsxs)("div",{className:"ss-g-result","data-tone":e,role:"status",children:[(0,ks.jsx)("span",{className:"ss-g-result-title",children:t}),n!==void 0&&(0,ks.jsxs)("span",{className:"ss-g-result-score",children:[(0,ks.jsx)("span",{className:"ss-g-result-num",children:n}),a.games.unitPts]}),r&&(0,ks.jsx)("span",{className:"ss-g-result-detail",children:r}),s&&(0,ks.jsx)(Jt,{variant:"outline",onClick:s,children:a.games.backToGames})]})}var ng=b(I(),1);function Cs({label:e,options:t,onPick:n}){return(0,ng.jsx)("div",{className:"ss-g-opts",role:"listbox","aria-label":e,children:t.map(r=>(0,ng.jsx)("button",{type:"button",role:"option","aria-selected":!1,className:"ss-g-opt",onClick:()=>n(r.key),children:r.content},r.key))})}var ee=b(I(),1);function o2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}var l2=["position","nationality","age","shirtNumber","apps"],u2=new Set(["age","shirtNumber","apps"]),c2=6;function d2(e){return e.verdict==="exact"?"\u2713":e.verdict==="miss"?"\u2717":e.direction==="up"?"\u2191":e.direction==="down"?"\u2193":"\u2248"}function p2(e){return e.direction==="up"?"\u25B2":e.direction==="down"?"\u25BC":""}var m2={goalkeeper:"GK",keeper:"GK",defender:"DEF","centre back":"CB","center back":"CB","centre-back":"CB","center-back":"CB","left back":"LB","right back":"RB","left wing-back":"LWB","right wing-back":"RWB",sweeper:"SW",midfielder:"MID","defensive midfield":"DM","central midfield":"CM","centre midfield":"CM","attacking midfield":"AM","left midfield":"LM","right midfield":"RM","left wing":"LW","right wing":"RW","left winger":"LW","right winger":"RW",forward:"FWD",attacker:"FWD",striker:"ST","second striker":"SS","centre forward":"CF","center forward":"CF","centre-forward":"CF"};function f2(e){let t=m2[e.trim().toLowerCase()];return t||(e.length<=3?e.toUpperCase():e.split(/[\s-]+/).filter(Boolean).map(n=>{var r;return((r=n[0])!=null?r:"").toUpperCase()}).join("").slice(0,3))}function O1(e,t){return t.value?e==="nationality"?Cc(t.value):e==="position"?f2(t.value):t.value:d2(t)}function g2(e,t){return t.map(n=>{let r=e.find(i=>i[n].verdict==="exact");if(r)return{key:n,state:"known",text:O1(n,r[n])};if(!u2.has(n))return{key:n,state:"unknown",text:"?"};let s=null,a=null;for(let i of e){let o=i[n];if(!o.value||!o.direction)continue;let l=Number(o.value);Number.isFinite(l)&&(o.direction==="up"?s=s===null?l:Math.max(s,l):a=a===null?l:Math.min(a,l))}if(s!==null&&a!==null){let i=s+1,o=a-1;return{key:n,state:"range",text:i>=o?String(i):`${i}\u2013${o}`}}return a!==null?{key:n,state:"range",text:`< ${a}`}:s!==null?{key:n,state:"range",text:`> ${s}`}:{key:n,state:"unknown",text:"?"}})}function B1({config:e,result:t,submitting:n,onSubmit:r,ui:s,onBack:a}){var S,V,H,N,T;let i=s.games.mysteryTiger,[o,l]=(0,Ac.useState)(""),u=(0,Ac.useId)(),c=o2(t==null?void 0:t.clientStateJson),d=(S=c==null?void 0:c.guessResults)!=null?S:[],p=new Set(d.map(L=>L.playerId)),m=(H=(V=e==null?void 0:e.shirtTileEnabled)!=null?V:c==null?void 0:c.shirtTileEnabled)!=null?H:!1,g=l2.filter(L=>L!=="shirtNumber"||m),w=(t==null?void 0:t.alreadyPlayed)===!0||(c==null?void 0:c.solved)===!0||(c==null?void 0:c.failed)===!0,C=(N=c==null?void 0:c.guessesUsed)!=null?N:d.length,f=c?c.guessesUsed+c.guessesRemaining:c2,h=(T=t==null?void 0:t.score)!=null?T:0,y=w?c==null?void 0:c.revealedPlayerName:void 0,A=e&&!w?e.squadPlayers.filter(L=>!p.has(L.id)&&L.name.toLowerCase().includes(o.toLowerCase())):[];function E(L){if(!e||w||n)return;let D=[...d.map(G=>G.playerId),L];l(""),r(JSON.stringify({guesses:D}))}let x=e?w?(0,ee.jsxs)(Te,{variant:"accent",children:[h," ",s.games.unitPts]}):(0,ee.jsx)("span",{"data-testid":"mt-chip",children:(0,ee.jsxs)(Te,{children:[s.games.guess," ",(0,ee.jsx)("span",{className:"ss-g-num",children:C+1})," / ",f]})}):void 0,M=Array.from({length:f},(L,O)=>O<C?"done":O===C?"current":"todo"),P={gridTemplateColumns:`minmax(0, 1fr) repeat(${g.length}, 42px)`},z=g2(d,g);return(0,ee.jsxs)("div",{className:"ss-g-screen ss-g-mt","data-testid":"game-screen-mystery-tiger",children:[(0,ee.jsx)(Oe,{title:et({gameId:"mystery-tiger"},s.games.titles),eyebrow:i.eyebrow,right:x,onBack:a,backLabel:s.back}),!e&&(0,ee.jsx)("div",{className:"ss-g-body ss-g-loading",children:s.games.loading}),e&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsxs)("div",{className:"ss-g-body",children:[(0,ee.jsxs)("div",{className:`ss-g-mt-card${w?" ss-g-mt-card--reveal":""}`,children:[(0,ee.jsxs)("div",{className:"ss-g-mt-portrait",children:[y?(0,ee.jsx)(Bt,{className:"ss-g-mt-photo",name:y,imagePath:c==null?void 0:c.revealedPlayerImagePath}):(0,ee.jsx)(On,{size:150,variant:"mystery"}),y&&(0,ee.jsx)("span",{className:"ss-g-mt-reveal-name",children:y})]}),(0,ee.jsx)("div",{className:"ss-g-mt-known",style:{gridTemplateColumns:`repeat(${g.length}, minmax(0, 1fr))`},children:z.map(L=>(0,ee.jsxs)("div",{className:"ss-g-mt-known-cell",children:[(0,ee.jsx)("span",{className:"ss-g-mt-lab",children:i.labels[L.key]}),(0,ee.jsx)("span",{className:"ss-g-mt-known-v","data-state":L.state,"data-testid":`known-${L.key}`,children:L.text})]},L.key))})]}),!w&&(0,ee.jsx)(Gr,{segments:M,ariaLabel:i.progress(C,f)}),d.length>0&&(0,ee.jsxs)("div",{className:"ss-g-mt-table",children:[(0,ee.jsxs)("div",{className:"ss-g-mt-thead",style:P,children:[(0,ee.jsx)("span",{children:i.yourGuesses}),g.map(L=>(0,ee.jsx)("span",{children:i.labels[L]},L))]}),d.map((L,O)=>{var v,Be;let D=(Be=(v=e.squadPlayers.find(Le=>Le.id===L.playerId))==null?void 0:v.name)!=null?Be:`#${L.playerId}`,{first:G,last:pe}=zt(D);return(0,ee.jsxs)("div",{className:"ss-g-mt-row",style:P,children:[(0,ee.jsxs)("div",{className:"ss-g-mt-who",children:[(0,ee.jsx)(Bt,{className:"ss-g-mt-av",name:D}),(0,ee.jsxs)("span",{className:"ss-g-mt-names",children:[G&&(0,ee.jsx)("span",{className:"ss-g-mt-first",children:G}),(0,ee.jsx)("span",{className:"ss-g-mt-last",children:pe})]})]}),g.map(Le=>{var Ke;let k=L[Le],Ee=p2(k);return(0,ee.jsxs)("div",{className:"ss-g-mt-cell","data-testid":`verdict-${Le}-${O}`,"data-verdict":k.verdict,"aria-label":`${i.labels[Le]}: ${(Ke=k.value)!=null?Ke:k.verdict}${k.direction?` ${k.direction}`:""}`,children:[(0,ee.jsx)("span",{className:"ss-g-mt-cell-v","aria-hidden":"true",children:O1(Le,k)}),Ee&&(0,ee.jsx)("span",{className:"ss-g-mt-cell-dir","aria-hidden":"true",children:Ee})]},Le)})]},L.playerId)})]}),!w&&(0,ee.jsxs)("div",{className:"ss-g-mt-legend",children:[(0,ee.jsxs)("span",{children:[(0,ee.jsx)("i",{className:"ss-g-mt-sw","data-verdict":"exact"}),i.legendMatch]}),(0,ee.jsxs)("span",{children:[(0,ee.jsx)("i",{className:"ss-g-mt-sw","data-verdict":"near"}),i.legendClose]}),(0,ee.jsxs)("span",{children:["\u25B2 ",i.legendHigher]})]}),(c==null?void 0:c.hintLine)&&!w&&(0,ee.jsxs)("div",{className:"ss-g-mt-hint",children:[(0,ee.jsx)(vc,{}),(0,ee.jsx)("span",{children:c.hintLine})]}),w&&(0,ee.jsx)(it,{tone:c!=null&&c.solved?"win":c!=null&&c.failed?"lose":"neutral",title:c!=null&&c.solved?i.solved:c!=null&&c.failed?i.failed:s.games.alreadyPlayedTitle,score:h,detail:c?i.detail(c.guessesUsed):void 0,onBack:a,ui:s})]}),!w&&(0,ee.jsxs)(pt,{children:[o.length>0&&A.length>0&&(0,ee.jsx)(Cs,{label:i.optionsLabel,options:A.map(L=>({key:L.id,content:(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(Bt,{className:"ss-g-opt-av",name:L.name}),(0,ee.jsx)("span",{children:L.name})]})})),onPick:L=>E(Number(L))}),(0,ee.jsx)(cn,{id:u,label:i.searchLabel,placeholder:i.searchPlaceholder,value:o,onChange:l,disabled:n})]})]})]})}var ce=b(I(),1),h2=10;function w2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function F1({name:e,imagePath:t,highlight:n,children:r}){let{first:s,last:a}=zt(e);return(0,ce.jsxs)("div",{className:`ss-g-hl-card${n?" ss-g-hl-card--b":""}`,children:[(0,ce.jsx)("div",{className:"ss-g-hl-photo-wrap",children:t?(0,ce.jsx)(Bt,{className:"ss-g-hl-photo",name:e,imagePath:t}):(0,ce.jsx)(On,{size:150})}),(0,ce.jsxs)("div",{className:"ss-g-hl-info",children:[s&&(0,ce.jsx)("span",{className:"ss-g-hl-first",children:s}),(0,ce.jsx)("span",{className:"ss-g-hl-surname",children:a}),r]})]})}function U1({config:e,result:t,submitting:n,onSubmit:r,ui:s,onBack:a}){var A,E,x,M,P;let i=s.games.higherOrLower,o=w2(t==null?void 0:t.clientStateJson),l=(A=o==null?void 0:o.answeredPairs)!=null?A:[],u=l.length,c=l.some(z=>!z.wasCorrect),d=e!=null&&u>=e.pairs.length,p=(t==null?void 0:t.alreadyPlayed)===!0||c||d,m=e&&!p&&(E=e.pairs[u])!=null?E:null,g=l.filter(z=>z.wasCorrect).length,w=(M=(x=o==null?void 0:o.score)!=null?x:t==null?void 0:t.score)!=null?M:0,C=(P=o==null?void 0:o.runLength)!=null?P:0,f=l[l.length-1],h=f?e==null?void 0:e.pairs.find(z=>z.pairIndex===f.pairIndex):void 0;function y(z){if(!e||p||n||!m)return;let V=[...l.map(H=>({pairIndex:H.pairIndex,pick:H.pick})),{pairIndex:m.pairIndex,pick:z}];r(JSON.stringify({answers:V}))}return(0,ce.jsxs)("div",{className:"ss-g-screen ss-g-hl","data-testid":"game-screen-higher-or-lower",children:[(0,ce.jsx)(Oe,{title:et({gameId:"higher-or-lower"},s.games.titles),eyebrow:i.eyebrow(h2),right:e?(0,ce.jsx)(x1,{value:C,label:i.streak}):void 0,onBack:a,backLabel:s.back}),!e&&(0,ce.jsx)("div",{className:"ss-g-body ss-g-loading",children:s.games.loading}),e&&(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsxs)("div",{className:"ss-g-body",children:[(0,ce.jsxs)("div",{className:"ss-g-hl-prompt","data-testid":"hol-prompt",children:[(0,ce.jsx)("span",{className:"ss-g-hl-prompt-q",children:i.whoHadMore}),(0,ce.jsx)("span",{className:"ss-g-hl-prompt-stat",children:e.statLabel}),(0,ce.jsx)("span",{className:"ss-g-hl-prompt-season",children:i.season(e.seasonLabel)})]}),m&&(0,ce.jsxs)("div",{className:"ss-g-hl-pair",children:[(0,ce.jsxs)(F1,{name:m.playerAName,imagePath:m.playerAImagePath,children:[(0,ce.jsx)("span",{className:"ss-g-hl-value",children:m.playerAValue}),(0,ce.jsx)("span",{className:"ss-g-hl-stat",children:e.statLabel})]}),(0,ce.jsx)("span",{className:"ss-g-hl-vs","aria-hidden":"true",children:i.vs}),(0,ce.jsx)(F1,{name:m.playerBName,imagePath:m.playerBImagePath,highlight:!0,children:(0,ce.jsxs)("div",{className:"ss-g-hl-btns",children:[(0,ce.jsxs)(Jt,{variant:"primary",disabled:n,onClick:()=>y("higher"),children:[(0,ce.jsx)(b1,{size:16}),i.higher]}),(0,ce.jsxs)(Jt,{variant:"outline",disabled:n,onClick:()=>y("lower"),children:[(0,ce.jsx)(k1,{size:16}),i.lower]})]})})]}),f&&h&&(0,ce.jsxs)("p",{className:"ss-g-hl-feedback","data-testid":"hol-last","data-correct":f.wasCorrect?"true":"false",children:[f.wasCorrect?(0,ce.jsx)(bn,{}):(0,ce.jsx)(bs,{}),i.lastAnswer(zt(h.playerBName).last,f.playerBValue)]}),p&&(0,ce.jsx)(it,{tone:c?"lose":d?"win":"neutral",title:c?i.runOver:d?i.perfectRun:s.games.alreadyPlayedTitle,score:w,detail:o?i.runDetail(g):void 0,onBack:a,ui:s})]}),!p&&(0,ce.jsx)(pt,{children:(0,ce.jsxs)("div",{className:"ss-g-hl-foot",children:[(0,ce.jsx)("div",{className:"ss-g-hl-dots",role:"img","aria-label":i.answersSoFar(u,e.pairs.length),children:e.pairs.map((z,S)=>{let V=l[S];return(0,ce.jsx)("span",{className:"ss-g-hl-dot","data-state":V?V.wasCorrect?"correct":"wrong":"todo"},z.pairIndex)})}),(0,ce.jsxs)("span",{className:"ss-g-hl-pts",children:[(0,ce.jsx)("span",{"data-testid":"hol-score",children:w})," ",(0,ce.jsx)("span",{className:"ss-g-hl-pts-unit",children:s.games.unitPts})]})]})})]})]})}var Ic=b(se(),1);var Q1=b(se(),1),Ec=b(I(),1);function oa({src:e,name:t,size:n=28}){let[r,s]=(0,Q1.useState)(!1);return e&&!r?(0,Ec.jsx)("img",{className:"ss-g-crest",src:e,alt:t,width:n,height:n,loading:"lazy",onError:()=>s(!0)}):(0,Ec.jsx)("svg",{className:"ss-g-crest ss-g-crest--ph",width:n,height:n*32/28,viewBox:"0 0 28 32",role:"img","aria-label":t,children:(0,Ec.jsx)("path",{d:"M2 3h24v12c0 9-6 14-12 17C8 29 2 24 2 15z",fill:"currentColor"})})}var Y=b(I(),1);function y2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function x2(e){return e.startYear?e.endYear&&e.endYear!==e.startYear?`${e.startYear}\u2013${e.endYear}`:String(e.startYear):""}function H1({config:e,result:t,submitting:n,onSubmit:r,onBack:s,ui:a}){var E,x,M;let i=a.games.careerPath,o=et({gameId:"career-path"},a.games.titles),[l,u]=(0,Ic.useState)(""),c=(0,Ic.useId)(),d=y2(t==null?void 0:t.clientStateJson),p=new Set((E=d==null?void 0:d.guessResults.map(P=>P.playerId))!=null?E:[]),m=(t==null?void 0:t.alreadyPlayed)===!0||(d==null?void 0:d.solved)===!0||(d==null?void 0:d.failed)===!0;if(!e)return(0,Y.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-career-path",children:[(0,Y.jsx)(Oe,{title:o,eyebrow:i.eyebrow,onBack:s,backLabel:a.back}),(0,Y.jsx)("div",{className:"ss-g-body ss-g-loading",children:a.games.loading})]});let g=(x=d==null?void 0:d.visiblePath)!=null?x:e.initialPath,w=(M=d==null?void 0:d.totalClubs)!=null?M:e.totalClubs,C=m?0:Math.max(0,w-g.length),f=m?[]:e.typeaheadPool.filter(P=>!p.has(P.id)&&P.name.toLowerCase().includes(l.toLowerCase()));function h(P){var V;if(!e||m||n)return;let S=[...(V=d==null?void 0:d.guessResults.map(H=>H.playerId))!=null?V:[],P];u(""),r(JSON.stringify({guesses:S}))}let y=!m&&d?(0,Y.jsx)("span",{"data-testid":"cp-guess-chip",children:(0,Y.jsxs)(Te,{variant:"neutral",children:[a.games.guess," ",(0,Y.jsx)("span",{className:"ss-g-num",children:d.guessesUsed+1})," / ",d.guessesUsed+d.guessesRemaining]})}):void 0,A=d!=null&&d.solved?i.solved:d!=null&&d.failed?i.failed:a.games.done;return(0,Y.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-career-path",children:[(0,Y.jsx)(Oe,{title:o,eyebrow:i.eyebrow,right:y,onBack:s,backLabel:a.back}),(0,Y.jsxs)("div",{className:"ss-g-body",children:[(0,Y.jsxs)("div",{className:"ss-g-cp-card",children:[(0,Y.jsx)(On,{size:64,variant:m?"default":"mystery"}),(0,Y.jsxs)("div",{className:"ss-g-cp-card-text",children:[(0,Y.jsx)("span",{className:"ss-g-cp-card-title",children:m&&(d!=null&&d.revealedPlayerName)?d.revealedPlayerName:i.mysteryPlayer}),d!=null&&d.hintLine?(0,Y.jsx)("span",{className:"ss-g-cp-hint",children:d.hintLine}):m?null:(0,Y.jsxs)("span",{className:"ss-g-cp-locks",children:[(0,Y.jsx)(Te,{variant:"lock",icon:(0,Y.jsx)(Ur,{size:11}),children:i.lockPosition}),(0,Y.jsx)(Te,{variant:"lock",icon:(0,Y.jsx)(Ur,{size:11}),children:i.lockNationality})]})]})]}),(0,Y.jsxs)("ol",{className:"ss-g-cp-line",children:[g.map((P,z)=>{let S=z===0?i.firstClub:x2(P);return(0,Y.jsxs)("li",{className:"ss-g-cp-step",children:[(0,Y.jsxs)("span",{className:"ss-g-cp-rail",children:[(0,Y.jsx)("span",{className:"ss-g-cp-tile",children:(0,Y.jsx)(oa,{src:P.crestUrl,name:P.clubName,size:30})}),(0,Y.jsx)("span",{className:"ss-g-cp-conn","aria-hidden":"true"})]}),(0,Y.jsxs)("span",{className:"ss-g-cp-step-text",children:[(0,Y.jsx)("span",{className:"ss-g-cp-club",children:P.clubName}),(0,Y.jsxs)("span",{className:"ss-g-cp-sub",children:[(0,Y.jsx)("span",{className:"ss-g-cp-years",children:S}),P.isLoan&&(0,Y.jsxs)(Y.Fragment,{children:[S?" \xB7 ":"",(0,Y.jsx)("span",{className:"ss-g-cp-loan",children:i.loan})]})]})]})]},`${P.clubName}-${z}`)}),C>0&&(0,Y.jsxs)("li",{className:"ss-g-cp-step ss-g-cp-step--hidden",children:[(0,Y.jsxs)("span",{className:"ss-g-cp-rail",children:[(0,Y.jsx)("span",{className:"ss-g-cp-tile ss-g-cp-tile--locked",children:(0,Y.jsx)(Ur,{size:18})}),C>1&&(0,Y.jsx)("span",{className:"ss-g-cp-conn ss-g-cp-conn--faint","aria-hidden":"true"})]}),(0,Y.jsx)("span",{className:"ss-g-cp-step-text",children:(0,Y.jsx)("span",{className:"ss-g-cp-sub",children:i.nextClubHidden})})]}),C>1&&(0,Y.jsxs)("li",{className:"ss-g-cp-step ss-g-cp-step--more",children:[(0,Y.jsx)("span",{className:"ss-g-cp-rail",children:(0,Y.jsx)("span",{className:"ss-g-cp-tile ss-g-cp-tile--faint",children:(0,Y.jsx)(Ur,{size:18})})}),(0,Y.jsx)("span",{className:"ss-g-cp-step-text",children:(0,Y.jsx)("span",{className:"ss-g-cp-sub",children:i.moreClubs(C-1)})})]})]}),m&&(0,Y.jsx)(it,{tone:d!=null&&d.solved?"win":d!=null&&d.failed?"lose":"neutral",title:A,score:t==null?void 0:t.score,detail:d?i.guessesLine(d.guessesUsed):void 0,onBack:s,ui:a})]}),!m&&(0,Y.jsxs)(pt,{children:[l.length>0&&f.length>0&&(0,Y.jsx)(Cs,{label:i.searchLabel,options:f.map(P=>({key:P.id,content:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Bt,{className:"ss-g-opt-av",name:P.name}),(0,Y.jsx)("span",{children:P.name})]})})),onPick:P=>h(Number(P))}),(0,Y.jsx)(cn,{id:c,label:i.searchLabel,placeholder:i.searchPlaceholder,value:l,onChange:u,disabled:n})]})]})}var Zn=b(se(),1);var J=b(I(),1);function v2(e){let t=e.toLowerCase();return t.includes("app")?"calendar":t.includes("goal")?"ball":t.includes("assist")?"boot":t.includes("clean")?"gloves":t.includes("tackle")?"shield":"flag"}function b2(e,t){var n;return(n=t[e])!=null?n:e}function k2({kind:e}){switch(e){case"calendar":return(0,J.jsx)(C1,{});case"ball":return(0,J.jsx)(A1,{});case"boot":return(0,J.jsx)(E1,{});case"gloves":return(0,J.jsx)(I1,{});case"shield":return(0,J.jsx)(bc,{});default:return(0,J.jsx)(S1,{})}}function C2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function G1(e,t,n){return e.find(r=>r.row===t&&r.col===n)}function S2(e){if(!e)return"";let t=e.trim().split(/\s+/).filter(Boolean);if(t.length===0)return"";let n=t[0];if(t.length===1)return n;let r=t[t.length-1];return`${n.charAt(0)}. ${r}`}function A2({row:e,col:t,rowLabel:n,colLabel:r,playerPool:s,alreadyFilledIds:a,onPick:i,onDismiss:o,ui:l}){let u=l.games.beatTheGrid,[c,d]=(0,Zn.useState)(""),p=(0,Zn.useId)(),m=(0,Zn.useRef)(null);(0,Zn.useEffect)(()=>{var w;(w=m.current)==null||w.focus()},[e,t]);let g=s.filter(w=>!a.has(w.id)&&w.name.toLowerCase().includes(c.toLowerCase()));return(0,J.jsxs)("div",{className:"ss-g-btg-sheet","data-testid":"btg-search-sheet",children:[(0,J.jsxs)("div",{className:"ss-g-btg-sheet-hdr",children:[(0,J.jsx)(Te,{variant:"neutral",children:n}),(0,J.jsx)("span",{className:"ss-g-btg-sheet-x","aria-hidden":"true",children:(0,J.jsx)(bs,{size:12})}),(0,J.jsx)(Te,{variant:"accent",children:r}),(0,J.jsx)("button",{type:"button",className:"ss-g-btg-sheet-close","data-testid":"btg-sheet-dismiss","aria-label":u.closeSearch,onClick:o,children:(0,J.jsx)(bs,{})})]}),s.length===0?(0,J.jsx)("div",{className:"ss-g-btg-sheet-empty",children:u.emptyPool}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(cn,{id:p,label:u.searchLabel(n,r),labelHidden:!0,placeholder:u.searchPlaceholder,value:c,onChange:d,inputRef:m}),c.length>0&&g.length>0&&(0,J.jsx)(Cs,{label:u.searchLabel(n,r),options:g.map(w=>({key:w.id,content:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Bt,{name:w.name,className:"ss-g-opt-av"}),(0,J.jsx)("span",{className:"ss-g-btg-result-name",children:w.name}),(0,J.jsx)("span",{className:"ss-g-btg-result-plus","aria-hidden":"true",children:(0,J.jsx)(sa,{size:18})})]})})),onPick:w=>i(e,t,Number(w))})]})]})}function V1({config:e,result:t,submitting:n,onSubmit:r,onBack:s,ui:a,playerPool:i}){var P,z,S,V,H;let o=a.games.beatTheGrid,l=et({gameId:"beat-the-grid"},a.games.titles),[u,c]=(0,Zn.useState)(null),d=C2(t==null?void 0:t.clientStateJson),p=(P=d==null?void 0:d.cells)!=null?P:[],m=(t==null?void 0:t.alreadyPlayed)===!0||(d==null?void 0:d.isComplete)===!0,g=new Set(p.map(N=>N.playerId));function w(N,T){m||n||G1(p,N,T)||c({row:N,col:T})}function C(N,T,L){c(null);let D=[...p.map(G=>({row:G.row,col:G.col,playerId:G.playerId})),{row:N,col:T,playerId:L}];r(JSON.stringify({cells:D}))}if(!e)return(0,J.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-beat-the-grid",children:[(0,J.jsx)(Oe,{title:l,eyebrow:o.eyebrow,onBack:s,backLabel:a.back}),(0,J.jsx)("div",{className:"ss-g-body ss-g-loading",children:a.games.loading})]});let f=e.rows,h=e.cols,y=f.length*h.length,A=p.filter(N=>N.isCorrect).length,E=p.length-A,x=Array.from({length:y},(N,T)=>T<A?"correct":T<A+E?"wrong":"todo"),M=(S=(z=d==null?void 0:d.totalScore)!=null?z:t==null?void 0:t.score)!=null?S:0;return(0,J.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-beat-the-grid",children:[(0,J.jsx)(Oe,{title:l,eyebrow:o.eyebrow,onBack:s,backLabel:a.back}),(0,J.jsx)(Gr,{segments:x,ariaLabel:o.progressAria(p.length,y),leftLabel:o.filled(p.length,y),rightLabel:o.toGo(Math.max(0,y-p.length)),right:(0,J.jsx)(Te,{variant:"accent",children:`${M} ${a.games.unitPts}`})}),(0,J.jsxs)("div",{className:"ss-g-body",children:[(0,J.jsxs)("div",{className:u!==null?"ss-g-btg-grid ss-g-btg-grid--fit":"ss-g-btg-grid",style:{gridTemplateColumns:`64px repeat(${h.length}, minmax(0, 1fr))`,gridTemplateRows:`minmax(44px, 60px) repeat(${f.length}, minmax(44px, 98px))`},role:"grid",children:[(0,J.jsx)("div",{className:"ss-g-btg-corner"}),h.map(N=>(0,J.jsxs)("div",{className:"ss-g-btg-colhdr",children:[(0,J.jsx)(k2,{kind:v2(N)}),(0,J.jsx)("span",{children:N})]},N)),f.map((N,T)=>{let L=b2(N,o.rowAbbrev);return(0,J.jsxs)(Zn.default.Fragment,{children:[(0,J.jsx)("div",{className:"ss-g-btg-rowhdr",children:L===N?(0,J.jsx)("span",{children:N}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("span",{"aria-hidden":"true",children:L}),(0,J.jsx)("span",{className:"ss-g-sr",children:N})]})}),h.map((O,D)=>{var Be,Le,k;let G=G1(p,T,D),pe=(u==null?void 0:u.row)===T&&(u==null?void 0:u.col)===D,v=G?G.isCorrect?"correct":"wrong":pe?"active":"empty";return(0,J.jsx)("button",{type:"button","data-testid":`btg-cell-${T}-${D}`,"data-state":v,"aria-label":G?o.cellFilled(N,O,(Le=(Be=i.find(Ee=>Ee.id===G.playerId))==null?void 0:Be.name)!=null?Le:"",G.isCorrect?o.correct:o.wrong):o.pickCell(N,O),"aria-pressed":pe,className:"ss-g-btg-cell",disabled:m||n,onClick:()=>w(T,D),children:G?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("span",{className:`ss-g-btg-badge ss-g-btg-badge--${G.isCorrect?"correct":"wrong"}`,role:"img","aria-label":G.isCorrect?o.correct:o.wrong,children:G.isCorrect?(0,J.jsx)(bn,{size:11}):(0,J.jsx)(bs,{size:11})}),(0,J.jsx)("span",{className:"ss-g-btg-rarity",children:G.rarityScore}),(0,J.jsx)(On,{size:40}),(0,J.jsx)("span",{className:"ss-g-btg-name",children:S2((k=i.find(Ee=>Ee.id===G.playerId))==null?void 0:k.name)})]}):(0,J.jsx)("span",{className:"ss-g-btg-plus","aria-hidden":"true",children:(0,J.jsx)(sa,{size:22})})},`cell-${T}-${D}`)})]},T)})]}),m&&(0,J.jsx)(it,{tone:"neutral",title:o.complete,score:M,detail:o.summary(A,p.length),onBack:s,ui:a})]}),u!==null&&(0,J.jsx)("div",{className:"ss-g-btg-pin",children:(0,J.jsx)(A2,{row:u.row,col:u.col,rowLabel:(V=f[u.row])!=null?V:"",colLabel:(H=h[u.col])!=null?H:"",playerPool:i,alreadyFilledIds:g,onPick:C,onDismiss:()=>c(null),ui:a},`${u.row}-${u.col}`)})]})}var Tc=b(se(),1);var Kt=b(I(),1);function Nc({variant:e}){return(0,Kt.jsxs)("svg",{className:"ss-g-pitch-svg",viewBox:e==="full"?"0 0 100 150":"0 0 100 100",preserveAspectRatio:"none","aria-hidden":"true",children:[(0,Kt.jsx)("rect",{x:"4",y:"4",width:"92",height:e==="full"?142:92,fill:"none"}),e==="full"?(0,Kt.jsxs)(Kt.Fragment,{children:[(0,Kt.jsx)("line",{x1:"4",y1:"75",x2:"96",y2:"75"}),(0,Kt.jsx)("circle",{cx:"50",cy:"75",r:"12",fill:"none"}),(0,Kt.jsx)("rect",{x:"26",y:"4",width:"48",height:"20",fill:"none"}),(0,Kt.jsx)("rect",{x:"26",y:"126",width:"48",height:"20",fill:"none"})]}):(0,Kt.jsxs)(Kt.Fragment,{children:[(0,Kt.jsx)("path",{d:"M38 4a12 12 0 0 0 24 0",fill:"none"}),(0,Kt.jsx)("rect",{x:"26",y:"76",width:"48",height:"20",fill:"none"})]})]})}function W1(e){let t=new Map;return e.forEach((n,r)=>{var i,o;let s=Number((i=n.slot)==null?void 0:i.split(":")[0])||r+1,a=(o=t.get(s))!=null?o:[];a.push(n),t.set(s,a)}),[...t.keys()].sort((n,r)=>r-n).map(n=>t.get(n))}function _1(e){return e.length<2?"":[...e].reverse().slice(1).map(n=>n.length).join("-")}var rg={"4-4-2":[["GK"],["LB","CB","CB","RB"],["LM","CM","CM","RM"],["ST","ST"]],"4-3-3":[["GK"],["LB","CB","CB","RB"],["CM","CM","CM"],["LW","ST","RW"]],"4-2-3-1":[["GK"],["LB","CB","CB","RB"],["CDM","CDM"],["LW","CAM","RW"],["ST"]],"4-1-4-1":[["GK"],["LB","CB","CB","RB"],["CDM"],["LM","CM","CM","RM"],["ST"]],"4-5-1":[["GK"],["LB","CB","CB","RB"],["LM","CM","CM","CM","RM"],["ST"]],"4-4-1-1":[["GK"],["LB","CB","CB","RB"],["LM","CM","CM","RM"],["CAM"],["ST"]],"4-1-2-1-2":[["GK"],["LB","CB","CB","RB"],["CDM"],["LM","RM"],["CAM"],["ST","ST"]],"3-5-2":[["GK"],["CB","CB","CB"],["LWB","CM","CM","CM","RWB"],["ST","ST"]],"3-4-3":[["GK"],["CB","CB","CB"],["LM","CM","CM","RM"],["LW","ST","RW"]],"5-3-2":[["GK"],["LWB","CB","CB","CB","RWB"],["CM","CM","CM"],["ST","ST"]],"5-4-1":[["GK"],["LWB","CB","CB","CB","RWB"],["LM","CM","CM","RM"],["ST"]]};function sg(e,t){return e===0?"GK":e===t-1?"FWD":e===1?"DEF":"MID"}function j1(e,t){let n=[...t].reverse(),r=rg[e],s=new Map;return n.forEach((a,i)=>{a.forEach((o,l)=>{var c,d;if(!o.slot)return;let u=(d=(c=r==null?void 0:r[i])==null?void 0:c[l])!=null?d:sg(i,n.length);s.set(o.slot,u)})}),s}var Ae=b(I(),1),E2=3;function I2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function X1({config:e,result:t,submitting:n,onSubmit:r,ui:s,onBack:a}){var P,z,S,V,H,N;let i=s.games.guessTheXi,[o,l]=(0,Tc.useState)(""),u=(0,Tc.useId)(),c=I2(t==null?void 0:t.clientStateJson),d=(t==null?void 0:t.alreadyPlayed)===!0||(c==null?void 0:c.status)==="solved"||(c==null?void 0:c.status)==="failed",p=(c==null?void 0:c.status)==="solved",m=(c==null?void 0:c.status)==="failed",g=new Set((P=c==null?void 0:c.guessHistory.map(T=>T.teamId))!=null?P:[]),w=e?W1(e.positions):[],C=e!=null&&e.hasRealFormation?_1(w):"",f=e!=null&&e.hasRealFormation?j1(C,w):new Map,h=new Map;((z=c==null?void 0:c.earnedReveals)!=null?z:[]).forEach(T=>{T.slot&&T.type!=="position"&&h.set(T.slot,T.value)});let y=e&&!d?e.teamPool.filter(T=>!g.has(T.teamId)&&T.teamName.toLowerCase().includes(o.toLowerCase())):[];function A(T){var D;if(!e||d||n)return;let O=[...(D=c==null?void 0:c.guessHistory.map(G=>({teamId:G.teamId})))!=null?D:[],{teamId:T}];l(""),r(JSON.stringify({guesses:O}))}let E=((S=c==null?void 0:c.guessHistory)!=null?S:[]).filter(T=>!T.wasCorrect),x=Math.max(0,E2-((V=c==null?void 0:c.guessesUsed)!=null?V:0)),M=T=>{var L,O;return(O=(L=e==null?void 0:e.teamPool.find(D=>D.teamId===T))==null?void 0:L.teamName)!=null?O:`#${T}`};return(0,Ae.jsxs)("div",{className:"ss-g-screen ss-g-gxi","data-testid":"game-screen-guess-the-xi",children:[(0,Ae.jsx)(Oe,{title:et({gameId:"guess-the-xi"},s.games.titles),eyebrow:e==null?void 0:e.poolLabel,right:C?(0,Ae.jsx)(Te,{variant:"accent",children:C}):void 0,onBack:a,backLabel:s.back}),!e&&(0,Ae.jsx)("div",{className:"ss-g-body ss-g-loading",children:s.games.loading}),e&&(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsxs)("div",{className:"ss-g-body",children:[w.length>0&&(0,Ae.jsxs)("div",{className:"ss-g-gxi-pitch",role:"group","aria-label":i.pitchLabel,children:[(0,Ae.jsx)(Nc,{variant:"full"}),(0,Ae.jsx)("div",{className:"ss-g-gxi-rows",children:w.map((T,L)=>(0,Ae.jsx)("div",{className:"ss-g-gxi-row",children:T.map((O,D)=>{var v;let G=O.slot&&(v=f.get(O.slot))!=null?v:"",pe=O.slot?h.get(O.slot):void 0;return(0,Ae.jsxs)("div",{className:"ss-g-gxi-node","data-revealed":pe?"true":void 0,children:[(0,Ae.jsx)("span",{className:"ss-g-gxi-disc",role:"img",title:O.nationality,"aria-label":`${G?G+" \u2014 ":""}${O.nationality}${pe?" \u2014 "+pe:""}`,children:Cc(O.nationality)}),pe?(0,Ae.jsx)("span",{className:"ss-g-gxi-pos ss-g-gxi-pos--name",children:zt(pe).last}):G&&(0,Ae.jsx)("span",{className:"ss-g-gxi-pos",children:G})]},`${O.slot}-${D}`)})},L))})]}),!d&&E.length>0&&(0,Ae.jsxs)("div",{className:"ss-g-gxi-wrong",children:[(0,Ae.jsx)("span",{className:"ss-g-gxi-wrong-l",children:i.notThem}),E.map(T=>(0,Ae.jsxs)("span",{className:"ss-g-gxi-wrong-chip",children:[(0,Ae.jsx)(oa,{name:M(T.teamId),size:18}),(0,Ae.jsx)("s",{children:M(T.teamId)})]},T.teamId))]}),d&&(0,Ae.jsx)(it,{tone:p?"win":m?"lose":"neutral",title:p?i.solved:m?i.failed:s.games.alreadyPlayedTitle,score:(N=(H=c==null?void 0:c.score)!=null?H:t==null?void 0:t.score)!=null?N:0,detail:c?i.detail(c.guessesUsed):void 0,onBack:a,ui:s})]}),!d&&(0,Ae.jsxs)(pt,{children:[o.length>0&&y.length>0&&(0,Ae.jsx)(Cs,{label:i.optionsLabel,options:y.map(T=>({key:T.teamId,content:(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsx)(oa,{name:T.teamName,size:28}),(0,Ae.jsx)("span",{children:T.teamName})]})})),onPick:T=>A(Number(T))}),(0,Ae.jsx)(cn,{id:u,label:i.whichClub(x),placeholder:i.searchPlaceholder,value:o,onChange:l,disabled:n})]})]})]})}var ag=b(se(),1);var ge=b(I(),1);function N2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function q1(e,t){return e.find(n=>n.index===t)}var T2=/\s*\(([^)]*)\)$/,L2=/^[\p{L}\p{M}.'’-]+$/u;function P2({text:e}){var l,u;let t=T2.exec(e),n=t?e.slice(0,t.index).trim():e.trim(),r=(u=(l=t==null?void 0:t[1])==null?void 0:l.trim())!=null?u:"",s=n.split(/\s+/).filter(Boolean);if(!(s.length>=1&&s.length<=4&&s.every(c=>L2.test(c)))||n==="")return(0,ge.jsx)("span",{className:"ss-g-dq-opt-name",children:(0,ge.jsx)("span",{className:"ss-g-dq-opt-full",children:e})});let{first:i,last:o}=zt(n);return(0,ge.jsxs)("span",{className:"ss-g-dq-opt-name",children:[i&&(0,ge.jsx)("span",{className:"ss-g-dq-opt-first",children:i}),(0,ge.jsx)("span",{className:"ss-g-dq-opt-last",children:o}),r&&(0,ge.jsx)("span",{className:"ss-g-dq-opt-suffix",children:r})]})}function J1({config:e,result:t,submitting:n,onSubmit:r,onBack:s,ui:a}){var V;let i=a.games.dailyQuiz,o=et({gameId:"daily-quiz"},a.games.titles),[l,u]=(0,ag.useState)(new Map),[c,d]=(0,ag.useState)(0),p=N2(t==null?void 0:t.clientStateJson),m=(V=p==null?void 0:p.results)!=null?V:[],g=m.length>0||(t==null?void 0:t.alreadyPlayed)===!0;if(!e)return(0,ge.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-daily-quiz",children:[(0,ge.jsx)(Oe,{title:o,onBack:s,backLabel:a.back}),(0,ge.jsx)("div",{className:"ss-g-body ss-g-loading",children:a.games.loading})]});let w=e.questions,C=w.length,f=w[Math.min(c,C-1)],h=c>=C-1,y=f!==void 0&&l.has(f.index),A=l.size===C;function E(H,N){g||n||u(T=>new Map(T).set(H,N))}function x(){!y||h||d(H=>H+1)}function M(){d(H=>Math.max(0,H-1))}function P(){if(!e||!A||g||n)return;let H=e.questions.map(N=>{var T;return{index:N.index,selectedOptionIndex:(T=l.get(N.index))!=null?T:0}});r(JSON.stringify({answers:H}))}if(g){let H=w.map(T=>{let L=q1(m,T.index);return L?L.isCorrect?"correct":"wrong":"done"}),N=m.filter(T=>T.isCorrect).length;return(0,ge.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-daily-quiz",children:[(0,ge.jsx)(Oe,{title:o,eyebrow:i.results,onBack:s,backLabel:a.back}),(0,ge.jsx)(Gr,{segments:H,ariaLabel:i.results}),(0,ge.jsxs)("div",{className:"ss-g-body",children:[(0,ge.jsx)(it,{tone:"neutral",title:m.length>0?i.correctOf(N,C):a.games.alreadyPlayedTitle,score:t==null?void 0:t.score,onBack:s,ui:a}),w.map(T=>{let L=q1(m,T.index),O=l.get(T.index);return(0,ge.jsxs)("div",{className:"ss-g-dq-rq",children:[(0,ge.jsx)("div",{className:"ss-g-dq-rq-stem",children:T.stem}),L&&(0,ge.jsx)("div",{className:"ss-g-dq-rq-opts",children:T.options.map((D,G)=>{let pe="ss-g-dq-rq-opt";return G===L.correctOptionIndex?pe+=" ss-g-dq-rq-opt--correct":G===O&&!L.isCorrect&&(pe+=" ss-g-dq-rq-opt--wrong"),(0,ge.jsx)("span",{className:pe,children:D},G)})}),(L==null?void 0:L.revealText)&&(0,ge.jsx)("div",{className:"ss-g-dq-why",children:L.revealText})]},T.index)})]})]})}let z=w.map((H,N)=>N<c?"done":N===c?"current":"todo"),S=f?l.get(f.index):void 0;return(0,ge.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-daily-quiz",children:[(0,ge.jsx)(Oe,{title:o,eyebrow:i.questionOf(c+1,C),onBack:s,backLabel:a.back}),(0,ge.jsx)(Gr,{segments:z,ariaLabel:i.progressAria(c+1,C)}),(0,ge.jsx)("div",{className:"ss-g-body",children:f&&(0,ge.jsxs)(ge.Fragment,{children:[(0,ge.jsx)("h3",{className:"ss-g-dq-stem",children:f.stem}),(0,ge.jsx)("div",{className:"ss-g-dq-opts",children:f.options.map((H,N)=>{let T=N===S;return(0,ge.jsxs)("button",{type:"button",className:"ss-g-dq-opt","aria-pressed":T,disabled:n,onClick:()=>E(f.index,N),children:[(0,ge.jsx)("span",{className:"ss-g-dq-badge","aria-hidden":"true",children:T?(0,ge.jsx)(bn,{}):String.fromCharCode(65+N)}),(0,ge.jsx)(P2,{text:H})]},N)})})]})}),(0,ge.jsx)(pt,{children:(0,ge.jsxs)("div",{className:"ss-g-dq-nav",children:[c>0&&(0,ge.jsx)(Jt,{variant:"outline",onClick:M,disabled:n,children:i.previous}),h?(0,ge.jsx)(Jt,{variant:"primary",block:!0,onClick:P,disabled:!y||!A||n,children:n?i.submitting:i.submit}):(0,ge.jsx)(Jt,{variant:"primary",block:!0,onClick:x,disabled:!y||n,children:i.next})]})})]})}var Ss=b(se(),1);var X=b(I(),1),M2=9;function R2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function D2(e){try{return new Date(e).getTime()<=Date.now()}catch{return!0}}function z2(){return(0,X.jsx)("svg",{width:18,height:18,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:(0,X.jsx)("path",{d:"M5 12h14"})})}function K1({team:e,label:t}){return(0,X.jsxs)("div",{className:"ss-g-mp-team",children:[(0,X.jsx)(oa,{name:e.name,size:44}),(0,X.jsx)("span",{className:"ss-g-mp-team-name",children:e.name}),(0,X.jsx)("span",{className:"ss-g-mp-team-side",children:t})]})}function ig({home:e,away:t,h:n,a:r,t:s,edit:a}){let i=(o,l,u)=>(0,X.jsxs)("div",{className:"ss-g-mp-col",children:[a&&(0,X.jsx)("button",{type:"button",className:"ss-g-mp-step","aria-label":s.goalsUp(l.name),disabled:a.disabled,onClick:()=>a.onStep(o,1),children:(0,X.jsx)(sa,{size:18})}),(0,X.jsx)("span",{className:"ss-g-mp-digit","data-testid":"mp-digit","data-active":a?String(a.active===o):"false",children:u}),a&&(0,X.jsx)("button",{type:"button",className:"ss-g-mp-step","aria-label":s.goalsDown(l.name),disabled:a.disabled||u<=0,onClick:()=>a.onStep(o,-1),children:(0,X.jsx)(z2,{})})]});return(0,X.jsxs)("div",{className:"ss-g-mp-card",children:[(0,X.jsx)(K1,{team:e,label:s.home}),(0,X.jsxs)("div",{className:"ss-g-mp-scores",children:[i("home",e,n),(0,X.jsx)("span",{className:"ss-g-mp-dash","aria-hidden":"true",children:"\u2013"}),i("away",t,r)]}),(0,X.jsx)(K1,{team:t,label:s.away})]})}function og({label:e,ok:t,detail:n,t:r}){return(0,X.jsxs)("li",{className:"ss-g-mp-row","data-testid":"mp-row","data-ok":String(t),children:[(0,X.jsx)("span",{className:"ss-g-mp-row-k",children:e}),(0,X.jsxs)("span",{className:"ss-g-mp-row-v",children:[t?(0,X.jsx)(bn,{}):(0,X.jsx)(bs,{size:14}),(0,X.jsx)("span",{className:"ss-g-sr",children:t?r.correct:r.incorrect}),n?(0,X.jsx)("span",{className:"ss-g-mp-row-d",children:n}):null]})]})}function Y1({config:e,result:t,submitting:n,onSubmit:r,ui:s,onBack:a}){var N,T,L;let i=s.games.predictor,[o,l]=(0,Ss.useState)(0),[u,c]=(0,Ss.useState)(0),[d,p]=(0,Ss.useState)(null),[m,g]=(0,Ss.useState)("home"),[w,C]=(0,Ss.useState)(""),f=(0,Ss.useId)(),h=R2(t==null?void 0:t.clientStateJson),y=(t==null?void 0:t.alreadyPlayed)===!0,A=(0,X.jsx)(Oe,{title:et({gameId:"matchday-predictor"},s.games.titles),eyebrow:e?i.eyebrow(e.homeTeam.name,e.awayTeam.name):void 0,right:e?(0,X.jsx)(Te,{icon:(0,X.jsx)(Ur,{}),children:s.games.formatDayTime(e.kickoffUtc)}):void 0,onBack:a,backLabel:s.back});if(y&&h){if(!h.graded){let D=(N=e==null?void 0:e.scorerPool.find(G=>G.playerId===h.predictedFirstScorerPlayerId))!=null?N:null;return(0,X.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-matchday-predictor",children:[A,(0,X.jsxs)("div",{className:"ss-g-body",children:[e&&(0,X.jsx)(ig,{home:e.homeTeam,away:e.awayTeam,h:h.predictedHomeScore,a:h.predictedAwayScore,t:i}),(0,X.jsx)(it,{tone:"neutral",title:i.saved,detail:i.savedDetail({home:(T=e==null?void 0:e.homeTeam.name)!=null?T:"",away:(L=e==null?void 0:e.awayTeam.name)!=null?L:"",h:h.predictedHomeScore,a:h.predictedAwayScore,scorer:D?zt(D.playerName).last:null}),onBack:a,ui:s})]}),(0,X.jsx)(pt,{children:(0,X.jsx)("p",{className:"ss-g-mp-fun",children:i.forFun})})]})}let O=h.result;return(0,X.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-matchday-predictor",children:[A,(0,X.jsxs)("div",{className:"ss-g-body",children:[e&&(0,X.jsx)(ig,{home:e.homeTeam,away:e.awayTeam,h:O.homeScore,a:O.awayScore,t:i}),(0,X.jsx)(it,{tone:"neutral",title:i.fullTime(O.homeScore,O.awayScore),onBack:a,ui:s}),(0,X.jsxs)("ul",{className:"ss-g-mp-rows",children:[(0,X.jsx)(og,{label:i.exactScore,ok:h.exactScoreCorrect,t:i}),(0,X.jsx)(og,{label:i.outcome,ok:h.outcomeCorrect,t:i}),!h.firstScorerVoid&&(0,X.jsx)(og,{label:i.firstScorerRow,ok:h.firstScorerCorrect,detail:O.firstScorerName,t:i})]})]}),(0,X.jsx)(pt,{children:(0,X.jsx)("p",{className:"ss-g-mp-fun",children:i.forFun})})]})}if(!e)return(0,X.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-matchday-predictor",children:[A,(0,X.jsx)("div",{className:"ss-g-body ss-g-loading",children:s.games.loading})]});let E=D2(e.kickoffUtc),x=E||n;function M(O,D){g(O),O==="home"?l(G=>Math.max(0,G+D)):c(G=>Math.max(0,G+D))}function P(){x||!e||r(JSON.stringify({homeScore:o,awayScore:u,...d!==null?{firstScorerPlayerId:d}:{}}))}let z=e.scorerPool,S=z.length>M2,V=w.trim().toLowerCase(),H=S&&V?z.filter(O=>O.playerName.toLowerCase().includes(V)):z;return(0,X.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-matchday-predictor",children:[A,(0,X.jsxs)("div",{className:"ss-g-body",children:[(0,X.jsx)(ig,{home:e.homeTeam,away:e.awayTeam,h:o,a:u,t:i,edit:{disabled:x,active:m,onStep:M}}),z.length>0&&(0,X.jsxs)("section",{className:"ss-g-mp-scorer",children:[(0,X.jsxs)("div",{className:"ss-g-mp-sec-head",children:[(0,X.jsx)("h3",{children:i.firstScorer}),(0,X.jsx)("span",{children:i.optional})]}),S&&(0,X.jsx)(cn,{id:f,label:i.searchLabel,labelHidden:!0,placeholder:i.searchPlaceholder,value:w,onChange:C,disabled:x}),(0,X.jsx)("div",{className:"ss-g-mp-grid",children:H.map(O=>{let D=d===O.playerId;return(0,X.jsxs)("button",{type:"button",className:"ss-g-mp-pcard","aria-pressed":D,"aria-label":O.playerName,disabled:x,onClick:()=>p(G=>G===O.playerId?null:O.playerId),children:[D&&(0,X.jsx)("span",{className:"ss-g-mp-pcheck",children:(0,X.jsx)(bn,{size:12})}),(0,X.jsx)(On,{size:52,variant:D?"selected":"default"}),(0,X.jsx)("span",{className:"ss-g-mp-pname",children:zt(O.playerName).last})]},O.playerId)})}),(0,X.jsxs)("button",{type:"button",className:"ss-g-mp-none","aria-pressed":d===null,disabled:x,onClick:()=>p(null),children:[(0,X.jsx)("span",{className:"ss-g-mp-radio","aria-hidden":"true"}),i.noScorer]})]}),E&&(0,X.jsx)("p",{className:"ss-g-mp-closed",children:i.closed})]}),(0,X.jsxs)(pt,{children:[(0,X.jsx)(Jt,{variant:"primary",block:!0,disabled:x,onClick:P,children:n?i.saving:i.save}),(0,X.jsx)("p",{className:"ss-g-mp-fun",children:i.forFun})]})]})}var ci=b(se(),1);var fe=b(I(),1),O2=8,Lc=11,$1="4-3-3";function B2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function F2(e){let t=e.split("-").map(Number).filter(l=>l>0),n=t.reduce((l,u)=>l+u,0)===Lc-1,r=n?e:$1,a=[1,...n?t:$1.split("-").map(Number)],i=rg[r],o=[];return a.forEach((l,u)=>{var d,p;let c=88-u*(77/(a.length-1));for(let m=0;m<l;m++){let g=l===1?50:12+m*(76/(l-1));o.push({index:o.length,label:(p=(d=i==null?void 0:i[u])==null?void 0:d[m])!=null?p:sg(u,a.length),left:g,top:c})}}),{formation:r,slots:o}}function U2(e){let t=e.findIndex(n=>n===null);return t===-1?null:t}function Z1({config:e,result:t,submitting:n,onSubmit:r,ui:s,onBack:a,lockAtUtc:i}){var O;let o=s.games.startingXi,[l,u]=(0,ci.useState)(()=>Array(Lc).fill(null)),[c,d]=(0,ci.useState)(0),[p,m]=(0,ci.useState)(""),g=(0,ci.useId)(),w=B2(t==null?void 0:t.clientStateJson),C=(t==null?void 0:t.alreadyPlayed)===!0,f=(0,fe.jsx)(Oe,{title:et({gameId:"starting-xi"},s.games.titles),eyebrow:o.eyebrow,right:(0,fe.jsx)(Te,{variant:"accent",children:o.perStarter(O2)}),onBack:a,backLabel:s.back});function h(D,G){return(0,fe.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-starting-xi",children:[f,(0,fe.jsx)("div",{className:"ss-g-body",children:(0,fe.jsx)(it,{tone:"neutral",title:D,score:G,onBack:a,ui:s})})]})}if(C){if(!w)return h(o.voided);if(w.status==="pending")return h(o.pending(w.predictedCount));if(w.status==="graded")return h(o.gradedLine(w.correctCount),w.score)}if(!e)return(0,fe.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-starting-xi",children:[f,(0,fe.jsx)("div",{className:"ss-g-body ss-g-loading",children:s.games.loading})]});let{formation:y,slots:A}=F2(e.formation),E=new Map(e.squadSheet.map(D=>[D.playerId,D])),x=l.filter(D=>D!==null).length,M=x===Lc&&!n,P=new Set(l.filter(D=>D!==null)),z=p.trim().toLowerCase(),S=e.squadSheet.filter(D=>{var G;return!P.has(D.playerId)&&(!z||((G=D.playerName)!=null?G:"").toLowerCase().includes(z))}),V=c!==null&&(O=A[c])!=null?O:null;function H(D){if(n||c===null)return;let G=[...l];G[c]=D,u(G),d(U2(G)),m("")}function N(D){if(!n){if(l[D]!==null){let G=[...l];G[D]=null,u(G)}d(D)}}function T(){M&&r(JSON.stringify({predictedPlayerIds:l}))}let L=l.map(D=>D!==null?"current":"todo");return(0,fe.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-starting-xi",children:[f,(0,fe.jsx)(Gr,{segments:L,ariaLabel:o.picked(x),leftLabel:o.picked(x),rightLabel:o.toGo(Lc-x),right:(0,fe.jsx)(Te,{children:y})}),(0,fe.jsxs)("div",{className:"ss-g-body",children:[(0,fe.jsxs)("div",{className:"ss-g-xi-pitch",children:[(0,fe.jsx)(Nc,{variant:"half"}),A.map(D=>{var Le,k,Ee,Ke;let G=(Le=l[D.index])!=null?Le:null,pe=G!==null&&(k=E.get(G))!=null?k:null,v=(Ee=pe==null?void 0:pe.playerName)!=null?Ee:"",Be=pe?"filled":c===D.index?"active":"empty";return(0,fe.jsxs)("button",{type:"button",className:"ss-g-xi-slot","data-state":Be,style:{left:`${D.left}%`,top:`${D.top}%`},"aria-pressed":c===D.index,"aria-label":pe?o.clearSlot(D.label,v):o.pickSlot(D.label),disabled:n,onClick:()=>N(D.index),children:[(0,fe.jsx)("span",{className:"ss-g-xi-ring","aria-hidden":"true",children:pe?(Ke=pe.jerseyNumber)!=null?Ke:"":(0,fe.jsx)(sa,{size:18})}),(0,fe.jsx)("span",{className:"ss-g-xi-tag","aria-hidden":"true",children:pe?zt(v).last:D.label})]},D.index)})]}),(0,fe.jsxs)("div",{className:"ss-g-xi-picker",children:[(0,fe.jsx)("div",{className:"ss-g-xi-picker-head",children:V?(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(Te,{variant:"badge",children:V.label}),(0,fe.jsx)("strong",{children:o.pickFor(V.label)})]}):(0,fe.jsx)("strong",{children:o.allPicked})}),V&&(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(cn,{id:g,label:o.searchLabel,labelHidden:!0,placeholder:o.searchLabel,value:p,onChange:m,disabled:n}),(0,fe.jsx)("ul",{className:"ss-g-xi-list",children:S.map(D=>{var G;return(0,fe.jsx)("li",{children:(0,fe.jsxs)("button",{type:"button",className:"ss-g-xi-opt",disabled:n,onClick:()=>H(D.playerId),children:[(0,fe.jsx)("span",{className:"ss-g-xi-opt-no","aria-hidden":"true",children:(G=D.jerseyNumber)!=null?G:""}),(0,fe.jsx)("span",{className:"ss-g-xi-opt-name",children:D.playerName}),(0,fe.jsx)("span",{className:"ss-g-xi-opt-pos",children:D.positionName})]})},D.playerId)})})]})]})]}),(0,fe.jsxs)(pt,{children:[(0,fe.jsx)(Jt,{variant:"primary",block:!0,disabled:!M,onClick:T,children:n?o.submitting:o.submit}),(0,fe.jsxs)("p",{className:"ss-g-xi-lock",children:[(0,fe.jsx)(Ur,{}),i?o.locksAt(s.games.formatDayTime(i)):o.locksSoon]})]})]})}var zo=b(se(),1);var de=b(I(),1);function Q2(e){let t=e.find(s=>s.rank===2);if(!t)return null;let n=e.find(s=>s.rank===1),r=e.find(s=>s.rank===3);return{value:t.statValue,above:n!=null&&n.playerName?{name:n.playerName,diff:n.statValue-t.statValue}:null,below:r!=null&&r.playerName?{name:r.playerName,diff:t.statValue-r.statValue}:null}}function H2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function eC({name:e}){let{first:t,last:n}=zt(e);return(0,de.jsxs)("span",{className:"ss-g-sl-name",children:[t&&(0,de.jsx)("small",{children:`${t[0]}.`}),(0,de.jsx)("b",{children:n})]})}function tC({config:e,result:t,submitting:n,onSubmit:r,ui:s,onBack:a}){let i=s.games.statLadder,[o,l]=(0,zo.useState)(""),[u,c]=(0,zo.useState)(null),d=(0,zo.useId)(),p=H2(t==null?void 0:t.clientStateJson),m=p!=null,g=(0,de.jsx)(Oe,{title:et({gameId:"stat-ladder"},s.games.titles),eyebrow:i.eyebrow,onBack:a,backLabel:s.back});if(!e)return(0,de.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-stat-ladder",children:[g,(0,de.jsx)("div",{className:"ss-g-body ss-g-loading",children:s.games.loading})]});let w=i.question(e.statLabel),C=m?null:Q2(e.ladder),f=[...e.ladder].sort((E,x)=>E.rank-x.rank),h=o.trim().toLowerCase(),y=h?e.playerPool.filter(E=>E.playerName.toLowerCase().includes(h)):e.playerPool;function A(){u===null||n||m||r(JSON.stringify({guessedPlayerId:u}))}return(0,de.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-stat-ladder",children:[g,(0,de.jsxs)("div",{className:"ss-g-body",children:[(0,de.jsxs)("div",{className:"ss-g-sl-prompt",children:[(0,de.jsx)(Te,{variant:"accent",icon:(0,de.jsx)(bc,{size:14}),className:"ss-g-sl-stat",children:e.statLabel}),(0,de.jsxs)("h3",{className:"ss-g-sl-q",children:[w.pre,(0,de.jsx)("em",{children:w.emph}),w.post]})]}),(0,de.jsx)("ol",{className:"ss-g-sl-rungs",children:f.map(E=>{var x,M;return E.rank===2?(0,de.jsxs)("li",{className:"ss-g-sl-rung ss-g-sl-rung--mystery","data-testid":"sl-mystery-rung","data-result":m?p.isCorrect?"correct":"wrong":void 0,children:[(0,de.jsx)("span",{className:"ss-g-sl-rank",children:"2"}),m?(0,de.jsx)(Bt,{name:p.revealedRank2.playerName,className:"ss-g-sl-av"}):(0,de.jsx)(On,{size:52,variant:"mystery"}),m?(0,de.jsx)(eC,{name:p.revealedRank2.playerName}):(0,de.jsx)("span",{className:"ss-g-sl-who",children:i.whoSecond}),(0,de.jsx)("span",{className:"ss-g-sl-val ss-g-sl-val--mystery",children:E.statValue})]},E.rank):(0,de.jsxs)("li",{className:"ss-g-sl-rung",children:[(0,de.jsx)("span",{className:"ss-g-sl-rank",children:E.rank}),(0,de.jsx)(Bt,{name:(x=E.playerName)!=null?x:"?",className:"ss-g-sl-av"}),(0,de.jsx)(eC,{name:(M=E.playerName)!=null?M:"?"}),(0,de.jsx)("span",{className:"ss-g-sl-val",children:E.statValue})]},E.rank)})}),C&&(0,de.jsxs)("p",{className:"ss-g-sl-clue",children:[(0,de.jsx)(vc,{}),(0,de.jsx)("span",{children:i.clue(C,e.statLabel)})]}),!m&&(0,de.jsx)("ul",{className:"ss-g-sl-pool",children:y.map(E=>(0,de.jsx)("li",{children:(0,de.jsxs)("button",{type:"button",className:"ss-g-sl-opt","aria-label":E.playerName,"aria-pressed":u===E.playerId,disabled:n,onClick:()=>{c(E.playerId),l(E.playerName)},children:[(0,de.jsx)(Bt,{name:E.playerName,className:"ss-g-sl-opt-av"}),(0,de.jsx)("span",{className:"ss-g-sl-opt-name",children:E.playerName}),u===E.playerId&&(0,de.jsx)(bn,{})]})},E.playerId))}),m&&(0,de.jsx)(it,{tone:p.isCorrect?"win":"lose",title:p.isCorrect?i.correct:i.wrong(p.revealedRank2.playerName),score:t==null?void 0:t.score,onBack:a,ui:s})]}),!m&&(0,de.jsx)(pt,{children:(0,de.jsxs)("div",{className:"ss-g-sl-guess",children:[(0,de.jsx)(cn,{id:d,label:i.searchLabel,labelHidden:!0,placeholder:i.searchPlaceholder,value:o,onChange:E=>{l(E),c(null)},disabled:n}),(0,de.jsx)(Jt,{variant:"primary",disabled:u===null||n,onClick:A,children:i.guess})]})})]})}var yt=b(I(),1);function G2(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function nC({config:e,result:t,submitting:n,onSubmit:r,ui:s,onBack:a}){var m,g;let i=s.games.motm,o=G2(t==null?void 0:t.clientStateJson),l=(t==null?void 0:t.alreadyPlayed)===!0,u=(m=o==null?void 0:o.pickedPlayerId)!=null?m:null,c=(0,yt.jsx)(Oe,{title:i.title,eyebrow:i.eyebrow,right:l?(0,yt.jsx)(Te,{variant:"success",icon:(0,yt.jsx)(bn,{}),children:i.voted}):void 0,onBack:a,backLabel:s.back});if(!e)return(0,yt.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-fan-motm",children:[c,(0,yt.jsx)("div",{className:"ss-g-body ss-g-loading",children:s.games.loading})]});let d=(g=e.candidates.find(w=>w.playerId===u))!=null?g:null;function p(w){l||n||r(JSON.stringify({pickedPlayerId:w}))}return(0,yt.jsxs)("div",{className:"ss-g-screen","data-testid":"game-screen-fan-motm",children:[c,(0,yt.jsxs)("div",{className:"ss-g-body",children:[(0,yt.jsx)("ul",{className:"ss-g-motm-list",children:e.candidates.map(w=>{let C=l&&u===w.playerId;return(0,yt.jsx)("li",{children:(0,yt.jsxs)("button",{type:"button",className:`ss-g-motm-row${C?" ss-g-motm-row--voted":""}`,"data-testid":`motm-candidate-${w.playerId}`,disabled:l||n,onClick:()=>p(w.playerId),children:[(0,yt.jsx)(Bt,{name:w.playerName,className:"ss-g-motm-av"}),(0,yt.jsx)("span",{className:"ss-g-motm-name",children:w.playerName}),C&&(0,yt.jsx)(Te,{variant:"accent",className:"ss-g-motm-pill",children:i.yourVote})]})},w.playerId)})}),l&&d&&(0,yt.jsx)(it,{tone:"neutral",title:i.youVoted(d.playerName),detail:i.thanks,onBack:a,ui:s})]}),(0,yt.jsxs)(pt,{children:[!l&&(0,yt.jsx)("p",{className:"ss-g-motm-foot",children:i.tapToVote}),(0,yt.jsx)("p",{className:"ss-g-motm-fun",children:i.forFun})]})]})}var dn=b(I(),1),V2=new Set(["matchday-predictor","starting-xi","stat-ladder","fan-motm"]),W2=3e4;function fr(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function rC({selected:e,onBack:t,onPlayed:n,conversation:r,ui:s}){let{gameId:a,fixtureId:i,gameDay:o="",lockAtUtc:l=null}=e,[u,c]=(0,As.useState)(null);(0,As.useEffect)(()=>{if(c(null),!r)return;let y=!1;return(async()=>{try{let A=await r.getGameConfig(a,i,o||void 0);!y&&(A!=null&&A.configJson)&&c(A.configJson)}catch{}})(),()=>{y=!0}},[r,a,i,o]);let{result:d,submitting:p,submit:m,hydrate:g,rawStatus:w}=M1(r,{gameId:a,gameDay:o,fixtureId:i||void 0});(0,As.useEffect)(()=>{r&&g()},[r,a]);let C=(0,As.useRef)(g);C.current=g,(0,As.useEffect)(()=>{if(!V2.has(a)||w!=="pending")return;let y=setInterval(()=>{C.current()},W2);return()=>clearInterval(y)},[a,w]);let f={result:d,submitting:p,onSubmit:y=>{m(y).then(()=>n==null?void 0:n())},ui:s,onBack:t,lockAtUtc:l};function h(){var y;switch(a){case"mystery-tiger":return(0,dn.jsx)(B1,{...f,config:fr(u)});case"higher-or-lower":return(0,dn.jsx)(U1,{...f,config:fr(u)});case"career-path":return(0,dn.jsx)(H1,{...f,config:fr(u)});case"beat-the-grid":{let A=fr(u);return(0,dn.jsx)(V1,{...f,config:A,playerPool:(y=A==null?void 0:A.playerPool)!=null?y:[]})}case"guess-the-xi":return(0,dn.jsx)(X1,{...f,config:fr(u)});case"daily-quiz":return(0,dn.jsx)(J1,{...f,config:fr(u)});case"matchday-predictor":return(0,dn.jsx)(Y1,{...f,config:fr(u)});case"starting-xi":return(0,dn.jsx)(Z1,{...f,config:fr(u)});case"stat-ladder":return(0,dn.jsx)(tC,{...f,config:fr(u)});case"fan-motm":return(0,dn.jsx)(nC,{...f,config:fr(u)});default:return(0,dn.jsx)("div",{className:"ss-g-screen","data-testid":`game-screen-${a}`,children:(0,dn.jsx)(Oe,{title:et({gameId:a},s.games.titles),onBack:t,backLabel:s.back})})}}return(0,dn.jsx)("div",{className:"ss-w-gscreen","data-testid":"gscreen","data-lock-at":l!=null?l:void 0,children:h()})}var sC="ss-w-games-fonts",_2="https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=Barlow:wght@400;500;600;700&display=swap";function aC(e=document){if(!e.head||e.getElementById(sC))return;let t=e.createElement("link");t.id=sC,t.rel="stylesheet",t.href=_2,e.head.appendChild(t)}var di=b(I(),1);function iC({loggedIn:e,games:t,ui:n,conversation:r,leaderboard:s,refreshHub:a}){var l;let[i,o]=(0,Pc.useState)(null);return(0,Pc.useEffect)(()=>{aC()},[]),e?i!==null?(0,di.jsx)("div",{className:"ss-w-gscreen-wrap",lang:n.games.lang,children:(0,di.jsx)(rC,{selected:i,onBack:()=>{o(null),a==null||a()},onPlayed:a,conversation:r!=null?r:null,ui:n})}):(0,di.jsx)("div",{className:"ss-g-hub-wrap","data-testid":"games-hub",lang:n.games.lang,children:(0,di.jsx)(P1,{games:t,onOpen:u=>{var c;return o({gameId:u.gameId,fixtureId:u.fixtureId,gameDay:u.gameDay,lockAtUtc:(c=u.lockAtUtc)!=null?c:null})},myWeeklyRow:(l=s==null?void 0:s.myWeeklyRow)!=null?l:null,ui:n})}):(0,di.jsx)(hc,{ui:n})}var lC=b(se(),1);var er=b(I(),1);function pi(e){return e.toLocaleString("en")}function lg({row:e,isMe:t}){let n=`ss-w-lb2-rank${e.rank<=3?" ss-w-lb2-rank--top3":""}`;return(0,er.jsxs)("div",{className:`ss-w-lb2-row${t?" ss-w-lb2-row--you":""}`,children:[(0,er.jsxs)("span",{className:n,children:["#",e.rank]}),(0,er.jsx)("span",{className:"ss-w-lb2-handle",children:e.handle}),(0,er.jsx)("span",{className:"ss-w-lb2-points",children:pi(e.points)}),e.currentStreak>0&&(0,er.jsxs)("span",{className:"ss-w-lb2-streak",children:["\u{1F525} ",e.currentStreak]})]})}function ug({row:e,isMe:t}){let n=`ss-w-lb2-rank${e.rank<=3?" ss-w-lb2-rank--top3":""}`;return(0,er.jsxs)("div",{className:`ss-w-lb2-row${t?" ss-w-lb2-row--you":""}`,children:[(0,er.jsxs)("span",{className:n,children:["#",e.rank]}),(0,er.jsx)("span",{className:"ss-w-lb2-handle",children:e.handle}),(0,er.jsx)("span",{className:"ss-w-lb2-points",children:pi(e.allTimePoints)})]})}var mt=b(I(),1);function oC({segment:e,lastWeek:t,weeklyPrize:n,onPlay:r,ui:s}){if(e==="alltime")return(0,mt.jsxs)("div",{className:"ss-w-lb-empty ss-w-lb-empty--alltime",children:[(0,mt.jsx)("div",{className:"ss-w-lb-empty-icon","aria-hidden":"true",children:"\u{1F4CA}"}),(0,mt.jsx)("p",{className:"ss-w-lb-empty-body",children:s.leaderboardAllTimeEmpty})]});let a=t!=null,i=a?s.leaderboardEmptyFreshTitle:s.leaderboardEmptyColdTitle,o=a?s.leaderboardEmptyFreshBody:s.leaderboardEmptyColdBody;return(0,mt.jsxs)("div",{className:"ss-w-lb-empty",children:[n&&(0,mt.jsxs)("div",{className:"ss-w-prize",children:[(0,mt.jsx)("span",{className:"ss-w-prize-icon","aria-hidden":"true",children:"\u{1F3C6}"}),(0,mt.jsx)("div",{className:"ss-w-prize-body",children:(0,mt.jsx)("span",{className:"ss-w-prize-text",children:n})})]}),(0,mt.jsxs)("div",{className:"ss-w-lb-empty-hero",children:[(0,mt.jsx)("div",{className:"ss-w-lb-empty-icon","aria-hidden":"true",children:a?"\u{1F3C6}":"\u{1F3AE}"}),(0,mt.jsx)("h4",{className:"ss-w-lb-empty-title",children:i}),(0,mt.jsx)("p",{className:"ss-w-lb-empty-body",children:o}),r&&(0,mt.jsx)("button",{type:"button",className:"ss-w-lb-empty-cta",onClick:r,children:s.leaderboardEmptyCta})]}),a&&t&&(0,mt.jsxs)("div",{className:"ss-w-lb-last",children:[(0,mt.jsx)("span",{className:"ss-w-lb-last-label",children:s.leaderboardLastWeekLabel}),(0,mt.jsx)("span",{className:"ss-w-lb-last-champ","aria-hidden":"true",children:"\u{1F947}"}),(0,mt.jsx)("span",{className:"ss-w-lb-last-handle",children:t.handle}),(0,mt.jsx)("span",{className:"ss-w-lb-last-points",children:pi(t.points)})]})]})}var ot=b(I(),1);function uC({data:e,ui:t,onPlay:n}){let[r,s]=(0,lC.useState)("weekly"),a=r==="weekly"?e.myWeeklyRow:e.myAllTimeRow,i=a!=null&&a.rank===-1,o=r==="weekly"?e.weeklyTop.length===0:e.allTimeTop.length===0;return(0,ot.jsxs)("div",{className:"ss-w-lb2",children:[(0,ot.jsxs)("div",{className:"ss-w-seg",children:[(0,ot.jsx)("button",{type:"button",className:"ss-w-seg-btn",...r==="weekly"?{"data-on":""}:{},onClick:()=>s("weekly"),children:t.leaderboardThisWeek}),(0,ot.jsx)("button",{type:"button",className:"ss-w-seg-btn",...r==="alltime"?{"data-on":""}:{},onClick:()=>s("alltime"),children:t.leaderboardAllTime})]}),o?(0,ot.jsx)(oC,{segment:r,lastWeek:e.lastWeek,weeklyPrize:e.weeklyPrize,onPlay:n,ui:t}):(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsx)("div",{className:"ss-w-lb2-rows",children:r==="weekly"?e.weeklyTop.map(l=>{var u;return(0,ot.jsx)(lg,{row:l,isMe:l.operatorUserId===((u=e.myWeeklyRow)==null?void 0:u.operatorUserId)},l.operatorUserId)}):e.allTimeTop.map(l=>{var u;return(0,ot.jsx)(ug,{row:l,isMe:l.operatorUserId===((u=e.myAllTimeRow)==null?void 0:u.operatorUserId)},l.operatorUserId)})}),(0,ot.jsx)("div",{className:"ss-w-kitline",children:"\u{1F3BD}"}),a!=null&&(i?(0,ot.jsx)("div",{className:"ss-w-lbgap",children:t.leaderboardOffBoard}):(0,ot.jsxs)("div",{className:"ss-w-lb2-rows",children:[r==="weekly"&&e.myWeeklyRow&&(0,ot.jsx)(lg,{row:e.myWeeklyRow,isMe:!0}),r==="alltime"&&e.myAllTimeRow&&(0,ot.jsx)(ug,{row:e.myAllTimeRow,isMe:!0})]})),r==="alltime"&&e.myAllTimeRow&&!i&&(0,ot.jsx)("div",{className:"ss-w-lb2-rows",children:(0,ot.jsx)("div",{className:"ss-w-lb2-row",children:(0,ot.jsx)("span",{className:"ss-w-lb2-handle",children:pi(e.allTimeTop.reduce((l,u)=>l+u.allTimePoints,0))})})})]})]})}var Oo=b(I(),1),j2={week:"",weeklyTop:[],myWeeklyRow:null,allTimeTop:[],myAllTimeRow:null,weeklyPrize:null,lastWeek:null};function cC({loggedIn:e,data:t,loading:n,onPlay:r,ui:s}){return e?t===null&&n?(0,Oo.jsx)("div",{className:"ss-w-mon-list"}):(0,Oo.jsx)("div",{className:"ss-w-mon-list",children:(0,Oo.jsx)(uC,{data:t!=null?t:j2,ui:s,onPlay:r})}):(0,Oo.jsx)(hc,{ui:s})}var Cn=b(I(),1),X2="(max-width: 639px)";function q2(){let[e,t]=(0,mi.useState)(!1);return(0,mi.useEffect)(()=>{if(typeof window=="undefined"||typeof window.matchMedia!="function")return;let n=window.matchMedia(X2),r=()=>t(n.matches);return r(),n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e}function dC({controller:e,ui:t,slip:n,onDashboardTap:r,monitor:s,discovery:a,gamesResult:i,leaderboardResult:o,loggedIn:l,conversation:u}){var f,h,y;let{state:c,close:d,stop:p,send:m,reset:g}=e,w=q2();(0,mi.useEffect)(()=>{let A=E=>{E.key==="Escape"&&d()};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[d]);let C=A=>{s==null||s.setActiveTab("chat"),m(A)};return(0,mi.useEffect)(()=>{s&&s.activeTab!=="chat"&&c.isStreaming&&s.markChatActivity()},[s,c.isStreaming,c.messages.length]),(0,Cn.jsxs)("div",{className:"ss-w-panel",role:"dialog","aria-modal":w,"aria-label":t.chatDialogLabel,children:[(0,Cn.jsx)(yv,{onClose:d,closeLabel:t.closeChat,logoUrl:t.logoUrl,headerTitle:t.headerTitle,onNewConversation:g,canReset:c.messages.length>0,newConversationLabel:t.newConversation,moreOptionsLabel:t.moreOptions}),s&&(0,Cn.jsx)(u1,{monitor:s,ui:t,matchCount:s.pins.filter(A=>A.kind==="match").length,oddsCount:s.pins.filter(A=>A.kind!=="match").length,todayCount:(f=a==null?void 0:a.liveCount)!=null?f:0,hasToday:a?Qa(a.groups,a.states).length>0:!1,gamesEnabled:(h=i==null?void 0:i.enabled)!=null?h:!1}),(0,Cn.jsx)("div",{style:!s||s.activeTab==="chat"?{display:"contents"}:{position:"absolute",inset:0,visibility:"hidden",display:"flex",flexDirection:"column"},children:(0,Cn.jsx)(i1,{controller:e,ui:t,slip:n,onDashboardTap:r,monitor:s})}),s&&a&&s.activeTab==="today"&&(0,Cn.jsx)(w1,{discovery:a,ui:t,monitor:s}),s&&s.activeTab==="following"&&(0,Cn.jsx)(m1,{monitor:s,ui:t,slip:n}),s&&s.activeTab==="odds"&&(0,Cn.jsx)(f1,{monitor:s,ui:t,slip:n}),s&&s.activeTab==="games"&&i&&(0,Cn.jsx)(iC,{loggedIn:!!l,games:i.games,ui:t,conversation:u,leaderboard:(y=o==null?void 0:o.data)!=null?y:null,refreshHub:()=>{i.refresh(),o==null||o.refresh()}}),s&&s.activeTab==="leaderboard"&&o&&(0,Cn.jsx)(cC,{loggedIn:!!l,data:o.data,loading:o.loading,onPlay:()=>s.setActiveTab("games"),ui:t}),(!s||s.activeTab!=="games"&&s.activeTab!=="leaderboard")&&(0,Cn.jsx)(l1,{placeholder:t.placeholder,streaming:c.isStreaming,onSend:C,onStop:p,stopLabel:t.stopResponse,sendLabel:t.sendMessage})]})}var pC=`.ss-w-root { all: revert; }
|
|
38
38
|
.ss-w-root, .ss-w-root * { box-sizing: border-box; margin: 0; padding: 0; }
|
|
39
39
|
.ss-w-root {
|
|
40
40
|
--ss-w-accent: #17936a;
|
|
@@ -1130,8 +1130,10 @@ Error generating stack: `+a.message+`
|
|
|
1130
1130
|
.ss-g-hl-value { font: 800 56px var(--ss-g-font-display); line-height: .95; color: var(--ss-w-accent); margin-top: 6px; }
|
|
1131
1131
|
.ss-g-hl-stat { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ss-g-muted); }
|
|
1132
1132
|
.ss-g-hl-btns { display: flex; flex-direction: row; gap: 8px; margin-top: 12px; }
|
|
1133
|
-
.ss-g-hl-btns .ss-g-btn { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0
|
|
1134
|
-
|
|
1133
|
+
.ss-g-hl-btns .ss-g-btn { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 6px; gap: 4px; }
|
|
1134
|
+
/* Labels stay on one line: Turkish "DAHA FAZLA" wrapped to two in a ~115px button. */
|
|
1135
|
+
.ss-g-hl-btns .ss-g-btn { font-weight: 800; font-size: 13px; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
|
|
1136
|
+
.ss-g-hl-btns .ss-g-btn svg { flex: none; }
|
|
1135
1137
|
.ss-g-hl-vs { position: relative; z-index: 1; flex: none; align-self: center; width: 44px; height: 44px; margin: -28px 0; border-radius: 50%; display: grid; place-items: center; background: var(--ss-g-ground); border: 2px solid var(--ss-g-line-warm); color: var(--ss-w-accent); font: 800 18px var(--ss-g-font-display); }
|
|
1136
1138
|
/* Clear the VS badge that straddles the seam between the two cards. */
|
|
1137
1139
|
.ss-g-hl-pair > .ss-g-hl-card:first-child .ss-g-hl-info { padding-bottom: 24px; }
|
|
@@ -1270,10 +1272,13 @@ Error generating stack: `+a.message+`
|
|
|
1270
1272
|
|
|
1271
1273
|
/* ---- Beat the Grid (u393) ---- */
|
|
1272
1274
|
.ss-g-btg-grid { display: grid; gap: 6px; }
|
|
1273
|
-
|
|
1275
|
+
/* While the search sheet is pinned below, the grid shrinks its rows to share the body with it
|
|
1276
|
+
instead of pushing the bottom row under the sheet. */
|
|
1277
|
+
.ss-g-btg-grid--fit { flex: 0 1 auto; min-height: 0; }
|
|
1278
|
+
.ss-g-btg-colhdr { min-height: 0; border-radius: 12px; background: var(--ss-g-surface); border: 1px solid var(--ss-g-line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 0 4px; font-size: 12px; font-weight: 700; line-height: 1.1; min-width: 0; overflow-wrap: anywhere; }
|
|
1274
1279
|
.ss-g-btg-colhdr svg { color: var(--ss-w-accent); flex: none; }
|
|
1275
1280
|
.ss-g-btg-rowhdr { border-radius: 12px; background: var(--ss-g-surface); border: 1px solid var(--ss-g-line); display: grid; place-items: center; font-family: var(--ss-g-font-display); font-weight: 800; font-size: 18px; letter-spacing: .04em; text-transform: uppercase; overflow-wrap: anywhere; text-align: center; }
|
|
1276
|
-
.ss-g-btg-cell { position: relative; height:
|
|
1281
|
+
.ss-g-btg-cell { position: relative; min-height: 0; min-width: 0; border-radius: 12px; border: 1.5px dashed var(--ss-g-strong-line); background: transparent; color: var(--ss-g-muted); display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; font: inherit; padding: 0; }
|
|
1277
1282
|
.ss-g-btg-cell:disabled { cursor: default; }
|
|
1278
1283
|
.ss-g-btg-cell[data-state="active"] { border: 2px solid var(--ss-w-accent); background: var(--ss-g-warm); color: var(--ss-w-accent); }
|
|
1279
1284
|
.ss-g-btg-cell[data-state="correct"], .ss-g-btg-cell[data-state="wrong"] { justify-content: flex-end; background: var(--ss-g-surface); border-style: solid; }
|
|
@@ -1297,6 +1302,7 @@ Error generating stack: `+a.message+`
|
|
|
1297
1302
|
.ss-g-btg-sheet .ss-g-search-box { height: 48px; border-radius: 12px; background: var(--ss-g-ground); }
|
|
1298
1303
|
.ss-g-btg-sheet-empty { font-size: 13px; color: var(--ss-g-muted); }
|
|
1299
1304
|
.ss-g-btg-sheet .ss-g-opt { background: var(--ss-g-raised); }
|
|
1305
|
+
.ss-g-btg-sheet .ss-g-opts { max-height: 160px; }
|
|
1300
1306
|
.ss-g-btg-result-name { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
1301
1307
|
.ss-g-btg-result-plus { color: var(--ss-w-accent); display: flex; }
|
|
1302
1308
|
|