@viewlift/player-backup 2.0.92-smartTv → 2.0.92-smartTv-test
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-b29a3b25.js → @viewlift/player-backup/cjs/autoNextVideo-aad2f808.js} +1 -1
- package/{cjs/features-a38f8d4f.js → @viewlift/player-backup/cjs/features-c25f787f.js} +1 -1
- package/@viewlift/player-backup/cjs/generic-2e2b89d8.js +1 -0
- package/{cjs/index-666ba0b2.js → @viewlift/player-backup/cjs/index-b9af2c5f.js} +1 -1
- package/{cjs/index-db1f272b.js → @viewlift/player-backup/cjs/index-eef87d02.js} +1 -1
- package/{cjs → @viewlift/player-backup/cjs}/index.js +1 -1
- package/{cjs/multicamv2-7c48564d.js → @viewlift/player-backup/cjs/multicamv2-a8ee3140.js} +1 -1
- package/{cjs/multicamv2-ca190713.js → @viewlift/player-backup/cjs/multicamv2-db0be9af.js} +1 -1
- package/{cjs/nextEpisodeButton-131f3d69.js → @viewlift/player-backup/cjs/nextEpisodeButton-dfd4c9dc.js} +1 -1
- package/{cjs/playlist-bcd1e7a0.js → @viewlift/player-backup/cjs/playlist-02a1cea7.js} +1 -1
- package/@viewlift/player-backup/cjs/renditions-89042a16.js +1 -0
- package/{cjs/series-994ddb85.js → @viewlift/player-backup/cjs/series-f2d50e32.js} +1 -1
- package/{cjs/series-v2-2eb373ad.js → @viewlift/player-backup/cjs/series-v2-59662c73.js} +1 -1
- package/{cjs/series-v2-9c68f5b5.js → @viewlift/player-backup/cjs/series-v2-b8973aa7.js} +1 -1
- package/{cjs/settings-icon-1d2e916e.js → @viewlift/player-backup/cjs/settings-icon-743e2d7d.js} +1 -1
- package/{cjs/skin-d9743bd4.js → @viewlift/player-backup/cjs/skin-09ae336b.js} +1 -1
- package/{cjs/skin-64cff651.js → @viewlift/player-backup/cjs/skin-5f08dbd4.js} +1 -1
- package/{cjs/skin-bea1e236.js → @viewlift/player-backup/cjs/skin-88c48a92.js} +1 -1
- package/{cjs/skin-311865a4.js → @viewlift/player-backup/cjs/skin-88d9f184.js} +1 -1
- package/{cjs/skin-69261583.js → @viewlift/player-backup/cjs/skin-b23ccb4a.js} +1 -1
- package/{cjs/skin-07f145ea.js → @viewlift/player-backup/cjs/skin-b8bd7187.js} +1 -1
- package/{cjs/skin-6e61cd86.js → @viewlift/player-backup/cjs/skin-df588926.js} +1 -1
- package/{cjs/videoSelector-4d617fd3.js → @viewlift/player-backup/cjs/videoSelector-0ff6dda9.js} +1 -1
- package/{cjs/videoSelector-bdbdca8c.js → @viewlift/player-backup/cjs/videoSelector-a2f33bd9.js} +1 -1
- package/{esm/autoNextVideo-4ce42bb7.js → @viewlift/player-backup/esm/autoNextVideo-0569fb2e.js} +1 -1
- package/{esm/features-01f8cc8e.js → @viewlift/player-backup/esm/features-64d23391.js} +1 -1
- package/@viewlift/player-backup/esm/generic-1c16ee3a.js +1 -0
- package/{esm/index-1b19a9ec.js → @viewlift/player-backup/esm/index-8603ba1f.js} +1 -1
- package/{esm/index-22ee14fa.js → @viewlift/player-backup/esm/index-b7dc36f4.js} +1 -1
- package/{esm → @viewlift/player-backup/esm}/index.js +1 -1
- package/{esm/multicamv2-ab85e8f1.js → @viewlift/player-backup/esm/multicamv2-2d92c810.js} +1 -1
- package/{esm/multicamv2-deed6edb.js → @viewlift/player-backup/esm/multicamv2-a1e0923e.js} +1 -1
- package/{esm/nextEpisodeButton-365e9917.js → @viewlift/player-backup/esm/nextEpisodeButton-4addf03a.js} +1 -1
- package/{esm/playlist-688d85d5.js → @viewlift/player-backup/esm/playlist-f973161f.js} +1 -1
- package/@viewlift/player-backup/esm/renditions-7c478ac1.js +1 -0
- package/{esm/series-2088da70.js → @viewlift/player-backup/esm/series-b5d22690.js} +1 -1
- package/{esm/series-v2-18b61d2e.js → @viewlift/player-backup/esm/series-v2-1cf4ace2.js} +1 -1
- package/{esm/series-v2-9e683d44.js → @viewlift/player-backup/esm/series-v2-dbc5cb6a.js} +1 -1
- package/{esm/settings-icon-057e328c.js → @viewlift/player-backup/esm/settings-icon-84529309.js} +1 -1
- package/{esm/skin-0ada52ac.js → @viewlift/player-backup/esm/skin-23dd7694.js} +1 -1
- package/{esm/skin-1d0eaa6d.js → @viewlift/player-backup/esm/skin-2d508a29.js} +1 -1
- package/{esm/skin-3bb3670c.js → @viewlift/player-backup/esm/skin-81946b34.js} +1 -1
- package/{esm/skin-917f0986.js → @viewlift/player-backup/esm/skin-97abe496.js} +1 -1
- package/{esm/skin-e73d1fe9.js → @viewlift/player-backup/esm/skin-b7aed99b.js} +1 -1
- package/{esm/skin-e1957eef.js → @viewlift/player-backup/esm/skin-cbbd86da.js} +1 -1
- package/{esm/skin-4e85fcc6.js → @viewlift/player-backup/esm/skin-cc77e897.js} +1 -1
- package/{esm/videoSelector-0edfdb39.js → @viewlift/player-backup/esm/videoSelector-4fad2060.js} +1 -1
- package/{esm/videoSelector-f83715c8.js → @viewlift/player-backup/esm/videoSelector-aa6e17bd.js} +1 -1
- package/@viewlift/player-backup/package.json +21 -0
- package/@viewlift/player_legacy/cjs/autoNextVideo-cfad17dd.js +1 -0
- package/@viewlift/player_legacy/cjs/bundle.css +750 -0
- package/@viewlift/player_legacy/cjs/caption-settings-34ca0188.js +1 -0
- package/@viewlift/player_legacy/cjs/caption-settings-3fce88de.js +1 -0
- package/@viewlift/player_legacy/cjs/chromett-f925fb6c.js +1 -0
- package/@viewlift/player_legacy/cjs/dvr_skin-f7f770ae.js +1 -0
- package/@viewlift/player_legacy/cjs/error-26d5a3c3.js +1 -0
- package/@viewlift/player_legacy/cjs/features-e87c6a65.js +1 -0
- package/@viewlift/player_legacy/cjs/generic-84fb46a8.js +1 -0
- package/@viewlift/player_legacy/cjs/icons-515b2da0.js +1 -0
- package/@viewlift/player_legacy/cjs/index.js +1 -0
- package/@viewlift/player_legacy/cjs/keyboardShortcuts-28cca2a0.js +1 -0
- package/@viewlift/player_legacy/cjs/loader-393b838a.js +1 -0
- package/@viewlift/player_legacy/cjs/localisation-56e0a999.js +1 -0
- package/@viewlift/player_legacy/cjs/multicam-7f00370f.js +1 -0
- package/@viewlift/player_legacy/cjs/multicam-a41fe4a6.js +1 -0
- package/@viewlift/player_legacy/cjs/multicamv2-3ae15e48.js +1 -0
- package/@viewlift/player_legacy/cjs/multicamv2-76d8530b.js +1 -0
- package/@viewlift/player_legacy/cjs/mwebPotrait-3c11d7cf.js +1 -0
- package/@viewlift/player_legacy/cjs/mwebPotraitTray-c92e66e9.js +1 -0
- package/@viewlift/player_legacy/cjs/nextEpisodeButton-268f2477.js +1 -0
- package/@viewlift/player_legacy/cjs/nextEpisodeButton-b6e6586f.js +1 -0
- package/@viewlift/player_legacy/cjs/nondvr_skin-ef2cb3b2.js +1 -0
- package/@viewlift/player_legacy/cjs/playlist-791d8514.js +1 -0
- package/@viewlift/player_legacy/cjs/playlist-df87ca90.js +1 -0
- package/@viewlift/player_legacy/cjs/renditions-a3aa797d.js +1 -0
- package/@viewlift/player_legacy/cjs/resolution-0901fbcc.js +1 -0
- package/@viewlift/player_legacy/cjs/series-7d527a16.js +1 -0
- package/@viewlift/player_legacy/cjs/series-9c237975.js +1 -0
- package/@viewlift/player_legacy/cjs/series-v2-7c41e053.js +1 -0
- package/@viewlift/player_legacy/cjs/series-v2-fd7485a5.js +1 -0
- package/@viewlift/player_legacy/cjs/settings-icon-83cee2be.js +1 -0
- package/@viewlift/player_legacy/cjs/settings-icon-8d364c01.js +1 -0
- package/@viewlift/player_legacy/cjs/skin-060b6651.js +1 -0
- package/@viewlift/player_legacy/cjs/skin-192c8f9d.js +1 -0
- package/@viewlift/player_legacy/cjs/skin-225252ff.js +1 -0
- package/@viewlift/player_legacy/cjs/skin-52e32672.js +1 -0
- package/@viewlift/player_legacy/cjs/skin-983a2ea7.js +1 -0
- package/@viewlift/player_legacy/cjs/skin-ae72dffc.js +1 -0
- package/@viewlift/player_legacy/cjs/skin-c66e9b42.js +1 -0
- package/@viewlift/player_legacy/cjs/skin-d792c112.js +1 -0
- package/@viewlift/player_legacy/cjs/skin-fc1e7e52.js +1 -0
- package/@viewlift/player_legacy/cjs/skin-ffc40dfa.js +1 -0
- package/@viewlift/player_legacy/cjs/util-8512730a.js +1 -0
- package/@viewlift/player_legacy/cjs/videoSelector-7cffb7fb.js +1 -0
- package/@viewlift/player_legacy/cjs/videoSelector-fcdf11eb.js +1 -0
- package/@viewlift/player_legacy/esm/autoNextVideo-bdb40d4e.js +1 -0
- package/@viewlift/player_legacy/esm/bundle.css +750 -0
- package/@viewlift/player_legacy/esm/caption-settings-5c80dd3a.js +1 -0
- package/@viewlift/player_legacy/esm/caption-settings-cb47408f.js +1 -0
- package/@viewlift/player_legacy/esm/chromett-a3cbb2e1.js +1 -0
- package/@viewlift/player_legacy/esm/dvr_skin-9cc1b144.js +1 -0
- package/@viewlift/player_legacy/esm/error-2395864b.js +1 -0
- package/@viewlift/player_legacy/esm/features-3ea03850.js +1 -0
- package/@viewlift/player_legacy/esm/generic-20c8a769.js +1 -0
- package/@viewlift/player_legacy/esm/icons-3e9a1686.js +1 -0
- package/@viewlift/player_legacy/esm/index.js +1 -0
- package/@viewlift/player_legacy/esm/keyboardShortcuts-c44e3f0d.js +1 -0
- package/@viewlift/player_legacy/esm/loader-580278fe.js +1 -0
- package/@viewlift/player_legacy/esm/localisation-0bf399a1.js +1 -0
- package/@viewlift/player_legacy/esm/multicam-5fe06c4c.js +1 -0
- package/@viewlift/player_legacy/esm/multicam-de741974.js +1 -0
- package/@viewlift/player_legacy/esm/multicamv2-139a0d7b.js +1 -0
- package/@viewlift/player_legacy/esm/multicamv2-d006cffa.js +1 -0
- package/@viewlift/player_legacy/esm/mwebPotrait-3c1805d8.js +1 -0
- package/@viewlift/player_legacy/esm/mwebPotraitTray-30090e99.js +1 -0
- package/@viewlift/player_legacy/esm/nextEpisodeButton-a1556cdf.js +1 -0
- package/@viewlift/player_legacy/esm/nextEpisodeButton-e349ba2b.js +1 -0
- package/@viewlift/player_legacy/esm/nondvr_skin-64be70e5.js +1 -0
- package/@viewlift/player_legacy/esm/playlist-7ecf432a.js +1 -0
- package/@viewlift/player_legacy/esm/playlist-b1f27894.js +1 -0
- package/@viewlift/player_legacy/esm/renditions-85455172.js +1 -0
- package/@viewlift/player_legacy/esm/resolution-c1b8982f.js +1 -0
- package/@viewlift/player_legacy/esm/series-041152aa.js +1 -0
- package/@viewlift/player_legacy/esm/series-dab2e21d.js +1 -0
- package/@viewlift/player_legacy/esm/series-v2-4cdbf9b1.js +1 -0
- package/@viewlift/player_legacy/esm/series-v2-7bfbc3c7.js +1 -0
- package/@viewlift/player_legacy/esm/settings-icon-1fbc99bc.js +1 -0
- package/@viewlift/player_legacy/esm/settings-icon-d7165ee4.js +1 -0
- package/@viewlift/player_legacy/esm/skin-234fba77.js +1 -0
- package/@viewlift/player_legacy/esm/skin-271fa63f.js +1 -0
- package/@viewlift/player_legacy/esm/skin-2b9817ad.js +1 -0
- package/@viewlift/player_legacy/esm/skin-2c638dc1.js +1 -0
- package/@viewlift/player_legacy/esm/skin-2cb990c1.js +1 -0
- package/@viewlift/player_legacy/esm/skin-5122b332.js +1 -0
- package/@viewlift/player_legacy/esm/skin-80650097.js +1 -0
- package/@viewlift/player_legacy/esm/skin-cd537931.js +1 -0
- package/@viewlift/player_legacy/esm/skin-dda3b262.js +1 -0
- package/@viewlift/player_legacy/esm/skin-fbc45594.js +1 -0
- package/@viewlift/player_legacy/esm/util-586fea59.js +1 -0
- package/@viewlift/player_legacy/esm/videoSelector-8e258d45.js +1 -0
- package/@viewlift/player_legacy/esm/videoSelector-c745619c.js +1 -0
- package/@viewlift/player_legacy/package.json +17 -0
- package/@viewlift/web-multiplayer/cjs/bundle.css +68 -0
- package/@viewlift/web-multiplayer/cjs/index.js +1 -0
- package/@viewlift/web-multiplayer/esm/App.js +1 -0
- package/@viewlift/web-multiplayer/esm/bundle.css +68 -0
- package/@viewlift/web-multiplayer/esm/components/Multiplayer.js +1 -0
- package/@viewlift/web-multiplayer/esm/index.js +1 -0
- package/@viewlift/web-multiplayer/esm/reportWebVitals.js +1 -0
- package/@viewlift/web-multiplayer/package.json +38 -0
- package/package.json +55 -18
- package/player-micro-frontend/cjs/index.js +1 -0
- package/player-micro-frontend/esm/index.js +1 -0
- package/player-micro-frontend/package.json +33 -0
- package/cjs/generic-4413cf80.js +0 -1
- package/cjs/renditions-8834c401.js +0 -1
- package/esm/generic-3a715dc5.js +0 -1
- package/esm/renditions-c92646e4.js +0 -1
- package/{cjs → @viewlift/player-backup/cjs}/browser-38ff3331.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/bundle.css +181 -181
- package/{cjs → @viewlift/player-backup/cjs}/caption-settings-34ca0188.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/caption-settings-7f7ed041.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/captions-afd38b2e.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/chromett-f925fb6c.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/error-26d5a3c3.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/icons-0ea2e662.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/index-84cce26a.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/localisation-56e0a999.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/multicamv2-1efdbdb9.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/multicamv2-7a86b517.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/nextEpisodeButton-b6e6586f.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/playlist-df87ca90.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/resolution-5e1f1897.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/series-9c237975.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/series-v2-68886cd2.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/series-v2-e037e14e.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/settings-icon-8d364c01.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/skin-225252ff.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/skin-87c06e34.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/skin-ba38afdb.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/skin-f87e1c22.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/skin-fc1e7e52.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/util-47af43d1.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/videoSelector-b6e03076.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/videoSelector-fcdf11eb.js +0 -0
- package/{cjs → @viewlift/player-backup/cjs}/videojs-dash5.es-0c89add5.js +0 -0
- package/{esm → @viewlift/player-backup/esm}/browser-512cd55a.js +0 -0
- package/{esm → @viewlift/player-backup/esm}/bundle.css +181 -181
- /package/{esm → @viewlift/player-backup/esm}/caption-settings-76bbd9ca.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/caption-settings-cb47408f.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/captions-0280b028.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/chromett-a3cbb2e1.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/error-2395864b.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/icons-79ad4d7d.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/index-5d92eaa3.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/localisation-0bf399a1.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/multicamv2-1fb5149a.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/multicamv2-b7cec0cf.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/nextEpisodeButton-a1556cdf.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/playlist-7ecf432a.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/resolution-69172876.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/series-041152aa.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/series-v2-87343239.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/series-v2-8a8b6f0c.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/settings-icon-1fbc99bc.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/skin-271fa63f.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/skin-2c638dc1.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/skin-71be210e.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/skin-86e7e2b5.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/skin-e4b35c14.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/util-42912ffd.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/videoSelector-8e258d45.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/videoSelector-def99d5e.js +0 -0
- /package/{esm → @viewlift/player-backup/esm}/videojs-dash5.es-6c1ba1fe.js +0 -0
package/{cjs/videoSelector-4d617fd3.js → @viewlift/player-backup/cjs/videoSelector-0ff6dda9.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),a=require("./icons-0ea2e662.js"),l=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),a=require("./icons-0ea2e662.js"),l=require("./generic-2e2b89d8.js"),d=require("./skin-f87e1c22.js"),s=require("./autoNextVideo-aad2f808.js"),c=require("./localisation-56e0a999.js");function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-afd38b2e.js"),require("@babel/runtime/helpers/toConsumableArray"),require("./util-47af43d1.js");var v=r.getComponent("Component"),m=function(){n(b,v);var m,p,h=(m=b,p=u(),function(){var e,t=o(m);if(p){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function b(t){var n,i,o,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,b),(o=h.call(this,t,r)).playerId=r.playerId,o.seriesData=r.sres,o.videos=r.related.content,o.cb=(null==r||null===(n=r.related)||void 0===n?void 0:n.cb)||null,o.autoNext=(null==r||null===(i=r.related)||void 0===i?void 0:i.autoNext)||!1,o.currentVideoData=r.res,o.initialiseStructure(),o.loadCSS(),o.autoNext&&(l.setVideoIdx(0),s.autoPlayNext({playerId:o.playerId,content:o.videos,cb:o.cb})),o}return t(b,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./videoSelector-fcdf11eb.js")}).then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=r.dom.createEl("div",{className:"video-selection-container hidden"});r.dom.$(".video-selector-icon",this.el()).onclick=function(){var i;null!==(i=n.classList)&&void 0!==i&&i.contains("hidden")?(d.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),n.style.right="0px",d.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"),n.style.right="-350px")};var i=document.getElementById(this.playerId);if(i){var o=window.getComputedStyle(i,null).getPropertyValue("height");n.style.height="".concat(o),r.dom.appendContent(t,n),i.style.overflow="hidden",this.addFunctionality(n),d.detectOrientationChange(this.playerId,n)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),i=r.dom.createEl("div",{className:"video-selector-head"}),o=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});o.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};for(var s=r.dom.createEl("div",{className:"video-selector-title",innerHTML:c.getLocalisation("relatedVideoTitle")||"Recommended"}),u=r.dom.createEl("div",{className:"video-selector-content"}),v=r.dom.createEl("div",{className:"video-container"}),m=function(e){var n,i,o,a,s,c=r.dom.createEl("div",{className:"video -".concat(e)}),m=r.dom.createEl("div",{className:"recommended -".concat(e)});m.setAttribute("video-idx",e),m.onclick=function(){l.setVideoIdx(e+1);for(var n=r.dom.$$(".recommended"),i=0;i<n.length;i++)n[i].style.border="none";d.highlightVideo_DEFAULTV2_TEMP(e),l.load(t.playerId,t.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})};var p=document.createElement("img");p.className="related-thumbnail-image",p.src="".concat((null==t||null===(n=t.videos)||void 0===n||null===(i=n[e])||void 0===i?void 0:i.img)||(null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.fallbackImage)),p.alt="No Thumbnail Available",m.append(p);var h=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(s=t.videos[e])||void 0===s?void 0:s.title)||"")});r.dom.appendContent(c,m),r.dom.appendContent(c,h),r.dom.appendContent(v,c),r.dom.appendContent(u,v)},p=0;p<this.videos.length;p++)m(p);r.dom.appendContent(i,o),r.dom.appendContent(i,s),r.dom.appendContent(e,i),r.dom.appendContent(e,u),d.handleDrawerResizing(this.playerId,e)}}]),b}();exports.default=m;
|
package/{cjs/videoSelector-bdbdca8c.js → @viewlift/player-backup/cjs/videoSelector-a2f33bd9.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-0ea2e662.js"),d=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-0ea2e662.js"),d=require("./generic-2e2b89d8.js"),r=require("./skin-f87e1c22.js"),s=require("./autoNextVideo-aad2f808.js"),c=require("./localisation-56e0a999.js");function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-afd38b2e.js"),require("@babel/runtime/helpers/toConsumableArray"),require("./util-47af43d1.js");var m=l.getComponent("Component"),v=function(){n(y,m);var v,p,h=(v=y,p=u(),function(){var e,t=i(v);if(p){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function y(t){var n,o,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,y),(i=h.call(this,t,l)).playerId=l.playerId,i.seriesData=l.sres,i.videos=l.related.content,i.cb=(null==l||null===(n=l.related)||void 0===n?void 0:n.cb)||null,i.autoNext=(null==l||null===(o=l.related)||void 0===o?void 0:o.autoNext)||!1,i.currentVideoData=l.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(d.setVideoIdx(0),s.autoPlayNext({playerId:i.playerId,content:i.videos,cb:i.cb})),i}return t(y,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(a.PlaylistIcon())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./videoSelector-b6e03076.js")}).then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;e.handleTabIndexSelector(),null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")?(r.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),r.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"))};var o=document.getElementById(this.playerId);if(o){var i=window.getComputedStyle(o,null).getPropertyValue("height");n.style.height="".concat(i),l.dom.appendContent(t,n),o.style.overflow="hidden",this.addFunctionality(n),r.detectOrientationChange(this.playerId,n)}}},{key:"loadVideoAssetById",value:function(e){var t=this;d.setVideoIdx(e+1);for(var n=l.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";r.highlightVideo(e),d.load(this.playerId,this.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})}},{key:"handleTabIndexSelector",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))[0]&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=l.dom.createEl("div",{className:"video-selector-head"}),i=l.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",tabIndex:-1,innerHTML:"".concat(a.crossIconSvg())});i.onkeydown=function(o){"Enter"===o.key&&(e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex()};for(var d=l.dom.createEl("div",{className:"video-selector-title",innerHTML:c.getLocalisation("relatedVideoTitle")||"Recommended"}),s=l.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),u=l.dom.createEl("div",{className:"video-container video-accessibility"}),m=function(e){var n,o,i,a,d,c,m,v,p=l.dom.createEl("div",{className:"video -".concat(e)}),h=l.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(n){"Enter"===n.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var y=document.createElement("img");y.className="related-thumbnail-image",y.src="".concat(r.impolicy16x9(null==t||null===(n=t.videos)||void 0===n||null===(o=n[e])||void 0===o?void 0:o.img)||r.impolicy16x9(null===(i=window)||void 0===i||null===(a=i.app_data)||void 0===a||null===(d=a.appcmsMain)||void 0===d||null===(c=d.images)||void 0===c?void 0:c.placeholderCover)),y.alt="".concat((null==t||null===(m=t.videos[e])||void 0===m?void 0:m.title.trim().split(/\s+/).slice(0,2).join(" "))||""),h.append(y);var b=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title)||"")});l.dom.appendContent(p,h),l.dom.appendContent(p,b),l.dom.appendContent(u,p),l.dom.appendContent(s,u)},v=0;v<this.videos.length;v++)m(v);l.dom.appendContent(o,d),l.dom.appendContent(o,i),l.dom.appendContent(e,o),l.dom.appendContent(e,s),r.handleDrawerResizing(this.playerId,e)}}]),y}();exports.default=v;
|
package/{esm/autoNextVideo-4ce42bb7.js → @viewlift/player-backup/esm/autoNextVideo-0569fb2e.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{J as n,f as t,H as i,S as o,T as e}from"./generic-
|
|
1
|
+
import{J as n,f as t,H as i,S as o,T as e}from"./generic-1c16ee3a.js";import{b as c}from"./util-42912ffd.js";import{g as a,h as s}from"./skin-86e7e2b5.js";var u,r=0,f=0,l=function(l){clearTimeout(r);var v=null==l?void 0:l.content;u=null==l?void 0:l.cb;var d=l.playerId;c(d,function(){var c=a(d);0!==(null==c?void 0:c.currentTime())&&((f=o())>v.length-1||(e(f+1),n(d,v[f].id).then(function(n){s(f,d),t(n.response),f++,h(n)}).catch(function(n){h(n),s(f,d),f++,r=setTimeout(function(){i(d)&&m(f,d,v)},5e3)})))})},m=function t(i,o,c,a){f=i,i>c.length-1||(e(f+1),n(o,c[i].id).then(function(n){s(f,o),f++,h(n)}).catch(function(n){h(n),setTimeout(function(){s(f,o),f++,t(f,o,c)},5e3)}))},h=function(n){u&&u(n)};export{l as a,m as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{r as a,k as s}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{r as a,k as s}from"./generic-1c16ee3a.js";import{g as c}from"./renditions-7c478ac1.js";import{g as d,p as u}from"./skin-86e7e2b5.js";import{g as p}from"./localisation-0bf399a1.js";function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?m(Object(r),!0).forEach(function(n){e(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function f(e){var t=v();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return o(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var g=function(e){var o=function(e){r(i,e);var o=f(i);function i(e,n){var r;t(this,i);var l=(r=o.call(this,e,n)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=p("slowMoText")||"Slow Mo",r}return n(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},C=function(e,o,l){var s=function(o){r(s,o);var i=f(s);function s(e,n){var r;t(this,s);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-rewind-button");var a=u(l);return o.append(a),r}return n(s,[{key:"handleClick",value:function(){a(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},y=function(e,o,l){var a=function(o){r(a,o);var i=f(a);function a(e,n){var r;t(this,a);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-skip-button");var s=u(l);return o.append(s),r}return n(a,[{key:"handleClick",value:function(){s(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},B=function(e,t,n){import("./resolution-69172876.js").then(function(r){var o=r.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=d(e),a=c(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:n,renditions:a},l.controlBar.children().length-4))})},b=function(e,t,n){import("./nextEpisodeButton-4addf03a.js").then(function(r){var o=r.default,l=d(n);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:n,sres:e,res:t},l.controlBar.children().length-5)})},j=function(e,t,n){import("./series-b5d22690.js").then(function(r){var o=r.seriesModule,l=d(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",function(){t[e]&&r.handleSeasonChange(t[e],e,l,n)})},c=0;c<a.length;c++)s(c)})},k=function(e,t){import("./videoSelector-4fad2060.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},S=function(e,t){import("./caption-settings-76bbd9ca.js").then(function(n){var r,o,l,a,s=n.default,c=d(e);i.registerComponent("captionSelector",s),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},E=function(e,t){import("./settings-icon-84529309.js").then(function(n){var r,o,l,a,s=n.default,c=d(e);i.registerComponent("settingsSelector",s),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},O=function(e,t){import("./playlist-f973161f.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("playlistSelector",r),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},w=function(e,t){import("./series-v2-1cf4ace2.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},I=function(e,t){import("./multicamv2-2d92c810.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},M=function(e,t){var n=d(e).el(),r=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});n.append(r)},P=function(e){var t=d(e).el(),n=0,r=d(e);r.addChild("fullscreenToggle");var o=function(){var e,n=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];n&&n.click()};r.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;r.el().addEventListener("touchend",function(){var e=(new Date).getTime(),r=e-n;if(r<300&&r>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}n=e}),window._multiplayer_dbTapHandler=o},x=function(e,t){import("./videoSelector-aa6e17bd.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},L=function(e,t){import("./series-v2-dbc5cb6a.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},N=function(e,t){import("./multicamv2-a1e0923e.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})};export{B as a,j as b,b as c,y as d,C as e,E as f,S as g,M as h,g as i,x as j,N as k,O as l,L as m,P as n,k as o,w as p,I as q};
|
|
@@ -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 i from"video.js";import o from"axios";import{g as r,c as l}from"./skin-86e7e2b5.js";import{i as a,d}from"./browser-512cd55a.js";import u from"js-cookie";import{UAParser as s}from"ua-parser-js";import{a as c,r as v}from"./captions-0280b028.js";function m(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function f(e){window.dataLayer=window.dataLayer||[],m("js",new Date),m("config",e)}function p(e,n){m("event",e,n)}var w={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 I(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function g(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?I(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var E={name:"@viewlift/player-backup",version:"2.0.92-smartTv-test",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0",install:"^0.13.0","js-cookie":"^3.0.5",npm:"^11.5.2","ua-parser-js":"^2.0.3","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-contrib-quality-menu":"^1.0.3","videojs-mux":"^4.21.7"}};window.vl_player_version=E.version;var T,h=function(e,n){var t,i,r,l,a,d,u,s;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:null!==(a=window)&&void 0!==a&&null!==(d=a.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(s=u.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":O.get()+"".concat(null==w?void 0:w.getVideoDetails),params:g({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":E.version},withCredentials:!0})},y=function(e,n){var t,i,r,l;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:O.get()+w.getLinearChannelDetails,params:g(g(g(g(g({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(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"}})},_=function(e,n){var t,i,r=k(n),l=(null==r?void 0:r.site)||null;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.seriesData?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.seriesData})}):o({url:O.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},b=function(){var e=n(t.mark(function e(n){var i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:return i=e.sent,e.abrupt("return",o({url:O.get()+"".concat(null==w?void 0:w.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:g({},n),params:g({},(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)}}(),F=function(e,n){var t,i,r=window.contentType;return o({method:"GET",url:O.get()+"".concat(null==w?void 0:w.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(i=t.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},D=function(e){var n=e.videoId;return o({method:"GET",url:O.get()+"".concat(null==w?void 0:w.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},O=(T=null==w?void 0:w.apiBaseUrl,{set:function(e){e&&(T=e)},get:function(){return T}}),L=function(e,n,t,i){return o({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},R=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},S=null;function P(){return{set:function(e){e&&(S=e)},get:function(){return S}}}var V,W,C,A,N,j,B=function(){var e=n(t.mark(function e(){var n,i,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=P().get(),i=O.get(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/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)}}(),x=null,U=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"))||!R(n)){e.next=6;break}return x||(x=B().then(function(e){var t,i,o=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&P().set(r),o||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){x=null})),e.abrupt("return",x);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),M=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return t&&!i&&(n=!1),n},k=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},H=function(e){W=e},G=function(){return W},z=function(e){V=e},Y=function(){return V},X=function(){return C},q=function(e){C=e},J=function(){return N},K=function(e){A=new Map,e.map(function(e,n){A.set(e.id,n)})},Q=function(e){if(A){var n=A.get(e);q(n+1)}},Z=(j=0,{set:function(e){e>=0&&(j=e)},get:function(){return j}});function $(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function ee(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?$(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var ne=0,te=function(){var e,n,t,i,o,r,l,a=G();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===(i=t.content)||void 0===i?void 0:i.id:(null==a||null===(o=a.video)||void 0===o||null===(r=o.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 ie(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function oe(){var e=window.sessionStorage.getItem("uid");return e||(e=ie(),window.sessionStorage.setItem("uid",e),e)}function re(){return le.apply(this,arguments)}function le(){return(le=n(t.mark(function e(){var n,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:if(!(n=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(n.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ae(e){return e?String(e):""}window.initialise=function(e){window.sid=ie(),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,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,p(r?"FAILED_TO_START":"DROPPED_STREAM",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:n===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,n){e.one("play",tryCatch(function(){var t,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),p("PLAY",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",{"Video ID":te(),watchTime:Math.floor(e.currentTime())})}))},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,i;if(n.el_){var o,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(i=t.className)&&void 0!==i&&i.includes("vjs-waiting")&&ne<4)ne++,p("BUFFERING",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(o=window)||void 0===o||null===(r=o.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,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,p("FIRST_FRAME",ee({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:te()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.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,i,o,r,l;p("AD_REQUEST",ee({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:te(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),p("AD_IMPRESSION",ee({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:te()},null===(o=window)||void 0===o||null===(r=o.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)&&(ne=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(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),l=i.end(o);if(de(n,r,l)){var a=Math.round(t-l);if(isFinite(a))return a}}})()};var de=function(e,n,t){return e>=n&&e<=t};function ue(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var t=r(e);window.initialise(t,n),window.firstFrame(t,n),t.on("loadedmetadata",function(){window.endFirstFrame(t)})}}window.fireEvent=function(){var e=n(t.mark(function e(n){var i,r,l,a,d,u,s,c,v,m,f,p,I,g,E,T,h,y,_,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:return T=e.sent,h=k(T),y=null==h?void 0:h.site,_=null==h?void 0:h.siteId,e.t0=ee,e.t1=ee,e.t2=ee({aid:y,cid:_,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=oe(),e.t5=te(),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?ae(n.adPosition):"",e.next=26,re();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={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},e.t28=(null==n?void 0:n.duration)&&{duration:n.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(m=window)||void 0===m||null===(f=m.customData)||void 0===f||null===(p=f.beacon)||void 0===p?void 0:p.params,e.t31=(0,e.t0)(e.t29,e.t30),b=[e.t31],o({url:(null===(I=window)||void 0===I||null===(g=I.customData)||void 0===g||null===(E=g.beacon)||void 0===E?void 0:E.url)||O.get()+w.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:b}).catch(function(e){console.error(e)});case 42: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 se=function(e,n){var t=new Map;D({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),N=t}).catch(function(e){return console.log(e)})},ce=function(){var e=Z.get();return e>=0?e+1:1},ve=function(){var e,n,t,i=Y(),o=G(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,l=Z.get(),a=null==i||null===(n=i[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 me(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function fe(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?me(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):me(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}window._deviceInfo=s(navigator.userAgent);var pe=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},we=function(e){var n=Ie(e,"video.tags",[]),t=Ie(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},Ie=function(e,n,t){for(var i=0,o=(n=n.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[n[i]]}return e||t},ge=function(){var e,n,t,i,o,l,a,d,s,c,v,m,f,p,w,I,g,E,T,h,y,_=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",b=arguments.length>1?arguments[1]:void 0,F=arguments.length>2?arguments[2]:void 0,D=(null==F?void 0:F.siteName)||"",O=(null==F?void 0:F.contentType)||"video",L=(null==F||null===(e=F[O])||void 0===e?void 0:e.metadata)||(null==F||null===(n=F[O])||void 0===n||null===(t=n.gist)||void 0===t?void 0:t.metadata),R=r(b);if(!_.includes("VIEWLIFT_"))return _;var S,P=window.getComputedStyle(document.getElementById(b),null),V=Math.trunc(P.getPropertyValue("height").slice(0,-2)),W=Math.trunc(P.getPropertyValue("width").slice(0,-2)),C="linearchannel"===O?null==F||null===(i=F.linearchannel)||void 0===i||null===(o=i.channels)||void 0===o||null===(l=o.find(function(e){return(null==e?void 0:e.id)===(null==F?void 0:F.channelId)}))||void 0===l||null===(a=l.content)||void 0===a?void 0:a.id:Ie(F,"video.gist.id",""),A="linearchannel"===O?null==F||null===(d=F.linearchannel)||void 0===d||null===(s=d.channels)||void 0===s||null===(c=s.find(function(e){return(null==e?void 0:e.id)===(null==F?void 0:F.channelId)}))||void 0===c?void 0:c.title:Ie(F,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),N=null,j=null;"function"==typeof window.__gpp&&(null===(S=window)||void 0===S||S.__gpp("ping",function(e){N=null==e?void 0:e.gppString,j=null==e?void 0:e.sectionList[0]}));var B=fe(fe({},Ee(L)),{},{VIEWLIFT_WIDTH:W,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:pe(W,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===(v=window)||void 0===v?void 0:v.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:Ie(F,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:Ie(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:Ie(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==R||null===(m=R.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==R||null===(f=R.options_)||void 0===f?void 0:f.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:we(F),VIEWLIFT_MEDIA_ID:C,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(Ie(F,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:C,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+Ie(F,"video.gist.permalink","")),VIEWLIFT_CONSENT:u.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:Ie(null===(p=window)||void 0===p||null===(w=p.app_data)||void 0===w||null===(I=w.site)||void 0===I?void 0:I.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_GDPR:"spinco"==D?"":Ie(null===(g=window)||void 0===g||null===(E=g.app_data)||void 0===E||null===(T=E.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*Ie(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:Ie(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:C,VIEWLIFT_CONTENT_TITLE:A,VIEWLIFT_CONTENT_SERIES_TITLE:Ie(F,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:Ie(F,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ve(),VIEWLIFT_SEASON_NUMBER:ce(),VIEWLIFT_CONTENT_TAGS:we(F),VIEWLIFT_GPP_SID:j||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:N||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},null===(h=window)||void 0===h||null===(y=h.customData)||void 0===y?void 0:y.macros);for(var x in B){var U=new RegExp(x,"g");_=_.replace(U,B[x])}return _},Ee=function(e){var n,t,i,o,r,l,d;if(null!==(n=window)&&void 0!==n&&n.customData.isSmartTV)return Te(e);var u={},s=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){s.set(e.name,e.value)}));var c=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.subscription)||void 0===o?void 0:o.SVOD)||!1,v=(null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l||null===(d=l.subscription)||void 0===d?void 0:d.TVE)||!1;return c||v?(a()?c?u=fe(fe({},u),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||""}):v&&(u=fe(fe({},u),{},{VIEWLIFT_CSID:s.get("csid.mweb.tve")||""})):c?u=fe(fe({},u),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||""}):v&&(u=fe(fe({},u),{},{VIEWLIFT_CSID:s.get("csid.web.tve")||""})),c?u=fe(fe({},u),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}):v&&(u=fe(fe({},u),{},{VIEWLIFT_SFID:s.get("sfid.tve")||s.get("sfid.web.tve")||""})),u=a()?fe(fe({},u),{},{VIEWLIFT_PROF:s.get("prof.mweb")||""}):fe(fe({},u),{},{VIEWLIFT_PROF:s.get("prof.web")||""})):(u=fe(fe({},u),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}),u=a()?fe(fe({},u),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:s.get("prof.mweb")||""}):fe(fe({},u),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||"",VIEWLIFT_PROF:s.get("prof.web")||""})),u=fe(fe({},u),{},{VIEWLIFT_AFID:s.get("afid")})},Te=function(e){var n,t,i,o,r,l,a={},d=new Map;return(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){d.set(e.name,e.value)})),null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.subscription)||void 0===i||i.SVOD,(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.samsungtv.tve")||d.get("sfid.tve")}),a="lgTv"==window.customData.device?fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.lgtv.tve")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""}):"vizioTv"==window.customData.device?fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.viziotv.tve")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""}):"xfinityX1"==window.customData.device?fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.xfinity.tve")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""}):"xbox"==window.customData.device?fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.tve")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""}):fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.samsungtv.tve")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""})):(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.samsungtv.dtc")||d.get("sfid.dtc")}),a="lgTv"==window.customData.device?fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.lgtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""}):"vizioTv"==window.customData.device?fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.viziotv.dtc")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""}):"xfinityX1"==window.customData.device?fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.xfinity.dtc")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""}):"xbox"==window.customData.device?fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.dtc")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""}):fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.samsungtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""})),a},he=function(e){var n=null;try{var t,i,o,r,l,a,d,u,s,c,v,m,f,p,w,I,g,E,T,h,y,_,b,F,D,O,L,R,S;if(null!==(t=window)&&void 0!==t&&t.customData.isSmartTV){if("samsungTv"==window.customData.device&&null!=e&&null!==(i=e.ads)&&void 0!==i&&null!==(o=i.preRoll)&&void 0!==o&&null!==(r=o.adTags)&&void 0!==r&&null!==(l=r.samsung_tv)&&void 0!==l&&l.active)n=null==e||null===(E=e.ads)||void 0===E||null===(T=E.preRoll)||void 0===T||null===(h=T.adTags)||void 0===h||null===(y=h.samsung_tv)||void 0===y?void 0:y.url;else if("lgTv"==window.customData.device&&null!=e&&null!==(a=e.ads)&&void 0!==a&&null!==(d=a.preRoll)&&void 0!==d&&null!==(u=d.adTags)&&void 0!==u&&null!==(s=u.lg_tv)&&void 0!==s&&s.active){var P,V,W,C;n=null==e||null===(P=e.ads)||void 0===P||null===(V=P.preRoll)||void 0===V||null===(W=V.adTags)||void 0===W||null===(C=W.lg_tv)||void 0===C?void 0:C.url}else if("vizioTv"==window.customData.device&&null!=e&&null!==(c=e.ads)&&void 0!==c&&null!==(v=c.preRoll)&&void 0!==v&&null!==(m=v.adTags)&&void 0!==m&&null!==(f=m.vizioTv)&&void 0!==f&&f.active){var A,N,j,B;n=null==e||null===(A=e.ads)||void 0===A||null===(N=A.preRoll)||void 0===N||null===(j=N.adTags)||void 0===j||null===(B=j.vizioTv)||void 0===B?void 0:B.url}else if("xbox"==window.customData.device&&null!=e&&null!==(p=e.ads)&&void 0!==p&&null!==(w=p.preRoll)&&void 0!==w&&null!==(I=w.adTags)&&void 0!==I&&null!==(g=I.xbox)&&void 0!==g&&g.active){var x,U,M,k;n=null==e||null===(x=e.ads)||void 0===x||null===(U=x.preRoll)||void 0===U||null===(M=U.adTags)||void 0===M||null===(k=M.xbox)||void 0===k?void 0:k.url}}else n=(null==e||null===(_=e.ads)||void 0===_||null===(b=_.preRoll)||void 0===b||null===(F=b.adTags)||void 0===F||null===(D=F.web)||void 0===D?void 0:D.active)&&(null==e||null===(O=e.ads)||void 0===O||null===(L=O.preRoll)||void 0===L||null===(R=L.adTags)||void 0===R||null===(S=R.web)||void 0===S?void 0:S.url)}catch(e){}return n},ye=function(e,n){var t,i,o,r,l,a,u,s,c,v,m,f,p,w=(null==e?void 0:e.contentType)||"video",I=null==e||null===(t=e[w])||void 0===t?void 0:t.drmEnabled,g=null==e||null===(i=e[w])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[w])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,T=(null==e||null===(a=e[w])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[w])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[w])||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!=E&&E.hls)return be(E);if(I){var y=Fe(g,n);return y.src=ge(y.src,n,e),y}if("Safari"!==d()&&h){var _=_e(g);return _.src=ge(_.src,n,e),_}if(T){var b=be(g);return b.src=ge(b.src,n,e),b}if(null!=g&&g.mpeg){var F=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(g);return F.src=ge(F.src,n,e),F}return null},_e=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},be=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},Fe=function(e,n){var t=e.fairPlayCmaf||e.fairPlay,o=e.widevine,l=e.playReady,a=d();if(r(n),"Safari"===a){var u=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,function(e,n,i){console.log(e),e&&t(e),t(null,new Uint8Array(i))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,o,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(l,function(e,n,t){console.log(e),e&&r(e),r(null,t)})}}}}}(t);return De(n),u}var s,c={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(De(n),c.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var De=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==d()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Oe=function(e,n){var t=e.src,i=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:i};n=n.replace(/\/$/,"");var o=t.split(".com")[1]||"";return{src:o?"".concat(n).concat(o):t,type:i}},Le=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 i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),o.appendChild(r),i.append(o)}}},Re=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Se=!1,Pe=function(e,n,t){var i=ge(n,e,t),o=r(e);if(n&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,n){var t,i,o,l=r(e);if(null!==l.el_){Se=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),Se&&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===(i=t.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};function Ve(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}var We=function(e){i(e).play()},Ce=function(e){i(e).pause()},Ae=function(e,n){var t=i(e),o=t.currentTime()+n;t.currentTime(o)},Ne=function(e,n){var t=i(e),o=t.currentTime(),r=o<=n?0:o-n;t.currentTime(r)},je=function(e){return!!i.getPlayer("".concat(e))},Be=function(e){return i(e).paused()},xe=function(){var e=n(t.mark(function e(n,i){var o,l,a,d=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,U();case 3:return l=e.sent,a=r(n),e.abrupt("return",new Promise(function(e,t){y(i,l).then(function(t){var r=null==t?void 0:t.data;window.sid=ie(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var l=ye(r,n);H(r),l&&o?(Ge(n,l),a.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})})):e({status:!0,msg:"Feed authenticated",response:r})}).catch(function(e){t({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)}}(),Ue=function(){var e=n(t.mark(function e(n,i){var o,l,a,d,u,s,m=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(d=m.length>2&&void 0!==m[2]?m[2]:null){e.next=5;break}return e.next=4,U();case 4:d=e.sent;case 5:return(Y()||null)&&Q(i),u=0,s=0,null!==(o=window)&&void 0!==o&&o.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(a=l.watchHistory)&&void 0!==a&&a.enable&&F(i,d).then(function(e){var n,t,i,o,r,l;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),u=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,s=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null}).catch(function(e){var n,t,i,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}),e.abrupt("return",new Promise(function(e,t){h(i,d).then(function(i){var o,l,a=null==i?void 0:i.data,d=(null==a||null===(o=a.video)||void 0===o||null===(l=o.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;H(i.data);var m=he(a);m&&Pe(n,m,a);var f=ye(a,n);if(f){var p,w,I,g,E,T,h,y,_,b,F,D,O,L,R=(null==a||null===(p=a.video)||void 0===p||null===(w=p.gist)||void 0===w?void 0:w.videoImageUrl)||(null==a||null===(I=a.video)||void 0===I||null===(g=I.gist)||void 0===g||null===(E=g.imageGist)||void 0===E?void 0:E.r16x9),S=r(n);if(S.poster(R),Ge(n,f),S.on("loadstart",function(){d&&e({status:!0,msg:"Video Loaded",response:a})}),S.on("loadeddata",function(){Re(),e({status:!0,msg:"Video Loaded",response:a})}),S.one("play",function(){u&&s<95&&setTimeout(function(){S.currentTime(u)},0)}),S.one("error",function(){var e;t({status:!1,msg:(null==S||null===(e=S.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==a||null===(T=a.video)||void 0===T||null===(h=T.contentDetails)||void 0===h||null===(y=h.closedCaptions)||void 0===y?void 0:y.length)>0||(null==a||null===(_=a.video)||void 0===_||null===(b=_.closedCaptions)||void 0===b?void 0:b.length)>0)F=((null==a||null===(D=a.video)||void 0===D||null===(O=D.contentDetails)||void 0===O?void 0:O.closedCaptions)||(null==a||null===(L=a.video)||void 0===L?void 0:L.closedCaptions)).filter(function(e){return"VTT"===e.format}),c(n,F);else v(n)}else Le(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){ze(e,n,t,i)})}));case 11:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Me=function(e,n,t){var i=r(e);return i.src(n),new Promise(function(e,n){var o=0;i.one("loadedmetadata",function(){clearTimeout(o),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){o=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},ke=function(e){var n=r(e);if(He(),l(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},He=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()},Ge=function(e,n){var t=r(e);t&&t.src(n)},ze=function(n,t,i,o){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);je(t)&&Le(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Ve(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}({status:!1,response:n,msg:"".concat(v)},o&&{videoId:o}))},Ye=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var i=n.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=n.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")};export{_ as A,se as B,Z as C,z as D,Me as E,We as F,Ce as G,Be as H,je as I,Ue as J,xe as K,ke as L,L as M,O as N,M as O,P,R as Q,f as R,X as S,q as T,D as U,K as V,Q as W,ve as a,Y as b,ce as c,G as d,ye as e,H as f,oe as g,Re as h,Le as i,J as j,Ae as k,Ge as l,ge as m,he as n,Ye as o,ue as p,Pe as q,Ne as r,b as s,Oe as t,k as u,h as v,F as w,ze as x,U as y,y as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import{g as e,a as n,b as t,c as o,d as r,s as i,e as l,l as a,f as s,h as u,i as c,j as d,k as v,r as f,m as p,n as m,o as y,p as g,q as h,t as b,u as w,v as k,w as S,x as O,y as T,z as j,A as I,B as E,C as P,D,E as A,F as x,G as C,H as L,I as R,J as N,K as M,L as _,M as V,N as B,O as U,P as H,Q as F,R as Q}from"./generic-3a715dc5.js";import G from"@babel/runtime/helpers/defineProperty";import K from"@babel/runtime/helpers/asyncToGenerator";import q from"@babel/runtime/regenerator";import z from"video.js";import{o as W,g as J,a as X,b as Y,s as $,c as Z}from"./util-42912ffd.js";import{g as ee,d as ne,a as te,e as oe,b as re}from"./captions-0280b028.js";import{g as ie,t as le,i as ae,a as se}from"./skin-86e7e2b5.js";import{g as ue,a as ce}from"./renditions-c92646e4.js";import{playSelectedResolution as de}from"./resolution-69172876.js";import{d as ve}from"./browser-512cd55a.js";import{s as fe}from"./localisation-0bf399a1.js";import pe from"@babel/runtime/helpers/typeof";import me from"@babel/runtime/helpers/toConsumableArray";import ye from"@babel/runtime/helpers/slicedToArray";var ge=function(e){return new Promise(function(n,t){if(he(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}})},he=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},be=function(e){var n,t=ie(e);return(null==t||null===(n=t.audioTracks())||void 0===n?void 0:n.tracks_)||[]||[]},we=function(e,n){for(var t=ie(e).audioTracks().tracks_||[],o=0;o<t.length;o++){var r=t[o];r.id==n?r.enabled=!0:r.enabled=!1}},ke=function(e,n,t){var o=ie(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var r=parseFloat(n)/100;o.volume(r),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},Se=function(e){var n=ie(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},Oe=function(){var e=K(q.mark(function e(n){var t,o,r,i,l;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=ie(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return i=e.sent,e.prev=5,e.next=8,ge("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,i.default(z),e.finish(13);case 16:(l=z.getTech("chromecast"))&&!l.prototype.seeking&&(l.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==ve()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),Te=function(e,n){var t=ie(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,r,i,l,a=this.el(),s=z.dom.getPointerPosition(a,n).x;z.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var d=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=d.h.media[0].liveSeekableRange.end;d.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,d.seek()}})};var je=function(){var e=K(q.mark(function e(){return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),ge("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then(function(){}).catch(function(e){return console.log(e)})]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Ie=function(){var e=K(q.mark(function e(){return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){z.getPlugin("eme")||z.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Ee=function(){var e=K(q.mark(function e(){var n;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(z),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),Pe=function(){var e=K(q.mark(function e(){return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-5d92eaa3.js");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),De=function(){var e=K(q.mark(function e(){return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-6c1ba1fe.js");case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),Ae=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){ge("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(z)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(z)})},loadAdsLibrary:je,loadEMELibrary:Ie,loadMuxPlugin:Ee,loadDvrSeekbar:Pe,loadContribDash:De});function xe(e){return Ce.apply(this,arguments)}function Ce(){return(Ce=K(q.mark(function e(n){var t;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,je();case 3:t&&"Safari"==ve()&&Promise.resolve().then(function(){return Ae}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Le(e,n){return Re.apply(this,arguments)}function Re(){return(Re=K(q.mark(function e(n,t){var o,r,i,l,a,s,u,c,d,v;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u=(null==t?void 0:t.contentType)||"video",c=null==t||null===(o=t[u])||void 0===o?void 0:o.drmEnabled,null==t||null===(r=t[u])||void 0===r||null===(i=r.liveDetails)||void 0===i||i.isDvrEnabled,null==n||n.showPositiveSeekbar,d=(null==t||null===(l=t[u])||void 0===l||null===(a=l.streamingInfo)||void 0===a||null===(s=a.videoAssets)||void 0===s?void 0:s.dash)||null,e.prev=5,e.next=8,Promise.allSettled([c?"Safari"==ve()?Ie():"caliente"!=(null===(v=window)||void 0===v?void 0:v.siteName)?De():Ie():"Safari"!=ve()&&d?De():null,Oe(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function Ne(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 Me(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ne(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ne(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var _e=new Set,Ve=null,Be=function(n,o,r){var i,l,a,s,u,c,d,v={},f=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(i=n[f])||void 0===i?void 0:i.id)||"Null",v["c3.cm.contentType"]=qe(n),v[null==r||null===(l=r.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==n||!n.linearchannel),v[null==r||null===(a=r.Constants)||void 0===a?void 0:a.STREAM_URL]=o.currentSrc(),v[null==r||null===(s=r.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===e()?"NULL":e(),v["c3.cm.categoryType"]=Qe(n),v["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),v.DRMEnabled=(null===(u=n[f])||void 0===u?void 0:u.drmEnabled)||"None",v.DAIStream=null!==(c=n[f])&&void 0!==c&&null!==(d=c.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",v[r.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=Ge(n),v["c3.cm.genreList"]=He(n),v["c3.cm.genre"]=Ue(n),v["c3.cm.channel"]=Fe(n);var p=We(t(),n);return v=Me(Me({},v),p)},Ue=function(e){var n,t,o,r=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[r])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},He=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},Fe=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null==e||null===(n=e[o])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},Qe=function(e){return(null==e?void 0:e.contentType)||"null"},Ge=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return r?"YES":"NO"},Ke=function(e,n){var t,o,r=(n||{}).epg;if(r&&null!=r&&r.enable&&null!=r&&r.programTitle)return r.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(l)},qe=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var ze,We=function(e,t){var r,i,l,a,s,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!t||null!=t&&t.linearchannel)return u;var c=o(),d=n();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(i=r.series)||void 0===i?void 0:i.title)||"Null",u["c3.cm.seasonNumber"]=(null==c?void 0:c.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(l=e[c-1])||void 0===l||null===(a=l.episodes)||void 0===a||null===(s=a[d-1])||void 0===s?void 0:s.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},Je=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},Xe=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},Ye=function(){var e=K(q.mark(function e(n,t){var o,i,l,a,s,u,c,d,v,f;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==t?void 0:t.convivaConfig)||{},i=o.trackConvivaPlayerEvent,l=o.paymentHandler,a=o.tveProvider,s=o.enable,u=o.appName,c=(t||{}).token,s){e.next=4;break}return e.abrupt("return");case 4:if(d=ie(n),"function"==typeof(v=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,v("getConvivaObject");case 10:if(f=e.sent){e.next=13;break}return e.abrupt("return");case 13:d.ready(function(){var e=d.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=Je(t.keySystem);v("contentInfo",{DRMEnabled:o})}else v("contentInfo",{DRMEnabled:"None"})}),n||v("contentInfo",{DRMEnabled:"None"})}),d.on("loadstart",function(){var e,n;Ve&&Ve!==d.currentSrc()&&v("playbackEnded"),v("setPlayer",d),_e.clear(),Ve=d.currentSrc();var o=Xe(d.currentType()),i=r(),s=Be(i,d,f);s[null==f||null===(e=f.Constants)||void 0===e?void 0:e.PLAYER_NAME]=u||"WEB",s[null==f||null===(n=f.Constants)||void 0===n?void 0:n.ASSET_NAME]=Ke(i,t),s.authToken=c||"NULL",s.streamType=o,s.D2CType=l||"NONE",s.subscriberType=a||(l?"D2C":"FREE"),s["c3.cm.affiliate"]=a||"NULL",v("contentInfo",s)}),d.on("loadedmetadata",function(){var e,n=d.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),v("contentInfo",{screenResolution:e})}),d.on("play",function(){_e.has(d.currentSrc())||(_e.add(d.currentSrc()),v("playbackStarted",null))}),d.on("ended",function(){_e.has(d.currentSrc())&&_e.delete(d.currentSrc()),v("playbackEnded")}),d.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&v("initAdSensor",{player:d,adsLoader:null==e?void 0:e.adsLoader})}),d.on("dispose",function(){null==_e||_e.clear(),v("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),$e=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-3bb3670c.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-e73d1fe9.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-e1957eef.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-0ada52ac.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-4e85fcc6.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?import("./skin-917f0986.js").then(function(t){t.initialiseSkin(e,n)}):"VL_SmartTV"==t&&import("./skin-1d0eaa6d.js").then(function(t){t.initialiseSkin(e,n)})};function Ze(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 en(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ze(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ze(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var nn=[],tn=0,on=null;function rn(e,n,t){var o,l,a,s,u,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(o=n.watchHistory)||void 0===o||o.apiVersion;var d=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(e.currentTime()),f=Math.floor(e.duration());null==n||null===(a=n.watchHistory)||void 0===a||a.xapiKey;var p=(null==n||null===(s=n.video)||void 0===s?void 0:s.originalObjectId)||null,m=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,y=Math.floor(e.currentTime()),g=c?100:Math.floor(v/f*100),h={};m?function(e,n,t){var o=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),i=ln(o),l=(new Date).getTime(),a=r(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return en(en({},e),{},G({},n,s[n]))},{}),c=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===ze});c<0?i.push(en(en({content:u},e),{},{addedDate:l,updateDate:l})):i[c]=en(en(en({},i[c]),e),{},{updateDate:l});localStorage.setItem("".concat(o),JSON.stringify(i))}(h={completed:c,watchedTime:y,watchedPercentage:g},d,n.siteOwner):(h=en(en({videoId:ze,watchedTime:y,watchedPercentage:g,doneWatching:c,profileId:d},on&&{seriesId:on}),p&&{originalObjectId:p}),i(h).then(function(e){}).catch(function(e){})),tn=v+t}function ln(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function an(e,n,t){var o=ln(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),r=[];return o&&Array.isArray(o)&&(r=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),r}var sn=!1,un=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[r])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!sn){var i=cn(e,"videoAssets","secondaryVideoAssets"),s=l(i,n);return s&&a(n,s),sn=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function cn(e,n,t){if(Array.isArray(e))return e.map(function(e){return cn(e,n,t)});if(null!==e&&"object"===pe(e)){var o={};return Object.keys(e).forEach(function(r){r===n&&void 0!==e[t]?o[r]=e[t]:r===t&&void 0!==e[n]?o[r]=e[n]:o[r]=cn(e[r],n,t)}),o}return e}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 vn(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)?vn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}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 i,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,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function vn(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 fn(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(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?fn(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var mn=function(e,n,t,o){var i,l,a,v,f=o.res,p=o.sres,m=ie(e),y=(null==f?void 0:f.contentType)||"video",g=(null==f?void 0:f[y].drmEnabled)||!1,h=(null==f||null===(i=f[y])||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1,b=(null==f||null===(a=f[y])||void 0===a||null===(v=a.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1;s(f),m&&(m.on("loadstart",function(){h?t.resolve({status:!0,msg:"Video Loaded",response:f}):t.resolve(pn({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))}),m.on("loadeddata",function(){var t,o,i,l=ee(e);if(null==l||l.map(function(n){return ne(e,n.id)}),b&&"Safari"===ve())try{var a;null==m||null===(a=m.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&ke(e,sessionStorage.getItem("volume")||"100");var s=r();if(u(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.saveOffline)){var c,d,v=pn(pn({},n),f);!function(e,n,t){var o,r,i;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(on=null==n||null===(r=n.series)||void 0===r?void 0:r.id),nn=[],tn=0,ze=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=ie(e);a&&(a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());nn.includes(tn)||(e==tn?(nn.push(e),rn(a,n,l)):e>tn&&(tn=e+l))}}),a.one("ended",function(){rn(a,n,l,!0)}))}(e,v,null==s||null===(c=s.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.id)}if(null!=n&&null!==(i=n.analytics)&&void 0!==i&&i.muxKey&&null!=m&&m.mux){var p,y,g,h,w,k,S=(null===(p=r())||void 0===p?void 0:p.video)||(null==f?void 0:f.video),O=null==S?void 0:S.gist,T={env_key:null==n||null===(y=n.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(g=window)||void 0===g?void 0:g.vl_player_version,video_id:null==O?void 0:O.id,video_title:null==O?void 0:O.title,video_series:null==S||null===(h=S.series)||void 0===h?void 0:h.title,video_stream_type:null!=S&&null!==(w=S.streamingInfo)&&void 0!==w&&w.isLiveStream?"live":"video",viewer_user_id:null==n||null===(k=n.analytics)||void 0===k?void 0:k.userId};m.mux({debug:!1,data:T})}}),m.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];m.trigger("subtitlechanged",n)}),m.on("subtitlechanged",function(e,n){var t,o,r,i,l,a,s,u,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===f){var m,y=p.getMediaSession(),g=y.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),y.editTracksInfo(m)}}),m.tech_.on("retryplaylist",function(){h&&un(f,e)}),m.on("error",function(){var n,o;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&h)?un(f,e):(c(e,(null==m||null===(n=m.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==m||null===(o=m.error())||void 0===o?void 0:o.message)||"Some error occured",response:f}))}),m.one("play",function(){var e,t,o,i,l;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(o=t.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable){var a,s,u,c=null===(a=r())||void 0===a||null===(s=a.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.id,v=d(),f=(null==v?void 0:v.get(c))||{t:0,p:0},p=f.t,y=f.p;p&&y<95&&setTimeout(function(){m.currentTime(p)},0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==n?void 0:n.watchHistoryResumeTime)},0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),m.on("volumechange",function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),m.on("chromecastDisconnected",function(){if(h){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var e,n=(null==m||null===(e=m.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if("object"==pe(m.dash)){var t,o,r,i=null==m||null===(t=m.dash)||void 0===t||null===(o=t.mediaPlayer)||void 0===o?void 0:o.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=dn(n);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(l&&(null==s?void 0:s.id)=="dash-audio-".concat(l.index)){s.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var u,c=dn(n);try{for(c.s();!(u=c.n()).done;){var d,v,f,p=u.value;("Chrome"==ve()||"Edge"==ve()&&(null!==(d=navigator)&&void 0!==d&&null!==(v=d.userAgent)&&void 0!==v&&v.includes("Macintosh")||!g))&&null!=p&&null!==(f=p.label)&&void 0!==f&&f.includes("5.1")?m.audioTracks().removeTrack(p):"main"==p.kind?p.enabled=!0:p.enabled=!1}}catch(e){c.e(e)}finally{c.f()}}}))};function yn(e,n){var t,o,r,i=ie(e),l=null==i||null===(t=i.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,a=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var o,r,s,u,c,d,p,m,y;if(hn.enabled&&"input"!=t.target.localName){var g=t.key,h=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(g)&&(t.preventDefault(),null==a||a.focus()),g){case" ":null==l||l.click();break;case"m":case"M":i.muted(!i.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":h&&!1===n.liveui||f(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(s=r.app_data)||void 0===s||null===(u=s.appcmsMain)||void 0===u||null===(c=u.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)&&null!==(d=window)&&void 0!==d&&null!==(p=d.app_data)&&void 0!==p&&null!==(m=p.appcmsMain)&&void 0!==m&&null!==(y=m.adsConfig)&&void 0!==y&&y.vodAdClientSideTracking)return;h||v(e,10)}}},!0)}var gn,hn=(gn=!0,{enable:function(){gn=!0},disable:function(){gn=!1},get enabled(){return gn}}),bn="ssai-breakStart",wn="ssai-adImpression",kn="ssai-firstQuartile",Sn="ssai-midpoint",On="ssai-thirdQuartile",Tn="ssai-complete",jn="ssai-breakEnd",In={breakStart:bn,impression:wn,firstQuartile:kn,midpoint:Sn,thirdQuartile:On,complete:Tn,breakEnd:jn};function En(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=ie(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=In[o];r&&t.trigger(r,n)}function Pn(e){var n=ie(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(bn,e)},adImpression:function(e){return t(wn,e)},adFirstQuartile:function(e){return t(kn,e)},adMidpoint:function(e){return t(Sn,e)},adThirdQuartile:function(e){return t(On,e)},adComplete:function(e){return t(Tn,e)},adBreakEnd:function(e){return t(jn,e)}}}function Dn(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 An(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Dn(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Dn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function xn(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 Cn(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)?Cn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}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 i,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,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function Cn(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 Ln,Rn,Nn=(Ln="",{set:function(e){e&&(Ln=e)},get:function(){return Ln}}),Mn=(Rn=null,{set:function(e){Rn=e},get position(){return Rn}});function _n(e,n){return Vn.apply(this,arguments)}function Vn(){return(Vn=K(q.mark(function e(n,t){var o,r,i,a,s,u,c,d,v,f,m,y,g,h;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return ie(n),o=l(t,n),r=o.src,i=r.replace("/dash/","/session/").replace("master","session"),i=p(i,n,t),a=Bn(i),s=ye(a,2),u=s[0],c=s[1],i=new URL(i.split("?")[0]),Object.keys(c).length>0&&Object.entries(c).forEach(function(e){var n=ye(e,2),t=n[0],o=n[1];i.searchParams.set(t,o)}),e.prev=8,e.next=11,fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:An({},u)})});case 11:return d=e.sent,e.next=14,d.json();case 14:return v=e.sent,f="https://"+new URL(i).hostname,m=v.trackingUrl,y=v.manifestUrl,g=f+m,h=f+y,Nn.set(g),console.log("%c TRACKING URL","background: #bdf369; color: #000",g),o.src=h,e.abrupt("return",o);case 26:return e.prev=26,e.t0=e.catch(8),e.abrupt("return",o);case 29:case"end":return e.stop()}},e,null,[[8,26]])}))).apply(this,arguments)}function Bn(e){var n={},t=e.split("?")[1];if(!t)return[{},{}];var o,r=xn(t.split("&"));try{for(r.s();!(o=r.n()).done;){var i=o.value.split("="),l=ye(i,2),a=l[0],s=l[1];n[decodeURIComponent(a)]=decodeURIComponent(s||"")}}catch(e){r.e(e)}finally{r.f()}for(var u={},c={},d=0,v=Object.entries(n);d<v.length;d++){var f=ye(v[d],2),p=f[0],m=f[1];if(p.startsWith("ads."))u[p.replace(/^ads\./,"")]=m;else c[p]=m}return[u,c]}function Un(e,n){return Hn.apply(this,arguments)}function Hn(){return Hn=K(q.mark(function e(n,t){var o,r,i,l,a,s,u,c,d,f,p,m,y,g,h,b,w;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:w=function(e,t,o,r,i,l){var a=ie(n);if(!a.seeking()){t.startTimeInSeconds,t.durationInSeconds,Math.floor(a.currentTime());var s,u=xn(o);try{var c=function(){var o,u,c,d=s.value,v=d.eventType,f=d.beaconUrls,p=d.startTimeInSeconds,m=d.startTime,y=d.durationInSeconds,g=p||0,w=f,k=(null===(o=window)||void 0===o||null===(u=o.customData)||void 0===u||null===(c=u.ads)||void 0===c?void 0:c.adEventHandler)||null,S="".concat(g,"_").concat(v),O=h.get("pod-".concat(i))||[];if(e>=g&&!O.includes(S)){var T;O.push(S),h.set("pod-".concat(i),O);try{b(v,t,w,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,t)}if("breakEnd"==v){var j=Mn.position;Mn.set(null),setTimeout(function(){null!=j&&(a.currentTime(j),l())},500)}if("function"==typeof k&&null!=t&&null!==(T=t.ads)&&void 0!==T&&T[r])try{var I,E={eventType:v,startTimeInSeconds:p,startTime:m,durationInSeconds:y,ad:null==t||null===(I=t.ads)||void 0===I?void 0:I[r],adIndex:r};k({adsData:E}),En(n,E)}catch(e){console.error("Error when calling ads callback:",e)}}};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}},b=function(e,n,t,o){null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},g=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Mn.set(t),a=Nn.get(),(s=ie(n)).one("loadeddata",function(){a&&y(a)}),u=new Map,c=new Map,d=-1,f=(null===(o=document)||void 0===o||null===(r=o.getElementsByClassName("tvProviderImage"))||void 0===r?void 0:r[0])||null,p=(null==s||null===(i=s.controlBar)||void 0===i?void 0:i.getChild("videoSelector"))||null,m=(null==s||null===(l=s.controlBar)||void 0===l?void 0:l.getChild("seriesV2"))||null,y=function(){var e=K(q.mark(function e(o){var r,i,l,a,s,y,h,b,k,S,O,T,j,I,E,P,D;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return j=function(e){document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",j),0===e.button&&S()},T=function(e){},O=function(){var e,n=h.currentTime(),t=null,o=xn(y);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=(r.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,u.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){h.currentTime(t+2.2)},100))},S=function(){var e,n=h.currentTime(),t=null,o=xn(y);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=r.ads,s=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>s||n>i)&&!u.has(i)||n>=i&&n<=s)&&(t=i,u.set(i,!0),c.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){h.currentTime(t+.4)},100))},i=!1,e.next=7,fetch(o);case 7:return l=e.sent,e.next=10,l.json();case 10:a=e.sent,s=a.avails,y=[],h=ie(n),b=h.controlBar.progressControl,k=b.seekBar.el(),s.map(function(e,n){var t,o,r;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(i=!0),y.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:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(r=o.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===r?void 0:r[0])||[]})}),!i&&t&&(h.currentTime(t),O()),null!=y&&y.length&&(window.adsQueueList=y),y.forEach(function(e){var n,t,o=e.markerPositionInSeconds,r=e.ads,i=h.duration();if(!(o>i||Array.isArray(r)&&0==(null==r?void 0:r.length))){var l=o/i*100,a=document.createElement("div");a.className="vjs-seekbar-marker",a.style.left="".concat(l,"%"),a.style.position="absolute",a.style.top="0",a.style.bottom="0",a.style.width="2px",a.style.backgroundColor="#fecc09",a.style.left="".concat(l,"%"),a.style.pointerEvents="none",k.appendChild(a),null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableControls&&(k.style.display="none")}}),h.on("timeupdate",le(function(){var e=h.currentTime();if(e!==d){d=e;for(var n=!1,t=function(){var t=y[o],r=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=r+i;if(e>=r-1.2&&e<=a+1.2){e>=r&&!c.has(r)&&!h.seeking()&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&"Safari"==ve()&&0!=r&&(console.log("jfc"),h.currentTime(0),setTimeout(function(){h.currentTime(r+.4)},500),c.set(r,!0)),e>=r&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&u.set(r,!0),hn.disable(),f&&f.classList.add("vjs-hidden"),p&&(p.el().style.pointerEvents="none",p.el().classList.add("vjs-hidden")),m&&(m.el().style.pointerEvents="none",m.el().classList.add("vjs-hidden")),b.el().style.visibility="hidden";for(var s=e-r,d=0,v=0,k=0;k<l.length;k++){var S,T=null==l||null===(S=l[k])||void 0===S?void 0:S.durationInSeconds;if(s<d+T){v=k;break}d+=T}var j=l[v],E=s-d,P=Math.max(0,(null==j?void 0:j.durationInSeconds)-E),A=Math.round(P);I.style.display="block",D.textContent="".concat(v+1," of ").concat(l.length," • ").concat(g(A));var x=[];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)});x.push.apply(x,me(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&x.push(null==t?void 0:t.podSlotImpressionBeacon),w(e,t,x,v,o,O),"break"}c.delete(r)},o=0;o<y.length;o++){if("break"===t())break}n||(I.style.display="none",b.el().style.visibility="visible",p&&(p.el().style.pointerEvents="auto",p.el().classList.remove("vjs-hidden")),m&&(m.el().style.pointerEvents="auto",m.el().classList.remove("vjs-hidden")),f&&f.classList.remove("vjs-hidden"),hn.enable())}},1e3)),null===(r=document)||void 0===r||r.addEventListener("keydown",function(e){hn.enabled&&"ArrowRight"==e.key&&(S(),v(n,10),e.stopPropagation())}),b.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",j))}),(I=document.createElement("div")).className="ssai-ad-container",(E=document.createElement("div")).className="sponsored-adbox",(P=document.createElement("div")).className="sponsored-text",P.textContent="Sponsored Ad",E.append(P),(D=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",I.append(E),I.append(D),h.el().appendChild(I);case 39:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),h=new Map;case 16:case"end":return e.stop()}},e)})),Hn.apply(this,arguments)}function Fn(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 Qn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Fn(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Fn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Gn=function(e,n,t,o){var r,i,s,u,d,v,f,p,w,k,S,O,T,j,I,E,P,D,A,x,C,L,R,N,M,_,V,B,U,H=n.res,F=void 0===H?null:H,Q=n.sres,W=void 0===Q?null:Q,J=null!=t&&t.chromecastReceiverId?["chromecast","html5"]:["html5"],X=(null===(r=F)||void 0===r?void 0:r.contentType)||"video",Y=ae(null===(i=F)||void 0===i||null===(s=i[X])||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.videoImageUrl)||ae(null===(d=F)||void 0===d||null===(v=d[X])||void 0===v||null===(f=v.gist)||void 0===f||null===(p=f.imageGist)||void 0===p?void 0:p.r16x9),$=(null===(w=F)||void 0===w||null===(k=w[X])||void 0===k||null===(S=k.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,Z=(null===(O=F)||void 0===O||null===(T=O[X])||void 0===T||null===(j=T.streamingInfo)||void 0===j?void 0:j.isLiveStream)||!1,ee=m(F);F=Qn(Qn({},F),{},{audioAssetSource:null==t?void 0:t.audioAssetSource});var ne="MEDIA_TAILOR"==(null===(I=window)||void 0===I||null===(E=I.app_data)||void 0===E||null===(P=E.appcmsMain)||void 0===P||null===(D=P.adsConfig)||void 0===D?void 0:D.vodAdSticherProvider)||"MEDIA_TAILOR"==(null===(A=window)||void 0===A||null===(x=A.customData)||void 0===x||null===(C=x.ads)||void 0===C?void 0:C.vodAdSticherProvider)||!1,oe=(null==t?void 0:t.latency)||6,re=(B={enableSmoothSeeking:!0,controls:0!=(null==t?void 0:t.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==t?void 0:t.muted)||!1,autoplay:(null==t?void 0:t.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!1},muteToggle:"multiplayer"==t.skin,liveui:$},G(B,"autoplay",null==t?void 0:t.autoplay),G(B,"normalizeAutoplay",(null==t?void 0:t.autoplay)&&!ee),G(B,"loop",(null==t?void 0:t.loop)||!1),G(B,"audioPosterMode",null==t?void 0:t.audioPosterMode),G(B,"html5",Qn(Qn({dash:Qn(Qn(Qn({},!z.browser.IS_SAFARI&&{useTTML:!0}),(null==t?void 0:t.debugConfig)&&(null==t||null===(L=t.debugConfig)||void 0===L?void 0:L.enable)&&{debug:!0,logLevel:null!=t&&null!==(R=t.debugConfig)&&void 0!==R&&R.logLevel?null==t||null===(N=t.debugConfig)||void 0===N?void 0:N.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:oe},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Qn({},"IE"==ve()&&{enableStallFix:!0,stallSeek:1}),abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:Qn(Qn({liveRangeSafeTimeDelta:oe,useDevicePixelRatio:!0,experimentalLLHLS:(null==t?void 0:t.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==t||null===(M=t.customData)||void 0===M?void 0:M.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0}),debug:!0,nativeTextTracks:"Safari"==ve()},0==(null==t||null===(_=t.customData)||void 0===_?void 0:_.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==t||null===(V=t.customData)||void 0===V?void 0:V.nativeVideoTracks)&&{nativeVideoTracks:!1})),G(B,"poster",Y),G(B,"techOrder",J),G(B,"chromecast",{requestCustomDataFn:function(n){var t=ie(e),o=((null==t?void 0:t.textTracksJson_)||t.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return function(e,n,t){var o,r,i,l,a,s,u,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,y,g,h,b,w,k,S;p.isDrmEnabled=!0;var O=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,T=(null==O?void 0:O.url)||(null==n||null===(y=n.keySystemOptions)||void 0===y||null===(g=y[0])||void 0===g||null===(h=g.options)||void 0===h?void 0:h.serverURL);p.licenseUrl=T;var j=(null==O?void 0:O.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);p.licenseToken=j}var I=(null==e||null===(o=e[f])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType)||"VIDEO";p.contentType=I;var E=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=E;var P=null==e||null===(a=e[f])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=P;var D=null==e||null===(u=e[f])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=D,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(F,n,o)},modifyLoadRequestFn:function(n){var t,o,r,i,l,a=ie(e),s=(null==a?void 0:a.currentSource())||{};!(null===(t=F)||void 0===t||null===(o=t[X])||void 0===o||null===(r=o.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(l=s.src)&&void 0!==l&&l.includes(".m3u8")&&(n.media.hlsSegmentFormat="fmp4",n.media.hlsVideoSegmentFormat="fmp4");return n}}),B);if(!z.getPlayers()[e]){null!==(U=window)&&void 0!==U&&U.customData.isSmartTV&&(re.spatialNavigation={enabled:!0,horizontalSeek:!0}),z.log.level("debug");var le=z(e,re,function(){var n=K(q.mark(function n(){var r,i,s,u,d,v,f,p,m,w,k,S,O,T,j,I,E,P,D,A,x,C,L,R,N,M,_,V,B,U,H,Q,G,K,J,Y,oe;return q.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(le),console.log(z.VERSION),console.log(z.getPlugins()),n.next=5,Le(t,F);case 5:if(null!==(r=window)&&void 0!==r&&r.customData.isSmartTV&&le.spatialNavigation.start(),_=null===(i=F)||void 0===i||null===(s=i[X])||void 0===s||null===(u=s.liveDetails)||void 0===u?void 0:u.startOverTime,Z&&o.resolve(Qn({status:!0,msg:"Player Initialised"},W?{seriesResponse:W,response:F}:{response:F})),g(e,null==t?void 0:t.analyticsCb),Ye(e,t),/Android/i.test(navigator.userAgent)&&(z.options.vhs.overrideNative=!0),$&&Te(e,_),!ee||null!=t&&null!==(d=t.customData)&&void 0!==d&&d.disableAds||h(e,ee,F),V=l(F,e),console.log(V),null!=t&&t.nearestClusterUrl&&(V=b(V,t.nearestClusterUrl)),!ne){n.next=20;break}return n.next=19,_n(e,F);case 19:V=n.sent;case 20:V?a(e,V):(o.reject({status:!1,msg:"Incompatible / Missing Source",response:F}),c(e,"Incompatible / Missing Source")),((null===(v=F)||void 0===v||null===(f=v[X])||void 0===f||null===(p=f.contentDetails)||void 0===p||null===(m=p.closedCaptions)||void 0===m?void 0:m.length)>0||(null===(w=F)||void 0===w||null===(k=w[X])||void 0===k||null===(S=k.closedCaptions)||void 0===S?void 0:S.length)>0)&&(J=(null===(U=F)||void 0===U||null===(H=U[X])||void 0===H||null===(Q=H.contentDetails)||void 0===Q?void 0:Q.closedCaptions)||(null===(G=F)||void 0===G||null===(K=G[X])||void 0===K?void 0:K.closedCaptions),B=J.filter(function(e){return"VTT"===e.format}),te(e,B)),null!=t&&t.disableControls&&y(e),"MEDIA_TAILOR"==(null===(O=window)||void 0===O||null===(T=O.app_data)||void 0===T||null===(j=T.appcmsMain)||void 0===j||null===(I=j.adsConfig)||void 0===I?void 0:I.vodAdSticherProvider)&&null!==(E=window)&&void 0!==E&&null!==(P=E.app_data)&&void 0!==P&&null!==(D=P.appcmsMain)&&void 0!==D&&null!==(A=D.adsConfig)&&void 0!==A&&A.vodAdClientSideTracking||"MEDIA_TAILOR"==(null===(x=window)||void 0===x||null===(C=x.customData)||void 0===C||null===(L=C.ads)||void 0===L?void 0:L.vodAdSticherProvider)&&null!==(R=window)&&void 0!==R&&null!==(N=R.customData)&&void 0!==N&&null!==(M=N.ads)&&void 0!==M&&M.vodAdClientSideTracking?(t.customData.disableControls=!0,Y=l(null==re?void 0:re.res,e)||{},oe=Y.src,Un(e,oe)):$e(e,Qn(Qn(Qn({},t),re),{},{liveVideo:Z,isDvrEnabled:$,res:F,sres:W})),mn(e,Qn(Qn(Qn({},t),re),{},{liveVideo:Z}),o,{res:F,sres:W});case 25:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},Kn={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function qn(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 zn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qn(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Wn,Jn=function(e,n){var t=n.resolve,o=n.reject,r=null==e?void 0:e.playerId,i=Xn(e);Gn(r,{res:i},e,{resolve:t,reject:o})},Xn=function(e){var n,t,o=null==e?void 0:e.streamingInfo,r=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,i=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,l=null==e?void 0:e.token,a=w(l),s=null==a?void 0:a.site;return zn(zn({id:null==Kn?void 0:Kn[s]},!i&&{directPlaybackUrl:null==r?void 0:r.url}),{},{video:{drmEnabled:i,streamingInfo:{videoAssets:{widevine:null==r?void 0:r.widevine,fairPlay:null==r?void 0:r.fairPlay,playReady:null==r?void 0:r.playReady}},liveDetails:{isDvrEnabled:null==o?void 0:o.isDvrEnabled}}})};function Yn(e,n){return $n.apply(this,arguments)}function $n(){return($n=K(q.mark(function e(n,t){var o,r,i,l,a,u;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,i=null==n?void 0:n.videoId,l=null==n?void 0:n.playerId,a=!(null==n||!n.anonymousId),e.next=6,T();case 6:u=e.sent,k(i,u).then(function(e){var t,c,d,v;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(c=t.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.contentType,s(null==e?void 0:e.data);var f,p=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(v=n.watchHistory)&&void 0!==v&&v.enable&&!a)if((null===(f=n.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,y,g,h=an((null===(m=n.watchHistory)||void 0===m?void 0:m.profileId)||"",i,null==n?void 0:n.siteOwner);if(h&&h.length)n.watchHistoryResumeTime=(null===(y=h[0])||void 0===y?void 0:y.watchedTime)||null,n.watchedPercentage=(null===(g=h[0])||void 0===g?void 0:g.watchedPercentage)||null;p.contentType="video",Gn(l,{res:p},n,{resolve:o,reject:r})}else S(i,u).then(function(e){var t,o,r,i,l,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(r=window)||void 0===r||null===(i=r.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"}).catch(function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))}).finally(function(){Gn(l,{res:p},n,{resolve:o,reject:r})});else Gn(l,{res:p},n,{resolve:o,reject:r})}).catch(function(e){O(e,l,r,i)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Zn(e,n){return et.apply(this,arguments)}function et(){return(et=K(q.mark(function e(n,t){var o,r,i,l,a;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,e.next=3,T();case 3:i=e.sent,l=null==n?void 0:n.playerId,a=null==n?void 0:n.epg,j(a,i).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==a?void 0:a.channelId,Gn(l,{res:t},n,{resolve:o,reject:r})}).catch(function(e){O(e,l,r,videoId)});case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function nt(e,n){return tt.apply(this,arguments)}function tt(){return(tt=K(q.mark(function e(n,t){var o,r,i,l,a,u,c;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.resolve,i=t.reject,e.next=3,T();case 3:l=e.sent,a=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,P.set(parseInt(u)),c=null==n||null===(o=n.series)||void 0===o?void 0:o.id,I(c,l).then(function(e){var t,o,u,d=e.data,v=e.data.seasons;D(v);var f=videoId||(null==v||null===(t=v[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(u=o[0])||void 0===u?void 0:u.id);E(c,l),k(f,l).then(function(e){var t,o,l;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,s(e.data),Gn(a,{res:null==e?void 0:e.data,sres:d},n,{resolve:r,reject:i})}).catch(function(e){O(e,a,i,videoId)})}).catch(function(e){O(e,a,i)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ot(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 rt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ot(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ot(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function it(){return{loadVideoInstantly:A,onTimeUpdate:W,getVideoDuration:J,getVideoCurrentTime:X,onVideoEnded:Y,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=K(q.mark(function n(t,o){var r,i,l,a,s,u,c,d,v,f,p,m,y,g,h,b,w,S,T,j,I,E,P;return q.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!R(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(p=(null==e?void 0:e.videoSourceUrl)||!1,m=null==e?void 0:e.asat,y=(null==e||null===(r=e.epg)||void 0===r?void 0:r.enable)||!1,g=null==e?void 0:e.videoId,h=(null==e||null===(i=e.series)||void 0===i?void 0:i.enable)||!1,b=(null==e?void 0:e.streamingInfo)||!1,window.videoId=g,w=null==e?void 0:e.token,!U(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",w),H().set(null==e?void 0:e.refreshToken),w&&!F(w)){n.next=16;break}return o({status:!1,msg:"".concat(w?"Token is expired !":"Missing Authorization Token"),response:{token:w}}),n.abrupt("return");case 16:Wn=JSON.parse(atob(w.split(".")[1]));case 17:return e.isAnonymousUser=!(null===(l=Wn)||void 0===l||!l.anonymousId),e.siteOwner=(null===(a=Wn)||void 0===a?void 0:a.site)||null,e.userId=(null===(s=Wn)||void 0===s?void 0:s.userId)||null,window.sessionStorage.setItem("uid",null===(u=Wn)||void 0===u?void 0:u.userId),window.watchHistory=e.watchHistory||null,S=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(c=e.series)&&void 0!==c&&c.enable?null:null==e?void 0:e.chromecastReceiverId,T=(null==e||null===(d=e.analytics)||void 0===d?void 0:d.gaId)||null,(j=null==e?void 0:e.errors)&&(window.customErrors=j),window.customData=null==e?void 0:e.customData,fe(null==e||null===(v=e.customData)||void 0===v?void 0:v.localisation),B.set(e.apiBaseUrl),null!=e&&e.skin&&!se(e.skin)||(e.skin="VL_ONE"),n.next=33,xe(e);case 33:T&&ge("https://www.googletagmanager.com/gtag/js?id=".concat(T)).then(function(){return Q(T)}).catch(function(e){}),(I=null===(f=document)||void 0===f?void 0:f.getElementById("".concat(S)))&&I.addEventListener("contextmenu",function(e){return e.preventDefault()}),p?(P={directPlaybackUrl:p,id:E="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},m?k(E,w).then(function(n){var r=(null==n?void 0:n.data)||{};Gn(S,{res:rt(rt({},r),P)},e,{resolve:t,reject:o})}).catch(function(e){O(e,S,o,E)}):Gn(S,{res:P},e,{resolve:t,reject:o})):b?Jn(e,{resolve:t,reject:o}):h?nt(e,{resolve:t,reject:o}):y?Zn(e,{resolve:t,reject:o}):Yn(e,{resolve:t,reject:o});case 37:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:ue,getSelectedRendition:ce,skip:v,getPlayer:ie,play:x,pause:C,isPaused:L,detectBrowser:ve,rewind:f,loadVideo:a,seekToTimeStamp:$,isPlayerInitialised:R,load:N,authenticateLC:M,dispose:_,enableCaptions:oe,disableCaptions:ne,getCaptions:ee,getAudioTracks:be,enableAudioTrack:we,playSelectedResolution:de,getSource:l,setVolume:ke,getVolume:Se,disableControls:y,setPlaybackSpeed:Z,getEntitlementData:V,getSsaiEvents:Pn,getPlayerVersion:function(){console.log("version: ".concat(window.vl_player_version))},getTextTracksWithCuesDetails:re}}export{it as V,yn as i,Un as s};
|
|
1
|
+
import"video.js/dist/video-js.min.css";import{g as e,a as n,b as t,c as o,d as r,s as i,e as l,l as a,f as s,h as u,i as c,j as d,k as v,r as f,m as p,n as m,o as y,p as g,q as h,t as b,u as w,v as k,w as S,x as O,y as T,z as j,A as I,B as E,C as P,D,E as A,F as x,G as C,H as L,I as R,J as N,K as M,L as _,M as V,N as B,O as U,P as H,Q as F,R as Q}from"./generic-1c16ee3a.js";import G from"@babel/runtime/helpers/defineProperty";import K from"@babel/runtime/helpers/asyncToGenerator";import q from"@babel/runtime/regenerator";import z from"video.js";import{o as W,g as J,a as X,b as Y,s as $,c as Z}from"./util-42912ffd.js";import{g as ee,d as ne,a as te,e as oe,b as re}from"./captions-0280b028.js";import{g as ie,t as le,i as ae,a as se}from"./skin-86e7e2b5.js";import{g as ue,a as ce}from"./renditions-7c478ac1.js";import{playSelectedResolution as de}from"./resolution-69172876.js";import{d as ve}from"./browser-512cd55a.js";import{s as fe}from"./localisation-0bf399a1.js";import pe from"@babel/runtime/helpers/typeof";import me from"@babel/runtime/helpers/toConsumableArray";import ye from"@babel/runtime/helpers/slicedToArray";var ge=function(e){return new Promise(function(n,t){if(he(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}})},he=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},be=function(e){var n,t=ie(e);return(null==t||null===(n=t.audioTracks())||void 0===n?void 0:n.tracks_)||[]||[]},we=function(e,n){for(var t=ie(e).audioTracks().tracks_||[],o=0;o<t.length;o++){var r=t[o];r.id==n?r.enabled=!0:r.enabled=!1}},ke=function(e,n,t){var o=ie(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var r=parseFloat(n)/100;o.volume(r),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},Se=function(e){var n=ie(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},Oe=function(){var e=K(q.mark(function e(n){var t,o,r,i,l;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=ie(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return i=e.sent,e.prev=5,e.next=8,ge("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,i.default(z),e.finish(13);case 16:(l=z.getTech("chromecast"))&&!l.prototype.seeking&&(l.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==ve()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),Te=function(e,n){var t=ie(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,r,i,l,a=this.el(),s=z.dom.getPointerPosition(a,n).x;z.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var d=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=d.h.media[0].liveSeekableRange.end;d.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,d.seek()}})};var je=function(){var e=K(q.mark(function e(){return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),ge("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then(function(){}).catch(function(e){return console.log(e)})]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Ie=function(){var e=K(q.mark(function e(){return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){z.getPlugin("eme")||z.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Ee=function(){var e=K(q.mark(function e(){var n;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(z),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),Pe=function(){var e=K(q.mark(function e(){return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-5d92eaa3.js");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),De=function(){var e=K(q.mark(function e(){return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-6c1ba1fe.js");case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),Ae=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){ge("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(z)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(z)})},loadAdsLibrary:je,loadEMELibrary:Ie,loadMuxPlugin:Ee,loadDvrSeekbar:Pe,loadContribDash:De});function xe(e){return Ce.apply(this,arguments)}function Ce(){return(Ce=K(q.mark(function e(n){var t;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,je();case 3:t&&"Safari"==ve()&&Promise.resolve().then(function(){return Ae}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Le(e,n){return Re.apply(this,arguments)}function Re(){return(Re=K(q.mark(function e(n,t){var o,r,i,l,a,s,u,c,d,v;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u=(null==t?void 0:t.contentType)||"video",c=null==t||null===(o=t[u])||void 0===o?void 0:o.drmEnabled,null==t||null===(r=t[u])||void 0===r||null===(i=r.liveDetails)||void 0===i||i.isDvrEnabled,null==n||n.showPositiveSeekbar,d=(null==t||null===(l=t[u])||void 0===l||null===(a=l.streamingInfo)||void 0===a||null===(s=a.videoAssets)||void 0===s?void 0:s.dash)||null,e.prev=5,e.next=8,Promise.allSettled([c?"Safari"==ve()?Ie():"caliente"!=(null===(v=window)||void 0===v?void 0:v.siteName)?De():Ie():"Safari"!=ve()&&d?De():null,Oe(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function Ne(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 Me(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ne(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ne(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var _e=new Set,Ve=null,Be=function(n,o,r){var i,l,a,s,u,c,d,v={},f=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(i=n[f])||void 0===i?void 0:i.id)||"Null",v["c3.cm.contentType"]=qe(n),v[null==r||null===(l=r.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==n||!n.linearchannel),v[null==r||null===(a=r.Constants)||void 0===a?void 0:a.STREAM_URL]=o.currentSrc(),v[null==r||null===(s=r.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===e()?"NULL":e(),v["c3.cm.categoryType"]=Qe(n),v["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),v.DRMEnabled=(null===(u=n[f])||void 0===u?void 0:u.drmEnabled)||"None",v.DAIStream=null!==(c=n[f])&&void 0!==c&&null!==(d=c.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",v[r.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=Ge(n),v["c3.cm.genreList"]=He(n),v["c3.cm.genre"]=Ue(n),v["c3.cm.channel"]=Fe(n);var p=We(t(),n);return v=Me(Me({},v),p)},Ue=function(e){var n,t,o,r=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[r])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},He=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},Fe=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null==e||null===(n=e[o])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},Qe=function(e){return(null==e?void 0:e.contentType)||"null"},Ge=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return r?"YES":"NO"},Ke=function(e,n){var t,o,r=(n||{}).epg;if(r&&null!=r&&r.enable&&null!=r&&r.programTitle)return r.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(l)},qe=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var ze,We=function(e,t){var r,i,l,a,s,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!t||null!=t&&t.linearchannel)return u;var c=o(),d=n();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(i=r.series)||void 0===i?void 0:i.title)||"Null",u["c3.cm.seasonNumber"]=(null==c?void 0:c.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(l=e[c-1])||void 0===l||null===(a=l.episodes)||void 0===a||null===(s=a[d-1])||void 0===s?void 0:s.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},Je=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},Xe=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},Ye=function(){var e=K(q.mark(function e(n,t){var o,i,l,a,s,u,c,d,v,f;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==t?void 0:t.convivaConfig)||{},i=o.trackConvivaPlayerEvent,l=o.paymentHandler,a=o.tveProvider,s=o.enable,u=o.appName,c=(t||{}).token,s){e.next=4;break}return e.abrupt("return");case 4:if(d=ie(n),"function"==typeof(v=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,v("getConvivaObject");case 10:if(f=e.sent){e.next=13;break}return e.abrupt("return");case 13:d.ready(function(){var e=d.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=Je(t.keySystem);v("contentInfo",{DRMEnabled:o})}else v("contentInfo",{DRMEnabled:"None"})}),n||v("contentInfo",{DRMEnabled:"None"})}),d.on("loadstart",function(){var e,n;Ve&&Ve!==d.currentSrc()&&v("playbackEnded"),v("setPlayer",d),_e.clear(),Ve=d.currentSrc();var o=Xe(d.currentType()),i=r(),s=Be(i,d,f);s[null==f||null===(e=f.Constants)||void 0===e?void 0:e.PLAYER_NAME]=u||"WEB",s[null==f||null===(n=f.Constants)||void 0===n?void 0:n.ASSET_NAME]=Ke(i,t),s.authToken=c||"NULL",s.streamType=o,s.D2CType=l||"NONE",s.subscriberType=a||(l?"D2C":"FREE"),s["c3.cm.affiliate"]=a||"NULL",v("contentInfo",s)}),d.on("loadedmetadata",function(){var e,n=d.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),v("contentInfo",{screenResolution:e})}),d.on("play",function(){_e.has(d.currentSrc())||(_e.add(d.currentSrc()),v("playbackStarted",null))}),d.on("ended",function(){_e.has(d.currentSrc())&&_e.delete(d.currentSrc()),v("playbackEnded")}),d.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&v("initAdSensor",{player:d,adsLoader:null==e?void 0:e.adsLoader})}),d.on("dispose",function(){null==_e||_e.clear(),v("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),$e=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-81946b34.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-b7aed99b.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-cbbd86da.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-23dd7694.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-cc77e897.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?import("./skin-97abe496.js").then(function(t){t.initialiseSkin(e,n)}):"VL_SmartTV"==t&&import("./skin-2d508a29.js").then(function(t){t.initialiseSkin(e,n)})};function Ze(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 en(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ze(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ze(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var nn=[],tn=0,on=null;function rn(e,n,t){var o,l,a,s,u,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(o=n.watchHistory)||void 0===o||o.apiVersion;var d=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(e.currentTime()),f=Math.floor(e.duration());null==n||null===(a=n.watchHistory)||void 0===a||a.xapiKey;var p=(null==n||null===(s=n.video)||void 0===s?void 0:s.originalObjectId)||null,m=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,y=Math.floor(e.currentTime()),g=c?100:Math.floor(v/f*100),h={};m?function(e,n,t){var o=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),i=ln(o),l=(new Date).getTime(),a=r(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return en(en({},e),{},G({},n,s[n]))},{}),c=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===ze});c<0?i.push(en(en({content:u},e),{},{addedDate:l,updateDate:l})):i[c]=en(en(en({},i[c]),e),{},{updateDate:l});localStorage.setItem("".concat(o),JSON.stringify(i))}(h={completed:c,watchedTime:y,watchedPercentage:g},d,n.siteOwner):(h=en(en({videoId:ze,watchedTime:y,watchedPercentage:g,doneWatching:c,profileId:d},on&&{seriesId:on}),p&&{originalObjectId:p}),i(h).then(function(e){}).catch(function(e){})),tn=v+t}function ln(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function an(e,n,t){var o=ln(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),r=[];return o&&Array.isArray(o)&&(r=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),r}var sn=!1,un=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[r])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!sn){var i=cn(e,"videoAssets","secondaryVideoAssets"),s=l(i,n);return s&&a(n,s),sn=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function cn(e,n,t){if(Array.isArray(e))return e.map(function(e){return cn(e,n,t)});if(null!==e&&"object"===pe(e)){var o={};return Object.keys(e).forEach(function(r){r===n&&void 0!==e[t]?o[r]=e[t]:r===t&&void 0!==e[n]?o[r]=e[n]:o[r]=cn(e[r],n,t)}),o}return e}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 vn(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)?vn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}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 i,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,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function vn(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 fn(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(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?fn(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var mn=function(e,n,t,o){var i,l,a,v,f=o.res,p=o.sres,m=ie(e),y=(null==f?void 0:f.contentType)||"video",g=(null==f?void 0:f[y].drmEnabled)||!1,h=(null==f||null===(i=f[y])||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1,b=(null==f||null===(a=f[y])||void 0===a||null===(v=a.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1;s(f),m&&(m.on("loadstart",function(){h?t.resolve({status:!0,msg:"Video Loaded",response:f}):t.resolve(pn({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))}),m.on("loadeddata",function(){var t,o,i,l=ee(e);if(null==l||l.map(function(n){return ne(e,n.id)}),b&&"Safari"===ve())try{var a;null==m||null===(a=m.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&ke(e,sessionStorage.getItem("volume")||"100");var s=r();if(u(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.saveOffline)){var c,d,v=pn(pn({},n),f);!function(e,n,t){var o,r,i;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(on=null==n||null===(r=n.series)||void 0===r?void 0:r.id),nn=[],tn=0,ze=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=ie(e);a&&(a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());nn.includes(tn)||(e==tn?(nn.push(e),rn(a,n,l)):e>tn&&(tn=e+l))}}),a.one("ended",function(){rn(a,n,l,!0)}))}(e,v,null==s||null===(c=s.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.id)}if(null!=n&&null!==(i=n.analytics)&&void 0!==i&&i.muxKey&&null!=m&&m.mux){var p,y,g,h,w,k,S=(null===(p=r())||void 0===p?void 0:p.video)||(null==f?void 0:f.video),O=null==S?void 0:S.gist,T={env_key:null==n||null===(y=n.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(g=window)||void 0===g?void 0:g.vl_player_version,video_id:null==O?void 0:O.id,video_title:null==O?void 0:O.title,video_series:null==S||null===(h=S.series)||void 0===h?void 0:h.title,video_stream_type:null!=S&&null!==(w=S.streamingInfo)&&void 0!==w&&w.isLiveStream?"live":"video",viewer_user_id:null==n||null===(k=n.analytics)||void 0===k?void 0:k.userId};m.mux({debug:!1,data:T})}}),m.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];m.trigger("subtitlechanged",n)}),m.on("subtitlechanged",function(e,n){var t,o,r,i,l,a,s,u,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===f){var m,y=p.getMediaSession(),g=y.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),y.editTracksInfo(m)}}),m.tech_.on("retryplaylist",function(){h&&un(f,e)}),m.on("error",function(){var n,o;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&h)?un(f,e):(c(e,(null==m||null===(n=m.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==m||null===(o=m.error())||void 0===o?void 0:o.message)||"Some error occured",response:f}))}),m.one("play",function(){var e,t,o,i,l;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(o=t.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable){var a,s,u,c=null===(a=r())||void 0===a||null===(s=a.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.id,v=d(),f=(null==v?void 0:v.get(c))||{t:0,p:0},p=f.t,y=f.p;p&&y<95&&setTimeout(function(){m.currentTime(p)},0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==n?void 0:n.watchHistoryResumeTime)},0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),m.on("volumechange",function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),m.on("chromecastDisconnected",function(){if(h){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var e,n=(null==m||null===(e=m.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if("object"==pe(m.dash)){var t,o,r,i=null==m||null===(t=m.dash)||void 0===t||null===(o=t.mediaPlayer)||void 0===o?void 0:o.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=dn(n);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(l&&(null==s?void 0:s.id)=="dash-audio-".concat(l.index)){s.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var u,c=dn(n);try{for(c.s();!(u=c.n()).done;){var d,v,f,p=u.value;("Chrome"==ve()||"Edge"==ve()&&(null!==(d=navigator)&&void 0!==d&&null!==(v=d.userAgent)&&void 0!==v&&v.includes("Macintosh")||!g))&&null!=p&&null!==(f=p.label)&&void 0!==f&&f.includes("5.1")?m.audioTracks().removeTrack(p):"main"==p.kind?p.enabled=!0:p.enabled=!1}}catch(e){c.e(e)}finally{c.f()}}}))};function yn(e,n){var t,o,r,i=ie(e),l=null==i||null===(t=i.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,a=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var o,r,s,u,c,d,p,m,y;if(hn.enabled&&"input"!=t.target.localName){var g=t.key,h=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(g)&&(t.preventDefault(),null==a||a.focus()),g){case" ":null==l||l.click();break;case"m":case"M":i.muted(!i.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":h&&!1===n.liveui||f(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(s=r.app_data)||void 0===s||null===(u=s.appcmsMain)||void 0===u||null===(c=u.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)&&null!==(d=window)&&void 0!==d&&null!==(p=d.app_data)&&void 0!==p&&null!==(m=p.appcmsMain)&&void 0!==m&&null!==(y=m.adsConfig)&&void 0!==y&&y.vodAdClientSideTracking)return;h||v(e,10)}}},!0)}var gn,hn=(gn=!0,{enable:function(){gn=!0},disable:function(){gn=!1},get enabled(){return gn}}),bn="ssai-breakStart",wn="ssai-adImpression",kn="ssai-firstQuartile",Sn="ssai-midpoint",On="ssai-thirdQuartile",Tn="ssai-complete",jn="ssai-breakEnd",In={breakStart:bn,impression:wn,firstQuartile:kn,midpoint:Sn,thirdQuartile:On,complete:Tn,breakEnd:jn};function En(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=ie(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=In[o];r&&t.trigger(r,n)}function Pn(e){var n=ie(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(bn,e)},adImpression:function(e){return t(wn,e)},adFirstQuartile:function(e){return t(kn,e)},adMidpoint:function(e){return t(Sn,e)},adThirdQuartile:function(e){return t(On,e)},adComplete:function(e){return t(Tn,e)},adBreakEnd:function(e){return t(jn,e)}}}function Dn(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 An(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Dn(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Dn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function xn(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 Cn(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)?Cn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}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 i,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,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function Cn(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 Ln,Rn,Nn=(Ln="",{set:function(e){e&&(Ln=e)},get:function(){return Ln}}),Mn=(Rn=null,{set:function(e){Rn=e},get position(){return Rn}});function _n(e,n){return Vn.apply(this,arguments)}function Vn(){return(Vn=K(q.mark(function e(n,t){var o,r,i,a,s,u,c,d,v,f,m,y,g,h;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return ie(n),o=l(t,n),r=o.src,i=r.replace("/dash/","/session/").replace("master","session"),i=p(i,n,t),a=Bn(i),s=ye(a,2),u=s[0],c=s[1],i=new URL(i.split("?")[0]),Object.keys(c).length>0&&Object.entries(c).forEach(function(e){var n=ye(e,2),t=n[0],o=n[1];i.searchParams.set(t,o)}),e.prev=8,e.next=11,fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:An({},u)})});case 11:return d=e.sent,e.next=14,d.json();case 14:return v=e.sent,f="https://"+new URL(i).hostname,m=v.trackingUrl,y=v.manifestUrl,g=f+m,h=f+y,Nn.set(g),console.log("%c TRACKING URL","background: #bdf369; color: #000",g),o.src=h,e.abrupt("return",o);case 26:return e.prev=26,e.t0=e.catch(8),e.abrupt("return",o);case 29:case"end":return e.stop()}},e,null,[[8,26]])}))).apply(this,arguments)}function Bn(e){var n={},t=e.split("?")[1];if(!t)return[{},{}];var o,r=xn(t.split("&"));try{for(r.s();!(o=r.n()).done;){var i=o.value.split("="),l=ye(i,2),a=l[0],s=l[1];n[decodeURIComponent(a)]=decodeURIComponent(s||"")}}catch(e){r.e(e)}finally{r.f()}for(var u={},c={},d=0,v=Object.entries(n);d<v.length;d++){var f=ye(v[d],2),p=f[0],m=f[1];if(p.startsWith("ads."))u[p.replace(/^ads\./,"")]=m;else c[p]=m}return[u,c]}function Un(e,n){return Hn.apply(this,arguments)}function Hn(){return Hn=K(q.mark(function e(n,t){var o,r,i,l,a,s,u,c,d,f,p,m,y,g,h,b,w;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:w=function(e,t,o,r,i,l){var a=ie(n);if(!a.seeking()){t.startTimeInSeconds,t.durationInSeconds,Math.floor(a.currentTime());var s,u=xn(o);try{var c=function(){var o,u,c,d=s.value,v=d.eventType,f=d.beaconUrls,p=d.startTimeInSeconds,m=d.startTime,y=d.durationInSeconds,g=p||0,w=f,k=(null===(o=window)||void 0===o||null===(u=o.customData)||void 0===u||null===(c=u.ads)||void 0===c?void 0:c.adEventHandler)||null,S="".concat(g,"_").concat(v),O=h.get("pod-".concat(i))||[];if(e>=g&&!O.includes(S)){var T;O.push(S),h.set("pod-".concat(i),O);try{b(v,t,w,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,t)}if("breakEnd"==v){var j=Mn.position;Mn.set(null),setTimeout(function(){null!=j&&(a.currentTime(j),l())},500)}if("function"==typeof k&&null!=t&&null!==(T=t.ads)&&void 0!==T&&T[r])try{var I,E={eventType:v,startTimeInSeconds:p,startTime:m,durationInSeconds:y,ad:null==t||null===(I=t.ads)||void 0===I?void 0:I[r],adIndex:r};k({adsData:E}),En(n,E)}catch(e){console.error("Error when calling ads callback:",e)}}};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}},b=function(e,n,t,o){null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},g=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Mn.set(t),a=Nn.get(),(s=ie(n)).one("loadeddata",function(){a&&y(a)}),u=new Map,c=new Map,d=-1,f=(null===(o=document)||void 0===o||null===(r=o.getElementsByClassName("tvProviderImage"))||void 0===r?void 0:r[0])||null,p=(null==s||null===(i=s.controlBar)||void 0===i?void 0:i.getChild("videoSelector"))||null,m=(null==s||null===(l=s.controlBar)||void 0===l?void 0:l.getChild("seriesV2"))||null,y=function(){var e=K(q.mark(function e(o){var r,i,l,a,s,y,h,b,k,S,O,T,j,I,E,P,D;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return j=function(e){document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",j),0===e.button&&S()},T=function(e){},O=function(){var e,n=h.currentTime(),t=null,o=xn(y);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=(r.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,u.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){h.currentTime(t+2.2)},100))},S=function(){var e,n=h.currentTime(),t=null,o=xn(y);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=r.ads,s=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>s||n>i)&&!u.has(i)||n>=i&&n<=s)&&(t=i,u.set(i,!0),c.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){h.currentTime(t+.4)},100))},i=!1,e.next=7,fetch(o);case 7:return l=e.sent,e.next=10,l.json();case 10:a=e.sent,s=a.avails,y=[],h=ie(n),b=h.controlBar.progressControl,k=b.seekBar.el(),s.map(function(e,n){var t,o,r;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(i=!0),y.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:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(r=o.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===r?void 0:r[0])||[]})}),!i&&t&&(h.currentTime(t),O()),null!=y&&y.length&&(window.adsQueueList=y),y.forEach(function(e){var n,t,o=e.markerPositionInSeconds,r=e.ads,i=h.duration();if(!(o>i||Array.isArray(r)&&0==(null==r?void 0:r.length))){var l=o/i*100,a=document.createElement("div");a.className="vjs-seekbar-marker",a.style.left="".concat(l,"%"),a.style.position="absolute",a.style.top="0",a.style.bottom="0",a.style.width="2px",a.style.backgroundColor="#fecc09",a.style.left="".concat(l,"%"),a.style.pointerEvents="none",k.appendChild(a),null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableControls&&(k.style.display="none")}}),h.on("timeupdate",le(function(){var e=h.currentTime();if(e!==d){d=e;for(var n=!1,t=function(){var t=y[o],r=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=r+i;if(e>=r-1.2&&e<=a+1.2){e>=r&&!c.has(r)&&!h.seeking()&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&"Safari"==ve()&&0!=r&&(console.log("jfc"),h.currentTime(0),setTimeout(function(){h.currentTime(r+.4)},500),c.set(r,!0)),e>=r&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&u.set(r,!0),hn.disable(),f&&f.classList.add("vjs-hidden"),p&&(p.el().style.pointerEvents="none",p.el().classList.add("vjs-hidden")),m&&(m.el().style.pointerEvents="none",m.el().classList.add("vjs-hidden")),b.el().style.visibility="hidden";for(var s=e-r,d=0,v=0,k=0;k<l.length;k++){var S,T=null==l||null===(S=l[k])||void 0===S?void 0:S.durationInSeconds;if(s<d+T){v=k;break}d+=T}var j=l[v],E=s-d,P=Math.max(0,(null==j?void 0:j.durationInSeconds)-E),A=Math.round(P);I.style.display="block",D.textContent="".concat(v+1," of ").concat(l.length," • ").concat(g(A));var x=[];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)});x.push.apply(x,me(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&x.push(null==t?void 0:t.podSlotImpressionBeacon),w(e,t,x,v,o,O),"break"}c.delete(r)},o=0;o<y.length;o++){if("break"===t())break}n||(I.style.display="none",b.el().style.visibility="visible",p&&(p.el().style.pointerEvents="auto",p.el().classList.remove("vjs-hidden")),m&&(m.el().style.pointerEvents="auto",m.el().classList.remove("vjs-hidden")),f&&f.classList.remove("vjs-hidden"),hn.enable())}},1e3)),null===(r=document)||void 0===r||r.addEventListener("keydown",function(e){hn.enabled&&"ArrowRight"==e.key&&(S(),v(n,10),e.stopPropagation())}),b.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",j))}),(I=document.createElement("div")).className="ssai-ad-container",(E=document.createElement("div")).className="sponsored-adbox",(P=document.createElement("div")).className="sponsored-text",P.textContent="Sponsored Ad",E.append(P),(D=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",I.append(E),I.append(D),h.el().appendChild(I);case 39:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),h=new Map;case 16:case"end":return e.stop()}},e)})),Hn.apply(this,arguments)}function Fn(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 Qn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Fn(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Fn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Gn=function(e,n,t,o){var r,i,s,u,d,v,f,p,w,k,S,O,T,j,I,E,P,D,A,x,C,L,R,N,M,_,V,B,U,H=n.res,F=void 0===H?null:H,Q=n.sres,W=void 0===Q?null:Q,J=null!=t&&t.chromecastReceiverId?["chromecast","html5"]:["html5"],X=(null===(r=F)||void 0===r?void 0:r.contentType)||"video",Y=ae(null===(i=F)||void 0===i||null===(s=i[X])||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.videoImageUrl)||ae(null===(d=F)||void 0===d||null===(v=d[X])||void 0===v||null===(f=v.gist)||void 0===f||null===(p=f.imageGist)||void 0===p?void 0:p.r16x9),$=(null===(w=F)||void 0===w||null===(k=w[X])||void 0===k||null===(S=k.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,Z=(null===(O=F)||void 0===O||null===(T=O[X])||void 0===T||null===(j=T.streamingInfo)||void 0===j?void 0:j.isLiveStream)||!1,ee=m(F);F=Qn(Qn({},F),{},{audioAssetSource:null==t?void 0:t.audioAssetSource});var ne="MEDIA_TAILOR"==(null===(I=window)||void 0===I||null===(E=I.app_data)||void 0===E||null===(P=E.appcmsMain)||void 0===P||null===(D=P.adsConfig)||void 0===D?void 0:D.vodAdSticherProvider)||"MEDIA_TAILOR"==(null===(A=window)||void 0===A||null===(x=A.customData)||void 0===x||null===(C=x.ads)||void 0===C?void 0:C.vodAdSticherProvider)||!1,oe=(null==t?void 0:t.latency)||6,re=(B={enableSmoothSeeking:!0,controls:0!=(null==t?void 0:t.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==t?void 0:t.muted)||!1,autoplay:(null==t?void 0:t.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!1},muteToggle:"multiplayer"==t.skin,liveui:$},G(B,"autoplay",null==t?void 0:t.autoplay),G(B,"normalizeAutoplay",(null==t?void 0:t.autoplay)&&!ee),G(B,"loop",(null==t?void 0:t.loop)||!1),G(B,"audioPosterMode",null==t?void 0:t.audioPosterMode),G(B,"html5",Qn(Qn({dash:Qn(Qn(Qn({},!z.browser.IS_SAFARI&&{useTTML:!0}),(null==t?void 0:t.debugConfig)&&(null==t||null===(L=t.debugConfig)||void 0===L?void 0:L.enable)&&{debug:!0,logLevel:null!=t&&null!==(R=t.debugConfig)&&void 0!==R&&R.logLevel?null==t||null===(N=t.debugConfig)||void 0===N?void 0:N.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:oe},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Qn({},"IE"==ve()&&{enableStallFix:!0,stallSeek:1}),abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:Qn(Qn({liveRangeSafeTimeDelta:oe,useDevicePixelRatio:!0,experimentalLLHLS:(null==t?void 0:t.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==t||null===(M=t.customData)||void 0===M?void 0:M.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0}),nativeTextTracks:"Safari"==ve()},0==(null==t||null===(_=t.customData)||void 0===_?void 0:_.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==t||null===(V=t.customData)||void 0===V?void 0:V.nativeVideoTracks)&&{nativeVideoTracks:!1})),G(B,"poster",Y),G(B,"techOrder",J),G(B,"chromecast",{requestCustomDataFn:function(n){var t=ie(e),o=((null==t?void 0:t.textTracksJson_)||t.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return function(e,n,t){var o,r,i,l,a,s,u,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,y,g,h,b,w,k,S;p.isDrmEnabled=!0;var O=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,T=(null==O?void 0:O.url)||(null==n||null===(y=n.keySystemOptions)||void 0===y||null===(g=y[0])||void 0===g||null===(h=g.options)||void 0===h?void 0:h.serverURL);p.licenseUrl=T;var j=(null==O?void 0:O.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);p.licenseToken=j}var I=(null==e||null===(o=e[f])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType)||"VIDEO";p.contentType=I;var E=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=E;var P=null==e||null===(a=e[f])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=P;var D=null==e||null===(u=e[f])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=D,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(F,n,o)},modifyLoadRequestFn:function(n){var t,o,r,i,l,a=ie(e),s=(null==a?void 0:a.currentSource())||{};!(null===(t=F)||void 0===t||null===(o=t[X])||void 0===o||null===(r=o.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(l=s.src)&&void 0!==l&&l.includes(".m3u8")&&(n.media.hlsSegmentFormat="fmp4",n.media.hlsVideoSegmentFormat="fmp4");return n}}),B);if(!z.getPlayers()[e]){null!==(U=window)&&void 0!==U&&U.customData.isSmartTV&&(re.spatialNavigation={enabled:!0,horizontalSeek:!0});var le=z(e,re,function(){var n=K(q.mark(function n(){var r,i,s,u,d,v,f,p,m,w,k,S,O,T,j,I,E,P,D,A,x,C,L,R,N,M,_,V,B,U,H,Q,G,K,J,Y,oe;return q.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(le),console.log(z.VERSION),console.log(z.getPlugins()),n.next=5,Le(t,F);case 5:if(null!==(r=window)&&void 0!==r&&r.customData.isSmartTV&&le.spatialNavigation.start(),_=null===(i=F)||void 0===i||null===(s=i[X])||void 0===s||null===(u=s.liveDetails)||void 0===u?void 0:u.startOverTime,Z&&o.resolve(Qn({status:!0,msg:"Player Initialised"},W?{seriesResponse:W,response:F}:{response:F})),g(e,null==t?void 0:t.analyticsCb),Ye(e,t),/Android/i.test(navigator.userAgent)&&(z.options.vhs.overrideNative=!0),$&&Te(e,_),!ee||null!=t&&null!==(d=t.customData)&&void 0!==d&&d.disableAds||h(e,ee,F),V=l(F,e),console.log(V),null!=t&&t.nearestClusterUrl&&(V=b(V,t.nearestClusterUrl)),!ne){n.next=20;break}return n.next=19,_n(e,F);case 19:V=n.sent;case 20:V?a(e,V):(o.reject({status:!1,msg:"Incompatible / Missing Source",response:F}),c(e,"Incompatible / Missing Source")),((null===(v=F)||void 0===v||null===(f=v[X])||void 0===f||null===(p=f.contentDetails)||void 0===p||null===(m=p.closedCaptions)||void 0===m?void 0:m.length)>0||(null===(w=F)||void 0===w||null===(k=w[X])||void 0===k||null===(S=k.closedCaptions)||void 0===S?void 0:S.length)>0)&&(J=(null===(U=F)||void 0===U||null===(H=U[X])||void 0===H||null===(Q=H.contentDetails)||void 0===Q?void 0:Q.closedCaptions)||(null===(G=F)||void 0===G||null===(K=G[X])||void 0===K?void 0:K.closedCaptions),B=J.filter(function(e){return"VTT"===e.format}),te(e,B)),null!=t&&t.disableControls&&y(e),"MEDIA_TAILOR"==(null===(O=window)||void 0===O||null===(T=O.app_data)||void 0===T||null===(j=T.appcmsMain)||void 0===j||null===(I=j.adsConfig)||void 0===I?void 0:I.vodAdSticherProvider)&&null!==(E=window)&&void 0!==E&&null!==(P=E.app_data)&&void 0!==P&&null!==(D=P.appcmsMain)&&void 0!==D&&null!==(A=D.adsConfig)&&void 0!==A&&A.vodAdClientSideTracking||"MEDIA_TAILOR"==(null===(x=window)||void 0===x||null===(C=x.customData)||void 0===C||null===(L=C.ads)||void 0===L?void 0:L.vodAdSticherProvider)&&null!==(R=window)&&void 0!==R&&null!==(N=R.customData)&&void 0!==N&&null!==(M=N.ads)&&void 0!==M&&M.vodAdClientSideTracking?(t.customData.disableControls=!0,Y=l(null==re?void 0:re.res,e)||{},oe=Y.src,Un(e,oe)):$e(e,Qn(Qn(Qn({},t),re),{},{liveVideo:Z,isDvrEnabled:$,res:F,sres:W})),mn(e,Qn(Qn(Qn({},t),re),{},{liveVideo:Z}),o,{res:F,sres:W});case 25:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},Kn={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function qn(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 zn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qn(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Wn,Jn=function(e,n){var t=n.resolve,o=n.reject,r=null==e?void 0:e.playerId,i=Xn(e);Gn(r,{res:i},e,{resolve:t,reject:o})},Xn=function(e){var n,t,o=null==e?void 0:e.streamingInfo,r=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,i=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,l=null==e?void 0:e.token,a=w(l),s=null==a?void 0:a.site;return zn(zn({id:null==Kn?void 0:Kn[s]},!i&&{directPlaybackUrl:null==r?void 0:r.url}),{},{video:{drmEnabled:i,streamingInfo:{videoAssets:{widevine:null==r?void 0:r.widevine,fairPlay:null==r?void 0:r.fairPlay,playReady:null==r?void 0:r.playReady}},liveDetails:{isDvrEnabled:null==o?void 0:o.isDvrEnabled}}})};function Yn(e,n){return $n.apply(this,arguments)}function $n(){return($n=K(q.mark(function e(n,t){var o,r,i,l,a,u;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,i=null==n?void 0:n.videoId,l=null==n?void 0:n.playerId,a=!(null==n||!n.anonymousId),e.next=6,T();case 6:u=e.sent,k(i,u).then(function(e){var t,c,d,v;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(c=t.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.contentType,s(null==e?void 0:e.data);var f,p=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(v=n.watchHistory)&&void 0!==v&&v.enable&&!a)if((null===(f=n.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,y,g,h=an((null===(m=n.watchHistory)||void 0===m?void 0:m.profileId)||"",i,null==n?void 0:n.siteOwner);if(h&&h.length)n.watchHistoryResumeTime=(null===(y=h[0])||void 0===y?void 0:y.watchedTime)||null,n.watchedPercentage=(null===(g=h[0])||void 0===g?void 0:g.watchedPercentage)||null;p.contentType="video",Gn(l,{res:p},n,{resolve:o,reject:r})}else S(i,u).then(function(e){var t,o,r,i,l,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(r=window)||void 0===r||null===(i=r.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"}).catch(function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))}).finally(function(){Gn(l,{res:p},n,{resolve:o,reject:r})});else Gn(l,{res:p},n,{resolve:o,reject:r})}).catch(function(e){O(e,l,r,i)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Zn(e,n){return et.apply(this,arguments)}function et(){return(et=K(q.mark(function e(n,t){var o,r,i,l,a;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,e.next=3,T();case 3:i=e.sent,l=null==n?void 0:n.playerId,a=null==n?void 0:n.epg,j(a,i).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==a?void 0:a.channelId,Gn(l,{res:t},n,{resolve:o,reject:r})}).catch(function(e){O(e,l,r,videoId)});case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function nt(e,n){return tt.apply(this,arguments)}function tt(){return(tt=K(q.mark(function e(n,t){var o,r,i,l,a,u,c;return q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.resolve,i=t.reject,e.next=3,T();case 3:l=e.sent,a=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,P.set(parseInt(u)),c=null==n||null===(o=n.series)||void 0===o?void 0:o.id,I(c,l).then(function(e){var t,o,u,d=e.data,v=e.data.seasons;D(v);var f=videoId||(null==v||null===(t=v[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(u=o[0])||void 0===u?void 0:u.id);E(c,l),k(f,l).then(function(e){var t,o,l;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,s(e.data),Gn(a,{res:null==e?void 0:e.data,sres:d},n,{resolve:r,reject:i})}).catch(function(e){O(e,a,i,videoId)})}).catch(function(e){O(e,a,i)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ot(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 rt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ot(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ot(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function it(){return{loadVideoInstantly:A,onTimeUpdate:W,getVideoDuration:J,getVideoCurrentTime:X,onVideoEnded:Y,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=K(q.mark(function n(t,o){var r,i,l,a,s,u,c,d,v,f,p,m,y,g,h,b,w,S,T,j,I,E,P;return q.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!R(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(p=(null==e?void 0:e.videoSourceUrl)||!1,m=null==e?void 0:e.asat,y=(null==e||null===(r=e.epg)||void 0===r?void 0:r.enable)||!1,g=null==e?void 0:e.videoId,h=(null==e||null===(i=e.series)||void 0===i?void 0:i.enable)||!1,b=(null==e?void 0:e.streamingInfo)||!1,window.videoId=g,w=null==e?void 0:e.token,!U(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",w),H().set(null==e?void 0:e.refreshToken),w&&!F(w)){n.next=16;break}return o({status:!1,msg:"".concat(w?"Token is expired !":"Missing Authorization Token"),response:{token:w}}),n.abrupt("return");case 16:Wn=JSON.parse(atob(w.split(".")[1]));case 17:return e.isAnonymousUser=!(null===(l=Wn)||void 0===l||!l.anonymousId),e.siteOwner=(null===(a=Wn)||void 0===a?void 0:a.site)||null,e.userId=(null===(s=Wn)||void 0===s?void 0:s.userId)||null,window.sessionStorage.setItem("uid",null===(u=Wn)||void 0===u?void 0:u.userId),window.watchHistory=e.watchHistory||null,S=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(c=e.series)&&void 0!==c&&c.enable?null:null==e?void 0:e.chromecastReceiverId,T=(null==e||null===(d=e.analytics)||void 0===d?void 0:d.gaId)||null,(j=null==e?void 0:e.errors)&&(window.customErrors=j),window.customData=null==e?void 0:e.customData,fe(null==e||null===(v=e.customData)||void 0===v?void 0:v.localisation),B.set(e.apiBaseUrl),null!=e&&e.skin&&!se(e.skin)||(e.skin="VL_ONE"),n.next=33,xe(e);case 33:T&&ge("https://www.googletagmanager.com/gtag/js?id=".concat(T)).then(function(){return Q(T)}).catch(function(e){}),(I=null===(f=document)||void 0===f?void 0:f.getElementById("".concat(S)))&&I.addEventListener("contextmenu",function(e){return e.preventDefault()}),p?(P={directPlaybackUrl:p,id:E="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},m?k(E,w).then(function(n){var r=(null==n?void 0:n.data)||{};Gn(S,{res:rt(rt({},r),P)},e,{resolve:t,reject:o})}).catch(function(e){O(e,S,o,E)}):Gn(S,{res:P},e,{resolve:t,reject:o})):b?Jn(e,{resolve:t,reject:o}):h?nt(e,{resolve:t,reject:o}):y?Zn(e,{resolve:t,reject:o}):Yn(e,{resolve:t,reject:o});case 37:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:ue,getSelectedRendition:ce,skip:v,getPlayer:ie,play:x,pause:C,isPaused:L,detectBrowser:ve,rewind:f,loadVideo:a,seekToTimeStamp:$,isPlayerInitialised:R,load:N,authenticateLC:M,dispose:_,enableCaptions:oe,disableCaptions:ne,getCaptions:ee,getAudioTracks:be,enableAudioTrack:we,playSelectedResolution:de,getSource:l,setVolume:ke,getVolume:Se,disableControls:y,setPlaybackSpeed:Z,getEntitlementData:V,getSsaiEvents:Pn,getPlayerVersion:function(){return window.vl_player_version},getTextTracksWithCuesDetails:re}}export{it as V,yn as i,Un as s};
|