@viewlift/player-backup 2.0.253-backup → 2.0.254-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-7c491841.js +1 -0
- package/cjs/browser-77c57718.js +1 -0
- package/cjs/bundle.css +407 -407
- package/cjs/caption-settings-be714e97.js +1 -0
- package/cjs/captions-07bd3069.js +1 -0
- package/cjs/features-93cd6de4.js +1 -0
- package/cjs/generic-f723dacd.js +1 -0
- package/cjs/icons-1a3febef.js +1 -0
- package/cjs/index-4e9d8827.js +1 -0
- package/cjs/index-73a1b75f.js +1 -0
- package/cjs/index-ff85bd1e.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/multicamv2-49af2bae.js +1 -0
- package/cjs/multicamv2-6006b5a5.js +1 -0
- package/cjs/nextEpisodeButton-05a96016.js +1 -0
- package/cjs/playlist-2889487d.js +1 -0
- package/cjs/renditions-fed22c12.js +1 -0
- package/cjs/resolution-e46c9615.js +1 -0
- package/cjs/series-4b9888dd.js +1 -0
- package/cjs/series-v2-68886cd2.js +1 -0
- package/cjs/series-v2-719c957a.js +1 -0
- package/cjs/series-v2-b7f70c84.js +1 -0
- package/cjs/settings-icon-70f8857a.js +1 -0
- package/cjs/skin-25191a17.js +1 -0
- package/cjs/skin-31d84d3e.js +1 -0
- package/cjs/skin-3544db58.js +1 -0
- package/cjs/skin-42117529.js +1 -0
- package/cjs/skin-87c06e34.js +1 -0
- package/cjs/skin-9bfe9316.js +1 -0
- package/cjs/skin-c1400489.js +1 -0
- package/cjs/skin-cf53c6f8.js +1 -0
- package/cjs/skin-df2070f9.js +1 -0
- package/cjs/util-ef2cd61e.js +1 -0
- package/cjs/videoSelector-9b5a4625.js +1 -0
- package/cjs/videoSelector-f17b0749.js +1 -0
- package/cjs/videojs_contrib_dash-018c8bde.js +1 -0
- package/esm/autoNextVideo-d682e36c.js +1 -0
- package/esm/browser-d4613b36.js +1 -0
- package/esm/bundle.css +407 -407
- package/esm/caption-settings-370d8b1e.js +1 -0
- package/esm/captions-b7fd8308.js +1 -0
- package/esm/features-20d7893f.js +1 -0
- package/esm/generic-715a7738.js +1 -0
- package/esm/icons-3bd3bd8f.js +1 -0
- package/esm/index-13b7c455.js +1 -0
- package/esm/index-a7fcd7f8.js +1 -0
- package/esm/index-d42cceca.js +1 -0
- package/esm/index.js +1 -1
- package/esm/multicamv2-1297de0f.js +1 -0
- package/esm/multicamv2-c6e6cb68.js +1 -0
- package/esm/nextEpisodeButton-b348d4b4.js +1 -0
- package/esm/playlist-0c95a577.js +1 -0
- package/esm/renditions-4c09c626.js +1 -0
- package/esm/resolution-920515d1.js +1 -0
- package/esm/series-090e7c85.js +1 -0
- package/esm/series-v2-81f04cd5.js +1 -0
- package/esm/series-v2-8a8b6f0c.js +1 -0
- package/esm/series-v2-a8491399.js +1 -0
- package/esm/settings-icon-a98e5d8b.js +1 -0
- package/esm/skin-017721f3.js +1 -0
- package/esm/skin-2f85dae8.js +1 -0
- package/esm/skin-58b9263c.js +1 -0
- package/esm/skin-76430de3.js +1 -0
- package/esm/skin-bff9e3fe.js +1 -0
- package/esm/skin-d555b116.js +1 -0
- package/esm/skin-d93bcc9b.js +1 -0
- package/esm/skin-ddd25096.js +1 -0
- package/esm/skin-e4b35c14.js +1 -0
- package/esm/util-80257541.js +1 -0
- package/esm/videoSelector-1cf43fc8.js +1 -0
- package/esm/videoSelector-c94910d2.js +1 -0
- package/esm/videojs_contrib_dash-f7d94714.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),r=require("./icons-1a3febef.js"),c=require("./captions-07bd3069.js"),l=require("./skin-3544db58.js");function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}require("@babel/runtime/helpers/toConsumableArray");var d=i.getComponent("Component"),p=function(){n(v,d);var p,u,m=(p=v,u=s(),function(){var e,t=o(p);if(u){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function v(t){var n,a,o,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(i=m.call(this,t,r)).playerId=r.playerId,i.seriesData=r.sres,i.currentVideoData=r.res,i.initialiseStructure(),i.loadCSS(),null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important"),i}return t(v,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"caption-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"caption-selector-icon",innerHTML:"".concat(r.CaptionsSvgV2())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./caption-settings-34ca0188.js")}).then(function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=c.getCaptions(this.playerId);null==t||t.map(function(t){return c.disableCaptions(e.playerId,t.id)});var n=this.el(),a=i.dom.createEl("div",{className:"caption-selection-container hidden"});i.dom.$(".caption-selector-icon",this.el()).onclick=function(){var t;null!==(t=a.classList)&&void 0!==t&&t.contains("hidden")?(l.closeOpenDrawers(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px",l.setUpdatedElHeight(e.playerId,a)):(a.classList.add("hidden"),n.classList.remove("open"),a.style.right="-350px")};var o=document.getElementById(this.playerId);if(o){var r=window.getComputedStyle(o,null).getPropertyValue("height");a.style.height="".concat(r),i.dom.appendContent(n,a),o.style.overflow="hidden",this.addFunctionality(a),l.detectOrientationChange(this.playerId,a)}}},{key:"addFunctionality",value:function(e){var t=this.el(),n=i.dom.createEl("div",{className:"caption-selector-head"}),a=i.dom.createEl("div",{className:"caption-selector-cross-icon",innerHTML:"".concat(r.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var o=i.dom.createEl("div",{className:"caption-selector-title",innerHTML:"Captions"}),c=i.dom.createEl("div",{className:"caption-selector-content"}),s=i.dom.createEl("div",{className:"caption-container"}),d=this.createLanguageContanier();i.dom.appendContent(s,d),i.dom.appendContent(n,a),i.dom.appendContent(n,o),i.dom.appendContent(e,n),i.dom.appendContent(e,c),i.dom.appendContent(c,s),l.handleDrawerResizing(this.playerId,e)}},{key:"createLanguageContanier",value:function(){var e=this,t=i.dom.createEl("div",{className:"caption-language-container"}),n=i.dom.createEl("div",{className:"caption-language-container-title",innerHTML:"Language"});i.dom.appendContent(t,n);var a=document.createElement("label");a.setAttribute("for","radio-off"),a.className="caption-language-holder";var o=document.createElement("div");o.className="caption",o.innerHTML="Off";var r=i.dom.createEl("input",{className:"radio - off",id:"radio-off",name:"language-radio",checked:"true"});r.setAttribute("type","radio"),r.onchange=function(t){var n,a,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important")),c.getCaptions(e.playerId).map(function(t){return c.disableCaptions(e.playerId,t.id)})},i.dom.appendContent(a,r),i.dom.appendContent(a,o),i.dom.appendContent(t,a);for(var l=c.getCaptions(this.playerId),s=function(n){var a,o=document.createElement("label");o.className="caption-language-holder",o.setAttribute("for","language-radio-".concat(n));var r=document.createElement("div");r.className="caption - ".concat(n),r.textContent=null==l||null===(a=l[n])||void 0===a?void 0:a.label;var s=i.dom.createEl("input",{className:"radio - ".concat(n),id:"language-radio-".concat(n),name:"language-radio"});s.onchange=function(t){c.enableCaptions(e.playerId,l[n].id)},s.setAttribute("type","radio"),i.dom.appendContent(o,s),i.dom.appendContent(o,r),i.dom.appendContent(t,o)},d=0;d<l.length;d++)s(d);return t}},{key:"createFontSizeContainer",value:function(){var e=i.dom.createEl("div",{className:"caption-font-container"}),t=i.dom.createEl("div",{className:"caption-font-container-title",innerHTML:"Font Size"});i.dom.appendContent(e,t);for(var n=[{size:14},{size:18},{size:24}],a=0;a<n.length;a++){var o,r=document.createElement("label");r.className="caption-font-holder",r.setAttribute("for","font".concat(a));var c=document.createElement("div");c.className="fontsize - ".concat(a),c.textContent=(null==n||null===(o=n[a])||void 0===o?void 0:o.size)+"pt";var l=i.dom.createEl("input",{className:"radio - ".concat(a),id:"font".concat(a),name:"font-size-radio",size:"".concat(n[a].size),checked:"".concat(a==n.length-1)});l.setAttribute("type","radio"),l.onchange=function(e){var t=e.target.size;if(document.getElementById("caption-size")){document.getElementById("caption-size").textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}")}else{var n=document.createElement("style");n.textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}"),n.id="caption-size",document.head.append(n)}},i.dom.appendContent(r,l),i.dom.appendContent(r,c),i.dom.appendContent(e,r)}return e}}]),v}();exports.default=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var t=require("./skin-3544db58.js");exports.addCaptions=function(e,n){var a=t.getPlayer(e);a.remoteTextTracks().tracks_.map(function(t){a.removeRemoteTextTrack(t)}),n.map(function(t){a.addRemoteTextTrack({src:t.url,srcLang:t.language,label:t.language})})},exports.disableCaptions=function(e,n){for(var a=t.getPlayer(e).textTracks(),r=0;r<a.length;r++){var s=a[r];"subtitles"!==s.kind&&"captions"!==s.kind||s.id!==n||(s.mode="hidden")}},exports.enableCaptions=function(e,n){var a,r,s;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(a=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===a||null===(r=a[0])||void 0===r||null===(s=r.style)||void 0===s||s.setProperty("display","flex"));for(var i=t.getPlayer(e).textTracks(),l=0;l<i.length;l++){var o=i[l];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!=n||(o.mode="showing")}},exports.getCaptions=function(e){var n,a=t.getPlayer(e);return(null==a||null===(n=a.textTracks())||void 0===n?void 0:n.tracks_.filter(function(t){return"subtitles"==t.kind||"captions"===t.kind}))||[]},exports.removeCaptions=function(e){var n=t.getPlayer(e);n.remoteTextTracks().tracks_.map(function(t){"subtitles"==(null==t?void 0:t.kind)||null==t||t.kind,n.removeRemoteTextTrack(t)})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-f723dacd.js"),s=require("./renditions-fed22c12.js"),d=require("./skin-3544db58.js"),c=require("./localisation-56e0a999.js");function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?u(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function p(e){var t=v();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then(function(){return require("./caption-settings-be714e97.js")}).then(function(r){var n,o,l,a,s=r.default,c=d.getPlayer(e);i.registerComponent("captionSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},exports.addDBClickFullScreen=function(e){var t=d.getPlayer(e).el(),r=0,n=d.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e}),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-49af2bae.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-6006b5a5.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then(function(){return require("./nextEpisodeButton-05a96016.js")}).then(function(n){var o=n.default,l=d.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)})},exports.addOutputtingOverlay=function(e,t){var r=d.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then(function(){return require("./playlist-2889487d.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},exports.addResolutionModule=function(e,t,r){Promise.resolve().then(function(){return require("./resolution-e46c9615.js")}).then(function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=d.getPlayer(e),a=s.getRenditions(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:a},l.controlBar.children().length-4))})},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then(function(){return require("./series-4b9888dd.js")}).then(function(n){var o=n.seriesModule,l=d.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)})},c=0;c<a.length;c++)s(c)})},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then(function(){return require("./series-v2-b7f70c84.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./series-v2-719c957a.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then(function(){return require("./settings-icon-70f8857a.js")}).then(function(r){var n,o,l,a,s=r.default,c=d.getPlayer(e);i.registerComponent("settingsSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=p(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=c.getLocalisation("slowMoText")||"Slow Mo",n}return r(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},exports.addVideoSelector=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-f17b0749.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-9b5a4625.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),i=require("video.js"),o=require("axios"),r=require("./skin-3544db58.js"),l=require("./browser-77c57718.js"),a=require("js-cookie"),d=require("ua-parser-js"),u=require("./captions-07bd3069.js");function s(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function c(e,t){s("event",e,t)}var v={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function p(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?m(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):m(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var f={name:"@viewlift/player",version:"2.0.38",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","ua-parser-js":"^2.0.3","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=f.version;var w,g=function(e,t){var n,i,r,l,a,d,u,s;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:null!==(a=window)&&void 0!==a&&null!==(d=a.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(s=u.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":y.get()+"".concat(null==v?void 0:v.getVideoDetails),params:p({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":f.version},withCredentials:!0})},I=function(e,t){var n,i,r,l;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:y.get()+v.getLinearChannelDetails,params:p(p(p(p(p({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},E=function(){var e=t(n.mark(function e(t){var i;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:return i=e.sent,e.abrupt("return",o({url:y.get()+"".concat(null==v?void 0:v.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:p({},t),params:p({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),T=function(e,t){var n,i,r=window.contentType;return o({method:"GET",url:y.get()+"".concat(null==v?void 0:v.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},h=function(e){var t=e.videoId;return o({method:"GET",url:y.get()+"".concat(null==v?void 0:v.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},y=(w=null==v?void 0:v.apiBaseUrl,{set:function(e){e&&(w=e)},get:function(){return w}}),_=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},b=null;function D(){return{set:function(e){e&&(b=e)},get:function(){return b}}}var O,F,P,S,L,R,V=function(){var e=t(n.mark(function e(){var t,i,r;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=D().get(),i=y.get(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),W=null,C=function(){var e=t(n.mark(function e(){var t;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!_(t)){e.next=6;break}return W||(W=V().then(function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&D().set(r),o||t}).catch(function(e){return console.error("Error fetching refresh token",e),t}).finally(function(){W=null})),e.abrupt("return",W);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),A=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},x=function(e){F=e},N=function(){return F},B=function(){return O},M=function(e){P=e},j=function(e){if(S){var t=S.get(e);M(t+1)}},U=(R=0,{set:function(e){e>=0&&(R=e)},get:function(){return R}});function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function H(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?k(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var G=0,Y=function(){var e,t,n,i,o,r,l,a=N();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==a||null===(o=a.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function q(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function z(){var e=window.sessionStorage.getItem("uid");return e||(e=q(),window.sessionStorage.setItem("uid",e),e)}function X(){return J.apply(this,arguments)}function J(){return(J=t(n.mark(function e(){var t,i;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function K(e){return e?String(e):""}window.initialise=function(e){window.sid=q(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",function(){var n,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,c(r?"FAILED_TO_START":"DROPPED_STREAM",H({pfm:window.platform,uid:z(),vid:Y(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,t){e.one("play",tryCatch(function(){var n,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),c("PLAY",H({pfm:window.platform,uid:z(),vid:Y(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),t&&t("started_video_playback",{"Video ID":Y(),watchTime:Math.floor(e.currentTime())})}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&G<4)G++,c("BUFFERING",H({pfm:window.platform,uid:z(),vid:Y(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,c("FIRST_FRAME",H({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:z(),vid:Y()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var t,n,i,o,r,l;c("AD_REQUEST",H({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:z(),vid:Y(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),c("AD_IMPRESSION",H({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:z(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:Y()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var t=[];e.on("timeupdate",function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(G=0,t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),l=i.end(o);if(Q(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}})()};var Q=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark(function e(t){var i,r,l,a,d,u,s,c,m,p,f,w,g,I,E,T,h,_,b,D;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:return T=e.sent,h=A(T),_=null==h?void 0:h.site,b=null==h?void 0:h.siteId,e.t0=H,e.t1=H,e.t2=H({aid:_,cid:b,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=z(),e.t5=Y(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=null!==(a=t.videoPosition)&&void 0!==a?a:null,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:null,e.t17=!0===t.isAdEvent?K(t.adPosition):"",e.next=26,X();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=t.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=t.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=t.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=t.resWidth)&&void 0!==c?c:null,e.t26=null!==(m=t.bufferHealth)&&void 0!==m?m:null,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f||null===(w=f.beacon)||void 0===w?void 0:w.params,e.t31=(0,e.t0)(e.t29,e.t30),D=[e.t31],o({url:(null===(g=window)||void 0===g||null===(I=g.customData)||void 0===I||null===(E=I.beacon)||void 0===E?void 0:E.url)||y.get()+v.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:D}).catch(function(e){console.error(e)});case 42:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var Z=function(){var e=U.get();return e>=0?e+1:1},$=function(){var e,t,n,i=B(),o=N(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,l=U.get(),a=null==i||null===(t=i[l])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function te(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ee(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}window._deviceInfo=d.UAParser(navigator.userAgent);var ne=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},ie=function(e){var t=oe(e,"video.tags",[]),n=oe(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map(function(e){return e.title}).join(","):n},oe=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},re=function(){var e,t,n,i,o,l,d,u,s,c,v,m,p,f,w,g,I,E,T,h,y,_=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",b=arguments.length>1?arguments[1]:void 0,D=arguments.length>2?arguments[2]:void 0,O=(null==D?void 0:D.siteName)||"",F=(null==D?void 0:D.contentType)||"video",P=(null==D||null===(e=D[F])||void 0===e?void 0:e.metadata)||(null==D||null===(t=D[F])||void 0===t||null===(n=t.gist)||void 0===n?void 0:n.metadata),S=r.getPlayer(b);if(!_.includes("VIEWLIFT_"))return _;var L,R=window.getComputedStyle(document.getElementById(b),null),V=Math.trunc(R.getPropertyValue("height").slice(0,-2)),W=Math.trunc(R.getPropertyValue("width").slice(0,-2)),C="linearchannel"===F?null==D||null===(i=D.linearchannel)||void 0===i||null===(o=i.channels)||void 0===o||null===(l=o.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===l||null===(d=l.content)||void 0===d?void 0:d.id:oe(D,"video.gist.id",""),A="linearchannel"===F?null==D||null===(u=D.linearchannel)||void 0===u||null===(s=u.channels)||void 0===s||null===(c=s.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===c?void 0:c.title:oe(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),x=null,N=null;"function"==typeof window.__gpp&&(null===(L=window)||void 0===L||L.__gpp("ping",function(e){x=null==e?void 0:e.gppString,N=null==e?void 0:e.sectionList[0]}));var B=te(te({},le(P)),{},{VIEWLIFT_WIDTH:W,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:ne(W,V),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(v=window)||void 0===v?void 0:v.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:oe(D,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:oe(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:oe(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==S||null===(m=S.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==S||null===(p=S.options_)||void 0===p?void 0:p.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==O?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:ie(D),VIEWLIFT_MEDIA_ID:C,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(oe(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:C,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+oe(D,"video.gist.permalink","")),VIEWLIFT_CONSENT:a.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:oe(null===(f=window)||void 0===f||null===(w=f.app_data)||void 0===w||null===(g=w.site)||void 0===g?void 0:g.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:oe(null===(I=window)||void 0===I||null===(E=I.app_data)||void 0===E||null===(T=E.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*oe(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:oe(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:C,VIEWLIFT_CONTENT_TITLE:A,VIEWLIFT_CONTENT_SERIES_TITLE:oe(D,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:oe(D,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:$(),VIEWLIFT_SEASON_NUMBER:Z(),VIEWLIFT_CONTENT_TAGS:ie(D),VIEWLIFT_GPP_SID:N||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:x||"VIEWLIFT_GPP"},null===(h=window)||void 0===h||null===(y=h.customData)||void 0===y?void 0:y.macros);for(var M in B){var j=new RegExp(M,"g");_=_.replace(j,B[M])}return _},le=function(e){var t,n,i,o,r,a,d={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){u.set(e.name,e.value)}));var s=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,c=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return s||c?(l.isMobile()?s?d=te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(d=te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?d=te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(d=te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?d=te(te({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):c&&(d=te(te({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),d=l.isMobile()?te(te({},d),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):te(te({},d),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(d=te(te({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),d=l.isMobile()?te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),d=te(te({},d),{},{VIEWLIFT_AFID:u.get("afid")})},ae=function(e,t){var n,i,o,r,a,d,u,s,c,v,m,p,f,w=(null==e?void 0:e.contentType)||"video",g=null==e||null===(n=e[w])||void 0===n?void 0:n.drmEnabled,I=null==e||null===(i=e[w])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[w])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(d=e[w])||void 0===d||null===(u=d.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[w])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[w])||void 0===m||null===(p=m.streamingInfo)||void 0===p||null===(f=p.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return ue(E);if(g){var y=se(I,t);return y.src=re(y.src,t,e),y}if("Safari"!==l.detectBrowser()&&h)return de(I);if(T){var _=ue(I);return _.src=re(_.src,t,e),_}if(null!=I&&I.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(I);return b.src=re(b.src,t,e),b}return null},de=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},ue=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},se=function(e,t){var n=e.fairPlayCmaf||e.fairPlay,o=e.widevine,a=e.playReady,d=l.detectBrowser();if(r.getPlayer(t),"Safari"===d){var u=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))})},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,o,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(l,function(e,t,n){console.log(e),e&&r(e),r(null,n)})}}}}}(n);return ce(t),u}var s,c={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(ce(t),c.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var ce=function(e){var t=r.getPlayer(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==l.detectBrowser()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},ve=function(e,t){if(Promise.resolve().then(function(){return require("./error-26d5a3c3.js")}).then(function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)}),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},me=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var pe=!1,fe=function(e,t,n){var i=re(t,e,n),o=r.getPlayer(e);if(t&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,l=r.getPlayer(e);if(null!==l.el_){pe=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),pe&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,t,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),l.one(u,function(){s&&l.ima.initializeAdDisplayContainer()});var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}var ge=function(e){return!!i.getPlayer("".concat(e))},Ie=function(){var e=t(n.mark(function e(t,i){var o,l,a,d=arguments;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,C();case 3:return l=e.sent,a=r.getPlayer(t),e.abrupt("return",new Promise(function(e,n){I(i,l).then(function(n){var r=null==n?void 0:n.data;window.sid=q(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var l=ae(r,t);x(r),l&&o?(he(t,l),a.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})})):e({status:!0,msg:"Feed authenticated",response:r})}).catch(function(e){n({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),Ee=function(){var e=t(n.mark(function e(t,i,o){var l,a,d,s,c,v;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:return s=e.sent,(B()||null)&&j(i),c=0,v=0,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(a=window)&&void 0!==a&&null!==(d=a.watchHistory)&&void 0!==d&&d.enable&&T(i,s).then(function(e){var t,n,i,o,r,l;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),c=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,v=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null}).catch(function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}),e.abrupt("return",new Promise(function(e,n){g(i,s).then(function(i){var o,l,a,d,s,m,p,f,w,g,I=null==i?void 0:i.data,E=(null==I||null===(o=I.video)||void 0===o||null===(l=o.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;x(i.data);var T=(null==I||null===(a=I.ads)||void 0===a||null===(d=a.preRoll)||void 0===d||null===(s=d.adTags)||void 0===s||null===(m=s.web)||void 0===m?void 0:m.active)&&(null==I||null===(p=I.ads)||void 0===p||null===(f=p.preRoll)||void 0===f||null===(w=f.adTags)||void 0===w||null===(g=w.web)||void 0===g?void 0:g.url);T&&fe(t,T,I);var h=ae(I,t);if(h){var y,_,b,D,O,F,P,S,L,R,V,W,C,A,N=(null==I||null===(y=I.video)||void 0===y||null===(_=y.gist)||void 0===_?void 0:_.videoImageUrl)||(null==I||null===(b=I.video)||void 0===b||null===(D=b.gist)||void 0===D||null===(O=D.imageGist)||void 0===O?void 0:O.r16x9),B=r.getPlayer(t);if(B.poster(N),he(t,h),B.on("loadstart",function(){E&&e({status:!0,msg:"Video Loaded",response:I})}),B.on("loadeddata",function(){me(),e({status:!0,msg:"Video Loaded",response:I})}),B.one("play",function(){c&&v<95&&setTimeout(function(){B.currentTime(c)},0)}),B.one("error",function(){var e;n({status:!1,msg:(null==B||null===(e=B.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==I||null===(F=I.video)||void 0===F||null===(P=F.contentDetails)||void 0===P||null===(S=P.closedCaptions)||void 0===S?void 0:S.length)>0||(null==I||null===(L=I.video)||void 0===L||null===(R=L.closedCaptions)||void 0===R?void 0:R.length)>0)V=((null==I||null===(W=I.video)||void 0===W||null===(C=W.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null==I||null===(A=I.video)||void 0===A?void 0:A.closedCaptions)).filter(function(e){return"VTT"===e.format}),u.addCaptions(t,V);else u.removeCaptions(t)}else ve(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){ye(e,t,n,i)})}));case 9:case"end":return e.stop()}},e)}));return function(t,n,i){return e.apply(this,arguments)}}(),Te=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},he=function(e,t){var n=r.getPlayer(e);n&&n.src(t)},ye=function(t,n,i,o){var r,l,a,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==t||null===(a=t.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);ge(n)&&ve(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?we(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):we(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))};exports.authenticateLC=Ie,exports.baseUrlManager=y,exports.clearError=me,exports.createIdxMapping=function(e){S=new Map,e.map(function(e,t){S.set(e.id,t)})},exports.createSeriesWatchMap=function(e,t){var n=new Map;h({videoId:e,token:t}).then(function(e){e.data.map(function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),L=n}).catch(function(e){return console.log(e)})},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")},exports.dispose=function(e){var t=r.getPlayer(e);if(Te(),r.clearEventListeners(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.getCurrentSeries=B,exports.getCurrentVideo=N,exports.getDecodedToken=A,exports.getEntitlementData=function(e,t,n,i){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:t},withCredentials:!0})},exports.getEpisodeNumber=$,exports.getLinearChannelDetails=I,exports.getSeasonNumber=Z,exports.getSeriesDetails=function(e,t){var n,i,r=A(t),l=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})}):o({url:y.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=h,exports.getSeriesWatchMap=function(){return L},exports.getSource=ae,exports.getToken=C,exports.getUpdatedClusterSource=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},exports.getUserId=z,exports.getVideoDetails=g,exports.getVideoIdx=function(){return P},exports.getVideoInfo=T,exports.handleError=ve,exports.initialiseAdvertisement=fe,exports.initiateErrorHandling=ye,exports.inititateBeacon=function(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=r.getPlayer(e);window.initialise(n,t),window.firstFrame(n,t),n.on("loadedmetadata",function(){window.endFirstFrame(n)})}},exports.isBehindLive=function(e){var t,n=r.getPlayer(e);return!n&&(null==n||null===(t=n.liveTracker)||void 0===t?void 0:t.atLiveEdge())},exports.isPaused=function(e){return i(e).paused()},exports.isPlayerInitialised=ge,exports.isTokenExpired=_,exports.load=Ee,exports.loadVideo=he,exports.loadVideoInstantly=function(e,t,n){var i=r.getPlayer(e);return i.src(t),new Promise(function(e,t){var o=0;i.one("loadedmetadata",function(){clearTimeout(o),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){o=setTimeout(function(){t("FAILED: Took too long to load")},n)})})},exports.pause=function(e){i(e).pause()},exports.play=function(e){i(e).play()},exports.refreshTokenManager=D,exports.replaceMacros=re,exports.rewind=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],s("js",new Date),s("config",e)},exports.saveWatchHistory=E,exports.seasonIdxManager=U,exports.setCurrentSeries=function(e){O=e},exports.setCurrentVideo=x,exports.setVideoIdx=M,exports.setVideoIdxById=j,exports.skip=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},exports.token_authentication_enabled=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.BackIcon=function(){return'<svg width="13" height="13" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M10.6169 0.418212C11.0883 0.933084 11.1247 1.74341 10.726 2.30391L10.6173 2.43852L3.69866 10.0029L10.6169 17.5611C11.0883 18.0759 11.1247 18.8863 10.726 19.4468L10.6173 19.5814C10.1461 20.0965 9.40458 20.1362 8.89165 19.7006L8.76847 19.5818L0 10.0039L8.76809 0.418626C9.27852 -0.13938 10.1063 -0.139565 10.6169 0.418212Z" fill="white"/>\n </svg>\n '},exports.BroadcastIcon=function(){return'<svg width="22" height="20" viewBox="0 0 22 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.01316 12.1667L0.25 10.5V15.5L3.01316 14.25V18H15.25V8H3.01316V12.1667ZM7.67057 10.7216C7.53806 10.6283 7.35547 10.7231 7.35547 10.8852V15.1146C7.35547 15.2766 7.53806 15.3714 7.67057 15.2781L10.6757 13.1634C10.7889 13.0838 10.7889 12.916 10.6757 12.8363L7.67057 10.7216Z" fill="white"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7.25 2H20.25H21.25V3V10H20.25V3H7.25V2ZM17.25 5H4.25V6H17.25V13H18.25V6V5H17.25Z" fill="white"/>\n </svg>\n '},exports.CaptionsSvgV2=function(){return'<svg width="21" height="18" viewBox="0 0 21 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M20.4541 15.8369V2H0.454102V15.8369H11.992L17.7874 18V15.8369H20.4541ZM2.4541 4H18.4541V13.8614H15.9182L15.9179 15L11.9664 13.8614H2.4541V4Z" fill="white"/>\n <rect x="3.4541" y="6" width="9" height="2" fill="white"/>\n <rect x="14.4541" y="6" width="3" height="2" fill="white"/>\n <rect x="8.4541" y="10" width="9" height="2" fill="white"/>\n <rect x="3.4541" y="10" width="3" height="2" fill="white"/>\n </svg>\n '},exports.EpisodesSvg=function(){return'<svg class=\'icon icon-episodes\' width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1 11.7368C1 11.3299 1.32989 11 1.73684 11H16.2632C16.6701 11 17 11.3299 17 11.7368V21.2632C17 21.6701 16.6701 22 16.2632 22H1.73684C1.3299 22 1 21.6701 1 21.2632V11.7368Z" fill="white"/>\n <path d="M5 8H19.2632C19.6701 8 20 8.3299 20 8.73684V18" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M8 4H22.2632C22.6701 4 23 4.3299 23 4.73684V13" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'},exports.InfoIcon=function(){return'<svg width="16" height="16" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M8.99935 13.167C9.23546 13.167 9.43338 13.0871 9.5931 12.9274C9.75282 12.7677 9.83268 12.5698 9.83268 12.3337C9.83268 12.0975 9.75282 11.8996 9.5931 11.7399C9.43338 11.5802 9.23546 11.5003 8.99935 11.5003C8.76324 11.5003 8.56532 11.5802 8.4056 11.7399C8.24588 11.8996 8.16602 12.0975 8.16602 12.3337C8.16602 12.5698 8.24588 12.7677 8.4056 12.9274C8.56532 13.0871 8.76324 13.167 8.99935 13.167ZM8.16602 9.83366H9.83268V4.83366H8.16602V9.83366ZM8.99935 17.3337C7.84657 17.3337 6.76324 17.1149 5.74935 16.6774C4.73546 16.2399 3.85352 15.6462 3.10352 14.8962C2.35352 14.1462 1.75977 13.2642 1.32227 12.2503C0.884766 11.2364 0.666016 10.1531 0.666016 9.00033C0.666016 7.84755 0.884766 6.76421 1.32227 5.75033C1.75977 4.73644 2.35352 3.85449 3.10352 3.10449C3.85352 2.35449 4.73546 1.76074 5.74935 1.32324C6.76324 0.885742 7.84657 0.666992 8.99935 0.666992C10.1521 0.666992 11.2355 0.885742 12.2493 1.32324C13.2632 1.76074 14.1452 2.35449 14.8952 3.10449C15.6452 3.85449 16.2389 4.73644 16.6764 5.75033C17.1139 6.76421 17.3327 7.84755 17.3327 9.00033C17.3327 10.1531 17.1139 11.2364 16.6764 12.2503C16.2389 13.2642 15.6452 14.1462 14.8952 14.8962C14.1452 15.6462 13.2632 16.2399 12.2493 16.6774C11.2355 17.1149 10.1521 17.3337 8.99935 17.3337ZM8.99935 15.667C10.8605 15.667 12.4368 15.0212 13.7285 13.7295C15.0202 12.4378 15.666 10.8614 15.666 9.00033C15.666 7.13921 15.0202 5.56283 13.7285 4.27116C12.4368 2.97949 10.8605 2.33366 8.99935 2.33366C7.13824 2.33366 5.56185 2.97949 4.27018 4.27116C2.97852 5.56283 2.33268 7.13921 2.33268 9.00033C2.33268 10.8614 2.97852 12.4378 4.27018 13.7295C5.56185 15.0212 7.13824 15.667 8.99935 15.667Z" fill="white"/>\n </svg>'},exports.MaximizeSvg=function(n){return"<svg fill='".concat(n||"white","'\n class='icon icon-maximize'\n viewBox=\"0 0 70 70\"\n xmlns='http://www.w3.org/2000/svg'\n >\n <path fill='").concat(n||"white","' d='M43.369 45.938h-6.971l3.16 3.146h9.593v-9.714l-3.146-3.077v6.648l-8.823-8.823-2.817 2.817 9.004 9.004z' />\n <path fill='").concat(n||"white","' d='M21.969 18.834h6.971l-3.16-3.146h-9.593v9.714l3.146 3.077v-6.648l8.823 8.823 2.817-2.817-9.003-9.003z' />\n </svg>")},exports.MinimizeSvg=function(n){return"<svg fill='".concat(n||"white","'\n class='icon icon-minimize'\n viewBox=\"0 0 70 70\"\n xmlns='http://www.w3.org/2000/svg'\n >\n <path fill='").concat(n||"white","' d='M40.397 37.511h6.971l-3.16-3.146h-9.593v9.714l3.146 3.077v-6.648l8.823 8.823 2.817-2.817-9.004-9.004z' />\n <path fill='").concat(n||"white","' d='M24.443 26.763h-6.971l3.16 3.146h9.593v-9.714l-3.146-3.077v6.648l-8.823-8.823-2.817 2.817 9.003 9.004z' />\n </svg>")},exports.NewCaptionsSvg=function(){return'<svg width="18" height="16" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M5 6.5H10M5 10H13M7.68375 16H14.2C15.8802 16 16.7202 16 17.362 15.673C17.9265 15.3854 18.3854 14.9265 18.673 14.362C19 13.7202 19 12.8802 19 11.2V5.8C19 4.11984 19 3.27976 18.673 2.63803C18.3854 2.07354 17.9265 1.6146 17.362 1.32698C16.7202 1 15.8802 1 14.2 1H5.8C4.11984 1 3.27976 1 2.63803 1.32698C2.07354 1.6146 1.6146 2.07354 1.32698 2.63803C1 3.27976 1 4.11984 1 5.8V18.3355C1 18.8684 1 19.1348 1.10923 19.2716C1.20422 19.3906 1.34827 19.4599 1.50054 19.4597C1.67563 19.4595 1.88367 19.2931 2.29976 18.9602L4.68521 17.0518C5.17252 16.662 5.41617 16.4671 5.68749 16.3285C5.9282 16.2055 6.18443 16.1156 6.44921 16.0613C6.74767 16 7.0597 16 7.68375 16Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'},exports.PlayNextEpisodeSvg=function(n){return'<svg className=\'icon-play-next\' width="16" height="16" viewBox="0 0 25 25" fill='.concat(n,' xmlns="http://www.w3.org/2000/svg">\n <path d="M14.8837 9.99984L0 0V20L14.8837 9.99984Z" fill=').concat(n,' />\n <rect x="18" width="2" height="20" fill=').concat(n," />\n </svg>")},exports.PlaylistIcon=function(){return'<svg version="1.0" xmlns="http://www.w3.org/2000/svg"\n width="17" height="17" viewBox="0 0 512.000000 512.000000"\n preserveAspectRatio="xMidYMid meet">\n \n <g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"\n fill="white" stroke="none">\n <path d="M340 4674 c-46 -20 -77 -50 -103 -99 -22 -40 -22 -45 -25 -754 -3\n -813 -5 -788 72 -859 69 -64 158 -77 238 -36 17 9 232 177 478 374 492 394\n 490 392 490 499 0 60 -23 112 -72 158 -62 60 -863 695 -900 714 -45 23 -128\n 25 -178 3z"/>\n <path d="M2045 4673 c-164 -86 -166 -300 -3 -384 37 -19 73 -19 1382 -17\n l1344 3 44 30 c138 97 118 306 -34 370 -33 13 -189 15 -1370 15 -1195 -1\n -1336 -2 -1363 -17z"/>\n <path d="M2045 3393 c-164 -86 -166 -300 -3 -384 37 -19 73 -19 1382 -17\n l1344 3 44 30 c138 97 118 306 -34 370 -33 13 -189 15 -1370 15 -1195 -1\n -1336 -2 -1363 -17z"/>\n <path d="M340 2114 c-173 -75 -161 -342 18 -394 26 -8 692 -10 2224 -8 l2186\n 3 44 30 c138 97 118 306 -34 370 -33 13 -272 15 -2220 15 -1927 -1 -2187 -3\n -2218 -16z"/>\n <path d="M340 834 c-173 -75 -161 -342 18 -394 26 -8 692 -10 2224 -8 l2186 3\n 44 30 c138 97 118 306 -34 370 -33 13 -272 15 -2220 15 -1927 -1 -2187 -3\n -2218 -16z"/>\n </g>\n </svg>'},exports.RewindSvg=function(n){return'<svg style="width:16px" class=\'rewindbtn\' viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7.88817 16.9913L7.72176 18.5762C9.58746 18.8613 11.4677 18.5376 13.1023 17.6161C17.1941 15.3094 18.4803 9.98978 15.9732 5.74243C13.47 1.50156 8.13865 -0.0590307 4.03665 2.25351C3.35173 2.64307 2.7379 3.12124 2.20384 3.67698L3.34087 4.82569C3.77642 4.37247 4.27773 3.98196 4.83679 3.66398C8.20452 1.76539 12.5901 3.04913 14.644 6.5288C16.6894 9.99402 15.6429 14.3223 12.3046 16.2043C10.9636 16.9602 9.42195 17.2257 7.88817 16.9913Z" fill=\''.concat(window.color||"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.10742 0.462205L0.56205 5.24366L6.06202 5.79492L3.10742 0.462205Z" fill=\'').concat(window.color||"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M9.80172 14.1769C10.1682 14.1769 10.5096 14.1082 10.8258 13.9708C11.142 13.8333 11.416 13.6241 11.6479 13.343C11.8798 13.0619 12.0615 12.7059 12.1928 12.275C12.3242 11.8441 12.3898 11.3368 12.3898 10.753C12.3898 10.1661 12.3242 9.65803 12.1928 9.22868C12.0615 8.79934 11.8798 8.44413 11.6479 8.16305C11.416 7.88197 11.142 7.6727 10.8258 7.53525C10.5096 7.3978 10.1682 7.32907 9.80172 7.32907C9.43524 7.32907 9.09551 7.3978 8.78254 7.53525C8.46956 7.6727 8.19794 7.88197 7.96767 8.16305C7.7374 8.44413 7.5574 8.79934 7.42767 9.22868C7.29794 9.65803 7.23308 10.1661 7.23308 10.753C7.23308 11.3368 7.29794 11.8441 7.42767 12.275C7.5574 12.7059 7.7374 13.0619 7.96767 13.343C8.19794 13.6241 8.46956 13.8333 8.78254 13.9708C9.09551 14.1082 9.43524 14.1769 9.80172 14.1769ZM6.54713 14.1028V13.2457H5.28226V7.39394H4.2947L2.14929 9.13139L2.52875 9.62714C2.5547 9.66112 2.59443 9.69123 2.64794 9.71749C2.70145 9.74374 2.76064 9.75687 2.82551 9.75687C2.86767 9.75687 2.91064 9.75069 2.95443 9.73834C2.99821 9.72598 3.04118 9.70282 3.08335 9.66884L4.09524 8.86266C4.08551 9.02946 4.08064 9.18853 4.08064 9.33988V13.2457H2.65524V14.1028H6.54713ZM9.30308 13.1136C9.46362 13.1893 9.62983 13.2271 9.80172 13.2271C9.97686 13.2271 10.1455 13.1893 10.3077 13.1136C10.4698 13.038 10.6133 12.9059 10.7382 12.7175C10.8631 12.5291 10.9628 12.2758 11.0374 11.9576C11.112 11.6395 11.1493 11.238 11.1493 10.753C11.1493 10.2681 11.112 9.86652 11.0374 9.54838C10.9628 9.23023 10.8631 8.97695 10.7382 8.78853C10.6133 8.60011 10.4698 8.46807 10.3077 8.39239C10.1455 8.31672 9.97686 8.27888 9.80172 8.27888C9.62983 8.27888 9.46362 8.31672 9.30308 8.39239C9.14254 8.46807 9.00064 8.60011 8.8774 8.78853C8.75416 8.97695 8.65605 9.23023 8.58308 9.54838C8.5101 9.86652 8.47362 10.2681 8.47362 10.753C8.47362 11.238 8.5101 11.6395 8.58308 11.9576C8.65605 12.2758 8.75416 12.5291 8.8774 12.7175C9.00064 12.9059 9.14254 13.038 9.30308 13.1136Z" fill=\'').concat(window.color||"white","' />\n </svg>")},exports.RewindSvgV2=function(){return'<svg class=\'rewindbtn\' width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1.22363 9.43675L3.152 11.3434L5.08151 9.43675M2.91616 10.8667C2.88115 10.5537 2.86319 10.2356 2.86319 9.91341C2.86319 5.17486 6.74945 1.3335 11.5434 1.3335C16.3374 1.3335 20.2236 5.17486 20.2236 9.91341C20.2236 14.652 16.3374 18.4933 11.5434 18.4933C8.8166 18.4933 6.38346 17.2505 4.79212 15.3067" stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.3"/>\n <path d="M9.92694 13.0831V6.80067H8.94318C8.58633 7.20106 7.97871 7.53473 7.37109 7.64912V8.66918C7.68937 8.64058 8.22947 8.52618 8.51881 8.39272V13.0831H9.92694Z" fill="white"/>\n <path d="M13.6545 6.6958C11.8316 6.6958 11.1951 8.23065 11.1951 9.94664C11.1951 11.6817 11.7641 13.1975 13.6255 13.1975C15.5159 13.1975 16.0656 11.634 16.0656 9.9085C16.0656 8.12579 15.4291 6.6958 13.6545 6.6958ZM13.6545 7.78259C14.4839 7.78259 14.6382 8.69778 14.6382 9.91804C14.6382 11.1478 14.5225 12.1107 13.6448 12.1107C12.7479 12.1107 12.6128 11.0811 12.6128 9.92757C12.6128 8.57385 12.8443 7.78259 13.6545 7.78259Z" fill="white"/>\n </svg>'},exports.SelectedStream=function(){return'<svg class=\'selected-stream\' width="25" height="25" viewBox="0 0 35 33" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g clip-path="url(#clip0_319_60943)">\n <path d="M0 0H35V33H0V0Z" fill="#D2393B"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M15.8689 17.6541L22.3039 11.2898C22.6966 10.9014 23.3372 10.9054 23.7299 11.2937C24.1225 11.6821 24.1265 12.3157 23.7338 12.704L16.6345 19.7253C16.6189 19.743 16.6026 19.7604 16.5856 19.7772C16.5158 19.8463 16.4381 19.9032 16.3554 19.9479C15.9716 20.1587 15.4758 20.1009 15.1503 19.779C15.126 19.755 15.1032 19.73 15.0819 19.7042L12.2919 16.9449C11.8992 16.5565 11.9032 15.9229 12.2958 15.5346C12.6885 15.1462 13.3291 15.1423 13.7218 15.5306L15.8689 17.6541Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_319_60943">\n <path d="M0 0H35V33H8C3.58172 33 0 29.4183 0 25V0Z" fill="white"/>\n </clipPath>\n </defs>\n </svg>\n '},exports.SettingsSvg=function(){return'<svg width="16" height="16" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M11 14C12.6569 14 14 12.6569 14 11C14 9.34315 12.6569 8 11 8C9.34315 8 8 9.34315 8 11C8 12.6569 9.34315 14 11 14Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M17.7273 13.7273C17.6063 14.0015 17.5702 14.3056 17.6236 14.6005C17.6771 14.8954 17.8177 15.1676 18.0273 15.3818L18.0818 15.4364C18.2509 15.6052 18.385 15.8057 18.4765 16.0265C18.568 16.2472 18.6151 16.4838 18.6151 16.7227C18.6151 16.9617 18.568 17.1983 18.4765 17.419C18.385 17.6397 18.2509 17.8402 18.0818 18.0091C17.913 18.1781 17.7124 18.3122 17.4917 18.4037C17.271 18.4952 17.0344 18.5423 16.7955 18.5423C16.5565 18.5423 16.3199 18.4952 16.0992 18.4037C15.8785 18.3122 15.678 18.1781 15.5091 18.0091L15.4545 17.9545C15.2403 17.745 14.9682 17.6044 14.6733 17.5509C14.3784 17.4974 14.0742 17.5335 13.8 17.6545C13.5311 17.7698 13.3018 17.9611 13.1403 18.205C12.9788 18.4489 12.8921 18.7347 12.8909 19.0273V19.1818C12.8909 19.664 12.6994 20.1265 12.3584 20.4675C12.0174 20.8084 11.5549 21 11.0727 21C10.5905 21 10.1281 20.8084 9.78708 20.4675C9.4461 20.1265 9.25455 19.664 9.25455 19.1818V19.1C9.24751 18.7991 9.15011 18.5073 8.97501 18.2625C8.79991 18.0176 8.55521 17.8312 8.27273 17.7273C7.99853 17.6063 7.69437 17.5702 7.39947 17.6236C7.10456 17.6771 6.83244 17.8177 6.61818 18.0273L6.56364 18.0818C6.39478 18.2509 6.19425 18.385 5.97353 18.4765C5.7528 18.568 5.51621 18.6151 5.27727 18.6151C5.03834 18.6151 4.80174 18.568 4.58102 18.4765C4.36029 18.385 4.15977 18.2509 3.99091 18.0818C3.82186 17.913 3.68775 17.7124 3.59626 17.4917C3.50476 17.271 3.45766 17.0344 3.45766 16.7955C3.45766 16.5565 3.50476 16.3199 3.59626 16.0992C3.68775 15.8785 3.82186 15.678 3.99091 15.5091L4.04545 15.4545C4.25503 15.2403 4.39562 14.9682 4.4491 14.6733C4.50257 14.3784 4.46647 14.0742 4.34545 13.8C4.23022 13.5311 4.03887 13.3018 3.79497 13.1403C3.55107 12.9788 3.26526 12.8921 2.97273 12.8909H2.81818C2.33597 12.8909 1.87351 12.6994 1.53253 12.3584C1.19156 12.0174 1 11.5549 1 11.0727C1 10.5905 1.19156 10.1281 1.53253 9.78708C1.87351 9.4461 2.33597 9.25455 2.81818 9.25455H2.9C3.2009 9.24751 3.49273 9.15011 3.73754 8.97501C3.98236 8.79991 4.16883 8.55521 4.27273 8.27273C4.39374 7.99853 4.42984 7.69437 4.37637 7.39947C4.3229 7.10456 4.18231 6.83244 3.97273 6.61818L3.91818 6.56364C3.74913 6.39478 3.61503 6.19425 3.52353 5.97353C3.43203 5.7528 3.38493 5.51621 3.38493 5.27727C3.38493 5.03834 3.43203 4.80174 3.52353 4.58102C3.61503 4.36029 3.74913 4.15977 3.91818 3.99091C4.08704 3.82186 4.28757 3.68775 4.50829 3.59626C4.72901 3.50476 4.96561 3.45766 5.20455 3.45766C5.44348 3.45766 5.68008 3.50476 5.9008 3.59626C6.12152 3.68775 6.32205 3.82186 6.49091 3.99091L6.54545 4.04545C6.75971 4.25503 7.03183 4.39562 7.32674 4.4491C7.62164 4.50257 7.9258 4.46647 8.2 4.34545H8.27273C8.54161 4.23022 8.77093 4.03887 8.93245 3.79497C9.09397 3.55107 9.18065 3.26526 9.18182 2.97273V2.81818C9.18182 2.33597 9.37338 1.87351 9.71435 1.53253C10.0553 1.19156 10.5178 1 11 1C11.4822 1 11.9447 1.19156 12.2856 1.53253C12.6266 1.87351 12.8182 2.33597 12.8182 2.81818V2.9C12.8193 3.19253 12.906 3.47834 13.0676 3.72224C13.2291 3.96614 13.4584 4.15749 13.7273 4.27273C14.0015 4.39374 14.3056 4.42984 14.6005 4.37637C14.8954 4.3229 15.1676 4.18231 15.3818 3.97273L15.4364 3.91818C15.6052 3.74913 15.8057 3.61503 16.0265 3.52353C16.2472 3.43203 16.4838 3.38493 16.7227 3.38493C16.9617 3.38493 17.1983 3.43203 17.419 3.52353C17.6397 3.61503 17.8402 3.74913 18.0091 3.91818C18.1781 4.08704 18.3122 4.28757 18.4037 4.50829C18.4952 4.72901 18.5423 4.96561 18.5423 5.20455C18.5423 5.44348 18.4952 5.68008 18.4037 5.9008C18.3122 6.12152 18.1781 6.32205 18.0091 6.49091L17.9545 6.54545C17.745 6.75971 17.6044 7.03183 17.5509 7.32674C17.4974 7.62164 17.5335 7.9258 17.6545 8.2V8.27273C17.7698 8.54161 17.9611 8.77093 18.205 8.93245C18.4489 9.09397 18.7347 9.18065 19.0273 9.18182H19.1818C19.664 9.18182 20.1265 9.37338 20.4675 9.71435C20.8084 10.0553 21 10.5178 21 11C21 11.4822 20.8084 11.9447 20.4675 12.2856C20.1265 12.6266 19.664 12.8182 19.1818 12.8182H19.1C18.8075 12.8193 18.5217 12.906 18.2778 13.0676C18.0339 13.2291 17.8425 13.4584 17.7273 13.7273Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'},exports.SettingsSvgV2=function(){return'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M20.7275 8.7189V11.2811L18.0174 11.7913C17.8497 12.5312 17.558 13.2374 17.1546 13.88L18.71 16.1626L16.8874 17.9721L14.6149 16.43C13.9694 16.8283 13.2636 17.1194 12.5249 17.2919L12.0143 20H9.43828L8.92846 17.2919C8.18971 17.1194 7.48385 16.8284 6.8384 16.43L4.56591 17.9721L2.74302 16.1626L4.28649 13.88C3.88787 13.2349 3.5965 12.5296 3.42371 11.7913L0.727539 11.2811V8.7189L3.42371 8.1968C3.59774 7.4568 3.89356 6.75083 4.29909 6.10771L2.74337 3.837L4.56626 2.02785L6.83875 3.57C7.48173 3.16673 8.18841 2.8752 8.92881 2.70777L9.43863 0H12.0147L12.5252 2.70777C13.2656 2.87529 13.9723 3.16682 14.6153 3.57L16.8878 2.02785L18.7103 3.837L17.1549 6.11996C17.5582 6.75838 17.85 7.46066 18.0177 8.1968L20.7275 8.7189ZM5.19864 10.0057C5.2018 13.0538 7.67684 15.5222 10.7268 15.5191C12.1916 15.5176 13.5957 14.9347 14.6304 13.8985C15.665 12.8624 16.2454 11.4579 16.2438 9.99405C16.2405 6.94597 13.7654 4.47766 10.7154 4.48088C7.6654 4.4841 5.19548 6.95764 5.19864 10.0057Z" fill="white"/>\n </svg>'},exports.SkipSvg=function(n){return'<svg style="width:16px" class=\'skipbtn\' viewBox="0 0 18 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M9.99586 16.9937L10.1623 18.5786C8.29657 18.8638 6.41631 18.54 4.78178 17.6185C0.689955 15.3118 -0.596286 9.9922 1.9108 5.74486C4.41407 1.50398 9.74539 -0.0566045 13.8474 2.25594C14.5323 2.64549 15.1461 3.12366 15.6802 3.6794L14.5432 4.82812C14.1076 4.3749 13.6063 3.98438 13.0472 3.66641C9.67952 1.76782 5.29397 3.05156 3.24002 6.53123C1.1946 9.99645 2.24115 14.3247 5.57947 16.2067C6.92039 16.9626 8.46208 17.2281 9.99586 16.9937Z" fill=\''.concat(window.color?window.color:"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M14.7766 0.464616L17.322 5.24607L11.822 5.79733L14.7766 0.464616Z" fill=\'').concat(window.color?window.color:"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M13.0245 14.115C13.391 14.115 13.7323 14.0463 14.0486 13.9088C14.3648 13.7714 14.6388 13.5621 14.8707 13.281C15.1026 13 15.2842 12.644 15.4156 12.2131C15.5469 11.7822 15.6126 11.2749 15.6126 10.6911C15.6126 10.1042 15.5469 9.59609 15.4156 9.16675C15.2842 8.73741 15.1026 8.38219 14.8707 8.10111C14.6388 7.82003 14.3648 7.61076 14.0486 7.47331C13.7323 7.33586 13.391 7.26714 13.0245 7.26714C12.658 7.26714 12.3183 7.33586 12.0053 7.47331C11.6923 7.61076 11.4207 7.82003 11.1904 8.10111C10.9602 8.38219 10.7802 8.73741 10.6504 9.16675C10.5207 9.59609 10.4559 10.1042 10.4559 10.6911C10.4559 11.2749 10.5207 11.7822 10.6504 12.2131C10.7802 12.644 10.9602 13 11.1904 13.281C11.4207 13.5621 11.6923 13.7714 12.0053 13.9088C12.3183 14.0463 12.658 14.115 13.0245 14.115ZM9.76991 14.0409V13.1837H8.50504V7.332H7.51748L5.37207 9.06945L5.75153 9.56521C5.77748 9.59918 5.81721 9.6293 5.87072 9.65555C5.92423 9.68181 5.98342 9.69493 6.04829 9.69493C6.09045 9.69493 6.13342 9.68876 6.17721 9.6764C6.22099 9.66405 6.26396 9.64088 6.30612 9.6069L7.31802 8.80073C7.30829 8.96752 7.30342 9.1266 7.30342 9.27795V13.1837H5.87802V14.0409H9.76991ZM12.5259 13.0517C12.6864 13.1274 12.8526 13.1652 13.0245 13.1652C13.1996 13.1652 13.3683 13.1274 13.5304 13.0517C13.6926 12.976 13.8361 12.844 13.961 12.6556C14.0859 12.4671 14.1856 12.2139 14.2602 11.8957C14.3348 11.5776 14.3721 11.176 14.3721 10.6911C14.3721 10.2061 14.3348 9.80459 14.2602 9.48644C14.1856 9.16829 14.0859 8.91501 13.961 8.7266C13.8361 8.53818 13.6926 8.40613 13.5304 8.33046C13.3683 8.25478 13.1996 8.21694 13.0245 8.21694C12.8526 8.21694 12.6864 8.25478 12.5259 8.33046C12.3653 8.40613 12.2234 8.53818 12.1002 8.7266C11.9769 8.91501 11.8788 9.16829 11.8059 9.48644C11.7329 9.80459 11.6964 10.2061 11.6964 10.6911C11.6964 11.176 11.7329 11.5776 11.8059 11.8957C11.8788 12.2139 11.9769 12.4671 12.1002 12.6556C12.2234 12.844 12.3653 12.976 12.5259 13.0517Z" fill=\'').concat(window.color?window.color:"white","' />\n </svg>")},exports.SkipSvgV2=function(){return'<svg class=\'skipbtn\' width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M19.7236 9.43675L17.7953 11.3434L15.8658 9.43675M18.0311 10.8667C18.0661 10.5537 18.0841 10.2356 18.0841 9.91341C18.0841 5.17486 14.1978 1.3335 9.40386 1.3335C4.6099 1.3335 0.723633 5.17486 0.723633 9.91341C0.723633 14.652 4.6099 18.4933 9.40386 18.4933C12.1307 18.4933 14.5638 17.2505 16.1551 15.3067" stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.3"/>\n <path d="M7.80584 13.0831V6.80067H6.82209C6.46523 7.20106 5.85762 7.53473 5.25 7.64912V8.66918C5.56828 8.64058 6.10838 8.52618 6.39772 8.39272V13.0831H7.80584Z" fill="white"/>\n <path d="M11.5334 6.6958C9.71052 6.6958 9.07397 8.23065 9.07397 9.94664C9.07397 11.6817 9.64301 13.1975 11.5044 13.1975C13.3948 13.1975 13.9445 11.634 13.9445 9.9085C13.9445 8.12579 13.308 6.6958 11.5334 6.6958ZM11.5334 7.78259C12.3628 7.78259 12.5171 8.69778 12.5171 9.91804C12.5171 11.1478 12.4014 12.1107 11.5237 12.1107C10.6268 12.1107 10.4917 11.0811 10.4917 9.92757C10.4917 8.57385 10.7232 7.78259 11.5334 7.78259Z" fill="white"/>\n </svg>'},exports.TickMarkIcon=function(){return'<svg width="28" height="28" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28">\n <path d="M21 10L11 20L7 16" stroke="white" stroke-width="2" fill="none"/>\n </svg>'},exports.crossIconSvg=function(){return'<svg width="13" height="13" viewBox="0 0 19 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.273985 2.30391C-0.124672 1.74341 -0.0882695 0.933084 0.383092 0.418212C0.893733 -0.139565 1.72148 -0.13938 2.23191 0.418626L9.25 8.09082L16.2681 0.418626C16.7785 -0.13938 17.6063 -0.139565 18.1169 0.418212C18.5883 0.933084 18.6247 1.74341 18.226 2.30391L18.1173 2.43852L11.1987 10.0029L18.1169 17.5611C18.5883 18.0759 18.6247 18.8863 18.226 19.4468L18.1173 19.5814C17.6461 20.0965 16.9046 20.1362 16.3916 19.7006L16.2685 19.5818L9.25 11.9155L2.23153 19.5818L2.10835 19.7006C1.59542 20.1362 0.853882 20.0965 0.382714 19.5814L0.273985 19.4468C-0.124672 18.8863 -0.0882694 18.0759 0.383092 17.5611L7.30134 10.0029L0.382714 2.43852L0.273985 2.30391Z" fill="white"/>\n </svg>\n \n '};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-f723dacd.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/regenerator"),o=require("video.js"),i=require("./util-ef2cd61e.js"),l=require("./captions-07bd3069.js"),a=require("./renditions-fed22c12.js"),s=require("./resolution-e46c9615.js"),u=require("./skin-3544db58.js"),c=require("./browser-77c57718.js"),d=require("./localisation-56e0a999.js"),v=require("@babel/runtime/helpers/typeof"),f=require("@babel/runtime/helpers/toConsumableArray"),p=require("@babel/runtime/helpers/slicedToArray"),m=require("./icons-1a3febef.js"),y=function(e){return new Promise(function(n,t){if(g(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)}})},g=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},h=function(e,n,t){var r=u.getPlayer(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var o=parseFloat(n)/100;r.volume(o),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},b=function(e){var n=u.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},w=function(){var e=t(r.mark(function e(n){var t,i,l,a,s;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=u.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,y("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,a.default(o),e.finish(13);case 16:(s=o.getTech("chromecast"))&&!s.prototype.seeking&&(s.prototype.seeking=function(){}),null!==(l=window)&&void 0!==l&&l.cast?null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==c.detectBrowser()?null==i||i.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)}}(),k=function(e,n){var t=u.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,r,i,l,a,s=this.el(),u=o.dom.getPointerPosition(s,n).x;o.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===(i=r.framework)||void 0===i||null===(l=i.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*u,v.seek()}})};var S=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"),y("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)}}(),O=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){o.getPlugin("eme")||o.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),j=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(o),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),P=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)}}(),T=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_contrib_dash-018c8bde.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)}}(),E=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){y("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(o)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(o)})},loadAdsLibrary:S,loadEMELibrary:O,loadMuxPlugin:j,loadDvrSeekbar:P,loadContribDash:T});function I(e){return D.apply(this,arguments)}function D(){return(D=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,S();case 3:t&&"Safari"==c.detectBrowser()&&Promise.resolve().then(function(){return E}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function C(e,n){return x.apply(this,arguments)}function x(){return(x=t(r.mark(function e(n,t){var o,i,l,a,s,u,d,v,f,p;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=(null==t?void 0:t.contentType)||"video",v=null==t||null===(o=t[d])||void 0===o?void 0:o.drmEnabled,null==t||null===(i=t[d])||void 0===i||null===(l=i.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==t||null===(a=t[d])||void 0===a||null===(s=a.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.dash)||null,e.prev=5,e.next=8,Promise.allSettled([v?"Safari"==c.detectBrowser()?O():"caliente"!=(null===(p=window)||void 0===p?void 0:p.siteName)?T():O():"Safari"!=c.detectBrowser()&&f?T():null,w(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function A(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 R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var L=new Set,N=null,V=function(n,t,r){var o,i,l,a,s,u,c,d={},v=(null==n?void 0:n.contentType)||"video";d["c3.cm.id"]=(null===(o=n[v])||void 0===o?void 0:o.id)||"Null",d["c3.cm.contentType"]=F(n),d[null==r||null===(i=r.Constants)||void 0===i?void 0:i.IS_LIVE]=!(null==n||!n.linearchannel),d[null==r||null===(l=r.Constants)||void 0===l?void 0:l.STREAM_URL]=t.currentSrc(),d[null==r||null===(a=r.Constants)||void 0===a?void 0:a.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),d["c3.cm.categoryType"]=U(n),d["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"}}(),d.DRMEnabled=(null===(s=n[v])||void 0===s?void 0:s.drmEnabled)||"None",d.DAIStream=null!==(u=n[v])&&void 0!==u&&null!==(c=u.gist)&&void 0!==c&&c.isSSAIEnabled?"YES":"NO",d[r.Constants.DEFAULT_RESOURCE]="AKAMAI",d["c3.cm.brand"]="NULL",d.CDVREnabled=H(n),d["c3.cm.genreList"]=_(n),d["c3.cm.genre"]=M(n),d["c3.cm.channel"]=B(n);var f=G(e.getCurrentSeries(),n);return d=R(R({},d),f)},M=function(e){var n,t,r,o=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[o])||void 0===n||null===(t=n.gist)||void 0===t||null===(r=t.primaryCategory)||void 0===r?void 0:r.title)||"Null"},_=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"},B=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video";return"video"===r?"VOD":(null==e||null===(n=e[r])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},U=function(e){return(null==e?void 0:e.contentType)||"null"},H=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video",o=(null==e||null===(n=e[r])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return o?"YES":"NO"},q=function(e,n){var t,r,o=(n||{}).epg;if(o&&null!=o&&o.enable&&null!=o&&o.programTitle)return o.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.title)||"Null";return"".concat(l)},F=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var W,G=function(n,t){var r,o,i,l,a,s={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return s;var u=e.getSeasonNumber(),c=e.getEpisodeNumber();return s["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(o=r.series)||void 0===o?void 0:o.title)||"Null",s["c3.cm.seasonNumber"]=(null==u?void 0:u.toString())||"Null",s["c3.cm.showTitle"]=(null==n||null===(i=n[u-1])||void 0===i||null===(l=i.episodes)||void 0===l||null===(a=l[c-1])||void 0===a?void 0:a.title)||"Null",s["c3.cm.episodeNumber"]=(null==c?void 0:c.toString())||"Null",s},K=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"}},z=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},J=function(){var n=t(r.mark(function n(t,o){var i,l,a,s,c,d,v,f,p,m;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(i=(null==o?void 0:o.convivaConfig)||{},l=i.trackConvivaPlayerEvent,a=i.paymentHandler,s=i.tveProvider,c=i.enable,d=i.appName,v=(o||{}).token,c){n.next=4;break}return n.abrupt("return");case 4:if(f=u.getPlayer(t),"function"==typeof(p=l)){n.next=8;break}return n.abrupt("return");case 8:return n.next=10,p("getConvivaObject");case 10:if(m=n.sent){n.next=13;break}return n.abrupt("return");case 13:f.ready(function(){var e=f.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var r=K(t.keySystem);p("contentInfo",{DRMEnabled:r})}else p("contentInfo",{DRMEnabled:"None"})}),n||p("contentInfo",{DRMEnabled:"None"})}),f.on("loadstart",function(){var n,t;N&&N!==f.currentSrc()&&p("playbackEnded"),p("setPlayer",f),L.clear(),N=f.currentSrc();var r=z(f.currentType()),i=e.getCurrentVideo(),l=V(i,f,m);l[null==m||null===(n=m.Constants)||void 0===n?void 0:n.PLAYER_NAME]=d||"WEB",l[null==m||null===(t=m.Constants)||void 0===t?void 0:t.ASSET_NAME]=q(i,o),l.authToken=v||"NULL",l.streamType=r,l.D2CType=a||"NONE",l.subscriberType=s||(a?"D2C":"FREE"),l["c3.cm.affiliate"]=s||"NULL",p("contentInfo",l)}),f.on("loadedmetadata",function(){var e,n=f.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),p("contentInfo",{screenResolution:e})}),f.on("play",function(){L.has(f.currentSrc())||(L.add(f.currentSrc()),p("playbackStarted",null))}),f.on("ended",function(){L.has(f.currentSrc())&&L.delete(f.currentSrc()),p("playbackEnded")}),f.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&p("initAdSensor",{player:f,adsLoader:null==e?void 0:e.adsLoader})}),f.on("dispose",function(){null==L||L.clear(),p("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),Q=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-42117529.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-cf53c6f8.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-9bfe9316.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-df2070f9.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-25191a17.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t&&Promise.resolve().then(function(){return require("./skin-c1400489.js")}).then(function(t){t.initialiseSkin(e,n)})};function X(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 Y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var $=[],Z=0,ee=null;function ne(t,r,o){var i,l,a,s,u,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==r||null===(i=r.watchHistory)||void 0===i||i.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===(s=r.video)||void 0===s?void 0:s.originalObjectId)||null,m=(null==r||null===(u=r.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,y=Math.floor(t.currentTime()),g=c?100:Math.floor(v/f*100),h={};m?function(t,r,o){var i=r?"watchhistory-data-".concat(r):"watchhistory-data-guest-".concat(o),l=te(i),a=(new Date).getTime(),s=e.getCurrentVideo(),u=(null==s?void 0:s.video)||{},c=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return Y(Y({},e),{},n({},t,u[t]))},{}),d=l.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===W});d<0?l.push(Y(Y({content:c},t),{},{addedDate:a,updateDate:a})):l[d]=Y(Y(Y({},l[d]),t),{},{updateDate:a});localStorage.setItem("".concat(i),JSON.stringify(l))}(h={completed:c,watchedTime:y,watchedPercentage:g},d,r.siteOwner):(h=Y(Y({videoId:W,watchedTime:y,watchedPercentage:g,doneWatching:c,profileId:d},ee&&{seriesId:ee}),p&&{originalObjectId:p}),e.saveWatchHistory(h).then(function(e){}).catch(function(e){})),Z=v+o}function te(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function re(e,n,t){var r=te(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),o=[];return r&&Array.isArray(r)&&(o=r.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),o}var oe=!1,ie=function(n,t){var r,o,i=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(r=n[i])||void 0===r||null===(o=r.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!oe){var l=le(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),oe=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function le(e,n,t){if(Array.isArray(e))return e.map(function(e){return le(e,n,t)});if(null!==e&&"object"===v(e)){var r={};return Object.keys(e).forEach(function(o){o===n&&void 0!==e[t]?r[o]=e[t]:o===t&&void 0!==e[n]?r[o]=e[n]:r[o]=le(e[o],n,t)}),r}return e}function ae(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 se(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)?se(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function se(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 ue(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 ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ue(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var de=function(n,t,r,o){var i,a,s,d,f,p=o.res,m=o.sres,y=u.getPlayer(n),g=(null==p?void 0:p.contentType)||"video",b=(null==p||null===(i=p[g])||void 0===i?void 0:i.drmEnabled)||!1,w=(null==p||null===(a=p[g])||void 0===a||null===(s=a.streamingInfo)||void 0===s?void 0:s.isLiveStream)||!1,k=(null==p||null===(d=p[g])||void 0===d||null===(f=d.liveDetails)||void 0===f?void 0:f.isDvrEnabled)||!1;e.setCurrentVideo(p),y&&(y.on("loadstart",function(){w?r.resolve({status:!0,msg:"Video Loaded",response:p}):r.resolve(ce({status:!0,msg:"Player Initialised"},m?{seriesResponse:m,response:p}:{response:p}))}),y.on("loadeddata",function(){var r,o,i,a=l.getCaptions(n);if(null==a||a.map(function(e){return l.disableCaptions(n,e.id)}),k&&"Safari"===c.detectBrowser())try{var s;null==y||null===(s=y.liveTracker)||void 0===s||s.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==y||!y.muted())&&h(n,sessionStorage.getItem("volume")||"100");var d=e.getCurrentVideo();if(e.clearError(),null!=t&&t.watchHistory&&null!=t&&null!==(r=t.watchHistory)&&void 0!==r&&r.enable&&(!t.isAnonymousUser||null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.saveOffline)){var v,f,m=ce(ce({},t),p);!function(e,n,t){var r,o,i;null!=n&&n.series&&null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable&&(ee=null==n||null===(o=n.series)||void 0===o?void 0:o.id),$=[],Z=0,W=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=u.getPlayer(e);a&&(a.on("timeupdate",function(){var e=Math.floor(a.currentTime());$.includes(Z)||(e==Z?($.push(e),ne(a,n,l)):e>Z&&(Z=e+l))}),a.one("ended",function(){ne(a,n,l,!0)}))}(n,m,null==d||null===(v=d.video)||void 0===v||null===(f=v.gist)||void 0===f?void 0:f.id)}if(null!=t&&null!==(i=t.analytics)&&void 0!==i&&i.muxKey&&null!=y&&y.mux){var g,b,w,S,O,j,P=(null===(g=e.getCurrentVideo())||void 0===g?void 0:g.video)||(null==p?void 0:p.video),T=null==P?void 0:P.gist,E={env_key:null==t||null===(b=t.analytics)||void 0===b?void 0:b.muxKey,player_name:"vl-web-player",player_version:null===(w=window)||void 0===w?void 0:w.vl_player_version,video_id:null==T?void 0:T.id,video_title:null==T?void 0:T.title,video_series:null==P||null===(S=P.series)||void 0===S?void 0:S.title,video_stream_type:null!=P&&null!==(O=P.streamingInfo)&&void 0!==O&&O.isLiveStream?"live":"video",viewer_user_id:null==t||null===(j=t.analytics)||void 0===j?void 0:j.userId};y.mux({debug:!1,data:E})}}),y.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];y.trigger("subtitlechanged",n)}),y.on("subtitlechanged",function(e,n){var t,r,o,i,l,a,s,u,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(o=r.framework)||void 0===o||null===(i=o.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===f){var m,y=p.getMediaSession(),g=y.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),y.editTracksInfo(m)}}),y.tech_.on("retryplaylist",function(){w&&ie(p,n)}),y.on("error",function(){var t,o;(console.log("ERROR",y.error(),y.error().code),4===y.error().code&&w)?ie(p,n):(e.handleError(n,(null==y||null===(t=y.error())||void 0===t?void 0:t.message)||"Some error occured"),r.reject({status:!1,msg:(null==y||null===(o=y.error())||void 0===o?void 0:o.message)||"Some error occured",response:p}))}),y.one("play",function(){var n;if(null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var r,o,i,l=null===(r=e.getCurrentVideo())||void 0===r||null===(o=r.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.id,a=e.getSeriesWatchMap(),s=(null==a?void 0:a.get(l))||{t:0,p:0},u=s.t,c=s.p;u&&c<95&&setTimeout(function(){y.currentTime(u)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){y.currentTime(null==t?void 0:t.watchHistoryResumeTime)},0);if(null!=y&&y.dvrSeekbar)try{y.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}),y.on("volumechange",function(){var e=100*y.volume().toFixed(2);y.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),y.on("chromecastDisconnected",function(){if(w){y.currentSource();for(var e=y.textTracks(),n=e.length-1;n>=0;n--)y.removeRemoteTextTrack(e[n])}}),y.one("loadeddata",function(){var e,n=(null==y||null===(e=y.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if("object"==v(y.dash)){var t,r,o,i=null==y||null===(t=y.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=ae(n);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(l&&(null==s?void 0:s.id)=="dash-audio-".concat(l.index)){s.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var u,d=ae(n);try{for(d.s();!(u=d.n()).done;){var f,p,m,g=u.value;("Chrome"==c.detectBrowser()||"Edge"==c.detectBrowser()&&(null!==(f=navigator)&&void 0!==f&&null!==(p=f.userAgent)&&void 0!==p&&p.includes("Macintosh")||!b))&&null!=g&&null!==(m=g.label)&&void 0!==m&&m.includes("5.1")?y.audioTracks().removeTrack(g):"main"==g.kind?g.enabled=!0:g.enabled=!1}}catch(e){d.e(e)}finally{d.f()}}}))};var ve,fe=(ve=!0,{enable:function(){ve=!0},disable:function(){ve=!1},get enabled(){return ve}});function pe(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?pe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ye(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 ge(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)?ge(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function ge(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 he,be=(he="",{set:function(e){e&&(he=e)},get:function(){return he}});function we(e,n){return ke.apply(this,arguments)}function ke(){return(ke=t(r.mark(function n(t,o){var i,l,a,s,c,d,v,f,m,y,g,h,b,w;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return u.getPlayer(t),i=e.getSource(o,t),l=i.src,a=l.replace("dash","session").replace("master","session"),a=e.replaceMacros(a,t,{}),s=Se(a),c=p(s,2),d=c[0],v=c[1],a=new URL(a.split("?")[0]),Object.keys(v).length>0&&Object.entries(v).forEach(function(e){var n=p(e,2),t=n[0],r=n[1];a.searchParams.set(t,r)}),n.next=10,fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:me({},d)})});case 10:return f=n.sent,n.next=13,f.json();case 13:return m=n.sent,y="https://"+new URL(a).hostname,g=m.trackingUrl,h=m.manifestUrl,b=y+g,w=y+h,be.set(b),console.log("%c TRACKING URL","background: #bdf369; color: #000",b),i.src=w,n.abrupt("return",i);case 23:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Se(e){var n={},t=e.split("?")[1];if(!t)return n;var r,o=ye(t.split("&"));try{for(o.s();!(r=o.n()).done;){var i=r.value.split("="),l=p(i,2),a=l[0],s=l[1];n[decodeURIComponent(a)]=decodeURIComponent(s||"")}}catch(e){o.e(e)}finally{o.f()}for(var u={},c={},d=0,v=Object.entries(n);d<v.length;d++){var f=p(v[d],2),m=f[0],y=f[1];if(m.startsWith("ads."))u[m.replace(/^ads\./,"")]=y;else c[m]=y}return[u,c]}function Oe(){return Oe=t(r.mark(function e(n,o){var i,l,a,s,c,d,v,p;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:p=function(e,t,r,o,i,l){var a=l.redirectEl,s=l.redirectUrl,f=u.getPlayer(n);if(!f.seeking()){var p=t.startTimeInSeconds,m=t.durationInSeconds,y=Math.floor(f.currentTime()),g=Math.floor(p+m);y>=p&&y<=g&&s?(a.style.display="block",c(a,s)):a.style.display="none";var h,b=ye(r);try{for(b.s();!(h=b.n()).done;){var w,k,S,O=h.value,j=O.eventType,P=O.beaconUrls,T=O.startTimeInSeconds,E=(O.startTime,O.durationInSeconds,T||0),I=P,D=(null===(w=window)||void 0===w||null===(k=w.customData)||void 0===k||null===(S=k.ads)||void 0===S||S.adEventHandler,"".concat(E,"_").concat(j)),C=d.get("pod-".concat(i))||[];if(console.warn(e,E,"map:",j,"condition1:",e>=E,"map:",d),e>=E&&!C.includes(D)){C.push(D),d.set("pod-".concat(i),C);try{v(j,t,I,f)}catch(e){console.error("Error when calling triggerAdBeacon:",e,j,t)}}}}catch(e){b.e(e)}finally{b.f()}}},v=function(e,n,t,r){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(r.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(r.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){navigator.sendBeacon(e)})},c=function(e,n){s&&e.removeEventListener("click",s),s=function(){return window.open(n,"_blank")},e.addEventListener("click",s)},a=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},i=be.get(),u.getPlayer(n).one("loadeddata",function(){i&&l(i)}),l=function(){var e=t(r.mark(function e(t){var o,i,l,s,c,v,y,g,h,b,w,k,S,O,j,P,T,E,I,D,C,x,A,R;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return T=function(e){document.removeEventListener("pointermove",P),document.removeEventListener("pointerup",T),0===e.button&&j()},P=function(e){},j=function(){var e,n=g.currentTime(),t=null,r=ye(y);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.startTimeInSeconds,l=o.durationInSeconds,a=o.ads,s=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>s||n>i)&&!w.has(i)||n>=i&&n<=s)&&(t=i,w.set(i,!0))}}catch(e){r.e(e)}finally{r.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){g.currentTime(t+.4)},100))},e.next=5,fetch(t);case 5:return s=e.sent,e.next=8,s.json();case 8:c=e.sent,v=c.avails,y=[],g=u.getPlayer(n),h=g.controlBar.progressControl,b=h.seekBar.el(),v.map(function(e){var n,t;y.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(n=e.adBreakTrackingEvents)||void 0===n||null===(t=n.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===t?void 0:t[0])||[]})}),y.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,r=g.duration();if(!(n>r||Array.isArray(t)&&0==(null==t?void 0:t.length))){var o=n/r*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(o,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(o,"%"),i.style.pointerEvents="none",b.appendChild(i)}}),w=new Map,k=-1,S=(null==g||null===(o=g.controlBar)||void 0===o?void 0:o.getChild("videoSelector"))||null,O=(null==g||null===(i=g.controlBar)||void 0===i?void 0:i.getChild("seriesV2"))||null,g.on("timeupdate",u.throttle(function(){var e=g.currentTime();if(e!==k){k=e;for(var n=!1,t=function(){var t=y[r],o=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,s=o+i;if(e>=o-2.5&&e<=s+2.5){var u,c,v,m;e<=s&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>s&&w.set(o,!0),fe.disable(),S&&(S.el().style.pointerEvents="none",S.el().classList.add("vjs-hidden")),O&&(O.el().style.pointerEvents="none",O.el().classList.add("vjs-hidden")),h.el().style.visibility="hidden";for(var g=e-o,b=0,k=0,j=0;j<l.length;j++){var P,T=null==l||null===(P=l[j])||void 0===P?void 0:P.durationInSeconds;if(g<b+T){k=j;break}b+=T}var I=l[k],D=g-b,C=Math.max(0,(null==I?void 0:I.durationInSeconds)-D),x=Math.round(C);E.style.display="block",A.textContent="".concat(k+1," of ").concat(l.length," • ").concat(a(x));var L=[];null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});L.push.apply(L,f(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&L.push(null==t?void 0:t.podSlotImpressionBeacon);var N=(null==I||null===(u=I.trackingEvents)||void 0===u||null===(c=u.filter(function(e){var n;return null===(n=["clickThrough"])||void 0===n?void 0:n.includes(e.eventType)}))||void 0===c||null===(v=c[0])||void 0===v||null===(m=v.beaconUrls)||void 0===m?void 0:m[0])||null;return p(e,t,L,0,r,{redirectEl:R,redirectUrl:N}),"break"}d.delete("pod-".concat(r))},r=0;r<y.length;r++){if("break"===t())break}n||(E.style.display="none",h.el().style.visibility="visible",S&&(S.el().style.pointerEvents="auto",S.el().classList.remove("vjs-hidden")),O&&(O.el().style.pointerEvents="auto",O.el().classList.remove("vjs-hidden")),fe.enable())}},1e3)),h.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",P),document.addEventListener("pointerup",T))}),(E=document.createElement("div")).className="ssai-ad-container",(I=document.createElement("div")).className="sponsored-adbox",(D=document.createElement("div")).className="sponsored-text",D.textContent="Sponsored Ad",(C=document.createElement("div")).className="ad-info-icon",x=u.parseSvgString(m.InfoIcon()),C.appendChild(x),I.append(D),I.append(C),(A=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",(R=document.createElement("div")).className="ad-visit-advertiser",R.textContent="Visit Advertiser",(null===(l=document.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])&&(R.style.right="8.6rem"),E.append(I),E.append(A),E.append(R),g.el().appendChild(E);case 49:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),d=new Map;case 10:case"end":return e.stop()}},e)})),Oe.apply(this,arguments)}function je(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 Pe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?je(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):je(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Te=function(i,a,s,d){var v,f,p,m,y,g,h,b,w,S,O,j,P,T,E,I,D,x,A,R,L,N,V,M,_,B,U,H,q,F,W,G,K,z,X,Y=a.res,$=void 0===Y?null:Y,Z=a.sres,ee=void 0===Z?null:Z,ne=null!=s&&s.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(v=$)||void 0===v?void 0:v.contentType)||"video",re=u.impolicy16x9(null===(f=$)||void 0===f||null===(p=f[te])||void 0===p||null===(m=p.gist)||void 0===m?void 0:m.videoImageUrl)||u.impolicy16x9(null===(y=$)||void 0===y||null===(g=y[te])||void 0===g||null===(h=g.gist)||void 0===h||null===(b=h.imageGist)||void 0===b?void 0:b.r16x9),oe=(null===(w=$)||void 0===w||null===(S=w[te])||void 0===S||null===(O=S.liveDetails)||void 0===O?void 0:O.isDvrEnabled)||!1,ie=(null===(j=$)||void 0===j||null===(P=j[te])||void 0===P||null===(T=P.streamingInfo)||void 0===T?void 0:T.isLiveStream)||!1,le=(null===(E=$)||void 0===E||null===(I=E.ads)||void 0===I||null===(D=I.preRoll)||void 0===D||null===(x=D.adTags)||void 0===x||null===(A=x.web)||void 0===A?void 0:A.active)&&(null===(R=$)||void 0===R||null===(L=R.ads)||void 0===L||null===(N=L.preRoll)||void 0===N||null===(V=N.adTags)||void 0===V||null===(M=V.web)||void 0===M?void 0:M.url);$=Pe(Pe({},$),{},{audioAssetSource:null==s?void 0:s.audioAssetSource});var ae="MEDIA_TAILOR"==(null===(_=window)||void 0===_||null===(B=_.app_data)||void 0===B||null===(U=B.appcmsMain)||void 0===U||null===(H=U.adsConfig)||void 0===H?void 0:H.vodAdSticherProvider)||!1,se=(null==s?void 0:s.latency)||6,ue=(X={enableSmoothSeeking:!0,controls:0!=(null==s?void 0:s.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==s?void 0:s.muted)||!1,autoplay:(null==s?void 0:s.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!1},muteToggle:"multiplayer"==s.skin,liveui:oe},n(X,"autoplay",null==s?void 0:s.autoplay),n(X,"normalizeAutoplay",(null==s?void 0:s.autoplay)&&!le),n(X,"loop",(null==s?void 0:s.loop)||!1),n(X,"audioPosterMode",null==s?void 0:s.audioPosterMode),n(X,"html5",Pe(Pe({dash:Pe(Pe(Pe({},!o.browser.IS_SAFARI&&{useTTML:!0}),(null==s?void 0:s.debugConfig)&&(null==s||null===(q=s.debugConfig)||void 0===q?void 0:q.enable)&&{debug:!0,logLevel:null!=s&&null!==(F=s.debugConfig)&&void 0!==F&&F.logLevel?null==s||null===(W=s.debugConfig)||void 0===W?void 0:W.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:se},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{useDefaultABRRules:!0,additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0,abandonRequestsRule:!0},autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:Pe(Pe({liveRangeSafeTimeDelta:se,useDevicePixelRatio:!0,experimentalLLHLS:(null==s?void 0:s.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==s||null===(G=s.customData)||void 0===G?void 0:G.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0}),debug:!0,nativeTextTracks:"Safari"==c.detectBrowser()},0==(null==s||null===(K=s.customData)||void 0===K?void 0:K.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==s||null===(z=s.customData)||void 0===z?void 0:z.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(X,"poster",re),n(X,"techOrder",ne),n(X,"chromecast",{requestCustomDataFn:function(e){var n=u.getPlayer(i),t=((null==n?void 0:n.textTracksJson_)||n.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return function(e,n,t){var r,o,i,l,a,s,u,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,y,g,h,b,w,k,S;p.isDrmEnabled=!0;var O=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,j=(null==O?void 0:O.url)||(null==n||null===(y=n.keySystemOptions)||void 0===y||null===(g=y[0])||void 0===g||null===(h=g.options)||void 0===h?void 0:h.serverURL);p.licenseUrl=j;var P=(null==O?void 0:O.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);p.licenseToken=P}var T=(null==e||null===(r=e[f])||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType)||"VIDEO";p.contentType=T;var E=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=E;var I=null==e||null===(a=e[f])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=I;var D=null==e||null===(u=e[f])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=D,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}($,e,t)},modifyLoadRequestFn:function(e){var n,t,r,o,l,a=u.getPlayer(i),s=(null==a?void 0:a.currentSource())||{};!(null===(n=$)||void 0===n||null===(t=n[te])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(o=r.videoAssets)||void 0===o?void 0:o.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(l=s.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),X);if(!o.getPlayers()[i]){o.log.level("debug");var ce=o(i,ue,function(){var n=t(r.mark(function n(){var t,a,u,c,v,f,p,m,y,g,h,b,w,S,O,j,P,T,E,I;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(ce),console.log(o.VERSION),console.log(o.getPlugins()),n.next=5,C(s,$);case 5:if(b=null===(t=$)||void 0===t||null===(a=t[te])||void 0===a||null===(u=a.liveDetails)||void 0===u?void 0:u.startOverTime,ie&&d.resolve(Pe({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:$}:{response:$})),e.inititateBeacon(i,null==s?void 0:s.analyticsCb),J(i,s),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),oe&&k(i,b),!le||null!=s&&null!==(c=s.customData)&&void 0!==c&&c.disableAds||e.initialiseAdvertisement(i,le,$),w=e.getSource($,i),console.log(w),null!=s&&s.nearestClusterUrl&&(w=e.getUpdatedClusterSource(w,s.nearestClusterUrl)),!ae){n.next=19;break}return n.next=18,we(i,$);case 18:w=n.sent;case 19:w?e.loadVideo(i,w):(d.reject({status:!1,msg:"Incompatible / Missing Source",response:$}),e.handleError(i,"Incompatible / Missing Source")),((null===(v=$)||void 0===v||null===(f=v[te])||void 0===f||null===(p=f.contentDetails)||void 0===p||null===(m=p.closedCaptions)||void 0===m?void 0:m.length)>0||(null===(y=$)||void 0===y||null===(g=y[te])||void 0===g||null===(h=g.closedCaptions)||void 0===h?void 0:h.length)>0)&&(I=(null===(O=$)||void 0===O||null===(j=O[te])||void 0===j||null===(P=j.contentDetails)||void 0===P?void 0:P.closedCaptions)||(null===(T=$)||void 0===T||null===(E=T[te])||void 0===E?void 0:E.closedCaptions),S=I.filter(function(e){return"VTT"===e.format}),l.addCaptions(i,S)),null!=s&&s.disableControls?e.disableControls(i):Q(i,Pe(Pe(Pe({},s),ue),{},{liveVideo:ie,isDvrEnabled:oe,res:$,sres:ee})),de(i,Pe(Pe(Pe({},s),ue),{},{liveVideo:ie}),d,{res:$,sres:ee});case 23:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},Ee={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function Ie(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 De(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ce,xe=function(e,n){var t=n.resolve,r=n.reject,o=null==e?void 0:e.playerId,i=Ae(e);Te(o,{res:i},e,{resolve:t,reject:r})},Ae=function(n){var t,r,o=null==n?void 0:n.streamingInfo,i=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,l=(null==n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isDrmEnabled)||null,a=null==n?void 0:n.token,s=e.getDecodedToken(a),u=null==s?void 0:s.site;return De(De({id:null==Ee?void 0:Ee[u]},!l&&{directPlaybackUrl:null==i?void 0:i.url}),{},{video:{drmEnabled:l,streamingInfo:{videoAssets:{widevine:null==i?void 0:i.widevine,fairPlay:null==i?void 0:i.fairPlay,playReady:null==i?void 0:i.playReady}},liveDetails:{isDvrEnabled:null==o?void 0:o.isDvrEnabled}}})};function Re(e,n){return Le.apply(this,arguments)}function Le(){return(Le=t(r.mark(function n(t,o){var i,l,a,s,u,c;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return i=o.resolve,l=o.reject,a=null==t?void 0:t.videoId,s=null==t?void 0:t.playerId,u=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:c=n.sent,e.getVideoDetails(a,c).then(function(n){var r,o,d,v;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(o=r.video)||void 0===o||null===(d=o.gist)||void 0===d?void 0:d.contentType,e.setCurrentVideo(null==n?void 0:n.data);var f,p=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(v=t.watchHistory)&&void 0!==v&&v.enable&&!u)if((null===(f=t.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,y,g,h=re((null===(m=t.watchHistory)||void 0===m?void 0:m.profileId)||"",a,null==t?void 0:t.siteOwner);if(h&&h.length)t.watchHistoryResumeTime=(null===(y=h[0])||void 0===y?void 0:y.watchedTime)||null,t.watchedPercentage=(null===(g=h[0])||void 0===g?void 0:g.watchedPercentage)||null;p.contentType="video",Te(s,{res:p},t,{resolve:i,reject:l})}else e.getVideoInfo(a,c).then(function(e){var n,r,o,i,l,a;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.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,p.contentType="video"}).catch(function(e){var n,t,r,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(r=window)||void 0===r||null===(o=r.watchHistory)||void 0===o||o.cb(e))}).finally(function(){Te(s,{res:p},t,{resolve:i,reject:l})});else Te(s,{res:p},t,{resolve:i,reject:l})}).catch(function(n){e.initiateErrorHandling(n,s,l,a)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ne(e,n){return Ve.apply(this,arguments)}function Ve(){return(Ve=t(r.mark(function n(t,o){var i,l,a,s,u;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return i=o.resolve,l=o.reject,n.next=3,e.getToken();case 3:a=n.sent,s=null==t?void 0:t.playerId,u=null==t?void 0:t.epg,e.getLinearChannelDetails(u,a).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==u?void 0:u.channelId,Te(s,{res:n},t,{resolve:i,reject:l})}).catch(function(n){e.initiateErrorHandling(n,s,l,videoId)});case 7:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Me(e,n){return _e.apply(this,arguments)}function _e(){return(_e=t(r.mark(function n(t,o){var i,l,a,s,u,c,d;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return l=o.resolve,a=o.reject,n.next=3,e.getToken();case 3:s=n.sent,u=null==t?void 0:t.playerId,c=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(c)),d=null==t||null===(i=t.series)||void 0===i?void 0:i.id,e.getSeriesDetails(d,s).then(function(n){var r,o,i,c=n.data,v=n.data.seasons;e.setCurrentSeries(v);var f=videoId||(null==v||null===(r=v[0])||void 0===r||null===(o=r.episodes)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id);e.createSeriesWatchMap(d,s),e.getVideoDetails(f,s).then(function(n){var r,o,i;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(o=r.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType,e.setCurrentVideo(n.data),Te(u,{res:null==n?void 0:n.data,sres:c},t,{resolve:l,reject:a})}).catch(function(n){e.initiateErrorHandling(n,u,a,videoId)})}).catch(function(n){e.initiateErrorHandling(n,u,a)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}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 Ue(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}exports.VLPlayerCore=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:i.onTimeUpdate,getVideoDuration:i.getVideoDuration,onVideoEnded:i.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=t(r.mark(function t(o,i){var l,a,s,c,v,f,p,m,g,h,b,w,k,S,O,j,P,T,E,D,C,x,A;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=2;break}return t.abrupt("return");case 2:if(b=(null==n?void 0:n.videoSourceUrl)||!1,w=null==n?void 0:n.asat,k=(null==n||null===(l=n.epg)||void 0===l?void 0:l.enable)||!1,S=null==n?void 0:n.videoId,O=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,j=(null==n?void 0:n.streamingInfo)||!1,window.videoId=S,P=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=17;break}if(sessionStorage.setItem("vlp_token",P),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),P&&!e.isTokenExpired(P)){t.next=16;break}return i({status:!1,msg:"".concat(P?"Token is expired !":"Missing Authorization Token"),response:{token:P}}),t.abrupt("return");case 16:Ce=JSON.parse(atob(P.split(".")[1]));case 17:return n.isAnonymousUser=!(null===(s=Ce)||void 0===s||!s.anonymousId),n.siteOwner=(null===(c=Ce)||void 0===c?void 0:c.site)||null,n.userId=(null===(v=Ce)||void 0===v?void 0:v.userId)||null,window.sessionStorage.setItem("uid",null===(f=Ce)||void 0===f?void 0:f.userId),window.watchHistory=n.watchHistory||null,T=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(p=n.series)&&void 0!==p&&p.enable?null:null==n?void 0:n.chromecastReceiverId,E=(null==n||null===(m=n.analytics)||void 0===m?void 0:m.gaId)||null,(D=null==n?void 0:n.errors)&&(window.customErrors=D),window.customData=null==n?void 0:n.customData,d.setLocalisation(null==n||null===(g=n.customData)||void 0===g?void 0:g.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!u.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),t.next=33,I(n);case 33:E&&y("https://www.googletagmanager.com/gtag/js?id=".concat(E)).then(function(){return e.runGtag(E)}).catch(function(e){}),(C=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(T)))&&C.addEventListener("contextmenu",function(e){return e.preventDefault()}),b?(A={directPlaybackUrl:b,id:x="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},w?e.getVideoDetails(x,P).then(function(e){var t=(null==e?void 0:e.data)||{};Te(T,{res:Ue(Ue({},t),A)},n,{resolve:o,reject:i})}).catch(function(n){e.initiateErrorHandling(n,T,i,x)}):Te(T,{res:A},n,{resolve:o,reject:i})):j?xe(n,{resolve:o,reject:i}):O?Me(n,{resolve:o,reject:i}):k?Ne(n,{resolve:o,reject:i}):Re(n,{resolve:o,reject:i});case 37:case"end":return t.stop()}},t)}));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:a.getRenditions,skip:e.skip,getPlayer:u.getPlayer,play:e.play,pause:e.pause,detectBrowser:c.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:i.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:l.enableCaptions,disableCaptions:l.disableCaptions,getCaptions:l.getCaptions,playSelectedResolution:s.playSelectedResolution,getSource:e.getSource,setVolume:h,getVolume:b,disableControls:e.disableControls,setPlaybackSpeed:i.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,isBehindLive:e.isBehindLive}},exports.initialiseKeyboardEvents=function(n,t){var r,o,i,l=u.getPlayer(n),a=null==l||null===(r=l.controlBar)||void 0===r||null===(o=r.playToggle)||void 0===o?void 0:o.el_,s=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",function(r){var o;if(fe.enabled&&"input"!=r.target.localName){var i=r.key,u=!0===t.liveVideo||!0===t.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(i)&&(r.preventDefault(),null==s||s.focus()),i){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":u&&!1===t.liveui||e.rewind(n,10);break;case"ArrowRight":u||e.skip(n,10)}}},!0)},exports.setupAdvertisementMarkers=function(e,n){return Oe.apply(this,arguments)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-939a3e97.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),o=require("@babel/runtime/regenerator"),i=require("video.js"),l=require("./util-4769ed5b.js"),r=require("./captions-68e263dd.js"),a=require("./resolution-9c4872ec.js"),u=require("./skin-eeec7a85.js"),s=require("./player_instance-fcf6a8fb.js"),d=require("./localisation-56e0a999.js"),c=require("./currentVideoInfo-5802821b.js"),v=require("@babel/runtime/helpers/typeof"),p=require("./icons-2609dbe4.js"),m=require("./helper-dbf2fb22.js"),f=require("@babel/runtime/helpers/toConsumableArray"),g=require("@babel/runtime/helpers/slicedToArray"),h=require("@viewlift/sse"),y=function(e){return new Promise(function(n,t){if(b(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}})},b=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},w=function(e,n,t){var o=s.getPlayer(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var i=parseFloat(n)/100;o.volume(i),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},k=function(e){var n=s.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},S=function(){var n=t(o.mark(function n(t){var l,r,a,u,d;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(a=s.getPlayer(null==t?void 0:t.playerId),null!=t&&null!==(l=t.series)&&void 0!==l&&l.enable||!(null!=t&&t.chromecastReceiverId||null!=t&&t.airplay)){n.next=10;break}return n.prev=2,n.next=5,y("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 5:n.next=10;break;case 7:n.prev=7,n.t0=n.catch(2),console.log("Error",n.t0);case 10:if(null!=t&&null!==(r=t.series)&&void 0!==r&&r.enable||null==t||!t.chromecastReceiverId){n.next=21;break}return n.next=13,import("@silvermine/videojs-chromecast");case 13:n.sent.default(i),(d=i.getTech("chromecast"))&&!d.prototype.seeking&&(d.prototype.seeking=function(){}),null!==(u=window)&&void 0!==u&&u.cast?null==a||a.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==a||a.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},n.next=22;break;case 21:console.log("Chromecast plugin is not available");case 22:null!=t&&t.airplay&&"Safari"==e.detectBrowser()?null==a||a.airPlay({addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 23:case"end":return n.stop()}},n,null,[[2,7]])}));return function(e){return n.apply(this,arguments)}}(),I=function(e,n){var t=s.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,l,r,a,u=this.el(),s=i.dom.getPointerPosition(u,n).x;i.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(l=o.framework)||void 0===l||null===(r=l.CastContext)||void 0===r||null===(a=r.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),p=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=p*s,v.seek()}})};var E=function(){var e=t(o.mark(function e(){return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),y("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)}}(),T=function(){var n=t(o.mark(function n(){return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,import("@viewlift/comscore/index.js").then(function(n){e.comscoreInstanceManager.set(n)});case 2:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}(),D=function(){var e=t(o.mark(function e(){return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){i.getPlugin("eme")||i.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),C=function(){var e=t(o.mark(function e(){var n;return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(i),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),O=function(){var e=t(o.mark(function e(){return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./index-84cce26a.js")});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),P=function(){var e=t(o.mark(function e(){return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./videojs-dash5.es-75637b78.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)}}(),j=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){y("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:E,loadEMELibrary:D,loadMuxPlugin:C,loadDvrSeekbar:O,loadContribDash:P,loadComscorePlugin:T});function x(e){return L.apply(this,arguments)}function L(){return(L=t(o.mark(function n(t){var i,l,r;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return i=(null==t?void 0:t.airplay)||!1,n.next=3,E();case 3:i&&"Safari"==e.detectBrowser()?Promise.resolve().then(function(){return j}).then(function(e){e.importAirplay()}):(r=(null===(l=document)||void 0===l?void 0:l.getElementById(null==t?void 0:t.playerId))||null)&&r.setAttribute("x-webkit-airplay","deny");case 4:case"end":return n.stop()}},n)}))).apply(this,arguments)}function A(e){return N.apply(this,arguments)}function N(){return(N=t(o.mark(function e(n){var t,i,l,r,a,u,d,c;return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=s.getPlayer(n.playerId),e.next=3,T();case 3:c.comscore({publisherId:null==n||null===(t=n.comscore)||void 0===t?void 0:t.publishedId,endpoint:null==n||null===(i=n.comscore)||void 0===i?void 0:i.endpoint,applicationName:(null==n||null===(l=n.comscore)||void 0===l?void 0:l.applicationName)||(null===(r=window)||void 0===r?void 0:r.siteName)||null,implementationId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.implementationId,projectId:null==n||null===(u=n.comscore)||void 0===u?void 0:u.projectId,debug:(null==n||null===(d=n.comscore)||void 0===d?void 0:d.debug)||!1});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function R(e,n){return M.apply(this,arguments)}function M(){return(M=t(o.mark(function n(t,i){var l,r,a,u,s,d,c,v,p,m,f,g,h,y;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return p=(null==i?void 0:i.contentType)||"video",m=null==i||null===(l=i[p])||void 0===l?void 0:l.drmEnabled,null==i||null===(r=i[p])||void 0===r||null===(a=r.liveDetails)||void 0===a||a.isDvrEnabled,null==t||t.showPositiveSeekbar,f=(null==i||null===(u=i[p])||void 0===u||null===(s=u.streamingInfo)||void 0===s||null===(d=s.videoAssets)||void 0===d?void 0:d.dash)||null,g=(null==t||null===(c=t.comscore)||void 0===c?void 0:c.enable)||!1,h=!(null==t||null===(v=t.analytics)||void 0===v||!v.muxKey),n.prev=7,n.next=10,Promise.allSettled([m?"Safari"==e.detectBrowser()?D():"caliente"!=(null===(y=window)||void 0===y?void 0:y.siteName)?P():D():"Safari"!=e.detectBrowser()&&f?P():null,g?A(t):null,h?C():null,S(t)]);case 10:n.next=15;break;case 12:n.prev=12,n.t0=n.catch(7),console.log("Error",n.t0);case 15:case"end":return n.stop()}},n,null,[[7,12]])}))).apply(this,arguments)}function B(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function V(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?B(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):B(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var _=new Set,H=null,U=function(n,t,o,i){var l,r,a,u,s,d,v,p={},m=(null==n?void 0:n.contentType)||"video";p["c3.cm.id"]=(null===(l=n[m])||void 0===l?void 0:l.id)||"Null",p["c3.cm.contentType"]=J(n),p[null==o||null===(r=o.Constants)||void 0===r?void 0:r.IS_LIVE]=!(null==n||!n.linearchannel),p[null==o||null===(a=o.Constants)||void 0===a?void 0:a.STREAM_URL]=t.currentSrc(),p[null==o||null===(u=o.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),p["c3.cm.categoryType"]=W(n),p["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"}}(),p.DRMEnabled=(null===(s=n[m])||void 0===s?void 0:s.drmEnabled)||"None",p.DAIStream=null!==(d=n[m])&&void 0!==d&&null!==(v=d.gist)&&void 0!==v&&v.isSSAIEnabled?"YES":"NO",p[o.Constants.DEFAULT_RESOURCE]="AKAMAI",p["c3.cm.brand"]="NULL",p.CDVREnabled=K(n),p["c3.cm.genreList"]=F(n),p["c3.cm.genre"]=q(n),p["c3.cm.channel"]=G(n,i);var f=Q(c.getCurrentSeries(),n);return p=V(V({},p),f)},q=function(e){var n,t,o,i=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[i])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},F=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"},G=function(e,n){var t,o,i=(null==e?void 0:e.contentType)||"video";return"video"===i?"VOD":(null===(o=((null==e||null===(t=e[i])||void 0===t?void 0:t.channels)||[]).find(function(e){return(null==e?void 0:e.id)===(null==n?void 0:n.channelId)}))||void 0===o?void 0:o.title)||"NULL"},W=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"},K=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",i=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return i?"YES":"NO"},Y=function(e,n){var t,o,i=(n||{}).epg;if(i&&null!=i&&i.enable&&null!=i&&i.programTitle)return i.programTitle;var l=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(t=e[l])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(r)},J=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var z,X,Q=function(n,t){var o,i,l,r,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return u;var s=e.getSeasonNumber(),d=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(o=t.video)||void 0===o||null===(i=o.series)||void 0===i?void 0:i.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==n||null===(l=n[s-1])||void 0===l||null===(r=l.episodes)||void 0===r||null===(a=r[d-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},$=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"}},Z=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},ee=function(){var e=t(o.mark(function e(n,t){var i,l,r,a,u,d,v,p,m,f,g,h;return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==t?void 0:t.convivaConfig)||{},l=i.trackConvivaPlayerEvent,r=i.paymentHandler,a=i.tveProvider,u=i.enable,d=i.appName,p=(v=t||{}).token,m=v.epg,u){e.next=4;break}return e.abrupt("return");case 4:if(f=s.getPlayer(n),"function"==typeof(g=l)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,g("getConvivaObject");case 10:if(h=e.sent){e.next=13;break}return e.abrupt("return");case 13:f.ready(function(){var e=f.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=$(t.keySystem);g("contentInfo",{DRMEnabled:o})}else g("contentInfo",{DRMEnabled:"None"})}),n||g("contentInfo",{DRMEnabled:"None"})}),f.on("loadstart",function(){var e,n;H&&H!==f.currentSrc()&&g("playbackEnded"),g("setPlayer",f),_.clear(),H=f.currentSrc();var o=Z(f.currentType()),i=c.getCurrentVideo(),l=U(i,f,h,m);l[null==h||null===(e=h.Constants)||void 0===e?void 0:e.PLAYER_NAME]=d||"WEB",l[null==h||null===(n=h.Constants)||void 0===n?void 0:n.ASSET_NAME]=Y(i,t),l.authToken=p||"NULL",l.streamType=o,l.D2CType=r||"NONE",l.subscriberType=a?"MVPD":"FREE"!==r?"D2C":"FREE",l["c3.cm.affiliate"]=a||"NULL",ne.setData(l),g("contentInfo",l)}),f.on("loadedmetadata",function(){var e,n=f.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),g("contentInfo",{screenResolution:e})}),f.on("play",function(){_.has(f.currentSrc())||(_.add(f.currentSrc()),g("playbackStarted",null))}),f.on("ended",function(){_.has(f.currentSrc())&&_.delete(f.currentSrc()),g("playbackEnded")}),f.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&g("initAdSensor",{player:f,adsLoader:null==e?void 0:e.adsLoader})}),f.on("dispose",function(){null==_||_.clear(),g("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),ne=(z={},{setData:function(e){z=V(V({},z),e)},getData:function(){return z}}),te=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-5e4b3ad1.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-ab226d57.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-02df14d4.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-eac05283.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-98b66c5d.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?Promise.resolve().then(function(){return require("./skin-31d84d3e.js")}).then(function(t){t.initialiseSkin(e,n)}):"news"==t?Promise.resolve().then(function(){return require("./skin-334830ee.js")}).then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?Promise.resolve().then(function(){return require("./skin-6e922e32.js")}).then(function(t){t.initialiseSkin(e,n)}):"mini"==t&&Promise.resolve().then(function(){return require("./skin-af838b06.js")}).then(function(t){t.initialiseSkin(e,n)})};function oe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function ie(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):oe(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var le=[],re=0,ae=null;function ue(){console.log("Cleaning up watch history data"),X=null,le=[],re=0,ae=null}function se(t,o,i){var l,r,a,u,s,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==o||null===(l=o.watchHistory)||void 0===l||l.apiVersion;var v=null==o||null===(r=o.watchHistory)||void 0===r?void 0:r.profileId,p=Math.floor(t.currentTime()),m=Math.floor(t.duration());null==o||null===(a=o.watchHistory)||void 0===a||a.xapiKey;var f=(null==o||null===(u=o.video)||void 0===u?void 0:u.originalObjectId)||null,g=(null==o||null===(s=o.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,h=Math.floor(t.currentTime()),y=d?100:Math.floor(p/m*100),b={};g?function(e,t,o){var i=t?"watchhistory-data-".concat(t):"watchhistory-data-guest-".concat(o),l=de(i),r=(new Date).getTime(),a=c.getCurrentVideo(),u=(null==a?void 0:a.video)||{},s=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return ie(ie({},e),{},n({},t,u[t]))},{}),d=l.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===X});d<0?l.push(ie(ie({content:s},e),{},{addedDate:r,updateDate:r})):l[d]=ie(ie(ie({},l[d]),e),{},{updateDate:r});localStorage.setItem("".concat(i),JSON.stringify(l))}(b={completed:d,watchedTime:h,watchedPercentage:y},v,o.siteOwner):(b=ie(ie({videoId:X,watchedTime:h,watchedPercentage:y,doneWatching:d,profileId:v},ae&&{seriesId:ae}),f&&{originalObjectId:f}),e.saveWatchHistory(b).then(function(e){}).catch(function(e){})),re=p+i}function de(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function ce(e,n,t){var o=de(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),i=[];return o&&Array.isArray(o)&&(i=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),i}var ve=!1,pe=function(n,t){var o,i,l=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(o=n[l])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.secondaryVideoAssets)||null)&&!ve){var r=me(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(r,t);return a&&e.loadVideo(t,a),ve=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function me(e,n,t){if(Array.isArray(e))return e.map(function(e){return me(e,n,t)});if(null!==e&&"object"===v(e)){var o={};return Object.keys(e).forEach(function(i){i===n&&void 0!==e[t]?o[i]=e[t]:i===t&&void 0!==e[n]?o[i]=e[n]:o[i]=me(e[i],n,t)}),o}return e}function fe(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 ge(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)?ge(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,r=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return r=e.done,e},e:function(e){a=!0,l=e},f:function(){try{r||null==t.return||t.return()}finally{if(a)throw l}}}}function ge(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function he(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function ye(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?he(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):he(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var be=function(n,t,o,i){var l,a,u,d,p,m=i.res,f=i.sres,g=s.getPlayer(n),h=(null==m?void 0:m.contentType)||"video",y=(null==m||null===(l=m[h])||void 0===l?void 0:l.drmEnabled)||!1,b=(null==m||null===(a=m[h])||void 0===a||null===(u=a.streamingInfo)||void 0===u?void 0:u.isLiveStream)||!1,k=(null==m||null===(d=m[h])||void 0===d||null===(p=d.liveDetails)||void 0===p?void 0:p.isDvrEnabled)||!1;c.setCurrentVideo(m),c.videoReplayTracker.set(m),g&&(g.on("loadstart",function(){b?o.resolve({status:!0,msg:"Video Loaded",response:m}):o.resolve(ye({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:m}:{response:m}))}),g.on("loadeddata",function(){var o,i,l,a=r.getCaptions(n);if(null==a||a.map(function(e){return r.disableCaptions(n,e.id)}),k&&"Safari"===e.detectBrowser())try{var u;null==g||null===(u=g.liveTracker)||void 0===u||u.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==g||!g.muted())&&w(n,sessionStorage.getItem("volume")||"100");var d=c.getCurrentVideo();if(e.initialiseComscoreStreamingTracking(t),e.clearError(),null!=t&&t.watchHistory&&null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.enable&&(!t.isAnonymousUser||null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.saveOffline)){var v,p,f=ye(ye({},t),m);!function(e,n,t){var o,i,l;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(ae=null==n||null===(i=n.series)||void 0===i?void 0:i.id),le=[],re=0,X=t;var r=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,a=s.getPlayer(e);a&&(a.on("dispose",ue),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());le.includes(re)||(e!=re||e<r?e>re&&(re=e+r):(le.push(e),se(a,n,r)))}}),a.one("ended",function(){se(a,n,r,!0)}))}(n,f,null==d||null===(v=d.video)||void 0===v||null===(p=v.gist)||void 0===p?void 0:p.id)}if(null!=t&&null!==(l=t.analytics)&&void 0!==l&&l.muxKey&&null!=g&&g.mux){var h,y,b,S,I,E,T=(null===(h=c.getCurrentVideo())||void 0===h?void 0:h.video)||(null==m?void 0:m.video),D=null==T?void 0:T.gist,C={env_key:null==t||null===(y=t.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(b=window)||void 0===b?void 0:b.vl_player_version,video_id:null==D?void 0:D.id,video_title:null==D?void 0:D.title,video_series:null==T||null===(S=T.series)||void 0===S?void 0:S.title,video_stream_type:null!=T&&null!==(I=T.streamingInfo)&&void 0!==I&&I.isLiveStream?"live":"video",viewer_user_id:null==t||null===(E=t.analytics)||void 0===E?void 0:E.userId};g.mux({debug:!1,data:C})}}),g.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];g.trigger("subtitlechanged",n)}),g.on("subtitlechanged",function(e,n){var t,o,i,l,r,a,u,s,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S,m=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(d=s.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var f,g=m.getMediaSession(),h=g.media.tracks.filter(function(e){return"TEXT"==e.type});f=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(f)}}),g.tech_.on("retryplaylist",function(){b&&pe(m,n)}),g.on("error",function(){var t,i;(console.log("ERROR",g.error(),g.error().code),4===g.error().code&&b)?pe(m,n):(e.handleError(n,(null==g||null===(t=g.error())||void 0===t?void 0:t.message)||"Some error occured"),o.reject({status:!1,msg:(null==g||null===(i=g.error())||void 0===i?void 0:i.message)||"Some error occured",response:m}))}),g.one("play",function(){var e,n,o,i,l;if(null===(e=window)||void 0===e||null===(n=e.app_data)||void 0===n||null===(o=n.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=t&&null!==(l=t.series)&&void 0!==l&&l.enable){var r,a,u,s=null===(r=c.getCurrentVideo())||void 0===r||null===(a=r.video)||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.id,d=c.getSeriesWatchMap(),v=(null==d?void 0:d.get(s))||{t:0,p:0},p=v.t,m=v.p;p&&m<95&&setTimeout(function(){g.currentTime(p)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){g.currentTime(null==t?void 0:t.watchHistoryResumeTime)},0);if(null!=g&&g.dvrSeekbar)try{g.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),g.on("volumechange",function(){var e=100*g.volume().toFixed(2);g.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),g.on("chromecastDisconnected",function(){if(b){g.currentSource();for(var e=g.textTracks(),n=e.length-1;n>=0;n--)g.removeRemoteTextTrack(e[n])}}),g.one("loadeddata",function(){var n,t=(null==g||null===(n=g.audioTracks())||void 0===n?void 0:n.tracks_)||null;if(t)if(t.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),o=(n.language||n.label||"").toUpperCase();return t<o?-1:t>o?1:0}),"object"==v(g.dash)){var o,i,l,r=null==g||null===(o=g.dash)||void 0===o||null===(i=o.mediaPlayer)||void 0===i?void 0:i.getTracksFor("audio"),a=null==r?void 0:r.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),u=fe(t);try{for(u.s();!(l=u.n()).done;){var s=l.value;if(a&&(null==s?void 0:s.id)=="dash-audio-".concat(a.index)){s.enabled=!0;break}}}catch(e){u.e(e)}finally{u.f()}}else{var d,c=fe(t);try{for(c.s();!(d=c.n()).done;){var p,m,f,h=d.value;if(("Chrome"==e.detectBrowser()||"Edge"==e.detectBrowser()&&(null!==(p=navigator)&&void 0!==p&&null!==(m=p.userAgent)&&void 0!==m&&m.includes("Macintosh")||!y))&&null!=h&&null!==(f=h.label)&&void 0!==f&&f.includes("5.1"))g.audioTracks().removeTrack(h);else{if("main"==h.kind){h.enabled=!0;break}h.enabled=!1}}}catch(e){c.e(e)}finally{c.f()}}}))};function we(e,n,t){var o=document.createElement("div");return o.className="vjs-seekbar-program-marker",o.id=e,o.style.title=n,o.style.left="".concat(t,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="4px",o.style.backgroundColor="#000000",o.style.left="".concat(t,"%"),o.style.pointerEvents="none",o}function ke(){document.querySelectorAll(".vjs-seekbar-program-marker").forEach(function(e){e.remove()})}function Se(e){var n=(new Date).getTime(),t=new Date(n-1e3*e).getTime();return(c.getCurrentEpgPrograms()||[]).filter(function(e){var o=new Date(e.formatted_startdate).getTime();return o>=t&&o<=n}).map(function(e){var n=new Date(e.formatted_startdate).getTime()-t;return{title:e.title,time:n/1e3,id:e.programme_id}})}function Ie(e,n){var t=s.getPlayer(e);if(t){var o=n.dvrConfig,i=void 0===o?{}:o,l=n.videoId;n.epg;var r=i.playLive,a=i.playFromBegining,u=i.programs;c.setCurrentEpgPrograms(u),t.on("loadeddata",function(){m.checkDvrStartOverEnabled(n)?a?m.playFromBeginningHandler(t,n):r?m.playLiveOrResumeHandler(t,l):(!function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.dvrConfig,o=void 0===t?{}:t,i=n.videoId,l=n.epg,r=o.buttonConfig,a=void 0===r?{}:r,u=a.watchLive;a.resume;var s=a.startFromBegining,d=i;if(l&&null!=l&&l.enable){var c=JSON.parse(sessionStorage.getItem("epgConfig"));d="".concat(null==c?void 0:c.programId,"-").concat(null==c?void 0:c.channelId)}var v=!!m.getWatchedTime(d),f=document.querySelector(".vjs-dvr-btn-overlay");f||((f=document.createElement("div")).className="vjs-dvr-btn-overlay");var g=m.getCurrentProgramThumbnail(n);g&&(f.style.backgroundImage="url(".concat(g,")"),f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="cover");f.innerHTML=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=(null==e?void 0:e.buttonConfig)||{},o=t.watchLive,i=t.resume,l=t.startFromBegining,r=n?(null==i?void 0:i.text)||"Resume":(null==o?void 0:o.text)||"Watch Live",a='<button id="watch-live-resume-btn">'.concat(p.watchLiveIcon2()," ").concat(r,"</button>"),u='<button id="watch-begining-btn">'.concat(p.startLiveIcon()," ").concat((null==l?void 0:l.text)||"Start From Beginning","</button>");return'<div class="dvr-button">'.concat(a," ").concat(u,"</div>")}(o,v),f.style.display="flex",e.el().appendChild(f),m.pauseAndHideControl(e),Ee("watch-live-resume-btn",u,function(){m.showControl(e,f),m.playLiveOrResumeHandler(e,d)}),Ee("watch-begining-btn",s,function(){m.showControl(e,f),m.playFromBeginningHandler(e,n)})}(t,n),m.handleLiveStartOverBtn({player:t,showWatchLive:!0,showStartOver:!0})):m.removeDvrStartOver(t)}),t.one("loadedmetadata",function(){sessionStorage.setItem("program_switched",!0),function(e,n){var t=n.videoId,o=e.currentTime(),i=!1,l=e.seekable(),r=l.start(0),a=l.end(l.length-1)-r,u=JSON.parse(sessionStorage.getItem("epgConfig")),s=t,d=!0;if(u&&null!=u&&u.enable){var c;d=(null==n||null===(c=n.epg)||void 0===c?void 0:c.programId)===(null==u?void 0:u.programId),s=null==u?void 0:u.programId}e.on("seeking",function(){i=!0}),e.on("seeked",function(){i=!1,o=e.currentTime();var t=JSON.parse(sessionStorage.getItem("epgConfig"));if(t&&null!=t&&t.enable){if(!d||sessionStorage.getItem("program_switched"))return;s="".concat(null==t?void 0:t.programId,"-").concat(null==t?void 0:t.channelId)}m.saveWatchedTime(s,o),m.getProgramStartTime(e,n),m.handleLiveStartOverBtn({player:e,showWatchLive:e.seekable().end(0)-e.currentTime()>5,showStartOver:!0})}),e.on("timeupdate",function(){if(!i){var n=JSON.parse(sessionStorage.getItem("epgConfig"));if(n&&null!=n&&n.enable){if(!d||sessionStorage.getItem("program_switched")&&!e.currentTime())return;if(sessionStorage.getItem("program_switched")&&e.currentTime())return void sessionStorage.removeItem("program_switched");s="".concat(null==n?void 0:n.programId,"-").concat(null==n?void 0:n.channelId)}var t=e.currentTime();Math.abs(t-o)>=20&&(m.saveWatchedTime(s,t),o=t,function(e,n){Se(n).forEach(function(t){var o=t.id,i=t.title,l=t.time,r=document.getElementById(o);if(r){var a=Math.min(l/n*100,99.5);r.style.left="".concat(a,"%")}else{var u=e.controlBar.progressControl.seekBar.el(),s=we(o,i,Math.min(l/n*100,99.5));u.appendChild(s)}})}(e,a))}})}(t,n)})}else console.warn("Player instance is required to initialize start over.")}function Ee(e,n,t){var o,i,l=document.getElementById(e);l&&(i=n,(o=l)&&(o.style.color="".concat((null==i?void 0:i.textColor)||"#000"),o.style.backgroundColor="".concat((null==i?void 0:i.backGroundColor)||"#DCF95B")),l.addEventListener("click",t))}function Te(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function De(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Te(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var Ce=function(l,a,d,c){var v,p,m,f,g,h,y,b,w,k,S,E,T,D,C,O,P,j,x,L,A,N,M,B,V,_,H,U,q,F,G,W,K,Y,J,z,X,Q=a.res,$=void 0===Q?null:Q,Z=a.sres,oe=void 0===Z?null:Z,ie=null!=d&&d.chromecastReceiverId?["chromecast","html5"]:["html5"],le=(null===(v=$)||void 0===v?void 0:v.contentType)||"video",re=u.impolicy16x9(null===(p=$)||void 0===p||null===(m=p[le])||void 0===m||null===(f=m.gist)||void 0===f?void 0:f.videoImageUrl)||u.impolicy16x9(null===(g=$)||void 0===g||null===(h=g[le])||void 0===h||null===(y=h.gist)||void 0===y||null===(b=y.imageGist)||void 0===b?void 0:b.r16x9),ae=(null===(w=$)||void 0===w||null===(k=w[le])||void 0===k||null===(S=k.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,ue=(null===(E=$)||void 0===E||null===(T=E[le])||void 0===T||null===(D=T.streamingInfo)||void 0===D?void 0:D.isLiveStream)||!1,se=(null===(C=$)||void 0===C||null===(O=C.ads)||void 0===O||null===(P=O.preRoll)||void 0===P||null===(j=P.adTags)||void 0===j||null===(x=j.web)||void 0===x?void 0:x.active)&&(null===(L=$)||void 0===L||null===(A=L.ads)||void 0===A||null===(N=A.preRoll)||void 0===N||null===(M=N.adTags)||void 0===M||null===(B=M.web)||void 0===B?void 0:B.url);$=De(De({},$),{},{audioAssetSource:null==d?void 0:d.audioAssetSource});var de=(null==d||null===(V=d.customData)||void 0===V?void 0:V.ads)||{},ce=(null===(_=$)||void 0===_||null===(H=_[le])||void 0===H?void 0:H.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==de?void 0:de.vodAdSticherProvider)||!1,ve=(null==d?void 0:d.latency)||6,pe=(null==d?void 0:d.skin_settings)||{};null==d||d.dvrConfig;var me=(z={enableSmoothSeeking:!0,controls:0!=(null==d?void 0:d.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==d?void 0:d.muted)||!1,autoplay:(null==d?void 0:d.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==pe?void 0:pe.pictureInPictureToggle)||!1},playbackRates:null!=pe&&pe.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==d.skin,liveui:ae},n(z,"autoplay",null==d?void 0:d.autoplay),n(z,"normalizeAutoplay",(null==d?void 0:d.autoplay)&&!se),n(z,"loop",(null==d?void 0:d.loop)||!1),n(z,"audioPosterMode",null==d?void 0:d.audioPosterMode),n(z,"html5",De(De({dash:De(De(De({},!i.browser.IS_SAFARI&&{useTTML:!0}),(null==d?void 0:d.debugConfig)&&(null==d||null===(U=d.debugConfig)||void 0===U?void 0:U.enable)&&{debug:!0,logLevel:null!=d&&null!==(q=d.debugConfig)&&void 0!==q&&q.logLevel?null==d||null===(F=d.debugConfig)||void 0===F?void 0:F.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:ve},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:De(De({},(null==d?void 0:d.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==d?void 0:d.initialBandwidth)/1e3}}),{},{autoSwitchBitrate:{video:!0,audio:!0},additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}})}}}),vhs:De(De(De({},(null==d?void 0:d.initialBandwidth)&&{bandwidth:d.initialBandwidth}),{},{liveRangeSafeTimeDelta:ve,useDevicePixelRatio:!0,experimentalLLHLS:(null==d?void 0:d.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==d||!d.initialBandwidth},(null==d||null===(G=d.customData)||void 0===G?void 0:G.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(W=null==d?void 0:d.enableLowInitialPlaylist)&&void 0!==W&&W}),debug:(null==d?void 0:d.debugConfig)&&(null==d||null===(K=d.debugConfig)||void 0===K?void 0:K.enable)||!1,nativeTextTracks:"Safari"==e.detectBrowser()},0==(null==d||null===(Y=d.customData)||void 0===Y?void 0:Y.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==d||null===(J=d.customData)||void 0===J?void 0:J.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(z,"poster",re),n(z,"techOrder",ie),n(z,"chromecast",{requestCustomDataFn:function(e){var n,t,o=s.getPlayer(l),i=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),r=function(e,n,t){var o,i,l,r,a,u,s,d,c,v,p=(null==e?void 0:e.contentType)||"video",m={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){var f,g,h,y,b,w,k,S;m.isDrmEnabled=!0;var I=(null==n||null===(f=n.keySystems)||void 0===f?void 0:f["com.widevine.alpha"])||null,E=(null==I?void 0:I.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);m.licenseUrl=E;var T=(null==I?void 0:I.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"]);m.licenseToken=T}var D=(null==e||null===(o=e[p])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";m.contentType=D;var C=null==e||null===(l=e[p])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;m.duration=C;var O=null==e||null===(a=e[p])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;m.mediaTitle=O;var P=null==e||null===(s=e[p])||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.videoImageUrl;return m.mediaImage=P,m.subTitles=t,m.DVR=(null==e||null===(c=e[p])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(m),m}($,e,i);return De(De({},r),{},{convivaMetaData:De({customerKey:(null==d||null===(n=d.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==d||null===(t=d.convivaConfig)||void 0===t?void 0:t.debug)||!1},ne.getData())})},modifyLoadRequestFn:function(e){var n,t,o,i,r,a=s.getPlayer(l),u=(null==a?void 0:a.currentSource())||{};!(null===(n=$)||void 0===n||null===(t=n[le])||void 0===t||null===(o=t.streamingInfo)||void 0===o||null===(i=o.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(r=u.src)&&void 0!==r&&r.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),z);if(!i.getPlayers()[l]){null!=d&&d.debugConfig&&null!=d&&null!==(X=d.debugConfig)&&void 0!==X&&X.enable&&i.log.level("debug");var fe=i(l,me,function(){var n=t(o.mark(function n(){var t,a,u,s,v,p,m,f,g,h,y,b,w,k,S,E,T,D,C,O,P;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(fe),console.log(i.VERSION),console.log(i.getPlugins()),n.next=5,R(d,$);case 5:if(w=null===(t=$)||void 0===t||null===(a=t[le])||void 0===a||null===(u=a.liveDetails)||void 0===u?void 0:u.startOverTime,ue&&c.resolve(De({status:!0,msg:"Player Initialised"},oe?{seriesResponse:oe,response:$}:{response:$})),ae&&null!=d&&null!==(s=d.dvrConfig)&&void 0!==s&&s.enable&&Ie(l,De(De({},d),{},{isDvrEnabled:ae})),e.inititateBeacon(l,null==d?void 0:d.analyticsCb,null==d?void 0:d.analyticsEventParams),ee(l,d),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),ae&&I(l,w),!se||null!=d&&null!==(v=d.customData)&&void 0!==v&&v.disableAds||e.initialiseAdvertisement(l,se,$),k=e.getSource($,l),console.log(k),null!=d&&d.nearestClusterUrl&&(k=e.getUpdatedClusterSource(k,d.nearestClusterUrl)),!ce){n.next=21;break}return n.next=20,e.getSGAIEnabledSource(l,$);case 20:k=n.sent;case 21:k?e.loadVideo(l,k):(c.reject({status:!1,msg:"Incompatible / Missing Source",response:$}),e.handleError(l,"Incompatible / Missing Source")),((null===(p=$)||void 0===p||null===(m=p[le])||void 0===m||null===(f=m.contentDetails)||void 0===f||null===(g=f.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(h=$)||void 0===h||null===(y=h[le])||void 0===y||null===(b=y.closedCaptions)||void 0===b?void 0:b.length)>0)&&(P=(null===(E=$)||void 0===E||null===(T=E[le])||void 0===T||null===(D=T.contentDetails)||void 0===D?void 0:D.closedCaptions)||(null===(C=$)||void 0===C||null===(O=C[le])||void 0===O?void 0:O.closedCaptions),S=P.filter(function(e){return"VTT"===e.format||"WEBVTT"===e.format}),r.addCaptions(l,S)),null!=d&&d.disableControls?e.disableControls(l):te(l,De(De(De({},d),me),{},{liveVideo:ue,isDvrEnabled:ae,res:$,sres:oe})),be(l,De(De(De({},d),me),{},{liveVideo:ue}),c,{res:$,sres:oe});case 25:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}};function Oe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Pe(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Oe(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var je,xe=function(e,n){var t=n.resolve,o=n.reject,i=null==e?void 0:e.playerId,l=Le(e);Ce(i,{res:l},e,{resolve:t,reject:o})},Le=function(n){var t,o,i,l,r,a,u,s,d,c,v,p,m,g=null==n?void 0:n.streamingInfo,h=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,y=(null==n||null===(o=n.streamingInfo)||void 0===o?void 0:o.isDrmEnabled)||null,b=(null==n||null===(i=n.streamingInfo)||void 0===i||null===(l=i.ads)||void 0===l?void 0:l.url)||null,w=(null==n||null===(r=n.streamingInfo)||void 0===r?void 0:r.posterUrl)||null,k=(null==n||null===(a=n.streamingInfo)||void 0===a?void 0:a.subtitles)||[],S=(null==n||null===(u=n.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,I=(null==n||null===(d=n.streamingInfo)||void 0===d?void 0:d.macroMap)||[],E=(null==n||null===(c=n.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.isSSAIEnabled)||!1,T=null==n?void 0:n.token,D=e.getDecodedToken(T);null==D||D.site;var C=null==D?void 0:D.siteId,O=(null==n||null===(p=n.customData)||void 0===p||null===(m=p.comscore)||void 0===m?void 0:m.video)||null,P=Pe(Pe({id:"".concat(C,"_external")},!y&&{directPlaybackUrl:null==h?void 0:h.url}),{},{video:Pe(Pe(Pe(Pe(Pe({drmEnabled:y,streamingInfo:Pe(Pe({videoAssets:Pe(Pe({},S&&{drmProvider:S}),{},{widevine:null==h?void 0:h.widevine,fairPlay:null==h?void 0:h.fairPlay,playReady:null==h?void 0:h.playReady})},(null==g?void 0:g.isDvrEnabled)&&{isLiveStream:!0}),(null==O?void 0:O.isLiveStream)&&{isLiveStream:null==O?void 0:O.isLiveStream})},E&&{isSSAIEnabled:E}),{},{metadata:I,liveDetails:{isDvrEnabled:null==g?void 0:g.isDvrEnabled},gist:Pe(Pe(Pe({},w&&{videoImageUrl:w}),(null==O?void 0:O.videoId)&&{id:null==O?void 0:O.videoId}),(null==O?void 0:O.videoTitle)&&{title:null==O?void 0:O.videoTitle}),contentDetails:Pe({},(null==k?void 0:k.length)>0&&{closedCaptions:f(k)})},(null==O?void 0:O.runtime)&&{runtime:null==O?void 0:O.runtime}),(null==O?void 0:O.publishDate)&&{publishDate:null==O?void 0:O.publishDate}),(null==O?void 0:O.platform)&&{platform:null==O?void 0:O.platform}),(null==O?void 0:O.series)&&{series:null==O?void 0:O.series}),ads:{preRoll:{adTags:{web:Pe(Pe({},b&&{active:!0}),b&&{url:b})}}}});return O&&(null!=O&&O.isDvrEnabled&&(P.video.liveDetails=Pe(Pe({},P.video.liveDetails),{},{isDvrEnabled:null==O?void 0:O.isDvrEnabled})),null!=O&&O.metadata&&(P.video.metadata=[].concat(f(P.video.metadata),f(null==O?void 0:O.metadata)))),P},Ae=null,Ne=function(e,n){(new Date).getMonth(),new Date(n).getMonth(),(new Date).getFullYear(),new Date(n).getFullYear();var t=Math.floor(e/6048e5),o=function(e,n){var t;return t=12*(n.getFullYear()-e.getFullYear()),t-=e.getMonth(),(t+=n.getMonth())<=0?0:t}(new Date,new Date(n)),i=o>0&&t>4?o:0,l=function(e,n){var t=new Date(n).getFullYear()-new Date(e).getFullYear(),o=new Date(n).getMonth()-new Date(e).getMonth();return new Date(n).getDay()-new Date(e).getDay()<0&&(o-=1),o<0&&(t-=1),t}(new Date,new Date(n));return[l>0&&i>0?l:0,i,t,Math.floor(e/864e5),Math.floor(e%864e5/36e5),Math.floor(e%36e5/6e4),Math.floor(e%6e4/1e3)]},Re=function(e){var n,t=g(e,8),o=t[0],i=t[1],l=t[2],r=t[3],a=t[4],u=t[5],s=t[6],d=t[7];n=o>=1?" ".concat(o," Year"):i>=1?" ".concat(i," month"):l>=1?" ".concat(l," week"):r>=1?" ".concat(r," day"):a<24&&a>=12?" ".concat(a," hour"):a>0?"".concat(a," hours ").concat(u," minutes ").concat(s," seconds"):u>0?"".concat(u," minutes ").concat(s," seconds"):"".concat(s," seconds"),d.textContent="".concat(n)},Me=(je={scheduleStartTimeMs:0,scheduleEndTimeMs:0},{get:function(){return je},set:function(e){je={scheduleStartTimeMs:null==e?void 0:e.startDateTime,scheduleEndTimeMs:null==e?void 0:e.endDateTime}}});function Be(e,n,t,o){if(e){var i=function(){var e,i,r=null===(e=Me.get())||void 0===e?void 0:e.scheduleStartTimeMs,a=null===(i=Me.get())||void 0===i?void 0:i.scheduleEndTimeMs,u=Date.now();if(u-a>0){var s=document.getElementsByClassName("error-message")[0];return s&&(s.textContent=d.getLocalisation("eventEnded")||"Game has ended",o.textContent=""),clearInterval(l),void(null==t||t())}var c=r-u;if(c/1e3<=0)return clearInterval(l),null==n||n([0,0,0,0,0,0,0,o]),void(null==t||t());var v=Ne(c,r);null==n||n([].concat(f(v),[o]))};i();var l=setInterval(i,1e3);return l}}var Ve=function(e,n,t){var o,i,l,r,a,u,s,c,v=null==n||null===(o=n.response)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.errorCode,p=(null==n||null===(l=n.response)||void 0===l||null===(r=l.data)||void 0===r?void 0:r.errorMessage)||(null==n?void 0:n.message)||null;Me.set({startDateTime:null==n||null===(a=n.response)||void 0===a||null===(u=a.data)||void 0===u?void 0:u.scheduleStartDate,endDateTime:null==n||null===(s=n.response)||void 0===s||null===(c=s.data)||void 0===c?void 0:c.scheduleEndDate}),function(e,n,t,o){var i,l,r=Date.now(),a=null===(i=Me.get())||void 0===i?void 0:i.scheduleStartTimeMs,u=null===(l=Me.get())||void 0===l?void 0:l.scheduleEndTimeMs,s=function(e,n,t,o){var i;e<0?i=d.getLocalisation("eventNotStarted")||o||"Game starts in":(n>0||"VIDEO_NOT_EXISTS"==t)&&(i=d.getLocalisation("eventEnded")||o||"Game has ended");return i||o}(r-a,r-u,n,t);if(document.getElementsByClassName("error-container")[0]){var c=document.getElementsByClassName("error-message")[0];c&&(c.textContent="".concat(s));var v=document.getElementsByClassName("error-timer-message")[0];v&&Be(Math.abs(a),Re,o,v)}else{var p=document.getElementById(e).parentElement;if(p){var m=document.createElement("div");m.className="error-container";var f=document.createElement("div");f.className="error-message";var g=document.createElement("div");g.className="error-timer-message",f.textContent="".concat(s),m.appendChild(f),m.appendChild(g),p.append(m),Be(Math.abs(a),Re,o,g)}}}(e,v,p,t)};function _e(n,t){var o=t.scheduleEndDate,i=t.scheduleStartDate;Me.set({startDateTime:i,endDateTime:o}),Ae&&clearInterval(Ae),Ae=setInterval(function(){var t,o=Date.now(),i=null===(t=Me.get())||void 0===t?void 0:t.scheduleEndTimeMs;if(console.log("scheduleEndTimeMs",i),i&&o>i){var l;console.log("Game ended");var r=s.getPlayer(n);if(e.isPlayerInitialised(n)&&r){var a;r.dispose(),console.log("Player disposed");var u=null===(a=document.getElementsByClassName("vl-container"))||void 0===a?void 0:a[0],c=document.createElement("video");c.id=n,c.className="video-js",c.style.width="100%",c.style.height="100%",u&&u.appendChild(c)}var v=d.getLocalisation("eventEnded")||"Game has ended",p=null===(l=document.getElementsByClassName("error-container"))||void 0===l?void 0:l[0];if(p){var m=p.querySelector(".error-message");m&&(m.textContent=v)}else{var f=document.getElementById(n),g=null==f?void 0:f.parentElement;if(g){(p=document.createElement("div")).className="error-container";var h=document.createElement("div");h.className="error-message",h.textContent=v,p.appendChild(h),g.append(p)}}clearInterval(Ae)}},1e3)}function He(e,n){return Ue.apply(this,arguments)}function Ue(){return(Ue=t(o.mark(function n(t,i){var l,r,a,u,s,d,v,p,m;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=i.resolve,u=i.reject,s=null==t?void 0:t.videoId,d=null==t?void 0:t.playerId,v=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:p=n.sent,m=!1===(null==t||null===(l=t.customData)||void 0===l||null===(r=l.ads)||void 0===r?void 0:r.isSSAIEnabled),e.getVideoDetails(s,p,m).then(function(n){var o,i,l,r,m,f,g,h,y,b;window.contentType=null==n||null===(o=n.data)||void 0===o||null===(i=o.video)||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.contentType,c.setCurrentVideo(null==n?void 0:n.data);var w=null==n||null===(r=n.data)||void 0===r||null===(m=r.video)||void 0===m||null===(f=m.gist)||void 0===f?void 0:f.scheduleEndDate,k=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;_e(d,{scheduleEndDate:w,scheduleStartDate:k});var S,I=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(b=t.watchHistory)&&void 0!==b&&b.enable&&!v)if((null===(S=t.watchHistory)||void 0===S?void 0:S.saveOffline)||!1){var E,T,D,C=ce((null===(E=t.watchHistory)||void 0===E?void 0:E.profileId)||"",s,null==t?void 0:t.siteOwner);if(C&&C.length)t.watchHistoryResumeTime=(null===(T=C[0])||void 0===T?void 0:T.watchedTime)||null,t.watchedPercentage=(null===(D=C[0])||void 0===D?void 0:D.watchedPercentage)||null;I.contentType="video",Ce(d,{res:I},t,{resolve:a,reject:u})}else e.getVideoInfo(s,p).then(function(e){var n,o,i,l,r,a;null!==(n=window)&&void 0!==n&&null!==(o=n.watchHistory)&&void 0!==o&&o.cb&&(null===(i=window)||void 0===i||null===(l=i.watchHistory)||void 0===l||l.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,I.contentType="video"}).catch(function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))}).finally(function(){Ce(d,{res:I},t,{resolve:a,reject:u})});else Ce(d,{res:I},t,{resolve:a,reject:u})}).catch(function(n){var o,i,l=(null==t||null===(o=t.event)||void 0===o?void 0:o.showScheduleTimer)||!1,r=(null==t||null===(i=t.event)||void 0===i?void 0:i.onCountdownComplete)||null;l&&Ve(d,n,r),e.initiateErrorHandling(n,d,u,s)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function qe(e,n){return Fe.apply(this,arguments)}function Fe(){return(Fe=t(o.mark(function n(t,i){var l,r,a,u,s,d,c,v;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=i.resolve,u=i.reject,n.next=3,e.getToken();case 3:s=n.sent,d=null==t?void 0:t.playerId,c=null==t?void 0:t.epg,v=!1===(null==t||null===(l=t.customData)||void 0===l||null===(r=l.ads)||void 0===r?void 0:r.isSSAIEnabled),e.getLinearChannelDetails(c,s,v).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==c?void 0:c.channelId,Ce(d,{res:n},t,{resolve:a,reject:u})}).catch(function(n){e.initiateErrorHandling(n,d,u,videoId)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ge(e,n){return We.apply(this,arguments)}function We(){return(We=t(o.mark(function n(t,i){var l,r,a,u,s,d,v;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=i.resolve,a=i.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,d=sessionStorage.getItem("season-idx")||0,c.seasonIdxManager.set(parseInt(d)),v=null==t||null===(l=t.series)||void 0===l?void 0:l.id,e.getSeriesDetails(v,u).then(function(n){var o,i,l,d=n.data,p=n.data.seasons;c.setCurrentSeries(p);var m=videoId||(null==p||null===(o=p[0])||void 0===o||null===(i=o.episodes)||void 0===i||null===(l=i[0])||void 0===l?void 0:l.id);e.createSeriesWatchMap(v,u),e.getVideoDetails(m,u).then(function(e){var n,o,i;window.contentType=null==e||null===(n=e.data)||void 0===n||null===(o=n.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType,c.setCurrentVideo(e.data),Ce(s,{res:null==e?void 0:e.data,sres:d},t,{resolve:r,reject:a})}).catch(function(n){e.initiateErrorHandling(n,s,a,videoId)})}).catch(function(n){e.initiateErrorHandling(n,s,a)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}var Ke,Ye=function(n){var t=n.site,o=n.sseBaseUrl,i=n.sseEndpoint;return h.createSSETransport({site:t,sseBaseUrl:o,getToken:e.getToken,sseEndpoint:i,onOpen:function(e){var n=e.userId,t=e.endpoint;console.log("SSE Connected:",n,t)},onMessage:function(e){var n,t,o,i,l,r,a,u,s;if(console.log("SSE Message:",e),(null===(n=c.getCurrentVideo())||void 0===n||null===(t=n.video)||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.id)===(null==e?void 0:e.id)&&"GAME_STATE_CHANGE"===(null==e?void 0:e.notificationType)){var d=1e3*(null==e||null===(i=e.payload)||void 0===i||null===(l=i.states)||void 0===l||null===(r=l.live)||void 0===r?void 0:r.startDateTime),v=1e3*(null==e||null===(a=e.payload)||void 0===a||null===(u=a.states)||void 0===u||null===(s=u.end)||void 0===s?void 0:s.endDateTime);d&&v&&(console.log("Setting schedule timer",d,v),Me.set({startDateTime:d,endDateTime:v}))}},onReconnectAttempt:function(e){console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){console.error("SSE Error:",e,n)},onClose:function(){console.log("SSE Closed")}})},Je=function(e){var n=e.enable,t=e.site,o=e.sseBaseUrl,i=e.sseEndpoint;if(n){var l=Ye({site:t,sseBaseUrl:o,sseEndpoint:i});return l._sseBaseUrl=o,l._site=t,l._sseEndpoint=i,l}};function ze(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Xe(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ze(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}exports.VLPlayerCore=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:l.onTimeUpdate,getVideoDuration:l.getVideoDuration,onVideoEnded:l.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var i=t(o.mark(function t(i,l){var r,a,s,c,v,p,m,f,g,h,b,w,k,S,I,E,T,D,C,O,P,j,L,A,N,R,M,B,V,_;return o.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=2;break}return t.abrupt("return");case 2:if(T=(null==n?void 0:n.videoSourceUrl)||!1,D=null==n?void 0:n.asat,C=(null==n||null===(r=n.epg)||void 0===r?void 0:r.enable)||!1,O=null==n?void 0:n.videoId,P=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,j=(null==n?void 0:n.streamingInfo)||!1,window.videoId=O,L=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=17;break}if(sessionStorage.setItem("vlp_token",L),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),L&&!e.isTokenExpired(L)){t.next=16;break}return l({status:!1,msg:"".concat(L?"Token is expired !":"Missing Authorization Token"),response:{token:L}}),t.abrupt("return");case 16:Ke=JSON.parse(atob(L.split(".")[1]));case 17:return window.siteName=null===(s=Ke)||void 0===s?void 0:s.site,window.siteId=null===(c=Ke)||void 0===c?void 0:c.siteId,n.isAnonymousUser=!(null===(v=Ke)||void 0===v||!v.anonymousId),n.siteOwner=(null===(p=Ke)||void 0===p?void 0:p.site)||null,n.userId=(null===(m=Ke)||void 0===m?void 0:m.userId)||null,window.sessionStorage.setItem("uid",null===(f=Ke)||void 0===f?void 0:f.userId),window.watchHistory=n.watchHistory||null,A=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(g=n.series)&&void 0!==g&&g.enable?null:null==n?void 0:n.chromecastReceiverId,N=(null==n||null===(h=n.analytics)||void 0===h?void 0:h.gaId)||null,(R=null==n?void 0:n.errors)&&(window.customErrors=R),window.customData=null==n?void 0:n.customData,d.setLocalisation(null==n||null===(b=n.customData)||void 0===b?void 0:b.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!u.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),t.next=35,x(n);case 35:N&&y("https://www.googletagmanager.com/gtag/js?id=".concat(N)).then(function(){return e.runGtag(N)}).catch(function(e){}),(M=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(A)))&&M.addEventListener("contextmenu",function(e){return e.preventDefault()}),(B=Je({enable:null==n||null===(k=n.sse)||void 0===k?void 0:k.enable,site:null==n||null===(S=n.sse)||void 0===S?void 0:S.siteName,sseBaseUrl:null==n||null===(I=n.sse)||void 0===I?void 0:I.sseBaseUrl,sseEndpoint:null==n||null===(E=n.sse)||void 0===E?void 0:E.sseEndpoint}))&&!B.isConnectionActive()&&B.connect(),T?(_={directPlaybackUrl:T,id:V="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},D?e.getVideoDetails(V,L).then(function(e){var t=(null==e?void 0:e.data)||{};Ce(A,{res:Xe(Xe({},t),_)},n,{resolve:i,reject:l})}).catch(function(n){e.initiateErrorHandling(n,A,l,V)}):Ce(A,{res:_},n,{resolve:i,reject:l})):j?xe(n,{resolve:i,reject:l}):P?Ge(n,{resolve:i,reject:l}):C?qe(n,{resolve:i,reject:l}):He(n,{resolve:i,reject:l});case 41:case"end":return t.stop()}},t)}));return function(e,n){return i.apply(this,arguments)}}())},getRenditions:a.getRenditions,skip:e.skip,getPlayer:s.getPlayer,play:e.play,pause:e.pause,detectBrowser:e.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:l.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:r.enableCaptions,disableCaptions:r.disableCaptions,getCaptions:r.getCaptions,playSelectedResolution:a.playSelectedResolution,getSource:e.getSource,setVolume:w,getVolume:k,disableControls:e.disableControls,setPlaybackSpeed:l.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,adsQueuePointManager:e.adsQueuePointManager,getSsaiEvents:e.getSsaiEvents,playerEvents:l.playerEvents,onReplay:l.onReplay,isBehindLive:e.isBehindLive}},exports.initiateMarker=function(e){var n=s.getPlayer(e),t=n.seekable(),o=n.controlBar.progressControl.seekBar.el();if(t&&t.length>0){var i=t.start(0),l=t.end(t.length-1)-i;ke(),Se(l).forEach(function(e){var n=e.id,t=e.title,i=e.time,r=we(n,t,Math.min(i/l*100,99.5));o.appendChild(r)})}},exports.removeMarkers=ke;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,t,n,r,i=require("@babel/runtime/helpers/toConsumableArray"),o=require("./skin-3544db58.js"),a=require("./generic-f723dacd.js"),l=require("./autoNextVideo-7c491841.js"),u=require("@babel/runtime/helpers/typeof"),s=require("video.js"),c=require("@babel/runtime/helpers/asyncToGenerator"),d=require("@babel/runtime/regenerator"),p=require("@babel/runtime/helpers/defineProperty"),v=require("@babel/runtime/helpers/slicedToArray"),m=[],f=function(e,t){var n=o.getPlayer(e),r=Math.floor(n.currentTime());if(Math.floor(n.duration())!=r){n.pause(e);var i=a.getVideoIdx();l.switchToNext(i,e,m)}};function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}e={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},t=function e(){var t,n,r,i,o;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(o in i=t[r])i.hasOwnProperty(o)&&("object"===u(i[o])?n[o]=e(n[o],i[o]):n[o]=i[o]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},r=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},s.registerPlugin("thumbnails",function(i){var o,a,l,u,s,c,d,p;function v(){document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",v),p()}a=t({},e,i),u=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=u.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(o=document.createElement("div")).className="vjs-thumbnail-holder",l=document.createElement("img"),o.appendChild(l),l.src=a[0].src,l.className="vjs-thumbnail",t(l.style,a[0].style),l.style.left||l.style.right||(l.onload=function(){l.style.left=-l.naturalWidth/2+"px"}),c=u.duration(),u.on("durationchange",function(e){c=u.duration()}),u.on("loadedmetadata",function(e){c=u.duration()}),(s=u.controlBar.progressControl).el().appendChild(o),d=function(e){var i,u,d,p,v,m,f,g,h,b;for(u in d=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((b=r(s.el()).getBoundingClientRect()).width||b.right)+h,m=e.pageX,e.changedTouches&&(m=e.changedTouches[0].pageX),p=m||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,p-=r(s.el()).getBoundingClientRect().left+h,i=Math.floor((p-s.el().offsetLeft)/s.width()*c),a)i>u&&(d=Math.max(d,u));(v=a[d]).src&&l.src!=v.src&&(l.src=v.src),v.style&&l.style!=v.style&&t(l.style,v.style),p+(g=function(e,t){var r;return t?parseFloat(t):"auto"!==(r=n(e)("clip"))&&"inherit"!==r&&4===(r=r.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(r[1])-parseFloat(r[3]):0}(l,v.width||a[0].width)/2)>f?p-=p+g-f:p<g&&(p=g),o.style.left=p+"px"},s.on("mousemove",d),s.on("touchmove",d),s.on("pointerdown",function(e){document.addEventListener("pointermove",d),document.addEventListener("pointerup",v)}),p=function(e){o.style.left="-1000px"},s.on("mouseout",p),s.on("touchcancel",p),s.on("touchend",p),u.on("userinactive",p)});var b="my-player";function y(e){var t=e.split("\n"),n=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))}),n.push(r)}}),n}function x(){return(x=c(d.mark(function e(t){var n,r,i,o,a,l,u,s,c,p,m,f,g,h,b,y,x,w,E,A,N,k,j,C;return d.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return r=e.sent,e.next=11,createImageBitmap(r);case 11:for(i=e.sent,o=t.layout.split("x").map(Number),a=v(o,2),l=a[0],u=a[1],s=i.width/u,c=i.height/l,p=[],m=0;m<l;m++)for(f=0;f<u;f++)(g=document.createElement("canvas")).width=s,g.height=c,g.getContext("2d").drawImage(i,f*s,m*c,s,c,0,0,s,c),h=g.toDataURL("image/png"),p.push({uri:h,duration:t.duration}),t._tiles=p;return e.abrupt("return",p);case 20:for(e.prev=20,e.t0=e.catch(2),b=t.layout.split("x").map(Number),y=v(b,2),x=y[0],w=y[1],E=[],A=0;A<x*w;A++)E.push({uri:null===(N=window)||void 0===N||null===(k=N.app_data)||void 0===k||null===(j=k.appcmsMain)||void 0===j||null===(C=j.images)||void 0===C?void 0:C.placeholderCover,duration:t.duration});return e.abrupt("return",E);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function w(e,t){return E.apply(this,arguments)}function E(){return(E=c(d.mark(function e(t,n){var r,i;return d.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return b=n,e.prev=1,e.next=4,fetch(t);case 4:return r=e.sent,e.next=7,r.text();case 7:return i=e.sent,e.abrupt("return",y(i));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function A(e,t,n){var r=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),i=o.getPlayer(b);if(r&&i){var a=r.getBoundingClientRect(),l=(e.clientX-a.left)/a.width,u=function(e,t){var n,r;if(!t||0===t.length)return null;var i=0,o=t.length-1;for(;i<=o;){var a=Math.floor((i+o)/2),l=t[a];if(l===e)return l;l<e?i=a+1:o=a-1}var u=null!==(n=t[i])&&void 0!==n?n:1/0,s=null!==(r=t[o])&&void 0!==r?r:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(l*i.duration()),n),s=t[u];s&&!s.loading&&(s.loading=!0,function(e){return x.apply(this,arguments)}(s).then(function(e){var t=e[s.tileIndex],n=document.querySelector(".vjs-thumbnail-holder img");n&&t.uri&&(n.src=t.uri),s.loading=!1,s.src=t.uri}))}}function N(e){return k.apply(this,arguments)}function k(){return(k=c(d.mark(function e(t){var n,r,i,a;return d.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={},t.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),i=v(r,2),o=i[0]*i[1],a=e.duration,l=0;l<o;l++){var u,s=Math.round((t*o+l)*a);n[s]=h(h({},e),{},{duration:e.duration,tileIndex:l,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},p(u,"left","-60px"),p(u,"border","1px solid transparent"),p(u,"borderRadius","4px"),u)})}}),r=Object.keys(n).map(Number).sort(function(e,t){return e-t}),null==(i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||i.addEventListener("mousemove",o.throttle(function(e){return A(e,n,r)},500)),null==(a=document.querySelector(".vjs-progress-control.vjs-control"))||a.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",o.throttle(function(e){return A(e,n,r)},500))}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var j=function(){var e=c(d.mark(function e(t,n){var r,i,o,a;return d.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:return i=e.sent,o=i.split("\n"),a=[],o.forEach(function(e,n){e=e.trim();var r={resolution:null,duration:null,uri:null,layout:null};n>0&&o[n-1].includes("#EXT-X-TILES")&&(o[n-1]=o[n-1].split(","),r.uri=t+e,o[n-1].forEach(function(e){(e.includes(":")?e.split(":")[1]:e).split(",").forEach(function(e){var t=e.split("="),n=v(t,2),i=n[0],o=n[1];i=i.toLowerCase(),r[i]=o})}),a.push(r))}),e.abrupt("return",a);case 10:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}();function C(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function T(e,t){return I.apply(this,arguments)}function I(){return(I=c(d.mark(function e(t,n){var r,i,l,u,s,c,p,m,f,g,h,y,x,w,E,A,N,k,j,T,I,B,L,S,M,R,q,D,$,X,U,V,F,_,G,z,H,W,Q,Y,J,K,Z,ee,te,ne,re,ie,oe,ae,le,ue,se,ce,de,pe,ve,me;return d.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return b=n,r=o.getPlayer(n),i=t.split("/"),l=i.findIndex(function(e){return"dash"===e.toLowerCase()}),u=C(-1!==l?i.slice(0,l+1).join("/"):new URL(t).origin),e.prev=5,e.next=8,fetch(t);case 8:return m=e.sent,e.next=11,m.text();case 11:f=e.sent,g=new DOMParser,h=g.parseFromString(f,"application/xml"),y=(null==r?void 0:r.duration())||(null===(s=a.getCurrentVideo())||void 0===s||null===(c=s.video)||void 0===c?void 0:c.runtime),x=(null==h||null===(p=h.querySelector("MPD > BaseURL"))||void 0===p?void 0:p.textContent)||u+"/",w=h.getElementsByTagName("AdaptationSet"),E=0;case 18:if(!(E<w.length)){e.next=72;break}if(("image"!==(A=w[E]).getAttribute("contentType")||"image/png"!==A.getAttribute("mimeType"))&&"image/jpeg"!==A.getAttribute("mimeType")){e.next=69;break}if(k=A.getElementsByTagName("SegmentTemplate")[0],j=null===(N=k.getElementsByTagName("SegmentTimeline"))||void 0===N?void 0:N[0],!k||!j){e.next=48;break}if(B=j.getElementsByTagName("S"),L=parseInt(null===(T=B[0])||void 0===T?void 0:T.getAttribute("t")),S=parseInt(null===(I=B[0])||void 0===I?void 0:I.getAttribute("d")),M=A.getElementsByTagName("Representation")[0],R=M.getElementsByTagName("EssentialProperty")[0],q=R.getAttribute("value"),D=null==q?void 0:q.split("x"),$=v(D,2),X=$[0],U=$[1],!k){e.next=46;break}if(k.getAttribute("media"),V=k.getAttribute("timescale"),F=(V?S/V:S)/(X*U),_=M.getAttribute("id"),G=Math.round(y/F),z=Math.ceil(G/(X*U)),H=k.getAttribute("media"),parseInt(k.getAttribute("startNumber")),!isNaN(parseInt(z))){e.next=43;break}return e.abrupt("return");case 43:for(W=[],E=0;E<z;E++)Y="/"==(Q=H)[0]?new URL(u).origin:u+"/",W.push({duration:F,layout:q,uri:Y+Q.replace("$Time$",L+E*S).replace("$RepresentationID$",_)});return e.abrupt("return",W);case 46:e.next=69;break;case 48:if(J=A.getElementsByTagName("Representation")[0],K=J.getElementsByTagName("EssentialProperty")[0],Z=K.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=v(ee,2),ne=te[0],re=te[1],!k){e.next=69;break}if(k.getAttribute("media"),ie=k.getAttribute("duration"),oe=k.getAttribute("timescale"),ae=(oe?ie/oe:ie)/(ne*re),le=J.getAttribute("id"),ue=Math.round(y/ae),se=Math.ceil(ue/(ne*re)),ce=k.getAttribute("media"),de=parseInt(k.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],ve=P(ce),E=0;E<se;E++)me=ve?O(ve,E+de):ce,pe.push({duration:ae,layout:Z,uri:x+me.replace("$Number$",E+de).replace("$RepresentationID$",le)});return e.abrupt("return",pe);case 69:E++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function P(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function O(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function B(){return(B=c(d.mark(function e(t){var n,r,i,a,l,u,s,c,p,v,m,f,g,h,b,y;return d.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=o.getPlayer(t),s=u.currentSource(),c=s.src,c=null!==(n=c)&&void 0!==n&&n.includes("blob")?null===(r=window)||void 0===r||null===(i=r.player)||void 0===i?void 0:i.getSource():c,null===(a=c)||void 0===a||!a.includes("m3u8")){e.next=19;break}return e.next=6,w(c,t);case 6:if(!((null==(p=e.sent)?void 0:p.length)>0)){e.next=17;break}return v=(null==p?void 0:p[0])||null,m=v.uri,f=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,j(f,m);case 12:return g=e.sent,e.next=15,N(g);case 15:h=e.sent,u.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(l=c)||void 0===l||!l.includes("mpd")){e.next=28;break}return e.next=22,T(c,t);case 22:if(!((null==(b=e.sent)?void 0:b.length)>0)){e.next=28;break}return e.next=26,N(b);case 26:y=e.sent,u.thumbnails(y);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}exports.addNextEpPreview=function(e,t){var n;if(null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var r;m=[];var l=a.getCurrentSeries();null==l||l.map(function(e){var t;return(t=m).push.apply(t,i(e.episodes))}),null==t||null===(r=t.series)||void 0===r||r.cb}else{var u,s;m=(null==t||null===(u=t.relatedVideos)||void 0===u?void 0:u.content)||[],null==t||null===(s=t.relatedVideos)||void 0===s||s.cb}var c=o.getPlayer(e);c.on("timeupdate",function(){var e,t,n=Math.floor(c.currentTime()),r=c.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];r-n<=10&&a.getVideoIdx()<=(null===(t=m)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")});var d,p=m.filter(function(e,t){return t==a.getVideoIdx()});if((null==p?void 0:p.length)>0)if(null!==(d=document.getElementsByClassName("next-ep-preview"))&&void 0!==d&&d[0]){var v,g,h,b,y,x,w,E,A,N,k,j;(null===(v=document.getElementsByClassName("next-ep-preview"))||void 0===v?void 0:v[0]).style.visibility="hidden";var C=null===(g=document.getElementsByClassName("next-ep-title"))||void 0===g?void 0:g[0],T=null===(h=document.getElementsByClassName("next-ep-img"))||void 0===h?void 0:h[0],I=null===(b=document.getElementsByClassName("next-ep-content"))||void 0===b?void 0:b[0],P=null===(y=p[0])||void 0===y?void 0:y.title;(null===(x=P)||void 0===x?void 0:x.length)>60&&(P=P.substr(0,60)+"..."),C.textContent="".concat(P),T.src=(null===(w=p[0])||void 0===w||null===(E=w.gist)||void 0===E||null===(A=E.imageGist)||void 0===A?void 0:A.r16x9)||(null==p||null===(N=p[0])||void 0===N?void 0:N.img)||(null===(k=window)||void 0===k||null===(j=k.customData)||void 0===j?void 0:j.fallbackImage),I.onclick=function(){return f(e)}}else{var O,B,L,S,M,R,q,D,$=document.createElement("div");$.className="next-ep-preview",$.style.visibility="hidden",document.getElementById(e).append($);var X=document.createElement("div");X.className="next-ep-header",X.textContent="Next up";var U=null===(O=p[0])||void 0===O?void 0:O.title,V=document.createElement("img");V.className="next-ep-img",V.src=(null===(B=p[0])||void 0===B||null===(L=B.gist)||void 0===L||null===(S=L.imageGist)||void 0===S?void 0:S.r16x9)||(null==p||null===(M=p[0])||void 0===M?void 0:M.img)||(null===(R=window)||void 0===R||null===(q=R.customData)||void 0===q?void 0:q.fallbackImage);var F=document.createElement("div");F.className="next-ep-title",(null===(D=U)||void 0===D?void 0:D.length)>60&&(U=U.substr(0,60)+"..."),F.textContent="".concat(U);var _=document.createElement("div");_.className="next-ep-content",_.append(V),_.append(F),_.onclick=function(){return f(e)},$.append(X),$.append(_)}},exports.addTVProviderImage=function(e,t){var n=o.getPlayer(e),r=null==t?void 0:t.tvProviderLogoUrl;if(r){var i=document.createElement("div");i.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(r),a.alt="Provider Image",i.append(a),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"})}},exports.initiateTrickplay=function(e){return B.apply(this,arguments)};
|
package/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css"),require("./generic-939a3e97.js"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js");var e=require("./index-
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css"),require("./generic-939a3e97.js"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js");var e=require("./index-73a1b75f.js");require("./util-4769ed5b.js"),require("./captions-68e263dd.js"),require("./resolution-9c4872ec.js"),require("./skin-eeec7a85.js"),require("./localisation-56e0a999.js"),require("./player_instance-fcf6a8fb.js"),require("axios"),require("md5"),require("js-cookie"),require("./currentVideoInfo-5802821b.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./icons-2609dbe4.js"),require("./helper-dbf2fb22.js"),require("@viewlift/sse"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),module.exports=e.VLPlayerCore;
|
|
@@ -0,0 +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"),o=require("./icons-1a3febef.js"),i=require("./generic-f723dacd.js"),l=require("./skin-3544db58.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-77c57718.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-07bd3069.js"),require("@babel/runtime/helpers/toConsumableArray");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(o.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(o.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(o.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",i.load(t.playerId,t.streams[e].id).then(function(e){i.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;
|