@viewlift/player-backup 2.0.145-backup → 2.0.147-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.
Files changed (50) hide show
  1. package/cjs/{autoNextVideo-0e83cb28.js → autoNextVideo-783f4c34.js} +1 -1
  2. package/cjs/bundle.css +33 -33
  3. package/cjs/{features-e8e4b350.js → features-e0ec381c.js} +1 -1
  4. package/cjs/{generic-b45f1518.js → generic-4a399208.js} +1 -1
  5. package/cjs/{index-35130013.js → index-46a3402f.js} +1 -1
  6. package/cjs/{index-a14b9905.js → index-906249f4.js} +1 -1
  7. package/cjs/index.js +1 -1
  8. package/cjs/{multicamv2-86ac5b43.js → multicamv2-027ae91d.js} +1 -1
  9. package/cjs/{multicamv2-93e892bd.js → multicamv2-a8505745.js} +1 -1
  10. package/cjs/{nextEpisodeButton-14512866.js → nextEpisodeButton-e1fdf02d.js} +1 -1
  11. package/cjs/{playlist-fc22c38f.js → playlist-953f1774.js} +1 -1
  12. package/cjs/{series-99105b98.js → series-f1d39110.js} +1 -1
  13. package/cjs/{series-v2-161be772.js → series-v2-8617b258.js} +1 -1
  14. package/cjs/{series-v2-e133fa94.js → series-v2-a589442e.js} +1 -1
  15. package/cjs/skin-1092a7c0.js +1 -0
  16. package/cjs/{skin-77835404.js → skin-2cb86204.js} +1 -1
  17. package/cjs/{skin-edf341ee.js → skin-5f1ec541.js} +1 -1
  18. package/cjs/{skin-46705233.js → skin-627ba202.js} +1 -1
  19. package/cjs/{skin-22d38d84.js → skin-8abc3b5a.js} +1 -1
  20. package/cjs/{skin-623972a0.js → skin-baa953b9.js} +1 -1
  21. package/cjs/{skin-75e3f0f8.js → skin-e50fa003.js} +1 -1
  22. package/cjs/{videoSelector-bd3974ea.js → videoSelector-4d910f13.js} +1 -1
  23. package/cjs/{videoSelector-3608f57b.js → videoSelector-f5645115.js} +1 -1
  24. package/esm/{autoNextVideo-fad617dc.js → autoNextVideo-f32ff781.js} +1 -1
  25. package/esm/bundle.css +33 -33
  26. package/esm/{features-a0055c95.js → features-d77307a9.js} +1 -1
  27. package/esm/generic-11889c32.js +1 -0
  28. package/esm/{index-9d6174b2.js → index-61f1668d.js} +1 -1
  29. package/esm/{index-85e80573.js → index-71fac120.js} +1 -1
  30. package/esm/index.js +1 -1
  31. package/esm/{multicamv2-d24ba224.js → multicamv2-ea81db92.js} +1 -1
  32. package/esm/{multicamv2-a96b3cc1.js → multicamv2-fd746bb6.js} +1 -1
  33. package/esm/{nextEpisodeButton-734514b0.js → nextEpisodeButton-963da776.js} +1 -1
  34. package/esm/{playlist-3c06265f.js → playlist-ee68225d.js} +1 -1
  35. package/esm/{series-e9deb41f.js → series-c5eb3553.js} +1 -1
  36. package/esm/{series-v2-974cc906.js → series-v2-4719c3ed.js} +1 -1
  37. package/esm/{series-v2-86091cec.js → series-v2-befb667c.js} +1 -1
  38. package/esm/{skin-7c76ca3e.js → skin-009991c3.js} +1 -1
  39. package/esm/{skin-dd685f53.js → skin-06d5ee78.js} +1 -1
  40. package/esm/{skin-4d59248c.js → skin-2f4b0751.js} +1 -1
  41. package/esm/{skin-8b9a6842.js → skin-8953de05.js} +1 -1
  42. package/esm/{skin-6d078b88.js → skin-8a8a323e.js} +1 -1
  43. package/esm/{skin-89bc7118.js → skin-b119f9a9.js} +1 -1
  44. package/esm/skin-d068b222.js +1 -0
  45. package/esm/{videoSelector-3b770d6b.js → videoSelector-2f4d368b.js} +1 -1
  46. package/esm/{videoSelector-46053135.js → videoSelector-cbf23609.js} +1 -1
  47. package/package.json +1 -1
  48. package/cjs/skin-23953707.js +0 -1
  49. package/esm/generic-d58ba745.js +0 -1
  50. package/esm/skin-50e1982b.js +0 -1
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{g as r,e as d,B as c}from"./icons-37daa6b3.js";import{C as u}from"./generic-d58ba745.js";import{b as m,l as v,i as p,g as h,e as f}from"./currentVideoInfo-0b234e55.js";import{g as b,s as y,p as C,k as g,i as E}from"./skin-1d47c799.js";import{a as N}from"./autoNextVideo-fad617dc.js";import{g as k}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"./captions-78bd2908.js";import"@babel/runtime/helpers/slicedToArray";import"./util-9975a0d0.js";import"@babel/runtime/helpers/typeof";function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(I=function(){return!!e})()}var S=a.getComponent("Component"),x=function(){n(w,S);var x,L,B=(x=w,L=I(),function(){var e,t=l(x);if(L){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function w(s){var n,i,l,a,r,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,w),(d=B.call(this,s,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(n=c.sres)||void 0===n?void 0:n.seasons,d.currentVideoData=c.res,d.initialiseStructure(),d.loadCSS(),d.selectedSeason=0,d.cb=null==c||null===(i=c.series)||void 0===i?void 0:i.cb,d.autoPlayNext=(null==c||null===(l=c.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),d.watchMap=m(),null!==(a=o(d))&&void 0!==a&&a.autoPlayNext&&null!=c&&null!==(r=c.series)&&void 0!==r&&r.enable){var u,h,f,b,y=null==c||null===(u=c.sres)||void 0===u?void 0:u.seasons,C=[];y.map(function(t){C.push.apply(C,e(t.episodes))}),v(C),p(null===(h=d.options_)||void 0===h||null===(f=h.res)||void 0===f||null===(b=f.video)||void 0===b?void 0:b.id),N({playerId:d.playerId,content:C,cb:d.cb,series:null==c?void 0:c.sres})}return d}return s(w,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"series-selector-icon",title:"season selector",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-6e9853f8.js").then(function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(b(),e.classList.remove("hidden"),s.classList.add("open"),y(this.playerId,e)):(e.classList.add("hidden"),s.classList.remove("open"))}},{key:"handleTabIndexSelector",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog open",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=0);for(var s=0;s<(null==t?void 0:t.length);s++)t[s].tabIndex=0}},{key:"handleCloseTabIndex",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog closed",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=-1);for(var s=0;s<(null==t?void 0:t.length);s++)t[s]&&(t[s].tabIndex=-1);setTimeout(function(){document.getElementsByClassName("series-selector-icon")[0]&&document.getElementsByClassName("series-selector-icon")[0].focus()},100)}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden",role:"dialog",ariaModal:"true"});s.setAttribute("aria-labelledby","seasons"),a.dom.$(".series-selector-icon",this.el()).onclick=function(){e.toggleOpenClose(s),e.handleTabIndexSelector()};var o=document.getElementById(this.playerId);if(o){var n=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(n,"px"),a.dom.appendContent(t,s),o.style.overflow="hidden",this.addFunctionality(s)}}},{key:"handleSeriesCloseIcon",value:function(e,t,s){if("series-selector-cross-icon"===e.className)t.classList.add("hidden"),s.classList.remove("open"),this.handleCloseTabIndex();else if("series-selector-back-icon"===e.className){var o=a.dom.$(".series-selector-content",this.el());for(a.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=this.createSeasonLister();for(a.dom.appendContent(o,n),a.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var i=C(d());e.appendChild(i)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),o=a.dom.createEl("div",{className:"series-selector-head"}),n=a.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(d()),tabIndex:-1});n.onclick=function(){t.handleSeriesCloseIcon(n,e,s)},n.onkeydown=function(o){"Enter"===o.key&&t.handleSeriesCloseIcon(n,e,s)};var i=a.dom.createEl("h2",{className:"series-selector-title",ariaLabel:"Seasons",innerHTML:"Seasons",id:"seasons"}),l=a.dom.createEl("div",{style:"position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;",ariaLive:"assertive",id:"sr-announcer",tabIndex:-1}),r=a.dom.createEl("div",{className:"series-selector-content"}),c=this.createSeasonLister();a.dom.appendContent(o,l),a.dom.appendContent(r,c),a.dom.appendContent(o,n),a.dom.appendContent(o,i),a.dom.appendContent(e,o),a.dom.appendContent(e,r),g(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;k(this.playerId);for(var t=h(),s=a.dom.createEl("div",{className:"season-container"}),o=function(o){var n,i,l,r,d=document.createElement("label");d.className="season-holder",d.ariaLabel=null===(n=t[o])||void 0===n?void 0:n.title,d.role="button",d.type="button",d.setAttribute("aria-LabelledBy",null===(i=t[o])||void 0===i?void 0:i.title),d.setAttribute("for","season-".concat(o));var c=document.createElement("div");c.className="season - ".concat(o),c.textContent=null===(l=t[o])||void 0===l?void 0:l.title,c.id=null===(r=t[o])||void 0===r?void 0:r.title;var u=a.dom.createEl("input",{className:"radio - ".concat(o),id:"season-".concat(o),name:"season-radio"});u.setAttribute("type","radio"),e.selectedSeason==o&&(u.checked=!0),u.onclick=function(t){f.set(o),e.showSeasonDetails(o)},d.onkeydown=function(t){"Enter"===t.key&&(f.set(o),e.showSeasonDetails(o))},a.dom.appendContent(d,u),a.dom.appendContent(d,c),a.dom.appendContent(s,d)},n=0;n<t.length;n++)o(n);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,o=this;p(null===(s=e[t])||void 0===s?void 0:s.id),u(this.playerId,e[t].id).then(function(e){null!=o&&o.cb&&o.cb(e)}).catch(function(e){null!=o&&o.cb&&o.cb(e)})}},{key:"getSeasonDetailsContainer",value:function(t,s){var o=this;t=t.map(function(e){var t,s,n,i,l,a,r,d,c;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:(null==e||null===(s=e.gist)||void 0===s||null===(n=s.imageGist)||void 0===n?void 0:n.r16x9)||(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(a=l.appcmsMain)||void 0===a||null===(r=a.images)||void 0===r?void 0:r.placeholderCover),watchedPercentage:(null==o||null===(d=o.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}});for(var n=function(n){var i,l,r,d,c,u=a.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),m=a.dom.createEl("div",{className:"series-section-data",index:n,innerHTML:"".concat((null===(i=t[n])||void 0===i?void 0:i.title)||"")});a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[n])||void 0===l?void 0:l.title)||"")}),a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var v=a.dom.createEl("div",{className:"series-section-image"}),p=(null===(r=t[n])||void 0===r?void 0:r.description)||"";(null===(d=p)||void 0===d?void 0:d.length)>170&&(p=p.substr(0,170)+"..."),a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(p||"")});var h=a.dom.createEl("img",{className:"series-image"});h.src="".concat(E(null===(c=t[n])||void 0===c?void 0:c.img)),h.alt="Episode ".concat(n+1),a.dom.appendContent(v,h),a.dom.appendContent(u,v),a.dom.appendContent(u,m),a.dom.appendContent(s,u),u.onclick=function(e){e.stopPropagation(),o.loadSeriesAssetById(t,n)},u.onkeydown=function(e){"Enter"===e.key&&(e.stopPropagation(),o.loadSeriesAssetById(t,n))},m.onclick=function(t){var s,o,n,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(u.style.backgroundColor="#0000007d",null==l||null===(o=l.classList)||void 0===o||o.remove("hidden")):(null==l||null===(n=l.classList)||void 0===n||n.add("hidden"),u.style.backgroundColor="unset")}},i=0;i<t.length;i++)n(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=h()[e].episodes;this.getSeasonDetailsContainer(s,t);var o=a.dom.$(".series-selector-cross-icon",this.el());for(o.className="series-selector-back-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=C(c());o.appendChild(n),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),w}();export{x as default};
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{g as r,e as d,B as c}from"./icons-37daa6b3.js";import{C as u}from"./generic-11889c32.js";import{b as m,l as v,i as p,g as h,e as f}from"./currentVideoInfo-0b234e55.js";import{g as b,s as y,p as C,k as g,i as E}from"./skin-1d47c799.js";import{a as N}from"./autoNextVideo-f32ff781.js";import{g as k}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"./captions-78bd2908.js";import"@babel/runtime/helpers/slicedToArray";import"./util-9975a0d0.js";import"@babel/runtime/helpers/typeof";function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(I=function(){return!!e})()}var S=a.getComponent("Component"),x=function(){n(w,S);var x,L,B=(x=w,L=I(),function(){var e,t=l(x);if(L){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function w(s){var n,i,l,a,r,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,w),(d=B.call(this,s,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(n=c.sres)||void 0===n?void 0:n.seasons,d.currentVideoData=c.res,d.initialiseStructure(),d.loadCSS(),d.selectedSeason=0,d.cb=null==c||null===(i=c.series)||void 0===i?void 0:i.cb,d.autoPlayNext=(null==c||null===(l=c.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),d.watchMap=m(),null!==(a=o(d))&&void 0!==a&&a.autoPlayNext&&null!=c&&null!==(r=c.series)&&void 0!==r&&r.enable){var u,h,f,b,y=null==c||null===(u=c.sres)||void 0===u?void 0:u.seasons,C=[];y.map(function(t){C.push.apply(C,e(t.episodes))}),v(C),p(null===(h=d.options_)||void 0===h||null===(f=h.res)||void 0===f||null===(b=f.video)||void 0===b?void 0:b.id),N({playerId:d.playerId,content:C,cb:d.cb,series:null==c?void 0:c.sres})}return d}return s(w,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"series-selector-icon",title:"season selector",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-6e9853f8.js").then(function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(b(),e.classList.remove("hidden"),s.classList.add("open"),y(this.playerId,e)):(e.classList.add("hidden"),s.classList.remove("open"))}},{key:"handleTabIndexSelector",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog open",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=0);for(var s=0;s<(null==t?void 0:t.length);s++)t[s].tabIndex=0}},{key:"handleCloseTabIndex",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog closed",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=-1);for(var s=0;s<(null==t?void 0:t.length);s++)t[s]&&(t[s].tabIndex=-1);setTimeout(function(){document.getElementsByClassName("series-selector-icon")[0]&&document.getElementsByClassName("series-selector-icon")[0].focus()},100)}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden",role:"dialog",ariaModal:"true"});s.setAttribute("aria-labelledby","seasons"),a.dom.$(".series-selector-icon",this.el()).onclick=function(){e.toggleOpenClose(s),e.handleTabIndexSelector()};var o=document.getElementById(this.playerId);if(o){var n=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(n,"px"),a.dom.appendContent(t,s),o.style.overflow="hidden",this.addFunctionality(s)}}},{key:"handleSeriesCloseIcon",value:function(e,t,s){if("series-selector-cross-icon"===e.className)t.classList.add("hidden"),s.classList.remove("open"),this.handleCloseTabIndex();else if("series-selector-back-icon"===e.className){var o=a.dom.$(".series-selector-content",this.el());for(a.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=this.createSeasonLister();for(a.dom.appendContent(o,n),a.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var i=C(d());e.appendChild(i)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),o=a.dom.createEl("div",{className:"series-selector-head"}),n=a.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(d()),tabIndex:-1});n.onclick=function(){t.handleSeriesCloseIcon(n,e,s)},n.onkeydown=function(o){"Enter"===o.key&&t.handleSeriesCloseIcon(n,e,s)};var i=a.dom.createEl("h2",{className:"series-selector-title",ariaLabel:"Seasons",innerHTML:"Seasons",id:"seasons"}),l=a.dom.createEl("div",{style:"position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;",ariaLive:"assertive",id:"sr-announcer",tabIndex:-1}),r=a.dom.createEl("div",{className:"series-selector-content"}),c=this.createSeasonLister();a.dom.appendContent(o,l),a.dom.appendContent(r,c),a.dom.appendContent(o,n),a.dom.appendContent(o,i),a.dom.appendContent(e,o),a.dom.appendContent(e,r),g(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;k(this.playerId);for(var t=h(),s=a.dom.createEl("div",{className:"season-container"}),o=function(o){var n,i,l,r,d=document.createElement("label");d.className="season-holder",d.ariaLabel=null===(n=t[o])||void 0===n?void 0:n.title,d.role="button",d.type="button",d.setAttribute("aria-LabelledBy",null===(i=t[o])||void 0===i?void 0:i.title),d.setAttribute("for","season-".concat(o));var c=document.createElement("div");c.className="season - ".concat(o),c.textContent=null===(l=t[o])||void 0===l?void 0:l.title,c.id=null===(r=t[o])||void 0===r?void 0:r.title;var u=a.dom.createEl("input",{className:"radio - ".concat(o),id:"season-".concat(o),name:"season-radio"});u.setAttribute("type","radio"),e.selectedSeason==o&&(u.checked=!0),u.onclick=function(t){f.set(o),e.showSeasonDetails(o)},d.onkeydown=function(t){"Enter"===t.key&&(f.set(o),e.showSeasonDetails(o))},a.dom.appendContent(d,u),a.dom.appendContent(d,c),a.dom.appendContent(s,d)},n=0;n<t.length;n++)o(n);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,o=this;p(null===(s=e[t])||void 0===s?void 0:s.id),u(this.playerId,e[t].id).then(function(e){null!=o&&o.cb&&o.cb(e)}).catch(function(e){null!=o&&o.cb&&o.cb(e)})}},{key:"getSeasonDetailsContainer",value:function(t,s){var o=this;t=t.map(function(e){var t,s,n,i,l,a,r,d,c;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:(null==e||null===(s=e.gist)||void 0===s||null===(n=s.imageGist)||void 0===n?void 0:n.r16x9)||(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(a=l.appcmsMain)||void 0===a||null===(r=a.images)||void 0===r?void 0:r.placeholderCover),watchedPercentage:(null==o||null===(d=o.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}});for(var n=function(n){var i,l,r,d,c,u=a.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),m=a.dom.createEl("div",{className:"series-section-data",index:n,innerHTML:"".concat((null===(i=t[n])||void 0===i?void 0:i.title)||"")});a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[n])||void 0===l?void 0:l.title)||"")}),a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var v=a.dom.createEl("div",{className:"series-section-image"}),p=(null===(r=t[n])||void 0===r?void 0:r.description)||"";(null===(d=p)||void 0===d?void 0:d.length)>170&&(p=p.substr(0,170)+"..."),a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(p||"")});var h=a.dom.createEl("img",{className:"series-image"});h.src="".concat(E(null===(c=t[n])||void 0===c?void 0:c.img)),h.alt="Episode ".concat(n+1),a.dom.appendContent(v,h),a.dom.appendContent(u,v),a.dom.appendContent(u,m),a.dom.appendContent(s,u),u.onclick=function(e){e.stopPropagation(),o.loadSeriesAssetById(t,n)},u.onkeydown=function(e){"Enter"===e.key&&(e.stopPropagation(),o.loadSeriesAssetById(t,n))},m.onclick=function(t){var s,o,n,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(u.style.backgroundColor="#0000007d",null==l||null===(o=l.classList)||void 0===o||o.remove("hidden")):(null==l||null===(n=l.classList)||void 0===n||n.add("hidden"),u.style.backgroundColor="unset")}},i=0;i<t.length;i++)n(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=h()[e].episodes;this.getSeasonDetailsContainer(s,t);var o=a.dom.$(".series-selector-cross-icon",this.el());for(o.className="series-selector-back-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=C(c());o.appendChild(n),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),w}();export{x as default};
@@ -1 +1 @@
1
- import{f as l,g as e,h as o,d as i,e as n,i as t,j as r,k as a,l as d,m as s}from"./features-a0055c95.js";import{M as u,a as m,c as v,d as p}from"./icons-37daa6b3.js";import{g as c}from"./player_instance-34118a5b.js";import{b as h}from"./skin-1d47c799.js";import{g as f}from"./resolution-62be852a.js";import{g as b}from"./captions-78bd2908.js";import{a as g,i as C,b as j}from"./index-9d6174b2.js";import{O as y,d as V}from"./generic-d58ba745.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./currentVideoInfo-0b234e55.js";import"./autoNextVideo-fad617dc.js";import"./util-9975a0d0.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";function w(w,B){c(w).addClass("skin_defaultv2"),function(){"Chrome"==V()&&import("./chromett-a3cbb2e1.js").then(function(l){var e=document.createElement("style");e.id="chromett",e.append("".concat(l.default)),document.head.appendChild(e)});import("./skin-fbab87d5.js").then(function(l){var e=document.createElement("style");e.id="default_v2",e.append("".concat(l.default)),document.head.appendChild(e)})}(),function(i,n){var t=c(i);t&&(t.on("loadeddata",function(){var o,t,r,a,d,s,u;(null===(o=f(i))||void 0===o?void 0:o.length)>0&&l(i,n),(null===(t=b(i))||void 0===t?void 0:t.length)>0&&e(i,n),!(null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable||null!==(a=window)&&void 0!==a&&null!==(d=a.app_data)&&void 0!==d&&null!==(s=d.appcmsMain)&&void 0!==s&&null!==(u=s.features)&&void 0!==u&&u.auto_play)||null!=n&&n.liveVideo||g(i,n),null!=n&&n.liveVideo||y()||C(i)}),t.one("play",function(){var l,e,n,t;null!==(l=window)&&void 0!==l&&null!==(e=l.customData)&&void 0!==e&&e.iframeOverlayUrl&&o(i,null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t?void 0:t.iframeOverlayUrl)}))}(w,B),function(l,e){var o,i,n,t,r,a,d,s,v,p,f,b,g,C=c(l);null===(o=C.controlBar)||void 0===o||o.removeChild("VolumePanel"),null===(i=C.controlBar)||void 0===i||i.addChild("VolumePanel",{inline:!1},1);var j=null===(n=C.controlBar)||void 0===n?void 0:n.getChild("ProgressControl"),y=null===(t=C.controlBar)||void 0===t?void 0:t.getChild("CurrentTimeDisplay"),V=null===(r=C.controlBar)||void 0===r?void 0:r.getChild("SeekToLive"),w=document.createElement("div");w.className="custom-spaced-progress-bar",j&&y&&V&&w.append(j.el(),y.el(),V.el());null===(a=C.controlBar)||void 0===a||null===(d=a.el())||void 0===d||d.append(w),null==C||null===(s=C.controlBar)||void 0===s||null===(v=s.getChild("FullscreenToggle"))||void 0===v||null===(p=v.el())||void 0===p||p.appendChild(h(u(window.controlsColor))),null==C||null===(f=C.controlBar)||void 0===f||null===(b=f.getChild("FullscreenToggle"))||void 0===b||null===(g=b.el())||void 0===g||g.appendChild(h(m(window.controlsColor)));var B=document.getElementsByClassName("vjs-time-control");e.liveVideo&&B[0]&&(B[0].style.display="none")}(w,B),function(l,e){var o,u,m,c,h,f,b=(null==e?void 0:e.skin_settings)||{},g=0!=(null==b?void 0:b.slowMoBtn);0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)&&i(l,"defaultV2",v());(0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)||1==(null==e?void 0:e.liveui))&&n(l,"defaultV2",p());!e.liveVideo&&g&&t(l);(null==e||null===(o=e.relatedVideos)||void 0===o||null===(u=o.content)||void 0===u?void 0:u.length)>0&&r(l,null==e?void 0:e.relatedVideos);(null==e||null===(m=e.streams)||void 0===m?void 0:m.length)>1&&a(l,null==e?void 0:e.streams);(null==e||null===(c=e.playlist)||void 0===c||null===(h=c.content)||void 0===h?void 0:h.length)>0&&d(l,null==e?void 0:e.playlist);null!=e&&null!==(f=e.series)&&void 0!==f&&f.enable&&s(l,e)}(w,B),j(w,B)}export{w as initialiseSkin};
1
+ import{f as l,g as e,h as o,d as i,e as n,i as t,j as r,k as a,l as d,m as s}from"./features-d77307a9.js";import{M as u,a as m,c as v,d as p}from"./icons-37daa6b3.js";import{g as c}from"./player_instance-34118a5b.js";import{b as h}from"./skin-1d47c799.js";import{g as f}from"./resolution-62be852a.js";import{g as b}from"./captions-78bd2908.js";import{a as g,i as C,b as j}from"./index-61f1668d.js";import{O as y,d as V}from"./generic-11889c32.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./currentVideoInfo-0b234e55.js";import"./autoNextVideo-f32ff781.js";import"./util-9975a0d0.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";function w(w,B){c(w).addClass("skin_defaultv2"),function(){"Chrome"==V()&&import("./chromett-a3cbb2e1.js").then(function(l){var e=document.createElement("style");e.id="chromett",e.append("".concat(l.default)),document.head.appendChild(e)});import("./skin-fbab87d5.js").then(function(l){var e=document.createElement("style");e.id="default_v2",e.append("".concat(l.default)),document.head.appendChild(e)})}(),function(i,n){var t=c(i);t&&(t.on("loadeddata",function(){var o,t,r,a,d,s,u;(null===(o=f(i))||void 0===o?void 0:o.length)>0&&l(i,n),(null===(t=b(i))||void 0===t?void 0:t.length)>0&&e(i,n),!(null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable||null!==(a=window)&&void 0!==a&&null!==(d=a.app_data)&&void 0!==d&&null!==(s=d.appcmsMain)&&void 0!==s&&null!==(u=s.features)&&void 0!==u&&u.auto_play)||null!=n&&n.liveVideo||g(i,n),null!=n&&n.liveVideo||y()||C(i)}),t.one("play",function(){var l,e,n,t;null!==(l=window)&&void 0!==l&&null!==(e=l.customData)&&void 0!==e&&e.iframeOverlayUrl&&o(i,null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t?void 0:t.iframeOverlayUrl)}))}(w,B),function(l,e){var o,i,n,t,r,a,d,s,v,p,f,b,g,C=c(l);null===(o=C.controlBar)||void 0===o||o.removeChild("VolumePanel"),null===(i=C.controlBar)||void 0===i||i.addChild("VolumePanel",{inline:!1},1);var j=null===(n=C.controlBar)||void 0===n?void 0:n.getChild("ProgressControl"),y=null===(t=C.controlBar)||void 0===t?void 0:t.getChild("CurrentTimeDisplay"),V=null===(r=C.controlBar)||void 0===r?void 0:r.getChild("SeekToLive"),w=document.createElement("div");w.className="custom-spaced-progress-bar",j&&y&&V&&w.append(j.el(),y.el(),V.el());null===(a=C.controlBar)||void 0===a||null===(d=a.el())||void 0===d||d.append(w),null==C||null===(s=C.controlBar)||void 0===s||null===(v=s.getChild("FullscreenToggle"))||void 0===v||null===(p=v.el())||void 0===p||p.appendChild(h(u(window.controlsColor))),null==C||null===(f=C.controlBar)||void 0===f||null===(b=f.getChild("FullscreenToggle"))||void 0===b||null===(g=b.el())||void 0===g||g.appendChild(h(m(window.controlsColor)));var B=document.getElementsByClassName("vjs-time-control");e.liveVideo&&B[0]&&(B[0].style.display="none")}(w,B),function(l,e){var o,u,m,c,h,f,b=(null==e?void 0:e.skin_settings)||{},g=0!=(null==b?void 0:b.slowMoBtn);0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)&&i(l,"defaultV2",v());(0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)||1==(null==e?void 0:e.liveui))&&n(l,"defaultV2",p());!e.liveVideo&&g&&t(l);(null==e||null===(o=e.relatedVideos)||void 0===o||null===(u=o.content)||void 0===u?void 0:u.length)>0&&r(l,null==e?void 0:e.relatedVideos);(null==e||null===(m=e.streams)||void 0===m?void 0:m.length)>1&&a(l,null==e?void 0:e.streams);(null==e||null===(c=e.playlist)||void 0===c||null===(h=c.content)||void 0===h?void 0:h.length)>0&&d(l,null==e?void 0:e.playlist);null!=e&&null!==(f=e.series)&&void 0!==f&&f.enable&&s(l,e)}(w,B),j(w,B)}export{w as initialiseSkin};
@@ -1 +1 @@
1
- import{g as e}from"./player_instance-34118a5b.js";import{f as r,n as t}from"./features-a0055c95.js";import{g as i}from"./resolution-62be852a.js";import{r as o}from"./captions-78bd2908.js";import"video.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./generic-d58ba745.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"./currentVideoInfo-0b234e55.js";import"./skin-1d47c799.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/assertThisInitialized";function n(n,s){import("./skin-271fa63f.js").then(function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)}),function(t,n){e(t).on("loadeddata",function(){var e;(null===(e=i(t))||void 0===e?void 0:e.length)>0&&r(t,n),null!=n&&n.disableCaptions&&o(t)})}(n,s),function(r){var i=e(r);i.controls(!1),t(r)}(n)}export{n as initialiseSkin};
1
+ import{g as e}from"./player_instance-34118a5b.js";import{f as r,n as t}from"./features-d77307a9.js";import{g as i}from"./resolution-62be852a.js";import{r as o}from"./captions-78bd2908.js";import"video.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./generic-11889c32.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"./currentVideoInfo-0b234e55.js";import"./skin-1d47c799.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/assertThisInitialized";function n(n,s){import("./skin-271fa63f.js").then(function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)}),function(t,n){e(t).on("loadeddata",function(){var e;(null===(e=i(t))||void 0===e?void 0:e.length)>0&&r(t,n),null!=n&&n.disableCaptions&&o(t)})}(n,s),function(r){var i=e(r);i.controls(!1),t(r)}(n)}export{n as initialiseSkin};
@@ -1 +1 @@
1
- import{y as e,z as t}from"./generic-d58ba745.js";import{g as r}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"js-cookie";import"./currentVideoInfo-0b234e55.js";import"./captions-78bd2908.js";import"./skin-1d47c799.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";function o(o){import("./skin-2c638dc1.js").then(function(e){var t=document.createElement("style");t.id="carousel_homepage",t.append("".concat(e.default)),document.head.appendChild(t)}),i(),function(o){var i=document.getElementById("".concat(o)),n=r(o);i&&i.addEventListener("touchstart",function(){n.paused()?e(o):t(o)})}(o)}var i=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden")};export{o as initaliseSkin};
1
+ import{y as e,z as t}from"./generic-11889c32.js";import{g as r}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"js-cookie";import"./currentVideoInfo-0b234e55.js";import"./captions-78bd2908.js";import"./skin-1d47c799.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";function o(o){import("./skin-2c638dc1.js").then(function(e){var t=document.createElement("style");t.id="carousel_homepage",t.append("".concat(e.default)),document.head.appendChild(t)}),i(),function(o){var i=document.getElementById("".concat(o)),n=r(o);i&&i.addEventListener("touchstart",function(){n.paused()?e(o):t(o)})}(o)}var i=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden")};export{o as initaliseSkin};
@@ -1 +1 @@
1
- import{a as e,b as t,c as o,d as s,e as i}from"./features-a0055c95.js";import{N as n}from"./generic-d58ba745.js";import{S as r,M as l,a,N as m,b as d,R as u}from"./icons-37daa6b3.js";import{g as p}from"./player_instance-34118a5b.js";import{b as c}from"./skin-1d47c799.js";import{a as b}from"./currentVideoInfo-0b234e55.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./resolution-62be852a.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"./captions-78bd2908.js";import"@babel/runtime/helpers/slicedToArray";function v(v,f){p(v).addClass("skin_default"),n(v,f),import("./skin-71be210e.js").then(function(e){var t=document.createElement("style");t.id="def_skin",t.append("".concat(e.default)),document.head.appendChild(t)}),function(e,t){0==t.liveVideo&&0==t.liveui&&s(e,"default",d());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&i(e,"default",u())}(v,f),function(s,i){var n=p(s),l=(null==i?void 0:i.sres)||null;n.on("loadeddata",function(){e(s,"default",r()),l&&import("./nextEpisodeButton-734514b0.js").then(function(e){e.initaliseFunctionality(i.sres.seasons,b())})}),n.one("loadedmetadata",function(){var e;l&&(t(s,null==i||null===(e=i.sres)||void 0===e?void 0:e.seasons,i),o(i.sres,i.res,s))})}(v,f),function(e,t){var o,s,i,n,r=p(e),d=document.getElementsByClassName("vjs-current-time")[0],u=document.getElementsByClassName("vjs-duration")[0],b=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(d&&(d.style.display="none"),u&&(u.style.display="none"),b&&(b.style.display="none"));null===(o=r.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(s=o.el())||void 0===s||s.appendChild(c(l(window.controlsColor))),null===(i=r.controlBar.getChild("FullscreenToggle"))||void 0===i||null===(n=i.el())||void 0===n||n.appendChild(c(a(window.controlsColor)));var v=r.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(c(m()));var f=document.createElement("div");f.classList.add("caption-header"),v.querySelector(".vjs-menu-content").insertBefore(f,v.querySelector(".vjs-menu-item"))}(v,f)}export{v as initialiseSkin};
1
+ import{a as e,b as t,c as o,d as s,e as i}from"./features-d77307a9.js";import{N as n}from"./generic-11889c32.js";import{S as r,M as l,a,N as m,b as d,R as u}from"./icons-37daa6b3.js";import{g as p}from"./player_instance-34118a5b.js";import{b as c}from"./skin-1d47c799.js";import{a as b}from"./currentVideoInfo-0b234e55.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./resolution-62be852a.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"./captions-78bd2908.js";import"@babel/runtime/helpers/slicedToArray";function v(v,f){p(v).addClass("skin_default"),n(v,f),import("./skin-71be210e.js").then(function(e){var t=document.createElement("style");t.id="def_skin",t.append("".concat(e.default)),document.head.appendChild(t)}),function(e,t){0==t.liveVideo&&0==t.liveui&&s(e,"default",d());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&i(e,"default",u())}(v,f),function(s,i){var n=p(s),l=(null==i?void 0:i.sres)||null;n.on("loadeddata",function(){e(s,"default",r()),l&&import("./nextEpisodeButton-963da776.js").then(function(e){e.initaliseFunctionality(i.sres.seasons,b())})}),n.one("loadedmetadata",function(){var e;l&&(t(s,null==i||null===(e=i.sres)||void 0===e?void 0:e.seasons,i),o(i.sres,i.res,s))})}(v,f),function(e,t){var o,s,i,n,r=p(e),d=document.getElementsByClassName("vjs-current-time")[0],u=document.getElementsByClassName("vjs-duration")[0],b=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(d&&(d.style.display="none"),u&&(u.style.display="none"),b&&(b.style.display="none"));null===(o=r.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(s=o.el())||void 0===s||s.appendChild(c(l(window.controlsColor))),null===(i=r.controlBar.getChild("FullscreenToggle"))||void 0===i||null===(n=i.el())||void 0===n||n.appendChild(c(a(window.controlsColor)));var v=r.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(c(m()));var f=document.createElement("div");f.classList.add("caption-header"),v.querySelector(".vjs-menu-content").insertBefore(f,v.querySelector(".vjs-menu-item"))}(v,f)}export{v as initialiseSkin};
@@ -1 +1 @@
1
- import{f as l,d as e,e as i,j as n,k as t,l as o,m as s}from"./features-a0055c95.js";import{f as r}from"./icons-37daa6b3.js";import{g as C}from"./player_instance-34118a5b.js";import{p as a,e as u}from"./skin-1d47c799.js";import{g as d}from"./resolution-62be852a.js";import{a as v,i as c,b as p}from"./index-9d6174b2.js";import{O as h,d as m}from"./generic-d58ba745.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./currentVideoInfo-0b234e55.js";import"./autoNextVideo-fad617dc.js";import"./util-9975a0d0.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";import"./captions-78bd2908.js";function f(f,b){C(f).addClass("skin_news"),function(){"Chrome"==m()&&import("./chromett-a3cbb2e1.js").then(function(l){var e=document.createElement("style");e.id="chromett",e.append("".concat(l.default)),document.head.appendChild(e)});import("./skin-9fece9a0.js").then(function(l){var e=document.createElement("style");e.id="default_v2",e.append("".concat(l.default)),document.head.appendChild(e)})}(),function(e,i){var n=C(e);n&&n.on("loadeddata",function(){var n,t,o,s,r,C;(null===(n=d(e))||void 0===n?void 0:n.length)>0&&l(e,i),!(null!=i&&null!==(t=i.series)&&void 0!==t&&t.enable||null!==(o=window)&&void 0!==o&&null!==(s=o.app_data)&&void 0!==s&&null!==(r=s.appcmsMain)&&void 0!==r&&null!==(C=r.features)&&void 0!==C&&C.auto_play)||null!=i&&i.liveVideo||v(e,i),null!=i&&i.liveVideo||h()||c(e)})}(f,b),function(l){var e,i,n,t,o,s,r,d,v,c,p,h,m,f,b,B,y,L,j=C(l);null===(e=j.controlBar)||void 0===e||e.removeChild("VolumePanel"),null===(i=j.controlBar)||void 0===i||i.addChild("VolumePanel",{inline:!1},1);var g=null===(n=j.controlBar)||void 0===n?void 0:n.getChild("ProgressControl"),E=document.createElement("div");E.className="custom-spaced-progress-bar",g&&E.append(g.el());null===(t=j.controlBar)||void 0===t||null===(o=t.el())||void 0===o||o.append(E);var w='<svg xmlns="http://www.w3.org/2000/svg" style="display : none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n\n <symbol id="vjs-icon-volume1" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>';j.el().insertBefore(a(w),null!==(s=j.el().firstChild)&&void 0!==s?s:null);var V=(null==j||null===(r=j.controlBar)||void 0===r||null===(d=r.getChild("PlayToggle"))||void 0===d||null===(v=d.el())||void 0===v?void 0:v.firstChild)||null;if(V){V.style.height="24px",V.style.width="24px";var x=u(V,j.paused()?"#vjs-icon-play":"#vjs-icon-pause");j.on("pause",function(){return x.setAttributeNS(null,"href","#vjs-icon-play")}),j.on("play",function(){return x.setAttributeNS(null,"href","#vjs-icon-pause")})}var M=(null==j||null===(c=j.controlBar)||void 0===c||null===(p=c.getChild("FullscreenToggle"))||void 0===p||null===(h=p.el())||void 0===h?void 0:h.firstChild)||null;if(M){M.style.height="24px",M.style.width="24px";var k=u(M,"#vjs-icon-fullscreen");j.on("fullscreenchange",function(){var l=j.isFullscreen_;null==k||k.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}var Z=(null==j||null===(m=j.controlBar)||void 0===m||null===(f=m.getChild("VolumePanel"))||void 0===f?void 0:f.el())||null;if(Z){var S=Z.querySelector(".vjs-mute-control .vjs-icon-placeholder");S.classList.add("vjs-svg-icon"),S.style.height="24px",S.style.width="24px";var N=u(S,j.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");j.on("volumechange",function(l){var e=j.volume();console.log(e,j.muted()),0==e||j.muted()?N.setAttributeNS(null,"href","#vjs-icon-mute"):e>0&&e<=.3?N.setAttributeNS(null,"href","#vjs-icon-volume1"):e>=.3&&e<=.7?N.setAttributeNS(null,"href","#vjs-icon-volume2"):N.setAttributeNS(null,"href","#vjs-icon-volume3")})}var A=(null==j||null===(b=j.controlBar)||void 0===b||null===(B=b.getChild("PictureInPictureToggle"))||void 0===B?void 0:B.el())||null;if(A){var _=null==A?void 0:A.querySelector(".vjs-icon-placeholder");_.style.height="16px",_.style.width="25px";var H=u(_,"#vjs-icon-pip");j.on("enterpictureinpicture",function(){H.setAttributeNS(null,"href","#vjs-icon-pip")})}var P=(null==j||null===(y=j.controlBar)||void 0===y||null===(L=y.getChild("SubsCapsButton"))||void 0===L?void 0:L.el())||null;if(P){var T=P.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");T.classList.add("vjs-svg-icon"),T.style.height="16px",T.style.width="29px";var I=u(T,"#vjs-icon-caps");I.setAttributeNS(null,"href","#vjs-icon-captions-off"),j.textTracks().on("change",function(l){for(var e=j.textTracks(),i=!1,n=0;n<e.length;n++){var t=e[n];if(("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode){i=!0;break}}i?I.setAttributeNS(null,"href","#vjs-icon-captions"):I.setAttributeNS(null,"href","#vjs-icon-captions-off")})}}(f),function(l,C){var a,u,d,v,c,p,h=(null==C?void 0:C.skin_settings)||{};null==h||h.slowMoBtn,null!=h&&h.skipBtn&&0==(null==C?void 0:C.liveVideo)&&0==(null==C?void 0:C.liveui)&&e(l,"VL_ONE",SkipSvgV2());(null!=h&&h.rewindBtn&&0==(null==C?void 0:C.liveVideo)&&0==(null==C?void 0:C.liveui)||1==(null==C?void 0:C.liveui))&&i(l,"VL_ONE",r());(null==C||null===(a=C.relatedVideos)||void 0===a||null===(u=a.content)||void 0===u?void 0:u.length)>0&&n(l,null==C?void 0:C.relatedVideos);(null==C||null===(d=C.streams)||void 0===d?void 0:d.length)>1&&t(l,null==C?void 0:C.streams);(null==C||null===(v=C.playlist)||void 0===v||null===(c=v.content)||void 0===c?void 0:c.length)>0&&o(l,null==C?void 0:C.playlist);null!=C&&null!==(p=C.series)&&void 0!==p&&p.enable&&s(l,C)}(f,b),p(f,b)}export{f as initialiseSkin};
1
+ import{f as l,d as e,e as i,j as n,k as t,l as o,m as s}from"./features-d77307a9.js";import{f as r}from"./icons-37daa6b3.js";import{g as C}from"./player_instance-34118a5b.js";import{p as a,e as u}from"./skin-1d47c799.js";import{g as d}from"./resolution-62be852a.js";import{a as v,i as c,b as p}from"./index-61f1668d.js";import{O as h,d as m}from"./generic-11889c32.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./currentVideoInfo-0b234e55.js";import"./autoNextVideo-f32ff781.js";import"./util-9975a0d0.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";import"./captions-78bd2908.js";function f(f,b){C(f).addClass("skin_news"),function(){"Chrome"==m()&&import("./chromett-a3cbb2e1.js").then(function(l){var e=document.createElement("style");e.id="chromett",e.append("".concat(l.default)),document.head.appendChild(e)});import("./skin-9fece9a0.js").then(function(l){var e=document.createElement("style");e.id="default_v2",e.append("".concat(l.default)),document.head.appendChild(e)})}(),function(e,i){var n=C(e);n&&n.on("loadeddata",function(){var n,t,o,s,r,C;(null===(n=d(e))||void 0===n?void 0:n.length)>0&&l(e,i),!(null!=i&&null!==(t=i.series)&&void 0!==t&&t.enable||null!==(o=window)&&void 0!==o&&null!==(s=o.app_data)&&void 0!==s&&null!==(r=s.appcmsMain)&&void 0!==r&&null!==(C=r.features)&&void 0!==C&&C.auto_play)||null!=i&&i.liveVideo||v(e,i),null!=i&&i.liveVideo||h()||c(e)})}(f,b),function(l){var e,i,n,t,o,s,r,d,v,c,p,h,m,f,b,B,y,L,j=C(l);null===(e=j.controlBar)||void 0===e||e.removeChild("VolumePanel"),null===(i=j.controlBar)||void 0===i||i.addChild("VolumePanel",{inline:!1},1);var g=null===(n=j.controlBar)||void 0===n?void 0:n.getChild("ProgressControl"),E=document.createElement("div");E.className="custom-spaced-progress-bar",g&&E.append(g.el());null===(t=j.controlBar)||void 0===t||null===(o=t.el())||void 0===o||o.append(E);var w='<svg xmlns="http://www.w3.org/2000/svg" style="display : none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n\n <symbol id="vjs-icon-volume1" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>';j.el().insertBefore(a(w),null!==(s=j.el().firstChild)&&void 0!==s?s:null);var V=(null==j||null===(r=j.controlBar)||void 0===r||null===(d=r.getChild("PlayToggle"))||void 0===d||null===(v=d.el())||void 0===v?void 0:v.firstChild)||null;if(V){V.style.height="24px",V.style.width="24px";var x=u(V,j.paused()?"#vjs-icon-play":"#vjs-icon-pause");j.on("pause",function(){return x.setAttributeNS(null,"href","#vjs-icon-play")}),j.on("play",function(){return x.setAttributeNS(null,"href","#vjs-icon-pause")})}var M=(null==j||null===(c=j.controlBar)||void 0===c||null===(p=c.getChild("FullscreenToggle"))||void 0===p||null===(h=p.el())||void 0===h?void 0:h.firstChild)||null;if(M){M.style.height="24px",M.style.width="24px";var k=u(M,"#vjs-icon-fullscreen");j.on("fullscreenchange",function(){var l=j.isFullscreen_;null==k||k.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}var Z=(null==j||null===(m=j.controlBar)||void 0===m||null===(f=m.getChild("VolumePanel"))||void 0===f?void 0:f.el())||null;if(Z){var S=Z.querySelector(".vjs-mute-control .vjs-icon-placeholder");S.classList.add("vjs-svg-icon"),S.style.height="24px",S.style.width="24px";var N=u(S,j.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");j.on("volumechange",function(l){var e=j.volume();console.log(e,j.muted()),0==e||j.muted()?N.setAttributeNS(null,"href","#vjs-icon-mute"):e>0&&e<=.3?N.setAttributeNS(null,"href","#vjs-icon-volume1"):e>=.3&&e<=.7?N.setAttributeNS(null,"href","#vjs-icon-volume2"):N.setAttributeNS(null,"href","#vjs-icon-volume3")})}var A=(null==j||null===(b=j.controlBar)||void 0===b||null===(B=b.getChild("PictureInPictureToggle"))||void 0===B?void 0:B.el())||null;if(A){var _=null==A?void 0:A.querySelector(".vjs-icon-placeholder");_.style.height="16px",_.style.width="25px";var H=u(_,"#vjs-icon-pip");j.on("enterpictureinpicture",function(){H.setAttributeNS(null,"href","#vjs-icon-pip")})}var P=(null==j||null===(y=j.controlBar)||void 0===y||null===(L=y.getChild("SubsCapsButton"))||void 0===L?void 0:L.el())||null;if(P){var T=P.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");T.classList.add("vjs-svg-icon"),T.style.height="16px",T.style.width="29px";var I=u(T,"#vjs-icon-caps");I.setAttributeNS(null,"href","#vjs-icon-captions-off"),j.textTracks().on("change",function(l){for(var e=j.textTracks(),i=!1,n=0;n<e.length;n++){var t=e[n];if(("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode){i=!0;break}}i?I.setAttributeNS(null,"href","#vjs-icon-captions"):I.setAttributeNS(null,"href","#vjs-icon-captions-off")})}}(f),function(l,C){var a,u,d,v,c,p,h=(null==C?void 0:C.skin_settings)||{};null==h||h.slowMoBtn,null!=h&&h.skipBtn&&0==(null==C?void 0:C.liveVideo)&&0==(null==C?void 0:C.liveui)&&e(l,"VL_ONE",SkipSvgV2());(null!=h&&h.rewindBtn&&0==(null==C?void 0:C.liveVideo)&&0==(null==C?void 0:C.liveui)||1==(null==C?void 0:C.liveui))&&i(l,"VL_ONE",r());(null==C||null===(a=C.relatedVideos)||void 0===a||null===(u=a.content)||void 0===u?void 0:u.length)>0&&n(l,null==C?void 0:C.relatedVideos);(null==C||null===(d=C.streams)||void 0===d?void 0:d.length)>1&&t(l,null==C?void 0:C.streams);(null==C||null===(v=C.playlist)||void 0===v||null===(c=v.content)||void 0===c?void 0:c.length)>0&&o(l,null==C?void 0:C.playlist);null!=C&&null!==(p=C.series)&&void 0!==p&&p.enable&&s(l,C)}(f,b),p(f,b)}export{f as initialiseSkin};
@@ -1 +1 @@
1
- import{y as e,z as r}from"./generic-d58ba745.js";import{g as t}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"js-cookie";import"./currentVideoInfo-0b234e55.js";import"./captions-78bd2908.js";import"./skin-1d47c799.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";function o(e){n(e),i(e)}var i=function(o){var i=t(o),n=document.getElementById("".concat(o));n&&n.addEventListener("touchstart",function(){i.paused()?e(o):r(o)})},n=function(e){var r=t(e);r.requestFullscreen=function(){},r.controlBar.hide()};export{o as initaliseSkin};
1
+ import{y as e,z as r}from"./generic-11889c32.js";import{g as t}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"js-cookie";import"./currentVideoInfo-0b234e55.js";import"./captions-78bd2908.js";import"./skin-1d47c799.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";function o(e){n(e),i(e)}var i=function(o){var i=t(o),n=document.getElementById("".concat(o));n&&n.addEventListener("touchstart",function(){i.paused()?e(o):r(o)})},n=function(e){var r=t(e);r.requestFullscreen=function(){},r.controlBar.hide()};export{o as initaliseSkin};
@@ -0,0 +1 @@
1
+ import{h as e,d as n,e as o,o as t,p as l,q as r,r as i,s as a}from"./features-d77307a9.js";import{g as s}from"./player_instance-34118a5b.js";import{a as d,i as u,b as c}from"./index-61f1668d.js";import{O as v,Q as p,R as m,S as f,c as y,N as h,T as b}from"./generic-11889c32.js";import"videojs-contrib-quality-menu";import{i as g,r as w}from"./index-71fac120.js";import{c as k}from"./helper-d52dff3c.js";import{c as S,a as j,b as E}from"./currentVideoInfo-0b234e55.js";import I from"video.js";import C from"@babel/runtime/helpers/toConsumableArray";import T from"@babel/runtime/helpers/asyncToGenerator";import A from"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"js-cookie";import{t as B}from"./skin-1d47c799.js";import"axios";import{c as x,d as L}from"./icons-37daa6b3.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./resolution-62be852a.js";import"@babel/runtime/helpers/assertThisInitialized";import"./localisation-0bf399a1.js";import"./autoNextVideo-f32ff781.js";import"./util-9975a0d0.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"./captions-78bd2908.js";import"video.js/dist/video-js.min.css";function M(n,o){var t=s(n);t&&(t.on("loadeddata",function(){var e,l,r,i,a,c=k(o),p=S();t.qualityLevels()&&t.qualityLevels().length&&function(e){var n=s(e);n&&(null==n||n.qualityMenu,n.qualityMenu({useResolutionLabels:!0}))}(n),!(null!=o&&null!==(e=o.series)&&void 0!==e&&e.enable||null!==(l=window)&&void 0!==l&&null!==(r=l.app_data)&&void 0!==r&&null!==(i=r.appcmsMain)&&void 0!==i&&null!==(a=i.features)&&void 0!==a&&a.auto_play)||null!=o&&o.liveVideo||d(n,o),null!=o&&o.liveVideo||v()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===siteId||"cea398b9-09ab-4331-958f-8c3d6a356b88"===siteId||u(n),c&&p&&p.length?g(n):w()}),t.one("play",function(){var o,t,l,r;null!==(o=window)&&void 0!==o&&null!==(t=o.customData)&&void 0!==t&&t.iframeOverlayUrl&&e(n,null===(l=window)||void 0===l||null===(r=l.customData)||void 0===r?void 0:r.iframeOverlayUrl)}))}function _(e,n){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=function(e,n){if(e){if("string"==typeof e)return N(e,n);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?N(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){o&&(e=o);var t=0,l=function(){};return{s:l,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i=!0,a=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return i=e.done,e},e:function(e){a=!0,r=e},f:function(){try{i||null==o.return||o.return()}finally{if(a)throw r}}}}function N(e,n){(null==n||n>e.length)&&(n=e.length);for(var o=0,t=Array(n);o<n;o++)t[o]=e[o];return t}function O(){return O=T(A.mark(function e(n){var o,t,l,r,i,a,d,u,c,v,y,h,b,g,w,k,S,j,E,I,x,L,M,N,O,D,P;return A.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:P=function(e,o,t,l,r){var i=s(n);if(!i.seeking()){o.startTimeInSeconds,o.durationInSeconds,Math.floor(i.currentTime());var a,d=_(t);try{for(d.s();!(a=d.n()).done;){var u,c,v,p=a.value,m=p.eventType,y=p.beaconUrls,h=p.startTimeInSeconds,b=p.startTime,g=p.durationInSeconds,w=h||0,k=y,S=(null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.adEventHandler)||null,j="".concat(w,"_").concat(m),E=O.get("pod-".concat(r))||[];if(console.warn(e,w,"map:",m,"condition1:",e>=w,"map:",O),e>=w&&!E.includes(j)){E.push(j),O.set("pod-".concat(r),E);try{D(m,o,k,i)}catch(e){console.error("Error when calling triggerAdBeacon:",e,m,o)}if("function"==typeof S)try{var I,C={eventType:m,startTimeInSeconds:h,startTime:b,durationInSeconds:g,ad:null==o||null===(I=o.ads)||void 0===I?void 0:I[l],adIndex:l};S({adsData:C}),f(n,C)}catch(e){console.error("Error when calling ads callback:",e)}}}}catch(e){d.e(e)}finally{d.f()}}},D=function(e,n,o,t){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(t.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(t.currentTime())),"AD_POD:",n),null==o||o.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},N=function(e){var n=Math.floor(e/60),o=Math.floor(e%60);return"".concat(n,":").concat(o.toString().padStart(2,"0"))},h=function(){y&&clearInterval(y)},c=m.get(),v=s(n),y=null,v.one("loadeddata",function(){y=setInterval(function(){c&&!v.paused()&&M(c)},4e3)}),v.on("sourceset",function(e){console.log(e,"sourceset")}),v.on("dispose",function(){h()}),b=new Map,g=new Map,w=-1,k=null,S=(null===(o=document)||void 0===o||null===(t=o.getElementsByClassName("tvProviderImage"))||void 0===t?void 0:t[0])||null,j=(null==v||null===(l=v.controlBar)||void 0===l?void 0:l.getChild("videoSelector"))||null,E=(null==v||null===(r=v.controlBar)||void 0===r?void 0:r.getChild("seriesV2"))||null,I=(null==v||null===(i=v.el())||void 0===i||null===(a=i.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===a?void 0:a[0])||null,x=(null==v||null===(d=v.el())||void 0===d||null===(u=d.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===u?void 0:u[0])||null,L=!1,M=function(){var e=T(A.mark(function e(o){var t,l,r,i,a,d,u,c,v,m,f,y,h,T,M,_;return A.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=new URL(o),k&&i.searchParams.append("nextToken",k),e.next=4,fetch(i.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:if(d=e.sent,u=d.avails,c=d.nextToken||null,k=c,v=[],m=s(n),f=m.controlBar.progressControl,y=f.seekBar.el(),null===(t=document)||void 0===t||t.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),u.map(function(e,n){var o,t;v.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(t=o.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===t?void 0:t[0])||[]})}),null!=v&&v.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",v),window.adsQueueList=v),console.log(v,"data"),v.forEach(function(e){var n=e.markerPositionInSeconds,o=e.ads,t=m.duration();if(!(n>t||Array.isArray(o)&&0==(null==o?void 0:o.length))){var l=n/t*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(l,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(l,"%"),r.style.pointerEvents="none",y.appendChild(r)}}),!L||!m._timeUpdateHandler){e.next=22;break}return e.abrupt("return");case 22:m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=B(function(){var e=m.currentTime();if(e!==w){w=e;for(var n=function(){var n=v[o],t=n.startTimeInSeconds,l=n.durationInSeconds,r=n.ads,i=t+l;if(e>=t-1.2&&e<=i+1.2){L=!!(e>=t&&e<=i&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>i&&b.set(t,!0),p.disable(),S&&S.classList.add("vjs-hidden"),I&&(I.style.pointerEvents="none",I.classList.add("vjs-hidden")),x&&(x.style.pointerEvents="none",x.classList.add("vjs-hidden")),j&&(j.el().style.pointerEvents="none",j.el().classList.add("vjs-hidden")),E&&(E.el().style.pointerEvents="none",E.el().classList.add("vjs-hidden")),f.el().classList.add("hide-progress-bar");for(var a=e-t,s=0,d=0,u=0;u<r.length;u++){var c,m=null==r||null===(c=r[u])||void 0===c?void 0:c.durationInSeconds;if(a<s+m){d=u;break}s+=m}r[d];var y=Math.max(0,l-a),w=Math.round(y);h.style.display="block",_.textContent="".concat(d+1," of ").concat(r.length," • ").concat(N(w));var k=[];return null==r||r.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});k.push.apply(k,C(n))}),Array.isArray(r)&&0==(null==r?void 0:r.length)&&k.push(null==n?void 0:n.podSlotImpressionBeacon),P(e,n,k,d,o),"break"}g.delete(t)},o=0;o<v.length;o++){if("break"===n())break}L||(h.style.display="none",f.el().classList.remove("hide-progress-bar"),j&&(j.el().style.pointerEvents="auto",j.el().classList.remove("vjs-hidden")),E&&(E.el().style.pointerEvents="auto",E.el().classList.remove("vjs-hidden")),S&&S.classList.remove("vjs-hidden"),I&&(I.style.pointerEvents="auto",I.classList.remove("vjs-hidden")),x&&(x.style.pointerEvents="auto",x.classList.remove("vjs-hidden")),p.enable())}},1e3),m.on("timeupdate",m._timeUpdateHandler),null===(l=document)||void 0===l||null===(r=l.querySelectorAll(".ssai-ad-container"))||void 0===r||r.forEach(function(e){return null==e?void 0:e.remove()}),(h=document.createElement("div")).className="ssai-ad-container",(T=document.createElement("div")).className="sponsored-adbox",(M=document.createElement("div")).className="sponsored-text",M.textContent="Sponsored Ad",T.append(M),(_=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",h.append(T),h.append(_),m.el().appendChild(h);case 41:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),O=new Map;case 23:case"end":return e.stop()}},e)})),O.apply(this,arguments)}function D(e,d){s(e).addClass("skin_vlone"),M(e,d),function(e,s){var d,u,v,p,m,f,g,w,S,I,C,T,A,B,M,_=(null==s?void 0:s.liveVideo)||!1,N=(null==s||null===(d=s.res)||void 0===d||null===(u=d.video)||void 0===u?void 0:u.isSSAIEnabled)||!1,D=y(null==s?void 0:s.res,e)||{};D.src;var P=(null==s?void 0:s.skin_settings)||{};k(s),null!=P&&P.skipBtn&&0==(null==s?void 0:s.liveVideo)&&0==(null==s?void 0:s.liveui)&&n(e,"VL_ONE",x());(null!=P&&P.rewindBtn&&0==(null==s?void 0:s.liveVideo)&&0==(null==s?void 0:s.liveui)||1==(null==s?void 0:s.liveui))&&o(e,"VL_ONE",L());(null==s||null===(v=s.relatedVideos)||void 0===v||null===(p=v.content)||void 0===p?void 0:p.length)>0&&t(e,null==s?void 0:s.relatedVideos);null!=s&&null!==(m=s.series)&&void 0!==m&&m.enable&&l(e,s);(null==s||null===(f=s.streams)||void 0===f?void 0:f.length)>1&&r(e,null==s?void 0:s.streams);if(c(e,s),h(e,s),"MEDIA_TAILOR"==(null===(g=window)||void 0===g||null===(w=g.app_data)||void 0===w||null===(S=w.appcmsMain)||void 0===S||null===(I=S.adsConfig)||void 0===I?void 0:I.vodAdSticherProvider)&&null!==(C=window)&&void 0!==C&&null!==(T=C.app_data)&&void 0!==T&&null!==(A=T.appcmsMain)&&void 0!==A&&null!==(B=A.adsConfig)&&void 0!==B&&B.vodAdClientSideTracking&&N)if(_)!function(e){O.apply(this,arguments)}(e);else{var V,U=null;if(null!=s&&null!==(V=s.series)&&void 0!==V&&V.enable){var q,H,R,Q,F,G=null===(q=j())||void 0===q||null===(H=q.video)||void 0===H||null===(R=H.gist)||void 0===R?void 0:R.id,$=E(),z=(null==$?void 0:$.get(G))||{t:0,p:0},J=z.t,K=z.p;"function"==typeof(null===(Q=window)||void 0===Q||null===(F=Q.watchHistory)||void 0===F?void 0:F.cb)&&window.watchHistory.cb({watchedTime:J}),K<95&&(U=J)}else{var W=s.watchHistoryResumeTime;s.watchedPercentage<95&&(U=W)}b(e,U)}null!=s&&s.isDvrEnabled&&null!=s&&null!==(M=s.dvrConfig)&&void 0!==M&&M.enable&&(i(e,s),a(e,s))}(e,d),P(e,d)}var P=function(e,n){var o,t,l,r,i,a,d,u,c,v,p,m,f=s(e),y=(null==n?void 0:n.theme)||{},h=I.dom.$(".vjs-play-progress"),b=I.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");b&&(b.style.color="".concat(null===(o=window)||void 0===o||null===(t=o.app_data)||void 0===t||null===(l=t.appcmsMain)||void 0===l||null===(r=l.brand)||void 0===r||null===(i=r.cta)||void 0===i||null===(a=i.primary)||void 0===a?void 0:a.backgroundColor)),h&&(h.style.background="".concat(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c||null===(v=c.brand)||void 0===v||null===(p=v.cta)||void 0===p||null===(m=p.primary)||void 0===m?void 0:m.backgroundColor));var g=f.getChild("BigPlayButton")||null;(null==y?void 0:y.progressBarColor)&&h&&(h.style.background=y.progressBarColor),(null==y?void 0:y.playButtonBackgroundColor)&&g&&(g.el().style.background=y.playButtonBackgroundColor),(null==y?void 0:y.playButtonColor)&&b&&(b.style.color=y.playButtonColor),(null==y?void 0:y.playButtonType)&&("square"==(null==y?void 0:y.playButtonType)?g.el().style.borderRadius=".3em":g.el().style.borderRadius="1.3em")};export{D as initialiseSkin};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,e as l}from"./icons-37daa6b3.js";import{C as s}from"./generic-d58ba745.js";import{k as d}from"./currentVideoInfo-0b234e55.js";import{g as c,s as m,j as p,k as u,l as v}from"./skin-1d47c799.js";import{a as h}from"./autoNextVideo-fad617dc.js";import{g as f}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./player_instance-34118a5b.js";import"js-cookie";import"./captions-78bd2908.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"./util-9975a0d0.js";import"@babel/runtime/helpers/typeof";function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}var y=a.getComponent("Component"),g=function(){o(j,y);var g,C,N=(g=j,C=b(),function(){var e,t=i(g);if(C){var o=i(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return n(this,e)});function j(t){var o,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,j),(i=N.call(this,t,a)).playerId=a.playerId,i.seriesData=a.sres,i.videos=a.related.content,i.cb=(null==a||null===(o=a.related)||void 0===o?void 0:o.cb)||null,i.autoNext=(null==a||null===(n=a.related)||void 0===n?void 0:n.autoNext)||!1,i.currentVideoData=a.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(d(0),h({playerId:i.playerId,content:i.videos,cb:i.cb})),i}return t(j,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-8e258d45.js").then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(c(),o.classList.remove("hidden"),t.classList.add("open"),o.style.right="0px",m(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"),o.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),a.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),p(this.playerId,o)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(l())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var r=a.dom.createEl("div",{className:"video-selector-title",innerHTML:f("relatedVideoTitle")||"Recommended"}),c=a.dom.createEl("div",{className:"video-selector-content"}),m=a.dom.createEl("div",{className:"video-container"}),p=function(e){var o,n,i,r,l,p=a.dom.createEl("div",{className:"video -".concat(e)}),u=a.dom.createEl("div",{className:"recommended -".concat(e)});u.setAttribute("video-idx",e),u.onclick=function(){d(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";v(e),s(t.playerId,t.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r?void 0:r.fallbackImage)),h.alt="No Thumbnail Available",u.append(h);var f=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(l=t.videos[e])||void 0===l?void 0:l.title)||"")});a.dom.appendContent(p,u),a.dom.appendContent(p,f),a.dom.appendContent(m,p),a.dom.appendContent(c,m)},h=0;h<this.videos.length;h++)p(h);a.dom.appendContent(n,i),a.dom.appendContent(n,r),a.dom.appendContent(e,n),a.dom.appendContent(e,c),u(this.playerId,e)}}]),j}();export{g as default};
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,e as l}from"./icons-37daa6b3.js";import{C as s}from"./generic-11889c32.js";import{k as d}from"./currentVideoInfo-0b234e55.js";import{g as c,s as m,j as p,k as u,l as v}from"./skin-1d47c799.js";import{a as h}from"./autoNextVideo-f32ff781.js";import{g as f}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./player_instance-34118a5b.js";import"js-cookie";import"./captions-78bd2908.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"./util-9975a0d0.js";import"@babel/runtime/helpers/typeof";function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}var y=a.getComponent("Component"),g=function(){o(j,y);var g,C,N=(g=j,C=b(),function(){var e,t=i(g);if(C){var o=i(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return n(this,e)});function j(t){var o,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,j),(i=N.call(this,t,a)).playerId=a.playerId,i.seriesData=a.sres,i.videos=a.related.content,i.cb=(null==a||null===(o=a.related)||void 0===o?void 0:o.cb)||null,i.autoNext=(null==a||null===(n=a.related)||void 0===n?void 0:n.autoNext)||!1,i.currentVideoData=a.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(d(0),h({playerId:i.playerId,content:i.videos,cb:i.cb})),i}return t(j,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-8e258d45.js").then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(c(),o.classList.remove("hidden"),t.classList.add("open"),o.style.right="0px",m(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"),o.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),a.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),p(this.playerId,o)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(l())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var r=a.dom.createEl("div",{className:"video-selector-title",innerHTML:f("relatedVideoTitle")||"Recommended"}),c=a.dom.createEl("div",{className:"video-selector-content"}),m=a.dom.createEl("div",{className:"video-container"}),p=function(e){var o,n,i,r,l,p=a.dom.createEl("div",{className:"video -".concat(e)}),u=a.dom.createEl("div",{className:"recommended -".concat(e)});u.setAttribute("video-idx",e),u.onclick=function(){d(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";v(e),s(t.playerId,t.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r?void 0:r.fallbackImage)),h.alt="No Thumbnail Available",u.append(h);var f=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(l=t.videos[e])||void 0===l?void 0:l.title)||"")});a.dom.appendContent(p,u),a.dom.appendContent(p,f),a.dom.appendContent(m,p),a.dom.appendContent(c,m)},h=0;h<this.videos.length;h++)p(h);a.dom.appendContent(n,i),a.dom.appendContent(n,r),a.dom.appendContent(e,n),a.dom.appendContent(e,c),u(this.playerId,e)}}]),j}();export{g as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{g as l,e as s}from"./icons-37daa6b3.js";import{C as d}from"./generic-d58ba745.js";import{k as r}from"./currentVideoInfo-0b234e55.js";import{g as c,s as m,j as u,h as v,k as p,i as h}from"./skin-1d47c799.js";import{a as y}from"./autoNextVideo-fad617dc.js";import{g as b}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./player_instance-34118a5b.js";import"js-cookie";import"./captions-78bd2908.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"./util-9975a0d0.js";import"@babel/runtime/helpers/typeof";function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}var C=a.getComponent("Component"),g=function(){o(N,C);var g,E,I=(g=N,E=f(),function(){var e,t=i(g);if(E){var o=i(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return n(this,e)});function N(t){var o,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,N),(i=I.call(this,t,a)).playerId=a.playerId,i.seriesData=a.sres,i.videos=a.related.content,i.cb=(null==a||null===(o=a.related)||void 0===o?void 0:o.cb)||null,i.autoNext=(null==a||null===(n=a.related)||void 0===n?void 0:n.autoNext)||!1,i.currentVideoData=a.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(r(0),y({playerId:i.playerId,content:i.videos,cb:i.cb})),i}return t(N,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(l())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-def99d5e.js").then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;e.handleTabIndexSelector(),null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(c(),o.classList.remove("hidden"),t.classList.add("open"),m(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"))};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),a.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),u(this.playerId,o)}}},{key:"loadVideoAssetById",value:function(e){var t=this;r(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";v(e),d(this.playerId,this.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})}},{key:"handleTabIndexSelector",value:function(){var e,t,o;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var n=document.getElementsByClassName("video-accessibility"),i=(null==n||null===(t=n[0])||void 0===t||null===(o=t.children)||void 0===o?void 0:o.length)||0,a=0;a<i;a++)document.getElementsByClassName("recommended -".concat(a))[0]&&(document.getElementsByClassName("recommended -".concat(a))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,o;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);for(var n=document.getElementsByClassName("video-accessibility"),i=(null==n||null===(t=n[0])||void 0===t||null===(o=t.children)||void 0===o?void 0:o.length)||0,a=0;a<i;a++)document.getElementsByClassName("recommended -".concat(a))&&(document.getElementsByClassName("recommended -".concat(a))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",tabIndex:-1,innerHTML:"".concat(s())});i.onkeydown=function(n){"Enter"===n.key&&(e.classList.add("hidden"),o.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),t.handleCloseTabIndex()};for(var l=a.dom.createEl("div",{className:"video-selector-title",innerHTML:b("relatedVideoTitle")||"Recommended"}),d=a.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),r=a.dom.createEl("div",{className:"video-container video-accessibility"}),c=function(e){var o,n,i,l,s,c,m,u,v=a.dom.createEl("div",{className:"video -".concat(e)}),p=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});p.setAttribute("video-idx",e),p.onkeydown=function(o){"Enter"===o.key&&t.loadVideoAssetById(e)},p.onclick=function(){t.loadVideoAssetById(e)};var y=document.createElement("img");y.className="related-thumbnail-image",y.src="".concat(h(null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||h(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(s=l.appcmsMain)||void 0===s||null===(c=s.images)||void 0===c?void 0:c.placeholderCover)),y.alt="".concat((null==t||null===(m=t.videos[e])||void 0===m?void 0:m.title.trim().split(/\s+/).slice(0,2).join(" "))||""),p.append(y);var b=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(u=t.videos[e])||void 0===u?void 0:u.title)||"")});a.dom.appendContent(v,p),a.dom.appendContent(v,b),a.dom.appendContent(r,v),a.dom.appendContent(d,r)},m=0;m<this.videos.length;m++)c(m);a.dom.appendContent(n,l),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,d),p(this.playerId,e)}}]),N}();export{g as default};
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{g as l,e as s}from"./icons-37daa6b3.js";import{C as d}from"./generic-11889c32.js";import{k as r}from"./currentVideoInfo-0b234e55.js";import{g as c,s as m,j as u,h as v,k as p,i as h}from"./skin-1d47c799.js";import{a as y}from"./autoNextVideo-f32ff781.js";import{g as b}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./player_instance-34118a5b.js";import"js-cookie";import"./captions-78bd2908.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"./util-9975a0d0.js";import"@babel/runtime/helpers/typeof";function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}var C=a.getComponent("Component"),g=function(){o(N,C);var g,E,I=(g=N,E=f(),function(){var e,t=i(g);if(E){var o=i(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return n(this,e)});function N(t){var o,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,N),(i=I.call(this,t,a)).playerId=a.playerId,i.seriesData=a.sres,i.videos=a.related.content,i.cb=(null==a||null===(o=a.related)||void 0===o?void 0:o.cb)||null,i.autoNext=(null==a||null===(n=a.related)||void 0===n?void 0:n.autoNext)||!1,i.currentVideoData=a.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(r(0),y({playerId:i.playerId,content:i.videos,cb:i.cb})),i}return t(N,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(l())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-def99d5e.js").then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;e.handleTabIndexSelector(),null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(c(),o.classList.remove("hidden"),t.classList.add("open"),m(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"))};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),a.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),u(this.playerId,o)}}},{key:"loadVideoAssetById",value:function(e){var t=this;r(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";v(e),d(this.playerId,this.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})}},{key:"handleTabIndexSelector",value:function(){var e,t,o;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var n=document.getElementsByClassName("video-accessibility"),i=(null==n||null===(t=n[0])||void 0===t||null===(o=t.children)||void 0===o?void 0:o.length)||0,a=0;a<i;a++)document.getElementsByClassName("recommended -".concat(a))[0]&&(document.getElementsByClassName("recommended -".concat(a))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,o;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);for(var n=document.getElementsByClassName("video-accessibility"),i=(null==n||null===(t=n[0])||void 0===t||null===(o=t.children)||void 0===o?void 0:o.length)||0,a=0;a<i;a++)document.getElementsByClassName("recommended -".concat(a))&&(document.getElementsByClassName("recommended -".concat(a))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",tabIndex:-1,innerHTML:"".concat(s())});i.onkeydown=function(n){"Enter"===n.key&&(e.classList.add("hidden"),o.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),t.handleCloseTabIndex()};for(var l=a.dom.createEl("div",{className:"video-selector-title",innerHTML:b("relatedVideoTitle")||"Recommended"}),d=a.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),r=a.dom.createEl("div",{className:"video-container video-accessibility"}),c=function(e){var o,n,i,l,s,c,m,u,v=a.dom.createEl("div",{className:"video -".concat(e)}),p=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});p.setAttribute("video-idx",e),p.onkeydown=function(o){"Enter"===o.key&&t.loadVideoAssetById(e)},p.onclick=function(){t.loadVideoAssetById(e)};var y=document.createElement("img");y.className="related-thumbnail-image",y.src="".concat(h(null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||h(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(s=l.appcmsMain)||void 0===s||null===(c=s.images)||void 0===c?void 0:c.placeholderCover)),y.alt="".concat((null==t||null===(m=t.videos[e])||void 0===m?void 0:m.title.trim().split(/\s+/).slice(0,2).join(" "))||""),p.append(y);var b=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(u=t.videos[e])||void 0===u?void 0:u.title)||"")});a.dom.appendContent(v,p),a.dom.appendContent(v,b),a.dom.appendContent(r,v),a.dom.appendContent(d,r)},m=0;m<this.videos.length;m++)c(m);a.dom.appendContent(n,l),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,d),p(this.playerId,e)}}]),N}();export{g as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viewlift/player-backup",
3
- "version": "2.0.145-backup",
3
+ "version": "2.0.147-backup",
4
4
  "main": "dist/bundle.cjs.js",
5
5
  "types": "dist/@viewlift/player/esm/index.d.ts",
6
6
  "amdName": "_playerCore",
@@ -1 +0,0 @@
1
- "use strict";var e=require("./features-e8e4b350.js"),n=require("./player_instance-fcf6a8fb.js"),r=require("./index-35130013.js"),t=require("./generic-b45f1518.js");require("videojs-contrib-quality-menu");var l=require("./index-a14b9905.js"),o=require("./helper-dbf2fb22.js"),i=require("./currentVideoInfo-5802821b.js"),a=require("video.js"),d=require("@babel/runtime/helpers/toConsumableArray"),s=require("@babel/runtime/helpers/asyncToGenerator"),u=require("@babel/runtime/regenerator");require("@babel/runtime/helpers/defineProperty"),require("js-cookie");var c=require("./skin-71b7d779.js");require("axios");var v=require("./icons-2609dbe4.js");require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./resolution-9c4872ec.js"),require("@babel/runtime/helpers/assertThisInitialized"),require("./localisation-56e0a999.js"),require("./autoNextVideo-0e83cb28.js"),require("./util-f7f16d32.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("./captions-68e263dd.js"),require("video.js/dist/video-js.min.css");function p(a,d){var s=n.getPlayer(a);s&&(s.on("loadeddata",function(){var e,u,c,v,p,m=o.checkDvrStartOverEnabled(d),f=i.getCurrentEpgPrograms();s.qualityLevels()&&s.qualityLevels().length&&function(e){var r=n.getPlayer(e);r&&(null==r||r.qualityMenu,r.qualityMenu({useResolutionLabels:!0}))}(a),!(null!=d&&null!==(e=d.series)&&void 0!==e&&e.enable||null!==(u=window)&&void 0!==u&&null!==(c=u.app_data)&&void 0!==c&&null!==(v=c.appcmsMain)&&void 0!==v&&null!==(p=v.features)&&void 0!==p&&p.auto_play)||null!=d&&d.liveVideo||r.addNextEpPreview(a,d),null!=d&&d.liveVideo||t.isMobile()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===siteId||"cea398b9-09ab-4331-958f-8c3d6a356b88"===siteId||r.initiateTrickplay(a),m&&f&&f.length?l.initiateMarker(a):l.removeMarkers()}),s.one("play",function(){var n,r,t,l;null!==(n=window)&&void 0!==n&&null!==(r=n.customData)&&void 0!==r&&r.iframeOverlayUrl&&e.addOutputtingOverlay(a,null===(t=window)||void 0===t||null===(l=t.customData)||void 0===l?void 0:l.iframeOverlayUrl)}))}function m(e,n){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,n){if(e){if("string"==typeof e)return f(e,n);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var t=0,l=function(){};return{s:l,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=Array(n);r<n;r++)t[r]=e[r];return t}function y(){return y=s(u.mark(function e(r){var l,o,i,a,v,p,f,y,h,b,g,S,k,w,j,E,q,I,A,B,C,T,M,P,L,x;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:x=function(e,l,o,i,a){var d=n.getPlayer(r);if(!d.seeking()){l.startTimeInSeconds,l.durationInSeconds,Math.floor(d.currentTime());var s,u=m(o);try{for(u.s();!(s=u.n()).done;){var c,v,p,f=s.value,y=f.eventType,h=f.beaconUrls,b=f.startTimeInSeconds,g=f.startTime,S=f.durationInSeconds,k=b||0,w=h,j=(null===(c=window)||void 0===c||null===(v=c.customData)||void 0===v||null===(p=v.ads)||void 0===p?void 0:p.adEventHandler)||null,E="".concat(k,"_").concat(y),q=P.get("pod-".concat(a))||[];if(console.warn(e,k,"map:",y,"condition1:",e>=k,"map:",P),e>=k&&!q.includes(E)){q.push(E),P.set("pod-".concat(a),q);try{L(y,l,w,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,y,l)}if("function"==typeof j)try{var I,A={eventType:y,startTimeInSeconds:b,startTime:g,durationInSeconds:S,ad:null==l||null===(I=l.ads)||void 0===I?void 0:I[i],adIndex:i};j({adsData:A}),t.triggerSSAIEvents(r,A)}catch(e){console.error("Error when calling ads callback:",e)}}}}catch(e){u.e(e)}finally{u.f()}}},L=function(e,n,r,t){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(t.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(t.currentTime())),"AD_POD:",n),null==r||r.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},M=function(e){var n=Math.floor(e/60),r=Math.floor(e%60);return"".concat(n,":").concat(r.toString().padStart(2,"0"))},S=function(){g&&clearInterval(g)},h=t.trackingUrlManager.get(),b=n.getPlayer(r),g=null,b.one("loadeddata",function(){g=setInterval(function(){h&&!b.paused()&&T(h)},4e3)}),b.on("sourceset",function(e){console.log(e,"sourceset")}),b.on("dispose",function(){S()}),k=new Map,w=new Map,j=-1,E=(null===(l=document)||void 0===l||null===(o=l.getElementsByClassName("tvProviderImage"))||void 0===o?void 0:o[0])||null,q=(null==b||null===(i=b.controlBar)||void 0===i?void 0:i.getChild("videoSelector"))||null,I=(null==b||null===(a=b.controlBar)||void 0===a?void 0:a.getChild("seriesV2"))||null,A=(null==b||null===(v=b.el())||void 0===v||null===(p=v.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===p?void 0:p[0])||null,B=(null==b||null===(f=b.el())||void 0===f||null===(y=f.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===y?void 0:y[0])||null,C=!1,T=function(){var e=s(u.mark(function e(l){var o,i,a,s,v,p,m,f,y,h,b,g,S,T;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(l);case 2:return s=e.sent,e.next=5,s.json();case 5:if(v=e.sent,p=v.avails,m=[],f=n.getPlayer(r),y=f.controlBar.progressControl,h=y.seekBar.el(),null===(o=document)||void 0===o||o.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),p.map(function(e,n){var r,t;m.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===(r=e.adBreakTrackingEvents)||void 0===r||null===(t=r.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===t?void 0:t[0])||[]})}),null!=m&&m.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",m),window.adsQueueList=m),console.log(m,"data"),m.forEach(function(e){var n=e.markerPositionInSeconds,r=e.ads,t=f.duration();if(!(n>t||Array.isArray(r)&&0==(null==r?void 0:r.length))){var l=n/t*100,o=document.createElement("div");o.className="vjs-seekbar-marker",o.style.left="".concat(l,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="2px",o.style.backgroundColor="#fecc09",o.style.left="".concat(l,"%"),o.style.pointerEvents="none",h.appendChild(o)}}),!C||!f._timeUpdateHandler){e.next=18;break}return e.abrupt("return");case 18:f._timeUpdateHandler&&f.off("timeupdate",f._timeUpdateHandler),f._timeUpdateHandler=c.throttle(function(){var e=f.currentTime();if(e!==j){j=e;for(var n=function(){var n=m[r],l=n.startTimeInSeconds,o=n.durationInSeconds,i=n.ads,a=l+o;if(e>=l-1.2&&e<=a+1.2){C=!!(e>=l&&e<=a&&Array.isArray(i)&&(null==i?void 0:i.length)>0),e>a&&k.set(l,!0),t.keyboardManager.disable(),E&&E.classList.add("vjs-hidden"),A&&(A.style.pointerEvents="none",A.classList.add("vjs-hidden")),B&&(B.style.pointerEvents="none",B.classList.add("vjs-hidden")),q&&(q.el().style.pointerEvents="none",q.el().classList.add("vjs-hidden")),I&&(I.el().style.pointerEvents="none",I.el().classList.add("vjs-hidden")),y.el().classList.add("hide-progress-bar");for(var s=e-l,u=0,c=0,v=0;v<i.length;v++){var p,f=null==i||null===(p=i[v])||void 0===p?void 0:p.durationInSeconds;if(s<u+f){c=v;break}u+=f}i[c];var h=Math.max(0,o-s),g=Math.round(h);b.style.display="block",T.textContent="".concat(c+1," of ").concat(i.length," • ").concat(M(g));var S=[];return null==i||i.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});S.push.apply(S,d(n))}),Array.isArray(i)&&0==(null==i?void 0:i.length)&&S.push(null==n?void 0:n.podSlotImpressionBeacon),x(e,n,S,c,r),"break"}w.delete(l)},r=0;r<m.length;r++){if("break"===n())break}C||(b.style.display="none",y.el().classList.remove("hide-progress-bar"),q&&(q.el().style.pointerEvents="auto",q.el().classList.remove("vjs-hidden")),I&&(I.el().style.pointerEvents="auto",I.el().classList.remove("vjs-hidden")),E&&E.classList.remove("vjs-hidden"),A&&(A.style.pointerEvents="auto",A.classList.remove("vjs-hidden")),B&&(B.style.pointerEvents="auto",B.classList.remove("vjs-hidden")),t.keyboardManager.enable())}},1e3),f.on("timeupdate",f._timeUpdateHandler),null===(i=document)||void 0===i||null===(a=i.querySelectorAll(".ssai-ad-container"))||void 0===a||a.forEach(function(e){return null==e?void 0:e.remove()}),(b=document.createElement("div")).className="ssai-ad-container",(g=document.createElement("div")).className="sponsored-adbox",(S=document.createElement("div")).className="sponsored-text",S.textContent="Sponsored Ad",g.append(S),(T=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",b.append(g),b.append(T),f.el().appendChild(b);case 37:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),P=new Map;case 22:case"end":return e.stop()}},e)})),y.apply(this,arguments)}var h=function(e,r){var t,l,o,i,d,s,u,c,v,p,m,f,y=n.getPlayer(e),h=(null==r?void 0:r.theme)||{},b=a.dom.$(".vjs-play-progress"),g=a.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");g&&(g.style.color="".concat(null===(t=window)||void 0===t||null===(l=t.app_data)||void 0===l||null===(o=l.appcmsMain)||void 0===o||null===(i=o.brand)||void 0===i||null===(d=i.cta)||void 0===d||null===(s=d.primary)||void 0===s?void 0:s.backgroundColor)),b&&(b.style.background="".concat(null===(u=window)||void 0===u||null===(c=u.app_data)||void 0===c||null===(v=c.appcmsMain)||void 0===v||null===(p=v.brand)||void 0===p||null===(m=p.cta)||void 0===m||null===(f=m.primary)||void 0===f?void 0:f.backgroundColor));var S=y.getChild("BigPlayButton")||null;(null==h?void 0:h.progressBarColor)&&b&&(b.style.background=h.progressBarColor),(null==h?void 0:h.playButtonBackgroundColor)&&S&&(S.el().style.background=h.playButtonBackgroundColor),(null==h?void 0:h.playButtonColor)&&g&&(g.style.color=h.playButtonColor),(null==h?void 0:h.playButtonType)&&("square"==(null==h?void 0:h.playButtonType)?S.el().style.borderRadius=".3em":S.el().style.borderRadius="1.3em")};exports.initialiseSkin=function(l,a){n.getPlayer(l).addClass("skin_vlone"),p(l,a),function(n,l){var a,d,s,u,c,p,m,f,h,b=(null==l?void 0:l.liveVideo)||!1,g=(null==l||null===(a=l.res)||void 0===a||null===(d=a.video)||void 0===d?void 0:d.isSSAIEnabled)||!1,S=t.getSource(null==l?void 0:l.res,n)||{};S.src;var k=(null==l?void 0:l.skin_settings)||{};o.checkDvrStartOverEnabled(l),null!=k&&k.skipBtn&&0==(null==l?void 0:l.liveVideo)&&0==(null==l?void 0:l.liveui)&&e.addSkipButton(n,"VL_ONE",v.SkipSvgV2());(null!=k&&k.rewindBtn&&0==(null==l?void 0:l.liveVideo)&&0==(null==l?void 0:l.liveui)||1==(null==l?void 0:l.liveui))&&e.addRewindButton(n,"VL_ONE",v.RewindSvgV2());(null==l||null===(s=l.relatedVideos)||void 0===s||null===(u=s.content)||void 0===u?void 0:u.length)>0&&e.addVideoSelector(n,null==l?void 0:l.relatedVideos);null!=l&&null!==(c=l.series)&&void 0!==c&&c.enable&&e.addSeriesSelectorV2(n,l);(null==l||null===(p=l.streams)||void 0===p?void 0:p.length)>1&&e.addMulticamSelector(n,null==l?void 0:l.streams);if(r.addTVProviderImage(n,l),t.initialiseKeyboardEvents(n,l),"MEDIA_TAILOR"==(null===(m=ads)||void 0===m?void 0:m.vodAdSticherProvider)&&null!==(f=ads)&&void 0!==f&&f.vodAdClientSideTracking&&g)if(b)!function(e){y.apply(this,arguments)}(n);else{var w,j=null;if(null!=l&&null!==(w=l.series)&&void 0!==w&&w.enable){var E,q,I,A,B,C=null===(E=i.getCurrentVideo())||void 0===E||null===(q=E.video)||void 0===q||null===(I=q.gist)||void 0===I?void 0:I.id,T=i.getSeriesWatchMap(),M=(null==T?void 0:T.get(C))||{t:0,p:0},P=M.t,L=M.p;"function"==typeof(null===(A=window)||void 0===A||null===(B=A.watchHistory)||void 0===B?void 0:B.cb)&&window.watchHistory.cb({watchedTime:P}),L<95&&(j=P)}else{var x=l.watchHistoryResumeTime;l.watchedPercentage<95&&(j=x)}t.setupAdvertisementMarkers(n,j)}null!=l&&l.isDvrEnabled&&null!=l&&null!==(h=l.dvrConfig)&&void 0!==h&&h.enable&&(e.addStartFromBeginningButton(n,l),e.addWatchLiveButton(n,l))}(l,a),h(l,a)};
@@ -1 +0,0 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import o from"video.js";import r from"axios";import{g as i}from"./player_instance-34118a5b.js";import a from"js-cookie";import{a as l,e as s,g as u,h as d,s as c,i as v,d as m}from"./currentVideoInfo-0b234e55.js";import{a as p,r as f}from"./captions-78bd2908.js";import{t as g,c as I}from"./skin-1d47c799.js";import E from"@babel/runtime/helpers/toConsumableArray";import h from"@babel/runtime/helpers/slicedToArray";function y(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function T(e){window.dataLayer=window.dataLayer||[],y("js",new Date),y("config",e)}function w(e,n){y("event",e,n)}var b={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 _(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 S(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?_(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):_(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var O={name:"@viewlift/player",version:"2.0.61",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",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","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=O.version;var L,P=function(e,n){var t,o,i,a,l,s,u,d;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):r({url:null!==(l=window)&&void 0!==l&&null!==(s=l.customData)&&void 0!==s&&s.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(d=u.customData)||void 0===d?void 0:d.overrideEntitlementBaseUrl)+"/video/status":F.get()+"".concat(null==b?void 0:b.getVideoDetails),params:S({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":O.version,"x-player-name":"videojs"},withCredentials:!0})},A=function(e,n){var t,o,i,a;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):r({url:F.get()+b.getLinearChannelDetails,params:S(S(S(S(S({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===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},D=function(e,n){var t,o,i=H(n),a=(null==i?void 0:i.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})}):r({url:F.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},R=function(){var e=n(t.mark(function e(n){var o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return o=e.sent,e.abrupt("return",r({url:F.get()+"".concat(null==b?void 0:b.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:S({},n),params:S({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),C=function(e,n){var t,o,i=window.contentType;return r({method:"GET",url:F.get()+"".concat(null==b?void 0:b.getVideoInfoV2,"/").concat(i,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},k=function(e){var n=e.videoId;return r({method:"GET",url:F.get()+"".concat(null==b?void 0:b.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},F=(L=null==b?void 0:b.apiBaseUrl,{set:function(e){e&&(L=e)},get:function(){return L}}),V=function(e,n,t,o){return r({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},W=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},j=null;function N(){return{set:function(e){e&&(j=e)},get:function(){return j}}}var U=function(){var e=n(t.mark(function e(){var n,o,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=N().get(),o=F.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return i=e.sent,e.abrupt("return",i);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)}}(),M=null,B=function(){var e=n(t.mark(function e(){var n;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!W(n)){e.next=6;break}return M||(M=U().then(function(e){var t,o,r=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,i=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),i&&N().set(i),r||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){M=null})),e.abrupt("return",M);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),x=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},H=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function G(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 Y(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?G(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):G(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Q=function(){var e,n,t,o,r,i,a,s=l();return"linearchannel"===((null==s?void 0:s.contentType)||"video")?null==s||null===(e=s.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find(function(e){return(null==e?void 0:e.id)===(null==s?void 0:s.channelId)}))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==s||null===(r=s.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.id)||(null==s||null===(a=s.video)||void 0===a?void 0:a.id)||(null==s?void 0:s.id)};function z(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return"".concat(e()).concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e()).concat(e()).concat(e())}function q(){var e=window.sessionStorage.getItem("uid");return e||(e=z(),window.sessionStorage.setItem("uid",e),e)}function X(){return J.apply(this,arguments)}function J(){return(J=n(t.mark(function e(){var n,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:if(!(n=e.sent)){e.next=6;break}return o=JSON.parse(atob(n.split(".")[1])),e.abrupt("return",null!=o&&o.anonymousId?"guest-user":null==o?void 0:o.userId);case 6:return e.abrupt("return","guest-user");case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function K(e){return e?String(e):""}var $=function(e){return function(){try{return e.apply(void 0,arguments)}catch(e){return console.error(e),null}}};function Z(e,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&function(e,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=z(),s="WEBSITE",u=null,d=0,c=null,v=0,m=0,p=!1,f=[],g=i(e);if(g){var I,E,h,y,T=$(function(){for(var e=g.currentTime(),n=g.buffered(),t=0;t<n.length;t++){var o=n.start(t),r=n.end(t);if(e>=o&&e<=r)return Math.round(r-e)}return 0}),_=function(){var e=n(t.mark(function e(n){var o,i,u,d,c,v,m,p,f,g,I;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return f=e.sent,g=H(f),e.t0=Y,e.t1=Y,e.t2=null==g?void 0:g.site,e.t3=null==g?void 0:g.siteId,e.t4=s,e.t5=q(),e.t6=Q(),e.t7=n.url||document.location.href,e.t8=n.ref||document.referrer,e.t9=n.eventName,e.t10=null!==(o=n.videoPosition)&&void 0!==o?o:null,e.t11="production",e.t12=n.dp1||"",e.t13=n.dp2||"",e.t14=n.dp3||"",e.t15=n.dp4||"",e.t16=n.dp5||"",e.t17=n.isAdEvent?n.videoPosition:null,e.t18=n.isAdEvent?K(n.adPosition):"",e.next=25,X();case 25:e.t19=e.sent,e.t20=n.playerType||"videojs",e.t21=n.mediaType||"VIDEO",e.t22=l,e.t23=null!==(i=n.ttFirstFrame)&&void 0!==i?i:null,e.t24=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t25=null!==(d=n.resHeight)&&void 0!==d?d:null,e.t26=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t27=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t28={aid:e.t2,cid:e.t3,pfm:e.t4,uid:e.t5,vid:e.t6,url:e.t7,ref:e.t8,pa:e.t9,vpos:e.t10,environment:e.t11,dp1:e.t12,dp2:e.t13,dp3:e.t14,dp4:e.t15,dp5:e.t16,apos:e.t17,apod:e.t18,profid:e.t19,player:e.t20,media_type:e.t21,stream_id:e.t22,embedurl:"",ttfirstframe:e.t23,bitrate:e.t24,connectionspeed:null,resolutionheight:e.t25,resolutionwidth:e.t26,bufferhealth:e.t27},e.t29=(null==n?void 0:n.duration)&&{duration:n.duration},e.t30=(0,e.t1)(e.t28,e.t29),e.t31=null==a||null===(m=a.beacon)||void 0===m?void 0:m.params,e.t32=(0,e.t0)(e.t30,e.t31),I=[e.t32],r({url:(null==a||null===(p=a.beacon)||void 0===p?void 0:p.url)||F.get()+b.getBeaconUrl,method:"post",headers:{Authorization:f},contentType:"application/x-www-form-urlencoded",dataType:"text",data:I}).catch(function(e){return console.error(e)});case 41:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),S=function(e){if(!g.paused()&&g.readyState()>2)return clearInterval(u),clearInterval(c),e;var n,t=e+.1;return+t.toFixed(2)>=5&&m<4&&p?(m++,w("BUFFERING",Y({pfm:s,uid:q(),vid:Q(),videoPosition:Math.floor(g.currentTime)},null==a||null===(n=a.beacon)||void 0===n?void 0:n.params)),_({eventName:"BUFFERING",videoPosition:Math.floor(g.currentTime),isAdEvent:!1}),0):t};I=Math.floor(g.currentTime),g.on("error",function(){var e,n=Math.floor(g.currentTime);clearInterval(u);var t=I===n?"FAILED_TO_START":"DROPPED_STREAM";w(t,Y({pfm:s,uid:q(),vid:Q(),videoPosition:n},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),_({eventName:t,videoPosition:n,isAdEvent:!1})}),E=!1,g.on("waiting",$(function(){p&&(E=!0,clearInterval(u),u=setInterval(function(){E&&!g.paused()?v=S(v):clearInterval(u)},100))})),g.on("playing",$(function(){E=!1,clearInterval(u)})),h=function(e){var n,t,o,r=Y({videoPosition:Math.floor(g.currentTime),isAdEvent:!0,bufferHealth:T(),pfm:s,uid:q(),vid:Q(),resHeight:(null===(n=videoElement)||void 0===n?void 0:n.videoHeight)||null,resWidth:(null===(t=videoElement)||void 0===t?void 0:t.videoWidth)||null},null==a||null===(o=a.beacon)||void 0===o?void 0:o.params);w(e,Y({},r)),_(Y({eventName:e,adPosition:1},r))},g.on("adstart",function(){h("AD_REQUEST"),h("AD_IMPRESSION")}),g.on("adskip",function(){d=0}),g.on("adend",function(){d=0}),g.on("timeupdate",function(){var e,n,t,o,r=Math.floor(g.currentTime());if(console.log(r,f),r>=30&&r%30==0&&!f.includes(r)){var i,a=null===(i=g.el().getElementsByTagName("video"))||void 0===i?void 0:i[0];m=0,f.push(r),_({eventName:"PING",videoPosition:r,isAdEvent:!1,duration:30,resHeight:(null==a?void 0:a.videoHeight)||null,resWidth:(null==a?void 0:a.videoWidth)||null,bufferHealth:T(),bitrate:Math.round((null==g||null===(e=g.tech_)||void 0===e||null===(n=e.vhs)||void 0===n||null===(t=n.selectPlaylist())||void 0===t||null===(o=t.attributes)||void 0===o?void 0:o.BANDWIDTH)/1e3)})}}),y=$(function(){var e;d=0,c=setInterval(function(){d=S(d)},100),w("PLAY",Y({pfm:s,uid:q(),vid:Q(),videoPosition:Math.floor(g.currentTime)},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),_({eventName:"PLAY",videoPosition:Math.floor(g.currentTime),isAdEvent:!1}),o&&o("started_video_playback",{"Video ID":Q(),watchTime:Math.floor(g.currentTime)})}),g.one("play",y),g.on("loadeddata",function(){g.one("timeupdate",function(){var e;clearInterval(c),clearInterval(u),v=d||0,w("FIRST_FRAME",Y({pfm:s,uid:q(),vid:Q(),videoPosition:Math.floor(g.currentTime),ttFirstFrame:d,bufferHealth:T()},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),_({eventName:"FIRST_FRAME",videoPosition:Math.floor(g.currentTime),isAdEvent:!1,ttFirstFrame:d,bufferHealth:T()}),p=!0,d=0})})}else console.error("Videojs: Player instance not found.")}(e,o,a)}var ee=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},ne=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},te=function(e,n){var t=new Map;k({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),d(t)}).catch(function(e){return console.log(e)})},oe=function(){var e=s.get();return e>=0?e+1:1},re=function(){var e,n,t,o=u(),r=l(),i=null==r||null===(e=r.video)||void 0===e?void 0:e.id,a=s.get(),d=null==o||null===(n=o[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===i});return d>=0?d+1:1};function ie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function ae(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):ie(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var le=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},se=function(e){var n=ue(e,"video.tags",[]),t=ue(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},ue=function(e,n,t){for(var o=0,r=(n=n.split(".")).length;o<r;o++){var i;e=null===(i=e)||void 0===i?void 0:i[n[o]]}return e||t},de=function(){var n,t,o,r,l,s,u,d,c,v,m,p,f,g,I,E,h,y,T,w,b,_,S,O,L=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",P=arguments.length>1?arguments[1]:void 0,A=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return L;var D=(null==A?void 0:A.siteName)||"",R=(null==A?void 0:A.contentType)||"video",C=(null==A||null===(o=A[R])||void 0===o?void 0:o.metadata)||(null==A||null===(r=A[R])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.metadata),k=i(P);if(!L.includes("VIEWLIFT_"))return L;var F,V=window.getComputedStyle(document.getElementById(P),null),W=Math.trunc(V.getPropertyValue("height").slice(0,-2)),j=Math.trunc(V.getPropertyValue("width").slice(0,-2)),N="linearchannel"===R?null==A||null===(s=A.linearchannel)||void 0===s||null===(u=s.channels)||void 0===u||null===(d=u.find(function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)}))||void 0===d||null===(c=d.content)||void 0===c?void 0:c.id:ue(A,"video.gist.id",""),U="linearchannel"===R?null==A||null===(v=A.linearchannel)||void 0===v||null===(m=v.channels)||void 0===m||null===(p=m.find(function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)}))||void 0===p?void 0:p.title:ue(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),M=null,B=null;"function"==typeof window.__gpp&&(null===(F=window)||void 0===F||F.__gpp("ping",function(e){M=null==e?void 0:e.gppString,B=null==e?void 0:e.sectionList[0]}));var x=ae(ae({},ce(C)),{},(_={VIEWLIFT_WIDTH:j,VIEWLIFT_HEIGHT:W,VIEWLIFT_SIZE:le(j,W),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===(f=window)||void 0===f?void 0:f.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ue(A,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ue(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ue(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==k||null===(g=k.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==k||null===(I=k.options_)||void 0===I?void 0:I.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D||"usanetwork"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:se(A),VIEWLIFT_MEDIA_ID:N,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ue(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:N,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ue(A,"video.gist.permalink","")),VIEWLIFT_CONSENT:a.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ue(null===(E=window)||void 0===E||null===(h=E.app_data)||void 0===h||null===(y=h.site)||void 0===y?void 0:y.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_GDPR:"spinco"==D||"usanetwork"==D?"":ue(null===(T=window)||void 0===T||null===(w=T.app_data)||void 0===w||null===(b=w.site)||void 0===b?void 0:b.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*ue(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ue(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:N,VIEWLIFT_CONTENT_TITLE:U,VIEWLIFT_CONTENT_SERIES_TITLE:ue(A,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ue(A,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:re(),VIEWLIFT_SEASON_NUMBER:oe(),VIEWLIFT_CONTENT_TAGS:se(A),VIEWLIFT_GPP_SID:B||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:M||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(_,"VIEWLIFT_LAT",""),e(_,"VIEWLIFT_APP_BUNDLE",""),e(_,"VIEWLIFT_ATT_CONSENT",""),_),null===(S=window)||void 0===S||null===(O=S.customData)||void 0===O?void 0:O.macros);for(var H in x){var G=new RegExp(H,"g");L=L.replace(G,x[H])}return L},ce=function(e){var n,t,o,r,i,a,l={},s=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){s.set(e.name,e.value)}));var u=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,d=(null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(a=i.subscription)||void 0===a?void 0:a.TVE)||!1;return u||d?(ne()?u?l=ae(ae({},l),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||""}):d&&(l=ae(ae({},l),{},{VIEWLIFT_CSID:s.get("csid.mweb.tve")||""})):u?l=ae(ae({},l),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||""}):d&&(l=ae(ae({},l),{},{VIEWLIFT_CSID:s.get("csid.web.tve")||""})),u?l=ae(ae({},l),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}):d&&(l=ae(ae({},l),{},{VIEWLIFT_SFID:s.get("sfid.tve")||s.get("sfid.web.tve")||""})),l=ne()?ae(ae({},l),{},{VIEWLIFT_PROF:s.get("prof.mweb")||""}):ae(ae({},l),{},{VIEWLIFT_PROF:s.get("prof.web")||""})):(l=ae(ae({},l),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}),l=ne()?ae(ae({},l),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:s.get("prof.mweb")||""}):ae(ae({},l),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||"",VIEWLIFT_PROF:s.get("prof.web")||""})),l=ae(ae({},l),{},{VIEWLIFT_AFID:s.get("afid")})},ve=function(e,n){var t,o,r,i,a,l,s,u,d,c,v,m,p,f=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[f])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[f])||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.videoAssets,E=null==e||null===(i=e[f])||void 0===i||null===(a=i.streamingInfo)||void 0===a?void 0:a.audioAssets,h=(null==e||null===(l=e[f])||void 0===l||null===(s=l.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(d=e[f])||void 0===d||null===(c=d.liveDetails)||void 0===c||c.isDvrEnabled;var y=(null==e||null===(v=e[f])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return pe(E);if(g){var T=fe(I,n);return T.src=de(T.src,n,e),T}if("Safari"!==ee()&&y)return me(I);if(h){var w=pe(I);return w.src=de(w.src,n,e),w}if(null!=I&&I.mpeg){var b=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return b.src=de(b.src,n,e),b}return null},me=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},pe=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},fe=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,a=e.widevine,l=e.playReady,s=ee();if(i(n),"Safari"===s){var u=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(r,function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,r,i){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(a,function(e,n,t){console.log(e),e&&i(e),i(null,t)})}}}}}(r);return ge(n),u}var d,c={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(d=window)||void 0===d?void 0:d.siteName)?(ge(n),c.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==l?void 0:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var ge=function(e){var n=i(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==ee()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Ie=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var r=t.split(".com")[1]||"";return{src:r?"".concat(n).concat(r):t,type:o}},Ee=function(e,n){if(import("./error-2395864b.js").then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var r=document.createElement("div");r.className="error-container";var i=document.createElement("div");i.className="error-message",i.innerHTML="".concat(n),r.appendChild(i),o.append(r)}}},he=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var ye=!1,Te=function(e,n,t){var o=de(n,e,t),r=i(e);if(n&&window.google){if("function"!=typeof r.ima)return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,o,r,a=i(e);if(null!==a.el_){ye=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),ye&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout(function(){a.ima.setContentWithAdTag(null,n,!0),a.ima.requestAds()},1e3));var s=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&s.hasAttribute("controls")&&s.removeAttribute("controls");var u="click",d=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(d=!0,u="touchend"),a.one(u,function(){d&&a.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.adEventHandler)||null;a.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),a.one("ads-manager",function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}),n.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),a.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,o)}};function we(e,n){var t,o,r,a=i(e),l=null==a||null===(t=a.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,s=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var o,r,i,u,d,c,v,m,p;if(_e.enabled&&"input"!=t.target.localName){var f=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(f)&&(t.preventDefault(),null==s||s.focus()),f){case" ":null==l||l.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||Ze(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(u=i.appcmsMain)||void 0===u||null===(d=u.adsConfig)||void 0===d?void 0:d.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(m=v.appcmsMain)&&void 0!==m&&null!==(p=m.adsConfig)&&void 0!==p&&p.vodAdClientSideTracking)return;g||$e(e,10)}}},!0)}var be,_e=(be=!0,{enable:function(){be=!0},disable:function(){be=!1},get enabled(){return be}}),Se="ssai-breakStart",Oe="ssai-adImpression",Le="ssai-firstQuartile",Pe="ssai-midpoint",Ae="ssai-thirdQuartile",De="ssai-complete",Re="ssai-breakEnd",Ce={breakStart:Se,impression:Oe,firstQuartile:Le,midpoint:Pe,thirdQuartile:Ae,complete:De,breakEnd:Re};function ke(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=i(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=Ce[o];r&&t.trigger(r,n)}function Fe(e){var n=i(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(Se,e)},adImpression:function(e){return t(Oe,e)},adFirstQuartile:function(e){return t(Le,e)},adMidpoint:function(e){return t(Pe,e)},adThirdQuartile:function(e){return t(Ae,e)},adComplete:function(e){return t(De,e)},adBreakEnd:function(e){return t(Re,e)}}}function Ve(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 We(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ve(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function je(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 Ne(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)?Ne(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw i}}}}function Ne(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var Ue,Me=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),Be=(Ue=null,{set:function(e){Ue=e},get position(){return Ue}});function xe(e,n){return He.apply(this,arguments)}function He(){return(He=n(t.mark(function e(n,o){var r,a,l,s,u,d,c,v,m,p,f,g,I,E;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i(n),r=ve(o,n),a=r.src,l=a.replace("/dash/","/session/").replace("/master/","/session/"),l=de(l,n,o),s=Ge(l),u=h(s,2),d=u[0],c=u[1],l=new URL(l.split("?")[0]),Object.keys(c).length>0&&Object.entries(c).forEach(function(e){var n=h(e,2),t=n[0],o=n[1];l.searchParams.set(t,o)}),e.prev=8,e.next=11,fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:We({},d)})});case 11:return v=e.sent,e.next=14,v.json();case 14:return m=e.sent,p="https://"+new URL(l).hostname,f=m.trackingUrl,g=m.manifestUrl,I=p+f,E=p+g,Me.set(I),console.log("%c TRACKING URL","background: #bdf369; color: #000",I),r.src=E,e.abrupt("return",r);case 26:return e.prev=26,e.t0=e.catch(8),e.abrupt("return",r);case 29:case"end":return e.stop()}},e,null,[[8,26]])}))).apply(this,arguments)}function Ge(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),r=je((null==o?void 0:o.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var i=h(t.value,2),a=i[0],l=i[1];n[decodeURIComponent(a)]=decodeURIComponent(l||"")}}catch(e){r.e(e)}finally{r.f()}for(var s={},u={},d=0,c=Object.entries(n);d<c.length;d++){var v=h(c[d],2),m=v[0],p=v[1];if(m.startsWith("ads."))s[m.replace(/^ads\./,"")]=p;else u[m]=p}return[s,u]}var Ye,Qe=(Ye=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),Ye=Array.isArray(e)?E(e):Ye},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",Ye),E(Ye)}});function ze(e,n){return qe.apply(this,arguments)}function qe(){return qe=n(t.mark(function e(o,r){var a,l,s,u,d,c,v,m,p,f,I,h,y,T,w,b,_,S,O,L,P,A,D;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:D=function(e,n,t,r,a,l){var s=i(o);if(!s.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(s.currentTime());var u,d=je(t);try{var c=function(){var t,i,d,c=u.value,v=c.eventType,m=c.beaconUrls,p=c.startTimeInSeconds,f=c.startTime,g=c.durationInSeconds,I=p||0,E=m,h=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(d=i.ads)||void 0===d?void 0:d.adEventHandler)||null,y="".concat(I,"_").concat(v),T=P.get("pod-".concat(a))||[];if(console.warn(e,I,"map:",v,"condition1:",e>=I,"map:",P),e>=I&&!T.includes(y)){T.push(y),P.set("pod-".concat(a),T);try{A(v,n,E,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var w=Be.position;Be.set(null),setTimeout(function(){null!=w&&(s.currentTime(w),l())},500)}if("function"==typeof h)try{var b,_={eventType:v,startTimeInSeconds:p,startTime:f,durationInSeconds:g,ad:null==n||null===(b=n.ads)||void 0===b?void 0:b[r],adIndex:r};h({adsData:_}),ke(o,_)}catch(e){console.error("Error when calling ads callback:",e)}}};for(d.s();!(u=d.n()).done;)c()}catch(e){d.e(e)}finally{d.f()}}},A=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},L=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Be.set(r),p=Me.get(),(f=i(o)).one("loadeddata",function(){p&&O(p)}),I=new Map,h=new Map,y=-1,T=(null===(a=document)||void 0===a||null===(l=a.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,w=(null==f||null===(s=f.controlBar)||void 0===s?void 0:s.getChild("videoSelector"))||null,b=(null==f||null===(u=f.controlBar)||void 0===u?void 0:u.getChild("seriesV2"))||null,_=(null==f||null===(d=f.el())||void 0===d||null===(c=d.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,S=(null==f||null===(v=f.el())||void 0===v||null===(m=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,O=function(){var e=n(t.mark(function e(n){var a,l,s,u,d,c,v,m,p,f,O,P,A,R,C,k,F,V,W,j;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return k=function(e){document.removeEventListener("pointermove",C),document.removeEventListener("pointerup",k),0===e.button&&A()},C=function(e){},R=function(){var e,n=f.currentTime(),t=null,o=je(p);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,a=r.durationInSeconds,l=(r.ads,Math.floor(i+a));n>=i&&n<=l&&(t=l,I.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){f.currentTime(t+2.2)},100))},A=function(){var e,n=f.currentTime(),t=null,o=je(p);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,a=r.durationInSeconds,l=r.ads,s=Math.floor(i+a);(Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n>s||n>i)&&!I.has(i)||n>=i&&n<=s)&&(t=i,I.set(i,!0),h.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){f.currentTime(t+.4)},100))},d=!1,e.next=7,fetch(n);case 7:return c=e.sent,e.next=10,c.json();case 10:v=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",v),m=v.avails,p=[],f=i(o),O=f.controlBar.progressControl,P=O.seekBar.el(),null===(a=document)||void 0===a||a.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),m.map(function(e,n){var t,o,r;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(d=!0),p.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(r=o.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===r?void 0:r[0])||[]})}),!d&&r&&(f.currentTime(r),R()),null!=p&&p.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),window.adsQueueList=p),console.log(p,"data"),p.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=f.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",P.appendChild(i)}}),f._timeUpdateHandler&&f.off("timeupdate",f._timeUpdateHandler),f._timeUpdateHandler=g(function(){var e=f.currentTime();if(e!==y){y=e;for(var n=!1,t=function(){var t=p[o],r=t.startTimeInSeconds,i=t.durationInSeconds,a=t.ads,l=r+i;if(e>=r-1.2&&e<=l+1.2){e>=r&&e<=l&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n=!0),e>l&&I.set(r,!0),_e.disable(),T&&T.classList.add("vjs-hidden"),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),w&&(w.el().style.pointerEvents="none",w.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),O.el().classList.add("hide-progress-bar");for(var s=e-r,u=0,d=0,c=0;c<a.length;c++){var v,m=null==a||null===(v=a[c])||void 0===v?void 0:v.durationInSeconds;if(s<u+m){d=c;break}u+=m}a[d];var f=Math.max(0,i-s),g=Math.round(f);F.style.display="block",j.textContent="".concat(d+1," of ").concat(a.length," • ").concat(L(g));var y=[];return null==a||a.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});y.push.apply(y,E(n))}),Array.isArray(a)&&0==(null==a?void 0:a.length)&&y.push(null==t?void 0:t.podSlotImpressionBeacon),D(e,t,y,d,o,R),"break"}h.delete(r)},o=0;o<p.length;o++){if("break"===t())break}n||(F.style.display="none",O.el().classList.remove("hide-progress-bar"),w&&(w.el().style.pointerEvents="auto",w.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),_e.enable())}},1e3),f.on("timeupdate",f._timeUpdateHandler),null===(l=document)||void 0===l||l.addEventListener("keydown",function(e){_e.enabled&&"ArrowRight"==e.key&&(A(),$e(o,10),e.stopPropagation())}),O.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",C),document.addEventListener("pointerup",k))}),null===(s=document)||void 0===s||null===(u=s.querySelectorAll(".ssai-ad-container"))||void 0===u||u.forEach(function(e){return null==e?void 0:e.remove()}),(F=document.createElement("div")).className="ssai-ad-container",(V=document.createElement("div")).className="sponsored-adbox",(W=document.createElement("div")).className="sponsored-text",W.textContent="Sponsored Ad",V.append(W),(j=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",F.append(V),F.append(j),f.el().appendChild(F);case 45:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),P=new Map;case 18:case"end":return e.stop()}},e)})),qe.apply(this,arguments)}function Xe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}var Je=function(e){o(e).play()},Ke=function(e){o(e).pause()},$e=function(e,n){var t=o(e),r=t.currentTime()+n;t.currentTime(r)},Ze=function(e,n){var t=o(e),r=t.currentTime(),i=r<=n?0:r-n;t.currentTime(i)},en=function(e){return!!o.getPlayer("".concat(e))},nn=function(e){return o(e).paused()},tn=function(){var e=n(t.mark(function e(n,o){var r,a,l,s=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=s.length>2&&void 0!==s[2]&&s[2],e.next=3,B();case 3:return a=e.sent,l=i(n),e.abrupt("return",new Promise(function(e,t){var i=(null==o?void 0:o.programs)||[];null==o||delete o.programs,A(o,a).then(function(t){var a=null==t?void 0:t.data;window.sid=z(),a.contentType="linearchannel",a.channelId=null==o?void 0:o.channelId;var s=ve(a,n);c(a),m(i),sessionStorage.setItem("program_switched",!0),s&&r?(sn(n,s),l.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:a})})):e({status:!0,msg:"Feed authenticated",response:a})}).catch(function(e){t({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),on=function(){var e=n(t.mark(function e(o,r,a){var l,s,d,m,g,I,E;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return m=e.sent,(u()||null)&&v(r),g=0,I=0,E=null,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(s=window)&&void 0!==s&&null!==(d=s.watchHistory)&&void 0!==d&&d.enable&&C(r,m).then(function(e){var n,t,o,r,i,a,l;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(null==e?void 0:e.data)),g=(null==e||null===(i=e.data)||void 0===i?void 0:i.watchedTime)||null,(I=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null)<95)&&(E=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null)}).catch(function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))}),e.abrupt("return",new Promise(function(e,a){P(r,m).then(function(){var r=n(t.mark(function n(r){var l,s,u,d,v,m,h,y,T,w,b,_,S,O,L,P,A,D,R,C,k,F,V,W,j,N,U,M,B,x,H,G,Y,Q,z,q,X,J;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(P=null==r?void 0:r.data,A=(null==P?void 0:P.contentType)||"video",D=(null==P||null===(l=P[A])||void 0===l?void 0:l.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(s=window)||void 0===s||null===(u=s.app_data)||void 0===u||null===(d=u.appcmsMain)||void 0===d||null===(v=d.adsConfig)||void 0===v?void 0:v.vodAdSticherProvider)||!1,R=(null==P||null===(m=P.video)||void 0===m||null===(h=m.streamingInfo)||void 0===h?void 0:h.isLiveStream)||!1,c(r.data),(C=(null==P||null===(y=P.ads)||void 0===y||null===(T=y.preRoll)||void 0===T||null===(w=T.adTags)||void 0===w||null===(b=w.web)||void 0===b?void 0:b.active)&&(null==P||null===(_=P.ads)||void 0===_||null===(S=_.preRoll)||void 0===S||null===(O=S.adTags)||void 0===O||null===(L=O.web)||void 0===L?void 0:L.url))&&Te(o,C,P),k=ve(P,o),!D){n.next=12;break}return n.next=11,xe(o,P);case 11:k=n.sent;case 12:k?(G=(null==P||null===(F=P.video)||void 0===F||null===(V=F.gist)||void 0===V?void 0:V.videoImageUrl)||(null==P||null===(W=P.video)||void 0===W||null===(j=W.gist)||void 0===j||null===(N=j.imageGist)||void 0===N?void 0:N.r16x9),(Y=i(o)).poster(G),sn(o,k),D&&ze(o,E),Y.on("loadstart",function(){R&&e({status:!0,msg:"Video Loaded",response:P})}),Y.on("loadeddata",function(){he(),e({status:!0,msg:"Video Loaded",response:P})}),Y.one("play",function(){g&&!D&&I<95&&setTimeout(function(){Y.currentTime(g)},0)}),Y.one("error",function(){var e;a({status:!1,msg:(null==Y||null===(e=Y.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==P||null===(U=P.video)||void 0===U||null===(M=U.contentDetails)||void 0===M||null===(B=M.closedCaptions)||void 0===B?void 0:B.length)>0||(null==P||null===(x=P.video)||void 0===x||null===(H=x.closedCaptions)||void 0===H?void 0:H.length)>0?(J=(null==P||null===(z=P.video)||void 0===z||null===(q=z.contentDetails)||void 0===q?void 0:q.closedCaptions)||(null==P||null===(X=P.video)||void 0===X?void 0:X.closedCaptions),Q=J.filter(function(e){return"VTT"===e.format}),p(o,Q)):f(o)):(Ee(o,"Incompatible Source, only hls,mp4,drm content is allowed"),a("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}},n)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){un(e,o,a,r)})}));case 10:case"end":return e.stop()}},e)}));return function(n,t,o){return e.apply(this,arguments)}}(),rn=function(e,n,t){var o=i(e);return o.src(n),new Promise(function(e,n){var r=0;o.one("loadedmetadata",function(){clearTimeout(r),e({status:!0,msg:"video loaded"})}),o.one("loadstart",function(e){r=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},an=function(e){var n=i(e);if(ln(),I(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},ln=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()},sn=function(e,n){var t=i(e);t&&t.src(n)},un=function(n,t,o,r){var i,a,l,s,u,d,c=null==n||null===(i=n.response)||void 0===i||null===(a=i.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(s=l.data)||void 0===s?void 0:s.errorMessage)||(null==n?void 0:n.message);en(t)&&Ee(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(d=window)||void 0===d?void 0:d.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Xe(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}({status:!1,response:n,msg:"".concat(v)},r&&{videoId:r}))},dn=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")};export{Ze as A,en as B,on as C,tn as D,an as E,V as F,Qe as G,Fe as H,F as I,x as J,N as K,W as L,T as M,we as N,ne as O,nn as P,_e as Q,Me as R,ke as S,ze as T,k as U,re as a,oe as b,ve as c,ee as d,he as e,dn as f,q as g,Ee as h,Z as i,Te as j,Ie as k,sn as l,xe as m,H as n,P as o,C as p,un as q,B as r,R as s,A as t,D as u,te as v,rn as w,$e as x,Je as y,Ke as z};
@@ -1 +0,0 @@
1
- import{h as e,d as n,e as o,o as t,p as l,q as r,r as i,s as a}from"./features-a0055c95.js";import{g as s}from"./player_instance-34118a5b.js";import{a as d,i as u,b as c}from"./index-9d6174b2.js";import{O as v,Q as p,R as m,S as f,c as y,N as h,T as b}from"./generic-d58ba745.js";import"videojs-contrib-quality-menu";import{i as g,r as j}from"./index-85e80573.js";import{c as k}from"./helper-d52dff3c.js";import{c as S,a as w,b as E}from"./currentVideoInfo-0b234e55.js";import I from"video.js";import A from"@babel/runtime/helpers/toConsumableArray";import C from"@babel/runtime/helpers/asyncToGenerator";import T from"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"js-cookie";import{t as B}from"./skin-1d47c799.js";import"axios";import{c as L,d as x}from"./icons-37daa6b3.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./resolution-62be852a.js";import"@babel/runtime/helpers/assertThisInitialized";import"./localisation-0bf399a1.js";import"./autoNextVideo-fad617dc.js";import"./util-9975a0d0.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"./captions-78bd2908.js";import"video.js/dist/video-js.min.css";function M(n,o){var t=s(n);t&&(t.on("loadeddata",function(){var e,l,r,i,a,c=k(o),p=S();t.qualityLevels()&&t.qualityLevels().length&&function(e){var n=s(e);n&&(null==n||n.qualityMenu,n.qualityMenu({useResolutionLabels:!0}))}(n),!(null!=o&&null!==(e=o.series)&&void 0!==e&&e.enable||null!==(l=window)&&void 0!==l&&null!==(r=l.app_data)&&void 0!==r&&null!==(i=r.appcmsMain)&&void 0!==i&&null!==(a=i.features)&&void 0!==a&&a.auto_play)||null!=o&&o.liveVideo||d(n,o),null!=o&&o.liveVideo||v()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===siteId||"cea398b9-09ab-4331-958f-8c3d6a356b88"===siteId||u(n),c&&p&&p.length?g(n):j()}),t.one("play",function(){var o,t,l,r;null!==(o=window)&&void 0!==o&&null!==(t=o.customData)&&void 0!==t&&t.iframeOverlayUrl&&e(n,null===(l=window)||void 0===l||null===(r=l.customData)||void 0===r?void 0:r.iframeOverlayUrl)}))}function _(e,n){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=function(e,n){if(e){if("string"==typeof e)return N(e,n);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?N(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){o&&(e=o);var t=0,l=function(){};return{s:l,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i=!0,a=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return i=e.done,e},e:function(e){a=!0,r=e},f:function(){try{i||null==o.return||o.return()}finally{if(a)throw r}}}}function N(e,n){(null==n||n>e.length)&&(n=e.length);for(var o=0,t=Array(n);o<n;o++)t[o]=e[o];return t}function O(){return O=C(T.mark(function e(n){var o,t,l,r,i,a,d,u,c,v,y,h,b,g,j,k,S,w,E,I,L,x,M,N,O,D;return T.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:D=function(e,o,t,l,r){var i=s(n);if(!i.seeking()){o.startTimeInSeconds,o.durationInSeconds,Math.floor(i.currentTime());var a,d=_(t);try{for(d.s();!(a=d.n()).done;){var u,c,v,p=a.value,m=p.eventType,y=p.beaconUrls,h=p.startTimeInSeconds,b=p.startTime,g=p.durationInSeconds,j=h||0,k=y,S=(null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.adEventHandler)||null,w="".concat(j,"_").concat(m),E=N.get("pod-".concat(r))||[];if(console.warn(e,j,"map:",m,"condition1:",e>=j,"map:",N),e>=j&&!E.includes(w)){E.push(w),N.set("pod-".concat(r),E);try{O(m,o,k,i)}catch(e){console.error("Error when calling triggerAdBeacon:",e,m,o)}if("function"==typeof S)try{var I,A={eventType:m,startTimeInSeconds:h,startTime:b,durationInSeconds:g,ad:null==o||null===(I=o.ads)||void 0===I?void 0:I[l],adIndex:l};S({adsData:A}),f(n,A)}catch(e){console.error("Error when calling ads callback:",e)}}}}catch(e){d.e(e)}finally{d.f()}}},O=function(e,n,o,t){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(t.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(t.currentTime())),"AD_POD:",n),null==o||o.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},M=function(e){var n=Math.floor(e/60),o=Math.floor(e%60);return"".concat(n,":").concat(o.toString().padStart(2,"0"))},h=function(){y&&clearInterval(y)},c=m.get(),v=s(n),y=null,v.one("loadeddata",function(){y=setInterval(function(){c&&!v.paused()&&x(c)},4e3)}),v.on("sourceset",function(e){console.log(e,"sourceset")}),v.on("dispose",function(){h()}),b=new Map,g=new Map,j=-1,k=(null===(o=document)||void 0===o||null===(t=o.getElementsByClassName("tvProviderImage"))||void 0===t?void 0:t[0])||null,S=(null==v||null===(l=v.controlBar)||void 0===l?void 0:l.getChild("videoSelector"))||null,w=(null==v||null===(r=v.controlBar)||void 0===r?void 0:r.getChild("seriesV2"))||null,E=(null==v||null===(i=v.el())||void 0===i||null===(a=i.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===a?void 0:a[0])||null,I=(null==v||null===(d=v.el())||void 0===d||null===(u=d.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===u?void 0:u[0])||null,L=!1,x=function(){var e=C(T.mark(function e(o){var t,l,r,i,a,d,u,c,v,m,f,y,h,C;return T.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(o);case 2:return i=e.sent,e.next=5,i.json();case 5:if(a=e.sent,d=a.avails,u=[],c=s(n),v=c.controlBar.progressControl,m=v.seekBar.el(),null===(t=document)||void 0===t||t.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),d.map(function(e,n){var o,t;u.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(t=o.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===t?void 0:t[0])||[]})}),null!=u&&u.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",u),window.adsQueueList=u),console.log(u,"data"),u.forEach(function(e){var n=e.markerPositionInSeconds,o=e.ads,t=c.duration();if(!(n>t||Array.isArray(o)&&0==(null==o?void 0:o.length))){var l=n/t*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(l,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(l,"%"),r.style.pointerEvents="none",m.appendChild(r)}}),!L||!c._timeUpdateHandler){e.next=18;break}return e.abrupt("return");case 18:c._timeUpdateHandler&&c.off("timeupdate",c._timeUpdateHandler),c._timeUpdateHandler=B(function(){var e=c.currentTime();if(e!==j){j=e;for(var n=function(){var n=u[o],t=n.startTimeInSeconds,l=n.durationInSeconds,r=n.ads,i=t+l;if(e>=t-1.2&&e<=i+1.2){L=!!(e>=t&&e<=i&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>i&&b.set(t,!0),p.disable(),k&&k.classList.add("vjs-hidden"),E&&(E.style.pointerEvents="none",E.classList.add("vjs-hidden")),I&&(I.style.pointerEvents="none",I.classList.add("vjs-hidden")),S&&(S.el().style.pointerEvents="none",S.el().classList.add("vjs-hidden")),w&&(w.el().style.pointerEvents="none",w.el().classList.add("vjs-hidden")),v.el().classList.add("hide-progress-bar");for(var a=e-t,s=0,d=0,c=0;c<r.length;c++){var m,y=null==r||null===(m=r[c])||void 0===m?void 0:m.durationInSeconds;if(a<s+y){d=c;break}s+=y}r[d];var h=Math.max(0,l-a),j=Math.round(h);f.style.display="block",C.textContent="".concat(d+1," of ").concat(r.length," • ").concat(M(j));var T=[];return null==r||r.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});T.push.apply(T,A(n))}),Array.isArray(r)&&0==(null==r?void 0:r.length)&&T.push(null==n?void 0:n.podSlotImpressionBeacon),D(e,n,T,d,o),"break"}g.delete(t)},o=0;o<u.length;o++){if("break"===n())break}L||(f.style.display="none",v.el().classList.remove("hide-progress-bar"),S&&(S.el().style.pointerEvents="auto",S.el().classList.remove("vjs-hidden")),w&&(w.el().style.pointerEvents="auto",w.el().classList.remove("vjs-hidden")),k&&k.classList.remove("vjs-hidden"),E&&(E.style.pointerEvents="auto",E.classList.remove("vjs-hidden")),I&&(I.style.pointerEvents="auto",I.classList.remove("vjs-hidden")),p.enable())}},1e3),c.on("timeupdate",c._timeUpdateHandler),null===(l=document)||void 0===l||null===(r=l.querySelectorAll(".ssai-ad-container"))||void 0===r||r.forEach(function(e){return null==e?void 0:e.remove()}),(f=document.createElement("div")).className="ssai-ad-container",(y=document.createElement("div")).className="sponsored-adbox",(h=document.createElement("div")).className="sponsored-text",h.textContent="Sponsored Ad",y.append(h),(C=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",f.append(y),f.append(C),c.el().appendChild(f);case 37:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),N=new Map;case 22:case"end":return e.stop()}},e)})),O.apply(this,arguments)}function D(e,d){s(e).addClass("skin_vlone"),M(e,d),function(e,s){var d,u,v,p,m,f,g,j,S,I=(null==s?void 0:s.liveVideo)||!1,A=(null==s||null===(d=s.res)||void 0===d||null===(u=d.video)||void 0===u?void 0:u.isSSAIEnabled)||!1,C=y(null==s?void 0:s.res,e)||{};C.src;var T=(null==s?void 0:s.skin_settings)||{};k(s),null!=T&&T.skipBtn&&0==(null==s?void 0:s.liveVideo)&&0==(null==s?void 0:s.liveui)&&n(e,"VL_ONE",L());(null!=T&&T.rewindBtn&&0==(null==s?void 0:s.liveVideo)&&0==(null==s?void 0:s.liveui)||1==(null==s?void 0:s.liveui))&&o(e,"VL_ONE",x());(null==s||null===(v=s.relatedVideos)||void 0===v||null===(p=v.content)||void 0===p?void 0:p.length)>0&&t(e,null==s?void 0:s.relatedVideos);null!=s&&null!==(m=s.series)&&void 0!==m&&m.enable&&l(e,s);(null==s||null===(f=s.streams)||void 0===f?void 0:f.length)>1&&r(e,null==s?void 0:s.streams);if(c(e,s),h(e,s),"MEDIA_TAILOR"==(null===(g=ads)||void 0===g?void 0:g.vodAdSticherProvider)&&null!==(j=ads)&&void 0!==j&&j.vodAdClientSideTracking&&A)if(I)!function(e){O.apply(this,arguments)}(e);else{var B,M=null;if(null!=s&&null!==(B=s.series)&&void 0!==B&&B.enable){var _,N,D,V,P,q=null===(_=w())||void 0===_||null===(N=_.video)||void 0===N||null===(D=N.gist)||void 0===D?void 0:D.id,H=E(),U=(null==H?void 0:H.get(q))||{t:0,p:0},R=U.t,Q=U.p;"function"==typeof(null===(V=window)||void 0===V||null===(P=V.watchHistory)||void 0===P?void 0:P.cb)&&window.watchHistory.cb({watchedTime:R}),Q<95&&(M=R)}else{var F=s.watchHistoryResumeTime;s.watchedPercentage<95&&(M=F)}b(e,M)}null!=s&&s.isDvrEnabled&&null!=s&&null!==(S=s.dvrConfig)&&void 0!==S&&S.enable&&(i(e,s),a(e,s))}(e,d),V(e,d)}var V=function(e,n){var o,t,l,r,i,a,d,u,c,v,p,m,f=s(e),y=(null==n?void 0:n.theme)||{},h=I.dom.$(".vjs-play-progress"),b=I.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");b&&(b.style.color="".concat(null===(o=window)||void 0===o||null===(t=o.app_data)||void 0===t||null===(l=t.appcmsMain)||void 0===l||null===(r=l.brand)||void 0===r||null===(i=r.cta)||void 0===i||null===(a=i.primary)||void 0===a?void 0:a.backgroundColor)),h&&(h.style.background="".concat(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c||null===(v=c.brand)||void 0===v||null===(p=v.cta)||void 0===p||null===(m=p.primary)||void 0===m?void 0:m.backgroundColor));var g=f.getChild("BigPlayButton")||null;(null==y?void 0:y.progressBarColor)&&h&&(h.style.background=y.progressBarColor),(null==y?void 0:y.playButtonBackgroundColor)&&g&&(g.el().style.background=y.playButtonBackgroundColor),(null==y?void 0:y.playButtonColor)&&b&&(b.style.color=y.playButtonColor),(null==y?void 0:y.playButtonType)&&("square"==(null==y?void 0:y.playButtonType)?g.el().style.borderRadius=".3em":g.el().style.borderRadius="1.3em")};export{D as initialiseSkin};