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