!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]="8e8f8fca-3930-458a-86a5-db32927203a3",e._sentryDebugIdIdentifier="sentry-dbid-8e8f8fca-3930-458a-86a5-db32927203a3")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[66022],{2294:(e,t,n)=>{n.d(t,{Qf:()=>r,_7:()=>o,fw:()=>l});var i=n(46787);let o={[i.rjx.WhoWillWin]:"who_will_win",[i.rjx.WillBothTeamsScore]:"will_both_teams_score",[i.rjx.FirstTeamToScore]:"first_team_to_score"},l={[i.rjx.WhoWillWin]:"who_will_win_edit",[i.rjx.WillBothTeamsScore]:"will_both_teams_score_edit",[i.rjx.FirstTeamToScore]:"first_team_to_score_edit"},r={[i.rjx.WhoWillWin]:"fullTime",[i.rjx.WillBothTeamsScore]:"bothTeamsToScore",[i.rjx.FirstTeamToScore]:"firstTeamToScore"};i.rjx.WhoWillWin,i.rjx.WillBothTeamsScore,i.rjx.FirstTeamToScore},5943:(e,t,n)=>{n.d(t,{t:()=>s});var i=n(494),o=n(2294),l=n(26457),r=n(27379);let s=(e,t)=>{var n,s,a;let d=(0,i.d4)(l.wH),{data:c,isLoading:u,mutate:x}=(0,r.Z)(),v=null==c||null==(s=c.predictions)||null==(n=s.find)?void 0:n.call(s,t=>t.eventId===e.id),p=null==(a=d[e.id])?void 0:a[t],h=null==p?void 0:p.current,m=null==p?void 0:p.prev;return{userVote:(null==v?void 0:v.votes[o.Qf[t]])||h,oldVote:m,eventFuturePrediction:v,userFuturePredictions:c,areFuturePredictionsLoading:u,mutateFuturePredictions:x}}},8861:(e,t,n)=>{n.d(t,{Iz:()=>j,K$:()=>v,Q3:()=>c,T8:()=>x,bZ:()=>h,d4:()=>m,do:()=>u,kS:()=>f,mK:()=>d,mt:()=>p});var i=n(46787),o=n(52763),l=n(89827),r=n(55462),s=n(20455),a=n(2294);let d=(e,t,n)=>{let i=(e||0)+(t||0)+(n||0),o=0===i?0:(e||0)/i*100,r=0===i?0:(t||0)/i*100,s=0===i?0:(n||0)/i*100,a=parseFloat((0,l.M)(o)),d=parseFloat((0,l.M)(r)),c=parseFloat((0,l.M)(s)),u=100-(a+d+c);if(0!==u){let e=o%1,t=s%1,n=Math.max(e,r%1,t);n===e?a+=u:n===t?c+=u:d+=u}return{leftPercentage:a,middlePercentage:d,rightPercentage:c}},c=e=>{let t=Object.keys(a.Qf);return Object.keys(e).some(n=>t.includes(n)&&Object.values(e[+n]).some(e=>!!e))},u=e=>{switch(e){case i.rjx.WillBothTeamsScore:return r.NT;case i.rjx.FirstTeamToScore:return r.dT;default:return r.o3}},x=e=>[o.Mx.DesktopEventPage,o.Mx.MobileEventPage].includes(e)?"event_details":e===o.Mx.DesktopWidget?"event_widget":void 0,v=(e,t)=>{switch(e){case i.rjx.WhoWillWin:return t?"who_will_win_daily_10x":"who_will_win";case i.rjx.WillBothTeamsScore:return"will_both_teams_score";case i.rjx.FirstTeamToScore:return"first_team_to_score";default:return}},p=e=>{switch(e){case i.rjx.WhoWillWin:return"1";case i.rjx.WillBothTeamsScore:return"2";case i.rjx.FirstTeamToScore:return"3";default:return}},h=e=>1e3*e.startTimestamp>Date.now()&&e.status.type===i.XUj.NotStarted;function m(e,t){return Object.values(s.m).find(n=>{var i,o;return(null==e||null==(o=e.position)||null==(i=o[n])?void 0:i.voteOption)===t})}function f(e,t,n,o,l){var r,a;let d=n.voteModelKey,c=null==(r=n.position[o])?void 0:r.voteApiKey,u=l?(e=>{switch(e){case i.gbi.One:case i.gbi.Yes:return s.m.Left;case i.gbi.Two:case i.gbi.No:return s.m.Right;default:return s.m.Middle}})(l):void 0,x=u?null==(a=n.position[u])?void 0:a.voteApiKey:void 0,v=x===c;if(e&&c){let n=e[d],i=n[c],o=n[x],l=c in n?v?i:i+1:1,r=x&&x in n?v?o:o-1:0;t({...e,[d]:{...e[d],[c]:l,...x&&{[x]:r}}},{revalidate:!1,populateCache:!0})}}function j(e,t){return e?s.w.Votable:t?s.w.Transform:s.w.NoAnimation}},12593:(e,t,n)=>{n.d(t,{Q:()=>s});var i=n(6029),o=n(51569),l=n(20325),r=n(90248);let s=e=>{let{close:t}=e;return(0,i.jsx)(o.aF,{isOpen:!0,onClose:t,children:(0,i.jsxs)(l.az,{w:"[312px]",bg:"surface.s1",p:"lg",br:"lg",elevation:"3",mx:"auto",children:[(0,i.jsx)(o.EY,{textStyle:"display.large",mb:"sm",display:"block",children:(0,i.jsx)(r.A,{id:"oops_ads_blocked"})}),(0,i.jsx)(o.EY,{textStyle:"body.medium",display:"block",children:(0,i.jsx)(r.A,{id:"change_vote_adblocker_body"})}),(0,i.jsx)(l.so,{justify:"flex-end",mt:"xl",gap:"lg",children:(0,i.jsx)(o.$n,{variant:"clear",onClick:t,children:(0,i.jsx)(r.A,{id:"close_window_button"})})})]})})}},21207:(e,t,n)=>{n.d(t,{s:()=>d});var i=n(46787),o=n(45860);function l(e,t){if(void 0!==e&&void 0!==t)return t in e?e[t]:void 0}var r=n(27986),s=n(20455),a=n(8861);function d(e,t){let{data:n,isLoading:d,mutate:c}=(0,o.Ay)(i.bnp.votes(e.id),{refreshInterval:6e4,dedupingInterval:6e4}),{voteModelKey:u,position:x}=(0,a.do)(t),v=(0,r.a)(e,x),p=v[s.m.Left],h=x[s.m.Middle],m=v[s.m.Right],f=l(n,u),j=l(f,null==p?void 0:p.voteApiKey),g=l(f,null==h?void 0:h.voteApiKey),y=l(f,null==m?void 0:m.voteApiKey),b=(!j||j<0?0:j)+(!y||y<0?0:y)+(!g||g<0?0:g),{leftPercentage:_,middlePercentage:T,rightPercentage:w}=(0,a.mK)(j,g,y);return{data:n,isLoading:d,mutate:c,totalVotes:b,eventVotes:{[s.m.Left]:{isAvailable:"number"==typeof j,count:j,percentage:_},[s.m.Middle]:{isAvailable:"number"==typeof g,count:g,percentage:T},[s.m.Right]:{isAvailable:"number"==typeof y,count:y,percentage:w}}}}},22244:(e,t,n)=>{n.d(t,{A:()=>f});var i=n(6029),o=n(51569),l=n(20325),r=n(55729),s=n(90248),a=n(52466),d=n(94565),c=n(14107),u=n(88354),x=n(41735),v=n(56494);let p=e=>{let{isCancelable:t,isOpen:n,portalsContainerId:l,onClose:r}=e,a=(0,x.useTheme)();return((0,o.NF)(n),"undefined"==typeof document)?null:(0,i.jsx)(d.ZL,{id:l,children:(0,i.jsx)(c.N,{children:n&&(0,i.jsxs)(u.m.div,{animate:{backgroundColor:a.colors.overlay.darken2},exit:{backgroundColor:"rgba(0,0,0,0)",transition:{delay:.1}},transition:{duration:.2,ease:"easeIn"},style:{position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",inset:0,overflow:"hidden",zIndex:d.Py.ModalBackdrop},onClick:r,children:[(0,i.jsx)(v.a,{size:56,spinnerColor:"#fff"}),t&&(0,i.jsx)(d.$n,{borderStyle:"rounded",colorScheme:"onColor",style:{position:"absolute",bottom:"10%",left:"50%",transform:"translateX(-50%)"},color:"secondary",onClick:r,children:(0,i.jsx)(s.A,{id:"basic.cancel"})})]},"overlay")})})};var h=n(12593),m=n(44224);function f(e){let{onChangeVote:t,onChangeVoteContinue:n,onChangeVoteClose:d,isModalOpen:c,isLoaderOpen:u,onLoaderExit:x}=e,{hasAdBlock:v}=(0,m.j)(),[f,j]=(0,r.useState)(!1);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p,{isOpen:u,onClose:x,isCancelable:!0}),(0,i.jsx)(o.$n,{variant:"clear",size:"primary",px:"sm",onClick:v?()=>j(!0):t,children:(0,i.jsx)(a.GI1,{color:"primary.default"})}),f&&(0,i.jsx)(h.Q,{close:()=>j(!1)}),(0,i.jsx)(o.aF,{isOpen:c,children:(0,i.jsxs)(l.az,{w:"[312px]",bg:"surface.s1",p:"lg",br:"lg",elevation:"3",mx:"auto",children:[(0,i.jsx)(o.EY,{textStyle:"display.large",mb:"sm",display:"block",children:(0,i.jsx)(s.A,{id:"profile.changeVoteTooltipDescription"})}),(0,i.jsx)(o.EY,{textStyle:"body.medium",display:"block",children:(0,i.jsx)(s.A,{id:"change_vote_watch_ad"})}),(0,i.jsxs)(l.so,{justify:"flex-end",mt:"xl",gap:"lg",children:[(0,i.jsx)(o.$n,{variant:"clear",onClick:d,children:(0,i.jsx)(s.A,{id:"close_window_button"})}),(0,i.jsx)(o.$n,{onClick:n,children:(0,i.jsx)(s.A,{id:"basic.continue"})})]})]})})]})}},26380:(e,t,n)=>{n.d(t,{B:()=>m});var i=n(6029),o=n(51569),l=n(20325),r=n(55729),s=n(90248),a=n(18970),d=n(28576),c=n(47815),u=n(52466),x=n(11219),v=n(95084);let p=e=>{let{location:t}=e;return(0,i.jsx)(x.N_,{routeKey:"user.weeklyChallenge",onClick:()=>{(0,v.Wk)({type:"weekly_challenge",location:t})},children:(0,i.jsx)(o.$n,{variant:"clear",px:"sm",children:(0,i.jsx)(u.wDv,{color:"primary.default",h:24,w:24})})})};var h=n(46558);let m=e=>{let{voteType:t,canUserVote:n,canUserChangeVote:u,isVotingClosed:x,changeVoteButton:v,location:m}=e,{event:f}=(0,r.useContext)(a.y$),{totalVotes:j,isLoading:g}=(0,h.sr)(f,t);return(0,i.jsxs)(l.so,{justify:"space-between",align:"center",children:[(0,i.jsxs)(l.BJ,{gap:"2xs",children:[(0,i.jsx)(o.EY,{textStyle:"display.medium",children:(0,i.jsx)(s.A,{id:d.k[t]})}),g?(0,i.jsx)(l.az,{h:"lg"}):n?(0,i.jsx)(o.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,i.jsx)(s.A,{id:"cast_your_vote"})}):u||x?(0,i.jsxs)(o.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:[(0,i.jsx)(s.A,{id:"prediction_total_votes"}),": ",(0,c.A)(j)]}):null]}),(0,i.jsxs)(l.so,{align:"center",gap:"2xs",children:[v,(0,i.jsx)(p,{location:m})]})]})}},27379:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(46787),o=n(22375),l=n(494),r=n(45860),s=n(22116);let a=()=>{let e=(0,l.d4)(s.$F);return(0,r.Ay)((null==e?void 0:e.id)?i.VfS.futurePredictions(e.id):null,{dedupingInterval:o.dp})}},27986:(e,t,n)=>{n.d(t,{a:()=>l});var i=n(67087),o=n(20455);function l(e,t){return(0,i.g3)(e)?{...t,[o.m.Left]:t[o.m.Right],[o.m.Right]:t[o.m.Left]}:t}},28576:(e,t,n)=>{n.d(t,{A:()=>o,k:()=>l});var i=n(46787);let o=48,l={[i.rjx.WhoWillWin]:"who_will_win",[i.rjx.FirstTeamToScore]:"who_will_score_first_title",[i.rjx.WillBothTeamsScore]:"will_both_teams_score_title"}},34999:(e,t,n)=>{n.d(t,{a8:()=>j,$d:()=>_,dV:()=>p,NC:()=>x});var i=n(55729),o=n(494),l=n(18970),r=n(2294),s=n(88854),a=n(83522),d=n(8861),c=n(21207),u=n(5943);let x=(e,t)=>{let n=(0,o.wA)(),{event:x}=(0,i.useContext)(l.y$),{data:v,mutate:p}=(0,c.s)(x,e),{userVote:h,oldVote:m,userFuturePredictions:f,eventFuturePrediction:j,mutateFuturePredictions:g}=(0,u.t)(x,e);return{handleChangeVote:(i,o)=>{var l,c;let u;n((u={eventId:x.id,voteType:e},{type:s.UG.REMOVE_CHANGED_VOTE,payload:u})),l=i,c=o,(0,d.kS)(v,p,t,c,h),(null==f?void 0:f.predictions)&&(null==j?void 0:j.votes)!==void 0&&(j.votes={...j.votes,[r.Qf[e]]:l},g({predictions:[...f.predictions.filter(e=>e.eventId!==x.id),j]},!1)),m||n((0,a.sP)({eventId:x.id,type:e,vote:i}))}}};var v=n(26457);let p=(e,t)=>!!(0,o.d4)(v.am).find(n=>{var i;return n.eventId===e&&(null==(i=n.voteTypes[t])?void 0:i.isChangeVoteRewarded)});var h=n(81278),m=n(95084),f=n(74853);let j=(e,t,n,l,a)=>{let d=(0,o.wA)(),c=(0,h.useRouter)(),x=p(e.id,t),{userVote:v}=(0,u.t)(e,t),{hasNotStarted:j}=(0,f.N)(e),[g,y]=(0,i.useState)(!1),b=(0,i.useRef)(t);b.current=t;let _=j&&!n&&x,T=j&&!x&&!!v;(0,i.useEffect)(()=>{y("true"===c.query.editVote&&c.query.voteType==="".concat(t))},[]),(0,i.useEffect)(()=>{l(!1)},[t]),(0,i.useEffect)(()=>{a(n&&x)},[n,x]);let w=(0,i.useCallback)(()=>{let t;l(!0);let n=b.current;d((t={eventId:e.id,voteType:n},{type:s.UG.ADD_CHANGED_VOTE,payload:t})),g?(0,m.ke)({action:"reward",location:"user_profile",type:r.fw[n]}):(0,m.ke)({action:"reward",location:"event_details",type:r._7[n]})},[e.id,t]);return{hasRevisitedChangeVote:_,canEditVote:T,autoShowAd:g,setAutoShowAd:y,grantReward:w}};var g=n(52763),y=n(44224);let b={[g.Mx.DesktopEventPage]:g.Rj.REWARDED_DESKTOP_VOTE_EVENT,[g.Mx.DesktopProfilePage]:g.Rj.REWARDED_DESKTOP_VOTE_PROFILE,[g.Mx.MobileEventPage]:g.Rj.REWARDED_MOBILE_VOTE_EVENT,[g.Mx.MobileProfilePage]:g.Rj.REWARDED_MOBILE_VOTE_PROFILE,[g.Mx.DesktopWidget]:g.Rj.REWARDED_DESKTOP_VOTE_WIDGET,[g.Mx.DesktopFeaturedMatch]:g.Rj.REWARDED_DESKTOP_VOTE_FEATURED_MATCH},_=(e,t,n,o,l,s,a,c,u,x)=>{let{hasAdBlock:v}=(0,y.j)(),[p,h]=(0,i.useState)(!1),[f,j]=(0,i.useState)(!1),[_,T]=(0,i.useState)(!1),w=g.BP.find(e=>e.id===b[t]),{showRewardedAd:E,isEnabled:S}=(0,g.NL)(w.Google,a,c),A=(0,i.useCallback)(async n=>{n.preventDefault(),n.stopPropagation(),(0,m.tN)({type:r._7[l],position:(0,d.mt)(l)||"",location:(0,d.T8)(t),id:e}),T(!1),h(!0),null==x||x(),await E(),null==u||u(),h(!1)},[E,o,l]),C=(0,i.useCallback)(()=>{if(o||!S){null==a||a(),null==u||u();return}T(!0)},[o,S,a]);return(0,i.useEffect)(()=>{(async()=>{n&&(v?null==a||a():(f||o||(h(!0),null==x||x(),await E(),null==u||u(),h(!1)),j(!1)),s())})()},[n,v,E]),{onChangeVote:C,setShowLoader:h,setAdCanceled:j,showLoader:p,onShowAd:A,isModalOpen:_,setIsModalOpen:T}}},46558:(e,t,n)=>{n.d(t,{_7:()=>j._7,NT:()=>f.NT,w:()=>x.w,il:()=>f.il,dT:()=>f.dT,Ej:()=>f.Ej,mR:()=>x.m,o3:()=>f.o3,d4:()=>d.d4,Iz:()=>d.Iz,mt:()=>d.mt,T8:()=>d.T8,Q3:()=>d.Q3,bZ:()=>d.bZ,kS:()=>d.kS,wH:()=>g.wH,a8:()=>i.a8,$d:()=>i.$d,E0:()=>m,sr:()=>o.s,Wi:()=>h,Nv:()=>v,tV:()=>r.t,CU:()=>c});var i=n(34999),o=n(21207),l=n(74853);n(27986);var r=n(5943),s=n(16503),a=n(95084),d=n(8861);function c(e){let{voteType:t,isDailyBonus:n,eventId:i,location:o}=e,l=(0,d.K$)(t,n),r=(0,d.mt)(t)||"";return{impressionRef:(0,s.e)(()=>{l&&(0,a.M_)({type:l,id:i,position:r,location:o})},{sendInterval:3e4}),logOnEventVote:()=>{l&&(0,a.Tc)({id:i,type:l,position:r,location:o})}}}var u=n(67087),x=n(20455);function v(e){if(!(0,u.g3)())return e;let{position:t,...n}=e;return{...n,position:{[x.m.Left]:t[x.m.Right],[x.m.Middle]:t[x.m.Middle],[x.m.Right]:t[x.m.Left]}}}var p=n(14831);function h(e,t){let{userVote:n}=(0,r.t)(e,t),{hasNotStarted:i}=(0,l.N)(e);return i&&!(0,p.ux)(e)&&!n}function m(e,t){let{hasNotStarted:n}=(0,l.N)(e);return n?t?"vote":"change_vote":"voting_ended"}var f=n(55462),j=n(2294),g=n(26457)},47815:(e,t,n)=>{n.d(t,{A:()=>i});let i=function(e){switch(!0){case e<1e3:return"".concat(e);case e<1e4&&e/1e3%1>=.1:let t="".concat((e/1e3).toPrecision(2));return t.endsWith(".0")&&(t=t.substring(0,t.length-2)),"".concat(t,"k");case e<1e6:let n=Math.round(e/1e3);if(1e3===n)return"1M";return"".concat(n,"k");case e<1e7:let i=(e/1e5).toFixed();return i=i.endsWith("0")?i.substring(0,i.length-1):"".concat(i[0],".").concat(i[1]),"".concat(i,"M");case e<1e8:return"".concat(Math.round(e/1e6),"M");case e<1e9:let o=Math.round(e/1e6);if(1e3===o)return"1B";return"".concat(o,"M");default:return"".concat(e)}}},61394:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6029),o=n(46787),l=n(67004),r=n(46558);function s(e){let{location:t,voteType:n,isDailyBonus:s,enableVoteChange:a}=e,d=(0,r.Nv)(r.o3),c=(0,r.Nv)(r.NT),u=(0,r.Nv)(r.dT);switch(n){case o.rjx.WhoWillWin:return(0,i.jsx)(l.A,{config:d,voteType:o.rjx.WhoWillWin,eventVoteLocation:t,isDailyBonus:s,enableVoteChange:a});case o.rjx.WillBothTeamsScore:return(0,i.jsx)(l.A,{config:c,voteType:o.rjx.WillBothTeamsScore,eventVoteLocation:t,isDailyBonus:s,enableVoteChange:a});case o.rjx.FirstTeamToScore:return(0,i.jsx)(l.A,{config:u,voteType:o.rjx.FirstTeamToScore,eventVoteLocation:t,isDailyBonus:s,enableVoteChange:a});default:return null}}},66022:(e,t,n)=>{n.d(t,{A:()=>f});var i=n(6029),o=n(51569),l=n(20325),r=n(81278),s=n(55729),a=n(46222),d=n(69352),c=n(74610),u=n(26380),x=n(43072);let v=e=>{let{children:t,onViewportEnter:n}=e,[o,r]=(0,x.Wx)({trackVisibility:!0,threshold:.7,delay:100});return(0,s.useEffect)(()=>{r&&(null==n||n())},[r]),(0,i.jsx)(l.az,{ref:o,flex:"[0 0 100%]",scrollSnapAlign:"start",scrollSnapStop:"always",p:"xs",children:t})};var p=n(46558),h=n(22244),m=n(61394);function f(e){let{event:t}=e,n=(0,r.useRouter)(),u=e.event.tournament.category.sport.slug,x=p.Ej[u]||p.il,[h,m]=(0,s.useState)(0),[f,g]=(0,s.useState)(void 0),y=(0,s.useRef)(null),[b,_]=(0,s.useState)(!1),{textDirection:T}=(0,o.$c)(),w=e=>{m(e),y.current&&y.current.scrollTo({left:e*y.current.offsetWidth*("rtl"===T?-1:1),behavior:"smooth"})};return((0,s.useEffect)(()=>{if(n.query.voteType){let e=x.findIndex(e=>"".concat(e)===n.query.voteType);e>0&&(_(!0),w(e))}else m(0);g(t.id)},[t.id]),f!==t.id)?(0,i.jsxs)(l.az,{children:[(0,i.jsx)(a.Zp,{children:(0,i.jsx)(l.az,{h:"[120px]"})}),x.length>1&&(0,i.jsx)(l.az,{h:{base:"lg",md:"2xl"}})]}):0===x.length||t.awayTeam.disabled||t.homeTeam.disabled?null:(0,i.jsx)(c.t,{tag:"EventVotes",children:(0,i.jsxs)(l.az,{m:"-xs",children:[(0,i.jsx)(l.so,{ref:y,align:"center",overflowX:"scroll",scrollSnapType:"[x mandatory]",gap:"sm",scrollbar:"hidden",onScrollEnd:()=>{_(!1)},mb:"-xs",children:x.map((t,n)=>(0,i.jsx)(v,{onViewportEnter:()=>{b||h===n||m(n)},children:(0,i.jsx)(j,{activeVoteType:t,...e})},t))}),(0,i.jsx)(l.az,{px:"xs",pb:"xs",children:(0,i.jsx)(d.M,{activeIndex:h,setActiveIndex:e=>{_(!0),w(e)},goToNext:()=>w(h+1),goToPrevious:()=>w(h-1),slideCount:x.length,hideForSingleItem:!0,infinite:!1})})]})})}function j(e){let{event:t,placement:n,activeVoteType:o}=e,r=(0,p.T8)(n),d=(0,p.Wi)(t,o),[c,x]=(0,s.useState)(!1),[v,f]=(0,s.useState)(!1),{autoShowAd:j,canEditVote:g,grantReward:y,hasRevisitedChangeVote:b,setAutoShowAd:_}=(0,p.a8)(t,o,c,x,f),{isModalOpen:T,onChangeVote:w,onShowAd:E,setAdCanceled:S,setIsModalOpen:A,setShowLoader:C,showLoader:k}=(0,p.$d)(t.id,n,j,b,o,()=>_(!1),()=>{y(),C(!1)}),R=(0,p.E0)(t,d||v);return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(a.Zp,{children:[(0,i.jsx)(l.az,{p:"lg",pb:"sm",children:(0,i.jsx)(u.B,{voteType:o,isVotingClosed:"voting_ended"===R,canUserVote:"vote"===R,canUserChangeVote:"change_vote"===R,changeVoteButton:(g||b)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(h.A,{onChangeVote:w,onChangeVoteClose:()=>A(!1),onChangeVoteContinue:E,isModalOpen:T,isLoaderOpen:k,onLoaderExit:()=>{C(!1),S(!0)}}),(0,i.jsx)(l.cG,{h:"[18px]",color:"neutrals.nLv4",orientation:"vertical",borderInlineEndStyle:"solid"})]}),location:"event_details"})}),(0,i.jsx)(l.az,{p:"lg",pt:"sm",children:(0,i.jsx)(m.A,{location:r,voteType:o,enableVoteChange:c})})]})})}},67004:(e,t,n)=>{n.d(t,{A:()=>R});var i=n(6029),o=n(46787),l=n(20325),r=n(55729),s=n(494),a=n(18970),d=n(14831),c=n(15341),u=n(33144),x=n(51569),v=n(62042),p=n(90248),h=n(52466),m=n(24045),f=n(90808),j=n(94565),g=n(41735),y=n(79261),b=n(46558);let _=(0,g.keyframes)(["from{left:50%;transform:translateX(-50%);}to{left:0;}"]),T=(0,g.default)(j.so).withConfig({componentId:"sc-ace7c0c8-0"})(["position:absolute;",""],e=>{let{buttonState:t}=e;return t===b.w.NoAnimation?(0,g.css)(["left:0;"]):t===b.w.Transform?(0,g.css)(["animation:"," 0.35s ease-out forwards;"],_):null}),w=(0,g.default)(j.az).withConfig({componentId:"sc-ace7c0c8-1"})(["position:absolute;right:0;",""],e=>{let{buttonState:t}=e;return t===b.w.NoAnimation?(0,g.css)(["opacity:1;"]):t===b.w.Transform?(0,g.css)(["opacity:0;animation:"," 0.2s 0.35s ease-in forwards;"],y.qG):(0,g.css)(["opacity:0;"])});function E(e){var t;let{isSelected:n,...r}=e,{percentage:a,team:d,buttonPositionType:c,isVotingEnabled:v,voteConfig:j,animate:g}=r,y=(0,s.d4)(f.xl),_=j.position[c],E=(0,b.Iz)(v,g),S=null==d?void 0:d.sport.slug,A=(null==d||null==(t=d.subTeams)?void 0:t.length)===2&&S===o.QCR.Tennis,C=j.isTranslated&&(null==_?void 0:_.text),k=y&&(null==_?void 0:_.inverseTeamsText);return(0,i.jsxs)(l.so,{position:"relative",w:"100%",align:"center",justify:"center",h:"xl",children:[(0,i.jsx)(T,{buttonState:E,align:"center",children:A&&(null==d?void 0:d.subTeams)?(0,i.jsx)(m.K,{size:24,sport:S,teams:d.subTeams,hideFlags:!0,ignoreLink:!0}):d?(0,i.jsx)(u.p,{size:24,id:d.id,name:d.name}):(null==_?void 0:_.voteOption)===o.gbi.NoGoal?(0,i.jsx)(h.U7g,{color:"neutrals.nLv1"}):(0,i.jsx)(x.EY,{textStyle:"display.micro",color:n?"primary.default":"neutrals.nLv1",mt:"[1px]",textTransform:"uppercase",children:C?(0,i.jsx)(p.A,{id:_.text}):k?(0,i.jsx)(i.Fragment,{children:_.inverseTeamsText}):(0,i.jsx)(i.Fragment,{children:null==_?void 0:_.text})})}),!v&&(0,i.jsx)(w,{buttonState:E,children:(0,i.jsxs)(x.EY,{display:"block",textStyle:"display.small",color:n?"primary.default":"neutrals.nLv1",children:[null!=a?a:0,"%"]})})]})}function S(e){let{isVotingEnabled:t,votedPositionType:n,voteConfig:o,buttonPositionType:l,isChangeVoteActive:r,onVote:s,secondary:a}=e,d=!r&&void 0!==n&&n===l,c=(0,v.AH)({display:"flex",alignItems:"center",justifyContent:"center",px:"lg",py:"xs",w:"100%",br:"[32px]",bg:d?"primary.highlight":a?"surface.s2":"surface.s1",border:"1px solid",borderColor:t||d?"primary.default":"neutrals.nLv4",_hover:{bg:t?"primary.highlight":void 0},cursor:t?"pointer":"default",userSelect:"none"});return t?(0,i.jsx)("button",{className:c,onClick:()=>{if(t){var e;let t=null==(e=o.position[l])?void 0:e.voteOption;t&&s(t,l)}},children:(0,i.jsx)(E,{isSelected:d,...e})}):(0,i.jsx)("div",{className:c,children:(0,i.jsx)(E,{isSelected:d,...e})})}var A=n(88393),C=n(34999),k=n(83522);function R(e){var t,n;let{isDailyBonus:u,eventVoteLocation:x,voteType:v,config:p,enableVoteChange:h}=e,m=(0,s.wA)(),{event:f,leftTeam:j,rightTeam:g}=(0,r.useContext)(a.y$),{userVote:y}=(0,b.tV)(f,v),_=(0,C.dV)(f.id,v),{eventVotes:T,data:w,isLoading:E,mutate:R}=(0,b.sr)(f,v),{handleChangeVote:W}=(0,C.NC)(v,p),[M,V]=(0,c.A)(A.e1,!1),[I,D]=(0,r.useState)(!1),N=(0,b.bZ)(f),O=(0,b.d4)(p,y),L=_&&h,F=N&&!(0,d.ux)(f)&&!y||L;(0,r.useEffect)(()=>{D(!1)},[v]);let{impressionRef:P,logOnEventVote:z}=(0,b.CU)({voteType:v,isDailyBonus:u,eventId:f.id,location:x}),B={voteConfig:p,votedPositionType:O,isVotingEnabled:F,isChangeVoteActive:L,animate:I,onVote:(e,t)=>{D(!0),_&&h?(W(e,t),m((0,k.eM)({eventId:f.id,type:v,vote:e,oldVote:y,isDailyBonus:u}))):((0,b.kS)(w,R,p,t),m((0,k.eM)({eventId:f.id,type:v,vote:e,isDailyBonus:u})),m((0,k.sP)({eventId:f.id,type:v,vote:e}))),z(),u&&V(!0)},secondary:"event_details"===x},$=T.voteMiddle.isAvailable&&!!p.position[b.mR.Middle],K=T.voteLeft.isAvailable&&!!p.position[b.mR.Left],G=T.voteRight.isAvailable&&!!p.position[b.mR.Right],Q=(null==(t=p.position[b.mR.Left])?void 0:t.voteOption)===o.gbi.One,Z=(null==(n=p.position[b.mR.Right])?void 0:n.voteOption)===o.gbi.Two;return E?(0,i.jsx)(l.az,{h:"2xl"}):(0,i.jsxs)(l.so,{ref:P,justify:"center",gap:"sm",children:[K&&(0,i.jsx)(S,{buttonPositionType:b.mR.Left,percentage:T[b.mR.Left].percentage,team:Q?j:void 0,...B}),$&&(0,i.jsx)(S,{buttonPositionType:b.mR.Middle,percentage:T[b.mR.Middle].percentage,...B}),G&&(0,i.jsx)(S,{buttonPositionType:b.mR.Right,percentage:T[b.mR.Right].percentage,team:Z?g:void 0,...B})]})}},69352:(e,t,n)=>{n.d(t,{M:()=>a});var i=n(6029),o=n(51569),l=n(20325),r=n(90248),s=n(52466);let a=e=>{let{activeIndex:t,setActiveIndex:n,slideCount:a,goToPrevious:d,goToNext:c,onPageClick:u,infinite:x=!0,hideForSingleItem:v=!1}=e;if(v&&a<=1)return null;let p=1===a,h=p||0===t&&!x,m=p||t===a-1&&!x;return(0,i.jsxs)(l.so,{justify:{base:"center",md:"space-between"},align:"center",gap:"sm",pt:"sm",children:[(0,i.jsx)(l.so,{w:"[0]",flexGrow:1,children:(0,i.jsxs)(o.$n,{display:{mdDown:"none"},size:"tertiary",variant:"clear",onClick:d,disabled:h,ps:"0",children:[(0,i.jsx)(s.pa2,{}),(0,i.jsx)(r.A,{id:"previous"})]})}),(0,i.jsx)(l.so,{gap:"sm",w:"[0]",flexGrow:1,justify:"center",children:Array.from({length:a}).map((e,o)=>{let r=()=>{n(o),null==u||u()};return(0,i.jsx)(l.az,{w:"sm",h:"sm",transitionProperty:"background-color",transitionDuration:"normal",transitionTimingFunction:"ease-in-out",backgroundColor:o===t?"primary.default":"primary.highlight",br:"50%",cursor:"pointer",onKeyDown:e=>{"Enter"===e.key&&r()},onClick:r,tabIndex:0,_focusVisible:{outline:"2px solid",outlineColor:"primary.highlight"},role:"button","aria-label":"Slide number ".concat(o+1),"aria-hidden":o!==t},o)})}),(0,i.jsx)(l.so,{w:"[0]",flexGrow:1,justify:"end",children:(0,i.jsxs)(o.$n,{display:{mdDown:"none"},size:"tertiary",variant:"clear",onClick:c,disabled:m,pe:"0",children:[(0,i.jsx)(r.A,{id:"next"}),(0,i.jsx)(s.CCT,{})]})})]})}},74853:(e,t,n)=>{n.d(t,{N:()=>l});var i=n(55729),o=n(8861);let l=e=>{let[t,n]=(0,i.useState)((0,o.bZ)(e));return(0,i.useEffect)(()=>{let t=setInterval(()=>{n((0,o.bZ)(e))},1e3);return()=>{clearInterval(t)}},[]),{hasNotStarted:t}}},88393:(e,t,n)=>{n.d(t,{e1:()=>l,sJ:()=>o,u_:()=>i});let i=[n(46787).QCR.Football],o=["IT","US"],l="has-voted-daily-10x"}}]);