!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2f70866c-2fa9-4674-abda-9e70d6303acb",e._sentryDebugIdIdentifier="sentry-dbid-2f70866c-2fa9-4674-abda-9e70d6303acb")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[756],{12605:(e,t,n)=>{n.d(t,{A:()=>N});var i=n(64082),a=n(6029),r=n(21501),o=n(41249),s=n(43072),l=n(21377),d=n(55729),u=n(41735),c=n(19991);let m=(0,u.keyframes)` from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } `,f=(0,u.keyframes)` from { clip-path: inset(50% 0 50% 0); } to { clip-path: inset(0 0 0 0); } `,p=(0,u.keyframes)` 0% { clip-path: inset(0 15px 0 0); transform: matrix(1, 0, 0, 0.01, 0, 11.5); } 50% { clip-path: inset(0 15px 0 0); transform: matrix(1, 0, 0, 1, 0, 0); } 100% { clip-path: inset(0 0 0 0); transform: matrix(1, 0, 0, 1, 0, 0); } `,g=(0,u.keyframes)` 0% { clip-path: inset(0 0 0 15px); transform: matrix(1, 0, 0, 0.01, 0, -11.5); } 50% { clip-path: inset(0 0 0 15px); transform: matrix(1, 0, 0, 1, 0, 0); } 100% { clip-path: inset(0 0 0 0); transform: matrix(1, 0, 0, 1, 0, 0); } `,h=(e,t)=>{let n=(0,c.q2)(e);return e&&t&&e>t?(0,u.keyframes)` 0% { background-position: 0 -100%; } 100% { background-position: 0 0; background-image: ${n}; } `:(0,u.keyframes)` 0% { background-position: 0 100%; } 100% { background-position: 0 0; background-image: ${n}; } `},v=(0,u.css)` ${m} ease-in ${330}ms 1 `,x=(0,u.css)` ${e=>h(e.rating,e.previousRating)} ${330}ms ease-in 1 `;function b({duration:e="330ms",repeatCount:t=1,delay:n=330,width:i=24,height:r=24,animate:s}){let[u,c]=(0,d.useState)(!1);return((0,d.useLayoutEffect)(()=>{let e;return s||(0,l.NuQ)()?e=window.setTimeout(()=>{requestAnimationFrame(()=>{c(!0)})},n):c(!1),()=>{window.clearTimeout(e)}},[s]),u)?(0,a.jsx)(o.az,Object.assign({position:"absolute",top:"1",left:"1",h:r-2,w:i-2,zIndex:o.Py.Sticky,overflow:"hidden"},{children:(0,a.jsxs)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32",width:i,height:r,style:{width:"100%",height:"100%",transform:"translate3d(0px, 0px, 0px)",display:"block",overflow:"hidden"},preserveAspectRatio:"xMidYMid meet"},{children:[(0,a.jsxs)("g",{children:[(0,a.jsx)("path",Object.assign({fill:"white",d:"M -64 0 H -32 L 0 32 H -32 Z",fillOpacity:".6"},{children:(0,a.jsx)("animate",{attributeName:"d",values:"M -64 0 H -32 L 0 32 H -32 Z;M 32 0 H 36 L 72 32 H 68 Z",dur:e,repeatCount:t,keySplines:"0.86 0.12 0.92 0.79"})})),(0,a.jsx)("animateTransform",{attributeName:"transform",type:"translate",from:"-32 0",to:"32 0",dur:e,repeatCount:t})]}),(0,a.jsxs)("g",{children:[(0,a.jsx)("path",Object.assign({fill:"white",d:"M -36 0 H -32 L 0 32 H -4 Z",fillOpacity:"1.0"},{children:(0,a.jsx)("animate",{attributeName:"d",values:"M -36 0 H -32 L 0 32 H -4 Z;M 0 0 H 4 L 36 32 H 32 Z;M 32 0 H 48 L 80 32 H 64 Z",dur:e,repeatCount:t,keySplines:"1 0 1 0.1"})})),(0,a.jsx)("animateTransform",{attributeName:"transform",type:"translate",from:"-128 0",to:"0 0",dur:e,repeatCount:t})]})]}))})):null}let y=(0,u.default)(o.az)` width: 16px; height: 16px; position: relative; &.animate { > .sideBox-inner { position: relative; width: 16px; height: 16px; background-size: 100% 200%; background-image: ${e=>(0,c.q2)(e.rating,e.previousRating)}; clip-path: inset(50% 0 50% 0); animation: ${f} ease-in-out ${330}ms 1, ${x}; animation-delay: ${330}ms, 0ms; animation-fill-mode: forwards; transform: translate3d(0, 0, 0); z-index: ${o.Py.Backdrop}; } ::before { content: ''; display: block; position: absolute; top: 0; left: 0; width: calc(100% - 1px); height: 50%; border-top: 1px solid; border-left: 1px solid; transform: translate3d(0, 0, 0); animation: ${p} ease-in-out ${660}ms 1; z-index: ${o.Py.Button}; } ::after { content: ''; display: block; position: absolute; bottom: 0; right: 0; width: calc(100% - 1px); height: 50%; border-right: 1px solid; border-bottom: 1px solid; transform: translate3d(0, 0, 0); animation: ${g} ease-in-out ${660}ms 1; z-index: ${o.Py.Button}; } } // change width for textual part of rating in a transition + span { transition: width ${330}ms ease-in; transition-delay: ${e=>330*("10"===e.rating)}ms; } `,w=(0,u.default)(o.so)` position: relative; transform: translate3d(0, 0, 0); opacity: 0; background-size: 100% 200%; background-image: ${e=>(0,c.q2)(e.rating,e.previousRating)}; &.animate { opacity: 1; animation: ${v}, ${x}; } &.border { ::before { content: ''; display: block; position: absolute; top: 0; left: 0; width: 50%; height: 50%; border-top: 1px solid; border-left: 1px solid; transform: translate3d(0, 0, 0); animation: ${p} ease-in-out ${660}ms 1; z-index: ${o.Py.Button}; } ::after { content: ''; display: block; position: absolute; bottom: 0; right: 0; width: 50%; height: 50%; border-right: 1px solid; border-bottom: 1px solid; transform: translate3d(0, 0, 0); animation: ${g} ease-in-out ${660}ms 1; z-index: ${o.Py.Button}; } } `;var $=n(52462);let k=(e,t)=>(0,u.keyframes)` from { --rating: ${t||(e?e-1.5:0)}; } to { --rating: ${e}; } `,j=(0,u.default)(o.az)` cursor: inherit; > span { display: none; } &.animate { --rating: ${e=>e.rating}; --temp: calc(var(--rating)); --v1: max(var(--temp) - 0.5, 0); --v2: max( (var(--temp) - var(--v1)) * ${e=>2===e.decimalPoints?99:10} - ${e=>2===e.decimalPoints?.05:.5}, 0 ); animation: ${e=>k(e.rating,e.previousRating)} 660ms ease-in; counter-reset: v1 var(--v1) v2 var(--v2); &::after { content: ${e=>!e.rating||"-"===e.rating||isNaN(+e.rating)?"-":2===e.decimalPoints?"counter(v1) '.' counter(v2, decimal-leading-zero)":"counter(v1) '.' counter(v2)"}; } } &.animation-complete { &::after { content: ${e=>`"${e.rating}"`}; } } `;function R({rating:e,previousRating:t,decimalPoints:n,animate:i}){let{isCountUpSupported:r}=(0,d.useContext)($.N_),o=(0,d.useRef)(null);return((0,d.useEffect)(()=>{var e;null==(e=o.current)||e.classList.remove("animation-complete"),setTimeout(()=>{requestAnimationFrame(()=>{o.current&&o.current.classList.replace("animate","animation-complete")})},660)},[e,i]),r&&"10"!==e&&"-"!==e)?(0,a.jsx)(j,Object.assign({ref:o,className:i?"animate":"",rating:e,previousRating:e===t?void 0:t,decimalPoints:n},{children:(0,a.jsx)("span",{children:e})})):(0,a.jsx)(a.Fragment,{children:e})}let A={sm:[16,12],md:[24,14],lg:[32,16],xl:[40,24]};function N(e){var{rating:t,format:n,cursor:l="default",isOnColor:d}=e,u=(0,i.T)(e,["rating","format","cursor","isOnColor"]);let{formattedRating:m}=(0,c.MR)(t,n,u.decimalPoints),[f,p]=(0,s.Wx)({triggerOnce:!0}),g=(0,r.ZC)(m);if("sideBox"===n)return(0,a.jsxs)(o.so,Object.assign({position:"relative"},{children:[(0,a.jsxs)(y,Object.assign({ref:f,className:p?"animate":"",rating:m,previousRating:g,c:d?"onColor.primary":"onSurface.nLv1",mr:"xs",cursor:l},{children:[(0,a.jsx)(o.az,{className:"sideBox-inner"}),"10"===m&&(0,a.jsx)(b,{width:16,height:16,delay:660,animate:p})]})),(0,a.jsx)(o.EY,Object.assign({role:"meter","aria-valuemin":3,"aria-valuemax":10,"aria-valuenow":m,userSelect:"none",cursor:"inherit",font:"display.large",color:d?"onColor.primary":"onSurface.nLv1",w:"10"===m?24:36,h:"16",lineHeight:"16px",letterSpacing:"-0.5px",fontVariant:"tabular-nums"},{children:(0,a.jsx)(R,{rating:m,previousRating:g,decimalPoints:2,animate:p})}))]}));let h=u.size||"md",v=u.decimalPoints||1,[x,$]=A[h];return(0,a.jsx)(o.az,Object.assign({ref:f},{children:(0,a.jsxs)(w,Object.assign({cursor:l,className:p?2===v?"animate border":"animate":"",align:"center",justify:"center",h:x,w:2===v&&"10"!==m?x+8:x,textAlign:"center",rating:m,previousRating:g,shrink:0,grow:0,fontSize:$,c:d?"onColor.primary":"onSurface.nLv1"},{children:["10"===m&&(0,a.jsx)(b,{height:x,width:x,animate:p}),(0,a.jsx)(o.EY,Object.assign({role:"meter","aria-valuemin":3,"aria-valuemax":10,"aria-valuenow":m,userSelect:"none",cursor:"inherit",align:"center",font:"table.lineupsRating",letterSpacing:"-0.5px",fontSize:$,fontVariant:"tabular-nums",color:"white",lineHeight:1},{children:(0,a.jsx)(R,{rating:m,previousRating:g,decimalPoints:v,animate:p})}))]}))}))}},17357:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(21377),a=n(55729),r=n(494),o=n(30720),s=n(19121);function l(e,t){let n=null==t?void 0:t.shouldRefresh,[l,d]=(0,a.useState)(),[u,c]=(0,a.useState)(),m=(0,r.wA)();(0,a.useEffect)(()=>{(null==t?void 0:t.event)?m((0,s.$n)(t.event)):e&&i.nk6.fetchEvent(e).then(e=>{m((0,s.$n)(e.event)),d(e.event),c(void 0)}).catch(e=>{c(e),(null==t?void 0:t.onFetchError)&&t.onFetchError(),d(void 0)})},[e,null==t?void 0:t.event]);let f=(0,r.d4)(t=>{let{favorites:{events:n}}=t;return e?n[e]:void 0});(0,a.useEffect)(()=>{if(!e||!n)return;let t="event-details-".concat(e);return m((0,s.vB)({entities:[e],refreshTaskId:t},{fetchFunction:i.nk6.fetchEvent.bind(null,e)})),()=>{m((0,s.tM)(t))}},[e,n]);let[p,g]=(0,o.A)(f||(null==t?void 0:t.event),"homeTeam","awayTeam",l||(null==t?void 0:t.event)),[h,v]=(0,o.A)(f||(null==t?void 0:t.event),"homeScore","awayScore",l||(null==t?void 0:t.event));return{event:f,fetchedEvent:l,leftTeam:p,rightTeam:g,leftScore:h,rightScore:v,error:u}}},19991:(e,t,n)=>{n.d(t,{Et:()=>r,MR:()=>o,q2:()=>s});var i=n(41249),a=n(98914);let r=e=>{let t=Number(e),n="scoreRating.s00";return t>=9?n="scoreRating.s90":t>=8?n="scoreRating.s80":t>=7?n="scoreRating.s70":t>=6.5?n="scoreRating.s65":t>=6?n="scoreRating.s60":t>0&&(n="scoreRating.s10"),n},o=(e,t,n)=>{let i=Number(e);if(!i||isNaN(i))return{formattedRating:"-",ratingColorKey:"scoreRating.s00"};let o=(0,a.M)(i,"sideBox"===t||2===n?2:1);return Number(o)>=10?{formattedRating:"10",ratingColorKey:"scoreRating.s90"}:{formattedRating:o,ratingColorKey:r(o)}},s=(e,t)=>{if(e&&t)return`linear-gradient(to bottom, ${(0,i.$5)(r(e))} 50%, ${(0,i.$5)(r(t))} 50%)`;let n=(0,i.$5)(r(e));return`linear-gradient(to bottom, ${n}, ${n})`}},30720:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(69385);function a(e,t,n,a){let r=(0,i.A)(a);if(!(e&&void 0!==t&&void 0!==n))return[];let[o,s]=[e[t],e[n]];return r?[s,o]:[o,s]}},65078:(e,t,n)=>{n.d(t,{gm:()=>i.A,g3:()=>a.A,mJ:()=>r.A,jr:()=>o.A,AR:()=>l,h2:()=>f});var i=n(70215),a=n(69385),r=n(17357),o=n(30720),s=n(494);function l(e){let t=(0,s.d4)(t=>{let{favorites:{events:n}}=t;return n[e.id]}),[n,i]=(0,o.A)(e,"homeTeam","awayTeam",e),[a,r]=(0,o.A)(e,"homeScore","awayScore",e);return{event:t||e,leftTeam:n,rightTeam:i,leftScore:a,rightScore:r}}var d=n(21377),u=n(55729),c=n(62859);let m=e=>t=>e===t;function f(e,t){var n,a;let{event:r,leftTeam:o,rightTeam:s}=(0,u.useContext)(c.y$),l=(0,i.A)(r,"winnerCode"),f=(r.status.code===d.sum.AET||r.status.code===d.sum.AP)&&r.tournament.category.sport.slug===d.QCR.IceHockey,p=e?m(e):t||(()=>!1),g=p(o.id,r.id)||(null==(n=o.subTeams)?void 0:n.some(e=>p(e.id,r.id))),h=p(s.id,r.id)||(null==(a=s.subTeams)?void 0:a.some(e=>p(e.id,r.id)));switch(l){case d.Jfo.Left:if(g)return d.h18.Win;if(h)return f?d.h18.OvertimeLoss:d.h18.Lose;break;case d.Jfo.Right:if(g)return f?d.h18.OvertimeLoss:d.h18.Lose;if(h)return d.h18.Win;break;case d.Jfo.Draw:if(g||h)return d.h18.Draw}}},69385:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(55729),a=n(494),r=n(62859),o=n(57126);function s(e){var t;let n=(0,i.useContext)(r.y$),s=e||n.event,l=(0,a.d4)(o.xl);return(null==s||null==(t=s.tournament.uniqueTournament)?void 0:t.displayInverseHomeAwayTeams)&&l}},70215:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(69385);function a(e,t,n){let a=(0,i.A)(n);if(!(e&&t))return;let r=e[t];if("number"==typeof r)return a&&[1,2].includes(r)?1===r?2:1:r}},87827:(e,t,n)=>{n.d(t,{G:()=>i.A});var i=n(12605)},98914:(e,t,n)=>{n.d(t,{M:()=>i});let i=function(e,t=0){var n,i,a;return(n="round",i=e,0==+(a=-t)?Math[n](+i):(a*=1,isNaN(i*=1)||"number"!=typeof a||a%1!=0)?NaN:+((i=(i=Math[n](+((i=i.toString().split("e"))[0]+"e"+(i[1]?i[1]-a:-a)))).toString().split("e"))[0]+"e"+(i[1]?+i[1]+a:a))).toFixed(t)}}}]);