!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]="6dde8fc9-e1ff-4305-a032-6420660ca964",e._sentryDebugIdIdentifier="sentry-dbid-6dde8fc9-e1ff-4305-a032-6420660ca964")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5563],{1440:(e,t,r)=>{r.d(t,{A:()=>i,q:()=>o});var n=r(6029),a=r(99064),l=r(55729),s=r(43072);let o=e=>{let{initialVisible:t=!1,defaultHeight:r=0,visibleOffset:o=1e3,persist:i=!1,loader:c,children:d,...u}=e,p={initialInView:t,rootMargin:"".concat(o,"px 0px ").concat(o,"px 0px")},[h,x,g]=(0,s.Wx)(p),f=(0,l.useRef)(t),m=(0,l.useRef)(r);(0,l.useEffect)(()=>{x&&!0!==f.current&&(f.current=!0),x&&m.current!==r&&(m.current=(null==g?void 0:g.boundingClientRect.height)||r)},[x,g]);let y=c||(m.current?(0,n.jsx)(a.az,{h:m.current}):null),j=x||i&&f.current;return(0,n.jsx)(a.az,{ref:h,...u,children:j?d:y})},i=o},18645:(e,t,r)=>{r.d(t,{eD:()=>l.e,pY:()=>a.p,tg:()=>n.t});var n=r(91407),a=r(91603),l=r(33480)},21295:(e,t,r)=>{r.d(t,{A:()=>T});var n=r(6029),a=r(21377),l=r(494),s=r(70116),o=r(73411),i=r(1300),c=r(61836),d=r(10794),u=r(28349),p=r(21501),h=r(76356),x=r(90248),g=r(18645);let f=e=>{let{entityId:t,entity:r}=e;switch(r){case a.bq7.MutedPlayers:return(0,n.jsx)(g.tg,{id:t,size:40});case a.bq7.MutedTeams:return(0,n.jsx)(g.pY,{id:t,size:40});case a.bq7.MutedTournaments:return(0,n.jsx)(g.eD,{id:t,size:40});default:return null}};var m=r(54409),y=r(70757),j=r(8973);let b=e=>{switch(e){case"player":return j.b.Player;case"team":return j.b.Team;case"tournament":return j.b.UniqueTournament;default:return}},_=e=>{let{id:t,entity:r,entityGroup:a,onClick:s}=e,o=(0,l.wA)(),i=b(a);return(0,n.jsx)(u.$n,{py:"sm",pr:"md",onClick:()=>{i&&(0,c.g2)({id:t,type:i,location:j.y.Popup,isFollowed:!0}),o((0,y.UQ)(r,t)),s()},children:(0,n.jsxs)(h.zt,{gap:"xs",children:[(0,n.jsx)(u.EY,{textStyle:"action.button.primary",color:"onColor.primary",children:(0,n.jsx)(x.A,{id:"button_favourite"})}),(0,n.jsx)(m.zQC,{icon:"follow-default",className:"follow-indicator-icon",width:"24",height:"24",fill:"onColor.primary"})]})})};var v=r(4967),w=r(55729),S=r(83260),k=r(62827);let A="follow.entity.popup.",z="".concat(A,"dontShowAgain");if(!(0,a.S$s)())try{let e=(0,k.yN)("".concat(A,"organization"));null!=e&&Object.values(e).some(e=>"number"==typeof e)&&(0,k.UI)("".concat(A,"organization"))}catch(e){console.error("Error reading from localStorage:",e)}let C=e=>{try{let t="".concat(A).concat(e);for(let e=0;e{switch(e){case"player":return"add_favorite_player";case"team":return"add_favorite_team";case"tournament":return"add_favorite_league";default:return""}},I=(e,t,r)=>{let n="".concat(A).concat(t),[a,s]=(0,S.A)(n,{}),[o,i]=(0,S.A)("".concat(n,"_queue"),[]),[d,u]=(0,w.useState)(!1),[p,h]=(0,w.useState)(!1),[x,g]=(0,S.A)("".concat(z,".").concat(t),!1),[f,m]=(0,S.A)("".concat(n,"_pausedUntil"),void 0),y=(0,l.d4)(t=>t.favorites.lists[e].includes(r)||t.favorites.lists.favoriteLeagues.includes(r));(0,w.useEffect)(()=>{d&&(0,c.Ex)({id:r,source:"other",type:q(t)})},[d]),(0,w.useEffect)(()=>{if(x||f&&Date.now()e!==r):[...o];e.push(r);let t=a[r]?{count:a[r].count+1,timestamp:Date.now()}:{count:1,timestamp:Date.now()};if(4===t.count){let{[r]:t,...n}=a;s(n),i(e.filter(e=>e!==r)),u(!0);return}if(e.length>20){let n=e.shift(),{[n]:l,...o}=a;s({...o,[r]:t})}else s({...a,[r]:t});i(e)},[r]);let j=()=>{u(!1);let{[r]:e,...n}=a;s(n),p||m(Date.now()+v.d_),C(t)},b=()=>{p&&g(!0),C(t)};return{isFollowed:y,isOpen:d,handleNoThanksClose:()=>{p&&b(),j(),(0,c.t9)({action:"close",choice:p?"no_show_again":"show_again",id:r,source:"other",type:q(t)})},handleClose:()=>{u(!1)},isDontShowAgainSelected:p,toggleIsDontShowAgainSelected:()=>{h(!p)}}},N=e=>{let{entityId:t,entityGroup:r,entity:a}=e,l=(0,p.hX)(),{isFollowed:s,isOpen:o,handleNoThanksClose:i,handleClose:c,isDontShowAgainSelected:d,toggleIsDontShowAgainSelected:g}=I(a,r,t);return l||s?null:(0,n.jsxs)(u.aF,{isOpen:o,gap:"sm",p:"lg",maxW:"[380px]",children:[(0,n.jsxs)(h.az,{children:[(0,n.jsxs)(h.so,{justify:"flex-start",align:"center",gap:"md",children:[(0,n.jsx)(f,{entityId:t,entity:a}),(0,n.jsx)(u.EY,{textStyle:"display.large",children:(0,n.jsx)(x.A,{id:"popover_favourites_proposal"})})]}),(0,n.jsx)(u.EY,{mt:"lg",mb:"sm",display:"block",children:(0,n.jsx)(x.A,{id:"popover_favourites_proposal_description"})}),(0,n.jsx)(u.Sc,{checked:d,onChange:g,py:"md",children:(0,n.jsx)(u.EY,{children:(0,n.jsx)(x.A,{id:"exit_checkbox"})})})]}),(0,n.jsxs)(h.az,{alignSelf:"flex-end",pt:"lg",children:[(0,n.jsx)(u.$n,{variant:"clear",mr:"sm",onClick:i,children:(0,n.jsx)(x.A,{id:"button_not_now"})}),(0,n.jsx)(_,{id:t,entity:a,entityGroup:r,onClick:c})]})]})},E={[a.bq7.MutedTournaments]:c.XN.LeagueScreen,[a.bq7.Tournaments]:c.XN.LeagueScreen,[a.bq7.MutedTeams]:c.XN.TeamScreen,[a.bq7.Teams]:c.XN.TeamScreen,[a.bq7.MutedPlayers]:c.XN.PlayerScreen,[a.bq7.Players]:c.XN.PlayerScreen},T=e=>{let{entityGroup:t,entity:r,id:a,entityTournamentId:c}=e,{priorityModal:u}=(0,s.Z)(),{isNBAModalOpen:p,setIsNBAModalOpen:h}=(0,i.z)(c),x=(0,l.d4)(d.fg);return p&&E[r]?(0,n.jsx)(o.s,{isOpen:p,setIsOpen:h,location:E[r]}):u||x?null:(0,n.jsx)(N,{entity:r,entityId:a,entityGroup:t})}},42621:(e,t,r)=>{r.d(t,{q:()=>n.q});var n=r(1440)},73411:(e,t,r)=>{r.d(t,{s:()=>p,S:()=>h});var n=r(6029),a=r(28349),l=r(76356),s=r(55729),o=r(90248),i=r(54053),c=r(1300),d=r(61836);let u=e=>{let{children:t,onClick:r}=e;return(0,n.jsx)("a",{href:"https://nba.sjv.io/c/5441787/2176796/16284",target:"_blank",rel:"noopener",onClick:r,children:t})},p=e=>{let{isOpen:t,setIsOpen:r,location:c}=e,{isDesktop:p}=(0,a.$c)(),h={backgroundImage:"url(/static/images/nba-league-pass/modal.png)",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"};if((0,s.useEffect)(()=>{t&&(0,d.Z1)({type:"bottom_sheet",name:"nba_league_pass",location:c})},[t]),!t)return null;let x=()=>r(!1);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(i.A,{isOpen:t,setIsOpen:r,footer:null,renderAdPlaceholder:!1,sheetStyles:h,modalContentStyles:h,width:360,children:(0,n.jsxs)(l.az,{style:p?h:void 0,br:"lg",children:[(0,n.jsx)(l.so,{h:"8xl",px:"xl",pt:{md:"xl"},children:(0,n.jsx)(l.az,{w:"4xl",h:"4xl",children:(0,n.jsx)(a._V,{src:"/static/images/nba-league-pass/league-pass-logo.svg",h:"4xl",w:"4xl",alt:"NBA"})})}),(0,n.jsxs)(l.so,{direction:"column",justify:"flex-end",minH:"[400px]",px:"lg",pb:"lg",gap:"2xl",children:[(0,n.jsxs)(l.so,{direction:"column",gap:"lg",children:[(0,n.jsx)(l.az,{textStyle:"display.extraLarge",color:"onColor.primary",children:(0,n.jsx)(o.A,{id:"league_pass_promo_title"})}),(0,n.jsx)(l.az,{textStyle:"body.mediumParagraph",color:"onColor.primary",children:(0,n.jsx)(o.A,{id:"league_pass_promo_body_long"})})]}),(0,n.jsxs)(l.so,{direction:"column",gap:"sm",pt:"xs",children:[(0,n.jsx)(a.$n,{children:(0,n.jsx)(u,{onClick:()=>{(0,d.AW)({type:"bottom_sheet",name:"nba_league_pass",location:c}),x()},children:(0,n.jsx)(l.az,{color:"onColor.primary",children:(0,n.jsx)(o.A,{id:"claim_offer"})})})}),(0,n.jsx)(a.$n,{variant:"clear",color:"onColor.primary",onClick:x,children:(0,n.jsx)(o.A,{id:"maybe_later"})})]})]})]})})})},h=e=>{let{utId:t,location:r}=e,{isNBAModalOpen:a,setIsNBAModalOpen:l}=(0,c.z)(t);return a?(0,n.jsx)(p,{isOpen:a,setIsOpen:l,location:r}):null}},91407:(e,t,r)=>{r.d(t,{t:()=>o});var n=r(64082),a=r(6029),l=r(21377),s=r(99064);let o=e=>{var{id:t,name:r,size:o=56,style:i,className:c,grayscale:d,isFantasy:u,placeholder:p="/static/images/placeholders/player.svg"}=e,h=(0,n.T)(e,["id","name","size","style","className","grayscale","isFantasy","placeholder"]);let x=h.w||h.width||o,g=h.h||h.height||o;return(0,a.jsx)(s._V,Object.assign({fallback:(0,a.jsx)(s._V,{style:{borderRadius:"50%"},w:x,h:g,src:p,alt:r}),src:t?l.qvj.image(t,u):"",alt:r,w:x,h:g,br:"50%",border:"onSurface.nLv4",style:i,className:c,isGrayscale:d},h))}}}]);