@viewlift/player-backup 2.0.268-backup → 2.0.270-backup
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/cjs/{autoNextVideo-509e6228.js → autoNextVideo-aab04ca2.js} +1 -1
- package/cjs/autoNextVideo-c18c5a9d.js +1 -0
- package/cjs/autoNextVideo-d02d40bb.js +1 -0
- package/cjs/autoNextVideo-fc3a66ed.js +1 -0
- package/cjs/bundle.css +647 -647
- package/cjs/{features-2a457d5b.js → features-06672d0e.js} +1 -1
- package/cjs/features-3cb595a6.js +1 -0
- package/cjs/features-7254ff24.js +1 -0
- package/cjs/features-e04a1906.js +1 -0
- package/cjs/generic-302fcb0f.js +1 -0
- package/cjs/generic-73c41ab8.js +1 -0
- package/cjs/generic-92ede746.js +1 -0
- package/cjs/generic-ece54fe4.js +1 -0
- package/cjs/{index-9d25f2c1.js → index-06461546.js} +1 -1
- package/cjs/index-156ebc96.js +1 -0
- package/cjs/index-3ea3d917.js +1 -0
- package/cjs/index-5f4c22e0.js +1 -0
- package/cjs/index-8fb992e3.js +1 -0
- package/cjs/index-a5284d8c.js +1 -0
- package/cjs/index-c3c5304e.js +1 -0
- package/cjs/index-e1fa72cb.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-a20d415c.js → multicamv2-775af5cd.js} +1 -1
- package/cjs/multicamv2-7b610283.js +1 -0
- package/cjs/multicamv2-7c115911.js +1 -0
- package/cjs/{multicamv2-2e528142.js → multicamv2-84760599.js} +1 -1
- package/cjs/multicamv2-a1ad5eb0.js +1 -0
- package/cjs/multicamv2-cd64c23d.js +1 -0
- package/cjs/multicamv2-d8678089.js +1 -0
- package/cjs/multicamv2-dd2b304c.js +1 -0
- package/cjs/{nextEpisodeButton-2b96c8f7.js → nextEpisodeButton-55c9ca47.js} +1 -1
- package/cjs/nextEpisodeButton-8a285b57.js +1 -0
- package/cjs/nextEpisodeButton-943003ed.js +1 -0
- package/cjs/nextEpisodeButton-c0bf8d12.js +1 -0
- package/cjs/{playlist-769b630e.js → playlist-0817f929.js} +1 -1
- package/cjs/playlist-92c9c514.js +1 -0
- package/cjs/playlist-ae50e704.js +1 -0
- package/cjs/playlist-b02614d9.js +1 -0
- package/cjs/{series-8bf8c9e0.js → series-ad8bdcab.js} +1 -1
- package/cjs/series-b1d6b31a.js +1 -0
- package/cjs/series-c80c4a36.js +1 -0
- package/cjs/series-fa79e1a1.js +1 -0
- package/cjs/{series-v2-1488458a.js → series-v2-49a73d41.js} +1 -1
- package/cjs/{series-v2-61844655.js → series-v2-61a08a5d.js} +1 -1
- package/cjs/series-v2-79428f58.js +1 -0
- package/cjs/series-v2-979acedf.js +1 -0
- package/cjs/series-v2-9f2fa133.js +1 -0
- package/cjs/series-v2-b8010f7c.js +1 -0
- package/cjs/series-v2-b920c6e8.js +1 -0
- package/cjs/series-v2-bef8dcf9.js +1 -0
- package/cjs/{skin-14a3a4f1.js → skin-053c4b0e.js} +1 -1
- package/cjs/{skin-90812f3f.js → skin-1dbf6726.js} +1 -1
- package/cjs/{skin-064df3a0.js → skin-1fc9778c.js} +1 -1
- package/cjs/{skin-3a067c3a.js → skin-2b06a950.js} +1 -1
- package/cjs/{skin-b130340a.js → skin-35f8cc7b.js} +1 -1
- package/cjs/skin-3d0ecf5f.js +1 -0
- package/cjs/{skin-848294e2.js → skin-43859976.js} +1 -1
- package/cjs/{skin-abf69bec.js → skin-4a955d7a.js} +1 -1
- package/cjs/skin-58e9b426.js +1 -0
- package/cjs/skin-5bf91421.js +1 -0
- package/cjs/{skin-013181d1.js → skin-5cf349ab.js} +1 -1
- package/cjs/skin-65ada70c.js +1 -0
- package/cjs/skin-67fa7113.js +1 -0
- package/cjs/skin-6dc08f62.js +1 -0
- package/cjs/{skin-89130570.js → skin-6e633748.js} +1 -1
- package/cjs/skin-70374d63.js +1 -0
- package/cjs/skin-72444813.js +1 -0
- package/cjs/skin-78182ddc.js +1 -0
- package/cjs/skin-85e89904.js +1 -0
- package/cjs/skin-88072589.js +1 -0
- package/cjs/skin-988acd01.js +1 -0
- package/cjs/skin-9a207c46.js +1 -0
- package/cjs/skin-a100c6a0.js +1 -0
- package/cjs/skin-a20b263d.js +1 -0
- package/cjs/skin-b02f6a39.js +1 -0
- package/cjs/skin-c66c28cb.js +1 -0
- package/cjs/skin-d4a940d6.js +1 -0
- package/cjs/skin-d898389f.js +1 -0
- package/cjs/skin-d98e4f7a.js +1 -0
- package/cjs/skin-e8806c6e.js +1 -0
- package/cjs/skin-e8f2fbd4.js +1 -0
- package/cjs/skin-ec03e8e0.js +1 -0
- package/cjs/skin-ed5cb06a.js +1 -0
- package/cjs/skin-f7dd877b.js +1 -0
- package/cjs/skin-fb5aad71.js +1 -0
- package/cjs/skin-ff2aa150.js +1 -0
- package/cjs/{util-6c68bfbb.js → util-0108a17b.js} +1 -1
- package/cjs/util-4e928cc2.js +1 -0
- package/cjs/util-ac0da02b.js +1 -0
- package/cjs/util-fceffc9c.js +1 -0
- package/cjs/{videoSelector-dad7e0d5.js → videoSelector-161e6e18.js} +1 -1
- package/cjs/{videoSelector-0f7ec82d.js → videoSelector-68a44bf2.js} +1 -1
- package/cjs/videoSelector-788aefeb.js +1 -0
- package/cjs/videoSelector-98767cca.js +1 -0
- package/cjs/videoSelector-b2ed6c41.js +1 -0
- package/cjs/videoSelector-b960b6cb.js +1 -0
- package/cjs/videoSelector-cd0a328a.js +1 -0
- package/cjs/videoSelector-e0666d3f.js +1 -0
- package/esm/apis/index.d.ts +11 -0
- package/esm/assets/icons.d.ts +22 -0
- package/esm/autoNextVideo-245106dc.js +1 -0
- package/esm/autoNextVideo-4cdb3520.js +1 -0
- package/esm/autoNextVideo-7dd4dfc3.js +1 -0
- package/esm/autoNextVideo-9cfdd391.js +1 -0
- package/esm/bundle.css +647 -647
- package/esm/components/advertisement/advertisement.d.ts +1 -0
- package/esm/components/auto-next-video/autoNextVideo.d.ts +2 -0
- package/esm/components/big-mute-btn/index.d.ts +9 -0
- package/esm/components/broadcaster_image/index.d.ts +1 -0
- package/esm/components/caption-settings/caption-settings.d.ts +14 -0
- package/esm/components/dvr-seekbar/index.d.ts +14 -0
- package/esm/components/multicam/multicam.d.ts +18 -0
- package/esm/components/multicam-v2/multicamv2.d.ts +13 -0
- package/esm/components/multicam-v2_TEMP/multicamv2.d.ts +13 -0
- package/esm/components/next-ep-preview/next-ep-preview.d.ts +1 -0
- package/esm/components/next-episode/nextEpisodeButton.d.ts +13 -0
- package/esm/components/playlist-tray/playlist.d.ts +15 -0
- package/esm/components/quality-selector/index.d.ts +1 -0
- package/esm/components/resolution/resolution.d.ts +19 -0
- package/esm/components/series/series.d.ts +10 -0
- package/esm/components/series-v2/helper.d.ts +3 -0
- package/esm/components/series-v2/series-v2.d.ts +25 -0
- package/esm/components/series-v2_TEMP/helper.d.ts +1 -0
- package/esm/components/series-v2_TEMP/series-v2.d.ts +21 -0
- package/esm/components/settings-icon/settings-icon.d.ts +17 -0
- package/esm/components/timer/index.d.ts +5 -0
- package/esm/components/trickplay/helper.d.ts +13 -0
- package/esm/components/trickplay/index.d.ts +1 -0
- package/esm/components/trickplay/videojs.thumbnails.d.ts +1 -0
- package/esm/components/video-selector/videoSelector.d.ts +18 -0
- package/esm/components/video-selector_TEMP/videoSelector.d.ts +16 -0
- package/esm/components/watch-history/handleWatchHistory.d.ts +2 -0
- package/esm/contentHandler/content_types/epg.d.ts +4 -0
- package/esm/contentHandler/content_types/external.d.ts +4 -0
- package/esm/contentHandler/content_types/index.d.ts +5 -0
- package/esm/contentHandler/content_types/series.d.ts +4 -0
- package/esm/contentHandler/content_types/vod.d.ts +4 -0
- package/esm/contentHandler/firePlayer.d.ts +4 -0
- package/esm/core/captions.d.ts +10 -0
- package/esm/core/generic.d.ts +48 -0
- package/esm/core/player_instance.d.ts +6 -0
- package/esm/core/renditions.d.ts +6 -0
- package/esm/core/util.d.ts +19 -0
- package/esm/core/volume.d.ts +2 -0
- package/esm/dash/dashHandler.d.ts +1 -0
- package/esm/dash/linear_ssai.d.ts +1 -0
- package/esm/dash/sgai.d.ts +10 -0
- package/esm/{features-06330d47.js → features-3d00bfaf.js} +1 -1
- package/esm/features-51f77be4.js +1 -0
- package/esm/features-e8652545.js +1 -0
- package/esm/features-ee32a6b1.js +1 -0
- package/esm/features.d.ts +31 -0
- package/esm/generic-053ecf26.js +1 -0
- package/esm/generic-718c2043.js +1 -0
- package/esm/generic-f7b6857e.js +1 -0
- package/esm/generic-fa853318.js +1 -0
- package/esm/globalPlayerEvents.d.ts +8 -0
- package/esm/helpers/browser.d.ts +2 -0
- package/esm/helpers/currentVideoInfo.d.ts +19 -0
- package/esm/helpers/errorHandling.d.ts +2 -0
- package/esm/helpers/loader.d.ts +2 -0
- package/esm/helpers/localisation.d.ts +2 -0
- package/esm/helpers/scriptLoader.d.ts +2 -0
- package/esm/helpers/secondary-switching.d.ts +1 -0
- package/esm/helpers/skin.d.ts +20 -0
- package/esm/helpers/sourceRetriever.d.ts +11 -0
- package/esm/helpers/ssaiEventHandler.d.ts +27 -0
- package/esm/helpers/token.d.ts +10 -0
- package/esm/index-1844243e.js +1 -0
- package/esm/index-18e71208.js +1 -0
- package/esm/index-1ac2df49.js +1 -0
- package/esm/index-1eb08652.js +1 -0
- package/esm/index-37c4969a.js +1 -0
- package/esm/index-9367e9fe.js +1 -0
- package/esm/index-ac0740b3.js +1 -0
- package/esm/index-f529337e.js +1 -0
- package/esm/index.d.ts +39 -0
- package/esm/index.js +1 -1
- package/esm/{multicamv2-acd74932.js → multicamv2-328e923e.js} +1 -1
- package/esm/{multicamv2-d68842ee.js → multicamv2-4740ed50.js} +1 -1
- package/esm/multicamv2-4db4411c.js +1 -0
- package/esm/multicamv2-56795ac0.js +1 -0
- package/esm/multicamv2-9088f871.js +1 -0
- package/esm/multicamv2-af5aaae2.js +1 -0
- package/esm/multicamv2-cb120e9c.js +1 -0
- package/esm/multicamv2-d2e17a37.js +1 -0
- package/esm/{nextEpisodeButton-338de4e8.js → nextEpisodeButton-02ec2fbd.js} +1 -1
- package/esm/nextEpisodeButton-07b2ad4f.js +1 -0
- package/esm/nextEpisodeButton-2169fc07.js +1 -0
- package/esm/nextEpisodeButton-980827db.js +1 -0
- package/esm/playlist-0ee754f2.js +1 -0
- package/esm/playlist-35e41884.js +1 -0
- package/esm/playlist-5e7c09c3.js +1 -0
- package/esm/playlist-9803964f.js +1 -0
- package/esm/plugins/chromecast.d.ts +18 -0
- package/esm/plugins/comscore_dist/index.d.ts +50 -0
- package/esm/plugins/index.d.ts +2 -0
- package/esm/plugins/library.d.ts +8 -0
- package/esm/plugins/videojs-dash5.es.d.ts +51 -0
- package/esm/plugins/videojs_contrib_dash.d.ts +51 -0
- package/esm/{series-535d9397.js → series-1ac34519.js} +1 -1
- package/esm/series-8ee62012.js +1 -0
- package/esm/series-a4bbc31c.js +1 -0
- package/esm/series-d272f64a.js +1 -0
- package/esm/{series-v2-fa13b138.js → series-v2-177d5849.js} +1 -1
- package/esm/series-v2-1acb7131.js +1 -0
- package/esm/{series-v2-7de596f8.js → series-v2-2598cf78.js} +1 -1
- package/esm/series-v2-3299026d.js +1 -0
- package/esm/series-v2-4118214b.js +1 -0
- package/esm/series-v2-49a0edc1.js +1 -0
- package/esm/series-v2-7cc868a6.js +1 -0
- package/esm/series-v2-db4ffd44.js +1 -0
- package/esm/skin/carousel/skin.d.ts +1 -0
- package/esm/skin/default/events.d.ts +1 -0
- package/esm/skin/default/skin.d.ts +1 -0
- package/esm/skin/defaultV2/events.d.ts +1 -0
- package/esm/skin/defaultV2/skin.d.ts +1 -0
- package/esm/skin/index.d.ts +1 -0
- package/esm/skin/mini/events.d.ts +1 -0
- package/esm/skin/mini/skin.d.ts +1 -0
- package/esm/skin/minimalist/skin.d.ts +1 -0
- package/esm/skin/multiplayer/events.d.ts +1 -0
- package/esm/skin/multiplayer/skin.d.ts +1 -0
- package/esm/skin/news/events.d.ts +1 -0
- package/esm/skin/news/skin.d.ts +1 -0
- package/esm/skin/news_live/events.d.ts +1 -0
- package/esm/skin/news_live/skin.d.ts +1 -0
- package/esm/skin/vl_one/events.d.ts +1 -0
- package/esm/skin/vl_one/skin.d.ts +1 -0
- package/esm/{skin-fd7cd709.js → skin-0028b4f9.js} +1 -1
- package/esm/skin-0cd2c5af.js +1 -0
- package/esm/skin-101047cd.js +1 -0
- package/esm/skin-1919cffd.js +1 -0
- package/esm/{skin-479a40b3.js → skin-2b945cd5.js} +1 -1
- package/esm/skin-31a5bbbf.js +1 -0
- package/esm/skin-376f7235.js +1 -0
- package/esm/skin-3f6533f9.js +1 -0
- package/esm/{skin-f83590a2.js → skin-406a83e0.js} +1 -1
- package/esm/skin-5d70dccd.js +1 -0
- package/esm/skin-664339e7.js +1 -0
- package/esm/skin-66d8c4ba.js +1 -0
- package/esm/skin-678faffc.js +1 -0
- package/esm/skin-6df698eb.js +1 -0
- package/esm/{skin-665917ca.js → skin-7d31f534.js} +1 -1
- package/esm/skin-81d9aa36.js +1 -0
- package/esm/skin-89fcf481.js +1 -0
- package/esm/skin-96861a7b.js +1 -0
- package/esm/skin-97da3473.js +1 -0
- package/esm/skin-a8094978.js +1 -0
- package/esm/skin-b605bb54.js +1 -0
- package/esm/skin-be8f7529.js +1 -0
- package/esm/skin-c034f74d.js +1 -0
- package/esm/skin-ce94c821.js +1 -0
- package/esm/skin-cf0ff17f.js +1 -0
- package/esm/skin-d06474ec.js +1 -0
- package/esm/skin-d55ddaba.js +1 -0
- package/esm/skin-dc6a0bb2.js +1 -0
- package/esm/skin-e29aa22f.js +1 -0
- package/esm/skin-e59d91cf.js +1 -0
- package/esm/skin-e63be5f3.js +1 -0
- package/esm/skin-e9f5f527.js +1 -0
- package/esm/skin-edf70506.js +1 -0
- package/esm/skin-fa6fe4b3.js +1 -0
- package/esm/skin-fdab5e91.js +1 -0
- package/esm/skin-fe802a00.js +1 -0
- package/esm/{util-40db3943.js → util-468a93fd.js} +1 -1
- package/esm/util-9d3b1d34.js +1 -0
- package/esm/util-eb5f314c.js +1 -0
- package/esm/util-fac978d2.js +1 -0
- package/esm/utilities/analytics.d.ts +3 -0
- package/esm/utilities/beacon.d.ts +3 -0
- package/esm/utilities/comscore.d.ts +5 -0
- package/esm/utilities/controlsColor.d.ts +1 -0
- package/esm/utilities/conviva.d.ts +5 -0
- package/esm/utilities/keyboardShortcuts.d.ts +5 -0
- package/esm/utilities/replaceMacros.d.ts +1 -0
- package/esm/videoSelector-1b345e70.js +1 -0
- package/esm/videoSelector-3e58e8ce.js +1 -0
- package/esm/videoSelector-5fa20b2e.js +1 -0
- package/esm/videoSelector-842af462.js +1 -0
- package/esm/videoSelector-b9a2cbe5.js +1 -0
- package/esm/videoSelector-bf4a9044.js +1 -0
- package/esm/videoSelector-cbb097f3.js +1 -0
- package/esm/videoSelector-eda5c3b6.js +1 -0
- package/package.json +2 -2
- package/cjs/generic-b9f32717.js +0 -1
- package/cjs/index-1b56425c.js +0 -1
- package/esm/autoNextVideo-281b09dd.js +0 -1
- package/esm/generic-355cc8c6.js +0 -1
- package/esm/index-1a4369e9.js +0 -1
- package/esm/index-66169052.js +0 -1
- package/esm/playlist-d3eb7e41.js +0 -1
- package/esm/skin-02bec45a.js +0 -1
- package/esm/skin-6819b99b.js +0 -1
- package/esm/skin-68558a96.js +0 -1
- package/esm/skin-9638eb22.js +0 -1
- package/esm/skin-f9f02a42.js +0 -1
- package/esm/videoSelector-465a0eee.js +0 -1
- package/esm/videoSelector-97f0b9a4.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import o from"video.js";import i from"axios";import{g as r,t as l,c as a}from"./skin-4f84b841.js";import{i as d,d as u}from"./browser-d4613b36.js";import s from"md5";import c from"js-cookie";import{a as v,r as m}from"./captions-2b4caf69.js";import f from"@babel/runtime/helpers/typeof";import p from"@babel/runtime/helpers/toConsumableArray";import g from"@babel/runtime/helpers/slicedToArray";import{destroyComscoreTag as w,formulateComscorePayload as h,createComscoreStreamingTag as y,setComscorePlayerInstance as I}from"@viewlift/comscore/index.js";function E(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function T(e){window.dataLayer=window.dataLayer||[],E("js",new Date),E("config",e)}function b(e,n){E("event",e,n)}var _={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function S(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function O(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?S(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):S(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var D={name:"@viewlift/player",version:"2.1.35",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",scripts:{prepublishOnly:"release-assistant"},dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1","@viewlift/comscore":"^1.0.13",axios:"^1.2.3",md5:"^2.3.0",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"},overrides:{"min-document":"^2.19.1"}};window.vl_player_version=D.version;var A,L=function(){var e,n,t,o;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":V.get()+"".concat(null==_?void 0:_.getVideoDetails)},P=function(e,n){var t,o,r,l,a,d,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:L(),params:O({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:u},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":D.version,"x-player-name":"videojs",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken},withCredentials:!0})},k=function(e,n){var t,o,r,l,a,d,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:V.get()+_.getLinearChannelDetails,params:O(O(O(O(O({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:u},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken}})},F=function(e,n){var t,o,r=$(n),l=(null==r?void 0:r.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})}):i({url:V.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},R=function(){var e=n(t.mark(function e(n){var o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X();case 2:return o=e.sent,e.abrupt("return",i({url:V.get()+"".concat(null==_?void 0:_.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:O({},n),params:O({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),C=function(e,n){var t,o,r=window.contentType;return i({method:"GET",url:V.get()+"".concat(null==_?void 0:_.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},j=function(e){var n=e.videoId;return i({method:"GET",url:V.get()+"".concat(null==_?void 0:_.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},V=(A=null==_?void 0:_.apiBaseUrl,{set:function(e){e&&(A=e)},get:function(){return A}}),N=function(e,n,t,o){var r,l;return i({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n,adbTempToken:null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.adbTempToken},withCredentials:!0})},W=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},U=null;function B(){return{set:function(e){e&&(U=e)},get:function(){return U}}}var M,x,H,G,Y,Q,z,q=function(){var e=n(t.mark(function e(){var n,o,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=B().get(),o=V.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),K=null,X=function(){var e=n(t.mark(function e(){var n;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!W(n)){e.next=6;break}return K||(K=q().then(function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&B().set(r),i||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){K=null})),e.abrupt("return",K);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),J=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},$=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},Z=function(e){e&&"undefined"!=typeof window&&window.sessionStorage&&window.sessionStorage.setItem("uid",e)},ee=(Q=new Map,{set:function(e){var n,t=(null==e||null===(n=e.video)||void 0===n?void 0:n.id)||e||null;Q.set(t,(Q.get(t)||0)+1)},get:function(e){return Q.get(e)},clear:function(){Q.clear()}}),ne=function(e){x=e},te=function(){return x},oe=function(e){M=e},ie=function(){return M},re=function(){return H},le=function(e){H=e},ae=function(){return Y},de=function(e){G=new Map,e.map(function(e,n){G.set(e.id,n)})},ue=function(e){if(G){var n=G.get(e);le(n+1)}},se=(z=0,{set:function(e){e>=0&&(z=e)},get:function(){return z}});function ce(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function ve(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):ce(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var me=0,fe=null,pe=function(){var e,n,t,o,i,r,l,a=te();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==a||null===(i=a.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function ge(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function we(){return fe||window.sessionStorage.getItem("uid")}function he(){return ye.apply(this,arguments)}function ye(){return(ye=n(t.mark(function e(){var n,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X();case 2:if(!(n=e.sent)){e.next=10;break}if(null==(o=JSON.parse(atob(n.split(".")[1])))||!o.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==o?void 0:o.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ie(e){return e?String(e):""}window.initialise=function(e){window.sid=ge(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var n=Math.floor(e.currentTime());e.on("error",function(){var t,o,i,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,b(r?"FAILED_TO_START":"DROPPED_STREAM",ve({pfm:window.platform,uid:we(),vid:pe(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:n===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,n,t){e.one("play",tryCatch(function(){var o,i,r;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),b("PLAY",ve({pfm:window.platform,uid:we(),vid:pe(),videoPosition:Math.floor(e.currentTime())},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i||null===(r=i.beacon)||void 0===r?void 0:r.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",ve({"Video ID":pe(),watchTime:Math.floor(e.currentTime())},t))}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,n){var t,o;if(n.el_){var i,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(o=t.className)&&void 0!==o&&o.includes("vjs-waiting")&&me<4)me++,b("BUFFERING",ve({pfm:window.platform,uid:we(),vid:pe(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var n,t,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,b("FIRST_FRAME",ve({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:we(),vid:pe()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var n,t,o,i,r,l;b("AD_REQUEST",ve({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:we(),vid:pe(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),b("AD_IMPRESSION",ve({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:we(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:pe()},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var n=[];e.on("timeupdate",function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(me=0,n.push(t),fireEvent({eventName:"PING",videoPosition:t,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var n=e.currentTime(),t=e.duration(),o=e.buffered(),i=0;i<o.length;i++){var r=o.start(i),l=o.end(i);if(Ee(n,r,l)){var a=Math.round(t-l);if(isFinite(a))return a}}})()};var Ee=function(e,n,t){return e>=n&&e<=t},Te=function(){var e,n=te(),t=(null==n?void 0:n.contentType)||"video";return(null==n||null===(e=n[t])||void 0===e?void 0:e.network)||null};function be(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){null!=n&&n.userId&&(fe=n.userId);var t=r(e);window.initialise(t,null==n?void 0:n.analyticsCb),window.firstFrame(t,null==n?void 0:n.analyticsCb,null==n?void 0:n.analyticsEventParams),t.on("loadedmetadata",function(){window.endFirstFrame(t)})}}window.fireEvent=function(){var e=n(t.mark(function e(n){var o,r,l,a,d,u,s,c,v,m,f,p,g,w,h,y,I,E,T,b,S;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X();case 2:return I=e.sent,E=$(I),T=null==E?void 0:E.site,b=null==E?void 0:E.siteId,e.t0=ve,e.t1=ve,e.t2=ve({aid:T,cid:b,pfm:window.platform},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=we(),e.t5=pe(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(a=n.videoPosition)&&void 0!==a?a:null,e.t10=window.environment,e.t11=n.dp1||"",e.t12=n.dp2||"",e.t13=n.dp3||"",e.t14=n.dp4||"",e.t15=n.dp5||"",e.t16=!0===n.isAdEvent?n.videoPosition:null,e.t17=!0===n.isAdEvent?Ie(n.adPosition):"",e.next=26,he();case 26:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=n.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t27=null!==(m=Te())&&void 0!==m?m:null,e.t28=null!=T?T:null,e.t29={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26,networkname:e.t27,brandname:e.t28},e.t30=(null==n?void 0:n.duration)&&{duration:n.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(f=window)||void 0===f||null===(p=f.customData)||void 0===p||null===(g=p.beacon)||void 0===g?void 0:g.params,e.t33=(0,e.t0)(e.t31,e.t32),S=[e.t33],i({url:(null===(w=window)||void 0===w||null===(h=w.customData)||void 0===h||null===(y=h.beacon)||void 0===y?void 0:y.url)||V.get()+_.getBeaconUrl,method:"post",headers:{Authorization:I},contentType:"application/x-www-form-urlencoded",dataType:"text",data:S}).catch(function(e){console.error(e)});case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var _e=function(e,n){var t=new Map;j({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),Y=t}).catch(function(e){return console.log(e)})},Se=function(){var e=se.get();return e>=0?e+1:1},Oe=function(){var e,n,t,o=ie(),i=te(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,l=se.get(),a=null==o||null===(n=o[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};function De(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Ae(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?De(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):De(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Le=s,Pe=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},ke=function(e){var n=Fe(e,"video.tags",[]),t=Fe(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},Fe=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},Re=function(){var e,n,t,o,i,l,a,d,u,s,v,m,f,p,g,w,h,y,I,E,T,b,_,S,O,D=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",A=arguments.length>1?arguments[1]:void 0,L=arguments.length>2?arguments[2]:void 0;if(null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.disableMacros)return D;var P=(null==L?void 0:L.siteName)||(null==L?void 0:L.site)||"",k=(null==L?void 0:L.contentType)||"video",F=(null==L||null===(t=L[k])||void 0===t?void 0:t.metadata)||(null==L||null===(o=L[k])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.metadata),R=r(A);if(!D.includes("VIEWLIFT_"))return D;var C,j=window.getComputedStyle(document.getElementById(A),null),V=Math.trunc(j.getPropertyValue("height").slice(0,-2)),N=Math.trunc(j.getPropertyValue("width").slice(0,-2)),W="linearchannel"===k?null==L||null===(l=L.linearchannel)||void 0===l||null===(a=l.channels)||void 0===a||null===(d=a.find(function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)}))||void 0===d||null===(u=d.content)||void 0===u?void 0:u.id:Fe(L,"video.gist.id",""),U="linearchannel"===k?null==L||null===(s=L.linearchannel)||void 0===s||null===(v=s.channels)||void 0===v||null===(m=v.find(function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)}))||void 0===m?void 0:m.title:Fe(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),B=null,M=null;"function"==typeof window.__gpp&&(null===(C=window)||void 0===C||C.__gpp("ping",function(e){B=null==e?void 0:e.gppString,M=null==e?void 0:e.sectionList[0]}));var x=c.get("us_privacy")||c.get("usprivacy"),H=void 0!==x?x:"1YNN",G=null!==(f=null===(p=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===p?void 0:p.fwIdentifier)&&void 0!==f?f:null,Y=Ae(Ae({},Ce(F)),{},{VIEWLIFT_WIDTH:N,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:Pe(N,V),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(g=window)||void 0===g?void 0:g.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:Fe(L,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:Fe(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:Fe(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==R||null===(w=R.options_)||void 0===w?void 0:w.autoplay)||1,VIEWLIFT_MUTE:(null==R||null===(h=R.options_)||void 0===h?void 0:h.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==P||"usanetwork"==P?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:ke(L),VIEWLIFT_MEDIA_ID:W,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(Fe(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:W,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+Fe(L,"video.gist.permalink","")),VIEWLIFT_CONSENT:c.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:Fe(null===(y=window)||void 0===y||null===(I=y.app_data)||void 0===I||null===(E=I.site)||void 0===E?void 0:E.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==P||"usanetwork"==P?"":Fe(null===(T=window)||void 0===T||null===(b=T.app_data)||void 0===b||null===(_=b.site)||void 0===_?void 0:_.settings,"compliance.gdpr")?1:0,VIEWLIFT_US_PRIVACY:H,VIEWLIFT_TVE_PROVIDER:G?Le(G):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*Fe(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:Fe(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:W,VIEWLIFT_CONTENT_TITLE:U,VIEWLIFT_CONTENT_SERIES_TITLE:Fe(L,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:Fe(L,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:Oe(),VIEWLIFT_SEASON_NUMBER:Se(),VIEWLIFT_CONTENT_TAGS:ke(L),VIEWLIFT_GPP_SID:M||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:B||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:"",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:""},null===(S=window)||void 0===S||null===(O=S.customData)||void 0===O?void 0:O.macros);for(var Q in Y){var z=new RegExp(Q,"g");D=D.replace(z,Y[Q])}return D},Ce=function(e){var n,t,o,i,r,l,a,u,s,c={},v=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){v.set(e.name,e.value)}));var m=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,f=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return m||f?(d()?m?c=Ae(Ae({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||""}):f&&(c=Ae(Ae({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.tve")||""})):m?c=Ae(Ae({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||""}):f&&(c=Ae(Ae({},c),{},{VIEWLIFT_CSID:v.get("csid.web.tve")||""})),m?c=Ae(Ae({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||""}):f&&(c=Ae(Ae({},c),{},{VIEWLIFT_SFID:v.get("sfid.tve")||v.get("sfid.web.tve")||""})),c=d()?Ae(Ae({},c),{},{VIEWLIFT_PROF:v.get("prof.mweb")||""}):Ae(Ae({},c),{},{VIEWLIFT_PROF:v.get("prof.web")||""})):(c=Ae(Ae({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||""}),c=d()?Ae(Ae({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:v.get("prof.mweb")||""}):Ae(Ae({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_PROF:v.get("prof.web")||""})),c=Ae(Ae({},c),{},{VIEWLIFT_AFID:v.get("afid"),VIEWLIFT_NIELSEN_APP_ID:Fe(null===(a=window)||void 0===a||null===(u=a.app_data)||void 0===u||null===(s=u.appcmsMain)||void 0===s?void 0:s.analytics,"nielsen.id")||v.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:v.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:v.get("VIEWLIFT_GRACE_NOTE_ID")||"",VIEWLIFT_EXTERNAL_AD_ID:v.get("VIEWLIFT_EXTERNAL_AD_ID")||""})},je=function(e,n){var t,o,i,r,l,a,d,s,c,v,m,f,p,g=(null==e?void 0:e.contentType)||"video",w=null==e||null===(t=e[g])||void 0===t?void 0:t.drmEnabled,h=null==e||null===(o=e[g])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,y=null==e||null===(r=e[g])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,I=(null==e||null===(a=e[g])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[g])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var E=(null==e||null===(m=e[g])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=y&&y.hls)return Ne(y);if(w){var T=We(h,n);return T.src=Re(T.src,n,e),T}if("Safari"!==u()&&E)return Ve(h);if(I){var b=Ne(h);return b.src=Re(b.src,n,e),b}if(null!=h&&h.mpeg){var _=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(h);return _.src=Re(_.src,n,e),_}return null},Ve=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},Ne=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},We=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,i=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=u();if(r(n),"Safari"===d){var s=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,function(e,n,t){console.log(e),e&&r(e),r(null,t)})}}}}}(i);return Ue(n),s}var c,v={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(Ue(n),v.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==a?void 0:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var Ue=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==u()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Be=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var i=t.split(".com")[1]||"";return{src:i?"".concat(n).concat(i):t,type:o}},Me=function(e,n){if(import("./error-2395864b.js").then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}}},xe=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var He=!1,Ge=function(e,n,t){var o=Re(n,e,t),i=r(e);if(n&&window.google){if("function"!=typeof i.ima&&"object"!==f(i.ima))return;i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,l=r(e);if(null!==l.el_){He=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),He&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,n,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),l.one(u,function(){s&&l.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}),n.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,o)}};function Ye(e,n){var t,o,i,l=r(e),a=null==l||null===(t=l.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,d=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",function(t){var o,i,r,u,s,c,v,m,f;if(ze.enabled&&!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=t.target.localName){var p=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(p)&&(t.preventDefault(),null==d||d.focus()),p){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||Bn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(u=r.appcmsMain)||void 0===u||null===(s=u.adsConfig)||void 0===s?void 0:s.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(m=v.appcmsMain)&&void 0!==m&&null!==(f=m.adsConfig)&&void 0!==f&&f.vodAdClientSideTracking)return;g||Un(e,10)}}},!0)}var Qe,ze=(Qe=!0,{enable:function(){Qe=!0},disable:function(){Qe=!1},get enabled(){return Qe}}),qe="ssai-breakStart",Ke="ssai-adImpression",Xe="ssai-firstQuartile",Je="ssai-midpoint",$e="ssai-thirdQuartile",Ze="ssai-complete",en="ssai-breakEnd",nn={breakStart:qe,impression:Ke,firstQuartile:Xe,midpoint:Je,thirdQuartile:$e,complete:Ze,breakEnd:en};function tn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,i=nn[o];i&&t.trigger(i,n)}function on(e){var n=r(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(qe,e)},adImpression:function(e){return t(Ke,e)},adFirstQuartile:function(e){return t(Xe,e)},adMidpoint:function(e){return t(Je,e)},adThirdQuartile:function(e){return t($e,e)},adComplete:function(e){return t(Ze,e)},adBreakEnd:function(e){return t(en,e)}}}function rn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function ln(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?rn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):rn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var an,dn=(an={},{get:function(){return an},set:function(e){an=e}});function un(e,n){var t,o,i,l,a,d,u,s,c,v,m,f,p,g,E,T,b,_,S=null==e?void 0:e.playerId,O=r(S);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var D=te(),A=(null==D||null===(o=D.video)||void 0===o?void 0:o.metadata)||[],L=(null==A?void 0:A.length)&&A.filter(function(e){return"advertisingGenre"===e.name});if(null!==(i=L)&&void 0!==i&&i.length){var P=L.map(function(e){return e.value});L=null==P?void 0:P.join(",")}w();var k,F,R,C=null===(l=window)||void 0===l?void 0:l.lcProgrammeDetails,j=Array.isArray(null==C?void 0:C.category)?null==C||null===(a=C.category)||void 0===a?void 0:a.join(","):(null==C?void 0:C.category)||null,V=ln(ln(ln({},null==D?void 0:D.video),null==D?void 0:D.linearchannel),{},{siteName:(null==D?void 0:D.site)||null,programId:(null==C?void 0:C.videotmsid)||null,programTitle:(null==C?void 0:C.lcProgrammeName)||null,episodeId:(null==C?void 0:C.videotmsid)||null,seasonNumber:(null==D||null===(d=D.video)||void 0===d||null===(u=d.series)||void 0===u?void 0:u.seasonNumber)||(null==C||null===(s=C.seriesDetails)||void 0===s?void 0:s.season)||null,episodeNumber:(null==D||null===(c=D.video)||void 0===c||null===(v=c.series)||void 0===v?void 0:v.episodeNumber)||(null==C||null===(m=C.seriesDetails)||void 0===m?void 0:m.episode)||null,episodeTitle:(null==C?void 0:C.lcSubTitle)||null,isCompleteEpisode:!!(null!=D&&null!==(f=D.video)&&void 0!==f&&f.series||null!=C&&null!==(p=C.seriesDetails)&&void 0!==p&&p.episode),genre:L||j,comscoreConfig:{implementationId:(null==e||null===(g=e.comscore)||void 0===g?void 0:g.implementationId)||null,projectId:(null==e||null===(E=e.comscore)||void 0===E?void 0:E.projectId)||null}}),N=null==e||null===(T=e.comscore)||void 0===T||null===(b=T.metadata)||void 0===b?void 0:b.contentType;if(null!=V&&null!==(_=V.streamingInfo)&&void 0!==_&&_.isLiveStream?V.contentType="Live":V.contentType=N||"LongFormOnDemand",null==V||!V.network){var W,U=(null==V?void 0:V.metadata)||[],B=null==U||null===(W=U.find(function(e){return"network"===e.name}))||void 0===W?void 0:W.value;V.network=B||null}null!=V&&V.network&&null!=V&&V.genre&&(V.customGenre="".concat(V.network,"_").concat((null==V?void 0:V.programTitle)||(k=V,null!=k&&k.series?null==k||null===(R=k.series)||void 0===R?void 0:R.title:null==k||null===(F=k.gist)||void 0===F?void 0:F.title),"_").concat(V.genre)),null!=C&&C.airDate&&(V.publishDate=C.airDate),null!=V&&V.runtime&&"function"==typeof O.duration&&(V.runtime=1e3*Math.ceil(O.duration()));var M=h(V,O);console.log("comscoreOptions player data",M),y(ln({playerName:"Video.js"},M)),I(O)}}function sn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function cn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?sn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):sn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function vn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return mn(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?mn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function mn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var fn,pn=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),gn=(fn=null,{set:function(e){fn=e},get position(){return fn}});function wn(e,n){return hn.apply(this,arguments)}function hn(){return(hn=n(t.mark(function e(n,o){var i,l,a,d,u,s,c,v,m,f,p,w,h,y,I,E,T,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r(n),a=je(o,n),d=a.src,u=(null==o?void 0:o.contentType)||"video",null==o||null===(i=o[u])||void 0===i||null===(l=i.streamingInfo)||void 0===l||l.isLiveStream,s=d.replace("/dash/","/session/").replace("/master/","/session/"),s=Re(s,n,o),c=In(s),v=g(c,2),m=v[0],f=v[1],p=yn(f)||{},s=new URL(s.split("?")[0]),Object.keys(f).length>0&&Object.entries(f).forEach(function(e){var n=g(e,2),t=n[0],o=n[1];s.searchParams.set(t,o)}),e.prev=11,e.next=14,fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(cn({adsParams:cn({},m)},p))});case 14:return w=e.sent,e.next=17,w.json();case 17:return h=e.sent,y="https://"+new URL(s).hostname,I=h.trackingUrl,E=h.manifestUrl,T=y+I,b=y+E,pn.set(T),console.log("%c TRACKING URL","background: #bdf369; color: #000",T),a.src=b,e.abrupt("return",a);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",a);case 32:case"end":return e.stop()}},e,null,[[11,29]])}))).apply(this,arguments)}function yn(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=g(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]}))||{}}function In(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),i=vn((null==o?void 0:o.searchParams)||[]);try{for(i.s();!(t=i.n()).done;){var r=g(t.value,2),l=r[0],a=r[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){i.e(e)}finally{i.f()}for(var d={},u={},s=0,c=Object.entries(n);s<c.length;s++){var v=g(c[s],2),m=v[0],f=v[1];if(m.startsWith("ads."))d[m.replace(/^ads\./,"")]=f;else u[m]=f}return[d,u]}var En,Tn,bn,_n=new Map;function Sn(e,n){return On.apply(this,arguments)}function On(){return On=n(t.mark(function e(o,i){var a,d,u,s,c,v,m,f,g,w,h,y,I,E,T,b,_,S,O,D,A,L,P,k,F;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:F=function(e,n,t,i,l,a){var d,u,s=r(o);if(!s.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds,e<P&&L.clear(),P=e;var v=(null==n||null===(d=n.ads)||void 0===d||null===(u=d[i])||void 0===u?void 0:u.adId)||c;Math.floor(s.currentTime());var m,f=vn(t);try{var p=function(){var t,r,d,u=m.value,c=u.eventType,f=u.beaconUrls,p=u.startTimeInSeconds,g=u.startTime,w=u.durationInSeconds,h=p||0,y=f,I=(null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r||null===(d=r.ads)||void 0===d?void 0:d.adEventHandler)||null,E="".concat(h,"_").concat(c),T=_n.get("pod-".concat(l))||[];if(console.warn(e,h,"map:",c,"condition1:",e>=h,"map:",_n),e>=h&&!T.includes(E)){T.push(E),_n.set("pod-".concat(l),T);try{k(c,n,y,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,c,n)}if("breakEnd"==c){var b=gn.position;gn.set(null),setTimeout(function(){null!=b&&(s.currentTime(b),a())},500)}if("function"==typeof I)try{var _,S={eventType:c,startTimeInSeconds:p,startTime:g,durationInSeconds:w,ad:null==n||null===(_=n.ads)||void 0===_?void 0:_[i],adIndex:i};I({adsData:S}),tn(o,S)}catch(e){console.error("Error when calling ads callback:",e)}var O=dn.get();if(O&&0!==Object.keys(O).length){var D=O.formulateComscoreAdPayload,A=O.startComscoreAdTracking,P=O.finishComscoreAdTracking,F=O.endComscoreAdTracking,R="".concat(h,"_").concat(v,"_").concat(c);if(!L.has(R))if(L.set(R,!0),"impression"===c){var C,j=pn.get();A(D(cn(cn({},null==n||null===(C=n.ads)||void 0===C?void 0:C[i]),{},{trackingUrl:j})))}else"complete"===c?P():"breakEnd"===c&&F()}}};for(f.s();!(m=f.n()).done;)p()}catch(e){f.e(e)}finally{f.f()}}},k=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},A=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},_n.clear(),gn.set(i),g=pn.get(),(w=r(o)).one("loadeddata",function(){g&&D(g)}),h=new Map,y=new Map,I=-1,E=(null===(a=document)||void 0===a||null===(d=a.getElementsByClassName("tvProviderImage"))||void 0===d?void 0:d[0])||null,T=(null==w||null===(u=w.controlBar)||void 0===u?void 0:u.getChild("videoSelector"))||null,b=(null==w||null===(s=w.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,_=(null==w||null===(c=w.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,S=(null==w||null===(m=w.el())||void 0===m||null===(f=m.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,O=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return p(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),u=(null==d?void 0:d.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!u&&l){var s=null==d?void 0:d.map(function(e){return cn(cn({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=s&&s[0]&&i.push(null==s?void 0:s[0])}return i},D=function(){var e=n(t.mark(function e(n){var a,d,u,s,c,v,m,f,g,w,D,L,P,k,R,C,j,V,N,W,U,B,M,x;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return W=function(e){document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",W),0===e.button&&j()},N=function(e){},V=function(){var e,n=w.currentTime(),t=null,o=vn(g);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=(i.ads,Math.floor(r+l));n>=r&&n<=a&&(t=a,h.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){w.currentTime(t+2.2)},100))},j=function(){var e,n=w.currentTime(),t=null,o=vn(g);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=i.ads,d=Math.floor(r+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>r)&&!h.has(r)||n>=r&&n<=d)&&(t=r,h.set(r,!0),y.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){w.currentTime(t+.4)},100))},c=!1,e.next=7,fetch(n);case 7:return v=e.sent,e.next=10,v.json();case 10:m=e.sent,f=m.avails,g=[],w=r(o),D=w.controlBar.progressControl,L=D.seekBar.el(),null===(a=document)||void 0===a||a.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),f.map(function(e,n){var t;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(c=!0),g.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:O(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!c&&i&&(w.currentTime(i),V()),null!=g&&g.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",g),window.adsQueueList=g,"function"==typeof(C=(null===(P=window)||void 0===P||null===(k=P.customData)||void 0===k||null===(R=k.ads)||void 0===R?void 0:R.onAdBreaksLoaded)||null)&&C(g)),console.log(g,"data"),g.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=w.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",L.appendChild(r)}}),w._timeUpdateHandler&&w.off("timeupdate",w._timeUpdateHandler),w._timeUpdateHandler=l(function(){var e=w.currentTime();if(e!==I){I=e;for(var n=!1,t=function(){var t=g[o],i=t.startTimeInSeconds,r=t.durationInSeconds,l=t.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){var d;e>=i&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&h.set(i,!0),ze.disable(),E&&E.classList.add("vjs-hidden"),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),D.el().classList.add("hide-progress-bar");for(var u=e-i,s=0,c=0,v=0;v<l.length;v++){var m,f=null==l||null===(m=l[v])||void 0===m?void 0:m.durationInSeconds;if(u<s+f){c=v;break}s+=f}l[c];var w=Math.max(0,r-u),I=Math.round(w);U.style.display="block",x.textContent="".concat(c+1," of ").concat(l.length," • ").concat(A(I));var O=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});O.push.apply(O,p(n))}),(null==t||null===(d=t.podSlotImpressionBeacon)||void 0===d?void 0:d.length)>0&&O.push.apply(O,p(null==t?void 0:t.podSlotImpressionBeacon)),F(e,t,O,c,o,V),"break"}y.delete(i)},o=0;o<g.length;o++){if("break"===t())break}n||(U.style.display="none",D.el().classList.remove("hide-progress-bar"),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),E&&E.classList.remove("vjs-hidden"),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),ze.enable())}},1e3),w.on("timeupdate",w._timeUpdateHandler),null===(d=document)||void 0===d||d.addEventListener("keydown",function(e){ze.enabled&&"ArrowRight"==e.key&&(j(),Un(o,10),e.stopPropagation())}),D.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",W))}),null===(u=document)||void 0===u||null===(s=u.querySelectorAll(".ssai-ad-container"))||void 0===s||s.forEach(function(e){return null==e?void 0:e.remove()}),(U=document.createElement("div")).className="ssai-ad-container",(B=document.createElement("div")).className="sponsored-adbox",(M=document.createElement("div")).className="sponsored-text",M.textContent="Sponsored Ad",B.append(M),(x=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",U.append(B),U.append(x),w.el().appendChild(U);case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),L=new Map,P=-1;case 21:case"end":return e.stop()}},e)})),On.apply(this,arguments)}function Dn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return An(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?An(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function An(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function Ln(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Pn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ln(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ln(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var kn={},Fn=(null===(En=window)||void 0===En||null===(Tn=En.location)||void 0===Tn||null===(bn=Tn.search)||void 0===bn?void 0:bn.includes("debug=true"))||!1,Rn=null;function Cn(e){return jn.apply(this,arguments)}function jn(){return jn=n(t.mark(function e(o){var i,a,d,u,s,c,v,m,f,g,w,h,y,I,E,T,b,_,S,O,D,A,L,P,k,F,R;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:R=function(e,n,t,i,l){var a,d,u=r(o);if(!u.seeking()){var s=n.startTimeInSeconds;n.durationInSeconds;var c=(null==n||null===(a=n.ads)||void 0===a||null===(d=a[i])||void 0===d?void 0:d.adId)||s;Math.floor(u.currentTime());var v,m=Dn(t);try{for(m.s();!(v=m.n()).done;){var f,p,g,w=v.value,h=w.eventType,y=w.beaconUrls,I=w.startTimeInSeconds,E=w.startTime,T=w.durationInSeconds,b=(w.eventId,I||s),_=y,S=(null===(f=window)||void 0===f||null===(p=f.customData)||void 0===p||null===(g=p.ads)||void 0===g?void 0:g.adEventHandler)||null,O="".concat(c,"_").concat(h),D="pod-".concat(s);P.has(D)||P.set(D,new Set);var A=P.get(D);if(Fn&&console.warn(e,b,"map:",h,"condition1:",e>=b,"map:",P),e>=b&&e<=b+k&&!A.has(O)){A.add(O);try{F(h,n,_,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,h,n)}if("function"==typeof S)try{var L,R={eventType:h,startTimeInSeconds:I,startTime:E,durationInSeconds:T,ad:null==n||null===(L=n.ads)||void 0===L?void 0:L[i],adIndex:i};S({adsData:R}),tn(o,R)}catch(e){console.error("Error when calling ads callback:",e)}var C=dn.get();if(C&&0!==Object.keys(C).length){var j=C.formulateComscoreAdPayload,V=C.startComscoreAdTracking,N=C.finishComscoreAdTracking,W=C.endComscoreAdTracking;if("impression"===h){var U,B=pn.get();V(j(Pn(Pn({},null==n||null===(U=n.ads)||void 0===U?void 0:U[i]),{},{trackingUrl:B})))}else"complete"===h?N():"breakEnd"===h&&W()}}}}catch(e){m.e(e)}finally{m.f()}}},F=function(e,n,t,o){var i,r,l;"breakEnd"===e&&(null===(i=kn)||void 0===i?void 0:i.currentAdIndex)+1!=(null===(r=kn)||void 0===r?void 0:r.totalAds)&&(null==n||null===(l=n.ads)||void 0===l?void 0:l.length)>0||(Fn&&console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})}))},w=function(){Rn&&clearInterval(Rn)},f=pn.get(),(g=r(o)).one("loadeddata",function(){w(),Rn=setInterval(function(){f&&!g.paused()&&L(f)},2e3)}),g.on("dispose",function(){w()}),h=new Map,y=new Map,I=-1,E=null,T=(null===(i=document)||void 0===i||null===(a=i.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,b=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,_=(null==g||null===(u=g.controlBar)||void 0===u?void 0:u.getChild("seriesV2"))||null,S=(null==g||null===(s=g.el())||void 0===s||null===(c=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,O=(null==g||null===(v=g.el())||void 0===v||null===(m=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,D=!1,A=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return p(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),u=(null==d?void 0:d.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!u&&l){var s=null==d?void 0:d.map(function(e){return Pn(Pn({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=s&&s[0]&&i.push(null==s?void 0:s[0])}return i},L=function(){var e=n(t.mark(function e(n){var i,a,d,u,s,c,v,m,f,g;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=new URL(n),E&&a.searchParams.append("nextToken",E),e.next=4,fetch(a.toString(),{method:"GET"});case 4:return d=e.sent,e.next=7,d.json();case 7:u=e.sent,s=u.avails,c=u.nextToken||null,E=c,v=[],m=r(o),f=m.controlBar.progressControl,g=f.seekBar.el(),null===(i=document)||void 0===i||i.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),s.map(function(e,n){v.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:A(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),Fn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",v),null!=v&&v.length&&(window.adsQueueList=v),v.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=m.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",g.appendChild(r)}}),m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=l(function(){var e=m.currentTime();if(e!==I){I=e;for(var n=function(){var n=v[t],o=n.startTimeInSeconds,i=n.durationInSeconds,r=n.ads,l=o+i;if(e>=o-1.2&&e<=l+1.2){var a;D=!!(e>=o&&e<=l&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>l&&h.set(o,!0),ze.disable(),T&&T.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),O&&(O.style.pointerEvents="none",O.classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),_&&(_.el().style.pointerEvents="none",_.el().classList.add("vjs-hidden")),f.el().classList.add("hide-progress-bar");for(var d=e-o,u=0,s=0,c=0;c<r.length;c++){var m,g=null==r||null===(m=r[c])||void 0===m?void 0:m.durationInSeconds;if(d<u+g){s=c;break}u+=g}setTimeout(function(){kn.totalAds=null==r?void 0:r.length,kn.currentAdIndex=s},1e3);var w=[];return null==r||r.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});w.push.apply(w,p(n))}),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&w.push.apply(w,p(null==n?void 0:n.podSlotImpressionBeacon)),R(e,n,w,s),"break"}y.delete(o)},t=0;t<v.length;t++){if("break"===n())break}D||(kn={},f.el().classList.remove("hide-progress-bar"),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),_&&(_.el().style.pointerEvents="auto",_.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),ze.enable())}},1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),P=new Map,k=2.5;case 22:case"end":return e.stop()}},e)})),jn.apply(this,arguments)}function Vn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}var Nn=function(e){o(e).play()},Wn=function(e){o(e).pause()},Un=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},Bn=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},Mn=function(e){return!!o.getPlayer("".concat(e))},xn=function(e){return o(e).paused()},Hn=function(){var e=n(t.mark(function e(o,i){var l,a,d,u=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=u.length>2&&void 0!==u[2]&&u[2],e.next=3,X();case 3:return a=e.sent,d=r(o),e.abrupt("return",new Promise(function(e,r){k(i,a).then(function(){var r=n(t.mark(function n(r){var a,u,s,c,v,m,f,p;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(m=null==r?void 0:r.data,window.sid=ge(),m.contentType="linearchannel",m.channelId=null==i?void 0:i.channelId,f=(null==m||null===(a=m.linearchannel)||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(c=s.appcmsMain)||void 0===c||null===(v=c.adsConfig)||void 0===v?void 0:v.vodAdSticherProvider)||!1,p=je(m,o),!f){n.next=11;break}return n.next=9,wn(o,m);case 9:p=n.sent,l=!0;case 11:ne(m),p&&l?(qn(o,p),f&&Cn(o),d.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:m})})):(dn.get()&&0!==Object.keys(dn.get()).length&&un({playerId:o,comscore:{enable:!0}}),e({status:!0,msg:"Feed authenticated",response:m}));case 13:case"end":return n.stop()}},n)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){r({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Gn=function(){var e=n(t.mark(function e(o,i,l){var a,d,u,s,c,f,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X();case 2:return s=e.sent,(ie()||null)&&ue(i),c=0,f=0,p=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(d=window)&&void 0!==d&&null!==(u=d.watchHistory)&&void 0!==u&&u.enable&&C(i,s).then(function(e){var n,t,o,i,r,l,a;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),c=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,(f=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(p=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)}).catch(function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))}),e.abrupt("return",new Promise(function(e,l){P(i,s).then(function(){var i=n(t.mark(function n(i){var a,d,u,s,g,w,h,y,I,E,T,b,_,S,O,D,A,L,P,k,F,R,C,j,V,N,W,U,B,M,x,H,G,Y,Q,z,q,K;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(D=null==i?void 0:i.data,A=(null==D?void 0:D.contentType)||"video",L=(null==D||null===(a=D[A])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(s=u.appcmsMain)||void 0===s||null===(g=s.adsConfig)||void 0===g?void 0:g.vodAdSticherProvider)||!1,P=(null==D||null===(w=D.video)||void 0===w||null===(h=w.streamingInfo)||void 0===h?void 0:h.isLiveStream)||!1,ne(i.data),(k=(null==D||null===(y=D.ads)||void 0===y||null===(I=y.preRoll)||void 0===I||null===(E=I.adTags)||void 0===E||null===(T=E.web)||void 0===T?void 0:T.active)&&(null==D||null===(b=D.ads)||void 0===b||null===(_=b.preRoll)||void 0===_||null===(S=_.adTags)||void 0===S||null===(O=S.web)||void 0===O?void 0:O.url))&&Ge(o,k,D),F=je(D,o),!L){n.next=12;break}return n.next=11,wn(o,D);case 11:F=n.sent;case 12:F?(H=(null==D||null===(R=D.video)||void 0===R||null===(C=R.gist)||void 0===C?void 0:C.videoImageUrl)||(null==D||null===(j=D.video)||void 0===j||null===(V=j.gist)||void 0===V||null===(N=V.imageGist)||void 0===N?void 0:N.r16x9),(G=r(o)).poster(H),qn(o,F),L&&Sn(o,p),G.on("loadstart",function(){P&&e({status:!0,msg:"Video Loaded",response:D})}),G.on("loadeddata",function(){xe(),e({status:!0,msg:"Video Loaded",response:D})}),G.one("play",function(){c&&!L&&f<95&&setTimeout(function(){G.currentTime(c)},0)}),G.one("error",function(){var e;l({status:!1,msg:(null==G||null===(e=G.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==D||null===(W=D.video)||void 0===W||null===(U=W.contentDetails)||void 0===U||null===(B=U.closedCaptions)||void 0===B?void 0:B.length)>0||(null==D||null===(M=D.video)||void 0===M||null===(x=M.closedCaptions)||void 0===x?void 0:x.length)>0?(K=(null==D||null===(Q=D.video)||void 0===Q||null===(z=Q.contentDetails)||void 0===z?void 0:z.closedCaptions)||(null==D||null===(q=D.video)||void 0===q?void 0:q.closedCaptions),Y=K.filter(function(e){return"VTT"===e.format}),v(o,Y)):m(o)):(Me(o,"Incompatible Source, only hls,mp4,drm content is allowed"),l("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}},n)}));return function(e){return i.apply(this,arguments)}}()).catch(function(e){Kn(e,o,l,i)})}));case 10:case"end":return e.stop()}},e)}));return function(n,t,o){return e.apply(this,arguments)}}(),Yn=function(e,n,t){var o=r(e);return o.src(n),new Promise(function(e,n){var i=0;o.one("loadedmetadata",function(){clearTimeout(i),e({status:!0,msg:"video loaded"})}),o.one("loadstart",function(e){i=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},Qn=function(e){var n=r(e),t=(dn.get()||{}).destroyComscoreTag;if(zn(),t&&t(),a(),window.onresize=null,n)n.dispose();else{var o=document.getElementById(e);o&&o.remove()}},zn=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},qn=function(e,n){var t=r(e);t&&t.src(n)},Kn=function(n,t,o,i){var r,l,a,d,u,s,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Mn(t)&&Me(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Vn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Vn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},Xn=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")};export{Sn as $,F as A,_e as B,se as C,oe as D,Yn as E,Un as F,Nn as G,Wn as H,Bn as I,Mn as J,Gn as K,Hn as L,Qn as M,N,on as O,Z as P,V as Q,J as R,B as S,W as T,T as U,_n as V,Ye as W,re as X,xn as Y,le as Z,Cn as _,Oe as a,j as a0,de as a1,ue as a2,ie as b,dn as c,Se as d,te as e,je as f,we as g,ne as h,un as i,xe as j,Me as k,qn as l,ae as m,Xn as n,be as o,Ge as p,Be as q,wn as r,R as s,$ as t,P as u,ee as v,C as w,Kn as x,X as y,k as z};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fires internal player events which are generic for all skins
|
|
3
|
+
* @param {String} [playerId] [playerId of the player]
|
|
4
|
+
*/
|
|
5
|
+
export function globalPlayerEvents(playerId?: string, config: any, feedback: any, { res, sres }: {
|
|
6
|
+
res: any;
|
|
7
|
+
sres: any;
|
|
8
|
+
}): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export function setCurrentSeries(data: any): void;
|
|
2
|
+
export function setCurrentVideo(data: any): void;
|
|
3
|
+
export function getCurrentSeries(): any;
|
|
4
|
+
export function getCurrentVideo(): any;
|
|
5
|
+
export function setVideoIdx(val: any): void;
|
|
6
|
+
export function getVideoIdx(): any;
|
|
7
|
+
export function createIdxMapping(arr: any): void;
|
|
8
|
+
export function setVideoIdxById(videoId: any): void;
|
|
9
|
+
export function setSeriesWatchMap(val: any): void;
|
|
10
|
+
export function getSeriesWatchMap(): any;
|
|
11
|
+
export namespace seasonIdxManager {
|
|
12
|
+
function set(idx: any): void;
|
|
13
|
+
function get(): number;
|
|
14
|
+
}
|
|
15
|
+
export namespace videoReplayTracker {
|
|
16
|
+
function set(res: any): void;
|
|
17
|
+
function get(videoId: any): any;
|
|
18
|
+
function clear(): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function switchToSecondaryAsset(res: any, playerId: any): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export function throttle(fn: any, delay: any): (...args: any[]) => void;
|
|
2
|
+
export function setUpdatedElHeight(playerId: any, el: any): void;
|
|
3
|
+
export function handleDrawerResizing(playerId: any, drawerEl: any): void;
|
|
4
|
+
export function createIconMarkup(icon: any): SVGSVGElement;
|
|
5
|
+
export function isNotAValidSkin(skin: any): boolean;
|
|
6
|
+
export function highlightVideo(i: any, DEFAULTV2_TEMP_PLAYER_ID: any): void;
|
|
7
|
+
export function closeOpenDrawers(): void;
|
|
8
|
+
export function parseSvgString(svgString: any): SVGSVGElement;
|
|
9
|
+
export function parseHtmlString(htmlString: any): HTMLBodyElement;
|
|
10
|
+
export function impolicy16x9(img: any): string;
|
|
11
|
+
export function on_orientation_change(playerId: any, element: any): void;
|
|
12
|
+
export function detectOrientationChange(playerId: any, element: any): void;
|
|
13
|
+
export function clearEventListeners(): void;
|
|
14
|
+
export function highlightVideo_DEFAULTV2_TEMP(i: any): void;
|
|
15
|
+
export function createSVGWithUse(iconId: any, viewBox?: string): {
|
|
16
|
+
svg: SVGSVGElement;
|
|
17
|
+
use: SVGUseElement;
|
|
18
|
+
};
|
|
19
|
+
export function injectSVG(targetElement: any, iconId: any): SVGUseElement;
|
|
20
|
+
export function debounce(fn: any, delay: any): (...args: any[]) => void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export namespace SSAI_EVENTS {
|
|
2
|
+
const BREAK_START: string;
|
|
3
|
+
const IMPRESSION: string;
|
|
4
|
+
const FIRST_QUARTILE: string;
|
|
5
|
+
const MIDPOINT: string;
|
|
6
|
+
const THIRD_QUARTILE: string;
|
|
7
|
+
const COMPLETE: string;
|
|
8
|
+
const BREAK_END: string;
|
|
9
|
+
}
|
|
10
|
+
export function triggerSSAIEvents(playerId: any, adsData?: {}): {};
|
|
11
|
+
export function getSsaiEvents(playerId: any): {
|
|
12
|
+
adBreakStart?: undefined;
|
|
13
|
+
adImpression?: undefined;
|
|
14
|
+
adFirstQuartile?: undefined;
|
|
15
|
+
adMidpoint?: undefined;
|
|
16
|
+
adThirdQuartile?: undefined;
|
|
17
|
+
adComplete?: undefined;
|
|
18
|
+
adBreakEnd?: undefined;
|
|
19
|
+
} | {
|
|
20
|
+
adBreakStart: (cb: any) => () => any;
|
|
21
|
+
adImpression: (cb: any) => () => any;
|
|
22
|
+
adFirstQuartile: (cb: any) => () => any;
|
|
23
|
+
adMidpoint: (cb: any) => () => any;
|
|
24
|
+
adThirdQuartile: (cb: any) => () => any;
|
|
25
|
+
adComplete: (cb: any) => () => any;
|
|
26
|
+
adBreakEnd: (cb: any) => () => any;
|
|
27
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function token_authentication_enabled(params: any): boolean;
|
|
2
|
+
export function getToken(): Promise<any>;
|
|
3
|
+
export function fetchRefreshToken(): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
4
|
+
export function refreshTokenManager(): {
|
|
5
|
+
set(token: any): void;
|
|
6
|
+
get(): any;
|
|
7
|
+
};
|
|
8
|
+
export function isTokenExpired(token: any): boolean;
|
|
9
|
+
export function getDecodedToken(token: any): any;
|
|
10
|
+
export function setUserId(userId: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./index-18e71208.js";import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import{t as r,g as n}from"./skin-4f84b841.js";import i from"@babel/runtime/helpers/defineProperty";import a from"@babel/runtime/helpers/slicedToArray";import{e as u}from"./generic-fa853318.js";function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var l="my-player";function c(e){var t=e.split("\n"),r=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),n={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(n.resolution=e.split("=")[1]),e.includes("URI")&&(n.uri=e.split("=")[1].replace(/"/g,""))}),r.push(n)}}),r}function p(){return(p=e(t.mark(function e(r){var n,i,u,o,s,l,c,p,d,m,f,b,g,v,h,x,y,w,k,E,j,N,A,T;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!r._tiles){e.next=2;break}return e.abrupt("return",r._tiles);case 2:return e.prev=2,e.next=5,fetch(r.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return i=e.sent,e.next=11,createImageBitmap(i);case 11:for(u=e.sent,o=r.layout.split("x").map(Number),s=a(o,2),l=s[0],c=s[1],p=u.width/c,d=u.height/l,m=[],f=0;f<l;f++)for(b=0;b<c;b++)(g=document.createElement("canvas")).width=p,g.height=d,g.getContext("2d").drawImage(u,b*p,f*d,p,d,0,0,p,d),v=g.toDataURL("image/png"),m.push({uri:v,duration:r.duration}),r._tiles=m;return e.abrupt("return",m);case 20:for(e.prev=20,e.t0=e.catch(2),h=r.layout.split("x").map(Number),x=a(h,2),y=x[0],w=x[1],k=[],E=0;E<y*w;E++)k.push({uri:null===(j=window)||void 0===j||null===(N=j.app_data)||void 0===N||null===(A=N.appcmsMain)||void 0===A||null===(T=A.images)||void 0===T?void 0:T.placeholderCover,duration:r.duration});return e.abrupt("return",k);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function d(e,t){return m.apply(this,arguments)}function m(){return(m=e(t.mark(function e(r,n){var i,a;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=n,e.prev=1,e.next=4,fetch(r);case 4:return i=e.sent,e.next=7,i.text();case 7:return a=e.sent,e.abrupt("return",c(a));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function f(e,t,r){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=n(l);if(i&&a){var u=i.getBoundingClientRect(),o=(e.clientX-u.left)/u.width,s=function(e,t){var r,n;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var u=Math.floor((i+a)/2),o=t[u];if(o===e)return o;o<e?i=u+1:a=u-1}var s=null!==(r=t[i])&&void 0!==r?r:1/0,l=null!==(n=t[a])&&void 0!==n?n:-1/0;return Math.abs(s-e)<Math.abs(l-e)?s:l}(Math.round(o*a.duration()),r),c=t[s];c&&!c.loading&&(c.loading=!0,function(e){return p.apply(this,arguments)}(c).then(function(e){var t=e[c.tileIndex],r=document.querySelector(".vjs-thumbnail-holder img");r&&t.uri&&(r.src=t.uri),c.loading=!1,c.src=t.uri}))}}function b(e){return g.apply(this,arguments)}function g(){return(g=e(t.mark(function e(n){var u,o,l,c;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u={},n.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),n=a(r,2),o=n[0]*n[1],l=e.duration,c=0;c<o;c++){var p,d=Math.round((t*o+c)*l);u[d]=s(s({},e),{},{duration:e.duration,tileIndex:c,loading:!1,style:(p={left:"-60px",height:"85px",width:"130px"},i(p,"left","-60px"),i(p,"border","1px solid transparent"),i(p,"borderRadius","4px"),p)})}}),o=Object.keys(u).map(Number).sort(function(e,t){return e-t}),null==(l=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||l.addEventListener("mousemove",r(function(e){return f(e,u,o)},500)),null==(c=document.querySelector(".vjs-progress-control.vjs-control"))||c.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",r(function(e){return f(e,u,o)},500))}),e.abrupt("return",u);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var v=function(){var r=e(t.mark(function e(r,n){var i,u,o,s,l,c,p,d;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(r+n);case 2:return i=e.sent,e.next=5,i.text();case 5:u=e.sent,o=u.split("\n").map(function(e){return e.trim()}),s=[],l=null,c=0;case 10:if(!(c<(null==o?void 0:o.length))){e.next=27;break}if(!(p=o[c]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},d=p.split(":")[1]||"",d.split(",").forEach(function(e){var t=e.split("="),r=a(t,2),n=r[0],i=r[1];n&&i&&(l[n.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!p.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(p.includes("jpg")||p.includes("png")||p.includes("jpeg"))&&(l.uri=p.includes("http")?p:r+p,s.push(l),l=null);case 24:c++,e.next=10;break;case 27:return e.abrupt("return",s);case 28:case"end":return e.stop()}},e)}));return function(e,t){return r.apply(this,arguments)}}();function h(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function x(e,t){return y.apply(this,arguments)}function y(){return(y=e(t.mark(function e(r,i){var o,s,c,p,d,m,f,b,g,v,x,y,E,j,N,A,T,O,I,S,M,P,R,$,B,D,L,U,C,X,q,_,F,W,z,G,H,J,K,Q,V,Y,Z,ee,te,re,ne,ie,ae,ue,oe,se,le,ce,pe,de,me,fe;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=i,o=n(i),s=r.split("/"),c=s.findIndex(function(e){return"dash"===e.toLowerCase()}),p=h(-1!==c?s.slice(0,c+1).join("/"):new URL(r).origin),e.prev=5,e.next=8,fetch(r);case 8:return b=e.sent,e.next=11,b.text();case 11:g=e.sent,v=new DOMParser,x=v.parseFromString(g,"application/xml"),y=(null==o?void 0:o.duration())||(null===(d=u())||void 0===d||null===(m=d.video)||void 0===m?void 0:m.runtime),E=(null==x||null===(f=x.querySelector("MPD > BaseURL"))||void 0===f?void 0:f.textContent)||p+"/",j=x.getElementsByTagName("AdaptationSet"),N=0;case 18:if(!(N<j.length)){e.next=72;break}if(("image"!==(A=j[N]).getAttribute("contentType")||"image/png"!==A.getAttribute("mimeType"))&&"image/jpeg"!==A.getAttribute("mimeType")){e.next=69;break}if(O=A.getElementsByTagName("SegmentTemplate")[0],I=null===(T=O.getElementsByTagName("SegmentTimeline"))||void 0===T?void 0:T[0],!O||!I){e.next=48;break}if(P=I.getElementsByTagName("S"),R=parseInt(null===(S=P[0])||void 0===S?void 0:S.getAttribute("t")),$=parseInt(null===(M=P[0])||void 0===M?void 0:M.getAttribute("d")),B=A.getElementsByTagName("Representation")[0],D=B.getElementsByTagName("EssentialProperty")[0],L=D.getAttribute("value"),U=null==L?void 0:L.split("x"),C=a(U,2),X=C[0],q=C[1],!O){e.next=46;break}if(O.getAttribute("media"),_=O.getAttribute("timescale"),F=(_?$/_:$)/(X*q),W=B.getAttribute("id"),z=Math.round(y/F),G=Math.ceil(z/(X*q)),H=O.getAttribute("media"),parseInt(O.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(J=[],N=0;N<G;N++)Q="/"==(K=H)[0]?new URL(p).origin:p+"/",J.push({duration:F,layout:L,uri:Q+K.replace("$Time$",R+N*$).replace("$RepresentationID$",W)});return e.abrupt("return",J);case 46:e.next=69;break;case 48:if(V=A.getElementsByTagName("Representation")[0],Y=V.getElementsByTagName("EssentialProperty")[0],Z=Y.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=a(ee,2),re=te[0],ne=te[1],!O){e.next=69;break}if(O.getAttribute("media"),ie=O.getAttribute("duration"),ae=O.getAttribute("timescale"),ue=(ae?ie/ae:ie)/(re*ne),oe=V.getAttribute("id"),se=Math.round(y/ue),le=Math.ceil(se/(re*ne)),ce=O.getAttribute("media"),pe=parseInt(O.getAttribute("startNumber"))||0,!isNaN(parseInt(le))){e.next=65;break}return e.abrupt("return");case 65:for(de=[],me=w(ce),N=0;N<le;N++)fe=me?k(me,N+pe):ce,de.push({duration:ue,layout:Z,uri:E+fe.replace("$Number$",N+pe).replace("$RepresentationID$",oe)});return e.abrupt("return",de);case 69:N++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function w(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function k(e,t){var r=e.match(/%0(\d+)d/);if(!r)return e;var n=parseInt(r[1],10),i=String(t).padStart(n,"0");return e.replace(/\$Number%0\d+d\$/,i)}function E(e){return j.apply(this,arguments)}function j(){return(j=e(t.mark(function e(r){var i,a,u,o,s,l,c,p,m,f,g,h,y,w,k,E;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l=n(r),c=l.currentSource(),p=c.src,p=null!==(i=p)&&void 0!==i&&i.includes("blob")?null===(a=window)||void 0===a||null===(u=a.player)||void 0===u?void 0:u.getSource():p,null===(o=p)||void 0===o||!o.includes("m3u8")){e.next=19;break}return e.next=6,d(p,r);case 6:if(!((null==(m=e.sent)?void 0:m.length)>0)){e.next=17;break}return f=(null==m?void 0:m[0])||null,g=f.uri,h=p.substring(0,p.lastIndexOf("/"))+"/",e.next=12,v(h,g);case 12:return y=e.sent,e.next=15,b(y);case 15:w=e.sent,l.thumbnails(w);case 17:e.next=28;break;case 19:if(null===(s=p)||void 0===s||!s.includes("mpd")){e.next=28;break}return e.next=22,x(p,r);case 22:if(!((null==(k=e.sent)?void 0:k.length)>0)){e.next=28;break}return e.next=26,b(k);case 26:E=e.sent,l.thumbnails(E);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}export{E as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t,p as n,d as o}from"./skin-4f84b841.js";import{X as i,b as l}from"./generic-fa853318.js";import{s as a}from"./autoNextVideo-4cdb3520.js";import{e as r}from"./icons-699e8cf0.js";import s from"@babel/runtime/helpers/typeof";import d from"video.js";var c,u,m,v,p=[],f=!1,g=function(a,s){var d;if(f=!1,null!=s&&null!==(d=s.series)&&void 0!==d&&d.enable){var c;p=[];var u=l();null==u||u.map(function(t){var n;return(n=p).push.apply(n,e(t.episodes))}),null==s||null===(c=s.series)||void 0===c||c.cb}else{var m,v;p=(null==s||null===(m=s.relatedVideos)||void 0===m?void 0:m.content)||[],null==s||null===(v=s.relatedVideos)||void 0===v||v.cb}var g=t(a);g.on("timeupdate",function(){var e,t;if(!f){var n=Math.floor(g.currentTime()),o=g.duration(),l=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];o-n<=10&&i()<=(null===(t=p)||void 0===t?void 0:t.length)-1?l&&(l.style.visibility="visible"):l&&(l.style.visibility="hidden")}});var y,A=p.filter(function(e,t){return t==i()});if((null==A?void 0:A.length)>0)if(null!==(y=document.getElementsByClassName("next-ep-preview"))&&void 0!==y&&y[0]){var x,w,E,b,C,N,B,L,j,k,P,O;(null===(x=document.getElementsByClassName("next-ep-preview"))||void 0===x?void 0:x[0]).style.visibility="hidden";var I=null===(w=document.getElementsByClassName("next-ep-title"))||void 0===w?void 0:w[0],M=null===(E=document.getElementsByClassName("next-ep-img"))||void 0===E?void 0:E[0],T=null===(b=document.getElementsByClassName("next-ep-content"))||void 0===b?void 0:b[0],X=null===(C=A[0])||void 0===C?void 0:C.title;(null===(N=X)||void 0===N?void 0:N.length)>60&&(X=X.substr(0,60)+"..."),I.textContent="".concat(X),M.src=(null===(B=A[0])||void 0===B||null===(L=B.gist)||void 0===L||null===(j=L.imageGist)||void 0===j?void 0:j.r16x9)||(null==A||null===(k=A[0])||void 0===k?void 0:k.img)||(null===(P=window)||void 0===P||null===(O=P.customData)||void 0===O?void 0:O.fallbackImage),T.onclick=function(){return h(a)}}else{var F,R,D,G,S,V,H,Q,U=document.createElement("div");U.className="next-ep-preview",U.style.visibility="hidden",document.getElementById(a).append(U);var W=document.createElement("div");W.className="next-heading-wrapper";var Y=document.createElement("div");Y.className="next-ep-header",Y.textContent="Next up";var _=document.createElement("div");_.className="next-ep-close",_.onclick=function(){U.style.visibility="hidden",f=!0},_.appendChild(n(r())),W.append(Y),W.append(_);var q=null===(F=A[0])||void 0===F?void 0:F.title,z=document.createElement("img");z.className="next-ep-img",z.src=(null===(R=A[0])||void 0===R||null===(D=R.gist)||void 0===D||null===(G=D.imageGist)||void 0===G?void 0:G.r16x9)||(null==A||null===(S=A[0])||void 0===S?void 0:S.img)||(null===(V=window)||void 0===V||null===(H=V.customData)||void 0===H?void 0:H.fallbackImage);var J=document.createElement("div");J.className="next-ep-title",(null===(Q=q)||void 0===Q?void 0:Q.length)>60&&(q=q.substr(0,60)+"..."),J.textContent="".concat(q);var K=document.createElement("div");K.className="next-ep-content",K.append(z),K.append(J),K.onclick=o(function(){null==U||U.remove(),f=!0,h(a)},400),U.append(W),U.append(K)}},h=function(e,n){var o=t(e),l=Math.floor(o.currentTime());if(Math.floor(o.duration())!=l){o.pause(e);var r=i();a(r,e,p)}};function y(e,n){var o=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var l=document.createElement("div");l.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(i),a.alt="Provider Image",l.append(a),o.el().appendChild(l),o.on("useractive",function(){l.classList.remove("vjs-fade")}),o.on("userinactive",function(){o.paused()||l.classList.add("vjs-fade")}),o.on("fullscreenchange",function(){o.isFullscreen_?l.style.top="3.2rem":l.style.top="1rem"})}}c={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},u=function e(){var t,n,o,i,l;for(o in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[o])i.hasOwnProperty(l)&&("object"===s(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},m=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},v=function e(t){return"HTML"!==t.nodeName&&"static"===m(t)("position")?e(t.offsetParent):t},d.registerPlugin("thumbnails",function(e){var t,n,o,i,l,a,r,s;function d(){document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",d),s()}n=u({},c,e),i=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",o=document.createElement("img"),t.appendChild(o),o.src=n[0].src,o.className="vjs-thumbnail",u(o.style,n[0].style),o.style.left||o.style.right||(o.onload=function(){o.style.left=-o.naturalWidth/2+"px"}),a=i.duration(),i.on("durationchange",function(e){a=i.duration()}),i.on("loadedmetadata",function(e){a=i.duration()}),(l=i.controlBar.progressControl).el().appendChild(t),r=function(e){var i,r,s,d,c,p,f,g,h,y;for(r in s=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((y=v(l.el()).getBoundingClientRect()).width||y.right)+h,p=e.pageX,e.changedTouches&&(p=e.changedTouches[0].pageX),d=p||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,d-=v(l.el()).getBoundingClientRect().left+h,i=Math.floor((d-l.el().offsetLeft)/l.width()*a),n)i>r&&(s=Math.max(s,r));(c=n[s]).src&&o.src!=c.src&&(o.src=c.src),c.style&&o.style!=c.style&&u(o.style,c.style),d+(g=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=m(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(o,c.width||n[0].width)/2)>f?d-=d+g-f:d<g&&(d=g),t.style.left=d+"px"},l.on("mousemove",r),l.on("touchmove",r),l.on("pointerdown",function(e){document.addEventListener("pointermove",r),document.addEventListener("pointerup",d)}),s=function(e){t.style.left="-1000px"},l.on("mouseout",s),l.on("touchcancel",s),l.on("touchend",s),i.on("userinactive",s)});export{g as a,y as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./index-9367e9fe.js";import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import{t as r,g as n}from"./skin-4f84b841.js";import i from"@babel/runtime/helpers/defineProperty";import a from"@babel/runtime/helpers/slicedToArray";import{e as u}from"./generic-f7b6857e.js";function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var l="my-player";function c(e){var t=e.split("\n"),r=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),n={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(n.resolution=e.split("=")[1]),e.includes("URI")&&(n.uri=e.split("=")[1].replace(/"/g,""))}),r.push(n)}}),r}function p(){return(p=e(t.mark(function e(r){var n,i,u,o,s,l,c,p,d,m,f,b,g,v,h,x,y,w,k,E,j,N,A,T;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!r._tiles){e.next=2;break}return e.abrupt("return",r._tiles);case 2:return e.prev=2,e.next=5,fetch(r.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return i=e.sent,e.next=11,createImageBitmap(i);case 11:for(u=e.sent,o=r.layout.split("x").map(Number),s=a(o,2),l=s[0],c=s[1],p=u.width/c,d=u.height/l,m=[],f=0;f<l;f++)for(b=0;b<c;b++)(g=document.createElement("canvas")).width=p,g.height=d,g.getContext("2d").drawImage(u,b*p,f*d,p,d,0,0,p,d),v=g.toDataURL("image/png"),m.push({uri:v,duration:r.duration}),r._tiles=m;return e.abrupt("return",m);case 20:for(e.prev=20,e.t0=e.catch(2),h=r.layout.split("x").map(Number),x=a(h,2),y=x[0],w=x[1],k=[],E=0;E<y*w;E++)k.push({uri:null===(j=window)||void 0===j||null===(N=j.app_data)||void 0===N||null===(A=N.appcmsMain)||void 0===A||null===(T=A.images)||void 0===T?void 0:T.placeholderCover,duration:r.duration});return e.abrupt("return",k);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function d(e,t){return m.apply(this,arguments)}function m(){return(m=e(t.mark(function e(r,n){var i,a;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=n,e.prev=1,e.next=4,fetch(r);case 4:return i=e.sent,e.next=7,i.text();case 7:return a=e.sent,e.abrupt("return",c(a));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function f(e,t,r){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=n(l);if(i&&a){var u=i.getBoundingClientRect(),o=(e.clientX-u.left)/u.width,s=function(e,t){var r,n;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var u=Math.floor((i+a)/2),o=t[u];if(o===e)return o;o<e?i=u+1:a=u-1}var s=null!==(r=t[i])&&void 0!==r?r:1/0,l=null!==(n=t[a])&&void 0!==n?n:-1/0;return Math.abs(s-e)<Math.abs(l-e)?s:l}(Math.round(o*a.duration()),r),c=t[s];c&&!c.loading&&(c.loading=!0,function(e){return p.apply(this,arguments)}(c).then(function(e){var t=e[c.tileIndex],r=document.querySelector(".vjs-thumbnail-holder img");r&&t.uri&&(r.src=t.uri),c.loading=!1,c.src=t.uri}))}}function b(e){return g.apply(this,arguments)}function g(){return(g=e(t.mark(function e(n){var u,o,l,c;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u={},n.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),n=a(r,2),o=n[0]*n[1],l=e.duration,c=0;c<o;c++){var p,d=Math.round((t*o+c)*l);u[d]=s(s({},e),{},{duration:e.duration,tileIndex:c,loading:!1,style:(p={left:"-60px",height:"85px",width:"130px"},i(p,"left","-60px"),i(p,"border","1px solid transparent"),i(p,"borderRadius","4px"),p)})}}),o=Object.keys(u).map(Number).sort(function(e,t){return e-t}),null==(l=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||l.addEventListener("mousemove",r(function(e){return f(e,u,o)},500)),null==(c=document.querySelector(".vjs-progress-control.vjs-control"))||c.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",r(function(e){return f(e,u,o)},500))}),e.abrupt("return",u);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var v=function(){var r=e(t.mark(function e(r,n){var i,u,o,s,l,c,p,d;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(r+n);case 2:return i=e.sent,e.next=5,i.text();case 5:u=e.sent,o=u.split("\n").map(function(e){return e.trim()}),s=[],l=null,c=0;case 10:if(!(c<(null==o?void 0:o.length))){e.next=27;break}if(!(p=o[c]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},d=p.split(":")[1]||"",d.split(",").forEach(function(e){var t=e.split("="),r=a(t,2),n=r[0],i=r[1];n&&i&&(l[n.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!p.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(p.includes("jpg")||p.includes("png")||p.includes("jpeg"))&&(l.uri=p.includes("http")?p:r+p,s.push(l),l=null);case 24:c++,e.next=10;break;case 27:return e.abrupt("return",s);case 28:case"end":return e.stop()}},e)}));return function(e,t){return r.apply(this,arguments)}}();function h(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function x(e,t){return y.apply(this,arguments)}function y(){return(y=e(t.mark(function e(r,i){var o,s,c,p,d,m,f,b,g,v,x,y,E,j,N,A,T,O,I,S,M,P,R,$,B,D,L,U,C,X,q,_,F,W,z,G,H,J,K,Q,V,Y,Z,ee,te,re,ne,ie,ae,ue,oe,se,le,ce,pe,de,me,fe;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=i,o=n(i),s=r.split("/"),c=s.findIndex(function(e){return"dash"===e.toLowerCase()}),p=h(-1!==c?s.slice(0,c+1).join("/"):new URL(r).origin),e.prev=5,e.next=8,fetch(r);case 8:return b=e.sent,e.next=11,b.text();case 11:g=e.sent,v=new DOMParser,x=v.parseFromString(g,"application/xml"),y=(null==o?void 0:o.duration())||(null===(d=u())||void 0===d||null===(m=d.video)||void 0===m?void 0:m.runtime),E=(null==x||null===(f=x.querySelector("MPD > BaseURL"))||void 0===f?void 0:f.textContent)||p+"/",j=x.getElementsByTagName("AdaptationSet"),N=0;case 18:if(!(N<j.length)){e.next=72;break}if(("image"!==(A=j[N]).getAttribute("contentType")||"image/png"!==A.getAttribute("mimeType"))&&"image/jpeg"!==A.getAttribute("mimeType")){e.next=69;break}if(O=A.getElementsByTagName("SegmentTemplate")[0],I=null===(T=O.getElementsByTagName("SegmentTimeline"))||void 0===T?void 0:T[0],!O||!I){e.next=48;break}if(P=I.getElementsByTagName("S"),R=parseInt(null===(S=P[0])||void 0===S?void 0:S.getAttribute("t")),$=parseInt(null===(M=P[0])||void 0===M?void 0:M.getAttribute("d")),B=A.getElementsByTagName("Representation")[0],D=B.getElementsByTagName("EssentialProperty")[0],L=D.getAttribute("value"),U=null==L?void 0:L.split("x"),C=a(U,2),X=C[0],q=C[1],!O){e.next=46;break}if(O.getAttribute("media"),_=O.getAttribute("timescale"),F=(_?$/_:$)/(X*q),W=B.getAttribute("id"),z=Math.round(y/F),G=Math.ceil(z/(X*q)),H=O.getAttribute("media"),parseInt(O.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(J=[],N=0;N<G;N++)Q="/"==(K=H)[0]?new URL(p).origin:p+"/",J.push({duration:F,layout:L,uri:Q+K.replace("$Time$",R+N*$).replace("$RepresentationID$",W)});return e.abrupt("return",J);case 46:e.next=69;break;case 48:if(V=A.getElementsByTagName("Representation")[0],Y=V.getElementsByTagName("EssentialProperty")[0],Z=Y.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=a(ee,2),re=te[0],ne=te[1],!O){e.next=69;break}if(O.getAttribute("media"),ie=O.getAttribute("duration"),ae=O.getAttribute("timescale"),ue=(ae?ie/ae:ie)/(re*ne),oe=V.getAttribute("id"),se=Math.round(y/ue),le=Math.ceil(se/(re*ne)),ce=O.getAttribute("media"),pe=parseInt(O.getAttribute("startNumber"))||0,!isNaN(parseInt(le))){e.next=65;break}return e.abrupt("return");case 65:for(de=[],me=w(ce),N=0;N<le;N++)fe=me?k(me,N+pe):ce,de.push({duration:ue,layout:Z,uri:E+fe.replace("$Number$",N+pe).replace("$RepresentationID$",oe)});return e.abrupt("return",de);case 69:N++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function w(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function k(e,t){var r=e.match(/%0(\d+)d/);if(!r)return e;var n=parseInt(r[1],10),i=String(t).padStart(n,"0");return e.replace(/\$Number%0\d+d\$/,i)}function E(e){return j.apply(this,arguments)}function j(){return(j=e(t.mark(function e(r){var i,a,u,o,s,l,c,p,m,f,g,h,y,w,k;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s=n(r),l=s.currentSource(),c=l.src,c=null!==(i=c)&&void 0!==i&&i.includes("blob")?null==s||null===(a=s.getSource)||void 0===a?void 0:a.call(s):c,null===(u=c)||void 0===u||!u.includes("m3u8")){e.next=19;break}return e.next=6,d(c,r);case 6:if(!((null==(p=e.sent)?void 0:p.length)>0)){e.next=17;break}return m=(null==p?void 0:p[0])||null,f=m.uri,g=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,v(g,f);case 12:return h=e.sent,e.next=15,b(h);case 15:y=e.sent,s.thumbnails(y);case 17:e.next=28;break;case 19:if(null===(o=c)||void 0===o||!o.includes("mpd")){e.next=28;break}return e.next=22,x(c,r);case 22:if(!((null==(w=e.sent)?void 0:w.length)>0)){e.next=28;break}return e.next=26,b(w);case 26:k=e.sent,s.thumbnails(k);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}export{E as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t,p as n,d as o}from"./skin-4f84b841.js";import{X as i,b as l}from"./generic-053ecf26.js";import{s as a}from"./autoNextVideo-245106dc.js";import{e as r}from"./icons-699e8cf0.js";import s from"@babel/runtime/helpers/typeof";import d from"video.js";var c,u,m,v,p=[],f=!1,g=function(a,s){var d;if(f=!1,null!=s&&null!==(d=s.series)&&void 0!==d&&d.enable){var c;p=[];var u=l();null==u||u.map(function(t){var n;return(n=p).push.apply(n,e(t.episodes))}),null==s||null===(c=s.series)||void 0===c||c.cb}else{var m,v;p=(null==s||null===(m=s.relatedVideos)||void 0===m?void 0:m.content)||[],null==s||null===(v=s.relatedVideos)||void 0===v||v.cb}var g=t(a);g.on("timeupdate",function(){var e,t;if(!f){var n=Math.floor(g.currentTime()),o=g.duration(),l=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];o-n<=10&&i()<=(null===(t=p)||void 0===t?void 0:t.length)-1?l&&(l.style.visibility="visible"):l&&(l.style.visibility="hidden")}});var y,A=p.filter(function(e,t){return t==i()});if((null==A?void 0:A.length)>0)if(null!==(y=document.getElementsByClassName("next-ep-preview"))&&void 0!==y&&y[0]){var x,w,E,b,C,N,B,L,j,k,P,O;(null===(x=document.getElementsByClassName("next-ep-preview"))||void 0===x?void 0:x[0]).style.visibility="hidden";var I=null===(w=document.getElementsByClassName("next-ep-title"))||void 0===w?void 0:w[0],M=null===(E=document.getElementsByClassName("next-ep-img"))||void 0===E?void 0:E[0],T=null===(b=document.getElementsByClassName("next-ep-content"))||void 0===b?void 0:b[0],X=null===(C=A[0])||void 0===C?void 0:C.title;(null===(N=X)||void 0===N?void 0:N.length)>60&&(X=X.substr(0,60)+"..."),I.textContent="".concat(X),M.src=(null===(B=A[0])||void 0===B||null===(L=B.gist)||void 0===L||null===(j=L.imageGist)||void 0===j?void 0:j.r16x9)||(null==A||null===(k=A[0])||void 0===k?void 0:k.img)||(null===(P=window)||void 0===P||null===(O=P.customData)||void 0===O?void 0:O.fallbackImage),T.onclick=function(){return h(a)}}else{var F,R,D,G,S,V,H,Q,U=document.createElement("div");U.className="next-ep-preview",U.style.visibility="hidden",document.getElementById(a).append(U);var W=document.createElement("div");W.className="next-heading-wrapper";var Y=document.createElement("div");Y.className="next-ep-header",Y.textContent="Next up";var _=document.createElement("div");_.className="next-ep-close",_.onclick=function(){U.style.visibility="hidden",f=!0},_.appendChild(n(r())),W.append(Y),W.append(_);var q=null===(F=A[0])||void 0===F?void 0:F.title,z=document.createElement("img");z.className="next-ep-img",z.src=(null===(R=A[0])||void 0===R||null===(D=R.gist)||void 0===D||null===(G=D.imageGist)||void 0===G?void 0:G.r16x9)||(null==A||null===(S=A[0])||void 0===S?void 0:S.img)||(null===(V=window)||void 0===V||null===(H=V.customData)||void 0===H?void 0:H.fallbackImage);var J=document.createElement("div");J.className="next-ep-title",(null===(Q=q)||void 0===Q?void 0:Q.length)>60&&(q=q.substr(0,60)+"..."),J.textContent="".concat(q);var K=document.createElement("div");K.className="next-ep-content",K.append(z),K.append(J),K.onclick=o(function(){null==U||U.remove(),f=!0,h(a)},400),U.append(W),U.append(K)}},h=function(e,n){var o=t(e),l=Math.floor(o.currentTime());if(Math.floor(o.duration())!=l){o.pause(e);var r=i();a(r,e,p)}};function y(e,n){var o=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var l=document.createElement("div");l.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(i),a.alt="Provider Image",l.append(a),o.el().appendChild(l),o.on("useractive",function(){l.classList.remove("vjs-fade")}),o.on("userinactive",function(){o.paused()||l.classList.add("vjs-fade")}),o.on("fullscreenchange",function(){o.isFullscreen_?l.style.top="3.2rem":l.style.top="1rem"})}}c={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},u=function e(){var t,n,o,i,l;for(o in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[o])i.hasOwnProperty(l)&&("object"===s(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},m=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},v=function e(t){return"HTML"!==t.nodeName&&"static"===m(t)("position")?e(t.offsetParent):t},d.registerPlugin("thumbnails",function(e){var t,n,o,i,l,a,r,s;function d(){document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",d),s()}n=u({},c,e),i=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",o=document.createElement("img"),t.appendChild(o),o.src=n[0].src,o.className="vjs-thumbnail",u(o.style,n[0].style),o.style.left||o.style.right||(o.onload=function(){o.style.left=-o.naturalWidth/2+"px"}),a=i.duration(),i.on("durationchange",function(e){a=i.duration()}),i.on("loadedmetadata",function(e){a=i.duration()}),(l=i.controlBar.progressControl).el().appendChild(t),r=function(e){var i,r,s,d,c,p,f,g,h,y;for(r in s=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((y=v(l.el()).getBoundingClientRect()).width||y.right)+h,p=e.pageX,e.changedTouches&&(p=e.changedTouches[0].pageX),d=p||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,d-=v(l.el()).getBoundingClientRect().left+h,i=Math.floor((d-l.el().offsetLeft)/l.width()*a),n)i>r&&(s=Math.max(s,r));(c=n[s]).src&&o.src!=c.src&&(o.src=c.src),c.style&&o.style!=c.style&&u(o.style,c.style),d+(g=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=m(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(o,c.width||n[0].width)/2)>f?d-=d+g-f:d<g&&(d=g),t.style.left=d+"px"},l.on("mousemove",r),l.on("touchmove",r),l.on("pointerdown",function(e){document.addEventListener("pointermove",r),document.addEventListener("pointerup",d)}),s=function(e){t.style.left="-1000px"},l.on("mouseout",s),l.on("touchcancel",s),l.on("touchend",s),i.on("userinactive",s)});export{g as a,y as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./index-1eb08652.js";import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import{t as r,g as n}from"./skin-4f84b841.js";import i from"@babel/runtime/helpers/defineProperty";import a from"@babel/runtime/helpers/slicedToArray";import{e as u}from"./generic-053ecf26.js";function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var l="my-player";function c(e){var t=e.split("\n"),r=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),n={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(n.resolution=e.split("=")[1]),e.includes("URI")&&(n.uri=e.split("=")[1].replace(/"/g,""))}),r.push(n)}}),r}function p(){return(p=e(t.mark(function e(r){var n,i,u,o,s,l,c,p,d,m,f,b,g,v,h,x,y,w,k,E,j,N,A,T;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!r._tiles){e.next=2;break}return e.abrupt("return",r._tiles);case 2:return e.prev=2,e.next=5,fetch(r.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return i=e.sent,e.next=11,createImageBitmap(i);case 11:for(u=e.sent,o=r.layout.split("x").map(Number),s=a(o,2),l=s[0],c=s[1],p=u.width/c,d=u.height/l,m=[],f=0;f<l;f++)for(b=0;b<c;b++)(g=document.createElement("canvas")).width=p,g.height=d,g.getContext("2d").drawImage(u,b*p,f*d,p,d,0,0,p,d),v=g.toDataURL("image/png"),m.push({uri:v,duration:r.duration}),r._tiles=m;return e.abrupt("return",m);case 20:for(e.prev=20,e.t0=e.catch(2),h=r.layout.split("x").map(Number),x=a(h,2),y=x[0],w=x[1],k=[],E=0;E<y*w;E++)k.push({uri:null===(j=window)||void 0===j||null===(N=j.app_data)||void 0===N||null===(A=N.appcmsMain)||void 0===A||null===(T=A.images)||void 0===T?void 0:T.placeholderCover,duration:r.duration});return e.abrupt("return",k);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function d(e,t){return m.apply(this,arguments)}function m(){return(m=e(t.mark(function e(r,n){var i,a;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=n,e.prev=1,e.next=4,fetch(r);case 4:return i=e.sent,e.next=7,i.text();case 7:return a=e.sent,e.abrupt("return",c(a));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function f(e,t,r){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=n(l);if(i&&a){var u=i.getBoundingClientRect(),o=(e.clientX-u.left)/u.width,s=function(e,t){var r,n;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var u=Math.floor((i+a)/2),o=t[u];if(o===e)return o;o<e?i=u+1:a=u-1}var s=null!==(r=t[i])&&void 0!==r?r:1/0,l=null!==(n=t[a])&&void 0!==n?n:-1/0;return Math.abs(s-e)<Math.abs(l-e)?s:l}(Math.round(o*a.duration()),r),c=t[s];c&&!c.loading&&(c.loading=!0,function(e){return p.apply(this,arguments)}(c).then(function(e){var t=e[c.tileIndex],r=document.querySelector(".vjs-thumbnail-holder img");r&&t.uri&&(r.src=t.uri),c.loading=!1,c.src=t.uri}))}}function b(e){return g.apply(this,arguments)}function g(){return(g=e(t.mark(function e(n){var u,o,l,c;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u={},n.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),n=a(r,2),o=n[0]*n[1],l=e.duration,c=0;c<o;c++){var p,d=Math.round((t*o+c)*l);u[d]=s(s({},e),{},{duration:e.duration,tileIndex:c,loading:!1,style:(p={left:"-60px",height:"85px",width:"130px"},i(p,"left","-60px"),i(p,"border","1px solid transparent"),i(p,"borderRadius","4px"),p)})}}),o=Object.keys(u).map(Number).sort(function(e,t){return e-t}),null==(l=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||l.addEventListener("mousemove",r(function(e){return f(e,u,o)},500)),null==(c=document.querySelector(".vjs-progress-control.vjs-control"))||c.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",r(function(e){return f(e,u,o)},500))}),e.abrupt("return",u);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var v=function(){var r=e(t.mark(function e(r,n){var i,u,o,s,l,c,p,d;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(r+n);case 2:return i=e.sent,e.next=5,i.text();case 5:u=e.sent,o=u.split("\n").map(function(e){return e.trim()}),s=[],l=null,c=0;case 10:if(!(c<(null==o?void 0:o.length))){e.next=27;break}if(!(p=o[c]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},d=p.split(":")[1]||"",d.split(",").forEach(function(e){var t=e.split("="),r=a(t,2),n=r[0],i=r[1];n&&i&&(l[n.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!p.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(p.includes("jpg")||p.includes("png")||p.includes("jpeg"))&&(l.uri=p.includes("http")?p:r+p,s.push(l),l=null);case 24:c++,e.next=10;break;case 27:return e.abrupt("return",s);case 28:case"end":return e.stop()}},e)}));return function(e,t){return r.apply(this,arguments)}}();function h(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function x(e,t){return y.apply(this,arguments)}function y(){return(y=e(t.mark(function e(r,i){var o,s,c,p,d,m,f,b,g,v,x,y,E,j,N,A,T,O,I,S,M,P,R,$,B,D,L,U,C,X,q,_,F,W,z,G,H,J,K,Q,V,Y,Z,ee,te,re,ne,ie,ae,ue,oe,se,le,ce,pe,de,me,fe;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=i,o=n(i),s=r.split("/"),c=s.findIndex(function(e){return"dash"===e.toLowerCase()}),p=h(-1!==c?s.slice(0,c+1).join("/"):new URL(r).origin),e.prev=5,e.next=8,fetch(r);case 8:return b=e.sent,e.next=11,b.text();case 11:g=e.sent,v=new DOMParser,x=v.parseFromString(g,"application/xml"),y=(null==o?void 0:o.duration())||(null===(d=u())||void 0===d||null===(m=d.video)||void 0===m?void 0:m.runtime),E=(null==x||null===(f=x.querySelector("MPD > BaseURL"))||void 0===f?void 0:f.textContent)||p+"/",j=x.getElementsByTagName("AdaptationSet"),N=0;case 18:if(!(N<j.length)){e.next=72;break}if(("image"!==(A=j[N]).getAttribute("contentType")||"image/png"!==A.getAttribute("mimeType"))&&"image/jpeg"!==A.getAttribute("mimeType")){e.next=69;break}if(O=A.getElementsByTagName("SegmentTemplate")[0],I=null===(T=O.getElementsByTagName("SegmentTimeline"))||void 0===T?void 0:T[0],!O||!I){e.next=48;break}if(P=I.getElementsByTagName("S"),R=parseInt(null===(S=P[0])||void 0===S?void 0:S.getAttribute("t")),$=parseInt(null===(M=P[0])||void 0===M?void 0:M.getAttribute("d")),B=A.getElementsByTagName("Representation")[0],D=B.getElementsByTagName("EssentialProperty")[0],L=D.getAttribute("value"),U=null==L?void 0:L.split("x"),C=a(U,2),X=C[0],q=C[1],!O){e.next=46;break}if(O.getAttribute("media"),_=O.getAttribute("timescale"),F=(_?$/_:$)/(X*q),W=B.getAttribute("id"),z=Math.round(y/F),G=Math.ceil(z/(X*q)),H=O.getAttribute("media"),parseInt(O.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(J=[],N=0;N<G;N++)Q="/"==(K=H)[0]?new URL(p).origin:p+"/",J.push({duration:F,layout:L,uri:Q+K.replace("$Time$",R+N*$).replace("$RepresentationID$",W)});return e.abrupt("return",J);case 46:e.next=69;break;case 48:if(V=A.getElementsByTagName("Representation")[0],Y=V.getElementsByTagName("EssentialProperty")[0],Z=Y.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=a(ee,2),re=te[0],ne=te[1],!O){e.next=69;break}if(O.getAttribute("media"),ie=O.getAttribute("duration"),ae=O.getAttribute("timescale"),ue=(ae?ie/ae:ie)/(re*ne),oe=V.getAttribute("id"),se=Math.round(y/ue),le=Math.ceil(se/(re*ne)),ce=O.getAttribute("media"),pe=parseInt(O.getAttribute("startNumber"))||0,!isNaN(parseInt(le))){e.next=65;break}return e.abrupt("return");case 65:for(de=[],me=w(ce),N=0;N<le;N++)fe=me?k(me,N+pe):ce,de.push({duration:ue,layout:Z,uri:E+fe.replace("$Number$",N+pe).replace("$RepresentationID$",oe)});return e.abrupt("return",de);case 69:N++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function w(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function k(e,t){var r=e.match(/%0(\d+)d/);if(!r)return e;var n=parseInt(r[1],10),i=String(t).padStart(n,"0");return e.replace(/\$Number%0\d+d\$/,i)}function E(e){return j.apply(this,arguments)}function j(){return(j=e(t.mark(function e(r){var i,a,u,o,s,l,c,p,m,f,g,h,y,w,k;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s=n(r),l=s.currentSource(),c=l.src,c=null!==(i=c)&&void 0!==i&&i.includes("blob")?null==s||null===(a=s.getSource)||void 0===a?void 0:a.call(s):c,null===(u=c)||void 0===u||!u.includes("m3u8")){e.next=19;break}return e.next=6,d(c,r);case 6:if(!((null==(p=e.sent)?void 0:p.length)>0)){e.next=17;break}return m=(null==p?void 0:p[0])||null,f=m.uri,g=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,v(g,f);case 12:return h=e.sent,e.next=15,b(h);case 15:y=e.sent,s.thumbnails(y);case 17:e.next=28;break;case 19:if(null===(o=c)||void 0===o||!o.includes("mpd")){e.next=28;break}return e.next=22,x(c,r);case 22:if(!((null==(w=e.sent)?void 0:w.length)>0)){e.next=28;break}return e.next=26,b(w);case 26:k=e.sent,s.thumbnails(k);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}export{E as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t,p as n,d as o}from"./skin-4f84b841.js";import{X as i,b as l}from"./generic-f7b6857e.js";import{s as a}from"./autoNextVideo-7dd4dfc3.js";import{e as r}from"./icons-699e8cf0.js";import s from"@babel/runtime/helpers/typeof";import d from"video.js";var c,u,m,v,p=[],f=!1,g=function(a,s){var d;if(f=!1,null!=s&&null!==(d=s.series)&&void 0!==d&&d.enable){var c;p=[];var u=l();null==u||u.map(function(t){var n;return(n=p).push.apply(n,e(t.episodes))}),null==s||null===(c=s.series)||void 0===c||c.cb}else{var m,v;p=(null==s||null===(m=s.relatedVideos)||void 0===m?void 0:m.content)||[],null==s||null===(v=s.relatedVideos)||void 0===v||v.cb}var g=t(a);g.on("timeupdate",function(){var e,t;if(!f){var n=Math.floor(g.currentTime()),o=g.duration(),l=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];o-n<=10&&i()<=(null===(t=p)||void 0===t?void 0:t.length)-1?l&&(l.style.visibility="visible"):l&&(l.style.visibility="hidden")}});var y,A=p.filter(function(e,t){return t==i()});if((null==A?void 0:A.length)>0)if(null!==(y=document.getElementsByClassName("next-ep-preview"))&&void 0!==y&&y[0]){var x,w,E,b,C,N,B,L,j,k,P,O;(null===(x=document.getElementsByClassName("next-ep-preview"))||void 0===x?void 0:x[0]).style.visibility="hidden";var I=null===(w=document.getElementsByClassName("next-ep-title"))||void 0===w?void 0:w[0],M=null===(E=document.getElementsByClassName("next-ep-img"))||void 0===E?void 0:E[0],T=null===(b=document.getElementsByClassName("next-ep-content"))||void 0===b?void 0:b[0],X=null===(C=A[0])||void 0===C?void 0:C.title;(null===(N=X)||void 0===N?void 0:N.length)>60&&(X=X.substr(0,60)+"..."),I.textContent="".concat(X),M.src=(null===(B=A[0])||void 0===B||null===(L=B.gist)||void 0===L||null===(j=L.imageGist)||void 0===j?void 0:j.r16x9)||(null==A||null===(k=A[0])||void 0===k?void 0:k.img)||(null===(P=window)||void 0===P||null===(O=P.customData)||void 0===O?void 0:O.fallbackImage),T.onclick=function(){return h(a)}}else{var F,R,D,G,S,V,H,Q,U=document.createElement("div");U.className="next-ep-preview",U.style.visibility="hidden",document.getElementById(a).append(U);var W=document.createElement("div");W.className="next-heading-wrapper";var Y=document.createElement("div");Y.className="next-ep-header",Y.textContent="Next up";var _=document.createElement("div");_.className="next-ep-close",_.onclick=function(){U.style.visibility="hidden",f=!0},_.appendChild(n(r())),W.append(Y),W.append(_);var q=null===(F=A[0])||void 0===F?void 0:F.title,z=document.createElement("img");z.className="next-ep-img",z.src=(null===(R=A[0])||void 0===R||null===(D=R.gist)||void 0===D||null===(G=D.imageGist)||void 0===G?void 0:G.r16x9)||(null==A||null===(S=A[0])||void 0===S?void 0:S.img)||(null===(V=window)||void 0===V||null===(H=V.customData)||void 0===H?void 0:H.fallbackImage);var J=document.createElement("div");J.className="next-ep-title",(null===(Q=q)||void 0===Q?void 0:Q.length)>60&&(q=q.substr(0,60)+"..."),J.textContent="".concat(q);var K=document.createElement("div");K.className="next-ep-content",K.append(z),K.append(J),K.onclick=o(function(){null==U||U.remove(),f=!0,h(a)},400),U.append(W),U.append(K)}},h=function(e,n){var o=t(e),l=Math.floor(o.currentTime());if(Math.floor(o.duration())!=l){o.pause(e);var r=i();a(r,e,p)}};function y(e,n){var o=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var l=document.createElement("div");l.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(i),a.alt="Provider Image",l.append(a),o.el().appendChild(l),o.on("useractive",function(){l.classList.remove("vjs-fade")}),o.on("userinactive",function(){o.paused()||l.classList.add("vjs-fade")}),o.on("fullscreenchange",function(){o.isFullscreen_?l.style.top="3.2rem":l.style.top="1rem"})}}c={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},u=function e(){var t,n,o,i,l;for(o in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[o])i.hasOwnProperty(l)&&("object"===s(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},m=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},v=function e(t){return"HTML"!==t.nodeName&&"static"===m(t)("position")?e(t.offsetParent):t},d.registerPlugin("thumbnails",function(e){var t,n,o,i,l,a,r,s;function d(){document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",d),s()}n=u({},c,e),i=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",o=document.createElement("img"),t.appendChild(o),o.src=n[0].src,o.className="vjs-thumbnail",u(o.style,n[0].style),o.style.left||o.style.right||(o.onload=function(){o.style.left=-o.naturalWidth/2+"px"}),a=i.duration(),i.on("durationchange",function(e){a=i.duration()}),i.on("loadedmetadata",function(e){a=i.duration()}),(l=i.controlBar.progressControl).el().appendChild(t),r=function(e){var i,r,s,d,c,p,f,g,h,y;for(r in s=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((y=v(l.el()).getBoundingClientRect()).width||y.right)+h,p=e.pageX,e.changedTouches&&(p=e.changedTouches[0].pageX),d=p||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,d-=v(l.el()).getBoundingClientRect().left+h,i=Math.floor((d-l.el().offsetLeft)/l.width()*a),n)i>r&&(s=Math.max(s,r));(c=n[s]).src&&o.src!=c.src&&(o.src=c.src),c.style&&o.style!=c.style&&u(o.style,c.style),d+(g=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=m(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(o,c.width||n[0].width)/2)>f?d-=d+g-f:d<g&&(d=g),t.style.left=d+"px"},l.on("mousemove",r),l.on("touchmove",r),l.on("pointerdown",function(e){document.addEventListener("pointermove",r),document.addEventListener("pointerup",d)}),s=function(e){t.style.left="-1000px"},l.on("mouseout",s),l.on("touchcancel",s),l.on("touchend",s),i.on("userinactive",s)});export{g as a,y as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./index-f529337e.js";import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import{t as r,g as n}from"./skin-4f84b841.js";import i from"@babel/runtime/helpers/defineProperty";import a from"@babel/runtime/helpers/slicedToArray";import{e as u}from"./generic-718c2043.js";function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var l="my-player";function c(e){var t=e.split("\n"),r=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),n={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(n.resolution=e.split("=")[1]),e.includes("URI")&&(n.uri=e.split("=")[1].replace(/"/g,""))}),r.push(n)}}),r}function p(){return(p=e(t.mark(function e(r){var n,i,u,o,s,l,c,p,d,m,f,b,g,v,h,x,y,w,k,E,j,N,A,T;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!r._tiles){e.next=2;break}return e.abrupt("return",r._tiles);case 2:return e.prev=2,e.next=5,fetch(r.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return i=e.sent,e.next=11,createImageBitmap(i);case 11:for(u=e.sent,o=r.layout.split("x").map(Number),s=a(o,2),l=s[0],c=s[1],p=u.width/c,d=u.height/l,m=[],f=0;f<l;f++)for(b=0;b<c;b++)(g=document.createElement("canvas")).width=p,g.height=d,g.getContext("2d").drawImage(u,b*p,f*d,p,d,0,0,p,d),v=g.toDataURL("image/png"),m.push({uri:v,duration:r.duration}),r._tiles=m;return e.abrupt("return",m);case 20:for(e.prev=20,e.t0=e.catch(2),h=r.layout.split("x").map(Number),x=a(h,2),y=x[0],w=x[1],k=[],E=0;E<y*w;E++)k.push({uri:null===(j=window)||void 0===j||null===(N=j.app_data)||void 0===N||null===(A=N.appcmsMain)||void 0===A||null===(T=A.images)||void 0===T?void 0:T.placeholderCover,duration:r.duration});return e.abrupt("return",k);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function d(e,t){return m.apply(this,arguments)}function m(){return(m=e(t.mark(function e(r,n){var i,a;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=n,e.prev=1,e.next=4,fetch(r);case 4:return i=e.sent,e.next=7,i.text();case 7:return a=e.sent,e.abrupt("return",c(a));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function f(e,t,r){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=n(l);if(i&&a){var u=i.getBoundingClientRect(),o=(e.clientX-u.left)/u.width,s=function(e,t){var r,n;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var u=Math.floor((i+a)/2),o=t[u];if(o===e)return o;o<e?i=u+1:a=u-1}var s=null!==(r=t[i])&&void 0!==r?r:1/0,l=null!==(n=t[a])&&void 0!==n?n:-1/0;return Math.abs(s-e)<Math.abs(l-e)?s:l}(Math.round(o*a.duration()),r),c=t[s];c&&!c.loading&&(c.loading=!0,function(e){return p.apply(this,arguments)}(c).then(function(e){var t=e[c.tileIndex],r=document.querySelector(".vjs-thumbnail-holder img");r&&t.uri&&(r.src=t.uri),c.loading=!1,c.src=t.uri}))}}function b(e){return g.apply(this,arguments)}function g(){return(g=e(t.mark(function e(n){var u,o,l,c;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u={},n.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),n=a(r,2),o=n[0]*n[1],l=e.duration,c=0;c<o;c++){var p,d=Math.round((t*o+c)*l);u[d]=s(s({},e),{},{duration:e.duration,tileIndex:c,loading:!1,style:(p={left:"-60px",height:"85px",width:"130px"},i(p,"left","-60px"),i(p,"border","1px solid transparent"),i(p,"borderRadius","4px"),p)})}}),o=Object.keys(u).map(Number).sort(function(e,t){return e-t}),null==(l=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||l.addEventListener("mousemove",r(function(e){return f(e,u,o)},500)),null==(c=document.querySelector(".vjs-progress-control.vjs-control"))||c.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",r(function(e){return f(e,u,o)},500))}),e.abrupt("return",u);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var v=function(){var r=e(t.mark(function e(r,n){var i,u,o,s,l,c,p,d;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(r+n);case 2:return i=e.sent,e.next=5,i.text();case 5:u=e.sent,o=u.split("\n").map(function(e){return e.trim()}),s=[],l=null,c=0;case 10:if(!(c<(null==o?void 0:o.length))){e.next=27;break}if(!(p=o[c]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},d=p.split(":")[1]||"",d.split(",").forEach(function(e){var t=e.split("="),r=a(t,2),n=r[0],i=r[1];n&&i&&(l[n.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!p.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(p.includes("jpg")||p.includes("png")||p.includes("jpeg"))&&(l.uri=p.includes("http")?p:r+p,s.push(l),l=null);case 24:c++,e.next=10;break;case 27:return e.abrupt("return",s);case 28:case"end":return e.stop()}},e)}));return function(e,t){return r.apply(this,arguments)}}();function h(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function x(e,t){return y.apply(this,arguments)}function y(){return(y=e(t.mark(function e(r,i){var o,s,c,p,d,m,f,b,g,v,x,y,E,j,N,A,T,O,I,S,M,P,R,$,B,D,L,U,C,X,q,_,F,W,z,G,H,J,K,Q,V,Y,Z,ee,te,re,ne,ie,ae,ue,oe,se,le,ce,pe,de,me,fe;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=i,o=n(i),s=r.split("/"),c=s.findIndex(function(e){return"dash"===e.toLowerCase()}),p=h(-1!==c?s.slice(0,c+1).join("/"):new URL(r).origin),e.prev=5,e.next=8,fetch(r);case 8:return b=e.sent,e.next=11,b.text();case 11:g=e.sent,v=new DOMParser,x=v.parseFromString(g,"application/xml"),y=(null==o?void 0:o.duration())||(null===(d=u())||void 0===d||null===(m=d.video)||void 0===m?void 0:m.runtime),E=(null==x||null===(f=x.querySelector("MPD > BaseURL"))||void 0===f?void 0:f.textContent)||p+"/",j=x.getElementsByTagName("AdaptationSet"),N=0;case 18:if(!(N<j.length)){e.next=72;break}if(("image"!==(A=j[N]).getAttribute("contentType")||"image/png"!==A.getAttribute("mimeType"))&&"image/jpeg"!==A.getAttribute("mimeType")){e.next=69;break}if(O=A.getElementsByTagName("SegmentTemplate")[0],I=null===(T=O.getElementsByTagName("SegmentTimeline"))||void 0===T?void 0:T[0],!O||!I){e.next=48;break}if(P=I.getElementsByTagName("S"),R=parseInt(null===(S=P[0])||void 0===S?void 0:S.getAttribute("t")),$=parseInt(null===(M=P[0])||void 0===M?void 0:M.getAttribute("d")),B=A.getElementsByTagName("Representation")[0],D=B.getElementsByTagName("EssentialProperty")[0],L=D.getAttribute("value"),U=null==L?void 0:L.split("x"),C=a(U,2),X=C[0],q=C[1],!O){e.next=46;break}if(O.getAttribute("media"),_=O.getAttribute("timescale"),F=(_?$/_:$)/(X*q),W=B.getAttribute("id"),z=Math.round(y/F),G=Math.ceil(z/(X*q)),H=O.getAttribute("media"),parseInt(O.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(J=[],N=0;N<G;N++)Q="/"==(K=H)[0]?new URL(p).origin:p+"/",J.push({duration:F,layout:L,uri:Q+K.replace("$Time$",R+N*$).replace("$RepresentationID$",W)});return e.abrupt("return",J);case 46:e.next=69;break;case 48:if(V=A.getElementsByTagName("Representation")[0],Y=V.getElementsByTagName("EssentialProperty")[0],Z=Y.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=a(ee,2),re=te[0],ne=te[1],!O){e.next=69;break}if(O.getAttribute("media"),ie=O.getAttribute("duration"),ae=O.getAttribute("timescale"),ue=(ae?ie/ae:ie)/(re*ne),oe=V.getAttribute("id"),se=Math.round(y/ue),le=Math.ceil(se/(re*ne)),ce=O.getAttribute("media"),pe=parseInt(O.getAttribute("startNumber"))||0,!isNaN(parseInt(le))){e.next=65;break}return e.abrupt("return");case 65:for(de=[],me=w(ce),N=0;N<le;N++)fe=me?k(me,N+pe):ce,de.push({duration:ue,layout:Z,uri:E+fe.replace("$Number$",N+pe).replace("$RepresentationID$",oe)});return e.abrupt("return",de);case 69:N++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function w(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function k(e,t){var r=e.match(/%0(\d+)d/);if(!r)return e;var n=parseInt(r[1],10),i=String(t).padStart(n,"0");return e.replace(/\$Number%0\d+d\$/,i)}function E(e){return j.apply(this,arguments)}function j(){return(j=e(t.mark(function e(r){var i,a,u,o,s,l,c,p,m,f,g,h,y,w,k;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s=n(r),l=s.currentSource(),c=l.src,c=null!==(i=c)&&void 0!==i&&i.includes("blob")?null==s||null===(a=s.getSource)||void 0===a?void 0:a.call(s):c,null===(u=c)||void 0===u||!u.includes("m3u8")){e.next=19;break}return e.next=6,d(c,r);case 6:if(!((null==(p=e.sent)?void 0:p.length)>0)){e.next=17;break}return m=(null==p?void 0:p[0])||null,f=m.uri,g=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,v(g,f);case 12:return h=e.sent,e.next=15,b(h);case 15:y=e.sent,s.thumbnails(y);case 17:e.next=28;break;case 19:if(null===(o=c)||void 0===o||!o.includes("mpd")){e.next=28;break}return e.next=22,x(c,r);case 22:if(!((null==(w=e.sent)?void 0:w.length)>0)){e.next=28;break}return e.next=26,b(w);case 26:k=e.sent,s.thumbnails(k);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}export{E as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t,p as n,d as o}from"./skin-4f84b841.js";import{X as i,b as l}from"./generic-718c2043.js";import{s as a}from"./autoNextVideo-9cfdd391.js";import{e as r}from"./icons-699e8cf0.js";import s from"@babel/runtime/helpers/typeof";import d from"video.js";var c,u,m,v,p=[],f=!1,g=function(a,s){var d;if(f=!1,null!=s&&null!==(d=s.series)&&void 0!==d&&d.enable){var c;p=[];var u=l();null==u||u.map(function(t){var n;return(n=p).push.apply(n,e(t.episodes))}),null==s||null===(c=s.series)||void 0===c||c.cb}else{var m,v;p=(null==s||null===(m=s.relatedVideos)||void 0===m?void 0:m.content)||[],null==s||null===(v=s.relatedVideos)||void 0===v||v.cb}var g=t(a);g.on("timeupdate",function(){var e,t;if(!f){var n=Math.floor(g.currentTime()),o=g.duration(),l=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];o-n<=10&&i()<=(null===(t=p)||void 0===t?void 0:t.length)-1?l&&(l.style.visibility="visible"):l&&(l.style.visibility="hidden")}});var y,A=p.filter(function(e,t){return t==i()});if((null==A?void 0:A.length)>0)if(null!==(y=document.getElementsByClassName("next-ep-preview"))&&void 0!==y&&y[0]){var x,w,E,b,C,N,B,L,j,k,P,O;(null===(x=document.getElementsByClassName("next-ep-preview"))||void 0===x?void 0:x[0]).style.visibility="hidden";var I=null===(w=document.getElementsByClassName("next-ep-title"))||void 0===w?void 0:w[0],M=null===(E=document.getElementsByClassName("next-ep-img"))||void 0===E?void 0:E[0],T=null===(b=document.getElementsByClassName("next-ep-content"))||void 0===b?void 0:b[0],X=null===(C=A[0])||void 0===C?void 0:C.title;(null===(N=X)||void 0===N?void 0:N.length)>60&&(X=X.substr(0,60)+"..."),I.textContent="".concat(X),M.src=(null===(B=A[0])||void 0===B||null===(L=B.gist)||void 0===L||null===(j=L.imageGist)||void 0===j?void 0:j.r16x9)||(null==A||null===(k=A[0])||void 0===k?void 0:k.img)||(null===(P=window)||void 0===P||null===(O=P.customData)||void 0===O?void 0:O.fallbackImage),T.onclick=function(){return h(a)}}else{var F,R,D,G,S,V,H,Q,U=document.createElement("div");U.className="next-ep-preview",U.style.visibility="hidden",document.getElementById(a).append(U);var W=document.createElement("div");W.className="next-heading-wrapper";var Y=document.createElement("div");Y.className="next-ep-header",Y.textContent="Next up";var _=document.createElement("div");_.className="next-ep-close",_.onclick=function(){U.style.visibility="hidden",f=!0},_.appendChild(n(r())),W.append(Y),W.append(_);var q=null===(F=A[0])||void 0===F?void 0:F.title,z=document.createElement("img");z.className="next-ep-img",z.src=(null===(R=A[0])||void 0===R||null===(D=R.gist)||void 0===D||null===(G=D.imageGist)||void 0===G?void 0:G.r16x9)||(null==A||null===(S=A[0])||void 0===S?void 0:S.img)||(null===(V=window)||void 0===V||null===(H=V.customData)||void 0===H?void 0:H.fallbackImage);var J=document.createElement("div");J.className="next-ep-title",(null===(Q=q)||void 0===Q?void 0:Q.length)>60&&(q=q.substr(0,60)+"..."),J.textContent="".concat(q);var K=document.createElement("div");K.className="next-ep-content",K.append(z),K.append(J),K.onclick=o(function(){null==U||U.remove(),f=!0,h(a)},400),U.append(W),U.append(K)}},h=function(e,n){var o=t(e),l=Math.floor(o.currentTime());if(Math.floor(o.duration())!=l){o.pause(e);var r=i();a(r,e,p)}};function y(e,n){var o=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var l=document.createElement("div");l.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(i),a.alt="Provider Image",l.append(a),o.el().appendChild(l),o.on("useractive",function(){l.classList.remove("vjs-fade")}),o.on("userinactive",function(){o.paused()||l.classList.add("vjs-fade")}),o.on("fullscreenchange",function(){o.isFullscreen_?l.style.top="3.2rem":l.style.top="1rem"})}}c={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},u=function e(){var t,n,o,i,l;for(o in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[o])i.hasOwnProperty(l)&&("object"===s(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},m=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},v=function e(t){return"HTML"!==t.nodeName&&"static"===m(t)("position")?e(t.offsetParent):t},d.registerPlugin("thumbnails",function(e){var t,n,o,i,l,a,r,s;function d(){document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",d),s()}n=u({},c,e),i=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",o=document.createElement("img"),t.appendChild(o),o.src=n[0].src,o.className="vjs-thumbnail",u(o.style,n[0].style),o.style.left||o.style.right||(o.onload=function(){o.style.left=-o.naturalWidth/2+"px"}),a=i.duration(),i.on("durationchange",function(e){a=i.duration()}),i.on("loadedmetadata",function(e){a=i.duration()}),(l=i.controlBar.progressControl).el().appendChild(t),r=function(e){var i,r,s,d,c,p,f,g,h,y;for(r in s=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((y=v(l.el()).getBoundingClientRect()).width||y.right)+h,p=e.pageX,e.changedTouches&&(p=e.changedTouches[0].pageX),d=p||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,d-=v(l.el()).getBoundingClientRect().left+h,i=Math.floor((d-l.el().offsetLeft)/l.width()*a),n)i>r&&(s=Math.max(s,r));(c=n[s]).src&&o.src!=c.src&&(o.src=c.src),c.style&&o.style!=c.style&&u(o.style,c.style),d+(g=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=m(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(o,c.width||n[0].width)/2)>f?d-=d+g-f:d<g&&(d=g),t.style.left=d+"px"},l.on("mousemove",r),l.on("touchmove",r),l.on("pointerdown",function(e){document.addEventListener("pointermove",r),document.addEventListener("pointerup",d)}),s=function(e){t.style.left="-1000px"},l.on("mouseout",s),l.on("touchcancel",s),l.on("touchend",s),i.on("userinactive",s)});export{g as a,y as b};
|
package/esm/index.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export default VLPlayerCore;
|
|
2
|
+
declare function VLPlayerCore(): {
|
|
3
|
+
loadVideoInstantly: (playerId: any, src: any, cancelTimeout: any) => Promise<any>;
|
|
4
|
+
onTimeUpdate: (playerId: any, cb: any) => void;
|
|
5
|
+
getVideoDuration: (playerId: any) => any;
|
|
6
|
+
onVideoEnded: (playerId: any, cb: any) => void;
|
|
7
|
+
init: (config: any) => Promise<any>;
|
|
8
|
+
getRenditions: (playerId?: string) => any[];
|
|
9
|
+
skip: (playerId?: string, time?: number) => void;
|
|
10
|
+
getPlayer: (playerId?: string) => any;
|
|
11
|
+
play: (playerId?: string) => void;
|
|
12
|
+
pause: (playerId?: string) => void;
|
|
13
|
+
detectBrowser: () => "IE" | "Opera" | "Chrome" | "Safari" | "Firefox" | "Unknown";
|
|
14
|
+
rewind: (playerId?: string, time?: number) => void;
|
|
15
|
+
loadVideo: (playerId: any, src: string) => void;
|
|
16
|
+
seekToTimeStamp: (playerId: any, time: any, cb: any) => void;
|
|
17
|
+
isPlayerInitialised: (playerId?: string) => boolean;
|
|
18
|
+
load: (playerId: any, videoId: any, token_deprecated: any) => Promise<any>;
|
|
19
|
+
authenticateLC: (playerId: any, params: any, load_asset?: boolean) => Promise<any>;
|
|
20
|
+
dispose: (playerId: any) => void;
|
|
21
|
+
enableCaptions: (playerId: any, trackId: any) => void;
|
|
22
|
+
disableCaptions: (playerId: any, trackId: any) => void;
|
|
23
|
+
getCaptions: (playerId: any) => any;
|
|
24
|
+
playSelectedResolution: (playerId: any, obj: any, auto: any) => void;
|
|
25
|
+
getSource: (res: any, playerId: any) => {
|
|
26
|
+
src: any;
|
|
27
|
+
type: string;
|
|
28
|
+
};
|
|
29
|
+
setVolume: (playerId: any, volume: any, cb: any) => void;
|
|
30
|
+
getVolume: (playerId: any) => string;
|
|
31
|
+
disableControls: (playerId: any) => void;
|
|
32
|
+
setPlaybackSpeed: (playerId: any, speed: any) => string;
|
|
33
|
+
getEntitlementData: (id: any, token: any, url: any, locationData: any) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
34
|
+
getSsaiEvents: typeof getSsaiEvents;
|
|
35
|
+
playerEvents: typeof playerEvents;
|
|
36
|
+
onReplay: (playerId: any, cb: any) => void;
|
|
37
|
+
};
|
|
38
|
+
import { getSsaiEvents } from "./helpers/ssaiEventHandler";
|
|
39
|
+
import { playerEvents } from "./core/util";
|