!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]="8ef3ed9d-4a1c-4138-b785-821c49341007",e._sentryDebugIdIdentifier="sentry-dbid-8ef3ed9d-4a1c-4138-b785-821c49341007")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[66022],{2294:(e,t,n)=>{n.d(t,{Qf:()=>r,_7:()=>l,fw:()=>o});var i=n(46787);let l={[i.rjx.WhoWillWin]:"who_will_win",[i.rjx.WillBothTeamsScore]:"will_both_teams_score",[i.rjx.FirstTeamToScore]:"first_team_to_score"},o={[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),l=n(2294),o=n(26457),r=n(27379);let s=(e,t)=>{var n,s,a;let d=(0,i.d4)(o.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],m=null==p?void 0:p.current,h=null==p?void 0:p.prev;return{userVote:(null==v?void 0:v.votes[l.Qf[t]])||m,oldVote:h,eventFuturePrediction:v,userFuturePredictions:c,areFuturePredictionsLoading:u,mutateFuturePredictions:x}}},8861:(e,t,n)=>{n.d(t,{Iz:()=>g,K$:()=>v,Q3:()=>c,T8:()=>x,bZ:()=>m,d4:()=>h,do:()=>u,kS:()=>f,mK:()=>d,mt:()=>p});var i=n(46787),l=n(52763),o=n(89827),r=n(55462),s=n(20455),a=n(2294);let d=(e,t,n)=>{let i=(e||0)+(t||0)+(n||0),l=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,o.M)(l)),d=parseFloat((0,o.M)(r)),c=parseFloat((0,o.M)(s)),u=100-(a+d+c);if(0!==u){let e=l%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=>[l.Mx.DesktopEventPage,l.Mx.MobileEventPage].includes(e)?"event_details":e===l.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}},m=e=>1e3*e.startTimestamp>Date.now()&&e.status.type===i.XUj.NotStarted;function h(e,t){return Object.values(s.m).find(n=>{var i,l;return(null==e||null==(l=e.position)||null==(i=l[n])?void 0:i.voteOption)===t})}function f(e,t,n,l,o){var r,a;let d=n.voteModelKey,c=null==(r=n.position[l])?void 0:r.voteApiKey,u=o?(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}})(o):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],l=n[x],o=c in n?v?i:i+1:1,r=x&&x in n?v?l:l-1:0;t({...e,[d]:{...e[d],[c]:o,...x&&{[x]:r}}},{revalidate:!1,populateCache:!0})}}function g(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),l=n(10174),o=n(76356),r=n(90248);let s=e=>{let{close:t}=e;return(0,i.jsx)(l.aF,{isOpen:!0,onClose:t,children:(0,i.jsxs)(o.az,{w:"[312px]",bg:"surface.s1",p:"lg",br:"lg",elevation:"3",mx:"auto",children:[(0,i.jsx)(l.EY,{textStyle:"display.large",mb:"sm",display:"block",children:(0,i.jsx)(r.A,{id:"oops_ads_blocked"})}),(0,i.jsx)(l.EY,{textStyle:"body.medium",display:"block",children:(0,i.jsx)(r.A,{id:"change_vote_adblocker_body"})}),(0,i.jsx)(o.so,{justify:"flex-end",mt:"xl",gap:"lg",children:(0,i.jsx)(l.$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),l=n(45860);function o(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,l.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],m=x[s.m.Middle],h=v[s.m.Right],f=o(n,u),g=o(f,null==p?void 0:p.voteApiKey),j=o(f,null==m?void 0:m.voteApiKey),y=o(f,null==h?void 0:h.voteApiKey),b=(!g||g<0?0:g)+(!y||y<0?0:y)+(!j||j<0?0:j),{leftPercentage:_,middlePercentage:T,rightPercentage:w}=(0,a.mK)(g,j,y);return{data:n,isLoading:d,mutate:c,totalVotes:b,eventVotes:{[s.m.Left]:{isAvailable:"number"==typeof g,count:g,percentage:_},[s.m.Middle]:{isAvailable:"number"==typeof j,count:j,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),l=n(10174),o=n(76356),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:o,onClose:r}=e,a=(0,x.useTheme)();return((0,l.NF)(n),"undefined"==typeof document)?null:(0,i.jsx)(d.ZL,{id:o,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 m=n(12593),h=n(44224);function f(e){let{onChangeVote:t,onChangeVoteContinue:n,onChangeVoteClose:d,isModalOpen:c,isLoaderOpen:u,onLoaderExit:x}=e,{hasAdBlock:v}=(0,h.j)(),[f,g]=(0,r.useState)(!1);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p,{isOpen:u,onClose:x,isCancelable:!0}),(0,i.jsx)(l.$n,{variant:"clear",size:"primary",px:"sm",onClick:v?()=>g(!0):t,children:(0,i.jsx)(a.GI1,{fill:"primary.default"})}),f&&(0,i.jsx)(m.Q,{close:()=>g(!1)}),(0,i.jsx)(l.aF,{isOpen:c,children:(0,i.jsxs)(o.az,{w:"[312px]",bg:"surface.s1",p:"lg",br:"lg",elevation:"3",mx:"auto",children:[(0,i.jsx)(l.EY,{textStyle:"display.large",mb:"sm",display:"block",children:(0,i.jsx)(s.A,{id:"profile.changeVoteTooltipDescription"})}),(0,i.jsx)(l.EY,{textStyle:"body.medium",display:"block",children:(0,i.jsx)(s.A,{id:"change_vote_watch_ad"})}),(0,i.jsxs)(o.so,{justify:"flex-end",mt:"xl",gap:"lg",children:[(0,i.jsx)(l.$n,{variant:"clear",onClick:d,children:(0,i.jsx)(s.A,{id:"close_window_button"})}),(0,i.jsx)(l.$n,{onClick:n,children:(0,i.jsx)(s.A,{id:"basic.continue"})})]})]})})]})}},26380:(e,t,n)=>{n.d(t,{B:()=>h});var i=n(6029),l=n(10174),o=n(76356),r=n(55729),s=n(90248),a=n(18970),d=n(28576),c=n(47815),u=n(52466),x=n(64006),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)(l.$n,{variant:"clear",px:"sm",children:(0,i.jsx)(u.wDv,{fill:"primary.default",h:24,w:24})})})};var m=n(46558);let h=e=>{let{voteType:t,canUserVote:n,canUserChangeVote:u,isVotingClosed:x,changeVoteButton:v,location:h}=e,{event:f}=(0,r.useContext)(a.y$),{totalVotes:g,isLoading:j}=(0,m.sr)(f,t);return(0,i.jsxs)(o.so,{justify:"space-between",align:"center",children:[(0,i.jsxs)(o.BJ,{gap:"2xs",children:[(0,i.jsx)(l.EY,{textStyle:"display.medium",children:(0,i.jsx)(s.A,{id:d.k[t]})}),j?(0,i.jsx)(o.az,{h:"lg"}):n?(0,i.jsx)(l.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,i.jsx)(s.A,{id:"cast_your_vote"})}):u||x?(0,i.jsxs)(l.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:[(0,i.jsx)(s.A,{id:"prediction_total_votes"}),": ",(0,c.A)(g)]}):null]}),(0,i.jsxs)(o.so,{align:"center",gap:"2xs",children:[v,(0,i.jsx)(p,{location:h})]})]})}},27379:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(46787),l=n(22375),o=n(494),r=n(45860),s=n(22116);let a=()=>{let e=(0,o.d4)(s.$F);return(0,r.Ay)((null==e?void 0:e.id)?i.VfS.futurePredictions(e.id):null,{dedupingInterval:l.dp})}},27986:(e,t,n)=>{n.d(t,{a:()=>o});var i=n(67087),l=n(20455);function o(e,t){return(0,i.g3)(e)?{...t,[l.m.Left]:t[l.m.Right],[l.m.Right]:t[l.m.Left]}:t}},28576:(e,t,n)=>{n.d(t,{A:()=>l,k:()=>o});var i=n(46787);let l=48,o={[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:()=>g,$d:()=>_,dV:()=>p,NC:()=>x});var i=n(55729),l=n(494),o=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,l.wA)(),{event:x}=(0,i.useContext)(o.y$),{data:v,mutate:p}=(0,c.s)(x,e),{userVote:m,oldVote:h,userFuturePredictions:f,eventFuturePrediction:g,mutateFuturePredictions:j}=(0,u.t)(x,e);return{handleChangeVote:(i,l)=>{var o,c;let u;n((u={eventId:x.id,voteType:e},{type:s.UG.REMOVE_CHANGED_VOTE,payload:u})),o=i,c=l,(0,d.kS)(v,p,t,c,m),(null==f?void 0:f.predictions)&&(null==g?void 0:g.votes)!==void 0&&(g.votes={...g.votes,[r.Qf[e]]:o},j({predictions:[...f.predictions.filter(e=>e.eventId!==x.id),g]},!1)),h||n((0,a.sP)({eventId:x.id,type:e,vote:i}))}}};var v=n(26457);let p=(e,t)=>!!(0,l.d4)(v.am).find(n=>{var i;return n.eventId===e&&(null==(i=n.voteTypes[t])?void 0:i.isChangeVoteRewarded)});var m=n(81278),h=n(95084),f=n(74853);let g=(e,t,n,o,a)=>{let d=(0,l.wA)(),c=(0,m.useRouter)(),x=p(e.id,t),{userVote:v}=(0,u.t)(e,t),{hasNotStarted:g}=(0,f.N)(e),[j,y]=(0,i.useState)(!1),b=(0,i.useRef)(t);b.current=t;let _=g&&!n&&x,T=g&&!x&&!!v;(0,i.useEffect)(()=>{y("true"===c.query.editVote&&c.query.voteType==="".concat(t))},[]),(0,i.useEffect)(()=>{o(!1)},[t]),(0,i.useEffect)(()=>{a(n&&x)},[n,x]);let w=(0,i.useCallback)(()=>{let t;o(!0);let n=b.current;d((t={eventId:e.id,voteType:n},{type:s.UG.ADD_CHANGED_VOTE,payload:t})),j?(0,h.ke)({action:"reward",location:"user_profile",type:r.fw[n]}):(0,h.ke)({action:"reward",location:"event_details",type:r._7[n]})},[e.id,t]);return{hasRevisitedChangeVote:_,canEditVote:T,autoShowAd:j,setAutoShowAd:y,grantReward:w}};var j=n(52763),y=n(44224);let b={[j.Mx.DesktopEventPage]:j.Rj.REWARDED_DESKTOP_VOTE_EVENT,[j.Mx.DesktopProfilePage]:j.Rj.REWARDED_DESKTOP_VOTE_PROFILE,[j.Mx.MobileEventPage]:j.Rj.REWARDED_MOBILE_VOTE_EVENT,[j.Mx.MobileProfilePage]:j.Rj.REWARDED_MOBILE_VOTE_PROFILE,[j.Mx.DesktopWidget]:j.Rj.REWARDED_DESKTOP_VOTE_WIDGET,[j.Mx.DesktopFeaturedMatch]:j.Rj.REWARDED_DESKTOP_VOTE_FEATURED_MATCH},_=(e,t,n,l,o,s,a,c,u,x)=>{let{hasAdBlock:v}=(0,y.j)(),[p,m]=(0,i.useState)(!1),[f,g]=(0,i.useState)(!1),[_,T]=(0,i.useState)(!1),w=j.BP.find(e=>e.id===b[t]),{showRewardedAd:E,isEnabled:S}=(0,j.NL)(w.Google,a,c),A=(0,i.useCallback)(async n=>{n.preventDefault(),n.stopPropagation(),(0,h.tN)({type:r._7[o],position:(0,d.mt)(o)||"",location:(0,d.T8)(t),id:e}),T(!1),m(!0),null==x||x(),await E(),null==u||u(),m(!1)},[E,l,o]),C=(0,i.useCallback)(()=>{if(l||!S){null==a||a(),null==u||u();return}T(!0)},[l,S,a]);return(0,i.useEffect)(()=>{(async()=>{n&&(v?null==a||a():(f||l||(m(!0),null==x||x(),await E(),null==u||u(),m(!1)),g(!1)),s())})()},[n,v,E]),{onChangeVote:C,setShowLoader:m,setAdCanceled:g,showLoader:p,onShowAd:A,isModalOpen:_,setIsModalOpen:T}}},46558:(e,t,n)=>{n.d(t,{_7:()=>g._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:()=>j.wH,a8:()=>i.a8,$d:()=>i.$d,E0:()=>h,sr:()=>l.s,Wi:()=>m,Nv:()=>v,tV:()=>r.t,CU:()=>c});var i=n(34999),l=n(21207),o=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:l}=e,o=(0,d.K$)(t,n),r=(0,d.mt)(t)||"";return{impressionRef:(0,s.e)(()=>{o&&(0,a.M_)({type:o,id:i,position:r,location:l})},{sendInterval:3e4}),logOnEventVote:()=>{o&&(0,a.Tc)({id:i,type:o,position:r,location:l})}}}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 m(e,t){let{userVote:n}=(0,r.t)(e,t),{hasNotStarted:i}=(0,o.N)(e);return i&&!(0,p.ux)(e)&&!n}function h(e,t){let{hasNotStarted:n}=(0,o.N)(e);return n?t?"vote":"change_vote":"voting_ended"}var f=n(55462),g=n(2294),j=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 l=Math.round(e/1e6);if(1e3===l)return"1B";return"".concat(l,"M");default:return"".concat(e)}}},61394:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6029),l=n(46787),o=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 l.rjx.WhoWillWin:return(0,i.jsx)(o.A,{config:d,voteType:l.rjx.WhoWillWin,eventVoteLocation:t,isDailyBonus:s,enableVoteChange:a});case l.rjx.WillBothTeamsScore:return(0,i.jsx)(o.A,{config:c,voteType:l.rjx.WillBothTeamsScore,eventVoteLocation:t,isDailyBonus:s,enableVoteChange:a});case l.rjx.FirstTeamToScore:return(0,i.jsx)(o.A,{config:u,voteType:l.rjx.FirstTeamToScore,eventVoteLocation:t,isDailyBonus:s,enableVoteChange:a});default:return null}}},66022:(e,t,n)=>{n.d(t,{A:()=>f});var i=n(6029),l=n(10174),o=n(76356),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,[l,r]=(0,x.Wx)({trackVisibility:!0,threshold:.7,delay:100});return(0,s.useEffect)(()=>{r&&(null==n||n())},[r]),(0,i.jsx)(o.az,{ref:l,flex:"[0 0 100%]",scrollSnapAlign:"start",scrollSnapStop:"always",p:"xs",children:t})};var p=n(46558),m=n(22244),h=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,[m,h]=(0,s.useState)(0),[f,j]=(0,s.useState)(void 0),y=(0,s.useRef)(null),[b,_]=(0,s.useState)(!1),{textDirection:T}=(0,l.$c)(),w=e=>{h(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 h(0);j(t.id)},[t.id]),f!==t.id)?(0,i.jsxs)(o.az,{children:[(0,i.jsx)(a.Zp,{children:(0,i.jsx)(o.az,{h:"[120px]"})}),x.length>1&&(0,i.jsx)(o.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)(o.az,{m:"-xs",children:[(0,i.jsx)(o.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||m===n||h(n)},children:(0,i.jsx)(g,{activeVoteType:t,...e})},t))}),(0,i.jsx)(o.az,{px:"xs",pb:"xs",children:(0,i.jsx)(d.M,{activeIndex:m,setActiveIndex:e=>{_(!0),w(e)},goToNext:()=>w(m+1),goToPrevious:()=>w(m-1),slideCount:x.length,hideForSingleItem:!0,infinite:!1})})]})})}function g(e){let{event:t,placement:n,activeVoteType:l}=e,r=(0,p.T8)(n),d=(0,p.Wi)(t,l),[c,x]=(0,s.useState)(!1),[v,f]=(0,s.useState)(!1),{autoShowAd:g,canEditVote:j,grantReward:y,hasRevisitedChangeVote:b,setAutoShowAd:_}=(0,p.a8)(t,l,c,x,f),{isModalOpen:T,onChangeVote:w,onShowAd:E,setAdCanceled:S,setIsModalOpen:A,setShowLoader:C,showLoader:k}=(0,p.$d)(t.id,n,g,b,l,()=>_(!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)(o.az,{p:"lg",pb:"sm",children:(0,i.jsx)(u.B,{voteType:l,isVotingClosed:"voting_ended"===R,canUserVote:"vote"===R,canUserChangeVote:"change_vote"===R,changeVoteButton:(j||b)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(m.A,{onChangeVote:w,onChangeVoteClose:()=>A(!1),onChangeVoteContinue:E,isModalOpen:T,isLoaderOpen:k,onLoaderExit:()=>{C(!1),S(!0)}}),(0,i.jsx)(o.cG,{h:"[18px]",color:"neutrals.nLv4",orientation:"vertical",borderInlineEndStyle:"solid"})]}),location:"event_details"})}),(0,i.jsx)(o.az,{p:"lg",pt:"sm",children:(0,i.jsx)(h.A,{location:r,voteType:l,enableVoteChange:c})})]})})}},67004:(e,t,n)=>{n.d(t,{A:()=>R});var i=n(6029),l=n(46787),o=n(76356),r=n(55729),s=n(494),a=n(18970),d=n(14831),c=n(15341),u=n(33144),x=n(10174),v=n(62042),p=n(90248),m=n(52466),h=n(24045),f=n(90808),g=n(94565),j=n(41735),y=n(79261),b=n(46558);let _=(0,j.keyframes)(["from{left:50%;transform:translateX(-50%);}to{left:0;}"]),T=(0,j.default)(g.so).withConfig({componentId:"sc-ace7c0c8-0"})(["position:absolute;",""],e=>{let{buttonState:t}=e;return t===b.w.NoAnimation?(0,j.css)(["left:0;"]):t===b.w.Transform?(0,j.css)(["animation:"," 0.35s ease-out forwards;"],_):null}),w=(0,j.default)(g.az).withConfig({componentId:"sc-ace7c0c8-1"})(["position:absolute;right:0;",""],e=>{let{buttonState:t}=e;return t===b.w.NoAnimation?(0,j.css)(["opacity:1;"]):t===b.w.Transform?(0,j.css)(["opacity:0;animation:"," 0.2s 0.35s ease-in forwards;"],y.qG):(0,j.css)(["opacity:0;"])});function E(e){var t;let{isSelected:n,...r}=e,{percentage:a,team:d,buttonPositionType:c,isVotingEnabled:v,voteConfig:g,animate:j}=r,y=(0,s.d4)(f.xl),_=g.position[c],E=(0,b.Iz)(v,j),S=null==d?void 0:d.sport.slug,A=(null==d||null==(t=d.subTeams)?void 0:t.length)===2&&S===l.QCR.Tennis,C=g.isTranslated&&(null==_?void 0:_.text),k=y&&(null==_?void 0:_.inverseTeamsText);return(0,i.jsxs)(o.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)(h.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)===l.gbi.NoGoal?(0,i.jsx)(m.U7g,{fill:"onSurface.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:l,buttonPositionType:o,isChangeVoteActive:r,onVote:s,secondary:a}=e,d=!r&&void 0!==n&&n===o,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=l.position[o])?void 0:e.voteOption;t&&s(t,o)}},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:m}=e,h=(0,s.wA)(),{event:f,leftTeam:g,rightTeam:j}=(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=_&&m,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),_&&m?(W(e,t),h((0,k.eM)({eventId:f.id,type:v,vote:e,oldVote:y,isDailyBonus:u}))):((0,b.kS)(w,R,p,t),h((0,k.eM)({eventId:f.id,type:v,vote:e,isDailyBonus:u})),h((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],Q=T.voteRight.isAvailable&&!!p.position[b.mR.Right],Z=(null==(t=p.position[b.mR.Left])?void 0:t.voteOption)===l.gbi.One,G=(null==(n=p.position[b.mR.Right])?void 0:n.voteOption)===l.gbi.Two;return E?(0,i.jsx)(o.az,{h:"2xl"}):(0,i.jsxs)(o.so,{ref:P,justify:"center",gap:"sm",children:[K&&(0,i.jsx)(S,{buttonPositionType:b.mR.Left,percentage:T[b.mR.Left].percentage,team:Z?g:void 0,...B}),$&&(0,i.jsx)(S,{buttonPositionType:b.mR.Middle,percentage:T[b.mR.Middle].percentage,...B}),Q&&(0,i.jsx)(S,{buttonPositionType:b.mR.Right,percentage:T[b.mR.Right].percentage,team:G?j:void 0,...B})]})}},69352:(e,t,n)=>{n.d(t,{M:()=>a});var i=n(6029),l=n(10174),o=n(76356),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,m=p||0===t&&!x,h=p||t===a-1&&!x;return(0,i.jsxs)(o.so,{justify:{base:"center",md:"space-between"},align:"center",gap:"sm",pt:"sm",children:[(0,i.jsxs)(l.$n,{display:{mdDown:"none"},size:"tertiary",variant:"clear",onClick:d,disabled:m,children:[(0,i.jsx)(s.pa2,{}),(0,i.jsx)(r.A,{id:"previous"})]}),(0,i.jsx)(o.so,{gap:"sm",children:Array.from({length:a}).map((e,l)=>{let r=()=>{n(l),null==u||u()};return(0,i.jsx)(o.az,{w:"sm",h:"sm",transitionProperty:"background-color",transitionDuration:"normal",transitionTimingFunction:"ease-in-out",backgroundColor:l===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(l+1),"aria-hidden":l!==t},l)})}),(0,i.jsxs)(l.$n,{display:{mdDown:"none"},size:"tertiary",variant:"clear",onClick:c,disabled:h,children:[(0,i.jsx)(r.A,{id:"next"}),(0,i.jsx)(s.CCT,{})]})]})}},74853:(e,t,n)=>{n.d(t,{N:()=>o});var i=n(55729),l=n(8861);let o=e=>{let[t,n]=(0,i.useState)((0,l.bZ)(e));return(0,i.useEffect)(()=>{let t=setInterval(()=>{n((0,l.bZ)(e))},1e3);return()=>{clearInterval(t)}},[]),{hasNotStarted:t}}},88393:(e,t,n)=>{n.d(t,{e1:()=>o,sJ:()=>l,u_:()=>i});let i=[n(46787).QCR.Football],l=["IT","US"],o="has-voted-daily-10x"}}]);