@maestro_io/maestro-web-sdk 5.2.1 → 5.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/dist/index.d.ts +4 -3
- package/dist/maestro-web-sdk.esm.js +3 -3
- package/dist/maestro-web-sdk.esm.js.map +1 -1
- package/dist/maestro-web-sdk.umd.js +3 -3
- package/dist/maestro-web-sdk.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/1.maestro-web-sdk.esm.js +0 -2
- package/dist/1.maestro-web-sdk.esm.js.map +0 -1
- package/dist/10.maestro-web-sdk.esm.js +0 -2
- package/dist/10.maestro-web-sdk.esm.js.map +0 -1
- package/dist/11.maestro-web-sdk.esm.js +0 -2
- package/dist/11.maestro-web-sdk.esm.js.map +0 -1
- package/dist/12.maestro-web-sdk.esm.js +0 -2
- package/dist/12.maestro-web-sdk.esm.js.map +0 -1
- package/dist/13.maestro-web-sdk.esm.js +0 -2
- package/dist/13.maestro-web-sdk.esm.js.map +0 -1
- package/dist/14.maestro-web-sdk.esm.js +0 -2
- package/dist/14.maestro-web-sdk.esm.js.map +0 -1
- package/dist/15.maestro-web-sdk.esm.js +0 -2
- package/dist/15.maestro-web-sdk.esm.js.map +0 -1
- package/dist/16.maestro-web-sdk.esm.js +0 -2
- package/dist/16.maestro-web-sdk.esm.js.map +0 -1
- package/dist/17.maestro-web-sdk.esm.js +0 -2
- package/dist/17.maestro-web-sdk.esm.js.map +0 -1
- package/dist/18.maestro-web-sdk.esm.js +0 -2
- package/dist/18.maestro-web-sdk.esm.js.map +0 -1
- package/dist/19.maestro-web-sdk.esm.js +0 -2
- package/dist/19.maestro-web-sdk.esm.js.map +0 -1
- package/dist/2.maestro-web-sdk.esm.js +0 -2
- package/dist/2.maestro-web-sdk.esm.js.map +0 -1
- package/dist/20.maestro-web-sdk.esm.js +0 -2
- package/dist/20.maestro-web-sdk.esm.js.map +0 -1
- package/dist/21.maestro-web-sdk.esm.js +0 -2
- package/dist/21.maestro-web-sdk.esm.js.map +0 -1
- package/dist/22.maestro-web-sdk.esm.js +0 -2
- package/dist/22.maestro-web-sdk.esm.js.map +0 -1
- package/dist/23.maestro-web-sdk.esm.js +0 -2
- package/dist/23.maestro-web-sdk.esm.js.map +0 -1
- package/dist/24.maestro-web-sdk.esm.js +0 -2
- package/dist/24.maestro-web-sdk.esm.js.map +0 -1
- package/dist/25.maestro-web-sdk.esm.js +0 -2
- package/dist/25.maestro-web-sdk.esm.js.map +0 -1
- package/dist/26.maestro-web-sdk.esm.js +0 -2
- package/dist/26.maestro-web-sdk.esm.js.map +0 -1
- package/dist/27.maestro-web-sdk.esm.js +0 -2
- package/dist/27.maestro-web-sdk.esm.js.map +0 -1
- package/dist/28.maestro-web-sdk.esm.js +0 -2
- package/dist/28.maestro-web-sdk.esm.js.map +0 -1
- package/dist/29.maestro-web-sdk.esm.js +0 -2
- package/dist/29.maestro-web-sdk.esm.js.map +0 -1
- package/dist/3.maestro-web-sdk.esm.js +0 -2
- package/dist/3.maestro-web-sdk.esm.js.map +0 -1
- package/dist/30.maestro-web-sdk.esm.js +0 -2
- package/dist/30.maestro-web-sdk.esm.js.map +0 -1
- package/dist/31.maestro-web-sdk.esm.js +0 -2
- package/dist/31.maestro-web-sdk.esm.js.map +0 -1
- package/dist/32.maestro-web-sdk.esm.js +0 -2
- package/dist/32.maestro-web-sdk.esm.js.map +0 -1
- package/dist/33.maestro-web-sdk.esm.js +0 -2
- package/dist/33.maestro-web-sdk.esm.js.map +0 -1
- package/dist/34.maestro-web-sdk.esm.js +0 -2
- package/dist/34.maestro-web-sdk.esm.js.map +0 -1
- package/dist/35.maestro-web-sdk.esm.js +0 -2
- package/dist/35.maestro-web-sdk.esm.js.map +0 -1
- package/dist/36.maestro-web-sdk.esm.js +0 -2
- package/dist/36.maestro-web-sdk.esm.js.map +0 -1
- package/dist/37.maestro-web-sdk.esm.js +0 -2
- package/dist/37.maestro-web-sdk.esm.js.map +0 -1
- package/dist/38.maestro-web-sdk.esm.js +0 -2
- package/dist/38.maestro-web-sdk.esm.js.map +0 -1
- package/dist/39.maestro-web-sdk.esm.js +0 -2
- package/dist/39.maestro-web-sdk.esm.js.map +0 -1
- package/dist/4.maestro-web-sdk.esm.js +0 -2
- package/dist/4.maestro-web-sdk.esm.js.map +0 -1
- package/dist/40.maestro-web-sdk.esm.js +0 -2
- package/dist/40.maestro-web-sdk.esm.js.map +0 -1
- package/dist/5.maestro-web-sdk.esm.js +0 -2
- package/dist/5.maestro-web-sdk.esm.js.map +0 -1
- package/dist/6.maestro-web-sdk.esm.js +0 -2
- package/dist/6.maestro-web-sdk.esm.js.map +0 -1
- package/dist/7.maestro-web-sdk.esm.js +0 -2
- package/dist/7.maestro-web-sdk.esm.js.map +0 -1
- package/dist/8.maestro-web-sdk.esm.js +0 -2
- package/dist/8.maestro-web-sdk.esm.js.map +0 -1
- package/dist/9.maestro-web-sdk.esm.js +0 -2
- package/dist/9.maestro-web-sdk.esm.js.map +0 -1
- package/dist/package.json +0 -94
- package/dist/src/components/atoms/BaseButton/BaseButton.d.ts +0 -7
- package/dist/src/components/atoms/BaseButton/BaseButton.js +0 -11
- package/dist/src/components/atoms/BaseButton/index.d.ts +0 -2
- package/dist/src/components/atoms/BaseButton/index.js +0 -2
- package/dist/src/components/atoms/Image/index.d.ts +0 -13
- package/dist/src/components/atoms/Image/index.js +0 -34
- package/dist/src/components/atoms/Rive/index.d.ts +0 -221
- package/dist/src/components/atoms/Rive/index.js +0 -53
- package/dist/src/components/atoms/SvgIcon/AddIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/AddIcon.js +0 -6
- package/dist/src/components/atoms/SvgIcon/BetGeneralIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/BetGeneralIcon.js +0 -9
- package/dist/src/components/atoms/SvgIcon/BetsIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/BetsIcon.js +0 -8
- package/dist/src/components/atoms/SvgIcon/BetsWarningIcon.d.ts +0 -7
- package/dist/src/components/atoms/SvgIcon/BetsWarningIcon.js +0 -11
- package/dist/src/components/atoms/SvgIcon/BuilderIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/BuilderIcon.js +0 -8
- package/dist/src/components/atoms/SvgIcon/ChatIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/ChatIcon.js +0 -6
- package/dist/src/components/atoms/SvgIcon/CheckmarkIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/CheckmarkIcon.js +0 -6
- package/dist/src/components/atoms/SvgIcon/CollapseIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/CollapseIcon.js +0 -6
- package/dist/src/components/atoms/SvgIcon/ExpandIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/ExpandIcon.js +0 -6
- package/dist/src/components/atoms/SvgIcon/FantasyIcon.d.ts +0 -7
- package/dist/src/components/atoms/SvgIcon/FantasyIcon.js +0 -15
- package/dist/src/components/atoms/SvgIcon/FlameIcon.d.ts +0 -7
- package/dist/src/components/atoms/SvgIcon/FlameIcon.js +0 -11
- package/dist/src/components/atoms/SvgIcon/FoxKeyPlaysIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/FoxKeyPlaysIcon.js +0 -7
- package/dist/src/components/atoms/SvgIcon/FoxMultiViewIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/FoxMultiViewIcon.js +0 -10
- package/dist/src/components/atoms/SvgIcon/FoxStatsIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/FoxStatsIcon.js +0 -7
- package/dist/src/components/atoms/SvgIcon/HelloWorldIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/HelloWorldIcon.js +0 -6
- package/dist/src/components/atoms/SvgIcon/Icon.d.ts +0 -15
- package/dist/src/components/atoms/SvgIcon/Icon.js +0 -70
- package/dist/src/components/atoms/SvgIcon/KeyPlaysIcon.d.ts +0 -6
- package/dist/src/components/atoms/SvgIcon/KeyPlaysIcon.js +0 -10
- package/dist/src/components/atoms/SvgIcon/MobilePhoneIcon.d.ts +0 -7
- package/dist/src/components/atoms/SvgIcon/MobilePhoneIcon.js +0 -11
- package/dist/src/components/atoms/SvgIcon/PlayIcon.d.ts +0 -6
- package/dist/src/components/atoms/SvgIcon/PlayIcon.js +0 -8
- package/dist/src/components/atoms/SvgIcon/ShopIcon.d.ts +0 -5
- package/dist/src/components/atoms/SvgIcon/ShopIcon.js +0 -7
- package/dist/src/components/atoms/SvgIcon/ShopifyIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/ShopifyIcon.js +0 -6
- package/dist/src/components/atoms/SvgIcon/StatsIcon.d.ts +0 -6
- package/dist/src/components/atoms/SvgIcon/StatsIcon.js +0 -12
- package/dist/src/components/atoms/SvgIcon/TimesIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/TimesIcon.js +0 -6
- package/dist/src/components/atoms/SvgIcon/WarningIcon.d.ts +0 -6
- package/dist/src/components/atoms/SvgIcon/WarningIcon.js +0 -8
- package/dist/src/components/atoms/SvgIcon/index.d.ts +0 -2
- package/dist/src/components/atoms/SvgIcon/index.js +0 -2
- package/dist/src/components/core/App/App.d.ts +0 -11
- package/dist/src/components/core/App/App.js +0 -35
- package/dist/src/components/core/App/index.d.ts +0 -2
- package/dist/src/components/core/App/index.js +0 -2
- package/dist/src/components/core/PanelManager/PanelManager.d.ts +0 -21
- package/dist/src/components/core/PanelManager/PanelManager.js +0 -104
- package/dist/src/components/core/PanelManager/index.d.ts +0 -2
- package/dist/src/components/core/PanelManager/index.js +0 -2
- package/dist/src/components/core/ScrollableContainer/FocusableItem.d.ts +0 -11
- package/dist/src/components/core/ScrollableContainer/FocusableItem.js +0 -24
- package/dist/src/components/core/ScrollableContainer/ScrollableContainer.d.ts +0 -54
- package/dist/src/components/core/ScrollableContainer/ScrollableContainer.js +0 -111
- package/dist/src/components/core/ScrollableContainer/index.d.ts +0 -6
- package/dist/src/components/core/ScrollableContainer/index.js +0 -5
- package/dist/src/components/core/ScrollableContainer/useScrollableContainer.d.ts +0 -14
- package/dist/src/components/core/ScrollableContainer/useScrollableContainer.js +0 -22
- package/dist/src/components/molecules/ActionButton/ActionButton.d.ts +0 -96
- package/dist/src/components/molecules/ActionButton/ActionButton.js +0 -15
- package/dist/src/components/molecules/ActionButton/index.d.ts +0 -2
- package/dist/src/components/molecules/ActionButton/index.js +0 -2
- package/dist/src/components/molecules/HeadshotImage/HeadshotImage.d.ts +0 -16
- package/dist/src/components/molecules/HeadshotImage/HeadshotImage.js +0 -50
- package/dist/src/components/molecules/HeadshotImage/index.d.ts +0 -2
- package/dist/src/components/molecules/HeadshotImage/index.js +0 -2
- package/dist/src/components/molecules/NetworkDialog/NetworkDialog.d.ts +0 -11
- package/dist/src/components/molecules/NetworkDialog/NetworkDialog.js +0 -34
- package/dist/src/components/molecules/NetworkDialog/index.d.ts +0 -2
- package/dist/src/components/molecules/NetworkDialog/index.js +0 -2
- package/dist/src/components/molecules/NetworkError/NetworkError.d.ts +0 -104
- package/dist/src/components/molecules/NetworkError/NetworkError.js +0 -26
- package/dist/src/components/molecules/NetworkError/index.d.ts +0 -2
- package/dist/src/components/molecules/NetworkError/index.js +0 -2
- package/dist/src/components/molecules/PanelNavButton/PanelNavButton.d.ts +0 -107
- package/dist/src/components/molecules/PanelNavButton/PanelNavButton.js +0 -36
- package/dist/src/components/molecules/PanelNavButton/index.d.ts +0 -2
- package/dist/src/components/molecules/PanelNavButton/index.js +0 -2
- package/dist/src/components/molecules/SegmentButton/SegmentButton.d.ts +0 -9
- package/dist/src/components/molecules/SegmentButton/SegmentButton.js +0 -10
- package/dist/src/components/molecules/SegmentButton/index.d.ts +0 -2
- package/dist/src/components/molecules/SegmentButton/index.js +0 -2
- package/dist/src/components/molecules/TabLoadError/TabLoadError.d.ts +0 -96
- package/dist/src/components/molecules/TabLoadError/TabLoadError.js +0 -14
- package/dist/src/components/molecules/TabLoadError/index.d.ts +0 -2
- package/dist/src/components/molecules/TabLoadError/index.js +0 -2
- package/dist/src/components/molecules/WatchButton/WatchButton.d.ts +0 -10
- package/dist/src/components/molecules/WatchButton/WatchButton.js +0 -15
- package/dist/src/components/molecules/WatchButton/index.d.ts +0 -2
- package/dist/src/components/molecules/WatchButton/index.js +0 -2
- package/dist/src/components/organisms/PanelNavigation/PanelNavigation.d.ts +0 -17
- package/dist/src/components/organisms/PanelNavigation/PanelNavigation.js +0 -64
- package/dist/src/components/organisms/PanelNavigation/index.d.ts +0 -2
- package/dist/src/components/organisms/PanelNavigation/index.js +0 -2
- package/dist/src/components/organisms/SegmentController/SegmentController.d.ts +0 -12
- package/dist/src/components/organisms/SegmentController/SegmentController.js +0 -35
- package/dist/src/components/organisms/SegmentController/index.d.ts +0 -3
- package/dist/src/components/organisms/SegmentController/index.js +0 -2
- package/dist/src/development/MaestroEventDelegate.d.ts +0 -27
- package/dist/src/development/MaestroEventDelegate.js +0 -110
- package/dist/src/development/TimeSeek.d.ts +0 -22
- package/dist/src/development/TimeSeek.js +0 -218
- package/dist/src/development/development.d.ts +0 -1
- package/dist/src/development/development.js +0 -39
- package/dist/src/external/AxiosNetworkClient.d.ts +0 -28
- package/dist/src/external/AxiosNetworkClient.js +0 -110
- package/dist/src/external/LocalStorageCacheManager.d.ts +0 -65
- package/dist/src/external/LocalStorageCacheManager.js +0 -213
- package/dist/src/external/ReactRenderer.d.ts +0 -17
- package/dist/src/external/ReactRenderer.js +0 -66
- package/dist/src/external/mocks/MockExternalNetworkClient.d.ts +0 -104
- package/dist/src/external/mocks/MockExternalNetworkClient.js +0 -187
- package/dist/src/external/ports/cacheManager.d.ts +0 -17
- package/dist/src/external/ports/cacheManager.js +0 -1
- package/dist/src/external/ports/networkClient.d.ts +0 -19
- package/dist/src/external/ports/networkClient.js +0 -1
- package/dist/src/external/ports/renderer.d.ts +0 -4
- package/dist/src/external/ports/renderer.js +0 -1
- package/dist/src/external/spatial-navigation/__mocks__/withFocusable.d.ts +0 -8
- package/dist/src/external/spatial-navigation/__mocks__/withFocusable.js +0 -7
- package/dist/src/external/spatial-navigation/index.d.ts +0 -4
- package/dist/src/external/spatial-navigation/index.js +0 -3
- package/dist/src/external/spatial-navigation/measureLayout.d.ts +0 -2
- package/dist/src/external/spatial-navigation/measureLayout.js +0 -30
- package/dist/src/external/spatial-navigation/spatialNavigation.d.ts +0 -160
- package/dist/src/external/spatial-navigation/spatialNavigation.js +0 -944
- package/dist/src/external/spatial-navigation/utils.d.ts +0 -22
- package/dist/src/external/spatial-navigation/utils.js +0 -6
- package/dist/src/external/spatial-navigation/visualDebugger.d.ts +0 -17
- package/dist/src/external/spatial-navigation/visualDebugger.js +0 -76
- package/dist/src/external/spatial-navigation/withFocusable.d.ts +0 -131
- package/dist/src/external/spatial-navigation/withFocusable.js +0 -254
- package/dist/src/helpers/Observable.d.ts +0 -12
- package/dist/src/helpers/Observable.js +0 -37
- package/dist/src/helpers/site.d.ts +0 -1
- package/dist/src/helpers/site.js +0 -6
- package/dist/src/helpers/siteConfig.d.ts +0 -1
- package/dist/src/helpers/siteConfig.js +0 -5
- package/dist/src/helpers/strings.d.ts +0 -2
- package/dist/src/helpers/strings.js +0 -14
- package/dist/src/helpers/url.d.ts +0 -1
- package/dist/src/helpers/url.js +0 -12
- package/dist/src/hooks/useMaxHeightToBottom.d.ts +0 -11
- package/dist/src/hooks/useMaxHeightToBottom.js +0 -48
- package/dist/src/index.d.ts +0 -53
- package/dist/src/index.js +0 -197
- package/dist/src/interfaces/IMaestroEvent.d.ts +0 -108
- package/dist/src/interfaces/IMaestroEvent.js +0 -1
- package/dist/src/interfaces/IMaestroEventDelegate.d.ts +0 -81
- package/dist/src/interfaces/IMaestroEventDelegate.js +0 -1
- package/dist/src/interfaces/IMaestroManager.d.ts +0 -81
- package/dist/src/interfaces/IMaestroManager.js +0 -1
- package/dist/src/interfaces/IUserSettings.d.ts +0 -44
- package/dist/src/interfaces/IUserSettings.js +0 -20
- package/dist/src/models/IModel.d.ts +0 -7
- package/dist/src/models/IModel.js +0 -1
- package/dist/src/models/IPanel.d.ts +0 -19
- package/dist/src/models/IPanel.js +0 -12
- package/dist/src/models/ITheme.d.ts +0 -77
- package/dist/src/models/ITheme.js +0 -20
- package/dist/src/modules/espn/bets/interfaces/IBets.d.ts +0 -192
- package/dist/src/modules/espn/bets/interfaces/IBets.js +0 -1
- package/dist/src/modules/espn/bets/interfaces/IBetsViewModel.d.ts +0 -5
- package/dist/src/modules/espn/bets/interfaces/IBetsViewModel.js +0 -1
- package/dist/src/modules/espn/bets/mocks.d.ts +0 -2
- package/dist/src/modules/espn/bets/mocks.js +0 -573
- package/dist/src/modules/espn/bets/services/BetsService.d.ts +0 -81
- package/dist/src/modules/espn/bets/services/BetsService.js +0 -123
- package/dist/src/modules/espn/bets/types/BetsAnalyticsTypes.d.ts +0 -8
- package/dist/src/modules/espn/bets/types/BetsAnalyticsTypes.js +0 -1
- package/dist/src/modules/espn/bets/view/BetsView.d.ts +0 -30
- package/dist/src/modules/espn/bets/view/BetsView.js +0 -169
- package/dist/src/modules/espn/bets/view/HotProps/HotPropsView.d.ts +0 -103
- package/dist/src/modules/espn/bets/view/HotProps/HotPropsView.js +0 -133
- package/dist/src/modules/espn/bets/view/SixPack/SixPackView.d.ts +0 -9
- package/dist/src/modules/espn/bets/view/SixPack/SixPackView.js +0 -77
- package/dist/src/modules/espn/bets/view/UserBets/BetResult/BetResult.d.ts +0 -6
- package/dist/src/modules/espn/bets/view/UserBets/BetResult/BetResult.js +0 -6
- package/dist/src/modules/espn/bets/view/UserBets/BetsCard/BetsCard.d.ts +0 -104
- package/dist/src/modules/espn/bets/view/UserBets/BetsCard/BetsCard.js +0 -140
- package/dist/src/modules/espn/bets/view/UserBets/BetsCard/BetsCardEvent.d.ts +0 -16
- package/dist/src/modules/espn/bets/view/UserBets/BetsCard/BetsCardEvent.js +0 -8
- package/dist/src/modules/espn/bets/view/UserBets/BetsCard/BetsCardFooter.d.ts +0 -7
- package/dist/src/modules/espn/bets/view/UserBets/BetsCard/BetsCardFooter.js +0 -18
- package/dist/src/modules/espn/bets/view/UserBets/Boost/Boost.d.ts +0 -7
- package/dist/src/modules/espn/bets/view/UserBets/Boost/Boost.js +0 -6
- package/dist/src/modules/espn/bets/view/UserBets/OutcomeBadge/OutcomeBadge.d.ts +0 -6
- package/dist/src/modules/espn/bets/view/UserBets/OutcomeBadge/OutcomeBadge.js +0 -9
- package/dist/src/modules/espn/bets/view/UserBets/Parlay/Parlay.d.ts +0 -8
- package/dist/src/modules/espn/bets/view/UserBets/Parlay/Parlay.js +0 -13
- package/dist/src/modules/espn/bets/view/UserBets/Straight/Straight.d.ts +0 -7
- package/dist/src/modules/espn/bets/view/UserBets/Straight/Straight.js +0 -6
- package/dist/src/modules/espn/bets/view/UserBets/Teaser/Teaser.d.ts +0 -7
- package/dist/src/modules/espn/bets/view/UserBets/Teaser/Teaser.js +0 -13
- package/dist/src/modules/espn/bets/view/UserBets/UserBetsView.d.ts +0 -25
- package/dist/src/modules/espn/bets/view/UserBets/UserBetsView.js +0 -107
- package/dist/src/modules/espn/bets/view/components/Bet/Bet.d.ts +0 -10
- package/dist/src/modules/espn/bets/view/components/Bet/Bet.js +0 -41
- package/dist/src/modules/espn/bets/view/components/BetPill/BetPill.d.ts +0 -6
- package/dist/src/modules/espn/bets/view/components/BetPill/BetPill.js +0 -6
- package/dist/src/modules/espn/bets/view/components/BetsCard/BetsCard.d.ts +0 -10
- package/dist/src/modules/espn/bets/view/components/BetsCard/BetsCard.js +0 -24
- package/dist/src/modules/espn/bets/view/components/BetsCard/BetsCardHeader.d.ts +0 -16
- package/dist/src/modules/espn/bets/view/components/BetsCard/BetsCardHeader.js +0 -20
- package/dist/src/modules/espn/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.d.ts +0 -7
- package/dist/src/modules/espn/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.js +0 -31
- package/dist/src/modules/espn/bets/view/components/GamblingDisclaimer/index.d.ts +0 -1
- package/dist/src/modules/espn/bets/view/components/GamblingDisclaimer/index.js +0 -1
- package/dist/src/modules/espn/bets/view/components/LocationWarning/LocationWarning.d.ts +0 -10
- package/dist/src/modules/espn/bets/view/components/LocationWarning/LocationWarning.js +0 -16
- package/dist/src/modules/espn/bets/view/components/PromoCodeBanner/PromoCodeBanner.d.ts +0 -5
- package/dist/src/modules/espn/bets/view/components/PromoCodeBanner/PromoCodeBanner.js +0 -45
- package/dist/src/modules/espn/bets/view/components/PromoCodeBanner/index.d.ts +0 -1
- package/dist/src/modules/espn/bets/view/components/PromoCodeBanner/index.js +0 -1
- package/dist/src/modules/espn/bets/view-model/BetsViewModel.d.ts +0 -218
- package/dist/src/modules/espn/bets/view-model/BetsViewModel.js +0 -947
- package/dist/src/modules/espn/components/TabLoadError/TabLoadError.d.ts +0 -96
- package/dist/src/modules/espn/components/TabLoadError/TabLoadError.js +0 -14
- package/dist/src/modules/espn/components/TabLoadError/index.d.ts +0 -2
- package/dist/src/modules/espn/components/TabLoadError/index.js +0 -2
- package/dist/src/modules/espn/fantasy/components/ExpandedAthleteList/ExpandedAthletesList.d.ts +0 -28
- package/dist/src/modules/espn/fantasy/components/ExpandedAthleteList/ExpandedAthletesList.js +0 -107
- package/dist/src/modules/espn/fantasy/components/ExpandedAthleteList/index.d.ts +0 -1
- package/dist/src/modules/espn/fantasy/components/ExpandedAthleteList/index.js +0 -1
- package/dist/src/modules/espn/fantasy/components/LeagueCard/LeagueCard.d.ts +0 -104
- package/dist/src/modules/espn/fantasy/components/LeagueCard/LeagueCard.js +0 -20
- package/dist/src/modules/espn/fantasy/components/LeagueCard/index.d.ts +0 -2
- package/dist/src/modules/espn/fantasy/components/LeagueCard/index.js +0 -2
- package/dist/src/modules/espn/fantasy/components/TopPlayerCard/TopPlayerCard.d.ts +0 -101
- package/dist/src/modules/espn/fantasy/components/TopPlayerCard/TopPlayerCard.js +0 -29
- package/dist/src/modules/espn/fantasy/components/TopPlayerCard/index.d.ts +0 -2
- package/dist/src/modules/espn/fantasy/components/TopPlayerCard/index.js +0 -2
- package/dist/src/modules/espn/fantasy/components/TournamentOverflowQR/TournamentOverflowQR.d.ts +0 -103
- package/dist/src/modules/espn/fantasy/components/TournamentOverflowQR/TournamentOverflowQR.js +0 -28
- package/dist/src/modules/espn/fantasy/components/TournamentOverflowQR/index.d.ts +0 -1
- package/dist/src/modules/espn/fantasy/components/TournamentOverflowQR/index.js +0 -1
- package/dist/src/modules/espn/fantasy/mocks.d.ts +0 -7620
- package/dist/src/modules/espn/fantasy/mocks.js +0 -3682
- package/dist/src/modules/espn/fantasy/services/FantasyService.d.ts +0 -76
- package/dist/src/modules/espn/fantasy/services/FantasyService.js +0 -127
- package/dist/src/modules/espn/fantasy/types.d.ts +0 -294
- package/dist/src/modules/espn/fantasy/types.js +0 -9
- package/dist/src/modules/espn/fantasy/view/ActiveAthletesMarquee/ActiveAthletesMarquee.d.ts +0 -21
- package/dist/src/modules/espn/fantasy/view/ActiveAthletesMarquee/ActiveAthletesMarquee.js +0 -74
- package/dist/src/modules/espn/fantasy/view/ActiveAthletesMarquee/index.d.ts +0 -2
- package/dist/src/modules/espn/fantasy/view/ActiveAthletesMarquee/index.js +0 -2
- package/dist/src/modules/espn/fantasy/view/FantasyHeaderView.d.ts +0 -8
- package/dist/src/modules/espn/fantasy/view/FantasyHeaderView.js +0 -8
- package/dist/src/modules/espn/fantasy/view/FantasyItemView.d.ts +0 -8
- package/dist/src/modules/espn/fantasy/view/FantasyItemView.js +0 -48
- package/dist/src/modules/espn/fantasy/view/FantasyView.d.ts +0 -34
- package/dist/src/modules/espn/fantasy/view/FantasyView.js +0 -213
- package/dist/src/modules/espn/fantasy/view/InactiveLeague/DraftDateCountdown.d.ts +0 -23
- package/dist/src/modules/espn/fantasy/view/InactiveLeague/DraftDateCountdown.js +0 -95
- package/dist/src/modules/espn/fantasy/view/InactiveLeague/InactiveLeague.d.ts +0 -100
- package/dist/src/modules/espn/fantasy/view/InactiveLeague/InactiveLeague.js +0 -13
- package/dist/src/modules/espn/fantasy/view/InactiveLeague/index.d.ts +0 -2
- package/dist/src/modules/espn/fantasy/view/InactiveLeague/index.js +0 -2
- package/dist/src/modules/espn/fantasy/view/LoginView/LoginView.d.ts +0 -96
- package/dist/src/modules/espn/fantasy/view/LoginView/LoginView.js +0 -27
- package/dist/src/modules/espn/fantasy/view/LoginView/index.d.ts +0 -2
- package/dist/src/modules/espn/fantasy/view/LoginView/index.js +0 -2
- package/dist/src/modules/espn/fantasy/view/MatchupPair/DoubleAthleteCard/DoubleAthleteCard.d.ts +0 -97
- package/dist/src/modules/espn/fantasy/view/MatchupPair/DoubleAthleteCard/DoubleAthleteCard.js +0 -25
- package/dist/src/modules/espn/fantasy/view/MatchupPair/DoubleAthleteCard/index.d.ts +0 -2
- package/dist/src/modules/espn/fantasy/view/MatchupPair/DoubleAthleteCard/index.js +0 -2
- package/dist/src/modules/espn/fantasy/view/MatchupPair/ExpandedDoubleAthleteCards.d.ts +0 -14
- package/dist/src/modules/espn/fantasy/view/MatchupPair/ExpandedDoubleAthleteCards.js +0 -9
- package/dist/src/modules/espn/fantasy/view/MatchupPair/MatchupPair.d.ts +0 -102
- package/dist/src/modules/espn/fantasy/view/MatchupPair/MatchupPair.js +0 -118
- package/dist/src/modules/espn/fantasy/view/MatchupPair/index.d.ts +0 -2
- package/dist/src/modules/espn/fantasy/view/MatchupPair/index.js +0 -2
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/ExpandedSingleAthleteCards.d.ts +0 -14
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/ExpandedSingleAthleteCards.js +0 -9
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/MatchupSingle.d.ts +0 -102
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/MatchupSingle.js +0 -108
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/SingleAthleteCard/SingleAthleteCard.d.ts +0 -97
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/SingleAthleteCard/SingleAthleteCard.js +0 -18
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/SingleAthleteCard/index.d.ts +0 -2
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/SingleAthleteCard/index.js +0 -2
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/index.d.ts +0 -2
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/index.js +0 -2
- package/dist/src/modules/espn/fantasy/view/PromoView/PromoView.d.ts +0 -100
- package/dist/src/modules/espn/fantasy/view/PromoView/PromoView.js +0 -12
- package/dist/src/modules/espn/fantasy/view/PromoView/index.d.ts +0 -2
- package/dist/src/modules/espn/fantasy/view/PromoView/index.js +0 -2
- package/dist/src/modules/espn/fantasy/view/TournamentBracketCard/TournamentBracketCard.d.ts +0 -101
- package/dist/src/modules/espn/fantasy/view/TournamentBracketCard/TournamentBracketCard.js +0 -37
- package/dist/src/modules/espn/fantasy/view/TournamentBracketCard/index.d.ts +0 -2
- package/dist/src/modules/espn/fantasy/view/TournamentBracketCard/index.js +0 -2
- package/dist/src/modules/espn/fantasy/view/index.d.ts +0 -2
- package/dist/src/modules/espn/fantasy/view/index.js +0 -2
- package/dist/src/modules/espn/fantasy/view-model/FantasyViewModel.FantasyPolling.d.ts +0 -32
- package/dist/src/modules/espn/fantasy/view-model/FantasyViewModel.FantasyPolling.js +0 -135
- package/dist/src/modules/espn/fantasy/view-model/FantasyViewModel.LeagueManagerPolling.d.ts +0 -32
- package/dist/src/modules/espn/fantasy/view-model/FantasyViewModel.LeagueManagerPolling.js +0 -144
- package/dist/src/modules/espn/fantasy/view-model/FantasyViewModel.TournamentPolling.d.ts +0 -32
- package/dist/src/modules/espn/fantasy/view-model/FantasyViewModel.TournamentPolling.js +0 -143
- package/dist/src/modules/espn/fantasy/view-model/FantasyViewModel.d.ts +0 -168
- package/dist/src/modules/espn/fantasy/view-model/FantasyViewModel.js +0 -815
- package/dist/src/modules/espn/key-plays/constants.d.ts +0 -3
- package/dist/src/modules/espn/key-plays/constants.js +0 -292
- package/dist/src/modules/espn/key-plays/interfaces/IKeyPlays.d.ts +0 -32
- package/dist/src/modules/espn/key-plays/interfaces/IKeyPlays.js +0 -14
- package/dist/src/modules/espn/key-plays/interfaces/IKeyPlaysResponse.d.ts +0 -44
- package/dist/src/modules/espn/key-plays/interfaces/IKeyPlaysResponse.js +0 -1
- package/dist/src/modules/espn/key-plays/interfaces/IKeyPlaysViewModel.d.ts +0 -17
- package/dist/src/modules/espn/key-plays/interfaces/IKeyPlaysViewModel.js +0 -1
- package/dist/src/modules/espn/key-plays/view/KeyPlayCardScoreTagView.d.ts +0 -9
- package/dist/src/modules/espn/key-plays/view/KeyPlayCardScoreTagView.js +0 -16
- package/dist/src/modules/espn/key-plays/view/KeyPlayCardView.d.ts +0 -27
- package/dist/src/modules/espn/key-plays/view/KeyPlayCardView.js +0 -115
- package/dist/src/modules/espn/key-plays/view/KeyPlayErrorStateView.d.ts +0 -13
- package/dist/src/modules/espn/key-plays/view/KeyPlayErrorStateView.js +0 -65
- package/dist/src/modules/espn/key-plays/view/KeyPlaysView.d.ts +0 -39
- package/dist/src/modules/espn/key-plays/view/KeyPlaysView.js +0 -179
- package/dist/src/modules/espn/key-plays/view-model/KeyPlaysViewModel.d.ts +0 -37
- package/dist/src/modules/espn/key-plays/view-model/KeyPlaysViewModel.js +0 -245
- package/dist/src/modules/espn/shop/mocks.d.ts +0 -22
- package/dist/src/modules/espn/shop/mocks.js +0 -391
- package/dist/src/modules/espn/shop/services/ShopService.d.ts +0 -23
- package/dist/src/modules/espn/shop/services/ShopService.js +0 -44
- package/dist/src/modules/espn/shop/types.d.ts +0 -164
- package/dist/src/modules/espn/shop/types.js +0 -7
- package/dist/src/modules/espn/shop/view/ProductDetailView/ProductDetailView.d.ts +0 -10
- package/dist/src/modules/espn/shop/view/ProductDetailView/ProductDetailView.js +0 -60
- package/dist/src/modules/espn/shop/view/ProductDetailView/index.d.ts +0 -2
- package/dist/src/modules/espn/shop/view/ProductDetailView/index.js +0 -2
- package/dist/src/modules/espn/shop/view/ShopView.d.ts +0 -38
- package/dist/src/modules/espn/shop/view/ShopView.js +0 -223
- package/dist/src/modules/espn/shop/view/components/BrowseCard/BrowseCard.d.ts +0 -103
- package/dist/src/modules/espn/shop/view/components/BrowseCard/BrowseCard.js +0 -23
- package/dist/src/modules/espn/shop/view/components/BrowseCard/index.d.ts +0 -2
- package/dist/src/modules/espn/shop/view/components/BrowseCard/index.js +0 -2
- package/dist/src/modules/espn/shop/view/components/ProductSummaryCard/ProductSummaryCard.d.ts +0 -104
- package/dist/src/modules/espn/shop/view/components/ProductSummaryCard/ProductSummaryCard.js +0 -26
- package/dist/src/modules/espn/shop/view/components/ProductSummaryCard/index.d.ts +0 -2
- package/dist/src/modules/espn/shop/view/components/ProductSummaryCard/index.js +0 -1
- package/dist/src/modules/espn/shop/view/components/ShopPromoView/ShopPromoView.d.ts +0 -8
- package/dist/src/modules/espn/shop/view/components/ShopPromoView/ShopPromoView.js +0 -19
- package/dist/src/modules/espn/shop/view/components/ShopPromoView/index.d.ts +0 -1
- package/dist/src/modules/espn/shop/view/components/ShopPromoView/index.js +0 -1
- package/dist/src/modules/espn/shop/view/components/ShopSection/ShopSection.d.ts +0 -12
- package/dist/src/modules/espn/shop/view/components/ShopSection/ShopSection.js +0 -34
- package/dist/src/modules/espn/shop/view/components/ShopSection/index.d.ts +0 -1
- package/dist/src/modules/espn/shop/view/components/ShopSection/index.js +0 -1
- package/dist/src/modules/espn/shop/view/index.d.ts +0 -2
- package/dist/src/modules/espn/shop/view/index.js +0 -2
- package/dist/src/modules/espn/shop/view-model/ShopViewModel.ShopPolling.d.ts +0 -31
- package/dist/src/modules/espn/shop/view-model/ShopViewModel.ShopPolling.js +0 -111
- package/dist/src/modules/espn/shop/view-model/ShopViewModel.d.ts +0 -73
- package/dist/src/modules/espn/shop/view-model/ShopViewModel.js +0 -323
- package/dist/src/modules/espn/stats/components/TeamStatistic.d.ts +0 -16
- package/dist/src/modules/espn/stats/components/TeamStatistic.js +0 -13
- package/dist/src/modules/espn/stats/interfaces/IStats.d.ts +0 -330
- package/dist/src/modules/espn/stats/interfaces/IStats.js +0 -46
- package/dist/src/modules/espn/stats/interfaces/IStatsViewModel.d.ts +0 -7
- package/dist/src/modules/espn/stats/interfaces/IStatsViewModel.js +0 -1
- package/dist/src/modules/espn/stats/mocks.d.ts +0 -2
- package/dist/src/modules/espn/stats/mocks.js +0 -746
- package/dist/src/modules/espn/stats/services/StatsService.d.ts +0 -54
- package/dist/src/modules/espn/stats/services/StatsService.js +0 -155
- package/dist/src/modules/espn/stats/utils/driveSummaryUtils.d.ts +0 -18
- package/dist/src/modules/espn/stats/utils/driveSummaryUtils.js +0 -48
- package/dist/src/modules/espn/stats/utils/playerStatusUtils.d.ts +0 -4
- package/dist/src/modules/espn/stats/utils/playerStatusUtils.js +0 -17
- package/dist/src/modules/espn/stats/utils.d.ts +0 -39
- package/dist/src/modules/espn/stats/utils.js +0 -62
- package/dist/src/modules/espn/stats/view/ActiveAthletes/ActiveAthletes.d.ts +0 -22
- package/dist/src/modules/espn/stats/view/ActiveAthletes/ActiveAthletes.js +0 -98
- package/dist/src/modules/espn/stats/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.d.ts +0 -4
- package/dist/src/modules/espn/stats/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.js +0 -27
- package/dist/src/modules/espn/stats/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.d.ts +0 -22
- package/dist/src/modules/espn/stats/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.js +0 -89
- package/dist/src/modules/espn/stats/view/ActiveAthletes/index.d.ts +0 -2
- package/dist/src/modules/espn/stats/view/ActiveAthletes/index.js +0 -2
- package/dist/src/modules/espn/stats/view/CareerMatchup/CareerMatchup.d.ts +0 -101
- package/dist/src/modules/espn/stats/view/CareerMatchup/CareerMatchup.js +0 -59
- package/dist/src/modules/espn/stats/view/CareerMatchup/index.d.ts +0 -1
- package/dist/src/modules/espn/stats/view/CareerMatchup/index.js +0 -1
- package/dist/src/modules/espn/stats/view/DriveSummary/DrivePlayCard.d.ts +0 -105
- package/dist/src/modules/espn/stats/view/DriveSummary/DrivePlayCard.js +0 -32
- package/dist/src/modules/espn/stats/view/DriveSummary/DriveSummary.d.ts +0 -10
- package/dist/src/modules/espn/stats/view/DriveSummary/DriveSummary.js +0 -40
- package/dist/src/modules/espn/stats/view/DriveSummary/ExpandedItems/DriveSummaryExpanded.d.ts +0 -27
- package/dist/src/modules/espn/stats/view/DriveSummary/ExpandedItems/DriveSummaryExpanded.js +0 -129
- package/dist/src/modules/espn/stats/view/DriveSummary/Header/DriveSummaryHeader.d.ts +0 -12
- package/dist/src/modules/espn/stats/view/DriveSummary/Header/DriveSummaryHeader.js +0 -26
- package/dist/src/modules/espn/stats/view/DriveSummary/MainStat/MainStat.d.ts +0 -10
- package/dist/src/modules/espn/stats/view/DriveSummary/MainStat/MainStat.js +0 -24
- package/dist/src/modules/espn/stats/view/DriveSummary/index.d.ts +0 -2
- package/dist/src/modules/espn/stats/view/DriveSummary/index.js +0 -2
- package/dist/src/modules/espn/stats/view/GameLeaders/GameLeaders.d.ts +0 -9
- package/dist/src/modules/espn/stats/view/GameLeaders/GameLeaders.js +0 -22
- package/dist/src/modules/espn/stats/view/GameLeaders/index.d.ts +0 -2
- package/dist/src/modules/espn/stats/view/GameLeaders/index.js +0 -2
- package/dist/src/modules/espn/stats/view/MatchPredictor/DonutChart/DonutChart.d.ts +0 -17
- package/dist/src/modules/espn/stats/view/MatchPredictor/DonutChart/DonutChart.js +0 -55
- package/dist/src/modules/espn/stats/view/MatchPredictor/DonutChart/index.d.ts +0 -2
- package/dist/src/modules/espn/stats/view/MatchPredictor/DonutChart/index.js +0 -1
- package/dist/src/modules/espn/stats/view/MatchPredictor/MatchPredictorView.d.ts +0 -100
- package/dist/src/modules/espn/stats/view/MatchPredictor/MatchPredictorView.js +0 -60
- package/dist/src/modules/espn/stats/view/MatchPredictor/index.d.ts +0 -3
- package/dist/src/modules/espn/stats/view/MatchPredictor/index.js +0 -2
- package/dist/src/modules/espn/stats/view/Penalties/Penalties.d.ts +0 -9
- package/dist/src/modules/espn/stats/view/Penalties/Penalties.js +0 -6
- package/dist/src/modules/espn/stats/view/Penalties/index.d.ts +0 -2
- package/dist/src/modules/espn/stats/view/Penalties/index.js +0 -2
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/ExpandedPlayerStats.d.ts +0 -16
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/ExpandedPlayerStats.js +0 -66
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/PlayerSeasonStatsCard.d.ts +0 -99
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/PlayerSeasonStatsCard.js +0 -26
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/PlayerSeasonStatsMinified.d.ts +0 -6
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/PlayerSeasonStatsMinified.js +0 -17
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/PlayerSeasonStatsView.d.ts +0 -8
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/PlayerSeasonStatsView.js +0 -165
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/index.d.ts +0 -1
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/index.js +0 -1
- package/dist/src/modules/espn/stats/view/RecentGames/RecentGames.d.ts +0 -100
- package/dist/src/modules/espn/stats/view/RecentGames/RecentGames.js +0 -23
- package/dist/src/modules/espn/stats/view/RecentGames/index.d.ts +0 -2
- package/dist/src/modules/espn/stats/view/RecentGames/index.js +0 -2
- package/dist/src/modules/espn/stats/view/ScoringSummary/ExpandedScores/ExpandedScores.d.ts +0 -30
- package/dist/src/modules/espn/stats/view/ScoringSummary/ExpandedScores/ExpandedScores.js +0 -123
- package/dist/src/modules/espn/stats/view/ScoringSummary/ExpandedScores/ExpandedSummary.d.ts +0 -100
- package/dist/src/modules/espn/stats/view/ScoringSummary/ExpandedScores/ExpandedSummary.js +0 -24
- package/dist/src/modules/espn/stats/view/ScoringSummary/ExpandedScores/index.d.ts +0 -2
- package/dist/src/modules/espn/stats/view/ScoringSummary/ExpandedScores/index.js +0 -2
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoreItem/ScoreItem.d.ts +0 -100
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoreItem/ScoreItem.js +0 -62
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoreItem/index.d.ts +0 -2
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoreItem/index.js +0 -2
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoresSection/ScoresSection.d.ts +0 -6
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoresSection/ScoresSection.js +0 -23
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoresSection/index.d.ts +0 -2
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoresSection/index.js +0 -2
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoringSummary.d.ts +0 -12
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoringSummary.js +0 -167
- package/dist/src/modules/espn/stats/view/ScoringSummary/index.d.ts +0 -1
- package/dist/src/modules/espn/stats/view/ScoringSummary/index.js +0 -1
- package/dist/src/modules/espn/stats/view/StatsItemView.d.ts +0 -8
- package/dist/src/modules/espn/stats/view/StatsItemView.js +0 -66
- package/dist/src/modules/espn/stats/view/StatsQRCode/StatsQRCodeView.d.ts +0 -100
- package/dist/src/modules/espn/stats/view/StatsQRCode/StatsQRCodeView.js +0 -36
- package/dist/src/modules/espn/stats/view/StatsQRCode/index.d.ts +0 -2
- package/dist/src/modules/espn/stats/view/StatsQRCode/index.js +0 -1
- package/dist/src/modules/espn/stats/view/StatsView.d.ts +0 -29
- package/dist/src/modules/espn/stats/view/StatsView.js +0 -164
- package/dist/src/modules/espn/stats/view/TeamStats/TeamStatsView.d.ts +0 -101
- package/dist/src/modules/espn/stats/view/TeamStats/TeamStatsView.js +0 -77
- package/dist/src/modules/espn/stats/view/TeamStats/index.d.ts +0 -2
- package/dist/src/modules/espn/stats/view/TeamStats/index.js +0 -1
- package/dist/src/modules/espn/stats/view/Teams/StatsCarousel.d.ts +0 -25
- package/dist/src/modules/espn/stats/view/Teams/StatsCarousel.js +0 -83
- package/dist/src/modules/espn/stats/view/Teams/StatsProgressBar.d.ts +0 -6
- package/dist/src/modules/espn/stats/view/Teams/StatsProgressBar.js +0 -19
- package/dist/src/modules/espn/stats/view/Teams/Teams.d.ts +0 -100
- package/dist/src/modules/espn/stats/view/Teams/Teams.js +0 -39
- package/dist/src/modules/espn/stats/view/Teams/index.d.ts +0 -2
- package/dist/src/modules/espn/stats/view/Teams/index.js +0 -2
- package/dist/src/modules/espn/stats/view/WinProbability/WinProbability.d.ts +0 -100
- package/dist/src/modules/espn/stats/view/WinProbability/WinProbability.js +0 -28
- package/dist/src/modules/espn/stats/view/WinProbability/index.d.ts +0 -2
- package/dist/src/modules/espn/stats/view/WinProbability/index.js +0 -2
- package/dist/src/modules/espn/stats/view/components/AthletesStatistics/AthletesStatistics.d.ts +0 -115
- package/dist/src/modules/espn/stats/view/components/AthletesStatistics/AthletesStatistics.js +0 -89
- package/dist/src/modules/espn/stats/view/components/AthletesStatistics/StatisticTable.d.ts +0 -3
- package/dist/src/modules/espn/stats/view/components/AthletesStatistics/StatisticTable.js +0 -12
- package/dist/src/modules/espn/stats/view/components/AthletesStatistics/index.d.ts +0 -2
- package/dist/src/modules/espn/stats/view/components/AthletesStatistics/index.js +0 -2
- package/dist/src/modules/espn/stats/view/index.d.ts +0 -2
- package/dist/src/modules/espn/stats/view/index.js +0 -2
- package/dist/src/modules/espn/stats/view-model/StatsViewModel.d.ts +0 -322
- package/dist/src/modules/espn/stats/view-model/StatsViewModel.js +0 -1416
- package/dist/src/modules/fox/components/TabLoadError/TabLoadError.d.ts +0 -96
- package/dist/src/modules/fox/components/TabLoadError/TabLoadError.js +0 -19
- package/dist/src/modules/fox/components/TabLoadError/index.d.ts +0 -2
- package/dist/src/modules/fox/components/TabLoadError/index.js +0 -2
- package/dist/src/modules/fox/key-plays/view/FoxKeyPlays.d.ts +0 -2
- package/dist/src/modules/fox/key-plays/view/FoxKeyPlays.js +0 -5
- package/dist/src/modules/fox/multi-view/interfaces/IMultiViewViewModel.d.ts +0 -3
- package/dist/src/modules/fox/multi-view/interfaces/IMultiViewViewModel.js +0 -1
- package/dist/src/modules/fox/multi-view/services/MultiViewService.d.ts +0 -104
- package/dist/src/modules/fox/multi-view/services/MultiViewService.js +0 -97
- package/dist/src/modules/fox/multi-view/types.d.ts +0 -68
- package/dist/src/modules/fox/multi-view/types.js +0 -86
- package/dist/src/modules/fox/multi-view/view/BuildYourOwn/BuildYourOwn.d.ts +0 -7
- package/dist/src/modules/fox/multi-view/view/BuildYourOwn/BuildYourOwn.js +0 -99
- package/dist/src/modules/fox/multi-view/view/BuildYourOwn/index.d.ts +0 -2
- package/dist/src/modules/fox/multi-view/view/BuildYourOwn/index.js +0 -2
- package/dist/src/modules/fox/multi-view/view/CuratedMultiview/CuratedMultiviews.d.ts +0 -8
- package/dist/src/modules/fox/multi-view/view/CuratedMultiview/CuratedMultiviews.js +0 -92
- package/dist/src/modules/fox/multi-view/view/CuratedMultiview/index.d.ts +0 -2
- package/dist/src/modules/fox/multi-view/view/CuratedMultiview/index.js +0 -2
- package/dist/src/modules/fox/multi-view/view/FoxMultiView.d.ts +0 -3
- package/dist/src/modules/fox/multi-view/view/FoxMultiView.js +0 -68
- package/dist/src/modules/fox/multi-view/view/components/BuildYourOwnTabs/BuildYourOwnTabs.d.ts +0 -8
- package/dist/src/modules/fox/multi-view/view/components/BuildYourOwnTabs/BuildYourOwnTabs.js +0 -30
- package/dist/src/modules/fox/multi-view/view/components/BuildYourOwnTabs/index.d.ts +0 -2
- package/dist/src/modules/fox/multi-view/view/components/BuildYourOwnTabs/index.js +0 -2
- package/dist/src/modules/fox/multi-view/view/components/CustomMultiviewStreamsCard/CustomMultiviewStreamsCard.d.ts +0 -118
- package/dist/src/modules/fox/multi-view/view/components/CustomMultiviewStreamsCard/CustomMultiviewStreamsCard.js +0 -51
- package/dist/src/modules/fox/multi-view/view/components/CustomMultiviewStreamsCard/index.d.ts +0 -2
- package/dist/src/modules/fox/multi-view/view/components/CustomMultiviewStreamsCard/index.js +0 -2
- package/dist/src/modules/fox/multi-view/view/components/LayoutSelector/LayoutSelector.d.ts +0 -13
- package/dist/src/modules/fox/multi-view/view/components/LayoutSelector/LayoutSelector.js +0 -40
- package/dist/src/modules/fox/multi-view/view/components/LayoutSelector/index.d.ts +0 -2
- package/dist/src/modules/fox/multi-view/view/components/LayoutSelector/index.js +0 -2
- package/dist/src/modules/fox/multi-view/view/components/curated-multiview-card/CuratedMultiviewCard.d.ts +0 -101
- package/dist/src/modules/fox/multi-view/view/components/curated-multiview-card/CuratedMultiviewCard.js +0 -41
- package/dist/src/modules/fox/multi-view/view/components/curated-multiview-card/index.d.ts +0 -2
- package/dist/src/modules/fox/multi-view/view/components/curated-multiview-card/index.js +0 -2
- package/dist/src/modules/fox/multi-view/view-model/MultiViewViewModel.d.ts +0 -84
- package/dist/src/modules/fox/multi-view/view-model/MultiViewViewModel.js +0 -509
- package/dist/src/modules/fox/multi-view/view-model/index.d.ts +0 -1
- package/dist/src/modules/fox/multi-view/view-model/index.js +0 -1
- package/dist/src/modules/fox/stats/view/FoxStatsView.d.ts +0 -2
- package/dist/src/modules/fox/stats/view/FoxStatsView.js +0 -5
- package/dist/src/modules/maestro/builder/components/BuilderSection/BuilderSection.d.ts +0 -11
- package/dist/src/modules/maestro/builder/components/BuilderSection/BuilderSection.js +0 -52
- package/dist/src/modules/maestro/builder/components/BuilderSection/index.d.ts +0 -2
- package/dist/src/modules/maestro/builder/components/BuilderSection/index.js +0 -2
- package/dist/src/modules/maestro/builder/components/ExpandableCard/ExpandableCard.d.ts +0 -110
- package/dist/src/modules/maestro/builder/components/ExpandableCard/ExpandableCard.js +0 -37
- package/dist/src/modules/maestro/builder/components/ExpandableCard/index.d.ts +0 -2
- package/dist/src/modules/maestro/builder/components/ExpandableCard/index.js +0 -2
- package/dist/src/modules/maestro/builder/components/SimpleCard/SimpleCard.d.ts +0 -104
- package/dist/src/modules/maestro/builder/components/SimpleCard/SimpleCard.js +0 -12
- package/dist/src/modules/maestro/builder/components/SimpleCard/index.d.ts +0 -2
- package/dist/src/modules/maestro/builder/components/SimpleCard/index.js +0 -2
- package/dist/src/modules/maestro/builder/index.d.ts +0 -7
- package/dist/src/modules/maestro/builder/index.js +0 -7
- package/dist/src/modules/maestro/builder/mocks/mockBuilderPanel.d.ts +0 -149
- package/dist/src/modules/maestro/builder/mocks/mockBuilderPanel.js +0 -240
- package/dist/src/modules/maestro/builder/types.d.ts +0 -52
- package/dist/src/modules/maestro/builder/types.js +0 -1
- package/dist/src/modules/maestro/builder/view/BuilderPanelView.d.ts +0 -4
- package/dist/src/modules/maestro/builder/view/BuilderPanelView.js +0 -52
- package/dist/src/modules/maestro/builder/view-model/BuilderPanelViewModel.d.ts +0 -40
- package/dist/src/modules/maestro/builder/view-model/BuilderPanelViewModel.js +0 -229
- package/dist/src/modules/maestro/builder/view-model/index.d.ts +0 -1
- package/dist/src/modules/maestro/builder/view-model/index.js +0 -1
- package/dist/src/modules/maestro/hello-world/HelloWorldImage.d.ts +0 -2
- package/dist/src/modules/maestro/hello-world/HelloWorldImage.js +0 -32
- package/dist/src/modules/maestro/hello-world/HelloWorldView.d.ts +0 -11
- package/dist/src/modules/maestro/hello-world/HelloWorldView.js +0 -40
- package/dist/src/modules/maestro/hello-world/index.d.ts +0 -2
- package/dist/src/modules/maestro/hello-world/index.js +0 -2
- package/dist/src/sentry.d.ts +0 -3
- package/dist/src/sentry.js +0 -51
- package/dist/src/services/AnalyticsService/AnalyticsService.d.ts +0 -85
- package/dist/src/services/AnalyticsService/AnalyticsService.js +0 -406
- package/dist/src/services/AnalyticsService/types.d.ts +0 -65
- package/dist/src/services/AnalyticsService/types.js +0 -1
- package/dist/src/services/InsightsService/InsightsPayloadBuilder.d.ts +0 -279
- package/dist/src/services/InsightsService/InsightsPayloadBuilder.js +0 -385
- package/dist/src/services/InsightsService/InsightsService.d.ts +0 -11
- package/dist/src/services/InsightsService/InsightsService.js +0 -74
- package/dist/src/services/NetworkManager/NetworkManager.d.ts +0 -153
- package/dist/src/services/NetworkManager/NetworkManager.js +0 -434
- package/dist/src/services/NetworkManager/errors.d.ts +0 -19
- package/dist/src/services/NetworkManager/errors.js +0 -59
- package/dist/src/services/NetworkManager/types.d.ts +0 -7
- package/dist/src/services/NetworkManager/types.js +0 -1
- package/dist/src/services/StaticService/StaticService.d.ts +0 -20
- package/dist/src/services/StaticService/StaticService.js +0 -86
- package/dist/src/services/StaticService/index.d.ts +0 -2
- package/dist/src/services/StaticService/index.js +0 -2
- package/dist/src/services/StaticService/mocks.d.ts +0 -3
- package/dist/src/services/StaticService/mocks.js +0 -119
- package/dist/src/services/StaticService/types.d.ts +0 -78
- package/dist/src/services/StaticService/types.js +0 -1
- package/dist/src/services/ThemeManager/constants.d.ts +0 -2
- package/dist/src/services/ThemeManager/constants.js +0 -47
- package/dist/src/services/UserSettingsManager.d.ts +0 -63
- package/dist/src/services/UserSettingsManager.js +0 -158
- package/dist/src/test-polyfills.d.ts +0 -1
- package/dist/src/test-polyfills.js +0 -15
- package/dist/src/view-models/MaestroEventViewModel.d.ts +0 -96
- package/dist/src/view-models/MaestroEventViewModel.js +0 -386
- package/dist/src/view-models/PanelManagerViewModel.d.ts +0 -49
- package/dist/src/view-models/PanelManagerViewModel.js +0 -195
- package/dist/src/view-models/ViewModel.d.ts +0 -12
- package/dist/src/view-models/ViewModel.js +0 -32
|
@@ -1,815 +0,0 @@
|
|
|
1
|
-
import { Observable } from '@/helpers/Observable';
|
|
2
|
-
import { captureException } from '@/sentry';
|
|
3
|
-
import SDK from '@/index';
|
|
4
|
-
import FantasyService from '@/modules/espn/fantasy/services/FantasyService';
|
|
5
|
-
import { isLeagueManagerHeadToHeadResponse, isLeagueManagerRotoResponse, } from '../types';
|
|
6
|
-
import FantasyPolling from './FantasyViewModel.FantasyPolling';
|
|
7
|
-
import LeagueManagerPolling from './FantasyViewModel.LeagueManagerPolling';
|
|
8
|
-
import TournamentPolling from './FantasyViewModel.TournamentPolling';
|
|
9
|
-
import { slugify, stringHashCode } from '@/helpers/strings';
|
|
10
|
-
import { MOCK_FANTASY_RESPONSE } from '../mocks';
|
|
11
|
-
const FANTASY_ERROR_STATE = {
|
|
12
|
-
NONE: 'none',
|
|
13
|
-
TAB_LOAD_FAILURE: 'tabLoadFailure',
|
|
14
|
-
};
|
|
15
|
-
export class FantasyViewModel {
|
|
16
|
-
constructor(eventId, delegate, analyticsService, options = {}) {
|
|
17
|
-
// Observable properties
|
|
18
|
-
Object.defineProperty(this, "fantasyItems", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true,
|
|
22
|
-
value: new Observable([])
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(this, "isDataLoading", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
configurable: true,
|
|
27
|
-
writable: true,
|
|
28
|
-
value: new Observable(false)
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(this, "hasEverSuccessfullyLoaded", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
configurable: true,
|
|
33
|
-
writable: true,
|
|
34
|
-
value: new Observable(false)
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(this, "isLoadingTc", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
configurable: true,
|
|
39
|
-
writable: true,
|
|
40
|
-
value: new Observable(false)
|
|
41
|
-
});
|
|
42
|
-
// Properties
|
|
43
|
-
Object.defineProperty(this, "eventId", {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
configurable: true,
|
|
46
|
-
writable: true,
|
|
47
|
-
value: void 0
|
|
48
|
-
});
|
|
49
|
-
Object.defineProperty(this, "delegate", {
|
|
50
|
-
enumerable: true,
|
|
51
|
-
configurable: true,
|
|
52
|
-
writable: true,
|
|
53
|
-
value: void 0
|
|
54
|
-
});
|
|
55
|
-
Object.defineProperty(this, "analyticsService", {
|
|
56
|
-
enumerable: true,
|
|
57
|
-
configurable: true,
|
|
58
|
-
writable: true,
|
|
59
|
-
value: void 0
|
|
60
|
-
});
|
|
61
|
-
Object.defineProperty(this, "fantasyService", {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
configurable: true,
|
|
64
|
-
writable: true,
|
|
65
|
-
value: void 0
|
|
66
|
-
});
|
|
67
|
-
Object.defineProperty(this, "fantasyPolling", {
|
|
68
|
-
enumerable: true,
|
|
69
|
-
configurable: true,
|
|
70
|
-
writable: true,
|
|
71
|
-
value: void 0
|
|
72
|
-
});
|
|
73
|
-
Object.defineProperty(this, "leagueManagerPolling", {
|
|
74
|
-
enumerable: true,
|
|
75
|
-
configurable: true,
|
|
76
|
-
writable: true,
|
|
77
|
-
value: void 0
|
|
78
|
-
});
|
|
79
|
-
Object.defineProperty(this, "tournamentPolling", {
|
|
80
|
-
enumerable: true,
|
|
81
|
-
configurable: true,
|
|
82
|
-
writable: true,
|
|
83
|
-
value: void 0
|
|
84
|
-
});
|
|
85
|
-
Object.defineProperty(this, "errorState", {
|
|
86
|
-
enumerable: true,
|
|
87
|
-
configurable: true,
|
|
88
|
-
writable: true,
|
|
89
|
-
value: new Observable('none')
|
|
90
|
-
});
|
|
91
|
-
Object.defineProperty(this, "leagueSortOrder", {
|
|
92
|
-
enumerable: true,
|
|
93
|
-
configurable: true,
|
|
94
|
-
writable: true,
|
|
95
|
-
value: new Map()
|
|
96
|
-
});
|
|
97
|
-
Object.defineProperty(this, "itemToLeagueKey", {
|
|
98
|
-
enumerable: true,
|
|
99
|
-
configurable: true,
|
|
100
|
-
writable: true,
|
|
101
|
-
value: new Map()
|
|
102
|
-
});
|
|
103
|
-
Object.defineProperty(this, "useMockData", {
|
|
104
|
-
enumerable: true,
|
|
105
|
-
configurable: true,
|
|
106
|
-
writable: true,
|
|
107
|
-
value: false
|
|
108
|
-
});
|
|
109
|
-
Object.defineProperty(this, "_promoData", {
|
|
110
|
-
enumerable: true,
|
|
111
|
-
configurable: true,
|
|
112
|
-
writable: true,
|
|
113
|
-
value: null
|
|
114
|
-
});
|
|
115
|
-
Object.defineProperty(this, "_fantasyLeagues", {
|
|
116
|
-
enumerable: true,
|
|
117
|
-
configurable: true,
|
|
118
|
-
writable: true,
|
|
119
|
-
value: []
|
|
120
|
-
});
|
|
121
|
-
Object.defineProperty(this, "_tournamentChallenges", {
|
|
122
|
-
enumerable: true,
|
|
123
|
-
configurable: true,
|
|
124
|
-
writable: true,
|
|
125
|
-
value: []
|
|
126
|
-
});
|
|
127
|
-
Object.defineProperty(this, "_promoItem", {
|
|
128
|
-
enumerable: true,
|
|
129
|
-
configurable: true,
|
|
130
|
-
writable: true,
|
|
131
|
-
value: null
|
|
132
|
-
});
|
|
133
|
-
Object.defineProperty(this, "_tcProcessingCount", {
|
|
134
|
-
enumerable: true,
|
|
135
|
-
configurable: true,
|
|
136
|
-
writable: true,
|
|
137
|
-
value: 0
|
|
138
|
-
});
|
|
139
|
-
this.useMockData = options.useMockData || false;
|
|
140
|
-
this.eventId = eventId;
|
|
141
|
-
this.delegate = delegate;
|
|
142
|
-
this.analyticsService = analyticsService;
|
|
143
|
-
this.fantasyService = new FantasyService();
|
|
144
|
-
this.fantasyPolling = new FantasyPolling(this.fantasyService);
|
|
145
|
-
this.leagueManagerPolling = new LeagueManagerPolling(this.fantasyService);
|
|
146
|
-
this.tournamentPolling = new TournamentPolling(this.fantasyService);
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Initialize the ViewModel and start data fetching
|
|
150
|
-
*/
|
|
151
|
-
async init() {
|
|
152
|
-
// Track panel view on initialization
|
|
153
|
-
this.trackPanelView();
|
|
154
|
-
await this.fetchData();
|
|
155
|
-
}
|
|
156
|
-
handleFetchError(error, context = 'FantasyViewModel.fetchData') {
|
|
157
|
-
captureException(error, { context });
|
|
158
|
-
console.error('[FANTASY] Error in ' + context + ':', error);
|
|
159
|
-
this.isDataLoading.value = false;
|
|
160
|
-
if (!this.hasEverSuccessfullyLoaded.value) {
|
|
161
|
-
this.errorState.value = 'tabLoadFailure';
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
async fetchData() {
|
|
165
|
-
try {
|
|
166
|
-
this.isDataLoading.value = true;
|
|
167
|
-
const isAuthenticated = await this.delegate.userIsAuthenticated();
|
|
168
|
-
if (!isAuthenticated) {
|
|
169
|
-
this.isDataLoading.value = false;
|
|
170
|
-
this.append({
|
|
171
|
-
id: 'not-logged-in',
|
|
172
|
-
type: 'notLoggedIn',
|
|
173
|
-
});
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
else if (this.fantasyItems.value.find((i) => i.type === 'notLoggedIn')) {
|
|
177
|
-
this.fantasyItems.value = [];
|
|
178
|
-
}
|
|
179
|
-
const swid = (await this.delegate.getUserSWID()) || '';
|
|
180
|
-
const jwt = (await this.delegate.getUserToken()) || '';
|
|
181
|
-
if (this.useMockData) {
|
|
182
|
-
await this.fetchMockData();
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
await this.fantasyPolling.refresh({
|
|
187
|
-
eventId: this.eventId,
|
|
188
|
-
swid,
|
|
189
|
-
jwt,
|
|
190
|
-
}, this.processFantasy.bind(this), this.handleFetchError.bind(this));
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
catch (error) {
|
|
194
|
-
this.handleFetchError(error);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
onEngage(type) {
|
|
198
|
-
this.analyticsService.panelClick({
|
|
199
|
-
type: 'espnFantasy',
|
|
200
|
-
name: 'fantasy_item_clicked',
|
|
201
|
-
metadata: {
|
|
202
|
-
card: type,
|
|
203
|
-
},
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
onAskLogin() {
|
|
207
|
-
this.fantasyItems.value = [];
|
|
208
|
-
this.delegate.onPanelEvent({
|
|
209
|
-
type: 'fantasy:request:login',
|
|
210
|
-
payload: {
|
|
211
|
-
onLoginSuccess: async () => {
|
|
212
|
-
await this.fetchData();
|
|
213
|
-
},
|
|
214
|
-
},
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* Clean up resources when the ViewModel is no longer needed
|
|
219
|
-
*/
|
|
220
|
-
cleanup() {
|
|
221
|
-
this.fantasyPolling.stop();
|
|
222
|
-
this.fantasyPolling.removeLastResponseHash();
|
|
223
|
-
this.leagueManagerPolling.stopAll();
|
|
224
|
-
this.tournamentPolling.stopAll();
|
|
225
|
-
this.leagueSortOrder.clear();
|
|
226
|
-
this.itemToLeagueKey.clear();
|
|
227
|
-
this._fantasyLeagues = [];
|
|
228
|
-
this._tournamentChallenges = [];
|
|
229
|
-
this._promoItem = null;
|
|
230
|
-
this._tcProcessingCount = 0;
|
|
231
|
-
this.isLoadingTc.value = false;
|
|
232
|
-
this.fantasyItems.value = [];
|
|
233
|
-
this.hasEverSuccessfullyLoaded.value = false;
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* Track panel view event
|
|
237
|
-
*/
|
|
238
|
-
async trackPanelView() {
|
|
239
|
-
try {
|
|
240
|
-
await this.analyticsService.panelView('espnFantasy');
|
|
241
|
-
}
|
|
242
|
-
catch (error) {
|
|
243
|
-
captureException(error, {
|
|
244
|
-
context: 'FantasyViewModel.trackPanelView',
|
|
245
|
-
});
|
|
246
|
-
console.error('[FANTASY] Error tracking panel view:', error);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
async processFantasy(data) {
|
|
250
|
-
try {
|
|
251
|
-
const token = (await this.delegate.getUserToken()) || '';
|
|
252
|
-
this.leagueManagerPolling.stopAll();
|
|
253
|
-
this.tournamentPolling.stopAll();
|
|
254
|
-
// Check hide_pickems flag from panel config
|
|
255
|
-
const config = SDK.getPageConfig();
|
|
256
|
-
const panel = config?.panels?.find((p) => p.panel_type === 'espnFantasy');
|
|
257
|
-
const hidePickems = panel?.renderer?.block_data?.hide_pickems || false;
|
|
258
|
-
const hasChallenges = (data.fantasyData?.challengeInformation || []).length > 0;
|
|
259
|
-
const noData = (data.fantasyData?.totalChallengeEntries || 0) +
|
|
260
|
-
(data.fantasyData?.totalFantasyLeagues || 0) ===
|
|
261
|
-
0;
|
|
262
|
-
// Clear and rebuild the sort order map based on preferences array order
|
|
263
|
-
this.leagueSortOrder.clear();
|
|
264
|
-
this.itemToLeagueKey.clear();
|
|
265
|
-
// Clear internal lists on full refresh
|
|
266
|
-
this._fantasyLeagues = [];
|
|
267
|
-
this._tournamentChallenges = [];
|
|
268
|
-
if (!hidePickems && hasChallenges) {
|
|
269
|
-
this.isLoadingTc.value = true;
|
|
270
|
-
data.fantasyData?.challengeInformation?.forEach((challenge) => {
|
|
271
|
-
if (challenge.gameType === 'BRACKET') {
|
|
272
|
-
this._tcProcessingCount++;
|
|
273
|
-
const key = `tc-${challenge.id}-${token}`;
|
|
274
|
-
this.tournamentPolling.refresh(key, {
|
|
275
|
-
challengeId: String(challenge.id),
|
|
276
|
-
competitionId: this.eventId,
|
|
277
|
-
token,
|
|
278
|
-
}, (data) => {
|
|
279
|
-
this.parseTournamentChallenge(data);
|
|
280
|
-
this._tcProcessingCount--;
|
|
281
|
-
if (this._tcProcessingCount === 0) {
|
|
282
|
-
this.isLoadingTc.value = false;
|
|
283
|
-
this.rebuildFantasyItems();
|
|
284
|
-
}
|
|
285
|
-
}, (error) => {
|
|
286
|
-
this.handleFetchError(error, 'FantasyViewModel.processFantasy.tournamentChallenge');
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
// If no BRACKET challenges were found, set isLoadingTc back to false
|
|
291
|
-
if (this._tcProcessingCount === 0) {
|
|
292
|
-
this.isLoadingTc.value = false;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
else {
|
|
296
|
-
this.isLoadingTc.value = false;
|
|
297
|
-
}
|
|
298
|
-
if (noData || (data.preferences || []).length === 0) {
|
|
299
|
-
const promo = await this.getPromoData();
|
|
300
|
-
if (promo) {
|
|
301
|
-
this._promoItem = {
|
|
302
|
-
id: 'promo',
|
|
303
|
-
type: 'promo',
|
|
304
|
-
background: promo.fantasy.promotion.background,
|
|
305
|
-
description: promo.fantasy.promotion.description,
|
|
306
|
-
logo: promo.fantasy.promotion.logo,
|
|
307
|
-
qrCode: promo.fantasy.promotion.qrCode,
|
|
308
|
-
title: promo.fantasy.promotion.title,
|
|
309
|
-
};
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
for (let i = 0; i < (data.preferences || []).length; i++) {
|
|
313
|
-
const pref = data.preferences[i];
|
|
314
|
-
const entry = pref.metaData?.entry || {};
|
|
315
|
-
const game = entry.abbrev;
|
|
316
|
-
const seasonId = entry.seasonId;
|
|
317
|
-
const leagueId = entry.groups?.[0]?.groupId;
|
|
318
|
-
const draftDate = entry.groups?.[0]?.draftDate;
|
|
319
|
-
if (!game || !seasonId || !leagueId || !entry.entryId) {
|
|
320
|
-
continue;
|
|
321
|
-
}
|
|
322
|
-
const key = `${game}-${leagueId}-${seasonId}-${token}`;
|
|
323
|
-
// Store the array index as the sort order for this league
|
|
324
|
-
this.leagueSortOrder.set(key, i);
|
|
325
|
-
this.leagueManagerPolling.refresh(key, {
|
|
326
|
-
game,
|
|
327
|
-
leagueId,
|
|
328
|
-
seasonId,
|
|
329
|
-
token,
|
|
330
|
-
proGameId: this.eventId,
|
|
331
|
-
teamId: entry.entryId,
|
|
332
|
-
}, (data) => {
|
|
333
|
-
if (entry.entryMetadata?.draftComplete === false) {
|
|
334
|
-
this.append(this.parseInactiveLeague(data, draftDate), key);
|
|
335
|
-
}
|
|
336
|
-
else if (isLeagueManagerHeadToHeadResponse(data)) {
|
|
337
|
-
const items = this.parseHeadToHead(data, pref);
|
|
338
|
-
if (items) {
|
|
339
|
-
for (const item of items) {
|
|
340
|
-
this.append(item, key);
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
else if (isLeagueManagerRotoResponse(data)) {
|
|
345
|
-
const items = this.parseRoto(data, pref);
|
|
346
|
-
if (items) {
|
|
347
|
-
for (const item of items) {
|
|
348
|
-
this.append(item, key);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
}, (error) => {
|
|
353
|
-
this.handleFetchError(error, 'FantasyViewModel.processFantasy.leagueManager');
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
// Mark successful load
|
|
357
|
-
this.hasEverSuccessfullyLoaded.value = true;
|
|
358
|
-
this.errorState.value = 'none';
|
|
359
|
-
this.isDataLoading.value = false;
|
|
360
|
-
// Initial rebuild even if empty, to ensure state is clean
|
|
361
|
-
this.rebuildFantasyItems();
|
|
362
|
-
}
|
|
363
|
-
catch (error) {
|
|
364
|
-
this.handleFetchError(error, 'FantasyViewModel.processFantasy');
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
parseRoto(data, preference) {
|
|
368
|
-
if (!data.matchups?.length ||
|
|
369
|
-
!data.leagueName ||
|
|
370
|
-
!data.scoringType ||
|
|
371
|
-
!data.gameId) {
|
|
372
|
-
return null;
|
|
373
|
-
}
|
|
374
|
-
const items = [];
|
|
375
|
-
for (const matchup of data.matchups) {
|
|
376
|
-
if (!matchup.teams?.length) {
|
|
377
|
-
continue;
|
|
378
|
-
}
|
|
379
|
-
const team = matchup.teams[0];
|
|
380
|
-
if (!team.logo ||
|
|
381
|
-
!data.sportLogo ||
|
|
382
|
-
!data.sportColor ||
|
|
383
|
-
team.points === undefined) {
|
|
384
|
-
continue;
|
|
385
|
-
}
|
|
386
|
-
const roster = team.roster || [];
|
|
387
|
-
const matchupRoster = [];
|
|
388
|
-
const activeAthletes = [];
|
|
389
|
-
for (const r of roster) {
|
|
390
|
-
if (!r.player) {
|
|
391
|
-
continue;
|
|
392
|
-
}
|
|
393
|
-
if (!r.player.abbrevName ||
|
|
394
|
-
!r.player.headshot ||
|
|
395
|
-
!r.player.proTeam?.triCode ||
|
|
396
|
-
!r.slot) {
|
|
397
|
-
continue;
|
|
398
|
-
}
|
|
399
|
-
matchupRoster.push({
|
|
400
|
-
athleteHeadshot: r.player.headshot,
|
|
401
|
-
athleteAbbrevName: r.player.abbrevName,
|
|
402
|
-
athletesSlot: r.slot,
|
|
403
|
-
teamTriCode: r.player.proTeam.triCode,
|
|
404
|
-
proGameStatusLines: r.player.proGameStatusLines || [],
|
|
405
|
-
});
|
|
406
|
-
if (r.player.currentlyWatching && r.player.points !== undefined) {
|
|
407
|
-
activeAthletes.push({
|
|
408
|
-
abbrevName: r.player.abbrevName,
|
|
409
|
-
points: `${r.player.points} FPTS`,
|
|
410
|
-
});
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
items.push({
|
|
414
|
-
id: stringHashCode(JSON.stringify(preference)).toString(),
|
|
415
|
-
type: 'matchup-single',
|
|
416
|
-
topPlayers: this.parseTopPlayers(data.topPlayers || []),
|
|
417
|
-
league: {
|
|
418
|
-
color: data.sportColor,
|
|
419
|
-
logo: data.sportLogo,
|
|
420
|
-
subtitle: data.name,
|
|
421
|
-
title: data.leagueName,
|
|
422
|
-
},
|
|
423
|
-
team: {
|
|
424
|
-
logo: team.logo,
|
|
425
|
-
scoringType: data.scoringType.includes('SEASON')
|
|
426
|
-
? 'SEASON'
|
|
427
|
-
: data.scoringType,
|
|
428
|
-
points: team.points,
|
|
429
|
-
},
|
|
430
|
-
roster: matchupRoster,
|
|
431
|
-
activeAthletes,
|
|
432
|
-
});
|
|
433
|
-
}
|
|
434
|
-
return items;
|
|
435
|
-
}
|
|
436
|
-
append(item, leagueKey) {
|
|
437
|
-
if (!item) {
|
|
438
|
-
return;
|
|
439
|
-
}
|
|
440
|
-
if (item.type === 'notLoggedIn') {
|
|
441
|
-
this.fantasyItems.value = [item];
|
|
442
|
-
return;
|
|
443
|
-
}
|
|
444
|
-
if (item.type === 'promo') {
|
|
445
|
-
this._promoItem = item;
|
|
446
|
-
}
|
|
447
|
-
// Store the league key for this item if provided
|
|
448
|
-
if (leagueKey) {
|
|
449
|
-
this.itemToLeagueKey.set(item.id, leagueKey);
|
|
450
|
-
}
|
|
451
|
-
if (item.type === 'matchup-pair' ||
|
|
452
|
-
item.type === 'matchup-single' ||
|
|
453
|
-
item.type === 'inactiveLeague') {
|
|
454
|
-
const existingItemIndex = this._fantasyLeagues.findIndex((i) => i.id === item.id);
|
|
455
|
-
if (existingItemIndex !== -1) {
|
|
456
|
-
this._fantasyLeagues[existingItemIndex] = item;
|
|
457
|
-
}
|
|
458
|
-
else {
|
|
459
|
-
this._fantasyLeagues.push(item);
|
|
460
|
-
}
|
|
461
|
-
// Sort items inside the group
|
|
462
|
-
this._fantasyLeagues.sort((a, b) => {
|
|
463
|
-
const keyA = this.itemToLeagueKey.get(a.id);
|
|
464
|
-
const keyB = this.itemToLeagueKey.get(b.id);
|
|
465
|
-
const orderA = keyA !== undefined
|
|
466
|
-
? this.leagueSortOrder.get(keyA) ?? Number.MAX_SAFE_INTEGER
|
|
467
|
-
: Number.MAX_SAFE_INTEGER;
|
|
468
|
-
const orderB = keyB !== undefined
|
|
469
|
-
? this.leagueSortOrder.get(keyB) ?? Number.MAX_SAFE_INTEGER
|
|
470
|
-
: Number.MAX_SAFE_INTEGER;
|
|
471
|
-
return orderA - orderB;
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
|
-
const existingGroupIndex = this._tournamentChallenges.findIndex((g) => g.id === leagueKey);
|
|
475
|
-
if (item.type === 'fantasy-header') {
|
|
476
|
-
if (existingGroupIndex !== -1) {
|
|
477
|
-
this._tournamentChallenges[existingGroupIndex].header = item;
|
|
478
|
-
}
|
|
479
|
-
else if (leagueKey) {
|
|
480
|
-
this._tournamentChallenges.push({
|
|
481
|
-
type: 'fantasy-group',
|
|
482
|
-
id: leagueKey,
|
|
483
|
-
header: item,
|
|
484
|
-
items: [],
|
|
485
|
-
});
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
else if (item.type === 'tournament-bracket-card' ||
|
|
489
|
-
item.type === 'tournament-overflow-qr') {
|
|
490
|
-
if (existingGroupIndex !== -1) {
|
|
491
|
-
const group = this._tournamentChallenges[existingGroupIndex];
|
|
492
|
-
const existingItemIndex = group.items.findIndex((i) => i.id === item.id);
|
|
493
|
-
if (existingItemIndex !== -1) {
|
|
494
|
-
group.items[existingItemIndex] = item;
|
|
495
|
-
}
|
|
496
|
-
else {
|
|
497
|
-
group.items.push(item);
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
else if (leagueKey) {
|
|
501
|
-
this._tournamentChallenges.push({
|
|
502
|
-
type: 'fantasy-group',
|
|
503
|
-
id: leagueKey,
|
|
504
|
-
header: {
|
|
505
|
-
type: 'fantasy-header',
|
|
506
|
-
id: `${leagueKey}-header`,
|
|
507
|
-
title: '',
|
|
508
|
-
},
|
|
509
|
-
items: [item],
|
|
510
|
-
});
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
this.rebuildFantasyItems();
|
|
514
|
-
}
|
|
515
|
-
rebuildFantasyItems() {
|
|
516
|
-
const items = [];
|
|
517
|
-
if (this._tournamentChallenges.length > 0) {
|
|
518
|
-
items.push(...this._tournamentChallenges);
|
|
519
|
-
}
|
|
520
|
-
if (this._fantasyLeagues.length > 0) {
|
|
521
|
-
items.push({
|
|
522
|
-
type: 'fantasy-group',
|
|
523
|
-
id: 'header-fantasy-leagues-group',
|
|
524
|
-
header: {
|
|
525
|
-
type: 'fantasy-header',
|
|
526
|
-
id: 'header-fantasy-leagues',
|
|
527
|
-
title: 'Fantasy Leagues',
|
|
528
|
-
},
|
|
529
|
-
items: this._fantasyLeagues,
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
if (this._promoItem &&
|
|
533
|
-
this._tournamentChallenges.length === 0 &&
|
|
534
|
-
this._fantasyLeagues.length === 0 &&
|
|
535
|
-
items.length === 0 &&
|
|
536
|
-
!this.isLoadingTc.value) {
|
|
537
|
-
items.push(this._promoItem);
|
|
538
|
-
}
|
|
539
|
-
this.fantasyItems.value = items;
|
|
540
|
-
}
|
|
541
|
-
parseHeadToHead(data, preference) {
|
|
542
|
-
if (!data.matchups?.length ||
|
|
543
|
-
!data.leagueName ||
|
|
544
|
-
!data.sportColor ||
|
|
545
|
-
!data.sportLogo ||
|
|
546
|
-
!data.gameId) {
|
|
547
|
-
return null;
|
|
548
|
-
}
|
|
549
|
-
const items = [];
|
|
550
|
-
for (const matchup of data.matchups) {
|
|
551
|
-
if (!matchup.home || !matchup.away) {
|
|
552
|
-
continue;
|
|
553
|
-
}
|
|
554
|
-
const roster = [];
|
|
555
|
-
const activeAthletes = [];
|
|
556
|
-
const homeRoster = matchup.home.roster || [];
|
|
557
|
-
const awayRoster = matchup.away.roster || [];
|
|
558
|
-
for (let i = 0; i < awayRoster.length; i++) {
|
|
559
|
-
const singleAwayRoster = awayRoster[i];
|
|
560
|
-
const singleHomeRoster = homeRoster[i];
|
|
561
|
-
if (!singleAwayRoster.player || !singleHomeRoster.player)
|
|
562
|
-
continue;
|
|
563
|
-
if (!singleAwayRoster.player.abbrevName ||
|
|
564
|
-
!singleAwayRoster.player.headshot ||
|
|
565
|
-
!singleAwayRoster.slot ||
|
|
566
|
-
!singleAwayRoster.player.proTeam?.triCode ||
|
|
567
|
-
!matchup.away?.record) {
|
|
568
|
-
continue;
|
|
569
|
-
}
|
|
570
|
-
if (!singleHomeRoster.player.abbrevName ||
|
|
571
|
-
!singleHomeRoster.player.headshot ||
|
|
572
|
-
!singleHomeRoster.slot ||
|
|
573
|
-
!singleHomeRoster.player.proTeam?.triCode ||
|
|
574
|
-
!matchup.home?.record) {
|
|
575
|
-
continue;
|
|
576
|
-
}
|
|
577
|
-
roster.push({
|
|
578
|
-
away: {
|
|
579
|
-
abbrevName: singleAwayRoster.player.abbrevName,
|
|
580
|
-
headshot: singleAwayRoster.player.headshot,
|
|
581
|
-
points: singleAwayRoster.player.points,
|
|
582
|
-
slot: singleAwayRoster.slot,
|
|
583
|
-
stats: singleAwayRoster.player.proGameStatusLines || [],
|
|
584
|
-
triCode: singleAwayRoster.player.proTeam.triCode,
|
|
585
|
-
projectedPoints: singleAwayRoster.player.projectedPoints,
|
|
586
|
-
},
|
|
587
|
-
home: {
|
|
588
|
-
abbrevName: singleHomeRoster.player.abbrevName,
|
|
589
|
-
headshot: singleHomeRoster.player.headshot,
|
|
590
|
-
points: singleHomeRoster.player.points,
|
|
591
|
-
slot: singleHomeRoster.slot,
|
|
592
|
-
stats: singleHomeRoster.player.proGameStatusLines || [],
|
|
593
|
-
triCode: singleHomeRoster.player.proTeam?.triCode,
|
|
594
|
-
projectedPoints: singleHomeRoster.player.projectedPoints,
|
|
595
|
-
},
|
|
596
|
-
});
|
|
597
|
-
if (singleHomeRoster.player.currentlyWatching &&
|
|
598
|
-
singleHomeRoster.player.points !== undefined) {
|
|
599
|
-
activeAthletes.push({
|
|
600
|
-
abbrevName: singleHomeRoster.player.abbrevName,
|
|
601
|
-
points: `${singleHomeRoster.player.points} FPTS`,
|
|
602
|
-
});
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
items.push({
|
|
606
|
-
id: stringHashCode(JSON.stringify(preference)).toString(),
|
|
607
|
-
type: 'matchup-pair',
|
|
608
|
-
awayTeam: {
|
|
609
|
-
logo: matchup.away.logo,
|
|
610
|
-
name: matchup.away.name,
|
|
611
|
-
points: data.scoringType === 'H2H_POINTS'
|
|
612
|
-
? String(matchup.away.points)
|
|
613
|
-
: matchup.away.score,
|
|
614
|
-
projectedPoints: matchup.away.projectedPoints,
|
|
615
|
-
record: matchup.away.record,
|
|
616
|
-
winProbability: matchup.away.winProbability,
|
|
617
|
-
},
|
|
618
|
-
homeTeam: {
|
|
619
|
-
logo: matchup.home.logo,
|
|
620
|
-
name: matchup.home.name,
|
|
621
|
-
points: data.scoringType === 'H2H_POINTS'
|
|
622
|
-
? String(matchup.home.points)
|
|
623
|
-
: matchup.home.score,
|
|
624
|
-
projectedPoints: matchup.home.projectedPoints,
|
|
625
|
-
record: matchup.home.record,
|
|
626
|
-
winProbability: matchup.home.winProbability,
|
|
627
|
-
},
|
|
628
|
-
league: {
|
|
629
|
-
color: data.sportColor,
|
|
630
|
-
logo: data.sportLogo,
|
|
631
|
-
subtitle: matchup.name,
|
|
632
|
-
title: data.leagueName,
|
|
633
|
-
},
|
|
634
|
-
roster,
|
|
635
|
-
activeAthletes,
|
|
636
|
-
topPlayers: this.parseTopPlayers(data.topPlayers || []),
|
|
637
|
-
});
|
|
638
|
-
}
|
|
639
|
-
return items;
|
|
640
|
-
}
|
|
641
|
-
parseTopPlayers(players) {
|
|
642
|
-
const topPlayers = [];
|
|
643
|
-
for (const p of players) {
|
|
644
|
-
if (!p.abbrevName ||
|
|
645
|
-
!p.headshot ||
|
|
646
|
-
!p.proTeam?.triCode ||
|
|
647
|
-
p.points === undefined) {
|
|
648
|
-
continue;
|
|
649
|
-
}
|
|
650
|
-
let rosteredBy = '';
|
|
651
|
-
if (p.percentRostered !== undefined &&
|
|
652
|
-
p.percentRostered > 0 &&
|
|
653
|
-
p.playerStatus?.startsWith('Rostered')) {
|
|
654
|
-
rosteredBy = p.playerStatus;
|
|
655
|
-
}
|
|
656
|
-
topPlayers.push({
|
|
657
|
-
abbrevName: p.abbrevName,
|
|
658
|
-
headshot: p.headshot,
|
|
659
|
-
position: p.positions?.split(',')[0] || '',
|
|
660
|
-
teamTriCode: p.proTeam.triCode,
|
|
661
|
-
points: p.points,
|
|
662
|
-
rosteredBy,
|
|
663
|
-
});
|
|
664
|
-
}
|
|
665
|
-
return topPlayers;
|
|
666
|
-
}
|
|
667
|
-
parseInactiveLeague(data, draftDate) {
|
|
668
|
-
if (!data.sportColor || !data.sportLogo || !data.leagueName) {
|
|
669
|
-
return null;
|
|
670
|
-
}
|
|
671
|
-
let draftDateNum = undefined;
|
|
672
|
-
if (draftDate) {
|
|
673
|
-
const parsedDate = new Date(Number(draftDate));
|
|
674
|
-
if (!isNaN(parsedDate.getTime())) {
|
|
675
|
-
draftDateNum = parsedDate.getTime();
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
return {
|
|
679
|
-
id: slugify(`${data.gameId}-inactive-${data.leagueName}`),
|
|
680
|
-
leagueColor: data.sportColor,
|
|
681
|
-
leagueLogo: data.sportLogo,
|
|
682
|
-
leagueName: data.leagueName,
|
|
683
|
-
type: 'inactiveLeague',
|
|
684
|
-
draftDate: draftDateNum,
|
|
685
|
-
};
|
|
686
|
-
}
|
|
687
|
-
async getPromoData() {
|
|
688
|
-
if (this._promoData) {
|
|
689
|
-
return this._promoData;
|
|
690
|
-
}
|
|
691
|
-
try {
|
|
692
|
-
this._promoData = await this.fantasyService.getPromo();
|
|
693
|
-
return this._promoData;
|
|
694
|
-
}
|
|
695
|
-
catch (error) {
|
|
696
|
-
captureException(error, {
|
|
697
|
-
context: 'FantasyViewModel.getPromoData',
|
|
698
|
-
});
|
|
699
|
-
return null;
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
async parseTournamentChallenge(data) {
|
|
703
|
-
if (!data.id) {
|
|
704
|
-
return;
|
|
705
|
-
}
|
|
706
|
-
let validEntries = data.entries?.filter((entry) => entry.id) || [];
|
|
707
|
-
if (validEntries.length === 0) {
|
|
708
|
-
return;
|
|
709
|
-
}
|
|
710
|
-
const header = {
|
|
711
|
-
type: 'fantasy-header',
|
|
712
|
-
id: `${data.id}-header`,
|
|
713
|
-
title: data.name || 'Tournament Challenge',
|
|
714
|
-
};
|
|
715
|
-
this.append(header, data.id);
|
|
716
|
-
const existingGroupIndex = this._tournamentChallenges.findIndex((g) => g.id === data.id);
|
|
717
|
-
if (existingGroupIndex !== -1) {
|
|
718
|
-
this._tournamentChallenges[existingGroupIndex].items = [];
|
|
719
|
-
}
|
|
720
|
-
const totalEntries = validEntries.length;
|
|
721
|
-
const entriesToShow = validEntries.slice(0, 5);
|
|
722
|
-
for (const entry of entriesToShow) {
|
|
723
|
-
let userPickName;
|
|
724
|
-
if (data.propositions && entry.picks) {
|
|
725
|
-
for (const pick of entry.picks) {
|
|
726
|
-
if (!pick.propositionId || !pick.outcomeId)
|
|
727
|
-
continue;
|
|
728
|
-
const proposition = data.propositions.find((p) => p.id === pick.propositionId);
|
|
729
|
-
if (proposition && proposition.outcomes) {
|
|
730
|
-
const outcome = proposition.outcomes.find((o) => o.id === pick.outcomeId);
|
|
731
|
-
if (outcome && outcome.name) {
|
|
732
|
-
userPickName = outcome.name;
|
|
733
|
-
break;
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
const card = {
|
|
739
|
-
type: 'tournament-bracket-card',
|
|
740
|
-
id: entry.id,
|
|
741
|
-
name: entry.name || '',
|
|
742
|
-
rank: entry.rank || 0,
|
|
743
|
-
score: entry.score || 0,
|
|
744
|
-
percentile: Math.round((entry.percentile || 0) * 100),
|
|
745
|
-
entryStatusIcon: entry.entryStatusIcon || '',
|
|
746
|
-
finalPick: entry.finalPick
|
|
747
|
-
? {
|
|
748
|
-
propositionId: entry.finalPick.propositionId,
|
|
749
|
-
outcomeId: entry.finalPick.outcomeId,
|
|
750
|
-
primaryLogo: entry.finalPick.outcomePicked?.primaryLogo,
|
|
751
|
-
secondaryLogo: entry.finalPick.outcomePicked
|
|
752
|
-
?.secondaryLogo,
|
|
753
|
-
result: entry.finalPick.result,
|
|
754
|
-
}
|
|
755
|
-
: { propositionId: '', outcomeId: '' },
|
|
756
|
-
isComplete: entry.isComplete || false,
|
|
757
|
-
picks: entry.picks,
|
|
758
|
-
tournamentId: data.id,
|
|
759
|
-
tournamentAbbrev: data.abbrev || '',
|
|
760
|
-
tournamentLogo: data.logo || '',
|
|
761
|
-
propositions: data.propositions,
|
|
762
|
-
userPickName,
|
|
763
|
-
};
|
|
764
|
-
this.append(card, data.id);
|
|
765
|
-
}
|
|
766
|
-
if (totalEntries > 5 && data.state === 'LIVE') {
|
|
767
|
-
const promoData = await this.getPromoData();
|
|
768
|
-
const isLocked = data.locked === true;
|
|
769
|
-
const qrCodeVariant = isLocked ? 'tc-live' : 'tc-pre';
|
|
770
|
-
const promoVariant = promoData?.[qrCodeVariant];
|
|
771
|
-
if (promoVariant) {
|
|
772
|
-
const overflowQR = {
|
|
773
|
-
type: 'tournament-overflow-qr',
|
|
774
|
-
id: `${data.id}-overflow`,
|
|
775
|
-
background: promoVariant.promotion.background,
|
|
776
|
-
logo: promoVariant.promotion.logo,
|
|
777
|
-
qrCode: promoVariant.promotion.qrCode,
|
|
778
|
-
title: promoVariant.promotion.title,
|
|
779
|
-
description: promoVariant.promotion.description,
|
|
780
|
-
tournamentId: data.id,
|
|
781
|
-
};
|
|
782
|
-
this.append(overflowQR, data.id);
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
/**
|
|
787
|
-
* Fetch mock data for testing
|
|
788
|
-
*/
|
|
789
|
-
async fetchMockData() {
|
|
790
|
-
this.hasEverSuccessfullyLoaded.value = true;
|
|
791
|
-
await this.processFantasy(MOCK_FANTASY_RESPONSE);
|
|
792
|
-
this.errorState.value = 'none';
|
|
793
|
-
this.isDataLoading.value = false;
|
|
794
|
-
}
|
|
795
|
-
clearTabLoadFailure() {
|
|
796
|
-
this.errorState.value = 'none';
|
|
797
|
-
// Small delay to allow UI to update before refetching
|
|
798
|
-
setTimeout(() => {
|
|
799
|
-
this.fetchData();
|
|
800
|
-
}, 100);
|
|
801
|
-
}
|
|
802
|
-
setDataToPanel(data) {
|
|
803
|
-
if (data.leagueManagerOverrideBaseUrl) {
|
|
804
|
-
this.fantasyService.leagueManagerOverrideBaseUrl =
|
|
805
|
-
data.leagueManagerOverrideBaseUrl;
|
|
806
|
-
}
|
|
807
|
-
if (data.fantasyOverrideBaseUrl) {
|
|
808
|
-
this.fantasyService.fantasyOverrideBaseUrl = data.fantasyOverrideBaseUrl;
|
|
809
|
-
}
|
|
810
|
-
if (data.gambitOverrideBaseUrl) {
|
|
811
|
-
this.fantasyService.gambitOverrideBaseUrl = data.gambitOverrideBaseUrl;
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
export default FantasyViewModel;
|