1import { n as k, t as p, y as T } from "./chunk-xgti9j2t.js"; 2import { $ as B, $r as N, Aa as f, Ai as S, Ea as l, Hn as M, Kn as L, Li as C, Pi as y, Pt as d, Sa as c, Sr as P, Y as v, _r as R, fa as D, fi as W, fr as g, gt as _, sa as w, t as A, tn as G, to as x, z as V, zo as E } from "./chunk-c97c17u8.js"; 3import { M as J } from "./chunk-l3jkbhly.js"; 4import { p as F } from "./chunk-k52vj1ic.js"; 5import { o as H } from "./chunk-l24fzhmb.js"; 6import { A as K } from "./chunk-jrtaqqwj.js"; 7import { o as X, t as h } from "./chunk-pesy0vb6.js"; 8import { D as Z, o as q } from "./chunk-llc8ry2a.js"; 9import { Tt as z, ut as Y } from "./chunk-fbjoug0d.js"; 10import { a as U } from "./chunk-ewplex8i.js"; 11import { n as j } from "./chunk-c18gpzrj.js"; 12import { r as Q } from "./chunk-c9rg1mp5.js"; 13import { t as $ } from "./chunk-kyqvtgtk.js"; 14import { Y as tt, gt as it, y as nt } from "./chunk-w0x32net.js"; 15import { p as st } from "./chunk-bhnvkbxx.js"; 16import { ot as rt } from "./chunk-f2v2cgea.js"; 17import { c as ot } from "./chunk-og5uebri.js"; 18import { Dn as at, Tt as et, jr as _t } from "./chunk-go6pvd0a.js"; 19import { t as ct } from "./chunk-k4et3zlq.js"; 20import { i as ut, p as mt } from "./chunk-hul0ult7.js"; 21import { n as ht } from "./chunk-lmnwxprc.js"; 22import { r as kt } from "./chunk-ilfhy0in.js"; 23import { n as pt } from "./chunk-ohg30iel.js"; 24import { $ as ft } from "./chunk-iuhjzybw.js"; 25import { a as lt } from "./chunk-kanq2829.js"; 26import { i as Ct } from "./chunk-lareec7a.js"; 27import { n as dt } from "./chunk-im7lpx1v.js"; 28import { bt as vt, mn as Dt } from "./chunk-l8i5rin8.js"; 29import { a as gt, s as Et } from "./chunk-bol8t3zz.js"; 30import { c as It } from "./chunk-pccxjem8.js"; 31import { r as bt } from "./chunk-i1knml6i.js"; 32import { t as Ot } from "./chunk-bt0uh5ix.js"; 33import { t as Tt } from "./chunk-ga84h9wi.js"; 34import { n as Bt } from "./chunk-bh3f6w1f.js"; 35import { i as Nt } from "./chunk-eoj30x9t.js"; 36import { $t as St, At as Mt, Ca as Lt, Cg as yt, Cr as Pt, Dt as Rt, En as Wt, Er as wt, Fh as At, Ia as Gt, In as xt, Kn as Vt, Mn as Jt, Ni as Ft, Or as Ht, Pa as Kt, Qi as Xt, Ra as Zt, Sn as qt, Ta as zt, Ua as Yt, Va as Ut, Vn as a, Wr as jt, Zn as Qt, _i as $t, _t as ti, am as ii, eh as ni, er as si, fo as ri, ga as oi, h as ai, io as ei, ir as _i, ja as ci, jn as ui, ka as mi, kh as hi, pa as ki, pt as pi, qn as fi, so as li, ti as Ci, ua as di, uo as vi, xr as Di, xt as gi } from "./chunk-g8mtbi19.js"; 37import { $n as Ei } from "./chunk-iq8thase.js"; 38import { n as Ii } from "./chunk-kxhh4v4a.js"; 39import { t as bi } from "./chunk-nugu9zb5.js"; 40import { n as Oi } from "./chunk-j0f6jhv0.js"; 41import { n as Ti } from "./chunk-bd32vwah.js"; 42import { r as Bi } from "./chunk-jq0sl3ei.js"; 43import { n as Ni } from "./chunk-l121kfao.js"; 44import { n as Si } from "./chunk-ja26nt1r.js"; 45import { r as Mi } from "./chunk-iuwunkxo.js"; 46import { n as Li } from "./chunk-ja4vv35q.js"; 47import { t as yi } from "./chunk-o2kd60zq.js"; 48import { t as Pi } from "./chunk-duo7njp1.js"; 49import { n as Ri } from "./chunk-eto2r310.js"; 50import { n as Wi, r as wi } from "./chunk-c5h65alx.js"; 51import { n as Ai } from "./chunk-cah7i2vq.js"; 52import { _ as Gi } from "./chunk-o02wm52v.js"; 53import { o as xi } from "./chunk-d06ulyri.js"; 54import { n as Vi } from "./chunk-izpvy78m.js"; 55import { r as Ji } from "./chunk-dzpnbkxl.js"; 56import { n as Fi } from "./chunk-kjann8gz.js"; 57import { p as Hi } from "./chunk-d3zbmodj.js"; 58import { t as Ki } from "./chunk-ozq493wr.js"; 59import { S as Xi } from "./chunk-kh77c4xb.js"; 60import { n as Zi } from "./chunk-op4feybx.js"; 61import { t as qi } from "./chunk-f59lr91u.js"; 62import { E as zi } from "./chunk-lq9ws58w.js"; 63import { E as Yi, _ as Ui } from "./chunk-bek7msjx.js"; 64import { i as ji, n as Qi } from "./chunk-n2m7u3ae.js"; 65import { n as $i } from "./chunk-dww94rc5.js"; 66import { r as tn } from "./chunk-o2xnvp27.js"; 67import { n as nn } from "./chunk-cjgg81p0.js"; 68import { t as sn } from "./chunk-eg3yts4b.js"; 69import { n as rn } from "./chunk-n6jntq8w.js"; 70import { n as on } from "./chunk-nu8d10du.js"; 71import { t as an } from "./chunk-h8ecxuny.js"; 72import { n as en } from "./chunk-io5v68wy.js"; 73import { c as _n } from "./chunk-owt74jjd.js"; 74import { t as cn } from "./chunk-ohz1zoj7.js"; 75import { n as un } from "./chunk-im83gcb3.js"; 76import { i as mn } from "./chunk-b3lyblkb.js"; 77import { n as hn } from "./chunk-cl696cua.js"; 78import { o as kn } from "./chunk-mxmfuhfl.js"; 79import { n as pn } from "./chunk-es5wia5t.js"; 80import { n as fn, t as ln } from "./chunk-eber62ai.js"; 81import { i as Cn } from "./chunk-jipijatq.js"; 82import { n as dn } from "./chunk-jf9hdnex.js"; 83import { r as vn } from "./chunk-b81t2lx1.js"; 84import { t as Dn } from "./chunk-fc584apf.js"; 85import { a as gn } from "./chunk-eaht5xxc.js"; 86import { s as En } from "./chunk-ljb6jk92.js"; 87import { n as In } from "./chunk-1gq3zm17.js"; 88import { n as bn } from "./chunk-i7ecc880.js"; 89import { n as On } from "./chunk-l3bwko7a.js"; 90import { u as Tn } from "./chunk-n8h65r7c.js"; 91import { n as Bn } from "./chunk-lqsbxgbr.js"; 92import { n as Nn } from "./chunk-box3ohoo.js"; 93import { n as Sn } from "./chunk-hu55n7wb.js"; 94import { l as Mn, n as Ln, o as yn } from "./chunk-b9m59xwf.js"; 95import { n as Pn } from "./chunk-hgaiynd0.js"; 96import { n as Rn } from "./chunk-hwni6bri.js"; 97import { t as Wn } from "./chunk-nemq363r.js"; 98import { t as wn } from "./chunk-i2ogy8gh.js"; 99import { n as An } from "./chunk-m1yc3ygr.js"; 100import { i as Gn } from "./chunk-k5qrxypz.js"; 101import { n as xn } from "./chunk-8uvtj9vi.js"; 102import { n as Vn } from "./chunk-foy1gqs3.js"; 103import { o as Jn } from "./chunk-oinny59o.js"; 104import { i as Fn } from "./chunk-c6c21m38.js"; 105import { r as Hn } from "./chunk-je8asq4j.js"; 106import { n as Kn } from "./chunk-hh4rfzhx.js"; 107import { i as Xn } from "./chunk-o9d3376i.js"; 108import { n as Zn } from "./chunk-f003tdgn.js"; 109import { a as qn } from "./chunk-mthf07ko.js"; 110import { t as zn } from "./chunk-gzydrmx8.js"; 111import { n as Yn } from "./chunk-jnbpzwq8.js"; 112import { t as Un } from "./chunk-hc6zu2lo.js"; 113import { a as jn } from "./chunk-jd93snah.js"; 114import { a as Qn } from "./chunk-h2a1jk9u.js"; 115import { t as $n } from "./chunk-ii2nakax.js"; 116import { n as ts } from "./chunk-j8braqzq.js"; 117import { r as is } from "./chunk-nk13yrgg.js"; 118import { c as ns, t as ss } from "./chunk-mkjsekfa.js"; 119import { t as rs } from "./chunk-fmcihc9q.js"; 120import { n as os } from "./chunk-l8dd4lui.js"; 121import { r as as } from "./chunk-by7nwdb5.js"; 122import { n as es, t as _s } from "./chunk-bv6nuydk.js"; 123import { n as cs, t as us } from "./chunk-c8z0d69p.js"; 124import { t as ms } from "./chunk-o4f8w5yc.js"; 125function hs(i, e) { 126 if (i & 1 && (l(0, "div", 0), B(1), D()), i & 2) { 127 let t = c(2); 128 d(), w(t.title()); 129 } 130} 131function ks(i, e) { 132 if (i & 1) { 133 let t = P();
134 v(0, hs, 2, 1, "div", 0), l(1, "ms-event-carousel", 1), A("isContentReady", function() { 135 return g(t), E(c().isContentReady.set(!0)); 136 })("eventTileClicked", function(n) { 137 return g(t), E(c().eventTileClicked(n)); 138 }), D(); 139 } 140 if (i & 2) { 141 let t = c(); 142 C(t.title() ? 0 : -1), d(), G("eventCarouselItems", t.eventCarouselItems()); 143 } 144} 145function ps() { 146 return [et(b)]; 147} 148var u, I, b; 149function O() { 150 return (O = ms((() => { 151 T(), y(), J(), F(), H(), K(), X(), Z(), Y(), U(), j(), Q(), $(), q(), it(), st(), rt(), tt(), ot(), _t(), ct(), mt(), ut(), ht(), kt(), pt(), ft(), at(), yt(), At(), hi(), ni(), ii(), lt(), Ct(), ri(), vi(), dt(), li(), ei(), Yt(), Ut(), Zt(), Dt(), Gt(), Kt(), ci(), mi(), zt(), Lt(), oi(), ki(), di(), Xt(), Ft(), Et(), gt(), $t(), Ci(), jt(), wt(), Pt(), Di(), It(), _i(), si(), Qt(), fi(), xt(), bt(), Ot(), Tt(), Jt(), ui(), Wt(), qt(), Bt(), Nt(), St(), Mt(), Rt(), gi(), ti(), pi(), ai(), Ei(), Oi(), Ti(), bi(), Bi(), Ni(), Si(), Mi(), Ii(), Li(), Gi(), yi(), Pi(), Ri(), wi(), Ai(), xi(), Qi(), $i(), tn(), Vi(), Ji(), Fi(), Hi(), nn(), sn(), Ki(), Xi(), rn(), on(), an(), Zi(), qi(), zi(), Ui(), en(), _n(), cn(), un(), mn(), hn(), kn(), pn(), fn(), Cn(), dn(), vn(), Dn(), gn(), En(), In(), ts(), bn(), On(), Tn(), Bn(), Nn(), Sn(), Mn(), Pn(), Rn(), Wn(), wn(), Gn(), xn(), rs(), Vn(), Jn(), Fn(), An(), Kn(), Xn(), Hn(), Zn(), is(), ns(), qn(), zn(), Yn(), Un(), jn(), Qn(), os(), $n(), as(), es(), us(), u = (function(i) { 152 return i.ScoreboardCarousel = "scoreboard carousel", i.SportEvents = "sport events", i; 153 })(u || {}), I = (() => { 154 let i = class extends yn { 155 constructor() { 156 super(...arguments), this.title = f(""), this.eventCarouselItems = f([]), this.fixtureFactory = _(Yi), this.apiService = _(ss), this.cdnCachingConfig = _(vt), this.redirectHelper = _(Wi), this.gridSubscriptionService = _(cs), this.modularConfigAccessorService = _(ln), this.trackingService = _(Vt), this.urlHelper = _(Ht), this.timerService = _(nt), this.shouldIncludePayload = this.cdnCachingConfig.widgets.includes("ScoreboardCarousel"); 157 } 158 eventTileClicked(t) { 159 this.trackScoreboardCarouselClick(t.eventCarouselItem, t.tileIndex), this.redirectHelper.goToPage(t.eventCarouselItem.eventLink); 160 } 161 ngOnDestroy() { 162 this.resetUIState(); 163 } 164 onData(t, n) { 165 this.resetUIState(); 166 let s = t?.carouselEvents?.length; 167 if (n) { 168 this.handleWidgetRefresh(t, s); 169 return; 170 } 171 s ? this.processCarouselResponse(t) : this.getData(n).pipe(h(this.destroyRef)).subscribe((r) => { 172 this.processCarouselResponse(r); 173 }); 174 } 175 handleWidgetRefresh(t, n) { 176 t?.carouselEvents && n === t?.totalCount ? this.setWidgetData(t) : this.loadMore(!0, t); 177 } 178 processCarouselResponse(t) { 179 this.setWidgetData(t, !1), this.eventCarouselItems().length < t.totalCount && (this.cancelIdleCallback = this.timerService.scheduleIdleCallback(() => this.loadMore(!1, t))); 180 } 181 getDataContext() { 182 let t = super.getDataContext(); 183 return this.shouldIncludePayload ? k(p({}, t), { shouldIncludePayload: this.shouldIncludePayload }) : t; 184 } 185 loadMore(t, n) { 186 let s = n?.carouselEvents?.length, r = t ? s ?? 0 : this.eventCarouselItems().length; 187 this.getData(t, r).pipe(R((o) => (o && (r += o.carouselEvents.length), r < o.totalCount ? this.getData(t, r) : V)), x((o, m) => ({ 188 carouselEvents: [...o.carouselEvents, ...m.carouselEvents], 189 title: m.title ?? o.title, 190 totalCount: m.totalCount 191 }), t && s ? n : { 192 totalCount: 0, 193 carouselEvents: [], 194 title: "" 195 }), h(this.destroyRef)).subscribe((o) => this.setWidgetData(o, !t)); 196 } 197 setWidgetData(t, n) { 198 if (!t.carouselEvents.length) { 199 n || (this.hasData = !1, this.setWidgetLoaded(), this.handleEmptyData()); 200 return; 201 } 202 let s = t.carouselEvents.map((r) => { 203 let o = this.fixtureFactory.create(r.fixture); 204 return { 205 event: o, 206 eventLink: this.urlHelper.getEventUrl({ 207 id: o.id, 208 name: o.name 209 }), 210 titleData: { 211 title: r.title, 212 titleIcon: r.titleIcon 213 } 214 }; 215 }); 216 n ? this.eventCarouselItems.update((r) => [...r, ...s]) : (this.eventCarouselItems.set(s), this.hasData = !0, this.title.set(t.title), this.setWidgetLoaded()), this.subscribeToEvents(s); 217 } 218 resetUIState() { 219 this.eventSubscriptions?.unsubscribe(), this.cancelIdleCallback?.(); 220 } 221 subscribeToEvents(t) { 222 let n = t.map((s) => ({ 223 event: s.event, 224 callback: (r) => this.updateEvent(r) 225 })); 226 n.length && (this.eventSubscriptions ? this.eventSubscriptions.add(this.gridSubscriptionService.subscribe(n)) : this.eventSubscriptions = this.gridSubscriptionService.subscribe(n)); 227 } 228 updateEvent(t) { 229 let n = ji(this.eventCarouselItems(), (s) => { 230 let r = s.findIndex((o) => o.event.id === t.id); 231 r !== -1 && (s[r].event = z(t)); 232 }); 233 this.eventCarouselItems.set(n); 234 } 235 getData(t, n = 0) { 236 return this.apiService.getWidget(k(p({}, this.getDataContext()), { skip: n }), this.getRequestContext(), !t, !1).pipe(L(({ payload: s }) => s || { 237 carouselEvents: [], 238 totalCount: 0 239 }), h(this.destroyRef)); 240 } 241 trackScoreboardCarouselClick(t, n) { 242 let { event: s, eventLink: r } = t, o = { 243 [a.COMPONENT_CATEGORY_EVENT]: u.ScoreboardCarousel, 244 [a.COMPONENT_LABEL_EVENT]: u.SportEvents, 245 [a.COMPONENT_ACTION_EVENT]: a.EVENT_CLICK,
246 [a.COMPONENT_EVENT_DETAILS]: s.name, 247 [a.COMPONENT_POSITION_EVENT]: this.title() || "not applicable", 248 [a.COMPONENT_LOCATION_EVENT]: this.modularConfigAccessorService.getPage(), 249 [a.COMPONENT_URL_CLICKED]: r, 250 [a.COMPONENT_CONTENT_POSITION]: n, 251 [a.SPORT_EVENT_ID]: s.id, 252 [a.SPORT_LEAGUE_ID]: s.league.id, 253 [a.SPORT_ID]: s.sport.id 254 }; 255 this.trackingService.track(a.EVENT_TRACKING, o); 256 } 257 }; 258 return i.ɵfac = (() => { 259 let e; 260 return function(t) { 261 return (e || (e = S(i)))(t || i); 262 }; 263 })(), i.ɵcmp = M({ 264 type: i, 265 selectors: [["ms-scoreboard-carousel-widget"]], 266 features: [N], 267 decls: 1, 268 vars: 1, 269 consts: [[1, "scoreboard-carousel-header"], [ 270 3, 271 "isContentReady", 272 "eventTileClicked", 273 "eventCarouselItems" 274 ]], 275 template: function(e, t) { 276 e & 1 && v(0, ks, 2, 2), e & 2 && C(t.eventCarouselItems().length ? 0 : -1); 277 }, 278 dependencies: [_s], 279 styles: ["[_nghost-%COMP%]{--%NS%event-carousel-container-padding: 0}[_nghost-%COMP%] .scoreboard-carousel-header[_ngcontent-%COMP%]{padding:11px 0;font-size:16px;font-weight:700}@media(min-width:1024px){[_nghost-%COMP%] .scoreboard-carousel-header[_ngcontent-%COMP%]{color:var(--%NS%theme-body-txt)}}"] 280 }), i; 281 })(), b = (() => { 282 let i = class { 283 constructor() { 284 this.widgetRegistry = _(Ln); 285 } 286 onFeatureInit() { 287 this.widgetRegistry.registerLazy("ScoreboardCarousel", I); 288 } 289 }; 290 return i.ɵfac = function(e) { 291 return new (e || i)(); 292 }, i.ɵprov = W({ 293 token: i, 294 factory: i.ɵfac, 295 providedIn: "root" 296 }), i; 297 })(); 298 })))(); 299} 300O(); 301export { ps as provide }; 302 303//# sourceMappingURL=chunk-hwf3m509.js.map
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.