@viewlift/player-backup 2.0.312-backup → 2.0.313-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-405fbb9c.js → autoNextVideo-1219220b.js} +1 -1
- package/cjs/bundle.css +738 -738
- package/cjs/{features-497aa685.js → features-1b6f9b76.js} +1 -1
- package/cjs/generic-460c2f4c.js +1 -0
- package/cjs/{index-1b1814b2.js → index-15040639.js} +1 -1
- package/cjs/{index-f0e7f225.js → index-d012ce66.js} +1 -1
- package/cjs/{index-a3c4762d.js → index-df46f39c.js} +1 -1
- package/cjs/{index-160bf3cf.js → index-fed823e4.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-d97aac93.js → multicamv2-b46493cd.js} +1 -1
- package/cjs/{multicamv2-b7179cca.js → multicamv2-fb311cf2.js} +1 -1
- package/cjs/{nextEpisodeButton-d8673023.js → nextEpisodeButton-651ab380.js} +1 -1
- package/cjs/{playlist-da78386b.js → playlist-649c8f45.js} +1 -1
- package/cjs/{series-a44ff797.js → series-b109f9a2.js} +1 -1
- package/cjs/{series-v2-d70b0c21.js → series-v2-86b32c0e.js} +1 -1
- package/cjs/{series-v2-f583f57c.js → series-v2-d2950b02.js} +1 -1
- package/cjs/{skin-329840ee.js → skin-08149121.js} +1 -1
- package/cjs/{skin-43fd6f9f.js → skin-2193cc41.js} +1 -1
- package/cjs/{skin-64a712c1.js → skin-222dc6b7.js} +1 -1
- package/cjs/{skin-57d7b91d.js → skin-4e3170cf.js} +1 -1
- package/cjs/{skin-fe84f7e4.js → skin-765e1355.js} +1 -1
- package/cjs/{skin-125b2f1b.js → skin-886a6d4b.js} +1 -1
- package/cjs/{skin-ca777bf7.js → skin-8bcb6a55.js} +1 -1
- package/cjs/{skin-b8d21775.js → skin-c8d40d82.js} +1 -1
- package/cjs/{skin-986ee45f.js → skin-dbacca02.js} +1 -1
- package/cjs/{skin-765eaa0a.js → skin-e4a31cb3.js} +1 -1
- package/cjs/{videoSelector-78d2a88e.js → videoSelector-13aaa2d8.js} +1 -1
- package/cjs/{videoSelector-dd2d5324.js → videoSelector-6a0fa8d0.js} +1 -1
- package/esm/{autoNextVideo-d7d17130.js → autoNextVideo-1ade2ac8.js} +1 -1
- package/esm/bundle.css +738 -738
- package/esm/{features-f8a70ef8.js → features-c38a5458.js} +1 -1
- package/esm/{generic-e99fa280.js → generic-859e1b0f.js} +1 -1
- package/esm/{index-5e82fbd8.js → index-022a4725.js} +1 -1
- package/esm/{index-0a27b711.js → index-41558ed2.js} +1 -1
- package/esm/{index-7fc11ec8.js → index-4fd3b927.js} +1 -1
- package/esm/{index-e3e95c56.js → index-6c225809.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{multicamv2-6816cd94.js → multicamv2-21b1f1c1.js} +1 -1
- package/esm/{multicamv2-20f178e4.js → multicamv2-71e2abdd.js} +1 -1
- package/esm/{nextEpisodeButton-5c8edd3e.js → nextEpisodeButton-36f416dc.js} +1 -1
- package/esm/{playlist-dd6e58b6.js → playlist-d838f1a7.js} +1 -1
- package/esm/{series-46f0c516.js → series-d1b982ab.js} +1 -1
- package/esm/{series-v2-d433b819.js → series-v2-03cef666.js} +1 -1
- package/esm/{series-v2-8adf9d91.js → series-v2-2559637f.js} +1 -1
- package/esm/{skin-45f8682c.js → skin-08cd7f59.js} +1 -1
- package/esm/{skin-11edae05.js → skin-0fb217b1.js} +1 -1
- package/esm/{skin-7198271b.js → skin-2080b142.js} +1 -1
- package/esm/{skin-4eadb6ed.js → skin-21d67daa.js} +1 -1
- package/esm/{skin-f24e5bea.js → skin-255cf575.js} +1 -1
- package/esm/{skin-e26bb2ef.js → skin-361a4e27.js} +1 -1
- package/esm/{skin-e7a418d5.js → skin-49aa30ba.js} +1 -1
- package/esm/{skin-06d0e08e.js → skin-77405f2e.js} +1 -1
- package/esm/{skin-12cd8332.js → skin-77c06b80.js} +1 -1
- package/esm/{skin-9aeadb01.js → skin-a28700c4.js} +1 -1
- package/esm/{videoSelector-0713849a.js → videoSelector-25b6e54e.js} +1 -1
- package/esm/{videoSelector-54aca560.js → videoSelector-556c1f53.js} +1 -1
- package/package.json +2 -2
- package/cjs/generic-215f4b2f.js +0 -1
- package/cjs/index-eed20004.js +0 -1
- package/cjs/skin-645e94e3.js +0 -1
- package/esm/autoNextVideo-8969c6df.js +0 -1
- package/esm/features-412626fb.js +0 -1
- package/esm/generic-34f78811.js +0 -1
- package/esm/index-06ad6212.js +0 -1
- package/esm/index-07cb2e05.js +0 -1
- package/esm/index-88ef87d6.js +0 -1
- package/esm/index-f3d95023.js +0 -1
- package/esm/multicamv2-5850afc8.js +0 -1
- package/esm/multicamv2-7d56314d.js +0 -1
- package/esm/nextEpisodeButton-e5c7a4f2.js +0 -1
- package/esm/playlist-47344207.js +0 -1
- package/esm/series-74ab47cc.js +0 -1
- package/esm/series-v2-15df8835.js +0 -1
- package/esm/series-v2-3b5e2560.js +0 -1
- package/esm/skin-1ffbc63d.js +0 -1
- package/esm/skin-212eda31.js +0 -1
- package/esm/skin-29b49d84.js +0 -1
- package/esm/skin-4abc33d7.js +0 -1
- package/esm/skin-6d648b73.js +0 -1
- package/esm/skin-a02fbfbe.js +0 -1
- package/esm/skin-b236cc43.js +0 -1
- package/esm/skin-b2991b04.js +0 -1
- package/esm/skin-c90e133a.js +0 -1
- package/esm/skin-e56529d4.js +0 -1
- package/esm/videoSelector-6ac21745.js +0 -1
- package/esm/videoSelector-a5e0df6e.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-215f4b2f.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/regenerator"),i=require("video.js"),o=require("@babel/runtime/helpers/classCallCheck"),l=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/get"),u=require("@babel/runtime/helpers/inherits"),s=require("@babel/runtime/helpers/possibleConstructorReturn"),c=require("@babel/runtime/helpers/getPrototypeOf"),d=require("./index-160bf3cf.js"),v=require("./captions-0ca41a03.js"),f=require("./renditions-627bdfad.js"),p=require("./resolution-3af2cf1b.js"),m=require("./skin-66dce245.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("@viewlift/sse"),k=require("./relatedVideosManager-eeeaf32c.js");function S(e,n,t,r){var i=a(c(1&r?e.prototype:e),n,t);return 2&r&&"function"==typeof i?function(e){return i.apply(t,e)}:i}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(T=function(){return!!e})()}var P=i.getComponent("TextTrackSettings"),E=i.dom,I=[{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"}],C=I.map(function(e){return e.value}),D="16",O="vlp-caption-font-size-px",j="vlp-caption-font-size-style",x=".vjs-font-percent > select",_=function(e){return-1!==C.indexOf(e)?e:D},A=null;P?(A=function(){u(r,P);var e,n,t=(e=r,n=T(),function(){var t,r=c(e);if(n){var i=c(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return s(this,t)});function r(e,n){var i;return o(this,r),(i=t.call(this,e,n)).customUiReady_=!0,i.applyCustomFontSizeUI_(),i}return l(r,[{key:"applyCustomFontSizeUI_",value:function(){this.replaceFontSizeOptions_(),this.bindFontSizeChange_(),this.restoreCustomFontSize_()}},{key:"replaceFontSizeOptions_",value:function(){var e=this.$(x);if(e){for(;e.firstChild;)e.removeChild(e.firstChild);I.forEach(function(n){e.appendChild(E.createEl("option",{value:n.value,textContent:n.label}))}),e.value=D}}},{key:"bindFontSizeChange_",value:function(){var e=this,n=this.$(x);n&&this.on(n,"change",function(){return e.applyFontSize_(n.value)})}},{key:"applyFontSize_",value:function(e){var n=_(e);if("undefined"!=typeof document){var t=document.getElementById(j);t||((t=document.createElement("style")).id=j,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(O)}catch(e){}var n=_(e),t=this.$(x);t&&(t.value=n),this.applyFontSize_(n)}},{key:"getValues",value:function(){var e=S(r,"getValues",this,3)([]);return e&&delete e.fontPercent,e||{}}},{key:"setDefaults",value:function(){if(S(r,"setDefaults",this,3)([]),this.customUiReady_){var e=this.$(x);e&&(e.value=D),this.applyFontSize_(D)}}},{key:"saveSettings",value:function(){if(S(r,"saveSettings",this,3)([]),this.options_&&this.options_.persistTextTrackSettings){var e=this.$(x);if(e)try{window.localStorage.setItem(O,_(e.value))}catch(e){}}}},{key:"handleLanguagechange",value:function(){S(r,"handleLanguagechange",this,3)([]),this.applyCustomFontSizeUI_()}}]),r}(),i.registerComponent("TextTrackSettings",A)):console.warn("[vlp] CustomTextTrackSettings: video.js TextTrackSettings is not registered; skipping override.");var R=function(e){return new Promise(function(n,t){if(L(e))t("".concat(e," is alread initialised"));else{var r=document.createElement("script");r.async=!0,r.src=e,r.onload=function(){n()},r.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(r)}})},L=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},N=function(e,n,t){var r=m.getPlayer(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var i=parseFloat(n)/100;r.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,"'")})},M=function(e){var n=m.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},B=function(){var e=t(r.mark(function e(n){var t,o,l,a,u;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=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,R("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!==(l=window)&&void 0!==l&&l.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==g.detectBrowser()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),U=function(e,n){var t=m.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,r,o,l,a,u=this.el(),s=i.dom.getPointerPosition(u,n).x;i.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var c=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(o=r.framework)||void 0===o||null===(l=o.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(c),c&&"CONNECTED"===d){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 V=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),R("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(r.mark(function n(){return r.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)}}(),q=function(){var e=t(r.mark(function e(){return r.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)}}(),F=function(){var e=t(r.mark(function e(){var n;return r.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)}}(),z=function(){var e=t(r.mark(function e(){return r.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)}}(),G=function(){var e=t(r.mark(function e(){return r.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){R("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:V,loadEMELibrary:q,loadMuxPlugin:F,loadDvrSeekbar:z,loadContribDash:G,loadComscorePlugin:H});function W(e){return Y.apply(this,arguments)}function Y(){return(Y=t(r.mark(function e(n){var t;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,V();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 $(e){return J.apply(this,arguments)}function J(){return(J=t(r.mark(function e(n){var t,i,o,l,a,u,s,c,d,v;return r.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===(o=n.comscore)||void 0===o?void 0:o.applicationName)||(null===(l=window)||void 0===l?void 0:l.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===(c=n.comscore)||void 0===c?void 0:c.persistentLabels)||{},metadata:(null==n||null===(d=n.comscore)||void 0===d?void 0:d.metadata)||{}});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function X(e,n){return Q.apply(this,arguments)}function Q(){return(Q=t(r.mark(function e(n,t){var i,o,l,a,u,s,c,d,v,f,p,m,h,y;return r.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===(o=t[v])||void 0===o||null===(l=o.liveDetails)||void 0===l||l.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===(c=n.comscore)||void 0===c?void 0:c.enable)||!1,h=!(null==n||null===(d=n.analytics)||void 0===d||!d.muxKey),e.prev=7,e.next=10,Promise.allSettled([f?"Safari"==g.detectBrowser()?q():"caliente"!=(null===(y=window)||void 0===y?void 0:y.siteName)?G():q():"Safari"!=g.detectBrowser()&&p?G():null,m?$(n):null,h?F():null,B(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 Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ne=new Set,te=null,re=function(n,t,r,i){var o,l,a,u,s,c,d,v={},f=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(o=n[f])||void 0===o?void 0:o.id)||"Null",v["c3.cm.contentType"]=ce(n),v[null==r||null===(l=r.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==n||!n.linearchannel),v[null==r||null===(a=r.Constants)||void 0===a?void 0:a.STREAM_URL]=t.currentSrc(),v[null==r||null===(u=r.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),v["c3.cm.categoryType"]=ae(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!==(c=n[f])&&void 0!==c&&null!==(d=c.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",v[r.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=ue(n),v["c3.cm.genreList"]=oe(n),v["c3.cm.genre"]=ie(n),v["c3.cm.channel"]=le(n,i);var p=fe(e.getCurrentSeries(),n);return v=ee(ee({},v),p)},ie=function(e){var n,t,r,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===(r=t.primaryCategory)||void 0===r?void 0:r.title)||"Null"},oe=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"},le=function(e,n){var t,r,i=(null==e?void 0:e.contentType)||"video";return"video"===i?"VOD":(null===(r=((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===r?void 0:r.title)||"NULL"},ae=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"},ue=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video",i=(null==e||null===(n=e[r])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return i?"YES":"NO"},se=function(e,n){var t,r,i=(n||{}).epg;if(i&&null!=i&&i.enable&&null!=i&&i.programTitle)return i.programTitle;var o=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[o])||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.title)||"Null";return"".concat(l)},ce=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var de,ve,fe=function(n,t){var r,i,o,l,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(),c=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(i=r.series)||void 0===i?void 0:i.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==n||null===(o=n[s-1])||void 0===o||null===(l=o.episodes)||void 0===l||null===(a=l[c-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==c?void 0:c.toString())||"Null",u},pe=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"}},me=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},ge=function(){var n=t(r.mark(function n(t,i){var o,l,a,u,s,c,d,v,f,p,g,h;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(o=(null==i?void 0:i.convivaConfig)||{},l=o.trackConvivaPlayerEvent,a=o.paymentHandler,u=o.tveProvider,s=o.enable,c=o.appName,v=(d=i||{}).token,f=d.epg,s){n.next=4;break}return n.abrupt("return");case 4:if(p=m.getPlayer(t),"function"==typeof(g=l)){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 r=pe(t.keySystem);g("contentInfo",{DRMEnabled:r})}else g("contentInfo",{DRMEnabled:"None"})}),n||g("contentInfo",{DRMEnabled:"None"})}),p.on("loadstart",function(){var n,t;te&&te!==p.currentSrc()&&g("playbackEnded"),g("setPlayer",p),ne.clear(),te=p.currentSrc();var r=me(p.currentType()),o=e.getCurrentVideo(),l=re(o,p,h,f);l[null==h||null===(n=h.Constants)||void 0===n?void 0:n.PLAYER_NAME]=c||"WEB",l[null==h||null===(t=h.Constants)||void 0===t?void 0:t.ASSET_NAME]=se(o,i),l.authToken=v||"NULL",l.streamType=r,l.D2CType=a||"NONE",l.subscriberType=u?"MVPD":"FREE"!==a?"D2C":"FREE",l["c3.cm.affiliate"]=u||"NULL",he.setData(l),g("contentInfo",l)}),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(){ne.has(p.currentSrc())||(ne.add(p.currentSrc()),g("playbackStarted",null))}),p.on("ended",function(){ne.has(p.currentSrc())&&ne.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==ne||ne.clear(),g("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),he=(de={},{setData:function(e){de=ee(ee({},de),e)},getData:function(){return de}}),ye=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-ca777bf7.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-43fd6f9f.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-765eaa0a.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-fe84f7e4.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-b8d21775.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?Promise.resolve().then(function(){return require("./skin-329840ee.js")}).then(function(t){t.initialiseSkin(e,n)}):"news"==t?Promise.resolve().then(function(){return require("./skin-986ee45f.js")}).then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?Promise.resolve().then(function(){return require("./skin-64a712c1.js")}).then(function(t){t.initialiseSkin(e,n)}):"mini"==t?Promise.resolve().then(function(){return require("./skin-125b2f1b.js")}).then(function(t){t.initialiseSkin(e,n)}):"CN_NEWS"==t&&Promise.resolve().then(function(){return require("./skin-57d7b91d.js")}).then(function(t){t.initialiseSkin(e,n)})};function be(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ke=[],Se=0,Te=null;function Pe(){ve=null,ke=[],Se=0,Te=null}function Ee(t,r,i){var o,l,a,u,s,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==r||null===(o=r.watchHistory)||void 0===o||o.apiVersion;var d=null==r||null===(l=r.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(t.currentTime()),f=Math.floor(t.duration());null==r||null===(a=r.watchHistory)||void 0===a||a.xapiKey;var p=(null==r||null===(u=r.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==r||null===(s=r.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,g=Math.floor(t.currentTime()),h=c?100:Math.floor(v/f*100),y={};m?function(t,r,i){var o=r?"watchhistory-data-".concat(r):"watchhistory-data-guest-".concat(i),l=Ie(o),a=(new Date).getTime(),u=e.getCurrentVideo(),s=(null==u?void 0:u.video)||{},c=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return we(we({},e),{},n({},t,s[t]))},{}),d=l.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===ve});d<0?l.push(we(we({content:c},t),{},{addedDate:a,updateDate:a})):l[d]=we(we(we({},l[d]),t),{},{updateDate:a});localStorage.setItem("".concat(o),JSON.stringify(l))}(y={completed:c,watchedTime:g,watchedPercentage:h},d,r.siteOwner):(y=we(we({videoId:ve,watchedTime:g,watchedPercentage:h,doneWatching:c,profileId:d},Te&&{seriesId:Te}),p&&{originalObjectId:p}),e.saveWatchHistory(y).then(function(e){}).catch(function(e){})),Se=v+i}function Ie(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function Ce(e,n,t){var r=Ie(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),i=[];return r&&Array.isArray(r)&&(i=r.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),i}var De=!1,Oe=function(n,t){var r,i,o=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(r=n[o])||void 0===r||null===(i=r.streamingInfo)||void 0===i?void 0:i.secondaryVideoAssets)||null)&&!De){var l=je(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),De=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function je(e,n,t){if(Array.isArray(e))return e.map(function(e){return je(e,n,t)});if(null!==e&&"object"===y(e)){var r={};return Object.keys(e).forEach(function(i){i===n&&void 0!==e[t]?r[i]=e[t]:i===t&&void 0!==e[n]?r[i]=e[n]:r[i]=je(e[i],n,t)}),r}return e}function xe(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 _e(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)?_e(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 o,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw o}}}}function _e(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function Ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ae(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Le=function(n,t,r,i){var o,l,a,u,s,c=i.res,d=i.sres,f=m.getPlayer(n),p=(null==c?void 0:c.contentType)||"video",h=(null==c||null===(o=c[p])||void 0===o?void 0:o.drmEnabled)||!1,b=!(null==c||null===(l=c[p])||void 0===l||null===(a=l.streamingInfo)||void 0===a||!a.isLiveStream)||"linearchannel"===p,w=(null==c||null===(u=c[p])||void 0===u||null===(s=u.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;e.setCurrentVideo(c),e.videoReplayTracker.set(c),f&&(f.on("loadstart",function(){b?r.resolve({status:!0,msg:"Video Loaded",response:c}):r.resolve(Re({status:!0,msg:"Player Initialised"},d?{seriesResponse:d,response:c}:{response:c}))}),f.on("loadeddata",function(){var r,i,o,l,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!==(r=t.watchHistory)&&void 0!==r&&r.isExternal){var d=Re(Re({},t),c);!function(e,n){var t,r,i;if(null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&null!=n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&"function"==typeof(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.cb)){var o,l,a,u=(null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.interval)||30,s=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.completionThreshold)||95,c=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.cb,d=-1;e.on("seeked",function(){var n=Math.floor(e.currentTime()),t=n-n%u;if(d=t,t>0){var r=Math.floor(n/e.duration()*100);c({watchedTime:n,watchedPercentage:r,doneWatching:r>=s})}}),e.on("timeupdate",function(){var n=Math.floor(e.currentTime()),t=n-n%u;if(n%u===0&&t!==d){d=t;var r=Math.floor(n/e.duration()*100);c({watchedTime:n,watchedPercentage:r,doneWatching:r>=s||!1})}}),e.on("ended",function(){c({watchedTime:Math.floor(e.duration()),watchedPercentage:100,doneWatching:!0})})}}(f,d)}else if(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 p,h,y=Re(Re({},t),c);!function(e,n,t){var r,i,o;null!=n&&n.series&&null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable&&(Te=null==n||null===(i=n.series)||void 0===i?void 0:i.id),ke=[],Se=0,ve=t;var l=(null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.interval)||30,a=m.getPlayer(e);a&&(a.on("dispose",Pe),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());ke.includes(Se)||(e!=Se||e<l?e>Se&&(Se=e+l):(ke.push(e),Ee(a,n,l)))}}),a.one("ended",function(){Ee(a,n,l,!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!==(l=t.analytics)&&void 0!==l&&l.muxKey&&null!=f&&f.mux){var b,k,S,T,P,E,I=(null===(b=e.getCurrentVideo())||void 0===b?void 0:b.video)||(null==c?void 0:c.video),C=null==I?void 0:I.gist,D={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===(T=I.series)||void 0===T?void 0:T.title,video_stream_type:null!=I&&null!==(P=I.streamingInfo)&&void 0!==P&&P.isLiveStream?"live":"video",viewer_user_id:null==t||null===(E=t.analytics)||void 0===E?void 0:E.userId};f.mux({debug:!1,data:D})}}),f.textTracks().on("change",function(e){var t=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];v.syncTtmlDisplay(n),f.trigger("subtitlechanged",t)}),f.on("subtitlechanged",function(e,n){var t,r,i,o,l,a,u,s,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(i=r.framework)||void 0===i||null===(o=i.CastContext)||void 0===o||null===(l=o.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(c=s.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.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&&Oe(c,n)}),f.on("error",function(){var t,i;(console.log("ERROR",f.error(),f.error().code),4===f.error().code&&b)?Oe(c,n):(e.handleError(n,(null==f||null===(t=f.error())||void 0===t?void 0:t.message)||"Some error occured"),r.reject({status:!1,msg:(null==f||null===(i=f.error())||void 0===i?void 0:i.message)||"Some error occured",response:c}))}),f.one("play",function(){var n,r,i,o,l;if(null===(n=window)||void 0===n||null===(r=n.app_data)||void 0===r||null===(i=r.appcmsMain)||void 0===i||null===(o=i.adsConfig)||void 0===o||!o.vodAdClientSideTracking){if(null!=t&&null!==(l=t.series)&&void 0!==l&&l.enable){var a,u,s,c=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,d=e.getSeriesWatchMap(),v=(null==d?void 0:d.get(c))||{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,T=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,P=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,E=null!==(k=null==t||null===(S=t.watchHistory)||void 0===S?void 0:S.completionThreshold)&&void 0!==k?k:95;T&&P<E&&setTimeout(function(){f.currentTime(T)},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(),r=(n.language||n.label||"").toUpperCase();return t<r?-1:t>r?1:0}),"object"==y(f.dash)){var t,r,i,o=null==f||null===(t=f.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==o?void 0:o.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=xe(n);try{for(a.s();!(i=a.n()).done;){var u=i.value;if(l&&(null==u?void 0:u.id)=="dash-audio-".concat(l.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,c=[],d=xe(n);try{for(d.s();!(s=d.n()).done;){var v,p,m,b=s.value;("Chrome"==g.detectBrowser()||"Edge"==g.detectBrowser()&&(null!==(v=navigator)&&void 0!==v&&null!==(p=v.userAgent)&&void 0!==p&&p.includes("Macintosh")||!h))&&null!=b&&null!==(m=b.label)&&void 0!==m&&m.includes("5.1")?f.audioTracks().removeTrack(b):c.push(b)}}catch(e){d.e(e)}finally{d.f()}for(var w=c.find(function(e){return"main"===e.kind}),k=w||c.find(function(e){return e.enabled})||c[0],S=0,T=c;S<T.length;S++){var P=T[S];P.enabled=P===k}}}))};function Ne(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Me(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ne(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Be(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 Ue(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)?Ue(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 o,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw o}}}}function Ue(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}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};function He(n,t,r){var i=e.playerConfigManager.getConfig()||{};e.emitApiErrorEvent(n,{status:r,message:"DRM ".concat(t," request failed")},"playback",{requestKind:t,videoId:null==i?void 0:i.videoId})}function qe(e){try{if(null!=e&&e.__vlLicenseUrl)return e.__vlLicenseUrl;var n=null==e?void 0:e.keySystems;if(n)for(var t=0,r=Object.keys(n);t<r.length;t++){var i=n[r[t]];if("string"==typeof i)return i;if(null!=i&&i.url)return i.url;if(null!=i&&i.licenseUri)return i.licenseUri}var o=null==e?void 0:e.keySystemOptions;if(Array.isArray(o)){var l,a=Be(o);try{for(a.s();!(l=a.n()).done;){var u,s,c,d=l.value,v=(null==d||null===(u=d.options)||void 0===u?void 0:u.serverURL)||(null==d||null===(s=d.options)||void 0===s?void 0:s.licenseUri)||(null==d||null===(c=d.options)||void 0===c?void 0:c.url);if(v)return v}}catch(e){a.e(e)}finally{a.f()}}}catch(e){}return""}function Fe(e){if(null!=e&&e.__vlDrmLicenseUrl)return e.__vlDrmLicenseUrl;try{return qe("function"==typeof e.currentSource?e.currentSource():null)}catch(e){return""}}function ze(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)||{},r=(null==n?void 0:n.url)||(null==t?void 0:t.url)||"",i=e.classifyRequestKind(r,(null==t?void 0:t.type)||(null==n?void 0:n.type));if(e.isDrmRequestKind(i)){var o=e.extractStatusCode(n,null);e.isHttpOk(o)||He(r,i,o)}}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(r){try{var i,o,l,a;if(null==r||!r.error)return;var u=null!==(i=null==r||null===(o=r.error)||void 0===o||null===(l=o.data)||void 0===l?void 0:l.responseCode)&&void 0!==i?i:e.extractStatusCode(null,r.error);He((null==r||null===(a=r.data)||void 0===a?void 0:a.url)||t.__vlLastLicenseUrl||Fe(n)||"","license",u)}catch(e){}}))}var Ge=!1,Ke=null,We=new Set;function Ye(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(Ge&&!(We.size>0)){var e=null==i?void 0:i.Html5DashJS;e&&"function"==typeof e.removeHook&&"function"==typeof Ke&&e.removeHook("beforeinitialize",Ke),Ge=!1,Ke=null}}())};"function"==typeof e.one?e.one("dispose",n):"function"==typeof e.on&&e.on("dispose",n)}}function $e(n){if(n){Ye(n),function(){if(!Ge){var e=null==i?void 0:i.Html5DashJS;e&&"function"==typeof e.hook&&(Ke=function(e,n){null!=e&&e.__vlDrmDashEnabled&&ze(e,n)},Ge=!0,e.hook("beforeinitialize",Ke))}}(),function(n){n&&!n.__vlEmeDrmErrorInstalled&&(n.__vlEmeDrmErrorInstalled=!0,n.on("error",function(){try{var t,r="function"==typeof n.error?n.error():null;if(!r||!e.isDrmError(r))return;if(null!=n&&null!==(t=n.dash)&&void 0!==t&&t.mediaPlayer)return;He(Fe(n),"license",null)}catch(e){}}))}(n);var t=function(){var t;!function(n){var t,r,i=null==n||null===(t=n.tech_)||void 0===t||null===(r=t.vhs)||void 0===r?void 0:r.xhr;i&&"function"==typeof i.onResponse&&!n.__vlDrmVhsHooksInstalled&&(n.__vlDrmVhsHooksInstalled=!0,i.onResponse(function(n,t,r){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),o=e.classifyRequestKind(i,null==n?void 0:n.type);if(!e.isDrmRequestKind(o))return;var l=e.extractStatusCode(r,t);e.isHttpOk(l)&&!t||He(i,o,l)}catch(e){}}))}(n),ze(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 Je=function(o,l,a,u){var s,c,d,f,p,h,y,b,w,k,S,T,P,E,I,C,D,O,j,x,_,A,R,L,N,M,B,V,H,q,F,z,G,K,W,Y,$,J,Q=l.res,Z=void 0===Q?null:Q,ee=l.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)||""),r=t.get("loglevel")||null;return{playerDebug:"true"===t.get("playerdebug"),logLevel:r,dashLogLevel:null!=r&&null!=Ve[r]?Ve[r]:5}}catch(e){return{playerDebug:!1,logLevel:null,dashLogLevel:5}}}(),re=te.playerDebug,ie=te.logLevel,oe=te.dashLogLevel;re&&(console.log("[PLAYER DEBUG] config:",a),console.log("[PLAYER DEBUG] entitlement (res):",Z),ne&&console.log("[PLAYER DEBUG] series response (sres):",ne));var le=null!=a&&a.chromecastReceiverId?["chromecast","html5"]:["html5"],ae=(null===(s=Z)||void 0===s?void 0:s.contentType)||"video",ue=m.impolicy16x9(null===(c=Z)||void 0===c||null===(d=c[ae])||void 0===d||null===(f=d.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,ce=!(null===(T=Z)||void 0===T||null===(P=T[ae])||void 0===P||null===(E=P.streamingInfo)||void 0===E||!E.isLiveStream)||"linearchannel"===ae,de=(null===(I=Z)||void 0===I||null===(C=I.ads)||void 0===C||null===(D=C.preRoll)||void 0===D||null===(O=D.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===(A=_.preRoll)||void 0===A||null===(R=A.adTags)||void 0===R||null===(L=R.web)||void 0===L?void 0:L.url);Z=Me(Me({},Z),{},{audioAssetSource:null==a?void 0:a.audioAssetSource});var ve=(null==a||null===(N=a.customData)||void 0===N?void 0:N.ads)||{},fe=(null===(M=Z)||void 0===M||null===(B=M[ae])||void 0===B?void 0:B.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==ve?void 0:ve.vodAdSticherProvider)||!1,pe=!(null===(V=Z)||void 0===V||null===(H=V[ae])||void 0===H||!H.isSSAIEnabled)&&"TRANSMIT"==(null==ve?void 0:ve.liveAdSticherProvider)&&!(null==ve||!ve.liveAdClientSideTracking),me=(null==a?void 0:a.latency)||6,be=(null==a?void 0:a.skin_settings)||{},we=null,ke=($={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==be?void 0:be.pictureInPictureToggle)||!1},playbackRates:null!=be&&be.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)&&!de),n($,"loop",(null==a?void 0:a.loop)||!1),n($,"audioPosterMode",null==a?void 0:a.audioPosterMode),n($,"html5",Me(Me({dash:Me(Me({},!i.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:Me(Me({},((null==a?void 0:a.debugConfig)&&(null==a||null===(q=a.debugConfig)||void 0===q?void 0:q.enable)||re)&&{debug:{logLevel:oe}}),{},{streaming:{delay:{liveDelay:me},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Me({},"IE"==g.detectBrowser()&&{enableStallFix:!0,stallSeek:1}),abr:Me(Me(Me(Me({},(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:Me(Me(Me({},(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)||re)&&{debug:!0}),debug:(null==a?void 0:a.debugConfig)&&(null==a||null===(K=a.debugConfig)||void 0===K?void 0:K.enable)||re||!1,nativeTextTracks:"Safari"==g.detectBrowser()},0==(null==a||null===(W=a.customData)||void 0===W?void 0:W.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(Y=a.customData)||void 0===Y?void 0:Y.nativeVideoTracks)&&{nativeVideoTracks:!1})),n($,"poster",ue),n($,"techOrder",le),n($,"chromecast",{requestCustomDataFn:function(n){var t,r,i=m.getPlayer(o),l=((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 r,i,o,l,a,u,s,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,g,h,y,b,w,k,S;p.isDrmEnabled=!0;var T=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,P=(null==T?void 0:T.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=P;var E=(null==T?void 0:T.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=E}var I=(null==e||null===(r=e[f])||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.contentType)||"VIDEO";p.contentType=I;var C=null==e||null===(o=e[f])||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.runtime;p.duration=C;var D=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=D;var O=null==e||null===(s=e[f])||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=O,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Z,n,l),s=l.find(function(e){return"showing"===e.mode})||null;return we=s?{language:s.language||s.lang||null,label:s.label||null}:null,Me(Me({},u),{},{activeCaption:{enabled:!!s,language:(null==s?void 0:s.language)||(null==s?void 0:s.lang)||null,label:(null==s?void 0:s.label)||null},transmitTrackingUrl:e.trackingUrlManager.get()||null,convivaMetaData:Me({customerKey:(null==a||null===(t=a.convivaConfig)||void 0===t?void 0:t.customerKey)||null,debug:(null==a||null===(r=a.convivaConfig)||void 0===r?void 0:r.debug)||!1},he.getData())})},modifyLoadRequestFn:function(e){var n,t,r,i,l,a=m.getPlayer(o),u=(null==a?void 0:a.currentSource())||{};!(null===(n=Z)||void 0===n||null===(t=n[ae])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(l=u.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),$);if(!i.getPlayers()[o]){(null!=a&&a.debugConfig&&null!=a&&null!==(J=a.debugConfig)&&void 0!==J&&J.enable||re)&&i.log.level(ie||"debug");var Se=i(o,ke,function(){var n=t(r.mark(function n(){var t,l,s,c,d,f,p,m,g,h,y,b,w,k,S,T,P,E,I,C,D,O;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return $e(Se),console.log(Se),console.log(i.VERSION),console.log(i.getPlugins()),n.next=6,X(a,Z);case 6:if(null!=a&&a.debugConfig&&null!=a&&null!==(t=a.debugConfig)&&void 0!==t&&t.enable||re){try{i.log.level(ie||"debug")}catch(e){}(w=function(){try{var e,n,t;null==Se||null===(e=Se.dash)||void 0===e||null===(n=e.mediaPlayer)||void 0===n||null===(t=n.updateSettings)||void 0===t||t.call(n,{debug:{logLevel:oe}})}catch(e){}})(),Se.one("loadedmetadata",w)}if(k=null===(l=Z)||void 0===l||null===(s=l[ae])||void 0===s||null===(c=s.liveDetails)||void 0===c?void 0:c.startOverTime,ce&&u.resolve(Me({status:!0,msg:"Player Initialised"},ne?{seriesResponse:ne,response:Z}:{response:Z})),e.inititateBeacon(o,{analyticsCb:null==a?void 0:a.analyticsCb,analyticsEventParams:null==a?void 0:a.analyticsEventParams,userId:null==a?void 0:a.userId}),ge(o,a),Se.on("chromecastConnected",function(){var e=Se.textTracks().tracks_.find(function(e){return("captions"===e.kind||"subtitles"===e.kind)&&"showing"===e.mode}),n=e?{language:e.language||null,label:e.label||null}:null,t=function(){var e=n||we;if(e){var t=Se.textTracks().tracks_.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind}),r=t.find(function(n){return e.language&&n.language===e.language})||t.find(function(n){return e.label&&n.label===e.label})||t[0];r&&"showing"!==r.mode&&(r.mode="showing")}};Se.one("loadeddata",function(){return setTimeout(t,0)}),setTimeout(t,1500)}),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),se&&U(o,k),!de||null!=a&&null!==(d=a.customData)&&void 0!==d&&d.disableAds||e.initialiseAdvertisement(o,de,Z),S=e.getSource(Z,o),console.log(S),re&&(console.log("[PLAYER DEBUG] source:",S),console.log("[PLAYER DEBUG] videojs options:",ke)),null!=a&&a.nearestClusterUrl&&(S=e.getUpdatedClusterSource(S,a.nearestClusterUrl)),!fe){n.next=25;break}return n.next=22,e.getSGAIEnabledSource(o,Z);case 22:S=n.sent,n.next=29;break;case 25:if(!pe){n.next=29;break}return n.next=28,e.getTransmitEnabledSource(S,Z,o);case 28:S=n.sent;case 29:Se&&(Se.__vlDrmLicenseUrl=qe(S)),S?e.loadVideo(o,S):(u.reject({status:!1,msg:"Incompatible / Missing Source",response:Z}),e.handleError(o,"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===(P=Z)||void 0===P||null===(E=P[ae])||void 0===E||null===(I=E.contentDetails)||void 0===I?void 0:I.closedCaptions)||(null===(C=Z)||void 0===C||null===(D=C[ae])||void 0===D?void 0:D.closedCaptions),T=O.filter(function(e){return"VTT"===e.format}),v.addCaptions(o,T)),null!=a&&a.disableControls?e.disableControls(o):ye(o,Me(Me(Me({},a),ke),{},{liveVideo:ce,isDvrEnabled:se,res:Z,sres:ne})),Le(o,Me(Me(Me({},a),ke),{},{liveVideo:ce}),u,{res:Z,sres:ne});case 34:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}};function Xe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Qe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ze=function(e,n){var t=n.resolve,r=n.reject,i=null==e?void 0:e.playerId,o=en(e);Je(i,{res:o},e,{resolve:t,reject:r})},en=function(n){var t,r,i,o,l,a,u,s,c,d,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===(r=n.streamingInfo)||void 0===r?void 0:r.isDrmEnabled)||null,y=(null==n||null===(i=n.streamingInfo)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.url)||null,w=(null==n||null===(l=n.streamingInfo)||void 0===l?void 0:l.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,T=(null==n||null===(c=n.streamingInfo)||void 0===c?void 0:c.macroMap)||[],P=(null==n||null===(d=n.customData)||void 0===d||null===(v=d.ads)||void 0===v?void 0:v.isSSAIEnabled)||!1,E=null==n?void 0:n.token,I=e.getDecodedToken(E);null==I||I.site;var C=null==I?void 0:I.siteId,D=(null==n||null===(f=n.customData)||void 0===f||null===(p=f.comscore)||void 0===p?void 0:p.video)||null,O=Qe(Qe({id:"".concat(C,"_external")},!h&&{directPlaybackUrl:null==g?void 0:g.url}),{},{video:Qe(Qe(Qe(Qe(Qe({drmEnabled:h,streamingInfo:Qe(Qe({videoAssets:Qe(Qe({},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==D?void 0:D.isLiveStream)&&{isLiveStream:null==D?void 0:D.isLiveStream})},P&&{isSSAIEnabled:P}),{},{metadata:T,liveDetails:{isDvrEnabled:null==m?void 0:m.isDvrEnabled},gist:Qe(Qe(Qe({},w&&{videoImageUrl:w}),(null==D?void 0:D.videoId)&&{id:null==D?void 0:D.videoId}),(null==D?void 0:D.videoTitle)&&{title:null==D?void 0:D.videoTitle}),contentDetails:Qe({},(null==k?void 0:k.length)>0&&{closedCaptions:b(k)})},(null==D?void 0:D.runtime)&&{runtime:null==D?void 0:D.runtime}),(null==D?void 0:D.publishDate)&&{publishDate:null==D?void 0:D.publishDate}),(null==D?void 0:D.platform)&&{platform:null==D?void 0:D.platform}),(null==D?void 0:D.series)&&{series:null==D?void 0:D.series}),ads:{preRoll:{adTags:{web:Qe(Qe({},y&&{active:!0}),y&&{url:y})}}}});return D&&(null!=D&&D.isDvrEnabled&&(O.video.liveDetails=Qe(Qe({},O.video.liveDetails),{},{isDvrEnabled:null==D?void 0:D.isDvrEnabled})),null!=D&&D.metadata&&(O.video.metadata=[].concat(b(O.video.metadata),b(null==D?void 0:D.metadata)))),O};function nn(e,n){return tn.apply(this,arguments)}function tn(){return(tn=t(r.mark(function n(t,i){var o,l,a,u,s,c,v,f,p;return r.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,c=null==t?void 0:t.playerId,v=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:f=n.sent,p=!1===(null==t||null===(o=t.customData)||void 0===o||null===(l=o.ads)||void 0===l?void 0:l.isSSAIEnabled),e.getVideoDetails(s,f,p).then(function(n){var r,i,o,l,p,m,g,h,y,b,w;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(i=r.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType,e.setCurrentVideo(null==n?void 0:n.data);var k=null==n||null===(l=n.data)||void 0===l||null===(p=l.video)||void 0===p||null===(m=p.gist)||void 0===m?void 0:m.scheduleEndDate,S=null==n||null===(g=n.data)||void 0===g||null===(h=g.video)||void 0===h||null===(y=h.gist)||void 0===y?void 0:y.scheduleStartDate;d.handlePlayerMessage(c,{scheduleEndDate:k,scheduleStartDate:S});var T=null==n?void 0:n.data;if(null!=t&&null!==(b=t.watchHistory)&&void 0!==b&&b.isExternal)T.contentType="video",Je(c,{res:T},t,{resolve:a,reject:u});else if(null!=t&&t.watchHistory&&null!=t&&null!==(w=t.watchHistory)&&void 0!==w&&w.enable&&!v){var P;if((null===(P=t.watchHistory)||void 0===P?void 0:P.saveOffline)||!1){var E,I,C,D=Ce((null===(E=t.watchHistory)||void 0===E?void 0:E.profileId)||"",s,null==t?void 0:t.siteOwner);if(D&&D.length)t.watchHistoryResumeTime=(null===(I=D[0])||void 0===I?void 0:I.watchedTime)||null,t.watchedPercentage=(null===(C=D[0])||void 0===C?void 0:C.watchedPercentage)||null;T.contentType="video",Je(c,{res:T},t,{resolve:a,reject:u})}else e.getVideoInfo(s,f).then(function(e){var n,r,i,o,l,a;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,T.contentType="video"}).catch(function(){}).finally(function(){Je(c,{res:T},t,{resolve:a,reject:u})})}else Je(c,{res:T},t,{resolve:a,reject:u})}).catch(function(n){var r,i,o=(null==t||null===(r=t.event)||void 0===r?void 0:r.showScheduleTimer)||!1,l=(null==t||null===(i=t.event)||void 0===i?void 0:i.onCountdownComplete)||null;o&&d.handleCountdownTimer(c,n,l),e.initiateErrorHandling(n,c,u,s)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function rn(e,n){return on.apply(this,arguments)}function on(){return(on=t(r.mark(function n(t,i){var o,l,a,u,s,c,d,v;return r.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,c=null==t?void 0:t.playerId,d=null==t?void 0:t.epg,v=!1===(null==t||null===(o=t.customData)||void 0===o||null===(l=o.ads)||void 0===l?void 0:l.isSSAIEnabled),e.getLinearChannelDetails(d,s,v).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==d?void 0:d.channelId,Je(c,{res:n},t,{resolve:a,reject:u})}).catch(function(n){e.initiateErrorHandling(n,c,u,videoId)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function ln(e,n){return an.apply(this,arguments)}function an(){return(an=t(r.mark(function n(t,i){var o,l,a,u,s,c,d;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return l=i.resolve,a=i.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,c=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(c)),d=null==t||null===(o=t.series)||void 0===o?void 0:o.id,e.getSeriesDetails(d,u).then(function(n){var r,i,o,c=n.data,v=n.data.seasons;e.setCurrentSeries(v);var f=videoId||(null==v||null===(r=v[0])||void 0===r||null===(i=r.episodes)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.id);e.createSeriesWatchMap(d,u),e.getVideoDetails(f,u).then(function(n){var r,i,o;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(i=r.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType,e.setCurrentVideo(n.data),Je(s,{res:null==n?void 0:n.data,sres:c},t,{resolve:l,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 un,sn=(un=new Map,{set:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=Array.isArray(n)?n:[];return un.set(e,t),t},get:function(e){return un.get(e)||[]},remove:function(e){un.delete(e)}});function cn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function dn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return vn(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?vn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 o,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw o}}}}function vn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var fn=function(e){var n=Date.parse(null==e?void 0:e.eventStartUtc),t=Number.isFinite(n)?n/1e3:0;return{start:t+(Number(null==e?void 0:e.startTime)||0),end:t+(Number(null==e?void 0:e.endTime)||0)}},pn=function(e){var n;try{var t,r,i=null==e||null===(t=e.liveTracker)||void 0===t||null===(r=t.seekableEnd)||void 0===r?void 0:r.call(t);if(Number.isFinite(i))return i}catch(e){}var o=null==e||null===(n=e.seekable)||void 0===n?void 0:n.call(e);return o&&o.length?o.end(o.length-1):NaN};function mn(e){var t=null,r=null,i="none",o=function(n){var o=m.getPlayer(e);if(!o)return null;if("pdt"===i&&null!=t)return r+(n-t);var l=pn(o);return Number.isFinite(l)?l-(Date.now()/1e3-n):null},l=function(){var n=m.getPlayer(e),t=n&&n.seekable();return t&&t.length?{start:t.start(0),end:t.end(t.length-1)}:{start:0,end:0}};return{refreshAnchor:function(){var n=m.getPlayer(e);if(n){var o=function(e){try{var n=e.tech(!0),t=n&&n.vhs,r=t&&t.playlists,i=r&&"function"==typeof r.media&&r.media();return i&&i.segments||null}catch(e){return null}}(n),l=n.currentTime()||0;if(o&&o.length){var a,u=null,s=1/0,c=dn(o);try{for(c.s();!(a=c.n()).done;){var d=a.value;if(d&&"number"==typeof d.programDateTime&&"number"==typeof d.start&&Number.isFinite(d.start)){var v=Math.abs(d.start-l);v<s&&(s=v,u=d)}}}catch(e){c.e(e)}finally{c.f()}if(u)return t=u.programDateTime/1e3,r=u.start,void(i="pdt")}t=null,r=null,i="now"}},anchorInfo:function(){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}({anchorPdtSec:t,anchorPlayerT:r,source:i},l())},chapterToPlayerTime:function(e){return o(fn(e).start)},chapterStartPercent:function(e){return function(e){var n=l(),t=n.start,r=n.end;if(!(r>t))return null;var i=o(e);return null==i||i<t||i>r?null:(i-t)/(r-t)*100}(fn(e).start)},playerTimeToChapterIndex:function(n,o){var l=function(n){var o=m.getPlayer(e);if(!o)return null;if("pdt"===i&&null!=t)return t+(n-r);var l=pn(o);return Number.isFinite(l)?Date.now()/1e3-(l-n):null}(n);if(null==l)return-1;for(var a=-1,u=0;u<o.length;u++){var s=fn(o[u]),c=s.start,d=s.end,v=Math.max(d,c+.001);l>=c&&l<v&&(a=u)}return a},windowBounds:l}}function gn(e){return"livedvr"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).timeMode?mn(e):function(e){var n=function(e){return Number(null==e?void 0:e.startTime)||0},t=function(e){var t=Number(null==e?void 0:e.endTime);return Number.isFinite(t)?t:n(e)};return{chapterToPlayerTime:function(e){return n(e)},chapterStartPercent:function(t){var r=m.getPlayer(e),i=r&&r.duration();if(!Number.isFinite(i)||i<=0)return null;var o,l=n(t);return l<0||l>i?null:100*((o=l/i)<0?0:o>1?1:o)},playerTimeToChapterIndex:function(e,r){for(var i=-1,o=0;o<r.length;o++){var l=n(r[o]),a=Math.max(t(r[o]),l+.001);e>=l&&e<a&&(i=o)}return i},windowBounds:function(){var n=m.getPlayer(e),t=n&&n.duration();return{start:0,end:Number.isFinite(t)?t:0}},refreshAnchor:function(){},anchorInfo:function(){return{source:"vod"}}}}(e)}var hn="chapter-change",yn="chapter-click",bn="chapters-updated";function wn(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=m.getPlayer(e);r?r.trigger(n,t):console.error("[CHAPTERS] Player instance not found")}function kn(e){var n=m.getPlayer(e);if(!n)return console.error("[CHAPTERS] Player instance not found"),{};var t=function(e,t){var r=function(e,n){return t(n)};return n.on(e,r),function(){return n.off(e,r)}};return{onChapterChange:function(e){return t(hn,e)},onChapterClick:function(e){return t(yn,e)},onChaptersUpdated:function(e){return t(bn,e)}}}var Sn="vjs-chapter-marker",Tn="vjs-chapter-preview",Pn=function(e){try{var n,t,r;return(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r?void 0:r.el())||null}catch(e){return null}};function En(e,n){var t=n.store,r=n.mapper,o=n.chaptersConfig,l=void 0===o?{}:o,a=n.seek,u=m.getPlayer(e);if(!u)return{render:function(){},reposition:function(){},destroy:function(){}};var s=new Map,c=null,d=-1,v=function(){return!0===(null==l?void 0:l.enable)},f=function(n,t){var o=m.getPlayer(e),l=Pn(o);if(l){var a=function(e){if(c&&c.isConnected)return c;(c=document.createElement("div")).className=Tn;var n=document.createElement("div");n.className="vjs-chapter-preview__time";var t=document.createElement("div");t.className="vjs-chapter-preview__label",c.appendChild(n),c.appendChild(t);var r=document.createElement("span");return r.className="vjs-chapter-preview__pointer",c.appendChild(r),c._time=n,c._label=t,c._pointer=r,e.appendChild(c),c}(l);a._time.textContent=function(e){try{var n=r.chapterToPlayerTime(e);if(null==n||!Number.isFinite(n))return"";if("vod"===("function"==typeof r.anchorInfo?r.anchorInfo():{}).source)return i.formatTime(n,n);var t=(r.windowBounds()||{}).end;if(!Number.isFinite(t))return"";var o=Math.max(0,t-n);return"-".concat(i.formatTime(o,o))}catch(e){return""}}(n),a._label.textContent=(null==n?void 0:n.label)||"",a.classList.add("vjs-chapter-preview--visible");var u="function"==typeof(null==o?void 0:o.el)?o.el():null;u&&u.classList.add("vlp-chapter-preview-open"),function(e,n,t,r){var i="function"==typeof(null==t?void 0:t.el)?t.el():null;if(i){var o=i.getBoundingClientRect(),l=n.getBoundingClientRect(),a=e.offsetWidth||300,u=a/2,s=l.left+r/100*l.width,c=o.left+8+u,d=o.right-8-u,v=s;d>=c&&(v=Math.min(Math.max(s,c),d));var f=v-u-l.left;if(e.style.left="".concat(f,"px"),e.style.transform="none",e._pointer){var p=Math.min(Math.max(s-(l.left+f),8),a-8);e._pointer.style.left="".concat(p,"px")}}else e.style.left="".concat(r,"%")}(a,l,o,t)}},p=function(){c&&c.classList.remove("vjs-chapter-preview--visible");var n=m.getPlayer(e),t="function"==typeof(null==n?void 0:n.el)?n.el():null;t&&t.classList.remove("vlp-chapter-preview-open")},g=function(n){var t=document.createElement("div");t.className=Sn,t.dataset.segmentId=String(n.segmentId);var i=function(e){var n=null!=e&&e.icon?String(e.icon).trim():"";if(!n)return null;var t=document.createElement("span");if(t.className="vjs-chapter-marker__icon","<"===n.charAt(0)){var r=m.parseSvgString(n);r&&t.appendChild(r)}else{var i=document.createElement("img");i.src=n,i.alt="",t.appendChild(i)}return t}(n);return i&&t.appendChild(i),t.addEventListener("click",function(t){t.stopPropagation(),"function"==typeof a&&a(n.segmentId),wn(e,yn,{chapter:n})}),t.addEventListener("mouseenter",function(){var e=r.chapterStartPercent(n);null!=e&&f(n,e)}),t.addEventListener("mouseleave",p),t},h=function(){v()&&0!==s.size&&(r.refreshAnchor(),t.get(e).forEach(function(e){var n=s.get(String(e.segmentId));if(n){var t=r.chapterStartPercent(e);null==t?n.style.display="none":(n.style.display="",n.style.left="".concat(t,"%"))}}))},y=0,b=function(n){s.forEach(function(e){return e.classList.remove("".concat(Sn,"--active"))});var r=t.get(e),i=n>=0?r[n]:null;if(i){var o=s.get(String(i.segmentId));o&&o.classList.add("".concat(Sn,"--active"))}},w=function(){var n=m.getPlayer(e);if(n){var i=t.get(e),o=r.playerTimeToChapterIndex(n.currentTime()||0,i);-1===o&&Date.now()<y||o!==d&&(d=o,b(o),wn(e,hn,{chapter:o>=0?i[o]:null}))}},k=m.throttle(function(){h(),w()},1e3),S=function(){h(),w()};u.on("timeupdate",k),u.on("seeked",S);var T=!1;try{u.liveTracker&&"function"==typeof u.liveTracker.on&&(u.liveTracker.on("liveedgechange",h),T=!0)}catch(e){}var P=null;(function(){try{return"function"==typeof r.anchorInfo&&"vod"!==r.anchorInfo().source}catch(e){return!1}})()&&(P=setInterval(h,500));return{render:function(){var n=m.getPlayer(e),i=Pn(n);i&&(i.querySelectorAll(".".concat(Sn)).forEach(function(e){return e.remove()}),s.clear(),v()&&(r.refreshAnchor(),t.get(e).forEach(function(e){var n=g(e);i.appendChild(n),s.set(String(e.segmentId),n)}),h(),b(d),w()))},reposition:h,destroy:function(){try{u.off("timeupdate",k),u.off("seeked",S),T&&u.liveTracker.off("liveedgechange",h)}catch(e){}P&&(clearInterval(P),P=null);var n=Pn(m.getPlayer(e));n&&n.querySelectorAll(".".concat(Sn,", .").concat(Tn)).forEach(function(e){return e.remove()}),s.clear(),c=null},setActiveBySegment:function(n){var r=t.get(e),i=r.findIndex(function(e){return String(e.segmentId)===String(n)});i<0||(y=Date.now()+1500,i!==d&&(d=i,b(i),wn(e,hn,{chapter:r[i]})))}}}var In=new Map,Cn=function(e){try{var n,t,r;return!(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r||!r.el())}catch(e){return!1}},Dn=function(e){var n=In.get(e);if(n)return n;n={mapper:gn(e,{timeMode:"vod"}),markers:null,chaptersConfig:{},timeMode:"vod"},In.set(e,n);var t=m.getPlayer(e);return t&&t.on("dispose",function(){return Rn(e)}),n},On=function(e){var n=In.get(e),t=function(e){var n=In.get(e);if(!n||n.markers)return(null==n?void 0:n.markers)||null;var t=m.getPlayer(e);return t&&Cn(t)?(n.markers=En(e,{store:sn,mapper:n.mapper,chaptersConfig:n.chaptersConfig,seek:function(n){return An(e,n)}}),n.markers):null}(e);t&&n&&t.render()};function jn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Dn(e),sn.set(e,n),On(e),wn(e,bn,{chapters:sn.get(e)}),!0}function xn(e){return sn.get(e)}function _n(e){sn.set(e,[]);var n=In.get(e);return null!=n&&n.markers&&n.markers.render(),wn(e,bn,{chapters:[]}),!0}function An(e,n){var t,r,i=m.getPlayer(e),o=Dn(e);if(!i)return!1;var l=sn.get(e).find(function(e){return e.segmentId===n});if(!l)return!1;o.mapper.refreshAnchor();var a=o.mapper.chapterToPlayerTime(l);if(null==a||!Number.isFinite(a))return!1;var u=o.mapper.windowBounds(),s=u.start,c=u.end;return Number.isFinite(s)&&Number.isFinite(c)&&c>s&&(a=Math.min(Math.max(a,s),c-.1)),i.currentTime(a),null===(t=o.markers)||void 0===t||null===(r=t.setActiveBySegment)||void 0===r||r.call(t,n),!0}function Rn(e){var n=In.get(e);n&&(n.disposed=!0,n.markers&&n.markers.destroy()),In.delete(e),sn.remove(e)}var Ln,Nn=function(n){var t=n.site,r=n.sseBaseUrl,i=n.sseEndpoint,o=n.debug,l=void 0!==o&&o;return w.createSSETransport({site:t,sseBaseUrl:r,getToken:e.getToken,sseEndpoint:i,onOpen:function(e){var n=e.userId,t=e.endpoint;l&&console.log("SSE Connected:",n,t)},onMessage:function(n){var t,r,i,o,a,u,s,c,v,f;if(l&&console.log("SSE Message:",n),(null===(t=e.getCurrentVideo())||void 0===t||null===(r=t.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.id)===(null==n||null===(o=n.payload)||void 0===o?void 0:o.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),m=1e3*(null==n||null===(c=n.payload)||void 0===c||null===(v=c.states)||void 0===v||null===(f=v.end)||void 0===f?void 0:f.endDateTime);p&&m&&(console.log("Setting schedule timer",p,m),d.scheduleTimerInstanceManager.set({startDateTime:p,endDateTime:m}))}},onReconnectAttempt:function(e){l&&console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;l&&console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){l&&console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){l&&console.error("SSE Error:",e,n)},onClose:function(){l&&console.log("SSE Closed")}})},Mn=function(e){var n=e.enable,t=e.site,r=e.sseBaseUrl,i=e.sseEndpoint,o=e.debug;if(n){var l=Nn({site:t,sseBaseUrl:r,sseEndpoint:i,debug:void 0!==o&&o});return l._sseBaseUrl=r,l._site=t,l._sseEndpoint=i,l}};function Bn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Un(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bn(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}exports.VLPlayerCore=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:d.onTimeUpdate,getVideoDuration:d.getVideoDuration,onVideoEnded:d.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var i=t(r.mark(function t(i,o){var l,a,u,s,c,d,v,f,p,g,y,b,w,S,T,P,E,I,C,D,O,j,x,_,A,L,N,M,B,U,V,H;return r.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,D=null==n?void 0:n.asat,O=(null==n||null===(l=n.epg)||void 0===l?void 0:l.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,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 o({status:!1,msg:"".concat(A?"Token is expired !":"Missing Authorization Token"),response:{token:A}}),t.abrupt("return");case 17:Ln=JSON.parse(atob(A.split(".")[1]));case 18:return window.siteName=null===(u=Ln)||void 0===u?void 0:u.site,window.siteId=null===(s=Ln)||void 0===s?void 0:s.siteId,n.isAnonymousUser=!(null===(c=Ln)||void 0===c||!c.anonymousId),n.siteOwner=(null===(d=Ln)||void 0===d?void 0:d.site)||null,n.userId=(null===(v=Ln)||void 0===v?void 0:v.userId)||null,e.setUserId((null===(f=Ln)||void 0===f?void 0:f.userId)||(null===(p=Ln)||void 0===p?void 0:p.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,N=(null==n||null===(y=n.analytics)||void 0===y?void 0:y.gaId)||null,(M=null==n?void 0:n.errors)&&(window.customErrors=M),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),k.relatedVideosManager.reset(),k.relatedVideosManager.set(null==n?void 0:n.relatedVideos),t.next=39,W(n);case 39:N&&R("https://www.googletagmanager.com/gtag/js?id=".concat(N)).then(function(){return e.runGtag(N)}).catch(function(e){}),(B=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(L)))&&B.addEventListener("contextmenu",function(e){return e.preventDefault()}),(U=Mn({enable:null==n||null===(S=n.sse)||void 0===S?void 0:S.enable,site:null==n||null===(T=n.sse)||void 0===T?void 0:T.siteName,sseBaseUrl:null==n||null===(P=n.sse)||void 0===P?void 0:P.sseBaseUrl,sseEndpoint:null==n||null===(E=n.sse)||void 0===E?void 0:E.sseEndpoint,debug:null==n||null===(I=n.sse)||void 0===I?void 0:I.debug}))&&!U.isConnectionActive()&&U.connect(),C?(H={directPlaybackUrl:C,id:V="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},D?e.getVideoDetails(V,A).then(function(e){var t=(null==e?void 0:e.data)||{};Je(L,{res:Un(Un({},t),H)},n,{resolve:i,reject:o})}).catch(function(n){e.initiateErrorHandling(n,L,o,V)}):Je(L,{res:H},n,{resolve:i,reject:o})):_?Ze(n,{resolve:i,reject:o}):x?ln(n,{resolve:i,reject:o}):O?rn(n,{resolve:i,reject:o}):nn(n,{resolve:i,reject:o});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:d.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:M,disableControls:e.disableControls,setPlaybackSpeed:d.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,getSsaiEvents:e.getSsaiEvents,playerEvents:d.playerEvents,onReplay:d.onReplay,relatedVideosManager:k.relatedVideosManager,setChapters:jn,getChapters:xn,clearChapters:_n,seekToChapter:An,getChapterEvents:kn}},exports.initChapters=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.chapters,r=void 0===t?[]:t,i=n.timeMode,o=void 0===i?"vod":i;n.res;var l=n.chaptersConfig,a=void 0===l?{}:l,u=m.getPlayer(e);if(!u)return!1;Array.isArray(r)&&r.length&&sn.set(e,r);var s=In.get(e);null!=s&&s.markers&&s.markers.destroy();var c={mapper:gn(e,{timeMode:o}),markers:null,chaptersConfig:a||{},timeMode:o,disposed:!1};In.set(e,c);var d=function(){c.disposed||On(e)};return u.one("loadeddata",d),Cn(u)&&d(),u.on("dispose",function(){return Rn(e)}),!0};
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-460c2f4c.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/regenerator"),i=require("video.js"),o=require("@babel/runtime/helpers/classCallCheck"),l=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/get"),u=require("@babel/runtime/helpers/inherits"),s=require("@babel/runtime/helpers/possibleConstructorReturn"),c=require("@babel/runtime/helpers/getPrototypeOf"),d=require("./index-fed823e4.js"),v=require("./captions-0ca41a03.js"),f=require("./renditions-627bdfad.js"),p=require("./resolution-3af2cf1b.js"),m=require("./skin-66dce245.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("@viewlift/sse"),k=require("./relatedVideosManager-eeeaf32c.js");function S(e,n,t,r){var i=a(c(1&r?e.prototype:e),n,t);return 2&r&&"function"==typeof i?function(e){return i.apply(t,e)}:i}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(T=function(){return!!e})()}var P=i.getComponent("TextTrackSettings"),E=i.dom,I=[{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"}],C=I.map(function(e){return e.value}),D="16",O="vlp-caption-font-size-px",j="vlp-caption-font-size-style",x=".vjs-font-percent > select",_=function(e){return-1!==C.indexOf(e)?e:D},A=null;P?(A=function(){u(r,P);var e,n,t=(e=r,n=T(),function(){var t,r=c(e);if(n){var i=c(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return s(this,t)});function r(e,n){var i;return o(this,r),(i=t.call(this,e,n)).customUiReady_=!0,i.applyCustomFontSizeUI_(),i}return l(r,[{key:"applyCustomFontSizeUI_",value:function(){this.replaceFontSizeOptions_(),this.bindFontSizeChange_(),this.restoreCustomFontSize_()}},{key:"replaceFontSizeOptions_",value:function(){var e=this.$(x);if(e){for(;e.firstChild;)e.removeChild(e.firstChild);I.forEach(function(n){e.appendChild(E.createEl("option",{value:n.value,textContent:n.label}))}),e.value=D}}},{key:"bindFontSizeChange_",value:function(){var e=this,n=this.$(x);n&&this.on(n,"change",function(){return e.applyFontSize_(n.value)})}},{key:"applyFontSize_",value:function(e){var n=_(e);if("undefined"!=typeof document){var t=document.getElementById(j);t||((t=document.createElement("style")).id=j,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(O)}catch(e){}var n=_(e),t=this.$(x);t&&(t.value=n),this.applyFontSize_(n)}},{key:"getValues",value:function(){var e=S(r,"getValues",this,3)([]);return e&&delete e.fontPercent,e||{}}},{key:"setDefaults",value:function(){if(S(r,"setDefaults",this,3)([]),this.customUiReady_){var e=this.$(x);e&&(e.value=D),this.applyFontSize_(D)}}},{key:"saveSettings",value:function(){if(S(r,"saveSettings",this,3)([]),this.options_&&this.options_.persistTextTrackSettings){var e=this.$(x);if(e)try{window.localStorage.setItem(O,_(e.value))}catch(e){}}}},{key:"handleLanguagechange",value:function(){S(r,"handleLanguagechange",this,3)([]),this.applyCustomFontSizeUI_()}}]),r}(),i.registerComponent("TextTrackSettings",A)):console.warn("[vlp] CustomTextTrackSettings: video.js TextTrackSettings is not registered; skipping override.");var R=function(e){return new Promise(function(n,t){if(L(e))t("".concat(e," is alread initialised"));else{var r=document.createElement("script");r.async=!0,r.src=e,r.onload=function(){n()},r.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(r)}})},L=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},N=function(e,n,t){var r=m.getPlayer(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var i=parseFloat(n)/100;r.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,"'")})},M=function(e){var n=m.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},B=function(){var e=t(r.mark(function e(n){var t,o,l,a,u;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=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,R("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!==(l=window)&&void 0!==l&&l.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==g.detectBrowser()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),U=function(e,n){var t=m.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,r,o,l,a,u=this.el(),s=i.dom.getPointerPosition(u,n).x;i.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var c=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(o=r.framework)||void 0===o||null===(l=o.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(c),c&&"CONNECTED"===d){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 V=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),R("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(r.mark(function n(){return r.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)}}(),q=function(){var e=t(r.mark(function e(){return r.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)}}(),F=function(){var e=t(r.mark(function e(){var n;return r.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)}}(),z=function(){var e=t(r.mark(function e(){return r.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)}}(),G=function(){var e=t(r.mark(function e(){return r.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){R("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:V,loadEMELibrary:q,loadMuxPlugin:F,loadDvrSeekbar:z,loadContribDash:G,loadComscorePlugin:H});function W(e){return Y.apply(this,arguments)}function Y(){return(Y=t(r.mark(function e(n){var t;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,V();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 $(e){return J.apply(this,arguments)}function J(){return(J=t(r.mark(function e(n){var t,i,o,l,a,u,s,c,d,v;return r.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===(o=n.comscore)||void 0===o?void 0:o.applicationName)||(null===(l=window)||void 0===l?void 0:l.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===(c=n.comscore)||void 0===c?void 0:c.persistentLabels)||{},metadata:(null==n||null===(d=n.comscore)||void 0===d?void 0:d.metadata)||{}});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function X(e,n){return Q.apply(this,arguments)}function Q(){return(Q=t(r.mark(function e(n,t){var i,o,l,a,u,s,c,d,v,f,p,m,h,y;return r.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===(o=t[v])||void 0===o||null===(l=o.liveDetails)||void 0===l||l.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===(c=n.comscore)||void 0===c?void 0:c.enable)||!1,h=!(null==n||null===(d=n.analytics)||void 0===d||!d.muxKey),e.prev=7,e.next=10,Promise.allSettled([f?"Safari"==g.detectBrowser()?q():"caliente"!=(null===(y=window)||void 0===y?void 0:y.siteName)?G():q():"Safari"!=g.detectBrowser()&&p?G():null,m?$(n):null,h?F():null,B(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 Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ne=new Set,te=null,re=function(n,t,r,i){var o,l,a,u,s,c,d,v={},f=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(o=n[f])||void 0===o?void 0:o.id)||"Null",v["c3.cm.contentType"]=ce(n),v[null==r||null===(l=r.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==n||!n.linearchannel),v[null==r||null===(a=r.Constants)||void 0===a?void 0:a.STREAM_URL]=t.currentSrc(),v[null==r||null===(u=r.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),v["c3.cm.categoryType"]=ae(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!==(c=n[f])&&void 0!==c&&null!==(d=c.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",v[r.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=ue(n),v["c3.cm.genreList"]=oe(n),v["c3.cm.genre"]=ie(n),v["c3.cm.channel"]=le(n,i);var p=fe(e.getCurrentSeries(),n);return v=ee(ee({},v),p)},ie=function(e){var n,t,r,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===(r=t.primaryCategory)||void 0===r?void 0:r.title)||"Null"},oe=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"},le=function(e,n){var t,r,i=(null==e?void 0:e.contentType)||"video";return"video"===i?"VOD":(null===(r=((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===r?void 0:r.title)||"NULL"},ae=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"},ue=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video",i=(null==e||null===(n=e[r])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return i?"YES":"NO"},se=function(e,n){var t,r,i=(n||{}).epg;if(i&&null!=i&&i.enable&&null!=i&&i.programTitle)return i.programTitle;var o=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[o])||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.title)||"Null";return"".concat(l)},ce=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var de,ve,fe=function(n,t){var r,i,o,l,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(),c=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(i=r.series)||void 0===i?void 0:i.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==n||null===(o=n[s-1])||void 0===o||null===(l=o.episodes)||void 0===l||null===(a=l[c-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==c?void 0:c.toString())||"Null",u},pe=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"}},me=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},ge=function(){var n=t(r.mark(function n(t,i){var o,l,a,u,s,c,d,v,f,p,g,h;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(o=(null==i?void 0:i.convivaConfig)||{},l=o.trackConvivaPlayerEvent,a=o.paymentHandler,u=o.tveProvider,s=o.enable,c=o.appName,v=(d=i||{}).token,f=d.epg,s){n.next=4;break}return n.abrupt("return");case 4:if(p=m.getPlayer(t),"function"==typeof(g=l)){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 r=pe(t.keySystem);g("contentInfo",{DRMEnabled:r})}else g("contentInfo",{DRMEnabled:"None"})}),n||g("contentInfo",{DRMEnabled:"None"})}),p.on("loadstart",function(){var n,t;te&&te!==p.currentSrc()&&g("playbackEnded"),g("setPlayer",p),ne.clear(),te=p.currentSrc();var r=me(p.currentType()),o=e.getCurrentVideo(),l=re(o,p,h,f);l[null==h||null===(n=h.Constants)||void 0===n?void 0:n.PLAYER_NAME]=c||"WEB",l[null==h||null===(t=h.Constants)||void 0===t?void 0:t.ASSET_NAME]=se(o,i),l.authToken=v||"NULL",l.streamType=r,l.D2CType=a||"NONE",l.subscriberType=u?"MVPD":"FREE"!==a?"D2C":"FREE",l["c3.cm.affiliate"]=u||"NULL",he.setData(l),g("contentInfo",l)}),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(){ne.has(p.currentSrc())||(ne.add(p.currentSrc()),g("playbackStarted",null))}),p.on("ended",function(){ne.has(p.currentSrc())&&ne.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==ne||ne.clear(),g("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),he=(de={},{setData:function(e){de=ee(ee({},de),e)},getData:function(){return de}}),ye=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-8bcb6a55.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-2193cc41.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-e4a31cb3.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-765e1355.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-c8d40d82.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?Promise.resolve().then(function(){return require("./skin-08149121.js")}).then(function(t){t.initialiseSkin(e,n)}):"news"==t?Promise.resolve().then(function(){return require("./skin-dbacca02.js")}).then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?Promise.resolve().then(function(){return require("./skin-222dc6b7.js")}).then(function(t){t.initialiseSkin(e,n)}):"mini"==t?Promise.resolve().then(function(){return require("./skin-886a6d4b.js")}).then(function(t){t.initialiseSkin(e,n)}):"CN_NEWS"==t&&Promise.resolve().then(function(){return require("./skin-4e3170cf.js")}).then(function(t){t.initialiseSkin(e,n)})};function be(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ke=[],Se=0,Te=null;function Pe(){ve=null,ke=[],Se=0,Te=null}function Ee(t,r,i){var o,l,a,u,s,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==r||null===(o=r.watchHistory)||void 0===o||o.apiVersion;var d=null==r||null===(l=r.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(t.currentTime()),f=Math.floor(t.duration());null==r||null===(a=r.watchHistory)||void 0===a||a.xapiKey;var p=(null==r||null===(u=r.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==r||null===(s=r.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,g=Math.floor(t.currentTime()),h=c?100:Math.floor(v/f*100),y={};m?function(t,r,i){var o=r?"watchhistory-data-".concat(r):"watchhistory-data-guest-".concat(i),l=Ie(o),a=(new Date).getTime(),u=e.getCurrentVideo(),s=(null==u?void 0:u.video)||{},c=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return we(we({},e),{},n({},t,s[t]))},{}),d=l.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===ve});d<0?l.push(we(we({content:c},t),{},{addedDate:a,updateDate:a})):l[d]=we(we(we({},l[d]),t),{},{updateDate:a});localStorage.setItem("".concat(o),JSON.stringify(l))}(y={completed:c,watchedTime:g,watchedPercentage:h},d,r.siteOwner):(y=we(we({videoId:ve,watchedTime:g,watchedPercentage:h,doneWatching:c,profileId:d},Te&&{seriesId:Te}),p&&{originalObjectId:p}),e.saveWatchHistory(y).then(function(e){}).catch(function(e){})),Se=v+i}function Ie(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function Ce(e,n,t){var r=Ie(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),i=[];return r&&Array.isArray(r)&&(i=r.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),i}var De=!1,Oe=function(n,t){var r,i,o=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(r=n[o])||void 0===r||null===(i=r.streamingInfo)||void 0===i?void 0:i.secondaryVideoAssets)||null)&&!De){var l=je(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),De=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function je(e,n,t){if(Array.isArray(e))return e.map(function(e){return je(e,n,t)});if(null!==e&&"object"===y(e)){var r={};return Object.keys(e).forEach(function(i){i===n&&void 0!==e[t]?r[i]=e[t]:i===t&&void 0!==e[n]?r[i]=e[n]:r[i]=je(e[i],n,t)}),r}return e}function xe(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 _e(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)?_e(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 o,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw o}}}}function _e(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function Ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ae(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Le=function(n,t,r,i){var o,l,a,u,s,c=i.res,d=i.sres,f=m.getPlayer(n),p=(null==c?void 0:c.contentType)||"video",h=(null==c||null===(o=c[p])||void 0===o?void 0:o.drmEnabled)||!1,b=!(null==c||null===(l=c[p])||void 0===l||null===(a=l.streamingInfo)||void 0===a||!a.isLiveStream)||"linearchannel"===p,w=(null==c||null===(u=c[p])||void 0===u||null===(s=u.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;e.setCurrentVideo(c),e.videoReplayTracker.set(c),f&&(f.on("loadstart",function(){b?r.resolve({status:!0,msg:"Video Loaded",response:c}):r.resolve(Re({status:!0,msg:"Player Initialised"},d?{seriesResponse:d,response:c}:{response:c}))}),f.on("loadeddata",function(){var r,i,o,l,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!==(r=t.watchHistory)&&void 0!==r&&r.isExternal){var d=Re(Re({},t),c);!function(e,n){var t,r,i;if(null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&null!=n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&"function"==typeof(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.cb)){var o,l,a,u=(null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.interval)||30,s=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.completionThreshold)||95,c=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.cb,d=-1;e.on("seeked",function(){var n=Math.floor(e.currentTime()),t=n-n%u;if(d=t,t>0){var r=Math.floor(n/e.duration()*100);c({watchedTime:n,watchedPercentage:r,doneWatching:r>=s})}}),e.on("timeupdate",function(){var n=Math.floor(e.currentTime()),t=n-n%u;if(n%u===0&&t!==d){d=t;var r=Math.floor(n/e.duration()*100);c({watchedTime:n,watchedPercentage:r,doneWatching:r>=s||!1})}}),e.on("ended",function(){c({watchedTime:Math.floor(e.duration()),watchedPercentage:100,doneWatching:!0})})}}(f,d)}else if(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 p,h,y=Re(Re({},t),c);!function(e,n,t){var r,i,o;null!=n&&n.series&&null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable&&(Te=null==n||null===(i=n.series)||void 0===i?void 0:i.id),ke=[],Se=0,ve=t;var l=(null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.interval)||30,a=m.getPlayer(e);a&&(a.on("dispose",Pe),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());ke.includes(Se)||(e!=Se||e<l?e>Se&&(Se=e+l):(ke.push(e),Ee(a,n,l)))}}),a.one("ended",function(){Ee(a,n,l,!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!==(l=t.analytics)&&void 0!==l&&l.muxKey&&null!=f&&f.mux){var b,k,S,T,P,E,I=(null===(b=e.getCurrentVideo())||void 0===b?void 0:b.video)||(null==c?void 0:c.video),C=null==I?void 0:I.gist,D={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===(T=I.series)||void 0===T?void 0:T.title,video_stream_type:null!=I&&null!==(P=I.streamingInfo)&&void 0!==P&&P.isLiveStream?"live":"video",viewer_user_id:null==t||null===(E=t.analytics)||void 0===E?void 0:E.userId};f.mux({debug:!1,data:D})}}),f.textTracks().on("change",function(e){var t=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];v.syncTtmlDisplay(n),f.trigger("subtitlechanged",t)}),f.on("subtitlechanged",function(e,n){var t,r,i,o,l,a,u,s,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(i=r.framework)||void 0===i||null===(o=i.CastContext)||void 0===o||null===(l=o.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(c=s.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.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&&Oe(c,n)}),f.on("error",function(){var t,i;(console.log("ERROR",f.error(),f.error().code),4===f.error().code&&b)?Oe(c,n):(e.handleError(n,(null==f||null===(t=f.error())||void 0===t?void 0:t.message)||"Some error occured"),r.reject({status:!1,msg:(null==f||null===(i=f.error())||void 0===i?void 0:i.message)||"Some error occured",response:c}))}),f.one("play",function(){var n,r,i,o,l;if(null===(n=window)||void 0===n||null===(r=n.app_data)||void 0===r||null===(i=r.appcmsMain)||void 0===i||null===(o=i.adsConfig)||void 0===o||!o.vodAdClientSideTracking){if(null!=t&&null!==(l=t.series)&&void 0!==l&&l.enable){var a,u,s,c=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,d=e.getSeriesWatchMap(),v=(null==d?void 0:d.get(c))||{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,T=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,P=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,E=null!==(k=null==t||null===(S=t.watchHistory)||void 0===S?void 0:S.completionThreshold)&&void 0!==k?k:95;T&&P<E&&setTimeout(function(){f.currentTime(T)},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(),r=(n.language||n.label||"").toUpperCase();return t<r?-1:t>r?1:0}),"object"==y(f.dash)){var t,r,i,o=null==f||null===(t=f.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==o?void 0:o.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=xe(n);try{for(a.s();!(i=a.n()).done;){var u=i.value;if(l&&(null==u?void 0:u.id)=="dash-audio-".concat(l.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,c=[],d=xe(n);try{for(d.s();!(s=d.n()).done;){var v,p,m,b=s.value;("Chrome"==g.detectBrowser()||"Edge"==g.detectBrowser()&&(null!==(v=navigator)&&void 0!==v&&null!==(p=v.userAgent)&&void 0!==p&&p.includes("Macintosh")||!h))&&null!=b&&null!==(m=b.label)&&void 0!==m&&m.includes("5.1")?f.audioTracks().removeTrack(b):c.push(b)}}catch(e){d.e(e)}finally{d.f()}for(var w=c.find(function(e){return"main"===e.kind}),k=w||c.find(function(e){return e.enabled})||c[0],S=0,T=c;S<T.length;S++){var P=T[S];P.enabled=P===k}}}))};function Ne(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Me(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ne(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Be(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 Ue(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)?Ue(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 o,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw o}}}}function Ue(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}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};function He(n,t,r){var i=e.playerConfigManager.getConfig()||{};e.emitApiErrorEvent(n,{status:r,message:"DRM ".concat(t," request failed")},"playback",{requestKind:t,videoId:null==i?void 0:i.videoId})}function qe(e){try{if(null!=e&&e.__vlLicenseUrl)return e.__vlLicenseUrl;var n=null==e?void 0:e.keySystems;if(n)for(var t=0,r=Object.keys(n);t<r.length;t++){var i=n[r[t]];if("string"==typeof i)return i;if(null!=i&&i.url)return i.url;if(null!=i&&i.licenseUri)return i.licenseUri}var o=null==e?void 0:e.keySystemOptions;if(Array.isArray(o)){var l,a=Be(o);try{for(a.s();!(l=a.n()).done;){var u,s,c,d=l.value,v=(null==d||null===(u=d.options)||void 0===u?void 0:u.serverURL)||(null==d||null===(s=d.options)||void 0===s?void 0:s.licenseUri)||(null==d||null===(c=d.options)||void 0===c?void 0:c.url);if(v)return v}}catch(e){a.e(e)}finally{a.f()}}}catch(e){}return""}function Fe(e){if(null!=e&&e.__vlDrmLicenseUrl)return e.__vlDrmLicenseUrl;try{return qe("function"==typeof e.currentSource?e.currentSource():null)}catch(e){return""}}function ze(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)||{},r=(null==n?void 0:n.url)||(null==t?void 0:t.url)||"",i=e.classifyRequestKind(r,(null==t?void 0:t.type)||(null==n?void 0:n.type));if(e.isDrmRequestKind(i)){var o=e.extractStatusCode(n,null);e.isHttpOk(o)||He(r,i,o)}}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(r){try{var i,o,l,a;if(null==r||!r.error)return;var u=null!==(i=null==r||null===(o=r.error)||void 0===o||null===(l=o.data)||void 0===l?void 0:l.responseCode)&&void 0!==i?i:e.extractStatusCode(null,r.error);He((null==r||null===(a=r.data)||void 0===a?void 0:a.url)||t.__vlLastLicenseUrl||Fe(n)||"","license",u)}catch(e){}}))}var Ge=!1,Ke=null,We=new Set;function Ye(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(Ge&&!(We.size>0)){var e=null==i?void 0:i.Html5DashJS;e&&"function"==typeof e.removeHook&&"function"==typeof Ke&&e.removeHook("beforeinitialize",Ke),Ge=!1,Ke=null}}())};"function"==typeof e.one?e.one("dispose",n):"function"==typeof e.on&&e.on("dispose",n)}}function $e(n){if(n){Ye(n),function(){if(!Ge){var e=null==i?void 0:i.Html5DashJS;e&&"function"==typeof e.hook&&(Ke=function(e,n){null!=e&&e.__vlDrmDashEnabled&&ze(e,n)},Ge=!0,e.hook("beforeinitialize",Ke))}}(),function(n){n&&!n.__vlEmeDrmErrorInstalled&&(n.__vlEmeDrmErrorInstalled=!0,n.on("error",function(){try{var t,r="function"==typeof n.error?n.error():null;if(!r||!e.isDrmError(r))return;if(null!=n&&null!==(t=n.dash)&&void 0!==t&&t.mediaPlayer)return;He(Fe(n),"license",null)}catch(e){}}))}(n);var t=function(){var t;!function(n){var t,r,i=null==n||null===(t=n.tech_)||void 0===t||null===(r=t.vhs)||void 0===r?void 0:r.xhr;i&&"function"==typeof i.onResponse&&!n.__vlDrmVhsHooksInstalled&&(n.__vlDrmVhsHooksInstalled=!0,i.onResponse(function(n,t,r){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),o=e.classifyRequestKind(i,null==n?void 0:n.type);if(!e.isDrmRequestKind(o))return;var l=e.extractStatusCode(r,t);e.isHttpOk(l)&&!t||He(i,o,l)}catch(e){}}))}(n),ze(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 Je=function(o,l,a,u){var s,c,d,f,p,h,y,b,w,k,S,T,P,E,I,C,D,O,j,x,_,A,R,L,N,M,B,V,H,q,F,z,G,K,W,Y,$,J,Q=l.res,Z=void 0===Q?null:Q,ee=l.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)||""),r=t.get("loglevel")||null;return{playerDebug:"true"===t.get("playerdebug"),logLevel:r,dashLogLevel:null!=r&&null!=Ve[r]?Ve[r]:5}}catch(e){return{playerDebug:!1,logLevel:null,dashLogLevel:5}}}(),re=te.playerDebug,ie=te.logLevel,oe=te.dashLogLevel;re&&(console.log("[PLAYER DEBUG] config:",a),console.log("[PLAYER DEBUG] entitlement (res):",Z),ne&&console.log("[PLAYER DEBUG] series response (sres):",ne));var le=null!=a&&a.chromecastReceiverId?["chromecast","html5"]:["html5"],ae=(null===(s=Z)||void 0===s?void 0:s.contentType)||"video",ue=m.impolicy16x9(null===(c=Z)||void 0===c||null===(d=c[ae])||void 0===d||null===(f=d.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,ce=!(null===(T=Z)||void 0===T||null===(P=T[ae])||void 0===P||null===(E=P.streamingInfo)||void 0===E||!E.isLiveStream)||"linearchannel"===ae,de=(null===(I=Z)||void 0===I||null===(C=I.ads)||void 0===C||null===(D=C.preRoll)||void 0===D||null===(O=D.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===(A=_.preRoll)||void 0===A||null===(R=A.adTags)||void 0===R||null===(L=R.web)||void 0===L?void 0:L.url);Z=Me(Me({},Z),{},{audioAssetSource:null==a?void 0:a.audioAssetSource});var ve=(null==a||null===(N=a.customData)||void 0===N?void 0:N.ads)||{},fe=(null===(M=Z)||void 0===M||null===(B=M[ae])||void 0===B?void 0:B.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==ve?void 0:ve.vodAdSticherProvider)||!1,pe=!(null===(V=Z)||void 0===V||null===(H=V[ae])||void 0===H||!H.isSSAIEnabled)&&"TRANSMIT"==(null==ve?void 0:ve.liveAdSticherProvider)&&!(null==ve||!ve.liveAdClientSideTracking),me=(null==a?void 0:a.latency)||6,be=(null==a?void 0:a.skin_settings)||{},we=null,ke=($={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==be?void 0:be.pictureInPictureToggle)||!1},playbackRates:null!=be&&be.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)&&!de),n($,"loop",(null==a?void 0:a.loop)||!1),n($,"audioPosterMode",null==a?void 0:a.audioPosterMode),n($,"html5",Me(Me({dash:Me(Me({},!i.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:Me(Me({},((null==a?void 0:a.debugConfig)&&(null==a||null===(q=a.debugConfig)||void 0===q?void 0:q.enable)||re)&&{debug:{logLevel:oe}}),{},{streaming:{delay:{liveDelay:me},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Me({},"IE"==g.detectBrowser()&&{enableStallFix:!0,stallSeek:1}),abr:Me(Me(Me(Me({},(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:Me(Me(Me({},(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)||re)&&{debug:!0}),debug:(null==a?void 0:a.debugConfig)&&(null==a||null===(K=a.debugConfig)||void 0===K?void 0:K.enable)||re||!1,nativeTextTracks:"Safari"==g.detectBrowser()},0==(null==a||null===(W=a.customData)||void 0===W?void 0:W.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(Y=a.customData)||void 0===Y?void 0:Y.nativeVideoTracks)&&{nativeVideoTracks:!1})),n($,"poster",ue),n($,"techOrder",le),n($,"chromecast",{requestCustomDataFn:function(n){var t,r,i=m.getPlayer(o),l=((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 r,i,o,l,a,u,s,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,g,h,y,b,w,k,S;p.isDrmEnabled=!0;var T=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,P=(null==T?void 0:T.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=P;var E=(null==T?void 0:T.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=E}var I=(null==e||null===(r=e[f])||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.contentType)||"VIDEO";p.contentType=I;var C=null==e||null===(o=e[f])||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.runtime;p.duration=C;var D=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=D;var O=null==e||null===(s=e[f])||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=O,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Z,n,l),s=l.find(function(e){return"showing"===e.mode})||null;return we=s?{language:s.language||s.lang||null,label:s.label||null}:null,Me(Me({},u),{},{activeCaption:{enabled:!!s,language:(null==s?void 0:s.language)||(null==s?void 0:s.lang)||null,label:(null==s?void 0:s.label)||null},transmitTrackingUrl:e.trackingUrlManager.get()||null,convivaMetaData:Me({customerKey:(null==a||null===(t=a.convivaConfig)||void 0===t?void 0:t.customerKey)||null,debug:(null==a||null===(r=a.convivaConfig)||void 0===r?void 0:r.debug)||!1},he.getData())})},modifyLoadRequestFn:function(e){var n,t,r,i,l,a=m.getPlayer(o),u=(null==a?void 0:a.currentSource())||{};!(null===(n=Z)||void 0===n||null===(t=n[ae])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(l=u.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),$);if(!i.getPlayers()[o]){(null!=a&&a.debugConfig&&null!=a&&null!==(J=a.debugConfig)&&void 0!==J&&J.enable||re)&&i.log.level(ie||"debug");var Se=i(o,ke,function(){var n=t(r.mark(function n(){var t,l,s,c,d,f,p,m,g,h,y,b,w,k,S,T,P,E,I,C,D,O;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return $e(Se),console.log(Se),console.log(i.VERSION),console.log(i.getPlugins()),n.next=6,X(a,Z);case 6:if(null!=a&&a.debugConfig&&null!=a&&null!==(t=a.debugConfig)&&void 0!==t&&t.enable||re){try{i.log.level(ie||"debug")}catch(e){}(w=function(){try{var e,n,t;null==Se||null===(e=Se.dash)||void 0===e||null===(n=e.mediaPlayer)||void 0===n||null===(t=n.updateSettings)||void 0===t||t.call(n,{debug:{logLevel:oe}})}catch(e){}})(),Se.one("loadedmetadata",w)}if(k=null===(l=Z)||void 0===l||null===(s=l[ae])||void 0===s||null===(c=s.liveDetails)||void 0===c?void 0:c.startOverTime,ce&&u.resolve(Me({status:!0,msg:"Player Initialised"},ne?{seriesResponse:ne,response:Z}:{response:Z})),e.inititateBeacon(o,{analyticsCb:null==a?void 0:a.analyticsCb,analyticsEventParams:null==a?void 0:a.analyticsEventParams,userId:null==a?void 0:a.userId}),ge(o,a),Se.on("chromecastConnected",function(){var e=Se.textTracks().tracks_.find(function(e){return("captions"===e.kind||"subtitles"===e.kind)&&"showing"===e.mode}),n=e?{language:e.language||null,label:e.label||null}:null,t=function(){var e=n||we;if(e){var t=Se.textTracks().tracks_.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind}),r=t.find(function(n){return e.language&&n.language===e.language})||t.find(function(n){return e.label&&n.label===e.label})||t[0];r&&"showing"!==r.mode&&(r.mode="showing")}};Se.one("loadeddata",function(){return setTimeout(t,0)}),setTimeout(t,1500)}),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),se&&U(o,k),!de||null!=a&&null!==(d=a.customData)&&void 0!==d&&d.disableAds||e.initialiseAdvertisement(o,de,Z),S=e.getSource(Z,o),console.log(S),re&&(console.log("[PLAYER DEBUG] source:",S),console.log("[PLAYER DEBUG] videojs options:",ke)),null!=a&&a.nearestClusterUrl&&(S=e.getUpdatedClusterSource(S,a.nearestClusterUrl)),!fe){n.next=25;break}return n.next=22,e.getSGAIEnabledSource(o,Z);case 22:S=n.sent,n.next=29;break;case 25:if(!pe){n.next=29;break}return n.next=28,e.getTransmitEnabledSource(S,Z,o);case 28:S=n.sent;case 29:Se&&(Se.__vlDrmLicenseUrl=qe(S)),S?e.loadVideo(o,S):(u.reject({status:!1,msg:"Incompatible / Missing Source",response:Z}),e.handleError(o,"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===(P=Z)||void 0===P||null===(E=P[ae])||void 0===E||null===(I=E.contentDetails)||void 0===I?void 0:I.closedCaptions)||(null===(C=Z)||void 0===C||null===(D=C[ae])||void 0===D?void 0:D.closedCaptions),T=O.filter(function(e){return"VTT"===e.format}),v.addCaptions(o,T)),null!=a&&a.disableControls?e.disableControls(o):ye(o,Me(Me(Me({},a),ke),{},{liveVideo:ce,isDvrEnabled:se,res:Z,sres:ne})),Le(o,Me(Me(Me({},a),ke),{},{liveVideo:ce}),u,{res:Z,sres:ne});case 34:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}};function Xe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Qe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ze=function(e,n){var t=n.resolve,r=n.reject,i=null==e?void 0:e.playerId,o=en(e);Je(i,{res:o},e,{resolve:t,reject:r})},en=function(n){var t,r,i,o,l,a,u,s,c,d,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===(r=n.streamingInfo)||void 0===r?void 0:r.isDrmEnabled)||null,y=(null==n||null===(i=n.streamingInfo)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.url)||null,w=(null==n||null===(l=n.streamingInfo)||void 0===l?void 0:l.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,T=(null==n||null===(c=n.streamingInfo)||void 0===c?void 0:c.macroMap)||[],P=(null==n||null===(d=n.customData)||void 0===d||null===(v=d.ads)||void 0===v?void 0:v.isSSAIEnabled)||!1,E=null==n?void 0:n.token,I=e.getDecodedToken(E);null==I||I.site;var C=null==I?void 0:I.siteId,D=(null==n||null===(f=n.customData)||void 0===f||null===(p=f.comscore)||void 0===p?void 0:p.video)||null,O=Qe(Qe({id:"".concat(C,"_external")},!h&&{directPlaybackUrl:null==g?void 0:g.url}),{},{video:Qe(Qe(Qe(Qe(Qe({drmEnabled:h,streamingInfo:Qe(Qe({videoAssets:Qe(Qe({},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==D?void 0:D.isLiveStream)&&{isLiveStream:null==D?void 0:D.isLiveStream})},P&&{isSSAIEnabled:P}),{},{metadata:T,liveDetails:{isDvrEnabled:null==m?void 0:m.isDvrEnabled},gist:Qe(Qe(Qe({},w&&{videoImageUrl:w}),(null==D?void 0:D.videoId)&&{id:null==D?void 0:D.videoId}),(null==D?void 0:D.videoTitle)&&{title:null==D?void 0:D.videoTitle}),contentDetails:Qe({},(null==k?void 0:k.length)>0&&{closedCaptions:b(k)})},(null==D?void 0:D.runtime)&&{runtime:null==D?void 0:D.runtime}),(null==D?void 0:D.publishDate)&&{publishDate:null==D?void 0:D.publishDate}),(null==D?void 0:D.platform)&&{platform:null==D?void 0:D.platform}),(null==D?void 0:D.series)&&{series:null==D?void 0:D.series}),ads:{preRoll:{adTags:{web:Qe(Qe({},y&&{active:!0}),y&&{url:y})}}}});return D&&(null!=D&&D.isDvrEnabled&&(O.video.liveDetails=Qe(Qe({},O.video.liveDetails),{},{isDvrEnabled:null==D?void 0:D.isDvrEnabled})),null!=D&&D.metadata&&(O.video.metadata=[].concat(b(O.video.metadata),b(null==D?void 0:D.metadata)))),O};function nn(e,n){return tn.apply(this,arguments)}function tn(){return(tn=t(r.mark(function n(t,i){var o,l,a,u,s,c,v,f,p;return r.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,c=null==t?void 0:t.playerId,v=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:f=n.sent,p=!1===(null==t||null===(o=t.customData)||void 0===o||null===(l=o.ads)||void 0===l?void 0:l.isSSAIEnabled),e.getVideoDetails(s,f,p).then(function(n){var r,i,o,l,p,m,g,h,y,b,w;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(i=r.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType,e.setCurrentVideo(null==n?void 0:n.data);var k=null==n||null===(l=n.data)||void 0===l||null===(p=l.video)||void 0===p||null===(m=p.gist)||void 0===m?void 0:m.scheduleEndDate,S=null==n||null===(g=n.data)||void 0===g||null===(h=g.video)||void 0===h||null===(y=h.gist)||void 0===y?void 0:y.scheduleStartDate;d.handlePlayerMessage(c,{scheduleEndDate:k,scheduleStartDate:S});var T=null==n?void 0:n.data;if(null!=t&&null!==(b=t.watchHistory)&&void 0!==b&&b.isExternal)T.contentType="video",Je(c,{res:T},t,{resolve:a,reject:u});else if(null!=t&&t.watchHistory&&null!=t&&null!==(w=t.watchHistory)&&void 0!==w&&w.enable&&!v){var P;if((null===(P=t.watchHistory)||void 0===P?void 0:P.saveOffline)||!1){var E,I,C,D=Ce((null===(E=t.watchHistory)||void 0===E?void 0:E.profileId)||"",s,null==t?void 0:t.siteOwner);if(D&&D.length)t.watchHistoryResumeTime=(null===(I=D[0])||void 0===I?void 0:I.watchedTime)||null,t.watchedPercentage=(null===(C=D[0])||void 0===C?void 0:C.watchedPercentage)||null;T.contentType="video",Je(c,{res:T},t,{resolve:a,reject:u})}else e.getVideoInfo(s,f).then(function(e){var n,r,i,o,l,a;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,T.contentType="video"}).catch(function(){}).finally(function(){Je(c,{res:T},t,{resolve:a,reject:u})})}else Je(c,{res:T},t,{resolve:a,reject:u})}).catch(function(n){var r,i,o=(null==t||null===(r=t.event)||void 0===r?void 0:r.showScheduleTimer)||!1,l=(null==t||null===(i=t.event)||void 0===i?void 0:i.onCountdownComplete)||null;o&&d.handleCountdownTimer(c,n,l),e.initiateErrorHandling(n,c,u,s)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function rn(e,n){return on.apply(this,arguments)}function on(){return(on=t(r.mark(function n(t,i){var o,l,a,u,s,c,d,v;return r.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,c=null==t?void 0:t.playerId,d=null==t?void 0:t.epg,v=!1===(null==t||null===(o=t.customData)||void 0===o||null===(l=o.ads)||void 0===l?void 0:l.isSSAIEnabled),e.getLinearChannelDetails(d,s,v).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==d?void 0:d.channelId,Je(c,{res:n},t,{resolve:a,reject:u})}).catch(function(n){e.initiateErrorHandling(n,c,u,videoId)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function ln(e,n){return an.apply(this,arguments)}function an(){return(an=t(r.mark(function n(t,i){var o,l,a,u,s,c,d;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return l=i.resolve,a=i.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,c=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(c)),d=null==t||null===(o=t.series)||void 0===o?void 0:o.id,e.getSeriesDetails(d,u).then(function(n){var r,i,o,c=n.data,v=n.data.seasons;e.setCurrentSeries(v);var f=videoId||(null==v||null===(r=v[0])||void 0===r||null===(i=r.episodes)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.id);e.createSeriesWatchMap(d,u),e.getVideoDetails(f,u).then(function(n){var r,i,o;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(i=r.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType,e.setCurrentVideo(n.data),Je(s,{res:null==n?void 0:n.data,sres:c},t,{resolve:l,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 un,sn=(un=new Map,{set:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=Array.isArray(n)?n:[];return un.set(e,t),t},get:function(e){return un.get(e)||[]},remove:function(e){un.delete(e)}});function cn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function dn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return vn(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?vn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 o,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw o}}}}function vn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var fn=function(e){var n=Date.parse(null==e?void 0:e.eventStartUtc),t=Number.isFinite(n)?n/1e3:0;return{start:t+(Number(null==e?void 0:e.startTime)||0),end:t+(Number(null==e?void 0:e.endTime)||0)}},pn=function(e){var n;try{var t,r,i=null==e||null===(t=e.liveTracker)||void 0===t||null===(r=t.seekableEnd)||void 0===r?void 0:r.call(t);if(Number.isFinite(i))return i}catch(e){}var o=null==e||null===(n=e.seekable)||void 0===n?void 0:n.call(e);return o&&o.length?o.end(o.length-1):NaN};function mn(e){var t=null,r=null,i="none",o=function(n){var o=m.getPlayer(e);if(!o)return null;if("pdt"===i&&null!=t)return r+(n-t);var l=pn(o);return Number.isFinite(l)?l-(Date.now()/1e3-n):null},l=function(){var n=m.getPlayer(e),t=n&&n.seekable();return t&&t.length?{start:t.start(0),end:t.end(t.length-1)}:{start:0,end:0}};return{refreshAnchor:function(){var n=m.getPlayer(e);if(n){var o=function(e){try{var n=e.tech(!0),t=n&&n.vhs,r=t&&t.playlists,i=r&&"function"==typeof r.media&&r.media();return i&&i.segments||null}catch(e){return null}}(n),l=n.currentTime()||0;if(o&&o.length){var a,u=null,s=1/0,c=dn(o);try{for(c.s();!(a=c.n()).done;){var d=a.value;if(d&&"number"==typeof d.programDateTime&&"number"==typeof d.start&&Number.isFinite(d.start)){var v=Math.abs(d.start-l);v<s&&(s=v,u=d)}}}catch(e){c.e(e)}finally{c.f()}if(u)return t=u.programDateTime/1e3,r=u.start,void(i="pdt")}t=null,r=null,i="now"}},anchorInfo:function(){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}({anchorPdtSec:t,anchorPlayerT:r,source:i},l())},chapterToPlayerTime:function(e){return o(fn(e).start)},chapterStartPercent:function(e){return function(e){var n=l(),t=n.start,r=n.end;if(!(r>t))return null;var i=o(e);return null==i||i<t||i>r?null:(i-t)/(r-t)*100}(fn(e).start)},playerTimeToChapterIndex:function(n,o){var l=function(n){var o=m.getPlayer(e);if(!o)return null;if("pdt"===i&&null!=t)return t+(n-r);var l=pn(o);return Number.isFinite(l)?Date.now()/1e3-(l-n):null}(n);if(null==l)return-1;for(var a=-1,u=0;u<o.length;u++){var s=fn(o[u]),c=s.start,d=s.end,v=Math.max(d,c+.001);l>=c&&l<v&&(a=u)}return a},windowBounds:l}}function gn(e){return"livedvr"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).timeMode?mn(e):function(e){var n=function(e){return Number(null==e?void 0:e.startTime)||0},t=function(e){var t=Number(null==e?void 0:e.endTime);return Number.isFinite(t)?t:n(e)};return{chapterToPlayerTime:function(e){return n(e)},chapterStartPercent:function(t){var r=m.getPlayer(e),i=r&&r.duration();if(!Number.isFinite(i)||i<=0)return null;var o,l=n(t);return l<0||l>i?null:100*((o=l/i)<0?0:o>1?1:o)},playerTimeToChapterIndex:function(e,r){for(var i=-1,o=0;o<r.length;o++){var l=n(r[o]),a=Math.max(t(r[o]),l+.001);e>=l&&e<a&&(i=o)}return i},windowBounds:function(){var n=m.getPlayer(e),t=n&&n.duration();return{start:0,end:Number.isFinite(t)?t:0}},refreshAnchor:function(){},anchorInfo:function(){return{source:"vod"}}}}(e)}var hn="chapter-change",yn="chapter-click",bn="chapters-updated";function wn(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=m.getPlayer(e);r?r.trigger(n,t):console.error("[CHAPTERS] Player instance not found")}function kn(e){var n=m.getPlayer(e);if(!n)return console.error("[CHAPTERS] Player instance not found"),{};var t=function(e,t){var r=function(e,n){return t(n)};return n.on(e,r),function(){return n.off(e,r)}};return{onChapterChange:function(e){return t(hn,e)},onChapterClick:function(e){return t(yn,e)},onChaptersUpdated:function(e){return t(bn,e)}}}var Sn="vjs-chapter-marker",Tn="vjs-chapter-preview",Pn=function(e){try{var n,t,r;return(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r?void 0:r.el())||null}catch(e){return null}};function En(e,n){var t=n.store,r=n.mapper,o=n.chaptersConfig,l=void 0===o?{}:o,a=n.seek,u=m.getPlayer(e);if(!u)return{render:function(){},reposition:function(){},destroy:function(){}};var s=new Map,c=null,d=-1,v=function(){return!0===(null==l?void 0:l.enable)},f=function(n,t){var o=m.getPlayer(e),l=Pn(o);if(l){var a=function(e){if(c&&c.isConnected)return c;(c=document.createElement("div")).className=Tn;var n=document.createElement("div");n.className="vjs-chapter-preview__time";var t=document.createElement("div");t.className="vjs-chapter-preview__label",c.appendChild(n),c.appendChild(t);var r=document.createElement("span");return r.className="vjs-chapter-preview__pointer",c.appendChild(r),c._time=n,c._label=t,c._pointer=r,e.appendChild(c),c}(l);a._time.textContent=function(e){try{var n=r.chapterToPlayerTime(e);if(null==n||!Number.isFinite(n))return"";if("vod"===("function"==typeof r.anchorInfo?r.anchorInfo():{}).source)return i.formatTime(n,n);var t=(r.windowBounds()||{}).end;if(!Number.isFinite(t))return"";var o=Math.max(0,t-n);return"-".concat(i.formatTime(o,o))}catch(e){return""}}(n),a._label.textContent=(null==n?void 0:n.label)||"",a.classList.add("vjs-chapter-preview--visible");var u="function"==typeof(null==o?void 0:o.el)?o.el():null;u&&u.classList.add("vlp-chapter-preview-open"),function(e,n,t,r){var i="function"==typeof(null==t?void 0:t.el)?t.el():null;if(i){var o=i.getBoundingClientRect(),l=n.getBoundingClientRect(),a=e.offsetWidth||300,u=a/2,s=l.left+r/100*l.width,c=o.left+8+u,d=o.right-8-u,v=s;d>=c&&(v=Math.min(Math.max(s,c),d));var f=v-u-l.left;if(e.style.left="".concat(f,"px"),e.style.transform="none",e._pointer){var p=Math.min(Math.max(s-(l.left+f),8),a-8);e._pointer.style.left="".concat(p,"px")}}else e.style.left="".concat(r,"%")}(a,l,o,t)}},p=function(){c&&c.classList.remove("vjs-chapter-preview--visible");var n=m.getPlayer(e),t="function"==typeof(null==n?void 0:n.el)?n.el():null;t&&t.classList.remove("vlp-chapter-preview-open")},g=function(n){var t=document.createElement("div");t.className=Sn,t.dataset.segmentId=String(n.segmentId);var i=function(e){var n=null!=e&&e.icon?String(e.icon).trim():"";if(!n)return null;var t=document.createElement("span");if(t.className="vjs-chapter-marker__icon","<"===n.charAt(0)){var r=m.parseSvgString(n);r&&t.appendChild(r)}else{var i=document.createElement("img");i.src=n,i.alt="",t.appendChild(i)}return t}(n);return i&&t.appendChild(i),t.addEventListener("click",function(t){t.stopPropagation(),"function"==typeof a&&a(n.segmentId),wn(e,yn,{chapter:n})}),t.addEventListener("mouseenter",function(){var e=r.chapterStartPercent(n);null!=e&&f(n,e)}),t.addEventListener("mouseleave",p),t},h=function(){v()&&0!==s.size&&(r.refreshAnchor(),t.get(e).forEach(function(e){var n=s.get(String(e.segmentId));if(n){var t=r.chapterStartPercent(e);null==t?n.style.display="none":(n.style.display="",n.style.left="".concat(t,"%"))}}))},y=0,b=function(n){s.forEach(function(e){return e.classList.remove("".concat(Sn,"--active"))});var r=t.get(e),i=n>=0?r[n]:null;if(i){var o=s.get(String(i.segmentId));o&&o.classList.add("".concat(Sn,"--active"))}},w=function(){var n=m.getPlayer(e);if(n){var i=t.get(e),o=r.playerTimeToChapterIndex(n.currentTime()||0,i);-1===o&&Date.now()<y||o!==d&&(d=o,b(o),wn(e,hn,{chapter:o>=0?i[o]:null}))}},k=m.throttle(function(){h(),w()},1e3),S=function(){h(),w()};u.on("timeupdate",k),u.on("seeked",S);var T=!1;try{u.liveTracker&&"function"==typeof u.liveTracker.on&&(u.liveTracker.on("liveedgechange",h),T=!0)}catch(e){}var P=null;(function(){try{return"function"==typeof r.anchorInfo&&"vod"!==r.anchorInfo().source}catch(e){return!1}})()&&(P=setInterval(h,500));return{render:function(){var n=m.getPlayer(e),i=Pn(n);i&&(i.querySelectorAll(".".concat(Sn)).forEach(function(e){return e.remove()}),s.clear(),v()&&(r.refreshAnchor(),t.get(e).forEach(function(e){var n=g(e);i.appendChild(n),s.set(String(e.segmentId),n)}),h(),b(d),w()))},reposition:h,destroy:function(){try{u.off("timeupdate",k),u.off("seeked",S),T&&u.liveTracker.off("liveedgechange",h)}catch(e){}P&&(clearInterval(P),P=null);var n=Pn(m.getPlayer(e));n&&n.querySelectorAll(".".concat(Sn,", .").concat(Tn)).forEach(function(e){return e.remove()}),s.clear(),c=null},setActiveBySegment:function(n){var r=t.get(e),i=r.findIndex(function(e){return String(e.segmentId)===String(n)});i<0||(y=Date.now()+1500,i!==d&&(d=i,b(i),wn(e,hn,{chapter:r[i]})))}}}var In=new Map,Cn=function(e){try{var n,t,r;return!(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r||!r.el())}catch(e){return!1}},Dn=function(e){var n=In.get(e);if(n)return n;n={mapper:gn(e,{timeMode:"vod"}),markers:null,chaptersConfig:{},timeMode:"vod"},In.set(e,n);var t=m.getPlayer(e);return t&&t.on("dispose",function(){return Rn(e)}),n},On=function(e){var n=In.get(e),t=function(e){var n=In.get(e);if(!n||n.markers)return(null==n?void 0:n.markers)||null;var t=m.getPlayer(e);return t&&Cn(t)?(n.markers=En(e,{store:sn,mapper:n.mapper,chaptersConfig:n.chaptersConfig,seek:function(n){return An(e,n)}}),n.markers):null}(e);t&&n&&t.render()};function jn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Dn(e),sn.set(e,n),On(e),wn(e,bn,{chapters:sn.get(e)}),!0}function xn(e){return sn.get(e)}function _n(e){sn.set(e,[]);var n=In.get(e);return null!=n&&n.markers&&n.markers.render(),wn(e,bn,{chapters:[]}),!0}function An(e,n){var t,r,i=m.getPlayer(e),o=Dn(e);if(!i)return!1;var l=sn.get(e).find(function(e){return e.segmentId===n});if(!l)return!1;o.mapper.refreshAnchor();var a=o.mapper.chapterToPlayerTime(l);if(null==a||!Number.isFinite(a))return!1;var u=o.mapper.windowBounds(),s=u.start,c=u.end;return Number.isFinite(s)&&Number.isFinite(c)&&c>s&&(a=Math.min(Math.max(a,s),c-.1)),i.currentTime(a),null===(t=o.markers)||void 0===t||null===(r=t.setActiveBySegment)||void 0===r||r.call(t,n),!0}function Rn(e){var n=In.get(e);n&&(n.disposed=!0,n.markers&&n.markers.destroy()),In.delete(e),sn.remove(e)}var Ln,Nn=function(n){var t=n.site,r=n.sseBaseUrl,i=n.sseEndpoint,o=n.debug,l=void 0!==o&&o;return w.createSSETransport({site:t,sseBaseUrl:r,getToken:e.getToken,sseEndpoint:i,onOpen:function(e){var n=e.userId,t=e.endpoint;l&&console.log("SSE Connected:",n,t)},onMessage:function(n){var t,r,i,o,a,u,s,c,v,f;if(l&&console.log("SSE Message:",n),(null===(t=e.getCurrentVideo())||void 0===t||null===(r=t.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.id)===(null==n||null===(o=n.payload)||void 0===o?void 0:o.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),m=1e3*(null==n||null===(c=n.payload)||void 0===c||null===(v=c.states)||void 0===v||null===(f=v.end)||void 0===f?void 0:f.endDateTime);p&&m&&(console.log("Setting schedule timer",p,m),d.scheduleTimerInstanceManager.set({startDateTime:p,endDateTime:m}))}},onReconnectAttempt:function(e){l&&console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;l&&console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){l&&console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){l&&console.error("SSE Error:",e,n)},onClose:function(){l&&console.log("SSE Closed")}})},Mn=function(e){var n=e.enable,t=e.site,r=e.sseBaseUrl,i=e.sseEndpoint,o=e.debug;if(n){var l=Nn({site:t,sseBaseUrl:r,sseEndpoint:i,debug:void 0!==o&&o});return l._sseBaseUrl=r,l._site=t,l._sseEndpoint=i,l}};function Bn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Un(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bn(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}exports.VLPlayerCore=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:d.onTimeUpdate,getVideoDuration:d.getVideoDuration,onVideoEnded:d.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var i=t(r.mark(function t(i,o){var l,a,u,s,c,d,v,f,p,g,y,b,w,S,T,P,E,I,C,D,O,j,x,_,A,L,N,M,B,U,V,H;return r.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,D=null==n?void 0:n.asat,O=(null==n||null===(l=n.epg)||void 0===l?void 0:l.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,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 o({status:!1,msg:"".concat(A?"Token is expired !":"Missing Authorization Token"),response:{token:A}}),t.abrupt("return");case 17:Ln=JSON.parse(atob(A.split(".")[1]));case 18:return window.siteName=null===(u=Ln)||void 0===u?void 0:u.site,window.siteId=null===(s=Ln)||void 0===s?void 0:s.siteId,n.isAnonymousUser=!(null===(c=Ln)||void 0===c||!c.anonymousId),n.siteOwner=(null===(d=Ln)||void 0===d?void 0:d.site)||null,n.userId=(null===(v=Ln)||void 0===v?void 0:v.userId)||null,e.setUserId((null===(f=Ln)||void 0===f?void 0:f.userId)||(null===(p=Ln)||void 0===p?void 0:p.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,N=(null==n||null===(y=n.analytics)||void 0===y?void 0:y.gaId)||null,(M=null==n?void 0:n.errors)&&(window.customErrors=M),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),k.relatedVideosManager.reset(),k.relatedVideosManager.set(null==n?void 0:n.relatedVideos),t.next=39,W(n);case 39:N&&R("https://www.googletagmanager.com/gtag/js?id=".concat(N)).then(function(){return e.runGtag(N)}).catch(function(e){}),(B=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(L)))&&B.addEventListener("contextmenu",function(e){return e.preventDefault()}),(U=Mn({enable:null==n||null===(S=n.sse)||void 0===S?void 0:S.enable,site:null==n||null===(T=n.sse)||void 0===T?void 0:T.siteName,sseBaseUrl:null==n||null===(P=n.sse)||void 0===P?void 0:P.sseBaseUrl,sseEndpoint:null==n||null===(E=n.sse)||void 0===E?void 0:E.sseEndpoint,debug:null==n||null===(I=n.sse)||void 0===I?void 0:I.debug}))&&!U.isConnectionActive()&&U.connect(),C?(H={directPlaybackUrl:C,id:V="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},D?e.getVideoDetails(V,A).then(function(e){var t=(null==e?void 0:e.data)||{};Je(L,{res:Un(Un({},t),H)},n,{resolve:i,reject:o})}).catch(function(n){e.initiateErrorHandling(n,L,o,V)}):Je(L,{res:H},n,{resolve:i,reject:o})):_?Ze(n,{resolve:i,reject:o}):x?ln(n,{resolve:i,reject:o}):O?rn(n,{resolve:i,reject:o}):nn(n,{resolve:i,reject:o});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:d.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:M,disableControls:e.disableControls,setPlaybackSpeed:d.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,getSsaiEvents:e.getSsaiEvents,playerEvents:d.playerEvents,onReplay:d.onReplay,relatedVideosManager:k.relatedVideosManager,setChapters:jn,getChapters:xn,clearChapters:_n,seekToChapter:An,getChapterEvents:kn}},exports.initChapters=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.chapters,r=void 0===t?[]:t,i=n.timeMode,o=void 0===i?"vod":i;n.res;var l=n.chaptersConfig,a=void 0===l?{}:l,u=m.getPlayer(e);if(!u)return!1;Array.isArray(r)&&r.length&&sn.set(e,r);var s=In.get(e);null!=s&&s.markers&&s.markers.destroy();var c={mapper:gn(e,{timeMode:o}),markers:null,chaptersConfig:a||{},timeMode:o,disposed:!1};In.set(e,c);var d=function(){c.disposed||On(e)};return u.one("loadeddata",d),Cn(u)&&d(),u.on("dispose",function(){return Rn(e)}),!0};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t,n,a,i=require("@babel/runtime/helpers/toConsumableArray"),l=require("./skin-66dce245.js"),r=require("./generic-
|
|
1
|
+
"use strict";var e,t,n,a,i=require("@babel/runtime/helpers/toConsumableArray"),l=require("./skin-66dce245.js"),r=require("./generic-460c2f4c.js"),o=require("./autoNextVideo-1219220b.js"),d=require("./relatedVideosManager-eeeaf32c.js"),u=require("@babel/runtime/helpers/typeof"),s=require("video.js"),c=[],m=!1,v=null,p=!1,f=null,g=null,h=null,x=null,y=null,C=function(){null!=v&&(clearInterval(v),v=null),p=!1},E="next-ep-preview-player-thumb",w=function(e,t){if(e){var n,a,i,l,r;(null==(n=t)||null===(a=n.gist)||void 0===a||null===(i=a.imageGist)||void 0===i?void 0:i.r16x9)||(null==n?void 0:n.img)||null===(l=window)||void 0===l||null===(r=l.customData)||void 0===r||r.fallbackImage;var o=e.getElementsByClassName(E)[0];o||((o=document.createElement("div")).className=E,o.setAttribute("aria-hidden","true"),e.appendChild(o))}},N=function(e,t){if(e){var n=e.getElementsByClassName(E)[0];n&&(n.style.visibility=t?"visible":"hidden")}},b=function(){var e=document.createElement("div");e.className="next-heading-wrapper";var t=document.createElement("div");t.className="next-ep-header";var n=document.createElement("span");n.className="next-ep-header-text",n.textContent="Next up in";var a=document.createElement("span");return a.className="next-ep-duration",a.textContent="10",t.append(n,a),e.append(t),e},A=function(e,t,n,a){var i,r,o,d,u,s=null==e?void 0:e.title,c=(null==e||null===(i=e.gist)||void 0===i?void 0:i.description)||(null==e?void 0:e.description)||"",v=document.createElement("div");v.className="next-ep-content";var p=document.createElement("div");p.className="next-ep-thumb-wrap";var f=document.createElement("img");f.className="next-ep-img",f.alt="",f.src=(null==e||null===(r=e.gist)||void 0===r||null===(o=r.imageGist)||void 0===o?void 0:o.r16x9)||(null==e?void 0:e.img)||(null===(d=window)||void 0===d||null===(u=d.customData)||void 0===u?void 0:u.fallbackImage);var g=function(e){if(null==e||Number.isNaN(Number(e)))return"";var t=Math.floor(Number(e)),n=Math.floor(t/60),a=t%60;return"".concat(n,":").concat(String(a).padStart(2,"0"))}(null==e?void 0:e.runtime),h=document.createElement("div");h.className="next-ep-thumb-runtime",h.textContent=g,g||h.classList.add("next-ep-thumb-runtime--empty"),p.appendChild(f),p.appendChild(h);var x=document.createElement("div");x.className="next-ep-meta";var y=document.createElement("div");y.className="next-ep-title",y.textContent="".concat(s||"");var E=document.createElement("div");E.className="next-ep-desc",E.textContent=c||"",String(c||"").trim()||E.classList.add("next-ep-desc--empty");var w=document.createElement("div");w.className="next-ep-meta-row";var N=document.createElement("span");N.className="next-ep-badge";var b=function(e){if(null==e?void 0:e.isClip)return"CLIP"}(e);N.textContent=b,b||N.classList.add("next-ep-badge--empty");var A=document.createElement("span");A.className="next-ep-episode",A.textContent=function(e){if(!e||"string"!=typeof e)return"";var t=e.match(/^S(\d+)\s*E(\d+)$/i)||e.match(/^S(\d+)E(\d+)$/i);return t?"S".concat(t[1]," E").concat(Number(t[2])):e}(null==e?void 0:e.episodeDisplayAttribute)||"";var I=document.createElement("div");I.className="next-ep-meta-row-left",I.appendChild(N),I.appendChild(A);var B=document.createElement("img");B.className="next-ep-network-logo",B.alt="";var S=function(e){var t,n,a;if(e){var i=null===(t=window)||void 0===t||null===(n=t.app_data)||void 0===n||null===(a=n.appcmsMain)||void 0===a?void 0:a.networks;if(e&&i){var l=null==i?void 0:i.find(function(t){if(t.identifier==e)return t});return null==l?void 0:l.badgeImage}}}(null==e?void 0:e.network);S?B.src=S:B.classList.add("next-ep-network-logo--empty"),w.appendChild(I),x.appendChild(y),x.appendChild(E),x.appendChild(w);var P=document.createElement("div");return P.className="next-ep-meta-with-logo",P.appendChild(x),P.appendChild(B),v.appendChild(p),v.appendChild(P),v.onclick=l.debounce(function(){C(),null==t||t.remove(),m=!0,L(n)},400),v},L=function(e,t){var n=l.getPlayer(e);if(n){var a=n.duration();if(Number.isFinite(a)&&!(a<=0)){n.pause(e);var i=r.getVideoIdx();o.switchToNext(i,e,c)}}};e={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},t=function e(){var t,n,a,i,l;for(a in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[a])i.hasOwnProperty(l)&&("object"===u(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},a=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},s.registerPlugin("thumbnails",function(i){var l,r,o,d,u,s,c,m;function v(){document.removeEventListener("pointermove",c),document.removeEventListener("pointerup",v),m()}r=t({},e,i),d=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=d.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(l=document.createElement("div")).className="vjs-thumbnail-holder",o=document.createElement("img"),l.appendChild(o),o.src=r[0].src,o.className="vjs-thumbnail",t(o.style,r[0].style),o.style.left||o.style.right||(o.onload=function(){o.style.left=-o.naturalWidth/2+"px"}),s=d.duration(),d.on("durationchange",function(e){s=d.duration()}),d.on("loadedmetadata",function(e){s=d.duration()}),(u=d.controlBar.progressControl).el().appendChild(l),c=function(e){var i,d,c,m,v,p,f,g,h,x;for(d in c=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((x=a(u.el()).getBoundingClientRect()).width||x.right)+h,p=e.pageX,e.changedTouches&&(p=e.changedTouches[0].pageX),m=p||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,m-=a(u.el()).getBoundingClientRect().left+h,i=Math.floor((m-u.el().offsetLeft)/u.width()*s),r)i>d&&(c=Math.max(c,d));(v=r[c]).src&&o.src!=v.src&&(o.src=v.src),v.style&&o.style!=v.style&&t(o.style,v.style),m+(g=function(e,t){var a;return t?parseFloat(t):"auto"!==(a=n(e)("clip"))&&"inherit"!==a&&4===(a=a.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(a[1])-parseFloat(a[3]):0}(o,v.width||r[0].width)/2)>f?m-=m+g-f:m<g&&(m=g),l.style.left=m+"px"},u.on("mousemove",c),u.on("touchmove",c),u.on("pointerdown",function(e){document.addEventListener("pointermove",c),document.addEventListener("pointerup",v)}),m=function(e){l.style.left="-1000px"},u.on("mouseout",m),u.on("touchcancel",m),u.on("touchend",m),d.on("userinactive",m)}),exports.addNextEpPreview=function e(t,n){var a;if(m=!1,x=t,y=n,h&&(h(),h=null),null!=n&&null!==(a=n.series)&&void 0!==a&&a.enable){var o;c=[];var u=r.getCurrentSeries();null==u||u.map(function(e){var t;return(t=c).push.apply(t,i(e.episodes))}),null==n||null===(o=n.series)||void 0===o||o.cb}else{var s=d.relatedVideosManager.get();c=(null==s?void 0:s.content)||[],null==s||s.cb,h=d.relatedVideosManager.subscribe(function(){h&&(h(),h=null),x&&y&&e(x,y)})}var E=l.getPlayer(t);if(E){!function(e){e&&g&&(e.off("timeupdate",g),g=null)}(l.getPlayer(f)),C(),f=t,g=function(){var e,n;if(!m){var a=E.duration(),i=E.currentTime(),l=Number.isFinite(a)&&a>0?a-i:1/0,o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0],d=document.getElementById(t),u=r.getVideoIdx()<=(null===(n=c)||void 0===n?void 0:n.length)-1;if(l>1){if(null!=v||p){C();var s=null==o?void 0:o.querySelector(".next-ep-header .next-ep-duration");s&&(s.textContent="10")}return o&&(o.style.visibility="hidden"),void N(d,!1)}u?(o&&(o.style.visibility="visible"),N(d,!0),p||null!=v||(E.pause(t),p=!0,function(e){var t;if(null==v){var n=null===(t=document.getElementsByClassName("next-ep-preview"))||void 0===t?void 0:t[0],a=null==n?void 0:n.querySelector(".next-ep-header .next-ep-duration");if(a){var i=10;a.textContent="10",v=setInterval(function(){i--,a.textContent=String(i),0===i&&(clearInterval(v),v=null,p=!1,c.filter(function(e,t){return t==r.getVideoIdx()}),L(e))},1e3)}}}(t))):N(d,!1)}},E.on("timeupdate",g);var I,B=c.filter(function(e,t){return t==r.getVideoIdx()});if((null==B?void 0:B.length)>0)if(null!==(I=document.getElementsByClassName("next-ep-preview"))&&void 0!==I&&I[0]){var S,P,q=null===(S=document.getElementsByClassName("next-ep-preview"))||void 0===S?void 0:S[0];q.style.visibility="hidden",null===(P=q.querySelector(".next-ep-preview-inner"))||void 0===P||P.remove(),Array.from(q.children).forEach(function(e){e.classList.contains("next-ep-content")&&e.remove()});var j=q.querySelector(".next-heading-wrapper");if(j){var k=j.querySelector(".next-ep-header"),M=null==k?void 0:k.querySelector(".next-ep-duration");if(!M&&k){k.textContent="";var V=document.createElement("span");V.className="next-ep-header-text",V.textContent="Next up in",(M=document.createElement("span")).className="next-ep-duration",M.textContent="10",k.append(V,M)}else M&&(M.textContent="10")}else j=b(),q.insertBefore(j,q.firstChild);q.appendChild(A(B[0],q,t));var O=document.getElementById(t);w(O,B[0]),N(O,!1)}else{var T=document.createElement("div");T.className="next-ep-preview",T.style.visibility="hidden";var F=document.getElementById(t);F.append(T);var X=b();T.append(X);var D=A(B[0],T,t);T.append(D),w(F,B[0]),N(F,!1)}}},exports.addTVProviderImage=function(e,t){var n=l.getPlayer(e),a=null==t?void 0:t.tvProviderLogoUrl;if(a){var i=document.createElement("div");i.className="tvProviderImage";var r=document.createElement("img");r.src="".concat(a),r.alt="Provider Image",i.append(r),n.el().appendChild(i),n.on("useractive",function(){i.classList.remove("vjs-fade")}),n.on("userinactive",function(){n.paused()||i.classList.add("vjs-fade")}),n.on("fullscreenchange",function(){n.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"})}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/typeof"),n=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/typeof"),n=require("./generic-460c2f4c.js"),t=require("./skin-66dce245.js"),a=require("@babel/runtime/helpers/toConsumableArray"),o=require("@babel/runtime/helpers/slicedToArray"),r=require("./localisation-56e0a999.js"),i=!1;var l,c=null,s=function(e,n){(new Date).getMonth(),new Date(n).getMonth(),(new Date).getFullYear(),new Date(n).getFullYear();var t=Math.floor(e/6048e5),a=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=a>0&&t>4?a:0,r=function(e,n){var t=new Date(n).getFullYear()-new Date(e).getFullYear(),a=new Date(n).getMonth()-new Date(e).getMonth();return new Date(n).getDay()-new Date(e).getDay()<0&&(a-=1),a<0&&(t-=1),t}(new Date,new Date(n));return[r>0&&o>0?r:0,o,t,Math.floor(e/864e5),Math.floor(e%864e5/36e5),Math.floor(e%36e5/6e4),Math.floor(e%6e4/1e3)]},u=function(e){var n,t=o(e,8),a=t[0],r=t[1],i=t[2],l=t[3],c=t[4],s=t[5],u=t[6],d=t[7];n=a>=1?" ".concat(a," Year"):r>=1?" ".concat(r," month"):i>=1?" ".concat(i," week"):l>=1?" ".concat(l," day"):c<24&&c>=12?" ".concat(c," hour"):c>0?"".concat(c," hours ").concat(s," minutes ").concat(u," seconds"):s>0?"".concat(s," minutes ").concat(u," seconds"):"".concat(u," seconds"),d.textContent="".concat(n)},d=(l={scheduleStartTimeMs:0,scheduleEndTimeMs:0},{get:function(){return l},set:function(e){l={scheduleStartTimeMs:null==e?void 0:e.startDateTime,scheduleEndTimeMs:null==e?void 0:e.endDateTime}}});function v(e,n,t,o){if(e){var i=function(){var e,i,c=null===(e=d.get())||void 0===e?void 0:e.scheduleStartTimeMs,u=null===(i=d.get())||void 0===i?void 0:i.scheduleEndTimeMs,v=Date.now();if(v-u>0){var m=document.getElementsByClassName("error-message")[0];return m&&(m.textContent=r.getLocalisation("eventEnded")||"Game has ended",o.textContent=""),clearInterval(l),void(null==t||t())}var f=c-v;if(f/1e3<=0)return clearInterval(l),null==n||n([0,0,0,0,0,0,0,o]),void(null==t||t());var g=s(f,c);null==n||n([].concat(a(g),[o]))};i();var l=setInterval(i,1e3);return l}}exports.getVideoDuration=function(e){var n=t.getPlayer(e);return n?n.duration():"Cannot find player with id: '".concat(e,"'")},exports.handleCountdownTimer=function(e,n,t){var a,o,i,l,c,s,m,f,g=null==n||null===(a=n.response)||void 0===a||null===(o=a.data)||void 0===o?void 0:o.errorCode,h=(null==n||null===(i=n.response)||void 0===i||null===(l=i.data)||void 0===l?void 0:l.errorMessage)||(null==n?void 0:n.message)||null;d.set({startDateTime:null==n||null===(c=n.response)||void 0===c||null===(s=c.data)||void 0===s?void 0:s.scheduleStartDate,endDateTime:null==n||null===(m=n.response)||void 0===m||null===(f=m.data)||void 0===f?void 0:f.scheduleEndDate}),function(e,n,t,a){var o,i,l=Date.now(),c=null===(o=d.get())||void 0===o?void 0:o.scheduleStartTimeMs,s=null===(i=d.get())||void 0===i?void 0:i.scheduleEndTimeMs,m=function(e,n,t,a){var o;e<0?o=r.getLocalisation("eventNotStarted")||a||"Game starts in":(n>0||"VIDEO_NOT_EXISTS"==t)&&(o=r.getLocalisation("eventEnded")||a||"Game has ended");return o||a}(l-c,l-s,n,t);if(document.getElementsByClassName("error-container")[0]){var f=document.getElementsByClassName("error-message")[0];f&&(f.textContent="".concat(m));var g=document.getElementsByClassName("error-timer-message")[0];g&&v(Math.abs(c),u,a,g)}else{var h=document.getElementById(e).parentElement;if(h){var p=document.createElement("div");p.className="error-container";var y=document.createElement("div");y.className="error-message";var T=document.createElement("div");T.className="error-timer-message",y.textContent="".concat(m),p.appendChild(y),p.appendChild(T),h.append(p),v(Math.abs(c),u,a,T)}}}(e,g,h,t)},exports.handlePlayerMessage=function(e,a){var o=a.scheduleEndDate,i=a.scheduleStartDate;d.set({startDateTime:i,endDateTime:o}),c&&clearInterval(c),c=setInterval(function(){var a,o=Date.now(),i=null===(a=d.get())||void 0===a?void 0:a.scheduleEndTimeMs;if(console.log("scheduleEndTimeMs",i),i&&o>i){var l;console.log("Game ended");var s=t.getPlayer(e);if(n.isPlayerInitialised(e)&&s){var u;s.dispose(),console.log("Player disposed");var v=null===(u=document.getElementsByClassName("vl-container"))||void 0===u?void 0:u[0],m=document.createElement("video");m.id=e,m.className="video-js",m.style.width="100%",m.style.height="100%",v&&v.appendChild(m)}var f=r.getLocalisation("eventEnded")||"Game has ended",g=null===(l=document.getElementsByClassName("error-container"))||void 0===l?void 0:l[0];if(g){var h=g.querySelector(".error-message");h&&(h.textContent=f)}else{var p=document.getElementById(e),y=null==p?void 0:p.parentElement;if(y){(g=document.createElement("div")).className="error-container";var T=document.createElement("div");T.className="error-message",T.textContent=f,g.appendChild(T),y.append(g)}}clearInterval(c)}},1e3)},exports.onReplay=function(e,a){var o=t.getPlayer(e);o?(o.on("ended",function(){return i=!0}),o.on("timeupdate",function(){if(!o.paused()&&i){var e,t,r=null===(e=n.getCurrentVideo())||void 0===e||null===(t=e.video)||void 0===t?void 0:t.id;n.videoReplayTracker.get(r)?(n.videoReplayTracker.clear(),n.trackMap.clear(),a(),n.videoReplayTracker.set(r)):(n.videoReplayTracker.clear(),n.videoReplayTracker.set(r)),i=!1}})):a("Cannot find player with id: '".concat(e,"'"))},exports.onTimeUpdate=function(e,n){var a=t.getPlayer(e);a?a.on("timeupdate",function(){return n(a.currentTime())}):n("Cannot find player with id: '".concat(e,"'"))},exports.onVideoEnded=function(e,n){var a=t.getPlayer(e);a?a.on("ended",function(){return n(!0)}):n("Cannot find player with id: '".concat(e,"'"))},exports.playerEvents=function(){var n=function(e,n){var a=t.getPlayer(e);if(!a)throw"Cannot find player with id: '".concat(e,"'");if("function"!=typeof n)throw"Callback function (cb) is missing or not a function";return a};return{onPlay:function(e,t){n(e,t).on("play",function(){return t()})},onPause:function(e,t){n(e,t).on("pause",function(){return t()})},onMute:function(e,t){var a=n(e,t);a.on("volumechange",function(){a.muted()?t({muted:!0}):t({muted:!1})})},onPictureInPictureChange:function(e,t){var a=n(e,t);a.on("enterpictureinpicture",function(){t({pip:!0})}),a.on("leavepictureinpicture",function(){t({pip:!1})})},onFullScreenChange:function(e,t){var a=n(e,t);a.on("fullscreenchange",function(e){a.isFullscreen_?t({isFullscreen:!0}):t({isFullscreen:!1})})},onSetVolume:function(e,t){var a=n(e,t);a.on("volumechange",function(){var e=100*a.volume().toFixed(2);a.muted()?t({vol:0}):t({vol:e})})},onSeeked:function(e,t){var a=n(e,t);a.on("seeked",function(){t({seeked:a.currentTime()})})},onSubtitleEnable:function(e,t){var a=n(e,t);a.textTracks().on("change",function(e){console.log(a.textTracks());var n=a.textTracks().tracks_.filter(function(e){return("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode});n.length>0&&t({enabled:n[0]})})},onDisableSubtitles:function(e,t){var a=n(e,t);a.textTracks().on("change",function(e){var n,o;console.log(a.textTracks()),(null==a||null===(n=a.textTracks())||void 0===n||null===(o=n.tracks_)||void 0===o?void 0:o.every(function(e){return"showing"!=e.mode}))&&t({captions_disabled:!0})})},onSubtitleCueChange:function(t,a){var o=n(t,a);o.on("loadeddata",function(){var n,t,r,i,l,c=o.textTracks();"object"==e(o.dash)&&null!=o.dash&&o.dash.mediaPlayer.on(null===(t=window)||void 0===t||null===(r=t.dashjs)||void 0===r||null===(i=r.MediaPlayer)||void 0===i||null===(l=i.events)||void 0===l?void 0:l.CAPTION_RENDERED,function(e){a(e)});for(var s=0;s<c.length;s++){var u=c[s];"metadata"===u.kind&&(u.mode="hidden",n=u)}n&&n.addEventListener("cuechange",function(){var e=n.activeCues;if(e&&e.length>0)for(var t=0;t<e.length;t++){var o=e[t];a(o)}else console.log("no active cue at this moment")})})},onError:function(e,t){var a=n(e,t);a.on("error",function(){var e,n;t({error:null==a||null===(e=a.error())||void 0===e?void 0:e.code,msg:null==a||null===(n=a.error())||void 0===n?void 0:n.message})})}}},exports.scheduleTimerInstanceManager=d,exports.seekToTimeStamp=function(e,n,a){var o=t.getPlayer(e);o?n>=0&&n<=o.duration()?(a({status:!0,msg:"Successfully seeked to timestamp : ".concat(n)}),o.currentTime(n)):a({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):a("Cannot find player with id: '".concat(e,"'"))},exports.setPlaybackSpeed=function(e,n){var a=t.getPlayer(e);if(!a)return"Cannot find player with id: '".concat(e,"'");try{return a.playbackRate(n),"Playback speed set to ".concat(n,"x")}catch(e){return"Error: ".concat(e)}};
|
package/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css"),require("./generic-
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css"),require("./generic-460c2f4c.js"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js");var e=require("./index-d012ce66.js");require("./index-fed823e4.js"),require("./captions-0ca41a03.js"),require("./renditions-627bdfad.js"),require("./resolution-3af2cf1b.js"),require("./skin-66dce245.js"),require("./browser-3670a923.js"),require("./localisation-56e0a999.js"),require("./relatedVideosManager-eeeaf32c.js"),require("axios"),require("md5"),require("js-cookie"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/get"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("@viewlift/sse"),require("@babel/runtime/helpers/assertThisInitialized"),module.exports=e.VLPlayerCore;
|
|
@@ -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-460c2f4c.js"),l=require("./skin-66dce245.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-3670a923.js"),require("md5"),require("js-cookie"),require("./captions-0ca41a03.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"),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-460c2f4c.js"),l=require("./skin-66dce245.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-3670a923.js"),require("md5"),require("js-cookie"),require("./captions-0ca41a03.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"),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-460c2f4c.js"),a=require("./skin-66dce245.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-3670a923.js"),require("md5"),require("js-cookie"),require("./captions-0ca41a03.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)};
|