1import{t as r}from"./chunk-DcxQp08X.js";import{Cn as Zw,Ht as SC,Ki as xe,Oi as uo,Z as II,Zi as yH,a as $r,an as Ww,dn as Xu,jt as Oi,lt as K,oa as zu,v as C,yi as tm,yn as Zc,zt as Qs}from"./chunk-BVHH3bEM.js";import{D as tr}from"./chunk-DOCGRXVt.js";import{m as Rt,r as C$1}from"./chunk-CAxCNKoW.js";import{r as G}from"./chunk-B9g5KWfp.js";import{s as HI}from"./chunk-C_rp93GA.js";import{L as ur,w as fr}from"./chunk-iPYxhuMn.js";import{n as G$1}from"./chunk-C4YctnbK.js";import{Nt as cl,w as Gr,y as Fe}from"./chunk-D62C7sYk.js";import{H as wt}from"./chunk-CO-O6Jks.js";import{t as w}from"./chunk-DaP-3oUa2.js";import{t as g}from"./chunk-2jDY45ef.js";import{Kt as ut,Nt as pt}from"./chunk-DB4WHujn.js";import{a as R,n as B}from"./main-ZHQMLWHS.js";import{m as cr}from"./chunk-Bm77hocx2.js";import{n as ai,r as c}from"./chunk-BMXXbUwg.js";import{n as Fn}from"./chunk-DryJtjc1.js";var re={2:`active`,3:`finished`,1:`next`};var pe={5:`games`,2:`all_prizes`,4:`leaderboard`,1:`rules_conditions`,3:`results`};var me=s=>s===0?`main_cup`:`stage_${s}`;var le=s=>re[s]||``;var Q=s=>pe[s]||``;var a=(s,e,t,i)=>({event:`tournament`,eventCategory:`tournament`,eventAction:i,mode:me(s),status:le(e),text:t});var X=(s,e,t)=>r({element_name:`rules_conditions`},a(s,e,t,`element_click`));var E=(s,e,t)=>r({element_name:`results`},a(s,e,t,`element_click`));var Y=(s,e,t)=>r({element_name:`show_all_prizes`},a(s,e,t,`element_click`));var J=(s,e,t)=>a(s,e,t,`participate`);var ee=(s,e,t)=>a(s,e,t,`play`);var te=(s,e,t)=>a(s,e,t,`select_switcher`);var ie=(s,e,t,i)=>r({element_name:Q(i)},a(s,e,t,`back_button`));var se=(s,e,t,i)=>r({element_name:Q(i)},a(s,e,t,`close_button`));var ne=`cdk-global-scrollblock`;var ce=`infoBlock`;var de=80;var ue=10;var v=`championshipSlug`;var m=class m{constructor(){this._store=C(G);this._gtmService=C(w);this._translateService=C(Rt);this.viewModel=this._store.selectSignal(ai.selectChampionshipFeaturedDetailsViewModel);this.isNavigateFromPastStage=!1;this.zeroDepPopupOnPlayEnabled=C(ut).isNewPlayFlowAvailable;this.selectedStage=Oi({id:0,index:0,status:2});this.selectedStageContent=SC(()=>{let e=this.selectedStage().index,t=this.viewModel().details;return e===0?t.content:t.stages[e-1].content});this.selectedStageDynamicBoostPacks=SC(()=>Fn(this.viewModel().details,this.selectedStage().index));this.isSecondScreenVisible=SC(()=>this.selectedStageContent()?.isSecondScreenEnabled);this.mainStageStatus=SC(()=>{let e=this.viewModel().details.stages;if(!e.length)return 1;let t=e.some(h=>h.status===2),i=e.some(h=>h.status===3),o=e.some(h=>h.status===1);return t?2:i&&o?3:i&&!o?3:1});this.lang=this._translateService.getCurrentLang();this.defaultLang=HI.clientConfig.coreConfig.defaultLang;this.predictionLink=HI.clientConfig.coreConfig.envGeo!==3?`/sports`:`/`;this.stageStatus=B;this.popupType=R;this.isServer=C(Gr);this._document=C($r);this._window=C(Fe);this._mediaScreenService=C(wt);this._destroyRef=C(xe);this._renderer=C(Zc);this._viewportScroller=C(tr);this._activatedRoute=C(G$1);this._popupOpenToGtmEvent={1:(e,t,i)=>this._gtmService.pushTag(X(e,t,i)),2:(e,t,i)=>this._gtmService.pushTag(Y(e,t,i)),4:(e,t,i)=>this._gtmService.pushTag(E(e,t,i)),3:(e,t,i)=>this._gtmService.pushTag(E(e,t,i)),5:()=>{}};this._popupCloseTypeToGtmEvent={2:(e,t,i,o)=>this._gtmService.pushTag(se(e,t,i,o)),1:(e,t,i,o)=>this._gtmService.pushTag(ie(e,t,i,o))}}ngOnInit(){this._store.dispatch(fr.setIsFooterVisible({isVisible:!1})),this._store.dispatch(fr.setIsHeaderFixed({isFixed:!0})),!this.isServer&&!this._mediaScreenService.isMatched(1280)&&this._calculateVhPoints()}changeStageTab(e){this.selectedStage.set({id:e.id,index:e.index,status:e.stageStatus}),this._store.dispatch(c.stageChanged({payload:{index:e.index,id:e.id,status:e.stageStatus}})),this.isNavigateFromPastStage&&(this.isNavigateFromPastStage=!1);let t=this.selectedStage();e.navClicked&&this._gtmService.pushTag(te(t.index,t.status,this._activatedRoute.snapshot?.params?.[v])),this.handlePopupClosed()}ngOnDestroy(){this._store.dispatch(fr.setIsFooterVisible({isVisible:!0})),this._store.dispatch(fr.setIsHeaderFixed({isFixed:!1})),this.handlePopupClosed(),this.isServer||this._document.documentElement.style.removeProperty(`--vh`)}handlePopupOpened(e){let t=this.selectedStage();this.toggleBodyChampionshipPopupClass(!0),this._store.dispatch(c.popupOpen({popupType:e})),this._popupOpenToGtmEvent[e](t.index,t.status,this._activatedRoute.snapshot?.params?.[v])}handlePopupClosed(e,t){let i=this.selectedStage();this.toggleBodyChampionshipPopupClass(!1),this._store.dispatch(c.popupClose()),e&&t&&this._popupCloseTypeToGtmEvent[e](i.index,i.status,this._activatedRoute.snapshot?.params?.[v],t)}handleParticipateClicked(){let e=this.selectedStage();this._store.dispatch(c.participateTriggered()),this._gtmService.pushTag(J(e.index,e.status,this._activatedRoute.snapshot?.params?.[v]))}handlePredictionClicked(){this._store.dispatch(ur.navigate({url:this.predictionLink}))}handleGamesClicked(){let e=this.selectedStage();this._store.dispatch(ur.navigate({url:`/`})),this._gtmService.pushTag(ee(e.index,e.status,this._activatedRoute.snapshot?.params?.[v]))}handlePlayGameClicked(e,t,i,o){!e.isDemo&&this.zeroDepPopupOnPlayEnabled()&&this._store.dispatch(pt.loadPopup()),this._gtmService.pushTag(cr(e.isDemo,t,e.provider,e.gameName,e.isDemo?`game`:o,i))}handleAuthorizationRequired(){this._store.dispatch(g.openLogin())}toggleBodyChampionshipPopupClass(e){e?this._renderer.addClass(this._document.documentElement,ne):this._renderer.removeClass(this._document.documentElement,ne)}handleScrollToInfoBlock(){let e=this._document.getElementById(ce);if(e){let t=e.getBoundingClientRect().top-de+this._window.scrollY;this._viewportScroller.scrollToPosition([0,t])}}_calculateVhPoints(){Qs(this._window,`orientationchange`).pipe(Xu(null),zu(ue),C$1(this._destroyRef)).subscribe(()=>this._document.documentElement.style.setProperty(`--vh`,this._window.innerHeight*.01+`px`))}};m.ɵfac=function(t){return new(t||m)},m.ɵcmp=Ww({type:m,selectors:[[`ng-component`]],decls:0,vars:0,template:function(t,i){},encapsulation:2});var oe=m;var l=class l{constructor(){this.minFontSizePx=yH(10);this.maxFontSizePx=yH(60);this.mobileBreakpointPx=yH(768);this.watchContentChanges=yH(!0);
1this.onlyMobileBreakpoints=yH(!1);this._el=C(uo);this._renderer=C(Zc);this._destroyRef=C(xe);this._isBrowser=C(cl);this._resizeSubject=new K;this._mutationSubject=new K;this._mutationObserver=null}onResize(){this._resizeSubject.next()}ngAfterViewInit(){this._isBrowser&&(this._resizeSubject.pipe(zu(50),C$1(this._destroyRef)).subscribe(()=>{this._handleFontSizeCalculation()}),this.watchContentChanges()&&(this._mutationSubject.pipe(zu(50),C$1(this._destroyRef)).subscribe(()=>{this._handleFontSizeCalculation()}),this._setupMutationObserver())),this._handleFontSizeCalculation()}ngOnDestroy(){this._mutationObserver&&this._mutationObserver.disconnect()}_setupMutationObserver(){this._mutationObserver=new MutationObserver(()=>{this._mutationSubject.next()});this._mutationObserver.observe(this._el.nativeElement,{childList:!0,subtree:!0,characterData:!0})}_isMobileScreen(){return window.innerWidth<this.mobileBreakpointPx()}_handleFontSizeCalculation(){this.onlyMobileBreakpoints()&&!this._isMobileScreen()?(this._renderer.removeStyle(this._el.nativeElement,`font-size`),this._renderer.setStyle(this._el.nativeElement,`line-height`,`normal`)):this._calculateFontSize()}_calculateFontSize(){let e=this._el.nativeElement;if(!(e.innerText||e.textContent||``)){this._renderer.removeStyle(e,`font-size`);return}this._renderer.setStyle(e,`font-size`,`${this.maxFontSizePx()}px`);let i=e.offsetWidth,o=this.maxFontSizePx();for(;e.scrollWidth>i&&o>this.minFontSizePx();)o--,this._renderer.setStyle(e,`font-size`,`${o}px`);o<this.minFontSizePx()&&(o=this.minFontSizePx(),this._renderer.setStyle(e,`font-size`,`${o}px`))}};l.ɵfac=function(t){return new(t||l)},l.ɵdir=Zw({type:l,selectors:[[``,`puAutoFontSize`,``]],hostBindings:function(t,i){t&1&&tm(`resize`,function(){return i.onResize()},II)},inputs:{minFontSizePx:[1,`minFontSizePx`],maxFontSizePx:[1,`maxFontSizePx`],mobileBreakpointPx:[1,`mobileBreakpointPx`],watchContentChanges:[1,`watchContentChanges`],onlyMobileBreakpoints:[1,`onlyMobileBreakpoints`]}});var ae=l;export{oe as n,ae as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.