@viewlift/player-backup 2.0.300-backup → 2.0.302-backup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/{autoNextVideo-5bd449e1.js → autoNextVideo-6cab8d20.js} +1 -1
- package/cjs/browser-77c57718.js +1 -0
- package/cjs/bundle.css +416 -422
- package/cjs/{caption-settings-5efc7591.js → caption-settings-058ad013.js} +1 -1
- package/cjs/{captions-5f9611f1.js → captions-d98c49d6.js} +1 -1
- package/cjs/{features-0ed32b63.js → features-210cbfeb.js} +1 -1
- package/cjs/generic-9239e4ef.js +1 -0
- package/cjs/index-268c83a3.js +1 -0
- package/cjs/{index-0cb8083b.js → index-50e69a99.js} +1 -1
- package/cjs/{index-e8be489f.js → index-b3582f46.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-cff7b8b7.js → multicamv2-1af47226.js} +1 -1
- package/cjs/{multicamv2-25c95b47.js → multicamv2-b1a591f5.js} +1 -1
- package/cjs/{nextEpisodeButton-74e8a0df.js → nextEpisodeButton-f6da5f9e.js} +1 -1
- package/cjs/{playlist-415e42ad.js → playlist-25247b47.js} +1 -1
- package/cjs/{relatedVideosManager-eeeaf32c.js → relatedVideosManager-0a220d05.js} +1 -1
- package/cjs/{renditions-6f165ef5.js → renditions-6554142b.js} +1 -1
- package/cjs/{resolution-19103db5.js → resolution-4c007d14.js} +1 -1
- package/cjs/{series-1e91f9ac.js → series-c6abeb2a.js} +1 -1
- package/cjs/{series-v2-12c69b00.js → series-v2-370da4d6.js} +1 -1
- package/cjs/{series-v2-bfaacb8c.js → series-v2-a347f3f7.js} +1 -1
- package/cjs/{settings-icon-43534947.js → settings-icon-0dcc3788.js} +1 -1
- package/cjs/{skin-0ee0edad.js → skin-0a5108bb.js} +1 -1
- package/cjs/{skin-fa783fc1.js → skin-100893d4.js} +1 -1
- package/cjs/{skin-5cbcd61c.js → skin-1f6f448c.js} +1 -1
- package/cjs/{skin-475c6efe.js → skin-44f02ee1.js} +1 -1
- package/cjs/{skin-227021f2.js → skin-7e8c618e.js} +1 -1
- package/cjs/{skin-3f5c6c6e.js → skin-a36d0fae.js} +1 -1
- package/cjs/{skin-013d66cd.js → skin-dfd8c833.js} +1 -1
- package/cjs/{skin-c97f0eea.js → skin-e0cf4554.js} +1 -1
- package/cjs/{skin-1e1a7fb4.js → skin-f1d45f1d.js} +1 -1
- package/cjs/{skin-94c8c63c.js → skin-f33e77ad.js} +1 -1
- package/cjs/{util-b4bf1579.js → util-9e6f986e.js} +1 -1
- package/cjs/{videoSelector-23532d3c.js → videoSelector-a84a396c.js} +1 -1
- package/cjs/{videoSelector-4e9061bb.js → videoSelector-ea7fa96e.js} +1 -1
- package/esm/autoNextVideo-be06e737.js +1 -0
- package/esm/browser-d4613b36.js +1 -0
- package/esm/bundle.css +416 -422
- package/esm/{caption-settings-cfb1368b.js → caption-settings-a9b6581e.js} +1 -1
- package/esm/{captions-2b4caf69.js → captions-9659ee8f.js} +1 -1
- package/esm/components/watch-history/handleWatchHistory.d.ts +0 -1
- package/esm/{features-f476e191.js → features-669f2639.js} +1 -1
- package/esm/generic-5fc25fa4.js +1 -0
- package/esm/helpers/browser.d.ts +0 -1
- package/esm/{index-7f9c8eec.js → index-b62e0f74.js} +1 -1
- package/esm/index-de007bec.js +1 -0
- package/esm/{index-8d6239c3.js → index-fc6d12ac.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{multicamv2-15bfaa1d.js → multicamv2-85a146f1.js} +1 -1
- package/esm/{multicamv2-3812939e.js → multicamv2-a74f52dc.js} +1 -1
- package/esm/{nextEpisodeButton-406f2d70.js → nextEpisodeButton-4d4f981f.js} +1 -1
- package/esm/{playlist-5b825b06.js → playlist-de8dcaf0.js} +1 -1
- package/esm/{relatedVideosManager-8dd9aa24.js → relatedVideosManager-81661348.js} +1 -1
- package/esm/{renditions-19f0b3a9.js → renditions-4eddc06a.js} +1 -1
- package/esm/{resolution-879fc9c0.js → resolution-5926bb20.js} +1 -1
- package/esm/{series-22cb40d1.js → series-a6e346df.js} +1 -1
- package/esm/{series-v2-64cfce61.js → series-v2-58f8f89a.js} +1 -1
- package/esm/{series-v2-59d533b4.js → series-v2-8e6a3475.js} +1 -1
- package/esm/{settings-icon-851014b6.js → settings-icon-c4e124b8.js} +1 -1
- package/esm/{skin-c79a9a01.js → skin-132a3fbe.js} +1 -1
- package/esm/skin-1c4e9c12.js +1 -0
- package/esm/{skin-b58c0902.js → skin-2c9f1fac.js} +1 -1
- package/esm/{skin-8bcdb1ff.js → skin-30c770e0.js} +1 -1
- package/esm/{skin-e25c6ce2.js → skin-b507885d.js} +1 -1
- package/esm/skin-d0799e30.js +1 -0
- package/esm/{skin-5dedeb72.js → skin-d79a44e5.js} +1 -1
- package/esm/{skin-dcc8d218.js → skin-dfd05e08.js} +1 -1
- package/esm/skin-e2592aa4.js +1 -0
- package/esm/{skin-55f1cc14.js → skin-e601cbbf.js} +1 -1
- package/esm/util-8d51abc3.js +1 -0
- package/esm/{videoSelector-3df8173e.js → videoSelector-38103e1c.js} +1 -1
- package/esm/{videoSelector-11dff17a.js → videoSelector-e9b4f3fa.js} +1 -1
- package/package.json +2 -4
- package/cjs/autoNextVideo-fd60262d.js +0 -1
- package/cjs/browser-3670a923.js +0 -1
- package/cjs/caption-settings-544fd444.js +0 -1
- package/cjs/captions-80f6eb66.js +0 -1
- package/cjs/features-12e05d18.js +0 -1
- package/cjs/generic-c66535a6.js +0 -1
- package/cjs/generic-ccfc8514.js +0 -1
- package/cjs/index-467ad153.js +0 -1
- package/cjs/index-5698f530.js +0 -1
- package/cjs/index-8a1caccc.js +0 -1
- package/cjs/index-b6608461.js +0 -1
- package/cjs/multicamv2-0834e44d.js +0 -1
- package/cjs/multicamv2-e6f27f98.js +0 -1
- package/cjs/nextEpisodeButton-8a0fd7c1.js +0 -1
- package/cjs/playlist-2093b46a.js +0 -1
- package/cjs/renditions-d28715a3.js +0 -1
- package/cjs/resolution-dbd4c97b.js +0 -1
- package/cjs/series-5286e1c3.js +0 -1
- package/cjs/series-v2-8dabeb63.js +0 -1
- package/cjs/series-v2-e4df211a.js +0 -1
- package/cjs/settings-icon-f75ddcd4.js +0 -1
- package/cjs/skin-16ae23af.js +0 -1
- package/cjs/skin-354f0a37.js +0 -1
- package/cjs/skin-37723483.js +0 -1
- package/cjs/skin-54cd0769.js +0 -1
- package/cjs/skin-621e7720.js +0 -1
- package/cjs/skin-79fa9c1d.js +0 -1
- package/cjs/skin-ac3f9750.js +0 -1
- package/cjs/skin-adc603f8.js +0 -1
- package/cjs/skin-f8d5ccde.js +0 -1
- package/cjs/skin-f9bdaa28.js +0 -1
- package/cjs/util-54e01671.js +0 -1
- package/cjs/videoSelector-72f75918.js +0 -1
- package/cjs/videoSelector-e93dfeda.js +0 -1
- package/esm/autoNextVideo-5a58fda1.js +0 -1
- package/esm/autoNextVideo-66977b2f.js +0 -1
- package/esm/browser-de5f6a74.js +0 -1
- package/esm/caption-settings-106547c2.js +0 -1
- package/esm/captions-89897207.js +0 -1
- package/esm/features-ce3dd24e.js +0 -1
- package/esm/generic-585e9a5b.js +0 -1
- package/esm/generic-7f2d1f91.js +0 -1
- package/esm/helpers/apiErrorTracker.d.ts +0 -1
- package/esm/helpers/browser.test.d.ts +0 -1
- package/esm/helpers/drmErrorDetection.d.ts +0 -6
- package/esm/icons-699e8cf0.js +0 -1
- package/esm/index-0b88f09f.js +0 -1
- package/esm/index-6665f3a3.js +0 -1
- package/esm/index-68a708c9.js +0 -1
- package/esm/index-bb7166ff.js +0 -1
- package/esm/multicamv2-1279caf9.js +0 -1
- package/esm/multicamv2-6604d8ad.js +0 -1
- package/esm/nextEpisodeButton-3eceb957.js +0 -1
- package/esm/playlist-2ccec51c.js +0 -1
- package/esm/renditions-ee4e8582.js +0 -1
- package/esm/resolution-8cbda37b.js +0 -1
- package/esm/series-991c6b60.js +0 -1
- package/esm/series-v2-5ef2d921.js +0 -1
- package/esm/series-v2-bf3a1b5a.js +0 -1
- package/esm/settings-icon-d7dfe9a5.js +0 -1
- package/esm/skin-0abde216.js +0 -1
- package/esm/skin-2803a6e0.js +0 -1
- package/esm/skin-2bf3a2e2.js +0 -1
- package/esm/skin-30bb7f84.js +0 -1
- package/esm/skin-3d3bb91f.js +0 -1
- package/esm/skin-4b9ab1d9.js +0 -1
- package/esm/skin-4d3a08d2.js +0 -1
- package/esm/skin-4f84b841.js +0 -1
- package/esm/skin-70f86676.js +0 -1
- package/esm/skin-971b1051.js +0 -1
- package/esm/skin-a45c710d.js +0 -1
- package/esm/skin-a9fb0c5e.js +0 -1
- package/esm/skin-fed5e057.js +0 -1
- package/esm/util-36d2ab03.js +0 -1
- package/esm/util-907fe226.js +0 -1
- package/esm/videoSelector-03b3ffcb.js +0 -1
- package/esm/videoSelector-bc53c149.js +0 -1
package/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-c66535a6.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),o=require("@babel/runtime/regenerator"),i=require("video.js"),l=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/get"),u=require("@babel/runtime/helpers/inherits"),s=require("@babel/runtime/helpers/possibleConstructorReturn"),d=require("@babel/runtime/helpers/getPrototypeOf"),c=require("./util-b4bf1579.js"),v=require("./captions-5f9611f1.js"),f=require("./renditions-6f165ef5.js"),p=require("./resolution-19103db5.js"),m=require("./skin-16ae23af.js"),g=require("./browser-3670a923.js"),h=require("./localisation-56e0a999.js"),y=require("@babel/runtime/helpers/typeof");require("@viewlift/comscore/index.js");var b=require("@babel/runtime/helpers/toConsumableArray"),w=require("@babel/runtime/helpers/slicedToArray"),k=require("@viewlift/sse"),S=require("./relatedVideosManager-eeeaf32c.js");function E(e,n,t,o){var i=a(d(1&o?e.prototype:e),n,t);return 2&o&&"function"==typeof i?function(e){return i.apply(t,e)}:i}function D(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(D=function(){return!!e})()}require("axios"),require("md5"),require("js-cookie"),require("@babel/runtime/helpers/assertThisInitialized");var T=i.getComponent("TextTrackSettings"),I=i.dom,C=[{value:"12",label:"12px"},{value:"14",label:"14px"},{value:"16",label:"16px"},{value:"18",label:"18px"},{value:"20",label:"20px"},{value:"24",label:"24px"},{value:"28",label:"28px"},{value:"32",label:"32px"}],P=C.map(function(e){return e.value}),O="16",j="vlp-caption-font-size-px",x="vlp-caption-font-size-style",_=".vjs-font-percent > select",R=function(e){return-1!==P.indexOf(e)?e:O},A=null;T?(A=function(){u(o,T);var e,n,t=(e=o,n=D(),function(){var t,o=d(e);if(n){var i=d(this).constructor;t=Reflect.construct(o,arguments,i)}else t=o.apply(this,arguments);return s(this,t)});function o(e,n){var i;return l(this,o),(i=t.call(this,e,n)).customUiReady_=!0,i.applyCustomFontSizeUI_(),i}return r(o,[{key:"applyCustomFontSizeUI_",value:function(){this.replaceFontSizeOptions_(),this.bindFontSizeChange_(),this.restoreCustomFontSize_()}},{key:"replaceFontSizeOptions_",value:function(){var e=this.$(_);if(e){for(;e.firstChild;)e.removeChild(e.firstChild);C.forEach(function(n){e.appendChild(I.createEl("option",{value:n.value,textContent:n.label}))}),e.value=O}}},{key:"bindFontSizeChange_",value:function(){var e=this,n=this.$(_);n&&this.on(n,"change",function(){return e.applyFontSize_(n.value)})}},{key:"applyFontSize_",value:function(e){var n=R(e);if("undefined"!=typeof document){var t=document.getElementById(x);t||((t=document.createElement("style")).id=x,document.head.appendChild(t)),t.textContent=[".vjs-text-track-cue,",".vjs-text-track-cue > div,",".vjs-text-track-display-ttml,",".vjs-text-track-display-ttml span,",".vjs-text-track-display-ttml div","{ font-size: ".concat(n,"px !important; line-height: normal !important; }")].join(" ")}}},{key:"restoreCustomFontSize_",value:function(){var e=null;try{e=window.localStorage.getItem(j)}catch(e){}var n=R(e),t=this.$(_);t&&(t.value=n),this.applyFontSize_(n)}},{key:"getValues",value:function(){var e=E(o,"getValues",this,3)([]);return e&&delete e.fontPercent,e||{}}},{key:"setDefaults",value:function(){if(E(o,"setDefaults",this,3)([]),this.customUiReady_){var e=this.$(_);e&&(e.value=O),this.applyFontSize_(O)}}},{key:"saveSettings",value:function(){if(E(o,"saveSettings",this,3)([]),this.options_&&this.options_.persistTextTrackSettings){var e=this.$(_);if(e)try{window.localStorage.setItem(j,R(e.value))}catch(e){}}}},{key:"handleLanguagechange",value:function(){E(o,"handleLanguagechange",this,3)([]),this.applyCustomFontSizeUI_()}}]),o}(),i.registerComponent("TextTrackSettings",A)):console.warn("[vlp] CustomTextTrackSettings: video.js TextTrackSettings is not registered; skipping override.");var L=function(e){return new Promise(function(n,t){if(M(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)}})},M=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},N=function(e,n,t){var o=m.getPlayer(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var i=parseFloat(n)/100;o.volume(i),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,"'")})},V=function(e){var n=m.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},U=function(){var e=t(o.mark(function e(n){var t,l,r,a,u;return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l=m.getPlayer(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 a=e.sent,e.prev=5,e.next=8,L("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,a.default(i),e.finish(13);case 16:(u=i.getTech("chromecast"))&&!u.prototype.seeking&&(u.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.cast?null==l||l.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.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.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==g.detectBrowser()?null==l||l.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)}}(),B=function(e,n){var t=m.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,l,r,a,u=this.el(),s=i.dom.getPointerPosition(u,n).x;i.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(l=o.framework)||void 0===l||null===(r=l.CastContext)||void 0===r||null===(a=r.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),f=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=f*s,v.seek()}})};var q=function(){var e=t(o.mark(function e(){return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),L("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)}}(),H=function(){var n=t(o.mark(function n(){return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,import("@viewlift/comscore/index.js").then(function(n){e.comscoreInstanceManager.set(n)});case 2:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}(),F=function(){var e=t(o.mark(function e(){return o.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){i.getPlugin("eme")||i.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),z=function(){var e=t(o.mark(function e(){var n;return o.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(i),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)}}(),G=function(){var e=t(o.mark(function e(){return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./index-84cce26a.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)}}(),K=function(){var e=t(o.mark(function e(){return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./videojs-dash5.es-072614bc.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)}}(),Y=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){L("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(i)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(i)})},loadAdsLibrary:q,loadEMELibrary:F,loadMuxPlugin:z,loadDvrSeekbar:G,loadContribDash:K,loadComscorePlugin:H});function W(e){return J.apply(this,arguments)}function J(){return(J=t(o.mark(function e(n){var t;return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,q();case 3:t&&"Safari"==g.detectBrowser()&&Promise.resolve().then(function(){return Y}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function $(e){return X.apply(this,arguments)}function X(){return(X=t(o.mark(function e(n){var t,i,l,r,a,u,s,d,c,v;return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return v=m.getPlayer(n.playerId),e.next=3,H();case 3:v.comscore({publisherId:null==n||null===(t=n.comscore)||void 0===t?void 0:t.publishedId,endpoint:null==n||null===(i=n.comscore)||void 0===i?void 0:i.endpoint,applicationName:(null==n||null===(l=n.comscore)||void 0===l?void 0:l.applicationName)||(null===(r=window)||void 0===r?void 0:r.siteName)||null,implementationId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.implementationId,projectId:null==n||null===(u=n.comscore)||void 0===u?void 0:u.projectId,debug:(null==n||null===(s=n.comscore)||void 0===s?void 0:s.debug)||!1,persistentLabels:(null==n||null===(d=n.comscore)||void 0===d?void 0:d.persistentLabels)||{},metadata:(null==n||null===(c=n.comscore)||void 0===c?void 0:c.metadata)||{}});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Q(e,n){return Z.apply(this,arguments)}function Z(){return(Z=t(o.mark(function e(n,t){var i,l,r,a,u,s,d,c,v,f,p,m,h,y;return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return v=(null==t?void 0:t.contentType)||"video",f=null==t||null===(i=t[v])||void 0===i?void 0:i.drmEnabled,null==t||null===(l=t[v])||void 0===l||null===(r=l.liveDetails)||void 0===r||r.isDvrEnabled,null==n||n.showPositiveSeekbar,p=(null==t||null===(a=t[v])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,m=(null==n||null===(d=n.comscore)||void 0===d?void 0:d.enable)||!1,h=!(null==n||null===(c=n.analytics)||void 0===c||!c.muxKey),e.prev=7,e.next=10,Promise.allSettled([f?"Safari"==g.detectBrowser()?F():"caliente"!=(null===(y=window)||void 0===y?void 0:y.siteName)?K():F():"Safari"!=g.detectBrowser()&&p?K():null,m?$(n):null,h?z():null,U(n)]);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),console.log("Error",e.t0);case 15:case"end":return e.stop()}},e,null,[[7,12]])}))).apply(this,arguments)}function ee(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 ne(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ee(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var te=new Set,oe=null,ie=function(n,t,o,i){var l,r,a,u,s,d,c,v={},f=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(l=n[f])||void 0===l?void 0:l.id)||"Null",v["c3.cm.contentType"]=ce(n),v[null==o||null===(r=o.Constants)||void 0===r?void 0:r.IS_LIVE]=!(null==n||!n.linearchannel),v[null==o||null===(a=o.Constants)||void 0===a?void 0:a.STREAM_URL]=t.currentSrc(),v[null==o||null===(u=o.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),v["c3.cm.categoryType"]=ue(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===(s=n[f])||void 0===s?void 0:s.drmEnabled)||"None",v.DAIStream=null!==(d=n[f])&&void 0!==d&&null!==(c=d.gist)&&void 0!==c&&c.isSSAIEnabled?"YES":"NO",v[o.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=se(n),v["c3.cm.genreList"]=re(n),v["c3.cm.genre"]=le(n),v["c3.cm.channel"]=ae(n,i);var p=pe(e.getCurrentSeries(),n);return v=ne(ne({},v),p)},le=function(e){var n,t,o,i=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[i])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},re=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"},ae=function(e,n){var t,o,i=(null==e?void 0:e.contentType)||"video";return"video"===i?"VOD":(null===(o=((null==e||null===(t=e[i])||void 0===t?void 0:t.channels)||[]).find(function(e){return(null==e?void 0:e.id)===(null==n?void 0:n.channelId)}))||void 0===o?void 0:o.title)||"NULL"},ue=function(e){var n,t;return null!=e&&e.linearchannel?"Linear Channel":null!=e&&null!==(n=e.video)&&void 0!==n&&null!==(t=n.streamingInfo)&&void 0!==t&&t.isLiveStream?"Live Event":"VOD"},se=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",i=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return i?"YES":"NO"},de=function(e,n){var t,o,i=(n||{}).epg;if(i&&null!=i&&i.enable&&null!=i&&i.programTitle)return i.programTitle;var l=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(t=e[l])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(r)},ce=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var ve,fe,pe=function(n,t){var o,i,l,r,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return u;var s=e.getSeasonNumber(),d=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(o=t.video)||void 0===o||null===(i=o.series)||void 0===i?void 0:i.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==n||null===(l=n[s-1])||void 0===l||null===(r=l.episodes)||void 0===r||null===(a=r[d-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},me=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"}},ge=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},he=function(){var n=t(o.mark(function n(t,i){var l,r,a,u,s,d,c,v,f,p,g,h;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(l=(null==i?void 0:i.convivaConfig)||{},r=l.trackConvivaPlayerEvent,a=l.paymentHandler,u=l.tveProvider,s=l.enable,d=l.appName,v=(c=i||{}).token,f=c.epg,s){n.next=4;break}return n.abrupt("return");case 4:if(p=m.getPlayer(t),"function"==typeof(g=r)){n.next=8;break}return n.abrupt("return");case 8:return n.next=10,g("getConvivaObject");case 10:if(h=n.sent){n.next=13;break}return n.abrupt("return");case 13:p.ready(function(){var e=p.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=me(t.keySystem);g("contentInfo",{DRMEnabled:o})}else g("contentInfo",{DRMEnabled:"None"})}),n||g("contentInfo",{DRMEnabled:"None"})}),p.on("loadstart",function(){var n,t;oe&&oe!==p.currentSrc()&&g("playbackEnded"),g("setPlayer",p),te.clear(),oe=p.currentSrc();var o=ge(p.currentType()),l=e.getCurrentVideo(),r=ie(l,p,h,f);r[null==h||null===(n=h.Constants)||void 0===n?void 0:n.PLAYER_NAME]=d||"WEB",r[null==h||null===(t=h.Constants)||void 0===t?void 0:t.ASSET_NAME]=de(l,i),r.authToken=v||"NULL",r.streamType=o,r.D2CType=a||"NONE",r.subscriberType=u?"MVPD":"FREE"!==a?"D2C":"FREE",r["c3.cm.affiliate"]=u||"NULL",ye.setData(r),g("contentInfo",r)}),p.on("loadedmetadata",function(){var e,n=p.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),g("contentInfo",{screenResolution:e})}),p.on("play",function(){te.has(p.currentSrc())||(te.add(p.currentSrc()),g("playbackStarted",null))}),p.on("ended",function(){te.has(p.currentSrc())&&te.delete(p.currentSrc()),g("playbackEnded")}),p.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&g("initAdSensor",{player:p,adsLoader:null==e?void 0:e.adsLoader})}),p.on("dispose",function(){null==te||te.clear(),g("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),ye=(ve={},{setData:function(e){ve=ne(ne({},ve),e)},getData:function(){return ve}}),be=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-475c6efe.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-0ee0edad.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-fa783fc1.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-1e1a7fb4.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-ac3f9750.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?Promise.resolve().then(function(){return require("./skin-5cbcd61c.js")}).then(function(t){t.initialiseSkin(e,n)}):"news"==t?Promise.resolve().then(function(){return require("./skin-3f5c6c6e.js")}).then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?Promise.resolve().then(function(){return require("./skin-94c8c63c.js")}).then(function(t){t.initialiseSkin(e,n)}):"mini"==t&&Promise.resolve().then(function(){return require("./skin-227021f2.js")}).then(function(t){t.initialiseSkin(e,n)})};function we(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 ke(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?we(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):we(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var Se=[],Ee=0,De=null;function Te(){fe=null,Se=[],Ee=0,De=null}function Ie(t,o,i){var l,r,a,u,s,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==o||null===(l=o.watchHistory)||void 0===l||l.apiVersion;var c=null==o||null===(r=o.watchHistory)||void 0===r?void 0:r.profileId,v=Math.floor(t.currentTime()),f=Math.floor(t.duration());null==o||null===(a=o.watchHistory)||void 0===a||a.xapiKey;var p=(null==o||null===(u=o.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==o||null===(s=o.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,g=Math.floor(t.currentTime()),h=d?100:Math.floor(v/f*100),y={};m?function(t,o,i){var l=o?"watchhistory-data-".concat(o):"watchhistory-data-guest-".concat(i),r=Ce(l),a=(new Date).getTime(),u=e.getCurrentVideo(),s=(null==u?void 0:u.video)||{},d=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return ke(ke({},e),{},n({},t,s[t]))},{}),c=r.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===fe});c<0?r.push(ke(ke({content:d},t),{},{addedDate:a,updateDate:a})):r[c]=ke(ke(ke({},r[c]),t),{},{updateDate:a});localStorage.setItem("".concat(l),JSON.stringify(r))}(y={completed:d,watchedTime:g,watchedPercentage:h},c,o.siteOwner):(y=ke(ke({videoId:fe,watchedTime:g,watchedPercentage:h,doneWatching:d,profileId:c},De&&{seriesId:De}),p&&{originalObjectId:p}),e.saveWatchHistory(y).then(function(e){}).catch(function(e){})),Ee=v+i}function Ce(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function Pe(e,n,t){var o=Ce(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),i=[];return o&&Array.isArray(o)&&(i=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),i}var Oe=!1,je=function(n,t){var o,i,l=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(o=n[l])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.secondaryVideoAssets)||null)&&!Oe){var r=xe(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(r,t);return a&&e.loadVideo(t,a),Oe=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function xe(e,n,t){if(Array.isArray(e))return e.map(function(e){return xe(e,n,t)});if(null!==e&&"object"===y(e)){var o={};return Object.keys(e).forEach(function(i){i===n&&void 0!==e[t]?o[i]=e[t]:i===t&&void 0!==e[n]?o[i]=e[n]:o[i]=xe(e[i],n,t)}),o}return e}function _e(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 Re(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)?Re(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,r=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return r=e.done,e},e:function(e){a=!0,l=e},f:function(){try{r||null==t.return||t.return()}finally{if(a)throw l}}}}function Re(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 Ae(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 Le(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ae(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var Me=function(n,t,o,i){var l,r,a,u,s,d=i.res,c=i.sres,f=m.getPlayer(n),p=(null==d?void 0:d.contentType)||"video",h=(null==d||null===(l=d[p])||void 0===l?void 0:l.drmEnabled)||!1,b=!(null==d||null===(r=d[p])||void 0===r||null===(a=r.streamingInfo)||void 0===a||!a.isLiveStream)||"linearchannel"===p,w=(null==d||null===(u=d[p])||void 0===u||null===(s=u.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;e.setCurrentVideo(d),e.videoReplayTracker.set(d),f&&(f.on("loadstart",function(){b?o.resolve({status:!0,msg:"Video Loaded",response:d}):o.resolve(Le({status:!0,msg:"Player Initialised"},c?{seriesResponse:c,response:d}:{response:d}))}),f.on("loadeddata",function(){var o,i,l,r,a=v.getCaptions(n);if(null==a||a.map(function(e){return v.disableCaptions(n,e.id)}),w&&"Safari"===g.detectBrowser())try{var u;null==f||null===(u=f.liveTracker)||void 0===u||u.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==f||!f.muted())&&N(n,sessionStorage.getItem("volume")||"100");var s=e.getCurrentVideo();if(e.initialiseComscoreStreamingTracking(t),e.clearError(),null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.isExternal){var c=Le(Le({},t),d);!function(e,n){var t,o,i;if(null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.cb&&"function"==typeof(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.cb)){var l,r,a,u=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,s=(null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.completionThreshold)||95,d=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.cb,c=-1;e.on("seeked",function(){var n=Math.floor(e.currentTime()),t=n-n%u;if(c=t,t>0){var o=Math.floor(n/e.duration()*100);d({watchedTime:n,watchedPercentage:o,doneWatching:o>=s})}}),e.on("timeupdate",function(){var n=Math.floor(e.currentTime()),t=n-n%u;if(n%u===0&&t!==c){c=t;var o=Math.floor(n/e.duration()*100);d({watchedTime:n,watchedPercentage:o,doneWatching:o>=s||!1})}}),e.on("ended",function(){d({watchedTime:Math.floor(e.duration()),watchedPercentage:100,doneWatching:!0})})}}(f,c)}else if(null!=t&&t.watchHistory&&null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.enable&&(!t.isAnonymousUser||null!=t&&null!==(l=t.watchHistory)&&void 0!==l&&l.saveOffline)){var p,h,y=Le(Le({},t),d);!function(e,n,t){var o,i,l;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(De=null==n||null===(i=n.series)||void 0===i?void 0:i.id),Se=[],Ee=0,fe=t;var r=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,a=m.getPlayer(e);a&&(a.on("dispose",Te),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());Se.includes(Ee)||(e!=Ee||e<r?e>Ee&&(Ee=e+r):(Se.push(e),Ie(a,n,r)))}}),a.one("ended",function(){Ie(a,n,r,!0)}))}(n,y,null==s||null===(p=s.video)||void 0===p||null===(h=p.gist)||void 0===h?void 0:h.id)}if(null!=t&&null!==(r=t.analytics)&&void 0!==r&&r.muxKey&&null!=f&&f.mux){var b,k,S,E,D,T,I=(null===(b=e.getCurrentVideo())||void 0===b?void 0:b.video)||(null==d?void 0:d.video),C=null==I?void 0:I.gist,P={env_key:null==t||null===(k=t.analytics)||void 0===k?void 0:k.muxKey,player_name:"vl-web-player",player_version:null===(S=window)||void 0===S?void 0:S.vl_player_version,video_id:null==C?void 0:C.id,video_title:null==C?void 0:C.title,video_series:null==I||null===(E=I.series)||void 0===E?void 0:E.title,video_stream_type:null!=I&&null!==(D=I.streamingInfo)&&void 0!==D&&D.isLiveStream?"live":"video",viewer_user_id:null==t||null===(T=t.analytics)||void 0===T?void 0:T.userId};f.mux({debug:!1,data:P})}}),f.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];f.trigger("subtitlechanged",n)}),f.on("subtitlechanged",function(e,n){var t,o,i,l,r,a,u,s,d,c,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===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S,p=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(d=s.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===f){var m,g=p.getMediaSession(),h=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),f.tech_.on("retryplaylist",function(){b&&je(d,n)}),f.on("error",function(){var t,i;(console.log("ERROR",f.error(),f.error().code),4===f.error().code&&b)?je(d,n):(e.handleError(n,(null==f||null===(t=f.error())||void 0===t?void 0:t.message)||"Some error occured"),o.reject({status:!1,msg:(null==f||null===(i=f.error())||void 0===i?void 0:i.message)||"Some error occured",response:d}))}),f.one("play",function(){var n,o,i,l,r;if(null===(n=window)||void 0===n||null===(o=n.app_data)||void 0===o||null===(i=o.appcmsMain)||void 0===i||null===(l=i.adsConfig)||void 0===l||!l.vodAdClientSideTracking){if(null!=t&&null!==(r=t.series)&&void 0!==r&&r.enable){var a,u,s,d=null===(a=e.getCurrentVideo())||void 0===a||null===(u=a.video)||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.id,c=e.getSeriesWatchMap(),v=(null==c?void 0:c.get(d))||{t:0,p:0},p=v.t,m=v.p;p&&m<95&&setTimeout(function(){f.currentTime(p)},0)}else{var g,h,y,b,w,k,S,E=null!==(g=null==t?void 0:t.watchHistoryResumeTime)&&void 0!==g?g:null==t||null===(h=t.watchHistory)||void 0===h?void 0:h.watchedTime,D=null!==(y=null!==(b=null==t?void 0:t.watchedPercentage)&&void 0!==b?b:null==t||null===(w=t.watchHistory)||void 0===w?void 0:w.watchedPercentage)&&void 0!==y?y:0,T=null!==(k=null==t||null===(S=t.watchHistory)||void 0===S?void 0:S.completionThreshold)&&void 0!==k?k:95;E&&D<T&&setTimeout(function(){f.currentTime(E)},0)}if(null!=f&&f.dvrSeekbar)try{f.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),f.on("volumechange",function(){var e=100*f.volume().toFixed(2);f.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),f.on("chromecastDisconnected",function(){if(b){f.currentSource();for(var e=f.textTracks(),n=e.length-1;n>=0;n--)f.removeRemoteTextTrack(e[n])}}),f.one("loadeddata",function(){var e,n=(null==f||null===(e=f.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),o=(n.language||n.label||"").toUpperCase();return t<o?-1:t>o?1:0}),"object"==y(f.dash)){var t,o,i,l=null==f||null===(t=f.dash)||void 0===t||null===(o=t.mediaPlayer)||void 0===o?void 0:o.getTracksFor("audio"),r=null==l?void 0:l.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=_e(n);try{for(a.s();!(i=a.n()).done;){var u=i.value;if(r&&(null==u?void 0:u.id)=="dash-audio-".concat(r.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,d=_e(n);try{for(d.s();!(s=d.n()).done;){var c,v,p,m=s.value;if(("Chrome"==g.detectBrowser()||"Edge"==g.detectBrowser()&&(null!==(c=navigator)&&void 0!==c&&null!==(v=c.userAgent)&&void 0!==v&&v.includes("Macintosh")||!h))&&null!=m&&null!==(p=m.label)&&void 0!==p&&p.includes("5.1"))f.audioTracks().removeTrack(m);else{if("main"==m.kind){m.enabled=!0;break}m.enabled=!1}}}catch(e){d.e(e)}finally{d.f()}}}))};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 Ve(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ne(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function Ue(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 Be(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)?Be(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,r=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return r=e.done,e},e:function(e){a=!0,l=e},f:function(){try{r||null==t.return||t.return()}finally{if(a)throw l}}}}function Be(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 qe={debug:5,info:4,warn:3,error:2,fatal:1,none:0,off:0,DEBUG:5,INFO:4,WARN:3,ERROR:2,FATAL:1,NONE:0,OFF:0};function He(n,t,o){e.emitApiErrorEvent(n,{status:o,message:"DRM ".concat(t," request failed")},"Playback Errors",{requestKind:t})}function Fe(e){try{if(null!=e&&e.__vlLicenseUrl)return e.__vlLicenseUrl;var n=null==e?void 0:e.keySystems;if(n)for(var t=0,o=Object.keys(n);t<o.length;t++){var i=n[o[t]];if("string"==typeof i)return i;if(null!=i&&i.url)return i.url;if(null!=i&&i.licenseUri)return i.licenseUri}var l=null==e?void 0:e.keySystemOptions;if(Array.isArray(l)){var r,a=Ue(l);try{for(a.s();!(r=a.n()).done;){var u,s,d,c=r.value,v=(null==c||null===(u=c.options)||void 0===u?void 0:u.serverURL)||(null==c||null===(s=c.options)||void 0===s?void 0:s.licenseUri)||(null==c||null===(d=c.options)||void 0===d?void 0:d.url);if(v)return v}}catch(e){a.e(e)}finally{a.f()}}}catch(e){}return""}function ze(e){if(null!=e&&e.__vlDrmLicenseUrl)return e.__vlDrmLicenseUrl;try{return Fe("function"==typeof e.currentSource?e.currentSource():null)}catch(e){return""}}function Ge(n,t){t&&!t.__vlDrmDashHooksInstalled&&(t.__vlDrmDashHooksInstalled=!0,"function"==typeof t.addResponseInterceptor&&t.addResponseInterceptor(function(n){try{var t=(null==n?void 0:n.request)||{},o=(null==n?void 0:n.url)||(null==t?void 0:t.url)||"",i=e.classifyRequestKind(o,(null==t?void 0:t.type)||(null==n?void 0:n.type));if(e.isDrmRequestKind(i)){var l=e.extractStatusCode(n,null);e.isHttpOk(l)||He(o,i,l)}}catch(e){}return Promise.resolve(n)}),"function"==typeof t.registerLicenseRequestFilter&&t.registerLicenseRequestFilter(function(e){try{null!=e&&e.url&&(t.__vlLastLicenseUrl=e.url)}catch(e){}return Promise.resolve()}),"function"==typeof t.on&&t.on("public_licenseRequestComplete",function(o){try{var i,l,r,a;if(null==o||!o.error)return;var u=null!==(i=null==o||null===(l=o.error)||void 0===l||null===(r=l.data)||void 0===r?void 0:r.responseCode)&&void 0!==i?i:e.extractStatusCode(null,o.error);He((null==o||null===(a=o.data)||void 0===a?void 0:a.url)||t.__vlLastLicenseUrl||ze(n)||"","license",u)}catch(e){}}))}var Ke=!1,Ye=null,We=new Set;function Je(e){if(e&&!e.__vlDrmDashRegistered){e.__vlDrmDashRegistered=!0,We.add(e),e.__vlDrmDashEnabled=!0;var n=function(){e.__vlDrmDashRegistered&&(e.__vlDrmDashRegistered=!1,e.__vlDrmDashEnabled=!1,We.delete(e),function(){if(Ke&&!(We.size>0)){var e=null==i?void 0:i.Html5DashJS;e&&"function"==typeof e.removeHook&&"function"==typeof Ye&&e.removeHook("beforeinitialize",Ye),Ke=!1,Ye=null}}())};"function"==typeof e.one?e.one("dispose",n):"function"==typeof e.on&&e.on("dispose",n)}}function $e(n){if(n){Je(n),function(){if(!Ke){var e=null==i?void 0:i.Html5DashJS;e&&"function"==typeof e.hook&&(Ye=function(e,n){null!=e&&e.__vlDrmDashEnabled&&Ge(e,n)},Ke=!0,e.hook("beforeinitialize",Ye))}}(),function(n){n&&!n.__vlEmeDrmErrorInstalled&&(n.__vlEmeDrmErrorInstalled=!0,n.on("error",function(){try{var t,o="function"==typeof n.error?n.error():null;if(!o||!e.isDrmError(o))return;if(null!=n&&null!==(t=n.dash)&&void 0!==t&&t.mediaPlayer)return;He(ze(n),"license",null)}catch(e){}}))}(n);var t=function(){var t;!function(n){var t,o,i=null==n||null===(t=n.tech_)||void 0===t||null===(o=t.vhs)||void 0===o?void 0:o.xhr;i&&"function"==typeof i.onResponse&&!n.__vlDrmVhsHooksInstalled&&(n.__vlDrmVhsHooksInstalled=!0,i.onResponse(function(n,t,o){try{var i=function(e){return(null==e?void 0:e.uri)||(null==e?void 0:e.url)||(null==e?void 0:e.src)||""}(n),l=e.classifyRequestKind(i,null==n?void 0:n.type);if(!e.isDrmRequestKind(l))return;var r=e.extractStatusCode(o,t);e.isHttpOk(r)&&!t||He(i,l,r)}catch(e){}}))}(n),Ge(n,null==n||null===(t=n.dash)||void 0===t?void 0:t.mediaPlayer)};t(),n.on("xhr-hooks-ready",t),n.on("loadstart",function(){setTimeout(t,0)})}}var Xe=function(l,r,a,u){var s,d,c,f,p,h,y,b,w,k,S,E,D,T,I,C,P,O,j,x,_,R,A,L,M,N,V,U,q,H,F,z,G,K,Y,W,J,$,X=r.res,Z=void 0===X?null:X,ee=r.sres,ne=void 0===ee?null:ee,te=function(){try{var e,n,t=new URLSearchParams((null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.search)||""),o=t.get("loglevel")||null;return{playerDebug:"true"===t.get("playerdebug"),logLevel:o,dashLogLevel:null!=o&&null!=qe[o]?qe[o]:5}}catch(e){return{playerDebug:!1,logLevel:null,dashLogLevel:5}}}(),oe=te.playerDebug,ie=te.logLevel,le=te.dashLogLevel;oe&&(console.log("[PLAYER DEBUG] config:",a),console.log("[PLAYER DEBUG] entitlement (res):",Z),ne&&console.log("[PLAYER DEBUG] series response (sres):",ne));var re=null!=a&&a.chromecastReceiverId?["chromecast","html5"]:["html5"],ae=(null===(s=Z)||void 0===s?void 0:s.contentType)||"video",ue=m.impolicy16x9(null===(d=Z)||void 0===d||null===(c=d[ae])||void 0===c||null===(f=c.gist)||void 0===f?void 0:f.videoImageUrl)||m.impolicy16x9(null===(p=Z)||void 0===p||null===(h=p[ae])||void 0===h||null===(y=h.gist)||void 0===y||null===(b=y.imageGist)||void 0===b?void 0:b.r16x9),se=(null===(w=Z)||void 0===w||null===(k=w[ae])||void 0===k||null===(S=k.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,de=!(null===(E=Z)||void 0===E||null===(D=E[ae])||void 0===D||null===(T=D.streamingInfo)||void 0===T||!T.isLiveStream)||"linearchannel"===ae,ce=(null===(I=Z)||void 0===I||null===(C=I.ads)||void 0===C||null===(P=C.preRoll)||void 0===P||null===(O=P.adTags)||void 0===O||null===(j=O.web)||void 0===j?void 0:j.active)&&(null===(x=Z)||void 0===x||null===(_=x.ads)||void 0===_||null===(R=_.preRoll)||void 0===R||null===(A=R.adTags)||void 0===A||null===(L=A.web)||void 0===L?void 0:L.url);Z=Ve(Ve({},Z),{},{audioAssetSource:null==a?void 0:a.audioAssetSource});var ve=(null==a||null===(M=a.customData)||void 0===M?void 0:M.ads)||{},fe=(null===(N=Z)||void 0===N||null===(V=N[ae])||void 0===V?void 0:V.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==ve?void 0:ve.vodAdSticherProvider)||!1,pe=!(null===(U=Z)||void 0===U||null===(q=U[ae])||void 0===q||!q.isSSAIEnabled)&&"TRANSMIT"==(null==ve?void 0:ve.liveAdSticherProvider)&&!(null==ve||!ve.liveAdClientSideTracking),me=(null==a?void 0:a.latency)||6,ge=(null==a?void 0:a.skin_settings)||{},we=(J={enableSmoothSeeking:!0,controls:0!=(null==a?void 0:a.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==a?void 0:a.muted)||!1,autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==ge?void 0:ge.pictureInPictureToggle)||!1},playbackRates:null!=ge&&ge.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==a.skin,liveui:se},n(J,"autoplay",null==a?void 0:a.autoplay),n(J,"normalizeAutoplay",(null==a?void 0:a.autoplay)&&!ce),n(J,"loop",(null==a?void 0:a.loop)||!1),n(J,"audioPosterMode",null==a?void 0:a.audioPosterMode),n(J,"html5",Ve(Ve({dash:Ve(Ve({},!i.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:Ve(Ve({},((null==a?void 0:a.debugConfig)&&(null==a||null===(H=a.debugConfig)||void 0===H?void 0:H.enable)||oe)&&{debug:{logLevel:le}}),{},{streaming:{delay:{liveDelay:me},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Ve({},"IE"==g.detectBrowser()&&{enableStallFix:!0,stallSeek:1}),abr:Ve(Ve(Ve(Ve({},(null==a?void 0:a.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==a?void 0:a.initialBandwidth)/1e3}}),(null==a?void 0:a.maxBitrate)&&{maxBitrate:{audio:-1,video:(null==a?void 0:a.maxBitrate)/1e3}}),(null==a?void 0:a.minBitrate)&&{minBitrate:{audio:-1,video:(null==a?void 0:a.minBitrate)/1e3}}),{},{rules:{throughputRule:{active:!0},bolaRule:{active:!1},insufficientBufferRule:{active:!1},switchHistoryRule:{active:!1},droppedFramesRule:{active:!1},abandonRequestsRule:{active:!1}},autoSwitchBitrate:{video:!0,audio:!0}})}})}),vhs:Ve(Ve(Ve({},(null==a?void 0:a.initialBandwidth)&&{bandwidth:a.initialBandwidth}),{},{liveRangeSafeTimeDelta:me,useDevicePixelRatio:!0,experimentalLLHLS:(null==a?void 0:a.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==a||!a.initialBandwidth},(null==a||null===(F=a.customData)||void 0===F?void 0:F.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(z=null==a?void 0:a.enableLowInitialPlaylist)&&void 0!==z&&z},((null==a?void 0:a.debugConfig)&&(null==a||null===(G=a.debugConfig)||void 0===G?void 0:G.enable)||oe)&&{debug:!0}),debug:(null==a?void 0:a.debugConfig)&&(null==a||null===(K=a.debugConfig)||void 0===K?void 0:K.enable)||oe||!1,nativeTextTracks:"Safari"==g.detectBrowser()},0==(null==a||null===(Y=a.customData)||void 0===Y?void 0:Y.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(W=a.customData)||void 0===W?void 0:W.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(J,"poster",ue),n(J,"techOrder",re),n(J,"chromecast",{requestCustomDataFn:function(n){var t,o,i=m.getPlayer(l),r=((null==i?void 0:i.textTracksJson_)||i.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),u=function(e,n,t){var o,i,l,r,a,u,s,d,c,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,g,h,y,b,w,k,S;p.isDrmEnabled=!0;var E=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,D=(null==E?void 0:E.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(h=g[0])||void 0===h||null===(y=h.options)||void 0===y?void 0:y.serverURL);p.licenseUrl=D;var T=(null==E?void 0:E.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=T}var I=(null==e||null===(o=e[f])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";p.contentType=I;var C=null==e||null===(l=e[f])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;p.duration=C;var P=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=P;var O=null==e||null===(s=e[f])||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.videoImageUrl;return p.mediaImage=O,p.subTitles=t,p.DVR=(null==e||null===(c=e[f])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Z,n,r);return Ve(Ve({},u),{},{transmitTrackingUrl:e.trackingUrlManager.get()||null,convivaMetaData:Ve({customerKey:(null==a||null===(t=a.convivaConfig)||void 0===t?void 0:t.customerKey)||null,debug:(null==a||null===(o=a.convivaConfig)||void 0===o?void 0:o.debug)||!1},ye.getData())})},modifyLoadRequestFn:function(e){var n,t,o,i,r,a=m.getPlayer(l),u=(null==a?void 0:a.currentSource())||{};!(null===(n=Z)||void 0===n||null===(t=n[ae])||void 0===t||null===(o=t.streamingInfo)||void 0===o||null===(i=o.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(r=u.src)&&void 0!==r&&r.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),J);if(!i.getPlayers()[l]){(null!=a&&a.debugConfig&&null!=a&&null!==($=a.debugConfig)&&void 0!==$&&$.enable||oe)&&i.log.level(ie||"debug");var ke=i(l,we,function(){var n=t(o.mark(function n(){var t,r,s,d,c,f,p,m,g,h,y,b,w,k,S,E,D,T,I,C,P,O;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return $e(ke),console.log(ke),console.log(i.VERSION),console.log(i.getPlugins()),n.next=6,Q(a,Z);case 6:if(null!=a&&a.debugConfig&&null!=a&&null!==(t=a.debugConfig)&&void 0!==t&&t.enable||oe){try{i.log.level(ie||"debug")}catch(e){}(w=function(){try{var e,n,t;null==ke||null===(e=ke.dash)||void 0===e||null===(n=e.mediaPlayer)||void 0===n||null===(t=n.updateSettings)||void 0===t||t.call(n,{debug:{logLevel:le}})}catch(e){}})(),ke.one("loadedmetadata",w)}if(k=null===(r=Z)||void 0===r||null===(s=r[ae])||void 0===s||null===(d=s.liveDetails)||void 0===d?void 0:d.startOverTime,de&&u.resolve(Ve({status:!0,msg:"Player Initialised"},ne?{seriesResponse:ne,response:Z}:{response:Z})),e.inititateBeacon(l,{analyticsCb:null==a?void 0:a.analyticsCb,analyticsEventParams:null==a?void 0:a.analyticsEventParams,userId:null==a?void 0:a.userId}),he(l,a),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),se&&B(l,k),!ce||null!=a&&null!==(c=a.customData)&&void 0!==c&&c.disableAds||e.initialiseAdvertisement(l,ce,Z),S=e.getSource(Z,l),console.log(S),oe&&(console.log("[PLAYER DEBUG] source:",S),console.log("[PLAYER DEBUG] videojs options:",we)),null!=a&&a.nearestClusterUrl&&(S=e.getUpdatedClusterSource(S,a.nearestClusterUrl)),!fe){n.next=24;break}return n.next=21,e.getSGAIEnabledSource(l,Z);case 21:S=n.sent,n.next=28;break;case 24:if(!pe){n.next=28;break}return n.next=27,e.getTransmitEnabledSource(S,Z,l);case 27:S=n.sent;case 28:ke&&(ke.__vlDrmLicenseUrl=Fe(S)),S?e.loadVideo(l,S):(u.reject({status:!1,msg:"Incompatible / Missing Source",response:Z}),e.handleError(l,"Incompatible / Missing Source")),((null===(f=Z)||void 0===f||null===(p=f[ae])||void 0===p||null===(m=p.contentDetails)||void 0===m||null===(g=m.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(h=Z)||void 0===h||null===(y=h[ae])||void 0===y||null===(b=y.closedCaptions)||void 0===b?void 0:b.length)>0)&&(O=(null===(D=Z)||void 0===D||null===(T=D[ae])||void 0===T||null===(I=T.contentDetails)||void 0===I?void 0:I.closedCaptions)||(null===(C=Z)||void 0===C||null===(P=C[ae])||void 0===P?void 0:P.closedCaptions),E=O.filter(function(e){return"VTT"===e.format}),v.addCaptions(l,E)),null!=a&&a.disableControls?e.disableControls(l):be(l,Ve(Ve(Ve({},a),we),{},{liveVideo:de,isDvrEnabled:se,res:Z,sres:ne})),Me(l,Ve(Ve(Ve({},a),we),{},{liveVideo:de}),u,{res:Z,sres:ne});case 33:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}};function Qe(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 Ze(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Qe(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var en,nn=function(e,n){var t=n.resolve,o=n.reject,i=null==e?void 0:e.playerId,l=tn(e);Xe(i,{res:l},e,{resolve:t,reject:o})},tn=function(n){var t,o,i,l,r,a,u,s,d,c,v,f,p,m=null==n?void 0:n.streamingInfo,g=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,h=(null==n||null===(o=n.streamingInfo)||void 0===o?void 0:o.isDrmEnabled)||null,y=(null==n||null===(i=n.streamingInfo)||void 0===i||null===(l=i.ads)||void 0===l?void 0:l.url)||null,w=(null==n||null===(r=n.streamingInfo)||void 0===r?void 0:r.posterUrl)||null,k=(null==n||null===(a=n.streamingInfo)||void 0===a?void 0:a.subtitles)||[],S=(null==n||null===(u=n.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,E=(null==n||null===(d=n.streamingInfo)||void 0===d?void 0:d.macroMap)||[],D=(null==n||null===(c=n.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.isSSAIEnabled)||!1,T=null==n?void 0:n.token,I=e.getDecodedToken(T);null==I||I.site;var C=null==I?void 0:I.siteId,P=(null==n||null===(f=n.customData)||void 0===f||null===(p=f.comscore)||void 0===p?void 0:p.video)||null,O=Ze(Ze({id:"".concat(C,"_external")},!h&&{directPlaybackUrl:null==g?void 0:g.url}),{},{video:Ze(Ze(Ze(Ze(Ze({drmEnabled:h,streamingInfo:Ze(Ze({videoAssets:Ze(Ze({},S&&{drmProvider:S}),{},{widevine:null==g?void 0:g.widevine,fairPlay:null==g?void 0:g.fairPlay,playReady:null==g?void 0:g.playReady})},(null==m?void 0:m.isDvrEnabled)&&{isLiveStream:!0}),(null==P?void 0:P.isLiveStream)&&{isLiveStream:null==P?void 0:P.isLiveStream})},D&&{isSSAIEnabled:D}),{},{metadata:E,liveDetails:{isDvrEnabled:null==m?void 0:m.isDvrEnabled},gist:Ze(Ze(Ze({},w&&{videoImageUrl:w}),(null==P?void 0:P.videoId)&&{id:null==P?void 0:P.videoId}),(null==P?void 0:P.videoTitle)&&{title:null==P?void 0:P.videoTitle}),contentDetails:Ze({},(null==k?void 0:k.length)>0&&{closedCaptions:b(k)})},(null==P?void 0:P.runtime)&&{runtime:null==P?void 0:P.runtime}),(null==P?void 0:P.publishDate)&&{publishDate:null==P?void 0:P.publishDate}),(null==P?void 0:P.platform)&&{platform:null==P?void 0:P.platform}),(null==P?void 0:P.series)&&{series:null==P?void 0:P.series}),ads:{preRoll:{adTags:{web:Ze(Ze({},y&&{active:!0}),y&&{url:y})}}}});return P&&(null!=P&&P.isDvrEnabled&&(O.video.liveDetails=Ze(Ze({},O.video.liveDetails),{},{isDvrEnabled:null==P?void 0:P.isDvrEnabled})),null!=P&&P.metadata&&(O.video.metadata=[].concat(b(O.video.metadata),b(null==P?void 0:P.metadata)))),O},on=null,ln=function(e,n){(new Date).getMonth(),new Date(n).getMonth(),(new Date).getFullYear(),new Date(n).getFullYear();var t=Math.floor(e/6048e5),o=function(e,n){var t;return t=12*(n.getFullYear()-e.getFullYear()),t-=e.getMonth(),(t+=n.getMonth())<=0?0:t}(new Date,new Date(n)),i=o>0&&t>4?o:0,l=function(e,n){var t=new Date(n).getFullYear()-new Date(e).getFullYear(),o=new Date(n).getMonth()-new Date(e).getMonth();return new Date(n).getDay()-new Date(e).getDay()<0&&(o-=1),o<0&&(t-=1),t}(new Date,new Date(n));return[l>0&&i>0?l:0,i,t,Math.floor(e/864e5),Math.floor(e%864e5/36e5),Math.floor(e%36e5/6e4),Math.floor(e%6e4/1e3)]},rn=function(e){var n,t=w(e,8),o=t[0],i=t[1],l=t[2],r=t[3],a=t[4],u=t[5],s=t[6],d=t[7];n=o>=1?" ".concat(o," Year"):i>=1?" ".concat(i," month"):l>=1?" ".concat(l," week"):r>=1?" ".concat(r," day"):a<24&&a>=12?" ".concat(a," hour"):a>0?"".concat(a," hours ").concat(u," minutes ").concat(s," seconds"):u>0?"".concat(u," minutes ").concat(s," seconds"):"".concat(s," seconds"),d.textContent="".concat(n)},an=(en={scheduleStartTimeMs:0,scheduleEndTimeMs:0},{get:function(){return en},set:function(e){en={scheduleStartTimeMs:null==e?void 0:e.startDateTime,scheduleEndTimeMs:null==e?void 0:e.endDateTime}}});function un(e,n,t,o){if(e){var i=function(){var e,i,r=null===(e=an.get())||void 0===e?void 0:e.scheduleStartTimeMs,a=null===(i=an.get())||void 0===i?void 0:i.scheduleEndTimeMs,u=Date.now();if(u-a>0){var s=document.getElementsByClassName("error-message")[0];return s&&(s.textContent=h.getLocalisation("eventEnded")||"Game has ended",o.textContent=""),clearInterval(l),void(null==t||t())}var d=r-u;if(d/1e3<=0)return clearInterval(l),null==n||n([0,0,0,0,0,0,0,o]),void(null==t||t());var c=ln(d,r);null==n||n([].concat(b(c),[o]))};i();var l=setInterval(i,1e3);return l}}var sn=function(e,n,t){var o,i,l,r,a,u,s,d,c=null==n||null===(o=n.response)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(r=l.data)||void 0===r?void 0:r.errorMessage)||(null==n?void 0:n.message)||null;an.set({startDateTime:null==n||null===(a=n.response)||void 0===a||null===(u=a.data)||void 0===u?void 0:u.scheduleStartDate,endDateTime:null==n||null===(s=n.response)||void 0===s||null===(d=s.data)||void 0===d?void 0:d.scheduleEndDate}),function(e,n,t,o){var i,l,r=Date.now(),a=null===(i=an.get())||void 0===i?void 0:i.scheduleStartTimeMs,u=null===(l=an.get())||void 0===l?void 0:l.scheduleEndTimeMs,s=function(e,n,t,o){var i;e<0?i=h.getLocalisation("eventNotStarted")||o||"Game starts in":(n>0||"VIDEO_NOT_EXISTS"==t)&&(i=h.getLocalisation("eventEnded")||o||"Game has ended");return i||o}(r-a,r-u,n,t);if(document.getElementsByClassName("error-container")[0]){var d=document.getElementsByClassName("error-message")[0];d&&(d.textContent="".concat(s));var c=document.getElementsByClassName("error-timer-message")[0];c&&un(Math.abs(a),rn,o,c)}else{var v=document.getElementById(e).parentElement;if(v){var f=document.createElement("div");f.className="error-container";var p=document.createElement("div");p.className="error-message";var m=document.createElement("div");m.className="error-timer-message",p.textContent="".concat(s),f.appendChild(p),f.appendChild(m),v.append(f),un(Math.abs(a),rn,o,m)}}}(e,c,v,t)};function dn(n,t){var o=t.scheduleEndDate,i=t.scheduleStartDate;an.set({startDateTime:i,endDateTime:o}),on&&clearInterval(on),on=setInterval(function(){var t,o=Date.now(),i=null===(t=an.get())||void 0===t?void 0:t.scheduleEndTimeMs;if(console.log("scheduleEndTimeMs",i),i&&o>i){var l;console.log("Game ended");var r=m.getPlayer(n);if(e.isPlayerInitialised(n)&&r){var a;r.dispose(),console.log("Player disposed");var u=null===(a=document.getElementsByClassName("vl-container"))||void 0===a?void 0:a[0],s=document.createElement("video");s.id=n,s.className="video-js",s.style.width="100%",s.style.height="100%",u&&u.appendChild(s)}var d=h.getLocalisation("eventEnded")||"Game has ended",c=null===(l=document.getElementsByClassName("error-container"))||void 0===l?void 0:l[0];if(c){var v=c.querySelector(".error-message");v&&(v.textContent=d)}else{var f=document.getElementById(n),p=null==f?void 0:f.parentElement;if(p){(c=document.createElement("div")).className="error-container";var g=document.createElement("div");g.className="error-message",g.textContent=d,c.appendChild(g),p.append(c)}}clearInterval(on)}},1e3)}function cn(e,n){return vn.apply(this,arguments)}function vn(){return(vn=t(o.mark(function n(t,i){var l,r,a,u,s,d,c,v,f;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=i.resolve,u=i.reject,s=null==t?void 0:t.videoId,d=null==t?void 0:t.playerId,c=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:v=n.sent,f=!1===(null==t||null===(l=t.customData)||void 0===l||null===(r=l.ads)||void 0===r?void 0:r.isSSAIEnabled),e.getVideoDetails(s,v,f).then(function(n){var o,i,l,r,f,p,m,g,h,y,b;window.contentType=null==n||null===(o=n.data)||void 0===o||null===(i=o.video)||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.contentType,e.setCurrentVideo(null==n?void 0:n.data);var w=null==n||null===(r=n.data)||void 0===r||null===(f=r.video)||void 0===f||null===(p=f.gist)||void 0===p?void 0:p.scheduleEndDate,k=null==n||null===(m=n.data)||void 0===m||null===(g=m.video)||void 0===g||null===(h=g.gist)||void 0===h?void 0:h.scheduleStartDate;dn(d,{scheduleEndDate:w,scheduleStartDate:k});var S=null==n?void 0:n.data;if(null!=t&&null!==(y=t.watchHistory)&&void 0!==y&&y.isExternal)S.contentType="video",Xe(d,{res:S},t,{resolve:a,reject:u});else if(null!=t&&t.watchHistory&&null!=t&&null!==(b=t.watchHistory)&&void 0!==b&&b.enable&&!c){var E;if((null===(E=t.watchHistory)||void 0===E?void 0:E.saveOffline)||!1){var D,T,I,C=Pe((null===(D=t.watchHistory)||void 0===D?void 0:D.profileId)||"",s,null==t?void 0:t.siteOwner);if(C&&C.length)t.watchHistoryResumeTime=(null===(T=C[0])||void 0===T?void 0:T.watchedTime)||null,t.watchedPercentage=(null===(I=C[0])||void 0===I?void 0:I.watchedPercentage)||null;S.contentType="video",Xe(d,{res:S},t,{resolve:a,reject:u})}else e.getVideoInfo(s,v).then(function(e){var n,o,i,l,r,a;null!==(n=window)&&void 0!==n&&null!==(o=n.watchHistory)&&void 0!==o&&o.cb&&(null===(i=window)||void 0===i||null===(l=i.watchHistory)||void 0===l||l.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,S.contentType="video"}).catch(function(){}).finally(function(){Xe(d,{res:S},t,{resolve:a,reject:u})})}else Xe(d,{res:S},t,{resolve:a,reject:u})}).catch(function(n){var o,i,l=(null==t||null===(o=t.event)||void 0===o?void 0:o.showScheduleTimer)||!1,r=(null==t||null===(i=t.event)||void 0===i?void 0:i.onCountdownComplete)||null;l&&sn(d,n,r),e.initiateErrorHandling(n,d,u,s)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function fn(e,n){return pn.apply(this,arguments)}function pn(){return(pn=t(o.mark(function n(t,i){var l,r,a,u,s,d,c,v;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=i.resolve,u=i.reject,n.next=3,e.getToken();case 3:s=n.sent,d=null==t?void 0:t.playerId,c=null==t?void 0:t.epg,v=!1===(null==t||null===(l=t.customData)||void 0===l||null===(r=l.ads)||void 0===r?void 0:r.isSSAIEnabled),e.getLinearChannelDetails(c,s,v).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==c?void 0:c.channelId,Xe(d,{res:n},t,{resolve:a,reject:u})}).catch(function(n){e.initiateErrorHandling(n,d,u,videoId)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function mn(e,n){return gn.apply(this,arguments)}function gn(){return(gn=t(o.mark(function n(t,i){var l,r,a,u,s,d,c;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=i.resolve,a=i.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,d=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(d)),c=null==t||null===(l=t.series)||void 0===l?void 0:l.id,e.getSeriesDetails(c,u).then(function(n){var o,i,l,d=n.data,v=n.data.seasons;e.setCurrentSeries(v);var f=videoId||(null==v||null===(o=v[0])||void 0===o||null===(i=o.episodes)||void 0===i||null===(l=i[0])||void 0===l?void 0:l.id);e.createSeriesWatchMap(c,u),e.getVideoDetails(f,u).then(function(n){var o,i,l;window.contentType=null==n||null===(o=n.data)||void 0===o||null===(i=o.video)||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.contentType,e.setCurrentVideo(n.data),Xe(s,{res:null==n?void 0:n.data,sres:d},t,{resolve:r,reject:a})}).catch(function(n){e.initiateErrorHandling(n,s,a,videoId)})}).catch(function(n){e.initiateErrorHandling(n,s,a)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}var hn,yn=function(n){var t=n.site,o=n.sseBaseUrl,i=n.sseEndpoint,l=n.debug,r=void 0!==l&&l;return k.createSSETransport({site:t,sseBaseUrl:o,getToken:e.getToken,sseEndpoint:i,onOpen:function(e){var n=e.userId,t=e.endpoint;r&&console.log("SSE Connected:",n,t)},onMessage:function(n){var t,o,i,l,a,u,s,d,c,v;if(r&&console.log("SSE Message:",n),(null===(t=e.getCurrentVideo())||void 0===t||null===(o=t.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.id)===(null==n||null===(l=n.payload)||void 0===l?void 0:l.id)&&"GAME_STATE_CHANGE"===(null==n?void 0:n.notificationType)){var f=1e3*(null==n||null===(a=n.payload)||void 0===a||null===(u=a.states)||void 0===u||null===(s=u.live)||void 0===s?void 0:s.startDateTime),p=1e3*(null==n||null===(d=n.payload)||void 0===d||null===(c=d.states)||void 0===c||null===(v=c.end)||void 0===v?void 0:v.endDateTime);f&&p&&(console.log("Setting schedule timer",f,p),an.set({startDateTime:f,endDateTime:p}))}},onReconnectAttempt:function(e){r&&console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;r&&console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){r&&console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){r&&console.error("SSE Error:",e,n)},onClose:function(){r&&console.log("SSE Closed")}})},bn=function(e){var n=e.enable,t=e.site,o=e.sseBaseUrl,i=e.sseEndpoint,l=e.debug;if(n){var r=yn({site:t,sseBaseUrl:o,sseEndpoint:i,debug:void 0!==l&&l});return r._sseBaseUrl=o,r._site=t,r._sseEndpoint=i,r}};function wn(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 kn(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?wn(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):wn(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}module.exports=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:c.onTimeUpdate,getVideoDuration:c.getVideoDuration,onVideoEnded:c.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var i=t(o.mark(function t(i,l){var r,a,u,s,d,c,v,f,p,g,y,b,w,k,E,D,T,I,C,P,O,j,x,_,R,A,M,N,V,U,B,q;return o.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=3;break}return i({status:!0,msg:"Player already initialised",skipped:!0}),t.abrupt("return");case 3:if(C=(null==n?void 0:n.videoSourceUrl)||!1,P=null==n?void 0:n.asat,O=(null==n||null===(r=n.epg)||void 0===r?void 0:r.enable)||!1,j=null==n?void 0:n.videoId,x=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,_=(null==n?void 0:n.streamingInfo)||!1,window.videoId=j,R=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=18;break}if(sessionStorage.setItem("vlp_token",R),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),R&&!e.isTokenExpired(R)){t.next=17;break}return l({status:!1,msg:"".concat(R?"Token is expired !":"Missing Authorization Token"),response:{token:R}}),t.abrupt("return");case 17:hn=JSON.parse(atob(R.split(".")[1]));case 18:return window.siteName=null===(u=hn)||void 0===u?void 0:u.site,window.siteId=null===(s=hn)||void 0===s?void 0:s.siteId,n.isAnonymousUser=!(null===(d=hn)||void 0===d||!d.anonymousId),n.siteOwner=(null===(c=hn)||void 0===c?void 0:c.site)||null,n.userId=(null===(v=hn)||void 0===v?void 0:v.userId)||null,e.setUserId((null===(f=hn)||void 0===f?void 0:f.userId)||(null===(p=hn)||void 0===p?void 0:p.anonymousId)||null),window.watchHistory=n.watchHistory||null,A=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(g=n.series)&&void 0!==g&&g.enable?null:null==n?void 0:n.chromecastReceiverId,M=(null==n||null===(y=n.analytics)||void 0===y?void 0:y.gaId)||null,(N=null==n?void 0:n.errors)&&(window.customErrors=N),window.customData=null==n?void 0:n.customData,h.setLocalisation(null==n||null===(b=n.customData)||void 0===b?void 0:b.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!m.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),e.playerConfigManager.setConfig(n),S.relatedVideosManager.reset(),S.relatedVideosManager.set(null==n?void 0:n.relatedVideos),t.next=39,W(n);case 39:M&&L("https://www.googletagmanager.com/gtag/js?id=".concat(M)).then(function(){return e.runGtag(M)}).catch(function(e){}),(V=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(A)))&&V.addEventListener("contextmenu",function(e){return e.preventDefault()}),(U=bn({enable:null==n||null===(k=n.sse)||void 0===k?void 0:k.enable,site:null==n||null===(E=n.sse)||void 0===E?void 0:E.siteName,sseBaseUrl:null==n||null===(D=n.sse)||void 0===D?void 0:D.sseBaseUrl,sseEndpoint:null==n||null===(T=n.sse)||void 0===T?void 0:T.sseEndpoint,debug:null==n||null===(I=n.sse)||void 0===I?void 0:I.debug}))&&!U.isConnectionActive()&&U.connect(),C?(q={directPlaybackUrl:C,id:B="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},P?e.getVideoDetails(B,R).then(function(e){var t=(null==e?void 0:e.data)||{};Xe(A,{res:kn(kn({},t),q)},n,{resolve:i,reject:l})}).catch(function(n){e.initiateErrorHandling(n,A,l,B)}):Xe(A,{res:q},n,{resolve:i,reject:l})):_?nn(n,{resolve:i,reject:l}):x?mn(n,{resolve:i,reject:l}):O?fn(n,{resolve:i,reject:l}):cn(n,{resolve:i,reject:l});case 45:case"end":return t.stop()}},t)}));return function(e,n){return i.apply(this,arguments)}}())},getRenditions:f.getRenditions,skip:e.skip,getPlayer:m.getPlayer,play:e.play,pause:e.pause,detectBrowser:g.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:c.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:v.enableCaptions,disableCaptions:v.disableCaptions,getCaptions:v.getCaptions,playSelectedResolution:p.playSelectedResolution,getSource:e.getSource,setVolume:N,getVolume:V,disableControls:e.disableControls,setPlaybackSpeed:c.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,getSsaiEvents:e.getSsaiEvents,playerEvents:c.playerEvents,onReplay:c.onReplay,relatedVideosManager:S.relatedVideosManager}};
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-9239e4ef.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/regenerator"),o=require("video.js"),l=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/get"),u=require("@babel/runtime/helpers/inherits"),s=require("@babel/runtime/helpers/possibleConstructorReturn"),d=require("@babel/runtime/helpers/getPrototypeOf"),c=require("./util-9e6f986e.js"),v=require("./captions-d98c49d6.js"),p=require("./renditions-6554142b.js"),f=require("./resolution-4c007d14.js"),m=require("./skin-e0cf4554.js"),g=require("./browser-77c57718.js"),h=require("./localisation-56e0a999.js"),y=require("@babel/runtime/helpers/typeof");require("@viewlift/comscore/index.js");var b=require("@babel/runtime/helpers/toConsumableArray"),w=require("@babel/runtime/helpers/slicedToArray"),k=require("@viewlift/sse"),S=require("./relatedVideosManager-0a220d05.js");function E(e,n,t,i){var o=a(d(1&i?e.prototype:e),n,t);return 2&i&&"function"==typeof o?function(e){return o.apply(t,e)}:o}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(T=function(){return!!e})()}require("axios"),require("md5"),require("js-cookie"),require("@babel/runtime/helpers/assertThisInitialized");var D=o.getComponent("TextTrackSettings"),I=o.dom,C=[{value:"12",label:"12px"},{value:"14",label:"14px"},{value:"16",label:"16px"},{value:"18",label:"18px"},{value:"20",label:"20px"},{value:"24",label:"24px"},{value:"28",label:"28px"},{value:"32",label:"32px"}],O=C.map(function(e){return e.value}),P="16",j="vlp-caption-font-size-px",x="vlp-caption-font-size-style",R=".vjs-font-percent > select",A=function(e){return-1!==O.indexOf(e)?e:P},L=null;D?(L=function(){u(i,D);var e,n,t=(e=i,n=T(),function(){var t,i=d(e);if(n){var o=d(this).constructor;t=Reflect.construct(i,arguments,o)}else t=i.apply(this,arguments);return s(this,t)});function i(e,n){var o;return l(this,i),(o=t.call(this,e,n)).customUiReady_=!0,o.applyCustomFontSizeUI_(),o}return r(i,[{key:"applyCustomFontSizeUI_",value:function(){this.replaceFontSizeOptions_(),this.bindFontSizeChange_(),this.restoreCustomFontSize_()}},{key:"replaceFontSizeOptions_",value:function(){var e=this.$(R);if(e){for(;e.firstChild;)e.removeChild(e.firstChild);C.forEach(function(n){e.appendChild(I.createEl("option",{value:n.value,textContent:n.label}))}),e.value=P}}},{key:"bindFontSizeChange_",value:function(){var e=this,n=this.$(R);n&&this.on(n,"change",function(){return e.applyFontSize_(n.value)})}},{key:"applyFontSize_",value:function(e){var n=A(e);if("undefined"!=typeof document){var t=document.getElementById(x);t||((t=document.createElement("style")).id=x,document.head.appendChild(t)),t.textContent=[".vjs-text-track-cue,",".vjs-text-track-cue > div,",".vjs-text-track-display-ttml,",".vjs-text-track-display-ttml span,",".vjs-text-track-display-ttml div","{ font-size: ".concat(n,"px !important; line-height: normal !important; }")].join(" ")}}},{key:"restoreCustomFontSize_",value:function(){var e=null;try{e=window.localStorage.getItem(j)}catch(e){}var n=A(e),t=this.$(R);t&&(t.value=n),this.applyFontSize_(n)}},{key:"getValues",value:function(){var e=E(i,"getValues",this,3)([]);return e&&delete e.fontPercent,e||{}}},{key:"setDefaults",value:function(){if(E(i,"setDefaults",this,3)([]),this.customUiReady_){var e=this.$(R);e&&(e.value=P),this.applyFontSize_(P)}}},{key:"saveSettings",value:function(){if(E(i,"saveSettings",this,3)([]),this.options_&&this.options_.persistTextTrackSettings){var e=this.$(R);if(e)try{window.localStorage.setItem(j,A(e.value))}catch(e){}}}},{key:"handleLanguagechange",value:function(){E(i,"handleLanguagechange",this,3)([]),this.applyCustomFontSizeUI_()}}]),i}(),o.registerComponent("TextTrackSettings",L)):console.warn("[vlp] CustomTextTrackSettings: video.js TextTrackSettings is not registered; skipping override.");var N=function(e){return new Promise(function(n,t){if(M(e))t("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!0,i.src=e,i.onload=function(){n()},i.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(i)}})},M=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},_=function(e,n,t){var i=m.getPlayer(e);if(i)if(n>=0&&n<=100){i.muted()&&i.muted(!1);var o=parseFloat(n)/100;i.volume(o),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,"'")})},B=function(e){var n=m.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},V=function(){var e=t(i.mark(function e(n){var t,l,r,a,u;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l=m.getPlayer(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 a=e.sent,e.prev=5,e.next=8,N("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,a.default(o),e.finish(13);case 16:(u=o.getTech("chromecast"))&&!u.prototype.seeking&&(u.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.cast?null==l||l.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.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.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==g.detectBrowser()?null==l||l.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)}}(),U=function(e,n){var t=m.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,i,l,r,a,u=this.el(),s=o.dom.getPointerPosition(u,n).x;o.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(i=t.cast)||void 0===i||null===(l=i.framework)||void 0===l||null===(r=l.CastContext)||void 0===r||null===(a=r.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),p=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=p*s,v.seek()}})};var q=function(){var e=t(i.mark(function e(){return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),N("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)}}(),F=function(){var n=t(i.mark(function n(){return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,import("@viewlift/comscore/index.js").then(function(n){e.comscoreInstanceManager.set(n)});case 2:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}(),H=function(){var e=t(i.mark(function e(){return i.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){o.getPlugin("eme")||o.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),z=function(){var e=t(i.mark(function e(){var n;return i.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(o),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)}}(),G=function(){var e=t(i.mark(function e(){return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./index-84cce26a.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)}}(),Y=function(){var e=t(i.mark(function e(){return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./videojs-dash5.es-072614bc.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)}}(),K=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){N("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(o)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(o)})},loadAdsLibrary:q,loadEMELibrary:H,loadMuxPlugin:z,loadDvrSeekbar:G,loadContribDash:Y,loadComscorePlugin:F});function W(e){return $.apply(this,arguments)}function $(){return($=t(i.mark(function e(n){var t;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,q();case 3:t&&"Safari"==g.detectBrowser()&&Promise.resolve().then(function(){return K}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function J(e){return X.apply(this,arguments)}function X(){return(X=t(i.mark(function e(n){var t,o,l,r,a,u,s,d,c,v;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return v=m.getPlayer(n.playerId),e.next=3,F();case 3:v.comscore({publisherId:null==n||null===(t=n.comscore)||void 0===t?void 0:t.publishedId,endpoint:null==n||null===(o=n.comscore)||void 0===o?void 0:o.endpoint,applicationName:(null==n||null===(l=n.comscore)||void 0===l?void 0:l.applicationName)||(null===(r=window)||void 0===r?void 0:r.siteName)||null,implementationId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.implementationId,projectId:null==n||null===(u=n.comscore)||void 0===u?void 0:u.projectId,debug:(null==n||null===(s=n.comscore)||void 0===s?void 0:s.debug)||!1,persistentLabels:(null==n||null===(d=n.comscore)||void 0===d?void 0:d.persistentLabels)||{},metadata:(null==n||null===(c=n.comscore)||void 0===c?void 0:c.metadata)||{}});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Q(e,n){return Z.apply(this,arguments)}function Z(){return(Z=t(i.mark(function e(n,t){var o,l,r,a,u,s,d,c,v,p,f,m,h,y;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return v=(null==t?void 0:t.contentType)||"video",p=null==t||null===(o=t[v])||void 0===o?void 0:o.drmEnabled,null==t||null===(l=t[v])||void 0===l||null===(r=l.liveDetails)||void 0===r||r.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==t||null===(a=t[v])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,m=(null==n||null===(d=n.comscore)||void 0===d?void 0:d.enable)||!1,h=!(null==n||null===(c=n.analytics)||void 0===c||!c.muxKey),e.prev=7,e.next=10,Promise.allSettled([p?"Safari"==g.detectBrowser()?H():"caliente"!=(null===(y=window)||void 0===y?void 0:y.siteName)?Y():H():"Safari"!=g.detectBrowser()&&f?Y():null,m?J(n):null,h?z():null,V(n)]);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),console.log("Error",e.t0);case 15:case"end":return e.stop()}},e,null,[[7,12]])}))).apply(this,arguments)}function ee(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 ne(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ee(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var te=new Set,ie=null,oe=function(n,t,i,o){var l,r,a,u,s,d,c,v={},p=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(l=n[p])||void 0===l?void 0:l.id)||"Null",v["c3.cm.contentType"]=ce(n),v[null==i||null===(r=i.Constants)||void 0===r?void 0:r.IS_LIVE]=!(null==n||!n.linearchannel),v[null==i||null===(a=i.Constants)||void 0===a?void 0:a.STREAM_URL]=t.currentSrc(),v[null==i||null===(u=i.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),v["c3.cm.categoryType"]=ue(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===(s=n[p])||void 0===s?void 0:s.drmEnabled)||"None",v.DAIStream=null!==(d=n[p])&&void 0!==d&&null!==(c=d.gist)&&void 0!==c&&c.isSSAIEnabled?"YES":"NO",v[i.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=se(n),v["c3.cm.genreList"]=re(n),v["c3.cm.genre"]=le(n),v["c3.cm.channel"]=ae(n,o);var f=fe(e.getCurrentSeries(),n);return v=ne(ne({},v),f)},le=function(e){var n,t,i,o=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[o])||void 0===n||null===(t=n.gist)||void 0===t||null===(i=t.primaryCategory)||void 0===i?void 0:i.title)||"Null"},re=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"},ae=function(e,n){var t,i,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null===(i=((null==e||null===(t=e[o])||void 0===t?void 0:t.channels)||[]).find(function(e){return(null==e?void 0:e.id)===(null==n?void 0:n.channelId)}))||void 0===i?void 0:i.title)||"NULL"},ue=function(e){var n,t;return null!=e&&e.linearchannel?"Linear Channel":null!=e&&null!==(n=e.video)&&void 0!==n&&null!==(t=n.streamingInfo)&&void 0!==t&&t.isLiveStream?"Live Event":"VOD"},se=function(e){var n,t,i=(null==e?void 0:e.contentType)||"video",o=(null==e||null===(n=e[i])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return o?"YES":"NO"},de=function(e,n){var t,i,o=(n||{}).epg;if(o&&null!=o&&o.enable&&null!=o&&o.programTitle)return o.programTitle;var l=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(t=e[l])||void 0===t||null===(i=t.gist)||void 0===i?void 0:i.title)||"Null";return"".concat(r)},ce=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var ve,pe,fe=function(n,t){var i,o,l,r,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return u;var s=e.getSeasonNumber(),d=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(i=t.video)||void 0===i||null===(o=i.series)||void 0===o?void 0:o.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==n||null===(l=n[s-1])||void 0===l||null===(r=l.episodes)||void 0===r||null===(a=r[d-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},me=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"}},ge=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},he=function(){var n=t(i.mark(function n(t,o){var l,r,a,u,s,d,c,v,p,f,g,h;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(l=(null==o?void 0:o.convivaConfig)||{},r=l.trackConvivaPlayerEvent,a=l.paymentHandler,u=l.tveProvider,s=l.enable,d=l.appName,v=(c=o||{}).token,p=c.epg,s){n.next=4;break}return n.abrupt("return");case 4:if(f=m.getPlayer(t),"function"==typeof(g=r)){n.next=8;break}return n.abrupt("return");case 8:return n.next=10,g("getConvivaObject");case 10:if(h=n.sent){n.next=13;break}return n.abrupt("return");case 13:f.ready(function(){var e=f.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var i=me(t.keySystem);g("contentInfo",{DRMEnabled:i})}else g("contentInfo",{DRMEnabled:"None"})}),n||g("contentInfo",{DRMEnabled:"None"})}),f.on("loadstart",function(){var n,t;ie&&ie!==f.currentSrc()&&g("playbackEnded"),g("setPlayer",f),te.clear(),ie=f.currentSrc();var i=ge(f.currentType()),l=e.getCurrentVideo(),r=oe(l,f,h,p);r[null==h||null===(n=h.Constants)||void 0===n?void 0:n.PLAYER_NAME]=d||"WEB",r[null==h||null===(t=h.Constants)||void 0===t?void 0:t.ASSET_NAME]=de(l,o),r.authToken=v||"NULL",r.streamType=i,r.D2CType=a||"NONE",r.subscriberType=u?"MVPD":"FREE"!==a?"D2C":"FREE",r["c3.cm.affiliate"]=u||"NULL",ye.setData(r),g("contentInfo",r)}),f.on("loadedmetadata",function(){var e,n=f.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),g("contentInfo",{screenResolution:e})}),f.on("play",function(){te.has(f.currentSrc())||(te.add(f.currentSrc()),g("playbackStarted",null))}),f.on("ended",function(){te.has(f.currentSrc())&&te.delete(f.currentSrc()),g("playbackEnded")}),f.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&g("initAdSensor",{player:f,adsLoader:null==e?void 0:e.adsLoader})}),f.on("dispose",function(){null==te||te.clear(),g("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),ye=(ve={},{setData:function(e){ve=ne(ne({},ve),e)},getData:function(){return ve}}),be=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-44f02ee1.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-0a5108bb.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-100893d4.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-f1d45f1d.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-dfd8c833.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?Promise.resolve().then(function(){return require("./skin-1f6f448c.js")}).then(function(t){t.initialiseSkin(e,n)}):"news"==t?Promise.resolve().then(function(){return require("./skin-a36d0fae.js")}).then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?Promise.resolve().then(function(){return require("./skin-f33e77ad.js")}).then(function(t){t.initialiseSkin(e,n)}):"mini"==t&&Promise.resolve().then(function(){return require("./skin-7e8c618e.js")}).then(function(t){t.initialiseSkin(e,n)})};function we(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 ke(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?we(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):we(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var Se=[],Ee=0,Te=null;function De(){pe=null,Se=[],Ee=0,Te=null}function Ie(t,i,o){var l,r,a,u,s,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==i||null===(l=i.watchHistory)||void 0===l||l.apiVersion;var c=null==i||null===(r=i.watchHistory)||void 0===r?void 0:r.profileId,v=Math.floor(t.currentTime()),p=Math.floor(t.duration());null==i||null===(a=i.watchHistory)||void 0===a||a.xapiKey;var f=(null==i||null===(u=i.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==i||null===(s=i.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,g=Math.floor(t.currentTime()),h=d?100:Math.floor(v/p*100),y={};m?function(t,i,o){var l=i?"watchhistory-data-".concat(i):"watchhistory-data-guest-".concat(o),r=Ce(l),a=(new Date).getTime(),u=e.getCurrentVideo(),s=(null==u?void 0:u.video)||{},d=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return ke(ke({},e),{},n({},t,s[t]))},{}),c=r.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===pe});c<0?r.push(ke(ke({content:d},t),{},{addedDate:a,updateDate:a})):r[c]=ke(ke(ke({},r[c]),t),{},{updateDate:a});localStorage.setItem("".concat(l),JSON.stringify(r))}(y={completed:d,watchedTime:g,watchedPercentage:h},c,i.siteOwner):(y=ke(ke({videoId:pe,watchedTime:g,watchedPercentage:h,doneWatching:d,profileId:c},Te&&{seriesId:Te}),f&&{originalObjectId:f}),e.saveWatchHistory(y).then(function(e){}).catch(function(e){})),Ee=v+o}function Ce(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function Oe(e,n,t){var i=Ce(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),o=[];return i&&Array.isArray(i)&&(o=i.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),o}var Pe=!1,je=function(n,t){var i,o,l=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(i=n[l])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!Pe){var r=xe(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(r,t);return a&&e.loadVideo(t,a),Pe=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function xe(e,n,t){if(Array.isArray(e))return e.map(function(e){return xe(e,n,t)});if(null!==e&&"object"===y(e)){var i={};return Object.keys(e).forEach(function(o){o===n&&void 0!==e[t]?i[o]=e[t]:o===t&&void 0!==e[n]?i[o]=e[n]:i[o]=xe(e[o],n,t)}),i}return e}function Re(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 Ae(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)?Ae(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}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 l,r=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return r=e.done,e},e:function(e){a=!0,l=e},f:function(){try{r||null==t.return||t.return()}finally{if(a)throw l}}}}function Ae(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}function Le(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 Ne(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Le(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var Me=function(n,t,i,o){var l,r,a,u,s,d=o.res,c=o.sres,p=m.getPlayer(n),f=(null==d?void 0:d.contentType)||"video",h=(null==d||null===(l=d[f])||void 0===l?void 0:l.drmEnabled)||!1,b=!(null==d||null===(r=d[f])||void 0===r||null===(a=r.streamingInfo)||void 0===a||!a.isLiveStream)||"linearchannel"===f,w=(null==d||null===(u=d[f])||void 0===u||null===(s=u.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;e.setCurrentVideo(d),e.videoReplayTracker.set(d),p&&(p.on("loadstart",function(){b?i.resolve({status:!0,msg:"Video Loaded",response:d}):i.resolve(Ne({status:!0,msg:"Player Initialised"},c?{seriesResponse:c,response:d}:{response:d}))}),p.on("loadeddata",function(){var i,o,l,r=v.getCaptions(n);if(null==r||r.map(function(e){return v.disableCaptions(n,e.id)}),w&&"Safari"===g.detectBrowser())try{var a;null==p||null===(a=p.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==p||!p.muted())&&_(n,sessionStorage.getItem("volume")||"100");var u=e.getCurrentVideo();if(e.initialiseComscoreStreamingTracking(t),e.clearError(),null!=t&&t.watchHistory&&null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.enable&&(!t.isAnonymousUser||null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.saveOffline)){var s,c,f=Ne(Ne({},t),d);!function(e,n,t){var i,o,l;null!=n&&n.series&&null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable&&(Te=null==n||null===(o=n.series)||void 0===o?void 0:o.id),Se=[],Ee=0,pe=t;var r=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,a=m.getPlayer(e);a&&(a.on("dispose",De),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());Se.includes(Ee)||(e!=Ee||e<r?e>Ee&&(Ee=e+r):(Se.push(e),Ie(a,n,r)))}}),a.one("ended",function(){Ie(a,n,r,!0)}))}(n,f,null==u||null===(s=u.video)||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.id)}if(null!=t&&null!==(l=t.analytics)&&void 0!==l&&l.muxKey&&null!=p&&p.mux){var h,y,b,k,S,E,T=(null===(h=e.getCurrentVideo())||void 0===h?void 0:h.video)||(null==d?void 0:d.video),D=null==T?void 0:T.gist,I={env_key:null==t||null===(y=t.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(b=window)||void 0===b?void 0:b.vl_player_version,video_id:null==D?void 0:D.id,video_title:null==D?void 0:D.title,video_series:null==T||null===(k=T.series)||void 0===k?void 0:k.title,video_stream_type:null!=T&&null!==(S=T.streamingInfo)&&void 0!==S&&S.isLiveStream?"live":"video",viewer_user_id:null==t||null===(E=t.analytics)||void 0===E?void 0:E.userId};p.mux({debug:!1,data:I})}}),p.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];p.trigger("subtitlechanged",n)}),p.on("subtitlechanged",function(e,n){var t,i,o,l,r,a,u,s,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=null===(t=window)||void 0===t||null===(i=t.cast)||void 0===i||null===(o=i.framework)||void 0===o||null===(l=o.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S,f=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(d=s.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var m,g=f.getMediaSession(),h=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),p.tech_.on("retryplaylist",function(){b&&je(d,n)}),p.on("error",function(){var t,o;(console.log("ERROR",p.error(),p.error().code),4===p.error().code&&b)?je(d,n):(e.handleError(n,(null==p||null===(t=p.error())||void 0===t?void 0:t.message)||"Some error occured"),i.reject({status:!1,msg:(null==p||null===(o=p.error())||void 0===o?void 0:o.message)||"Some error occured",response:d}))}),p.one("play",function(){var n,i,o,l,r;if(null===(n=window)||void 0===n||null===(i=n.app_data)||void 0===i||null===(o=i.appcmsMain)||void 0===o||null===(l=o.adsConfig)||void 0===l||!l.vodAdClientSideTracking){if(null!=t&&null!==(r=t.series)&&void 0!==r&&r.enable){var a,u,s,d=null===(a=e.getCurrentVideo())||void 0===a||null===(u=a.video)||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.id,c=e.getSeriesWatchMap(),v=(null==c?void 0:c.get(d))||{t:0,p:0},f=v.t,m=v.p;f&&m<95&&setTimeout(function(){p.currentTime(f)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){p.currentTime(null==t?void 0:t.watchHistoryResumeTime)},0);if(null!=p&&p.dvrSeekbar)try{p.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),p.on("volumechange",function(){var e=100*p.volume().toFixed(2);p.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),p.on("chromecastDisconnected",function(){if(b){p.currentSource();for(var e=p.textTracks(),n=e.length-1;n>=0;n--)p.removeRemoteTextTrack(e[n])}}),p.one("loadeddata",function(){var e,n=(null==p||null===(e=p.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),i=(n.language||n.label||"").toUpperCase();return t<i?-1:t>i?1:0}),"object"==y(p.dash)){var t,i,o,l=null==p||null===(t=p.dash)||void 0===t||null===(i=t.mediaPlayer)||void 0===i?void 0:i.getTracksFor("audio"),r=null==l?void 0:l.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=Re(n);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(r&&(null==u?void 0:u.id)=="dash-audio-".concat(r.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,d=Re(n);try{for(d.s();!(s=d.n()).done;){var c,v,f,m=s.value;if(("Chrome"==g.detectBrowser()||"Edge"==g.detectBrowser()&&(null!==(c=navigator)&&void 0!==c&&null!==(v=c.userAgent)&&void 0!==v&&v.includes("Macintosh")||!h))&&null!=m&&null!==(f=m.label)&&void 0!==f&&f.includes("5.1"))p.audioTracks().removeTrack(m);else{if("main"==m.kind){m.enabled=!0;break}m.enabled=!1}}}catch(e){d.e(e)}finally{d.f()}}}))};function _e(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 Be(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):_e(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var Ve={debug:5,info:4,warn:3,error:2,fatal:1,none:0,off:0,DEBUG:5,INFO:4,WARN:3,ERROR:2,FATAL:1,NONE:0,OFF:0},Ue=function(l,r,a,u){var s,d,c,p,f,h,y,b,w,k,S,E,T,D,I,C,O,P,j,x,R,A,L,N,M,_,B,V,q,F,H,z,G,Y,K,W,$,J,X=r.res,Z=void 0===X?null:X,ee=r.sres,ne=void 0===ee?null:ee,te=function(){try{var e,n,t=new URLSearchParams((null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.search)||""),i=t.get("loglevel")||null;return{playerDebug:"true"===t.get("playerdebug"),logLevel:i,dashLogLevel:null!=i&&null!=Ve[i]?Ve[i]:5}}catch(e){return{playerDebug:!1,logLevel:null,dashLogLevel:5}}}(),ie=te.playerDebug,oe=te.logLevel,le=te.dashLogLevel;ie&&(console.log("[PLAYER DEBUG] config:",a),console.log("[PLAYER DEBUG] entitlement (res):",Z),ne&&console.log("[PLAYER DEBUG] series response (sres):",ne));var re=null!=a&&a.chromecastReceiverId?["chromecast","html5"]:["html5"],ae=(null===(s=Z)||void 0===s?void 0:s.contentType)||"video",ue=m.impolicy16x9(null===(d=Z)||void 0===d||null===(c=d[ae])||void 0===c||null===(p=c.gist)||void 0===p?void 0:p.videoImageUrl)||m.impolicy16x9(null===(f=Z)||void 0===f||null===(h=f[ae])||void 0===h||null===(y=h.gist)||void 0===y||null===(b=y.imageGist)||void 0===b?void 0:b.r16x9),se=(null===(w=Z)||void 0===w||null===(k=w[ae])||void 0===k||null===(S=k.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,de=!(null===(E=Z)||void 0===E||null===(T=E[ae])||void 0===T||null===(D=T.streamingInfo)||void 0===D||!D.isLiveStream)||"linearchannel"===ae,ce=(null===(I=Z)||void 0===I||null===(C=I.ads)||void 0===C||null===(O=C.preRoll)||void 0===O||null===(P=O.adTags)||void 0===P||null===(j=P.web)||void 0===j?void 0:j.active)&&(null===(x=Z)||void 0===x||null===(R=x.ads)||void 0===R||null===(A=R.preRoll)||void 0===A||null===(L=A.adTags)||void 0===L||null===(N=L.web)||void 0===N?void 0:N.url);Z=Be(Be({},Z),{},{audioAssetSource:null==a?void 0:a.audioAssetSource});var ve=(null==a||null===(M=a.customData)||void 0===M?void 0:M.ads)||{},pe=(null===(_=Z)||void 0===_||null===(B=_[ae])||void 0===B?void 0:B.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==ve?void 0:ve.vodAdSticherProvider)||!1,fe=!(null===(V=Z)||void 0===V||null===(q=V[ae])||void 0===q||!q.isSSAIEnabled)&&"TRANSMIT"==(null==ve?void 0:ve.liveAdSticherProvider)&&!(null==ve||!ve.liveAdClientSideTracking),me=(null==a?void 0:a.latency)||6,ge=(null==a?void 0:a.skin_settings)||{},we=($={enableSmoothSeeking:!0,controls:0!=(null==a?void 0:a.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==a?void 0:a.muted)||!1,autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==ge?void 0:ge.pictureInPictureToggle)||!1},playbackRates:null!=ge&&ge.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==a.skin,liveui:se},n($,"autoplay",null==a?void 0:a.autoplay),n($,"normalizeAutoplay",(null==a?void 0:a.autoplay)&&!ce),n($,"loop",(null==a?void 0:a.loop)||!1),n($,"audioPosterMode",null==a?void 0:a.audioPosterMode),n($,"html5",Be(Be({dash:Be(Be({},!o.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:Be(Be({},((null==a?void 0:a.debugConfig)&&(null==a||null===(F=a.debugConfig)||void 0===F?void 0:F.enable)||ie)&&{debug:{logLevel:le}}),{},{streaming:{delay:{liveDelay:me},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Be({},"IE"==g.detectBrowser()&&{enableStallFix:!0,stallSeek:1}),abr:Be(Be(Be(Be({},(null==a?void 0:a.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==a?void 0:a.initialBandwidth)/1e3}}),(null==a?void 0:a.maxBitrate)&&{maxBitrate:{audio:-1,video:(null==a?void 0:a.maxBitrate)/1e3}}),(null==a?void 0:a.minBitrate)&&{minBitrate:{audio:-1,video:(null==a?void 0:a.minBitrate)/1e3}}),{},{rules:{throughputRule:{active:!0},bolaRule:{active:!1},insufficientBufferRule:{active:!1},switchHistoryRule:{active:!1},droppedFramesRule:{active:!1},abandonRequestsRule:{active:!1}},autoSwitchBitrate:{video:!0,audio:!0}})}})}),vhs:Be(Be(Be({},(null==a?void 0:a.initialBandwidth)&&{bandwidth:a.initialBandwidth}),{},{liveRangeSafeTimeDelta:me,useDevicePixelRatio:!0,experimentalLLHLS:(null==a?void 0:a.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==a||!a.initialBandwidth},(null==a||null===(H=a.customData)||void 0===H?void 0:H.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(z=null==a?void 0:a.enableLowInitialPlaylist)&&void 0!==z&&z},((null==a?void 0:a.debugConfig)&&(null==a||null===(G=a.debugConfig)||void 0===G?void 0:G.enable)||ie)&&{debug:!0}),debug:(null==a?void 0:a.debugConfig)&&(null==a||null===(Y=a.debugConfig)||void 0===Y?void 0:Y.enable)||ie||!1,nativeTextTracks:"Safari"==g.detectBrowser()},0==(null==a||null===(K=a.customData)||void 0===K?void 0:K.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(W=a.customData)||void 0===W?void 0:W.nativeVideoTracks)&&{nativeVideoTracks:!1})),n($,"poster",ue),n($,"techOrder",re),n($,"chromecast",{requestCustomDataFn:function(n){var t,i,o=m.getPlayer(l),r=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),u=function(e,n,t){var i,o,l,r,a,u,s,d,c,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){var m,g,h,y,b,w,k,S;f.isDrmEnabled=!0;var E=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,T=(null==E?void 0:E.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(h=g[0])||void 0===h||null===(y=h.options)||void 0===y?void 0:y.serverURL);f.licenseUrl=T;var D=(null==E?void 0:E.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"]);f.licenseToken=D}var I=(null==e||null===(i=e[p])||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType)||"VIDEO";f.contentType=I;var C=null==e||null===(l=e[p])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;f.duration=C;var O=null==e||null===(a=e[p])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;f.mediaTitle=O;var P=null==e||null===(s=e[p])||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.videoImageUrl;return f.mediaImage=P,f.subTitles=t,f.DVR=(null==e||null===(c=e[p])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(f),f}(Z,n,r);return Be(Be({},u),{},{transmitTrackingUrl:e.trackingUrlManager.get()||null,convivaMetaData:Be({customerKey:(null==a||null===(t=a.convivaConfig)||void 0===t?void 0:t.customerKey)||null,debug:(null==a||null===(i=a.convivaConfig)||void 0===i?void 0:i.debug)||!1},ye.getData())})},modifyLoadRequestFn:function(e){var n,t,i,o,r,a=m.getPlayer(l),u=(null==a?void 0:a.currentSource())||{};!(null===(n=Z)||void 0===n||null===(t=n[ae])||void 0===t||null===(i=t.streamingInfo)||void 0===i||null===(o=i.videoAssets)||void 0===o?void 0:o.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(r=u.src)&&void 0!==r&&r.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),$);if(!o.getPlayers()[l]){(null!=a&&a.debugConfig&&null!=a&&null!==(J=a.debugConfig)&&void 0!==J&&J.enable||ie)&&o.log.level(oe||"debug");var ke=o(l,we,function(){var n=t(i.mark(function n(){var t,r,s,d,c,p,f,m,g,h,y,b,w,k,S,E,T,D,I,C,O,P;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(ke),console.log(o.VERSION),console.log(o.getPlugins()),n.next=5,Q(a,Z);case 5:if(null!=a&&a.debugConfig&&null!=a&&null!==(t=a.debugConfig)&&void 0!==t&&t.enable||ie){try{o.log.level(oe||"debug")}catch(e){}(w=function(){try{var e,n,t;null==ke||null===(e=ke.dash)||void 0===e||null===(n=e.mediaPlayer)||void 0===n||null===(t=n.updateSettings)||void 0===t||t.call(n,{debug:{logLevel:le}})}catch(e){}})(),ke.one("loadedmetadata",w)}if(k=null===(r=Z)||void 0===r||null===(s=r[ae])||void 0===s||null===(d=s.liveDetails)||void 0===d?void 0:d.startOverTime,de&&u.resolve(Be({status:!0,msg:"Player Initialised"},ne?{seriesResponse:ne,response:Z}:{response:Z})),e.inititateBeacon(l,{analyticsCb:null==a?void 0:a.analyticsCb,analyticsEventParams:null==a?void 0:a.analyticsEventParams,userId:null==a?void 0:a.userId}),he(l,a),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),se&&U(l,k),!ce||null!=a&&null!==(c=a.customData)&&void 0!==c&&c.disableAds||e.initialiseAdvertisement(l,ce,Z),S=e.getSource(Z,l),console.log(S),ie&&(console.log("[PLAYER DEBUG] source:",S),console.log("[PLAYER DEBUG] videojs options:",we)),null!=a&&a.nearestClusterUrl&&(S=e.getUpdatedClusterSource(S,a.nearestClusterUrl)),!pe){n.next=23;break}return n.next=20,e.getSGAIEnabledSource(l,Z);case 20:S=n.sent,n.next=27;break;case 23:if(!fe){n.next=27;break}return n.next=26,e.getTransmitEnabledSource(S,Z,l);case 26:S=n.sent;case 27:S?e.loadVideo(l,S):(u.reject({status:!1,msg:"Incompatible / Missing Source",response:Z}),e.handleError(l,"Incompatible / Missing Source")),((null===(p=Z)||void 0===p||null===(f=p[ae])||void 0===f||null===(m=f.contentDetails)||void 0===m||null===(g=m.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(h=Z)||void 0===h||null===(y=h[ae])||void 0===y||null===(b=y.closedCaptions)||void 0===b?void 0:b.length)>0)&&(P=(null===(T=Z)||void 0===T||null===(D=T[ae])||void 0===D||null===(I=D.contentDetails)||void 0===I?void 0:I.closedCaptions)||(null===(C=Z)||void 0===C||null===(O=C[ae])||void 0===O?void 0:O.closedCaptions),E=P.filter(function(e){return"VTT"===e.format}),v.addCaptions(l,E)),null!=a&&a.disableControls?e.disableControls(l):be(l,Be(Be(Be({},a),we),{},{liveVideo:de,isDvrEnabled:se,res:Z,sres:ne})),Me(l,Be(Be(Be({},a),we),{},{liveVideo:de}),u,{res:Z,sres:ne});case 31:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}};function qe(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(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):qe(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var He,ze=function(e,n){var t=n.resolve,i=n.reject,o=null==e?void 0:e.playerId,l=Ge(e);Ue(o,{res:l},e,{resolve:t,reject:i})},Ge=function(n){var t,i,o,l,r,a,u,s,d,c,v,p,f,m=null==n?void 0:n.streamingInfo,g=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,h=(null==n||null===(i=n.streamingInfo)||void 0===i?void 0:i.isDrmEnabled)||null,y=(null==n||null===(o=n.streamingInfo)||void 0===o||null===(l=o.ads)||void 0===l?void 0:l.url)||null,w=(null==n||null===(r=n.streamingInfo)||void 0===r?void 0:r.posterUrl)||null,k=(null==n||null===(a=n.streamingInfo)||void 0===a?void 0:a.subtitles)||[],S=(null==n||null===(u=n.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,E=(null==n||null===(d=n.streamingInfo)||void 0===d?void 0:d.macroMap)||[],T=(null==n||null===(c=n.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.isSSAIEnabled)||!1,D=null==n?void 0:n.token,I=e.getDecodedToken(D);null==I||I.site;var C=null==I?void 0:I.siteId,O=(null==n||null===(p=n.customData)||void 0===p||null===(f=p.comscore)||void 0===f?void 0:f.video)||null,P=Fe(Fe({id:"".concat(C,"_external")},!h&&{directPlaybackUrl:null==g?void 0:g.url}),{},{video:Fe(Fe(Fe(Fe(Fe({drmEnabled:h,streamingInfo:Fe(Fe({videoAssets:Fe(Fe({},S&&{drmProvider:S}),{},{widevine:null==g?void 0:g.widevine,fairPlay:null==g?void 0:g.fairPlay,playReady:null==g?void 0:g.playReady})},(null==m?void 0:m.isDvrEnabled)&&{isLiveStream:!0}),(null==O?void 0:O.isLiveStream)&&{isLiveStream:null==O?void 0:O.isLiveStream})},T&&{isSSAIEnabled:T}),{},{metadata:E,liveDetails:{isDvrEnabled:null==m?void 0:m.isDvrEnabled},gist:Fe(Fe(Fe({},w&&{videoImageUrl:w}),(null==O?void 0:O.videoId)&&{id:null==O?void 0:O.videoId}),(null==O?void 0:O.videoTitle)&&{title:null==O?void 0:O.videoTitle}),contentDetails:Fe({},(null==k?void 0:k.length)>0&&{closedCaptions:b(k)})},(null==O?void 0:O.runtime)&&{runtime:null==O?void 0:O.runtime}),(null==O?void 0:O.publishDate)&&{publishDate:null==O?void 0:O.publishDate}),(null==O?void 0:O.platform)&&{platform:null==O?void 0:O.platform}),(null==O?void 0:O.series)&&{series:null==O?void 0:O.series}),ads:{preRoll:{adTags:{web:Fe(Fe({},y&&{active:!0}),y&&{url:y})}}}});return O&&(null!=O&&O.isDvrEnabled&&(P.video.liveDetails=Fe(Fe({},P.video.liveDetails),{},{isDvrEnabled:null==O?void 0:O.isDvrEnabled})),null!=O&&O.metadata&&(P.video.metadata=[].concat(b(P.video.metadata),b(null==O?void 0:O.metadata)))),P},Ye=null,Ke=function(e,n){(new Date).getMonth(),new Date(n).getMonth(),(new Date).getFullYear(),new Date(n).getFullYear();var t=Math.floor(e/6048e5),i=function(e,n){var t;return t=12*(n.getFullYear()-e.getFullYear()),t-=e.getMonth(),(t+=n.getMonth())<=0?0:t}(new Date,new Date(n)),o=i>0&&t>4?i:0,l=function(e,n){var t=new Date(n).getFullYear()-new Date(e).getFullYear(),i=new Date(n).getMonth()-new Date(e).getMonth();return new Date(n).getDay()-new Date(e).getDay()<0&&(i-=1),i<0&&(t-=1),t}(new Date,new Date(n));return[l>0&&o>0?l:0,o,t,Math.floor(e/864e5),Math.floor(e%864e5/36e5),Math.floor(e%36e5/6e4),Math.floor(e%6e4/1e3)]},We=function(e){var n,t=w(e,8),i=t[0],o=t[1],l=t[2],r=t[3],a=t[4],u=t[5],s=t[6],d=t[7];n=i>=1?" ".concat(i," Year"):o>=1?" ".concat(o," month"):l>=1?" ".concat(l," week"):r>=1?" ".concat(r," day"):a<24&&a>=12?" ".concat(a," hour"):a>0?"".concat(a," hours ").concat(u," minutes ").concat(s," seconds"):u>0?"".concat(u," minutes ").concat(s," seconds"):"".concat(s," seconds"),d.textContent="".concat(n)},$e=(He={scheduleStartTimeMs:0,scheduleEndTimeMs:0},{get:function(){return He},set:function(e){He={scheduleStartTimeMs:null==e?void 0:e.startDateTime,scheduleEndTimeMs:null==e?void 0:e.endDateTime}}});function Je(e,n,t,i){if(e){var o=function(){var e,o,r=null===(e=$e.get())||void 0===e?void 0:e.scheduleStartTimeMs,a=null===(o=$e.get())||void 0===o?void 0:o.scheduleEndTimeMs,u=Date.now();if(u-a>0){var s=document.getElementsByClassName("error-message")[0];return s&&(s.textContent=h.getLocalisation("eventEnded")||"Game has ended",i.textContent=""),clearInterval(l),void(null==t||t())}var d=r-u;if(d/1e3<=0)return clearInterval(l),null==n||n([0,0,0,0,0,0,0,i]),void(null==t||t());var c=Ke(d,r);null==n||n([].concat(b(c),[i]))};o();var l=setInterval(o,1e3);return l}}var Xe=function(e,n,t){var i,o,l,r,a,u,s,d,c=null==n||null===(i=n.response)||void 0===i||null===(o=i.data)||void 0===o?void 0:o.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(r=l.data)||void 0===r?void 0:r.errorMessage)||(null==n?void 0:n.message)||null;$e.set({startDateTime:null==n||null===(a=n.response)||void 0===a||null===(u=a.data)||void 0===u?void 0:u.scheduleStartDate,endDateTime:null==n||null===(s=n.response)||void 0===s||null===(d=s.data)||void 0===d?void 0:d.scheduleEndDate}),function(e,n,t,i){var o,l,r=Date.now(),a=null===(o=$e.get())||void 0===o?void 0:o.scheduleStartTimeMs,u=null===(l=$e.get())||void 0===l?void 0:l.scheduleEndTimeMs,s=function(e,n,t,i){var o;e<0?o=h.getLocalisation("eventNotStarted")||i||"Game starts in":(n>0||"VIDEO_NOT_EXISTS"==t)&&(o=h.getLocalisation("eventEnded")||i||"Game has ended");return o||i}(r-a,r-u,n,t);if(document.getElementsByClassName("error-container")[0]){var d=document.getElementsByClassName("error-message")[0];d&&(d.textContent="".concat(s));var c=document.getElementsByClassName("error-timer-message")[0];c&&Je(Math.abs(a),We,i,c)}else{var v=document.getElementById(e).parentElement;if(v){var p=document.createElement("div");p.className="error-container";var f=document.createElement("div");f.className="error-message";var m=document.createElement("div");m.className="error-timer-message",f.textContent="".concat(s),p.appendChild(f),p.appendChild(m),v.append(p),Je(Math.abs(a),We,i,m)}}}(e,c,v,t)};function Qe(n,t){var i=t.scheduleEndDate,o=t.scheduleStartDate;$e.set({startDateTime:o,endDateTime:i}),Ye&&clearInterval(Ye),Ye=setInterval(function(){var t,i=Date.now(),o=null===(t=$e.get())||void 0===t?void 0:t.scheduleEndTimeMs;if(console.log("scheduleEndTimeMs",o),o&&i>o){var l;console.log("Game ended");var r=m.getPlayer(n);if(e.isPlayerInitialised(n)&&r){var a;r.dispose(),console.log("Player disposed");var u=null===(a=document.getElementsByClassName("vl-container"))||void 0===a?void 0:a[0],s=document.createElement("video");s.id=n,s.className="video-js",s.style.width="100%",s.style.height="100%",u&&u.appendChild(s)}var d=h.getLocalisation("eventEnded")||"Game has ended",c=null===(l=document.getElementsByClassName("error-container"))||void 0===l?void 0:l[0];if(c){var v=c.querySelector(".error-message");v&&(v.textContent=d)}else{var p=document.getElementById(n),f=null==p?void 0:p.parentElement;if(f){(c=document.createElement("div")).className="error-container";var g=document.createElement("div");g.className="error-message",g.textContent=d,c.appendChild(g),f.append(c)}}clearInterval(Ye)}},1e3)}function Ze(e,n){return en.apply(this,arguments)}function en(){return(en=t(i.mark(function n(t,o){var l,r,a,u,s,d,c,v,p;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=o.resolve,u=o.reject,s=null==t?void 0:t.videoId,d=null==t?void 0:t.playerId,c=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:v=n.sent,p=!1===(null==t||null===(l=t.customData)||void 0===l||null===(r=l.ads)||void 0===r?void 0:r.isSSAIEnabled),e.getVideoDetails(s,v,p).then(function(n){var i,o,l,r,p,f,m,g,h,y;window.contentType=null==n||null===(i=n.data)||void 0===i||null===(o=i.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,e.setCurrentVideo(null==n?void 0:n.data);var b=null==n||null===(r=n.data)||void 0===r||null===(p=r.video)||void 0===p||null===(f=p.gist)||void 0===f?void 0:f.scheduleEndDate,w=null==n||null===(m=n.data)||void 0===m||null===(g=m.video)||void 0===g||null===(h=g.gist)||void 0===h?void 0:h.scheduleStartDate;Qe(d,{scheduleEndDate:b,scheduleStartDate:w});var k,S=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(y=t.watchHistory)&&void 0!==y&&y.enable&&!c)if((null===(k=t.watchHistory)||void 0===k?void 0:k.saveOffline)||!1){var E,T,D,I=Oe((null===(E=t.watchHistory)||void 0===E?void 0:E.profileId)||"",s,null==t?void 0:t.siteOwner);if(I&&I.length)t.watchHistoryResumeTime=(null===(T=I[0])||void 0===T?void 0:T.watchedTime)||null,t.watchedPercentage=(null===(D=I[0])||void 0===D?void 0:D.watchedPercentage)||null;S.contentType="video",Ue(d,{res:S},t,{resolve:a,reject:u})}else e.getVideoInfo(s,v).then(function(e){var n,i,o,l,r,a;null!==(n=window)&&void 0!==n&&null!==(i=n.watchHistory)&&void 0!==i&&i.cb&&(null===(o=window)||void 0===o||null===(l=o.watchHistory)||void 0===l||l.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,S.contentType="video"}).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))}).finally(function(){Ue(d,{res:S},t,{resolve:a,reject:u})});else Ue(d,{res:S},t,{resolve:a,reject:u})}).catch(function(n){var i,o,l=(null==t||null===(i=t.event)||void 0===i?void 0:i.showScheduleTimer)||!1,r=(null==t||null===(o=t.event)||void 0===o?void 0:o.onCountdownComplete)||null;l&&Xe(d,n,r),e.initiateErrorHandling(n,d,u,s)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function nn(e,n){return tn.apply(this,arguments)}function tn(){return(tn=t(i.mark(function n(t,o){var l,r,a,u,s,d,c,v;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=o.resolve,u=o.reject,n.next=3,e.getToken();case 3:s=n.sent,d=null==t?void 0:t.playerId,c=null==t?void 0:t.epg,v=!1===(null==t||null===(l=t.customData)||void 0===l||null===(r=l.ads)||void 0===r?void 0:r.isSSAIEnabled),e.getLinearChannelDetails(c,s,v).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==c?void 0:c.channelId,Ue(d,{res:n},t,{resolve:a,reject:u})}).catch(function(n){e.initiateErrorHandling(n,d,u,videoId)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function on(e,n){return ln.apply(this,arguments)}function ln(){return(ln=t(i.mark(function n(t,o){var l,r,a,u,s,d,c;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=o.resolve,a=o.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,d=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(d)),c=null==t||null===(l=t.series)||void 0===l?void 0:l.id,e.getSeriesDetails(c,u).then(function(n){var i,o,l,d=n.data,v=n.data.seasons;e.setCurrentSeries(v);var p=videoId||(null==v||null===(i=v[0])||void 0===i||null===(o=i.episodes)||void 0===o||null===(l=o[0])||void 0===l?void 0:l.id);e.createSeriesWatchMap(c,u),e.getVideoDetails(p,u).then(function(n){var i,o,l;window.contentType=null==n||null===(i=n.data)||void 0===i||null===(o=i.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,e.setCurrentVideo(n.data),Ue(s,{res:null==n?void 0:n.data,sres:d},t,{resolve:r,reject:a})}).catch(function(n){e.initiateErrorHandling(n,s,a,videoId)})}).catch(function(n){e.initiateErrorHandling(n,s,a)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}var rn,an=function(n){var t=n.site,i=n.sseBaseUrl,o=n.sseEndpoint,l=n.debug,r=void 0!==l&&l;return k.createSSETransport({site:t,sseBaseUrl:i,getToken:e.getToken,sseEndpoint:o,onOpen:function(e){var n=e.userId,t=e.endpoint;r&&console.log("SSE Connected:",n,t)},onMessage:function(n){var t,i,o,l,a,u,s,d,c,v;if(r&&console.log("SSE Message:",n),(null===(t=e.getCurrentVideo())||void 0===t||null===(i=t.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.id)===(null==n||null===(l=n.payload)||void 0===l?void 0:l.id)&&"GAME_STATE_CHANGE"===(null==n?void 0:n.notificationType)){var p=1e3*(null==n||null===(a=n.payload)||void 0===a||null===(u=a.states)||void 0===u||null===(s=u.live)||void 0===s?void 0:s.startDateTime),f=1e3*(null==n||null===(d=n.payload)||void 0===d||null===(c=d.states)||void 0===c||null===(v=c.end)||void 0===v?void 0:v.endDateTime);p&&f&&(console.log("Setting schedule timer",p,f),$e.set({startDateTime:p,endDateTime:f}))}},onReconnectAttempt:function(e){r&&console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;r&&console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){r&&console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){r&&console.error("SSE Error:",e,n)},onClose:function(){r&&console.log("SSE Closed")}})},un=function(e){var n=e.enable,t=e.site,i=e.sseBaseUrl,o=e.sseEndpoint,l=e.debug;if(n){var r=an({site:t,sseBaseUrl:i,sseEndpoint:o,debug:void 0!==l&&l});return r._sseBaseUrl=i,r._site=t,r._sseEndpoint=o,r}};function sn(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 dn(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?sn(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):sn(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}module.exports=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:c.onTimeUpdate,getVideoDuration:c.getVideoDuration,onVideoEnded:c.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=t(i.mark(function t(o,l){var r,a,u,s,d,c,v,p,f,g,y,b,w,k,E,T,D,I,C,O,P,j,x,R,A,L,M,_,B,V,U,q;return i.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=3;break}return o({status:!0,msg:"Player already initialised",skipped:!0}),t.abrupt("return");case 3:if(C=(null==n?void 0:n.videoSourceUrl)||!1,O=null==n?void 0:n.asat,P=(null==n||null===(r=n.epg)||void 0===r?void 0:r.enable)||!1,j=null==n?void 0:n.videoId,x=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,R=(null==n?void 0:n.streamingInfo)||!1,window.videoId=j,A=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=18;break}if(sessionStorage.setItem("vlp_token",A),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),A&&!e.isTokenExpired(A)){t.next=17;break}return l({status:!1,msg:"".concat(A?"Token is expired !":"Missing Authorization Token"),response:{token:A}}),t.abrupt("return");case 17:rn=JSON.parse(atob(A.split(".")[1]));case 18:return window.siteName=null===(u=rn)||void 0===u?void 0:u.site,window.siteId=null===(s=rn)||void 0===s?void 0:s.siteId,n.isAnonymousUser=!(null===(d=rn)||void 0===d||!d.anonymousId),n.siteOwner=(null===(c=rn)||void 0===c?void 0:c.site)||null,n.userId=(null===(v=rn)||void 0===v?void 0:v.userId)||null,e.setUserId((null===(p=rn)||void 0===p?void 0:p.userId)||(null===(f=rn)||void 0===f?void 0:f.anonymousId)||null),window.watchHistory=n.watchHistory||null,L=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(g=n.series)&&void 0!==g&&g.enable?null:null==n?void 0:n.chromecastReceiverId,M=(null==n||null===(y=n.analytics)||void 0===y?void 0:y.gaId)||null,(_=null==n?void 0:n.errors)&&(window.customErrors=_),window.customData=null==n?void 0:n.customData,h.setLocalisation(null==n||null===(b=n.customData)||void 0===b?void 0:b.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!m.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),e.playerConfigManager.setConfig(n),S.relatedVideosManager.reset(),S.relatedVideosManager.set(null==n?void 0:n.relatedVideos),t.next=39,W(n);case 39:M&&N("https://www.googletagmanager.com/gtag/js?id=".concat(M)).then(function(){return e.runGtag(M)}).catch(function(e){}),(B=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(L)))&&B.addEventListener("contextmenu",function(e){return e.preventDefault()}),(V=un({enable:null==n||null===(k=n.sse)||void 0===k?void 0:k.enable,site:null==n||null===(E=n.sse)||void 0===E?void 0:E.siteName,sseBaseUrl:null==n||null===(T=n.sse)||void 0===T?void 0:T.sseBaseUrl,sseEndpoint:null==n||null===(D=n.sse)||void 0===D?void 0:D.sseEndpoint,debug:null==n||null===(I=n.sse)||void 0===I?void 0:I.debug}))&&!V.isConnectionActive()&&V.connect(),C?(q={directPlaybackUrl:C,id:U="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},O?e.getVideoDetails(U,A).then(function(e){var t=(null==e?void 0:e.data)||{};Ue(L,{res:dn(dn({},t),q)},n,{resolve:o,reject:l})}).catch(function(n){e.initiateErrorHandling(n,L,l,U)}):Ue(L,{res:q},n,{resolve:o,reject:l})):R?ze(n,{resolve:o,reject:l}):x?on(n,{resolve:o,reject:l}):P?nn(n,{resolve:o,reject:l}):Ze(n,{resolve:o,reject:l});case 45:case"end":return t.stop()}},t)}));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:p.getRenditions,skip:e.skip,getPlayer:m.getPlayer,play:e.play,pause:e.pause,detectBrowser:g.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:c.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:v.enableCaptions,disableCaptions:v.disableCaptions,getCaptions:v.getCaptions,playSelectedResolution:f.playSelectedResolution,getSource:e.getSource,setVolume:_,getVolume:B,disableControls:e.disableControls,setPlaybackSpeed:c.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,getSsaiEvents:e.getSsaiEvents,playerEvents:c.playerEvents,onReplay:c.onReplay,relatedVideosManager:S.relatedVideosManager}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),i=require("./icons-eb807ef0.js"),o=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),i=require("./icons-eb807ef0.js"),o=require("./generic-9239e4ef.js"),l=require("./skin-e0cf4554.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-77c57718.js"),require("md5"),require("js-cookie"),require("./captions-d98c49d6.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js");var d=s.getComponent("Component"),u=function(){r(v,d);var u,m,p=(u=v,m=c(),function(){var e,t=n(u);if(m){var r=n(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function v(t){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(r=p.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.streams=a.streams,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r}return t(v,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(i.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./multicamv2-1efdbdb9.js")}).then(function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),r=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var a;null!==(a=r.classList)&&void 0!==a&&a.contains("hidden")?(l.closeOpenDrawers(),r.classList.remove("hidden"),t.classList.add("open"),l.setUpdatedElHeight(e.playerId,r)):(r.classList.add("hidden"),t.classList.remove("open"))};var a=document.getElementById(this.playerId);if(a){var n=window.getComputedStyle(a,null).getPropertyValue("height").slice(0,-2);r.style.height="".concat(n,"px"),a.style.overflow="hidden",s.dom.appendContent(t,r),this.addFunctionality(r)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),a=s.dom.createEl("div",{className:"stream-selector-head"}),n=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i.crossIconSvg())});n.onclick=function(){e.classList.add("hidden"),r.classList.remove("open")};for(var c=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),u=s.dom.createEl("div",{className:"stream-tray"}),m=function(e){var r,a,n,l=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(i.SelectedStream())});0==e&&(l.classList.add("selected"),l.style.border="2px solid #D2393B"),l.onclick=function(){for(var r=s.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");l.classList.add("selected"),l.style.border="2px solid #D2393B",o.load(t.playerId,t.streams[e].id).then(function(e){o.play(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},l.style.backgroundImage="url(".concat(t.streams[e].img,")");var c=document.createElement("img");c.className="stream-thumbnail-image",c.src="".concat((null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img)||(null===(a=window)||void 0===a||null===(n=a.customData)||void 0===n?void 0:n.fallbackImage)),l.append(c),s.dom.appendContent(u,l),s.dom.appendContent(d,u)},p=0;p<this.streams.length;p++)m(p);s.dom.appendContent(a,n),s.dom.appendContent(a,c),s.dom.appendContent(e,a),s.dom.appendContent(e,d),l.handleDrawerResizing(this.playerId,e)}}]),v}();exports.default=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),i=require("./icons-eb807ef0.js"),o=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),i=require("./icons-eb807ef0.js"),o=require("./generic-9239e4ef.js"),l=require("./skin-e0cf4554.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-77c57718.js"),require("md5"),require("js-cookie"),require("./captions-d98c49d6.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js");var d=s.getComponent("Component"),u=function(){r(h,d);var u,m,p=(u=h,m=c(),function(){var e,t=a(u);if(m){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return n(this,e)});function h(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(r=p.call(this,t,n)).playerId=n.playerId,r.seriesData=n.sres,r.streams=n.streams,r.currentVideoData=n.res,r.initialiseStructure(),r.loadCSS(),r}return t(h,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(i.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./multicamv2-7a86b517.js")}).then(function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(l.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var r=document.getElementById(this.playerId);if(r){var n=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),r.style.overflow="hidden",s.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),n=s.dom.createEl("div",{className:"stream-selector-head"}),a=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var c=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),u=s.dom.createEl("div",{className:"stream-tray"}),m=function(e){var r,n=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(i.SelectedStream())});0==e&&(n.classList.add("selected"),n.style.border="4px solid #D2393B"),n.onclick=function(){for(var r=s.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");n.classList.add("selected"),n.style.border="4px solid #D2393B",o.load(t.playerId,t.streams[e].id).then(function(e){o.play(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var a=document.createElement("img");a.className="stream-thumbnail-image",a.src="".concat(null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img),a.alt="No Thumbnail Available",n.append(a),s.dom.appendContent(u,n),s.dom.appendContent(d,u)},p=0;p<this.streams.length;p++)m(p);s.dom.appendContent(n,a),s.dom.appendContent(n,c),s.dom.appendContent(e,n),s.dom.appendContent(e,d),l.getPlayer(this.playerId).on("fullscreenchange",function(){var r=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(r,"px")})}}]),h}();exports.default=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),l=require("./icons-eb807ef0.js"),s=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),l=require("./icons-eb807ef0.js"),s=require("./generic-9239e4ef.js"),a=require("./skin-e0cf4554.js");function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-77c57718.js"),require("md5"),require("js-cookie"),require("./captions-d98c49d6.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js");var u=o.getComponent("Component"),c=function(){t(p,u);var s,a,c=(s=p,a=d(),function(){var e,n=i(s);if(a){var t=i(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return r(this,e)});function p(n){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),(t=c.call(this,n,r)).playerId=r.playerId,t.seriesData=r.sres,t.currentVideoData=r.res,t.initialiseStructure(),t.loadCSS(),t}return n(p,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"play-next"}),n=o.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l.PlayNextEpisodeSvg(window.controlsColor?window.controlsColor:"white"))});return o.dom.appendContent(e,n),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./nextEpisodeButton-b6e6586f.js")}).then(function(e){var n=document.createElement("style");n.id="multicam",n.append("".concat(e.default)),document.head.appendChild(n)})}},{key:"initialiseStructure",value:function(){var e=this.el(),n=o.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),t=o.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),r=o.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=o.dom.createEl("div",{className:"next-eps-image"}),l=o.dom.createEl("div",{className:"next-eps-description"});o.dom.appendContent(r,i),o.dom.appendContent(r,l),o.dom.appendContent(n,t),o.dom.appendContent(n,r),this.toggleContentOnHover(e,n),o.dom.appendContent(e,n)}},{key:"toggleContentOnHover",value:function(e,n){e.addEventListener("mouseover",function(){o.dom.removeClass(n,"nextepisode-hidden")}),n.addEventListener("mouseover",function(){o.dom.removeClass(n,"nextepisode-hidden")}),e.addEventListener("mouseout",function(){o.dom.addClass(n,"nextepisode-hidden")}),n.addEventListener("mouseout",function(){o.dom.addClass(n,"nextepisode-hidden")})}}]),p}(),p=function(e,n){for(var t=-1,r=0;r<e.length;r++)for(var i=0;i<e[r].episodes.length;i++)if(e[r].episodes[i].id===n){t=r;break}return t},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0;if(!(e&&n>=0))return{prevEp:null,nextEp:null};var t=e.episodes.length,r=n-1>=0?n-1:t-1,i=(n+1)%t,o=t>1?e.episodes[r]:null,l=t>1?e.episodes[i]:null;return r===i&&(0===r?l=null:o=null),{prevEp:o,nextEp:l,prevEpIdx:r,nextEpIdx:i}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,t=null;return e?(e.episodes.forEach(function(e,r){e.gist.id===n&&(t=r)}),t):null},h=function(e){var n,t;o.dom.$(".next-eps"),o.dom.$(".play-next").onclick=function(){var n;s.load("my-player",null==e||null===(n=e.gist)||void 0===n?void 0:n.id).then(function(e){s.setCurrentVideo(e.response)})};var r=o.dom.$(".next-eps-image"),i=a.parseHtmlString("<img src=".concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==r||r.append(l);for(var d=o.dom.$(".next-eps-description"),u=a.parseHtmlString("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.description,"</div>"));null!=u&&u.firstChild;)null==d||d.appendChild(u.firstChild)};exports.default=c,exports.initaliseFunctionality=function(e,n){var t=p(e,n.video.gist.id),r=m(e[t],n.video.gist.id),i=v(e[t],r);h(i.nextEp)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),r=require("./icons-eb807ef0.js"),s=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),r=require("./icons-eb807ef0.js"),s=require("./generic-9239e4ef.js"),c=require("./autoNextVideo-6cab8d20.js"),d=require("./skin-e0cf4554.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-77c57718.js"),require("md5"),require("js-cookie"),require("./captions-d98c49d6.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./util-9e6f986e.js");var p=o.getComponent("Component"),m=function(){l(h,p);var m,v,y=(m=h,v=u(),function(){var e,t=a(m);if(v){var n=a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function h(e){var n,l,i,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,h),(a=y.call(this,e,o)).playerId=o.playerId,a.seriesData=o.sres,a.videos=null==o||null===(n=o.playlist)||void 0===n?void 0:n.content,a.cb=(null==o||null===(l=o.playlist)||void 0===l?void 0:l.cb)||null,a.autoNext=(null==o||null===(i=o.playlist)||void 0===i?void 0:i.autoNext)||!1,a.currentVideoData=o.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&c.autoPlayNext({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(h,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(r.EpisodesSvg())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./playlist-df87ca90.js")}).then(function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=o.dom.createEl("div",{className:"selection-container hidden"});o.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(d.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var l=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px"),o.dom.appendContent(e,t),n.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),i=o.dom.createEl("div",{className:"playlist-selector-head"}),a=o.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r.crossIconSvg())});a.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var c=o.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),u=o.dom.createEl("div",{className:"playlist-selector-content"}),p=function(t){var l,i,a=o.dom.createEl("div",{className:"playlist-container"}),r=o.dom.createEl("div",{className:"playlist-section",index:t}),c=o.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),d=o.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});o.dom.appendContent(r,c),o.dom.appendContent(r,d),o.dom.appendContent(a,r),o.dom.appendContent(u,a);var p=o.dom.createEl("div",{className:"playlist-section-expanded hidden"}),m=o.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(i=n.videos[t])||void 0===i?void 0:i.description)||"")}),v=o.dom.createEl("div",{className:"playlist-image"});v.style.backgroundImage="url(".concat(n.videos[t].img,")"),o.dom.appendContent(p,v),o.dom.appendContent(p,m),o.dom.appendContent(a,p),o.dom.appendContent(u,a),p.onclick=function(e){e.stopPropagation(),s.setVideoIdx(t+1),s.load(n.playerId,n.videos[t].id).then(function(e){null!=n&&n.cb&&n.cb(e)}).catch(function(e){null!=n&&n.cb&&n.cb(e)})},r.onclick=function(t){var n,l,i,o=document.getElementsByClassName("playlist-selector-content")[0].childNodes,r=(o=e(o))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=r&&null!==(n=r.classList)&&void 0!==n&&n.contains("hidden")?(a.style.backgroundColor="#0000007d",null==r||null===(l=r.classList)||void 0===l||l.remove("hidden")):(null==r||null===(i=r.classList)||void 0===i||i.add("hidden"),a.style.backgroundColor="unset")}},m=0;m<this.videos.length;m++)p(m);o.dom.appendContent(i,a),o.dom.appendContent(i,c),o.dom.appendContent(t,i),o.dom.appendContent(t,u),d.getPlayer(this.playerId).on("fullscreenchange",function(){var e=document.getElementById(n.playerId);if(e){var l=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px")}})}}]),h}();exports.default=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),r=require("@babel/runtime/helpers/defineProperty");function t(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function n(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach(function(t){r(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}var o,c,i=(o=null,c=[],{set:function(r){
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),r=require("@babel/runtime/helpers/defineProperty");function t(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function n(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach(function(t){r(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}var o,c,i=(o=null,c=[],{set:function(r){r&&(o=n(n({},o||r),{},{content:e((null==r?void 0:r.content)||[])}),c.forEach(function(e){try{e(o)}catch(e){console.error("relatedVideosManager subscriber error",e)}}))},get:function(){return o},reset:function(){o=null,c=[]},subscribe:function(e){return c.push(e),function(){c=c.filter(function(r){return r!==e})}}});exports.relatedVideosManager=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var l=require("./skin-
|
|
1
|
+
"use strict";var l=require("./skin-e0cf4554.js");exports.getRenditions=function(i){var n,e=l.getPlayer(i),t=[];if((null==e||null===(n=e.tech_)||void 0===n?void 0:n.vhs)||!1){var o,d,u=null==e||null===(o=e.tech_)||void 0===o||null===(d=o.vhs)||void 0===d?void 0:d.representations();(null==u?void 0:u.length)>0&&(t=null==u?void 0:u.sort(function(l,i){return(null==l?void 0:l.height)==(null==i?void 0:i.height)?(null==i?void 0:i.bandwidth)-(null==l?void 0:l.bandwidth):(null==i?void 0:i.height)-(null==l?void 0:l.height)}))}else{var v,h,r=null==e||null===(v=e.dash)||void 0===v||null===(h=v.mediaPlayer)||void 0===h?void 0:h.getRepresentationsByType("video");(null==r?void 0:r.length)>0&&(t=null==r?void 0:r.sort(function(l,i){return i.height-l.height}))}return t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),i=require("@babel/runtime/helpers/assertThisInitialized"),o=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),d=require("@babel/runtime/helpers/getPrototypeOf"),l=require("@babel/runtime/helpers/defineProperty"),r=require("video.js"),s=require("./skin-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),i=require("@babel/runtime/helpers/assertThisInitialized"),o=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),d=require("@babel/runtime/helpers/getPrototypeOf"),l=require("@babel/runtime/helpers/defineProperty"),r=require("video.js"),s=require("./skin-e0cf4554.js"),c=require("./browser-77c57718.js");function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}var h=r.getComponent("Component"),v=function(){o(f,h);var v,m,g=(v=f,m=u(),function(){var e,t=d(v);if(m){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function f(n){var o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,f),o=g.call(this,n,a),l(i(o),"masterRenditions",[]),l(i(o),"addCustomFont",function(e){var t=r.dom.createEl("div",{className:"font hideCustomFonts"}),n=r.dom.createEl("p",{className:"customFontHeading",innerHTML:"Font Size"});r.dom.appendContent(t,n);var i=r.dom.createEl("div",{className:"font-options"});i.style.fontSize="12px",o.fontSizeOptions.map(function(e,t){var n=r.dom.createEl("div",{className:"options",innerHTML:'<div class="radio-item" >\n <input class=opt'.concat(t,' type="radio" id=').concat(e,' name="item" />\n <label class="radio-btn-lable" for=').concat(e,">").concat(e,"pt</label>\n </div>")});n.addEventListener("click",function(e){var t=e.target.id;o.changeFontSize(t)}),r.dom.appendContent(i,n)}),r.dom.appendContent(t,i),r.dom.appendContent(e,t)}),l(i(o),"resetRenditions",function(){e(document.getElementsByClassName("rendition")).map(function(e){r.dom.removeClass(e,"selected")})}),o.playerId=null==a?void 0:a.playerId,o.skin=null==a?void 0:a.skin,o.icon=null==a?void 0:a.icon,o.masterRenditions=[],o.fontSizeOptions=[10,12,14],o.createRenditions(a.renditions),window.height=null,o}return n(f,[{key:"toggleContentOnHover",value:function(e,t){var n=r.dom.$(".setting-icon",e);n.addEventListener("mouseover",function(){r.dom.removeClass(t,"resolution_hidden")}),t.addEventListener("mouseover",function(){r.dom.removeClass(t,"resolution_hidden")}),n.addEventListener("mouseout",function(){r.dom.addClass(t,"resolution_hidden")}),t.addEventListener("mouseout",function(){r.dom.addClass(t,"resolution_hidden")})}},{key:"changeFontSize",value:function(e){var t=r.dom.$(".renditions",this.contentEl()),n=r.dom.$(".font-options",this.contentEl());t.style.fontSize="".concat(e,"px"),n.style.fontSize="".concat(e,"px")}},{key:"createRenditions",value:function(e){var t=this,n=this.el(),i=r.dom.$(".setting-icon",this.el()),o=s.parseSvgString(this.icon);if(i.append(o),"live"===this.skin){var a=document.createTextNode(" Settings");i.appendChild(a)}var d=r.dom.createEl("div",{className:"content resolution_hidden"}),l=r.dom.createEl("div",{innerHTML:"Quality",className:"title"}),u=r.dom.createEl("div",{className:"resolution"});r.dom.appendContent(u,l),this.toggleContentOnHover(n,d);var h=r.dom.createEl("div",{className:"renditions"});this.player_.tech_.vhs?(e.map(function(e,n){var i,o,a=r.dom.createEl("div",{className:"relative"}),d=(((null==e||null===(i=e.playlist)||void 0===i?void 0:i.attributes["AVERAGE-BANDWIDTH"])||(null==e||null===(o=e.playlist)||void 0===o?void 0:o.attributes.BANDWIDTH))/1048576).toFixed(1),l="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");l="".concat(e.height,"p @ ").concat(d,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");var s=r.dom.createEl("p",{innerHTML:l,className:"rendition",res:e.height,bandwidth:e.bandwidth});r.dom.appendContent(a,s),r.dom.appendContent(h,a),s.addEventListener("click",function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,p(t.playerId,e.target),r.dom.addClass(s,"selected"))})}),this.addAutoRendition("nondrm",h),"Safari"!=c.detectBrowser()&&this.addDynamicSwitchIfAuto()):(e.map(function(e,n){var i=r.dom.createEl("div",{className:"relative"}),o=(e.bitrate/1e6).toFixed(1),a="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");window.enableResolutionsBitrate&&(a="".concat(e.height,"p @ ").concat(o,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":""));var d=r.dom.createEl("p",{innerHTML:a,className:"rendition",res:e.height,qualityIndex:e.qualityIndex});r.dom.appendContent(i,d),r.dom.appendContent(h,i),d.addEventListener("click",function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.selectedVideo=e.target.video,window.qualityIndex=e.target.qualityIndex,p(t.playerId,e.target),r.dom.addClass(d,"selected"))})}),this.addAutoRendition("drm",h)),r.dom.appendContent(u,h),r.dom.appendContent(d,u),r.dom.appendContent(n,d)}},{key:"addDynamicSwitchIfAuto",value:function(){for(var e,t=this.player_.textTracks(),n=0;n<t.length;n++)"segment-metadata"===t[n].label&&(e=t[n]);var i=null;e&&e.on("cuechange",function(){var t,n,o=e.activeCues[0];if(console.log((null==o||null===(t=o.value)||void 0===t||null===(n=t.resolution)||void 0===n?void 0:n.height)+"p"),o&&document.querySelector(".auto.selected")){var a,d,l,r,s,c,u,h;if(null!=o&&null!==(a=o.value)&&void 0!==a&&null!==(d=a.resolution)&&void 0!==d&&d.height&&i!==(null==o||null===(l=o.value)||void 0===l||null===(r=l.resolution)||void 0===r?void 0:r.height))document.querySelector(".auto.selected").textContent="Auto ".concat(null==o||null===(u=o.value)||void 0===u||null===(h=u.resolution)||void 0===h?void 0:h.height,"p");i=null==o||null===(s=o.value)||void 0===s||null===(c=s.resolution)||void 0===c?void 0:c.height}})}},{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"container"}),t=r.dom.createEl("div",{className:"setting-icon"});return r.dom.appendContent(e,t),e}},{key:"addAutoRendition",value:function(e,t){var n=this;if("nondrm"==e){var i,o,a,d,l=null===(i=this.player_)||void 0===i||null===(o=i.tech_)||void 0===o?void 0:o.vhs.selectPlaylist().attributes.RESOLUTION.height,s=null===(a=this.player_)||void 0===a||null===(d=a.tech_)||void 0===d?void 0:d.vhs.selectPlaylist().attributes.BANDWIDTH,c=r.dom.createEl("div",{className:"relative"}),u=r.dom.createEl("p",{innerHTML:"Auto ".concat(l,"p"),className:"rendition auto selected",bandwidth:s,res:l});u.addEventListener("click",function(e){window.height!==e.target.res&&(n.resetRenditions(),r.dom.addClass(u,"selected"),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,p(n.playerId,null,!0))}),r.dom.appendContent(c,u),r.dom.appendContent(t,c)}else{var h=r.dom.createEl("div",{className:"relative"}),v=r.dom.createEl("p",{innerHTML:"Auto",className:"rendition selected",qualityIndex:"auto"});v.addEventListener("click",function(e){n.resetRenditions(),r.dom.addClass(v,"selected"),window.qualityIndex=e.target.qualityIndex,window.selectedVideo=e.target.video,p(n.playerId,null,!0)}),r.dom.appendContent(h,v),r.dom.appendContent(t,h)}}}]),f}(),p=function(e,t,n){var i,o=s.getPlayer(e),a=null==t?void 0:t.bandwidth;if((null==o||null===(i=o.tech_)||void 0===i?void 0:i.vhs)||!1){o.tech_.vhs.representations().forEach(function(e){n||e.bandwidth===a?e.enabled(!0):e.enabled(!1)}),o.handleTechPlaying_();var d=o.currentTime();o.currentTime(0),setTimeout(function(){o.currentTime(d)},100);var l=r.dom.$(".content");l&&r.dom.addClass(l,"resolution_hidden")}else{var c=null==t?void 0:t.qualityIndex;if(n){var u,h;null==o||null===(u=o.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h||h.resetSettings()}else{var v,p,m,g;null==o||null===(v=o.dash)||void 0===v||null===(p=v.mediaPlayer)||void 0===p||p.updateSettings({streaming:{abr:{autoSwitchBitrate:!1}}}),null==o||null===(m=o.dash)||void 0===m||null===(g=m.mediaPlayer)||void 0===g||g.setRepresentationForTypeByIndex("video",c,!0);var f=o.currentTime();o.currentTime(0),setTimeout(function(){o.currentTime(f)},100);var w=r.dom.$(".content");w&&r.dom.addClass(w,"resolution_hidden")}}};exports.default=v,exports.playSelectedResolution=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),n=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),l=require("@babel/runtime/regenerator"),c=require("video.js"),d=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),n=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),l=require("@babel/runtime/regenerator"),c=require("video.js"),d=require("./generic-9239e4ef.js"),u=require("./icons-eb807ef0.js"),p=require("./skin-e0cf4554.js");require("axios"),require("./browser-77c57718.js"),require("md5"),require("js-cookie"),require("./captions-d98c49d6.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js");var v=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}var m,f=c.getComponent("Component"),g=function(){n(d,f);var e,l,c=(e=d,l=h(),function(){var i,t=a(e);if(l){var s=a(this).constructor;i=Reflect.construct(t,arguments,s)}else i=t.apply(this,arguments);return r(this,i)});function d(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,d),t=c.call(this,e,n),o(s(t),"seriesData",[]),t.seriesData=n.seriesData,m=n.playerId,y(t.el(),t.seriesData),t.loadCSS(),t}return t(d,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./series-9c237975.js")}).then(function(e){var i=document.createElement("style");i.id="series",i.append("".concat(e.default)),document.head.appendChild(i)})}}]),d}();function b(){return(b=e(l.mark(function e(i,t,s,n){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:d.pause(m),v(m),d.load(m,t).then(function(e){d.setCurrentVideo(e.response),d.play(m)});case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function y(e,i){for(var t='<div class="hover-div"></div>\n '.concat(u.EpisodesSvg(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map(function(e,i){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")}).join("")}(i),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var s=p.parseHtmlString(t);null!=s&&s.firstChild;)e.appendChild(s.firstChild)}exports.customSeasonList=y,exports.handleSeasonChange=function(e,i,t,s){var n=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map(function(e,i){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(i+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")}).join("");null!=a&&a.firstChild;)a.removeChild(a.firstChild);for(var l=p.parseHtmlString(o);null!=l&&l.firstChild;)a.appendChild(l.firstChild);!function(e){d.getSeriesWatchHistory(e).then(function(e){var i=e.data,t=document.querySelectorAll("#progress-div");t&&i.map(function(e,i){e&&e.watchedPercentage&&t[i]&&(t[i].style.width=e.watchedPercentage+"px")})}).catch(function(e){})}(s),n.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),u=document.querySelectorAll("#episode-title"),v=document.querySelectorAll(".meta-details"),h=document.querySelector("#episodes-back-btn"),m=e.id,f=e.episodes;h.addEventListener("click",function(){return function(e,i){e.classList.remove("hide-container"),i.classList.add("hide-container")}(n,r)});for(var g=function(i){c[i].addEventListener("click",function(){return function(e,i,t){var s=i.querySelector(".meta-details");i.classList.toggle("episode-active"),s.classList.toggle("metadetails-active"),t.forEach(function(i,s){s!==e&&(t[s].classList.remove("episode-active"),t[s].querySelector(".meta-details").classList.remove("metadetails-active"))})}(i,u[i],u)}),v[i].addEventListener("click",function(){return function(e,i,t,s){return b.apply(this,arguments)}(i,f[i].id,t,u)}),e.episodes[i].id==m&&u[i].classList.add("highlight-active-eps")},y=0;y<c.length;y++)g(y)},exports.seriesModule=g;
|